ce8110fc2710d9752427ea7b2e7f26163e15afac
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-07 Tom Tromey <tom@tromey.com>
2
3 * stack.c (backtrace_command): Use std::string.
4 (backtrace_command_1): Make "count_exp" const.
5
6 2017-11-07 Tom Tromey <tom@tromey.com>
7
8 * source.c (directory_switch, mod_path, add_path): Constify.
9 * defs.h (add_path, mod_path, directory_switch): Constify.
10 * mi/mi-cmd-env.c (env_mod_path): Constify.
11
12 2017-11-07 Tom Tromey <tom@tromey.com>
13
14 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
15 (run_command_1, continue_command, step_1, jump_command)
16 (signal_command, until_command, advance_command, finish_command)
17 (attach_command): Update.
18
19 2017-11-07 Tom Tromey <tom@tromey.com>
20
21 * command.h (set_cmd_cfunc): Don't declare.
22 * cli/cli-decode.c (set_cmd_cfunc): Now static.
23
24 2017-11-07 Tom Tromey <tom@tromey.com>
25
26 * stack.c (select_frame_command): Constify.
27 * cli/cli-decode.c (add_com_suppress_notification): Constify.
28 * command.h (add_com_suppress_notification): Constify.
29
30 2017-11-07 Tom Tromey <tom@tromey.com>
31
32 * breakpoint.c (stop_command): Constify.
33 * cli/cli-decode.c (struct cmd_list_element): Constify.
34 * command.h (add_abbrev_prefix_cmd): Constify.
35
36 2017-11-07 Pedro Alves <palves@redhat.com>
37
38 * breakpoint.c (extract_bp_kind): New enum.
39 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
40 factored out from ...
41 (extract_bp_number_and_location): ... here.
42 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
43
44 2017-11-07 Pedro Alves <palves@redhat.com>
45
46 * breakpoint.c (extract_bp_number_and_location): Change return
47 type to void. Throw error instead of warning.
48 (enable_disable_command): Adjust.
49
50 2017-11-07 Xavier Roirand <roirand@adacore.com>
51 Pedro Alves <palves@redhat.com>
52
53 * breakpoint.c (map_breakpoint_number_range): New, factored out
54 from ...
55 (map_breakpoint_numbers): ... here.
56 (find_location_by_number): Change parameters from string to
57 breakpoint number and location.
58 (extract_bp_number_and_location): New function.
59 (enable_disable_bp_num_loc)
60 (enable_disable_breakpoint_location_range)
61 (enable_disable_command): New functions, factored out ...
62 (enable_command, disable_command): ... these functions, and
63 adjusted to support ranges.
64 * NEWS: Document enable/disable breakpoint location range feature.
65
66 2017-11-06 Luis Machado <luis.machado@linaro.org>
67
68 * MAINTAINERS (Write After Approval): Update my e-mail address.
69
70 2017-11-06 Pedro Alves <palves@redhat.com>
71
72 * gnu-nat.c (gnu_terminal_init): Delete.
73 (gnu_target): Don't install gnu_terminal_init.
74 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
75 (child_terminal_init): ... this function.
76
77 2017-11-06 Pedro Alves <palves@redhat.com>
78
79 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
80 sgtty.h.
81 * config.in, configure: Regenerate.
82
83 2017-11-06 Pedro Alves <palves@redhat.com>
84
85 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
86 (async_init_signals): Adjust.
87 (handle_stop_sig): Rename to ...
88 (handle_sigtstp): ... this.
89 (async_stop_sig): Rename to ...
90 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
91 SIGTSTP path.
92 * event-top.h: Move signal.h include to the top. Check SIGTSTP
93 instead of STOP_SIGNAL thoughout.
94 (handle_stop_sig): Rename to ...
95 (handle_sigtstp): ... this.
96 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
97
98 2017-11-06 Pedro Alves <palves@redhat.com>
99
100 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
101 longer set flags twice in row.
102
103 2017-11-06 Pedro Alves <palves@redhat.com>
104
105 * Makefile.in (SER_HARDWIRE): Update comment.
106 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
107 * common/gdb_termios.h: Delete file.
108 * common/job-control.c: Include termios.h and unistd.h instead of
109 gdb_termios.h.
110 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
111 check.
112 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
113 Remove sgtty code.
114 * configure.ac: No longer check for termio.h and sgtty.h.
115 * configure: Regenerate.
116 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
117 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
118 Replace PROCESS_GROUP_TYPE references with pid_t references
119 throughout.
120 (gdb_getpgrp): Delete.
121 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
122 (child_terminal_inferior): Remove comment. Remove sgtty code.
123 (child_terminal_ours_1): Use tcgetpgrp directly instead of
124 gdb_getpgrp. Use serial_set_tty_state instead aof
125 serial_noflush_set_tty_state. Remove sgtty code.
126 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
127 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
128 (inferior_process_group): Now returns pid_t.
129 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
130 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
131 * ser-event.c (serial_event_ops): Update.
132 * ser-go32.c (dos_noflush_set_tty_state): Delete.
133 (dos_ops): Update.
134 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
135 * ser-pipe.c (pipe_ops): Update.
136 * ser-tcp.c (tcp_ops): Update.
137 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
138 HAVE_TERMIOS checks.
139 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
140 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
141 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
142 assume termios.
143 (hardwire_noflush_set_tty_state): Delete.
144 (hardwire_print_tty_state, hardwire_drain_output)
145 (hardwire_flush_output, hardwire_flush_input)
146 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
147 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
148 code, and assume termios.
149 (hardwire_ops): Update.
150 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
151 * serial.c (serial_noflush_set_tty_state): Delete.
152 * serial.h (serial_noflush_set_tty_state): Delete.
153 (serial_ops::noflush_set_tty_state): Delete.
154
155 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
156
157 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
158 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
159 (COMMON_OBS): Remove doublest.o and dfp.o.
160 Do not build target-float.c (instead of doublest.c)
161 with -Wformat-nonliteral.
162
163 * doublest.c: Remove file.
164 * doublest.h: Remove file.
165 * dfp.c: Remove file.
166 * dfp.h: Remove file.
167
168 * target-float.c: Do not include "doublest.h" and "dfp.h".
169 (DOUBLEST): Move here from doublest.h.
170 (enum float_kind): Likewise.
171 (FLOATFORMAT_CHAR_BIT): Likewise.
172 (FLOATFORMAT_LARGEST_BYTES): Likewise.
173 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
174 (floatformat_precision): Likewise.
175 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
176 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
177 Likewise.
178 (host_float_format, host_double_format, host_long_double_format):
179 Likewise.
180 (floatformat_to_string, floatformat_from_string): Likewise.
181 (floatformat_to_doublest): Likewise. Also, inline the original
182 convert_floatformat_to_doublest.
183 (floatformat_from_doublest): Likewise. Also, inline the original
184 convert_floatformat_from_doublest.
185
186 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
187 (MAX_DECIMAL_STRING): Move here from dfp.c.
188 (match_endianness): Likewise.
189 (set_decnumber_context, decimal_check_errors): Likewise.
190 (decimal_from_number, decimal_to_number): Likewise.
191 (decimal_to_string, decimal_from_string): Likewise. Make static.
192 (decimal_from_longest, decimal_from_ulongest): Likewise.
193 (decimal_to_longest): Likewise.
194 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
195 (decimal_convert): Likewise.
196
197 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
198
199 * doublest.c: Do not include "gdbtypes.h".
200 (extract_typed_floating): Remove.
201 (store_typed_floating): Remove.
202 (convert_typed_floating): Remove.
203 * doublest.h (struct type): Remove.
204 (DOUBLEST_PRINT_FORMAT): Remove.
205 (DOUBLEST_SCAN_FORMAT): Remove.
206 (extract_typed_floating): Remove.
207 (store_typed_floating): Remove.
208 (convert_typed_floating): Remove.
209
210 * dfp.c (decimal_from_doublest): Remove.
211 (decimal_to_doublest): Remove.
212 * dfp.h: Do not include "doublest.h".
213 (decimal_from_doublest): Remove.
214 (decimal_to_doublest): Remove.
215
216 * value.c: Do not include "doublest.h" and "dfp.h".
217 (value_as_double): Remove.
218 (unpack_double): Remove.
219 (value_from_double): Remove.
220 (value_from_decfloat): Remove.
221 * value.h: Do not include "doublest.h".
222 (value_as_double): Remove.
223 (unpack_double): Remove.
224 (value_from_double): Remove.
225 (value_from_decfloat): Remove.
226
227 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
228
229 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
230 (i386_extract_return_value): Use target_float_convert.
231 (i386_store_return_value): Likewise.
232 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
233 (i387_value_to_register): Likewise.
234 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
235 (ia64_register_to_value): Use target_float_convert.
236 (ia64_value_to_register): Likewise.
237 (ia64_extract_return_value): Likewise.
238 (ia64_store_return_value): Likewise.
239 (ia64_push_dummy_call): Likewise.
240 * m68k-tdep.c: Include "target-float.h".
241 (m68k_register_to_value): Use target_float_convert.
242 (m68k_value_to_register): Likewise.
243 (m68k_svr4_extract_return_value): Likewise.
244 (m68k_svr4_store_return_value): Likewise.
245 * ppc-sysv-tdep.c: Include "target-float.h".
246 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
247 (do_ppc_sysv_return_value): Likewise.
248 (ppc64_sysv_abi_push_freg): Likewise.
249 (ppc64_sysv_abi_return_value_base): Likewise.
250 * rs6000-aix-tdep.c: Include "target-float.h".
251 (rs6000_push_dummy_call): Use target_float_convert.
252 (rs6000_return_value): Likewise.
253 * rs6000-lynx178-tdep.c: Include "target-float.h".
254 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
255 (rs6000_lynx178_return_value): Likewise.
256 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
257 (rs6000_register_to_value): Use target_float_convert.
258 (rs6000_value_to_register): Likewise.
259 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
260 (arm_extract_return_value): Use target_float_convert.
261 (arm_store_return_value): Likewise.
262 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
263 (sh_register_convert_to_virtual): Use target_float_convert.
264 (sh_register_convert_to_raw): Likewise.
265 * sh64-tdep.c: Include "target-float.h".
266 (sh64_extract_return_value): Use target_float_convert.
267 (sh64_register_convert_to_virtual): Likewise.
268 (sh64_register_convert_to_raw): Likewise. Fix argument types.
269
270 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
271
272 * target-float.c (floatformat_to_host_double): New function.
273 (floatformat_from_host_double): Likewise.
274 (target_float_to_host_double): Likewise.
275 (target_float_from_host_double): Likewise.
276 * target-float.h (target_float_to_host_double): Add prototype.
277 (target_float_from_host_double): Likewise.
278
279 * guile/scm-value.c: Include "target-float.h".
280 (gdbscm_value_to_real): Use target_float_to_host_double.
281 Handle integer source values via value_as_long.
282 * guile/scm-math.c: Include "target-float.h". Do not include
283 "doublest.h", "dfp.h", and "expression.h".
284 (vlscm_convert_typed_number): Use target_float_from_host_double.
285 (vlscm_convert_number): Likewise.
286
287 * python/py-value.c (valpy_float): Use target_float_to_host_double.
288 (convert_value_from_python): Use target_float_from_host_double.
289
290 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
291
292 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
293 (cast_from_fixed): Likewise.
294 (ada_scaling_type): New function.
295 (ada_delta): Return value instead of DOUBLEST. Perform target
296 arithmetic instead of host arithmetic.
297 (scaling_factor): Rename to ...
298 (ada_scaling_factor) ... this. Make non-static. Return value instead
299 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
300 (ada_fixed_to_float): Remove.
301 (ada_float_to_fixed): Remove.
302 * ada-lang.h (ada_fixed_to_float): Remove.
303 (ada_float_to_fixed): Remove.
304 (ada_delta): Return value instead of DOUBLEST.
305 (ada_scaling_factor): Add prototype.
306
307 * ada-typeprint.c: Include "target-float.h".
308 (print_fixed_point_type): Perform target arithmetic instead of
309 host arithmetic.
310 * ada-valprint.c: Include "target-float.h".
311 (ada_val_print_num): Perform target arithmetic instead of
312 host arithmetic for fixed-point types.
313
314 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
315
316 * target-float.c: Include <math.h>.
317 (floatformat_binop): New function.
318 (floatformat_compare): Likewise.
319 (target_float_binop): Likewise.
320 (target_float_compare): Likewise.
321 * target-float.h: Include "expression.h".
322 (target_float_binop): Add prototype.
323 (target_float_compare): Likewise.
324
325 * valarith.c: Do not include "doublest.h" and "dfp.h".
326 Include "common/byte-vector.h".
327 (value_args_as_decimal): Remove, replace by ...
328 (value_args_as_target_float): ... this function. Handle both
329 binary and decimal target floating-point formats.
330 (scalar_binop): Handle both binary and decimal FP using
331 value_args_as_target_float and target_float_binop.
332 (value_equal): Handle both binary and decimal FP using
333 value_args_as_target_float and target_float_compare.
334 (value_less): Likewise.
335 (value_pos): Handle all scalar types as simple copy.
336 (value_neg): Handle all scalar types via BINOP_SUB from 0.
337 * dfp.c (decimal_binop): Throw error instead of internal_error
338 when called with an unsupported operation code.
339
340 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
341
342 * target-float.c (target_float_to_string): New function.
343 (target_float_from_string): New function.
344 * target-float.h (target_float_to_string): Add prototype.
345 (target_float_from_string): Add prototype.
346
347 * valprint.c: Include "target-float.h". Do not include
348 "doublest.h" and "dfp.h".
349 (print_floating): Use target_float_to_string.
350 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
351 (printf_floating): Use target_float_to_string.
352 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
353 (print_i387_value): Use target_float_to_string.
354 * mips-tdep.c: Include "target-float.h".
355 (mips_print_fp_register): Use target_float_to_string.
356 * sh64-tdep.c: Include "target-float.h".
357 (sh64_do_fp_register): Use target_float_to_string.
358
359 * parse.c: Include "target-float.h". Do not include
360 "doublest.h" and "dfp.h".
361 (parse_float): Use target_float_from_string.
362 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
363 (define_symbol): Use target_float_from_string.
364 * gdbarch-selftests.c: Include "target-float.h".
365 (register_to_value_test): Use target_float_from_string.
366
367 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
368
369 * Makefile.c (SFILES): Add target-float.c.
370 (HFILES_NO_SRCDIR): Add target-float.h.
371 (COMMON_OBS): Add target-float.o.
372 * target-float.h: New file.
373 * target-float.c: New file.
374
375 * doublest.c (floatformat_classify): Fix detection of float_zero.
376
377 * gdbtypes.c (is_floating_type): New function.
378 * gdbtypes.h (is_floating_type): Add prototype.
379
380 * value.c: Do not include "floatformat.h".
381 (unpack_double): Use target_float_is_valid.
382 (is_floating_value): New function.
383 * value.h (is_floating_value): Add prototype-
384
385 * valarith.c: Include "target-float.h".
386 (value_logical_not): Use target_float_is_zero.
387
388 * python/py-value.c: Include "target-float.h".
389 (valpy_nonzero): Use target_float_is_zero.
390
391 2017-11-04 Tom Tromey <tom@tromey.com>
392
393 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
394
395 2017-11-04 Tom Tromey <tom@tromey.com>
396
397 * breakpoint.c (set_momentary_breakpoint): Return
398 breakpoint_up.
399 (until_break_command): Update.
400 (new_until_break_fsm): Change argument types to
401 breakpoint_up.
402 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
403 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
404 Remove.
405 * infcmd.c (finish_forward): Update.
406 * breakpoint.h (set_momentary_breakpoint)
407 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
408 (make_cleanup_delete_breakpoint): Remove.
409 (struct breakpoint_deleter): New.
410 (breakpoint_up): New typedef.
411 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
412 (insert_exception_resume_breakpoint): Update.
413 (insert_exception_resume_from_probe): Update.
414 (insert_longjmp_resume_breakpoint): Update.
415 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
416 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
417 * infcall.c (call_function_by_hand_dummy): Update
418
419 2017-11-04 Tom Tromey <tom@tromey.com>
420
421 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
422
423 2017-11-04 Tom Tromey <tom@tromey.com>
424
425 * linux-tdep.c (linux_core_info_proc_mappings): Use
426 gdb::def_vector.
427 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
428 "size" argument.
429 (linux_corefile_thread): Update.
430 (linux_make_corefile_notes): Remove unused variable.
431
432 2017-11-04 Tom Tromey <tom@tromey.com>
433
434 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
435 gdb::byte_vector.
436
437 2017-11-04 Tom Tromey <tom@tromey.com>
438
439 * objfiles.c (do_free_objfile_cleanup): Remove.
440 * compile/compile-object-load.c (compile_object_load): Update.
441 * objfiles.h (make_cleanup_free_objfile): Remove.
442
443 2017-11-04 Tom Tromey <tom@tromey.com>
444
445 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
446 (adi_read_versions): Change "tags" to "gdb_byte *".
447 (adi_print_versions): Likewise.
448
449 2017-11-04 Tom Tromey <tom@tromey.com>
450
451 * breakpoint.c
452 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
453 from start_rbreak_breakpoints.
454 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
455 * breakpoint.h (class scoped_rbreak_breakpoints): New.
456 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
457 * symtab.c (do_end_rbreak_breakpoints): Remove.
458 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
459
460 2017-11-04 Tom Tromey <tom@tromey.com>
461
462 * cp-namespace.c (reset_directive_searched): Remove.
463 (cp_lookup_symbol_via_imports): Use scoped_restore.
464 * cp-support.c (reset_directive_searched): Remove.
465 (make_symbol_overload_list_using): Use scoped_restore.
466 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
467 (reset_directive_searched): Remove.
468
469 2017-11-04 Tom Tromey <tom@tromey.com>
470
471 * symfile.c (find_separate_debug_file_by_debuglink): Use
472 unique_xmalloc_ptr.
473
474 2017-11-04 Tom Tromey <tom@tromey.com>
475
476 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
477 type of "info".
478 (compute_stack_depth): Likewise.
479 (do_compile_dwarf_expr_to_c): Use std::vector.
480
481 2017-11-04 Tom Tromey <tom@tromey.com>
482
483 * compile/compile-object-load.c (link_callbacks_einfo): Use
484 std::string.
485
486 2017-11-04 Tom Tromey <tom@tromey.com>
487
488 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
489 Use scoped_free_pendings.
490 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
491 scoped_free_pendings.
492 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
493 (xcoff_initial_scan): Likewise.
494 * buildsym.c (reset_symtab_globals): Update comment.
495 (scoped_free_pendings): Rename from really_free_pendings.
496 (prepare_for_building): Update comment.
497 (buildsym_init): Likewise.
498 * buildsym.h (class scoped_free_pendings): New class.
499 (really_free_pendings): Don't declare.
500
501 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
502
503 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
504 output when converting a zero value to a special byteorder format.
505
506 2017-11-02 Yao Qi <yao.qi@linaro.org>
507
508 * frame.c (do_frame_register_read): Remove aspace.
509 * jit.c (jit_frame_sniffer): Likwise.
510 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
511 * regcache.c (regcache::regcache): Pass nullptr.
512 (regcache_print): Caller updated.
513 * regcache.h (regcache::regcache): Remove one constructor
514 parameter aspace.
515
516 2017-11-02 Yao Qi <yao.qi@linaro.org>
517
518 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
519
520 2017-11-02 Yao Qi <yao.qi@linaro.org>
521
522 * breakpoint.c (insert_single_step_breakpoints): Update.
523 * frame.c (struct frame_info) <aspace>: Add const.
524 (frame_save_as_regcache): Add const.
525 (get_frame_address_space): Return const address_space *.
526 * frame.h (get_frame_address_space): Update declaration.
527 * infrun.c (struct step_over_info) <aspace>: Add const.
528 (set_step_over_info): Make aspace const.
529 (displaced_step_prepare_throw): Change variable const.
530 (resume): Likewise.
531 (proceed): Likewise.
532 (adjust_pc_after_break): Likewise.
533 (save_waitstatus): Likewise.
534 (handle_signal_stop): Likewise.
535 (keep_going_pass_signal): Likewise.
536 * jit.c (jit_frame_sniffer): Add const.
537 * mips-tdep.c (mips_single_step_through_delay): Likewise.
538 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
539 * record-full.c (record_full_wait_1): Likewise.
540 * regcache.c (regcache::regcache): Change parameter to const.
541 * regcache.h (regcache::regcache): Likewise.
542 (regcache::aspace): Return const address_space *.
543 (regcache) <m_aspace>: Add const.
544
545 2017-11-02 Yao Qi <yao.qi@linaro.org>
546
547 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
548 * frame.c (create_sentinel_frame): Likewise.
549 * infrun.c (displaced_step_prepare_throw): Likewise.
550 (resume): Likewise.
551 (thread_still_needs_step_over_bp): Likewise.
552 (proceed): Likewise.
553 (do_target_wait): Likewise.
554 (adjust_pc_after_break): Likewise.
555 (handle_syscall_event): Likewise.
556 (save_waitstatus): Likewise.
557 (handle_inferior_event_1): Likewise.
558 (handle_signal_stop): Likewise.
559 (keep_going_pass_signal): Likewise.
560 * linux-nat.c (status_callback): Likewise.
561 (save_stop_reason): Likewise.
562 (resume_stopped_resumed_lwps): Likewise.
563 * record-full.c (record_full_exec_insn): Likewise.
564 (record_full_wait_1): Likewise.
565 * regcache.c (get_regcache_aspace): Remove.
566 * regcache.h (get_regcache_aspace): Remove.
567
568 2017-11-02 Yao Qi <yao.qi@linaro.org>
569
570 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
571 (init_regcache_descr): Use gdbarch_num_regs.
572 (regcache::regcache): Likewise.
573 (regcache::get_register_status): Likewise.
574 (regcache::assert_raw_regnum): Likewise.
575 (regcache::cooked_read): Likewise.
576 (regcache::cooked_read_value): Likewise.
577 (regcache::cooked_write): Likewise.
578 (regcache::dump): Likewise.
579 (regcache::num_raw_registers): New method.
580 * regcache.h (class regcache) <num_raw_registers>: New.
581
582 2017-11-02 Yao Qi <yao.qi@linaro.org>
583
584 * regcache.c (regcache::assert_regnum): New method.
585 (regcache::invalidate): Call assert_regnum.
586 (regcache::raw_update): Likewise.
587 (regcache::raw_write): Likewise.
588 (regcache::raw_read_part): Likewise.
589 (regcache::raw_write_part): Likewise.
590 (regcache::raw_supply): Likewise.
591 (regcache::raw_supply_integer): Likewise.
592 (regcache::raw_supply_zeroed): Likewise.
593 (regcache::raw_collect): Likewise.
594 (regcache::raw_collect_integer): Likewise.
595 * regcache.h (regcache::assert_regnum): Declare.
596
597 2017-11-02 Yao Qi <yao.qi@linaro.org>
598
599 * regcache.c (regcache::dump): Remove code.
600
601 2017-11-02 Yao Qi <yao.qi@linaro.org>
602
603 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
604 Remove.
605 <sizeof_cooked_register_status>: Remove.
606 (init_regcache_descr): Update.
607 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
608 (regcache::save): Likewise.
609 (regcache::dump): Likewise.
610
611 2017-11-01 James Bowman <james.bowman@ftdichip.com>
612
613 * ft32-tdep.c (ft32_fetch_instruction): New function.
614 (ft32_analyze_prologue): Use ft32_fetch_instruction().
615
616 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
617
618 * cli/cli-script.c (execute_control_command): Rename to ...
619 (execute_control_command_1): ... this.
620 (execute_control_command): New function.
621
622 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
623
624 * tracepoint.c (tfind_command): Remove const_cast.
625
626 2017-10-30 Mike Gulick <mgulick@mathworks.com>
627
628 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
629
630 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
631
632 * common/common-utils.h (in_inclusive_range): New function.
633 * arm-tdep.c (arm_record_extension_space): Use
634 in_inclusive_range.
635 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
636 * cris-tdep.c (cris_spec_reg_applicable): Use
637 in_inclusive_range.
638
639 2017-10-30 Pedro Alves <palves@redhat.com>
640 Simon Marchi <simon.marchi@ericsson.com>
641
642 * remote.c (remote_set_syscall_catchpoint): Build a std::string
643 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
644
645 2017-10-30 Pedro Alves <palves@redhat.com>
646
647 * common/common-utils.c (string_appendf, string_vappendf): New
648 functions.
649 * common/common-utils.h (string_appendf, string_vappendf): New
650 declarations.
651 * unittests/common-utils-selftests.c (string_appendf_func)
652 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
653 (string_vappendf_tests): New functions.
654 (_initialize_common_utils_selftests): Register "string_appendf" and
655 "string_vappendf tests".
656
657 2017-10-30 Pedro Alves <palves@redhat.com>
658
659 * unittests/common-utils-selftests.c (format_func): New typedef.
660 (string_printf_tests, string_vprintf_tests): Tests factored out
661 and merged to ...
662 (test_format_func): ... this new function.
663 (string_printf_tests, string_vprintf_tests): Reimplement on top of
664 test_format_func.
665
666 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
667
668 * darwin-nat.c: Remove include of gdb.h.
669
670 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
671
672 * xtensa-xtregs.c: Fix formatting issues.
673
674 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
675
676 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
677
678 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
679
680 PR python/21213
681 * python/py-infthread.c (thpy_get_inferior): Increment reference
682 of inferior before returning it.
683
684 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
685
686 * unittests/common-utils-selftests.c (format): Add
687 ATTRIBUTE_PRINTF.
688
689 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * xml-syscall.c (struct syscall_desc): Add constructor.
692 <name>: Change type to std::string.
693 (syscall_desc_up): New typedef.
694 (syscall_desc_p): Remove typeder.
695 (DEF_VEC_P(syscall_desc_p)): Remove.
696 (struct syscall_group_desc): Add constructor.
697 <name>: Change type to std::string.
698 <syscalls>: Change type to std::vector.
699 (syscall_group_desc_up): New typedef.
700 (syscall_group_desc_p): Remove typedef.
701 (DEF_VEC_P(syscall_group_desc_p)): Remove.
702 (struct syscalls_info) <syscalls>: Change type to std::vector of
703 unique_ptr.
704 <groups>: Likewise.
705 <my_gdb_datadir>: Change type to std::string.
706 (syscalls_info_up): New typedef.
707 (allocate_syscalls_info): Remove.
708 (syscalls_info_free_syscalls_desc): Remove.
709 (syscalls_info_free_syscall_group_desc): Remove.
710 (free_syscalls_info): Remove.
711 (make_cleanup_free_syscalls_info): Remove.
712 (syscall_group_create_syscall_group_desc): Adjust.
713 (syscall_group_add_syscall): Adjust.
714 (syscall_create_syscall_desc): Adjust.
715 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
716 (init_syscalls_info): Adjust.
717 (syscall_group_get_group_by_name): Adjust.
718 (xml_get_syscall_number): Adjust.
719 (xml_get_syscall_name): Adjust.
720 (xml_list_of_syscalls): Adjust.
721 (xml_list_syscalls_by_group): Adjust.
722 (xml_list_of_groups): Adjust.
723
724 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
725
726 * probe.h: Don't include gdb_vecs.h.
727 (DEF_VEC_P (probe_p)): Remove.
728 (find_probes_in_objfile): Return an std::vector.
729 * probe.c (find_probes_in_objfile): Likewise.
730 * breakpoint.c (breakpoint_objfile_data)
731 <longjmp_probes>: Change type to std::vector.
732 <exception_probes>: Likewise.
733 (free_breakpoint_probes): Don't manually free vectors.
734 (create_longjmp_master_breakpoint): Adjust.
735 (create_exception_master_breakpoint): Adjust.
736 * solib-svr4.c (svr4_create_probe_breakpoints): Change
737 parameter type, adjust.
738 (svr4_create_solib_event_breakpoints): Adjust.
739
740 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
741
742 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
743 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
744 with new.
745 (free_breakpoint_probes): Rename to ...
746 (free_breakpoint_objfile_data): ... this, and call delete on
747 bp_objfile_data..
748
749 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
750
751 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
752 (loaded_script_ptr): Remove typedef.
753 (DEF_VEC_P (loaded_script_ptr)): Remove.
754 (struct collect_matching_scripts_data): Add constructor.
755 <scripts_p>: Change type to (pointer to) std::vector.
756 (collect_matching_scripts_data): Adjust.
757 (sort_scripts_by_name): Make suitable for std::sort.
758 (print_scripts): Don't sort vector, adjust to std::vector.
759 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
760
761 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
762
763 * symfile.c (filename_language): Make struct, not typedef. Add
764 constructor.
765 <ext>: Change type to std::string.
766 (DEF_VEC_O (filename_language)): Remove.
767 (filename_language_table): Change type to std::vector.
768 (add_filename_language): Adjust.
769 (set_ext_lang_command): Adjust.
770 (info_ext_lang_command): Adjust.
771 (deduce_language_from_filename): Adjust.
772 (class scoped_restore_filename_language_table): Remove.
773 (test_filename_language): Use scoped_restore.
774 (test_set_ext_lang_command): Use scoped_restore, adjust to
775 std::vector change.
776
777 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
778
779 * symfile.c: Include selftest.h.
780 (class scoped_restore_filename_language_table): New.
781 (test_filename_language): New test.
782 (test_set_ext_lang_command): New test.
783 (_initialize_symfile): Register tests.
784
785 2017-10-27 Keith Seitz <keiths@redhat.com>
786
787 * breakpoint.c (print_breakpoint_location): Use the symbol saved
788 in the bp_location, falling back to find_pc_sect_function when
789 needed.
790 (add_location_to_breakpoint): Save sal->symbol.
791 * breakpoint.h (struct bp_location) <symbol>: New field.
792 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
793 * symtab.h (struct symtab_and_line) <symbol>: New field.
794
795 2017-10-26 Patrick Frants <osscontribute@gmail.com>
796
797 PR gdb/13669
798 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
799 to rewind obstack.
800
801 2017-10-26 Pedro Alves <palves@redhat.com>
802
803 * remote.c (remote_async_terminal_ours_p): Delete.
804 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
805 Remove references to 'remote_async_terminal_ours_p'.
806
807 2017-10-26 Yao Qi <yao.qi@linaro.org>
808
809 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
810
811 2017-10-26 Yao Qi <yao.qi@linaro.org>
812
813 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
814 aspace const.
815 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
816 Likewise.
817 * breakpoint.c (bpstat_check_location): Remove cast.
818 (breakpoint_hit_catch_fork): Make aspce const.
819 (breakpoint_hit_catch_solib): Likewise.
820 (breakpoint_hit_catch_exec): Likewise.
821 (breakpoint_hit_ranged_breakpoint): Likewise.
822 (breakpoint_hit_watchpoint): Likewise.
823 (base_breakpoint_breakpoint_hit): Likewise.
824 (bkpt_breakpoint_hit): Likewise.
825 (dprintf_breakpoint_hit): Likewise.
826 (tracepoint_breakpoint_hit): Likewise.
827 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
828
829 2017-10-26 Yao Qi <yao.qi@linaro.org>
830
831 * breakpoint.c (breakpoint_location_address_match): Change
832 "struct address_space *" to "const address_space".
833 (breakpoint_location_address_range_overlap): Likewise.
834 (breakpoint_here_p): Likewise.
835 (breakpoint_in_range_p): Likewise.
836 (moribund_breakpoint_here_p): Likewise.
837 (bp_location_inserted_here_p): Likewise.
838 (software_breakpoint_inserted_here_p): Likewise.
839 (hardware_breakpoint_inserted_here_p): Likewise.
840 (hardware_watchpoint_inserted_in_range): Likewise.
841 (bpstat_check_location): Likewise.
842 (bpstat_stop_status): Likewise.
843 (breakpoint_address_match): Likewise.
844 (breakpoint_address_match_range): Likewise.
845 (breakpoint_location_address_match): Likewise.
846 (breakpoint_location_address_range_overlap): Likewise.
847 (insert_single_step_breakpoint): Likewise.
848 (breakpoint_has_location_inserted_here): Likewise.
849 (single_step_breakpoint_inserted_here_p): Likewise.
850 (pc_at_non_inline_function): Likewise.
851 * breakpoint.h (bpstat_stop_status): Update declaration.
852 (breakpoint_here_p): Likewise.
853 (breakpoint_in_range_p): Likewise.
854 (moribund_breakpoint_here_p): Likewise.
855 (breakpoint_inserted_here_p): Likewise.
856 (software_breakpoint_inserted_here_p): Likewise.
857 (hardware_breakpoint_inserted_here_p): Likewise.
858 (breakpoint_has_location_inserted_here): Likewise.
859 (single_step_breakpoint_inserted_here_p): Likewise.
860 (hardware_watchpoint_inserted_in_range): Likewise.
861 (breakpoint_address_match): Likewise.
862 (insert_single_step_breakpoint): Likewise.
863 (pc_at_non_inline_function): Likewise.
864 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
865 * record.c (record_check_stopped_by_breakpoint): Likewise.
866 * record.h (record_check_stopped_by_breakpoint): Likewise.
867 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
868
869 2017-10-25 Yao Qi <yao.qi@linaro.org>
870
871 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
872 regcache->arch () instead get_regcache_arch.
873 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
874 Likewise.
875 (aarch64_fbsd_store_inferior_registers): Likewise.
876 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
877 (store_gregs_to_thread): Likewise.
878 (fetch_fpregs_from_thread): Likewise.
879 (store_fpregs_to_thread): Likewise.
880 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
881 (aarch64_store_return_value): Likewise.
882 (aarch64_software_single_step): Likewise.
883 * aix-thread.c (aix_thread_wait): Likewise.
884 (supply_reg32): Likewise.
885 (supply_sprs64): Likewise.
886 (supply_sprs32): Likewise.
887 (fill_gprs64): Likewise.
888 (fill_gprs32): Likewise.
889 (fill_sprs64): Likewise.
890 (fill_sprs32): Likewise.
891 (store_regs_user_thread): Likewise.
892 (store_regs_kernel_thread): Likewise.
893 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
894 (alphabsd_store_inferior_registers): Likewise.
895 * alpha-tdep.c (alpha_extract_return_value): Likewise.
896 (alpha_store_return_value): Likewise.
897 (alpha_deal_with_atomic_sequence): Likewise.
898 (alpha_next_pc): Likewise.
899 (alpha_software_single_step): Likewise.
900 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
901 (amd64bsd_store_inferior_registers): Likewise.
902 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
903 Likewise.
904 (amd64_linux_store_inferior_registers): Likewise.
905 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
906 (amd64_collect_native_gregset): Likewise.
907 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
908 (amd64obsd_collect_uthread): Likewise.
909 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
910 (amd64_collect_fpregset): Likewise.
911 (amd64_supply_fxsave): Likewise.
912 (amd64_supply_xsave): Likewise.
913 (amd64_collect_fxsave): Likewise.
914 (amd64_collect_xsave): Likewise.
915 * arc-tdep.c (arc_write_pc): Likewise.
916 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
917 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
918 (arm_fbsd_store_inferior_registers): Likewise.
919 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
920 (store_vfp_regs): Likewise.
921 (arm_linux_fetch_inferior_registers): Likewise.
922 (arm_linux_store_inferior_registers): Likewise.
923 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
924 (arm_linux_sigreturn_next_pc): Likewise.
925 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
926 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
927 (fetch_register): Likewise.
928 (store_register): Likewise.
929 * arm-tdep.c (arm_is_thumb): Likewise.
930 (displaced_in_arm_mode): Likewise.
931 (bx_write_pc): Likewise.
932 (arm_get_next_pcs_addr_bits_remove): Likewise.
933 (arm_software_single_step): Likewise.
934 (arm_extract_return_value): Likewise.
935 (arm_store_return_value): Likewise.
936 (arm_write_pc): Likewise.
937 * bfin-tdep.c (bfin_extract_return_value): Likewise.
938 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
939 (bsd_uthread_store_registers): Likewise.
940 * core-regset.c (fetch_core_registers): Likewise.
941 * corelow.c (get_core_registers): Likewise.
942 * cris-tdep.c (cris_store_return_value): Likewise.
943 (cris_extract_return_value): Likewise.
944 (find_step_target): Likewise.
945 (find_step_target): Likewise.
946 (cris_software_single_step): Likewise.
947 * ctf.c (ctf_fetch_registers): Likewise.
948 * darwin-nat.c (cancel_breakpoint): Likewise.
949 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
950 * frv-tdep.c (frv_extract_return_value): Likewise.
951 * ft32-tdep.c (ft32_store_return_value): Likewise.
952 (ft32_extract_return_value): Likewise.
953 * go32-nat.c (fetch_register): Likewise.
954 (go32_fetch_registers): Likewise.
955 (go32_store_registers): Likewise.
956 (store_register): Likewise.
957 * h8300-tdep.c (h8300_extract_return_value): Likewise.
958 (h8300_store_return_value): Likewise.
959 * hppa-linux-nat.c (fetch_register): Likewise.
960 (store_register): Likewise.
961 (hppa_linux_fetch_inferior_registers): Likewise.
962 (hppa_linux_store_inferior_registers): Likewise.
963 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
964 (i386_darwin_store_inferior_registers): Likewise.
965 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
966 (gnu_store_registers): Likewise.
967 * i386-linux-nat.c (fetch_register): Likewise.
968 (store_register): Likewise.
969 (supply_gregset): Likewise.
970 (fill_gregset): Likewise.
971 (i386_linux_fetch_inferior_registers): Likewise.
972 (i386_linux_store_inferior_registers): Likewise.
973 (i386_linux_resume): Likewise.
974 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
975 Likewise.
976 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
977 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
978 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
979 (i386obsd_collect_uthread): Likewise.
980 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
981 (i386_supply_gregset): Likewise.
982 (i386_collect_gregset): Likewise.
983 (i386_supply_fpregset): Likewise.
984 (i386_collect_fpregset): Likewise.
985 (i386_mpx_bd_base): Likewise.
986 * i386-v4-nat.c (supply_fpregset): Likewise.
987 (fill_fpregset): Likewise.
988 * i387-tdep.c (i387_supply_fsave): Likewise.
989 (i387_collect_fsave): Likewise.
990 (i387_supply_fxsave): Likewise.
991 (i387_collect_fxsave): Likewise.
992 (i387_supply_xsave): Likewise.
993 (i387_collect_xsave): Likewise.
994 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
995 (ia64_linux_store_registers): Likewise.
996 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
997 (ia64_extract_return_value): Likewise.
998 (ia64_store_return_value): Likewise.
999 (find_func_descr): Likewise.
1000 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1001 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1002 (inf_ptrace_store_registers): Likewise.
1003 * infrun.c (use_displaced_stepping): Likewise.
1004 (displaced_step_prepare_throw): Likewise.
1005 (resume): Likewise.
1006 (proceed): Likewise.
1007 (do_target_wait): Likewise.
1008 (adjust_pc_after_break): Likewise.
1009 (handle_inferior_event_1): Likewise.
1010 (handle_signal_stop): Likewise.
1011 (save_infcall_suspend_state): Likewise.
1012 (restore_infcall_suspend_state): Likewise.
1013 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1014 * jit.c (jit_frame_prev_register): Likewise.
1015 * linux-nat.c (save_stop_reason): Likewise.
1016 (linux_nat_wait_1): Likewise.
1017 (resume_stopped_resumed_lwps): Likewise.
1018 * linux-record.c (record_linux_sockaddr): Likewise.
1019 (record_linux_msghdr): Likewise.
1020 (record_linux_system_call): Likewise.
1021 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1022 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1023 (lm32_store_return_value): Likewise.
1024 * m32c-tdep.c (m32c_read_flg): Likewise.
1025 (m32c_pseudo_register_read): Likewise.
1026 (m32c_pseudo_register_write): Likewise.
1027 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1028 (m32r_linux_collect_gregset): Likewise.
1029 * m32r-tdep.c (m32r_store_return_value): Likewise.
1030 (m32r_extract_return_value): Likewise.
1031 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1032 (m68kbsd_collect_fpregset): Likewise.
1033 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1034 * m68k-linux-nat.c (fetch_register): Likewise.
1035 (old_fetch_inferior_registers): Likewise.
1036 (old_store_inferior_registers): Likewise.
1037 (store_regs): Likewise.
1038 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1039 (m68k_svr4_store_return_value): Likewise.
1040 * m88k-tdep.c (m88k_store_arguments): Likewise.
1041 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1042 (mi_cmd_data_write_register_values): Likewise.
1043 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1044 (mips_fbsd_store_inferior_registers): Likewise.
1045 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1046 (mips_fbsd_supply_gregs): Likewise.
1047 (mips_fbsd_collect_fpregs): Likewise.
1048 (mips_fbsd_collect_gregs): Likewise.
1049 (mips_fbsd_supply_fpregset): Likewise.
1050 (mips_fbsd_collect_fpregset): Likewise.
1051 (mips_fbsd_supply_gregset): Likewise.
1052 (mips_fbsd_collect_gregset): Likewise.
1053 * mips-linux-nat.c (supply_gregset): Likewise.
1054 (fill_gregset): Likewise.
1055 (supply_fpregset): Likewise.
1056 (fill_fpregset): Likewise.
1057 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1058 (mips_fill_gregset): Likewise.
1059 (mips_supply_fpregset): Likewise.
1060 (mips_fill_fpregset): Likewise.
1061 (mips64_supply_gregset): Likewise.
1062 (micromips_linux_sigframe_validate): Likewise.
1063 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1064 (mipsnbsd_fetch_inferior_registers): Likewise.
1065 (mipsnbsd_store_inferior_registers): Likewise.
1066 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1067 (mipsnbsd_supply_gregset): Likewise.
1068 (mipsnbsd_iterate_over_regset_sections): Likewise.
1069 (mipsnbsd_supply_reg): Likewise.
1070 (mipsnbsd_supply_fpreg): Likewise.
1071 * mips-tdep.c (mips_in_frame_stub): Likewise.
1072 (mips_dummy_id): Likewise.
1073 (is_octeon_bbit_op): Likewise.
1074 (micromips_bc1_pc): Likewise.
1075 (extended_mips16_next_pc): Likewise.
1076 (mips16_next_pc): Likewise.
1077 (deal_with_atomic_sequence): Likewise.
1078 * moxie-tdep.c (moxie_process_readu): Likewise.
1079 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1080 * nto-procfs.c (procfs_store_registers): Likewise.
1081 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1082 (ppcfbsd_store_inferior_registers): Likewise.
1083 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1084 (fetch_altivec_register): Likewise.
1085 (get_spe_registers): Likewise.
1086 (fetch_spe_register): Likewise.
1087 (fetch_altivec_registers): Likewise.
1088 (fetch_all_gp_regs): Likewise.
1089 (fetch_all_fp_regs): Likewise.
1090 (store_vsx_register): Likewise.
1091 (store_altivec_register): Likewise.
1092 (set_spe_registers): Likewise.
1093 (store_spe_register): Likewise.
1094 (store_altivec_registers): Likewise.
1095 (store_all_gp_regs): Likewise.
1096 (store_all_fp_regs): Likewise.
1097 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1098 (ppc_linux_collect_gregset): Likewise.
1099 (ppc_canonicalize_syscall): Likewise.
1100 (ppc_linux_record_signal): Likewise.
1101 (ppu2spu_prev_register): Likewise.
1102 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1103 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1104 (ppcobsd_store_registers): Likewise.
1105 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1106 Likewise.
1107 (ppc_ravenscar_generic_store_registers): Likewise.
1108 * procfs.c (procfs_fetch_registers): Likewise.
1109 (procfs_store_registers): Likewise.
1110 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1111 (ravenscar_store_registers): Likewise.
1112 (ravenscar_prepare_to_store): Likewise.
1113 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1114 * record-full.c (record_full_wait_1): Likewise.
1115 (record_full_registers_change): Likewise.
1116 (record_full_store_registers): Likewise.
1117 (record_full_core_fetch_registers): Likewise.
1118 (record_full_save): Likewise.
1119 (record_full_goto_insn): Likewise.
1120 * regcache.c (regcache_register_size): Likewise.
1121 (get_regcache_arch): Remove.
1122 (regcache_read_pc): Likewise.
1123 * regcache.h (get_regcache_arch): Remove.
1124 * remote-sim.c (gdbsim_fetch_register): Likewise.
1125 (gdbsim_store_register): Likewise.
1126 * remote.c (fetch_register_using_p): Likewise.
1127 (send_g_packet): Likewise.
1128 (remote_prepare_to_store): Likewise.
1129 (store_registers_using_G): Likewise.
1130 * reverse.c (save_bookmark_command): Likewise.
1131 (goto_bookmark_command): Likewise.
1132 * rs6000-aix-tdep.c (branch_dest): Likewise.
1133 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1134 (fetch_register): Likewise.
1135 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1136 (ppc_collect_reg): Likewise.
1137 (ppc_collect_gregset): Likewise.
1138 (ppc_collect_fpregset): Likewise.
1139 (ppc_collect_vsxregset): Likewise.
1140 (ppc_collect_vrregset): Likewise.
1141 (ppc_displaced_step_hw_singlestep): Likewise.
1142 (rs6000_pseudo_register_read): Likewise.
1143 (rs6000_pseudo_register_write): Likewise.
1144 * s390-linux-nat.c (supply_gregset): Likewise.
1145 (fill_gregset): Likewise.
1146 (s390_linux_fetch_inferior_registers): Likewise.
1147 * s390-linux-tdep.c (s390_write_pc): Likewise.
1148 (s390_software_single_step): Likewise.
1149 (s390_all_but_pc_registers_record): Likewise.
1150 (s390_linux_syscall_record): Likewise.
1151 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1152 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1153 (shnbsd_store_inferior_registers): Likewise.
1154 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1155 (sh_extract_return_value_fpu): Likewise.
1156 (sh_store_return_value_nofpu): Likewise.
1157 (sh_corefile_supply_regset): Likewise.
1158 (sh_corefile_collect_regset): Likewise.
1159 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1160 (sh64_store_return_value): Likewise.
1161 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1162 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1163 (sparc_store_inferior_registers): Likewise.
1164 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1165 (sparc_ravenscar_prepare_to_store): Likewise.
1166 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1167 (sparc_analyze_control_transfer): Likewise.
1168 (sparc_step_trap): Likewise.
1169 (sparc_software_single_step): Likewise.
1170 (sparc32_gdbarch_init): Likewise.
1171 (sparc_supply_rwindow): Likewise.
1172 (sparc_collect_rwindow): Likewise.
1173 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1174 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1175 (sparc64nbsd_collect_gregset): Likewise.
1176 (sparc64nbsd_supply_fpregset): Likewise.
1177 (sparc64nbsd_collect_fpregset): Likewise.
1178 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1179 (sparc64_supply_gregset): Likewise.
1180 (sparc64_collect_gregset): Likewise.
1181 (sparc64_supply_fpregset): Likewise.
1182 (sparc64_collect_fpregset): Likewise.
1183 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1184 * spu-tdep.c (spu_unwind_sp): Likewise.
1185 (spu2ppu_prev_register): Likewise.
1186 (spu_memory_remove_breakpoint): Likewise.
1187 * stack.c (return_command): Likewise.
1188 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1189 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1190 * tracefile.c (trace_save_ctf): Likewise.
1191 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1192 (do_windows_store_inferior_registers): Likewise.
1193 (windows_resume): Likewise.
1194 * xtensa-linux-nat.c (fill_gregset): Likewise.
1195 (supply_gregset_reg): Likewise.
1196 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1197 (xtensa_register_read_masked): Likewise.
1198 (xtensa_supply_gregset): Likewise.
1199 (xtensa_extract_return_value): Likewise.
1200 (xtensa_store_return_value): Likewise.
1201
1202 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1203
1204 * doublest.c (floatformat_from_string): New function.
1205 * doublest.h (floatformat_from_string): Add prototype.
1206
1207 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1208 (OP_FLOAT): ... this.
1209 * expression.h: Do not include "doublest.h".
1210 (union exp_element): Replace doubleconst and decfloatconst by
1211 new element floatconst.
1212 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1213 (ada_evaluate_subexp): Likewise.
1214 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1215 OP_DOUBLE and OP_DECFLOAT.
1216 * expprint.c (print_subexp_standard): Likewise.
1217 (dump_subexp_body_standard): Likewise.
1218 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1219
1220 * parse.c: Include "dfp.h".
1221 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1222 (write_exp_elt_floatcst): New function.
1223 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1224 and OP_DECFLOAT.
1225 (operator_check_standard): Likewise.
1226 (parse_float): Do not accept suffix. Take type as input. Return bool.
1227 Return target format buffer instead of host DOUBLEST.
1228 Use floatformat_from_string and decimal_from_string to parse
1229 either binary or decimal floating-point types.
1230 (parse_c_float): Remove.
1231 * parser-defs.h: Do not include "doublest.h".
1232 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1233 (write_exp_elt_floatcst): Add prototype.
1234 (parse_float): Update prototype.
1235 (parse_c_float): Remove.
1236
1237 * c-exp.y: Do not include "dfp.h".
1238 (typed_val_float): Use byte buffer instead of DOUBLEST.
1239 (typed_val_decfloat): Remove.
1240 (DECFLOAT): Remove.
1241 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1242 (parse_number): Update to new parse_float interface.
1243 Parse suffixes and determine type before calling parse_float.
1244 Handle decimal and binary FP types the same way.
1245
1246 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1247 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1248 (parse_number): Update to new parse_float interface.
1249 Parse suffixes and determine type before calling parse_float.
1250
1251 * f-exp.y: Replace dval by typed_val_float.
1252 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1253 (parse_number): Use parse_float instead of atof.
1254
1255 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1256 (parse_go_float): Remove.
1257 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1258 (parse_number): Call parse_float instead of parse_go_float.
1259 Parse suffixes and determine type before calling parse_float.
1260
1261 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1262 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1263 (parse_number): Update to new parse_float interface.
1264 Parse suffixes and determine type before calling parse_float.
1265
1266 * m2-exp.y: Replace dval by byte buffer val.
1267 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1268 (parse_number): Call parse_float instead of atof.
1269
1270 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1271 (lex_number): Call parse_float instead of strtod.
1272 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1273 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1274 Use write_exp_elt_floatcst.
1275 (unit_testing): Remove static variable.
1276 (rust_type): Do not check unit_testing.
1277 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1278
1279 * ada-exp.y (type_float, type_double): Remove.
1280 (typed_val_float): Use byte buffer instead of DOUBLEST.
1281 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1282 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1283
1284 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1285
1286 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1287 * arch/aarch64.h: New file.
1288
1289 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1290
1291 * dfp.h (decimal_from_string): Use const reference for argument.
1292 * dfp.c (decimal_from_string): Likewise.
1293
1294 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1295
1296 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1297 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1298 * mips-tdep.c (mips_print_fp_register): Likewise.
1299
1300 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1301
1302 * common/format.h (enum argclass): Replace decfloat_arg by
1303 dec32float_arg, dec64float_arg, and dec128float_arg.
1304 * common/format.c (parse_format_string): Update to return
1305 new decimal float argument classes.
1306
1307 * printcmd.c (printf_decfloat): Rename to ...
1308 (printf_floating): ... this. Add argclass argument, and use it
1309 instead of parsing the format string again. Add support for
1310 binary floating-point values, using floatformat_to_string.
1311 Convert value to the target format if it doesn't already match.
1312 (ui_printf): Call printf_floating instead of printf_decfloat,
1313 also for double_arg / long_double_arg. Pass argclass.
1314
1315 * dfp.c (decimal_to_string): Add format string argument.
1316 * dfp.h (decimal_to_string): Likewise.
1317
1318 * doublest.c (floatformat_to_string): Add format string argument.
1319 * doublest.h (floatformat_to_string): Likewise.
1320
1321 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1322
1323 * doublest.c (floatformat_precision): New routine.
1324 (floatformat_to_string): Likewise.
1325 * doublest.c (floatformat_to_string): Add prototype.
1326
1327 * printcmd.c (print_scalar_formatted): Only call print_floating
1328 on floating-point types.
1329 * valprint.c: Do not include "floatformat.h".
1330 (generic_val_print_decfloat): Remove.
1331 (generic_val_print): Call generic_val_print_float for both
1332 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1333 (print_floating): Use floatformat_to_string. Handle decimal float.
1334 (print_decimal_floating): Remove, merge into floatformat_to_string.
1335 * value.h (print_decimal_floating): Remove.
1336
1337 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1338
1339 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1340
1341 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1342
1343 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1344
1345 * memattr.h: Don't include vec.h.
1346 (struct mem_attrib): Initialize fields.
1347 <unknown>: New static method.
1348 (struct mem_region): Add constructors, operator<, initialize
1349 fields.
1350 * memattr.c: Include algorithm.
1351 (default_mem_attrib, unknown_mem_attrib): Remove.
1352 (user_mem_region_list): New global.
1353 (target_mem_region_list, mem_region_list): Change type to
1354 std::vector<mem_region>.
1355 (mem_use_target): Now a function.
1356 (target_mem_regions_valid): Change type to bool.
1357 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1358 (require_user_regions): Adjust.
1359 (require_target_regions): Adjust.
1360 (create_mem_region): Adjust.
1361 (lookup_mem_region): Adjust.
1362 (invalidate_target_mem_regions): Adjust.
1363 (mem_clear): Rename to...
1364 (user_mem_clear): ... this, and adjust.
1365 (mem_command): Adjust.
1366 (info_mem_command): Adjust.
1367 (mem_enable, enable_mem_command, mem_disable,
1368 disable_mem_command): Adjust.
1369 (mem_delete): Adjust.
1370 (delete_mem_command): Adjust.
1371 * memory-map.h (parse_memory_map): Return an std::vector.
1372 * memory-map.c (parse_memory_map): Likewise.
1373 (struct memory_map_parsing_data): Add constructor.
1374 <memory_map>: Point to std::vector.
1375 (memory_map_start_memory): Adjust.
1376 (memory_map_end_memory): Adjust.
1377 (memory_map_end_property): Adjust.
1378 (clear_result): Remove.
1379 * remote.c (remote_memory_map): Return an std::vector.
1380 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1381 Remove.
1382 (target_debug_print_mem_region_vector): New.
1383 * target-delegates.c: Regenerate.
1384 * target.h (mem_region_vector): New typedef.
1385 (to_memory_map): Return mem_region_vector.
1386 (target_memory_map): Return an std::vector.
1387 * target.c (target_memory_map): Return an std::vector.
1388 (flash_erase_command): Adjust.
1389
1390 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1391
1392 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1393 Change type to std::string.
1394 (memory_map_start_property): Adjust.
1395 (memory_map_end_property): Adjust.
1396
1397 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * infrun.h: Include common/byte-vector.h.
1400 (struct displaced_step_closure): New struct.
1401 (struct buf_displaced_step_closure): New struct.
1402 * infrun.c (displaced_step_closure::~displaced_step_closure):
1403 Provide default implementation.
1404 (displaced_step_clear): Deallocate step closure with delete.
1405 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1406 (aarch64_displaced_step_closure): ... this, extend
1407 displaced_step_closure.
1408 (aarch64_displaced_step_data) <dsc>: Change type to
1409 aarch64_displaced_step_closure.
1410 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1411 unique_ptr.
1412 (aarch64_displaced_step_fixup): Add cast for displaced step
1413 closure.
1414 * amd64-tdep.c (displaced_step_closure): Rename to ...
1415 (amd64_displaced_step_closure): ... this, extend
1416 displaced_step_closure.
1417 <insn_buf>: Change type to std::vector<gdb_byte>.
1418 <max_len>: Remove.
1419 (fixup_riprel): Change type of DSC parameter, adjust to type
1420 change of insn_buf.
1421 (fixup_displaced_copy): Change type of DSC parameter.
1422 (amd64_displaced_step_copy_insn): Instantiate
1423 amd64_displaced_step_closure.
1424 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1425 to type change of insn_buf.
1426 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1427 parameter DSC.
1428 (arm_linux_copy_svc): Likewise.
1429 (cleanup_kernel_helper_return): Likewise.
1430 (arm_catch_kernel_helper_return): Likewise.
1431 (arm_linux_displaced_step_copy_insn): Instantiate
1432 arm_displaced_step_closure.
1433 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1434 (displaced_read_reg): Change type of parameter DSC.
1435 (branch_write_pc): Likewise.
1436 (load_write_pc): Likewise.
1437 (alu_write_pc): Likewise.
1438 (displaced_write_reg): Likewise.
1439 (arm_copy_unmodified): Likewise.
1440 (thumb_copy_unmodified_32bit): Likewise.
1441 (thumb_copy_unmodified_16bit): Likewise.
1442 (cleanup_preload): Likewise.
1443 (install_preload): Likewise.
1444 (arm_copy_preload): Likewise.
1445 (thumb2_copy_preload): Likewise.
1446 (install_preload_reg): Likewise.
1447 (arm_copy_preload_reg): Likewise.
1448 (cleanup_copro_load_store): Likewise.
1449 (install_copro_load_store): Likewise.
1450 (arm_copy_copro_load_store) Likewise.
1451 (thumb2_copy_copro_load_store): Likewise.
1452 (cleanup_branch): Likewise.
1453 (install_b_bl_blx): Likewise.
1454 (arm_copy_b_bl_blx): Likewise.
1455 (thumb2_copy_b_bl_blx): Likewise.
1456 (thumb_copy_b): Likewise.
1457 (install_bx_blx_reg): Likewise.
1458 (arm_copy_bx_blx_reg): Likewise.
1459 (thumb_copy_bx_blx_reg): Likewise.
1460 (cleanup_alu_imm): Likewise.
1461 (arm_copy_alu_imm): Likewise.
1462 (thumb2_copy_alu_imm): Likewise.
1463 (cleanup_alu_reg): Likewise.
1464 (install_alu_reg): Likewise.
1465 (arm_copy_alu_reg): Likewise.
1466 (thumb_copy_alu_reg): Likewise.
1467 (cleanup_alu_shifted_reg): Likewise.
1468 (install_alu_shifted_reg): Likewise.
1469 (arm_copy_alu_shifted_reg): Likewise.
1470 (cleanup_load): Likewise.
1471 (cleanup_store): Likewise.
1472 (arm_copy_extra_ld_st): Likewise.
1473 (install_load_store): Likewise.
1474 (thumb2_copy_load_literal): Likewise.
1475 (thumb2_copy_load_reg_imm): Likewise.
1476 (arm_copy_ldr_str_ldrb_strb): Likewise.
1477 (cleanup_block_load_all): Likewise.
1478 (cleanup_block_store_pc): Likewise.
1479 (cleanup_block_load_pc): Likewise.
1480 (arm_copy_block_xfer): Likewise.
1481 (thumb2_copy_block_xfer): Likewise.
1482 (cleanup_svc): Likewise.
1483 (install_svc): Likewise.
1484 (arm_copy_svc): Likewise.
1485 (thumb_copy_svc): Likewise.
1486 (arm_copy_undef): Likewise.
1487 (thumb_32bit_copy_undef): Likewise.
1488 (arm_copy_unpred): Likewise.
1489 (arm_decode_misc_memhint_neon): Likewise.
1490 (arm_decode_unconditional): Likewise.
1491 (arm_decode_miscellaneous): Likewise.
1492 (arm_decode_dp_misc): Likewise.
1493 (arm_decode_ld_st_word_ubyte): Likewise.
1494 (arm_decode_media): Likewise.
1495 (arm_decode_b_bl_ldmstm): Likewise.
1496 (arm_decode_ext_reg_ld_st): Likewise.
1497 (thumb2_decode_dp_shift_reg): Likewise.
1498 (thumb2_decode_ext_reg_ld_st): Likewise.
1499 (arm_decode_svc_copro): Likewise.
1500 (thumb2_decode_svc_copro): Likewise.
1501 (install_pc_relative): Likewise.
1502 (thumb_copy_pc_relative_16bit): Likewise.
1503 (thumb_decode_pc_relative_16bit): Likewise.
1504 (thumb_copy_pc_relative_32bit): Likewise.
1505 (thumb_copy_16bit_ldr_literal): Likewise.
1506 (thumb_copy_cbnz_cbz): Likewise.
1507 (thumb2_copy_table_branch): Likewise.
1508 (cleanup_pop_pc_16bit_all): Likewise.
1509 (thumb_copy_pop_pc_16bit): Likewise.
1510 (thumb_process_displaced_16bit_insn): Likewise.
1511 (decode_thumb_32bit_ld_mem_hints): Likewise.
1512 (thumb_process_displaced_32bit_insn): Likewise.
1513 (thumb_process_displaced_insn): Likewise.
1514 (arm_process_displaced_insn): Likewise.
1515 (arm_displaced_init_closure): Likewise.
1516 (arm_displaced_step_fixup): Add cast for closure.
1517 * arm-tdep.h: Include infrun.h.
1518 (displaced_step_closure): Rename to ...
1519 (arm_displaced_step_closure): ... this, extend
1520 displaced_step_closure.
1521 <u::svc::copy_svc_os>: Change type of parameter DSC.
1522 <cleanup>: Likewise.
1523 (arm_process_displaced_insn): Likewise.
1524 (arm_displaced_init_closure): Likewise.
1525 (displaced_read_reg): Likewise.
1526 (displaced_write_reg): Likewise.
1527 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1528 Adjust.
1529 * i386-tdep.h: Include infrun.h.
1530 (i386_displaced_step_closure): New typedef.
1531 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1532 i386_displaced_step_closure.
1533 (i386_displaced_step_fixup): Adjust.
1534 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1535 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1536 and unique_ptr.
1537 (ppc_displaced_step_fixup): Adjust.
1538 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1539 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1540 and unique_ptr.
1541 (s390_displaced_step_fixup): Adjust.
1542
1543 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1544
1545 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1546 Remove declarations.
1547
1548 2017-10-20 Tom Tromey <tom@tromey.com>
1549
1550 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1551 std::vector.
1552 (gdb_bfd_record_inclusion): Update.
1553 (bfdp): Remove typedef.
1554
1555 2017-10-20 Tom Tromey <tom@tromey.com>
1556
1557 * gdb_bfd.c (gdb_bfd_ref): Use new.
1558 (struct gdb_bfd_data): Add constructor, destructor, and member
1559 initializers.
1560 (gdb_bfd_unref): Use delete.
1561
1562 2017-10-20 Tom Tromey <tom@tromey.com>
1563
1564 * exec.c (exec_file_attach): Use new_bfd_ref.
1565 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1566 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1567 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1568 new_bfd_ref.
1569 * gdb_bfd.h (new_bfd_ref): New function.
1570
1571 2017-10-20 Pedro Alves <palves@redhat.com>
1572
1573 * main.c (captured_command_loop): Add attribute noinline.
1574
1575 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1576
1577 * interps.c (struct interp_factory): Add constructor.
1578 (interp_factory_p): Remove typedef.
1579 (DEF_VEC_P(interp_factory_p)): Remove.
1580 (interpreter_factories): Change type to std::vector.
1581 (interp_factory_register): Adjust.
1582 (interp_lookup): Adjust.
1583 (interpreter_completer): Adjust.
1584
1585 2017-10-19 Tom Tromey <tom@tromey.com>
1586
1587 * break-catch-syscall.c (catch_syscall_completer): Use
1588 std::string, gdb::unique_xmalloc_ptr.
1589
1590 2017-10-19 Tom Tromey <tom@tromey.com>
1591
1592 * infcall.c (call_function_by_hand_dummy): Use std::string.
1593
1594 2017-10-19 Tom Tromey <tom@tromey.com>
1595
1596 * mi/mi-main.c (mi_cmd_execute): Update.
1597 * top.h (prepare_execute_command): Return scoped_value_mark.
1598 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1599 Add move constructor.
1600 * top.c (prepare_execute_command): Return scoped_value_mark.
1601 (execute_command): Update.
1602
1603 2017-10-19 Pedro Alves <palves@redhat.com>
1604
1605 * xml-support.c (xml_fetch_content_from_file): Check fread's
1606 return.
1607
1608 2017-10-19 Pedro Alves <palves@redhat.com>
1609
1610 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1611 async.
1612 (handle_error_fd): New function.
1613 (ser_base_async): Add/delete an event loop file handler for
1614 error_fd.
1615
1616 2017-10-19 Pedro Alves <palves@redhat.com>
1617
1618 * xml-support.c (xml_fetch_content_from_file): Don't read in
1619 chunks. Instead use fseek to determine the file's size, and read
1620 it in one go.
1621
1622 2017-11-18 Keith Seitz <keiths@redhat.com>
1623
1624 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1625 types.
1626 Add whitespace to front of type name.
1627
1628 2017-10-18 Keith Seitz <keiths@redhat.com>
1629
1630 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1631 DW_AT_accessibility.
1632
1633 2017-10-18 Yao Qi <yao.qi@linaro.org>
1634
1635 * features/tic6x-c62x-linux.c: Remove.
1636
1637 2017-10-17 Tom Tromey <tom@tromey.com>
1638
1639 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1640 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1641 (do_mixed_source_and_assembly): Likewise.
1642
1643 2017-10-17 Tom Tromey <tom@tromey.com>
1644
1645 * regcache.c (regcache::xfer_part): Remove assertion.
1646
1647 2017-10-17 Pedro Alves <palves@redhat.com>
1648
1649 * xml-support.c (xml_fetch_content_from_file): Call
1650 unique_ptr::release() instead unique_ptr::get() when passing
1651 through xrealloc.
1652
1653 2017-10-17 Yao Qi <yao.qi@linaro.org>
1654
1655 * regcache.c (regcache::xfer_part): Remove parameters read and
1656 write, add parameter is_raw. All callers are updated.
1657
1658 2017-10-16 Keith Seitz <keiths@redhat.com>
1659
1660 * c-typeprint.c (enum access_specifier): Moved here from
1661 c_type_print_base.
1662 (output_access_specifier): New function.
1663 (c_type_print_base): Consider typedefs when assessing
1664 whether access labels are needed.
1665 Use output_access_specifier as needed.
1666 Output access specifier for typedefs, if needed.
1667 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1668 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1669 fields.
1670 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1671 accessor macros.
1672
1673 2017-10-16 Tom Tromey <tom@tromey.com>
1674
1675 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1676 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1677 * target.c (target_fileio_read_stralloc): Update.
1678 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1679 * target.h (target_fileio_read_stralloc): Return
1680 unique_xmalloc_ptr.
1681
1682 2017-10-16 Tom Tromey <tom@tromey.com>
1683
1684 * xml-syscall.c (xml_init_syscalls_info): Update.
1685 * xml-support.c (xinclude_start_include): Update.
1686 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1687 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1688 (xml_fetch_content_from_file): Likewise.
1689 * osdata.c (get_osdata): Update.
1690 * target.h (target_read_stralloc, target_get_osdata): Return
1691 unique_xmalloc_ptr.
1692 * solib-aix.c (solib_aix_get_library_list): Update.
1693 * solib-target.c (solib_target_current_sos): Update.
1694 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1695 * xml-tdesc.c (fetch_available_features_from_target): Update.
1696 (target_fetch_description_xml): Update.
1697 (file_read_description_xml): Update.
1698 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1699 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1700 (remote_pid_to_exec_file): Update.
1701 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1702 (target_get_osdata): Likewise.
1703
1704 2017-10-16 Tom Tromey <tom@tromey.com>
1705
1706 * remote.c (remote_register_number_and_offset): Use std::vector.
1707 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1708 (putpkt_binary): Use gdb::def_vector.
1709 (compare_sections_command): Use gdb::byte_vector.
1710
1711 2017-10-16 Tom Tromey <tom@tromey.com>
1712
1713 * ppc-linux-nat.c (hwdebug_insert_point): Use
1714 gdb::unique_xmalloc_ptr, XDUP.
1715
1716 2017-10-16 Tom Tromey <tom@tromey.com>
1717
1718 * probe.c (parse_probes): Use std::string.
1719 (info_probes_for_ops, enable_probes_command)
1720 (disable_probes_command): Remove cleanups.
1721
1722 2017-10-16 Tom Tromey <tom@tromey.com>
1723
1724 * buildsym.c (block_compar): Remove.
1725 (end_symtab_get_static_block): Use std::vector.
1726
1727 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1728
1729 * memrange.h (struct mem_range): Define operator< and operator==.
1730 (mem_range_s): Remove.
1731 (DEF_VEC_O (mem_range_s)): Remove.
1732 (normalize_mem_ranges): Change parameter type to std::vector.
1733 * memrange.c (compare_mem_ranges): Remove.
1734 (normalize_mem_ranges): Change parameter type to std::vector,
1735 adjust to vector change.
1736 * exec.c (section_table_available_memory): Return vector, remove
1737 parameter.
1738 (section_table_read_available_memory): Adjust to std::vector
1739 change.
1740 * remote.c (remote_read_bytes): Adjust to std::vector
1741 change.
1742 * tracepoint.h (traceframe_available_memory): Change parameter
1743 type to std::vector.
1744 * tracepoint.c (traceframe_available_memory): Change parameter
1745 type to std::vector, adjust.
1746 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1747 std::vector change.
1748 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1749 unittests/memrange-selftests.c.
1750 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1751 * gdb/unittests/memrange-selftests.c: New file.
1752
1753 2017-10-16 Pedro Alves <palves@redhat.com>
1754
1755 * elfread.c (probe_key_free): Rename range-for variable.
1756 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1757 (find_probe_by_pc, collect_probes): Rename range-for variable.
1758
1759 2017-10-16 Yao Qi <yao.qi@linaro.org>
1760
1761 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1762 * features/tic6x-c62x.c: Remove.
1763 * features/tic6x-c64x-linux.c: Remove.
1764 * features/tic6x-c64x.c: Remove.
1765 * features/tic6x-c64xp-linux.c: Remove.
1766 * features/tic6x-c64xp.c: Remove.
1767 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1768 initialize_tdesc_tic6x_*_linux functions.
1769 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1770 initialize_tdesc_tic6x_* functions.
1771
1772 2017-10-16 Yao Qi <yao.qi@linaro.org>
1773
1774 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1775 tic6x-c62x.
1776 * regformats/tic6x-c62x.dat: Remove.
1777 * regformats/tic6x-c64x.dat: Remove.
1778 * regformats/tic6x-c64xp.dat: Remove.
1779
1780 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1783 (the !HAVE_LIBEXPAT version).
1784
1785 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1786
1787 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1788 const.
1789
1790 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1791
1792 * target.h: Include tracepoint.h.
1793 (enum trace_find_type): Move to tracepoint.h.
1794 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1795 * tracepoint.h: Don't include target.h
1796 (enum trace_find_type): Move from target.h.
1797 (parse_traceframe_info): Return a unique ptr.
1798 * tracepoint.c (current_traceframe_info): Change type to unique
1799 ptr.
1800 (free_traceframe_info): Remove.
1801 (clear_traceframe_info): Don't manually free
1802 current_traceframe_info.
1803 (free_result): Remove.
1804 (parse_traceframe_info): Return a unique ptr.
1805 (get_traceframe_info): Adjust to unique ptr.
1806 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1807 * remote.c (remote_traceframe_info): Return a unique ptr.
1808 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1809 ptr.
1810 * target-debug.h (target_debug_print_traceframe_info_up): New
1811 macro.
1812 * target-delegates.c: Regenerate.
1813
1814 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * memrange.h (struct mem_range): Add constructors.
1817 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1818 std::vector<mem_range>.
1819 * tracepoint.c (free_traceframe_info): Don't manually free
1820 vector.
1821 (traceframe_info_start_memory): Adjust to vector change.
1822 (traceframe_available_memory): Likewise.
1823 * tracefile-tfile.c (build_traceframe_info): Likewise.
1824 * ctf.c (ctf_traceframe_info): Likewise.
1825
1826 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1827
1828 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1829 std::vector<int>.
1830 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1831 (traceframe_info_start_tvar): Adjust to vector change.
1832 (parse_traceframe_info): Allocate with new.
1833 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1834 vector change.
1835 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1836 change.
1837 tfile_traceframe_info): Allocate with new.
1838 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1839 change.
1840
1841 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * tracepoint.c (traceframe_info): Rename to...
1844 (current_traceframe_info): ...this.
1845 (clear_traceframe_info): Adjust.
1846 (get_traceframe_info): Adjust.
1847
1848 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1849
1850 * nat/linux-osdata.c: Include algorithm.
1851 (compare_processes): Remove.
1852 (struct pid_pgid_entry): New struct.
1853 (linux_xfer_osdata_processgroups): Use std::vector instead of
1854 XNEWVEC.
1855
1856 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1857
1858 * objfiles.h: Don't include symfile.h.
1859 (struct partial_symbol): Remove forward-declaration.
1860 (struct objfile) <global_psymbols, static_psymbols>: Change type
1861 to std::vector<partial_symbol *>.
1862 * objfiles.c (objfile::objfile): Don't memset those fields.
1863 (objfile::~objfile): Don't free those fields.
1864 * psympriv.h (struct psymbol_allocation_list): Remove
1865 forward-declaration.
1866 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1867 to std::vector.
1868 (start_psymtab_common): Change parameters to std::vector.
1869 * psymtab.c: Include algorithm.
1870 (require_partial_symbols): Call shrink_to_fit.
1871 (find_pc_sect_psymbol): Adjust to vector change.
1872 (match_partial_symbol): Likewise.
1873 (lookup_partial_symbol): Likewise.
1874 (psym_relocate): Likewise.
1875 (dump_psymtab): Likewise.
1876 (recursively_search_psymtabs): Likewise.
1877 (compare_psymbols): Remove.
1878 (sort_pst_symbols): Adjust to vector change.
1879 (start_psymtab_common): Likewise.
1880 (end_psymtab_common): Likewise.
1881 (psymbol_bcache_full): De-constify return value.
1882 (add_psymbol_to_bcache): Likewise.
1883 (extend_psymbol_list): Remove.
1884 (append_psymbol_to_list): Adjust to vector change.
1885 (add_psymbol_to_list): Likewise.
1886 (init_psymbol_list): Likewise.
1887 (maintenance_info_psymtabs): Likewise.
1888 (maintenance_check_psymtabs): Likewise.
1889 * symfile.h (struct psymbol_allocation_list): Remove.
1890 * symfile.c (reread_symbols): Adjust to vector change.
1891 * dbxread.c (start_psymtab): Change type of parameters.
1892 (dbx_symfile_read): Adjust to vector change.
1893 (read_dbx_symtab): Likewise.
1894 (start_psymtab): Change type of parameters.
1895 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1896 (create_partial_symtab): Likewise.
1897 (add_partial_symbol): Likewise.
1898 (write_one_signatured_type): Likewise.
1899 (recursively_write_psymbols): Likewise.
1900 * mdebugread.c (parse_partial_symbols): Likewise.
1901 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1902 (scan_xcoff_symtab): Adjust to vector change.
1903 (xcoff_initial_scan): Likewise.
1904
1905 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1906
1907 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1908
1909 2017-10-13 Yao Qi <yao.qi@linaro.org>
1910
1911 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1912 Remove s390x-*-expedite, add s390x-expedite.
1913
1914 2017-10-13 Yao Qi <yao.qi@linaro.org>
1915
1916 * features/s390-gs-linux64.c: Regenerated.
1917 * features/s390x-gs-linux64.c: Regenerated.
1918
1919 2017-10-13 Tom Tromey <tom@tromey.com>
1920
1921 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1922 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1923 delete.
1924 * symfile.c (symbol_file_add_with_addrs): Use new.
1925 (symbol_file_add_separate): Update comment.
1926 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1927 * jit.c (jit_object_close_impl): Use new.
1928 (jit_unregister_code): Use delete.
1929 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1930 (~objfile): Rename from free_objfile.
1931 (free_objfile_separate_debug, do_free_objfile_cleanup)
1932 (free_all_objfiles, objfile_purge_solibs): Use delete.
1933 * objfiles.h (struct objfile): Add constructor and destructor.
1934 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1935 (allocate_objfile, free_objfile): Don't declare.
1936 (struct objstats): Add initializers.
1937
1938 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1939
1940 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1941 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1942 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1943 * gdbarch.h: Regenerate.
1944 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1945 Adjust comment.
1946 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1947 (i386_displaced_step_fixup): Adjust comment.
1948 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1949
1950 2017-10-12 Tom Tromey <tom@tromey.com>
1951
1952 * prologue-value.h (pv_area::store_would_trash): Return bool.
1953 (pv_area::find_reg): Likewise.
1954 * prologue-value.c (pv_area::store_would_trash): Return bool.
1955 (pv_area::find_reg): Likewise.
1956
1957 2017-10-12 Tom Tromey <tom@tromey.com>
1958
1959 * s390-linux-tdep.c (s390_store, s390_load)
1960 (s390_check_for_saved, s390_analyze_prologue): Update.
1961 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1962 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1963 * prologue-value.h (class pv_area): Move from prologue-value.c.
1964 Change names of members. Add constructor, destructor, member
1965 functions.
1966 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1967 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1968 (pv_area_fetch, pv_area_scan): Don't declare.
1969 * prologue-value.c (struct pv_area::area_entry): Now member of
1970 pv_area.
1971 (struct pv_area): Move to prologue-value.h.
1972 (pv_area::pv_area): Rename from make_pv_area.
1973 (pv_area::~pv_area): Rename from free_pv_area.
1974 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1975 (clear_entries, find_entry, overlaps, store_would_trash, store)
1976 (fetch, find_reg, scan): Now member of pv_area.
1977 Remove "area" argument. Update.
1978 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1979 Update.
1980 * mn10300-tdep.c (push_reg, check_for_saved)
1981 (mn10300_analyze_prologue): Update.
1982 * mep-tdep.c (is_arg_spill, check_for_saved)
1983 (mep_analyze_prologue): Update.
1984 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1985 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1986 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1987 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1988 Update.
1989 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1990 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1991
1992 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1993
1994 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1995 * linux-nat.c (linux_nat_delete_thread): New variable.
1996 (lwp_free): Invoke linux_nat_delete_thread if set.
1997 (linux_nat_set_delete_thread): New function.
1998 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1999 thread delete callback.
2000 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2001 (_initialize_arm_linux_nat): Assign thread delete callback.
2002 * s390-linux-nat.c (s390_delete_thread): New function.
2003 (_initialize_s390_nat): Assign thread delete callback.
2004 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2005 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2006 function.
2007 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2008 declaration.
2009 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2010 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2011
2012 2017-10-09 Tom Tromey <tom@tromey.com>
2013
2014 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2015 std::string.
2016 * tui/tui-layout.c (enum tui_status): Use std::string.
2017
2018 2017-10-11 Tom Tromey <tom@tromey.com>
2019
2020 * gdbthread.h (thread_command): Constify.
2021 * inferior.h (detach_command): Constify.
2022 * top.h (set_history, show_history): Constify.
2023 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2024 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2025 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2026 * printcmd.c (set_command): Constify.
2027 (non_const_set_command): New function.
2028 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2029 * breakpoint.c (enable_command, disable_command, delete_command)
2030 (catch_command, tcatch_command, set_breakpoint_cmd)
2031 (show_breakpoint_cmd): Constify.
2032 * macrocmd.c (macro_command): Constify.
2033 * infcmd.c (unset_command, kill_command, detach_command)
2034 (info_proc_cmd): Constify.
2035 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2036 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2037 (info_auto_load_cmd): Constify.
2038 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2039 (unset_tdesc_cmd): Constify.
2040 * ada-lang.c (set_ada_command, show_ada_command)
2041 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2042 * guile/guile.c (set_guile_command, show_guile_command)
2043 (info_guile_command): Constify.
2044 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2045 Constify.
2046 * skip.c (skip_command): Constify.
2047 * compile/compile.c (_initialize_compile): Constify.
2048 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2049 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2050 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2051 (maint_btrace_pt_show_cmd): Constify.
2052 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2053 Constify.
2054 * python/python.c (user_show_python, user_set_python): Constify.
2055 * mips-tdep.c (set_mips_command, show_mips_command)
2056 (set_mipsfpu_command): Constify.
2057 * record-btrace.c (cmd_record_btrace_start)
2058 (cmd_set_record_btrace, cmd_show_record_btrace)
2059 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2060 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2061 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2062 Constify.
2063 * symfile.c (overlay_command): Constify.
2064 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2065 * cli/cli-logging.c (set_logging_command, show_logging_command):
2066 Constify.
2067 * cli/cli-dump.c (dump_command, append_command)
2068 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2069 (tekhex_dump_command, binary_dump_command)
2070 (binary_append_command): Constify.
2071 * cli/cli-decode.c (struct cmd_list_element): Change type of
2072 "fun".
2073 * cli/cli-cmds.c (info_command, show_command, set_debug)
2074 (show_debug): Constify.
2075 (show_command): Add non-const overload.
2076 * top.c (set_history, show_history): Constify.
2077 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2078 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2079 * target.c (target_command): Constify.
2080 * sparc64-tdep.c (info_adi_command): Constify.
2081 * record-full.c (cmd_record_full_start): Constify.
2082 (set_record_full_command): Constify. Fix typo.
2083 (show_record_full_command): Constify.
2084 * thread.c (thread_command, thread_apply_command): Constify.
2085 * memattr.c (dummy_cmd): Constify.
2086 * value.c (function_command): Constify.
2087 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2088 * probe.c (info_probes_command): Constify.
2089 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2090 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2091 (show_thread_cmd, set_thread_default_cmd)
2092 (show_thread_default_cmd): Constify.
2093 (check_empty): Constify.
2094 * tracepoint.c (tfind_command): Constify.
2095 * cp-support.c (maint_cplus_command): Constify.
2096 * windows-tdep.c (info_w32_command): Constify.
2097 * record.c (cmd_record_start, set_record_command)
2098 (show_record_command, info_record_command, cmd_record_goto):
2099 Constify.
2100 * ravenscar-thread.c (set_ravenscar_command)
2101 (show_ravenscar_command): Constify.
2102 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2103 Constify.
2104 (add_internal_problem_command): Remove casts.
2105 * arc-tdep.c (maintenance_print_arc_command): Constify.
2106 * valprint.c (set_print, show_print, set_print_raw)
2107 (show_print_raw): Constify.
2108 * maint.c (maintenance_command, maintenance_info_command)
2109 (maintenance_print_command, maintenance_set_cmd)
2110 (maintenance_show_cmd, set_per_command_cmd)
2111 (show_per_command_cmd, maintenance_check_command): Constify.
2112 * language.c (set_check, show_check): Constify.
2113 * typeprint.c (show_print_type, set_print_type): Constify.
2114 * go32-nat.c (go32_info_dos_command): Constify.
2115
2116 2017-10-11 Tom Tromey <tom@tromey.com>
2117
2118 * breakpoint.c (prepare_re_set_context): Remove.
2119 (breakpoint_re_set_one): Update. Don't use cleanups.
2120 (breakpoint_re_set): Use scoped_restore, std::string, and
2121 scoped_restore_current_language.
2122
2123 2017-10-11 Tom Tromey <tom@tromey.com>
2124
2125 * breakpoint.c (commands_command_1): Use std::string.
2126 (cleanup_executing_breakpoints): Remove.
2127 (bpstat_do_actions_1): Use scoped_restore.
2128 (bpstat_check_watchpoint): Use std::string.
2129 (decode_static_tracepoint_spec): Likewise.
2130 (break_range_command): Likewise.
2131 (watch_command_1): Likewise.
2132 (compare_breakpoints): Change argument types.
2133 (clear_command): Use std::vector.
2134 (cleanup_executing_breakpoints): Remove.
2135 (update_global_location_list): Use unique_xmalloc_ptr.
2136 (strace_command): Remove unused declaration.
2137
2138 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2139
2140 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2141 * NEWS: Mention new FreeBSD/arm native configuration.
2142 * configure.host: Add arm*-*-freebsd*.
2143 * configure.nat: Likewise.
2144 * arm-fbsd-nat.c: New file.
2145
2146 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2147
2148 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2149 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2150 * NEWS: Mention new FreeBSD/arm target.
2151 * configure.tgt: Add arm*-*-freebsd*.
2152 * arm-fbsd-tdep.c: New file.
2153 * arm-fbsd-tdep.h: New file.
2154
2155 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2156
2157 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2158 `gdbarch_elfcore_write_linux_prpsinfo'.
2159 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2160 method.
2161 (elf_internal_linux_prpsinfo): Remove declaration.
2162 * gdbarch.h: Regenerate.
2163 * gdbarch.c: Regenerate.
2164
2165 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2166
2167 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2168 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2169
2170 2017-10-11 Pedro Alves <palves@redhat.com>
2171
2172 * breakpoint.c (reattach_breakpoints): Delete.
2173 * breakpoint.h (reattach_breakpoints): Delete.
2174
2175 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2176
2177 * symfile.c (registered_sym_fns): Make struct, not typedef.
2178 (DEF_VEC_O (registered_sym_fns)): Remove.
2179 (symtab_fns): Change type to std::vector.
2180 (add_symtab_fns): Adjust.
2181 (find_sym_fns): Adjust.
2182
2183 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2184
2185 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2186 * arc-tdep.h (arc_arch_is_em): New function.
2187 (arc_arch_is_hs): Likewise.
2188
2189 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2190
2191 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2192 parentheses in the declaration.
2193 (macro_lookup_inclusion): Likewise.
2194 (macro_lookup_definition): Likewise.
2195 * p-lang.h (pascal_builtin_types): Likewise.
2196 * tui/tui-data.c (tui_win_list): Likewise.
2197 * tui/tui-data.h (tui_win_list): Likewise.
2198 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2199
2200 2017-10-11 Mark Rages <markrages@gmail.com>
2201
2202 * target-memory.c (block_boundaries): Fix for block address not
2203 aligned on block size.
2204
2205 2017-10-10 Pedro Alves <palves@redhat.com>
2206 Tom Tromey <tom@tromey.com>
2207
2208 * breakpoint.c (struct captured_breakpoint_query_args)
2209 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2210 (print_breakpoint): New.
2211 * breakpoint.h (print_breakpoint): Declare.
2212 * common/common-exceptions.h (enum return_reason): Remove
2213 references to catch_exceptions.
2214 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2215 Delete.
2216 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2217 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2218 * gdb.h: Delete.
2219 * gdbthread.h (thread_select): Declare.
2220 * mi/mi-cmd-break.c: Don't include gdb.h.
2221 (breakpoint_notify): Use print_breakpoint.
2222 * mi/mi-cmd-catch.c: Don't include gdb.h.
2223 * mi/mi-interp.c: Don't include gdb.h.
2224 (mi_print_breakpoint_for_event): New.
2225 (mi_breakpoint_created, mi_breakpoint_modified): Use
2226 mi_print_breakpoint_for_event.
2227 * mi/mi-main.c: Don't include gdb.h.
2228 (mi_cmd_thread_select): Parse the global thread ID here. Use
2229 thread_select instead of gdb_thread_select.
2230 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2231 of using gdb_list_thread_ids.
2232 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2233 FILEIO_ENOSYS here.
2234 (remote_fileio_request): Use TRY/CATCH instead of
2235 catch_exceptions.
2236 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2237 (symbol_file_add_from_memory_wrapper): Delete.
2238 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2239 * thread.c: Don't include gdb.h.
2240 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2241 (thread_alive): Use thread_select.
2242 (do_captured_thread_select): Delete, parts salvaged as ...
2243 (thread_select): ... this new function.
2244 (gdb_thread_select): Delete.
2245
2246 2017-10-10 Pedro Alves <palves@redhat.com>
2247 Tom Tromey <tom@tromey.com>
2248
2249 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2250 and reverse logic.
2251 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2252 No longer macros. Instead ...
2253 (enum wp_check_result): They're now values of this new
2254 enumeration.
2255 (watchpoint_check): Change return type to wp_check_result and
2256 parameter type to bpstat.
2257 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2258 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2259 catch_errors. Reverse logic of watchpoint_check call.
2260 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2261 pointer as parameter.
2262 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2263 * common/common-exceptions.c (throw_exception_sjlj): Update
2264 comments to avoid mentioning catch_errors.
2265 * exceptions.c (catch_errors): Delete.
2266 * exceptions.h: Update comments to avoid mentioning catch_errors.
2267 (catch_errors_ftype, catch_errors): Delete.
2268 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2269 (hook_stop_stub): Delete.
2270 (restore_selected_frame): Change return type to void, and
2271 parameter type to const frame_id &.
2272 (restore_infcall_control_state): Use TRY/CATCH instead of
2273 catch_errors.
2274 * main.c (captured_command_loop): Return void and remove
2275 parameter. Remove references to catch_errors.
2276 (captured_main): Use TRY/CATCH instead of catch_errors.
2277 * objc-lang.c (objc_submethod_helper_data)
2278 (find_objc_msgcall_submethod_helper): Delete.
2279 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2280 catch_errors.
2281 * record-full.c (record_full_message): Return void.
2282 (record_full_message_args, record_full_message_wrapper): Delete.
2283 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2284 instead of catch_errors.
2285 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2286 parameter type to int.
2287 * solib-darwin.c (open_symbol_file_object): Ditto.
2288 * solib-dsbt.c (open_symbol_file_object): Ditto.
2289 * solib-frv.c (open_symbol_file_object): Ditto.
2290 * solib-svr4.c (open_symbol_file_object): Ditto.
2291 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2292 * solib.c (update_solib_list): Use TRY/CATCH instead of
2293 catch_errors.
2294 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2295 Change type.
2296 * symmisc.c (struct print_symbol_args): Remove.
2297 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2298 (print_symbol): Change type.
2299 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2300 and remove parameters.
2301 (catch_errors): New.
2302 (get_windows_debug_event): Adjust.
2303
2304 2017-10-09 Tom Tromey <tom@tromey.com>
2305
2306 * mi/mi-main.c (free_splay_tree): Remove.
2307 (list_available_thread_groups): Use splay_tree_up.
2308 * common/gdb_splay_tree.h: New file.
2309
2310 2017-10-09 Tom Tromey <tom@tromey.com>
2311
2312 * mi/mi-main.c (do_nothing): Remove.
2313 (list_available_thread_groups): Update.
2314
2315 2017-10-09 Pedro Alves <palves@redhat.com>
2316
2317 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2318 reading registers when switching context.
2319
2320 2017-10-09 John Baldwin <jhb@FreeBSD.org>
2321
2322 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2323 (fbsd_convert_siginfo): Likewise.
2324 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2325
2326 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2327
2328 * configure.ac (try_guile_versions): Remove guile-2.2.
2329 * configure: Regenerate.
2330
2331 2017-10-09 Tom Tromey <tom@tromey.com>
2332
2333 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2334 (COMPILE.pre): Use $(CXX).
2335
2336 2017-10-09 Pedro Alves <palves@redhat.com>
2337
2338 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2339 Use bool.
2340 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2341 * cp-support.h (cp_remove_params): Now returns a
2342 gdb::unique_xmalloc_ptr.
2343 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2344 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2345 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2346 returning a gdb::unique_xmalloc_ptr.
2347 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2348 * stack.c (find_frame_funname): Adjust to cp_remove_params
2349 returning a gdb::unique_xmalloc_ptr.
2350
2351 2017-10-08 Tom Tromey <tom@tromey.com>
2352
2353 * dwarf2read.c (dwarf2_get_dwz_file): Use
2354 gdb::unique_xmalloc_ptr.
2355 (find_slot_in_mapped_hash): Likewise.
2356 (dwarf2_physname): Likewise.
2357 (create_dwo_unit_in_dwp_v1): Use std::string.
2358 (create_dwo_unit_in_dwp_v2): Likewise.
2359 (lookup_dwo_cutu): Likewise.
2360 (inherit_abstract_dies): Use std::vector.
2361 (read_array_type): Likewise.
2362 (dwarf_decode_macros): Remove unused declaration.
2363 (unsigned_int_compar): Remove.
2364 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2365 (psymtabs_addrmap_cleanup): Remove.
2366
2367 2017-10-08 Tom Tromey <tom@tromey.com>
2368
2369 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2370 * frame.h (frame_cleanup_after_sniffer): Declare.
2371 (frame_prepare_for_sniffer): Return void.
2372 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2373 type of argument.
2374 (frame_prepare_for_sniffer): Return void.
2375
2376 2017-10-08 Tom Tromey <tom@tromey.com>
2377
2378 * utils.h (make_cleanup_value_free): Remove.
2379 * utils.c (do_value_free, struct cleanup): Remove.
2380 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2381 Use gdb_value_up.
2382 * value.h (struct value_deleter): New.
2383 (gdb_value_up): New typedef.
2384
2385 2017-10-08 Tom Tromey <tom@tromey.com>
2386
2387 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2388 (make_cleanup_free_search_symbols): Remove.
2389 (search_symbols): Return std::vector.
2390 (symbol_search::compare_search_syms): Now member of
2391 symbol_search. Change arguments.
2392 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2393 (symtab_symbol_info, rbreak_command): Update.
2394 * symtab.h (struct symbol_search) <next>: Remove.
2395 Add constructors.
2396 (symbol_search::operator<): New function.
2397 (symbol_search::operator==): New function.
2398 (search_symbols): Remove std::vector.
2399 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2400 (symbol_search::compare_search_syms): Declare.
2401
2402 2017-10-06 Yao Qi <yao.qi@linaro.org>
2403
2404 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2405 arch/aarch64-insn.o.
2406 Remove one rule.
2407 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2408
2409 2017-10-06 Yao Qi <yao.qi@linaro.org>
2410
2411 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2412 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2413 arch/arm-linux.o respectively.
2414 * configure.tgt: Likewise.
2415
2416 2017-10-06 Yao Qi <yao.qi@linaro.org>
2417
2418 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2419 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2420
2421 2017-10-06 Pedro Alves <palves@redhat.com>
2422
2423 * windows-nat.c: Include <algorithm>.
2424
2425 2017-10-06 Yao Qi <yao.qi@linaro.org>
2426
2427 * configure.tgt (i386_tobjs): New variable.
2428 (amd64_tobjs): New variable.
2429 Set $cpu_obs and $os_obs.
2430
2431 2017-10-06 Yao Qi <yao.qi@linaro.org>
2432
2433 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2434 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2435 (clean): Remove object files and dependency files.
2436 (distclean): Remove the directory.
2437 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2438 * configure: Re-generated.
2439 * configure.tgt: Replace amd64.o with arch/amd64.o.
2440
2441 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2442
2443 PR build/22188
2444 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2445 and SETEND.
2446
2447 2017-10-05 Pedro Alves <palves@redhat.com>
2448
2449 * linux-nat.c (linux_child_follow_fork): When following the parent
2450 and detaching the child, consult the parent thread's architecture
2451 instead of the child's.
2452
2453 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2454
2455 * ax.h: Do not include "doublest.h".
2456 (union agent_val): Remove.
2457
2458 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2459
2460 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2461 (decimal_to_string): Return std::string object.
2462 (decimal_from_string): Accept std::string object. Return bool.
2463 (decimal_from_integral, decimal_from_doublest): Remove.
2464 (decimal_from_longest): Add prototype.
2465 (decimal_from_ulongest): Likewise.
2466 (decimal_to_longest): Likewise.
2467 (decimal_from_doublest): Likewise.
2468 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2469 (MAX_DECIMAL_STRING): Move here.
2470 (decimal_to_string): Return std::string object.
2471 (decimal_from_string): Accept std::string object. Return bool.
2472 (decimal_from_integral): Remove, replace by ...
2473 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2474 (decimal_to_longest): New function.
2475 (decimal_from_floating): Remove, replace by ...
2476 (decimal_from_doublest): ... this new function.
2477 (decimal_to_doublest): Update to new decimal_to_string interface.
2478
2479 * value.c (unpack_long): Use decimal_to_longest.
2480 * valops.c (value_cast): Use decimal_from_doublest instead of
2481 decimal_from_floating. Use decimal_from_[u]longest isntead of
2482 decimal_from_integral.
2483 * valarith.c (value_args_as_decimal): Likewise.
2484 * valprint.c (print_decimal_floating): Update to new
2485 decimal_to_string interface.
2486 * printcmd.c (printf_decfloat): Likewise.
2487 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2488
2489 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2490
2491 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2492 * gdbtypes.c: Include "floatformat.h".
2493 * value.c: Likewise.
2494 * m68k-tdep.c: Likewise.
2495
2496 * findvar.c: Do not include "floatformat.h".
2497 * amd64-darwin-tdep.c: Likewise.
2498 * arm-linux-tdep.c: Likewise.
2499 * i386-darwin-tdep.c: Likewise.
2500 * i387-tdep.c: Likewise.
2501 * m68k-linux-tdep.c: Likewise.
2502 * mep-tdep.c: Likewise.
2503 * mips-tdep.c: Likewise.
2504 * nios2-tdep.c: Likewise.
2505 * s390-linux-tdep.c: Likewise.
2506 * sparc-obsd-tdep.c: Likewise.
2507 * sparc-tdep.c: Likewise.
2508 * sparc64-tdep.c: Likewise.
2509 * spu-tdep.c: Likewise.
2510 * tic6x-tdep.c: Likewise.
2511 * tilegx-tdep.c: Likewise.
2512 * vax-tdep.c: Likewise.
2513 * xstormy16-tdep.c: Likewise.
2514 * xtensa-tdep.c: Likewise.
2515
2516 * top.c: Do not include "doublest.h".
2517 * aarch64-tdep.c: Likewise.
2518 * alpha-tdep.c: Likewise.
2519 * arm-linux-tdep.c: Likewise.
2520 * m68k-linux-tdep.c: Likewise.
2521 * tilegx-tdep.c: Likewise.
2522 * xstormy16-tdep.c: Likewise.
2523
2524 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2525
2526 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2527 (mipsn32_fbsd_sigframe): Define.
2528 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2529 for FreeBSD/mipsn32.
2530
2531 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2532
2533 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2534 AT_HWCAP.
2535
2536 2017-10-05 Tristan Gingold <tgingold@free.fr>
2537
2538 * MAINTAINERS (Misc): Update my email address.
2539
2540 2017-10-04 Pedro Alves <palves@redhat.com>
2541
2542 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2543 it instead of target_gdbarch.
2544 (get_remote_state, get_remote_packet_size): Adjust
2545 get_remote_arch_state calls, passing down target_gdbarch
2546 explicitly.
2547 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2548 'gdbarch' and use it instead of target_gdbarch.
2549 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2550 passing down target_gdbarch explicitly.
2551 (struct stop_reply) <arch>: New field.
2552 (remote_parse_stop_reply): Use the stopped thread's architecture,
2553 not the current inferior's. Save the architecture in the
2554 stop_reply.
2555 (process_stop_reply): Use the stop reply's architecture.
2556 (process_g_packet, remote_fetch_registers)
2557 (remote_prepare_to_store, store_registers_using_G)
2558 (remote_store_registers): Adjust get_remote_arch_state calls,
2559 using the regcache's architecture.
2560 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2561 passing down target_gdbarch explicitly.
2562 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2563 beneath instead of calling target_gdbarch.
2564 * target.c (default_thread_architecture): Use the specified
2565 inferior's architecture, instead of the current inferior's
2566 architecture (via target_gdbarch).
2567
2568 2017-10-04 Pedro Alves <palves@redhat.com>
2569
2570 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2571 case.
2572 (regcache_print): Handle !target_has_registers here instead.
2573
2574 2017-10-04 Pedro Alves <palves@redhat.com>
2575
2576 * frame.c (create_test_frame): Delete.
2577 * frame.h (create_test_frame): Delete.
2578 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2579 (class regcache_test): Delete.
2580 (test_target_has_registers, test_target_has_stack)
2581 (test_target_has_memory, test_target_prepare_to_store)
2582 (test_target_store_registers): New functions.
2583 (test_target_ops): New class.
2584 (register_to_value_test): Error out if there's already a
2585 process_stratum (or higher) target pushed. Create a fuller mock
2586 environment, with mock target_ops, inferior, address space, thread
2587 and inferior_ptid.
2588 * progspace.c (struct address_space): Move to ...
2589 * progspace.h (struct address_space): ... here.
2590 * regcache.h (regcache::~regcache, regcache::raw_write)
2591 [GDB_SELF_TEST]: No longer virtual.
2592
2593 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2596
2597 2017-10-04 Pedro Alves <palves@redhat.com>
2598
2599 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2600 out of 'between TRY and CATCH'.
2601
2602 2017-10-04 Pedro Alves <palves@redhat.com>
2603
2604 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2605 * common/common-exceptions.h (TRY): Open an outermost scope.
2606 Expand intro comment.
2607 (CATCH): Reindent.
2608 (END_CATCH): Close the outermost scope.
2609 * completer.c (complete_line_internal): Add missing END_CATCH.
2610
2611 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2612
2613 * NEWS (Changes since GDB 8.0): Add entry about new
2614 'set-cwd-on-gdbserver' feature.
2615 (New remote packets): Add entry for QSetWorkingDir.
2616 * common/common-inferior.h (set_inferior_cwd): New prototype.
2617 * infcmd.c (set_inferior_cwd): Remove "static".
2618 (show_cwd_command): Expand text to include remote debugging.
2619 * remote.c: Add PACKET_QSetWorkingDir.
2620 (remote_protocol_features) <QSetWorkingDir>: New entry for
2621 PACKET_QSetWorkingDir.
2622 (extended_remote_set_inferior_cwd): New function.
2623 (extended_remote_create_inferior): Call
2624 "extended_remote_set_inferior_cwd".
2625 (_initialize_remote): Call "add_packet_config_cmd" for
2626 QSetWorkingDir.
2627
2628 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2629
2630 * NEWS (New commands): Mention "set/show cwd".
2631 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2632 "cd" command's help text.
2633 * common/common-inferior.h (get_inferior_cwd): New prototype.
2634 * infcmd.c (inferior_cwd_scratch): New global variable.
2635 (set_inferior_cwd): New function.
2636 (get_inferior_cwd): Likewise.
2637 (set_cwd_command): Likewise.
2638 (show_cwd_command): Likewise.
2639 (_initialize_infcmd): Add "set/show cwd" commands.
2640 * inferior.h (class inferior) <cwd>: New field.
2641 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2642 (fork_inferior): Change inferior's cwd before its execution.
2643 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2644 to CreateProcess.
2645
2646 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2647
2648 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2649 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2650 (COMMON_OBS): Add gdb_tilde_expand.o.
2651 * common/gdb_tilde_expand.c: New file.
2652 * common/gdb_tilde_expand.h: Likewise.
2653
2654 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2655
2656 * gdbarch.sh (objfile): Remove duplicate declaration.
2657 * gdbarch.h: Regenerate.
2658
2659 2017-10-03 Tom Tromey <tom@tromey.com>
2660
2661 * utils.c (internal_vproblem): Use string_vprintf.
2662
2663 2017-10-03 Tom Tromey <tom@tromey.com>
2664
2665 * printcmd.c (info_symbol_command): Use std::string.
2666
2667 2017-10-03 Tom Tromey <tom@tromey.com>
2668
2669 * top.c (gdb_safe_append_history): Use std::string.
2670
2671 2017-10-03 Tom Tromey <tom@tromey.com>
2672
2673 * event-top.c (stdin_event_handler): Update.
2674 * main.c (captured_main_1): Update.
2675 * top.h (make_delete_ui_cleanup): Remove.
2676 (struct ui): Add constructor and destructor.
2677 (new_ui, delete_ui): Remove.
2678 * top.c (make_delete_ui_cleanup): Remove.
2679 (new_ui_command): Use std::unique_ptr.
2680 (delete_ui_cleanup): Remove.
2681 (ui::ui): Rename from new_ui. Update.
2682 (free_ui): Remove.
2683 (ui::~ui): Rename from delete_ui. Update.
2684
2685 2017-10-03 Tom Tromey <tom@tromey.com>
2686
2687 * symfile.c (load_progress): Use gdb::byte_vector.
2688
2689 2017-10-03 Tom Tromey <tom@tromey.com>
2690
2691 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2692 declaration.
2693 * printcmd.c (x_command): Remove unused declaration.
2694 * symfile.c (symbol_file_command): Remove unused declaration.
2695
2696 2017-10-03 Tom Tromey <tom@tromey.com>
2697
2698 * utils.c (internal_vproblem): Use std::string.
2699 (defaulted_query): Likewise.
2700
2701 2017-10-03 Tom Tromey <tom@tromey.com>
2702
2703 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2704 * top.c (execute_command_to_string): Update.
2705 * utils.c (make_cleanup_restore_page_info): Remove.
2706 (do_restore_page_info_cleanup): Remove.
2707 (set_batch_flag_and_restore_page_info):
2708 New.
2709 (make_cleanup_restore_page_info): Remove.
2710 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2711 (~set_batch_flag_and_restore_page_info): New
2712 (make_cleanup_restore_uinteger): Remove.
2713 (make_cleanup_restore_integer): Remove.
2714 (struct restore_integer_closure): Remove.
2715 (restore_integer): Remove.
2716 * utils.h (struct set_batch_flag_and_restore_page_info): New
2717 class.
2718 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2719 (make_cleanup_restore_page_info): Remove.
2720 (make_cleanup_restore_uinteger) Remove.
2721 (make_cleanup_restore_integer) Remove.
2722
2723 2017-10-03 Tom Tromey <tom@tromey.com>
2724
2725 * record-full.h (record_full_gdb_operation_disable_set): Return
2726 scoped_restore_tmpl<int>.
2727 * infrun.c (adjust_pc_after_break): Update.
2728 (handle_signal_stop): Update.
2729 * record-full.c (record_full_gdb_operation_disable_set): Return
2730 scoped_restore_tmpl<int>.
2731 (record_full_wait_1, record_full_insert_breakpoint)
2732 (record_full_remove_breakpoint, record_full_save)
2733 (record_full_goto_insn): Update.
2734
2735 2017-10-02 Tom Tromey <tom@tromey.com>
2736
2737 PR rust/22236:
2738 * rust-lang.c (rust_val_print_str): New function.
2739 (val_print_struct): Call it.
2740 (rust_subscript): Preserve name of slice type.
2741
2742 2017-10-02 Tom Tromey <tom@tromey.com>
2743
2744 * rust-lang.c (rust_subscript): Handle slices in
2745 EVAL_AVOID_SIDE_EFFECTS case.
2746
2747 2017-10-02 Tom Tromey <tom@tromey.com>
2748
2749 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2750
2751 2017-10-02 Tom Tromey <tom@tromey.com>
2752
2753 * rust-lang.h (rust_slice_type): Add "extern".
2754
2755 2017-10-02 Tom Tromey <tom@tromey.com>
2756 Pedro Alves <palves@redhat.com>
2757
2758 * ada-lang.h (ada_exc_info::operator<): Make const.
2759 (ada_exc_info::operator==): Make const.
2760 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2761 Make const.
2762
2763 2017-09-29 Tom Tromey <tom@tromey.com>
2764
2765 * target.c (read_whatever_is_readable): Change type of "result".
2766 Update.
2767 (free_memory_read_result_vector): Remove.
2768 (read_memory_robust): Change return type. Update.
2769 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2770 bin2hex, std::string.
2771 * target.h (memory_read_result_s): Remove typedef.
2772 (free_memory_read_result_vector): Remove.
2773 (read_memory_robust): Return std::vector.
2774
2775 2017-09-29 Tom Tromey <tom@tromey.com>
2776
2777 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2778
2779 2017-09-29 Tom Tromey <tom@tromey.com>
2780
2781 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2782 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2783 operator< and operator==.
2784 (ada_exceptions_list): Return a std::vector.
2785 * ada-lang.c (ada_exc_info::operator<): Rename from
2786 compare_ada_exception_info.
2787 (ada_exc_info::operator==): New.
2788 (sort_remove_dups_ada_exceptions_list): Change type of
2789 "exceptions".
2790 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2791 (ada_add_global_exceptions): Likewise.
2792 (ada_exceptions_list_1): Return a std::vector.
2793 (ada_exceptions_list): Likewise.
2794
2795 2017-09-29 Tom Tromey <tom@tromey.com>
2796
2797 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2798 'std::set *'.
2799 (print_one_inferior): Update.
2800 (free_vector_of_ints): Remove.
2801 (list_available_thread_groups): Change "ids" to std::set.
2802 (mi_cmd_list_thread_groups): Update.
2803 (struct collect_cores_data) <core>: Now a std::set.
2804 (collect_cores): Update.
2805 (unique): Remove.
2806 (print_one_inferior): Update.
2807
2808 2017-09-29 Tom Tromey <tom@tromey.com>
2809
2810 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2811 (mi_execute_async_cli_command): Likewise.
2812 (mi_cmd_trace_frame_collected): Use field_fmt.
2813
2814 2017-09-29 Tom Tromey <tom@tromey.com>
2815
2816 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2817 gdb::byte_vector.
2818
2819 2017-09-29 Tom Tromey <tom@tromey.com>
2820
2821 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2822
2823 2017-09-29 Tom Tromey <tom@tromey.com>
2824
2825 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2826
2827 2017-09-29 Tom Tromey <tom@tromey.com>
2828
2829 * varobj.h (varobj_gen_name): Return std::string.
2830 * varobj.c (varobj_gen_name): Return std::string.
2831 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2832 (mi_cmd_var_delete): Don't copy "name".
2833
2834 2017-09-29 Tom Tromey <tom@tromey.com>
2835
2836 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2837 (mi_cmd_break_insert_1): Update.
2838
2839 2017-09-29 Tom Tromey <tom@tromey.com>
2840
2841 * target.h (make_scoped_defer_target_commit_resume): Update.
2842 * target.c (make_scoped_defer_target_commit_resume): Rename from
2843 make_cleanup_defer_target_commit_resume. Return a
2844 scoped_restore.
2845 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2846
2847 2017-09-29 Tom Tromey <tom@tromey.com>
2848
2849 * main.c (captured_main_1): Remove unused declaration.
2850 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2851
2852 2017-09-29 Tom Tromey <tom@tromey.com>
2853
2854 * symtab.c (search_symbols): Remove unused outer cleanup.
2855 (make_source_files_completion_list): Remove unused declaration.
2856
2857 2017-09-29 Tom Tromey <tom@tromey.com>
2858
2859 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2860
2861 2017-09-29 Tom Tromey <tom@tromey.com>
2862
2863 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2864 gdb::byte_vector.
2865
2866 2017-09-29 Tom Tromey <tom@tromey.com>
2867
2868 * complaints.c (vcomplaint): Use std::string.
2869
2870 2017-09-29 Tom Tromey <tom@tromey.com>
2871
2872 * tracepoint.c (trace_variable_command): Use std::string.
2873 (encode_actions_1): Remove unused declarations.
2874 (create_tsv_from_upload): Use std::string.
2875
2876 2017-09-29 Tom Tromey <tom@tromey.com>
2877
2878 * cp-support.c (gdb_demangle): Use std::string.
2879
2880 2017-09-29 Tom Tromey <tom@tromey.com>
2881
2882 * stack.c (parse_frame_specification): Use std::string
2883 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2884
2885 2017-09-29 Tom Tromey <tom@tromey.com>
2886
2887 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2888
2889 2017-09-29 Tom Tromey <tom@tromey.com>
2890
2891 * utils.c (vfprintf_maybe_filtered): Use std::string.
2892 (vfprintf_unfiltered): Likewise.
2893
2894 2017-09-29 Tom Tromey <tom@tromey.com>
2895
2896 * event-top.c (top_level_prompt): Return std::string.
2897 (display_gdb_prompt): Update.
2898
2899 2017-09-29 Tom Tromey <tom@tromey.com>
2900
2901 * unittests/common-utils-selftests.c (format): New function.
2902 (string_vprintf_tests): New function.
2903 (_initialize_common_utils_selftests): Register new tests.
2904 * common/common-utils.c (string_vprintf): New function.
2905 * common/common-utils.h (string_vprintf): Declare.
2906
2907 2017-09-29 Pedro Alves <palves@redhat.com>
2908
2909 * common/rsp-low.c (unpack_varlen_hex): Constify.
2910 * common/rsp-low.h (unpack_varlen_hex): Constify.
2911 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2912 Constify.
2913 * remote.c (remote_set_permissions, read_ptid)
2914 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2915 (remote_static_tracepoint_marker_at)
2916 (remote_static_tracepoint_markers_by_strid)
2917 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2918 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2919 (parse_tracepoint_definition, parse_tsv_definition)
2920 (parse_static_tracepoint_marker_definition): Constify.
2921 * tracepoint.h (parse_static_tracepoint_marker_definition)
2922 (parse_trace_status, parse_tracepoint_status)
2923 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2924
2925 2017-09-29 Pedro Alves <palves@redhat.com>
2926
2927 * remote.c (target_buf, target_buf_size): Delete.
2928 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2929 Use the connection's packet buffer instead.
2930 All callers adjusted.
2931 (_initialize_remote): Remove references to target_buf and
2932 target_buf_size.
2933
2934 2017-09-28 Pedro Alves <palves@redhat.com>
2935
2936 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2937 unittests/common-utils-selftests.c.
2938 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2939 (COMMON_OBS): Remove utils-selftests.o.
2940 * utils-selftests.c: Move to ...
2941 * unittests/common-utils-selftests.c: ... here and rename self
2942 test to "string_printf".
2943
2944 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2945
2946 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2947 having NULL cus or tus.
2948
2949 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2950
2951 * arm-tdep.c: (convert_from_extended): Remove.
2952 (convert_to_extended): Likewise.
2953 (arm_extract_return_value): Use convert_typed_floating.
2954 (arm_store_return_value): Likewise.
2955
2956 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2957 * sh-tdep.c: Do not include "floatformat.h".
2958 (sh_littlebyte_bigword_type): New function.
2959 (sh_register_convert_to_virtual): Use convert_typed_floating.
2960 (sh_register_convert_to_raw): Likewise.
2961 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2962 (sh64_littlebyte_bigword_type): New function.
2963 (sh64_extract_return_value): Use convert_typed_floating.
2964 (sh64_register_convert_to_virtual): Likewise.
2965 (sh64_register_convert_to_raw): Likewise.
2966
2967 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2968
2969 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2970 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2971
2972 * gdbtypes.h (union type_specific): Make field floatformat hold
2973 just a single struct floatformat, not an array.
2974 (floatformat_from_type): Move here.
2975 * gdbtypes.c (floatformat_from_type): Move here. Update to
2976 changed TYPE_FLOATFORMAT definition.
2977 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2978 (recursive_dump_type): Likewise.
2979 (init_float_type): Install correct floatformat for byte order.
2980 (arch_float_type): Likewise.
2981
2982 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2983
2984 * gdbtypes.c (init_type): Change incoming argument from
2985 length-in-bytes to length-in-bits. Assert length is a
2986 multiple of TARGET_CHAR_BITS.
2987 (arch_type, arch_flags_type): Likewise.
2988 (init_integer_type): Update call to init_type.
2989 (init_character_type): Likewise.
2990 (init_boolean_type): Likewise.
2991 (init_float_type): Likewise.
2992 (init_decfloat_type): Likewise.
2993 (init_complex_type): Likewise.
2994 (init_pointer_type): Likewise.
2995 (objfile_type): Likewise.
2996 (arch_integer_type): Update call to arch_type.
2997 (arch_character_type): Likewise.
2998 (arch_boolean_type): Likewise.
2999 (arch_float_type): Likewise.
3000 (arch_decfloat_type): Likewise.
3001 (arch_complex_type): Likewise.
3002 (arch_pointer_type): Likewise.
3003 (gdbtypes_post_init): Likewise.
3004
3005 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3006 (read_base_type): Likewise.
3007 * mdebugread.c (basic_type): Likewise.
3008 * stabsread.c (dbx_init_float_type): Likewise.
3009 (rs6000_builtin_type): Likewise.
3010 (read_range_type): Likewise. Also, fix call to init_integer_type
3011 with erroneous length argument.
3012
3013 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3014 * d-lang.c (build_d_types): Likewise.
3015 * f-lang.c (build_fortran_types): Likewise.
3016 * go-lang.c (build_go_types): Likewise.
3017 * opencl-lang.c (build_opencl_types): Likewise.
3018 * jit.c (finalize_symtab): Likewise.
3019 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3020 (build_std_type_info_type): Likewise.
3021 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3022 update call to arch_flags_type.
3023
3024 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3025 arch_type.
3026 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3027 * windows-tdep.c (windows_get_tlb_type): Likewise.
3028
3029 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3030 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3031 * m32c-tdep.c (make_types): Likewise.
3032 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3033 (rl78_psw_type): Update call to arch_flags_type.
3034 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3035 * rx-tdep.c (rx_psw_type): Likewise.
3036 (rx_fpsw_type): Likewise.
3037 * sparc-tdep.c (sparc_psr_type): Likewise.
3038 (sparc_fsr_type): Likewise.
3039 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3040 (sparc64_ccr_type): Likewise.
3041 (sparc64_fsr_type): Likewise.
3042 (sparc64_fprs_type): Likewise.
3043
3044 2017-09-27 Tom Tromey <tom@tromey.com>
3045
3046 * findcmd.c (find_command): Constify.
3047
3048 2017-09-27 Tom Tromey <tom@tromey.com>
3049
3050 * ada-tasks.c (task_command_1, task_command): Constify.
3051
3052 2017-09-27 Tom Tromey <tom@tromey.com>
3053
3054 * symtab.c (maintenance_print_symbol_cache)
3055 (maintenance_flush_symbol_cache)
3056 (maintenance_print_symbol_cache_statistics): Constify.
3057
3058 2017-09-27 Tom Tromey <tom@tromey.com>
3059
3060 * inferior.c (detach_inferior_command, kill_inferior_command)
3061 (inferior_command): Constify.
3062
3063 2017-09-27 Tom Tromey <tom@tromey.com>
3064
3065 * regcache.c (regcache_print, maintenance_print_registers)
3066 (maintenance_print_raw_registers)
3067 (maintenance_print_cooked_registers)
3068 (maintenance_print_register_groups)
3069 (maintenance_print_remote_registers): Constify.
3070
3071 2017-09-27 Tom Tromey <tom@tromey.com>
3072
3073 * printcmd.c (map_display_numbers, undisplay_command)
3074 (enable_disable_display_command, enable_display_command)
3075 (disable_display_command): Constify.
3076
3077 2017-09-27 Tom Tromey <tom@tromey.com>
3078
3079 * breakpoint.h (delete_command): Don't declare.
3080 * breakpoint.c (delete_command, enable_once_command)
3081 (enable_count_command, enable_delete_command, breakpoint_1)
3082 (maintenance_info_breakpoints, stopin_command, stopat_command)
3083 (delete_command, delete_trace_command, save_breakpoints)
3084 (save_breakpoints_command, save_tracepoints_command): Constify.
3085
3086 2017-09-27 Tom Tromey <tom@tromey.com>
3087
3088 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3089 (skip_ws, extract_identifier, macro_define_command)
3090 (macro_undef_command, macro_list_command): Constify.
3091
3092 2017-09-27 Tom Tromey <tom@tromey.com>
3093
3094 * infcmd.c (environment_info, set_environment_command)
3095 (unset_environment_command, path_info, info_proc_cmd_1)
3096 (info_proc_cmd_mappings, info_proc_cmd_stat)
3097 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3098 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3099
3100 2017-09-27 Tom Tromey <tom@tromey.com>
3101
3102 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3103 Constify.
3104
3105 2017-09-27 Tom Tromey <tom@tromey.com>
3106
3107 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3108
3109 2017-09-27 Tom Tromey <tom@tromey.com>
3110
3111 * demangle.c (demangle_command): Constify.
3112
3113 2017-09-27 Tom Tromey <tom@tromey.com>
3114
3115 * progspace.c (maintenance_info_program_spaces_command):
3116 Constify.
3117
3118 2017-09-27 Tom Tromey <tom@tromey.com>
3119
3120 * compile/compile.c (check_raw_argument, compile_file_command)
3121 (compile_code_command, compile_print_command): Constify.
3122
3123 2017-09-27 Tom Tromey <tom@tromey.com>
3124
3125 * reggroups.c (maintenance_print_reggroups): Constify.
3126
3127 2017-09-27 Tom Tromey <tom@tromey.com>
3128
3129 * dwarf2read.c (save_gdb_index_command): Constify.
3130
3131 2017-09-27 Tom Tromey <tom@tromey.com>
3132
3133 * stap-probe.c (info_probes_stap_command): Constify.
3134
3135 2017-09-27 Tom Tromey <tom@tromey.com>
3136
3137 * fork-child.c (unset_exec_wrapper_command): Constify.
3138
3139 2017-09-27 Tom Tromey <tom@tromey.com>
3140
3141 * btrace.c (get_uint, get_context_size, no_chunk)
3142 (maint_btrace_packet_history_cmd)
3143 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3144 (maint_info_btrace_cmd): Constify.
3145
3146 2017-09-27 Tom Tromey <tom@tromey.com>
3147
3148 * reverse.c (delete_bookmark_command): Constify.
3149
3150 2017-09-27 Tom Tromey <tom@tromey.com>
3151
3152 * remote.c (set_memory_packet_size)
3153 (set_memory_write_packet_size, show_memory_write_packet_size)
3154 (set_memory_read_packet_size, show_memory_read_packet_size)
3155 (compare_sections_command, packet_command, remote_put_command)
3156 (remote_get_command, remote_delete_command): Constify.
3157
3158 2017-09-27 Tom Tromey <tom@tromey.com>
3159
3160 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3161 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3162 (set_mipsfpu_auto_command): Constify.
3163
3164 2017-09-27 Tom Tromey <tom@tromey.com>
3165
3166 * cli/cli-cmds.h (cd_command): Constify.
3167 * cli/cli-cmds.c (cd_command): Constify.
3168
3169 2017-09-27 Tom Tromey <tom@tromey.com>
3170
3171 * thread.c (thread_name_command, thread_find_command): Constify.
3172
3173 2017-09-27 Tom Tromey <tom@tromey.com>
3174
3175 * probe.c (enable_probes_command, disable_probes_command):
3176 Constify.
3177
3178 2017-09-27 Tom Tromey <tom@tromey.com>
3179
3180 * symfile.c (symbol_file_command): Constify.
3181 * gdbcore.h (deprecated_file_changed_hook): Constify.
3182 * exec.c (deprecated_file_changed_hook, exec_file_command)
3183 (file_command): Constify.
3184 * defs.h (symbol_file_command): Constify.
3185
3186 2017-09-27 Tom Tromey <tom@tromey.com>
3187
3188 * remote-fileio.c (set_system_call_allowed)
3189 (show_system_call_allowed): Constify.
3190
3191 2017-09-27 Tom Tromey <tom@tromey.com>
3192
3193 * tracepoint.c (delete_trace_variable_command)
3194 (tfind_end_command, tfind_start_command, tfind_pc_command)
3195 (tfind_tracepoint_command, tfind_line_command)
3196 (tfind_range_command, tfind_outside_command): Constify.
3197
3198 2017-09-27 Tom Tromey <tom@tromey.com>
3199
3200 * ax-gdb.c (maint_agent_printf_command, agent_command)
3201 (agent_eval_command): Constify.
3202
3203 2017-09-27 Tom Tromey <tom@tromey.com>
3204
3205 * tracepoint.c (info_scope_command): Constify.
3206 * python/python.c (gdbpy_decode_line): Constify.
3207 * python/py-breakpoint.c (bppy_init): Constify.
3208 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3209 * location.h: (new_linespec_location)
3210 (string_to_event_location_basic, string_to_event_location):
3211 Constify.
3212 * location.c (new_linespec_location)
3213 (string_to_event_location_basic, string_to_event_location):
3214 Constify.
3215 * linespec.h (decode_line_with_current_source)
3216 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3217 * linespec.c (linespec_lex_to_end)
3218 (decode_line_with_current_source)
3219 (decode_line_with_last_displayed): Constify.
3220 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3221 Constify.
3222 * cli/cli-cmds.c (edit_command, list_command): Constify.
3223 * breakpoint.h (until_break_command, watch_command_wrapper)
3224 (awatch_command_wrapper, rwatch_command_wrapper)
3225 (init_ada_exception_breakpoint): Constify.
3226 * breakpoint.c (break_command_1, dprintf_command)
3227 (break_range_command, watch_command_wrapper)
3228 (rwatch_command_wrapper, awatch_command_wrapper)
3229 (until_break_command, init_ada_exception_breakpoint)
3230 (strace_marker_create_sals_from_location, trace_command)
3231 (ftrace_command, strace_command, struct tracepoint): Constify.
3232 * ax-gdb.c (agent_command_1): Constify.
3233 * ada-lang.c (ada_exception_sal): Constify.
3234
3235 2017-09-27 Tom Tromey <tom@tromey.com>
3236
3237 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3238 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3239 (get_context_size, no_chunk, get_insn_history_modifiers)
3240 (cmd_record_insn_history, get_call_history_modifiers)
3241 (cmd_record_call_history): Constify.
3242
3243 2017-09-27 Tom Tromey <tom@tromey.com>
3244
3245 * source.c (show_substitute_path_command)
3246 (unset_substitute_path_command, set_substitute_path_command):
3247 Constify.
3248
3249 2017-09-27 Tom Tromey <tom@tromey.com>
3250
3251 * typeprint.c (maintenance_print_type): Constify.
3252 * maint.c (maintenance_dump_me, maintenance_demangle)
3253 (maintenance_time_display, maintenance_info_sections)
3254 (maintenance_print_statistics, maintenance_deprecate)
3255 (maintenance_undeprecate): Constify.
3256 (maintenance_do_deprecate): Constify. Use std::string.
3257 (maintenance_selftest): Constify.
3258 * gdbtypes.h (maintenance_print_type): Constify.
3259
3260 2017-09-27 Tom Tromey <tom@tromey.com>
3261
3262 * hppa-tdep.c (unwind_command): Constify.
3263
3264 2017-09-27 Tom Tromey <tom@tromey.com>
3265
3266 * target-descriptions.c (unset_tdesc_filename_cmd)
3267 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3268 Constify.
3269
3270 2017-09-27 Tom Tromey <tom@tromey.com>
3271
3272 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3273
3274 2017-09-27 Tom Tromey <tom@tromey.com>
3275
3276 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3277
3278 2017-09-27 Tom Tromey <tom@tromey.com>
3279
3280 * tui/tui-regs.c (tui_reg_command): Constify.
3281
3282 2017-09-27 Tom Tromey <tom@tromey.com>
3283
3284 * skip.c (skip_file_command, skip_function_command)
3285 (skip_enable_command, skip_disable_command, skip_delete_command):
3286 Constify.
3287
3288 2017-09-27 Tom Tromey <tom@tromey.com>
3289
3290 * record-btrace.c (cmd_record_btrace_bts_start)
3291 (cmd_record_btrace_pt_start): Constify.
3292
3293 2017-09-27 Tom Tromey <tom@tromey.com>
3294
3295 * symmisc.c (maintenance_print_symbols)
3296 (maintenance_print_msymbols, maintenance_print_objfiles)
3297 (maintenance_info_symtabs, maintenance_check_symtabs)
3298 (maintenance_expand_symtabs, maintenance_info_line_tables):
3299 Constify.
3300
3301 2017-09-27 Tom Tromey <tom@tromey.com>
3302
3303 * top.c (new_ui_command): Constify.
3304
3305 2017-09-27 Tom Tromey <tom@tromey.com>
3306
3307 * symfile.c (add_symbol_file_command)
3308 (remove_symbol_file_command, list_overlays_command)
3309 (map_overlay_command, unmap_overlay_command)
3310 (overlay_auto_command, overlay_manual_command)
3311 (overlay_off_command, overlay_load_command): Constify.
3312
3313 2017-09-27 Tom Tromey <tom@tromey.com>
3314
3315 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3316 (info_spu_mailbox_command, info_spu_dma_command)
3317 (info_spu_proxydma_command): Constify.
3318
3319 2017-09-27 Tom Tromey <tom@tromey.com>
3320
3321 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3322
3323 2017-09-27 Tom Tromey <tom@tromey.com>
3324
3325 * cli/cli-script.c (user_defined_command): Constify.
3326
3327 2017-09-27 Tom Tromey <tom@tromey.com>
3328
3329 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3330 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3331 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3332 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3333 (dump_binary_value, append_binary_memory, append_binary_value):
3334 Constify.
3335 (struct dump_context) <func>: Constify.
3336 (add_dump_command): Update.
3337
3338 2017-09-27 Tom Tromey <tom@tromey.com>
3339
3340 * cli/cli-cmds.c (show_version, show_configuration)
3341 (source_command, show_user): Constify.
3342
3343 2017-09-27 Tom Tromey <tom@tromey.com>
3344
3345 * target.c (maintenance_print_target_stack): Constify.
3346
3347 2017-09-27 Tom Tromey <tom@tromey.com>
3348
3349 * interps.c (interpreter_exec_cmd): Constify.
3350
3351 2017-09-27 Tom Tromey <tom@tromey.com>
3352
3353 * record-full.c (cmd_record_full_restore): Constify.
3354
3355 2017-09-27 Tom Tromey <tom@tromey.com>
3356
3357 * memattr.c (enable_mem_command, disable_mem_command)
3358 (delete_mem_command): Constify.
3359
3360 2017-09-27 Tom Tromey <tom@tromey.com>
3361
3362 * value.c (show_convenience): Constify.
3363
3364 2017-09-27 Tom Tromey <tom@tromey.com>
3365
3366 * gdbcore.h (core_file_command): Update.
3367 * corefile.c (core_file_command): Constify.
3368
3369 2017-09-27 Tom Tromey <tom@tromey.com>
3370
3371 * user-regs.c (maintenance_print_user_registers): Constify.
3372
3373 2017-09-27 Tom Tromey <tom@tromey.com>
3374
3375 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3376
3377 2017-09-27 Tom Tromey <tom@tromey.com>
3378
3379 * cp-support.c (first_component_command): Constify.
3380
3381 2017-09-27 Tom Tromey <tom@tromey.com>
3382
3383 * psymtab.c (maintenance_print_psymbols)
3384 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3385 Constify.
3386
3387 2017-09-27 Tom Tromey <tom@tromey.com>
3388
3389 * windows-tdep.c (display_tib): Constify.
3390
3391 2017-09-27 Tom Tromey <tom@tromey.com>
3392
3393 * linux-fork.c (delete_checkpoint_command)
3394 (detach_checkpoint_command): Constify.
3395
3396 2017-09-27 Tom Tromey <tom@tromey.com>
3397
3398 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3399
3400 2017-09-27 Tom Tromey <tom@tromey.com>
3401
3402 * arc-tdep.c (dump_arc_instruction_command): Constify.
3403
3404 2017-09-27 Tom Tromey <tom@tromey.com>
3405
3406 * valprint.c (set_radix, show_radix): Constify.
3407
3408 2017-09-27 Tom Tromey <tom@tromey.com>
3409
3410 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3411
3412 2017-09-27 Tom Tromey <tom@tromey.com>
3413
3414 * command.h (not_just_help_class_command): Update.
3415 * cli/cli-decode.h (not_just_help_class_command): Update.
3416 * cli/cli-decode.c (not_just_help_class_command): Constify.
3417
3418 2017-09-27 Tom Tromey <tom@tromey.com>
3419
3420 * gdb_bfd.c (maintenance_info_bfds): Constify.
3421
3422 2017-09-27 Tom Tromey <tom@tromey.com>
3423
3424 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3425 overloads.
3426 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3427 (do_const_cfunc): New function.
3428 (cmd_cfunc_eq): New overload.
3429 (cli_user_command_p): Check do_const_cfunc.
3430 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3431 const_cfunc.
3432 * command.h (add_cmd): Add const overload and no-function
3433 overload.
3434 (set_cmd_cfunc): Add const overload.
3435 (cmd_const_cfunc_ftype): Declare.
3436 (cmd_cfunc_eq): Add const overload.
3437 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3438 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3439 overload.
3440
3441 2017-09-27 Tom Tromey <tom@tromey.com>
3442
3443 * macroexp.c (get_next_token_for_substitution): New function.
3444 (substitute_args): Call it. Check for __VA_OPT__.
3445
3446 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3447 Pedro Alves <palves@redhat.com>
3448
3449 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3450 producer_is_icc_lt_14.
3451 (producer_is_icc_lt_14): New function.
3452 (check_producer): Add code for checking version of ICC.
3453 (producer_is_icc): Move to producer.c.
3454 (read_structure_type): Restrict ICC workaround to ICC<14.
3455 * producer.c: Include selftest.h.
3456 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3457 New functions.
3458 * producer.h (producer_is_icc): New declaration.
3459
3460 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3461
3462 * Makefile.in (SFILES): Add producer.c.
3463 (COMMON_OBS): Add producer.o
3464 * amd64-tdep.c (producer.h): Add new include.
3465 * dwarf2read.c (producer.h): Add new include.
3466 * producer.c: New file.
3467 * producer.h: New file.
3468 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3469 producer.c.
3470 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3471 producer.h.
3472
3473 2017-09-26 Matthias Klose <doko@ubuntu.com>
3474
3475 * configure.ac: Search ncursesw before ncurses.
3476 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3477 * gdb_curses.h: Include <ncursesw/ncurses.h>
3478 * config.in, configure: Regenerate.
3479
3480 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3481
3482 PR gdb/22185
3483 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3484 obsolete.
3485 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3486 Remove i386sol2 support.
3487 * configure.nat <i386sol2>: Remove.
3488 <sol2-64>: Fold into ...
3489 <sol2>: ... this.
3490 Move common settings to default section.
3491 Add sol-thread.o.
3492 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3493 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3494 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3495 <i[34567]86-*-solaris*>: Remove.
3496 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3497
3498 * configure.ac: Remove wctype in libw check.
3499 (_MSE_INT_H): Don't define on Solaris 7-9.
3500 <solaris*>: Remove libthread_db.so.1 check.
3501 * configure: Regenerate.
3502 * config.in: Regenerate.
3503
3504 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3505 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3506 (gdb_ps_size_t): Remove.
3507 Use base types in users.
3508 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3509
3510 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3511
3512 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3513
3514 PR build/22206
3515 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3516 (adi_is_addr_mapped): Likewise.
3517 (PSR_ICC): Don't redefine.
3518 (PSR_IMPL): Likewise.
3519
3520 2017-09-25 Tom Tromey <tom@tromey.com>
3521
3522 * regcache.c (regcache::dump): Use string_printf.
3523
3524 2017-09-25 Tom Tromey <tom@tromey.com>
3525
3526 * regcache.c (class regcache_invalidator): New.
3527 (struct register_to_invalidate): Remove.
3528 (make_cleanup_regcache_invalidate): Remove.
3529 (regcache::raw_write): Use regcache_invalidator.
3530
3531 2017-09-25 Tom Tromey <tom@tromey.com>
3532
3533 * spu-tdep.c (spu2ppu_sniffer): Update.
3534 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3535 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3536 Remove.
3537 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3538 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3539 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3540 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3541 (frame_pop): Update.
3542
3543 2017-09-25 Tom Tromey <tom@tromey.com>
3544
3545 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3546 * regcache.h (regcache_xfree): Don't declare.
3547 * regcache.c (regcache_xfree): Remove.
3548 (do_regcache_xfree): Use delete.
3549 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3550 * linux-fork.c (free_fork): Use delete.
3551 (fork_save_infrun_state): Likewise.
3552 * jit.c (jit_dealloc_cache): Use delete.
3553 * infrun.c (discard_infcall_suspend_state): Use delete.
3554
3555 2017-09-25 Tom Tromey <tom@tromey.com>
3556
3557 * regcache.h (regcache_xmalloc): Don't declare.
3558 (regcache_raw_set_cached_value): Update comment.
3559 * regcache.c (regcache_xmalloc): Remove.
3560 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3561 * jit.c (jit_frame_sniffer): Use new.
3562 * frame.c (frame_save_as_regcache): Use new.
3563
3564 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3565
3566 * NEWS: Advertise support for guarded-storage registers on IBM z.
3567
3568 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3569
3570 * s390-linux-nat.c (have_regset_gs): New static variable.
3571 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3572 control block and guarded-storage broadcast control regsets.
3573 (s390_read_description): Detect whether the target has
3574 guarded-storage support, return appropriate tdesc.
3575 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3576 (features/s390x-gs-linux64.c): Likewise.
3577 (struct gdbarch_tdep) <have_gs>: New field.
3578 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3579 (s390_gsbc_regset): New variables.
3580 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3581 and s390_gsbc_regset, if applicable.
3582 (s390_core_read_description): Check whether core file was from a
3583 target with guarded-storage support; include appropriate regsets.
3584 (s390_gdbarch_init): Add registers for guarded-storage support.
3585 (_initialize_s390_tdep): Initialize new target descriptions that
3586 include registers for guarded-storage support.
3587 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3588 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3589 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3590 (S390_NUM_REGS): Adjust macro definition.
3591 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3592 (tdesc_s390x_gs_linux64): New declarations.
3593
3594 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3595
3596 * features/s390-gs-linux64.xml: New file.
3597 * features/s390-gs.xml: New file.
3598 * features/s390-gsbc.xml: New file.
3599 * features/s390x-gs-linux64.xml: New file.
3600 * features/Makefile (WHICH): Add s390-gs-linux64 and
3601 s390x-gs-linux64.
3602 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3603 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3604 * features/s390-gs-linux64.c: New generated file.
3605 * features/s390x-gs-linux64.c: New file.
3606 * regformats/s390-gs-linux64.dat: New file.
3607 * regformats/s390x-gs-linux64.dat: New file.
3608
3609 2017-09-23 Tom Tromey <tom@tromey.com>
3610
3611 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3612
3613 2017-09-22 Tom Tromey <tom@tromey.com>
3614
3615 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3616 type to scoped_restore_tmpl.
3617 <scoped_input_handler>: Initialize m_quit_handler directly.
3618
3619 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3620
3621 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3622 (cd_command): Likewise. Free "current_directory" before
3623 assigning to it.
3624 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3625 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3626 * top.c (gdb_dirbuf): Remove global declaration.
3627 * top.h (gdb_dirbuf): Likewise.
3628
3629 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3630
3631 * gnulib/aclocal.m4: Regenerate.
3632 * gnulib/config.in: Regenerate.
3633 * gnulib/configure: Regenerate.
3634 * gnulib/import/Makefile.am: Regenerate.
3635 * gnulib/import/Makefile.in: Regenerate.
3636 * gnulib/import/assure.h: New file.
3637 * gnulib/import/at-func.c: Likewise
3638 * gnulib/import/chdir-long.c: New file.
3639 * gnulib/import/chdir-long.h: New file.
3640 * gnulib/import/cloexec.c: New file.
3641 * gnulib/import/cloexec.h: New file.
3642 * gnulib/import/close.c: New file.
3643 * gnulib/import/closedir.c: New file.
3644 * gnulib/import/dirent-private.h: New file.
3645 * gnulib/import/dup-safer.c: New file.
3646 * gnulib/import/dup.c: New file.
3647 * gnulib/import/dup2.c: New file.
3648 * gnulib/import/error.c: New file.
3649 * gnulib/import/error.h: New file.
3650 * gnulib/import/exitfail.c: New file.
3651 * gnulib/import/exitfail.h: New file.
3652 * gnulib/import/fchdir.c: New file.
3653 * gnulib/import/fcntl.c: New file.
3654 * gnulib/import/fcntl.in.h: New file.
3655 * gnulib/import/fd-hook.c: New file.
3656 * gnulib/import/fd-hook.h: New file.
3657 * gnulib/import/fd-safer.c: New file.
3658 * gnulib/import/fdopendir.c: New file.
3659 * gnulib/import/filename.h: New file.
3660 * gnulib/import/filenamecat-lgpl.c: New file.
3661 * gnulib/import/filenamecat.h: New file.
3662 * gnulib/import/fstat.c: New file.
3663 * gnulib/import/fstatat.c: New file.
3664 * gnulib/import/getcwd-lgpl.c: New file.
3665 * gnulib/import/getcwd.c: New file.
3666 * gnulib/import/getdtablesize.c: New file.
3667 * gnulib/import/getlogin_r.c: New file.
3668 * gnulib/import/getprogname.c: New file.
3669 * gnulib/import/getprogname.h: New file.
3670 * gnulib/import/gettext.h: New file.
3671 * gnulib/import/glob-libc.h: New file.
3672 * gnulib/import/glob.c: New file.
3673 * gnulib/import/glob.in.h: New file.
3674 * gnulib/import/intprops.h: New file.
3675 * gnulib/import/m4/chdir-long.m4: New file.
3676 * gnulib/import/m4/close.m4: New file.
3677 * gnulib/import/m4/closedir.m4: New file.
3678 * gnulib/import/m4/d-ino.m4: New file.
3679 * gnulib/import/m4/d-type.m4: New file.
3680 * gnulib/import/m4/dup.m4: New file.
3681 * gnulib/import/m4/dup2.m4: New file.
3682 * gnulib/import/m4/error.m4: New file.
3683 * gnulib/import/m4/fchdir.m4: New file.
3684 * gnulib/import/m4/fcntl.m4: New file.
3685 * gnulib/import/m4/fcntl_h.m4: New file.
3686 * gnulib/import/m4/fdopendir.m4: New file.
3687 * gnulib/import/m4/filenamecat.m4: New file.
3688 * gnulib/import/m4/fstat.m4: New file.
3689 * gnulib/import/m4/fstatat.m4: New file.
3690 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3691 * gnulib/import/m4/getcwd-path-max.m4: New file.
3692 * gnulib/import/m4/getcwd.m4: New file.
3693 * gnulib/import/m4/getdtablesize.m4: New file.
3694 * gnulib/import/m4/getlogin_r.m4: New file.
3695 * gnulib/import/m4/getprogname.m4: New file.
3696 * gnulib/import/m4/glob.m4: New file.
3697 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3698 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3699 * gnulib/import/m4/mempcpy.m4: New file.
3700 * gnulib/import/m4/memrchr.m4: New file.
3701 * gnulib/import/m4/mode_t.m4: New file.
3702 * gnulib/import/m4/msvc-inval.m4: New file.
3703 * gnulib/import/m4/msvc-nothrow.m4: New file.
3704 * gnulib/import/m4/open.m4: New file.
3705 * gnulib/import/m4/openat.m4: New file.
3706 * gnulib/import/m4/opendir.m4: New file.
3707 * gnulib/import/m4/readdir.m4: New file.
3708 * gnulib/import/m4/realloc.m4: New file.
3709 * gnulib/import/m4/rewinddir.m4: New file.
3710 * gnulib/import/m4/save-cwd.m4: New file.
3711 * gnulib/import/m4/strdup.m4: New file.
3712 * gnulib/import/m4/strerror.m4: New file.
3713 * gnulib/import/m4/unistd-safer.m4: New file.
3714 * gnulib/import/mempcpy.c: New file.
3715 * gnulib/import/memrchr.c: New file.
3716 * gnulib/import/msvc-inval.c: New file.
3717 * gnulib/import/msvc-inval.h: New file.
3718 * gnulib/import/msvc-nothrow.c: New file.
3719 * gnulib/import/msvc-nothrow.h: New file.
3720 * gnulib/import/open.c: New file.
3721 * gnulib/import/openat-die.c: New file.
3722 * gnulib/import/openat-priv.h: New file.
3723 * gnulib/import/openat-proc.c: New file.
3724 * gnulib/import/openat.c: New file.
3725 * gnulib/import/openat.h: New file.
3726 * gnulib/import/opendir.c: New file.
3727 * gnulib/import/pipe-safer.c: New file.
3728 * gnulib/import/readdir.c: New file.
3729 * gnulib/import/realloc.c: New file.
3730 * gnulib/import/rewinddir.c: New file.
3731 * gnulib/import/save-cwd.c: New file.
3732 * gnulib/import/save-cwd.h: New file.
3733 * gnulib/import/strdup.c: New file.
3734 * gnulib/import/strerror-override.c: New file.
3735 * gnulib/import/strerror-override.h: New file.
3736 * gnulib/import/strerror.c: New file.
3737 * gnulib/import/unistd--.h: New file.
3738 * gnulib/import/unistd-safer.h: New file.
3739 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3740 "getcwd" and "glob".
3741 * ser-tcp.c: Undefine "close" before redefining it.
3742
3743 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3744
3745 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3746 get rid of res_val.
3747
3748 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3749
3750 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3751 <sol2,sparc>: Likewise.
3752 <sol2-64,i386>: Likewise.
3753
3754 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3755 -Wdeprecated-declarations on *-*-solaris*.
3756 * configure: Regenerate.
3757
3758 * procfs.c: Include "nat/inferior.h".
3759 (procfs_info_proc): Fix typo.
3760
3761 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3762
3763 * remote.c (vector): Include.
3764 (struct private_thread_info): Add field, thread_handle.
3765 (free_private_thread_info): Deallocate storage associated with
3766 thread handle.
3767 (get_private_info_thread): Initialize `thread_handle' field.
3768 (struct thread_item): Add field, thread_handle.
3769 (clear_threads_listing_context): Deallocate storage associated
3770 with thread handle.
3771 (start_thread): Add support for "handle" attribute.
3772 (thread_attributes): Add "handle".
3773 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3774 field.
3775 (remote_update_thread_list): Update thread_handle.
3776 (remote_thread_handle_to_thread_info): New function.
3777 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3778
3779 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3780
3781 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3782 function.
3783 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3784 * python/python-internal.h (thread_object_type): Declare.
3785
3786 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3787
3788 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3789 (target_thread_handle_to_thread_info): Declare.
3790 * target.c (target_thread_handle_to_thread_info): New function.
3791 * target-delegates.c: Regenerate.
3792 * gdbthread.h (find_thread_by_handle): Declare.
3793 * thread.c (find_thread_by_handle): New function.
3794 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3795 function.
3796 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3797
3798 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3799
3800 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3801
3802 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3803
3804 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3805
3806 2017-09-21 Yao Qi <yao.qi@linaro.org>
3807
3808 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3809 to gdb_target_obs.
3810
3811 2017-09-20 Tom Tromey <tom@tromey.com>
3812
3813 * breakpoint.c (struct counted_command_line): Remove.
3814 (breakpoint_commands): Update.
3815 (alloc_counted_command_line, incref_counted_command_line)
3816 (decref_counted_command_line, do_cleanup_counted_command_line)
3817 (make_cleanup_decref_counted_command_line): Remove.
3818 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3819 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3820 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3821 (save_breakpoints): Update.
3822 * breakpoint.h (counted_command_line): Now a typedef to
3823 shared_ptr.
3824 (struct breakpoint) <commands>: Now a counted_command_line.
3825 (struct bpstats) <command>: Likewise.
3826
3827 2017-09-20 Tom Tromey <tom@tromey.com>
3828
3829 * breakpoint.c (struct commands_info, do_map_commands_command):
3830 Remove.
3831 (commands_command_1): Update.
3832 (iterate_over_related_breakpoints): Take a function_view.
3833 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3834 (delete_command): Update.
3835 (map_breakpoint_numbers): Take a function_view.
3836 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3837 (disable_command): Update.
3838 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3839 (enable_command): Update.
3840 (struct disp_data, do_enable_breakpoint_disp)
3841 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3842 (do_map_enable_delete_breakpoint): Remove.
3843 (enable_once_command, enable_count_command, enable_delete_command)
3844 (delete_trace_variable_command): Update.
3845
3846 2017-09-20 Tom Tromey <tom@tromey.com>
3847
3848 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3849 (bpstat_clear): Use delete.
3850 (bpstats): New constructors.
3851 (bpstat_copy, bpstat_stop_status): Use new.
3852 (dprintf_after_condition_true): Update.
3853 * breakpoint.h (bpstats::bpstats): Add constructors.
3854 (bpstats::~bpstats): Add destructor.
3855
3856 2017-09-20 Pedro Alves <palves@redhat.com>
3857
3858 * eval.c (make_params): Delete, refactored as ...
3859 (class fake_method): ... this new type's ctor.
3860 (fake_method::~fake_method): New.
3861 (evaluate_subexp_standard): Use 'fake_method'.
3862
3863 2017-09-20 Tom Tromey <tom@tromey.com>
3864
3865 * windows-nat.c (get_windows_debug_event, windows_wait)
3866 (do_initial_windows_stuff, windows_attach): Update.
3867 * utils.c (vwarning, internal_vproblem): Update.
3868 (ui_unregister_input_event_handler_cleanup)
3869 (prepare_to_handle_input): Remove.
3870 (class scoped_input_handler): New.
3871 (defaulted_query, prompt_for_continue): Update.
3872 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3873 Update.
3874 * top.c (undo_terminal_modifications_before_exit): Update.
3875 * target/target.h (target_terminal_init, target_terminal_inferior)
3876 (target_terminal_ours): Don't declare.
3877 (class target_terminal): New.
3878 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3879 (target_terminal_ours_for_output)
3880 (make_cleanup_restore_target_terminal): Don't declare.
3881 (target_terminal_info): Remove.
3882 * target.c (enum terminal_state, terminal_state): Remove.
3883 (target_terminal::terminal_state): Define.
3884 (target_terminal::init): Rename from target_terminal_init.
3885 (target_terminal::inferior): Rename from
3886 target_terminal_inferior.
3887 (target_terminal::ours): Rename from target_terminal_ours.
3888 (target_terminal::ours_for_output): Rename from
3889 target_terminal_ours_for_output.
3890 (target_terminal::info): New method.
3891 (cleanup_restore_target_terminal)
3892 (make_cleanup_restore_target_terminal): Remove.
3893 * solib.c (handle_solib_event): Update.
3894 * remote.c (remote_serial_quit_handler): Update.
3895 (remote_terminal_inferior, remote_wait_as): Update.
3896 * record-full.c (record_full_wait_1): Update.
3897 * nto-procfs.c (procfs_create_inferior): Update.
3898 * nat/fork-inferior.c (startup_inferior): Update.
3899 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3900 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3901 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3902 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3903 (mi_breakpoint_created, mi_breakpoint_deleted)
3904 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3905 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3906 (mi_user_selected_context_changed, report_initial_inferior):
3907 Update.
3908 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3909 (linux_nat_terminal_inferior): Update.
3910 * infrun.c (follow_fork_inferior)
3911 (handle_vfork_child_exec_or_exit, do_target_resume)
3912 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3913 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3914 Update.
3915 * inflow.c (child_terminal_init, info_terminal_command): Update.
3916 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3917 (attach_command): Update.
3918 * infcall.c (call_thread_fsm_should_stop): Update.
3919 * gnu-nat.c (gnu_attach): Update.
3920 * extension.c (struct active_ext_lang_state)
3921 (restore_active_ext_lang): Update.
3922 * exceptions.c (print_flush): Update.
3923 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3924 (struct quit_handler_cleanup_data, restore_quit_handler)
3925 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3926 Remove.
3927 * cp-support.c (gdb_demangle): Update.
3928 * breakpoint.c (update_inserted_breakpoint_locations)
3929 (insert_breakpoint_locations, handle_jit_event)
3930 (disable_breakpoints_in_unloaded_shlib): Update.
3931 * annotate.c (annotate_breakpoints_invalid)
3932 (annotate_frames_invalid): Update.
3933
3934 2017-09-20 Tom Tromey <tom@tromey.com>
3935
3936 * main.c (catch_command_errors): Rename from
3937 catch_command_errors_const.
3938 (captured_main_1): Update.
3939
3940 2017-09-20 Pedro Alves <palves@redhat.com>
3941
3942 * cli/cli-cmds.c (list_command): Use print_sal_location.
3943 (print_sal_location): New function.
3944 (ambiguous_line_spec): Use print_sal_location.
3945 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3946 * symtab.c (find_function_start_sal): Likewise.
3947 * symtab.h (symtab_and_line::symbol): New field.
3948
3949 2017-09-20 Pedro Alves <palves@redhat.com>
3950
3951 * linespec.c (minsym_found): Handle non-text minsyms.
3952 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3953
3954 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3955
3956 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3957 backslash.
3958
3959 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3960
3961 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3962 vmovups instead vmovaps.
3963 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3964
3965 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3966
3967 * NEWS (Changes since GDB 8.0): Add starti.
3968 * infcmd.c (enum run_break): New.
3969 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3970 case.
3971 (run_command): Use enum run_how.
3972 (start_command): Likewise.
3973 (starti_command): New function.
3974 (RUN_ARGS_HELP): New macro.
3975 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3976 commands. Add starti command.
3977
3978 2017-09-19 Yao Qi <yao.qi@linaro.org>
3979
3980 * Makefile.in (monitor.o): Remove the rule.
3981
3982 2017-09-19 Yao Qi <yao.qi@linaro.org>
3983
3984 * annotate.h (struct annotate_arg_emitter): Use
3985 DISABLE_COPY_AND_ASSIGN.
3986 * common/refcounted-object.h (refcounted_object): Likewise.
3987 * completer.h (struct completion_result): Likewise.
3988 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3989 * filename-seen-cache.h (filename_seen_cache): Likewise.
3990 * gdbcore.h (thread_section_name): Likewise.
3991 * gdb_regex.h (compiled_regex): Likewise.
3992 * gdbthread.h (scoped_restore_current_thread): Likewise.
3993 * inferior.h (scoped_restore_current_inferior): Likewise.
3994 * jit.c (jit_reader): Likewise.
3995 * linespec.h (struct linespec_result): Likewise.
3996 * mi/mi-parse.h (struct mi_parse): Likewise.
3997 * nat/fork-inferior.c (execv_argv): Likewise.
3998 * progspace.h (scoped_restore_current_program_space): Likewise.
3999 * python/python-internal.h (class gdbpy_enter): Likewise.
4000 * regcache.h (regcache): Likewise.
4001 * target-descriptions.c (struct tdesc_reg): Likewise.
4002 (struct tdesc_type): Likewise.
4003 (struct tdesc_feature): Likewise.
4004 * ui-out.h (ui_out_emit_type): Likewise.
4005
4006 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4007
4008 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4009 label abort_expression.
4010
4011 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4012
4013 * common/buffer.c (buffer_xml_printf): Adjust.
4014 * common/xml-utils.c (xml_escape_text): Change return type to
4015 std::string, update code accordingly.
4016 * common/xml-utils.h (xml_escape_text): Change return type to
4017 std::string.
4018 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4019 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4020 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4021 Adjust.
4022
4023 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4024
4025 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4026 (SUBDIR_UNITTESTS_OBS): Add new object file.
4027 * unittests/xml-utils-selftests.c: New file.
4028
4029 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4030
4031 * common/selftest.h (selftest): New struct/interface.
4032 (register_test): Add name parameter, add new overload.
4033 (run_tests): Add filter parameter.
4034 (for_each_selftest_ftype): New typedef.
4035 (for_each_selftest): New declaration.
4036 * common/selftest.c (tests): Change type to
4037 map<string, unique_ptr<selftest>>.
4038 (simple_selftest): New struct.
4039 (register_test): New function.
4040 (register_test): Add name parameter and use it.
4041 (run_tests): Add filter parameter and use it. Add prints.
4042 Adjust to vector -> map change.
4043 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4044 registering selftests.
4045 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4046 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4047 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4048 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4049 * findvar.c (_initialize_findvar): Likewise.
4050 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4051 * maint.c (maintenance_selftest): Update call to run_tests.
4052 (maintenance_info_selftests): New function.
4053 (_initialize_maint_cmds): Register "maintenance info selftests"
4054 command. Update "maintenance selftest" doc.
4055 * regcache.c (_initialize_regcache): Add names when registering
4056 selftests.
4057 * rust-exp.y (_initialize_rust_exp): Likewise.
4058 * selftest-arch.c (gdbarch_selftest): New struct.
4059 (gdbarch_tests): Remove.
4060 (register_test_foreach_arch): Add name parameter. Call
4061 register_test.
4062 (tests_with_arch): Remove, move most content to
4063 gdbarch_selftest::operator().
4064 (_initialize_selftests_foreach_arch): Remove.
4065 * selftest-arch.h (register_test_foreach_arch): Add name
4066 parameter.
4067 (run_tests_with_arch): New declaration.
4068 * utils-selftests.c (_initialize_utils_selftests): Add names
4069 when registering selftests.
4070 * utils.c (_initialize_utils): Likewise.
4071 * unittests/array-view-selftests.c
4072 (_initialize_array_view_selftests): Likewise.
4073 * unittests/environ-selftests.c (_initialize_environ_selftests):
4074 Likewise.
4075 * unittests/function-view-selftests.c
4076 (_initialize_function_view_selftests): Likewise.
4077 * unittests/offset-type-selftests.c
4078 (_initialize_offset_type_selftests): Likewise.
4079 * unittests/optional-selftests.c
4080 (_initialize_optional_selftests): Likewise.
4081 * unittests/scoped_restore-selftests.c
4082 (_initialize_scoped_restore_selftests): Likewise.
4083 * NEWS: Document "maintenance selftest" and "maint info
4084 selftests".
4085
4086 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4087
4088 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4089 scoped_restore.
4090
4091 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * mi/mi-main.c (mi_load_progress): Make uiout variable
4094 a unique_ptr.
4095
4096 2017-09-15 Pedro Alves <palves@redhat.com>
4097
4098 * compile/compile-c-types.c (convert_enum, convert_int)
4099 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4100
4101 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4102
4103 * dwarf2read.c (copy_string): Remove.
4104 (parse_macro_definition): Replace copy_string with savestring.
4105
4106 2017-09-15 Yao Qi <yao.qi@linaro.org>
4107
4108 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4109 gdb_target_obs.
4110 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4111 Likewise.
4112 (i[34567]86-*-linux*): Likewise.
4113
4114 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4115
4116 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4117 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4118 <stack>: Change type to std::vector.
4119 <stack_len, stack_allocated>: Remove.
4120 <grow_stack>: Remove.
4121 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4122 (dwarf_expr_context::~dwarf_expr_context): Remove.
4123 (dwarf_expr_context::grow_stack): Remove.
4124 (dwarf_expr_context::push): Adjust.
4125 (dwarf_expr_context::pop): Adjust.
4126 (dwarf_expr_context::fetch): Adjust.
4127 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4128 (dwarf_expr_context::stack_empty_p): Adjust.
4129 (dwarf_expr_context::execute_stack_op): Adjust.
4130
4131 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4132
4133 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4134 return type to bool.
4135 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4136
4137 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4138
4139 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4140 Change type to bool.
4141 (dwarf_stack_value) <in_stack_memory>: Likewise.
4142 (dwarf_expr_context) <push_address>: Change parameter type to
4143 bool.
4144 <fetch_in_stack_memory>: Change return type to bool.
4145 <push>: Change parameter type to bool.
4146 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4147 to bool.
4148 (dwarf_expr_context::push_address): Likewise.
4149 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4150 to bool.
4151 (dwarf_expr_context::execute_stack_op): Adjust.
4152 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4153
4154 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4155
4156 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4157 (struct dwarf_expr_context) <n_pieces>: Remove.
4158 <pieces>: Change type to std::vector.
4159 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4160 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4161 pieces.
4162 (dwarf_expr_context::add_piece): Adjust.
4163 * dwarf2loc.c (struct piece_closure): Initialize fields.
4164 <n_pieces>: Remove.
4165 <pieces>: Change type to std::vector.
4166 (allocate_piece_closure): Adjust, change parameter to
4167 std::vector rvalue and std::move it to piece_closure.
4168 (rw_pieced_value): Adjust.
4169 (check_pieced_synthetic_pointer): Adjust.
4170 (indirect_synthetic_pointer): Adjust.
4171 (coerce_pieced_ref): Adjust.
4172 (free_pieced_value_closure): Adjust. Use delete to free
4173 piece_closure.
4174 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4175 to allocate_piece_closure.
4176 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4177
4178 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4179
4180 * probe.h (probe_ops_cp): Remove typedef.
4181 (DEF_VEC_P (probe_ops_cp)): Remove.
4182 (all_probe_ops): Change type to std::vector.
4183 * probe.c (info_probes_for_ops): Adjust to vector change.
4184 (probe_linespec_to_ops): Likewise.
4185 (all_probe_ops): Change type to std::vector.
4186 (_initialize_probe): Adjust to vector change.
4187 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4188 * elfread.c (elf_get_probes): Likewise.
4189 * stap-probe.c (_initialize_stap_probe): Likewise.
4190
4191 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4192
4193 * probe.h (struct bound_probe): Define constructors.
4194 * probe.c (bound_probe_s): Remove typedef.
4195 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4196 (collect_probes): Change return type to std::vector, remove
4197 cleanup.
4198 (compare_probes): Return bool, change parameter type. Change
4199 semantic to "less than".
4200 (gen_ui_out_table_header_info): Change parameter to std::vector
4201 and update.
4202 (exists_probe_with_pops): Likewise.
4203 (info_probes_for_ops): Update to std::vector change.
4204 (enable_probes_command): Likewise.
4205 (disable_probes_command): Likewise.
4206
4207 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4208
4209 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4210 vec to std::vector.
4211 * probe.c (parse_probes_in_pspace): Update.
4212 (find_probes_in_objfile): Update.
4213 (find_probe_by_pc): Update.
4214 (collect_probes): Update.
4215 (probe_any_get_probes): Update.
4216 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4217 return type to reference to std::vector.
4218 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4219 std::vector and update.
4220 (dtrace_process_dof): Likewise.
4221 (dtrace_get_probes): Likewise.
4222 * elfread.c (elf_get_probes): Change return type to std::vector,
4223 store an std::vector in bfd_data.
4224 (probe_key_free): Update to std::vector.
4225 * stap-probe.c (handle_stap_probe): Change parameter to
4226 std::vector and update.
4227 (stap_get_probes): Likewise.
4228 * symfile-debug.c (debug_sym_get_probes): Change return type to
4229 std::vector and update.
4230
4231 2017-09-11 Tom Tromey <tom@tromey.com>
4232
4233 * breakpoint.c (program_breakpoint_here_p): Update.
4234 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4235 from make_show_memory_breakpoints_cleanup. Return a
4236 scoped_restore_tmpl<int>.
4237 (restore_show_memory_breakpoints): Remove.
4238 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4239 * mem-break.c (memory_validate_breakpoint): Update.
4240 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4241 (ia64_memory_remove_breakpoint): Update.
4242 (ia64_breakpoint_from_pc): Update.
4243 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4244 from make_show_memory_breakpoints_cleanup.
4245
4246 2017-09-11 Tom Tromey <tom@tromey.com>
4247
4248 * d-namespace.c (d_lookup_symbol): Use std::string.
4249 (find_symbol_in_baseclass): Likewise.
4250
4251 2017-09-11 Tom Tromey <tom@tromey.com>
4252
4253 * ctf.c (ctf_start): Use std::string.
4254
4255 2017-09-11 Tom Tromey <tom@tromey.com>
4256
4257 * ada-lang.c (is_known_support_routine): Update.
4258 (ada_unhandled_exception_name_addr_from_raise): Update.
4259 * guile/scm-frame.c (gdbscm_frame_name): Update.
4260 * python/py-frame.c (frapy_name): Update.
4261 (frapy_function): Update.
4262 * stack.h (find_frame_funname): Update.
4263 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4264 (print_frame): Update.
4265
4266 2017-09-11 Tom Tromey <tom@tromey.com>
4267
4268 * findcmd.c (put_bits): Take a gdb::byte_vector.
4269 (parse_find_args): Return gdb::byte_vector. "args" now const.
4270 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4271 cleanups.
4272 (find_command): Update.
4273
4274 2017-09-11 Tom Tromey <tom@tromey.com>
4275
4276 * cli/cli-script.c (class scoped_restore_hook_in): New.
4277 (clear_hook_in_cleanup): Remove.
4278 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4279 scoped_restore_hook_in.
4280
4281 2017-09-11 Tom Tromey <tom@tromey.com>
4282
4283 * cli/cli-script.c (restore_interp): Remove.
4284 (read_command_lines): Use scoped_restore_interp.
4285 * interps.c (scoped_restore_interp::set_temp): Rename from
4286 interp_set_temp.
4287 * interps.h (class scoped_restore_interp): New.
4288 (interp_set_temp): Remove.
4289
4290 2017-09-11 Tom Tromey <tom@tromey.com>
4291
4292 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4293 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4294 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4295 scoped_restore.
4296 (mi_cmd_break_insert_1): Update.
4297 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4298 scoped_restore.
4299
4300 2017-09-11 Tom Tromey <tom@tromey.com>
4301
4302 * demangle.c (demangle_command): Update.
4303 * breakpoint.c (disable_command): Update.
4304 (enable_command): Update.
4305 (find_location_by_number): Make "number" const. Use
4306 get_number_trailer.
4307 * cli/cli-utils.c (extract_arg): Return std::string.
4308 * probe.c (parse_probe_linespec): Update. Change types.
4309 (collect_probes): Take string arguments.
4310 (parse_probe_linespec): Likewise.
4311 (info_probes_for_ops): Update.
4312 (enable_probes_command): Update.
4313 (disable_probes_command): Update.
4314 * break-catch-sig.c (catch_signal_split_args): Update.
4315 * mi/mi-parse.c (mi_parse): Update.
4316
4317 2017-09-11 Tom Tromey <tom@tromey.com>
4318
4319 * language.h (language_enum): Make argument const.
4320 * language.c (language_enum): Make argument const.
4321
4322 2017-09-11 Tom Tromey <tom@tromey.com>
4323
4324 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4325 as function.
4326 (skip_to_space): Rename from skip_to_space_const.
4327 * common/common-utils.c (skip_to_space): New function.
4328 (skip_to_space): Rename from skip_to_space_const.
4329 * cli/cli-utils.h (get_number): Rename from get_number_const.
4330 (extract_arg): Rename from extract_arg_const.
4331 * cli/cli-utils.c (get_number): Rename from get_number_const.
4332 (extract_arg): Rename from extract_arg_const.
4333 (number_or_range_parser::get_number): Use ::get_number.
4334 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4335 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4336 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4337 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4338 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4339 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4340 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4341 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4342
4343 2017-09-11 Tom Tromey <tom@tromey.com>
4344
4345 * python/python.c (do_start_initialization): Use
4346 py-event-types.def to initialize types.
4347 Define all object type structures.
4348 * python/python-internal.h: Don't declare event initialization
4349 functions.
4350 * python/py-threadevent.c (thread_event_object_type): Don't
4351 define.
4352 * python/py-stopevent.c (stop_event_object_type): Don't define.
4353 * python/py-signalevent.c (signal_event_object_type): Don't
4354 declare or define.
4355 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4356 (clear_objfiles_event_object_type): Don't declare or define.
4357 * python/py-infevents.c (inferior_call_pre_event_object_type)
4358 (inferior_call_post_event_object_type)
4359 (register_changed_event_object_type)
4360 (memory_changed_event_object_type): Don't declare or define.
4361 * python/py-inferior.c (new_thread_event_object_type)
4362 (new_inferior_event_object_type)
4363 (inferior_deleted_event_object_type): Don't declare or define.
4364 * python/py-exitedevent.c (exited_event_object_type): Don't
4365 declare or define.
4366 * python/py-evts.c (gdbpy_initialize_py_events): Use
4367 py-all-events.def.
4368 * python/py-events.h (thread_event_object_type): Don't declare.
4369 (events_object): Use py-all-events.def.
4370 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4371 py-event-types.def.
4372 * python/py-event-types.def: New file.
4373 * python/py-continueevent.c (create_continue_event_object): Don't
4374 declare or define.
4375 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4376 declare or define.
4377 * python/py-all-events.def: New file.
4378
4379 2017-09-11 Tom Tromey <tom@tromey.com>
4380
4381 * python/py-threadevent.c (create_thread_event_object): Return
4382 gdbpy_ref.
4383 * python/py-stopevent.h (create_stop_event_object)
4384 (create_breakpoint_event_object, create_signal_event_object):
4385 Update.
4386 * python/py-stopevent.c (create_stop_event_object): Return
4387 gdbpy_ref.
4388 (emit_stop_event): Update.
4389 * python/py-signalevent.c (create_signal_event_object): Return
4390 gdbpy_ref.
4391 * python/py-infevents.c (create_inferior_call_event_object):
4392 Update.
4393 * python/py-event.h (create_event_object)
4394 (create_thread_event_object): Update.
4395 * python/py-event.c (create_event_object): Return gdbpy_ref.
4396 * python/py-continueevent.c: Return gdbpy_ref.
4397 * python/py-bpevent.c (create_breakpoint_event_object): Return
4398 gdbpy_ref.
4399
4400 2017-09-11 Tom Tromey <tom@tromey.com>
4401
4402 PR python/15622:
4403 * NEWS: Add entry.
4404 * python/python.c (do_start_initialization): Initialize new event
4405 types.
4406 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4407 (gdbpy_initialize_inferior_deleted_event)
4408 (gdbpy_initialize_new_thread_event): Declare.
4409 * python/py-threadevent.c (create_thread_event_object): Add option
4410 "thread" parameter.
4411 * python/py-inferior.c (new_thread_event_object_type)
4412 (new_inferior_event_object_type)
4413 (inferior_deleted_event_object_type): Declare.
4414 (python_new_inferior, python_inferior_deleted): New functions.
4415 (add_thread_object): Emit new_thread event.
4416 (gdbpy_initialize_inferior): Attach new functions to corresponding
4417 observers.
4418 (new_thread, new_inferior, inferior_deleted): Define new event
4419 types.
4420 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4421 registries.
4422 * python/py-events.h (events_object) <new_inferior,
4423 inferior_deleted, new_thread>: New fields.
4424 * python/py-event.h (create_thread_event_breakpoint): Add optional
4425 "thread" parameter.
4426
4427 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4428
4429 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4430 check current_ui instead.
4431 (internal_vproblem): Likewise.
4432
4433 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4434
4435 * thread.c (print_thread_info_1): Remove unnecessary calls to
4436 uiout->is_mi_like_p.
4437
4438 2017-09-09 Tom Tromey <tom@tromey.com>
4439
4440 * namespace.h (add_using_directive): Update.
4441 * namespace.c (add_using_directive): Change type of excludes to
4442 std::vector.
4443 * dwarf2read.c (read_import_statement): Use std::vector.
4444 (read_namespace): Update.
4445 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4446
4447 2017-09-09 Tom Tromey <tom@tromey.com>
4448
4449 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4450
4451 2017-09-09 Tom Tromey <tom@tromey.com>
4452
4453 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4454
4455 2017-09-09 Tom Tromey <tom@tromey.com>
4456
4457 * stack.c (func_command): Use gdb::def_vector.
4458
4459 2017-09-09 Tom Tromey <tom@tromey.com>
4460
4461 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4462 ui_out_emit_list, ui_out_emit_tuple.
4463 (mi_cmd_var_update): Likewise.
4464
4465 2017-09-09 Tom Tromey <tom@tromey.com>
4466
4467 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4468 ui_out_redirect_pop.
4469 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4470 ui_out_redirect_pop.
4471 * utils.c (do_ui_out_redirect_pop)
4472 (make_cleanup_ui_out_redirect_pop): Remove.
4473 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4474 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4475 * ui-out.h (ui_out_redirect_pop): New class.
4476
4477 2017-09-09 Tom Tromey <tom@tromey.com>
4478
4479 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4480 (list_available_thread_groups, mi_cmd_list_thread_groups)
4481 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4482 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4483 Likewise.
4484
4485 2017-09-09 Tom Tromey <tom@tromey.com>
4486
4487 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4488 ui_out_emit_tuple.
4489
4490 2017-09-09 Tom Tromey <tom@tromey.com>
4491
4492 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4493 * stack.c (print_frame): Use ui_out_emit_tuple.
4494 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4495 (info_spu_mailbox_command, info_spu_dma_command)
4496 (info_spu_proxydma_command): Likewise.
4497 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4498 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4499 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4500 ui_out_emit_tuple.
4501 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4502
4503 2017-09-09 Tom Tromey <tom@tromey.com>
4504
4505 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4506 (class ui_out_emit_table): Update comment.
4507 * ui-out.c (do_cleanup_table_end)
4508 (make_cleanup_ui_out_table_begin_end): Remove.
4509 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4510 (info_spu_dma_cmdlist): Likewise.
4511 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4512 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4513 ui_out_emit_table.
4514
4515 2017-09-09 Tom Tromey <tom@tromey.com>
4516
4517 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4518 ui_out_emit_list, gdb::optional.
4519
4520 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4521
4522 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4523 prototype.
4524 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4525 prototype.
4526 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4527 prototype.
4528 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4529 * ada-exp.y: Remove _initialize_ada_exp prototype.
4530 * ada-lang.c: Remove _initialize_ada_language prototype.
4531 * ada-tasks.c: Remove _initialize_tasks prototype.
4532 * addrmap.c: Remove _initialize_addrmap prototype.
4533 * agent.c: Remove _initialize_agent prototype.
4534 * aix-thread.c: Remove _initialize_aix_thread prototype.
4535 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4536 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4537 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4538 prototype.
4539 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4540 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4541 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4542 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4543 prototype.
4544 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4545 prototype.
4546 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4547 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4548 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4549 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4550 prototype.
4551 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4552 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4553 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4554 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4555 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4556 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4557 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4558 prototype.
4559 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4560 prototype.
4561 * annotate.c: Remove _initialize_annotate prototype.
4562 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4563 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4564 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4565 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4566 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4567 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4568 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4569 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4570 prototype.
4571 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4572 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4573 * auto-load.c: Remove _initialize_auto_load prototype.
4574 * auxv.c: Remove _initialize_auxv prototype.
4575 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4576 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4577 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4578 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4579 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4580 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4581 prototype.
4582 * break-catch-throw.c: Remove _initialize_break_catch_throw
4583 prototype.
4584 * breakpoint.c: Remove _initialize_breakpoint prototype.
4585 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4586 * btrace.c: Remove _initialize_btrace prototype.
4587 * charset.c: Remove _initialize_charset prototype.
4588 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4589 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4590 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4591 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4592 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4593 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4594 * coffread.c: Remove _initialize_coffread prototype.
4595 * compile/compile.c: Remove _initialize_compile prototype.
4596 * complaints.c: Remove _initialize_complaints prototype.
4597 * completer.c: Remove _initialize_completer prototype.
4598 * copying.awk: Remove _initialize_copying prototype.
4599 * copying.c: Regenerate.
4600 * core-regset.c: Remove _initialize_core_regset prototype.
4601 * corefile.c: Remove _initialize_core prototype.
4602 * corelow.c: Remove _initialize_corelow prototype.
4603 * cp-abi.c: Remove _initialize_cp_abi prototype.
4604 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4605 * cp-support.c: Remove _initialize_cp_support prototype.
4606 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4607 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4608 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4609 * ctf.c: Remove _initialize_ctf prototype.
4610 * d-lang.c: Remove _initialize_d_language prototype.
4611 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4612 prototype.
4613 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4614 * dbxread.c: Remove _initialize_dbxread prototype.
4615 * dcache.c: Remove _initialize_dcache prototype.
4616 * demangle.c: Remove _initialize_demangler prototype.
4617 * disasm-selftests.c: Remove _initialize_disasm_selftests
4618 prototype.
4619 * disasm.c: Remove _initialize_disasm prototype.
4620 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4621 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4622 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4623 prototype.
4624 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4625 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4626 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4627 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4628 * elfread.c: Remove _initialize_elfread prototype.
4629 * exec.c: Remove _initialize_exec prototype.
4630 * extension.c: Remove _initialize_extension prototype.
4631 * f-lang.c: Remove _initialize_f_language prototype.
4632 * f-valprint.c: Remove _initialize_f_valprint prototype.
4633 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4634 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4635 * filesystem.c: Remove _initialize_filesystem prototype.
4636 * findcmd.c: Remove _initialize_mem_search prototype.
4637 * fork-child.c: Remove _initialize_fork_child prototype.
4638 * frame-base.c: Remove _initialize_frame_base prototype.
4639 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4640 * frame.c: Remove _initialize_frame prototype.
4641 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4642 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4643 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4644 * gcore.c: Remove _initialize_gcore prototype.
4645 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4646 * gdbarch.c: Regenerate.
4647 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4648 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4649 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4650 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4651 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4652 * go-lang.c: Remove _initialize_go_language prototype.
4653 * go32-nat.c: Remove _initialize_go32_nat prototype.
4654 * guile/guile.c: Remove _initialize_guile prototype.
4655 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4656 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4657 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4658 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4659 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4660 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4661 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4662 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4663 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4664 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4665 prototype.
4666 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4667 prototype.
4668 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4669 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4670 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4671 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4672 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4673 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4674 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4675 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4676 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4677 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4678 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4679 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4680 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4681 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4682 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4683 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4684 prototype.
4685 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4686 prototype.
4687 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4688 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4689 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4690 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4691 * infcall.c: Remove _initialize_infcall prototype.
4692 * infcmd.c: Remove _initialize_infcmd prototype.
4693 * inferior.c: Remove _initialize_inferiors prototype.
4694 * inflow.c: Remove _initialize_inflow prototype.
4695 * infrun.c: Remove _initialize_infrun prototype.
4696 * interps.c: Remove _initialize_interpreter prototype.
4697 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4698 * jit.c: Remove _initialize_jit prototype.
4699 * language.c: Remove _initialize_language prototype.
4700 * linux-fork.c: Remove _initialize_linux_fork prototype.
4701 * linux-nat.c: Remove _initialize_linux_nat prototype.
4702 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4703 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4704 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4705 * m2-lang.c: Remove _initialize_m2_language prototype.
4706 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4707 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4708 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4709 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4710 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4711 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4712 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4713 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4714 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4715 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4716 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4717 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4718 * machoread.c: Remove _initialize_machoread prototype.
4719 * macrocmd.c: Remove _initialize_macrocmd prototype.
4720 * macroscope.c: Remove _initialize_macroscope prototype.
4721 * maint.c: Remove _initialize_maint_cmds prototype.
4722 * mdebugread.c: Remove _initialize_mdebugread prototype.
4723 * memattr.c: Remove _initialize_mem prototype.
4724 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4725 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4726 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4727 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4728 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4729 * microblaze-linux-tdep.c: Remove
4730 _initialize_microblaze_linux_tdep prototype.
4731 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4732 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4733 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4734 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4735 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4736 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4737 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4738 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4739 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4740 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4741 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4742 prototype.
4743 * mipsread.c: Remove _initialize_mipsread prototype.
4744 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4745 prototype.
4746 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4747 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4748 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4749 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4750 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4751 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4752 prototype.
4753 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4754 * nto-procfs.c: Remove _initialize_procfs prototype.
4755 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4756 * objc-lang.c: Remove _initialize_objc_language prototype.
4757 * objfiles.c: Remove _initialize_objfiles prototype.
4758 * observer.c: Remove observer_test_first_notification_function,
4759 observer_test_second_notification_function,
4760 observer_test_third_notification_function, and
4761 _initialize_observer prototypes.
4762 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4763 * osabi.c: Remove _initialize_gdb_osabi prototype.
4764 * osdata.c: Remove _initialize_osdata prototype.
4765 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4766 * parse.c: Remove _initialize_parse prototype.
4767 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4768 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4769 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4770 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4771 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4772 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4773 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4774 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4775 * printcmd.c: Remove _initialize_printcmd prototype.
4776 * probe.c: Remove _initialize_probe prototype.
4777 * proc-api.c: Remove _initialize_proc_api prototype.
4778 * proc-events.c: Remove _initialize_proc_events prototype.
4779 * proc-service.c: Remove _initialize_proc_service prototype.
4780 * procfs.c: Remove _initialize_procfs prototype.
4781 * psymtab.c: Remove _initialize_psymtab prototype.
4782 * python/python.c: Remove _initialize_python prototype.
4783 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4784 * record-btrace.c: Remove _initialize_record_btrace prototype.
4785 * record-full.c: Remove _initialize_record_full prototype.
4786 * record.c: Remove _initialize_record prototype.
4787 * regcache.c: Remove _initialize_regcache prototype.
4788 * reggroups.c: Remove _initialize_reggroup prototype.
4789 * remote-notif.c: Remove _initialize_notif prototype.
4790 * remote-sim.c: Remove _initialize_remote_sim prototype.
4791 * remote.c: Remove _initialize_remote prototype.
4792 * reverse.c: Remove _initialize_reverse prototype.
4793 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4794 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4795 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4796 prototype.
4797 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4798 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4799 * rust-exp.y: Remove _initialize_rust_exp prototype.
4800 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4801 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4802 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4803 * score-tdep.c: Remove _initialize_score_tdep prototype.
4804 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4805 prototype.
4806 * ser-go32.c: Remove _initialize_ser_dos prototype.
4807 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4808 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4809 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4810 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4811 * serial.c: Remove _initialize_serial prototype.
4812 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4813 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4814 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4815 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4816 * skip.c: Remove _initialize_step_skip prototype.
4817 * sol-thread.c: Remove _initialize_sol_thread prototype.
4818 * solib-aix.c: Remove _initialize_solib_aix prototype.
4819 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4820 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4821 * solib-frv.c: Remove _initialize_frv_solib prototype.
4822 * solib-spu.c: Remove _initialize_spu_solib prototype.
4823 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4824 * solib-target.c: Remove _initialize_solib_target prototype.
4825 * solib.c: Remove _initialize_solib prototype.
4826 * source.c: Remove _initialize_source prototype.
4827 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4828 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4829 prototype.
4830 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4831 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4832 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4833 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4834 prototype.
4835 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4836 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4837 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4838 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4839 prototype.
4840 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4841 prototype.
4842 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4843 prototype.
4844 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4845 prototype.
4846 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4847 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4848 prototype.
4849 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4850 prototype.
4851 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4852 prototype.
4853 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4854 prototype.
4855 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4856 prototype.
4857 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4858 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4859 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4860 * stabsread.c: Remove _initialize_stabsread prototype.
4861 * stack.c: Remove _initialize_stack prototype.
4862 * stap-probe.c: Remove _initialize_stap_probe prototype.
4863 * std-regs.c: Remove _initialize_frame_reg prototype.
4864 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4865 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4866 * symfile.c: Remove _initialize_symfile prototype.
4867 * symmisc.c: Remove _initialize_symmisc prototype.
4868 * symtab.c: Remove _initialize_symtab prototype.
4869 * target-dcache.c: Remove _initialize_target_dcache prototype.
4870 * target-descriptions.c: Remove _initialize_target_descriptions
4871 prototype.
4872 * thread.c: Remove _initialize_thread prototype.
4873 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4874 prototype.
4875 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4876 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4877 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4878 prototype.
4879 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4880 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4881 * tracefile.c: Remove _initialize_tracefile prototype.
4882 * tracepoint.c: Remove _initialize_tracepoint prototype.
4883 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4884 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4885 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4886 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4887 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4888 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4889 * tui/tui.c: Remove _initialize_tui prototype.
4890 * typeprint.c: Remove _initialize_typeprint prototype.
4891 * user-regs.c: Remove _initialize_user_regs prototype.
4892 * utils.c: Remove _initialize_utils prototype.
4893 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4894 * valarith.c: Remove _initialize_valarith prototype.
4895 * valops.c: Remove _initialize_valops prototype.
4896 * valprint.c: Remove _initialize_valprint prototype.
4897 * value.c: Remove _initialize_values prototype.
4898 * varobj.c: Remove _initialize_varobj prototype.
4899 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4900 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4901 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4902 * windows-nat.c: Remove _initialize_windows_nat,
4903 _initialize_check_for_gdb_ini, and _initialize_loadable
4904 prototypes.
4905 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4906 * xcoffread.c: Remove _initialize_xcoffread prototype.
4907 * xml-support.c: Remove _initialize_xml_support prototype.
4908 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4909 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4910 prototype.
4911 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4912 prototype.
4913 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4914
4915 2017-09-08 Keith Seitz <keiths@redhat.com>
4916
4917 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4918 field.
4919
4920 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4921
4922 * f-valprint.c (f_val_print): Remove check for one byte
4923 sized integers. Remove printing of character type.
4924
4925 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4926 Christoph Weinmann <christoph.t.weinmann@intel.com>
4927 Bernhard Heckel <bernhard.heckel@intel.com>
4928
4929 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4930 to maintain proper indentation when printing pointers/refs.
4931
4932 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4933
4934 GDB 8.0.1 released.
4935
4936 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4937
4938 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4939
4940 2017-09-05 Tom Tromey <tom@tromey.com>
4941
4942 * parse.c (funcall_chain): Now a std::vector.
4943 (start_arglist, end_arglist): Simplify.
4944 (free_funcalls): Remove.
4945 (parse_exp_in_context_1): Remove cleanup.
4946
4947 2017-09-05 Tom Tromey <tom@tromey.com>
4948
4949 * go-exp.y (go_parse): Don't create a cleanup.
4950
4951 2017-09-05 Tom Tromey <tom@tromey.com>
4952
4953 * d-exp.y (PrimaryExpression): Use std::string.
4954 (d_parse): Don't create a cleanup.
4955
4956 2017-09-05 Tom Tromey <tom@tromey.com>
4957
4958 * utils.c (do_clear_parser_state): Remove.
4959 (make_cleanup_clear_parser_state): Remove.
4960 * p-exp.y (pascal_parse): Use scoped_restore.
4961 * m2-exp.y (m2_parse): Use scoped_restore.
4962 * f-exp.y (f_parse): Use scoped_restore.
4963 * d-exp.y (d_parse): Use scoped_restore.
4964 * c-exp.y (c_parse): Use scoped_restore.
4965 * ada-exp.y (ada_parse): Use scoped_restore.
4966 * utils.h (make_cleanup_clear_parser_state): Remove.
4967
4968 2017-09-06 Keith Seitz <keiths@redhat.com>
4969
4970 * dwarf2read.c (dw2_linkage_name_attr): New function.
4971 (dw2_linkage_name): New function.
4972 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4973 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4974 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4975
4976 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4977
4978 * config/djgpp/djconfig.sh: Correct shell portability issue.
4979
4980 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4981
4982 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4983
4984 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4985
4986 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4987 * NEWS: Mention new FreeBSD/mips native configuration.
4988 * configure.host: Add aarch64*-*-freebsd*.
4989 * configure.nat: Likewise.
4990 * aarch64-fbsd-nat.c: New file.
4991
4992 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4993
4994 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4995 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4996 * NEWS: Mention new FreeBSD/aarch64 target.
4997 * configure.tgt: Add aarch64*-*-freebsd*.
4998 * aarch64-fbsd-tdep.c: New file.
4999 * aarch64-fbsd-tdep.h: New file.
5000
5001 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5002
5003 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5004
5005 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5006
5007 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5008 of TLS symbols.
5009
5010 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5011
5012 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5013 call.
5014
5015 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5016
5017 * infrun.c (follow_exec): Call add_thread after
5018 target_find_description.
5019
5020 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5021
5022 * infrun.c (handle_inferior_event_1): When exec'ing, read
5023 stop_pc after follow_exec.
5024
5025 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5026
5027 * remote.c (process_g_packet): Update error message.
5028
5029 2017-09-05 Yao Qi <yao.qi@linaro.org>
5030
5031 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5032 targets.
5033
5034 2017-09-05 Pedro Alves <palves@redhat.com>
5035
5036 * eval.c (eval_call, evaluate_funcall): New functions, factored
5037 out from ...
5038 (evaluate_subexp_standard): ... this.
5039
5040 2017-09-05 Yao Qi <yao.qi@linaro.org>
5041
5042 * amd64-tdep.c (amd64_target_description): Create target
5043 descriptions.
5044 (_initialize_amd64_tdep): Don't call functions
5045 initialize_tdesc_amd64_*. Add self tests.
5046 * arch/amd64.c (amd64_create_target_description): Add parameter
5047 is_linux. Call set_tdesc_osabi if is_linux is true.
5048 * arch/amd64.h (amd64_create_target_description): Update the
5049 declaration.
5050 * arch/i386.c (i386_create_target_description): Add parameter
5051 is_linux. Call set_tdesc_osabi if is_linux is true.
5052 * arch/i386.h (i386_create_target_description): Update
5053 declaration.
5054 * configure.tgt: Add i386.o to gdb_target_obs.
5055 * features/Makefile (XMLTOC): Remove i386/*.xml.
5056 * features/i386/amd64-avx-avx512.c: Remove.
5057 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5058 * features/i386/amd64-avx-mpx.c: Remove.
5059 * features/i386/amd64-avx.c: Remove.
5060 * features/i386/amd64-mpx.c: Remove.
5061 * features/i386/amd64.c: Remove.
5062 * features/i386/i386-avx-avx512.c: Remove.
5063 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5064 * features/i386/i386-avx-mpx.c: Remove.
5065 * features/i386/i386-avx.c: Remove.
5066 * features/i386/i386-mmx.c: Remove.
5067 * features/i386/i386-mpx.c: Remove.
5068 * features/i386/i386.c: Remove.
5069 * i386-tdep.c: Don't include features/i386/i386*.c., include
5070 target-descriptions.h and arch/i386.h.
5071 (i386_target_description): Create target descriptions.
5072 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5073 functions. Do self tests.
5074
5075 2017-09-05 Yao Qi <yao.qi@linaro.org>
5076
5077 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5078 * features/i386/amd64-avx-avx512-linux.c: Removed.
5079 * features/i386/amd64-avx-linux.c: Removed.
5080 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5081 * features/i386/amd64-avx-mpx-linux.c: Removed.
5082 * features/i386/amd64-linux.c: Removed.
5083 * features/i386/amd64-mpx-linux.c: Removed.
5084 * features/i386/x32-avx-avx512-linux.c: Removed.
5085 * features/i386/x32-avx-linux.c: Removed.
5086 * features/i386/x32-linux.c: Removed.
5087
5088 2017-09-05 Yao Qi <yao.qi@linaro.org>
5089
5090 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5091 features/i386/*.c.
5092 (amd64_linux_read_description): Call
5093 amd64_create_target_description.
5094 * arch/amd64.c: New file.
5095 * arch/amd64.h: New file.
5096 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5097 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5098
5099 2017-09-05 Yao Qi <yao.qi@linaro.org>
5100
5101 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5102 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5103 (amd64_linux_read_description): Create target descriptions.
5104 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5105 functions. Add unit tests.
5106 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5107 x32-core.xml.
5108 * features/i386/64bit-avx.c: Generated.
5109 * features/i386/64bit-avx512.c: Generated.
5110 * features/i386/64bit-core.c: Generated.
5111 * features/i386/64bit-linux.c: Generated.
5112 * features/i386/64bit-mpx.c: Generated.
5113 * features/i386/64bit-pkeys.c: Generated.
5114 * features/i386/64bit-segments.c: Generated.
5115 * features/i386/64bit-sse.c: Generated.
5116 * features/i386/x32-core.c: Generated.
5117 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5118 c files for amd64-linux and x32-linux.
5119
5120 2017-09-05 Yao Qi <yao.qi@linaro.org>
5121
5122 * amd64-linux-tdep.c (amd64_linux_read_description): New
5123 function.
5124 (amd64_linux_core_read_description): Call
5125 amd64_linux_read_description.
5126 (amd64_linux_init_abi): Likewise.
5127 (amd64_x32_linux_init_abi): Likewise.
5128 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5129 * x86-linux-nat.c (x86_linux_read_description): Call
5130 amd64_linux_read_description.
5131
5132 2017-09-05 Yao Qi <yao.qi@linaro.org>
5133
5134 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5135 comments.
5136
5137 2017-09-05 Yao Qi <yao.qi@linaro.org>
5138
5139 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5140 * features/i386/i386-avx-avx512-linux.c: Remove.
5141 * features/i386/i386-avx-linux.c: Remove.
5142 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5143 * features/i386/i386-avx-mpx-linux.c: Remove.
5144 * features/i386/i386-linux.c: Remove.
5145 * features/i386/i386-mmx-linux.c: Remove.
5146 * features/i386/i386-mpx-linux.c: Remove.
5147
5148 2017-09-05 Yao Qi <yao.qi@linaro.org>
5149
5150 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5151 (SFILES): Add arch/i386.c.
5152 (HFILES_NO_SRCDIR): Add arch/i386.h.
5153 * arch/i386.c: New file.
5154 * arch/i386.h: New file.
5155 * arch/tdesc.h (allocate_target_description): Declare.
5156 (set_tdesc_architecture): Declare.
5157 (set_tdesc_osabi): Declare.
5158 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5159 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5160 include arch/i386.h.
5161 (i386_linux_read_description): Remove code and call
5162 i386_create_target_description.
5163 (set_tdesc_architecture): New function.
5164 (set_tdesc_osabi): New function.
5165 * target-descriptions.h (allocate_target_description): Remove.
5166
5167 2017-09-05 Yao Qi <yao.qi@linaro.org>
5168
5169 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5170 * target-descriptions.c (tdesc_create_feature): Likewise, and
5171 adjust code.
5172 * features/i386/32bit-avx.c: Re-generated.
5173 * features/i386/32bit-avx512.c: Re-generated.
5174 * features/i386/32bit-core.c: Re-generated.
5175 * features/i386/32bit-linux.c: Re-generated.
5176 * features/i386/32bit-mpx.c: Re-generated.
5177 * features/i386/32bit-pkeys.c: Re-generated.
5178 * features/i386/32bit-sse.c: Re-generated.
5179
5180 2017-09-05 Yao Qi <yao.qi@linaro.org>
5181
5182 * regformats/regdef.h (struct reg): Override operator == and !=.
5183
5184 2017-09-05 Yao Qi <yao.qi@linaro.org>
5185
5186 * arch/tdesc.h: New file.
5187 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5188 * target-descriptions.c: Update comments.
5189 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5190 declarations.
5191 * features/i386/32bit-avx.c: Re-generated.
5192 * features/i386/32bit-avx512.c: Re-generated.
5193 * features/i386/32bit-core.c: Re-generated.
5194 * features/i386/32bit-linux.c: Re-generated.
5195 * features/i386/32bit-mpx.c: Re-generated.
5196 * features/i386/32bit-pkeys.c: Re-generated.
5197 * features/i386/32bit-sse.c: Re-generated.
5198
5199 2017-09-05 Yao Qi <yao.qi@linaro.org>
5200
5201 * regformats/regdat.sh: Update generated code.
5202
5203 2017-09-05 Yao Qi <yao.qi@linaro.org>
5204
5205 * regformats/regdat.sh: Adjust code order.
5206
5207 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5208
5209 * expprint.c (dump_subexp_body_standard): Use constant format
5210 string in fprintf_filtered call.
5211
5212 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5213
5214 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5215 NetBSD/i386.
5216 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5217
5218 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5219
5220 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5221
5222 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5223
5224 * bsd-kvm.o: Define _KMEMUSER.
5225 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5226 * configure: Regenerate.
5227
5228 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5229
5230 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5231 * i386-fbsd-nat.c: Likewise.
5232
5233 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5234
5235 * unittests/array-view-selftests.c: Add include of <array>.
5236
5237 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5238
5239 * spu-tdep.c (flush_ea_cache): Add missing argument to
5240 call_function_by_hand.
5241
5242 2017-09-04 Pedro Alves <palves@redhat.com>
5243
5244 * NEWS (Safer support for debugging with no debug info): New.
5245
5246 2017-09-04 Pedro Alves <palves@redhat.com>
5247
5248 * c-exp.y (function_method, function_method_void): Add current
5249 instance flags to TYPE_INSTANCE.
5250 * dwarf2read.c (check_modifier): New.
5251 (compute_delayed_physnames): Assert that only C++ adds delayed
5252 physnames. Mark fn_fields as const/volatile depending on
5253 physname.
5254 * eval.c (make_params): New type_instance_flags parameter. Use
5255 it as the new type's instance flags.
5256 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5257 flags element and pass it to make_params.
5258 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5259 instance flags element.
5260 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5261 * gdbtypes.h: Include "enum-flags.h".
5262 (type_instance_flags): New enum-flags type.
5263 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5264 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5265 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5266 (follow_type_instance_flags): New function.
5267 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5268 * parser-defs.h (follow_type_instance_flags): Declare.
5269 * valops.c (value_struct_elt_for_reference): const/volatile must
5270 match too.
5271
5272 2017-09-04 Pedro Alves <palves@redhat.com>
5273
5274 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5275 function/method scopes; lookup the nested name as a function local
5276 static variable.
5277
5278 2017-09-04 Pedro Alves <palves@redhat.com>
5279
5280 (%type <voidval>): Add function_method.
5281 * c-exp.y (exp): New production for calls with no arguments.
5282 (function_method, function_method_void_or_typelist): New
5283 productions.
5284 (exp): New production for "method()::static_var".
5285 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5286 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5287 Handle OP_FUNC_STATIC_VAR.
5288 * parse.c (operator_length_standard):
5289 Handle OP_FUNC_STATIC_VAR.
5290
5291 2017-09-04 Pedro Alves <palves@redhat.com>
5292
5293 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5294 handling.
5295 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5296 Ditto.
5297 * parse.c (operator_length_standard, operator_check_standard):
5298 Ditto.
5299 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5300
5301 2017-09-04 Pedro Alves <palves@redhat.com>
5302
5303 * ax-gdb.c: Include "typeprint.h".
5304 (gen_expr_for_cast): New function.
5305 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5306 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5307 type is unknown.
5308 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5309 nodebug_data_symbol.
5310 * eval.c: Include "typeprint.h".
5311 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5312 Error out if symbol has unknown type.
5313 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5314 evaluate_subexp_for_cast.
5315 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5316 OP_VAR_MSYM_VALUE.
5317 (evaluate_subexp_for_cast): New function.
5318 * gdbtypes.c (init_nodebug_var_type): New function.
5319 (objfile_type): Use it to initialize types of variables with no
5320 debug info.
5321 * typeprint.c (error_unknown_type): New.
5322 * typeprint.h (error_unknown_type): New declaration.
5323 * compile/compile-c-types.c (convert_type_basic): Handle
5324 TYPE_CODE_ERROR; warn and fallback to int for variables with
5325 unknown type.
5326
5327 2017-09-04 Pedro Alves <palves@redhat.com>
5328
5329 * eval.c (evaluate_var_value): New function, factored out from ...
5330 (evaluate_subexp_standard): ... here.
5331
5332 2017-09-04 Pedro Alves <palves@redhat.com>
5333
5334 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5335 Remove useless assignments to 'op'.
5336
5337 2017-09-04 Pedro Alves <palves@redhat.com>
5338
5339 * eval.c (eval_skip_value): New function.
5340 (evaluate_subexp_standard): Use it.
5341
5342 2017-09-04 Pedro Alves <palves@redhat.com>
5343
5344 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5345 function name from symbol/minsym and pass it to
5346 error_call_unknown_return_type.
5347
5348 2017-09-04 Pedro Alves <palves@redhat.com>
5349
5350 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5351 * ax-gdb.c (gen_msym_var_ref): New function.
5352 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5353 * eval.c (evaluate_var_msym_value): New function.
5354 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5355 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5356 to call_function_by_hand.
5357 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5358 Handle OP_VAR_MSYM_VALUE.
5359 (union exp_element) <msymbol>: New field.
5360 * minsyms.h (struct type): Forward declare.
5361 (find_minsym_type_and_address): Declare.
5362 * parse.c (write_exp_elt_msym): New function.
5363 (write_exp_msymbol): Delete, refactored as ...
5364 (find_minsym_type_and_address): ... this new function.
5365 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5366 (operator_length_standard, operator_check_standard): Handle
5367 OP_VAR_MSYM_VALUE.
5368 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5369
5370 2017-09-04 Pedro Alves <palves@redhat.com>
5371
5372 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5373 TYPE_GNU_IFUNC specially here. Throw error if return type is
5374 unknown.
5375 * ada-typeprint.c (print_func_type): Handle functions with unknown
5376 return type.
5377 * c-typeprint.c (c_type_print_base): Handle functions and methods
5378 with unknown return type.
5379 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5380 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5381 * compile/compile-c-types.c: Include "objfiles.h".
5382 (convert_func): For functions with unknown return type, warn and
5383 default to int.
5384 * compile/compile-object-run.c (compile_object_run): Adjust call
5385 to call_function_by_hand_dummy.
5386 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5387 call_function_by_hand.
5388 * eval.c (evaluate_subexp_standard): Adjust calls to
5389 call_function_by_hand. Handle functions and methods with unknown
5390 return type. Pass expect_type to call_function_by_hand.
5391 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5392 return type.
5393 * gcore.c (call_target_sbrk): Adjust call to
5394 call_function_by_hand.
5395 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5396 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5397 an integer address type instead of nodebug.
5398 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5399 call_function_by_hand.
5400 * infcall.c (error_call_unknown_return_type): New function.
5401 (call_function_by_hand): New "default_return_type" parameter.
5402 Pass it down.
5403 (call_function_by_hand_dummy): New "default_return_type"
5404 parameter. Use it instead of defaulting to int. If there's no
5405 default and the return type is unknown, throw an error. If
5406 there's a default return type, and the called function has no
5407 debug info, then assume the function is prototyped.
5408 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5409 New "default_return_type" parameter.
5410 (error_call_unknown_return_type): New declaration.
5411 * linux-fork.c (call_lseek): Cast return type of lseek.
5412 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5413 call_function_by_hand.
5414 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5415 calls to call_function_by_hand.
5416 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5417 return type.
5418 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5419 (value_nsstring, print_object_command): Adjust calls to
5420 call_function_by_hand.
5421 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5422 functions with unknown return type.
5423 (pascal_type_print_func_varspec_suffix): New function.
5424 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5425 TYPE_CODE_METHOD>: Use it.
5426 * python/py-value.c (valpy_call): Adjust call to
5427 call_function_by_hand.
5428 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5429 call_function_by_hand.
5430 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5431 call_function_by_hand.
5432 * valops.c (value_allocate_space_in_inferior): Adjust call to
5433 call_function_by_hand.
5434 * typeprint.c (type_print_unknown_return_type): New function.
5435 * typeprint.h (type_print_unknown_return_type): New declaration.
5436
5437 2017-09-04 Pedro Alves <palves@redhat.com>
5438
5439 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5440 types with more than one parameter as prototyped.
5441
5442 2017-09-04 Pedro Alves <palves@redhat.com>
5443
5444 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5445 (disassemble_command): Use gdb_disassembly_flags instead of bare
5446 int.
5447 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5448 (dump_insns, do_mixed_source_and_assembly_deprecated)
5449 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5450 Use gdb_disassembly_flags instead of bare int.
5451 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5452 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5453 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5454 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5455 (enum gdb_disassembly_flag): ... values of this new enumeration.
5456 (gdb_disassembly_flags): Define.
5457 (gdb_disassembly)
5458 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5459 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5460 gdb_disassembly_flags instead of bare int.
5461 * record-btrace.c (btrace_insn_history)
5462 (record_btrace_insn_history, record_btrace_insn_history_range)
5463 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5464 instead of bare int.
5465 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5466 Use gdb_disassembly_flags instead of bare int.
5467 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5468 Define.
5469 * target-delegates.c: Regenerate.
5470 * target.c (target_insn_history, target_insn_history_from)
5471 (target_insn_history_range): Use gdb_disassembly_flags instead of
5472 bare int.
5473 * target.h: Include "disasm.h".
5474 (struct target_ops) <to_insn_history, to_insn_history_from,
5475 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5476 int.
5477 (target_insn_history, target_insn_history_from)
5478 (target_insn_history_range): Use gdb_disassembly_flags instead of
5479 bare int.
5480
5481 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5482
5483 * cli/cli-script.c (build_command_line): For if/while commands,
5484 check whether args is empty.
5485
5486 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5487
5488 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5489 (enum command_control_type): Likewise.
5490 (struct command_line): Likewise.
5491 (free_command_lines): Likewise.
5492 (struct command_lines_deleter): Likewise.
5493 (command_line_up): Likewise.
5494 (read_command_lines): Likewise.
5495 (read_command_lines_1): Likewise.
5496 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5497 (enum command_control_type): Likewise.
5498 (struct command_line): Likewise.
5499 (free_command_lines): Likewise.
5500 (struct command_lines_deleter): Likewise.
5501 (command_line_up): Likewise.
5502 (read_command_lines): Likewise.
5503 (read_command_lines_1): Likewise.
5504 * breakpoint.h: Include cli/cli-script.h.
5505 * extension-priv.h: Likewise.
5506 * gdbcmd.h: Likewise.
5507
5508 2017-09-04 Pedro Alves <palves@redhat.com>
5509
5510 * ada-lang.c (is_known_support_routine): Move sal declaration to
5511 where it is initialized.
5512 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5513 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5514 (clear_command, update_static_tracepoint): Remove init_sal
5515 references. Move declarations closer to initializations.
5516 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5517 initializations.
5518 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5519 references. Move sal declarations closer to initializations.
5520 * frame.c (find_frame_sal): Return a symtab_and_line via function
5521 return instead of output parameter. Remove init_sal references.
5522 * frame.h (find_frame_sal): Return a symtab_and_line via function
5523 return instead of output parameter.
5524 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5525 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5526 instead of memset.
5527 (gdbscm_find_pc_line): Remove init_sal reference.
5528 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5529 references. Move declarations closer to initializations.
5530 * infcmd.c (set_step_frame): Update. Move declarations closer to
5531 initializations.
5532 (finish_backward): Remove init_sal references. Move declarations
5533 closer to initializations.
5534 * infrun.c (process_event_stop_test, handle_step_into_function)
5535 (insert_hp_step_resume_breakpoint_at_frame)
5536 (insert_step_resume_breakpoint_at_caller): Likewise.
5537 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5538 (symbol_to_sal): Likewise.
5539 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5540 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5541 to its initialization.
5542 * reverse.c (save_bookmark_command): Use new/delete. Remove
5543 init_sal references. Move declarations closer to initializations.
5544 * source.c (get_current_source_symtab_and_line): Remove brace
5545 initialization.
5546 (set_current_source_symtab_and_line): Now takes the sal by const
5547 reference. Remove brace initialization.
5548 (line_info): Remove init_sal reference.
5549 * source.h (set_current_source_symtab_and_line): Now takes a
5550 symtab_and_line via const reference.
5551 * stack.c (set_current_sal_from_frame): Adjust.
5552 (print_frame_info): Adjust.
5553 (get_last_displayed_sal): Return the sal via function return
5554 instead of via output parameter. Simplify.
5555 (frame_info): Adjust.
5556 * stack.h (get_last_displayed_sal): Return the sal via function
5557 return instead of via output parameter.
5558 * symtab.c (init_sal): Delete.
5559 (find_pc_sect_line): Remove init_sal references. Move
5560 declarations closer to initializations.
5561 (find_function_start_sal): Remove init_sal references. Move
5562 declarations closer to initializations.
5563 * symtab.h (struct symtab_and_line): In-class initialize all
5564 fields.
5565 * tracepoint.c (set_traceframe_context)
5566 (print_one_static_tracepoint_marker): Remove init_sal references.
5567 Move declarations closer to initializations.
5568 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5569 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5570 declarations closer to initializations.
5571 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5572 init_sal references. Adjust.
5573
5574 2017-09-04 Pedro Alves <palves@redhat.com>
5575
5576 * ax-gdb.c (agent_command_1): Use range-for.
5577 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5578 * breakpoint.c: Include "common/array-view.h".
5579 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5580 parameter from struct symtabs_and_lines to
5581 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5582 (breakpoint_sals_to_pc): Change sals parameter from struct
5583 symtabs_and_lines to std::vector reference.
5584 (check_fast_tracepoint_sals): Change sals parameter from struct
5585 symtabs_and_lines to std::array_view. Use range-for.
5586 (decode_static_tracepoint_spec): Return a std::vector instead of
5587 symtabs_and_lines. Update.
5588 (create_breakpoint): Update.
5589 (break_range_command, until_break_command, clear_command): Update.
5590 (base_breakpoint_decode_location, bkpt_decode_location)
5591 (bkpt_probe_create_sals_from_location)
5592 (bkpt_probe_decode_location, tracepoint_decode_location)
5593 (tracepoint_probe_decode_location)
5594 (strace_marker_create_sals_from_location): Return a std::vector
5595 instead of symtabs_and_lines.
5596 (strace_marker_create_breakpoints_sal): Update.
5597 (strace_marker_decode_location): Return a std::vector instead of
5598 symtabs_and_lines. Update.
5599 (update_breakpoint_locations): Change struct symtabs_and_lines
5600 parameters to gdb::array_view. Adjust.
5601 (location_to_sals): Return a std::vector instead of
5602 symtabs_and_lines. Update.
5603 (breakpoint_re_set_default): Use std::vector instead of struct
5604 symtabs_and_lines.
5605 (decode_location_default): Return a std::vector instead of
5606 symtabs_and_lines. Update.
5607 * breakpoint.h: Include "common/array-view.h".
5608 (struct breakpoint_ops) <decode_location>: Now returns a
5609 std::vector instead of returning a symtabs_and_lines via output
5610 parameter.
5611 (update_breakpoint_locations): Change sals parameters to use
5612 gdb::array_view.
5613 * cli/cli-cmds.c (edit_command, list_command): Update to use
5614 std::vector and gdb::array_view.
5615 (ambiguous_line_spec): Adjust to use gdb::array_view and
5616 range-for.
5617 (compare_symtabs): Rename to ...
5618 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5619 const reference and adjust.
5620 (filter_sals): Rewrite using std::vector and standard algorithms.
5621 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5622 (jump_command): Update to use std::vector.
5623 * linespec.c (struct linespec_state) <canonical_names>: Update
5624 comment.
5625 (add_sal_to_sals_basic): Delete.
5626 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5627 (decode_line_2, create_sals_line_offset)
5628 (convert_address_location_to_sals, convert_linespec_to_sals)
5629 (convert_explicit_location_to_sals, parse_linespec)
5630 (event_location_to_sals, decode_line_full, decode_line_1)
5631 (decode_line_with_current_source)
5632 (decode_line_with_last_displayed, decode_objc)
5633 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5634 (linespec_result::~linespec_result): Adjust to use std::vector
5635 instead of symtabs_and_lines.
5636 * linespec.h (linespec_sals::sals): Now a std::vector.
5637 (struct linespec_result): Use std::vector, bool, and in-class
5638 initialization.
5639 (decode_line_1, decode_line_with_current_source)
5640 (decode_line_with_last_displayed): Return std::vector.
5641 * macrocmd.c (info_macros_command): Use std::vector.
5642 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5643 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5644 std::vector.
5645 * probe.h (parse_probes): Return a std::vector.
5646 * python/python.c (gdbpy_decode_line): Use std::vector and
5647 gdb::array_view.
5648 * source.c (select_source_symtab, line_info): Use std::vector.
5649 * stack.c (func_command): Use std::vector.
5650 * symtab.h (struct symtabs_and_lines): Delete.
5651 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5652
5653 2017-09-04 Pedro Alves <palves@redhat.com>
5654
5655 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5656 unittests/array-view-selftests.c.
5657 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5658 * common/array-view.h: New file.
5659 * unittests/array-view-selftests.c: New file.
5660
5661 2017-09-04 Pedro Alves <palves@redhat.com>
5662
5663 * cli/cli-cmds.c (edit_command): Pass message to
5664 ambiguous_line_spec.
5665 (list_command): Pass message to ambiguous_line_spec. Say
5666 "first"/"last" instead of "start" and "end" to be consistent with
5667 the manual.
5668 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5669 them to print formatted message.
5670
5671 2017-09-04 Pedro Alves <palves@redhat.com>
5672
5673 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5674 ftrace_update_insns by reference instead of pointer.
5675
5676 2017-09-04 Yao Qi <yao.qi@linaro.org>
5677
5678 * i386-go32-tdep.c: Include x86-xstate.h.
5679 (i386_go32_init_abi): Call i386_target_description.
5680 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5681 if xcr0 is X86_XSTATE_X87_MASK.
5682 * i386-tdep.h (tdesc_i386): Remove the declaration.
5683 (tdesc_i386_mmx): Likewise.
5684
5685 2017-09-04 Yao Qi <yao.qi@linaro.org>
5686
5687 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5688 X86_XSTATE_SSE_MASK instead of 0.
5689
5690 2017-09-04 Yao Qi <yao.qi@linaro.org>
5691
5692 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5693 i386_target_description.
5694 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5695 i386_target_description.
5696 * i386-tdep.c (i386_gdbarch_init): Likewise.
5697
5698 2017-09-04 Yao Qi <yao.qi@linaro.org>
5699
5700 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5701 (x86_darwin_init_abi_64): Call amd64_target_description.
5702 * amd64-dicos-tdep.c: Likewise.
5703 * amd64-fbsd-nat.c: Likewise.
5704 * amd64-fbsd-tdep.c: Likewise.
5705 * amd64-nbsd-tdep.c: Likewise.
5706 * amd64-obsd-tdep.c: Likewise.
5707 * amd64-sol2-tdep.c: Likewise.
5708 * amd64-windows-tdep.c: Likewise.
5709 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5710
5711 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5712
5713 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5714 (btrace_function) <insn>: Change type to use std::vector.
5715 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5716 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5717 ftrace_update_insns, ftrace_compute_global_level_offset,
5718 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5719 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5720 change to std::vector.
5721 (ftrace_update_insns): Adjust to change to std::vector, change
5722 type of INSN parameter.
5723 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5724 * record-btrace.c (btrace_call_history_insn_range,
5725 btrace_compute_src_line_range,
5726 record_btrace_frame_prev_register): Adjust to change to
5727 std::vector.
5728 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5729 to change to std::vector.
5730
5731 2017-09-03 Tom Tromey <tom@tromey.com>
5732
5733 * corefile.c (reopen_exec_file): Use std::string.
5734
5735 2017-09-03 Tom Tromey <tom@tromey.com>
5736
5737 * compile/compile.c (compile_register_name_mangled): Return
5738 std::string.
5739 * compile/compile-loc2c.c (pushf_register_address): Update.
5740 (pushf_register): Update.
5741 * compile/compile-c-types.c (convert_array): Update.
5742 * compile/compile-c-symbols.c (generate_vla_size): Update.
5743 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5744 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5745 (convert_one_symbol): Update.
5746 (generate_c_for_for_one_variable): Update.
5747 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5748 std::string.
5749 (generate_register_struct): Update.
5750 * compile/compile-internal.h (c_get_range_decl_name): Return a
5751 std::string.
5752 (compile_register_name_mangled): Return std::string.
5753
5754 2017-09-03 Tom Tromey <tom@tromey.com>
5755
5756 * utils.c (perror_string): Return a std::string.
5757 (throw_perror_with_name, perror_warning_with_name): Update.
5758
5759 2017-09-03 Tom Tromey <tom@tromey.com>
5760
5761 * demangle.c (demangle_command): Use std::string,
5762 unique_xmalloc_ptr.
5763
5764 2017-09-03 Tom Tromey <tom@tromey.com>
5765
5766 * cli/cli-setshow.c (do_set_command): Use std::string.
5767
5768 2017-09-03 Tom Tromey <tom@tromey.com>
5769
5770 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5771
5772 2017-09-03 Tom Tromey <tom@tromey.com>
5773
5774 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5775
5776 2017-09-03 Tom Tromey <tom@tromey.com>
5777
5778 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5779 gdb::unique_xmalloc_ptr.
5780
5781 2017-09-03 Tom Tromey <tom@tromey.com>
5782
5783 * thread.c (print_thread_info_1): Use string_printf.
5784 (thread_apply_command, thread_apply_all_command): Use
5785 std::string.
5786
5787 2017-09-03 Tom Tromey <tom@tromey.com>
5788
5789 * valprint.c (val_print_string): Update.
5790 * gdbcore.h (memory_error_message): Return std::string.
5791 * corefile.c (memory_error_message): Return std::string.
5792 (memory_error): Update.
5793 * breakpoint.c (insert_bp_location): Update.
5794
5795 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5796
5797 * target/waitstatus.h (target_waitstatus_to_string): Change
5798 return type to std::string.
5799 * target/waitstatus.c (target_waitstatus_to_string): Return
5800 std::string.
5801 * target.h (target_waitstatus_to_string): Remove declaration.
5802 * infrun.c (resume, clear_proceed_status_thread,
5803 print_target_wait_results, do_target_wait, save_waitstatus,
5804 stop_all_threads): Adjust.
5805 * record-btrace.c (record_btrace_wait): Adjust.
5806 * target-debug.h
5807 (target_debug_print_struct_target_waitstatus_p): Adjust.
5808
5809 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5810
5811 PR gdb/22046
5812 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5813 detection.
5814
5815 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5816
5817 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5818 for setting/unsetting environment variables on the remote target.
5819 (New remote packets): Add entries for QEnvironmentHexEncoded,
5820 QEnvironmentUnset and QEnvironmentReset.
5821 * common/environ.c (gdb_environ::operator=): Extend method to
5822 handle m_user_set_env_list and m_user_unset_env_list.
5823 (gdb_environ::clear): Likewise.
5824 (match_var_in_string): Change type of first parameter from 'char
5825 *' to 'const char *'.
5826 (gdb_environ::set): Extend method to handle
5827 m_user_set_env_list and m_user_unset_env_list.
5828 (gdb_environ::unset): Likewise.
5829 (gdb_environ::clear_user_set_env): New method.
5830 (gdb_environ::user_set_envp): Likewise.
5831 (gdb_environ::user_unset_envp): Likewise.
5832 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5833 m_user_unset_env_list on move constructor/assignment.
5834 (unset): Add new default parameter 'update_unset_list = true'.
5835 (clear_user_set_env): New method.
5836 (user_set_envp): Likewise.
5837 (user_unset_envp): Likewise.
5838 (m_user_set_env_list): New std::set.
5839 (m_user_unset_env_list): Likewise.
5840 * common/rsp-low.c (hex2str): New function.
5841 (bin2hex): New overload for bin2hex function.
5842 * common/rsp-low.c (hex2str): New prototype.
5843 (str2hex): New overload prototype.
5844 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5845 QEnvironmentUnset and QEnvironmentReset.
5846 (remote_protocol_features): Add QEnvironmentHexEncoded,
5847 QEnvironmentUnset and QEnvironmentReset packets.
5848 (send_environment_packet): New function.
5849 (extended_remote_environment_support): Likewise.
5850 (extended_remote_create_inferior): Call
5851 extended_remote_environment_support.
5852 (_initialize_remote): Add QEnvironmentHexEncoded,
5853 QEnvironmentUnset and QEnvironmentReset packet configs.
5854 * unittests/environ-selftests.c (gdb_selftest_env_var):
5855 New variable.
5856 (test_vector_initialization): New function.
5857 (test_init_from_host_environ): Likewise.
5858 (test_reinit_from_host_environ): Likewise.
5859 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5860 Likewise.
5861 (test_unset_set_empty_vector): Likewise.
5862 (test_vector_clear): Likewise.
5863 (test_std_move): Likewise.
5864 (test_move_constructor):
5865 (test_self_move): Likewise.
5866 (test_set_unset_reset): Likewise.
5867 (run_tests): Rewrite in terms of the functions above.
5868
5869 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5870
5871 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5872 (adi_available): Use a temp variable of type CORE_ADDR as argument
5873 3 when calling target_auxv_search.
5874 (adi_normalize_address): Use masks and xor operators to calculate
5875 normalized address.
5876 (adi_read_versions, adi_write_versions, adi_print_versions)
5877 (do_examine, do_assign): Use paddress.
5878
5879 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5880
5881 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5882 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5883 out of loop and add supply of FIR.
5884 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5885 add collect of FIR.
5886
5887 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5888
5889 PR gdb/21827
5890 * cli/cli-script.c (define_command): Don't convert command name
5891 to lower case.
5892
5893 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5894
5895 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5896 Update all callers accordingly. Remove all code blocks handling
5897 the case where DISPP is not NULL.
5898
5899 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5900
5901 PR symtab/22003
5902 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5903 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5904 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5905
5906 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5907
5908 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5909 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5910 (read_comp_units_from_section): New parameter abbrev_section, use
5911 read_and_check_comp_unit_head, allocate signatured_type if needed.
5912 (create_all_comp_units): Update read_comp_units_from_section caller.
5913
5914 2017-08-23 Pedro Alves <palves@redhat.com>
5915
5916 PR remote/21852
5917 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5918 to null_ptid and switch to thread without reading the registers
5919 after adding the inferior.
5920
5921 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5922
5923 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5924 compile-gcc.
5925 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5926 (compile_to_object): Implement compile_gcc.
5927 (_initialize_compile): Install "set compile-gcc". Initialize
5928 compile_gcc.
5929
5930 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5931
5932 * compile/compile.c (compile_to_object): Conditionally call
5933 set_verbose. Conditionally call compile or compile_v0.
5934
5935 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5936
5937 * sparc64-tdep.h: (adi_normalize_address): New export.
5938 * sparc-nat.h: (open_adi_tag_fd): New export.
5939 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5940 * sparc64-linux-tdep.c:
5941 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5942 (sparc64_linux_handle_segmentation_fault): New function.
5943 (sparc64_linux_init_abi): Register
5944 sparc64_linux_handle_segmentation_fault
5945 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5946 (sparc64_addr_bits_remove): New function.
5947 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5948 (MAX_PROC_NAME_SIZE): New macro.
5949 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5950 (sparc64adilist): New variable.
5951 (adi_proc_list): New variable.
5952 (find_adi_info): New function.
5953 (add_adi_info): New function.
5954 (get_adi_info_proc): New function.
5955 (get_adi_info): New function.
5956 (info_adi_command): New function.
5957 (read_maps_entry): New function.
5958 (adi_available): New function.
5959 (adi_normalize_address): New function.
5960 (adi_align_address): New function.
5961 (adi_convert_byte_count): New function.
5962 (adi_tag_fd): New function.
5963 (adi_is_addr_mapped): New function.
5964 (adi_read_versions): New function.
5965 (adi_write_versions): New function.
5966 (adi_print_versions): New function.
5967 (do_examine): New function.
5968 (do_assign): New function.
5969 (adi_examine_command): New function.
5970 (adi_assign_command): New function.
5971 (_initialize_sparc64_adi_tdep): New function.
5972
5973 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5974
5975 * breakpoint.c (breakpoints_info): Rename to ...
5976 (info_breakpoints_command): ... this.
5977 (watchpoints_info): Rename to ...
5978 (info_watchpoints_command): ... this.
5979 (tracepoints_info): Rename to ...
5980 (info_tracepoints_command): ... this.
5981 (_initialize_breakpoint): Adjust.
5982 * dcache.c (dcache_info): Rename to ...
5983 (info_display_command): ... this.
5984 (_initialize_dcache): Adjust.
5985 * frame.h (args_info): Rename to ...
5986 (info_args_command): ... this.
5987 (locals_info): Rename to ...
5988 (info_locals_command): ... this.
5989 * infcmd.c (nofp_registers_info): Rename to ...
5990 (info_registers_command): ... this.
5991 (float_info): Rename to ...
5992 (info_float_command): ... this.
5993 (program_info): Rename to ...
5994 (info_program_command): ... this.
5995 (all_registers_info): Rename to ...
5996 (info_all_registers_command): ... this.
5997 (vector_info): Rename to ...
5998 (info_vector_command): ... this.
5999 (float_info): Rename to ...
6000 (info_float_command): ... this.
6001 (_initialize_infcmd): Adjust.
6002 * inferior.h (term_info): Rename to ...
6003 (info_terminal_command): ... this.
6004 * inflow.c (term_info): Rename to ...
6005 (info_terminal_command): ... this.
6006 (_initialize_inflow): Adjust.
6007 * infrun.c (signals_info): Rename to ...
6008 (info_signals_command): ... this.
6009 (_initialize_infrun): Adjust.
6010 * objc-lang.c (classes_info): Rename to ...
6011 (info_classes_command): ... this.
6012 (selectors_info): Rename to ...
6013 (info_selectors_command): ... this.
6014 (_initialize_objc_language): Adjust.
6015 * printcmd.c (sym_info): Rename to ...
6016 (info_symbol_command): ... this.
6017 (address_info): Rename to ...
6018 (info_address_command): ... this.
6019 (display_info): Rename to ...
6020 (info_display_command): ... this.
6021 (_initialize_printcmd): Adjust.
6022 * reverse.c (bookmarks_info): Rename to ...
6023 (info_breakpoints_command): ... this.
6024 (_initialize_reverse): Adjust.
6025 * ser-go32.c (dos_info): Rename to ...
6026 (info_serial_command): ... this.
6027 (_initialize_ser_dos): Adjust.
6028 * skip.c (skip_info): Rename to ...
6029 (info_skip_command): ... this.
6030 (_initialize_step_skip): Adjust.
6031 * source.c (line_info): Rename to ...
6032 (info_line_command): ... this.
6033 (source_info): Rename to ...
6034 (info_source_command)
6035 * stack.c (frame_info): Rename to ...
6036 (info_frame_command): ... this.
6037 (locals_info): Rename to ...
6038 (info_locals_command): ... this.
6039 (args_info): Rename to ...
6040 (info_args_command): ... this.
6041 (_initialize_stack): Adjust.
6042 * symtab.c (sources_info): Rename to ...
6043 (info_sources_command): ... this.
6044 (variables_info): Rename to ...
6045 (info_variables_command): ... this.
6046 (functions_info): Rename to ...
6047 (info_functions_command): ... this.
6048 (types_info): Rename to ...
6049 (info_types_command): ... this.
6050 (_initialize_symtab): Adjust.
6051 * target.c (target_info): Rename to ...
6052 (info_target_command): ... this.
6053 (initialize_targets): Adjust.
6054 * tracepoint.c (tvariables_info): Rename to ...
6055 (info_tvariables_command): ... this.
6056 (scope_info): Rename to ...
6057 (info_scope_command): ... this.
6058 (trace_dump_actions): Adjust.
6059 (_initialize_tracepoint): Adjust.
6060
6061 2017-08-22 Tom Tromey <tom@tromey.com>
6062
6063 * breakpoint.h (install_breakpoint): Update.
6064 * breakpoint.c (add_solib_catchpoint): Update.
6065 (install_breakpoint): Change argument to a std::unique_ptr.
6066 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6067 (create_breakpoint_sal, create_breakpoint): Update.
6068 (watch_command_1, catch_exec_command_1)
6069 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6070 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6071 Return the breakpoint.
6072 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6073 (new_single_step_breakpoint): Update.
6074 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6075 std::unique_ptr.
6076 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6077 std::unique_ptr.
6078 * break-catch-sig.c (create_signal_catchpoint): Use
6079 std::unique_ptr.
6080 * ada-lang.c (create_ada_exception_catchpoint): Use
6081 std::unique_ptr.
6082
6083 2017-08-22 Tom Tromey <tom@tromey.com>
6084
6085 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6086
6087 2017-08-22 Tom Tromey <tom@tromey.com>
6088
6089 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6090 (lookup_partial_symbol): Update.
6091
6092 2017-08-22 Tom Tromey <tom@tromey.com>
6093
6094 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6095 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6096 (find_and_open_source, symtab_to_fullname): Update.
6097 * psymtab.c (psymtab_to_fullname): Update.
6098
6099 2017-08-22 Tom Tromey <tom@tromey.com>
6100
6101 * exec.c (exec_file_attach): Update.
6102 * linux-thread-db.c (try_thread_db_load): Update.
6103 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6104 * utils.c (gdb_realpath): Change return type.
6105 (gdb_realpath_keepfile): Update.
6106 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6107 (_initialize_utils): Register the new self test.
6108 * source.c (openp): Update.
6109 (find_and_open_source): Update.
6110 * nto-tdep.c (nto_find_and_open_solib): Update.
6111 * main.c (set_gdb_data_directory): Update.
6112 (captured_main_1): Update.
6113 * dwarf2read.c (dwarf2_get_dwz_file): Update
6114 (dw2_map_symbol_filenames): Update.
6115 * auto-load.c (auto_load_safe_path_vec_update): Update.
6116 (filename_is_in_auto_load_safe_path_vec): Change type of
6117 "filename_realp".
6118 (auto_load_objfile_script): Update.
6119 (file_is_auto_load_safe): Update. Use std::string.
6120 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6121
6122 2017-08-22 Tom Tromey <tom@tromey.com>
6123
6124 * utils.c (gdb_realpath_keepfile): Return a
6125 gdb::unique_xmalloc_ptr.
6126 * exec.c (exec_file_attach): Update.
6127 * utils.h (gdb_realpath_keepfile): Return a
6128 gdb::unique_xmalloc_ptr.
6129
6130 2017-08-22 Tom Tromey <tom@tromey.com>
6131
6132 * compile/compile.c (compile_file_command): Use
6133 gdb::unique_xmalloc_ptr, std::string.
6134 * utils.c (gdb_abspath): Change return type.
6135 * source.c (openp): Update.
6136 * objfiles.c (allocate_objfile): Update.
6137 * main.c (set_gdb_data_directory): Update.
6138 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6139
6140 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6141
6142 * cli-cmds.c (list_commands): List actual code around more than
6143 one location.
6144
6145 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6146
6147 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6148
6149 2017-08-21 Pedro Alves <palves@redhat.com>
6150
6151 PR gdb/19487
6152 * c-exp.y (variable production): Handle function aliases.
6153 * minsyms.c (msymbol_is_text): New function.
6154 * minsyms.h (msymbol_is_text): Declare.
6155 * symtab.c (find_function_alias_target): New function.
6156 * symtab.h (find_function_alias_target): Declare.
6157
6158 2017-08-21 Pedro Alves <palves@redhat.com>
6159
6160 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6161 typedefs.
6162 * typeprint.c (whatis_exp): If handling "whatis", and expression
6163 is OP_TYPE, strip one typedef level. Otherwise don't strip
6164 typedefs here.
6165 * valops.c (value_cast): Save "to" type before resolving
6166 stubs/typedefs. Use that type as resulting value's type.
6167
6168 2017-08-18 Tom Tromey <tom@tromey.com>
6169 Pedro Alves <palves@redhat.com>
6170
6171 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6172 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6173 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6174 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6175 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6176 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6177 (linux_get_siginfo_data): Add "thread" argument. Use
6178 scoped_restore.
6179 * linux-nat.c (linux_child_follow_fork)
6180 (check_stopped_by_watchpoint): Use scoped_restore.
6181 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6182 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6183 (restore_inferior_ptid, save_inferior_ptid): Remove.
6184 * btrace.c (btrace_fetch): Use scoped_restore.
6185 * bsd-uthread.c (bsd_uthread_fetch_registers)
6186 (bsd_uthread_store_registers): Use scoped_restore.
6187 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6188 scoped_restore.
6189 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6190 (aix_thread_xfer_partial): Use scoped_restore.
6191 * inferior.h (save_inferior_ptid): Remove.
6192
6193 2017-08-18 Yao Qi <yao.qi@linaro.org>
6194
6195 PR tdep/21818
6196 * arm-tdep.c (gdb_print_insn_arm): Mark
6197 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6198
6199 2017-08-18 Yao Qi <yao.qi@linaro.org>
6200
6201 * NEWS: Mention GDBserver's new option "--selftest".
6202 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6203 * selftest.c: Move it to common/selftest.c.
6204 * selftest.h: Move it to common/selftest.h.
6205 * selftest-arch.c (reset): New function.
6206 (tests_with_arch): Call reset.
6207
6208 2017-08-18 Yao Qi <yao.qi@linaro.org>
6209
6210 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6211 instead of exception_fprintf and printf_filtered.
6212
6213 2017-08-18 Yao Qi <yao.qi@linaro.org>
6214
6215 * selftest.c (register_self_test): Rename it to
6216 selftests::register_test.
6217 (run_self_tests): selftest::run_tests.
6218 * selftest.h: Update declarations.
6219 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6220 selftests::register_test_foreach_arch.
6221 * selftest-arch.h: Update declaration.
6222 * aarch64-tdep.c: Update.
6223 * arm-tdep.c: Likewise.
6224 * disasm-selftests.c: Likewise.
6225 * dwarf2loc.c: Likewise.
6226 * dwarf2-frame.c: Likewise.
6227 * findvar.c: Likewise.
6228 * gdbarch-selftests.c: Likewise.
6229 * maint.c (maintenance_selftest): Likewise.
6230 * regcache.c: Likewise.
6231 * rust-exp.y: Likewise.
6232 * selftest-arch.c: Likewise.
6233 * unittests/environ-selftests.c: Likewise.
6234 * unittests/function-view-selftests.c: Likewise.
6235 * unittests/offset-type-selftests.c: Likewise.
6236 * unittests/optional-selftests.c: Likewise.
6237 * unittests/scoped_restore-selftests.c: Likewise.
6238 * utils-selftests.c: Likewise.
6239
6240 2017-08-17 Pedro Alves <palves@redhat.com>
6241
6242 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6243 local.
6244
6245 2017-08-17 Pedro Alves <palves@redhat.com>
6246
6247 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6248 field.
6249 (reset_die_in_process): Delete, replaced by ...
6250 (process_die_scope): ... this new class. Make it responsible for
6251 freeing cu->line_header too.
6252 (process_die): Use process_die_scope.
6253 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6254 cu->line_header_die_owner. Don't release the line header if it's
6255 owned by the CU.
6256 (setup_type_unit_groups): Make the CU/DIE own the line header.
6257 Don't release the line header here.
6258
6259 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6260
6261 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6262
6263 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6264
6265 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6266 Single-Key mode
6267
6268 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6269
6270 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6271 mode command list.
6272
6273 2017-08-15 Stafford Horne <shorne@gmail.com>
6274
6275 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6276
6277 2017-08-15 Stafford Horne <shorne@gmail.com>
6278
6279 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6280
6281 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6282
6283 PR gdb/21954
6284 * infcmd.c (unset_environment_command): Use the 'clear' method on
6285 the environment instead of resetting it.
6286
6287 2017-08-15 John Baldwin <jhb@FreeBSD.org>
6288
6289 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6290 platforms.
6291
6292 2017-08-14 Tom Tromey <tom@tromey.com>
6293
6294 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6295 (print_binary_chars): Likewise.
6296 (BITS_IN_BYTES): Remove.
6297
6298 2017-08-14 Tom Tromey <tom@tromey.com>
6299
6300 PR gdb/21675
6301 * valprint.c (LOW_ZERO): Change value to 034.
6302 (print_octal_chars): Add static_asserts for octal constants.
6303 * printcmd.c (print_scalar_formatted): Add 'd' case.
6304
6305 2017-08-11 Tom Tromey <tom@tromey.com>
6306
6307 * symfile.c (add_symbol_file_command): Use std::vector.
6308
6309 2017-08-14 Tom Tromey <tom@tromey.com>
6310
6311 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6312 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6313 std::move.
6314 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6315
6316 2017-08-11 Pedro Alves <palves@redhat.com>
6317
6318 * infrun.c (process_event_stop_test): Adjust
6319 function_name_is_marked_for_skip call.
6320 * skip.c: Include <list>.
6321 (skiplist_entry): Make it a class with private fields, and
6322 getters/setters.
6323 (skiplist_entry_chain): Delete.
6324 (skiplist_entries): New.
6325 (skiplist_entry_count): Delete.
6326 (highest_skiplist_entry_num): New.
6327 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6328 (add_skiplist_entry): Delete.
6329 (skiplist_entry::skiplist_entry): New.
6330 (skiplist_entry::add_entry): New.
6331 (skip_file_command, skip_function): Adjust.
6332 (compile_skip_regexp): Delete.
6333 (skip_command): Don't compile regexp here. Adjust to use
6334 skiplist_entry::add_entry.
6335 (skip_info): Adjust to use range-for and getters.
6336 (skip_enable_command, skip_disable_command): Adjust to use
6337 range-for and setters.
6338 (skip_delete_command): Adjust to use std::list.
6339 (add_skiplist_entry): Delete.
6340 (skip_file_p): Delete, refactored as ...
6341 (skiplist_entry::do_skip_file_p): ... this new method.
6342 (skip_gfile_p): Delete, refactored as ...
6343 (skiplist_entry::do_gskip_file_p): ... this new method.
6344 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6345 (skiplist_entry::skip_function_p): ... this new method.
6346 (function_name_is_marked_for_skip): Now returns bool, and takes
6347 the function sal by const reference. Adjust to use range-for and
6348 skiplist_entry methods.
6349 (_initialize_step_skip): Remove references to
6350 skiplist_entry_chain, skiplist_entry_count.
6351 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6352 takes the function sal by const reference.
6353
6354 2017-08-11 Yao Qi <yao.qi@linaro.org>
6355
6356 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6357 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6358 (dwarf2_frame_cache):
6359 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6360 RETURN_MASK_ALL and set *this_case to NULL.
6361 * frame-unwind.h: Update comments.
6362
6363 2017-08-11 Yao Qi <yao.qi@linaro.org>
6364
6365 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6366 (dwarf2_frame_state_copy_regs): Remove.
6367 (dwarf2_frame_state_free_regs): Remove.
6368 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6369 (dwarf2_restore_rule): Call method .alloc_regs instead of
6370 dwarf2_frame_state_alloc_regs.
6371 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6372 constructor. Call std::move.
6373 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6374 (dwarf2_frame_cache): Likewise.
6375
6376 [GDB_SELF_TEST]: Include selftest.h and
6377 selftest-arch.h.
6378 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6379 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6380 execute_cfa_program_test.
6381
6382 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6383 copy ctor, assignment operator, move assignment.
6384 <alloc_regs>: New method.
6385 <swap>: New method.
6386 (struct dwarf2_frame_state): Delete dtor.
6387 (dwarf2_frame_state_alloc_regs): Remove declaration.
6388 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6389 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6390
6391 2017-08-11 Yao Qi <yao.qi@linaro.org>
6392
6393 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6394 (dwarf2_frame_state::dwarf2_frame_state): New.
6395 (dwarf2_frame_state::~dwarf2_frame_state): New.
6396 (dwarf2_fetch_cfa_info): Update.
6397 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6398 rather than a pointer. Update code.
6399 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6400 dtor.
6401 <data_align, code_align, retaddr_column>: Change them to const.
6402 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6403 to bool.
6404
6405 2017-08-11 Yao Qi <yao.qi@linaro.org>
6406
6407 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6408 <loc.exp>: New field.
6409 * dwarf2-frame.c (execute_cfa_program): Update.
6410 (dwarf2_frame_prev_register): Update.
6411
6412 2017-08-10 Pedro Alves <palves@redhat.com>
6413
6414 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6415
6416 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6417
6418 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6419 (fbsd_pending_children): Use std::list.
6420 (fbsd_remember_child): Likewise.
6421 (fbsd_is_child_pending): Likewise.
6422 (fbsd_pending_vfork_done): Use std::forward_list.
6423 (fbsd_add_vfork_done): Likewise.
6424 (fbsd_is_vfork_done_pending): Likewise.
6425 (fbsd_next_vfork_done): Likewise.
6426
6427 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6428
6429 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6430 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6431 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6432 for `mapfilename'.
6433 (fbsd_xfer_partial): Use gdb::byte_vector.
6434 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6435
6436 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6437
6438 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6439 "filestuff.h".
6440 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6441
6442 2017-08-09 Tom Tromey <tom@tromey.com>
6443
6444 * skip.c (skiplist_entry): New constructor.
6445 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6446 (skiplist_entry::file_is_glob): Now bool.
6447 (skiplist_entry::file, skiplist_entry::function): Now
6448 std::string.
6449 (make_skip_entry): Return a unique_ptr. Use new.
6450 (free_skiplist_entry, free_skiplist_entry_cleanup)
6451 (make_free_skiplist_entry_cleanup): Remove.
6452 (skip_command, skip_disable_command, add_skiplist_entry)
6453 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6454 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6455 (function_name_is_marked_for_skip): Update.
6456 (skip_delete_command): Update. Use delete.
6457
6458 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6459
6460 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6461 (aarch64_linux_core_read_description): New function.
6462 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6463
6464 2017-08-09 Pedro Alves <palves@redhat.com>
6465
6466 * cp-name-parser.y (cp_comp_to_string): Return a
6467 gdb::unique_xmalloc_ptr<char>.
6468 * cp-support.c (replace_typedefs_qualified_name)
6469 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6470 (cp_canonicalize_string_full): Use op= instead of explicit
6471 convertion.
6472 (cp_class_name_from_physname, method_name_from_physname)
6473 (cp_func_name, cp_remove_params): Adjust to use
6474 gdb::unique_xmalloc_ptr<char>.
6475 * cp-support.h (cp_comp_to_string): Return a
6476 gdb::unique_xmalloc_ptr<char>.
6477 * python/py-type.c (typy_lookup_type): Adjust to use
6478 gdb::unique_xmalloc_ptr<char>.
6479
6480 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6481
6482 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6483
6484 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6485 Yao Qi <yao.qi@linaro.org>
6486
6487 * cp-support.c (cp_canonicalize_string_full): Use
6488 gdb::unique_xmalloc_ptr<char>.
6489 (cp_canonicalize_string): Likewise.
6490
6491 2017-08-09 Yao Qi <yao.qi@linaro.org>
6492
6493 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6494 * regformats/i386/amd64-avx-avx512.dat: Remove.
6495 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6496 * regformats/i386/amd64-avx-mpx.dat:Remove.
6497 * regformats/i386/amd64-avx.dat: Remove.
6498 * regformats/i386/amd64-mpx.dat: Remove.
6499 * regformats/i386/i386-avx-avx512.dat: Remove.
6500 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6501 * regformats/i386/i386-avx-mpx.dat: Remove.
6502 * regformats/i386/i386-mmx.dat: Remove.
6503 * regformats/i386/i386-mpx.dat: Remove.
6504
6505 2017-08-09 Yao Qi <yao.qi@linaro.org>
6506
6507 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6508 * amd64-tdep.c: Don't include features/i386/x32*.c.
6509 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6510 functions.
6511 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6512 and i386/x32-avx-avx512.
6513 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6514 and i386/x32.xml.
6515 * features/i386/x32-avx-avx512.c: Removed.
6516 * features/i386/x32-avx-avx512.xml: Removed.
6517 * features/i386/x32-avx.c: Removed.
6518 * features/i386/x32-avx.xml: Removed.
6519 * features/i386/x32.c: Removed.
6520 * features/i386/x32.xml: Removed.
6521 * regformats/i386/x32-avx-avx512.dat: Removed.
6522 * regformats/i386/x32-avx.dat: Removed.
6523 * regformats/i386/x32.dat: Removed.
6524
6525 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6526
6527 PR breakpoints/21886
6528 * mem-break.c (default_memory_insert_breakpoint): Use
6529 `->placed_address' rather than `->reqstd_address' for the
6530 breakpoint location.
6531
6532 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6533
6534 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6535 assertions.
6536
6537 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6538
6539 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6540 a union of `tdep_info', `tdesc_data' and `id'.
6541 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6542 rather than `info.tdep_info'.
6543 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6544 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6545 * i386-tdep.c (i386_gdbarch_init): Likewise.
6546 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6547 * mips-tdep.c (mips_gdbarch_init): Likewise.
6548 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6549 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6550 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6551 `info.tdep_info'.
6552 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6553 `info.tdep_info'.
6554 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6555 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6556 `info.tdep_info'.
6557 * spu-tdep.c (spu_gdbarch_init): Likewise.
6558 * gdbarch.h: Regenerate.
6559
6560 2017-08-07 Leszek Swirski <leszeks@google.com>
6561
6562 PR symtab/20899
6563 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6564
6565 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6566
6567 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6568 (gdbsim_open): Rename gdb_argv args object to argv.
6569
6570 2017-08-05 Tom Tromey <tom@tromey.com>
6571
6572 * compile/compile-object-load.c (compile_object_load): Use
6573 gdb::unique_xmalloc_ptr.
6574 * cli/cli-dump.c (scan_filename): Rename from
6575 scan_filename_with_cleanup. Change return type.
6576 (scan_expression): Rename from scan_expression_with_cleanup.
6577 Change return type.
6578 (dump_memory_to_file, dump_value_to_file, restore_command):
6579 Use gdb::unique_xmalloc_ptr. Update.
6580 * cli/cli-cmds.c (find_and_open_script): Use
6581 gdb::unique_xmalloc_ptr.
6582 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6583 * symmisc.c (maintenance_print_symbols)
6584 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6585 * symfile.c (symfile_bfd_open, generic_load)
6586 (add_symbol_file_command, remove_symbol_file_command): Use
6587 gdb::unique_xmalloc_ptr.
6588 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6589 * psymtab.c (maintenance_print_psymbols): Use
6590 gdb::unique_xmalloc_ptr.
6591 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6592 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6593 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6594 (reload_shared_libraries_1): Likewise.
6595
6596 2017-08-05 Tom Tromey <tom@tromey.com>
6597
6598 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6599 (rust_op_vector, rust_set_vector): New typedefs.
6600 (current_parser): New global.
6601 (work_obstack): Change to pointer type. Update all users.
6602 (rust_ast, pstate): Remove globals.
6603 (struct rust_parser): New.
6604 (%union) <params, field_inits>: Change type.
6605 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6606 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6607 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6608 (convert_params_to_types, convert_params_to_expression): Change
6609 type of "params".
6610 (ast_string): Change type of "fields".
6611 (rust_parse): Make a rust_parser. Remove cleanups.
6612 (rust_lex_tests): Make and install an auto_obstack.
6613
6614 2017-08-04 Yao Qi <yao.qi@linaro.org>
6615
6616 * configure.srv (ipa_x32_linux_regobj): New.
6617 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6618 instead of X86_TDESC_AVX512.
6619 (initialize_low_tracepoint): Call
6620 init_registers_x32_avx_avx512_linux.
6621
6622 2017-08-04 Yao Qi <yao.qi@linaro.org>
6623
6624 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6625
6626 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6627
6628 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6629
6630 2017-08-03 Tom Tromey <tom@tromey.com>
6631
6632 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6633 Remove.
6634 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6635
6636 2017-08-03 Tom Tromey <tom@tromey.com>
6637
6638 * python/py-param.c (compute_enum_values): Use gdb_argv.
6639
6640 2017-08-03 Tom Tromey <tom@tromey.com>
6641
6642 * utils.h (struct gdb_argv_deleter): New.
6643 (gdb_argv): New class.
6644 * utils.c (gdb_argv::reset): New method.
6645 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6646 * tracefile.c (tsave_command): Use gdb_argv.
6647 * top.c (new_ui_command): Use gdb_argv.
6648 * symmisc.c (maintenance_print_symbols)
6649 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6650 * symfile.c (symbol_file_command, generic_load)
6651 (remove_symbol_file_command): Use gdb_argv.
6652 * stack.c (backtrace_command): Use gdb_argv.
6653 * source.c (add_path, show_substitute_path_command)
6654 (unset_substitute_path_command, set_substitute_path_command):
6655 Use gdb_argv.
6656 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6657 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6658 * remote.c (extended_remote_run, remote_put_command)
6659 (remote_get_command, remote_delete_command): Use gdb_argv.
6660 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6661 (gdbsim_open): Use gdb_argv.
6662 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6663 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6664 * procfs.c (procfs_info_proc): Use gdb_argv.
6665 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6666 * infrun.c (handle_command): Use gdb_argv.
6667 * inferior.c (add_inferior_command, clone_inferior_command):
6668 Use gdb_argv.
6669 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6670 * exec.c (exec_file_command): Use gdb_argv.
6671 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6672 * compile/compile.c (build_argc_argv): Use gdb_argv.
6673
6674 2017-08-03 Tom Tromey <tom@tromey.com>
6675
6676 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6677
6678 2017-08-03 Tom Tromey <tom@tromey.com>
6679
6680 * python/python.c (compute_python_string): Return std::string.
6681 (gdbpy_eval_from_control_command): Update.
6682 (do_start_initialization): Use std::string.
6683 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6684 xstrprintf.
6685 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6686 xstrprintf.
6687
6688 2017-08-03 Tom Tromey <tom@tromey.com>
6689
6690 * top.h (do_restore_instream_cleanup): Remove.
6691 * top.c (do_restore_instream_cleanup): Remove.
6692 (read_command_file): Use scoped_restore.
6693 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6694
6695 2017-08-03 Tom Tromey <tom@tromey.com>
6696
6697 * cli/cli-script.c (execute_user_command)
6698 (execute_control_command): Use scoped_restore.
6699
6700 2017-08-03 Tom Tromey <tom@tromey.com>
6701
6702 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6703 (execute_user_command): Remove user_call_depth; use
6704 user_args_stack's size instead.
6705
6706 2017-08-03 Tom Tromey <tom@tromey.com>
6707
6708 * top.h (in_user_command): Remove.
6709 * top.c (in_user_command): Remove.
6710 * cli/cli-script.c (do_restore_user_call_depth)
6711 (execute_user_command): Update.
6712
6713 2017-08-03 Tom Tromey <tom@tromey.com>
6714
6715 * valops.c (search_struct_method): Use gdb::byte_vector.
6716 * valarith.c (value_concat): Use std::vector.
6717 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6718 (simple_search_memory): Likewise.
6719 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6720 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6721 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6722 * elfread.c (elf_rel_plt_read): Use std::string.
6723 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6724 * cli/cli-dump.c (restore_section_callback): Use
6725 gdb::byte_vector.
6726
6727 2017-08-03 Tom Tromey <tom@tromey.com>
6728
6729 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6730
6731 2017-08-03 Tom Tromey <tom@tromey.com>
6732
6733 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6734 (tui_register_format): Use scoped_restore.
6735
6736 2017-08-03 Tom Tromey <tom@tromey.com>
6737
6738 * reverse.c (exec_direction_default): Remove.
6739 (exec_reverse_once): Use scoped_restore.
6740 * remote.c (restore_remote_timeout): Remove.
6741 (remote_flash_erase, remote_flash_write, remote_flash_done)
6742 (readchar, remote_serial_write): Use scoped_restore.
6743 * cli/cli-script.c (struct source_cleanup_lines_args)
6744 (source_cleanup_lines): Remove.
6745 (script_from_file): Use scoped_restore.
6746 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6747 (source_command): Use scoped_restore.
6748
6749 2017-08-03 Tom Tromey <tom@tromey.com>
6750
6751 * utils.h (make_cleanup_free_so): Remove.
6752 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6753 * solist.h (struct so_deleter): New.
6754 (so_list_up): New typedef.
6755 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6756
6757 2017-08-03 Tom Tromey <tom@tromey.com>
6758
6759 * utils.h (make_cleanup_restore_current_language): Remove.
6760 * utils.c (do_restore_current_language)
6761 (make_cleanup_restore_current_language): Remove.
6762 * parse.c (parse_exp_in_context_1)
6763 (parse_expression_with_language): Use
6764 scoped_restore_current_language.
6765 * mi/mi-main.c (mi_cmd_execute): Use
6766 scoped_restore_current_language.
6767 * language.h (scoped_restore_current_language): New class.
6768
6769 2017-08-03 Tom Tromey <tom@tromey.com>
6770
6771 * compile/compile.c (cleanup_unlink_file): Remove.
6772 (compile_to_object): Use gdb::unlinker.
6773 (eval_compile_command): Likewise.
6774
6775 2017-08-03 Tom Tromey <tom@tromey.com>
6776
6777 * utils.h (make_cleanup_fclose): Remove.
6778 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6779
6780 2017-08-03 Tom Tromey <tom@tromey.com>
6781
6782 * top.c (open_terminal_stream): Return gdb_file_up.
6783 (new_ui_command): Update.
6784
6785 2017-08-03 Tom Tromey <tom@tromey.com>
6786
6787 * source.c (print_source_lines_base, forward_search_command)
6788 (reverse_search_command): Use gdb_file_up.
6789
6790 2017-08-03 Tom Tromey <tom@tromey.com>
6791
6792 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6793
6794 2017-08-03 Tom Tromey <tom@tromey.com>
6795
6796 * cli/cli-cmds.c (find_and_open_script): Change return type.
6797 Remove "streamp" and "full_path" parameters.
6798 (source_script_with_search): Update.
6799 * auto-load.c (source_script_file): Update.
6800 * cli/cli-cmds.h (find_and_open_script): Change type.
6801 (open_script): New struct.
6802
6803 2017-08-03 Tom Tromey <tom@tromey.com>
6804
6805 * xml-support.c (xml_fetch_content_from_file): Update.
6806 * ui-file.c (stdio_file::open): Update.
6807 * tracefile-tfile.c (tfile_start): Update.
6808 * remote.c (remote_file_put, remote_file_get): Update.
6809 * nat/linux-procfs.c (linux_proc_get_int)
6810 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6811 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6812 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6813 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6814 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6815 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6816 * linux-nat.c (linux_proc_pending_signals): Update.
6817 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6818 (file_closer): Remove.
6819 * compile/compile.c (compile_to_object): Update.
6820 * common/filestuff.h (struct gdb_file_deleter): New.
6821 (gdb_file_up): New typedef.
6822 (gdb_fopen_cloexec): Change return type.
6823 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6824 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6825 (dump_binary_file, restore_binary_file): Update.
6826 * auto-load.c (auto_load_objfile_script_1): Update.
6827
6828 2017-08-03 Tom Tromey <tom@tromey.com>
6829
6830 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6831 (info_static_tracepoint_markers_command): Likewise.
6832 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6833 * skip.c (skip_info): Use ui_out_emit_table.
6834 * progspace.c (print_program_space): Use ui_out_emit_table.
6835 * osdata.c (info_osdata): Use ui_out_emit_table.
6836 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6837 ui_out_emit_table.
6838 * linux-thread-db.c (info_auto_load_libthread_db): Use
6839 ui_out_emit_table.
6840 * inferior.c (print_inferior): Use ui_out_emit_table.
6841 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6842 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6843 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6844 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6845 * ui-out.h (class ui_out_emit_table): New.
6846
6847 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6848
6849 * mips-tdep.c (mips_fpu_type_str): New function.
6850 (mips_dump_tdep): Call it.
6851
6852 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6853
6854 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6855 `->mips_fpu_type'.
6856
6857 2017-07-31 Xavier Roirand <roirand@adacore.com>
6858
6859 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6860
6861 2017-07-27 Xavier Roirand <roirand@adacore.com>
6862
6863 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6864
6865 2017-07-26 Yao Qi <yao.qi@linaro.org>
6866
6867 * cli/cli-cmds.c (maintenancechecklist): New variable.
6868 * gdbcmd.h (maintenancechecklist): Declare it.
6869 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6870 Call i386_linux_read_description with different masks.
6871 * maint.c (maintenance_check_command): New function.
6872 (_initialize_maint_cmds): Call add_prefix_cmd.
6873 * target-descriptions.c (tdesc_reg): override operator != and ==.
6874 (tdesc_type): Likewise.
6875 (tdesc_feature): Likewise.
6876 (target_desc): Likewise.
6877 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6878 (maintenance_check_xml_descriptions): New function.
6879 (_initialize_target_descriptions) Add command "xml-descriptions".
6880 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6881
6882 2017-07-26 Yao Qi <yao.qi@linaro.org>
6883
6884 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6885 Include features/i386/32bit-*.c.
6886 (i386_linux_read_description): Generate target description if it
6887 doesn't exist.
6888 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6889 functions.
6890 * features/i386/32bit-linux.c: Re-generated.
6891 * features/i386/32bit-sse.c: Likewise.
6892 * target-descriptions.c (print_c_feature::visit): Print code to
6893 set register number if needed.
6894 (print_c_feature) <m_next_regnum>: New field.
6895
6896 2017-07-26 Yao Qi <yao.qi@linaro.org>
6897
6898 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6899 (FEATURE_XMLFILES): New.
6900 (FEATURE_CFILES): New.
6901 New rules.
6902 (clean-cfiles): Remove generated c files.
6903 * features/i386/32bit-avx.c: Generated.
6904 * features/i386/32bit-avx512.c: Generated.
6905 * features/i386/32bit-core.c: Generated.
6906 * features/i386/32bit-linux.c: Generated.
6907 * features/i386/32bit-mpx.c: Generated.
6908 * features/i386/32bit-pkeys.c: Generated.
6909 * features/i386/32bit-sse.c: Generated.
6910 * target-descriptions.c: Include algorithm.
6911 (tdesc_element_visitor): Add method visit_end.
6912 (print_c_tdesc): Implement visit_end.
6913 (print_c_tdesc:: m_filename_after_features): Move it to
6914 protected.
6915 (print_c_feature): New class.
6916 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6917 name starts with "i386/32bit-".
6918
6919 2017-07-26 Yao Qi <yao.qi@linaro.org>
6920
6921 * target-descriptions.c (tdesc_element_visitor): New class.
6922 (tdesc_element): New class.
6923 (tdesc_reg): Inherit from tdesc_element.
6924 (tdesc_reg::accept): New function.
6925 (tdesc_type): Inherit from tdesc_element.
6926 (tdesc_type::accept): New function.
6927 (tdesc_feature): Inherit from tdesc_element.
6928 (tdesc_feature::accept): New function.
6929 (target_desc): Inherit from tdesc_element.
6930 (target_desc::target_desc): New.
6931 (target_desc::~target_desc): New.
6932 (target_desc::accept): New.
6933 (allocate_target_description): Use new.
6934 (free_target_description): Use delete.
6935 (print_c_tdesc): New class.
6936 (maint_print_c_tdesc_cmd): Adjust.
6937
6938 * features/aarch64.c: Re-generated.
6939 * features/arc-arcompact.c: Re-generated.
6940 * features/arc-v2.c: Re-generated.
6941 * features/arm/arm-with-iwmmxt.c: Re-generated.
6942 * features/arm/arm-with-m.c: Re-generated.
6943 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6944 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6945 * features/arm/arm-with-neon.c: Re-generated.
6946 * features/arm/arm-with-vfpv2.c: Re-generated.
6947 * features/arm/arm-with-vfpv3.c: Re-generated.
6948 * features/i386/amd64-avx-avx512.c: Re-generated.
6949 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6950 * features/i386/amd64-avx.c: Re-generated.
6951 * features/i386/amd64-avx-linux.c: Re-generated.
6952 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6953 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6954 * features/i386/amd64-avx-mpx.c: Re-generated.
6955 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6956 * features/i386/amd64.c: Re-generated.
6957 * features/i386/amd64-linux.c: Re-generated.
6958 * features/i386/amd64-mpx.c: Re-generated.
6959 * features/i386/amd64-mpx-linux.c: Re-generated.
6960 * features/i386/i386-avx-avx512.c: Re-generated.
6961 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6962 * features/i386/i386-avx.c: Re-generated.
6963 * features/i386/i386-avx-linux.c: Re-generated.
6964 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6965 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6966 * features/i386/i386-avx-mpx.c: Re-generated.
6967 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6968 * features/i386/i386.c: Re-generated.
6969 * features/i386/i386-linux.c: Re-generated.
6970 * features/i386/i386-mmx.c: Re-generated.
6971 * features/i386/i386-mmx-linux.c: Re-generated.
6972 * features/i386/i386-mpx.c: Re-generated.
6973 * features/i386/i386-mpx-linux.c: Re-generated.
6974 * features/i386/x32-avx-avx512.c: Re-generated.
6975 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6976 * features/i386/x32-avx.c: Re-generated.
6977 * features/i386/x32-avx-linux.c: Re-generated.
6978 * features/i386/x32.c: Re-generated.
6979 * features/i386/x32-linux.c: Re-generated.
6980 * features/microblaze.c: Re-generated.
6981 * features/microblaze-with-stack-protect.c: Re-generated.
6982 * features/mips64-dsp-linux.c: Re-generated.
6983 * features/mips64-linux.c: Re-generated.
6984 * features/mips-dsp-linux.c: Re-generated.
6985 * features/mips-linux.c: Re-generated.
6986 * features/nds32.c: Re-generated.
6987 * features/nios2.c: Re-generated.
6988 * features/nios2-linux.c: Re-generated.
6989 * features/rs6000/powerpc-32.c: Re-generated.
6990 * features/rs6000/powerpc-32l.c: Re-generated.
6991 * features/rs6000/powerpc-403.c: Re-generated.
6992 * features/rs6000/powerpc-403gc.c : Re-generated.
6993 * features/rs6000/powerpc-405.c: Re-generated.
6994 * features/rs6000/powerpc-505.c: Re-generated.
6995 * features/rs6000/powerpc-601.c: Re-generated.
6996 * features/rs6000/powerpc-602.c: Re-generated.
6997 * features/rs6000/powerpc-603.c: Re-generated.
6998 * features/rs6000/powerpc-604.c: Re-generated.
6999 * features/rs6000/powerpc-64.c: Re-generated.
7000 * features/rs6000/powerpc-64l.c: Re-generated.
7001 * features/rs6000/powerpc-7400.c: Re-generated.
7002 * features/rs6000/powerpc-750.c: Re-generated.
7003 * features/rs6000/powerpc-860.c: Re-generated.
7004 * features/rs6000/powerpc-altivec32.c: Re-generated.
7005 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7006 * features/rs6000/powerpc-altivec64.c: Re-generated.
7007 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7008 * features/rs6000/powerpc-cell32l.c: Re-generated.
7009 * features/rs6000/powerpc-cell64l.c: Re-generated.
7010 * features/rs6000/powerpc-e500.c: Re-generated.
7011 * features/rs6000/powerpc-e500l.c: Re-generated.
7012 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7013 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7014 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7015 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7016 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7017 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7018 * features/rs6000/powerpc-vsx32.c: Re-generated.
7019 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7020 * features/rs6000/powerpc-vsx64.c: Re-generated.
7021 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7022 * features/rs6000/rs6000.c: Re-generated.
7023 * features/s390-linux32.c: Re-generated.
7024 * features/s390-linux32v1.c: Re-generated.
7025 * features/s390-linux32v2.c: Re-generated.
7026 * features/s390-linux64.c: Re-generated.
7027 * features/s390-linux64v1.c: Re-generated.
7028 * features/s390-linux64v2.c: Re-generated.
7029 * features/s390-te-linux64.c: Re-generated.
7030 * features/s390-tevx-linux64.c: Re-generated.
7031 * features/s390-vx-linux64.c: Re-generated.
7032 * features/s390x-linux64.c: Re-generated.
7033 * features/s390x-linux64v1.c: Re-generated.
7034 * features/s390x-linux64v2.c: Re-generated.
7035 * features/s390x-te-linux64.c: Re-generated.
7036 * features/s390x-tevx-linux64.c: Re-generated.
7037 * features/s390x-vx-linux64.c: Re-generated.
7038 * features/sparc/sparc32-solaris.c: Re-generated.
7039 * features/sparc/sparc64-solaris.c: Re-generated.
7040 * features/tic6x-c62x.c: Re-generated.
7041 * features/tic6x-c62x-linux.c: Re-generated.
7042 * features/tic6x-c64x.c: Re-generated.
7043 * features/tic6x-c64x-linux.c: Re-generated.
7044 * features/tic6x-c64xp.c: Re-generated.
7045 * features/tic6x-c64xp-linux.c: Re-generated.
7046
7047 2017-07-26 Yao Qi <yao.qi@linaro.org>
7048
7049 * i386-linux-tdep.c (i386_linux_read_description): New function.
7050 (i386_linux_core_read_description): Call
7051 i386_linux_read_description.
7052 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7053 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7054 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7055 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7056 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7057 * x86-linux-nat.c (x86_linux_read_description): Call
7058 i386_linux_read_description.
7059
7060 2017-07-26 Yao Qi <yao.qi@linaro.org>
7061
7062 * NEWS: Mention it.
7063 * features/Makefile (%.c: %.xml): Pass the xml file name to
7064 command "maint print c-tdesc".
7065 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7066 name from 'arg'.
7067
7068 2017-07-26 Yao Qi <yao.qi@linaro.org>
7069
7070 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7071 in-class initialization.
7072 (tdesc_create_feature): Call new instead of XCNEW.
7073 (free_target_description): Ue delete.
7074
7075 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7076
7077 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7078
7079 2017-07-25 Yao Qi <yao.qi@linaro.org>
7080
7081 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7082 constant.
7083 (amd64_x32_init_abi): Likewise.
7084 * amd64-tdep.h (amd64_init_abi): Update declaration.
7085 (amd64_x32_init_abi): Likewise.
7086
7087 2017-07-25 Yao Qi <yao.qi@linaro.org>
7088
7089 PR tdep/21717
7090 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7091 condition for FPSCR.
7092 (arm_linux_store_inferior_registers): Likewise.
7093
7094 2017-07-22 Tom Tromey <tom@tromey.com>
7095
7096 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7097 <syscalls_counts>: Now a std::vector.
7098 (get_catch_syscall_inferior_data): Use "new".
7099 (catch_syscall_inferior_data_cleanup): Use "delete".
7100 (insert_catch_syscall, remove_catch_syscall)
7101 (clear_syscall_counts): Update.
7102
7103 2017-07-22 Tom Tromey <tom@tromey.com>
7104
7105 * break-catch-syscall.c (syscall_catchpoint)
7106 <syscalls_to_be_caught>: Now a std::vector<int>
7107 (~syscall_catchpoint): Remove.
7108 (insert_catch_syscall, remove_catch_syscall)
7109 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7110 (print_mention_catch_syscall, print_recreate_catch_syscall):
7111 Update.
7112 (create_syscall_event_catchpoint): Change type of "filter"
7113 parameter.
7114 (catch_syscall_split_args): Return a std::vector.
7115 (catch_syscall_command_1, catching_syscall_number_1): Update.
7116
7117 2017-07-22 Tom Tromey <tom@tromey.com>
7118
7119 * break-catch-throw.c (struct exception_catchpoint)
7120 <exception_rx>: Now a std::string.
7121 (~exception_catchpoint): Remove.
7122 (print_one_detail_exception_catchpoint): Update.
7123 (handle_gnu_v3_exceptions): Change type of except_rx.
7124 (extract_exception_regexp): Return a std::string.
7125 (catch_exception_command_1): Update.
7126
7127 2017-07-22 Tom Tromey <tom@tromey.com>
7128
7129 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7130 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7131 std::vector.
7132 <catch_all>: Now a bool.
7133 (~signal_catchpoint): Remove.
7134 (signal_catchpoint_insert_location)
7135 (signal_catchpoint_remove_location)
7136 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7137 (signal_catchpoint_print_mention)
7138 (signal_catchpoint_print_recreate)
7139 (signal_catchpoint_explains_signal): Update.
7140 (create_signal_catchpoint): Change type of "filter" and
7141 "catch_all".
7142 (catch_signal_split_args): Return a std::vector. Change type of
7143 "catch_all".
7144 (catch_signal_command): Update.
7145
7146 2017-07-20 Pedro Alves <palves@redhat.com>
7147
7148 * ada-lang.c (ada_language_defn): Make extern.
7149 (_initialize_ada_language): Remove add_language call.
7150 * c-lang.c (c_language_defn, cplus_language_defn)
7151 (asm_language_defn, minimal_language_defn): Make extern.
7152 (_initialize_c_language): Delete.
7153 * completer.c (compare_cstrings): Delete, moved to utils.h.
7154 * d-lang.c (d_language_defn): Make extern.
7155 (_initialize_d_language): Remove add_language calls.
7156 * defs.h (enum language): Add comment.
7157 * f-lang.c (f_language_defn): Make extern.
7158 (_initialize_f_language): Remove add_language call.
7159 * go-lang.c (go_language_defn): Make extern.
7160 (_initialize_go_language): Remove add_language call.
7161 * language.c: Include <algorithm>.
7162 (languages): Redefine as const array.
7163 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7164 (set_language_command): Handle "local". Use for-range loop.
7165 (set_language): Remove loop.
7166 (language_enum): Rewrite.
7167 (language_def, language_str): Remove loops.
7168 (add_language): Delete.
7169 (add_set_language_command): New, based on add_languages.
7170 (skip_language_trampoline): Adjust.
7171 (local_language_defn): Delete.
7172 (language_gdbarch_post_init): Adjust.
7173 (_initialize_language): Remove add_language calls. Call
7174 add_set_language_command.
7175 * language.h (add_language): Delete.
7176 (auto_language_defn)
7177 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7178 (asm_language_defn, c_language_defn, cplus_language_defn)
7179 (d_language_defn, f_language_defn, go_language_defn)
7180 (m2_language_defn, objc_language_defn, opencl_language_defn)
7181 (pascal_language_defn, rust_language_defn): Declare.
7182 * m2-lang.c (m2_language_defn): Make extern.
7183 (_initialize_m2_language): Remove add_language call.
7184 * objc-lang.c (objc_language_defn): Make extern.
7185 (_initialize_objc_language): Remove add_language call.
7186 * opencl-lang.c (opencl_language_defn): Make extern.
7187 (_initialize_opencl_language): Remove add_language call.
7188 * p-lang.c (pascal_language_defn): Make extern.
7189 (_initialize_pascal_language): Delete.
7190 * rust-lang.c (rust_language_defn): Make extern.
7191 (_initialize_rust_language): Delete.
7192 * utils.h (compare_cstrings): New static inline function.
7193
7194 2017-07-20 Pedro Alves <palves@redhat.com>
7195
7196 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7197 (get_var_value): Constify parameters.
7198 (get_int_var_value): Change prototype.
7199 (to_fixed_range_type): Adjust.
7200 * ada-lang.h (get_int_var_value): Change prototype.
7201
7202 2017-07-20 Pedro Alves <palves@redhat.com>
7203
7204 * dwarf2read.c (dw2_lookup_symbol): Use
7205 SYMBOL_MATCHES_SEARCH_NAME.
7206 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7207
7208 2017-07-20 Pedro Alves <palves@redhat.com>
7209
7210 * block.c (block_iter_name_step, block_iter_name_first)
7211 (block_iter_name_next): Delete.
7212 (block_lookup_symbol_primary): Adjust to use
7213 dict_iter_match_first/dict_iter_match_next.
7214 * block.h (block_iter_name_first, block_iter_name_next): Delete
7215 declarations.
7216 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7217 dict_iter_match_first/dict_iter_match_next.
7218
7219 2017-07-20 Pedro Alves <palves@redhat.com>
7220
7221 * cp-support.c (cp_find_first_component_aux): Add missing case for
7222 end of string.
7223
7224 2017-07-18 David Blaikie <dblaikie@gmail.com>
7225
7226 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7227 of dwo_cu's dwo_file.
7228
7229 2017-07-18 Yao Qi <yao.qi@linaro.org>
7230
7231 * remote.c (store_registers_using_G): Remove one line comment.
7232
7233 2017-07-18 Yao Qi <yao.qi@linaro.org>
7234
7235 * regcache.c (regcache_cpy): Simplify it.
7236 (regcache::cpy_no_passthrough): Remove it.
7237 * regcache.h (cpy_no_passthrough): Remove it.
7238 (regcache_dup, regcache_cpy): Update comments.
7239
7240 2017-07-18 Pedro Alves <palves@redhat.com>
7241
7242 * remote-sim.c (sim_command_completer): Adjust to work with a
7243 completion_tracker instead of a VEC.
7244
7245 2017-07-17 Pedro Alves <palves@redhat.com>
7246
7247 * completer.c (complete_source_filenames): New function.
7248 (complete_address_and_linespec_locations): New function.
7249 (location_completer): Use complete_address_and_linespec_locations.
7250 (completion_tracker::build_completion_result): Honor the tracker's
7251 request to suppress append.
7252 * completer.h (completion_tracker::suppress_append_ws)
7253 (completion_tracker::set_suppress_append_ws): New methods.
7254 (completion_tracker::m_suppress_append_ws): New field.
7255 (complete_source_filenames): New declaration.
7256 * linespec.c (linespec_complete_what): New.
7257 (struct ls_parser) <complete_what, completion_word,
7258 completion_quote_char, completion_quote_end, completion_tracker>:
7259 New fields.
7260 (string_find_incomplete_keyword_at_end): New.
7261 (linespec_lexer_lex_string): Record quote char. If in completion
7262 mode, don't throw.
7263 (linespec_lexer_consume_token): Advance the completion word point.
7264 (linespec_lexer_peek_token): Save/restore completion info.
7265 (save_stream_and_consume_token): New.
7266 (set_completion_after_number): New.
7267 (linespec_parse_basic): Set what to complete next depending on
7268 token. Handle function and label completions specially.
7269 (parse_linespec): Disable objc shortcut in completion mode. Set
7270 what to complete next depending on token type. Skip keyword if in
7271 completion mode.
7272 (complete_linespec_component, linespec_complete): New.
7273 * linespec.h (linespec_complete): Declare.
7274
7275 2017-07-17 Pedro Alves <palves@redhat.com>
7276
7277 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7278 Handle 'operator<' / 'operator<<'.
7279
7280 2017-07-17 Pedro Alves <palves@redhat.com>
7281
7282 * completer.c (collect_explicit_location_matches): Handle
7283 MATCH_LABEL.
7284 (convert_explicit_location_to_linespec): New, factored out from
7285 ...
7286 (convert_explicit_location_to_sals): ... this.
7287 (complete_label): New.
7288 (linespec_complete_label, find_label_symbols_in_block): New.
7289 (find_label_symbols): Add completion_mode parameter and adjust to
7290 call find_label_symbols_in_block.
7291 * linespec.h (linespec_complete_label): Declare.
7292
7293 2017-07-17 Pedro Alves <palves@redhat.com>
7294
7295 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7296 complete_symbol_mode parameter.
7297 * cli/cli-cmds.c (complete_command): Get the completion result out
7298 of the handle_brkchars tracker if used a custom word point.
7299 * completer.c: Include "linespec.h".
7300 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7301 (advance_to_expression_complete_word_point): New.
7302 (completion_tracker::completes_to_completion_word): New.
7303 (complete_files_symbols): Pass down
7304 complete_symbol_mode::EXPRESSION.
7305 (explicit_options, probe_options): New.
7306 (collect_explicit_location_matches): Complete on the
7307 explictit_loc->foo instead of word. Use
7308 linespec_complete_function. Handle MATCH_LINE. Handle offering
7309 keyword and options completions.
7310 (backup_text_ptr): Delete.
7311 (skip_keyword): New.
7312 (complete_explicit_location): Remove 'word' parameter. Add
7313 language, quoted_arg_start and quoted_arg_end parameters.
7314 Rewrite, parsing left to right.
7315 (location_completer): Rewrite.
7316 (location_completer_handle_brkchars): New function.
7317 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7318 (enum complete_line_internal_reason): Adjust comments.
7319 (completion_tracker::discard_completions): New.
7320 (completer_handle_brkchars_func_for_completer): Handle
7321 location_completer.
7322 (gdb_custom_word_point_brkchars)
7323 (gdb_org_rl_basic_quote_characters): New.
7324 (gdb_completion_word_break_characters_throw)
7325 (completion_find_completion_word): Handle trackers that use a
7326 custom word point.
7327 (completion_tracker::advance_custom_word_point_by): New.
7328 (completion_tracker::build_completion_result): Don't rely on
7329 readline appending the quote char.
7330 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7331 use a custom word point.
7332 (gdb_rl_attempted_completion_function): Restore
7333 rl_basic_quote_characters.
7334 * completer.h (class completion_tracker): Extend intro comment.
7335 (completion_tracker::set_quote_char)
7336 (completion_tracker::quote_char)
7337 (completion_tracker::set_use_custom_word_point)
7338 (completion_tracker::use_custom_word_point)
7339 (completion_tracker::custom_word_point)
7340 (completion_tracker::set_custom_word_point)
7341 (completion_tracker::advance_custom_word_point_by)
7342 (completion_tracker::completes_to_completion_word)
7343 (completion_tracker::discard_completions): New methods.
7344 (completion_tracker::m_quote_char)
7345 (completion_tracker::m_use_custom_word_point)
7346 (completion_tracker::m_custom_word_point): New fields.
7347 (advance_to_expression_complete_word_point): Declare.
7348 * f-lang.c (f_collect_symbol_completion_matches): Add
7349 complete_symbol_mode parameter.
7350 * language.h (struct language_defn)
7351 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7352 parameter.
7353 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7354 (linespec_complete_function): New function.
7355 (linespec_lexer_lex_keyword): Adjust.
7356 * linespec.h (linespec_keywords, linespec_complete_function): New
7357 declarations.
7358 * location.c (find_end_quote): New function.
7359 (explicit_location_lex_one): Add explicit_completion_info
7360 parameter. Save quoting info. Don't throw if being called for
7361 completion. Don't handle Ada operators here.
7362 (is_cp_operator, skip_op_false_positives, first_of)
7363 (explicit_location_lex_one_function): New function.
7364 (string_to_explicit_location): Replace 'dont_throw' parameter with
7365 an explicit_completion_info pointer parameter. Handle it. Don't
7366 use explicit_location_lex_one to lex function names. Use
7367 explicit_location_lex_one_function instead.
7368 * location.h (struct explicit_completion_info): New.
7369 (string_to_explicit_location): Replace 'dont_throw' parameter with
7370 an explicit_completion_info pointer parameter.
7371 * symtab.c (default_collect_symbol_completion_matches_break_on):
7372 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7373 (default_collect_symbol_completion_matches)
7374 (collect_symbol_completion_matches): Add complete_symbol_mode
7375 parameter.
7376 (collect_symbol_completion_matches_type): Pass down
7377 complete_symbol_mode::EXPRESSION.
7378 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7379 parameter. Handle LINESPEC mode.
7380 * symtab.h (complete_symbol_mode): New.
7381 (default_collect_symbol_completion_matches_break_on)
7382 (default_collect_symbol_completion_matches)
7383 (collect_symbol_completion_matches)
7384 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7385 parameter.
7386
7387 2017-07-17 Pedro Alves <palves@redhat.com>
7388
7389 * utils.c (enum class strncmp_iw_mode): New.
7390 (strcmp_iw): Rename to ...
7391 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7392 parameters. Handle them.
7393 (strncmp_iw): New.
7394 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7395 * utils.h (strncmp_iw): Declare.
7396 (strcmp_iw): Move describing comments here.
7397
7398 2017-07-17 Pedro Alves <palves@redhat.com>
7399
7400 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7401 CP_OPERATOR_STR.
7402 * c-typeprint.c (is_type_conversion_operator): Use
7403 CP_OPERATOR_STR.
7404 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7405 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7406 CP_OPERATOR_LEN.
7407 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7408 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7409 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7410 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7411 CP_OPERATOR_STR.
7412 * location.c: Include "cp-support.h".
7413 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7414 CP_OPERATOR_STR.
7415 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7416 CP_OPERATOR_LEN.
7417
7418 2017-07-17 Pedro Alves <palves@redhat.com>
7419
7420 * cli/cli-cmds.c (complete_command): Use a completion tracker
7421 along with completion_find_completion_word for handle_brkchars
7422 phase.
7423 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7424 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7425 (struct gdb_rl_completion_word_info): New.
7426 (gdb_rl_find_completion_word): New.
7427 (completion_find_completion_word): New.
7428 * completer.h (completion_find_completion_word): Declare.
7429
7430 2017-07-17 Pedro Alves <palves@redhat.com>
7431
7432 * ada-lang.c (symbol_completion_match): Adjust comments.
7433 (symbol_completion_add): Replace vector parameter with
7434 completion_tracker parameter. Use it.
7435 (ada_make_symbol_completion_list): Rename to...
7436 (ada_collect_symbol_completion_matches): ... this. Add
7437 completion_tracker parameter and use it.
7438 (ada_language_defn): Adjust.
7439 * break-catch-syscall.c (catch_syscall_completer): Adjust
7440 prototype and work with completion_tracker instead of VEC.
7441 * breakpoint.c (condition_completer): Adjust prototype and work
7442 with completion_tracker instead of VEC.
7443 * c-lang.c (c_language_defn, cplus_language_defn)
7444 (asm_language_defn, minimal_language_defn): Adjust to renames.
7445 * cli/cli-cmds.c (complete_command): Rework using
7446 completion_tracker. Catch exceptions when completing.
7447 * cli/cli-decode.c (integer_unlimited_completer)
7448 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7449 with completion_tracker instead of VEC.
7450 * command.h (struct completion_tracker): Forward declare.
7451 (completer_ftype, completer_handle_brkchars_ftype): Change
7452 types.
7453 (complete_on_cmdlist, complete_on_enum): Adjust.
7454 * completer.c: Include <algorithm>.
7455 (struct gdb_completer_state): New.
7456 (current_completion): New global.
7457 (readline_line_completion_function): Delete.
7458 (noop_completer, filename_completer)
7459 (filename_completer_handle_brkchars, complete_files_symbols)
7460 (linespec_location_completer): Adjust to work with a
7461 completion_tracker instead of a VEC.
7462 (string_or_empty): New.
7463 (collect_explicit_location_matches): Adjust to work with a
7464 completion_tracker instead of a VEC.
7465 (explicit_location_completer): Rename to ...
7466 (complete_explicit_location): ... this and adjust to work with a
7467 completion_tracker instead of a VEC.
7468 (location_completer): Adjust to work with a completion_tracker
7469 instead of a VEC.
7470 (add_struct_fields): Adjust to work with a completion_list instead
7471 of VEC.
7472 (expression_completer): Rename to ...
7473 (complete_expression): ... this and adjust to work with a
7474 completion_tracker instead of a VEC. Use complete_files_symbols.
7475 (expression_completer): Reimplement on top of complete_expression.
7476 (symbol_completer): Adjust to work with a completion_tracker
7477 instead of a VEC.
7478 (enum complete_line_internal_reason): Add describing comments.
7479 (complete_line_internal_normal_command): Adjust to work with a
7480 completion_tracker instead of a VEC.
7481 (complete_line_internal): Rename to ...
7482 (complete_line_internal_1): ... this and adjust to work with a
7483 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7484 handle_brkchars phase.
7485 (new_completion_tracker): Delete.
7486 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7487 complete_line_internal_1.
7488 (free_completion_tracker): Delete.
7489 (INITIAL_COMPLETION_HTAB_SIZE): New.
7490 (completion_tracker::completion_tracker)
7491 (completion_tracker::~completion_tracker): New.
7492 (maybe_add_completion): Delete.
7493 (completion_tracker::maybe_add_completion)
7494 (completion_tracker::add_completion)
7495 (completion_tracker::add_completions): New.
7496 (throw_max_completions_reached_error): Delete.
7497 (complete_line): Adjust to work with a completion_tracker instead
7498 of a VEC. Don't create a completion_tracker_t or check for max
7499 completions here.
7500 (command_completer, command_completer_handle_brkchars)
7501 (signal_completer, reg_or_group_completer_1)
7502 (reg_or_group_completer, default_completer_handle_brkchars):
7503 Adjust to work with a completion_tracker.
7504 (gdb_completion_word_break_characters_throw): New.
7505 (gdb_completion_word_break_characters): Reimplement.
7506 (line_completion_function): Delete.
7507 (completion_tracker::recompute_lowest_common_denominator)
7508 (expand_preserving_ws)
7509 (completion_tracker::build_completion_result)
7510 (completion_result::completion_result)
7511 (completion_result::completion_result)
7512 (completion_result::~completion_result)
7513 (completion_result::completion_result)
7514 (completion_result::release_match_list, compare_cstrings)
7515 (completion_result::sort_match_list)
7516 (completion_result::reset_match_list)
7517 (gdb_rl_attempted_completion_function_throw)
7518 (gdb_rl_attempted_completion_function): New.
7519 * completer.h (completion_list, struct completion_result)
7520 (class completion_tracker): New.
7521 (complete_line): Add completion_tracker parameter.
7522 (readline_line_completion_function): Delete.
7523 (gdb_rl_attempted_completion_function): New.
7524 (noop_completer, filename_completer, expression_completer)
7525 (location_completer, symbol_completer, command_completer)
7526 (signal_completer, reg_or_group_completer): Update prototypes.
7527 (completion_tracker_t, new_completion_tracker)
7528 (make_cleanup_free_completion_tracker): Delete.
7529 (enum maybe_add_completion_enum): Delete.
7530 (maybe_add_completion): Delete.
7531 (throw_max_completions_reached_error): Delete.
7532 * corefile.c (complete_set_gnutarget): Adjust to work with a
7533 completion_tracker instead of a VEC.
7534 * cp-abi.c (cp_abi_completer): Adjust to work with a
7535 completion_tracker instead of a VEC.
7536 * d-lang.c (d_language_defn): Adjust.
7537 * disasm.c (disassembler_options_completer): Adjust to work with a
7538 completion_tracker instead of a VEC.
7539 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7540 (f_collect_symbol_completion_matches): ... this. Adjust to work
7541 with a completion_tracker instead of a VEC.
7542 (f_language_defn): Adjust.
7543 * go-lang.c (go_language_defn): Adjust.
7544 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7545 Adjust to work with a completion_tracker instead of a VEC.
7546 * infrun.c (handle_completer): Likewise.
7547 * interps.c (interpreter_completer): Likewise.
7548 * interps.h (interpreter_completer): Likewise.
7549 * language.c (unknown_language_defn, auto_language_defn)
7550 (local_language_defn): Adjust.
7551 * language.h (language_defn::la_make_symbol_completion_list):
7552 Rename to ...
7553 (language_defn::la_collect_symbol_completion_matches): ... this
7554 and adjust to work with a completion_tracker instead of a VEC.
7555 * m2-lang.c (m2_language_defn): Adjust.
7556 * objc-lang.c (objc_language_defn): Adjust.
7557 * opencl-lang.c (opencl_language_defn): Adjust.
7558 * p-lang.c (pascal_language_defn): Adjust.
7559 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7560 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7561 with a completion_tracker.
7562 * rust-lang.c (rust_language_defn): Adjust.
7563 * symtab.c (free_completion_list, do_free_completion_list)
7564 (return_val, completion_tracker): Delete.
7565 (completion_list_add_name, completion_list_add_symbol)
7566 (completion_list_add_msymbol, completion_list_objc_symbol)
7567 (completion_list_add_fields, add_symtab_completions): Add
7568 completion_tracker parameter and use it.
7569 (default_make_symbol_completion_list_break_on_1): Rename to...
7570 (default_collect_symbol_completion_matches_break_on): ... this.
7571 Add completion_tracker parameter and use it instead of allocating
7572 a completion tracker here.
7573 (default_make_symbol_completion_list_break_on): Delete old
7574 implementation.
7575 (default_make_symbol_completion_list): Delete.
7576 (default_collect_symbol_completion_matches): New.
7577 (make_symbol_completion_list): Delete.
7578 (collect_symbol_completion_matches): New.
7579 (make_symbol_completion_type): Rename to ...
7580 (collect_symbol_completion_matches_type): ... this. Add
7581 completion_tracker parameter and use it instead of VEC.
7582 (make_file_symbol_completion_list_1): Rename to...
7583 (collect_file_symbol_completion_matches): ... this. Add
7584 completion_tracker parameter and use it instead of VEC.
7585 (make_file_symbol_completion_list): Delete.
7586 (add_filename_to_list): Use completion_list instead of a VEC.
7587 (add_partial_filename_data::list): Now a completion_list.
7588 (make_source_files_completion_list): Work with a completion_list
7589 instead of a VEC.
7590 * symtab.h: Include "completer.h".
7591 (default_make_symbol_completion_list_break_on)
7592 (default_make_symbol_completion_list, make_symbol_completion_list)
7593 (make_symbol_completion_type, make_file_symbol_completion_list)
7594 (make_source_files_completion_list): Delete.
7595 (default_collect_symbol_completion_matches_break_on)
7596 (default_collect_symbol_completion_matches)
7597 (collect_symbol_completion_matches)
7598 (collect_symbol_completion_matches_type)
7599 (collect_file_symbol_completion_matches)
7600 (make_source_files_completion_list): New.
7601 * top.c (init_main): Don't install a rl_completion_entry_function
7602 hook. Install a rl_attempted_completion_function hook instead.
7603 * tui/tui-layout.c (layout_completer): Adjust to work with a
7604 completion_tracker.
7605 * tui/tui-regs.c (tui_reggroup_completer):
7606 * tui/tui-win.c (window_name_completer, focus_completer)
7607 (winheight_completer): Adjust to work with a completion_tracker.
7608 * value.c: Include "completer.h".
7609 (complete_internalvar): Adjust to work with a completion_tracker.
7610 * value.h (complete_internalvar): Likewise.
7611
7612 2017-07-17 Pedro Alves <palves@redhat.com>
7613
7614 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7615 renames.
7616 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7617 comments to completer_ftype's declaration.
7618 <completer_handle_brkchars>: Change type to
7619 completer_handle_brkchars_ftype.
7620 * command.h (completer_ftype): Add describing comment and give
7621 names to parameters.
7622 (completer_ftype_void): Rename to ...
7623 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7624 (set_cmd_completer_handle_brkchars): Adjust.
7625 * completer.c (filename_completer_handle_brkchars): New function.
7626 (complete_line_internal_normal_command): New function, factored
7627 out from ...
7628 (complete_line_internal): ... here.
7629 (command_completer_handle_brkchars)
7630 (default_completer_handle_brkchars)
7631 (completer_handle_brkchars_func_for_completer): New functions.
7632 * completer.h (set_gdb_completion_word_break_characters): Delete
7633 declaration.
7634 (completer_handle_brkchars_func_for_completer): New declaration.
7635 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7636 completer_handle_brkchars_func_for_completer.
7637
7638 2017-07-17 Pedro Alves <palves@redhat.com>
7639
7640 * completer.c (symbol_completer): New function, based on
7641 make_symbol_completion_list_fn.
7642 * completer.h (symbol_completer): New declaration.
7643 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7644 * python/py-cmd.c (completers): Adjust.
7645 * symtab.c (make_symbol_completion_list_fn): Delete.
7646 * symtab.h (make_symbol_completion_list_fn): Delete.
7647 * cli/cli-decode.c (add_cmd): Adjust.
7648
7649 2017-07-17 Pedro Alves <palves@redhat.com>
7650
7651 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7652 * dwarf2read.c: Include "filename-seen-cache.h".
7653 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7654 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7655 * filename-seen-cache.c: New file.
7656 * filename-seen-cache.h: New file.
7657 * symtab.c: Include "filename-seen-cache.h".
7658 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7659 (create_filename_seen_cache, clear_filename_seen_cache)
7660 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7661 to filename-seen-cache.h/filename-seen-cache.c.
7662 (output_source_filename, sources_info)
7663 (maybe_add_partial_symtab_filename)
7664 (make_source_files_completion_list): Adjust to use
7665 filename_seen_cache.
7666
7667 2017-07-17 Pedro Alves <palves@redhat.com>
7668
7669 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7670 fields.
7671 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7672 dwarf2_debug_sections*)): New.
7673 (dwarf2_per_objfile::dwarf2_per_objfile(const
7674 dwarf2_per_objfile&)): Declare as deleted.
7675 (dwarf2_per_objfile::operator=): Declare as deleted.
7676 (dwarf2_per_objfile::dwarf2_per_objfile)
7677 (dwarf2_per_objfile::~dwarf2_per_objfile)
7678 (dwarf2_per_objfile::free_cached_comp_units): New.
7679 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7680 ctor. Call dwarf2_per_objfile's ctor manually.
7681 (dwarf2_locate_sections): Deleted/refactored as ...
7682 (dwarf2_per_objfile::locate_sections): ... this new method.
7683 (free_cached_comp_units): Defer to
7684 dwarf2_per_objfile::free_cached_comp_units.
7685 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7686
7687 2017-07-14 Tom Tromey <tom@tromey.com>
7688
7689 PR rust/21764:
7690 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7691 parameter.
7692 <UNOP_SIZEOF>: Split into separate case.
7693 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7694
7695 2017-07-14 Tom Tromey <tom@tromey.com>
7696
7697 PR rust/21763:
7698 * symtab.c (symbol_matches_domain): Add language_rust to special
7699 case.
7700 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7701 treat LOC_TYPEDEF symbols as variables.
7702
7703 2017-07-14 Pedro Alves <palves@redhat.com>
7704
7705 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7706 symtabs matching all symtabs with SRCFILE as file name instead of
7707 only considering the first hit, with lookup_symtab.
7708
7709 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7710
7711 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7712 operator_name parameters.
7713 (gen_expr): Update function call.
7714
7715 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7716
7717 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7718 parameter.
7719 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7720 Likewise.
7721 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7722 parameter, use agent_expr::gdbarch instead, update function
7723 calls.
7724 (locexpr_tracepoint_var_ref): Likewise.
7725 (loclist_tracepoint_var_ref): Likewise.
7726 * ax-gdb.c (gen_trace_static_fields): Likewise.
7727 (gen_traced_pop): Likewise.
7728 (gen_frame_args_address): Likewise.
7729 (gen_frame_locals_address): Likewise.
7730 (gen_var_ref): Likewise.
7731 (gen_struct_ref_recursive): Likewise.
7732 (gen_static_field): Likewise.
7733 (gen_maybe_namespace_elt): Likewise.
7734 (gen_expr): Likewise.
7735 (gen_trace_for_var): Likewise.
7736 (gen_trace_for_expr): Likewise.
7737 (gen_trace_for_return_address): Likewise.
7738
7739 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7740
7741 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7742 parameter.
7743 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7744
7745 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7746
7747 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7748 from ax, update calls.
7749 (gen_usual_arithmetic): Likewise.
7750 (gen_integral_promotions): Likewise.
7751 (gen_bitfield_ref): Likewise.
7752 (gen_primitive_field): Likewise.
7753 (gen_struct_ref_recursive): Likewise.
7754 (gen_struct_ref): Likewise.
7755 (gen_maybe_namespace_elt): Likewise.
7756 (gen_struct_elt_for_reference): Likewise.
7757 (gen_namespace_elt): Likewise.
7758 (gen_aggregate_elt_ref): Likewise.
7759 (gen_expr): Get gdbarch from ax, update calls.
7760 (gen_expr_binop_rest): Likewise.
7761
7762 2017-07-13 Pedro Alves <palves@redhat.com>
7763
7764 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7765 as default tdesc.
7766 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7767 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7768 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7769 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7770 tdep.
7771 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7772 Get final tdesc from the tdep.
7773 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7774 default tdesc.
7775 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7776 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7777 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7778 Use it as default tdesc.
7779 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7780 down to amd_init_abi. No longer handle fallback tdesc here.
7781 * amd64-tdep.h (tdesc_x32): Declare.
7782 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7783 parameter.
7784 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7785 as default tdesc.
7786
7787 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7788
7789 * s390-linux-tdep.c (s390_process_record): Add support for
7790 instructions new in arch12.
7791
7792 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7793
7794 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7795 PT_GETFSBASE and PT_GETGSBASE.
7796 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7797 PT_SETGSBASE.
7798
7799 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7800
7801 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7802 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7803 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7804 those rules.
7805 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7806 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7807 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7808 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7809 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7810 * features/i386/amd64.xml: Add 64bit-segments.xml.
7811 * features/i386/amd64-avx-avx512.c: Regenerated.
7812 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7813 * features/i386/amd64-avx-mpx.c: Regenerated.
7814 * features/i386/amd64-avx.c: Regenerated.
7815 * features/i386/amd64-mpx.c: Regenerated.
7816 * features/i386/amd64.c: Regenerated.
7817 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7818 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7819 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7820 * regformats/i386/amd64-avx.dat: Regenerated.
7821 * regformats/i386/amd64-mpx.dat: Regenerated.
7822 * regformats/i386/amd64.dat: Regenerated.
7823
7824 2017-07-10 Yao Qi <yao.qi@linaro.org>
7825
7826 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7827 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7828
7829 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7830
7831 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7832 unsetenv.
7833 * gnulib/aclocal.m4: Regenerate.
7834 * gnulib/config.in: Regenerate.
7835 * gnulib/configure: Regenerate.
7836 * gnulib/import/Makefile.am: Regenerate.
7837 * gnulib/import/Makefile.in: Regenerate.
7838 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7839 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7840 * gnulib/import/m4/environ.m4: New file.
7841 * gnulib/import/m4/setenv.m4: New file.
7842 * gnulib/import/setenv.c: New file.
7843 * gnulib/import/unsetenv.c: New file.
7844
7845 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7846
7847 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7848 address when op is DW_OP_addr.
7849
7850 2017-07-09 Tom Tromey <tom@tromey.com>
7851
7852 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7853 check and apply to outer type.
7854
7855 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7856
7857 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7858 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7859 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7860 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7861
7862 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7863
7864 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7865
7866 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7867
7868 * corelow.c (get_core_siginfo): Remove.
7869 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7870 instead of get_core_siginfo.
7871 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7872 * gdbarch.h: Re-generate.
7873 * gdbarch.c: Re-generate.
7874 * linux-tdep.c (linux_core_xfer_siginfo): New.
7875 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7876
7877 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7878
7879 * corelow.c (thread_section_name): Move to ...
7880 * gdbcore.h (thread_section_name): ... here.
7881
7882 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7883
7884 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7885 (struct siginfo32): New.
7886 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7887 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7888 via ptrace(PT_LWPINFO).
7889
7890 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7891
7892 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7893 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7894 (fbsd_get_siginfo_type): New.
7895 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7896 (_initialize_fbsd_tdep): New.
7897
7898 2017-07-06 David Blaikie <dblaikie@gmail.com>
7899
7900 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7901 a singular dwo_unit*) to support multiple CUs in the same way that
7902 multiple TUs are supported.
7903 (create_cus_hash_table): Replace create_dwo_cu with a function for
7904 parsing multiple CUs from a DWO file.
7905 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7906 create_dwo_cu.
7907 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7908 htab_find, rather than comparing the signature to a singleton CU in
7909 the dwo_file.
7910
7911 2017-07-06 Pedro Alves <palves@redhat.com>
7912
7913 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7914
7915 2017-07-04 Pedro Alves <palves@redhat.com>
7916
7917 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7918 * gdbtypes.h (TYPE_STATIC): Delete.
7919 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7920 is_synchronized, is_native>: Delete.
7921 <dummy>: Bump.
7922 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7923 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7924 (TYPE_FN_FIELD_ABSTRACT): Delete.
7925
7926 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7927
7928 * buffer.h (buffer_finish): Fix spelling mistakes.
7929
7930 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7931
7932 * .dir-locals.el: Automatically switch to C-style comments in
7933 versions of Emacs that support the feature.
7934
7935 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7936 Pedro Alves <palves@redhat.com>
7937
7938 PR cli/21688
7939 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7940 (process_next_line): New variable 'inline_cmd'.
7941 Adjust 'if' clauses for "python", "compile" and "guile" to use
7942 'command_name_equals' and check for '!inline_cmd'.
7943
7944 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7945
7946 PR cli/21688
7947 * cli/cli-script.c (command_name_equals_not_inline): New function.
7948 (process_next_line): Adjust 'if' clauses for "python", "compile"
7949 and "guile" to use command_name_equals_not_inline.
7950
7951 2017-06-29 Pedro Alves <palves@redhat.com>
7952
7953 * completer.c (expression_completer): Call
7954 linespec_location_completer instead of location_completer.
7955
7956 2017-06-29 Pedro Alves <palves@redhat.com>
7957
7958 * completer.c (expression_completer): Remove code that recomputes
7959 'text' from 'word'.
7960
7961 2017-06-29 Yao Qi <yao.qi@linaro.org>
7962
7963 * regformats/regdat.sh: Generate code with
7964 "ifndef IN_PROCESS_AGENT".
7965
7966 2017-06-28 Pedro Alves <palves@redhat.com>
7967
7968 * command.h: Include "common/scoped_restore.h".
7969
7970 2017-06-28 Yao Qi <yao.qi@linaro.org>
7971
7972 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7973 instead of obstack_grow.
7974
7975 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7976
7977 PR gdb/21337
7978 * symfile.c (reread_symbols): Call objfiles_changed just before
7979 read_symbols.
7980
7981 2017-06-27 Pedro Alves <palves@redhat.com>
7982
7983 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7984 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7985 (completion_list_add_symbol, completion_list_add_msymbol):
7986 ... these new functions.
7987 (add_symtab_completions)
7988 (default_make_symbol_completion_list_break_on_1): Adjust.
7989
7990 2017-06-27 Pedro Alves <palves@redhat.com>
7991
7992 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7993 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7994 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7995 dtor.
7996 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7997 'storage_obstack' field an auto_obstack. In-class initialize all
7998 non-bitfield fields. Make minsyms_read bool.
7999 * symfile.c (read_symbols): Adjust.
8000
8001 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8002
8003 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8004 (gdbsim_store_register): Likewise.
8005
8006 2017-06-27 Pedro Alves <palves@redhat.com>
8007
8008 * c-exp.y (name_obstack): Now an auto_obstack.
8009 (yylex): Use auto_obstack::clear.
8010 (c_parse): Use auto_obstack::clear instead of reinitializing and
8011 freeing the obstack.
8012 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8013 * d-exp.y (name_obstack): Now an auto_obstack.
8014 (yylex): Use auto_obstack::clear.
8015 (d_parse): Use auto_obstack::clear instead of reinitializing and
8016 freeing the obstack.
8017 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8018 auto_obstack.
8019 * dwarf2read.c (create_addrmap_from_index)
8020 (dwarf2_build_psymtabs_hard)
8021 (update_enumeration_type_from_children): Likewise.
8022 * gdb_obstack.h (auto_obstack): New type.
8023 * go-exp.y (name_obstack): Now an auto_obstack.
8024 (build_packaged_name): Use auto_obstack::clear.
8025 (go_parse): Use auto_obstack::clear instead of reinitializing and
8026 freeing the obstack.
8027 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8028 auto_obstack.
8029 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8030 * rust-exp.y (work_obstack): Now an auto_obstack.
8031 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8032 reinitializing and freeing the obstack.
8033 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8034 (host_char_to_target): Use auto_obstack.
8035 * utils.h (make_cleanup_obstack_free): Delete declaration.
8036 * valprint.c (generic_emit_char, generic_printstr): Use
8037 auto_obstack.
8038
8039 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8040
8041 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8042 thread.
8043 (darwin_init_thread_list): Don't update dummy thread.
8044 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8045
8046 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8047
8048 * record-full.c (netorder16): Remove.
8049
8050 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8051
8052 * common/diagnostics.h: Define macros for GCC.
8053 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8054 * common/vec.h: Include diagnostics.h.
8055 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8056 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8057 warning.
8058
8059 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8060
8061 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8062 New macro.
8063 * ada-lex.l: Ignore deprecated register warnings.
8064
8065 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8066
8067 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8068 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8069
8070 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8071
8072 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8073 its own line.
8074
8075 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8076
8077 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8078
8079 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8080
8081 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8082 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8083 (xtensa_register_read_masked): Likewise.
8084
8085 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8086
8087 * common/environ.c (gdb_environ::unset): Update comment.
8088
8089 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8090
8091 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8092 registers.
8093
8094 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8095
8096 * record-full.c (record_full_exec_insn): Use byte_vector.
8097
8098 2017-06-22 Yao Qi <yao.qi@linaro.org>
8099
8100 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8101 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8102
8103 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8104
8105 * remote.c (cached_reg): Move from here...
8106 * regcache.h (cached_reg): ...to here.
8107 * python/py-unwind.c (struct reg_info): Remove.
8108 (cached_frame_info): Use cached_reg_t.
8109 (pyuw_prev_register): Likewise.
8110 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8111 (pyuw_dealloc_cache): Free all registers.
8112
8113 2017-06-22 Pedro Alves <palves@redhat.com>
8114 Simon Marchi <simon.marchi@ericsson.com>
8115
8116 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8117 warning.
8118 * common/diagnostics.h: New file.
8119
8120 2017-06-22 Pedro Alves <palves@redhat.com>
8121
8122 * common/agent.h: Add include guards.
8123
8124 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8125
8126 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8127 talk about addressable units instead of bytes.
8128
8129 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8130
8131 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8132 of '::const_iterator'.
8133
8134 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8135
8136 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8137 'unittests/environ-selftests.c'.
8138 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8139 * charset.c (find_charset_names): Declare object 'iconv_env'.
8140 Update code to use 'iconv_env' object. Remove call to
8141 'free_environ'.
8142 * common/environ.c: Include <utility>.
8143 (make_environ): Delete function.
8144 (free_environ): Delete function.
8145 (gdb_environ::clear): New function.
8146 (gdb_environ::operator=): New function.
8147 (gdb_environ::get): Likewise.
8148 (environ_vector): Delete function.
8149 (set_in_environ): Delete function.
8150 (gdb_environ::set): New function.
8151 (unset_in_environ): Delete function.
8152 (gdb_environ::unset): New function.
8153 (gdb_environ::envp): Likewise.
8154 * common/environ.h: Include <vector>.
8155 (struct gdb_environ): Delete; transform into...
8156 (class gdb_environ): ... this class.
8157 (free_environ): Delete prototype.
8158 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8159 environ_vector): Likewise.
8160 * infcmd.c (run_command_1): Update code to call
8161 'envp' from 'gdb_environ' class.
8162 (environment_info): Update code to call methods from 'gdb_environ'
8163 class.
8164 (unset_environment_command): Likewise.
8165 (path_info): Likewise.
8166 (path_command): Likewise.
8167 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8168 (inferior::inferior): Initialize 'environment' using the host's
8169 information.
8170 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8171 Include "environ.h".
8172 (class inferior) <environment>: Change type from 'struct
8173 gdb_environ' to 'gdb_environ'.
8174 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8175 methods from 'gdb_environ' class.
8176 * solib.c (solib_find_1): Likewise
8177 * unittests/environ-selftests.c: New file.
8178
8179 2017-06-20 Yao Qi <yao.qi@linaro.org>
8180
8181 * features/i386/i386-linux.xml: Exchange the order of including
8182 32bit-linux.xml and 32bit-sse.xml.
8183 * features/i386/i386-linux.c: Regenerated.
8184
8185 2017-06-20 Yao Qi <yao.qi@linaro.org>
8186
8187 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8188 Delete copy ctor and assignment operator.
8189 (tdesc_type): Likewise.
8190 (tdesc_feature): Likewise.
8191 (tdesc_free_reg): Remove.
8192 (tdesc_create_reg): Use new.
8193 (tdesc_free_type): Remove.
8194 (tdesc_create_vector): Use new.
8195 (tdesc_create_union): Likewise.
8196 (tdesc_create_flags): Likewise.
8197 (tdesc_create_enum): Likewise.
8198 (tdesc_free_feature): Delete.
8199 (free_target_description): Use delete.
8200
8201 2017-06-19 John Baldwin <jhb@FreeBSD.org>
8202
8203 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8204 registers.
8205
8206 2017-06-19 Pedro Alves <palves@redhat.com>
8207
8208 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8209 after gdb::unlinker.
8210
8211 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8212
8213 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8214 gdb_environ to access an environment variable.
8215
8216 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8217
8218 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8219 gdb_byte*.
8220
8221 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8222
8223 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8224
8225 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8226
8227 * configure: Re-generate.
8228 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8229
8230 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8231
8232 * configure: Re-generate.
8233 * warning.m4: Pass -Werror to compiler when checking for
8234 supported warning flags.
8235
8236 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8237
8238 * Makefile.in (COMPILE.pre): Add "-x c++".
8239
8240 2017-06-16 Alan Hayward <alan.hayward@arm.com>
8241 Pedro Alves <palves@redhat.com>
8242 Yao Qi <yao.qi@linaro.org>
8243
8244 * defs.h (RequireLongest): New.
8245 (extract_integer): Declare function template.
8246 (extract_signed_integer): Remove the declaration, but define it
8247 static inline.
8248 (extract_unsigned_integer): Likewise.
8249 (store_integer): Declare function template.
8250 (store_signed_integer): Remove the declaration, but define it
8251 static inline.
8252 (store_unsigned_integer): Likewise.
8253 * findvar.c (extract_integer): New function template.
8254 (extract_signed_integer): Remove.
8255 (extract_unsigned_integer): Remove.
8256 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8257 instantiations.
8258 (store_integer): New function template.
8259 (store_signed_integer): Remove.
8260 (store_unsigned_integer): Remove.
8261 (store_integer): Explicit instantiations.
8262 * regcache.c (regcache_raw_read_signed): Update.
8263 (regcache::raw_read): New function.
8264 (regcache::raw_read_signed): Remove.
8265 (regcache::raw_read_unsigned): Remove.
8266 (regcache_raw_read_unsigned): Update.
8267 (regcache_raw_write_unsigned): Update.
8268 (regcache::raw_write_signed): Remove.
8269 (regcache::raw_write): New function.
8270 (regcache_cooked_read_signed): Update.
8271 (regcache::raw_write_unsigned): Remove.
8272 (regcache::cooked_read_signed): Remove.
8273 (regcache_cooked_read_unsigned): Update.
8274 (regcache::cooked_read_unsigned): Remove.
8275 (regcache_cooked_write_signed): Update.
8276 (regcache_cooked_write_unsigned): Update.
8277 * regcache.h (regcache) <raw_read_signed>: Remove.
8278 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8279 <raw_read, raw_write>: New.
8280 <cooked_read_signed, cooked_write_signed>: Remove.
8281 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8282 <cooked_read, cooked_write>: New.
8283 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8284 (sh64_pseudo_register_write): Update.
8285
8286 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8287
8288 * arc-tdep.c (arc_disassembler_options): New variable.
8289 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8290 of default_print_insn.
8291 (arc_delayed_print_insn): Set info->section when needed,
8292 use default_print_insn to retrieve a disassembler.
8293
8294 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8295
8296 PR gdb/21574
8297 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8298 to mention $SHELL and startup-with-shell.
8299
8300 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8301
8302 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8303
8304 2017-06-14 Yao Qi <yao.qi@linaro.org>
8305
8306 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8307 default_print_insn instead of print_insn_aarch64.
8308 * arm-tdep.c (gdb_print_insn_arm): Call
8309 default_print_insn instead of print_insn_big_arm
8310 and print_insn_little_arm.
8311 * i386-tdep.c (i386_print_insn): Call default_print_insn
8312 instead of print_insn_i386.
8313 * ia64-tdep.c (ia64_print_insn): Call
8314 default_print_insn instead of print_insn_ia64.
8315 * mips-tdep.c (gdb_print_insn_mips): Call
8316 default_print_insn instead of print_insn_big_mips
8317 and print_insn_little_mips.
8318 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8319 instead of print_insn_spu.
8320
8321 2017-06-14 Pedro Alves <palves@redhat.com>
8322
8323 * ada-lang.c: Include "common/byte-vector.h".
8324 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8325 * charset.c (wchar_iterator::iterate): Resize the vector instead
8326 of reserving it.
8327 * common/byte-vector.h: Include "common/def-vector.h".
8328 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8329 * cli/cli-dump.c: Include "common/byte-vector.h".
8330 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8331 * common/byte-vector.h: New file.
8332 * common/def-vector.h: New file.
8333 * common/default-init-alloc.h: New file.
8334 * dwarf2loc.c: Include "common/byte-vector.h".
8335 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8336 instead of reserving it.
8337 * dwarf2read.c: Include "common/byte-vector.h".
8338 (data_buf::m_vec): Now a gdb::byte_vector.
8339 * gdb_regex.c: Include "common/def-vector.h".
8340 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8341 * mi/mi-main.c: Include "common/byte-vector.h".
8342 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8343 * printcmd.c: Include "common/byte-vector.h".
8344 (print_scalar_formatted): Use gdb::byte_vector.
8345 * valprint.c: Include "common/byte-vector.h".
8346 (maybe_negate_by_bytes, print_decimal_chars): Use
8347 gdb::byte_vector.
8348
8349 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8350
8351 * darwin-nat.c: Include "nat/fork-inferior.h".
8352
8353 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8354
8355 * configure.nat: Factor out Darwin bits that are not
8356 architecture-specific. Add fork-inferior.o.
8357
8358 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8359
8360 * configure.nat: Factor out AIX bits that are not
8361 architecture-specific. Add fork-inferior.o.
8362
8363 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8364
8365 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8366 (read_pieced_value, write_pieced_value): ...here. Reduce to
8367 wrappers that just call rw_pieced_value.
8368
8369 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8370
8371 * dwarf2loc.c (write_pieced_value): When writing the data for a
8372 memory piece, use write_memory_with_notification instead of
8373 write_memory.
8374
8375 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8376
8377 * valops.c (read_value_memory): Change embedded_offset to
8378 represent a bit offset instead of a byte offset.
8379 * value.h (read_value_memory): Adjust comment.
8380
8381 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8382
8383 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8384 dest_offset_bits and source_offset_bits.
8385 (write_pieced_value): Likewise.
8386
8387 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8388
8389 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8390 given by DW_OP_bit_piece.
8391 (write_pieced_value): Likewise.
8392
8393 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8394
8395 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8396 some other preparations to the places where sufficient information
8397 is available.
8398 (write_pieced_value): Likewise.
8399
8400 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8401
8402 * dwarf2loc.c (bits_to_bytes): New function.
8403 (read_pieced_value): Fix offset calculations for register pieces
8404 on big-endian targets.
8405 (write_pieced_value): Likewise.
8406
8407 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8408
8409 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8410 (write_pieced_value): Likewise.
8411
8412 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8413
8414 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8415 transfer the source value's least significant bits, instead of its
8416 lowest-addressed ones. Rename type_len to max_offset.
8417 (read_pieced_value): Mirror above changes to write_pieced_value as
8418 applicable.
8419
8420 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8421
8422 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8423 truncate full bytes from dest_offset_bits before using it as an
8424 offset into the buffer.
8425
8426 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8427
8428 * dwarf2loc.c (write_pieced_value): Include transfer size in
8429 byte-wise check.
8430
8431 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8432
8433 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8434 calculation of this_size.
8435
8436 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8437
8438 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8439 when targeting a bit-field.
8440 (write_pieced_value): Likewise.
8441
8442 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8443
8444 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8445 (allocate_piece_closure): Drop addr_size parameter.
8446 (dwarf2_evaluate_loc_desc_full): Adjust call to
8447 allocate_piece_closure.
8448
8449 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8450
8451 PR gdb/21226
8452 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8453 the LSB end, independent of endianness.
8454
8455 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8456
8457 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8458 size capping.
8459
8460 2017-06-13 Yao Qi <yao.qi@linaro.org>
8461
8462 * mips-linux-nat.c: Move include features/mips*-linux.c to
8463 mips-linux-tdep.c.
8464 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8465 to mips-linux-tdep.c.
8466 * mips-linux-tdep.c: Include features/mips*-linux.c
8467 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8468 functions.
8469 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8470 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8471 (tdesc_mips64_dsp_linux): Declare.
8472
8473 2017-06-12 Tom Tromey <tom@tromey.com>
8474
8475 * valprint.h (val_print_type_code_int): Remove.
8476 * valprint.c (generic_val_print_int): Always call
8477 val_print_scalar_formatted.
8478 (val_print_type_code_int): Remove.
8479 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8480 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8481 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8482 * ada-valprint.c (ada_val_print_num): Use
8483 val_print_scalar_formatted.
8484
8485 2017-06-12 Tom Tromey <tom@tromey.com>
8486
8487 * printcmd.c (print_scalar_formatted): Unify the two switches.
8488 Don't convert scalars to LONGEST.
8489
8490 2017-06-12 Tom Tromey <tom@tromey.com>
8491
8492 PR exp/16225:
8493 * valprint.h (print_decimal_chars): Update.
8494 * valprint.c (maybe_negate_by_bytes): New function.
8495 (print_decimal_chars): Add "is_signed" argument.
8496 * printcmd.c (print_scalar_formatted): Update.
8497
8498 2017-06-12 Tom Tromey <tom@tromey.com>
8499
8500 PR exp/16225:
8501 * valprint.h (print_binary_chars, print_hex_chars): Update.
8502 * valprint.c (val_print_type_code_int): Update.
8503 (print_binary_chars): Add "zero_pad" argument.
8504 (emit_octal_digit): New function.
8505 (print_octal_chars): Don't zero-pad.
8506 (print_decimal_chars): Likewise.
8507 (print_hex_chars): Add "zero_pad" argument.
8508 * sh64-tdep.c (sh64_do_fp_register): Update.
8509 * regcache.c (regcache::dump): Update.
8510 * printcmd.c (print_scalar_formatted): Update.
8511 * infcmd.c (default_print_one_register_info): Update.
8512
8513 2017-06-12 Pedro Alves <palves@redhat.com>
8514 Alan Hayward <alan.hayward@arm.com>
8515
8516 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8517 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8518 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8519 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8520 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8521
8522 2017-06-12 Pedro Alves <palves@redhat.com>
8523
8524 * dwarf2read.c (mapped_symtab::data): Now a vector of
8525 symtab_index_entry instead of vector of
8526 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8527 whether an element's name is NULL instead of checking whether the
8528 element itself is NULL.
8529 (find_slot): Change return type. Adjust.
8530 (hash_expand, , add_index_entry, uniquify_cu_indices)
8531 (write_hash_table): Adjust.
8532
8533 2017-06-12 Pedro Alves <palves@redhat.com>
8534
8535 * dwarf2read.c (recursively_count_psymbols): New function.
8536 (write_psymtabs_to_index): Call it to compute number of psyms and
8537 pass estimate size of psyms_seen to unordered_set's ctor.
8538
8539 2017-06-12 Pedro Alves <palves@redhat.com>
8540
8541 * dwarf2read.c (write_hash_table): Check if key already exists
8542 before emplacing.
8543
8544 2017-06-12 Pedro Alves <palves@redhat.com>
8545
8546 * dwarf2read.c (data_buf::append_space): Rename to...
8547 (data_buf::grow): ... this, and make private. Adjust all callers.
8548 (data_buf::append_uint): New method.
8549 (add_address_entry, write_one_signatured_type)
8550 (write_psymtabs_to_index): Use it.
8551
8552 2017-06-12 Pedro Alves <palves@redhat.com>
8553
8554 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8555 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8556 (data_buf::file_write): Call ::fwrite directly.
8557
8558 2017-06-12 Pedro Alves <palves@redhat.com>
8559
8560 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8561 std::vector::erase.
8562
8563 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8564
8565 Code cleanup: C++ify .gdb_index producer.
8566 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8567 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8568 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8569 (create_strtab, add_string): Remove.
8570 (file_write, data_buf): New.
8571 (struct symtab_index_entry): Use std::vector for cu_indices.
8572 (struct mapped_symtab): Use std::vector for data.
8573 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8574 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8575 Remove.
8576 (find_slot): Change return type. Update it to the new data structures.
8577 (hash_expand, add_index_entry): Update it to the new data structures.
8578 (offset_type_compare): Remove.
8579 (uniquify_cu_indices): Update it to the new data structures.
8580 (c_str_view, c_str_view_hasher, vector_hasher): New.
8581 (add_indices_to_cpool): Remove.
8582 (write_hash_table): Update it to the new data structures.
8583 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8584 (eq_psymtab_cu_index): Remove.
8585 (psym_index_map): New typedef.
8586 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8587 reference and std::unordered_map for cu_index_htab.
8588 (add_address_entry, add_address_entry_worker, write_address_map)
8589 (write_psymbols): Update it to the new data structures.
8590 (write_obstack): Remove.
8591 (struct signatured_type_index_data): Change types_list to a data_buf
8592 reference and psyms_seen to a std::unordered_set reference.
8593 (write_one_signatured_type, recursively_write_psymbols)
8594 (write_psymtabs_to_index): Update it to the new data structures.
8595
8596 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8597
8598 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8599 separate-debug-file commands.
8600 * symfile.h (separate_debug_file_debug): New global.
8601 * symfile.c (separate_debug_file_debug): New global.
8602 (separate_debug_file_exists, find_separate_debug_file): Add
8603 debug output.
8604 (_initialize_symfile): Add "set debug separate-debug-file"
8605 command.
8606 * build-id.c (build_id_to_debug_bfd,
8607 find_separate_debug_file_by_buildid): Add debug output.
8608
8609 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8610
8611 * gdbarch.sh (displaced_step_free_closure): Remove.
8612 * gdbarch.h, gdbarch.c: Re-generate.
8613 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8614 displaced_step_free_closure.
8615 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8616 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8617 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8618 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8619 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8620 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8621 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8622 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8623 * infrun.c (displaced_step_clear): Call xfree instead of
8624 gdbarch_displaced_step_free_closure.
8625
8626 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8627
8628 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8629 NULL".
8630
8631 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8632
8633 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8634 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8635 (mn10300_push_dummy_call): Likewise.
8636
8637 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8638
8639 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8640
8641 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8642
8643 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8644
8645 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8646
8647 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8648 able to start inferiors using a shell.
8649 (New remote packets): Announce new packet "QStartupWithShell".
8650 * remote.c: Add PACKET_QStartupWithShell.
8651 (extended_remote_create_inferior): Handle new
8652 PACKET_QStartupWithShell.
8653 (remote_protocol_features) <QStartupWithShell>: New entry for
8654 PACKET_QStartupWithShell.
8655 (_initialize_remote): Call "add_packet_config_cmd" for
8656 QStartupShell.
8657
8658 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8659 Pedro Alves <palves@redhat.com>
8660
8661 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8662 and "nat/fork-inferior.h".
8663 * common/common-inferior.h: New file, with contents from
8664 "gdb/inferior.h".
8665 * commom/common-utils.c: Include "common-utils.h".
8666 (stringify_argv): New function.
8667 * common/common-utils.h (stringify_argv): New prototype.
8668 * configure.nat: Add "fork-inferior.o" as a dependency for
8669 "*linux*", "fbsd*" and "nbsd*" hosts.
8670 * corefile.c (get_exec_file): Update comment.
8671 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8672 instead of "startup_inferior".
8673 (darwin_create_inferior): Call "add_thread_silent" after
8674 "fork_inferior".
8675 * fork-child.c: Cleanup unnecessary includes.
8676 (SHELL_FILE): Move to "common/common-fork-child.c".
8677 (environ): Likewise.
8678 (exec_wrapper): Initialize.
8679 (get_exec_wrapper): New function.
8680 (breakup_args): Move to "common/common-fork-child.c"; rename to
8681 "breakup_args_for_exec".
8682 (escape_bang_in_quoted_argument): Move to
8683 "common/common-fork-child.c".
8684 (saved_ui): New variable.
8685 (prefork_hook): New function.
8686 (postfork_hook): Likewise.
8687 (postfork_child_hook): Likewise.
8688 (gdb_startup_inferior): Likewise.
8689 (fork_inferior): Move to "common/common-fork-child.c". Update
8690 function to support gdbserver.
8691 (startup_inferior): Likewise.
8692 * gdbcore.h (get_exec_file): Remove declaration.
8693 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8694 instead of "startup_inferior". Call "add_thread_silent" after
8695 "fork_inferior".
8696 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8697 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8698 instead of "startup_inferior". Call "add_thread_silent" after
8699 "fork_inferior".
8700 * inferior.h: Include "common-inferior.h".
8701 (trace_start_error): Move to "common/common-utils.h".
8702 (trace_start_error_with_name): Likewise.
8703 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8704 (startup_inferior): Likewise.
8705 (gdb_startup_inferior): New prototype.
8706 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8707 * nat/fork-inferior.h: New file.
8708 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8709 instead of "startup_inferior". Call "add_thread_silent" after
8710 "fork_inferior".
8711 * target.h (target_terminal_init): Move prototype to
8712 "target/target.h".
8713 (target_terminal_inferior): Likewise.
8714 (target_terminal_ours): Likewise.
8715 * target/target.h (target_terminal_init): New prototype, moved
8716 from "target.h".
8717 (target_terminal_inferior): Likewise.
8718 (target_terminal_ours): Likewise.
8719 * utils.c (gdb_flush_out_err): New function.
8720
8721 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8722
8723 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8724 * common/common-gdbthread.h: New file, with parts from
8725 "gdb/gdbthread.h".
8726 * gdbthread.h: Include "common-gdbthread.h".
8727 (switch_to_thread): Moved to "common/common-gdbthread.h".
8728
8729 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8730
8731 * Makefile.in (SFILES): Add "common/job-control.c".
8732 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8733 (COMMON_OBS): Add "job-control.o".
8734 * common/job-control.c: New file, with contents from
8735 "gdb/inflow.c".
8736 * common/job-control.h: New file, with contents from "terminal.h".
8737 * fork-child.c: Include "job-control.h".
8738 * inflow.c: Include "job-control.h".
8739 (gdb_setpgid): Move to "common/common-inflow.c".
8740 (_initialize_inflow): Move setting of "job_control" to
8741 "handle_job_control".
8742 * terminal.h (job_control): Moved to "common/common-terminal.h".
8743 (gdb_setpgid): Likewise.
8744 * top.c: Include "job_control.h".
8745 * utils.c: Likewise.
8746 (job_control): Moved to "job-control.c".
8747
8748 2017-06-07 Pedro Alves <palves@redhat.com>
8749
8750 * Makefile.in (SFILES): Add gdb_regex.c.
8751 (COMMON_OBS): Add gdb_regex.o.
8752 * ada-lang.c (ada_add_standard_exceptions)
8753 (ada_add_exceptions_from_frame, name_matches_regex)
8754 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8755 parameter type to compiled_regex. Adjust.
8756 (ada_exceptions_list): Use compiled_regex.
8757 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8758 std::unique_ptr<compiled_regex>.
8759 (exception_catchpoint::~exception_catchpoint): Remove regfree
8760 call.
8761 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8762 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8763 * breakpoint.c (solib_catchpoint::compiled): Now a
8764 std::unique_ptr<compiled_regex>.
8765 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8766 (check_status_catch_solib): Adjust to use compiled_regex.
8767 (add_solib_catchpoint): Adjust to use compiled_regex.
8768 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8769 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8770 compiled_regex reference. Adjust to use it.
8771 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8772 declaration. Include "gdb_regex.h".
8773 (apropos_cmd): Change regex parameter to compiled_regex reference.
8774 * gdb_regex.c: New file.
8775 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8776 declarations.
8777 (class compiled_regex): New.
8778 * linux-tdep.c: Include "common/gdb_optional.h".
8779 (struct mapping_regexes): New, factored out from
8780 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8781 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8782 gdb::optional and remove cleanups. Adjust to compiled_regex.
8783 * probe.c: Include "common/gdb_optional.h".
8784 (collect_probes): Use compiled_regex and gdb::optional and remove
8785 cleanups.
8786 * skip.c: Include "common/gdb_optional.h".
8787 (skiplist_entry::compiled_function_regexp): Now a
8788 gdb::optional<compiled_regex>.
8789 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8790 (free_skiplist_entry): Remove regfree call.
8791 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8792 compiled_regex and gdb::optional.
8793 * symtab.c: Include "common/gdb_optional.h".
8794 (search_symbols): Use compiled_regex and gdb::optional.
8795 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8796 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8797 to gdb_regex.c.
8798
8799 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8800
8801 * regcache.c (regcache::save): Avoid buffer use.
8802 (regcache::dump): Likewise.
8803
8804 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8805
8806 * sh-tdep.c (sh_pseudo_register_read): Remove
8807 MAX_REGISTER_SIZE.
8808 (sh_pseudo_register_write): Likewise.
8809 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8810 (sh64_pseudo_register_write): Likewise
8811
8812 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8813
8814 * aarch64-tdep.c (aarch64_store_return_value): Use
8815 V_REGISTER_SIZE.
8816 (aarch64_pseudo_read_value): Likewise.
8817 (aarch64_pseudo_write): Likewise.
8818
8819 2017-06-06 Yao Qi <yao.qi@linaro.org>
8820
8821 * regformats/regdef.h (set_register_cache): Remove the
8822 declaration.
8823
8824 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8825
8826 * frame.c (frame_unwind_register_signed): Use
8827 frame_unwind_register_value.
8828
8829 2017-06-06 Pedro Alves <palves@redhat.com>
8830
8831 PR breakpoints/21553
8832 * breakpoint.c (create_breakpoints_sal_default)
8833 (init_breakpoint_sal, create_breakpoint_sal): Use
8834 gdb::unique_xmalloc_ptr for string parameters.
8835 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8836 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8837 (base_breakpoint_create_breakpoints_sal)
8838 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8839 (strace_marker_create_breakpoints_sal)
8840 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8841 string parameters.
8842 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8843 gdb::unique_xmalloc_ptr for string parameters.
8844 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8845 parameters.
8846
8847 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8848
8849 * alpha-tdep.c (alpha_register_to_value): Use
8850 get_frame_register_value.
8851 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8852
8853 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8854
8855 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8856 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8857 (ia64_value_to_register): Likewise.
8858 (ia64_extract_return_value): Likewise.
8859 (ia64_store_return_value): Likewise.
8860 (ia64_push_dummy_call): Likewise.
8861
8862 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8863
8864 GDB 8.0 released.
8865
8866 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8867
8868 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8869
8870 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8871
8872 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8873 parameter.
8874 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8875
8876 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8877
8878 * event-loop.c (poll_timers): Unallocate timer using delete
8879 instead of xfree.
8880
8881 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8882
8883 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8884 (struct breakpoint) <~breakpoint>: New.
8885 (struct watchpoint): Inherit from breakpoint.
8886 <~watchpoint>: New.
8887 <base>: Remove.
8888 (struct tracepoint): Inherit from breakpoint.
8889 <base>: Remove.
8890 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8891 (struct longjmp_breakpoint): Inherit from breakpoint.
8892 <~longjmp_breakpoint>: New.
8893 <base>: Remove.
8894 (new_breakpoint_from_type): Remove casts.
8895 (watchpoint_in_thread_scope): Remove reference to base field.
8896 (watchpoint_del_at_next_stop): Likewise.
8897 (update_watchpoint): Likewise.
8898 (watchpoint_check): Likewise.
8899 (bpstat_check_watchpoint): Likewise.
8900 (set_longjmp_breakpoint): Likewise.
8901 (struct fork_catchpoint): Inherit from breakpoint.
8902 <base>: Remove.
8903 (struct solib_catchpoint): Inherit from breakpoint.
8904 <~solib_catchpoint>: New.
8905 <base>: Remove.
8906 (dtor_catch_solib): Change to ...
8907 (solib_catchpoint::~solib_catchpoint): ... this.
8908 (breakpoint_hit_catch_solib): Remove reference to base field.
8909 (add_solib_catchpoint): Likewise.
8910 (create_fork_vfork_event_catchpoint): Likewise.
8911 (struct exec_catchpoint): Inherit from breakpoint.
8912 <~exec_catchpoint>: New.
8913 <base>: Remove.
8914 (dtor_catch_exec): Change to ...
8915 (exec_catchpoint::~exec_catchpoint): ... this.
8916 (dtor_watchpoint): Change to ...
8917 (watchpoint::~watchpoint): ... this.
8918 (watch_command_1): Remove reference to base field.
8919 (catch_exec_command_1): Likewise.
8920 (base_breakpoint_dtor): Change to ...
8921 (breakpoint::~breakpoint): ... this.
8922 (base_breakpoint_ops): Remove dtor field value.
8923 (longjmp_bkpt_dtor): Change to ...
8924 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8925 (strace_marker_create_breakpoints_sal): Remove reference to base
8926 field.
8927 (delete_breakpoint): Don't manually call breakpoint destructor.
8928 (create_tracepoint_from_upload): Remove reference to base field.
8929 (trace_pass_set_count): Likewise.
8930 (initialize_breakpoint_ops): Don't initialize
8931 momentary_breakpoint_ops, don't set dtors.
8932 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8933 <~ada_catchpoint>: New.
8934 <base>: Remove.
8935 (create_excep_cond_exprs): Remove reference to base field.
8936 (dtor_exception): Change to ...
8937 (ada_catchpoint::~ada_catchpoint): ... this.
8938 (dtor_catch_exception): Remove.
8939 (dtor_catch_exception_unhandled): Remove.
8940 (dtor_catch_assert): Remove.
8941 (create_ada_exception_catchpoint): Remove reference to base
8942 field.
8943 (initialize_ada_catchpoint_ops): Don't set dtors.
8944 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8945 breakpoint.
8946 <~signal_catchpoint>: New.
8947 <base>: Remove.
8948 (signal_catchpoint_dtor): Change to ...
8949 (signal_catchpoint::~signal_catchpoint): ... this.
8950 (create_signal_catchpoint): Remove reference to base field.
8951 (initialize_signal_catchpoint_ops): Don't set dtor.
8952 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8953 from breakpoint.
8954 <~syscall_catchpoint>: New.
8955 <base>: Remove.
8956 (dtor_catch_syscall): Change to ...
8957 (syscall_catchpoint::~syscall_catchpoint): ... this.
8958 (create_syscall_event_catchpoint): Remove reference to base
8959 field.
8960 (initialize_syscall_catchpoint_ops): Don't set dtor.
8961 * break-catch-throw.c (struct exception_catchpoint): Inherit
8962 from breakpoint.
8963 <~exception_catchpoint>: New.
8964 <base>: Remove.
8965 (dtor_exception_catchpoint): Change to ...
8966 (exception_catchpoint::~exception_catchpoint): ... this.
8967 (handle_gnu_v3_exceptions): Remove reference to base field.
8968 (initialize_throw_catchpoint_ops): Don't set dtor.
8969 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8970 field.
8971 * remote.c (remote_get_tracepoint_status): Likewise.
8972 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8973 * tracefile.c (tracefile_fetch_registers): Likewise.
8974 * tracepoint.c (actions_command): Likewise.
8975 (validate_actionline): Likewise.
8976 (tfind_1): Likewise.
8977 (get_traceframe_location): Likewise.
8978 (find_matching_tracepoint_location): Likewise.
8979 (parse_tracepoint_status): Likewise.
8980 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8981
8982 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8983
8984 * breakpoint.c (struct longjmp_breakpoint): New struct.
8985 (is_tracepoint_type): Change return type to bool.
8986 (is_longjmp_type): New function.
8987 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8988 (set_raw_breakpoint_without_location): Use
8989 new_breakpoint_from_type.
8990 (set_raw_breakpoint): Likewise.
8991
8992 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8993
8994 * breakpoint.c (new_breakpoint_from_type): New function.
8995 (create_breakpoint_sal): Use new_breakpoint_from_type and
8996 unique_ptr.
8997 (create_breakpoint): Likewise.
8998
8999 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9000
9001 * memattr.c (mem_info_command): Rename to ...
9002 (info_mem_command): ... this.
9003 (mem_enable_command): Rename to ...
9004 (enable_mem_command): ... this.
9005 (mem_disable_command): Rename to ...
9006 (disable_mem_command): ... this.
9007 (mem_delete_command): Rename to ...
9008 (delete_mem_command): ... this.
9009 (_initialize_mem): Adjust function names.
9010
9011 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9012
9013 * btrace.c (handle_pt_insn_events): New.
9014 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9015 STATUS. Split into this and ...
9016 (handle_pt_insn_event_flags): ... this.
9017
9018 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9019
9020 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9021 and struct pt_insn.resynced.
9022 * configure: Regenerated.
9023 * config.in: Regenerated.
9024
9025 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9026
9027 * btrace.c (ftrace_find_call_by_number): New function.
9028 (ftrace_new_function): Store objects, not pointers.
9029 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9030 ftrace_new_gap, ftrace_update_function,
9031 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9032 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9033 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9034 btrace_ends_with_single_insn, btrace_call_get): Account for
9035 btrace_thread_info::functions now storing objects.
9036 * btrace.h (struct btrace_thread_info): Add constructor.
9037 (struct btrace_thread_info) <functions>: Make std::vector.
9038 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9039 Initialize with default values.
9040 * record-btrace.c (record_btrace_frame_sniffer): Account for
9041 btrace_thread_info::functions now storing objects.
9042
9043 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9044
9045 * btrace.c: Remove typedef bfun_s.
9046 (ftrace_new_gap): Directly add gaps to the list of gaps.
9047 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9048 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9049 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9050 instead of gdb VEC.
9051
9052 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9053
9054 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9055 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9056 with btrace_thread_info::next_segment and
9057 btrace_thread_info::prev_segment.
9058 * btrace.h: Remove struct btrace_func_link.
9059 (struct btrace_function): Replace pair of function segment pointers
9060 with pair of indices.
9061 * python/py-record-btrace.c (btpy_call_prev_sibling,
9062 btpy_call_next_sibling): Replace references to
9063 btrace_thread_info::segment with btrace_thread_info::next_segment and
9064 btrace_thread_info::prev_segment.
9065 * record-btrace.c (record_btrace_frame_this_id): Use
9066 btrace_find_call_by_number.
9067
9068 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9069
9070 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9071 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9072 btrace_insn_next, btrace_insn_prev): Remove references to
9073 btrace_thread_info::flow.
9074 * btrace.h (struct btrace_function): Remove FLOW.
9075
9076 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9077
9078 * btrace.c (ftrace_find_call_by_number): New function.
9079 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9080 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9081 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9082 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9083 index.
9084 * btrace.h (struct btrace_function): Turn UP into an index.
9085 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9086 as an index.
9087 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9088 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9089 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9090
9091 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9092
9093 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9094 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9095 ftrace_update_function, ftrace_compute_global_level_offset,
9096 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9097 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9098 btrace_insn_end, btrace_is_empty): Remove references to
9099 btrace_thread_info::begin and btrace_thread_info::end.
9100 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9101 (struct btrace_thread_info) <functions>: Adjust comment.
9102 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9103 btrace_thread_info::begin.
9104
9105 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9106
9107 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9108 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9109 ftrace_update_function): Remove arguments that implicitly were always
9110 BTINFO->END.
9111 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9112 Don't pass BTINFO->END.
9113
9114 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9115
9116 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9117 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9118 btrace_find_insn_by_number): Replace function segment pointer with
9119 index.
9120 (btrace_insn_cmp): Simplify.
9121 * btrace.h: (struct btrace_insn_iterator) Rename index to
9122 insn_index. Replace function segment pointer with index into function
9123 segment vector.
9124 * record-btrace.c (record_btrace_call_history): Replace function
9125 segment pointer use with index.
9126 (record_btrace_frame_sniffer): Retrieve function call segment through
9127 vector.
9128 (record_btrace_set_replay): Remove defunc't safety check.
9129
9130 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9131
9132 * btrace.c (btrace_ends_with_single_insn): New function.
9133 (btrace_call_get, btrace_call_number, btrace_call_begin,
9134 btrace_call_end, btrace_call_next, btrace_call_prev,
9135 btrace_find_call_by_number): Use index into call segment vector
9136 instead of pointer.
9137 (btrace_call_cmp): Simplify.
9138 * btrace.h (struct btrace_call_iterator): Replace function call segment
9139 pointer with index into vector.
9140 * record-btrace.c (record_btrace_call_history): Use index instead of
9141 pointer.
9142
9143 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9144
9145 * btrace.c (btrace_insn_begin, btrace_insn_end,
9146 btrace_find_insn_by_number): Add btinfo to iterator.
9147 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9148
9149 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9150
9151 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9152 and save pointers directly.
9153 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9154 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9155 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9156 changed signature of functions.
9157 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9158 (btrace_fetch): Remove code that adds btrace_function pointers to
9159 vector of btrace_functions.
9160 (btrace_clear): Simplify freeing vector of btrace_functions.
9161
9162 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9163
9164 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9165 Replace VEC_* with std::vector functions.
9166 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9167 (struct btrace_thread_info)<functions>: Change type to std::vector.
9168
9169 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9170
9171 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9172 "Removed targets and native configurations" up. Merge duplicate
9173 "New commands" sub-sections. Add "New options" sub-sections.
9174
9175 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9176
9177 * defs.h (copy_integer_to_size): New declaration.
9178 * findvar.c (copy_integer_to_size): New function.
9179 (do_cint_test): New selftest function.
9180 (copy_integer_to_size_test): Likewise.
9181 (_initialize_findvar): Likewise.
9182 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9183 (mips_fbsd_collect_reg): Use raw_collect_integer.
9184 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9185 (mips64_fill_gregset): Use raw_collect_integer
9186 (mips64_fill_fpregset): Use raw_supply_integer.
9187 * regcache.c (regcache::raw_supply_integer): New function.
9188 (regcache::raw_collect_integer): Likewise.
9189 * regcache.h: (regcache::raw_supply_integer): New declaration.
9190 (regcache::raw_collect_integer): Likewise.
9191
9192 2017-05-24 Yao Qi <yao.qi@linaro.org>
9193
9194 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9195 (COMMON_OBS): Add gdbarch-selftests.o.
9196 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9197 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9198 * gdbarch-selftests.c: New file.
9199 * regcache.h (regcache) <~regcache>: Mark it virtual if
9200 GDB_SELF_TEST.
9201 <raw_write>: Likewise.
9202
9203 2017-05-24 Yao Qi <yao.qi@linaro.org>
9204
9205 * regcache.c (current_regcache): Change it to
9206 regcache::current_regcache.
9207 (regcache_observer_target_changed): Update.
9208 (regcache_thread_ptid_changed): Make it a regcache static
9209 method.
9210 (regcache_thread_ptid_changed): Update.
9211 (class regcache_access): New.
9212 (current_regcache_test): Update.
9213 (_initialize_regcache): Update.
9214 * regcache.h: Include forward_list.
9215 (regcache): Declare regcache_thread_ptid_changed and declare
9216 registers_changed_ptid as friend.
9217
9218 2017-05-24 Yao Qi <yao.qi@linaro.org>
9219
9220 * i387-tdep.c (i387_register_to_value): Use register_size
9221 instead of TYPE_LENGTH.
9222 * m68k-tdep.c (m68k_register_to_value): Likewise.
9223
9224 2017-05-24 Yao Qi <yao.qi@linaro.org>
9225
9226 * i387-tdep.c (i387_convert_register_p): Return false if type
9227 code isn't TYPE_CODE_FLT.
9228
9229 2017-05-24 Yao Qi <yao.qi@linaro.org>
9230
9231 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9232 length is 4.
9233 (alpha_register_to_value): Remove type length check.
9234 (alpha_value_to_register): Likewise.
9235
9236 2017-05-24 Yao Qi <yao.qi@linaro.org>
9237
9238 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9239 TYPE_CODE_FLT.
9240
9241 2017-05-24 Yao Qi <yao.qi@linaro.org>
9242
9243 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9244 TYPE_CODE_FLT or not.
9245
9246 2017-05-24 Yao Qi <yao.qi@linaro.org>
9247
9248 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9249 * avr-tdep.c (avr_gdbarch_init): Likewise.
9250 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9251 * cris-tdep.c (cris_gdbarch_init): Likewise.
9252 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9253 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9254 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9255 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9256 * mep-tdep.c (mep_gdbarch_init): Likewise.
9257 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9258 * mips-tdep.c (mips_gdbarch_init): Likewise.
9259 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9260 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9261 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9262 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9263 * v850-tdep.c (v850_gdbarch_init): Likewise.
9264
9265 2017-05-24 Yao Qi <yao.qi@linaro.org>
9266
9267 * selftest-arch.c (tests_with_arch): Call registers_changed
9268 and reinit_frame_cache.
9269 * selftest.c (run_self_tests): Likewise.
9270
9271 2017-05-24 Yao Qi <yao.qi@linaro.org>
9272
9273 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9274 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9275
9276 2017-05-24 Yao Qi <yao.qi@linaro.org>
9277
9278 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9279 set_gdbarch_print_insn.
9280
9281 2017-05-24 Yao Qi <yao.qi@linaro.org>
9282
9283 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9284 set_gdbarch_print_insn.
9285
9286 2017-05-24 Yao Qi <yao.qi@linaro.org>
9287
9288 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9289 set_gdbarch_print_insn.
9290 * arc-tdep.c (arc_gdbarch_init): Likewise.
9291 * arch-utils.c: include dis-asm.h.
9292 (default_print_insn): New function.
9293 * arch-utils.h (default_print_insn): Declare.
9294 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9295 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9296 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9297 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9298 * frv-tdep.c (frv_gdbarch_init): Likewise.
9299 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9300 * gdbarch.sh (print_insn): Use default_print_insn.
9301 * gdbarch.c: Regenerated.
9302 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9303 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9304 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9305 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9306 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9307 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9308 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9309 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9310 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9311 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9312 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9313 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9314 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9315 * mt-tdep.c (mt_gdbarch_init): Likewise.
9316 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9317 * nios2-tdep.c (nios2_print_insn): Remove.
9318 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9319 * rx-tdep.c (rx_gdbarch_init): Likewise.
9320 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9321 * score-tdep.c (score_print_insn): Remove.
9322 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9323 * sh-tdep.c (sh_gdbarch_init): Likewise.
9324 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9325 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9326 * tic6x-tdep.c (tic6x_print_insn): Remove.
9327 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9328 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9329 * v850-tdep.c (v850_gdbarch_init): Likewise.
9330 * vax-tdep.c (vax_gdbarch_init): Likewise.
9331 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9332 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9333
9334 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9335
9336 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9337 (MIPS_FP0_REGNUM): Remove.
9338 (MIPS_FSR_REGNUM): Remove.
9339 (mips_fbsd_supply_fpregs): Use mips_regnum.
9340 (mips_fbsd_supply_gregs): Likewise.
9341 (mips_fbsd_collect_fpregs): Likewise.
9342 (mips_fbsd_collect_gregs): Likewise.
9343
9344 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9345
9346 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9347 (getpfpregs_supplies): New function.
9348 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9349 getfpregs_supplies.
9350 (mips_fbsd_store_inferior_registers): Likewise.
9351
9352 2017-05-22 Pedro Alves <palves@redhat.com>
9353
9354 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9355 maintainer.
9356
9357 2017-05-22 Alan Hayward <alan.hayward@arm.com>
9358
9359 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9360 (store_register): Likewise.
9361 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9362 (get_decimal_float_return_value): Likewise.
9363 (do_ppc_sysv_return_value): Likewise.
9364 (ppc64_sysv_abi_push_integer): Likewise.
9365 (ppc64_sysv_abi_push_freg): Likewise.
9366 (ppc64_sysv_abi_return_value_base): Likewise.
9367 (ppc64_sysv_abi_return_value): Likewise.
9368 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9369 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9370 * rs6000-nat.c: Likewise.
9371 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9372 (rs6000_value_to_register): Likewise.
9373 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9374
9375 2017-05-21 Tom Tromey <tom@tromey.com>
9376
9377 PR rust/21466:
9378 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9379 arrays as "[T]", not "[T; ]".
9380
9381 2017-05-19 Tom Tromey <tom@tromey.com>
9382
9383 PR rust/21484:
9384 * rust-lang.c (exp_descriptor_rust): New function.
9385 (rust_language_defn): Use it.
9386 * p-lang.c (pascal_language_defn): Update.
9387 * opencl-lang.c (opencl_language_defn): Update.
9388 * objc-lang.c (objc_language_defn): Update.
9389 * m2-lang.c (m2_language_defn): Update.
9390 * language.h (struct language_defn)
9391 <la_watch_location_expression>: New member.
9392 * language.c (unknown_language_defn, auto_language_defn)
9393 (local_language_defn): Update.
9394 * go-lang.c (go_language_defn): Update.
9395 * f-lang.c (f_language_defn): Update.
9396 * d-lang.c (d_language_defn): Update.
9397 * c-lang.h (c_watch_location_expression): Declare.
9398 * c-lang.c (c_watch_location_expression): New function.
9399 (c_language_defn, cplus_language_defn, asm_language_defn)
9400 (minimal_language_defn): Use it.
9401 * breakpoint.c (watch_command_1): Call
9402 la_watch_location_expression.
9403 * ada-lang.c (ada_language_defn): Update.
9404
9405 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9406
9407 PR tui/21482
9408 * gdb_curses.h (NOMACROS): Define.
9409 (NCURSES_NOMACROS): Define.
9410
9411 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9412
9413 PR tui/21482
9414 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9415 arg to char *.
9416 * tui/tui-wingeneral.c (box_win): Likewise.
9417 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9418 (tui_show_source_line): Likewise.
9419 (tui_show_exec_info_content): Likewise.
9420
9421 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9422
9423 * sparc-tdep.c (sparc_structure_return_p)
9424 (sparc_arg_on_registers_p): New functions.
9425 (sparc32_store_arguments): Use them.
9426 * sparc64-tdep.c (sparc64_16_byte_align_p)
9427 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9428 Handle TYPE_CODE_ARRAY.
9429
9430 2017-05-17 Yao Qi <yao.qi@linaro.org>
9431
9432 * cli/cli-decode.c (add_alias_cmd): New function.
9433 * command.h (add_alias_cmd): Declare.
9434 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9435 instead call add_alias_cmd.
9436
9437 2017-05-17 Pedro Alves <palves@redhat.com>
9438
9439 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9440 (nat_makefile_frag): ... this. All references updated.
9441 * configure.ac: Likewise.
9442 * configure.nat: Likewise. Enhance comments.
9443 * configure: Regenerate.
9444
9445 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9446
9447 * procfs.c (procfs_create_inferior): Change prototype to match
9448 definition.
9449
9450 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9451
9452 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9453 C++ compiler warning.
9454
9455 2017-05-12 Tom Tromey <tom@tromey.com>
9456
9457 PR rust/21483:
9458 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9459 recurse, just call value_struct_elt directly.
9460
9461 2017-05-12 Tom Tromey <tom@tromey.com>
9462
9463 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9464 OP_RUST_ARRAY>: Fix.
9465
9466 2017-05-12 Tom Tromey <tom@tromey.com>
9467
9468 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9469
9470 2017-05-09 Yao Qi <yao.qi@linaro.org>
9471
9472 * regcache.c: Include <forward_list>.
9473 (struct regcache_list): Remove.
9474 (current_regcache): Update.
9475 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9476 (regcache_thread_ptid_changed): Likewise.
9477 (registers_changed_ptid): Likewise.
9478 (current_regcache_size): Likewise.
9479
9480 2017-05-09 Yao Qi <yao.qi@linaro.org>
9481
9482 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9483 (current_regcache_size): New function.
9484 (current_regcache_test): New function.
9485 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9486
9487 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9488
9489 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9490 (print_gp_register_row): Use get_frame_register_value.
9491
9492 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9493
9494 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9495 (mips_supply_fpregset): Likewise.
9496 (mips64_supply_gregset): Likewise.
9497
9498 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9499
9500 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9501 regcache->raw_supply_zeroed.
9502
9503 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9504
9505 * configure.nat: Rearrange 'case' statements to match
9506 host before cpu.
9507
9508 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9509
9510 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9511 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9512 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9513 "@nat_extra_makefile_frag@".
9514 (Makefile): Remove dependency on "@frags@".
9515 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9516 (data-directory/Makefile): Likewise.
9517 * config/aarch64/linux.mh: Deleted; moved contents to
9518 "gdb/configure.nat".
9519 * config/alpha/alpha-linux.mh: Likewise.
9520 * config/alpha/nbsd.mh: Likewise.
9521 * config/arm/linux.mh: Likewise.
9522 * config/arm/nbsdelf.mh: Likewise.
9523 * config/i386/cygwin.mh: Likewise.
9524 * config/i386/cygwin64.mh: Likewise.
9525 * config/i386/darwin.mh: Likewise.
9526 * config/i386/fbsd.mh: Likewise.
9527 * config/i386/fbsd64.mh: Likewise.
9528 * config/i386/go32.mh: Likewise.
9529 * config/i386/i386gnu.mh: Likewise.
9530 * config/i386/i386sol2.mh: Likewise.
9531 * config/i386/linux.mh: Likewise.
9532 * config/i386/linux64.mh: Likewise.
9533 * config/i386/mingw.mh: Likewise.
9534 * config/i386/mingw64.mh: Likewise.
9535 * config/i386/nbsd64.mh: Likewise.
9536 * config/i386/nbsdelf.mh: Likewise.
9537 * config/i386/nto.mh: Likewise.
9538 * config/i386/obsd.mh: Likewise.
9539 * config/i386/obsd64.mh: Likewise.
9540 * config/i386/sol2-64.mh: Likewise.
9541 * config/ia64/linux.mh: Likewise.
9542 * config/m32r/linux.mh: Likewise.
9543 * config/m68k/linux.mh: Likewise.
9544 * config/m68k/nbsdelf.mh: Likewise.
9545 * config/m68k/obsd.mh: Likewise.
9546 * config/m88k/obsd.mh: Likewise.
9547 * config/mips/fbsd.mh: Likewise.
9548 * config/mips/linux.mh: Likewise.
9549 * config/mips/nbsd.mh: Likewise.
9550 * config/mips/obsd64.mh: Likewise.
9551 * config/pa/linux.mh: Likewise.
9552 * config/pa/nbsd.mh: Likewise.
9553 * config/pa/obsd.mh: Likewise.
9554 * config/powerpc/aix.mh: Likewise.
9555 * config/powerpc/fbsd.mh: Likewise.
9556 * config/powerpc/linux.mh: Likewise.
9557 * config/powerpc/nbsd.mh: Likewise.
9558 * config/powerpc/obsd.mh: Likewise.
9559 * config/powerpc/ppc64-linux.mh: Likewise.
9560 * config/powerpc/spu-linux.mh: Likewise.
9561 * config/s390/linux.mh: Likewise.
9562 * config/sh/nbsd.mh: Likewise.
9563 * config/sparc/fbsd.mh: Likewise.
9564 * config/sparc/linux.mh: Likewise.
9565 * config/sparc/linux64.mh: Likewise.
9566 * config/sparc/nbsd64.mh: Likewise.
9567 * config/sparc/nbsdelf.mh: Likewise.
9568 * config/sparc/obsd64.mh: Likewise.
9569 * config/sparc/sol2.mh: Likewise.
9570 * config/tilegx/linux.mh: Likewise.
9571 * config/vax/nbsdelf.mh: Likewise.
9572 * config/vax/obsd.mh: Likewise.
9573 * config/xtensa/linux.mh: Likewise.
9574 * config/i386/i386gnu.mn: New file, with excerpts from
9575 "config/i386/i386gnu.mh".
9576 * configure: Regenerate.
9577 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9578 *.mh files under "gdb/config".
9579 * configure.nat: New file, with contents from the
9580 "gdb/config/*/*.mh" files.
9581
9582 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9583
9584 * btrace.c (btrace_clear): Free insn vector.
9585
9586 2017-05-05 Pedro Alves <palves@redhat.com>
9587
9588 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9589 * configure: Regenerate.
9590
9591 2017-05-04 Pedro Alves <palves@redhat.com>
9592
9593 * Makefile.in (SFILES): Add progspace-and-thread.c.
9594 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9595 (COMMON_OBS): Add progspace-and-thread.o.
9596 * breakpoint.c: Include "progspace-and-thread.h".
9597 (update_inserted_breakpoint_locations)
9598 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9599 Use scoped_restore_current_pspace_and_thread.
9600 (create_std_terminate_master_breakpoint): Use
9601 scoped_restore_current_program_space.
9602 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9603 (print_breakpoint_location): Use
9604 scoped_restore_current_program_space.
9605 (bp_loc_is_permanent): Use
9606 scoped_restore_current_pspace_and_thread.
9607 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9608 (download_tracepoint_locations): Use
9609 scoped_restore_current_pspace_and_thread.
9610 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9611 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9612 (enum step_over_calls_kind): Moved from inferior.h.
9613 (class scoped_restore_current_thread): New class.
9614 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9615 declaration.
9616 (scoped_restore_current_thread): New class.
9617 * infcmd.c: Include "common/gdb_optional.h".
9618 (continue_1, proceed_after_attach): Use
9619 scoped_restore_current_thread.
9620 (notice_new_inferior): Use scoped_restore_current_thread.
9621 * inferior.c: Include "progspace-and-thread.h".
9622 (restore_inferior, save_current_inferior): Delete.
9623 (add_inferior_command, clone_inferior_command): Use
9624 scoped_restore_current_pspace_and_thread.
9625 * inferior.h (scoped_restore_current_inferior): New class.
9626 * infrun.c: Include "progspace-and-thread.h" and
9627 "common/gdb_optional.h".
9628 (follow_fork_inferior): Use
9629 scoped_restore_current_pspace_and_thread.
9630 (scoped_restore_exited_inferior): New class.
9631 (handle_vfork_child_exec_or_exit): Use
9632 scoped_restore_exited_inferior,
9633 scoped_restore_current_pspace_and_thread,
9634 scoped_restore_current_thread and scoped_restore.
9635 (fetch_inferior_event): Use scoped_restore_current_thread.
9636 * linespec.c (decode_line_full, decode_line_1): Use
9637 scoped_restore_current_program_space.
9638 * mi/mi-main.c: Include "progspace-and-thread.h".
9639 (exec_continue): Use scoped_restore_current_thread.
9640 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9641 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9642 * proc-service.c (ps_pglobal_lookup): Use
9643 scoped_restore_current_program_space.
9644 * progspace-and-thread.c: New file.
9645 * progspace-and-thread.h: New file.
9646 * progspace.c (release_program_space, clone_program_space): Use
9647 scoped_restore_current_program_space.
9648 (restore_program_space, save_current_program_space)
9649 (save_current_space_and_thread): Delete.
9650 (switch_to_program_space_and_thread): Moved to
9651 progspace-and-thread.c.
9652 * progspace.h (save_current_program_space)
9653 (save_current_space_and_thread): Delete declarations.
9654 (scoped_restore_current_program_space): New class.
9655 * remote.c (remote_btrace_maybe_reopen): Use
9656 scoped_restore_current_thread.
9657 * symtab.c: Include "progspace-and-thread.h".
9658 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9659 * thread.c (print_thread_info_1): Use
9660 scoped_restore_current_thread.
9661 (struct current_thread_cleanup): Delete.
9662 (do_restore_current_thread_cleanup)
9663 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9664 (scoped_restore_current_thread::~scoped_restore_current_thread):
9665 ... this new dtor.
9666 (make_cleanup_restore_current_thread): Rename/convert to ...
9667 (scoped_restore_current_thread::scoped_restore_current_thread):
9668 ... this new ctor.
9669 (thread_apply_all_command): Use scoped_restore_current_thread.
9670 (thread_apply_command): Use scoped_restore_current_thread.
9671 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9672 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9673
9674 2017-05-04 Pedro Alves <palves@redhat.com>
9675
9676 * thread.c (make_cleanup_restore_current_thread): Move
9677 find_thread_ptid call before the is_stopped call. Assert that the
9678 thread is found. Replace is_stopped call by checking the thread's
9679 state directly. Remove unnecessary NULL-thread check.
9680
9681 2017-05-04 Pedro Alves <palves@redhat.com>
9682
9683 * corelow.c (thread_section_name): New class.
9684 (get_core_register_section, get_core_siginfo): Use it.
9685
9686 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9687
9688 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9689 (get_core_register_section): Remove xfree of NULL pointer.
9690
9691 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9692
9693 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9694 * regcache.c (regcache::raw_supply_zeroed): New function.
9695 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9696
9697 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9698
9699 * gdbarch.sh: Remove commented out definition of
9700 TARGET_CHAR_BIT.
9701 * gdbarch.h: Re-generate.
9702
9703 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9704
9705 * configure: Regenerate.
9706
9707 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9708
9709 * solib-target.c (solib_target_relocate_section_addresses):
9710 Remove num_section_bases, num_bases, segment_bases variables.
9711
9712 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9713
9714 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9715
9716 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9717
9718 * solib-target.c: Include <vector>
9719 (struct lm_info_target) <~lm_info_target>: Remove.
9720 <segment_bases, section_bases>: Change type to
9721 std::vector<CORE_ADDR>.
9722 (library_list_start_segment, library_list_start_section,
9723 library_list_end_library,
9724 solib_target_relocate_section_addresses): Adjust.
9725
9726 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9727
9728 * gdbarch.sh (software_single_step): Change return type to
9729 std::vector<CORE_ADDR>.
9730 * gdbarch.c, gdbarch.h: Re-generate.
9731 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9732 Adjust.
9733 (arm_deal_with_atomic_sequence_raw): Adjust.
9734 (thumb_get_next_pcs_raw): Adjust.
9735 (arm_get_next_pcs_raw): Adjust.
9736 (arm_get_next_pcs): Adjust.
9737 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9738 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9739 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9740 (alpha_software_single_step): Adjust.
9741 * alpha-tdep.h (alpha_software_single_step): Adjust.
9742 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9743 * arm-tdep.c (arm_software_single_step): Adjust.
9744 (arm_breakpoint_kind_from_current_state): Adjust.
9745 * arm-tdep.h (arm_software_single_step): Adjust.
9746 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9747 * cris-tdep.c (cris_software_single_step): Adjust.
9748 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9749 (micromips_deal_with_atomic_sequence): Adjust.
9750 (deal_with_atomic_sequence): Adjust.
9751 (mips_software_single_step): Adjust.
9752 * mips-tdep.h (mips_software_single_step): Adjust.
9753 * moxie-tdep.c (moxie_software_single_step): Adjust.
9754 * nios2-tdep.c (nios2_software_single_step): Adjust.
9755 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9756 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9757 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9758 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9759 * sparc-tdep.c (sparc_software_single_step): Adjust.
9760 * spu-tdep.c (spu_software_single_step): Adjust.
9761 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9762
9763 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9764
9765 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9766 * gdbarch.h: Re-generate.
9767
9768 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9769
9770 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9771 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9772 * python/py-instruction.c, python/py-instruction.h: New file.
9773 * python/py-record.c: Add py-instruction.h include.
9774 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9775 gdb.RecordInstruction.
9776 * python/python-internal.h: Add gdbpy_initialize_instruction
9777 declaration.
9778 * python/python.c (do_start_initialization): Add
9779 gdbpy_initialize_instruction.
9780
9781 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9782
9783 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9784 Remove.
9785 (btrace_func_from_recpy_func): New function.
9786 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9787 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9788 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9789 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9790 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9791 Also, use new helper functions.
9792 (btpy_list_item): Use new helper functions.
9793 (recpy_bt_function_call_history): Use new type name.
9794 (btpy_call_getset): Remove.
9795 (gdbpy_initialize_btrace): Remove code to initialize
9796 gdb.BtraceFunctionCall.
9797 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9798 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9799 recpy_bt_func_prev, recpy_bt_func_next): New export.
9800 * python/py-record.c (recpy_func_type): New static object.
9801 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9802 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9803 recpy_func_next): New function.
9804 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9805 (recpy_func_getset): New static object.
9806 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9807 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9808
9809 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9810
9811 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9812 (btpy_object, btpy_insn_type, btpy_new): Remove.
9813 (btpy_list_object): Use gdb.RecordInstruction type instead of
9814 gdb.BtraceInstruction type.
9815 (btrace_insn_from_recpy_insn): New function.
9816 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9817 btpy_new.
9818 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9819 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9820 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9821 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9822 instead of btpy_object.
9823 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9824 btpy_insn_data, btpy_insn_decode): Rename to ...
9825 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9826 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9827 recpy_bt_insn_decode): This. Also, use new helper functions.
9828 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9829 recpy_insn_type.
9830 (btpy_insn_getset): Remove.
9831 (gdbpy_initialize_btrace): Remove code to initialize
9832 gdb.BtraceInstruction. Use recpy_element_object.
9833 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9834 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9835 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9836 * python/py-record.c (recpy_insn_type): New static object.
9837 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9838 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9839 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9840 New function.
9841 (recpy_insn_getset): New static object.
9842 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9843 * python/py-record.h (recpy_element_object): New typedef.
9844 (recpy_insn_type, recpy_insn_new): New export.
9845
9846 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9847
9848 * py-record-btrace.c (btpy_insn_new): Removed.
9849 (btpy_insn_or_gap_new): New function.
9850 (btpy_insn_error): Removed.
9851 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9852 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9853 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9854 btpy_insn_or_gap_new instead of btpy_insn_new.
9855 (btpy_insn_getset): Remove btpy_insn_error.
9856 * py-record.c (recpy_gap_type): New static object.
9857 (recpy_gap_object): New typedef.
9858 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9859 recpy_gap_reason_string): New function.
9860 (recpy_gap_getset): New static object.
9861 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9862 * py-record.h (recpy_gap_new): New export.
9863
9864 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9865
9866 * python/py-record.c (recpy_ptid): Remove.
9867 (recpy_record_getset): Remove recpy_ptid.
9868
9869 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9870
9871 * btrace.c (btrace_fetch): Set inferior_ptid.
9872 * python/py-record-btrace.c: Add "py-record.h" include.
9873 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9874 recpy_bt_end, recpy_bt_instruction_history,
9875 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9876 in gdb.Record object instead of current ptid.
9877 * python/py-record.c: Include new "py-record.h" file.
9878 (recpy_record_object): Moved to py-record.h.
9879 * python/py-record.h: New file.
9880
9881 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9882
9883 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9884 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9885 indentation.
9886
9887 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9888
9889 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9890 the past maintainers section.
9891
9892 2017-04-28 Yao Qi <yao.qi@linaro.org>
9893
9894 * infcmd.c (get_return_value): Use regcache ctor, and remove
9895 cleanup.
9896
9897 2017-04-28 Yao Qi <yao.qi@linaro.org>
9898 Pedro Alves <palves@redhat.com>
9899
9900 * regcache.c (regcache::regcache): New tag dispatch ctor.
9901 (do_cooked_read): Moved above.
9902 (regcache_dup): Use the tag dispatch ctor..
9903 * regcache.h (regcache): Declare ctor, delete copy ctor and
9904 assignment operator, remove friend regcache_dup.
9905
9906 2017-04-28 Yao Qi <yao.qi@linaro.org>
9907
9908 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9909 call method save instead of regcache_cpy.
9910 * regcache.h (struct regcache): Make regcache_dup a friend.
9911
9912 2017-04-28 Yao Qi <yao.qi@linaro.org>
9913
9914 * regcache.c (struct regcache): Move to regcache.h
9915 (regcache::arch): New method.
9916 (regcache_get_ptid): Update.
9917 (get_regcache_arch): Call arch method.
9918 (get_regcache_aspace): Call method aspace.
9919 (register_buffer): Change it to method.
9920 (regcache_save): Change it to regcache::save.
9921 (regcache_restore): Likewise.
9922 (regcache_cpy_no_passthrough): Remove the declaration.
9923 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9924 (regcache_cpy_no_passthrough): Change it to method
9925 cpy_no_passthrough.
9926 (regcache_register_status): Change it to method
9927 get_register_status.
9928 (regcache_invalidate): Change it to method invalidate.
9929 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9930 (regcache_raw_update): Change it to method raw_update.
9931 (regcache_raw_read): Likewise.
9932 (regcache_raw_read_signed): Likewise.
9933 (regcache_raw_read_unsigned): Likewise.
9934 (regcache_raw_write_signed): Likewise.
9935 (regcache_raw_write_unsigned): Likewise.
9936 (regcache_cooked_read): Likewise.
9937 (regcache_cooked_read_value): Likewise.
9938 (regcache_cooked_read_signed): Likewise.
9939 (regcache_cooked_read_unsigned): Likewise.
9940 (regcache_cooked_write_signed): Likewise.
9941 (regcache_cooked_write_unsigned): Likewise.
9942 (regcache_raw_set_cached_value): Likewise.
9943 (regcache_raw_write): Likewise.
9944 (regcache_cooked_write): Likewise.
9945 (regcache_xfer_part): Likewise.
9946 (regcache_raw_read_part): Likewise.
9947 (regcache_raw_write_part): Likewise.
9948 (regcache_cooked_read_part): Likewise.
9949 (regcache_cooked_write_part): Likewise.
9950 (regcache_raw_supply): Likewise.
9951 (regcache_raw_collect): Likewise.
9952 (regcache_transfer_regset): Likewise.
9953 (regcache_supply_regset): Likewise.
9954 (regcache_collect_regset): Likewise.
9955 (regcache_debug_print_register): Likewise.
9956 (enum regcache_dump_what): Move it to regcache.h.
9957 (regcache_dump): Change it to method dump.
9958 * regcache.h (enum regcache_dump_what): New.
9959 (class regcache): New.
9960 * target.c (target_fetch_registers): Call method
9961 debug_print_register.
9962 (target_store_registers): Likewise.
9963
9964 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9965
9966 * windows-nat.c (struct lm_info_windows): Initialize field.
9967 (windows_make_so): Allocate lm_info_windows with new.
9968 (windows_free_so): Free lm_info_windows with delete.
9969
9970 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9971
9972 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9973 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9974 cleanup.
9975 (darwin_free_so): Free lm_info_darwin with delete.
9976
9977 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9978
9979 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9980 <l_addr_p>: Change type to bool.
9981 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9982 (svr4_free_so): Free lm_info_svr4 with delete.
9983 (svr4_copy_library_list): Replace memcpy with call to copy
9984 constructor.
9985 (library_list_start_library, svr4_default_sos): Allocate
9986 lm_info_svr4 with new.
9987
9988 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9989
9990 * solib-target.c (struct lm_info_target): Add destructor,
9991 initialize fields.
9992 <name>: Change type to std::string.
9993 (library_list_start_library): Allocate lm_info_target with new.
9994 (solib_target_free_library_list): Free lm_info_target with
9995 delete.
9996 (solib_target_current_sos): Adapt to std::string.
9997 (solib_target_free_so): Free lm_info_target with delete.
9998
9999 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10000
10001 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10002 fields.
10003 (frv_current_sos): Allocate lm_info_frv with new.
10004 (frv_relocate_main_executable): Free lm_info_frv with delete,
10005 allocate with new.
10006 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10007
10008 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10009
10010 * solib-frv.c (struct lm_info_frv): Fix indentation.
10011
10012 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10013
10014 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10015 map field.
10016 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10017 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10018 and allocate with new.
10019 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10020
10021 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10022
10023 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10024 <filename, member_name>: Change type to std::string.
10025 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10026 (library_list_start_library): Allocate lm_info_aix with new.
10027 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10028 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10029 with copy constructor.
10030
10031 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10032
10033 * solist.h (struct lm_info): Remove.
10034 (struct lm_info_base): New class.
10035 (struct so_list) <lm_info>: Change type to lm_info_base *.
10036 * nto-tdep.c (struct lm_info): Remove.
10037 (lm_addr): Adjust.
10038 * solib-aix.c (struct lm_info): Rename to ...
10039 (struct lm_info_aix): ... this. Extend lm_info_base.
10040 (lm_info_p): Rename to ...
10041 (lm_info_aix_p): ... this, and adjust.
10042 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10043 solib_aix_parse_libraries, library_list_start_library,
10044 solib_aix_free_library_list, solib_aix_parse_libraries,
10045 solib_aix_get_library_list,
10046 solib_aix_relocate_section_addresses, solib_aix_free_so,
10047 solib_aix_get_section_offsets,
10048 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10049 Adjust.
10050 (struct solib_aix_inferior_data) <library_list>: Adjust.
10051 * solib-darwin.c (struct lm_info): Rename to ...
10052 (struct lm_info_darwin): ... this. Extend lm_info_base.
10053 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10054 * solib-dsbt.c (struct lm_info): Rename to ...
10055 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10056 (struct dsbt_info) <main_executable_lm_info): Adjust.
10057 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10058 dsbt_relocate_section_addresses): Adjust.
10059 * solib-frv.c (struct lm_info): Rename to ...
10060 (struct lm_info_frv): ... this. Extend lm_info_base.
10061 (main_executable_lm_info): Adjust.
10062 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10063 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10064 find_canonical_descriptor_in_load_object,
10065 frv_fdpic_find_canonical_descriptor): Adjust.
10066 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10067 to lm_info_svr4.
10068 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10069 svr4_clear_so, svr4_copy_library_list,
10070 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10071 svr4_current_sos, svr4_fetch_objfile_link_map,
10072 solist_update_incremental): Adjust.
10073 * solib-svr4.h (struct lm_info_svr4): Move here from
10074 solib-svr4.c.
10075 * solib-target.c (struct lm_info): Rename to ...
10076 (struct lm_info_target): ... this. Extend lm_info_base.
10077 (lm_info_p): Rename to ...
10078 (lm_info_target_p): ... this.
10079 (solib_target_parse_libraries, library_list_start_segment,
10080 library_list_start_section, library_list_start_library,
10081 library_list_end_library, solib_target_free_library_list,
10082 solib_target_current_sos, solib_target_free_so,
10083 solib_target_relocate_section_addresses): Adjust.
10084 * windows-nat.c (struct lm_info): Rename to ...
10085 (struct lm_info_windows): ... this. Extend lm_info_base.
10086 (windows_make_so, handle_load_dll, handle_unload_dll,
10087 windows_xfer_shared_libraries): Adjust.
10088
10089 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10090
10091 * solib-darwin.c (struct darwin_so_list): Remove.
10092 (darwin_current_sos): Allocate an so_list object instead of a
10093 darwin_so_list, separately allocate an lm_info object.
10094 (darwin_free_so): Free lm_info.
10095
10096 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10097
10098 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10099 with fprintf_filtered.
10100
10101 2017-04-28 Yao Qi <yao.qi@linaro.org>
10102
10103 * regcache.c (regcache::regcache): New function.
10104 (regcache::~regcache): New function.
10105 (regcache_xmalloc_1): Remove.
10106 (regcache_xmalloc): Call new regcache.
10107 (regcache_xfree): Call delete regcache.
10108 (get_thread_arch_aspace_regcache): Call new regcache.
10109
10110 2017-04-28 Yao Qi <yao.qi@linaro.org>
10111
10112 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10113 lwp instead of ptid_get_lwp.
10114
10115 2017-04-28 Yao Qi <yao.qi@linaro.org>
10116
10117 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10118 lwp_info instead of getting from inferior_ptid.
10119
10120 2017-04-27 Keith Seitz <keiths@redhat.com>
10121
10122 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10123 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10124 (CV_CONVERSION_BADNESS): Define.
10125 (rank_one_type): Remove overly restrictive rvalue reference
10126 rank checks.
10127 Add cv-qualifier checks and subranks for type equality.
10128 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10129 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10130 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10131
10132 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10133
10134 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10135 count when creating the object.
10136
10137 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10138 Ulrich Weigand <uweigand@de.ibm.com>
10139
10140 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10141 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10142 is used in AIX.
10143 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10144 (process_xcoff_symbol): Likewise.
10145 (scan_xcoff_symtab): Likewise.
10146
10147 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10148
10149 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10150 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10151 (ia64_access_reg): Use get_frame_register_unsigned.
10152 (ia64_access_rse_reg): Likewise.
10153 (ia64_libunwind_frame_prev_register): Likewise.
10154
10155 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10156
10157 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10158 * gdbarch.c: Regenerated.
10159 * gdbarch.h: Regenerated.
10160 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10161 visibility external.
10162 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10163 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10164 (enum cfa_how_kind): Move to ...
10165 (struct dwarf2_frame_state_reg_info): Likewise.
10166 (struct dwarf2_frame_state): Likewise.
10167 * dwarf2-frame.h: ... here.
10168 (dwarf2_frame_state_alloc_regs): New declaration.
10169 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10170 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10171
10172 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10173
10174 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10175 regcache_raw_read_unsigned.
10176 (xtensa_pseudo_register_write): Likewise.
10177
10178 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10179
10180 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10181 (nds32_pseudo_register_write): Likewise.
10182
10183 2017-04-25 Yao Qi <yao.qi@linaro.org>
10184
10185 * regcache.c (struct regcache) <readonly_p>: Change its type
10186 to bool.
10187 (regcache_xmalloc_1): Update parameter type and callers update.
10188
10189 2017-04-25 Yao Qi <yao.qi@linaro.org>
10190
10191 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10192 set_gdbarch_wchar_bit.
10193 * arm-tdep.c (arm_gdbarch_init): Likewise.
10194
10195 2017-04-25 Pedro Alves <palves@redhat.com>
10196
10197 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10198 (BothAreRelocatable, memcopy, memmove): Don't define.
10199 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10200 macros.
10201
10202 2017-04-25 Pedro Alves <palves@redhat.com>
10203
10204 * common/common-defs.h: Include "common/poison.h".
10205 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10206 and adjust.
10207 * common/poison.h: New file.
10208 * common/traits.h: Include <type_traits>.
10209 (Not, Or, Requires): New, moved from common/function-view.h.
10210
10211 2017-04-25 Pedro Alves <palves@redhat.com>
10212
10213 * breakpoint.h (struct breakpoint): In-class initialize all
10214 fields. Make boolean fields "bool".
10215 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10216 memset call and initializations no longer necessary.
10217
10218 2017-04-25 Pedro Alves <palves@redhat.com>
10219
10220 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10221 reference.
10222 (pt_btrace_insn): New function.
10223 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10224
10225 2017-04-25 Pedro Alves <palves@redhat.com>
10226
10227 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10228 "base" field and inherit from "bp_location" instead. Add
10229 non-default ctor.
10230 (allocate_location_exception): Use new non-default ctor.
10231 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10232 (init_bp_location): Convert to ...
10233 (bp_location::bp_location): ... this new ctor, and remove memset
10234 call.
10235 (base_breakpoint_allocate_location): Use the new non-default ctor.
10236 * breakpoint.h (bp_location): Now a class. Declare default and
10237 non-default ctors. In-class initialize all members.
10238 (init_bp_location): Remove declaration.
10239
10240 2017-04-25 Pedro Alves <palves@redhat.com>
10241
10242 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10243 assignment operator.
10244
10245 2017-04-24 Yao Qi <yao.qi@linaro.org>
10246
10247 * doublest.c (convert_doublest_to_floatformat): Call
10248 floatformat_totalsize_bytes.
10249
10250 2017-04-22 Tom Tromey <tom@tromey.com>
10251
10252 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10253 ui_out_emit_list.
10254 * stack.c (print_frame): Use ui_out_emit_list.
10255 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10256 ui_out_emit_list.
10257 * mi/mi-main.c (print_one_inferior)
10258 (mi_cmd_data_list_register_names)
10259 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10260 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10261 ui_out_emit_list.
10262 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10263 (mi_output_solib_attribs): Use ui_out_emit_list,
10264 ui_out_emit_tuple.
10265 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10266 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10267 (mi_cmd_stack_list_args, list_args_or_locals): Use
10268 ui_out_emit_list.
10269 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10270 * breakpoint.c (print_solib_event, output_thread_groups): Use
10271 ui_out_emit_list.
10272
10273 2017-04-22 Tom Tromey <tom@tromey.com>
10274
10275 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10276 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10277 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10278
10279 2017-04-22 Tom Tromey <tom@tromey.com>
10280
10281 * tracepoint.c (tvariables_info_1)
10282 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10283
10284 2017-04-22 Tom Tromey <tom@tromey.com>
10285
10286 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10287 annotate_arg_emitter.
10288 * breakpoint.c (print_mention_watchpoint)
10289 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10290 * annotate.h (struct annotate_arg_emitter): New.
10291
10292 2017-04-22 Tom Tromey <tom@tromey.com>
10293
10294 * record-btrace.c (record_btrace_insn_history)
10295 (record_btrace_insn_history_range, record_btrace_call_history)
10296 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10297 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10298 ui_out_emit_tuple.
10299 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10300 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10301 * skip.c (skip_info): Use ui_out_emit_tuple.
10302 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10303 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10304 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10305 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10306 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10307 ui_out_emit_tuple.
10308 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10309 (output_register, mi_cmd_data_read_memory)
10310 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10311 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10312 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10313 Use ui_out_emit_tuple.
10314 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10315 ui_out_emit_tuple.
10316 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10317 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10318 * linux-thread-db.c (info_auto_load_libthread_db): Use
10319 ui_out_emit_tuple.
10320 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10321 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10322 * disasm.c (do_mixed_source_and_assembly_deprecated)
10323 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10324 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10325 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10326 * breakpoint.c (print_one_breakpoint_location)
10327 (print_one_breakpoint): Use ui_out_emit_tuple.
10328 * auto-load.c (print_script, info_auto_load_cmd): Use
10329 ui_out_emit_tuple.
10330 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10331
10332 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10333
10334 * thread.c (print_thread_info_1): Remove dead code.
10335
10336 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10337
10338 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10339 GDB_SELF_TEST.
10340 * arm-tdep.c (selftests::arm_record_test): Likewise.
10341
10342 2017-04-21 Yao Qi <yao.qi@linaro.org>
10343
10344 * regcache.c (regcache_restore): Remove argument 2. Replace
10345 argument 3 with regcache. Get register status from
10346 src->register_status and get register contents from
10347 register_buffer (src, regnum).
10348 (regcache_cpy): Update.
10349
10350 2017-04-19 Pedro Alves <palves@redhat.com>
10351
10352 * gdbthread.h (thread): Add missing closing parenthesis in
10353 comment.
10354
10355 2017-04-19 Pedro Alves <palves@redhat.com>
10356
10357 * common/refcounted-object.h: New file.
10358 * gdbthread.h: Include "common/refcounted-object.h".
10359 (thread_info): Inherit from refcounted_object and add comments.
10360 (thread_info::incref, thread_info::decref)
10361 (thread_info::m_refcount): Delete.
10362 (thread_info::deletable): Use the refcounted_object::refcount()
10363 method.
10364 * inferior.c (current_inferior_): Add comment.
10365 (set_current_inferior): Increment/decrement refcounts.
10366 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10367 not-deletable instead of comparing with the current inferior.
10368 (initialize_inferiors): Increment the initial inferior's refcount.
10369 * inferior.h (struct inferior): Forward declare.
10370 Include "common/refcounted-object.h".
10371 (current_inferior, set_current_inferior): Move declaration to
10372 before struct inferior's definition, and fix comment.
10373 (inferior): Inherit from refcounted_object. Add comments.
10374 * thread.c (switch_to_thread_no_regs): Reference the thread's
10375 inferior pointer directly instead of doing a ptid lookup.
10376 (switch_to_no_thread): New function.
10377 (switch_to_thread(thread_info *)): New function, factored out
10378 from ...
10379 (switch_to_thread(ptid_t)): ... this.
10380 (restore_current_thread): Delete.
10381 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10382 fields, and add 'inf' field.
10383 (do_restore_current_thread_cleanup): Check whether old->inf is
10384 alive instead of looking up an inferior by ptid. Use
10385 switch_to_thread and switch_to_no_thread.
10386 (restore_current_thread_cleanup_dtor): Use old->inf directly
10387 instead of lookup up an inferior by id. Decref the inferior.
10388 Don't restore 'removable'.
10389 (make_cleanup_restore_current_thread): Same the inferior pointer
10390 in old, instead of the inferior number. Incref the inferior.
10391 Don't save/clear 'removable'.
10392
10393 2017-04-19 Pedro Alves <palves@redhat.com>
10394
10395 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10396 unittests/scoped_restore-selftests.c.
10397 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10398 * common/scoped_restore.h (scoped_restore_base): Make "class".
10399 (scoped_restore_base::release): New public method.
10400 (scoped_restore_base::scoped_restore_base): New protected ctor.
10401 (scoped_restore_base::m_saved_var): New protected field.
10402 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10403 scoped_restore_base base class instead of m_saved_var directly.
10404 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10405 (scoped_restore_tmpl::scoped_restore_tmpl(const
10406 scoped_restore_tmpl<T>&)): Likewise.
10407 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10408 method.
10409 (scoped_restore_tmpl::saved_var): New method.
10410 (scoped_restore_tmpl::m_saved_var): Delete.
10411 * inferior.h (inferior::detaching): Now a bool.
10412 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10413 cleanup.
10414 * unittests/scoped_restore-selftests.c: New file.
10415
10416 2017-04-19 Pedro Alves <palves@redhat.com>
10417
10418 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10419 Re-sort in alphabetic order.
10420
10421 2017-04-18 Pedro Alves <palves@redhat.com>
10422
10423 * xml-support.c (obstack_xml_printf): Delete.
10424 * xml-support.h (obstack_xml_printf): Delete.
10425
10426 2017-04-18 Pedro Alves <palves@redhat.com>
10427
10428 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10429 vdebug, verror, body_text, start_element, end_element, name,
10430 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10431 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10432 is_xinclude>: Make private and add m_ prefix.
10433 (gdb_xml_parser::body_text): New method, based on ...
10434 (gdb_xml_body_text): ... this. Adjust.
10435 (gdb_xml_parser::vdebug): New method, based on ...
10436 (gdb_xml_debug): ... this. Adjust.
10437 (gdb_xml_parser::verror): New method, based on ...
10438 (gdb_xml_error): ... this. Adjust.
10439 (gdb_xml_parser::start_element): New method, based on ...
10440 (gdb_xml_start_element): ... this. Adjust.
10441 (gdb_xml_start_element_wrapper): Defer to
10442 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10443 (gdb_xml_parser::end_element): New method, based on ...
10444 (gdb_xml_end_element_wrapper): ... this. Adjust.
10445 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10446 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10447 (gdb_xml_parser::use_dtd): New method, based on ...
10448 (gdb_xml_use_dtd): ... this. Adjust.
10449 (gdb_xml_parser::parse): New method, based on ...
10450 (gdb_xml_parse): ... this. Adjust.
10451 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10452 (xinclude_start_include): Adjust to call the parser's name method.
10453 (xml_xinclude_default, xml_xinclude_start_doctype)
10454 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10455 method.
10456 (xml_process_xincludes): Adjust to call parser methods.
10457 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10458 declarations.
10459
10460 2017-04-18 Pedro Alves <palves@redhat.com>
10461
10462 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10463 gdb::optional<std::string>.
10464 * xml-support.c: Include <string>.
10465 (scope_level::scope_level(scope_level &&))
10466 (scope_level::~scope_level): Delete.
10467 (scope_level::body): Now a std::string.
10468 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10469 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10470 parameter.
10471 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10472 (xinclude_parsing_data::output): Now a std::string reference.
10473 (xinclude_start_include): Adjust.
10474 (xml_xinclude_default): Adjust.
10475 (xml_process_xincludes): Add 'output' parameter, and return bool.
10476 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10477 and return bool.
10478 * xml-tdesc.c: Include <unordered_map> and <string>.
10479 (tdesc_xml_cache): Delete.
10480 (tdesc_xml_cache_s): Delete.
10481 (xml_cache): Now an std::unordered_map.
10482 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10483 (target_fetch_description_xml): Change return type to
10484 gdb::optional<std::string>, and adjust.
10485 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10486 (target_fetch_description_xml): Change return type to
10487 gdb::optional<std::string>.
10488
10489 2017-04-18 Pedro Alves <palves@redhat.com>
10490
10491 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10492 unittests/optional-selftests.c.
10493 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10494 * unittests/optional-selftests.c: New file.
10495 * unittests/optional/assignment/1.cc: New file.
10496 * unittests/optional/assignment/2.cc: New file.
10497 * unittests/optional/assignment/3.cc: New file.
10498 * unittests/optional/assignment/4.cc: New file.
10499 * unittests/optional/assignment/5.cc: New file.
10500 * unittests/optional/assignment/6.cc: New file.
10501 * unittests/optional/assignment/7.cc: New file.
10502 * unittests/optional/cons/copy.cc: New file.
10503 * unittests/optional/cons/default.cc: New file.
10504 * unittests/optional/cons/move.cc: New file.
10505 * unittests/optional/cons/value.cc: New file.
10506 * unittests/optional/in_place.cc: New file.
10507 * unittests/optional/observers/1.cc: New file.
10508 * unittests/optional/observers/2.cc: New file.
10509
10510 2017-04-18 Pedro Alves <palves@redhat.com>
10511
10512 * common/gdb_optional.h: Include common/traits.h.
10513 (in_place_t): New type.
10514 (in_place): New constexpr variable.
10515 (optional::optional): Remove member initialization of
10516 m_instantiated.
10517 (optional::optional(in_place_t...)): New constructor.
10518 (optional::~optional): Use reset.
10519 (optional::optional(const optional&)): New.
10520 (optional::optional(const optional&&)): New.
10521 (optional::optional(T &)): New.
10522 (optional::optional(T &&)): New.
10523 (operator::operator=(const optional &)): New.
10524 (operator::operator=(optional &&)): New.
10525 (operator::operator= (const T &))
10526 (operator::operator= (T &&))
10527 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10528 (operator::reset): New.
10529 (operator::m_instantiated):: Add in-class initializer.
10530 * common/traits.h: Include <type_traits>.
10531 (struct And): New types.
10532
10533 2017-04-18 Pedro Alves <palves@redhat.com>
10534
10535 * xml-support.c: Include <vector>.
10536 (scope_level::scope_level(const gdb_xml_element *))
10537 (scope_level::scope_level(scope_level&&)): New.
10538 (scope_level::~scope_level): New.
10539 (scope_level_s): Delete.
10540 (gdb_xml_parser::scopes): Now a std::vector.
10541 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10542 Use std::vector.
10543 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10544 scope cleanup code.
10545 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10546 of the scopes member. Use std::vector::emplace_back.
10547
10548 2017-04-18 Pedro Alves <palves@redhat.com>
10549
10550 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10551 a bool.
10552 (gdb_xml_end_element): Change type of first parameter.
10553 (gdb_xml_cleanup): Rename to ...
10554 (gdb_xml_parser::~gdb_xml_parser): ... this.
10555 (gdb_xml_create_parser_and_cleanup): Delete with ...
10556 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10557 to this new ctor.
10558 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10559 using gdb_xml_create_parser_and_cleanup.
10560 (xinclude_parsing_data): Add ctor/dtor.
10561 (xml_xinclude_cleanup): Delete.
10562 (xml_process_xincludes): Create a local xinclude_parsing_data
10563 instead of heap-allocating one. Create a local gdb_xml_parser
10564 instead of heap-allocating one with
10565 gdb_xml_create_parser_and_cleanup.
10566
10567 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10568
10569 PR threads/20743
10570 * fbsd-nat.c (resume_one_thread_cb): Remove.
10571 (resume_all_threads_cb): Remove.
10572 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10573 iterate_over_threads.
10574
10575 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10576
10577 * NEWS: Create a new section for the next release branch.
10578 Rename the section of the current branch, now that it has
10579 been cut.
10580
10581 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10582
10583 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10584 * version.in: Bump version to 8.0.50.DATE-git.
10585
10586 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10587
10588 PR gdb/21385
10589 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10590 independently of the host, and fix build breakage on Cygwin.
10591
10592 2017-04-13 Pedro Alves <palves@redhat.com>
10593
10594 * inferior.c (free_inferior): Convert to ...
10595 (inferior::~inferior): ... this dtor.
10596 (inferior::inferior): New ctor, factored out from ...
10597 (add_inferior_silent): ... here. Allocate the inferior with a new
10598 expression.
10599 (delete_inferior): Call delete instead of free_inferior.
10600 * inferior.h (gdb_environ, continuation): Forward declare.
10601 (inferior): Now a class. Add in-class initialization to all
10602 members. Make boolean fields bool, except 'detaching'.
10603 (inferior::inferior): New explicit ctor.
10604 (inferior::~inferior): New.
10605
10606 2017-04-13 Pedro Alves <palves@redhat.com>
10607
10608 * inferior.c (init_inferior_list): Delete.
10609 * inferior.h (init_inferior_list): Delete.
10610
10611 2017-04-13 Pedro Alves <palves@redhat.com>
10612
10613 PR threads/13217
10614 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10615 (top level): Call it twice, with different thread sets.
10616
10617 2017-04-13 Pedro Alves <palves@redhat.com>
10618
10619 * thread.c: Include <algorithm>.
10620 (thread_array_cleanup): Delete.
10621 (scoped_inc_dec_ref): New class.
10622 (live_threads_count): New function.
10623 (set_thread_refcount): Delete.
10624 (tp_array_compar_ascending): Now a bool.
10625 (tp_array_compar): Convert to a std::sort comparison function.
10626 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10627 and live_threads_count.
10628
10629 2017-04-13 Pedro Alves <palves@redhat.com>
10630
10631 * infrun.c (follow_fork_inferior): Also switch the current
10632 inferior.
10633
10634 2017-04-13 Pedro Alves <palves@redhat.com>
10635
10636 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10637 before calling create_internal_breakpoint.
10638
10639 2017-04-13 Pedro Alves <palves@redhat.com>
10640
10641 * fork-child.c (execv_argv): New class.
10642 (breakup_args): Refactored as ...
10643 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10644 Copy arguments to storage and replace separators with NULL
10645 terminators in place.
10646 (escape_bang_in_quoted_argument): Adjust to return bool.
10647 (execv_argv::execv_argv): New ctor.
10648 (execv_argv::init_for_shell): New method, factored out from
10649 fork_inferior. Don't strdup strings into the vector.
10650 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10651 Remove free_vector_argv call.
10652
10653 2017-04-13 Yao Qi <yao.qi@linaro.org>
10654
10655 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10656 tdep->rx_psw_type.
10657
10658 2017-04-13 Yao Qi <yao.qi@linaro.org>
10659
10660 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10661 * rx-tdep.c (rx_gdbarch_init): Likewise.
10662
10663 2017-04-13 Pedro Alves <palves@redhat.com>
10664
10665 * breakpoint.h (struct breakpoint): Reindent.
10666
10667 2017-04-13 Pedro Alves <palves@redhat.com>
10668
10669 * breakpoint.c (bp_location): Rename to ...
10670 (bp_locations): ... this. All references updated.
10671 (bp_location_count): Rename to ...
10672 (bp_locations_count): ... this. All references updated.
10673 (bp_location_placed_address_before_address_max): Rename to ...
10674 (bp_locations_placed_address_before_address_max): ... this. All
10675 references updated.
10676 (bp_location_shadow_len_after_address_max): Rename to ...
10677 (bp_locations_shadow_len_after_address_max): ... this. All
10678 references updated.
10679 (bp_location_compare_addrs): Rename to ...
10680 (bp_locations_compare_addrs): ... this. All references updated.
10681 (bp_location_compare):Rename to ...
10682 (bp_locations_compare): ... this. All references updated.
10683 (bp_location_target_extensions_update): Rename to ...
10684 (bp_locations_target_extensions_update): ... this. All references
10685 updated.
10686
10687 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10688
10689 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10690 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10691 'sgtty.h'.
10692 * common/gdb_termios.h: New file, with parts of "terminal.h".
10693 * inflow.c: Include "gdb_termios.h".
10694 * ser-unix.c: Include "gdb_termios.h".
10695 * terminal.h: Move terminal-related defines to
10696 "common/gdb_termios.h".
10697
10698 2017-04-12 Tom Tromey <tom@tromey.com>
10699
10700 * probe.c (parse_probes): Update.
10701 * location.h (delete_event_location): Don't declare.
10702 (event_location_deleter::operator()): Update.
10703 * location.c (event_location_deleter::operator()): Rename from
10704 delete_event_location.
10705 * linespec.h (linespec_result) <location>: Change type to
10706 event_location_up.
10707 * linespec.c (canonicalize_linespec, event_location_to_sals)
10708 (decode_objc): Update.
10709 (linespec_result): Don't call delete_event_location.
10710 * breakpoint.c (create_breakpoints_sal)
10711 (bkpt_probe_create_sals_from_location)
10712 (strace_marker_create_sals_from_location): Update.
10713
10714 2017-04-12 Tom Tromey <tom@tromey.com>
10715
10716 * linespec.h (struct linespec_result): Add constructor and
10717 destructor.
10718 (init_linespec_result, destroy_linespec_result)
10719 (make_cleanup_destroy_linespec_result): Don't declare.
10720 * linespec.c (init_linespec_result): Remove.
10721 (linespec_result::~linespec_result): Rename from
10722 destroy_linespec_result. Update.
10723 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10724 Remove.
10725 * breakpoint.c (create_breakpoint, break_range_command)
10726 (decode_location_default): Update.
10727 * ax-gdb.c (agent_command_1): Update.
10728
10729 2017-04-12 Tom Tromey <tom@tromey.com>
10730
10731 * remote.c (remote_download_tracepoint): Update.
10732 * python/py-breakpoint.c (bppy_get_location): Update.
10733 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10734 (gdbscm_breakpoint_location): Update.
10735 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10736 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10737 Change type to event_location_up.
10738 * breakpoint.c (create_overlay_event_breakpoint)
10739 (create_longjmp_master_breakpoint)
10740 (create_std_terminate_master_breakpoint)
10741 (create_exception_master_breakpoint)
10742 (breakpoint_event_location_empty_p, print_breakpoint_location)
10743 (print_one_breakpoint_location, create_thread_event_breakpoint)
10744 (init_breakpoint_sal, create_breakpoint)
10745 (print_recreate_ranged_breakpoint, break_range_command)
10746 (init_ada_exception_breakpoint, say_where): Update.
10747 (base_breakpoint_dtor): Don't call delete_event_location.
10748 (bkpt_print_recreate, tracepoint_print_recreate)
10749 (dprintf_print_recreate, update_static_tracepoint)
10750 (breakpoint_re_set_default): Update.
10751
10752 2017-04-12 Tom Tromey <tom@tromey.com>
10753
10754 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10755 type of "to_do". Update.
10756 (compute_stack_depth): Use std::vector.
10757
10758 2017-04-12 Tom Tromey <tom@tromey.com>
10759
10760 * printcmd.c (find_instruction_backward): Use std::vector.
10761
10762 2017-04-12 Tom Tromey <tom@tromey.com>
10763
10764 * symfile.c (objfilep): Remove typedef.
10765 (reread_symbols): Use a std::vector.
10766
10767 2017-04-12 Tom Tromey <tom@tromey.com>
10768
10769 * mi/mi-main.c (exec_direction_forward): Remove.
10770 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10771 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10772 scoped_restore.
10773 * guile/guile.c (guile_repl_command, guile_command)
10774 (gdbscm_execute_gdb_command): Use scoped_restore.
10775 * go-exp.y (go_parse): Use scoped_restore.
10776 * d-exp.y (d_parse): Use scoped_restore.
10777 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10778 * c-exp.y (c_parse): Use scoped_restore.
10779
10780 2017-04-12 Tom Tromey <tom@tromey.com>
10781
10782 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10783 (mi_parse): Update return type.
10784 (mi_parse_free): Remove.
10785 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10786 (mi_parse::~mi_parse): Rename from mi_parse_free.
10787 (mi_parse_cleanup): Remove.
10788 (mi_parse): Return a unique_ptr. Use new.
10789 * mi/mi-main.c (mi_execute_command): Update.
10790
10791 2017-04-12 Tom Tromey <tom@tromey.com>
10792
10793 * location.c (explicit_location_lex_one): Return a
10794 unique_xmalloc_ptr.
10795 (string_to_explicit_location): Update. Remove cleanups.
10796
10797 2017-04-12 Tom Tromey <tom@tromey.com>
10798
10799 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10800 (compare_value_and_voffset): Change type. Update.
10801 (compute_vtable_size): Change type of "offset_vec".
10802 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10803 (gnuv3_get_typeid): Remove extraneous declaration.
10804
10805 2017-04-12 Tom Tromey <tom@tromey.com>
10806
10807 * charset.h (wchar_iterator): Fix comment.
10808
10809 2017-04-12 Tom Tromey <tom@tromey.com>
10810
10811 * charset.c (iconv_wrapper): New class.
10812 (cleanup_iconv): Remove.
10813 (convert_between_encodings): Use it.
10814
10815 2017-04-12 Tom Tromey <tom@tromey.com>
10816
10817 * symfile.h (increment_reading_symtab): Update type.
10818 * symfile.c (decrement_reading_symtab): Remove.
10819 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10820 * psymtab.c (psymtab_to_symtab): Update.
10821 * dwarf2read.c (dw2_instantiate_symtab): Update.
10822
10823 2017-04-12 Tom Tromey <tom@tromey.com>
10824
10825 * jit.c (struct jit_reader): Declare separately. Add constructor
10826 and destructor. Change type of "handle".
10827 (loaded_jit_reader): Define separately.
10828 (jit_reader_load): Update. New "new".
10829 (jit_reader_unload_command): Use "delete".
10830 * gdb-dlfcn.h (struct dlclose_deleter): New.
10831 (gdb_dlhandle_up): New typedef.
10832 (gdb_dlopen, gdb_dlsym): Update types.
10833 (gdb_dlclose): Remove.
10834 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10835 (gdb_dlsym): Change type of "handle".
10836 (make_cleanup_dlclose): Remove.
10837 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10838 * compile/compile-c-support.c (load_libcc): Update.
10839
10840 2017-04-12 Tom Tromey <tom@tromey.com>
10841
10842 * symtab.h (find_pcs_for_symtab_line): Change return type.
10843 * symtab.c (find_pcs_for_symtab_line): Change return type.
10844 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10845 type of "vec". Update.
10846 (ltpy_get_pcs_for_line): Update.
10847 * linespec.c (decode_digits_ordinary): Update.
10848
10849 2017-04-12 Tom Tromey <tom@tromey.com>
10850
10851 * tracepoint.c (actions_command): Update.
10852 * python/python.c (python_command, python_interactive_command):
10853 Update.
10854 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10855 * guile/guile.c (guile_command): Update.
10856 * defs.h (read_command_lines, read_command_lines_1): Return
10857 command_line_up.
10858 (command_lines_deleter): New struct.
10859 (command_line_up): New typedef.
10860 * compile/compile.c (compile_code_command)
10861 (compile_print_command): Update.
10862 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10863 command_line_up.
10864 (make_cleanup_free_command_lines): Remove.
10865 * cli/cli-script.c (get_command_line, read_command_lines_1)
10866 (copy_command_lines): Return command_line_up.
10867 (while_command, if_command, read_command_lines, define_command)
10868 (document_command): Update.
10869 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10870 Remove.
10871 * breakpoint.h (breakpoint_set_commands): Change type of
10872 "commands".
10873 * breakpoint.c (breakpoint_set_commands): Change type of
10874 "commands". Update.
10875 (do_map_commands_command, update_dprintf_command_list)
10876 (create_tracepoint_from_upload): Update.
10877
10878 2017-04-12 Tom Tromey <tom@tromey.com>
10879
10880 * tracepoint.c (scope_info): Update.
10881 * spu-tdep.c (spu_catch_start): Update.
10882 * python/python.c (gdbpy_decode_line): Update.
10883 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10884 * python/py-breakpoint.c (bppy_init): Update.
10885 * probe.c (parse_probes): Update.
10886 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10887 * location.h (event_location_deleter): New struct.
10888 (event_location_up): New typedef.
10889 (new_linespec_location, new_address_location, new_probe_location)
10890 (new_explicit_location, copy_event_location)
10891 (string_to_event_location, string_to_event_location_basic)
10892 (string_to_explicit_location): Update return type.
10893 (make_cleanup_delete_event_location): Remove.
10894 * location.c (new_linespec_location, new_address_location)
10895 (new_probe_location, new_explicit_location, copy_event_location):
10896 Return event_location_up.
10897 (delete_event_location_cleanup)
10898 (make_cleanup_delete_event_location): Remove.
10899 (string_to_explicit_location, string_to_event_location_basic)
10900 (string_to_event_location): Return event_location_up.
10901 * linespec.c (canonicalize_linespec, event_location_to_sals)
10902 (decode_line_with_current_source)
10903 (decode_line_with_last_displayed, decode_objc): Update.
10904 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10905 * completer.c (location_completer): Update.
10906 * cli/cli-cmds.c (edit_command, list_command): Update.
10907 * breakpoint.c (create_overlay_event_breakpoint)
10908 (create_longjmp_master_breakpoint)
10909 (create_std_terminate_master_breakpoint)
10910 (create_exception_master_breakpoint)
10911 (create_thread_event_breakpoint): Update.
10912 (init_breakpoint_sal): Update. Remove some dead code.
10913 (create_breakpoint_sal): Change type of "location". Update.
10914 (create_breakpoints_sal, create_breakpoint, break_command_1)
10915 (dprintf_command, break_range_command, until_break_command)
10916 (init_ada_exception_breakpoint)
10917 (strace_marker_create_sals_from_location)
10918 (update_static_tracepoint, trace_command, ftrace_command)
10919 (strace_command, create_tracepoint_from_upload): Update.
10920 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10921 * ax-gdb.c (agent_command_1): Update.
10922
10923 2017-04-12 Pedro Alves <palves@redhat.com>
10924
10925 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10926 * configure.tgt: Handle i[34567]86-*-go32* and
10927 i[34567]86-*-msdosdjgpp*.
10928 * i386-tdep.c (i386_svr4_reg_to_regnum):
10929 Make extern.
10930 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10931 i386-go32-tdep.c.
10932 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10933 * i386-go32-tdep.c: New file.
10934 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10935 declarations.
10936
10937 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10938
10939 * aix-thread.c (pd_status2str): Change return type to const char *.
10940
10941 2017-04-12 Pedro Alves <palves@redhat.com>
10942
10943 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10944 calls to set_gdbarch_gnu_triplet_regexp.
10945
10946 2017-04-12 Pedro Alves <palves@redhat.com>
10947
10948 PR gdb/21323
10949 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10950 New enum value.
10951 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10952 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10953 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10954 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10955 * gdbarch.h, gdbarch.c: Regenerate.
10956 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10957 gdbarch_wchar_bit and gdbarch_wchar_signed.
10958 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10959 * arm-tdep.c (arm_gdbarch_init): Likewise.
10960 * avr-tdep.c (avr_gdbarch_init): Likewise.
10961 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10962 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10963 * i386-tdep.c (i386_go32_init_abi): Likewise.
10964 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10965 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10966 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10967 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10968 * sh-tdep.c (sh_gdbarch_init): Likewise.
10969 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10970 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10971 * windows-tdep.c (windows_init_abi): Likewise.
10972 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10973
10974 2017-04-12 Pedro Alves <palves@redhat.com>
10975
10976 PR c++/21323
10977 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10978 cplus_primitive_type_char32_t>: New enum values.
10979 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10980 and cplus_primitive_type_char32_t.
10981 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10982 32, use the archtecture's built-in type for char16_t and char32_t,
10983 respectively. Otherwise, fallback to init_integer_type as before,
10984 but make the type unsigned, and issue a complaint.
10985 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10986
10987 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10988
10989 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10990 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10991
10992 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10993
10994 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10995 'const char *'.
10996
10997 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10998
10999 * common/common-utils.c (free_vector_argv): New function.
11000 * common/common-utils.h: Include <vector>.
11001 (free_vector_argv): New prototype.
11002 * darwin-nat.c (darwin_create_inferior): Rewrite function
11003 prototype in order to constify "exec_file" and accept a
11004 "std::string" for "allargs".
11005 * fork-child.c: Include <vector>.
11006 (breakup_args): Rewrite function, using C++.
11007 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11008 and accept "std::string" for "allargs". Update the code to
11009 calculate "argv" based on "allargs". Update calls to "exec_fun"
11010 and "execvp".
11011 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11012 order to constify "exec_file" and accept a "std::string" for
11013 "allargs".
11014 * go32-nat.c (go32_create_inferior): Likewise.
11015 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11016 * infcmd.c (run_command_1): Constify "exec_file". Use
11017 "std::string" for inferior arguments.
11018 * inferior.h (fork_inferior): Update prototype.
11019 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11020 prototype in order to constify "exec_file" and accept a
11021 "std::string" for "allargs".
11022 * nto-procfs.c (procfs_create_inferior): Likewise.
11023 * procfs.c (procfs_create_inferior): Likewise.
11024 * remote-sim.c (gdbsim_create_inferior): Likewise.
11025 * remote.c (extended_remote_run): Update code to accept
11026 "std::string" as argument.
11027 (extended_remote_create_inferior): Rewrite function prototype in
11028 order to constify "exec_file" and accept a "std::string" for
11029 "allargs".
11030 * rs6000-nat.c (super_create_inferior): Likewise.
11031 (rs6000_create_inferior): Likewise.
11032 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11033 * windows-nat.c (windows_create_inferior): Likewise.
11034
11035 2017-04-11 Pedro Alves <palves@redhat.com>
11036
11037 * thread.c: Fix whitespace throughout.
11038
11039 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11040
11041 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11042
11043 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11044
11045 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11046
11047 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11048
11049 PR gdb/21364
11050 * osdata.c (info_osdata): Check if 'type' is an empty string
11051 instead of NULL.
11052
11053 2017-04-10 Pedro Alves <palves@redhat.com>
11054
11055 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11056 (ptid_to_global_thread_id, in_thread_list)
11057 (do_captured_list_thread_ids, set_resumed, set_running)
11058 (set_executing, set_stop_requested, finish_thread_state)
11059 (validate_registers_access, can_access_registers_ptid)
11060 (print_thread_info_1, switch_to_thread)
11061 (do_restore_current_thread_cleanup)
11062 (make_cleanup_restore_current_thread, thread_command)
11063 (thread_name_command): Use operator== instead of ptid_equal.
11064
11065 2017-04-10 Pedro Alves <palves@redhat.com>
11066
11067 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11068 (current_thread_cleanup_chain): Delete.
11069 (restore_current_thread_cleanup_dtor)
11070 (make_cleanup_restore_current_thread): Remove references to
11071 current_thread_cleanup_chain.
11072
11073 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11074
11075 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11076 REG_UNKNOWN.
11077
11078 2017-04-10 Yao Qi <yao.qi@linaro.org>
11079
11080 PR gdb/19942
11081 * gdbthread.h (thread_info::deletable): New method.
11082 (thread_info::incref): New method.
11083 (thread_info::decref): New method.
11084 (thread_info::refcount): Move it to private.
11085 * infrun.c (save_stop_context): Call inc_refcount.
11086 (release_stop_context_cleanup): Likewise.
11087 * thread.c (set_thread_exited): New function.
11088 (init_thread_list): Delete "tp" only it is deletable, otherwise
11089 call set_thread_exited.
11090 (delete_thread_1): Call set_thread_exited.
11091 (current_thread_cleanup) <inferior_pid>: Remove.
11092 <thread>: New field.
11093 (restore_current_thread_ptid_changed): Removed.
11094 (do_restore_current_thread_cleanup): Adjust.
11095 (restore_current_thread_cleanup_dtor): Don't call
11096 find_thread_ptid.
11097 (set_thread_refcount): Use dec_refcount.
11098 (make_cleanup_restore_current_thread): Adjust.
11099 (thread_apply_all_command): Call inc_refcount.
11100 (_initialize_thread): Don't call
11101 observer_attach_thread_ptid_changed.
11102
11103 2017-04-10 Yao Qi <yao.qi@linaro.org>
11104
11105 * thread.c (delete_thread_1): Hoist code on marking thread as
11106 exited.
11107
11108 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11109
11110 * windows-nat.c (windows_detach): Initialize ptid with
11111 minus_one_ptid.
11112
11113 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11114
11115 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11116
11117 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11118
11119 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11120 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11121 (bfin_pseudo_register_write): Likewise
11122
11123 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11124
11125 * common/ptid.h (struct ptid): Change to...
11126 (class ptid_t): ... this.
11127 <ptid_t>: New constructors.
11128 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11129 matches>: New methods.
11130 <make_null, make_minus_one>: New static methods.
11131 <pid>: Rename to...
11132 <m_pid>: ...this.
11133 <lwp>: Rename to...
11134 <m_lwp>: ...this.
11135 <tid>: Rename to...
11136 <m_tid>: ...this.
11137 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11138 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11139 as references, move comment to class ptid_t.
11140 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11141 ptid_t static methods.
11142 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11143 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11144 Take ptid arguments as references, implement using ptid_t methods.
11145 * unittests/ptid-selftests.c: New file.
11146 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11147 unittests/ptid-selftests.c.
11148 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11149
11150 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11151
11152 * python/python.c (python_run_simple_file): Cast mode literal to
11153 non-const char pointer as expected by PyFile_FromString.
11154
11155 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11156
11157 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11158 minus_one_ptid and null_ptid.
11159
11160 2017-04-05 Pedro Alves <palves@redhat.com>
11161
11162 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11163 * configure: Regenerate.
11164
11165 2017-04-05 Pedro Alves <palves@redhat.com>
11166
11167 * ada-exp.y (yyerror): Constify.
11168 * ada-lang.c (bound_name, get_selections)
11169 (ada_variant_discrim_type)
11170 (ada_variant_discrim_name, ada_value_struct_elt)
11171 (ada_lookup_struct_elt_type, is_unchecked_variant)
11172 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11173 (catch_ada_exception_command_split)
11174 (catch_ada_assert_command_split, catch_assert_command)
11175 (ada_op_name): Constify.
11176 * ada-lang.h (ada_yyerror, get_selections)
11177 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11178 * arc-tdep.c (arc_print_frame_cache): Constify.
11179 * arm-tdep.c (arm_skip_stub): Constify.
11180 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11181 (gen_aggregate_elt_ref): Constify.
11182 * bcache.c (print_bcache_statistics): Constify.
11183 * bcache.h (print_bcache_statistics): Constify.
11184 * break-catch-throw.c (catch_exception_command_1):
11185 * breakpoint.c (struct ep_type_description::description):
11186 Constify.
11187 (add_solib_catchpoint): Constify.
11188 (catch_fork_command_1): Add cast.
11189 (add_catch_command): Constify.
11190 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11191 Constify.
11192 * bsd-uthread.c (bsd_uthread_state): Constify.
11193 * buildsym.c (patch_subfile_names): Constify.
11194 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11195 Constify.
11196 * c-exp.y (yyerror): Constify.
11197 (token::oper): Constify.
11198 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11199 * c-varobj.c (cplus_describe_child): Constify.
11200 * charset.c (find_charset_names): Add cast.
11201 (find_charset_names): Constify array and add const_cast.
11202 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11203 (edit_command): Constify.
11204 * cli/cli-decode.c (lookup_cmd): Constify.
11205 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11206 Constify.
11207 (struct dump_context): Constify.
11208 (add_dump_command, restore_command): Constify.
11209 * cli/cli-script.c (get_command_line): Constify.
11210 * cli/cli-script.h (get_command_line): Constify.
11211 * cli/cli-utils.c (check_for_argument): Constify.
11212 * cli/cli-utils.h (check_for_argument): Constify.
11213 * coff-pe-read.c (struct read_pe_section_data): Constify.
11214 * command.h (lookup_cmd): Constify.
11215 * common/print-utils.c (decimal2str): Constify.
11216 * completer.c (gdb_print_filename): Constify.
11217 * corefile.c (set_gnutarget): Constify.
11218 * cp-name-parser.y (yyerror): Constify.
11219 * cp-valprint.c (cp_print_class_member): Constify.
11220 * cris-tdep.c (cris_register_name, crisv32_register_name):
11221 Constify.
11222 * d-exp.y (yyerror): Constify.
11223 (struct token::oper): Constify.
11224 * d-lang.h (d_yyerror): Constify.
11225 * dbxread.c (struct header_file_location::name): Constify.
11226 (add_old_header_file, add_new_header_file, last_function_name)
11227 (dbx_next_symbol_text, add_bincl_to_list)
11228 (find_corresponding_bincl_psymtab, set_namestring)
11229 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11230 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11231 * defs.h (command_line_input, print_address_symbolic)
11232 (deprecated_readline_begin_hook): Constify.
11233 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11234 Constify.
11235 * event-top.c (handle_line_of_input): Constify and add cast.
11236 * exceptions.c (catch_errors): Constify.
11237 * exceptions.h (catch_errors): Constify.
11238 * expprint.c (print_subexp_standard, op_string, op_name)
11239 (op_name_standard, dump_raw_expression, dump_raw_expression):
11240 * expression.h (op_name, op_string, dump_raw_expression):
11241 Constify.
11242 * f-exp.y (yyerror): Constify.
11243 (struct token::oper): Constify.
11244 (struct f77_boolean_val::name): Constify.
11245 * f-lang.c (f_word_break_characters): Constify.
11246 * f-lang.h (f_yyerror): Constify.
11247 * fork-child.c (fork_inferior): Add cast.
11248 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11249 (new_variant): Constify.
11250 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11251 * gdbarch.c: Regenerate.
11252 * gdbcore.h (set_gnutarget): Constify.
11253 * go-exp.y (yyerror): Constify.
11254 (token::oper): Constify.
11255 * go-lang.h (go_yyerror): Constify.
11256 * go32-nat.c (go32_sysinfo): Constify.
11257 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11258 * guile/scm-cmd.c (cmdscm_function): Constify.
11259 * guile/scm-param.c (pascm_param_value): Constify.
11260 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11261 (h8300sx_register_name): Constify.
11262 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11263 Constify.
11264 * ia64-tdep.c (ia64_register_names): Constify.
11265 * infcmd.c (construct_inferior_arguments): Constify.
11266 (path_command, attach_post_wait): Constify.
11267 * language.c (show_range_command, show_case_command)
11268 (unk_lang_error): Constify.
11269 * language.h (language_defn::la_error)
11270 (language_defn::la_name_of_this): Constify.
11271 * linespec.c (decode_line_2): Constify.
11272 * linux-thread-db.c (thread_db_err_str): Constify.
11273 * lm32-tdep.c (lm32_register_name): Constify.
11274 * m2-exp.y (yyerror): Constify.
11275 * m2-lang.h (m2_yyerror): Constify.
11276 * m32r-tdep.c (m32r_register_names): Constify and make static.
11277 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11278 * m88k-tdep.c (m88k_register_name): Constify.
11279 * macroexp.c (appendmem): Constify.
11280 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11281 (upgrade_type, parse_external, parse_partial_symbols)
11282 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11283 (new_symbol): Constify.
11284 * memattr.c (mem_info_command): Constify.
11285 * mep-tdep.c (register_name_from_keyword): Constify.
11286 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11287 Constify.
11288 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11289 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11290 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11291 cast.
11292 (mi_execute_async_cli_command): Constify.
11293 * mips-tdep.c (mips_register_name): Constify.
11294 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11295 (am33_register_name, am33_2_register_name)
11296 * moxie-tdep.c (moxie_register_names): Constify.
11297 * nat/linux-osdata.c (osdata_type): Constify fields.
11298 * nto-tdep.c (nto_parse_redirection): Constify.
11299 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11300 (lookup_child_selector): Constify.
11301 (objc_methcall::name): Constify.
11302 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11303 (lookup_struct_typedef): Constify.
11304 * objfiles.c (pc_in_section): Constify.
11305 * objfiles.h (pc_in_section): Constify.
11306 * p-exp.y (struct token::oper): Constify.
11307 (yyerror): Constify.
11308 * p-lang.h (pascal_yyerror): Constify.
11309 * parser-defs.h (op_name_standard): Constify.
11310 (op_print::string): Constify.
11311 (exp_descriptor::op_name): Constify.
11312 * printcmd.c (print_address_symbolic): Constify.
11313 * psymtab.c (print_partial_symbols): Constify.
11314 * python/py-breakpoint.c (stop_func): Constify.
11315 (bppy_get_expression): Constify.
11316 * python/py-cmd.c (cmdpy_completer::name): Constify.
11317 (cmdpy_function): Constify.
11318 * python/py-event.c (evpy_add_attribute)
11319 (gdbpy_initialize_event_generic): Constify.
11320 * python/py-event.h (evpy_add_attribute)
11321 (gdbpy_initialize_event_generic): Constify.
11322 * python/py-evts.c (add_new_registry): Constify.
11323 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11324 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11325 * python/py-inferior.c (get_buffer): Add cast.
11326 * python/py-param.c (parm_constant::name): Constify.
11327 * python/py-unwind.c (fprint_frame_id): Constify.
11328 * python/python.c (gdbpy_parameter_value): Constify.
11329 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11330 * remote.c (memory_packet_config::name): Constify.
11331 (show_packet_config_cmd, remote_write_bytes)
11332 (remote_buffer_add_string):
11333 * reverse.c (exec_reverse_once): Constify.
11334 * rs6000-tdep.c (variant::name, variant::description): Constify.
11335 * rust-exp.y (rustyyerror): Constify.
11336 * rust-lang.c (rust_op_name): Constify.
11337 * rust-lang.h (rustyyerror): Constify.
11338 * serial.h (serial_ops::name): Constify.
11339 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11340 (sh_sh3e_register_name, sh_sh2e_register_name)
11341 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11342 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11343 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11344 (sh_sh4al_dsp_register_name): Constify.
11345 * sh64-tdep.c (sh64_register_name): Constify.
11346 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11347 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11348 * stabsread.c (patch_block_stabs, read_type_number)
11349 (ref_map::stabs, ref_add, process_reference)
11350 (symbol_reference_defined, define_symbol, define_symbol)
11351 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11352 (read_one_struct_field, read_struct_fields, read_baseclasses)
11353 (read_tilde_fields, read_struct_type, read_array_type)
11354 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11355 (read_huge_number, read_range_type, read_args, common_block_start)
11356 (find_name_end): Constify.
11357 * stabsread.h (common_block_start, define_symbol)
11358 (process_one_symbol, symbol_reference_defined, ref_add):
11359 * symfile.c (get_section_index, add_symbol_file_command):
11360 * symfile.h (get_section_index): Constify.
11361 * target-descriptions.c (tdesc_type::name): Constify.
11362 (tdesc_free_type): Add cast.
11363 * target.c (find_default_run_target):
11364 (add_deprecated_target_alias, find_default_run_target)
11365 (target_announce_detach): Constify.
11366 (do_option): Constify.
11367 * target.h (add_deprecated_target_alias): Constify.
11368 * thread.c (print_thread_info_1): Constify.
11369 * top.c (deprecated_readline_begin_hook, command_line_input):
11370 Constify.
11371 (init_main): Add casts.
11372 * top.h (handle_line_of_input): Constify.
11373 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11374 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11375 (tfind_command): Rename to ...
11376 (tfind_command_1): ... this and constify.
11377 (tfind_command): New function.
11378 (tfind_end_command, tfind_start_command): Adjust.
11379 (encode_source_string): Constify.
11380 * tracepoint.h (encode_source_string): Constify.
11381 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11382 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11383 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11384 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11385 * tui/tui-win.c (parse_scrolling_args): Constify.
11386 * tui/tui-windata.c (tui_erase_data_content): Constify.
11387 * tui/tui-windata.h (tui_erase_data_content): Constify.
11388 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11389 * tui/tui.c (tui_enable): Add cast.
11390 * utils.c (defaulted_query): Constify.
11391 (init_page_info): Add cast.
11392 (puts_debug, subset_compare): Constify.
11393 * utils.h (subset_compare): Constify.
11394 * varobj.c (varobj_format_string): Constify.
11395 * varobj.h (varobj_format_string): Constify.
11396 * vax-tdep.c (vax_register_name): Constify.
11397 * windows-nat.c (windows_detach): Constify.
11398 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11399 * xml-support.c (gdb_xml_end_element): Constify.
11400 * xml-tdesc.c (tdesc_start_reg): Constify.
11401 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11402 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11403 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11404
11405 2017-04-05 Pedro Alves <palves@redhat.com>
11406
11407 * proc-api.c (struct trans): Constify.
11408 (procfs_note): Constify.
11409 * proc-events.c (struct trans, syscall_table):
11410 * proc-flags.c (struct trans): Constify.
11411 * proc-utils.h (procfs_note): Constify.
11412 * proc-why.c (struct trans): Constify.
11413 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11414 (procfs_detach): Constify.
11415 * sol-thread.c (struct string_map): Constify.
11416 (td_err_string, td_state_string): Constify.
11417
11418 2017-04-05 Pedro Alves <palves@redhat.com>
11419
11420 * proc-api.c (procfs_filename): Don't initialize
11421 procfs_filename.
11422 (prepare_to_trace): Assume procfs_filename is non-NULL.
11423 (_initialize_proc_api): Give procfs_filename a default value here.
11424
11425 2017-04-05 Pedro Alves <palves@redhat.com>
11426
11427 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11428 'cond_string' parameter.
11429 (extract_exception_regexp): Constify 'string' parameter.
11430 (catch_exception_command_1): Constify.
11431 * breakpoint.c (init_catchpoint)
11432 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11433 parameter.
11434 (ep_parse_optional_if_clause, catch_fork_command_1)
11435 (catch_exec_command_1): Constify.
11436 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11437 parameter.
11438 (ep_parse_optional_if_clause): Constify.
11439 * cli/cli-utils.c (remove_trailing_whitespace)
11440 (check_for_argument): Constify.
11441 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11442 non-const overload.
11443 (check_for_argument): Likewise.
11444
11445 2017-04-05 Pedro Alves <palves@redhat.com>
11446
11447 * event-top.c (command_line_handler): Add cast to execute_command
11448 call.
11449 * record-btrace.c (cmd_record_btrace_bts_start)
11450 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11451 (cmd_record_btrace_start): Add cast to execute_command call.
11452 * record-full.c (record_full_goto_insn):
11453 * record.c (record_start, record_stop): Add cast to
11454 execute_command_to_string calls.
11455 (cmd_record_start): Add cast to execute_command calls.
11456
11457 2017-04-05 Pedro Alves <palves@redhat.com>
11458
11459 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11460 static inline function.
11461 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11462 array and use gdb_PyArg_ParseTupleAndKeywords.
11463 * python/py-cmd.c (cmdpy_init): Likewise.
11464 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11465 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11466 (infpy_search_memory): Likewise.
11467 * python/py-objfile.c (objfpy_add_separate_debug_file)
11468 (gdbpy_lookup_objfile): Likewise.
11469 * python/py-symbol.c (gdbpy_lookup_symbol)
11470 (gdbpy_lookup_global_symbol): Likewise.
11471 * python/py-type.c (gdbpy_lookup_type): Likewise.
11472 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11473 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11474 Likewise.
11475
11476 2017-04-05 Pedro Alves <palves@redhat.com>
11477
11478 * python/python-internal.h (gdb_PyGetSetDef): New type.
11479 * python/py-block.c (block_object_getset)
11480 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11481 * python/py-event.c (event_object_getset)
11482 (finish_breakpoint_object_getset): Likewise.
11483 * python/py-inferior.c (inferior_object_getset): Likewise.
11484 * python/py-infthread.c (thread_object_getset): Likewise.
11485 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11486 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11487 * python/py-objfile.c (objfile_getset): Likewise.
11488 * python/py-progspace.c (pspace_getset): Likewise.
11489 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11490 Likewise.
11491 * python/py-record.c (recpy_record_getset): Likewise.
11492 * python/py-symbol.c (symbol_object_getset): Likewise.
11493 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11494 Likewise.
11495 * python/py-type.c (type_object_getset, field_object_getset):
11496 Likewise.
11497 * python/py-value.c (value_object_getset): Likewise.
11498
11499 2017-04-05 Pedro Alves <palves@redhat.com>
11500
11501 * python/python-internal.h (gdb_PyObject_CallMethod)
11502 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11503 New functions.
11504 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11505 (PySys_GetObject, PySys_SetPath): New macros.
11506
11507 2017-04-05 Pedro Alves <palves@redhat.com>
11508
11509 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11510 info_osdata_command.
11511 * osdata.c (info_osdata_command): Rename to ...
11512 (info_osdata): ... this. Constify 'type' parameter, and remove
11513 the 'from_tty' parameter. Accept NULL TYPE.
11514 (info_osdata_command): New function.
11515 * osdata.h (info_osdata_command): Remove declaration.
11516 (info_osdata): New declaration.
11517
11518 2017-04-05 Pedro Alves <palves@redhat.com>
11519
11520 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11521 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11522 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11523 parameter.
11524 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11525 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11526 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11527 parameter.
11528 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11529 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11530 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11531 (mi_cmd_file_list_exec_source_files)
11532 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11533 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11534 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11535 parameter.
11536 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11537 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11538 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11539 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11540 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11541 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11542 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11543 'command' parameter.
11544 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11545 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11546 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11547 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11548 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11549 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11550 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11551 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11552 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11553 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11554 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11555 parameter.
11556 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11557 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11558 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11559 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11560 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11561 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11562 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11563 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11564 (mi_cmd_data_list_changed_registers)
11565 (mi_cmd_data_write_register_values)
11566 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11567 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11568 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11569 (mi_cmd_list_features, mi_cmd_list_target_features)
11570 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11571 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11572 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11573 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11574 (mi_cmd_trace_frame_collected): Constify 'command'
11575 parameter.
11576 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11577 'command' parameter.
11578
11579 2017-04-05 Pedro Alves <palves@redhat.com>
11580
11581 * ada-lang.c (ada_completer_word_break_characters): Now a const
11582 array.
11583 (ada_get_gdb_completer_word_break_characters): Constify.
11584 * completer.c (gdb_completer_command_word_break_characters)
11585 (gdb_completer_file_name_break_characters)
11586 (gdb_completer_quote_characters): Now const arrays.
11587 (get_gdb_completer_quote_characters): Constify.
11588 (set_rl_completer_word_break_characters): New function.
11589 (set_gdb_completion_word_break_characters)
11590 (complete_line_internal): Use it.
11591 * completer.h (get_gdb_completer_quote_characters): Constify.
11592 (set_rl_completer_word_break_characters): Declare.
11593 * f-lang.c (f_word_break_characters): Constify.
11594 * language.c (default_word_break_characters): Constify.
11595 * language.h (language_defn::la_word_break_characters): Constify.
11596 (default_word_break_characters): Constify.
11597 * top.c (init_main): Use set_rl_completer_word_break_characters.
11598
11599 2017-04-05 Pedro Alves <palves@redhat.com>
11600
11601 * aix-thread.c (aix_thread_pid_to_str)
11602 (aix_thread_extra_thread_info): Constify.
11603 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11604 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11605 (bsd_uthread_pid_to_str): Constify.
11606 * corelow.c (core_pid_to_str): Constify.
11607 * darwin-nat.c (darwin_pid_to_str): Constify.
11608 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11609 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11610 Constify.
11611 * gnu-nat.c (gnu_pid_to_str): Constify.
11612 * go32-nat.c (go32_pid_to_str): Constify.
11613 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11614 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11615 * inferior.c (inferior_pid_to_str): Constify.
11616 * linux-nat.c (linux_nat_pid_to_str): Constify.
11617 * linux-tdep.c (linux_core_pid_to_str): Constify.
11618 * linux-thread-db.c (thread_db_pid_to_str)
11619 (thread_db_extra_thread_info): Constify.
11620 * nto-tdep.c (nto_extra_thread_info): Constify.
11621 * nto-tdep.h (nto_extra_thread_info): Constify.
11622 * obsd-nat.c (obsd_pid_to_str): Constify.
11623 * procfs.c (procfs_pid_to_str): Constify.
11624 * ravenscar-thread.c (ravenscar_extra_thread_info)
11625 (ravenscar_pid_to_str): Constify.
11626 * remote-sim.c (gdbsim_pid_to_str): Constify.
11627 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11628 Constify.
11629 * sol-thread.c (solaris_pid_to_str): Constify.
11630 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11631 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11632 * target.c (default_pid_to_str, target_pid_to_str)
11633 (normal_pid_to_str, default_pid_to_str): Constify.
11634 * target.h (target_ops::to_pid_to_str)
11635 (target_ops::to_extra_thread_info): Constify.
11636 (target_pid_to_str, normal_pid_to_str): Constify.
11637 * windows-nat.c (windows_pid_to_str): Constify.
11638 * gdbarch.sh (core_pid_to_str): Constify.
11639 * target-delegates.c: Regenerate.
11640 * gdbarch.h, gdbarch.c: Regenerate.
11641
11642 2017-04-05 Pedro Alves <palves@redhat.com>
11643
11644 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11645 the memory of the temporary warning_pre_print override.
11646 * utils.c (warning_pre_print): Constify.
11647 * utils.h (warning_pre_print): Constify.
11648
11649 2017-04-05 Pedro Alves <palves@redhat.com>
11650
11651 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11652 (shell_command): New function.
11653 (make_command): Use std::string.
11654 (init_cli_cmds): Register shell_command instead of shell_escape.
11655
11656 2017-04-05 Pedro Alves <palves@redhat.com>
11657
11658 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11659 * tracepoint.c (default_collect): Don't initialize.
11660
11661 2017-04-05 Pedro Alves <palves@redhat.com>
11662
11663 * macroexp.c (macro_buffer::shared): Now a bool.
11664 (init_buffer): Update.
11665 (init_shared_buffer): Constify 'addr' parameter.
11666 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11667 casts.
11668
11669 2017-04-05 Pedro Alves <palves@redhat.com>
11670
11671 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11672 * disasm.c (set_disassembler_options): Constify local.
11673 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11674
11675 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11676
11677 PR gdb/21352
11678 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11679 option.
11680
11681 2017-04-05 Yao Qi <yao.qi@linaro.org>
11682
11683 * frame.c (frame_unwind_register_unsigned): Call
11684 frame_unwind_register_value.
11685
11686 2017-04-05 Yao Qi <yao.qi@linaro.org>
11687
11688 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11689 Use gdb_test_multiple, and don't match anchor.
11690
11691 2017-04-05 Pedro Alves <palves@redhat.com>
11692
11693 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11694 (Write After Approval): Remove Simon Marchi.
11695
11696 2017-04-05 Pedro Alves <palves@redhat.com>
11697
11698 * common/gdb_optional.h (optional::optional): Make constexpr and
11699 initialize m_dummy.
11700
11701 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11702
11703 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11704 (amd64fbsd_jmp_buf_reg_offset): Remove.
11705 (amd64fbsd_supply_uthread): Remove function.
11706 (amd64fbsd_collect_uthread): Remove function.
11707 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11708 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11709 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11710 (fbsd-nat.c): Update comment.
11711 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11712 (i386fbsd_jmp_buf_reg_offset): Remove.
11713 (i386fbsd_supply_uthread): Remove function.
11714 (i386fbsd_collect_uthread): Remove function.
11715 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11716
11717 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11718
11719 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11720 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11721 * NEWS: Mention that support for FreeBSD/alpha was removed.
11722 * alpha-fbsd-tdep.c: Delete file.
11723 * config/alpha/fbsd.mh: Delete file.
11724 * configure.host: Delete alpha*-*-freebsd* and
11725 alpha*-*-kfreebsd*-gnu.
11726 * configure.tgt: Delete alpha*-*-freebsd* and
11727 alpha*-*-kfreebsd*-gnu.
11728
11729 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11730
11731 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11732 amd64bsd_store_inferior_registers): Use ptid from regcache.
11733
11734 2017-04-04 Pedro Alves <palves@redhat.com>
11735
11736 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11737 data fields, make them private and add "m_" prefixes.
11738 (lnp_state_machine::lnp_state_machine): New ctor.
11739 (record_line, check_line_address, handle_set_discriminator)
11740 (handle_set_address, handle_advance_pc, handle_special_opcode)
11741 (handle_advance_line, handle_set_file, handle_negate_stmt)
11742 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11743 (end_sequence, advance_line): New methods.
11744 (m_gdbarch, m_record_lines_p): New fields.
11745 (lnp_reader_state): Delete.
11746 (dwarf_record_line): Rename to ...
11747 (lnp_state_machine::record_line): ... adjust.
11748 (init_lnp_state_machine): Delete.
11749 (lnp_state_machine::lnp_state_machine): New.
11750 (check_line_address): Rename to ...
11751 (lnp_state_machine::check_line_address): This.
11752 (dwarf_decode_lines_1): Remove reference to "reader_state".
11753 Adjust lnp_state_machine having a non-default ctor. Use bool.
11754 State machine internal state manipulation moved to
11755 lnp_state_machine methods.
11756
11757 2017-04-04 Pedro Alves <palves@redhat.com>
11758
11759 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11760 unittests/offset-type-selftests.c.
11761 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11762 * common/offset-type.h: New file.
11763 * common/preprocessor.h: New file.
11764 * common/traits.h: New file.
11765 * common/valid-expr.h: New file.
11766 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11767 sect_offset and cu_offset strong typedefs throughout.
11768 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11769 typedefs throughout.
11770 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11771 sect_offset and cu_offset strong typedefs throughout.
11772 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11773 typedefs throughout.
11774 * gdbtypes.h: Include "common/offset-type.h".
11775 (cu_offset): Now an offset type (strong typedef) instead of a
11776 struct.
11777 (sect_offset): Likewise.
11778 (union call_site_parameter_u): Rename "param_offset" field to
11779 "param_cu_off".
11780 * unittests/offset-type-selftests.c: New file.
11781
11782 2017-04-04 Pedro Alves <palves@redhat.com>
11783
11784 * common/underlying.h: New file.
11785 * dwarf2read.c: Include "common/gdb_optional.h" and
11786 "common/underlying.h".
11787 (dir_index, file_name_index): New types.
11788 (file_entry): Use them.
11789 (file_entry::include): Use to_underlying.
11790 (line_header::add_file_name): Use dir_index.
11791 (read_formatted_entries): Use gdb::optional. Read form before
11792 writting to file_entry.
11793 (dwarf_decode_line_header): Use dir_index.
11794 (lnp_state_machine::current_file): Use to_underlying.
11795 (lnp_state_machine::file): Change type to file_name_index.
11796 (dwarf_record_line): Use to_underlying.
11797 (init_lnp_state_machine): Use file_name_index.
11798 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11799
11800 2017-04-04 Pedro Alves <palves@redhat.com>
11801
11802 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11803 operator bool, has_value and get methods.
11804
11805 2017-04-04 Pedro Alves <palves@redhat.com>
11806
11807 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11808 fields.
11809 (line_header): Initialize all data fields. Change type of
11810 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11811 Change type of include_dirs to std::vector<const char *>. Remove
11812 num_include_dirs, include_dirs_size. Change type of file_names to
11813 std::vector<file_entry>. Remove num_file_names, file_names_size.
11814 (line_header::line_header): New.
11815 (line_header::add_include_dir, line_header::add_file_name): New
11816 methods.
11817 (line_header::include_dir_at): Remove NULL check.
11818 (line_header::file_name_at): Add const overload.
11819 (line_header_up): New unique_ptr typedef.
11820 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11821 std::vector. Remove free_line_header call.
11822 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11823 free_line_header call.
11824 (free_cu_line_header): Delete.
11825 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11826 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11827 Adjust to use std::vector.
11828 (free_line_header): Delete.
11829 (free_line_header_voidp): Use delete.
11830 (add_include_dir): Replace with ...
11831 (line_header::add_include_dir): ... this method. Use std::vector.
11832 (add_file_name): Replace with ...
11833 (line_header::add_file_name): ... this method. Use std::vector.
11834 (add_include_dir_stub): Delete.
11835 (read_formatted_entries): Remove memset.
11836 (dwarf_decode_line_header): Return a line_header_up instead of a
11837 raw pointer. Remove cleanup handling. Pass lambdas to
11838 read_formatted_entries. Adjust to use line_header methods.
11839 (dwarf_decode_lines_1): Adjust to use line_header methods.
11840 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11841 use std::vector.
11842
11843 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11844
11845 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11846 instead of struct ptid.
11847
11848 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11849
11850 * frame.c (get_frame_register_bytes): Unwind using value.
11851 (put_frame_register_bytes): Likewise.
11852
11853 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11854
11855 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11856 aggregate-like.
11857
11858 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11859
11860 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11861
11862 2017-03-29 Yao Qi <yao.qi@linaro.org>
11863
11864 * gdbthread.h (struct thread_info): Declare constructor and
11865 destructor. Add some in-class member initializers.
11866 * thread.c (free_thread): Remove.
11867 (init_thread_list): Call delete instead of free_thread.
11868 (new_thread): Call thread_info constructor.
11869 (thread_info::thread_info): New function.
11870 (thread_info::~thread_info): New function.
11871 (delete_thread_1): Call delete instead of free_thread.
11872 (make_cleanup_restore_current_thread): Move tp and frame to
11873 inner block.
11874
11875 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11876
11877 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11878 (arc_skip_prologue): Likewise.
11879 (arc_make_frame_cache): Likewise.
11880 (arc_pv_get_operand): New function.
11881 (arc_is_in_prologue): Likewise.
11882 (arc_analyze_prologue): Likewise.
11883 (arc_print_frame_cache): Likewise.
11884 (MAX_PROLOGUE_LENGTH): New constant.
11885
11886 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11887
11888 * configure.tgt: Add arc-insn.o.
11889 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11890 (dump_arc_instruction_command): New function.
11891 (arc_fprintf_disasm): Likewise.
11892 (arc_disassemble_info): Likewise.
11893 (arc_insn_get_operand_value): Likewise.
11894 (arc_insn_get_operand_value_signed): Likewise.
11895 (arc_insn_get_memory_base_reg): Likewise.
11896 (arc_insn_get_memory_offset): Likewise.
11897 (arc_insn_get_branch_target): Likewise.
11898 (arc_insn_dump): Likewise.
11899 (arc_insn_get_linear_next_pc): Likewise.
11900 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11901 (arc_disassemble_info): Likewise.
11902 (arc_insn_get_branch_target): Likewise.
11903 (arc_insn_get_linear_next_pc): Likewise.
11904 * NEWS: Mention new "maint print arc arc-instruction".
11905
11906 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11907
11908 * arc-tdep (maintenance_print_arc_list): New variable.
11909 (maintenance_print_arc_command): New function.
11910
11911 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11912
11913 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11914 Add "limm" and "reserved".
11915 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11916 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11917 * arc-tdep.h (arc_regnum): Likewise.
11918
11919 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11920
11921 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11922 for THREADPTR register.
11923 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11924 register.
11925 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11926 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11927 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11928
11929 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11930
11931 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11932 registers above gdbarch_num_regs (gdbarch) as privileged in
11933 call0 ABI.
11934
11935 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11936
11937 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11938 for a single specified register or for all registers in
11939 a0_base..a0_base + C0_NREGS range.
11940 (supply_gregset_reg): Call regcache_raw_supply for a single
11941 specified register or for all registers in a0_base..a0_base +
11942 C0_NREGS range.
11943
11944 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11945
11946 * arch/xtensa.h (C0_NREGS): Add definition.
11947 * xtensa-tdep.c (C0_NREGS): Remove definition.
11948
11949 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11950
11951 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11952 Drop xtensa_default_isa initialization.
11953 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11954
11955 2017-03-27 Pedro Alves <palves@redhat.com>
11956
11957 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11958 (file_entry::include_dir): New method.
11959 (line_header::include_dir_at, line_header::file_name_at): New
11960 methods.
11961 (setup_type_unit_groups, setup_type_unit_groups)
11962 (psymtab_include_file_name): Simplify using the new methods.
11963 (lnp_state_machine) <the_line_header>: New field.
11964 <file>: Add comment.
11965 (lnp_state_machine::current_file): New method.
11966 (dwarf_record_line): Simplify using the new methods.
11967 (init_lnp_state_machine): Initialize the "the_line_header" field.
11968 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11969 Simplify using the new methods.
11970
11971 2017-03-27 Pedro Alves <palves@redhat.com>
11972
11973 * cp-name-parser.y (make_empty): Delete.
11974 (demangler_special, nested_name, ptr_operator, array_indicator)
11975 (direct_declarator, declarator_1): Use fill_comp instead of
11976 make_empty.
11977
11978 2017-03-27 Pedro Alves <palves@redhat.com>
11979
11980 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11981 to ATTRIBUTE_PRINTF.
11982 * solib-target.c (library_list_start_list): Print "string" not
11983 "version".
11984 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11985 gdb_xml_error call.
11986
11987 2017-03-27 Pedro Alves <palves@redhat.com>
11988
11989 * dwarf2read.c (struct file_and_directory): New.
11990 (dwarf2_get_dwz_file): Adjust to use std::string.
11991 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11992 (find_file_and_directory): Adjust to return a file_and_directory
11993 object.
11994 (read_file_scope): Adjust to use file_and_directory. Remove
11995 make_cleanup/do_cleanups calls.
11996 (open_and_init_dwp_file): Adjust to use std::string. Remove
11997 make_cleanup/do_cleanups calls.
11998 * python/python.c (do_start_initialization): Adjust to ldirname
11999 returning a std::string.
12000 * utils.c (ldirname): Now returns a std::string.
12001 * utils.h (ldirname): Change return type to std::string.
12002 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12003 returning a std::string.
12004 * xml-tdesc.c (file_read_description_xml): Likewise.
12005
12006 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12007
12008 * regcache.c (regcache_debug_print_register): New function.
12009 * regcache.h (regcache_debug_print_register): New declaration.
12010 * target.c (debug_print_register): Remove.
12011 (target_fetch_registers): Call regcache_debug_print_register.
12012 (target_store_registers): Likewise.
12013
12014 2017-03-24 Pádraig Brady <pbrady@fb.com>
12015
12016 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12017 reference beyond the 'lh->include_dirs' array before accessing to
12018 it.
12019 (psymtab_include_file_name): Likewise.
12020 (dwarf_decode_lines_1): Likewise.
12021 (dwarf_decode_lines): Likewise.
12022 (file_file_name): Likewise.
12023
12024 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12025
12026 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12027 inferior_ptid.
12028 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12029 ps_lsetfpregs): Likewise.
12030 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12031 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12032 ps_lsetfpregs): Likewise.
12033 * target.c (target_fetch_registers, target_store_registers):
12034 Remove asserts.
12035
12036 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12037
12038 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12039
12040 2017-03-23 Yao Qi <yao.qi@linaro.org>
12041
12042 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12043 (_initialize_aarch64_tdep): Register it.
12044 (aarch64_record_load_store): Handle PRFM instruction.
12045 (aarch64_process_record_test): New function.
12046
12047 2017-03-23 Yao Qi <yao.qi@linaro.org>
12048
12049 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12050 indentation.
12051
12052 2017-03-23 Yao Qi <yao.qi@linaro.org>
12053
12054 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12055
12056 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12057
12058 python/python.c (do_start_initialization): Fix memory leak.
12059
12060 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12061
12062 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12063 using get_ptrace_pid.
12064 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12065 inferior_ptid.
12066 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12067 inferior_ptid instead of pid.
12068
12069 2017-03-22 Yao Qi <yao.qi@linaro.org>
12070
12071 * aarch64-tdep.c: Wrap locally used classes in anonymous
12072 namespace.
12073 * arm-tdep.c: Likewise.
12074 * linespec.c: Likewise.
12075 * ui-out.c: Likewise.
12076
12077 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12078
12079 PR gdb/19637
12080 * python/lib/gdb/printer/bound_registers.py: Import sys.
12081
12082 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12083
12084 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12085 windows_thread_info parameter and use it instead of
12086 current_thread.
12087 (windows_fetch_inferior_registers): Don't set current_thread,
12088 pass the thread to do_windows_fetch_inferior_registers. Use
12089 ptid from regcache instead of inferior_ptid.
12090 (do_windows_store_inferior_registers): Add windows_thread_info
12091 parameter and use it instead of current_thread.
12092 (windows_store_inferior_registers): Don't set current_thread,
12093 pass the thread to do_windows_store_inferior_registers. Use
12094 ptid from regcache instead of inferior_ptid.
12095
12096 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12097
12098 * ser-mingw.c (ser_windows_raw): Remove reference to
12099 struct serial::current_timeout.
12100
12101 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12102
12103 PR tdep/20928
12104 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12105 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12106 (sparc64_fsr_type): Fix %fsr decoding.
12107
12108 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12109
12110 * python/py-record-btrace.c (btpy_insn_data): Change return type
12111 for Python 2.
12112
12113 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12114
12115 * spu-linux-nat.c (spu_fetch_inferior_registers,
12116 spu_store_inferior_registers): Use ptid from regcache, set and
12117 restore inferior_ptid.
12118 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12119 Likewise.
12120
12121 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12122
12123 * i386-linux-nat.c (fetch_register, store_register,
12124 i386_linux_fetch_inferior_registers,
12125 i386_linux_store_inferior_registers): Use ptid from regcache.
12126 * ia64-linux-nat.c (ia64_linux_fetch_register,
12127 ia64_linux_store_register): Likewise.
12128 * inf-ptrace.c (inf_ptrace_fetch_register,
12129 inf_ptrace_store_register): Likewise.
12130 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12131 m32r_linux_store_inferior_registers): Likewise.
12132 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12133 m68kbsd_store_inferior_registers): Likewise.
12134 * m68k-linux-nat.c (fetch_register, store_register,
12135 m68k_linux_fetch_inferior_registers,
12136 m68k_linux_store_inferior_registers): Likewise.
12137 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12138 m88kbsd_store_inferior_registers): Likewise.
12139 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12140 mips_fbsd_store_inferior_registers): Likewise.
12141 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12142 mips64_linux_regsets_store_registers): Likewise.
12143 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12144 mipsnbsd_store_inferior_registers): Likewise.
12145 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12146 mips64obsd_store_inferior_registers): Likewise.
12147 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12148 Likewise.
12149 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12150 ppcfbsd_store_inferior_registers): Likewise.
12151 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12152 ppc_linux_store_inferior_registers): Likewise.
12153 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12154 ppcnbsd_store_inferior_registers): Likewise.
12155 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12156 ppcobsd_store_registers): Likewise.
12157 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12158 Likewise.
12159 * ravenscar-thread.c (ravenscar_fetch_registers,
12160 ravenscar_store_registers, ravenscar_prepare_to_store):
12161 Likewise.
12162 * record-btrace.c (record_btrace_fetch_registers,
12163 record_btrace_store_registers, record_btrace_prepare_to_store):
12164 Likewise.
12165 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12166 Lookup inferior using ptid from regcache, instead of
12167 current_inferior.
12168 * remote.c (remote_fetch_registers, remote_store_registers): Use
12169 ptid from regcache.
12170 * rs6000-nat.c (fetch_register, store_register): Likewise.
12171 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12172 s390_linux_store_inferior_registers): Likewise.
12173 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12174 shnbsd_store_inferior_registers): Likewise.
12175 * sol-thread.c (sol_thread_fetch_registers,
12176 sol_thread_store_registers): Likewise.
12177 * sparc-nat.c (sparc_fetch_inferior_registers,
12178 sparc_store_inferior_registers): Likewise.
12179 * tilegx-linux-nat.c (fetch_inferior_registers,
12180 store_inferior_registers): Likewise.
12181 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12182 vaxbsd_store_inferior_registers): Likewise.
12183 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12184 store_xtregs): Likewise.
12185
12186 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12187
12188 PR gdb/14441
12189 * NEWS: Mention support for rvalue references in GDB and python.
12190 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12191 supports both lvalue and rvalue references.
12192
12193 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12194
12195 PR gdb/14441
12196 * gdbtypes.c (rank_one_type): Implement overloading
12197 resolution rules regarding rvalue references.
12198
12199 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12200
12201 PR gdb/14441
12202 * aarch64-tdep.c (aarch64_type_align)
12203 (aarch64_extract_return_value, aarch64_store_return_value): Change
12204 lvalue reference type checks to general reference type checks.
12205 * amd64-tdep.c (amd64_classify): Likewise.
12206 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12207 Likewise.
12208 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12209 (arm_store_return_value): Likewise.
12210 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12211 * c-typeprint.c (c_print_type): Likewise.
12212 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12213 (cplus_number_of_children, cplus_describe_child): Likewise.
12214 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12215 * completer.c (expression_completer): Likewise.
12216 * cp-support.c (make_symbol_overload_list_adl_namespace):
12217 Likewise.
12218 * darwin-nat-info.c (info_mach_region_command): Likewise.
12219 * dwarf2loc.c (entry_data_value_coerce_ref)
12220 (value_of_dwarf_reg_entry): Likewise.
12221 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12222 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12223 Likewise.
12224 * findvar.c (extract_typed_address, store_typed_address):
12225 Likewise.
12226 * gdbtypes.c (rank_one_type): Likewise.
12227 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12228 * infcall.c (value_arg_coerce): Likewise.
12229 * language.c (pointer_type): Likewise.
12230 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12231 Likewise.
12232 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12233 * mn10300-tdep.c (mn10300_type_align): Likewise.
12234 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12235 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12236 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12237 Likewise.
12238 * printcmd.c (print_formatted, x_command): Likewise.
12239 * python/py-type.c (typy_get_composite, typy_template_argument):
12240 Likewise.
12241 * python/py-value.c (valpy_referenced_value)
12242 (valpy_get_dynamic_type, value_has_field): Likewise.
12243 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12244 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12245 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12246 * spu-tdep.c (spu_scalar_value_p): Likewise.
12247 * symtab.c (lookup_symbol_aux): Likewise.
12248 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12249 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12250 Likewise.
12251 * valops.c (value_cast_pointers, value_cast)
12252 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12253 (value_struct_elt, value_struct_elt_bitpos)
12254 (value_find_oload_method_list, find_overload_match)
12255 (value_rtti_indirect_type): Likewise.
12256 * valprint.c (val_print_scalar_type_p, generic_val_print):
12257 Likewise.
12258 * value.c (value_actual_type, value_as_address, unpack_long)
12259 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12260 (coerce_ref): Likewise.
12261 * varobj.c (varobj_get_value_type): Likewise.
12262
12263 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12264
12265 PR gdb/14441
12266 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12267 table of constants.
12268 * python/lib/gdb/command/explore.py: Support exploring values
12269 of rvalue reference types.
12270 * python/lib/gdb/types.py: Implement get_basic_type() for
12271 rvalue reference types.
12272 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12273 constant.
12274 * python/py-value.c (valpy_getitem): Add an rvalue reference
12275 check.
12276 (valpy_reference_value): Add new parameter "refcode".
12277 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12278 New wrappers for valpy_reference_value().
12279 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12280 (gdbpy_invoke_xmethod): Likewise.
12281
12282 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12283
12284 PR gdb/14441
12285 * dwarf2read.c (process_die, read_type_die_1): Handle the
12286 DW_TAG_rvalue_reference_type DIE.
12287 (read_tag_reference_type): Add new parameter "refcode".
12288
12289 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12290
12291 PR gdb/14441
12292 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12293 (c_type_print_modifier, c_type_print_varspec_suffix)
12294 (c_type_print_base): Support printing rvalue reference types.
12295 * c-valprint.c (c_val_print, c_value_print): Support printing
12296 rvalue reference values.
12297
12298 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12299
12300 PR gdb/14441
12301 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12302 typename.
12303 * cp-support.c (replace_typedefs): Handle
12304 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12305 * python/py-type.c (typy_lookup_type): Likewise.
12306
12307 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12308
12309 PR gdb/14441
12310 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12311 * parse.c (insert_type): Change assert statement.
12312 (follow_types): Handle rvalue reference types.
12313 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12314 constant.
12315
12316 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12317
12318 PR gdb/14441
12319 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12320 value_ref() interface.
12321 * c-valprint.c (c_value_print): Likewise.
12322 * infcall.c (value_arg_coerce): Likewise.
12323 * python/py-value.c (valpy_reference_value): Likewise.
12324 * valops.c (value_cast, value_reinterpret_cast)
12325 (value_dynamic_cast, typecmp): Likewise.
12326 (value_ref): Parameterize by kind of return value reference type.
12327 * value.h (value_ref): Add new parameter "refcode".
12328
12329 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12330
12331 PR gdb/14441
12332 * dwarf2read.c (read_tag_reference_type): Use
12333 lookup_lvalue_reference_type() instead of lookup_reference_type().
12334 * eval.c (evaluate_subexp_standard): Likewise.
12335 * f-exp.y: Likewise.
12336 * gdbtypes.c (make_reference_type, lookup_reference_type):
12337 Generalize with rvalue reference types.
12338 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12339 convenience wrappers for lookup_reference_type().
12340 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12341 reference kind parameter.
12342 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12343 wrappers for lookup_reference_type().
12344 * guile/scm-type.c (gdbscm_type_reference): Use
12345 lookup_lvalue_reference_type() instead of lookup_reference_type().
12346 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12347 * parse.c (follow_types): Likewise.
12348 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12349 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12350 Likewise.
12351 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12352 (gdbpy_invoke_xmethod): Likewise.
12353 * stabsread.c: Provide extra argument to make_reference_type()
12354 call.
12355 * valops.c (value_ref, value_rtti_indirect_type): Use
12356 lookup_lvalue_reference_type() instead of lookup_reference_type().
12357
12358 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12359
12360 PR gdb/14441
12361 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12362 (TYPE_IS_REFERENCE): New macro.
12363 (struct type): Add rvalue_reference_type field.
12364 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12365
12366 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12367
12368 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12369 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12370 New function definition.
12371 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12372 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12373 New function declaration.
12374 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12375 * mi/mi-interp.h: New file.
12376 * solib.c (info_sharedlibrary_command): Replace for loop with
12377 ALL_SO_LIBS macro
12378 * solib.h (update_solib_list): New function declaration.
12379 (so_list_head): Move macro.
12380 * solist.h (ALL_SO_LIBS): New macro.
12381
12382 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12383
12384 * infcmd.c (post_create_inferior): Remove unused argument in
12385 call to solib_add.
12386 * remote.c (remote_start_remote): Likewise.
12387 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12388 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12389 (enable_break): Likewise.
12390 * solib.c (update_solib_list): Remove unused target argument
12391 and its documentation.
12392 (solib_add): Remove unused target argument. Remove unused
12393 argument in call to update_solib_list.
12394 (info_sharedlibrary_command): Remove unused argument in call
12395 to update_solib_list.
12396 (sharedlibrary_command): Remove unused argument in call to
12397 solib_add.
12398 (handle_solib_event): Likewise.
12399 (reload_shared_libraries): Likewise.
12400 * solib.h (solib_add): Remove unused target argument.
12401
12402 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12403
12404 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12405 (s390_displaced_step_fixup): Cover relative branches with the
12406 default fixup handling. This fixes lack of support for some
12407 relative branch instructions.
12408
12409 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12410
12411 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12412 ptid from regcache.
12413
12414 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12415
12416 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12417 i386_darwin_store_inferior_registers): Use ptid from regcache.
12418
12419 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12420
12421 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12422 i386bsd_store_inferior_registers): Use ptid from regcache.
12423
12424 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12425
12426 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12427 hppaobsd_store_registers): Use ptid from regcache.
12428
12429 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12430
12431 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12432 hppanbsd_store_registers): Use ptid from regcache.
12433
12434 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12435
12436 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12437 from regcache. Use get_ptrace_pid.
12438
12439 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12440
12441 * corelow.c (get_core_register_section): Use ptid from regcache,
12442 update doc.
12443
12444 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12445
12446 * bsd-uthread.c (bsd_uthread_fetch_registers,
12447 bsd_uthread_store_registers): Use ptid from regcache, set and
12448 restore inferior_ptid.
12449
12450 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12451
12452 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12453 fetch_fp_regs, store_register, store_regs, store_fp_register,
12454 store_fp_regs): Use ptid from regcache.
12455
12456 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12457
12458 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12459 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12460 store_vfp_regs): Use ptid from regcache.
12461
12462 2017-03-17 Pedro Alves <palves@redhat.com>
12463
12464 PR remote/21188
12465 * ser-base.c (ser_base_wait_for): Add comment.
12466 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12467 version.
12468 * ser-unix.c (hardwire_raw): Remove reference to
12469 scb->current_timeout.
12470 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12471 (hardwire_ops): Install ser_base_readchar instead of
12472 hardwire_readchar.
12473 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12474 Remove fields.
12475
12476 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12477
12478 PR gdb/19637
12479 * python/lib/gdb/printer/bound_registers.py: Add support for
12480 Python 3.
12481
12482 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12483
12484 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12485 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12486 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12487 byte_offset to subobj_byte_offset. Fix the handling of
12488 DWARF_VALUE_STACK on big-endian targets when coming via an
12489 implicit pointer.
12490 (dwarf2_evaluate_loc_desc): Adjust call to
12491 dwarf2_evaluate_loc_desc_full.
12492 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12493 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12494
12495 2017-03-16 Yao Qi <yao.qi@linaro.org>
12496
12497 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12498 and REVSH instructions.
12499
12500 2017-03-16 Yao Qi <yao.qi@linaro.org>
12501
12502 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12503 (arm_record_test): Declare.
12504 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12505 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12506 align with the manual.
12507 (thumb_record_misc): Adjust the code order to align with the
12508 manual.
12509 (thumb2_record_decode_insn_handler): Fix instruction matching.
12510 (instruction_reader_thumb): New class.
12511 (arm_record_test): New function.
12512
12513 2017-03-16 Yao Qi <yao.qi@linaro.org>
12514
12515 * arm-tdep.c (abstract_memory_reader): New class.
12516 (instruction_reader): New class.
12517 (extract_arm_insn): Add argument 'reader'. Callers updated.
12518 (decode_insn): Likewise.
12519
12520 2017-03-16 Doug Evans <dje@google.com>
12521
12522 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12523 member. Change type of TYPE member to SCM. All uses updated.
12524 (lsscm_make_lazy_string_smob): Add assert.
12525 (lsscm_make_lazy_string): Flag bad length values.
12526 (lsscm_elt_type): New function.
12527 (gdbscm_lazy_string_to_value): Rewrite to use
12528 lsscm_safe_lazy_string_to_value.
12529 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12530 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12531 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12532 in incoming type.
12533 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12534 * guile/scm-type.c (tyscm_scm_to_type): New function.
12535
12536 2017-03-15 Doug Evans <dje@google.com>
12537
12538 PR python/17728, python/18439, python/18779
12539 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12540 member. Change type of TYPE member to PyObject *. All uses updated.
12541 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12542 (gdbpy_create_lazy_string_object): Flag bad length values.
12543 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12544 Handle typedefs in incoming type.
12545 (stpy_lazy_string_elt_type): New function.
12546 (gdbpy_extract_lazy_string): Call it.
12547 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12548 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12549 typedefs in incoming type.
12550
12551 2017-03-16 Doug Evans <dje@google.com>
12552
12553 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12554 * guile/scm-type.c (tyscm_scm_to_type): New function.
12555
12556 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12557
12558 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12559 "ULONGEST" for "skip".
12560
12561 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12562
12563 PR gdb/21220
12564 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12565 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12566 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12567 over ptrace peek/poke until end of buffer or error.
12568
12569 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12570
12571 * parse.c (length_of_subexp): Make static.
12572 * parser-defs.h (length_of_subexp): Remove.
12573
12574 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12575
12576 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12577 as well.
12578
12579 2017-03-14 Pedro Alves <palves@redhat.com>
12580
12581 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12582 (main): Use std::unique_ptr. Remove calls to
12583 cp_demangled_name_parse_free.
12584
12585 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12586
12587 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12588 alphabsd_store_inferior_registers): Use regcache->ptid instead
12589 of inferior_ptid.
12590
12591 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12592
12593 * aix-thread.c (aix_thread_fetch_registers,
12594 aix_thread_store_registers): Use regcache->ptid instead of
12595 inferior_ptid.
12596
12597 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12598
12599 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12600 store_gregs_to_thread, fetch_fpregs_from_thread,
12601 store_fpregs_to_thread): Use regcache->ptid instead of
12602 inferior_ptid.
12603
12604 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12605
12606 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12607 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12608 instead of inferior_ptid.
12609
12610 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12611
12612 * target.c (target_fetch_registers, target_store_registers): Add
12613 assert.
12614
12615 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12616
12617 * regcache.h (regcache_get_ptid): New function.
12618 * regcache.c (regcache_get_ptid): New function.
12619
12620 2017-03-13 Mark Wielaard <mark@klomp.org>
12621
12622 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12623
12624 2017-03-10 Keith Seitz <keiths@redhat.com>
12625
12626 PR c++/8218
12627 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12628
12629 2017-03-08 Pedro Alves <palves@redhat.com>
12630
12631 PR gdb/18360
12632 * infrun.c (start_step_over, do_target_resume, resume)
12633 (restart_threads): Assert we're not resuming a thread that is
12634 meant to be stopped.
12635 (infrun_thread_stop_requested_callback): Delete.
12636 (infrun_thread_stop_requested): If the thread is internally
12637 stopped, queue a pending stop event and clear the thread's
12638 inline-frame state.
12639 (handle_stop_requested): New function.
12640 (handle_syscall_event, handle_inferior_event_1): Use
12641 handle_stop_requested.
12642 (handle_stop_requested): New function.
12643 (handle_signal_stop): Set the thread's stop_signal here instead of
12644 at caller.
12645 (finish_step_over): Clear step over info unconditionally.
12646 (handle_signal_stop): If the user had interrupted the event
12647 thread, consider the stop a random signal.
12648 (handle_signal_stop) <signal arrived while stepping over
12649 breakpoint>: Don't restart threads here.
12650 (stop_waiting): Don't clear step-over info here.
12651
12652 2017-03-08 Pedro Alves <palves@redhat.com>
12653
12654 PR 21206
12655 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12656 goes to argument 2, not 1.
12657
12658 2017-03-08 Pedro Alves <palves@redhat.com>
12659
12660 PR cli/21218
12661 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12662 display_gdb_prompt.
12663 (command_line_input): Add comment.
12664
12665 2017-03-08 Pedro Alves <palves@redhat.com>
12666
12667 PR tui/21216
12668 * tui/tui-file.c (tui_file::write): New.
12669 * tui/tui-file.h (tui_file): Override "write".
12670 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12671 factored out from ...
12672 (tui_puts): ... here.
12673 (tui_putc): Use them.
12674 (tui_write): New function.
12675 * tui/tui-io.h (tui_write): Declare.
12676
12677 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12678
12679 * Makefile.in (SFILES): Replace "environ.c" with
12680 "common/environ.c".
12681 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12682 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12683 to...
12684 * common/environ.c: ... here.
12685 * environ.h: Moved to...
12686 * common/environ.h: ... here.
12687
12688 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12689
12690 * gdbarch.sh (pstring_ptr): New static function.
12691 (gdbarch_disassembler_options): Use it.
12692 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12693 not valid_disassembler_option->name.
12694 * gdbarch.c: Regenerate.
12695
12696 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12697
12698 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12699
12700 2017-03-07 Pedro Alves <palves@redhat.com>
12701
12702 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12703
12704 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12705
12706 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12707 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12708 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12709 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12710
12711 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12712
12713 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12714
12715 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12716
12717 * remote.c (remote_add_target_side_commands): Use range-based
12718 for loop.
12719
12720 2017-03-03 Yao Qi <yao.qi@linaro.org>
12721
12722 PR gdb/21165
12723 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12724 value is lazy.
12725 * valprint.c (common_val_print): Likewise.
12726
12727 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12728
12729 * NEWS: Mention new set/show disassembler-options commands.
12730 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12731 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12732 (prospective_options): New static variable.
12733 (gdb_disassembler::gdb_disassembler): Initialize
12734 m_di.disassembler_options.
12735 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12736 (get_disassembler_options): New function.
12737 (set_disassembler_options): Likewise.
12738 (set_disassembler_options_sfunc): Likewise.
12739 (show_disassembler_options_sfunc): Likewise.
12740 (disassembler_options_completer): Likewise.
12741 (_initialize_disasm): Likewise.
12742 * disasm.h (get_disassembler_options): New prototype.
12743 (set_disassembler_options): Likewise.
12744 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12745 (gdbarch_verify_disassembler_options): Likewise.
12746 * gdbarch.c: Regenerate.
12747 * gdbarch.h: Likewise.
12748 * arm-tdep.c (num_disassembly_options): Delete.
12749 (set_disassembly_style): Likewise.
12750 (arm_disassembler_options): New static variable.
12751 (set_disassembly_style_sfunc): Convert short style name into long
12752 option name. Call set_disassembler_options.
12753 (show_disassembly_style_sfunc): New function.
12754 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12755 set_gdbarch_verify_disassembler_options.
12756 (_initialize_arm_tdep): Delete regnames variable and update callers.
12757 (arm_disassembler_options): Initialize.
12758 (disasm_options): New variable.
12759 (num_disassembly_options): Rename from this...
12760 (num_disassembly_styles): ...to this. Compute by scanning through
12761 disasm_options.
12762 (valid_disassembly_styles): Initialize using disasm_options.
12763 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12764 set_arm_regname_option.
12765 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12766 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12767 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12768 set_gdbarch_verify_disassembler_options.
12769 * s390-tdep.c (s390_disassembler_options): New static variable.
12770 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12771 set_gdbarch_verify_disassembler_options.
12772
12773 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12774
12775 * remote.c (remote_add_target_side_condition): Remove "struct"
12776 keyword from range-based for loop.
12777
12778 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12779
12780 * remote.c (remote_add_target_side_condition): Use range-based
12781 for loop. Update comment.
12782
12783 2017-02-27 Yao Qi <yao.qi@linaro.org>
12784
12785 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12786
12787 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12788
12789 * regcache.c (regcache_raw_update): New function.
12790 (regcache_raw_read): Move code to regcache_raw_update.
12791 * regcache.h (regcache_raw_update): New declaration.
12792 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12793
12794 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12795
12796 * dwarf2read.c (create_debug_type_hash_table): Initialize
12797 header.signature and header.type_offset_in_tu.
12798
12799 2017-02-24 Pedro Alves <palves@redhat.com>
12800
12801 * symtab.c (make_file_symbol_completion_list_1): Use
12802 add_symtab_completions.
12803
12804 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12805
12806 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12807
12808 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12809
12810 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12811 I386_MAX_REGISTER_SIZE.
12812 (i386_pseudo_register_write): Likewise.
12813 (i386_process_record): Likewise.
12814 * i387-tdep.c (i387_supply_xsave): Likewise.
12815 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12816 (store_register): Likewise.
12817
12818 2017-02-23 Pedro Alves <palves@redhat.com>
12819
12820 * ada-lang.c: Include "common/function-view.h".
12821 (ada_iterate_over_symbols): Adjust to use function_view as
12822 callback type.
12823 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12824 (ada_make_symbol_completion_list): Use a lambda.
12825 (ada_exc_search_name_matches): Delete.
12826 (name_matches_regex): New.
12827 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12828 * compile/compile-c-support.c: Include "common/function-view.h".
12829 (print_one_macro): Change prototype to accept a ui_file pointer.
12830 (write_macro_definitions): Use a lambda.
12831 * dwarf2read.c: Include "common/function-view.h".
12832 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12833 (dw2_expand_symtabs_matching): Adjust to use function_view as
12834 callback type.
12835 * language.h: Include "common/function-view.h".
12836 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12837 function_view as callback type.
12838 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12839 * linespec.c: Include "common/function-view.h".
12840 (collect_info::add_symbol): New method.
12841 (struct symbol_and_data_callback, iterate_inline_only, struct
12842 symbol_matcher_data, iterate_name_matcher): Delete.
12843 (iterate_over_all_matching_symtabs): Adjust to use function_view
12844 as callback type and lambdas.
12845 (iterate_over_file_blocks): Adjust to use function_view as
12846 callback type.
12847 (decode_compound_collector): Now a class with private fields.
12848 (decode_compound_collector::release_symbols): New method.
12849 (collect_one_symbol): Rename to...
12850 (decode_compound_collector::operator()): ... this and adjust.
12851 (lookup_prefix_sym): decode_compound_collector construction bits
12852 move to decode_compound_collector ctor. Pass the
12853 decode_compound_collector object directly as callback. Remove
12854 cleanups and use decode_compound_collector::release_symbols
12855 instead.
12856 (symtab_collector): Now a class with private fields.
12857 (symtab_collector::release_symtabs): New method.
12858 (add_symtabs_to_list): Rename to...
12859 (symtab_collector::operator()): ... this and adjust.
12860 (collect_symtabs_from_filename): symtab_collector construction
12861 bits move to symtab_collector ctor. Pass the symtab_collector
12862 object directly as callback. Remove cleanups and use
12863 symtab_collector::release_symtabs instead.
12864 (collect_symbols): Delete.
12865 (add_matching_symbols_to_info): Use lambdas.
12866 * macrocmd.c (print_macro_callback): Delete.
12867 (info_macro_command): Use a lambda.
12868 (info_macros_command): Pass print_macro_definition as callable
12869 directly.
12870 (print_one_macro): Remove 'ignore' parameter.
12871 (macro_list_command): Adjust.
12872 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12873 (macro_for_each_data::user_data): Delete field.
12874 (foreach_macro): Adjust to call the function_view.
12875 (macro_for_each): Adjust to use function_view as callback type.
12876 (foreach_macro_in_scope): Adjust to call the function_view.
12877 (macro_for_each_in_scope): Adjust to use function_view as callback
12878 type.
12879 * macrotab.h: Include "common/function-view.h".
12880 (macro_callback_fn): Declare a prototype instead of a pointer.
12881 Remove "user_data" parameter.
12882 (macro_for_each, macro_for_each_in_scope): Adjust to use
12883 function_view as callback type.
12884 * psymtab.c (partial_map_expand_apply)
12885 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12886 Adjust to use function_view as callback type and to return bool.
12887 (psym_expand_symtabs_matching): Adjust to use function_view as
12888 callback types.
12889 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12890 to use function_view as callback type and to return bool.
12891 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12892 callback types.
12893 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12894 as callback types.
12895 * symfile.h: Include "common/function-view.h".
12896 (expand_symtabs_file_matcher_ftype)
12897 (expand_symtabs_symbol_matcher_ftype)
12898 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12899 return bool.
12900 (quick_symbol_functions::map_symtabs_matching_filename)
12901 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12902 function_view as callback type and return bool.
12903 (expand_symtabs_matching): Adjust to use function_view as callback
12904 type.
12905 (maintenance_expand_name_matcher)
12906 (maintenance_expand_file_matcher): Delete.
12907 (maintenance_expand_symtabs): Use lambdas.
12908 * symtab.c (iterate_over_some_symtabs): Adjust to use
12909 function_view as callback types and return bool.
12910 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12911 of a cleanup.
12912 (lookup_symtab_callback): Delete.
12913 (lookup_symtab): Use a lambda.
12914 (iterate_over_symbols): Adjust to use function_view as callback
12915 type.
12916 (struct search_symbols_data, search_symbols_file_matches)
12917 (search_symbols_name_matches): Delete.
12918 (search_symbols): Use a pair of lambdas.
12919 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12920 (symtab_expansion_callback): Delete.
12921 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12922 * symtab.h: Include "common/function-view.h".
12923 (iterate_over_some_symtabs): Adjust to use function_view as
12924 callback type and return bool.
12925 (iterate_over_symtabs): Adjust to use function_view as callback
12926 type.
12927 (symbol_found_callback_ftype): Remove 'data' parameter and return
12928 bool.
12929 (iterate_over_symbols): Adjust to use function_view as callback
12930 type.
12931
12932 2017-02-23 Pedro Alves <palves@redhat.com>
12933
12934 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12935 (%.o) <unittests/%.c>: New pattern.
12936 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12937 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12938 * common/function-view.h: New file.
12939 * unittests/function-view-selftests.c: New file.
12940 * configure: Regenerate.
12941
12942 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12943
12944 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12945 inferior_ptid.
12946 * go32-nat.c (go32_thread_alive): Likewise.
12947
12948 2017-02-23 Yao Qi <yao.qi@linaro.org>
12949
12950 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12951 delete.
12952
12953 2017-02-23 Yao Qi <yao.qi@linaro.org>
12954
12955 * varobj.c (varobj_clear_saved_item): Use delete instead of
12956 xfree.
12957 (update_dynamic_varobj_children): Likewise.
12958
12959 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12960
12961 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12962
12963 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12964
12965 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12966 m_enum_value to 0 in default constructor.
12967
12968 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12969
12970 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12971 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12972 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12973 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12974 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12975 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12976 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12977 IS_STORE_CONDITIONAL_INSN.
12978
12979 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12980
12981 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12982
12983 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12984
12985 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12986
12987 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12988
12989 * dwarf2read.c (skip_one_die, read_attribute_value)
12990 (dwarf2_const_value_attr, dump_die_shallow)
12991 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12992 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12993
12994 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12995
12996 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12997 (dwarf_parse_macro_header): Accept DWARF version 5.
12998 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12999
13000 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13001
13002 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13003 DW_AT_GNU_*.
13004 * common/common-exceptions.h (enum errors): Likewise.
13005 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13006 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13007 (dwarf_expr_context::execute_stack_op): Likewise.
13008 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13009 Likewise.
13010 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13011 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13012 (show_entry_values_debug, call_site_to_target_addr)
13013 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13014 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13015 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13016 (value_of_dwarf_block_entry, indirect_pieced_value)
13017 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13018 (disassemble_dwarf_expression): Likewise.
13019 * dwarf2read.c (process_die, inherit_abstract_dies)
13020 (read_call_site_scope): Likewise.
13021 * gdbtypes.h (struct func_type, struct call_site_parameter)
13022 (struct call_site): Likewise.
13023 * stack.c (read_frame_arg): Likewise.
13024 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13025
13026 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13027
13028 * defs.h (read_unsigned_leb128): New declaration.
13029 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13030 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13031 (dwarf2_find_location_expression): Call also
13032 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13033 * dwarf2loc.h (dwarf2_version): New declaration.
13034 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13035 rnglists.
13036 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13037 .debug_rnglists.
13038 (struct dwop_section_names): Add loclists_dwo.
13039 (dwop_section_names): Add .debug_loclists.dwo.
13040 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13041 (struct dwarf2_per_cu_data): Add dwarf_version.
13042 (struct dwo_sections): Add loclists.
13043 (struct attr_abbrev): Add implicit_const.
13044 (read_indirect_line_string): New declaration.
13045 (read_unsigned_leb128): Delete declaration.
13046 (rcuh_kind): New definition.
13047 (read_and_check_comp_unit_head): Change parameter
13048 is_debug_types_section to section_kind.
13049 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13050 (read_comp_unit_head): Change parameter abfd to section, add parameter
13051 section_kind. Handle DWARF-5.
13052 (error_check_comp_unit_head): Accept also DWARF version 5.
13053 (read_and_check_comp_unit_head): Change parameter
13054 is_debug_types_section to section_kind.
13055 (read_and_check_type_unit_head): Delete function.
13056 (read_abbrev_offset): Handle DWARF-5.
13057 (create_debug_type_hash_table): Add parameter section_kind. Process
13058 only DW_UT_type. Use signature and type_offset_in_tu from struct
13059 comp_unit_head.
13060 (create_debug_types_hash_table): Update create_debug_type_hash_table
13061 caller.
13062 (create_all_type_units): Call create_debug_type_hash_table.
13063 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13064 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13065 caller.
13066 (skip_one_die): Handle DW_FORM_implicit_const.
13067 (dwarf2_rnglists_process): New function.
13068 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13069 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13070 (read_attribute_value): Handle DW_FORM_implicit_const,
13071 DW_FORM_line_strp.
13072 (read_attribute): Handle DW_FORM_implicit_const.
13073 (read_indirect_string_at_offset_from): New function from
13074 read_indirect_string_at_offset.
13075 (read_indirect_string_at_offset): Call
13076 read_indirect_string_at_offset_from.
13077 (read_indirect_line_string_at_offset): New function.
13078 (read_indirect_string): New function comment.
13079 (read_indirect_line_string): New function.
13080 (read_unsigned_leb128): Make it global.
13081 (dwarf2_string_attr): Handle DWARF-5.
13082 (add_include_dir_stub, read_formatted_entries): New functions.
13083 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13084 Handle DWARF-5.
13085 (per_cu_header_read_in): Update read_comp_unit_head caller.
13086 (dwarf2_version): New function.
13087 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13088 rnglists.
13089 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13090 fields.
13091
13092 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13093
13094 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13095
13096 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13097
13098 * dwarf2read.c (dwarf2_ranges_process): New function from
13099 dwarf2_ranges_read.
13100 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13101 dwarf2_ranges_process.
13102
13103 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13104
13105 * dwarf2read.c (create_debug_type_hash_table): New function from
13106 create_debug_types_hash_table.
13107 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13108 (create_all_type_units, open_and_init_dwo_file): Update
13109 create_debug_types_hash_table callers.
13110
13111 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13112
13113 PR gdb/16188
13114 * fork-child.c (trace_start_error): Fix thinko. va_end should
13115 refer to 'ap', not 'args'.
13116
13117 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13118 Pedro Alves <palves@redhat.com>
13119
13120 PR gdb/16188
13121 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13122 calls succeeded.
13123 * fork-child.c (trace_start_error): New function.
13124 (trace_start_error_with_name): Likewise.
13125 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13126 * inf-ptrace.c (inf_ptrace_me): Likewise.
13127 * inferior.h (trace_start_error): New prototype.
13128 (trace_start_error_with_name): Likewise.
13129
13130 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13131
13132 PR gdb/21164
13133 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13134 NULL before using it.
13135 * symmisc.c (maintenance_print_symbols): Likewise.
13136 (maintenance_print_msymbols): Likewise.
13137
13138 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13139
13140 * NEWS: Add record Python bindings entry.
13141
13142 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13143
13144 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13145 py-record-full.o.
13146 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13147 * python/py-record-btrace.c, python/py-record-btrace.h,
13148 python/py-record-full.c, python/py-record-full.h: New file.
13149 * python/py-record.c: Add include for py-record-btrace.h and
13150 py-record-full.h.
13151 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13152 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13153 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13154 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13155 New definition.
13156 (gdbpy_initialize_btrace): New export.
13157 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13158
13159 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13160
13161 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13162 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13163 * python/py-record.c: New file.
13164 * python/python-internal.h (gdbpy_start_recording,
13165 gdbpy_current_recording, gdpy_stop_recording,
13166 gdbpy_initialize_record): New export.
13167 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13168 (python_GdbMethods): Add gdbpy_start_recording,
13169 gdbpy_current_recording and gdbpy_stop_recording.
13170
13171 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13172
13173 * record-btrace.c (record_btrace_record_method): New function.
13174 (init_record_btrace_ops): Initialize to_record_method.
13175 * record-full.c (record_full_record_method): New function.
13176 (init_record_full_ops, init_record_full_core_ops): Add
13177 record_full_record_method.
13178 * record.h (enum record_method): New enum.
13179 * target-debug.h (target_debug_print_enum_record_method: New define.
13180 * target-delegates.c: Regenerate.
13181 * target.c (target_record_method): New function.
13182 * target.h: Include record.h.
13183 (struct target_ops) <to_record_method>: New field.
13184 (target_record_method): New export.
13185
13186 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13187
13188 * record.h (record_start, record_stop): New export.
13189 * record.c (record_start, record_stop): New function.
13190
13191 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13192
13193 * btrace.c (btrace_fetch): Copy function call segments pointer
13194 into a vector.
13195 (btrace_clear): Clear the vector.
13196 (btrace_find_insn_by_number): Use binary search to find the correct
13197 function call segment.
13198 * btrace.h (brace_fun_p): New typedef.
13199 (struct btrace_thread_info) <functions>: New field.
13200
13201 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13202
13203 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13204 * btrace.c (btrace_decode_error): ... here. New function.
13205 * btrace.h (btrace_decode_error): New export.
13206
13207 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13208
13209 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13210 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13211 btrace_find_insn_by_number): Remove special case for gaps.
13212 * btrace.h (btrace_insn_get_error): New export.
13213 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13214 * record-btrace.c (btrace_insn_history): Print number for gaps.
13215 (record_btrace_info, record_btrace_goto): Handle gaps.
13216
13217 2017-02-14 Tom Tromey <tom@tromey.com>
13218
13219 PR python/13598:
13220 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13221 event.
13222 * python/py-evts.c (gdbpy_initialize_py_events): Add
13223 before_prompt registry.
13224 * python/py-events.h (events_object) <before_prompt>: New field.
13225
13226 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13227
13228 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13229
13230 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
13231
13232 * symfile (_initialize_symfile): Add usage text to the load command's
13233 help text.
13234
13235 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13236
13237 * utils.c (defaulted_query): Don't query on secondary UIs.
13238
13239 2017-02-10 Tom Tromey <tom@tromey.com>
13240
13241 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13242
13243 2017-02-10 Tom Tromey <tom@tromey.com>
13244
13245 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13246 "cleanup" local.
13247 * python/py-type.c (typy_legacy_template_argument): Remove
13248 unnecessary "cleanup" local.
13249
13250 2017-02-10 Tom Tromey <tom@tromey.com>
13251
13252 * python/python.c (do_start_initialization): New function, from
13253 _initialize_python.
13254 (_initialize_python): Call do_start_initialization.
13255 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13256 goto.
13257
13258 2017-02-10 Tom Tromey <tom@tromey.com>
13259
13260 * python/py-prettyprint.c (pretty_print_one_value): Use
13261 gdbpy_ref.
13262
13263 2017-02-10 Tom Tromey <tom@tromey.com>
13264
13265 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13266 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13267 gdbpy_ref.
13268 * python/py-type.c (field_new): Use gdbpy_ref.
13269 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13270 gdbpy_ref.
13271 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13272 (py_free_pspace): Likewise.
13273 (pspace_to_pspace_object): Likewise.
13274 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13275 (py_free_objfile): Likewise.
13276 (objfile_to_objfile_object): Likewise.
13277 * python/py-inferior.c (delete_thread_object): Use
13278 gdbpy_ref.
13279 (infpy_read_memory): Likewise.
13280 (py_free_inferior): Likewise.
13281 * python/py-evtregistry.c (create_eventregistry_object): Use
13282 gdbpy_ref.
13283 * python/py-event.c (create_event_object): Use gdbpy_ref.
13284
13285 2017-02-10 Tom Tromey <tom@tromey.com>
13286
13287 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13288 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13289 used.
13290 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13291 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13292 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13293 python/py-framefilter.c, python/py-function.c,
13294 python/py-inferior.c, python/py-infevents.c,
13295 python/py-linetable.c, python/py-newobjfileevent.c,
13296 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13297 python/py-signalevent.c, python/py-stopevent.c,
13298 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13299 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13300 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13301 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13302
13303 2017-02-10 Tom Tromey <tom@tromey.com>
13304
13305 * ui-out.h (ui_out_emit_type): New class.
13306 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13307 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13308 and ui_out_emit_tuple.
13309 (enumerate_locals): Likewise.
13310 (py_mi_print_variables, py_print_locals, py_print_args): Use
13311 ui_out_emit_list.
13312 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13313 ui_out_emit_list.
13314 * common/gdb_optional.h: New file.
13315
13316 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13317
13318 * MAINTAINERS (Write After Approval): Update my e-mail address.
13319
13320 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13321
13322 PR gdb/21122
13323 * breakpoint.c (_initialize_breakpoint): Update the help description
13324 of the 'commands' command to indicate that it takes a list argument.
13325
13326 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13327
13328 * interps.c (current_interp_set_logging): Remove "return".
13329
13330 2017-02-09 Gary Benson <gbenson@redhat.com>
13331
13332 * symtab.c (add_symtab_completions): Prevent NULL pointer
13333 dereference.
13334
13335 2017-02-08 Pedro Alves <palves@redhat.com>
13336
13337 * interps.c (interp::interp): Remove reference to quiet_p.
13338 (interp_set): Make static. Remove dead "Switching to" output
13339 code.
13340 (interp_quiet_p, interp_set_quiet): Delete.
13341 (interpreter_exec_cmd): Don't set the interpreter quiet.
13342 * interps.h (interp_quiet_p): Make static.
13343 (class interp) <quiet_p>: Remove field
13344
13345 2017-02-08 Jerome Guitton <guitton@adacore.com>
13346
13347 * cli/cli-decode.c (find_command_name_length): Make it extern.
13348 * cli/cli-decode.h (find_command_name_length): Declare.
13349 * cli/cli-script.c (command_name_equals, line_first_arg):
13350 New functions.
13351 (process_next_line): Use cli-decode to parse command names.
13352 (build_command_line): Make args a constant pointer.
13353
13354 2017-02-08 Jerome Guitton <guitton@adacore.com>
13355
13356 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13357 Remove case-insensitive search.
13358
13359 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13360
13361 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13362 at the end of the line. Avoids an ARI warning.
13363
13364 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
13365
13366 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13367 rdseed instructions.
13368 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13369
13370 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13371
13372 PR tdep/20936
13373 Provide and use sparc32 and sparc64 target description XML files.
13374 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13375 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13376 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13377 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13378 * features/sparc/sparc32-solaris.xml: New file.
13379 * features/sparc/sparc64-solaris.xml: New file.
13380 * features/sparc/sparc32-solaris.c: Generated.
13381 * features/sparc/sparc64-solaris.c: Generated.
13382 * sparc-tdep.h: Account for differences in target descriptions.
13383 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13384 (sparc32_register_type): Use target provided registers.
13385 (validate_tdesc_registers): New function.
13386 (sparc32_gdbarch_init): Use tdesc_has_registers.
13387 Set pseudoregister functions.
13388 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13389 (sparc64_register_type): Use target provided registers.
13390 (sparc64_init_abi): Set pseudoregister functions.
13391
13392 2017-02-03 Tom Tromey <tom@tromey.com>
13393
13394 PR rust/21097:
13395 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13396 with a single member.
13397
13398 2017-02-03 Pedro Alves <palves@redhat.com>
13399
13400 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13401 (cli_interp_base::~cli_interp_base): New.
13402 (cli_interp): New struct.
13403 (as_cli_interp): Cast the interp itself to cli_interp.
13404 (cli_interpreter_pre_command_loop): Rename to ...
13405 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13406 parameter.
13407 (cli_interpreter_init): Rename to ...
13408 (cli_interp::init): ... this. Remove 'self' parameter. Use
13409 boolean. Make extern.
13410 (cli_interpreter_resume): Rename to ...
13411 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13412 extern.
13413 (cli_interpreter_suspend): Rename to ...
13414 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13415 extern.
13416 (cli_interpreter_exec): Rename to ...
13417 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13418 extern.
13419 (cli_interpreter_supports_command_editing): Rename to ...
13420 (cli_interp_base::supports_command_editing): ... this. Remove
13421 'interp' parameter. Make extern.
13422 (cli_ui_out): Rename to ...
13423 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13424 Make extern.
13425 (cli_set_logging): Rename to ...
13426 (cli_interp_base::set_logging): ... this. Remove 'interp'
13427 parameter. Make extern.
13428 (cli_interp_procs): Delete.
13429 (cli_interp_factory): Adjust to use "new".
13430 * cli/cli-interp.h: Include "interps.h".
13431 (struct cli_interp_base): New struct.
13432 * interps.c (struct interp): Delete. Fields moved to interps.h.
13433 (interp_new): Delete.
13434 (interp::interp, interp::~interp): New.
13435 (interp_set): Use bool, and return void. Assume the interpreter
13436 has suspend, init and resume methods, and that the all return
13437 void.
13438 (set_top_level_interpreter): interp_set returns void.
13439 (interp_ui_out): Adapt.
13440 (current_interp_set_logging): Adapt.
13441 (interp_data): Delete.
13442 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13443 (interp_exec): Adapt.
13444 (top_level_interpreter_data): Delete.
13445 * interps.h (interp_init_ftype, interp_resume_ftype)
13446 (interp_suspend_ftype, interp_exec_ftype)
13447 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13448 (class interp): New.
13449 (interp_new): Delete.
13450 (interp_set): Now returns void. Use bool.
13451 (interp_data, top_level_interpreter_data): Delete.
13452 * mi/mi-common.h: Include interps.h.
13453 (class mi_interp): Inherit from interp. Define a ctor. Declare
13454 init, resume, suspect, exec, interp_ui_out, set_logging and
13455 pre_command_loop methods.
13456 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13457 (mi_interpreter_init): Rename to ...
13458 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13459 bool, return void and make extern. Adjust.
13460 (mi_interpreter_resume): ... Rename to ...
13461 (mi_interp::resume): ... this. Remove the 'data' parameter,
13462 return void and make extern. Adjust.
13463 (mi_interpreter_suspend): ... Rename to ...
13464 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13465 return void and make extern. Adjust.
13466 (mi_interpreter_exec): ... Rename to ...
13467 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13468 extern. Adjust.
13469 (mi_interpreter_pre_command_loop): ... Rename to ...
13470 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13471 parameter and make extern.
13472 (mi_on_normal_stop_1): Adjust.
13473 (mi_ui_out): Rename to ...
13474 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13475 parameter and make extern. Adjust.
13476 (mi_set_logging): Rename to ...
13477 (mi_interp::set_logging): ... this. Remove the 'interp'
13478 parameter and make extern. Adjust.
13479 (mi_interp_procs): Delete.
13480 (mi_interp_factory): Adjust to use 'new'.
13481 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13482 (mi_print_exception, mi_execute_command, mi_load_progress):
13483 Adjust.
13484 * tui/tui-interp.c (tui_interp): New class.
13485 (as_tui_interp): Return a tui_interp pointer.
13486 (tui_on_normal_stop, tui_on_signal_received)
13487 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13488 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13489 to use interp::interp_ui_out.
13490 (tui_init): Rename to ...
13491 (tui_interp::init): ... this. Remove the 'self' parameter, use
13492 bool, return void and make extern. Adjust.
13493 (tui_resume): Rename to ...
13494 (tui_interp::resume): ... this. Remove the 'data' parameter,
13495 return void and make extern. Adjust.
13496 (tui_suspend): Rename to ...
13497 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13498 return void and make extern. Adjust.
13499 (tui_ui_out): Rename to ...
13500 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13501 parameter, and make extern. Adjust.
13502 (tui_exec): Rename to ...
13503 (tui_interp::exec): ... this. Remove the 'data' parameter and
13504 make extern.
13505 (tui_interp_procs): Delete.
13506 (tui_interp_factory): Use "new".
13507
13508 2017-02-02 Tom Tromey <tom@tromey.com>
13509
13510 * rust-exp.y (ends_raw_string, space_then_number)
13511 (rust_identifier_start_p): Return bool.
13512 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13513 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13514 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13515 (rust_chartype_p): Return bool.
13516 (val_print_struct, rust_print_struct_def, rust_print_type):
13517 Update.
13518 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13519 Return bool.
13520
13521 2017-02-02 Tom Tromey <tom@tromey.com>
13522
13523 * rust-lang.c: Reindent.
13524
13525 2017-02-02 Tom Tromey <tom@tromey.com>
13526
13527 * rust-lang.h (rust_crate_for_block): Update.
13528 * rust-lang.c (rust_crate_for_block): Return std::string.
13529 (rust_get_disr_info): Use std:;string, not
13530 gdb::unique_xmalloc_ptr.
13531 * rust-exp.y (crate_name): Update.
13532
13533 2017-02-02 Pedro Alves <palves@redhat.com>
13534
13535 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13536 field out of gdb_disassembler_test and make it static.
13537
13538 2017-02-02 Pedro Alves <palves@redhat.com>
13539
13540 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13541 mi1_interp and mi_interp fields.
13542
13543 2017-02-02 Pedro Alves <palves@redhat.com>
13544
13545 * cli/cli-interp.c (struct saved_output_files, saved_output):
13546 Moved from cli/cli-logging.c.
13547 (cli_set_logging): New function.
13548 (cli_interp_procs): Install cli_set_logging.
13549 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13550 Declare.
13551 * cli/cli-logging.c (struct saved_output_files, saved_output):
13552 Moved to cli/cli-interp.c.
13553 (pop_output_files): Don't save outputs here.
13554 (make_logging_output): New function.
13555 (handle_redirections): Don't build tee nor save previous outputs
13556 here.
13557 * interps.c (current_interp_set_logging): Change prototype.
13558 Assume there's always a set_logging_proc method installed.
13559 * interps.h (interp_set_logging_ftype): Change prototype.
13560 (current_interp_set_logging): Change prototype and adjust comment.
13561 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13562 use make_logging_output.
13563 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13564 2017-02-02 Pedro Alves <palves@redhat.com>
13565
13566 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13567 from ...
13568 (set_logging_overwrite): ... here.
13569 (logging_no_redirect_file): Delete.
13570 (set_logging_redirect): Don't handle redirection on the fly.
13571 Instead warn that "logging off" / "logging on" is necessary.
13572 (pop_output_files): Delete references to logging_no_redirect_file.
13573 (show_logging_command): Always speak in terms of what will happen
13574 once logging is reenabled.
13575
13576 2017-02-02 Pedro Alves <palves@redhat.com>
13577
13578 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13579
13580 2017-02-02 Pedro Alves <palves@redhat.com>
13581
13582 * disasm.c (gdb_pretty_print_insn): Rename to ...
13583 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13584 Remove gdbarch parameter. Adapt to clear the object's buffers
13585 instead of allocating new buffers, and to print using the object's
13586 gdb_disassembler instead of calling gdb_print_insn.
13587 (dump_insns): Use gdb_pretty_print_disassembler.
13588 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13589 (gdb_pretty_print_disassembler): New class.
13590 * record-btrace.c (btrace_insn_history): Use
13591 gdb_pretty_print_disassembler.
13592
13593 2017-02-02 Pedro Alves <palves@redhat.com>
13594
13595 * ada-lang.c (type_as_string): Use string_file.
13596 * ada-valprint.c (ada_print_floating): Use string_file.
13597 * ada-varobj.c (ada_varobj_scalar_image)
13598 (ada_varobj_get_value_image): Use string_file.
13599 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13600 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13601 * breakpoint.c (update_inserted_breakpoint_locations)
13602 (insert_breakpoint_locations, reattach_breakpoints)
13603 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13604 (print_it_watchpoint): Use string_file.
13605 (save_breakpoints): Use stdio_file.
13606 * c-exp.y (oper): Use string_file.
13607 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13608 tee_file.
13609 (pop_output_files): Use delete.
13610 (handle_redirections): Use stdio_file and tee_file.
13611 * cli/cli-setshow.c (do_show_command): Use string_file.
13612 * compile/compile-c-support.c (c_compute_program): Use
13613 string_file.
13614 * compile/compile-c-symbols.c (generate_vla_size): Take a
13615 'string_file &' instead of a 'ui_file *'.
13616 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13617 of a 'ui_file *'. Use string_file.
13618 (generate_c_for_variable_locations): Take a 'string_file &'
13619 instead of a 'ui_file *'.
13620 * compile/compile-internal.h (generate_c_for_for_one_variable):
13621 Take a 'string_file &' instead of a 'ui_file *'.
13622 * compile/compile-loc2c.c (push, pushf, unary, binary)
13623 (print_label, pushf_register_address, pushf_register)
13624 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13625 'ui_file *'. Adjust.
13626 * compile/compile.c (compile_to_object): Use string_file.
13627 * compile/compile.h (compile_dwarf_expr_to_c)
13628 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13629 'ui_file *'.
13630 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13631 (replace_typedefs_qualified_name): Use string_file and
13632 obstack_copy0.
13633 * disasm.c (gdb_pretty_print_insn): Use string_file.
13634 (gdb_disassembly): Adjust reference the null_stream global.
13635 (do_ui_file_delete): Delete.
13636 (gdb_insn_length): Use null_stream.
13637 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13638 * dwarf2loc.c (dwarf2_compile_property_to_c)
13639 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13640 'string_file &' instead of a 'ui_file *'.
13641 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13642 * dwarf2read.c (do_ui_file_peek_last): Delete.
13643 (dwarf2_compute_name): Use string_file.
13644 * event-top.c (gdb_setup_readline): Use stdio_file.
13645 * gdbarch.sh (verify_gdbarch): Use string_file.
13646 * gdbtypes.c (safe_parse_type): Use null_stream.
13647 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13648 string_file.
13649 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13650 'string_file *' instead of a 'ui_file *'.
13651 (gdbscm_arch_disassemble): Use string_file.
13652 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13653 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13654 inherits from ui_file.
13655 (ioscm_file_port_delete, ioscm_file_port_rewind)
13656 (ioscm_file_port_put): Delete.
13657 (ioscm_file_port_write): Rename to ...
13658 (ioscm_file_port::write): ... this. Remove file_port_magic
13659 checks.
13660 (ioscm_file_port_new): Delete.
13661 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13662 ui_file_up.
13663 * guile/scm-type.c (tyscm_type_name): Use string_file.
13664 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13665 Use string_file.
13666 * infcmd.c (print_return_value_1): Use string_file.
13667 * infrun.c (print_target_wait_results): Use string_file.
13668 * language.c (add_language): Use string_file.
13669 * location.c (explicit_to_string_internal): Use string_file.
13670 * main.c (captured_main_1): Use null_file.
13671 * maint.c (maintenance_print_architecture): Use stdio_file.
13672 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13673 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13674 event_channel>: Change type to mi_console_file pointer.
13675 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13676 (mi_console_file_delete): Delete.
13677 (struct mi_console_file): Delete.
13678 (mi_console_file_magic): Delete.
13679 (mi_console_file_new): Delete.
13680 (mi_console_file::mi_console_file): New.
13681 (mi_console_file_delete): Delete.
13682 (mi_console_file_fputs): Delete.
13683 (mi_console_file::write): New.
13684 (mi_console_raw_packet): Delete.
13685 (mi_console_file::flush): New.
13686 (mi_console_file_flush): Delete.
13687 (mi_console_set_raw): Rename to ...
13688 (mi_console_file::set_raw): ... this.
13689 * mi/mi-console.h (class mi_console_file): New class.
13690 (mi_console_file_new, mi_console_set_raw): Delete.
13691 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13692 (mi_set_logging): Use delete and tee_file. Adjust.
13693 * mi/mi-main.c (output_register): Use string_file.
13694 (mi_cmd_data_evaluate_expression): Use string_file.
13695 (mi_cmd_data_read_memory): Use string_file.
13696 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13697 * mi/mi-out.c (mi_ui_out::main_stream): New.
13698 (mi_ui_out::rewind): Use main_stream and
13699 string_file.
13700 (mi_ui_out::put): Use main_stream and string_file.
13701 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13702 Allocate a 'string_file' instead.
13703 (mi_out_new): Don't allocate a mem_fileopen stream here.
13704 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13705 (mi_ui_out::main_stream): Declare method.
13706 * printcmd.c (eval_command): Use string_file.
13707 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13708 * python/py-arch.c (archpy_disassemble): Use string_file.
13709 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13710 * python/py-frame.c (frapy_str): Use string_file.
13711 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13712 Use string_file.
13713 * python/py-type.c (typy_str): Use string_file.
13714 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13715 * python/py-value.c (valpy_str): Use string_file.
13716 * record-btrace.c (btrace_insn_history): Use string_file.
13717 * regcache.c (regcache_print): Use stdio_file.
13718 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13719 * remote.c (escape_buffer): Use string_file.
13720 * rust-lang.c (rust_get_disr_info): Use string_file.
13721 * serial.c (serial_open_ops_1): Use stdio_file.
13722 (do_serial_close): Use delete.
13723 * stack.c (print_frame_arg): Use string_file.
13724 (print_frame_args): Remove local mem_fileopen stream, not used.
13725 (print_frame): Use string_file.
13726 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13727 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13728 Take a 'string_file *' instead of a 'ui_file *'.
13729 * top.c (new_ui): Use stdio_file and stderr_file.
13730 (free_ui): Use delete.
13731 (execute_command_to_string): Use string_file.
13732 (quit_confirm): Use string_file.
13733 * tracepoint.c (collection_list::append_exp): Use string_file.
13734 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13735 * tui/tui-file.c: Don't include "ui-file.h".
13736 (enum streamtype, struct tui_stream): Delete.
13737 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13738 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13739 (tui_file::tui_file): New method.
13740 (tui_file_fputs): Delete.
13741 (tui_file_get_strbuf): Delete.
13742 (tui_file::puts): New method.
13743 (tui_file_adjust_strbuf): Delete.
13744 (tui_file_flush): Delete.
13745 (tui_file::flush): New method.
13746 * tui/tui-file.h: Tweak intro comment.
13747 Include ui-file.h.
13748 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13749 (tui_file_adjust_strbuf): Delete declarations.
13750 (class tui_file): New class.
13751 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13752 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13753 (tui_register_format): Use string_stream.
13754 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13755 (tui_get_function_from_frame): Use string_file.
13756 * typeprint.c (type_to_string): Use string_file.
13757 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13758 (null_stream): New global.
13759 (ui_file_delete): Delete.
13760 (ui_file::ui_file): New.
13761 (null_file_isatty): Delete.
13762 (ui_file::~ui_file): New.
13763 (null_file_rewind): Delete.
13764 (ui_file::printf): New.
13765 (null_file_put): Delete.
13766 (null_file_flush): Delete.
13767 (ui_file::putstr): New.
13768 (null_file_write): Delete.
13769 (ui_file::putstrn): New.
13770 (null_file_read): Delete.
13771 (ui_file::putc): New.
13772 (null_file_fputs): Delete.
13773 (null_file_write_async_safe): Delete.
13774 (ui_file::vprintf): New.
13775 (null_file_delete): Delete.
13776 (null_file::write): New.
13777 (null_file_fseek): Delete.
13778 (null_file::puts): New.
13779 (ui_file_data): Delete.
13780 (null_file::write_async_safe): New.
13781 (gdb_flush, ui_file_isatty): Adjust.
13782 (ui_file_put, ui_file_rewind): Delete.
13783 (ui_file_write): Adjust.
13784 (ui_file_write_for_put): Delete.
13785 (ui_file_write_async_safe, ui_file_read): Adjust.
13786 (ui_file_fseek): Delete.
13787 (fputs_unfiltered): Adjust.
13788 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13789 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13790 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13791 (set_ui_file_data): Delete.
13792 (string_file::~string_file, string_file::write)
13793 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13794 (do_ui_file_as_string, ui_file_as_string): Delete.
13795 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13796 (struct mem_file): Delete.
13797 (mem_file_new): Delete.
13798 (stdio_file::stdio_file): New.
13799 (mem_file_delete): Delete.
13800 (stdio_file::stdio_file): New.
13801 (mem_fileopen): Delete.
13802 (stdio_file::~stdio_file): New.
13803 (mem_file_rewind): Delete.
13804 (stdio_file::set_stream): New.
13805 (mem_file_put): Delete.
13806 (stdio_file::open): New.
13807 (mem_file_write): Delete.
13808 (stdio_file_magic, struct stdio_file): Delete.
13809 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13810 (stdio_file::flush): New.
13811 (stdio_file_read): Rename to ...
13812 (stdio_file::read): ... this. Adjust.
13813 (stdio_file_write): Rename to ...
13814 (stdio_file::write): ... this. Adjust.
13815 (stdio_file_write_async_safe): Rename to ...
13816 (stdio_file::write_async_safe) ... this. Adjust.
13817 (stdio_file_fputs): Rename to ...
13818 (stdio_file::puts) ... this. Adjust.
13819 (stdio_file_isatty): Delete.
13820 (stdio_file_fseek): Delete.
13821 (stdio_file::isatty): New.
13822 (stderr_file_write): Rename to ...
13823 (stderr_file::write) ... this. Adjust.
13824 (stderr_file_fputs): Rename to ...
13825 (stderr_file::puts) ... this. Adjust.
13826 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13827 (stderr_file::stderr_file): New.
13828 (tee_file_magic): Delete.
13829 (struct tee_file): Delete.
13830 (tee_file::tee_file): New.
13831 (tee_file_new): Delete.
13832 (tee_file::~tee_file): New.
13833 (tee_file_delete): Delete.
13834 (tee_file_flush): Rename to ...
13835 (tee_file::flush): ... this. Adjust.
13836 (tee_file_write): Rename to ...
13837 (tee_file::write): ... this. Adjust.
13838 (tee_file::write_async_safe): New.
13839 (tee_file_fputs): Rename to ...
13840 (tee_file::puts): ... this. Adjust.
13841 (tee_file_isatty): Rename to ...
13842 (tee_file::isatty): ... this. Adjust.
13843 * ui-file.h (struct obstack, struct ui_file): Don't
13844 forward-declare.
13845 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13846 (ui_file_write_ftype)
13847 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13848 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13849 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13850 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13851 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13852 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13853 (set_ui_file_fseek): Delete.
13854 (ui_file_data, ui_file_delete, ui_file_rewind)
13855 (struct ui_file): New.
13856 (ui_file_up): New.
13857 (class null_file): New.
13858 (null_stream): Declare.
13859 (ui_file_write_for_put, ui_file_put): Delete.
13860 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13861 Delete.
13862 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13863 (gdb_fopen, tee_file_new): Delete.
13864 (struct string_file): New.
13865 (struct stdio_file): New.
13866 (stdio_file_up): New.
13867 (struct stderr_file): New.
13868 (class tee_file): New.
13869 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13870 of a 'ui_file *'. Adjust.
13871 * ui-out.h (class ui_out) <field_stream>: Likewise.
13872 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13873 (null_stream): Delete.
13874 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13875 Adjust.
13876 * utils.h (struct ui_file): Delete forward declaration..
13877 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13878 (error_stream): Take a 'string_file &' instead of a
13879 'ui_file *'.
13880 * varobj.c (varobj_value_get_print_value): Use string_file.
13881 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13882 * gdbarch.c: Regenerate.
13883
13884 2017-02-02 Pedro Alves <palves@redhat.com>
13885
13886 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13887 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13888 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13889 Adjust to call gdb_print_insn instead of
13890 gdb_disassembler::print_insn.
13891 (dump_insns, do_mixed_source_and_assembly_deprecated)
13892 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13893 'gdbarch' parameter. Remove gdb_disassembler parameter.
13894 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13895 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13896 declaration.
13897 (gdb_pretty_print_insn): Re-add declaration.
13898 * record-btrace.c (btrace_insn_history): Don't allocate a
13899 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13900
13901 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13902
13903 * disasm.h (gdb_disassembly): Remove file_string parameter.
13904 * disasm.c (gdb_disassembly): Likewise.
13905 * cli/cli-cmds.c (print_disassembly): Adapt.
13906 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13907 * stack.c (do_gdb_disassembly): Likewise.
13908
13909 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13910
13911 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13912 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13913 targets. And if the implicit value is longer than needed, extract
13914 the first bytes instead of the "least significant" ones.
13915
13916 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13917
13918 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13919 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13920 (btrace_fetch): Assert can_access_registers_ptid.
13921 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13922 validate_registers_access.
13923
13924 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13925
13926 * gdbthread.h (can_access_registers_ptid): New.
13927 * thread.c (can_access_registers_ptid): New.
13928
13929 2017-02-01 Pedro Alves <palves@redhat.com>
13930
13931 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13932
13933 2017-01-31 Pedro Alves <palves@redhat.com>
13934
13935 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13936 Fix typos.
13937
13938 2017-01-31 Pedro Alves <palves@redhat.com>
13939
13940 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13941 not used.
13942
13943 2017-01-31 Pedro Alves <palves@redhat.com>
13944
13945 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13946
13947 2017-01-31 Pedro Alves <palves@redhat.com>
13948
13949 * common/scoped_restore.h
13950 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13951 change the value's parameter type to T2.
13952 (make_scoped_restore): Likewise.
13953
13954 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13955 Richard Henderson <rth@redhat.com>
13956
13957 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13958 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13959 GS_BASE for older kernels.
13960 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13961 GS_BASE for older kernels.
13962 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13963 and GS_BASE to the offset table.
13964 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13965 system register group.
13966 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13967 for older kernels.
13968 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13969 amd64 ABI.
13970 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13971 AMD64_GSBASE_REGNUM.
13972 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13973 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13974 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13975 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13976 i386/64bit-segments.xml in those rules.
13977 * features/i386/64bit-segments.xml: New file.
13978 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13979 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13980 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13981 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13982 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13983 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13984 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13985 * features/i386/amd64-avx-linux.c: Regenerated.
13986 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13987 * features/i386/amd64-avx-mpx.c: Regenerated.
13988 * features/i386/amd64-avx512-linux.c: Regenerated.
13989 * features/i386/amd64-linux.c: Regenerated.
13990 * features/i386/amd64-mpx-linux.c: Regenerated.
13991 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13992 * features/i386/i386-avx-mpx.c: Regenerated.
13993 * features/i386/x32-avx-linux.c: Regenerated.
13994 * features/i386/x32-avx512-linux.c: Regenerated.
13995 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13996 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13997 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13998 * regformats/i386/amd64-linux.dat: Regenerated.
13999 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14000 * regformats/i386/x32-avx-linux.dat: Regenerated.
14001 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14002 * regformats/i386/x32-linux.dat: Regenerated.
14003
14004 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14005
14006 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14007 Set to AMD64_NUM_REGS.
14008
14009 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14010
14011 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14012 that checks validity of a register number.
14013
14014 2017-01-27 Kees Cook <keescook@google.com>
14015
14016 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14017 fetch_fpregs if target has fpa registers.
14018 (arm_linux_store_inferior_registers): Call store_fpregs if target
14019 has fpa registers.
14020
14021 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14022
14023 * cris-tdep.c (cris_gdbarch_init): Remove check for
14024 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14025
14026 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14027
14028 * corelow.c (get_core_register_section): Check for regset
14029 existence before checking for REGSET_VARIABLE_SIZE.
14030
14031 2017-01-26 Yao Qi <yao.qi@linaro.org>
14032 Pedro Alves <palves@redhat.com>
14033
14034 PR gdb/20939
14035 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14036 call memory_error, save memaddr instead.
14037 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14038 negative, cal memory_error.
14039 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14040
14041 2017-01-26 Yao Qi <yao.qi@linaro.org>
14042
14043 * disasm-selftests.c (memory_error_test): New function.
14044 (_initialize_disasm_selftests): Register memory_error_test.
14045
14046 2017-01-26 Yao Qi <yao.qi@linaro.org>
14047
14048 * Makefile.in (SFILES): Add disasm-selftests.c and
14049 selftest-arch.c.
14050 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14051 * disasm-selftests.c: New file.
14052 * selftest-arch.c: New file.
14053 * selftest-arch.h: New file.
14054
14055 2017-01-26 Yao Qi <yao.qi@linaro.org>
14056
14057 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14058 to bfd_arch_mep. Don't return 0 if section is not
14059 found. Call print_insn_mep.
14060
14061 2017-01-26 Pedro Alves <palves@redhat.com>
14062 Yao Qi <yao.qi@linaro.org>
14063
14064 * arm-tdep.c: Include "disasm.h".
14065 (gdb_print_insn_arm): Update code to get gdbarch.
14066 * disasm.c (dis_asm_read_memory): Change it to
14067 gdb_disassembler::dis_asm_read_memory.
14068 (dis_asm_memory_error): Likewise.
14069 (dis_asm_print_address): Likewise.
14070 (gdb_pretty_print_insn): Change it to
14071 gdb_disassembler::pretty_print_insn.
14072 (dump_insns): Add one argument gdb_disassemlber. All
14073 callers updated.
14074 (do_mixed_source_and_assembly_deprecated): Likewise.
14075 (do_mixed_source_and_assembly): Likewise.
14076 (do_assembly_only): Likewise.
14077 (gdb_disassembler::gdb_disassembler): New.
14078 (gdb_disassembler::print_insn): New.
14079 * disasm.h (class gdb_disassembler): New.
14080 (gdb_pretty_print_insn): Remove declaration.
14081 (gdb_disassemble_info): Likewise.
14082 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14083 (gdbscm_disasm_read_memory_worker): Update.
14084 (gdbscm_disasm_read_memory): Update.
14085 (gdbscm_disasm_memory_error): Remove.
14086 (gdbscm_disasm_print_address): Remove.
14087 (gdbscm_disassembler::gdbscm_disassembler): New.
14088 (gdbscm_print_insn_from_port): Update.
14089 * mips-tdep.c: Include disasm.h.
14090 (gdb_print_insn_mips): Update code to get gdbarch.
14091 * record-btrace.c (btrace_insn_history): Update.
14092 * spu-tdep.c: Include disasm.h.
14093 (struct spu_dis_asm_data): Remove.
14094 (struct spu_dis_asm_info): New.
14095 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14096 SPU id.
14097 (gdb_print_insn_spu): Cast disassemble_info to
14098 spu_dis_asm_info.
14099
14100 2017-01-26 Yao Qi <yao.qi@linaro.org>
14101
14102 * disasm.c (do_ui_file_delete): Delete.
14103 (gdb_insn_length): Move code creating stream to ...
14104 * utils.c (null_stream): ... here. New function.
14105 * utils.h (null_stream): Declare.
14106
14107 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14108
14109 * python/py-inferior.c (find_thread_object): Return directly
14110 from the loop. Remove "found" variable.
14111
14112 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14113
14114 GDB 7.12.1 released.
14115
14116 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14117
14118 * python/py-function.c (fnpy_call): Reorder declarations to have
14119 the gdbpy_enter object declared first.
14120 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14121
14122 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14123
14124 PR python/21068
14125 * python/python-internal.h (PyMem_RawMalloc): Define for
14126 Python < 3.4.
14127 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14128 PyMem_RawMalloc instead of PyMem_Malloc.
14129
14130 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14131 Luis Machado <lgustavo@codesourcery.com>
14132
14133 * NEWS (New commands): Mention flash-erase.
14134 (New MI commands): Mention target-flash-erase.
14135 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14136 command.
14137 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14138 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14139 * target.c (flash_erase_command): New function.
14140 (initialize_targets): Add new flash-erase command.
14141 * target.h (flash_erase_command): New declaration.
14142
14143 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14144
14145 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14146 HAVE_SYS_PROCFS_H is defined.
14147
14148 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14149
14150 * remote.c (struct cached_reg): Change data into a pointer.
14151 * (stop_reply_dtr): Free data pointers before deleting vector.
14152 (process_stop_reply): Likewise.
14153 (remote_parse_stop_reply): Allocate space for data
14154
14155 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14156
14157 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14158 MAX_REGISTER_SIZE.
14159 (amd64_pseudo_register_read_value): Likewise.
14160 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14161 (store_register_using_P): Likewise.
14162 * regcache.c (regcache_xfer_part): Likewise.
14163
14164 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14165
14166 Split real and pseudo registers.
14167 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14168 (sparc32_pseudo_regnum): New enum.
14169 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14170 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14171 (SPARC32_CP0_REGISTERS): New macro.
14172 (sparc32_pseudo_register_name): New function.
14173 (sparc32_register_name): Use sparc32_pseudo_register_name.
14174 (sparc32_pseudo_register_type): New function.
14175 (sparc32_register_type): Use sparc32_pseudo_register_type.
14176 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14177 pseudo register numbers.
14178 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14179 (SPARC64_CP0_REGISTERS): New macro.
14180 (sparc64_pseudo_register_name): New function.
14181 (sparc64_register_name): Use sparc64_pseudo_register_name.
14182 (sparc64_pseudo_register_type): New function.
14183 (sparc64_register_type): Use sparc64_pseudo_register_type.
14184 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14185 pseudo register numbers.
14186 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14187 sparc64_store_arguments): Handle pseudo register numbers.
14188
14189 2017-01-13 Yao Qi <yao.qi@linaro.org>
14190
14191 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14192 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14193 output.
14194 (getpkt_or_notif_sane_1): Likewise.
14195
14196 2017-01-13 Yao Qi <yao.qi@linaro.org>
14197
14198 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14199 of CC. Pass "-x c++-header" instead of "-x c".
14200
14201 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14202
14203 * remote.c (remote_can_async_p): Update comment.
14204
14205 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14206
14207 * linux-nat.c (linux_nat_can_async_p): Update comment.
14208
14209 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14210
14211 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14212
14213 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14214
14215 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14216
14217 2017-01-10 Tom Tromey <tom@tromey.com>
14218
14219 * python/py-type.c (typy_legacy_template_argument): Update.
14220 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14221 ~demangle_parse_info): Declare new members.
14222 (cp_demangled_name_to_comp): Return unique_ptr.
14223 (cp_demangled_name_parse_free)
14224 (make_cleanup_cp_demangled_name_parse_free)
14225 (cp_new_demangle_parse_info): Remove.
14226 * cp-support.c (do_demangled_name_parse_free_cleanup)
14227 (make_cleanup_cp_demangled_name_parse_free): Remove.
14228 (inspect_type, cp_canonicalize_string_full)
14229 (cp_canonicalize_string): Update.
14230 (mangled_name_to_comp): Change return type.
14231 (cp_class_name_from_physname, method_name_from_physname)
14232 (cp_func_name, cp_remove_params): Update.
14233 * cp-name-parser.y (demangle_parse_info): New constructor, from
14234 cp_new_demangle_parse_info.
14235 (~demangle_parse_info): New destructor, from
14236 cp_demangled_name_parse_free.
14237 (cp_merge_demangle_parse_infos): Update.
14238 (cp_demangled_name_to_comp): Change return type.
14239
14240 2017-01-10 Tom Tromey <tom@tromey.com>
14241
14242 * top.c (prevent_dont_repeat): Change return type.
14243 * python/python.c (execute_gdb_command): Use std::string.
14244 Update.
14245 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14246 * command.h (prevent_dont_repeat): Change return type.
14247 * breakpoint.c (bpstat_do_actions_1): Update.
14248
14249 2017-01-10 Tom Tromey <tom@tromey.com>
14250
14251 * value.h (scoped_value_mark::~scoped_value_mark): Call
14252 free_to_mark.
14253 (scoped_value_mark::free_to_mark): New method.
14254 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14255 scoped_value_mark.
14256
14257 2017-01-10 Tom Tromey <tom@tromey.com>
14258
14259 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14260 (valpy_reference_value, valpy_const_value, valpy_get_address)
14261 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14262 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14263 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14264 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14265 scoped_value_mark.
14266 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14267 * value.h (scoped_value_mark): New class.
14268
14269 2017-01-10 Tom Tromey <tom@tromey.com>
14270
14271 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14272 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14273 * psymtab.c (discard_psymtabs_upto): Remove.
14274 (make_cleanup_discard_psymtabs): Remove.
14275 (struct psymtab_state): Remove.
14276
14277 2017-01-10 Tom Tromey <tom@tromey.com>
14278
14279 * record-full.c (record_full_save_cleanups): Remove.
14280 (record_full_save): Use gdb::unlinker.
14281 * gcore.c (do_bfd_delete_cleanup): Remove.
14282 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14283 cleanups.
14284 * dwarf2read.c (unlink_if_set): Remove.
14285 (write_psymtabs_to_index): Use gdb::unlinker.
14286 * common/gdb_unlinker.h: New file.
14287
14288 2017-01-10 Tom Tromey <tom@tromey.com>
14289
14290 * windows-tdep.c (windows_xfer_shared_library): Update.
14291 * windows-nat.c (windows_make_so): Update.
14292 * utils.h (make_cleanup_bfd_unref): Remove.
14293 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14294 * symfile.h (symfile_bfd_open)
14295 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14296 * symfile.c (read_symbols, symbol_file_add)
14297 (separate_debug_file_exists): Update.
14298 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14299 (generic_load, reread_symbols): Update.
14300 * symfile-mem.c (symbol_file_add_from_memory): Update.
14301 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14302 (spu_symbol_file_add_from_memory): Update.
14303 * solist.h (struct target_so_ops) <bfd_open>: Return
14304 gdb_bfd_ref_ptr.
14305 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14306 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14307 gdb_bfd_ref_ptr.
14308 (solib_map_sections, reload_shared_libraries_1): Update.
14309 * solib-svr4.c (enable_break): Update.
14310 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14311 * solib-frv.c (enable_break2): Update.
14312 * solib-dsbt.c (enable_break): Update.
14313 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14314 gdb_bfd_ref_ptr.
14315 (darwin_solib_get_all_image_info_addr_at_init): Update.
14316 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14317 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14318 * record-full.c (record_full_save): Update.
14319 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14320 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14321 * minidebug.c (find_separate_debug_file_in_section): Return
14322 gdb_bfd_ref_ptr.
14323 * machoread.c (macho_add_oso_symfile): Change abfd to
14324 gdb_bfd_ref_ptr.
14325 (macho_symfile_read_all_oso): Update.
14326 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14327 (macho_symfile_read): Update.
14328 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14329 (jit_bfd_try_read_symtab): Update.
14330 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14331 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14332 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14333 gdb_bfd_ref_ptr.
14334 (gdb_bfd_ref_policy): New struct.
14335 (gdb_bfd_ref_ptr): New typedef.
14336 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14337 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14338 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14339 gdb_bfd_ref_ptr.
14340 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14341 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14342 (gcore_command): Update.
14343 * exec.c (exec_file_attach): Update.
14344 * elfread.c (elf_symfile_read): Update.
14345 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14346 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14347 (open_and_init_dwo_file): Update.
14348 (open_dwp_file): Return gdb_bfd_ref_ptr.
14349 (open_and_init_dwp_file): Update.
14350 * corelow.c (core_open): Update.
14351 * compile/compile-object-load.c (compile_object_load): Update.
14352 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14353 * coffread.c (coff_symfile_read): Update.
14354 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14355 gdb_bfd_ref_ptr. Rename.
14356 (dump_bfd_file, restore_command): Update.
14357 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14358 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14359 (find_separate_debug_file_by_buildid): Update.
14360
14361 2017-01-10 Tom Tromey <tom@tromey.com>
14362
14363 * common/gdb_ref_ptr.h: New file.
14364 * python/py-ref.h (struct gdbpy_ref_policy): New.
14365 (gdbpy_ref): Now a typedef.
14366
14367 2017-01-10 Tom Tromey <tom@tromey.com>
14368
14369 * utils.h (make_cleanup_htab_delete): Don't declare.
14370 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14371 Remove.
14372 * linespec.c (decode_compound_collector): Add constructor,
14373 destructor.
14374 (lookup_prefix_sym): Remove cleanup.
14375 (symtab_collector): Add constructor, destructor.
14376 (collect_symtabs_from_filename): Remove cleanup.
14377 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14378 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14379 Use htab_up.
14380 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14381 * dwarf2read.c (dw2_expand_symtabs_matching)
14382 (dw2_map_symbol_filenames, dwarf_decode_macros)
14383 (write_psymtabs_to_index): Use htab_up.
14384 * dwarf2loc.c (func_verify_no_selftailcall)
14385 (call_site_find_chain_1, func_verify_no_selftailcall)
14386 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14387 std::vector, gdb::unique_xmalloc_ptr.
14388 (call_sitep): Remove typedef.
14389 (dwarf2_locexpr_baton_eval): Remove unused variable.
14390
14391 2017-01-10 Tom Tromey <tom@tromey.com>
14392
14393 * python/python-internal.h (make_cleanup_py_decref)
14394 (make_cleanup_py_xdecref): Don't declare.
14395 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14396 (py_xdecref, make_cleanup_py_xdecref): Remove.
14397
14398 2017-01-10 Tom Tromey <tom@tromey.com>
14399
14400 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14401 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14402
14403 2017-01-10 Tom Tromey <tom@tromey.com>
14404
14405 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14406
14407 2017-01-10 Tom Tromey <tom@tromey.com>
14408
14409 * python/py-utils.c (unicode_to_encoded_string)
14410 (python_string_to_target_string)
14411 (python_string_to_target_python_string)
14412 (python_string_to_host_string, gdbpy_obj_to_string)
14413 (get_addr_from_python): Use gdbpy_ref.
14414
14415 2017-01-10 Tom Tromey <tom@tromey.com>
14416
14417 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14418 gdbpy_ref.
14419
14420 2017-01-10 Tom Tromey <tom@tromey.com>
14421
14422 * python/python.c (eval_python_command, gdbpy_decode_line)
14423 (gdbpy_run_events, gdbpy_start_type_printers)
14424 (gdbpy_apply_type_printers): Use gdbpy_ref.
14425
14426 2017-01-10 Tom Tromey <tom@tromey.com>
14427
14428 * python/py-param.c (get_doc_string, compute_enum_values): Use
14429 gdbpy_ref.
14430
14431 2017-01-10 Tom Tromey <tom@tromey.com>
14432
14433 * python/py-inferior.c (find_thread_object, build_inferior_list):
14434 Use gdbpy_ref.
14435
14436 2017-01-10 Tom Tromey <tom@tromey.com>
14437
14438 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14439
14440 2017-01-10 Tom Tromey <tom@tromey.com>
14441
14442 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14443 gdbpy_ref.
14444
14445 2017-01-10 Tom Tromey <tom@tromey.com>
14446
14447 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14448 extra incref.
14449 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14450 Use gdbpy_ref.
14451
14452 2017-01-10 Tom Tromey <tom@tromey.com>
14453
14454 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14455 gdbpy_ref.
14456
14457 2017-01-10 Tom Tromey <tom@tromey.com>
14458
14459 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14460 decref results of PyArg_ParseTupleAndKeywords.
14461
14462 2017-01-10 Tom Tromey <tom@tromey.com>
14463
14464 * python/python.c (python_run_simple_file): Use
14465 unique_xmalloc_ptr, gdbpy_ref.
14466
14467 2017-01-10 Tom Tromey <tom@tromey.com>
14468
14469 * python/py-prettyprint.c (print_stack_unless_memory_error)
14470 (print_string_repr, print_children): Use gdbpy_ref.
14471 (dummy_python_frame): New class.
14472 (dummy_python_frame::dummy_python_frame): Rename from
14473 push_dummy_python_frame.
14474 (py_restore_tstate): Remove.
14475
14476 2017-01-10 Tom Tromey <tom@tromey.com>
14477
14478 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14479
14480 2017-01-10 Tom Tromey <tom@tromey.com>
14481
14482 * python/python.c (ensure_python_env, restore_python_env):
14483 Remove.
14484 * python/python-internal.h (ensure_python_env): Don't declare.
14485 * varobj.h (varobj_ensure_python_env): Don't declare.
14486 * varobj.c (varobj_ensure_python_env): Remove.
14487
14488 2017-01-10 Tom Tromey <tom@tromey.com>
14489
14490 * varobj.c (varobj_value_get_print_value): Use
14491 gdbpy_enter_varobj.
14492
14493 2017-01-10 Tom Tromey <tom@tromey.com>
14494
14495 * python/py-prettyprint.c (print_string_repr, print_children):
14496 Update.
14497 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14498 of "encoding".
14499 * varobj.c (varobj_value_get_print_value): Update.
14500 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14501
14502 2017-01-10 Tom Tromey <tom@tromey.com>
14503
14504 * varobj.c (varobj_get_display_hint)
14505 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14506 (varobj_set_visualizer, free_variable): Use
14507 gdbpy_enter_varobj.
14508
14509 2017-01-10 Tom Tromey <tom@tromey.com>
14510
14511 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14512 (do_finish_initialization): New function. Use gdbpy_ref.
14513 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14514 do_finish_initialization.
14515
14516 2017-01-10 Tom Tromey <tom@tromey.com>
14517
14518 * python/py-param.c (get_set_value, get_show_value): Use
14519 gdbpy_enter, gdbpy_ref.
14520
14521 2017-01-10 Tom Tromey <tom@tromey.com>
14522
14523 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14524
14525 2017-01-10 Tom Tromey <tom@tromey.com>
14526
14527 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14528
14529 2017-01-10 Tom Tromey <tom@tromey.com>
14530
14531 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14532 Use gdbpy_enter_varobj.
14533
14534 2017-01-10 Tom Tromey <tom@tromey.com>
14535
14536 * varobj.c (gdbpy_enter_varobj): New constructor.
14537 * python/python-internal.h (gdbpy_enter_varobj): New class.
14538 * python/py-varobj.c (py_varobj_get_iterator): Use
14539 gdbpy_enter_varobj.
14540
14541 2017-01-10 Tom Tromey <tom@tromey.com>
14542
14543 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14544 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14545 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14546 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14547 unique_xmalloc_ptr.
14548 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14549
14550 2017-01-10 Tom Tromey <tom@tromey.com>
14551
14552 * python/py-xmethods.c (invoke_match_method): Use
14553 gdbpy_ref.
14554
14555 2017-01-10 Tom Tromey <tom@tromey.com>
14556
14557 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14558 gdbpy_enter, gdbpy_ref.
14559
14560 2017-01-10 Tom Tromey <tom@tromey.com>
14561
14562 * python/python.c (python_interactive_command): Use gdbpy_enter.
14563
14564 2017-01-10 Tom Tromey <tom@tromey.com>
14565
14566 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14567 gdbpy_ref.
14568
14569 2017-01-10 Tom Tromey <tom@tromey.com>
14570
14571 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14572 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14573
14574 2017-01-10 Tom Tromey <tom@tromey.com>
14575
14576 * utils.h (htab_deleter): New struct.
14577 (htab_up): New typedef.
14578 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14579 gdbpy_enter, gdbpy_ref, htab_up.
14580
14581 2017-01-10 Tom Tromey <tom@tromey.com>
14582
14583 * python/py-unwind.c (pending_frame_invalidate): Remove.
14584 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14585
14586 2017-01-10 Tom Tromey <tom@tromey.com>
14587
14588 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14589 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14590
14591 2017-01-10 Tom Tromey <tom@tromey.com>
14592
14593 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14594
14595 2017-01-10 Tom Tromey <tom@tromey.com>
14596
14597 * python/python.c (gdbpy_eval_from_control_command)
14598 (gdbpy_source_script, gdbpy_run_events)
14599 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14600 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14601 gdbpy_enter.
14602
14603 2017-01-10 Tom Tromey <tom@tromey.com>
14604
14605 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14606
14607 2017-01-10 Tom Tromey <tom@tromey.com>
14608
14609 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14610
14611 2017-01-10 Tom Tromey <tom@tromey.com>
14612
14613 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14614 (python_on_inferior_call_pre, python_on_inferior_call_post)
14615 (python_on_memory_change, python_on_register_change)
14616 (python_inferior_exit, python_new_objfile, add_thread_object)
14617 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14618
14619 2017-01-10 Tom Tromey <tom@tromey.com>
14620
14621 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14622 (bpfinishpy_handle_exit): Use gdbpy_enter.
14623
14624 2017-01-10 Tom Tromey <tom@tromey.com>
14625
14626 * python/py-cmd.c (cmdpy_destroyer)
14627 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14628 gdbpy_enter.
14629
14630 2017-01-10 Tom Tromey <tom@tromey.com>
14631
14632 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14633 gdbpy_enter.
14634 (gdbpy_breakpoint_has_cond): Likewise.
14635
14636 2017-01-10 Tom Tromey <tom@tromey.com>
14637
14638 * python/python.c (gdbpy_enter): New constructor.
14639 (~gdbpy_enter): New destructor.
14640 (restore_python_env, ensure_python_env): Rewrite.
14641 * python/python-internal.h (gdbpy_enter): New class.
14642
14643 2017-01-10 Tom Tromey <tom@tromey.com>
14644
14645 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14646
14647 2017-01-10 Tom Tromey <tom@tromey.com>
14648
14649 * python/py-value.c (value_has_field, get_field_flag)
14650 (get_field_type, valpy_getitem, convert_value_from_python): Use
14651 gdbpy_ref.
14652
14653 2017-01-10 Tom Tromey <tom@tromey.com>
14654
14655 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14656 gdbpy_ref.
14657
14658 2017-01-10 Tom Tromey <tom@tromey.com>
14659
14660 * python/py-prettyprint.c (search_pp_list)
14661 (find_pretty_printer_from_objfiles)
14662 (find_pretty_printer_from_progspace)
14663 (find_pretty_printer_from_gdb, find_pretty_printer)
14664 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14665 gdbpy_ref.
14666
14667 2017-01-10 Tom Tromey <tom@tromey.com>
14668
14669 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14670
14671 2017-01-10 Tom Tromey <tom@tromey.com>
14672
14673 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14674 (ltpy_get_all_source_lines): Use gdbpy_ref.
14675
14676 2017-01-10 Tom Tromey <tom@tromey.com>
14677
14678 * python/py-framefilter.c (extract_sym, extract_value)
14679 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14680 gdbpy_ref.
14681
14682 2017-01-10 Tom Tromey <tom@tromey.com>
14683
14684 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14685
14686 2017-01-10 Tom Tromey <tom@tromey.com>
14687
14688 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14689
14690 2017-01-10 Tom Tromey <tom@tromey.com>
14691
14692 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14693 gdbpy_ref.
14694
14695 2017-01-10 Tom Tromey <tom@tromey.com>
14696
14697 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14698
14699 2017-01-10 Tom Tromey <tom@tromey.com>
14700
14701 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14702 (typy_range): Use gdbpy_ref.
14703
14704 2017-01-10 Tom Tromey <tom@tromey.com>
14705
14706 * python/py-threadevent.c (create_thread_event_object): Use
14707 gdbpy_ref.
14708 * python/py-stopevent.c (create_stop_event_object): Simplify.
14709 (emit_stop_event): Use gdbpy_ref.
14710 * python/py-signalevent.c (create_signal_event_object): Use
14711 gdbpy_ref.
14712 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14713 (emit_new_objfile_event, create_clear_objfiles_event_object)
14714 (emit_clear_objfiles_event): Use gdbpy_ref.
14715 * python/py-infevents.c (create_inferior_call_event_object)
14716 (create_register_changed_event_object)
14717 (create_memory_changed_event_object, emit_inferior_call_event)
14718 (emit_memory_changed_event, emit_register_changed_event): Use
14719 gdbpy_ref.
14720 * python/py-exitedevent.c (create_exited_event_object)
14721 (emit_exited_event): Use gdbpy_ref.
14722 * python/py-event.h (evpy_emit_event): Remove
14723 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14724 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14725 * python/py-continueevent.c (emit_continue_event): Use
14726 gdbpy_ref.
14727 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14728 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14729 gdbpy_ref.
14730 * python/py-bpevent.c (create_breakpoint_event_object): Use
14731 gdbpy_ref.
14732
14733 2017-01-10 Tom Tromey <tom@tromey.com>
14734
14735 * python/py-ref.h: New file.
14736
14737 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14738
14739 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14740 void.
14741 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14742 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14743 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14744 * ui-out.c (ui_out::redirect): Likewise.
14745 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14746 * cli/cli-logging.c (set_logging_redirect): Update call site of
14747 ui_out::redirect.
14748 (handle_redirections): Likewise.
14749 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14750 * top.c (execute_command_to_string): Likewise.
14751 * utils.c (do_ui_out_redirect_pop): Likewise.
14752
14753 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14754
14755 * stack.c (_initialize_stack): Update "frame" command help message.
14756
14757 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14758
14759 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14760
14761 2017-01-06 Yao Qi <yao.qi@linaro.org>
14762
14763 * x86-linux-nat.h: Include gdb_proc_service.h.
14764
14765 2017-01-06 Yao Qi <yao.qi@linaro.org>
14766
14767 * ser-base.h: Include serial.h.
14768
14769 2017-01-06 Yao Qi <yao.qi@linaro.org>
14770
14771 * ppc-linux-tdep.h: Include ppc-tdep.h.
14772
14773 2017-01-06 Yao Qi <yao.qi@linaro.org>
14774
14775 * nat/amd64-linux-siginfo.h: Include signal.h.
14776
14777 2017-01-06 Yao Qi <yao.qi@linaro.org>
14778
14779 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14780
14781 2017-01-06 Yao Qi <yao.qi@linaro.org>
14782
14783 * mi/mi-parse.h: Include mi-cmds.h.
14784
14785 2017-01-06 Yao Qi <yao.qi@linaro.org>
14786
14787 * inf-loop.c: Don't include "target.h".
14788 * inf-loop.h: Include it here.
14789
14790 2017-01-06 Yao Qi <yao.qi@linaro.org>
14791
14792 * dfp.h: Include "dboulest.h" and "expression.h".
14793
14794 2017-01-06 Yao Qi <yao.qi@linaro.org>
14795
14796 * ax-gdb.h: Include "ax.h".
14797
14798 2017-01-06 Yao Qi <yao.qi@linaro.org>
14799
14800 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14801 with nat/gdb_ptrace.h.
14802
14803 2017-01-05 Yao Qi <yao.qi@linaro.org>
14804
14805 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14806 new line.
14807 (mips64_fbsd_sigframe_init): Likewise.
14808
14809 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14810
14811 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14812 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14813
14814 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14815
14816 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14817 * NEWS: Mention new FreeBSD/mips native configuration.
14818 * config/mips/fbsd.mh: New file.
14819 * configure.host: Add mips*-*-freebsd*.
14820 * mips-fbsd-nat.c: New file.
14821
14822 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14823
14824 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14825 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14826 * NEWS: Mention new FreeBSD/mips target.
14827 * configure.tgt: Add mips*-*-freebsd*.
14828 * mips-fbsd-tdep.c: New file.
14829 * mips-fbsd-tdep.h: New file.
14830
14831 2017-01-04 Yao Qi <yao.qi@linaro.org>
14832
14833 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14834 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14835
14836 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14837
14838 Update copyright year range in all GDB files.
14839
14840 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14841
14842 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14843
14844 For older changes see ChangeLog-2016.
14845 \f
14846 Local Variables:
14847 mode: change-log
14848 left-margin: 8
14849 fill-column: 74
14850 version-control: never
14851 coding: utf-8
14852 End:
This page took 0.563324 seconds and 4 git commands to generate.