Add set_repeat_arguments function
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-07 Tom Tromey <tom@tromey.com>
2
3 * printcmd.c (x_command): Call set_repeat_arguments.
4 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
5 * top.c (repeat_arguments): New global.
6 (set_repeat_arguments): New function.
7 (execute_command): Handle repeat_arguments.
8 (show_commands): Calls set_repeat_arguments.
9 * command.h (set_repeat_arguments): Declare.
10
11 2017-11-07 Tom Tromey <tom@tromey.com>
12
13 * stack.c (backtrace_command): Use std::string.
14 (backtrace_command_1): Make "count_exp" const.
15
16 2017-11-07 Tom Tromey <tom@tromey.com>
17
18 * source.c (directory_switch, mod_path, add_path): Constify.
19 * defs.h (add_path, mod_path, directory_switch): Constify.
20 * mi/mi-cmd-env.c (env_mod_path): Constify.
21
22 2017-11-07 Tom Tromey <tom@tromey.com>
23
24 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
25 (run_command_1, continue_command, step_1, jump_command)
26 (signal_command, until_command, advance_command, finish_command)
27 (attach_command): Update.
28
29 2017-11-07 Tom Tromey <tom@tromey.com>
30
31 * command.h (set_cmd_cfunc): Don't declare.
32 * cli/cli-decode.c (set_cmd_cfunc): Now static.
33
34 2017-11-07 Tom Tromey <tom@tromey.com>
35
36 * stack.c (select_frame_command): Constify.
37 * cli/cli-decode.c (add_com_suppress_notification): Constify.
38 * command.h (add_com_suppress_notification): Constify.
39
40 2017-11-07 Tom Tromey <tom@tromey.com>
41
42 * breakpoint.c (stop_command): Constify.
43 * cli/cli-decode.c (struct cmd_list_element): Constify.
44 * command.h (add_abbrev_prefix_cmd): Constify.
45
46 2017-11-07 Pedro Alves <palves@redhat.com>
47
48 * breakpoint.c (extract_bp_kind): New enum.
49 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
50 factored out from ...
51 (extract_bp_number_and_location): ... here.
52 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
53
54 2017-11-07 Pedro Alves <palves@redhat.com>
55
56 * breakpoint.c (extract_bp_number_and_location): Change return
57 type to void. Throw error instead of warning.
58 (enable_disable_command): Adjust.
59
60 2017-11-07 Xavier Roirand <roirand@adacore.com>
61 Pedro Alves <palves@redhat.com>
62
63 * breakpoint.c (map_breakpoint_number_range): New, factored out
64 from ...
65 (map_breakpoint_numbers): ... here.
66 (find_location_by_number): Change parameters from string to
67 breakpoint number and location.
68 (extract_bp_number_and_location): New function.
69 (enable_disable_bp_num_loc)
70 (enable_disable_breakpoint_location_range)
71 (enable_disable_command): New functions, factored out ...
72 (enable_command, disable_command): ... these functions, and
73 adjusted to support ranges.
74 * NEWS: Document enable/disable breakpoint location range feature.
75
76 2017-11-06 Luis Machado <luis.machado@linaro.org>
77
78 * MAINTAINERS (Write After Approval): Update my e-mail address.
79
80 2017-11-06 Pedro Alves <palves@redhat.com>
81
82 * gnu-nat.c (gnu_terminal_init): Delete.
83 (gnu_target): Don't install gnu_terminal_init.
84 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
85 (child_terminal_init): ... this function.
86
87 2017-11-06 Pedro Alves <palves@redhat.com>
88
89 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
90 sgtty.h.
91 * config.in, configure: Regenerate.
92
93 2017-11-06 Pedro Alves <palves@redhat.com>
94
95 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
96 (async_init_signals): Adjust.
97 (handle_stop_sig): Rename to ...
98 (handle_sigtstp): ... this.
99 (async_stop_sig): Rename to ...
100 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
101 SIGTSTP path.
102 * event-top.h: Move signal.h include to the top. Check SIGTSTP
103 instead of STOP_SIGNAL thoughout.
104 (handle_stop_sig): Rename to ...
105 (handle_sigtstp): ... this.
106 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
107
108 2017-11-06 Pedro Alves <palves@redhat.com>
109
110 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
111 longer set flags twice in row.
112
113 2017-11-06 Pedro Alves <palves@redhat.com>
114
115 * Makefile.in (SER_HARDWIRE): Update comment.
116 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
117 * common/gdb_termios.h: Delete file.
118 * common/job-control.c: Include termios.h and unistd.h instead of
119 gdb_termios.h.
120 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
121 check.
122 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
123 Remove sgtty code.
124 * configure.ac: No longer check for termio.h and sgtty.h.
125 * configure: Regenerate.
126 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
127 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
128 Replace PROCESS_GROUP_TYPE references with pid_t references
129 throughout.
130 (gdb_getpgrp): Delete.
131 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
132 (child_terminal_inferior): Remove comment. Remove sgtty code.
133 (child_terminal_ours_1): Use tcgetpgrp directly instead of
134 gdb_getpgrp. Use serial_set_tty_state instead aof
135 serial_noflush_set_tty_state. Remove sgtty code.
136 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
137 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
138 (inferior_process_group): Now returns pid_t.
139 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
140 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
141 * ser-event.c (serial_event_ops): Update.
142 * ser-go32.c (dos_noflush_set_tty_state): Delete.
143 (dos_ops): Update.
144 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
145 * ser-pipe.c (pipe_ops): Update.
146 * ser-tcp.c (tcp_ops): Update.
147 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
148 HAVE_TERMIOS checks.
149 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
150 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
151 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
152 assume termios.
153 (hardwire_noflush_set_tty_state): Delete.
154 (hardwire_print_tty_state, hardwire_drain_output)
155 (hardwire_flush_output, hardwire_flush_input)
156 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
157 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
158 code, and assume termios.
159 (hardwire_ops): Update.
160 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
161 * serial.c (serial_noflush_set_tty_state): Delete.
162 * serial.h (serial_noflush_set_tty_state): Delete.
163 (serial_ops::noflush_set_tty_state): Delete.
164
165 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
166
167 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
168 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
169 (COMMON_OBS): Remove doublest.o and dfp.o.
170 Do not build target-float.c (instead of doublest.c)
171 with -Wformat-nonliteral.
172
173 * doublest.c: Remove file.
174 * doublest.h: Remove file.
175 * dfp.c: Remove file.
176 * dfp.h: Remove file.
177
178 * target-float.c: Do not include "doublest.h" and "dfp.h".
179 (DOUBLEST): Move here from doublest.h.
180 (enum float_kind): Likewise.
181 (FLOATFORMAT_CHAR_BIT): Likewise.
182 (FLOATFORMAT_LARGEST_BYTES): Likewise.
183 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
184 (floatformat_precision): Likewise.
185 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
186 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
187 Likewise.
188 (host_float_format, host_double_format, host_long_double_format):
189 Likewise.
190 (floatformat_to_string, floatformat_from_string): Likewise.
191 (floatformat_to_doublest): Likewise. Also, inline the original
192 convert_floatformat_to_doublest.
193 (floatformat_from_doublest): Likewise. Also, inline the original
194 convert_floatformat_from_doublest.
195
196 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
197 (MAX_DECIMAL_STRING): Move here from dfp.c.
198 (match_endianness): Likewise.
199 (set_decnumber_context, decimal_check_errors): Likewise.
200 (decimal_from_number, decimal_to_number): Likewise.
201 (decimal_to_string, decimal_from_string): Likewise. Make static.
202 (decimal_from_longest, decimal_from_ulongest): Likewise.
203 (decimal_to_longest): Likewise.
204 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
205 (decimal_convert): Likewise.
206
207 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
208
209 * doublest.c: Do not include "gdbtypes.h".
210 (extract_typed_floating): Remove.
211 (store_typed_floating): Remove.
212 (convert_typed_floating): Remove.
213 * doublest.h (struct type): Remove.
214 (DOUBLEST_PRINT_FORMAT): Remove.
215 (DOUBLEST_SCAN_FORMAT): Remove.
216 (extract_typed_floating): Remove.
217 (store_typed_floating): Remove.
218 (convert_typed_floating): Remove.
219
220 * dfp.c (decimal_from_doublest): Remove.
221 (decimal_to_doublest): Remove.
222 * dfp.h: Do not include "doublest.h".
223 (decimal_from_doublest): Remove.
224 (decimal_to_doublest): Remove.
225
226 * value.c: Do not include "doublest.h" and "dfp.h".
227 (value_as_double): Remove.
228 (unpack_double): Remove.
229 (value_from_double): Remove.
230 (value_from_decfloat): Remove.
231 * value.h: Do not include "doublest.h".
232 (value_as_double): Remove.
233 (unpack_double): Remove.
234 (value_from_double): Remove.
235 (value_from_decfloat): Remove.
236
237 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
238
239 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
240 (i386_extract_return_value): Use target_float_convert.
241 (i386_store_return_value): Likewise.
242 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
243 (i387_value_to_register): Likewise.
244 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
245 (ia64_register_to_value): Use target_float_convert.
246 (ia64_value_to_register): Likewise.
247 (ia64_extract_return_value): Likewise.
248 (ia64_store_return_value): Likewise.
249 (ia64_push_dummy_call): Likewise.
250 * m68k-tdep.c: Include "target-float.h".
251 (m68k_register_to_value): Use target_float_convert.
252 (m68k_value_to_register): Likewise.
253 (m68k_svr4_extract_return_value): Likewise.
254 (m68k_svr4_store_return_value): Likewise.
255 * ppc-sysv-tdep.c: Include "target-float.h".
256 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
257 (do_ppc_sysv_return_value): Likewise.
258 (ppc64_sysv_abi_push_freg): Likewise.
259 (ppc64_sysv_abi_return_value_base): Likewise.
260 * rs6000-aix-tdep.c: Include "target-float.h".
261 (rs6000_push_dummy_call): Use target_float_convert.
262 (rs6000_return_value): Likewise.
263 * rs6000-lynx178-tdep.c: Include "target-float.h".
264 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
265 (rs6000_lynx178_return_value): Likewise.
266 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
267 (rs6000_register_to_value): Use target_float_convert.
268 (rs6000_value_to_register): Likewise.
269 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
270 (arm_extract_return_value): Use target_float_convert.
271 (arm_store_return_value): Likewise.
272 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
273 (sh_register_convert_to_virtual): Use target_float_convert.
274 (sh_register_convert_to_raw): Likewise.
275 * sh64-tdep.c: Include "target-float.h".
276 (sh64_extract_return_value): Use target_float_convert.
277 (sh64_register_convert_to_virtual): Likewise.
278 (sh64_register_convert_to_raw): Likewise. Fix argument types.
279
280 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
281
282 * target-float.c (floatformat_to_host_double): New function.
283 (floatformat_from_host_double): Likewise.
284 (target_float_to_host_double): Likewise.
285 (target_float_from_host_double): Likewise.
286 * target-float.h (target_float_to_host_double): Add prototype.
287 (target_float_from_host_double): Likewise.
288
289 * guile/scm-value.c: Include "target-float.h".
290 (gdbscm_value_to_real): Use target_float_to_host_double.
291 Handle integer source values via value_as_long.
292 * guile/scm-math.c: Include "target-float.h". Do not include
293 "doublest.h", "dfp.h", and "expression.h".
294 (vlscm_convert_typed_number): Use target_float_from_host_double.
295 (vlscm_convert_number): Likewise.
296
297 * python/py-value.c (valpy_float): Use target_float_to_host_double.
298 (convert_value_from_python): Use target_float_from_host_double.
299
300 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
301
302 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
303 (cast_from_fixed): Likewise.
304 (ada_scaling_type): New function.
305 (ada_delta): Return value instead of DOUBLEST. Perform target
306 arithmetic instead of host arithmetic.
307 (scaling_factor): Rename to ...
308 (ada_scaling_factor) ... this. Make non-static. Return value instead
309 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
310 (ada_fixed_to_float): Remove.
311 (ada_float_to_fixed): Remove.
312 * ada-lang.h (ada_fixed_to_float): Remove.
313 (ada_float_to_fixed): Remove.
314 (ada_delta): Return value instead of DOUBLEST.
315 (ada_scaling_factor): Add prototype.
316
317 * ada-typeprint.c: Include "target-float.h".
318 (print_fixed_point_type): Perform target arithmetic instead of
319 host arithmetic.
320 * ada-valprint.c: Include "target-float.h".
321 (ada_val_print_num): Perform target arithmetic instead of
322 host arithmetic for fixed-point types.
323
324 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
325
326 * target-float.c: Include <math.h>.
327 (floatformat_binop): New function.
328 (floatformat_compare): Likewise.
329 (target_float_binop): Likewise.
330 (target_float_compare): Likewise.
331 * target-float.h: Include "expression.h".
332 (target_float_binop): Add prototype.
333 (target_float_compare): Likewise.
334
335 * valarith.c: Do not include "doublest.h" and "dfp.h".
336 Include "common/byte-vector.h".
337 (value_args_as_decimal): Remove, replace by ...
338 (value_args_as_target_float): ... this function. Handle both
339 binary and decimal target floating-point formats.
340 (scalar_binop): Handle both binary and decimal FP using
341 value_args_as_target_float and target_float_binop.
342 (value_equal): Handle both binary and decimal FP using
343 value_args_as_target_float and target_float_compare.
344 (value_less): Likewise.
345 (value_pos): Handle all scalar types as simple copy.
346 (value_neg): Handle all scalar types via BINOP_SUB from 0.
347 * dfp.c (decimal_binop): Throw error instead of internal_error
348 when called with an unsupported operation code.
349
350 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
351
352 * target-float.c (target_float_to_string): New function.
353 (target_float_from_string): New function.
354 * target-float.h (target_float_to_string): Add prototype.
355 (target_float_from_string): Add prototype.
356
357 * valprint.c: Include "target-float.h". Do not include
358 "doublest.h" and "dfp.h".
359 (print_floating): Use target_float_to_string.
360 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
361 (printf_floating): Use target_float_to_string.
362 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
363 (print_i387_value): Use target_float_to_string.
364 * mips-tdep.c: Include "target-float.h".
365 (mips_print_fp_register): Use target_float_to_string.
366 * sh64-tdep.c: Include "target-float.h".
367 (sh64_do_fp_register): Use target_float_to_string.
368
369 * parse.c: Include "target-float.h". Do not include
370 "doublest.h" and "dfp.h".
371 (parse_float): Use target_float_from_string.
372 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
373 (define_symbol): Use target_float_from_string.
374 * gdbarch-selftests.c: Include "target-float.h".
375 (register_to_value_test): Use target_float_from_string.
376
377 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
378
379 * Makefile.c (SFILES): Add target-float.c.
380 (HFILES_NO_SRCDIR): Add target-float.h.
381 (COMMON_OBS): Add target-float.o.
382 * target-float.h: New file.
383 * target-float.c: New file.
384
385 * doublest.c (floatformat_classify): Fix detection of float_zero.
386
387 * gdbtypes.c (is_floating_type): New function.
388 * gdbtypes.h (is_floating_type): Add prototype.
389
390 * value.c: Do not include "floatformat.h".
391 (unpack_double): Use target_float_is_valid.
392 (is_floating_value): New function.
393 * value.h (is_floating_value): Add prototype-
394
395 * valarith.c: Include "target-float.h".
396 (value_logical_not): Use target_float_is_zero.
397
398 * python/py-value.c: Include "target-float.h".
399 (valpy_nonzero): Use target_float_is_zero.
400
401 2017-11-04 Tom Tromey <tom@tromey.com>
402
403 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
404
405 2017-11-04 Tom Tromey <tom@tromey.com>
406
407 * breakpoint.c (set_momentary_breakpoint): Return
408 breakpoint_up.
409 (until_break_command): Update.
410 (new_until_break_fsm): Change argument types to
411 breakpoint_up.
412 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
413 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
414 Remove.
415 * infcmd.c (finish_forward): Update.
416 * breakpoint.h (set_momentary_breakpoint)
417 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
418 (make_cleanup_delete_breakpoint): Remove.
419 (struct breakpoint_deleter): New.
420 (breakpoint_up): New typedef.
421 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
422 (insert_exception_resume_breakpoint): Update.
423 (insert_exception_resume_from_probe): Update.
424 (insert_longjmp_resume_breakpoint): Update.
425 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
426 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
427 * infcall.c (call_function_by_hand_dummy): Update
428
429 2017-11-04 Tom Tromey <tom@tromey.com>
430
431 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
432
433 2017-11-04 Tom Tromey <tom@tromey.com>
434
435 * linux-tdep.c (linux_core_info_proc_mappings): Use
436 gdb::def_vector.
437 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
438 "size" argument.
439 (linux_corefile_thread): Update.
440 (linux_make_corefile_notes): Remove unused variable.
441
442 2017-11-04 Tom Tromey <tom@tromey.com>
443
444 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
445 gdb::byte_vector.
446
447 2017-11-04 Tom Tromey <tom@tromey.com>
448
449 * objfiles.c (do_free_objfile_cleanup): Remove.
450 * compile/compile-object-load.c (compile_object_load): Update.
451 * objfiles.h (make_cleanup_free_objfile): Remove.
452
453 2017-11-04 Tom Tromey <tom@tromey.com>
454
455 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
456 (adi_read_versions): Change "tags" to "gdb_byte *".
457 (adi_print_versions): Likewise.
458
459 2017-11-04 Tom Tromey <tom@tromey.com>
460
461 * breakpoint.c
462 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
463 from start_rbreak_breakpoints.
464 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
465 * breakpoint.h (class scoped_rbreak_breakpoints): New.
466 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
467 * symtab.c (do_end_rbreak_breakpoints): Remove.
468 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
469
470 2017-11-04 Tom Tromey <tom@tromey.com>
471
472 * cp-namespace.c (reset_directive_searched): Remove.
473 (cp_lookup_symbol_via_imports): Use scoped_restore.
474 * cp-support.c (reset_directive_searched): Remove.
475 (make_symbol_overload_list_using): Use scoped_restore.
476 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
477 (reset_directive_searched): Remove.
478
479 2017-11-04 Tom Tromey <tom@tromey.com>
480
481 * symfile.c (find_separate_debug_file_by_debuglink): Use
482 unique_xmalloc_ptr.
483
484 2017-11-04 Tom Tromey <tom@tromey.com>
485
486 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
487 type of "info".
488 (compute_stack_depth): Likewise.
489 (do_compile_dwarf_expr_to_c): Use std::vector.
490
491 2017-11-04 Tom Tromey <tom@tromey.com>
492
493 * compile/compile-object-load.c (link_callbacks_einfo): Use
494 std::string.
495
496 2017-11-04 Tom Tromey <tom@tromey.com>
497
498 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
499 Use scoped_free_pendings.
500 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
501 scoped_free_pendings.
502 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
503 (xcoff_initial_scan): Likewise.
504 * buildsym.c (reset_symtab_globals): Update comment.
505 (scoped_free_pendings): Rename from really_free_pendings.
506 (prepare_for_building): Update comment.
507 (buildsym_init): Likewise.
508 * buildsym.h (class scoped_free_pendings): New class.
509 (really_free_pendings): Don't declare.
510
511 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
512
513 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
514 output when converting a zero value to a special byteorder format.
515
516 2017-11-02 Yao Qi <yao.qi@linaro.org>
517
518 * frame.c (do_frame_register_read): Remove aspace.
519 * jit.c (jit_frame_sniffer): Likwise.
520 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
521 * regcache.c (regcache::regcache): Pass nullptr.
522 (regcache_print): Caller updated.
523 * regcache.h (regcache::regcache): Remove one constructor
524 parameter aspace.
525
526 2017-11-02 Yao Qi <yao.qi@linaro.org>
527
528 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
529
530 2017-11-02 Yao Qi <yao.qi@linaro.org>
531
532 * breakpoint.c (insert_single_step_breakpoints): Update.
533 * frame.c (struct frame_info) <aspace>: Add const.
534 (frame_save_as_regcache): Add const.
535 (get_frame_address_space): Return const address_space *.
536 * frame.h (get_frame_address_space): Update declaration.
537 * infrun.c (struct step_over_info) <aspace>: Add const.
538 (set_step_over_info): Make aspace const.
539 (displaced_step_prepare_throw): Change variable const.
540 (resume): Likewise.
541 (proceed): Likewise.
542 (adjust_pc_after_break): Likewise.
543 (save_waitstatus): Likewise.
544 (handle_signal_stop): Likewise.
545 (keep_going_pass_signal): Likewise.
546 * jit.c (jit_frame_sniffer): Add const.
547 * mips-tdep.c (mips_single_step_through_delay): Likewise.
548 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
549 * record-full.c (record_full_wait_1): Likewise.
550 * regcache.c (regcache::regcache): Change parameter to const.
551 * regcache.h (regcache::regcache): Likewise.
552 (regcache::aspace): Return const address_space *.
553 (regcache) <m_aspace>: Add const.
554
555 2017-11-02 Yao Qi <yao.qi@linaro.org>
556
557 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
558 * frame.c (create_sentinel_frame): Likewise.
559 * infrun.c (displaced_step_prepare_throw): Likewise.
560 (resume): Likewise.
561 (thread_still_needs_step_over_bp): Likewise.
562 (proceed): Likewise.
563 (do_target_wait): Likewise.
564 (adjust_pc_after_break): Likewise.
565 (handle_syscall_event): Likewise.
566 (save_waitstatus): Likewise.
567 (handle_inferior_event_1): Likewise.
568 (handle_signal_stop): Likewise.
569 (keep_going_pass_signal): Likewise.
570 * linux-nat.c (status_callback): Likewise.
571 (save_stop_reason): Likewise.
572 (resume_stopped_resumed_lwps): Likewise.
573 * record-full.c (record_full_exec_insn): Likewise.
574 (record_full_wait_1): Likewise.
575 * regcache.c (get_regcache_aspace): Remove.
576 * regcache.h (get_regcache_aspace): Remove.
577
578 2017-11-02 Yao Qi <yao.qi@linaro.org>
579
580 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
581 (init_regcache_descr): Use gdbarch_num_regs.
582 (regcache::regcache): Likewise.
583 (regcache::get_register_status): Likewise.
584 (regcache::assert_raw_regnum): Likewise.
585 (regcache::cooked_read): Likewise.
586 (regcache::cooked_read_value): Likewise.
587 (regcache::cooked_write): Likewise.
588 (regcache::dump): Likewise.
589 (regcache::num_raw_registers): New method.
590 * regcache.h (class regcache) <num_raw_registers>: New.
591
592 2017-11-02 Yao Qi <yao.qi@linaro.org>
593
594 * regcache.c (regcache::assert_regnum): New method.
595 (regcache::invalidate): Call assert_regnum.
596 (regcache::raw_update): Likewise.
597 (regcache::raw_write): Likewise.
598 (regcache::raw_read_part): Likewise.
599 (regcache::raw_write_part): Likewise.
600 (regcache::raw_supply): Likewise.
601 (regcache::raw_supply_integer): Likewise.
602 (regcache::raw_supply_zeroed): Likewise.
603 (regcache::raw_collect): Likewise.
604 (regcache::raw_collect_integer): Likewise.
605 * regcache.h (regcache::assert_regnum): Declare.
606
607 2017-11-02 Yao Qi <yao.qi@linaro.org>
608
609 * regcache.c (regcache::dump): Remove code.
610
611 2017-11-02 Yao Qi <yao.qi@linaro.org>
612
613 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
614 Remove.
615 <sizeof_cooked_register_status>: Remove.
616 (init_regcache_descr): Update.
617 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
618 (regcache::save): Likewise.
619 (regcache::dump): Likewise.
620
621 2017-11-01 James Bowman <james.bowman@ftdichip.com>
622
623 * ft32-tdep.c (ft32_fetch_instruction): New function.
624 (ft32_analyze_prologue): Use ft32_fetch_instruction().
625
626 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
627
628 * cli/cli-script.c (execute_control_command): Rename to ...
629 (execute_control_command_1): ... this.
630 (execute_control_command): New function.
631
632 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
633
634 * tracepoint.c (tfind_command): Remove const_cast.
635
636 2017-10-30 Mike Gulick <mgulick@mathworks.com>
637
638 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
639
640 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
641
642 * common/common-utils.h (in_inclusive_range): New function.
643 * arm-tdep.c (arm_record_extension_space): Use
644 in_inclusive_range.
645 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
646 * cris-tdep.c (cris_spec_reg_applicable): Use
647 in_inclusive_range.
648
649 2017-10-30 Pedro Alves <palves@redhat.com>
650 Simon Marchi <simon.marchi@ericsson.com>
651
652 * remote.c (remote_set_syscall_catchpoint): Build a std::string
653 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
654
655 2017-10-30 Pedro Alves <palves@redhat.com>
656
657 * common/common-utils.c (string_appendf, string_vappendf): New
658 functions.
659 * common/common-utils.h (string_appendf, string_vappendf): New
660 declarations.
661 * unittests/common-utils-selftests.c (string_appendf_func)
662 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
663 (string_vappendf_tests): New functions.
664 (_initialize_common_utils_selftests): Register "string_appendf" and
665 "string_vappendf tests".
666
667 2017-10-30 Pedro Alves <palves@redhat.com>
668
669 * unittests/common-utils-selftests.c (format_func): New typedef.
670 (string_printf_tests, string_vprintf_tests): Tests factored out
671 and merged to ...
672 (test_format_func): ... this new function.
673 (string_printf_tests, string_vprintf_tests): Reimplement on top of
674 test_format_func.
675
676 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
677
678 * darwin-nat.c: Remove include of gdb.h.
679
680 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
681
682 * xtensa-xtregs.c: Fix formatting issues.
683
684 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
685
686 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
687
688 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
689
690 PR python/21213
691 * python/py-infthread.c (thpy_get_inferior): Increment reference
692 of inferior before returning it.
693
694 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
695
696 * unittests/common-utils-selftests.c (format): Add
697 ATTRIBUTE_PRINTF.
698
699 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * xml-syscall.c (struct syscall_desc): Add constructor.
702 <name>: Change type to std::string.
703 (syscall_desc_up): New typedef.
704 (syscall_desc_p): Remove typeder.
705 (DEF_VEC_P(syscall_desc_p)): Remove.
706 (struct syscall_group_desc): Add constructor.
707 <name>: Change type to std::string.
708 <syscalls>: Change type to std::vector.
709 (syscall_group_desc_up): New typedef.
710 (syscall_group_desc_p): Remove typedef.
711 (DEF_VEC_P(syscall_group_desc_p)): Remove.
712 (struct syscalls_info) <syscalls>: Change type to std::vector of
713 unique_ptr.
714 <groups>: Likewise.
715 <my_gdb_datadir>: Change type to std::string.
716 (syscalls_info_up): New typedef.
717 (allocate_syscalls_info): Remove.
718 (syscalls_info_free_syscalls_desc): Remove.
719 (syscalls_info_free_syscall_group_desc): Remove.
720 (free_syscalls_info): Remove.
721 (make_cleanup_free_syscalls_info): Remove.
722 (syscall_group_create_syscall_group_desc): Adjust.
723 (syscall_group_add_syscall): Adjust.
724 (syscall_create_syscall_desc): Adjust.
725 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
726 (init_syscalls_info): Adjust.
727 (syscall_group_get_group_by_name): Adjust.
728 (xml_get_syscall_number): Adjust.
729 (xml_get_syscall_name): Adjust.
730 (xml_list_of_syscalls): Adjust.
731 (xml_list_syscalls_by_group): Adjust.
732 (xml_list_of_groups): Adjust.
733
734 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
735
736 * probe.h: Don't include gdb_vecs.h.
737 (DEF_VEC_P (probe_p)): Remove.
738 (find_probes_in_objfile): Return an std::vector.
739 * probe.c (find_probes_in_objfile): Likewise.
740 * breakpoint.c (breakpoint_objfile_data)
741 <longjmp_probes>: Change type to std::vector.
742 <exception_probes>: Likewise.
743 (free_breakpoint_probes): Don't manually free vectors.
744 (create_longjmp_master_breakpoint): Adjust.
745 (create_exception_master_breakpoint): Adjust.
746 * solib-svr4.c (svr4_create_probe_breakpoints): Change
747 parameter type, adjust.
748 (svr4_create_solib_event_breakpoints): Adjust.
749
750 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
751
752 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
753 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
754 with new.
755 (free_breakpoint_probes): Rename to ...
756 (free_breakpoint_objfile_data): ... this, and call delete on
757 bp_objfile_data..
758
759 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
762 (loaded_script_ptr): Remove typedef.
763 (DEF_VEC_P (loaded_script_ptr)): Remove.
764 (struct collect_matching_scripts_data): Add constructor.
765 <scripts_p>: Change type to (pointer to) std::vector.
766 (collect_matching_scripts_data): Adjust.
767 (sort_scripts_by_name): Make suitable for std::sort.
768 (print_scripts): Don't sort vector, adjust to std::vector.
769 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
770
771 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
772
773 * symfile.c (filename_language): Make struct, not typedef. Add
774 constructor.
775 <ext>: Change type to std::string.
776 (DEF_VEC_O (filename_language)): Remove.
777 (filename_language_table): Change type to std::vector.
778 (add_filename_language): Adjust.
779 (set_ext_lang_command): Adjust.
780 (info_ext_lang_command): Adjust.
781 (deduce_language_from_filename): Adjust.
782 (class scoped_restore_filename_language_table): Remove.
783 (test_filename_language): Use scoped_restore.
784 (test_set_ext_lang_command): Use scoped_restore, adjust to
785 std::vector change.
786
787 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
788
789 * symfile.c: Include selftest.h.
790 (class scoped_restore_filename_language_table): New.
791 (test_filename_language): New test.
792 (test_set_ext_lang_command): New test.
793 (_initialize_symfile): Register tests.
794
795 2017-10-27 Keith Seitz <keiths@redhat.com>
796
797 * breakpoint.c (print_breakpoint_location): Use the symbol saved
798 in the bp_location, falling back to find_pc_sect_function when
799 needed.
800 (add_location_to_breakpoint): Save sal->symbol.
801 * breakpoint.h (struct bp_location) <symbol>: New field.
802 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
803 * symtab.h (struct symtab_and_line) <symbol>: New field.
804
805 2017-10-26 Patrick Frants <osscontribute@gmail.com>
806
807 PR gdb/13669
808 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
809 to rewind obstack.
810
811 2017-10-26 Pedro Alves <palves@redhat.com>
812
813 * remote.c (remote_async_terminal_ours_p): Delete.
814 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
815 Remove references to 'remote_async_terminal_ours_p'.
816
817 2017-10-26 Yao Qi <yao.qi@linaro.org>
818
819 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
820
821 2017-10-26 Yao Qi <yao.qi@linaro.org>
822
823 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
824 aspace const.
825 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
826 Likewise.
827 * breakpoint.c (bpstat_check_location): Remove cast.
828 (breakpoint_hit_catch_fork): Make aspce const.
829 (breakpoint_hit_catch_solib): Likewise.
830 (breakpoint_hit_catch_exec): Likewise.
831 (breakpoint_hit_ranged_breakpoint): Likewise.
832 (breakpoint_hit_watchpoint): Likewise.
833 (base_breakpoint_breakpoint_hit): Likewise.
834 (bkpt_breakpoint_hit): Likewise.
835 (dprintf_breakpoint_hit): Likewise.
836 (tracepoint_breakpoint_hit): Likewise.
837 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
838
839 2017-10-26 Yao Qi <yao.qi@linaro.org>
840
841 * breakpoint.c (breakpoint_location_address_match): Change
842 "struct address_space *" to "const address_space".
843 (breakpoint_location_address_range_overlap): Likewise.
844 (breakpoint_here_p): Likewise.
845 (breakpoint_in_range_p): Likewise.
846 (moribund_breakpoint_here_p): Likewise.
847 (bp_location_inserted_here_p): Likewise.
848 (software_breakpoint_inserted_here_p): Likewise.
849 (hardware_breakpoint_inserted_here_p): Likewise.
850 (hardware_watchpoint_inserted_in_range): Likewise.
851 (bpstat_check_location): Likewise.
852 (bpstat_stop_status): Likewise.
853 (breakpoint_address_match): Likewise.
854 (breakpoint_address_match_range): Likewise.
855 (breakpoint_location_address_match): Likewise.
856 (breakpoint_location_address_range_overlap): Likewise.
857 (insert_single_step_breakpoint): Likewise.
858 (breakpoint_has_location_inserted_here): Likewise.
859 (single_step_breakpoint_inserted_here_p): Likewise.
860 (pc_at_non_inline_function): Likewise.
861 * breakpoint.h (bpstat_stop_status): Update declaration.
862 (breakpoint_here_p): Likewise.
863 (breakpoint_in_range_p): Likewise.
864 (moribund_breakpoint_here_p): Likewise.
865 (breakpoint_inserted_here_p): Likewise.
866 (software_breakpoint_inserted_here_p): Likewise.
867 (hardware_breakpoint_inserted_here_p): Likewise.
868 (breakpoint_has_location_inserted_here): Likewise.
869 (single_step_breakpoint_inserted_here_p): Likewise.
870 (hardware_watchpoint_inserted_in_range): Likewise.
871 (breakpoint_address_match): Likewise.
872 (insert_single_step_breakpoint): Likewise.
873 (pc_at_non_inline_function): Likewise.
874 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
875 * record.c (record_check_stopped_by_breakpoint): Likewise.
876 * record.h (record_check_stopped_by_breakpoint): Likewise.
877 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
878
879 2017-10-25 Yao Qi <yao.qi@linaro.org>
880
881 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
882 regcache->arch () instead get_regcache_arch.
883 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
884 Likewise.
885 (aarch64_fbsd_store_inferior_registers): Likewise.
886 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
887 (store_gregs_to_thread): Likewise.
888 (fetch_fpregs_from_thread): Likewise.
889 (store_fpregs_to_thread): Likewise.
890 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
891 (aarch64_store_return_value): Likewise.
892 (aarch64_software_single_step): Likewise.
893 * aix-thread.c (aix_thread_wait): Likewise.
894 (supply_reg32): Likewise.
895 (supply_sprs64): Likewise.
896 (supply_sprs32): Likewise.
897 (fill_gprs64): Likewise.
898 (fill_gprs32): Likewise.
899 (fill_sprs64): Likewise.
900 (fill_sprs32): Likewise.
901 (store_regs_user_thread): Likewise.
902 (store_regs_kernel_thread): Likewise.
903 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
904 (alphabsd_store_inferior_registers): Likewise.
905 * alpha-tdep.c (alpha_extract_return_value): Likewise.
906 (alpha_store_return_value): Likewise.
907 (alpha_deal_with_atomic_sequence): Likewise.
908 (alpha_next_pc): Likewise.
909 (alpha_software_single_step): Likewise.
910 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
911 (amd64bsd_store_inferior_registers): Likewise.
912 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
913 Likewise.
914 (amd64_linux_store_inferior_registers): Likewise.
915 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
916 (amd64_collect_native_gregset): Likewise.
917 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
918 (amd64obsd_collect_uthread): Likewise.
919 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
920 (amd64_collect_fpregset): Likewise.
921 (amd64_supply_fxsave): Likewise.
922 (amd64_supply_xsave): Likewise.
923 (amd64_collect_fxsave): Likewise.
924 (amd64_collect_xsave): Likewise.
925 * arc-tdep.c (arc_write_pc): Likewise.
926 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
927 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
928 (arm_fbsd_store_inferior_registers): Likewise.
929 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
930 (store_vfp_regs): Likewise.
931 (arm_linux_fetch_inferior_registers): Likewise.
932 (arm_linux_store_inferior_registers): Likewise.
933 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
934 (arm_linux_sigreturn_next_pc): Likewise.
935 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
936 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
937 (fetch_register): Likewise.
938 (store_register): Likewise.
939 * arm-tdep.c (arm_is_thumb): Likewise.
940 (displaced_in_arm_mode): Likewise.
941 (bx_write_pc): Likewise.
942 (arm_get_next_pcs_addr_bits_remove): Likewise.
943 (arm_software_single_step): Likewise.
944 (arm_extract_return_value): Likewise.
945 (arm_store_return_value): Likewise.
946 (arm_write_pc): Likewise.
947 * bfin-tdep.c (bfin_extract_return_value): Likewise.
948 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
949 (bsd_uthread_store_registers): Likewise.
950 * core-regset.c (fetch_core_registers): Likewise.
951 * corelow.c (get_core_registers): Likewise.
952 * cris-tdep.c (cris_store_return_value): Likewise.
953 (cris_extract_return_value): Likewise.
954 (find_step_target): Likewise.
955 (find_step_target): Likewise.
956 (cris_software_single_step): Likewise.
957 * ctf.c (ctf_fetch_registers): Likewise.
958 * darwin-nat.c (cancel_breakpoint): Likewise.
959 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
960 * frv-tdep.c (frv_extract_return_value): Likewise.
961 * ft32-tdep.c (ft32_store_return_value): Likewise.
962 (ft32_extract_return_value): Likewise.
963 * go32-nat.c (fetch_register): Likewise.
964 (go32_fetch_registers): Likewise.
965 (go32_store_registers): Likewise.
966 (store_register): Likewise.
967 * h8300-tdep.c (h8300_extract_return_value): Likewise.
968 (h8300_store_return_value): Likewise.
969 * hppa-linux-nat.c (fetch_register): Likewise.
970 (store_register): Likewise.
971 (hppa_linux_fetch_inferior_registers): Likewise.
972 (hppa_linux_store_inferior_registers): Likewise.
973 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
974 (i386_darwin_store_inferior_registers): Likewise.
975 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
976 (gnu_store_registers): Likewise.
977 * i386-linux-nat.c (fetch_register): Likewise.
978 (store_register): Likewise.
979 (supply_gregset): Likewise.
980 (fill_gregset): Likewise.
981 (i386_linux_fetch_inferior_registers): Likewise.
982 (i386_linux_store_inferior_registers): Likewise.
983 (i386_linux_resume): Likewise.
984 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
985 Likewise.
986 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
987 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
988 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
989 (i386obsd_collect_uthread): Likewise.
990 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
991 (i386_supply_gregset): Likewise.
992 (i386_collect_gregset): Likewise.
993 (i386_supply_fpregset): Likewise.
994 (i386_collect_fpregset): Likewise.
995 (i386_mpx_bd_base): Likewise.
996 * i386-v4-nat.c (supply_fpregset): Likewise.
997 (fill_fpregset): Likewise.
998 * i387-tdep.c (i387_supply_fsave): Likewise.
999 (i387_collect_fsave): Likewise.
1000 (i387_supply_fxsave): Likewise.
1001 (i387_collect_fxsave): Likewise.
1002 (i387_supply_xsave): Likewise.
1003 (i387_collect_xsave): Likewise.
1004 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1005 (ia64_linux_store_registers): Likewise.
1006 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1007 (ia64_extract_return_value): Likewise.
1008 (ia64_store_return_value): Likewise.
1009 (find_func_descr): Likewise.
1010 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1011 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1012 (inf_ptrace_store_registers): Likewise.
1013 * infrun.c (use_displaced_stepping): Likewise.
1014 (displaced_step_prepare_throw): Likewise.
1015 (resume): Likewise.
1016 (proceed): Likewise.
1017 (do_target_wait): Likewise.
1018 (adjust_pc_after_break): Likewise.
1019 (handle_inferior_event_1): Likewise.
1020 (handle_signal_stop): Likewise.
1021 (save_infcall_suspend_state): Likewise.
1022 (restore_infcall_suspend_state): Likewise.
1023 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1024 * jit.c (jit_frame_prev_register): Likewise.
1025 * linux-nat.c (save_stop_reason): Likewise.
1026 (linux_nat_wait_1): Likewise.
1027 (resume_stopped_resumed_lwps): Likewise.
1028 * linux-record.c (record_linux_sockaddr): Likewise.
1029 (record_linux_msghdr): Likewise.
1030 (record_linux_system_call): Likewise.
1031 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1032 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1033 (lm32_store_return_value): Likewise.
1034 * m32c-tdep.c (m32c_read_flg): Likewise.
1035 (m32c_pseudo_register_read): Likewise.
1036 (m32c_pseudo_register_write): Likewise.
1037 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1038 (m32r_linux_collect_gregset): Likewise.
1039 * m32r-tdep.c (m32r_store_return_value): Likewise.
1040 (m32r_extract_return_value): Likewise.
1041 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1042 (m68kbsd_collect_fpregset): Likewise.
1043 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1044 * m68k-linux-nat.c (fetch_register): Likewise.
1045 (old_fetch_inferior_registers): Likewise.
1046 (old_store_inferior_registers): Likewise.
1047 (store_regs): Likewise.
1048 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1049 (m68k_svr4_store_return_value): Likewise.
1050 * m88k-tdep.c (m88k_store_arguments): Likewise.
1051 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1052 (mi_cmd_data_write_register_values): Likewise.
1053 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1054 (mips_fbsd_store_inferior_registers): Likewise.
1055 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1056 (mips_fbsd_supply_gregs): Likewise.
1057 (mips_fbsd_collect_fpregs): Likewise.
1058 (mips_fbsd_collect_gregs): Likewise.
1059 (mips_fbsd_supply_fpregset): Likewise.
1060 (mips_fbsd_collect_fpregset): Likewise.
1061 (mips_fbsd_supply_gregset): Likewise.
1062 (mips_fbsd_collect_gregset): Likewise.
1063 * mips-linux-nat.c (supply_gregset): Likewise.
1064 (fill_gregset): Likewise.
1065 (supply_fpregset): Likewise.
1066 (fill_fpregset): Likewise.
1067 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1068 (mips_fill_gregset): Likewise.
1069 (mips_supply_fpregset): Likewise.
1070 (mips_fill_fpregset): Likewise.
1071 (mips64_supply_gregset): Likewise.
1072 (micromips_linux_sigframe_validate): Likewise.
1073 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1074 (mipsnbsd_fetch_inferior_registers): Likewise.
1075 (mipsnbsd_store_inferior_registers): Likewise.
1076 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1077 (mipsnbsd_supply_gregset): Likewise.
1078 (mipsnbsd_iterate_over_regset_sections): Likewise.
1079 (mipsnbsd_supply_reg): Likewise.
1080 (mipsnbsd_supply_fpreg): Likewise.
1081 * mips-tdep.c (mips_in_frame_stub): Likewise.
1082 (mips_dummy_id): Likewise.
1083 (is_octeon_bbit_op): Likewise.
1084 (micromips_bc1_pc): Likewise.
1085 (extended_mips16_next_pc): Likewise.
1086 (mips16_next_pc): Likewise.
1087 (deal_with_atomic_sequence): Likewise.
1088 * moxie-tdep.c (moxie_process_readu): Likewise.
1089 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1090 * nto-procfs.c (procfs_store_registers): Likewise.
1091 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1092 (ppcfbsd_store_inferior_registers): Likewise.
1093 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1094 (fetch_altivec_register): Likewise.
1095 (get_spe_registers): Likewise.
1096 (fetch_spe_register): Likewise.
1097 (fetch_altivec_registers): Likewise.
1098 (fetch_all_gp_regs): Likewise.
1099 (fetch_all_fp_regs): Likewise.
1100 (store_vsx_register): Likewise.
1101 (store_altivec_register): Likewise.
1102 (set_spe_registers): Likewise.
1103 (store_spe_register): Likewise.
1104 (store_altivec_registers): Likewise.
1105 (store_all_gp_regs): Likewise.
1106 (store_all_fp_regs): Likewise.
1107 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1108 (ppc_linux_collect_gregset): Likewise.
1109 (ppc_canonicalize_syscall): Likewise.
1110 (ppc_linux_record_signal): Likewise.
1111 (ppu2spu_prev_register): Likewise.
1112 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1113 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1114 (ppcobsd_store_registers): Likewise.
1115 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1116 Likewise.
1117 (ppc_ravenscar_generic_store_registers): Likewise.
1118 * procfs.c (procfs_fetch_registers): Likewise.
1119 (procfs_store_registers): Likewise.
1120 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1121 (ravenscar_store_registers): Likewise.
1122 (ravenscar_prepare_to_store): Likewise.
1123 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1124 * record-full.c (record_full_wait_1): Likewise.
1125 (record_full_registers_change): Likewise.
1126 (record_full_store_registers): Likewise.
1127 (record_full_core_fetch_registers): Likewise.
1128 (record_full_save): Likewise.
1129 (record_full_goto_insn): Likewise.
1130 * regcache.c (regcache_register_size): Likewise.
1131 (get_regcache_arch): Remove.
1132 (regcache_read_pc): Likewise.
1133 * regcache.h (get_regcache_arch): Remove.
1134 * remote-sim.c (gdbsim_fetch_register): Likewise.
1135 (gdbsim_store_register): Likewise.
1136 * remote.c (fetch_register_using_p): Likewise.
1137 (send_g_packet): Likewise.
1138 (remote_prepare_to_store): Likewise.
1139 (store_registers_using_G): Likewise.
1140 * reverse.c (save_bookmark_command): Likewise.
1141 (goto_bookmark_command): Likewise.
1142 * rs6000-aix-tdep.c (branch_dest): Likewise.
1143 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1144 (fetch_register): Likewise.
1145 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1146 (ppc_collect_reg): Likewise.
1147 (ppc_collect_gregset): Likewise.
1148 (ppc_collect_fpregset): Likewise.
1149 (ppc_collect_vsxregset): Likewise.
1150 (ppc_collect_vrregset): Likewise.
1151 (ppc_displaced_step_hw_singlestep): Likewise.
1152 (rs6000_pseudo_register_read): Likewise.
1153 (rs6000_pseudo_register_write): Likewise.
1154 * s390-linux-nat.c (supply_gregset): Likewise.
1155 (fill_gregset): Likewise.
1156 (s390_linux_fetch_inferior_registers): Likewise.
1157 * s390-linux-tdep.c (s390_write_pc): Likewise.
1158 (s390_software_single_step): Likewise.
1159 (s390_all_but_pc_registers_record): Likewise.
1160 (s390_linux_syscall_record): Likewise.
1161 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1162 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1163 (shnbsd_store_inferior_registers): Likewise.
1164 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1165 (sh_extract_return_value_fpu): Likewise.
1166 (sh_store_return_value_nofpu): Likewise.
1167 (sh_corefile_supply_regset): Likewise.
1168 (sh_corefile_collect_regset): Likewise.
1169 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1170 (sh64_store_return_value): Likewise.
1171 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1172 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1173 (sparc_store_inferior_registers): Likewise.
1174 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1175 (sparc_ravenscar_prepare_to_store): Likewise.
1176 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1177 (sparc_analyze_control_transfer): Likewise.
1178 (sparc_step_trap): Likewise.
1179 (sparc_software_single_step): Likewise.
1180 (sparc32_gdbarch_init): Likewise.
1181 (sparc_supply_rwindow): Likewise.
1182 (sparc_collect_rwindow): Likewise.
1183 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1184 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1185 (sparc64nbsd_collect_gregset): Likewise.
1186 (sparc64nbsd_supply_fpregset): Likewise.
1187 (sparc64nbsd_collect_fpregset): Likewise.
1188 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1189 (sparc64_supply_gregset): Likewise.
1190 (sparc64_collect_gregset): Likewise.
1191 (sparc64_supply_fpregset): Likewise.
1192 (sparc64_collect_fpregset): Likewise.
1193 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1194 * spu-tdep.c (spu_unwind_sp): Likewise.
1195 (spu2ppu_prev_register): Likewise.
1196 (spu_memory_remove_breakpoint): Likewise.
1197 * stack.c (return_command): Likewise.
1198 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1199 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1200 * tracefile.c (trace_save_ctf): Likewise.
1201 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1202 (do_windows_store_inferior_registers): Likewise.
1203 (windows_resume): Likewise.
1204 * xtensa-linux-nat.c (fill_gregset): Likewise.
1205 (supply_gregset_reg): Likewise.
1206 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1207 (xtensa_register_read_masked): Likewise.
1208 (xtensa_supply_gregset): Likewise.
1209 (xtensa_extract_return_value): Likewise.
1210 (xtensa_store_return_value): Likewise.
1211
1212 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1213
1214 * doublest.c (floatformat_from_string): New function.
1215 * doublest.h (floatformat_from_string): Add prototype.
1216
1217 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1218 (OP_FLOAT): ... this.
1219 * expression.h: Do not include "doublest.h".
1220 (union exp_element): Replace doubleconst and decfloatconst by
1221 new element floatconst.
1222 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1223 (ada_evaluate_subexp): Likewise.
1224 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1225 OP_DOUBLE and OP_DECFLOAT.
1226 * expprint.c (print_subexp_standard): Likewise.
1227 (dump_subexp_body_standard): Likewise.
1228 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1229
1230 * parse.c: Include "dfp.h".
1231 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1232 (write_exp_elt_floatcst): New function.
1233 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1234 and OP_DECFLOAT.
1235 (operator_check_standard): Likewise.
1236 (parse_float): Do not accept suffix. Take type as input. Return bool.
1237 Return target format buffer instead of host DOUBLEST.
1238 Use floatformat_from_string and decimal_from_string to parse
1239 either binary or decimal floating-point types.
1240 (parse_c_float): Remove.
1241 * parser-defs.h: Do not include "doublest.h".
1242 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1243 (write_exp_elt_floatcst): Add prototype.
1244 (parse_float): Update prototype.
1245 (parse_c_float): Remove.
1246
1247 * c-exp.y: Do not include "dfp.h".
1248 (typed_val_float): Use byte buffer instead of DOUBLEST.
1249 (typed_val_decfloat): Remove.
1250 (DECFLOAT): Remove.
1251 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1252 (parse_number): Update to new parse_float interface.
1253 Parse suffixes and determine type before calling parse_float.
1254 Handle decimal and binary FP types the same way.
1255
1256 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1257 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1258 (parse_number): Update to new parse_float interface.
1259 Parse suffixes and determine type before calling parse_float.
1260
1261 * f-exp.y: Replace dval by typed_val_float.
1262 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1263 (parse_number): Use parse_float instead of atof.
1264
1265 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1266 (parse_go_float): Remove.
1267 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1268 (parse_number): Call parse_float instead of parse_go_float.
1269 Parse suffixes and determine type before calling parse_float.
1270
1271 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1272 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1273 (parse_number): Update to new parse_float interface.
1274 Parse suffixes and determine type before calling parse_float.
1275
1276 * m2-exp.y: Replace dval by byte buffer val.
1277 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1278 (parse_number): Call parse_float instead of atof.
1279
1280 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1281 (lex_number): Call parse_float instead of strtod.
1282 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1283 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1284 Use write_exp_elt_floatcst.
1285 (unit_testing): Remove static variable.
1286 (rust_type): Do not check unit_testing.
1287 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1288
1289 * ada-exp.y (type_float, type_double): Remove.
1290 (typed_val_float): Use byte buffer instead of DOUBLEST.
1291 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1292 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1293
1294 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1295
1296 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1297 * arch/aarch64.h: New file.
1298
1299 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1300
1301 * dfp.h (decimal_from_string): Use const reference for argument.
1302 * dfp.c (decimal_from_string): Likewise.
1303
1304 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1305
1306 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1307 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1308 * mips-tdep.c (mips_print_fp_register): Likewise.
1309
1310 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1311
1312 * common/format.h (enum argclass): Replace decfloat_arg by
1313 dec32float_arg, dec64float_arg, and dec128float_arg.
1314 * common/format.c (parse_format_string): Update to return
1315 new decimal float argument classes.
1316
1317 * printcmd.c (printf_decfloat): Rename to ...
1318 (printf_floating): ... this. Add argclass argument, and use it
1319 instead of parsing the format string again. Add support for
1320 binary floating-point values, using floatformat_to_string.
1321 Convert value to the target format if it doesn't already match.
1322 (ui_printf): Call printf_floating instead of printf_decfloat,
1323 also for double_arg / long_double_arg. Pass argclass.
1324
1325 * dfp.c (decimal_to_string): Add format string argument.
1326 * dfp.h (decimal_to_string): Likewise.
1327
1328 * doublest.c (floatformat_to_string): Add format string argument.
1329 * doublest.h (floatformat_to_string): Likewise.
1330
1331 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1332
1333 * doublest.c (floatformat_precision): New routine.
1334 (floatformat_to_string): Likewise.
1335 * doublest.c (floatformat_to_string): Add prototype.
1336
1337 * printcmd.c (print_scalar_formatted): Only call print_floating
1338 on floating-point types.
1339 * valprint.c: Do not include "floatformat.h".
1340 (generic_val_print_decfloat): Remove.
1341 (generic_val_print): Call generic_val_print_float for both
1342 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1343 (print_floating): Use floatformat_to_string. Handle decimal float.
1344 (print_decimal_floating): Remove, merge into floatformat_to_string.
1345 * value.h (print_decimal_floating): Remove.
1346
1347 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1348
1349 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1350
1351 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1352
1353 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * memattr.h: Don't include vec.h.
1356 (struct mem_attrib): Initialize fields.
1357 <unknown>: New static method.
1358 (struct mem_region): Add constructors, operator<, initialize
1359 fields.
1360 * memattr.c: Include algorithm.
1361 (default_mem_attrib, unknown_mem_attrib): Remove.
1362 (user_mem_region_list): New global.
1363 (target_mem_region_list, mem_region_list): Change type to
1364 std::vector<mem_region>.
1365 (mem_use_target): Now a function.
1366 (target_mem_regions_valid): Change type to bool.
1367 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1368 (require_user_regions): Adjust.
1369 (require_target_regions): Adjust.
1370 (create_mem_region): Adjust.
1371 (lookup_mem_region): Adjust.
1372 (invalidate_target_mem_regions): Adjust.
1373 (mem_clear): Rename to...
1374 (user_mem_clear): ... this, and adjust.
1375 (mem_command): Adjust.
1376 (info_mem_command): Adjust.
1377 (mem_enable, enable_mem_command, mem_disable,
1378 disable_mem_command): Adjust.
1379 (mem_delete): Adjust.
1380 (delete_mem_command): Adjust.
1381 * memory-map.h (parse_memory_map): Return an std::vector.
1382 * memory-map.c (parse_memory_map): Likewise.
1383 (struct memory_map_parsing_data): Add constructor.
1384 <memory_map>: Point to std::vector.
1385 (memory_map_start_memory): Adjust.
1386 (memory_map_end_memory): Adjust.
1387 (memory_map_end_property): Adjust.
1388 (clear_result): Remove.
1389 * remote.c (remote_memory_map): Return an std::vector.
1390 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1391 Remove.
1392 (target_debug_print_mem_region_vector): New.
1393 * target-delegates.c: Regenerate.
1394 * target.h (mem_region_vector): New typedef.
1395 (to_memory_map): Return mem_region_vector.
1396 (target_memory_map): Return an std::vector.
1397 * target.c (target_memory_map): Return an std::vector.
1398 (flash_erase_command): Adjust.
1399
1400 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1401
1402 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1403 Change type to std::string.
1404 (memory_map_start_property): Adjust.
1405 (memory_map_end_property): Adjust.
1406
1407 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1408
1409 * infrun.h: Include common/byte-vector.h.
1410 (struct displaced_step_closure): New struct.
1411 (struct buf_displaced_step_closure): New struct.
1412 * infrun.c (displaced_step_closure::~displaced_step_closure):
1413 Provide default implementation.
1414 (displaced_step_clear): Deallocate step closure with delete.
1415 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1416 (aarch64_displaced_step_closure): ... this, extend
1417 displaced_step_closure.
1418 (aarch64_displaced_step_data) <dsc>: Change type to
1419 aarch64_displaced_step_closure.
1420 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1421 unique_ptr.
1422 (aarch64_displaced_step_fixup): Add cast for displaced step
1423 closure.
1424 * amd64-tdep.c (displaced_step_closure): Rename to ...
1425 (amd64_displaced_step_closure): ... this, extend
1426 displaced_step_closure.
1427 <insn_buf>: Change type to std::vector<gdb_byte>.
1428 <max_len>: Remove.
1429 (fixup_riprel): Change type of DSC parameter, adjust to type
1430 change of insn_buf.
1431 (fixup_displaced_copy): Change type of DSC parameter.
1432 (amd64_displaced_step_copy_insn): Instantiate
1433 amd64_displaced_step_closure.
1434 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1435 to type change of insn_buf.
1436 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1437 parameter DSC.
1438 (arm_linux_copy_svc): Likewise.
1439 (cleanup_kernel_helper_return): Likewise.
1440 (arm_catch_kernel_helper_return): Likewise.
1441 (arm_linux_displaced_step_copy_insn): Instantiate
1442 arm_displaced_step_closure.
1443 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1444 (displaced_read_reg): Change type of parameter DSC.
1445 (branch_write_pc): Likewise.
1446 (load_write_pc): Likewise.
1447 (alu_write_pc): Likewise.
1448 (displaced_write_reg): Likewise.
1449 (arm_copy_unmodified): Likewise.
1450 (thumb_copy_unmodified_32bit): Likewise.
1451 (thumb_copy_unmodified_16bit): Likewise.
1452 (cleanup_preload): Likewise.
1453 (install_preload): Likewise.
1454 (arm_copy_preload): Likewise.
1455 (thumb2_copy_preload): Likewise.
1456 (install_preload_reg): Likewise.
1457 (arm_copy_preload_reg): Likewise.
1458 (cleanup_copro_load_store): Likewise.
1459 (install_copro_load_store): Likewise.
1460 (arm_copy_copro_load_store) Likewise.
1461 (thumb2_copy_copro_load_store): Likewise.
1462 (cleanup_branch): Likewise.
1463 (install_b_bl_blx): Likewise.
1464 (arm_copy_b_bl_blx): Likewise.
1465 (thumb2_copy_b_bl_blx): Likewise.
1466 (thumb_copy_b): Likewise.
1467 (install_bx_blx_reg): Likewise.
1468 (arm_copy_bx_blx_reg): Likewise.
1469 (thumb_copy_bx_blx_reg): Likewise.
1470 (cleanup_alu_imm): Likewise.
1471 (arm_copy_alu_imm): Likewise.
1472 (thumb2_copy_alu_imm): Likewise.
1473 (cleanup_alu_reg): Likewise.
1474 (install_alu_reg): Likewise.
1475 (arm_copy_alu_reg): Likewise.
1476 (thumb_copy_alu_reg): Likewise.
1477 (cleanup_alu_shifted_reg): Likewise.
1478 (install_alu_shifted_reg): Likewise.
1479 (arm_copy_alu_shifted_reg): Likewise.
1480 (cleanup_load): Likewise.
1481 (cleanup_store): Likewise.
1482 (arm_copy_extra_ld_st): Likewise.
1483 (install_load_store): Likewise.
1484 (thumb2_copy_load_literal): Likewise.
1485 (thumb2_copy_load_reg_imm): Likewise.
1486 (arm_copy_ldr_str_ldrb_strb): Likewise.
1487 (cleanup_block_load_all): Likewise.
1488 (cleanup_block_store_pc): Likewise.
1489 (cleanup_block_load_pc): Likewise.
1490 (arm_copy_block_xfer): Likewise.
1491 (thumb2_copy_block_xfer): Likewise.
1492 (cleanup_svc): Likewise.
1493 (install_svc): Likewise.
1494 (arm_copy_svc): Likewise.
1495 (thumb_copy_svc): Likewise.
1496 (arm_copy_undef): Likewise.
1497 (thumb_32bit_copy_undef): Likewise.
1498 (arm_copy_unpred): Likewise.
1499 (arm_decode_misc_memhint_neon): Likewise.
1500 (arm_decode_unconditional): Likewise.
1501 (arm_decode_miscellaneous): Likewise.
1502 (arm_decode_dp_misc): Likewise.
1503 (arm_decode_ld_st_word_ubyte): Likewise.
1504 (arm_decode_media): Likewise.
1505 (arm_decode_b_bl_ldmstm): Likewise.
1506 (arm_decode_ext_reg_ld_st): Likewise.
1507 (thumb2_decode_dp_shift_reg): Likewise.
1508 (thumb2_decode_ext_reg_ld_st): Likewise.
1509 (arm_decode_svc_copro): Likewise.
1510 (thumb2_decode_svc_copro): Likewise.
1511 (install_pc_relative): Likewise.
1512 (thumb_copy_pc_relative_16bit): Likewise.
1513 (thumb_decode_pc_relative_16bit): Likewise.
1514 (thumb_copy_pc_relative_32bit): Likewise.
1515 (thumb_copy_16bit_ldr_literal): Likewise.
1516 (thumb_copy_cbnz_cbz): Likewise.
1517 (thumb2_copy_table_branch): Likewise.
1518 (cleanup_pop_pc_16bit_all): Likewise.
1519 (thumb_copy_pop_pc_16bit): Likewise.
1520 (thumb_process_displaced_16bit_insn): Likewise.
1521 (decode_thumb_32bit_ld_mem_hints): Likewise.
1522 (thumb_process_displaced_32bit_insn): Likewise.
1523 (thumb_process_displaced_insn): Likewise.
1524 (arm_process_displaced_insn): Likewise.
1525 (arm_displaced_init_closure): Likewise.
1526 (arm_displaced_step_fixup): Add cast for closure.
1527 * arm-tdep.h: Include infrun.h.
1528 (displaced_step_closure): Rename to ...
1529 (arm_displaced_step_closure): ... this, extend
1530 displaced_step_closure.
1531 <u::svc::copy_svc_os>: Change type of parameter DSC.
1532 <cleanup>: Likewise.
1533 (arm_process_displaced_insn): Likewise.
1534 (arm_displaced_init_closure): Likewise.
1535 (displaced_read_reg): Likewise.
1536 (displaced_write_reg): Likewise.
1537 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1538 Adjust.
1539 * i386-tdep.h: Include infrun.h.
1540 (i386_displaced_step_closure): New typedef.
1541 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1542 i386_displaced_step_closure.
1543 (i386_displaced_step_fixup): Adjust.
1544 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1545 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1546 and unique_ptr.
1547 (ppc_displaced_step_fixup): Adjust.
1548 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1549 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1550 and unique_ptr.
1551 (s390_displaced_step_fixup): Adjust.
1552
1553 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1554
1555 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1556 Remove declarations.
1557
1558 2017-10-20 Tom Tromey <tom@tromey.com>
1559
1560 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1561 std::vector.
1562 (gdb_bfd_record_inclusion): Update.
1563 (bfdp): Remove typedef.
1564
1565 2017-10-20 Tom Tromey <tom@tromey.com>
1566
1567 * gdb_bfd.c (gdb_bfd_ref): Use new.
1568 (struct gdb_bfd_data): Add constructor, destructor, and member
1569 initializers.
1570 (gdb_bfd_unref): Use delete.
1571
1572 2017-10-20 Tom Tromey <tom@tromey.com>
1573
1574 * exec.c (exec_file_attach): Use new_bfd_ref.
1575 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1576 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1577 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1578 new_bfd_ref.
1579 * gdb_bfd.h (new_bfd_ref): New function.
1580
1581 2017-10-20 Pedro Alves <palves@redhat.com>
1582
1583 * main.c (captured_command_loop): Add attribute noinline.
1584
1585 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1586
1587 * interps.c (struct interp_factory): Add constructor.
1588 (interp_factory_p): Remove typedef.
1589 (DEF_VEC_P(interp_factory_p)): Remove.
1590 (interpreter_factories): Change type to std::vector.
1591 (interp_factory_register): Adjust.
1592 (interp_lookup): Adjust.
1593 (interpreter_completer): Adjust.
1594
1595 2017-10-19 Tom Tromey <tom@tromey.com>
1596
1597 * break-catch-syscall.c (catch_syscall_completer): Use
1598 std::string, gdb::unique_xmalloc_ptr.
1599
1600 2017-10-19 Tom Tromey <tom@tromey.com>
1601
1602 * infcall.c (call_function_by_hand_dummy): Use std::string.
1603
1604 2017-10-19 Tom Tromey <tom@tromey.com>
1605
1606 * mi/mi-main.c (mi_cmd_execute): Update.
1607 * top.h (prepare_execute_command): Return scoped_value_mark.
1608 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1609 Add move constructor.
1610 * top.c (prepare_execute_command): Return scoped_value_mark.
1611 (execute_command): Update.
1612
1613 2017-10-19 Pedro Alves <palves@redhat.com>
1614
1615 * xml-support.c (xml_fetch_content_from_file): Check fread's
1616 return.
1617
1618 2017-10-19 Pedro Alves <palves@redhat.com>
1619
1620 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1621 async.
1622 (handle_error_fd): New function.
1623 (ser_base_async): Add/delete an event loop file handler for
1624 error_fd.
1625
1626 2017-10-19 Pedro Alves <palves@redhat.com>
1627
1628 * xml-support.c (xml_fetch_content_from_file): Don't read in
1629 chunks. Instead use fseek to determine the file's size, and read
1630 it in one go.
1631
1632 2017-11-18 Keith Seitz <keiths@redhat.com>
1633
1634 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1635 types.
1636 Add whitespace to front of type name.
1637
1638 2017-10-18 Keith Seitz <keiths@redhat.com>
1639
1640 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1641 DW_AT_accessibility.
1642
1643 2017-10-18 Yao Qi <yao.qi@linaro.org>
1644
1645 * features/tic6x-c62x-linux.c: Remove.
1646
1647 2017-10-17 Tom Tromey <tom@tromey.com>
1648
1649 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1650 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1651 (do_mixed_source_and_assembly): Likewise.
1652
1653 2017-10-17 Tom Tromey <tom@tromey.com>
1654
1655 * regcache.c (regcache::xfer_part): Remove assertion.
1656
1657 2017-10-17 Pedro Alves <palves@redhat.com>
1658
1659 * xml-support.c (xml_fetch_content_from_file): Call
1660 unique_ptr::release() instead unique_ptr::get() when passing
1661 through xrealloc.
1662
1663 2017-10-17 Yao Qi <yao.qi@linaro.org>
1664
1665 * regcache.c (regcache::xfer_part): Remove parameters read and
1666 write, add parameter is_raw. All callers are updated.
1667
1668 2017-10-16 Keith Seitz <keiths@redhat.com>
1669
1670 * c-typeprint.c (enum access_specifier): Moved here from
1671 c_type_print_base.
1672 (output_access_specifier): New function.
1673 (c_type_print_base): Consider typedefs when assessing
1674 whether access labels are needed.
1675 Use output_access_specifier as needed.
1676 Output access specifier for typedefs, if needed.
1677 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1678 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1679 fields.
1680 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1681 accessor macros.
1682
1683 2017-10-16 Tom Tromey <tom@tromey.com>
1684
1685 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1686 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1687 * target.c (target_fileio_read_stralloc): Update.
1688 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1689 * target.h (target_fileio_read_stralloc): Return
1690 unique_xmalloc_ptr.
1691
1692 2017-10-16 Tom Tromey <tom@tromey.com>
1693
1694 * xml-syscall.c (xml_init_syscalls_info): Update.
1695 * xml-support.c (xinclude_start_include): Update.
1696 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1697 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1698 (xml_fetch_content_from_file): Likewise.
1699 * osdata.c (get_osdata): Update.
1700 * target.h (target_read_stralloc, target_get_osdata): Return
1701 unique_xmalloc_ptr.
1702 * solib-aix.c (solib_aix_get_library_list): Update.
1703 * solib-target.c (solib_target_current_sos): Update.
1704 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1705 * xml-tdesc.c (fetch_available_features_from_target): Update.
1706 (target_fetch_description_xml): Update.
1707 (file_read_description_xml): Update.
1708 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1709 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1710 (remote_pid_to_exec_file): Update.
1711 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1712 (target_get_osdata): Likewise.
1713
1714 2017-10-16 Tom Tromey <tom@tromey.com>
1715
1716 * remote.c (remote_register_number_and_offset): Use std::vector.
1717 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1718 (putpkt_binary): Use gdb::def_vector.
1719 (compare_sections_command): Use gdb::byte_vector.
1720
1721 2017-10-16 Tom Tromey <tom@tromey.com>
1722
1723 * ppc-linux-nat.c (hwdebug_insert_point): Use
1724 gdb::unique_xmalloc_ptr, XDUP.
1725
1726 2017-10-16 Tom Tromey <tom@tromey.com>
1727
1728 * probe.c (parse_probes): Use std::string.
1729 (info_probes_for_ops, enable_probes_command)
1730 (disable_probes_command): Remove cleanups.
1731
1732 2017-10-16 Tom Tromey <tom@tromey.com>
1733
1734 * buildsym.c (block_compar): Remove.
1735 (end_symtab_get_static_block): Use std::vector.
1736
1737 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1738
1739 * memrange.h (struct mem_range): Define operator< and operator==.
1740 (mem_range_s): Remove.
1741 (DEF_VEC_O (mem_range_s)): Remove.
1742 (normalize_mem_ranges): Change parameter type to std::vector.
1743 * memrange.c (compare_mem_ranges): Remove.
1744 (normalize_mem_ranges): Change parameter type to std::vector,
1745 adjust to vector change.
1746 * exec.c (section_table_available_memory): Return vector, remove
1747 parameter.
1748 (section_table_read_available_memory): Adjust to std::vector
1749 change.
1750 * remote.c (remote_read_bytes): Adjust to std::vector
1751 change.
1752 * tracepoint.h (traceframe_available_memory): Change parameter
1753 type to std::vector.
1754 * tracepoint.c (traceframe_available_memory): Change parameter
1755 type to std::vector, adjust.
1756 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1757 std::vector change.
1758 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1759 unittests/memrange-selftests.c.
1760 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1761 * gdb/unittests/memrange-selftests.c: New file.
1762
1763 2017-10-16 Pedro Alves <palves@redhat.com>
1764
1765 * elfread.c (probe_key_free): Rename range-for variable.
1766 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1767 (find_probe_by_pc, collect_probes): Rename range-for variable.
1768
1769 2017-10-16 Yao Qi <yao.qi@linaro.org>
1770
1771 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1772 * features/tic6x-c62x.c: Remove.
1773 * features/tic6x-c64x-linux.c: Remove.
1774 * features/tic6x-c64x.c: Remove.
1775 * features/tic6x-c64xp-linux.c: Remove.
1776 * features/tic6x-c64xp.c: Remove.
1777 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1778 initialize_tdesc_tic6x_*_linux functions.
1779 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1780 initialize_tdesc_tic6x_* functions.
1781
1782 2017-10-16 Yao Qi <yao.qi@linaro.org>
1783
1784 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1785 tic6x-c62x.
1786 * regformats/tic6x-c62x.dat: Remove.
1787 * regformats/tic6x-c64x.dat: Remove.
1788 * regformats/tic6x-c64xp.dat: Remove.
1789
1790 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1791
1792 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1793 (the !HAVE_LIBEXPAT version).
1794
1795 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1796
1797 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1798 const.
1799
1800 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * target.h: Include tracepoint.h.
1803 (enum trace_find_type): Move to tracepoint.h.
1804 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1805 * tracepoint.h: Don't include target.h
1806 (enum trace_find_type): Move from target.h.
1807 (parse_traceframe_info): Return a unique ptr.
1808 * tracepoint.c (current_traceframe_info): Change type to unique
1809 ptr.
1810 (free_traceframe_info): Remove.
1811 (clear_traceframe_info): Don't manually free
1812 current_traceframe_info.
1813 (free_result): Remove.
1814 (parse_traceframe_info): Return a unique ptr.
1815 (get_traceframe_info): Adjust to unique ptr.
1816 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1817 * remote.c (remote_traceframe_info): Return a unique ptr.
1818 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1819 ptr.
1820 * target-debug.h (target_debug_print_traceframe_info_up): New
1821 macro.
1822 * target-delegates.c: Regenerate.
1823
1824 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1825
1826 * memrange.h (struct mem_range): Add constructors.
1827 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1828 std::vector<mem_range>.
1829 * tracepoint.c (free_traceframe_info): Don't manually free
1830 vector.
1831 (traceframe_info_start_memory): Adjust to vector change.
1832 (traceframe_available_memory): Likewise.
1833 * tracefile-tfile.c (build_traceframe_info): Likewise.
1834 * ctf.c (ctf_traceframe_info): Likewise.
1835
1836 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1837
1838 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1839 std::vector<int>.
1840 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1841 (traceframe_info_start_tvar): Adjust to vector change.
1842 (parse_traceframe_info): Allocate with new.
1843 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1844 vector change.
1845 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1846 change.
1847 tfile_traceframe_info): Allocate with new.
1848 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1849 change.
1850
1851 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1852
1853 * tracepoint.c (traceframe_info): Rename to...
1854 (current_traceframe_info): ...this.
1855 (clear_traceframe_info): Adjust.
1856 (get_traceframe_info): Adjust.
1857
1858 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1859
1860 * nat/linux-osdata.c: Include algorithm.
1861 (compare_processes): Remove.
1862 (struct pid_pgid_entry): New struct.
1863 (linux_xfer_osdata_processgroups): Use std::vector instead of
1864 XNEWVEC.
1865
1866 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1867
1868 * objfiles.h: Don't include symfile.h.
1869 (struct partial_symbol): Remove forward-declaration.
1870 (struct objfile) <global_psymbols, static_psymbols>: Change type
1871 to std::vector<partial_symbol *>.
1872 * objfiles.c (objfile::objfile): Don't memset those fields.
1873 (objfile::~objfile): Don't free those fields.
1874 * psympriv.h (struct psymbol_allocation_list): Remove
1875 forward-declaration.
1876 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1877 to std::vector.
1878 (start_psymtab_common): Change parameters to std::vector.
1879 * psymtab.c: Include algorithm.
1880 (require_partial_symbols): Call shrink_to_fit.
1881 (find_pc_sect_psymbol): Adjust to vector change.
1882 (match_partial_symbol): Likewise.
1883 (lookup_partial_symbol): Likewise.
1884 (psym_relocate): Likewise.
1885 (dump_psymtab): Likewise.
1886 (recursively_search_psymtabs): Likewise.
1887 (compare_psymbols): Remove.
1888 (sort_pst_symbols): Adjust to vector change.
1889 (start_psymtab_common): Likewise.
1890 (end_psymtab_common): Likewise.
1891 (psymbol_bcache_full): De-constify return value.
1892 (add_psymbol_to_bcache): Likewise.
1893 (extend_psymbol_list): Remove.
1894 (append_psymbol_to_list): Adjust to vector change.
1895 (add_psymbol_to_list): Likewise.
1896 (init_psymbol_list): Likewise.
1897 (maintenance_info_psymtabs): Likewise.
1898 (maintenance_check_psymtabs): Likewise.
1899 * symfile.h (struct psymbol_allocation_list): Remove.
1900 * symfile.c (reread_symbols): Adjust to vector change.
1901 * dbxread.c (start_psymtab): Change type of parameters.
1902 (dbx_symfile_read): Adjust to vector change.
1903 (read_dbx_symtab): Likewise.
1904 (start_psymtab): Change type of parameters.
1905 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1906 (create_partial_symtab): Likewise.
1907 (add_partial_symbol): Likewise.
1908 (write_one_signatured_type): Likewise.
1909 (recursively_write_psymbols): Likewise.
1910 * mdebugread.c (parse_partial_symbols): Likewise.
1911 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1912 (scan_xcoff_symtab): Adjust to vector change.
1913 (xcoff_initial_scan): Likewise.
1914
1915 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1916
1917 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1918
1919 2017-10-13 Yao Qi <yao.qi@linaro.org>
1920
1921 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1922 Remove s390x-*-expedite, add s390x-expedite.
1923
1924 2017-10-13 Yao Qi <yao.qi@linaro.org>
1925
1926 * features/s390-gs-linux64.c: Regenerated.
1927 * features/s390x-gs-linux64.c: Regenerated.
1928
1929 2017-10-13 Tom Tromey <tom@tromey.com>
1930
1931 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1932 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1933 delete.
1934 * symfile.c (symbol_file_add_with_addrs): Use new.
1935 (symbol_file_add_separate): Update comment.
1936 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1937 * jit.c (jit_object_close_impl): Use new.
1938 (jit_unregister_code): Use delete.
1939 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1940 (~objfile): Rename from free_objfile.
1941 (free_objfile_separate_debug, do_free_objfile_cleanup)
1942 (free_all_objfiles, objfile_purge_solibs): Use delete.
1943 * objfiles.h (struct objfile): Add constructor and destructor.
1944 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1945 (allocate_objfile, free_objfile): Don't declare.
1946 (struct objstats): Add initializers.
1947
1948 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1949
1950 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1951 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1952 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1953 * gdbarch.h: Regenerate.
1954 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1955 Adjust comment.
1956 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1957 (i386_displaced_step_fixup): Adjust comment.
1958 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1959
1960 2017-10-12 Tom Tromey <tom@tromey.com>
1961
1962 * prologue-value.h (pv_area::store_would_trash): Return bool.
1963 (pv_area::find_reg): Likewise.
1964 * prologue-value.c (pv_area::store_would_trash): Return bool.
1965 (pv_area::find_reg): Likewise.
1966
1967 2017-10-12 Tom Tromey <tom@tromey.com>
1968
1969 * s390-linux-tdep.c (s390_store, s390_load)
1970 (s390_check_for_saved, s390_analyze_prologue): Update.
1971 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1972 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1973 * prologue-value.h (class pv_area): Move from prologue-value.c.
1974 Change names of members. Add constructor, destructor, member
1975 functions.
1976 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1977 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1978 (pv_area_fetch, pv_area_scan): Don't declare.
1979 * prologue-value.c (struct pv_area::area_entry): Now member of
1980 pv_area.
1981 (struct pv_area): Move to prologue-value.h.
1982 (pv_area::pv_area): Rename from make_pv_area.
1983 (pv_area::~pv_area): Rename from free_pv_area.
1984 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1985 (clear_entries, find_entry, overlaps, store_would_trash, store)
1986 (fetch, find_reg, scan): Now member of pv_area.
1987 Remove "area" argument. Update.
1988 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1989 Update.
1990 * mn10300-tdep.c (push_reg, check_for_saved)
1991 (mn10300_analyze_prologue): Update.
1992 * mep-tdep.c (is_arg_spill, check_for_saved)
1993 (mep_analyze_prologue): Update.
1994 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1995 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1996 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1997 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1998 Update.
1999 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2000 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2001
2002 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2003
2004 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2005 * linux-nat.c (linux_nat_delete_thread): New variable.
2006 (lwp_free): Invoke linux_nat_delete_thread if set.
2007 (linux_nat_set_delete_thread): New function.
2008 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2009 thread delete callback.
2010 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2011 (_initialize_arm_linux_nat): Assign thread delete callback.
2012 * s390-linux-nat.c (s390_delete_thread): New function.
2013 (_initialize_s390_nat): Assign thread delete callback.
2014 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2015 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2016 function.
2017 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2018 declaration.
2019 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2020 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2021
2022 2017-10-09 Tom Tromey <tom@tromey.com>
2023
2024 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2025 std::string.
2026 * tui/tui-layout.c (enum tui_status): Use std::string.
2027
2028 2017-10-11 Tom Tromey <tom@tromey.com>
2029
2030 * gdbthread.h (thread_command): Constify.
2031 * inferior.h (detach_command): Constify.
2032 * top.h (set_history, show_history): Constify.
2033 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2034 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2035 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2036 * printcmd.c (set_command): Constify.
2037 (non_const_set_command): New function.
2038 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2039 * breakpoint.c (enable_command, disable_command, delete_command)
2040 (catch_command, tcatch_command, set_breakpoint_cmd)
2041 (show_breakpoint_cmd): Constify.
2042 * macrocmd.c (macro_command): Constify.
2043 * infcmd.c (unset_command, kill_command, detach_command)
2044 (info_proc_cmd): Constify.
2045 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2046 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2047 (info_auto_load_cmd): Constify.
2048 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2049 (unset_tdesc_cmd): Constify.
2050 * ada-lang.c (set_ada_command, show_ada_command)
2051 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2052 * guile/guile.c (set_guile_command, show_guile_command)
2053 (info_guile_command): Constify.
2054 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2055 Constify.
2056 * skip.c (skip_command): Constify.
2057 * compile/compile.c (_initialize_compile): Constify.
2058 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2059 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2060 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2061 (maint_btrace_pt_show_cmd): Constify.
2062 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2063 Constify.
2064 * python/python.c (user_show_python, user_set_python): Constify.
2065 * mips-tdep.c (set_mips_command, show_mips_command)
2066 (set_mipsfpu_command): Constify.
2067 * record-btrace.c (cmd_record_btrace_start)
2068 (cmd_set_record_btrace, cmd_show_record_btrace)
2069 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2070 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2071 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2072 Constify.
2073 * symfile.c (overlay_command): Constify.
2074 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2075 * cli/cli-logging.c (set_logging_command, show_logging_command):
2076 Constify.
2077 * cli/cli-dump.c (dump_command, append_command)
2078 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2079 (tekhex_dump_command, binary_dump_command)
2080 (binary_append_command): Constify.
2081 * cli/cli-decode.c (struct cmd_list_element): Change type of
2082 "fun".
2083 * cli/cli-cmds.c (info_command, show_command, set_debug)
2084 (show_debug): Constify.
2085 (show_command): Add non-const overload.
2086 * top.c (set_history, show_history): Constify.
2087 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2088 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2089 * target.c (target_command): Constify.
2090 * sparc64-tdep.c (info_adi_command): Constify.
2091 * record-full.c (cmd_record_full_start): Constify.
2092 (set_record_full_command): Constify. Fix typo.
2093 (show_record_full_command): Constify.
2094 * thread.c (thread_command, thread_apply_command): Constify.
2095 * memattr.c (dummy_cmd): Constify.
2096 * value.c (function_command): Constify.
2097 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2098 * probe.c (info_probes_command): Constify.
2099 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2100 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2101 (show_thread_cmd, set_thread_default_cmd)
2102 (show_thread_default_cmd): Constify.
2103 (check_empty): Constify.
2104 * tracepoint.c (tfind_command): Constify.
2105 * cp-support.c (maint_cplus_command): Constify.
2106 * windows-tdep.c (info_w32_command): Constify.
2107 * record.c (cmd_record_start, set_record_command)
2108 (show_record_command, info_record_command, cmd_record_goto):
2109 Constify.
2110 * ravenscar-thread.c (set_ravenscar_command)
2111 (show_ravenscar_command): Constify.
2112 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2113 Constify.
2114 (add_internal_problem_command): Remove casts.
2115 * arc-tdep.c (maintenance_print_arc_command): Constify.
2116 * valprint.c (set_print, show_print, set_print_raw)
2117 (show_print_raw): Constify.
2118 * maint.c (maintenance_command, maintenance_info_command)
2119 (maintenance_print_command, maintenance_set_cmd)
2120 (maintenance_show_cmd, set_per_command_cmd)
2121 (show_per_command_cmd, maintenance_check_command): Constify.
2122 * language.c (set_check, show_check): Constify.
2123 * typeprint.c (show_print_type, set_print_type): Constify.
2124 * go32-nat.c (go32_info_dos_command): Constify.
2125
2126 2017-10-11 Tom Tromey <tom@tromey.com>
2127
2128 * breakpoint.c (prepare_re_set_context): Remove.
2129 (breakpoint_re_set_one): Update. Don't use cleanups.
2130 (breakpoint_re_set): Use scoped_restore, std::string, and
2131 scoped_restore_current_language.
2132
2133 2017-10-11 Tom Tromey <tom@tromey.com>
2134
2135 * breakpoint.c (commands_command_1): Use std::string.
2136 (cleanup_executing_breakpoints): Remove.
2137 (bpstat_do_actions_1): Use scoped_restore.
2138 (bpstat_check_watchpoint): Use std::string.
2139 (decode_static_tracepoint_spec): Likewise.
2140 (break_range_command): Likewise.
2141 (watch_command_1): Likewise.
2142 (compare_breakpoints): Change argument types.
2143 (clear_command): Use std::vector.
2144 (cleanup_executing_breakpoints): Remove.
2145 (update_global_location_list): Use unique_xmalloc_ptr.
2146 (strace_command): Remove unused declaration.
2147
2148 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2149
2150 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2151 * NEWS: Mention new FreeBSD/arm native configuration.
2152 * configure.host: Add arm*-*-freebsd*.
2153 * configure.nat: Likewise.
2154 * arm-fbsd-nat.c: New file.
2155
2156 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2157
2158 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2159 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2160 * NEWS: Mention new FreeBSD/arm target.
2161 * configure.tgt: Add arm*-*-freebsd*.
2162 * arm-fbsd-tdep.c: New file.
2163 * arm-fbsd-tdep.h: New file.
2164
2165 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2166
2167 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2168 `gdbarch_elfcore_write_linux_prpsinfo'.
2169 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2170 method.
2171 (elf_internal_linux_prpsinfo): Remove declaration.
2172 * gdbarch.h: Regenerate.
2173 * gdbarch.c: Regenerate.
2174
2175 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2176
2177 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2178 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2179
2180 2017-10-11 Pedro Alves <palves@redhat.com>
2181
2182 * breakpoint.c (reattach_breakpoints): Delete.
2183 * breakpoint.h (reattach_breakpoints): Delete.
2184
2185 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2186
2187 * symfile.c (registered_sym_fns): Make struct, not typedef.
2188 (DEF_VEC_O (registered_sym_fns)): Remove.
2189 (symtab_fns): Change type to std::vector.
2190 (add_symtab_fns): Adjust.
2191 (find_sym_fns): Adjust.
2192
2193 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2194
2195 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2196 * arc-tdep.h (arc_arch_is_em): New function.
2197 (arc_arch_is_hs): Likewise.
2198
2199 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2200
2201 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2202 parentheses in the declaration.
2203 (macro_lookup_inclusion): Likewise.
2204 (macro_lookup_definition): Likewise.
2205 * p-lang.h (pascal_builtin_types): Likewise.
2206 * tui/tui-data.c (tui_win_list): Likewise.
2207 * tui/tui-data.h (tui_win_list): Likewise.
2208 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2209
2210 2017-10-11 Mark Rages <markrages@gmail.com>
2211
2212 * target-memory.c (block_boundaries): Fix for block address not
2213 aligned on block size.
2214
2215 2017-10-10 Pedro Alves <palves@redhat.com>
2216 Tom Tromey <tom@tromey.com>
2217
2218 * breakpoint.c (struct captured_breakpoint_query_args)
2219 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2220 (print_breakpoint): New.
2221 * breakpoint.h (print_breakpoint): Declare.
2222 * common/common-exceptions.h (enum return_reason): Remove
2223 references to catch_exceptions.
2224 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2225 Delete.
2226 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2227 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2228 * gdb.h: Delete.
2229 * gdbthread.h (thread_select): Declare.
2230 * mi/mi-cmd-break.c: Don't include gdb.h.
2231 (breakpoint_notify): Use print_breakpoint.
2232 * mi/mi-cmd-catch.c: Don't include gdb.h.
2233 * mi/mi-interp.c: Don't include gdb.h.
2234 (mi_print_breakpoint_for_event): New.
2235 (mi_breakpoint_created, mi_breakpoint_modified): Use
2236 mi_print_breakpoint_for_event.
2237 * mi/mi-main.c: Don't include gdb.h.
2238 (mi_cmd_thread_select): Parse the global thread ID here. Use
2239 thread_select instead of gdb_thread_select.
2240 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2241 of using gdb_list_thread_ids.
2242 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2243 FILEIO_ENOSYS here.
2244 (remote_fileio_request): Use TRY/CATCH instead of
2245 catch_exceptions.
2246 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2247 (symbol_file_add_from_memory_wrapper): Delete.
2248 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2249 * thread.c: Don't include gdb.h.
2250 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2251 (thread_alive): Use thread_select.
2252 (do_captured_thread_select): Delete, parts salvaged as ...
2253 (thread_select): ... this new function.
2254 (gdb_thread_select): Delete.
2255
2256 2017-10-10 Pedro Alves <palves@redhat.com>
2257 Tom Tromey <tom@tromey.com>
2258
2259 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2260 and reverse logic.
2261 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2262 No longer macros. Instead ...
2263 (enum wp_check_result): They're now values of this new
2264 enumeration.
2265 (watchpoint_check): Change return type to wp_check_result and
2266 parameter type to bpstat.
2267 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2268 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2269 catch_errors. Reverse logic of watchpoint_check call.
2270 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2271 pointer as parameter.
2272 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2273 * common/common-exceptions.c (throw_exception_sjlj): Update
2274 comments to avoid mentioning catch_errors.
2275 * exceptions.c (catch_errors): Delete.
2276 * exceptions.h: Update comments to avoid mentioning catch_errors.
2277 (catch_errors_ftype, catch_errors): Delete.
2278 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2279 (hook_stop_stub): Delete.
2280 (restore_selected_frame): Change return type to void, and
2281 parameter type to const frame_id &.
2282 (restore_infcall_control_state): Use TRY/CATCH instead of
2283 catch_errors.
2284 * main.c (captured_command_loop): Return void and remove
2285 parameter. Remove references to catch_errors.
2286 (captured_main): Use TRY/CATCH instead of catch_errors.
2287 * objc-lang.c (objc_submethod_helper_data)
2288 (find_objc_msgcall_submethod_helper): Delete.
2289 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2290 catch_errors.
2291 * record-full.c (record_full_message): Return void.
2292 (record_full_message_args, record_full_message_wrapper): Delete.
2293 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2294 instead of catch_errors.
2295 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2296 parameter type to int.
2297 * solib-darwin.c (open_symbol_file_object): Ditto.
2298 * solib-dsbt.c (open_symbol_file_object): Ditto.
2299 * solib-frv.c (open_symbol_file_object): Ditto.
2300 * solib-svr4.c (open_symbol_file_object): Ditto.
2301 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2302 * solib.c (update_solib_list): Use TRY/CATCH instead of
2303 catch_errors.
2304 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2305 Change type.
2306 * symmisc.c (struct print_symbol_args): Remove.
2307 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2308 (print_symbol): Change type.
2309 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2310 and remove parameters.
2311 (catch_errors): New.
2312 (get_windows_debug_event): Adjust.
2313
2314 2017-10-09 Tom Tromey <tom@tromey.com>
2315
2316 * mi/mi-main.c (free_splay_tree): Remove.
2317 (list_available_thread_groups): Use splay_tree_up.
2318 * common/gdb_splay_tree.h: New file.
2319
2320 2017-10-09 Tom Tromey <tom@tromey.com>
2321
2322 * mi/mi-main.c (do_nothing): Remove.
2323 (list_available_thread_groups): Update.
2324
2325 2017-10-09 Pedro Alves <palves@redhat.com>
2326
2327 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2328 reading registers when switching context.
2329
2330 2017-10-09 John Baldwin <jhb@FreeBSD.org>
2331
2332 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2333 (fbsd_convert_siginfo): Likewise.
2334 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2335
2336 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2337
2338 * configure.ac (try_guile_versions): Remove guile-2.2.
2339 * configure: Regenerate.
2340
2341 2017-10-09 Tom Tromey <tom@tromey.com>
2342
2343 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2344 (COMPILE.pre): Use $(CXX).
2345
2346 2017-10-09 Pedro Alves <palves@redhat.com>
2347
2348 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2349 Use bool.
2350 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2351 * cp-support.h (cp_remove_params): Now returns a
2352 gdb::unique_xmalloc_ptr.
2353 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2354 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2355 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2356 returning a gdb::unique_xmalloc_ptr.
2357 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2358 * stack.c (find_frame_funname): Adjust to cp_remove_params
2359 returning a gdb::unique_xmalloc_ptr.
2360
2361 2017-10-08 Tom Tromey <tom@tromey.com>
2362
2363 * dwarf2read.c (dwarf2_get_dwz_file): Use
2364 gdb::unique_xmalloc_ptr.
2365 (find_slot_in_mapped_hash): Likewise.
2366 (dwarf2_physname): Likewise.
2367 (create_dwo_unit_in_dwp_v1): Use std::string.
2368 (create_dwo_unit_in_dwp_v2): Likewise.
2369 (lookup_dwo_cutu): Likewise.
2370 (inherit_abstract_dies): Use std::vector.
2371 (read_array_type): Likewise.
2372 (dwarf_decode_macros): Remove unused declaration.
2373 (unsigned_int_compar): Remove.
2374 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2375 (psymtabs_addrmap_cleanup): Remove.
2376
2377 2017-10-08 Tom Tromey <tom@tromey.com>
2378
2379 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2380 * frame.h (frame_cleanup_after_sniffer): Declare.
2381 (frame_prepare_for_sniffer): Return void.
2382 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2383 type of argument.
2384 (frame_prepare_for_sniffer): Return void.
2385
2386 2017-10-08 Tom Tromey <tom@tromey.com>
2387
2388 * utils.h (make_cleanup_value_free): Remove.
2389 * utils.c (do_value_free, struct cleanup): Remove.
2390 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2391 Use gdb_value_up.
2392 * value.h (struct value_deleter): New.
2393 (gdb_value_up): New typedef.
2394
2395 2017-10-08 Tom Tromey <tom@tromey.com>
2396
2397 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2398 (make_cleanup_free_search_symbols): Remove.
2399 (search_symbols): Return std::vector.
2400 (symbol_search::compare_search_syms): Now member of
2401 symbol_search. Change arguments.
2402 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2403 (symtab_symbol_info, rbreak_command): Update.
2404 * symtab.h (struct symbol_search) <next>: Remove.
2405 Add constructors.
2406 (symbol_search::operator<): New function.
2407 (symbol_search::operator==): New function.
2408 (search_symbols): Remove std::vector.
2409 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2410 (symbol_search::compare_search_syms): Declare.
2411
2412 2017-10-06 Yao Qi <yao.qi@linaro.org>
2413
2414 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2415 arch/aarch64-insn.o.
2416 Remove one rule.
2417 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2418
2419 2017-10-06 Yao Qi <yao.qi@linaro.org>
2420
2421 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2422 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2423 arch/arm-linux.o respectively.
2424 * configure.tgt: Likewise.
2425
2426 2017-10-06 Yao Qi <yao.qi@linaro.org>
2427
2428 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2429 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2430
2431 2017-10-06 Pedro Alves <palves@redhat.com>
2432
2433 * windows-nat.c: Include <algorithm>.
2434
2435 2017-10-06 Yao Qi <yao.qi@linaro.org>
2436
2437 * configure.tgt (i386_tobjs): New variable.
2438 (amd64_tobjs): New variable.
2439 Set $cpu_obs and $os_obs.
2440
2441 2017-10-06 Yao Qi <yao.qi@linaro.org>
2442
2443 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2444 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2445 (clean): Remove object files and dependency files.
2446 (distclean): Remove the directory.
2447 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2448 * configure: Re-generated.
2449 * configure.tgt: Replace amd64.o with arch/amd64.o.
2450
2451 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2452
2453 PR build/22188
2454 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2455 and SETEND.
2456
2457 2017-10-05 Pedro Alves <palves@redhat.com>
2458
2459 * linux-nat.c (linux_child_follow_fork): When following the parent
2460 and detaching the child, consult the parent thread's architecture
2461 instead of the child's.
2462
2463 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2464
2465 * ax.h: Do not include "doublest.h".
2466 (union agent_val): Remove.
2467
2468 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2469
2470 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2471 (decimal_to_string): Return std::string object.
2472 (decimal_from_string): Accept std::string object. Return bool.
2473 (decimal_from_integral, decimal_from_doublest): Remove.
2474 (decimal_from_longest): Add prototype.
2475 (decimal_from_ulongest): Likewise.
2476 (decimal_to_longest): Likewise.
2477 (decimal_from_doublest): Likewise.
2478 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2479 (MAX_DECIMAL_STRING): Move here.
2480 (decimal_to_string): Return std::string object.
2481 (decimal_from_string): Accept std::string object. Return bool.
2482 (decimal_from_integral): Remove, replace by ...
2483 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2484 (decimal_to_longest): New function.
2485 (decimal_from_floating): Remove, replace by ...
2486 (decimal_from_doublest): ... this new function.
2487 (decimal_to_doublest): Update to new decimal_to_string interface.
2488
2489 * value.c (unpack_long): Use decimal_to_longest.
2490 * valops.c (value_cast): Use decimal_from_doublest instead of
2491 decimal_from_floating. Use decimal_from_[u]longest isntead of
2492 decimal_from_integral.
2493 * valarith.c (value_args_as_decimal): Likewise.
2494 * valprint.c (print_decimal_floating): Update to new
2495 decimal_to_string interface.
2496 * printcmd.c (printf_decfloat): Likewise.
2497 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2498
2499 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2500
2501 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2502 * gdbtypes.c: Include "floatformat.h".
2503 * value.c: Likewise.
2504 * m68k-tdep.c: Likewise.
2505
2506 * findvar.c: Do not include "floatformat.h".
2507 * amd64-darwin-tdep.c: Likewise.
2508 * arm-linux-tdep.c: Likewise.
2509 * i386-darwin-tdep.c: Likewise.
2510 * i387-tdep.c: Likewise.
2511 * m68k-linux-tdep.c: Likewise.
2512 * mep-tdep.c: Likewise.
2513 * mips-tdep.c: Likewise.
2514 * nios2-tdep.c: Likewise.
2515 * s390-linux-tdep.c: Likewise.
2516 * sparc-obsd-tdep.c: Likewise.
2517 * sparc-tdep.c: Likewise.
2518 * sparc64-tdep.c: Likewise.
2519 * spu-tdep.c: Likewise.
2520 * tic6x-tdep.c: Likewise.
2521 * tilegx-tdep.c: Likewise.
2522 * vax-tdep.c: Likewise.
2523 * xstormy16-tdep.c: Likewise.
2524 * xtensa-tdep.c: Likewise.
2525
2526 * top.c: Do not include "doublest.h".
2527 * aarch64-tdep.c: Likewise.
2528 * alpha-tdep.c: Likewise.
2529 * arm-linux-tdep.c: Likewise.
2530 * m68k-linux-tdep.c: Likewise.
2531 * tilegx-tdep.c: Likewise.
2532 * xstormy16-tdep.c: Likewise.
2533
2534 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2535
2536 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2537 (mipsn32_fbsd_sigframe): Define.
2538 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2539 for FreeBSD/mipsn32.
2540
2541 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2542
2543 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2544 AT_HWCAP.
2545
2546 2017-10-05 Tristan Gingold <tgingold@free.fr>
2547
2548 * MAINTAINERS (Misc): Update my email address.
2549
2550 2017-10-04 Pedro Alves <palves@redhat.com>
2551
2552 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2553 it instead of target_gdbarch.
2554 (get_remote_state, get_remote_packet_size): Adjust
2555 get_remote_arch_state calls, passing down target_gdbarch
2556 explicitly.
2557 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2558 'gdbarch' and use it instead of target_gdbarch.
2559 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2560 passing down target_gdbarch explicitly.
2561 (struct stop_reply) <arch>: New field.
2562 (remote_parse_stop_reply): Use the stopped thread's architecture,
2563 not the current inferior's. Save the architecture in the
2564 stop_reply.
2565 (process_stop_reply): Use the stop reply's architecture.
2566 (process_g_packet, remote_fetch_registers)
2567 (remote_prepare_to_store, store_registers_using_G)
2568 (remote_store_registers): Adjust get_remote_arch_state calls,
2569 using the regcache's architecture.
2570 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2571 passing down target_gdbarch explicitly.
2572 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2573 beneath instead of calling target_gdbarch.
2574 * target.c (default_thread_architecture): Use the specified
2575 inferior's architecture, instead of the current inferior's
2576 architecture (via target_gdbarch).
2577
2578 2017-10-04 Pedro Alves <palves@redhat.com>
2579
2580 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2581 case.
2582 (regcache_print): Handle !target_has_registers here instead.
2583
2584 2017-10-04 Pedro Alves <palves@redhat.com>
2585
2586 * frame.c (create_test_frame): Delete.
2587 * frame.h (create_test_frame): Delete.
2588 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2589 (class regcache_test): Delete.
2590 (test_target_has_registers, test_target_has_stack)
2591 (test_target_has_memory, test_target_prepare_to_store)
2592 (test_target_store_registers): New functions.
2593 (test_target_ops): New class.
2594 (register_to_value_test): Error out if there's already a
2595 process_stratum (or higher) target pushed. Create a fuller mock
2596 environment, with mock target_ops, inferior, address space, thread
2597 and inferior_ptid.
2598 * progspace.c (struct address_space): Move to ...
2599 * progspace.h (struct address_space): ... here.
2600 * regcache.h (regcache::~regcache, regcache::raw_write)
2601 [GDB_SELF_TEST]: No longer virtual.
2602
2603 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2604
2605 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2606
2607 2017-10-04 Pedro Alves <palves@redhat.com>
2608
2609 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2610 out of 'between TRY and CATCH'.
2611
2612 2017-10-04 Pedro Alves <palves@redhat.com>
2613
2614 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2615 * common/common-exceptions.h (TRY): Open an outermost scope.
2616 Expand intro comment.
2617 (CATCH): Reindent.
2618 (END_CATCH): Close the outermost scope.
2619 * completer.c (complete_line_internal): Add missing END_CATCH.
2620
2621 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2622
2623 * NEWS (Changes since GDB 8.0): Add entry about new
2624 'set-cwd-on-gdbserver' feature.
2625 (New remote packets): Add entry for QSetWorkingDir.
2626 * common/common-inferior.h (set_inferior_cwd): New prototype.
2627 * infcmd.c (set_inferior_cwd): Remove "static".
2628 (show_cwd_command): Expand text to include remote debugging.
2629 * remote.c: Add PACKET_QSetWorkingDir.
2630 (remote_protocol_features) <QSetWorkingDir>: New entry for
2631 PACKET_QSetWorkingDir.
2632 (extended_remote_set_inferior_cwd): New function.
2633 (extended_remote_create_inferior): Call
2634 "extended_remote_set_inferior_cwd".
2635 (_initialize_remote): Call "add_packet_config_cmd" for
2636 QSetWorkingDir.
2637
2638 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2639
2640 * NEWS (New commands): Mention "set/show cwd".
2641 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2642 "cd" command's help text.
2643 * common/common-inferior.h (get_inferior_cwd): New prototype.
2644 * infcmd.c (inferior_cwd_scratch): New global variable.
2645 (set_inferior_cwd): New function.
2646 (get_inferior_cwd): Likewise.
2647 (set_cwd_command): Likewise.
2648 (show_cwd_command): Likewise.
2649 (_initialize_infcmd): Add "set/show cwd" commands.
2650 * inferior.h (class inferior) <cwd>: New field.
2651 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2652 (fork_inferior): Change inferior's cwd before its execution.
2653 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2654 to CreateProcess.
2655
2656 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2657
2658 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2659 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2660 (COMMON_OBS): Add gdb_tilde_expand.o.
2661 * common/gdb_tilde_expand.c: New file.
2662 * common/gdb_tilde_expand.h: Likewise.
2663
2664 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2665
2666 * gdbarch.sh (objfile): Remove duplicate declaration.
2667 * gdbarch.h: Regenerate.
2668
2669 2017-10-03 Tom Tromey <tom@tromey.com>
2670
2671 * utils.c (internal_vproblem): Use string_vprintf.
2672
2673 2017-10-03 Tom Tromey <tom@tromey.com>
2674
2675 * printcmd.c (info_symbol_command): Use std::string.
2676
2677 2017-10-03 Tom Tromey <tom@tromey.com>
2678
2679 * top.c (gdb_safe_append_history): Use std::string.
2680
2681 2017-10-03 Tom Tromey <tom@tromey.com>
2682
2683 * event-top.c (stdin_event_handler): Update.
2684 * main.c (captured_main_1): Update.
2685 * top.h (make_delete_ui_cleanup): Remove.
2686 (struct ui): Add constructor and destructor.
2687 (new_ui, delete_ui): Remove.
2688 * top.c (make_delete_ui_cleanup): Remove.
2689 (new_ui_command): Use std::unique_ptr.
2690 (delete_ui_cleanup): Remove.
2691 (ui::ui): Rename from new_ui. Update.
2692 (free_ui): Remove.
2693 (ui::~ui): Rename from delete_ui. Update.
2694
2695 2017-10-03 Tom Tromey <tom@tromey.com>
2696
2697 * symfile.c (load_progress): Use gdb::byte_vector.
2698
2699 2017-10-03 Tom Tromey <tom@tromey.com>
2700
2701 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2702 declaration.
2703 * printcmd.c (x_command): Remove unused declaration.
2704 * symfile.c (symbol_file_command): Remove unused declaration.
2705
2706 2017-10-03 Tom Tromey <tom@tromey.com>
2707
2708 * utils.c (internal_vproblem): Use std::string.
2709 (defaulted_query): Likewise.
2710
2711 2017-10-03 Tom Tromey <tom@tromey.com>
2712
2713 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2714 * top.c (execute_command_to_string): Update.
2715 * utils.c (make_cleanup_restore_page_info): Remove.
2716 (do_restore_page_info_cleanup): Remove.
2717 (set_batch_flag_and_restore_page_info):
2718 New.
2719 (make_cleanup_restore_page_info): Remove.
2720 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2721 (~set_batch_flag_and_restore_page_info): New
2722 (make_cleanup_restore_uinteger): Remove.
2723 (make_cleanup_restore_integer): Remove.
2724 (struct restore_integer_closure): Remove.
2725 (restore_integer): Remove.
2726 * utils.h (struct set_batch_flag_and_restore_page_info): New
2727 class.
2728 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2729 (make_cleanup_restore_page_info): Remove.
2730 (make_cleanup_restore_uinteger) Remove.
2731 (make_cleanup_restore_integer) Remove.
2732
2733 2017-10-03 Tom Tromey <tom@tromey.com>
2734
2735 * record-full.h (record_full_gdb_operation_disable_set): Return
2736 scoped_restore_tmpl<int>.
2737 * infrun.c (adjust_pc_after_break): Update.
2738 (handle_signal_stop): Update.
2739 * record-full.c (record_full_gdb_operation_disable_set): Return
2740 scoped_restore_tmpl<int>.
2741 (record_full_wait_1, record_full_insert_breakpoint)
2742 (record_full_remove_breakpoint, record_full_save)
2743 (record_full_goto_insn): Update.
2744
2745 2017-10-02 Tom Tromey <tom@tromey.com>
2746
2747 PR rust/22236:
2748 * rust-lang.c (rust_val_print_str): New function.
2749 (val_print_struct): Call it.
2750 (rust_subscript): Preserve name of slice type.
2751
2752 2017-10-02 Tom Tromey <tom@tromey.com>
2753
2754 * rust-lang.c (rust_subscript): Handle slices in
2755 EVAL_AVOID_SIDE_EFFECTS case.
2756
2757 2017-10-02 Tom Tromey <tom@tromey.com>
2758
2759 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2760
2761 2017-10-02 Tom Tromey <tom@tromey.com>
2762
2763 * rust-lang.h (rust_slice_type): Add "extern".
2764
2765 2017-10-02 Tom Tromey <tom@tromey.com>
2766 Pedro Alves <palves@redhat.com>
2767
2768 * ada-lang.h (ada_exc_info::operator<): Make const.
2769 (ada_exc_info::operator==): Make const.
2770 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2771 Make const.
2772
2773 2017-09-29 Tom Tromey <tom@tromey.com>
2774
2775 * target.c (read_whatever_is_readable): Change type of "result".
2776 Update.
2777 (free_memory_read_result_vector): Remove.
2778 (read_memory_robust): Change return type. Update.
2779 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2780 bin2hex, std::string.
2781 * target.h (memory_read_result_s): Remove typedef.
2782 (free_memory_read_result_vector): Remove.
2783 (read_memory_robust): Return std::vector.
2784
2785 2017-09-29 Tom Tromey <tom@tromey.com>
2786
2787 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2788
2789 2017-09-29 Tom Tromey <tom@tromey.com>
2790
2791 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2792 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2793 operator< and operator==.
2794 (ada_exceptions_list): Return a std::vector.
2795 * ada-lang.c (ada_exc_info::operator<): Rename from
2796 compare_ada_exception_info.
2797 (ada_exc_info::operator==): New.
2798 (sort_remove_dups_ada_exceptions_list): Change type of
2799 "exceptions".
2800 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2801 (ada_add_global_exceptions): Likewise.
2802 (ada_exceptions_list_1): Return a std::vector.
2803 (ada_exceptions_list): Likewise.
2804
2805 2017-09-29 Tom Tromey <tom@tromey.com>
2806
2807 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2808 'std::set *'.
2809 (print_one_inferior): Update.
2810 (free_vector_of_ints): Remove.
2811 (list_available_thread_groups): Change "ids" to std::set.
2812 (mi_cmd_list_thread_groups): Update.
2813 (struct collect_cores_data) <core>: Now a std::set.
2814 (collect_cores): Update.
2815 (unique): Remove.
2816 (print_one_inferior): Update.
2817
2818 2017-09-29 Tom Tromey <tom@tromey.com>
2819
2820 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2821 (mi_execute_async_cli_command): Likewise.
2822 (mi_cmd_trace_frame_collected): Use field_fmt.
2823
2824 2017-09-29 Tom Tromey <tom@tromey.com>
2825
2826 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2827 gdb::byte_vector.
2828
2829 2017-09-29 Tom Tromey <tom@tromey.com>
2830
2831 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2832
2833 2017-09-29 Tom Tromey <tom@tromey.com>
2834
2835 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2836
2837 2017-09-29 Tom Tromey <tom@tromey.com>
2838
2839 * varobj.h (varobj_gen_name): Return std::string.
2840 * varobj.c (varobj_gen_name): Return std::string.
2841 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2842 (mi_cmd_var_delete): Don't copy "name".
2843
2844 2017-09-29 Tom Tromey <tom@tromey.com>
2845
2846 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2847 (mi_cmd_break_insert_1): Update.
2848
2849 2017-09-29 Tom Tromey <tom@tromey.com>
2850
2851 * target.h (make_scoped_defer_target_commit_resume): Update.
2852 * target.c (make_scoped_defer_target_commit_resume): Rename from
2853 make_cleanup_defer_target_commit_resume. Return a
2854 scoped_restore.
2855 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2856
2857 2017-09-29 Tom Tromey <tom@tromey.com>
2858
2859 * main.c (captured_main_1): Remove unused declaration.
2860 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2861
2862 2017-09-29 Tom Tromey <tom@tromey.com>
2863
2864 * symtab.c (search_symbols): Remove unused outer cleanup.
2865 (make_source_files_completion_list): Remove unused declaration.
2866
2867 2017-09-29 Tom Tromey <tom@tromey.com>
2868
2869 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2870
2871 2017-09-29 Tom Tromey <tom@tromey.com>
2872
2873 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2874 gdb::byte_vector.
2875
2876 2017-09-29 Tom Tromey <tom@tromey.com>
2877
2878 * complaints.c (vcomplaint): Use std::string.
2879
2880 2017-09-29 Tom Tromey <tom@tromey.com>
2881
2882 * tracepoint.c (trace_variable_command): Use std::string.
2883 (encode_actions_1): Remove unused declarations.
2884 (create_tsv_from_upload): Use std::string.
2885
2886 2017-09-29 Tom Tromey <tom@tromey.com>
2887
2888 * cp-support.c (gdb_demangle): Use std::string.
2889
2890 2017-09-29 Tom Tromey <tom@tromey.com>
2891
2892 * stack.c (parse_frame_specification): Use std::string
2893 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2894
2895 2017-09-29 Tom Tromey <tom@tromey.com>
2896
2897 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2898
2899 2017-09-29 Tom Tromey <tom@tromey.com>
2900
2901 * utils.c (vfprintf_maybe_filtered): Use std::string.
2902 (vfprintf_unfiltered): Likewise.
2903
2904 2017-09-29 Tom Tromey <tom@tromey.com>
2905
2906 * event-top.c (top_level_prompt): Return std::string.
2907 (display_gdb_prompt): Update.
2908
2909 2017-09-29 Tom Tromey <tom@tromey.com>
2910
2911 * unittests/common-utils-selftests.c (format): New function.
2912 (string_vprintf_tests): New function.
2913 (_initialize_common_utils_selftests): Register new tests.
2914 * common/common-utils.c (string_vprintf): New function.
2915 * common/common-utils.h (string_vprintf): Declare.
2916
2917 2017-09-29 Pedro Alves <palves@redhat.com>
2918
2919 * common/rsp-low.c (unpack_varlen_hex): Constify.
2920 * common/rsp-low.h (unpack_varlen_hex): Constify.
2921 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2922 Constify.
2923 * remote.c (remote_set_permissions, read_ptid)
2924 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2925 (remote_static_tracepoint_marker_at)
2926 (remote_static_tracepoint_markers_by_strid)
2927 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2928 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2929 (parse_tracepoint_definition, parse_tsv_definition)
2930 (parse_static_tracepoint_marker_definition): Constify.
2931 * tracepoint.h (parse_static_tracepoint_marker_definition)
2932 (parse_trace_status, parse_tracepoint_status)
2933 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2934
2935 2017-09-29 Pedro Alves <palves@redhat.com>
2936
2937 * remote.c (target_buf, target_buf_size): Delete.
2938 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2939 Use the connection's packet buffer instead.
2940 All callers adjusted.
2941 (_initialize_remote): Remove references to target_buf and
2942 target_buf_size.
2943
2944 2017-09-28 Pedro Alves <palves@redhat.com>
2945
2946 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2947 unittests/common-utils-selftests.c.
2948 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2949 (COMMON_OBS): Remove utils-selftests.o.
2950 * utils-selftests.c: Move to ...
2951 * unittests/common-utils-selftests.c: ... here and rename self
2952 test to "string_printf".
2953
2954 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2955
2956 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2957 having NULL cus or tus.
2958
2959 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2960
2961 * arm-tdep.c: (convert_from_extended): Remove.
2962 (convert_to_extended): Likewise.
2963 (arm_extract_return_value): Use convert_typed_floating.
2964 (arm_store_return_value): Likewise.
2965
2966 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2967 * sh-tdep.c: Do not include "floatformat.h".
2968 (sh_littlebyte_bigword_type): New function.
2969 (sh_register_convert_to_virtual): Use convert_typed_floating.
2970 (sh_register_convert_to_raw): Likewise.
2971 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2972 (sh64_littlebyte_bigword_type): New function.
2973 (sh64_extract_return_value): Use convert_typed_floating.
2974 (sh64_register_convert_to_virtual): Likewise.
2975 (sh64_register_convert_to_raw): Likewise.
2976
2977 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2978
2979 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2980 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2981
2982 * gdbtypes.h (union type_specific): Make field floatformat hold
2983 just a single struct floatformat, not an array.
2984 (floatformat_from_type): Move here.
2985 * gdbtypes.c (floatformat_from_type): Move here. Update to
2986 changed TYPE_FLOATFORMAT definition.
2987 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2988 (recursive_dump_type): Likewise.
2989 (init_float_type): Install correct floatformat for byte order.
2990 (arch_float_type): Likewise.
2991
2992 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2993
2994 * gdbtypes.c (init_type): Change incoming argument from
2995 length-in-bytes to length-in-bits. Assert length is a
2996 multiple of TARGET_CHAR_BITS.
2997 (arch_type, arch_flags_type): Likewise.
2998 (init_integer_type): Update call to init_type.
2999 (init_character_type): Likewise.
3000 (init_boolean_type): Likewise.
3001 (init_float_type): Likewise.
3002 (init_decfloat_type): Likewise.
3003 (init_complex_type): Likewise.
3004 (init_pointer_type): Likewise.
3005 (objfile_type): Likewise.
3006 (arch_integer_type): Update call to arch_type.
3007 (arch_character_type): Likewise.
3008 (arch_boolean_type): Likewise.
3009 (arch_float_type): Likewise.
3010 (arch_decfloat_type): Likewise.
3011 (arch_complex_type): Likewise.
3012 (arch_pointer_type): Likewise.
3013 (gdbtypes_post_init): Likewise.
3014
3015 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3016 (read_base_type): Likewise.
3017 * mdebugread.c (basic_type): Likewise.
3018 * stabsread.c (dbx_init_float_type): Likewise.
3019 (rs6000_builtin_type): Likewise.
3020 (read_range_type): Likewise. Also, fix call to init_integer_type
3021 with erroneous length argument.
3022
3023 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3024 * d-lang.c (build_d_types): Likewise.
3025 * f-lang.c (build_fortran_types): Likewise.
3026 * go-lang.c (build_go_types): Likewise.
3027 * opencl-lang.c (build_opencl_types): Likewise.
3028 * jit.c (finalize_symtab): Likewise.
3029 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3030 (build_std_type_info_type): Likewise.
3031 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3032 update call to arch_flags_type.
3033
3034 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3035 arch_type.
3036 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3037 * windows-tdep.c (windows_get_tlb_type): Likewise.
3038
3039 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3040 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3041 * m32c-tdep.c (make_types): Likewise.
3042 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3043 (rl78_psw_type): Update call to arch_flags_type.
3044 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3045 * rx-tdep.c (rx_psw_type): Likewise.
3046 (rx_fpsw_type): Likewise.
3047 * sparc-tdep.c (sparc_psr_type): Likewise.
3048 (sparc_fsr_type): Likewise.
3049 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3050 (sparc64_ccr_type): Likewise.
3051 (sparc64_fsr_type): Likewise.
3052 (sparc64_fprs_type): Likewise.
3053
3054 2017-09-27 Tom Tromey <tom@tromey.com>
3055
3056 * findcmd.c (find_command): Constify.
3057
3058 2017-09-27 Tom Tromey <tom@tromey.com>
3059
3060 * ada-tasks.c (task_command_1, task_command): Constify.
3061
3062 2017-09-27 Tom Tromey <tom@tromey.com>
3063
3064 * symtab.c (maintenance_print_symbol_cache)
3065 (maintenance_flush_symbol_cache)
3066 (maintenance_print_symbol_cache_statistics): Constify.
3067
3068 2017-09-27 Tom Tromey <tom@tromey.com>
3069
3070 * inferior.c (detach_inferior_command, kill_inferior_command)
3071 (inferior_command): Constify.
3072
3073 2017-09-27 Tom Tromey <tom@tromey.com>
3074
3075 * regcache.c (regcache_print, maintenance_print_registers)
3076 (maintenance_print_raw_registers)
3077 (maintenance_print_cooked_registers)
3078 (maintenance_print_register_groups)
3079 (maintenance_print_remote_registers): Constify.
3080
3081 2017-09-27 Tom Tromey <tom@tromey.com>
3082
3083 * printcmd.c (map_display_numbers, undisplay_command)
3084 (enable_disable_display_command, enable_display_command)
3085 (disable_display_command): Constify.
3086
3087 2017-09-27 Tom Tromey <tom@tromey.com>
3088
3089 * breakpoint.h (delete_command): Don't declare.
3090 * breakpoint.c (delete_command, enable_once_command)
3091 (enable_count_command, enable_delete_command, breakpoint_1)
3092 (maintenance_info_breakpoints, stopin_command, stopat_command)
3093 (delete_command, delete_trace_command, save_breakpoints)
3094 (save_breakpoints_command, save_tracepoints_command): Constify.
3095
3096 2017-09-27 Tom Tromey <tom@tromey.com>
3097
3098 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3099 (skip_ws, extract_identifier, macro_define_command)
3100 (macro_undef_command, macro_list_command): Constify.
3101
3102 2017-09-27 Tom Tromey <tom@tromey.com>
3103
3104 * infcmd.c (environment_info, set_environment_command)
3105 (unset_environment_command, path_info, info_proc_cmd_1)
3106 (info_proc_cmd_mappings, info_proc_cmd_stat)
3107 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3108 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3109
3110 2017-09-27 Tom Tromey <tom@tromey.com>
3111
3112 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3113 Constify.
3114
3115 2017-09-27 Tom Tromey <tom@tromey.com>
3116
3117 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3118
3119 2017-09-27 Tom Tromey <tom@tromey.com>
3120
3121 * demangle.c (demangle_command): Constify.
3122
3123 2017-09-27 Tom Tromey <tom@tromey.com>
3124
3125 * progspace.c (maintenance_info_program_spaces_command):
3126 Constify.
3127
3128 2017-09-27 Tom Tromey <tom@tromey.com>
3129
3130 * compile/compile.c (check_raw_argument, compile_file_command)
3131 (compile_code_command, compile_print_command): Constify.
3132
3133 2017-09-27 Tom Tromey <tom@tromey.com>
3134
3135 * reggroups.c (maintenance_print_reggroups): Constify.
3136
3137 2017-09-27 Tom Tromey <tom@tromey.com>
3138
3139 * dwarf2read.c (save_gdb_index_command): Constify.
3140
3141 2017-09-27 Tom Tromey <tom@tromey.com>
3142
3143 * stap-probe.c (info_probes_stap_command): Constify.
3144
3145 2017-09-27 Tom Tromey <tom@tromey.com>
3146
3147 * fork-child.c (unset_exec_wrapper_command): Constify.
3148
3149 2017-09-27 Tom Tromey <tom@tromey.com>
3150
3151 * btrace.c (get_uint, get_context_size, no_chunk)
3152 (maint_btrace_packet_history_cmd)
3153 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3154 (maint_info_btrace_cmd): Constify.
3155
3156 2017-09-27 Tom Tromey <tom@tromey.com>
3157
3158 * reverse.c (delete_bookmark_command): Constify.
3159
3160 2017-09-27 Tom Tromey <tom@tromey.com>
3161
3162 * remote.c (set_memory_packet_size)
3163 (set_memory_write_packet_size, show_memory_write_packet_size)
3164 (set_memory_read_packet_size, show_memory_read_packet_size)
3165 (compare_sections_command, packet_command, remote_put_command)
3166 (remote_get_command, remote_delete_command): Constify.
3167
3168 2017-09-27 Tom Tromey <tom@tromey.com>
3169
3170 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3171 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3172 (set_mipsfpu_auto_command): Constify.
3173
3174 2017-09-27 Tom Tromey <tom@tromey.com>
3175
3176 * cli/cli-cmds.h (cd_command): Constify.
3177 * cli/cli-cmds.c (cd_command): Constify.
3178
3179 2017-09-27 Tom Tromey <tom@tromey.com>
3180
3181 * thread.c (thread_name_command, thread_find_command): Constify.
3182
3183 2017-09-27 Tom Tromey <tom@tromey.com>
3184
3185 * probe.c (enable_probes_command, disable_probes_command):
3186 Constify.
3187
3188 2017-09-27 Tom Tromey <tom@tromey.com>
3189
3190 * symfile.c (symbol_file_command): Constify.
3191 * gdbcore.h (deprecated_file_changed_hook): Constify.
3192 * exec.c (deprecated_file_changed_hook, exec_file_command)
3193 (file_command): Constify.
3194 * defs.h (symbol_file_command): Constify.
3195
3196 2017-09-27 Tom Tromey <tom@tromey.com>
3197
3198 * remote-fileio.c (set_system_call_allowed)
3199 (show_system_call_allowed): Constify.
3200
3201 2017-09-27 Tom Tromey <tom@tromey.com>
3202
3203 * tracepoint.c (delete_trace_variable_command)
3204 (tfind_end_command, tfind_start_command, tfind_pc_command)
3205 (tfind_tracepoint_command, tfind_line_command)
3206 (tfind_range_command, tfind_outside_command): Constify.
3207
3208 2017-09-27 Tom Tromey <tom@tromey.com>
3209
3210 * ax-gdb.c (maint_agent_printf_command, agent_command)
3211 (agent_eval_command): Constify.
3212
3213 2017-09-27 Tom Tromey <tom@tromey.com>
3214
3215 * tracepoint.c (info_scope_command): Constify.
3216 * python/python.c (gdbpy_decode_line): Constify.
3217 * python/py-breakpoint.c (bppy_init): Constify.
3218 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3219 * location.h: (new_linespec_location)
3220 (string_to_event_location_basic, string_to_event_location):
3221 Constify.
3222 * location.c (new_linespec_location)
3223 (string_to_event_location_basic, string_to_event_location):
3224 Constify.
3225 * linespec.h (decode_line_with_current_source)
3226 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3227 * linespec.c (linespec_lex_to_end)
3228 (decode_line_with_current_source)
3229 (decode_line_with_last_displayed): Constify.
3230 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3231 Constify.
3232 * cli/cli-cmds.c (edit_command, list_command): Constify.
3233 * breakpoint.h (until_break_command, watch_command_wrapper)
3234 (awatch_command_wrapper, rwatch_command_wrapper)
3235 (init_ada_exception_breakpoint): Constify.
3236 * breakpoint.c (break_command_1, dprintf_command)
3237 (break_range_command, watch_command_wrapper)
3238 (rwatch_command_wrapper, awatch_command_wrapper)
3239 (until_break_command, init_ada_exception_breakpoint)
3240 (strace_marker_create_sals_from_location, trace_command)
3241 (ftrace_command, strace_command, struct tracepoint): Constify.
3242 * ax-gdb.c (agent_command_1): Constify.
3243 * ada-lang.c (ada_exception_sal): Constify.
3244
3245 2017-09-27 Tom Tromey <tom@tromey.com>
3246
3247 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3248 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3249 (get_context_size, no_chunk, get_insn_history_modifiers)
3250 (cmd_record_insn_history, get_call_history_modifiers)
3251 (cmd_record_call_history): Constify.
3252
3253 2017-09-27 Tom Tromey <tom@tromey.com>
3254
3255 * source.c (show_substitute_path_command)
3256 (unset_substitute_path_command, set_substitute_path_command):
3257 Constify.
3258
3259 2017-09-27 Tom Tromey <tom@tromey.com>
3260
3261 * typeprint.c (maintenance_print_type): Constify.
3262 * maint.c (maintenance_dump_me, maintenance_demangle)
3263 (maintenance_time_display, maintenance_info_sections)
3264 (maintenance_print_statistics, maintenance_deprecate)
3265 (maintenance_undeprecate): Constify.
3266 (maintenance_do_deprecate): Constify. Use std::string.
3267 (maintenance_selftest): Constify.
3268 * gdbtypes.h (maintenance_print_type): Constify.
3269
3270 2017-09-27 Tom Tromey <tom@tromey.com>
3271
3272 * hppa-tdep.c (unwind_command): Constify.
3273
3274 2017-09-27 Tom Tromey <tom@tromey.com>
3275
3276 * target-descriptions.c (unset_tdesc_filename_cmd)
3277 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3278 Constify.
3279
3280 2017-09-27 Tom Tromey <tom@tromey.com>
3281
3282 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3283
3284 2017-09-27 Tom Tromey <tom@tromey.com>
3285
3286 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3287
3288 2017-09-27 Tom Tromey <tom@tromey.com>
3289
3290 * tui/tui-regs.c (tui_reg_command): Constify.
3291
3292 2017-09-27 Tom Tromey <tom@tromey.com>
3293
3294 * skip.c (skip_file_command, skip_function_command)
3295 (skip_enable_command, skip_disable_command, skip_delete_command):
3296 Constify.
3297
3298 2017-09-27 Tom Tromey <tom@tromey.com>
3299
3300 * record-btrace.c (cmd_record_btrace_bts_start)
3301 (cmd_record_btrace_pt_start): Constify.
3302
3303 2017-09-27 Tom Tromey <tom@tromey.com>
3304
3305 * symmisc.c (maintenance_print_symbols)
3306 (maintenance_print_msymbols, maintenance_print_objfiles)
3307 (maintenance_info_symtabs, maintenance_check_symtabs)
3308 (maintenance_expand_symtabs, maintenance_info_line_tables):
3309 Constify.
3310
3311 2017-09-27 Tom Tromey <tom@tromey.com>
3312
3313 * top.c (new_ui_command): Constify.
3314
3315 2017-09-27 Tom Tromey <tom@tromey.com>
3316
3317 * symfile.c (add_symbol_file_command)
3318 (remove_symbol_file_command, list_overlays_command)
3319 (map_overlay_command, unmap_overlay_command)
3320 (overlay_auto_command, overlay_manual_command)
3321 (overlay_off_command, overlay_load_command): Constify.
3322
3323 2017-09-27 Tom Tromey <tom@tromey.com>
3324
3325 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3326 (info_spu_mailbox_command, info_spu_dma_command)
3327 (info_spu_proxydma_command): Constify.
3328
3329 2017-09-27 Tom Tromey <tom@tromey.com>
3330
3331 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3332
3333 2017-09-27 Tom Tromey <tom@tromey.com>
3334
3335 * cli/cli-script.c (user_defined_command): Constify.
3336
3337 2017-09-27 Tom Tromey <tom@tromey.com>
3338
3339 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3340 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3341 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3342 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3343 (dump_binary_value, append_binary_memory, append_binary_value):
3344 Constify.
3345 (struct dump_context) <func>: Constify.
3346 (add_dump_command): Update.
3347
3348 2017-09-27 Tom Tromey <tom@tromey.com>
3349
3350 * cli/cli-cmds.c (show_version, show_configuration)
3351 (source_command, show_user): Constify.
3352
3353 2017-09-27 Tom Tromey <tom@tromey.com>
3354
3355 * target.c (maintenance_print_target_stack): Constify.
3356
3357 2017-09-27 Tom Tromey <tom@tromey.com>
3358
3359 * interps.c (interpreter_exec_cmd): Constify.
3360
3361 2017-09-27 Tom Tromey <tom@tromey.com>
3362
3363 * record-full.c (cmd_record_full_restore): Constify.
3364
3365 2017-09-27 Tom Tromey <tom@tromey.com>
3366
3367 * memattr.c (enable_mem_command, disable_mem_command)
3368 (delete_mem_command): Constify.
3369
3370 2017-09-27 Tom Tromey <tom@tromey.com>
3371
3372 * value.c (show_convenience): Constify.
3373
3374 2017-09-27 Tom Tromey <tom@tromey.com>
3375
3376 * gdbcore.h (core_file_command): Update.
3377 * corefile.c (core_file_command): Constify.
3378
3379 2017-09-27 Tom Tromey <tom@tromey.com>
3380
3381 * user-regs.c (maintenance_print_user_registers): Constify.
3382
3383 2017-09-27 Tom Tromey <tom@tromey.com>
3384
3385 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3386
3387 2017-09-27 Tom Tromey <tom@tromey.com>
3388
3389 * cp-support.c (first_component_command): Constify.
3390
3391 2017-09-27 Tom Tromey <tom@tromey.com>
3392
3393 * psymtab.c (maintenance_print_psymbols)
3394 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3395 Constify.
3396
3397 2017-09-27 Tom Tromey <tom@tromey.com>
3398
3399 * windows-tdep.c (display_tib): Constify.
3400
3401 2017-09-27 Tom Tromey <tom@tromey.com>
3402
3403 * linux-fork.c (delete_checkpoint_command)
3404 (detach_checkpoint_command): Constify.
3405
3406 2017-09-27 Tom Tromey <tom@tromey.com>
3407
3408 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3409
3410 2017-09-27 Tom Tromey <tom@tromey.com>
3411
3412 * arc-tdep.c (dump_arc_instruction_command): Constify.
3413
3414 2017-09-27 Tom Tromey <tom@tromey.com>
3415
3416 * valprint.c (set_radix, show_radix): Constify.
3417
3418 2017-09-27 Tom Tromey <tom@tromey.com>
3419
3420 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3421
3422 2017-09-27 Tom Tromey <tom@tromey.com>
3423
3424 * command.h (not_just_help_class_command): Update.
3425 * cli/cli-decode.h (not_just_help_class_command): Update.
3426 * cli/cli-decode.c (not_just_help_class_command): Constify.
3427
3428 2017-09-27 Tom Tromey <tom@tromey.com>
3429
3430 * gdb_bfd.c (maintenance_info_bfds): Constify.
3431
3432 2017-09-27 Tom Tromey <tom@tromey.com>
3433
3434 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3435 overloads.
3436 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3437 (do_const_cfunc): New function.
3438 (cmd_cfunc_eq): New overload.
3439 (cli_user_command_p): Check do_const_cfunc.
3440 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3441 const_cfunc.
3442 * command.h (add_cmd): Add const overload and no-function
3443 overload.
3444 (set_cmd_cfunc): Add const overload.
3445 (cmd_const_cfunc_ftype): Declare.
3446 (cmd_cfunc_eq): Add const overload.
3447 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3448 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3449 overload.
3450
3451 2017-09-27 Tom Tromey <tom@tromey.com>
3452
3453 * macroexp.c (get_next_token_for_substitution): New function.
3454 (substitute_args): Call it. Check for __VA_OPT__.
3455
3456 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3457 Pedro Alves <palves@redhat.com>
3458
3459 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3460 producer_is_icc_lt_14.
3461 (producer_is_icc_lt_14): New function.
3462 (check_producer): Add code for checking version of ICC.
3463 (producer_is_icc): Move to producer.c.
3464 (read_structure_type): Restrict ICC workaround to ICC<14.
3465 * producer.c: Include selftest.h.
3466 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3467 New functions.
3468 * producer.h (producer_is_icc): New declaration.
3469
3470 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3471
3472 * Makefile.in (SFILES): Add producer.c.
3473 (COMMON_OBS): Add producer.o
3474 * amd64-tdep.c (producer.h): Add new include.
3475 * dwarf2read.c (producer.h): Add new include.
3476 * producer.c: New file.
3477 * producer.h: New file.
3478 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3479 producer.c.
3480 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3481 producer.h.
3482
3483 2017-09-26 Matthias Klose <doko@ubuntu.com>
3484
3485 * configure.ac: Search ncursesw before ncurses.
3486 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3487 * gdb_curses.h: Include <ncursesw/ncurses.h>
3488 * config.in, configure: Regenerate.
3489
3490 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3491
3492 PR gdb/22185
3493 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3494 obsolete.
3495 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3496 Remove i386sol2 support.
3497 * configure.nat <i386sol2>: Remove.
3498 <sol2-64>: Fold into ...
3499 <sol2>: ... this.
3500 Move common settings to default section.
3501 Add sol-thread.o.
3502 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3503 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3504 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3505 <i[34567]86-*-solaris*>: Remove.
3506 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3507
3508 * configure.ac: Remove wctype in libw check.
3509 (_MSE_INT_H): Don't define on Solaris 7-9.
3510 <solaris*>: Remove libthread_db.so.1 check.
3511 * configure: Regenerate.
3512 * config.in: Regenerate.
3513
3514 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3515 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3516 (gdb_ps_size_t): Remove.
3517 Use base types in users.
3518 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3519
3520 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3521
3522 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3523
3524 PR build/22206
3525 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3526 (adi_is_addr_mapped): Likewise.
3527 (PSR_ICC): Don't redefine.
3528 (PSR_IMPL): Likewise.
3529
3530 2017-09-25 Tom Tromey <tom@tromey.com>
3531
3532 * regcache.c (regcache::dump): Use string_printf.
3533
3534 2017-09-25 Tom Tromey <tom@tromey.com>
3535
3536 * regcache.c (class regcache_invalidator): New.
3537 (struct register_to_invalidate): Remove.
3538 (make_cleanup_regcache_invalidate): Remove.
3539 (regcache::raw_write): Use regcache_invalidator.
3540
3541 2017-09-25 Tom Tromey <tom@tromey.com>
3542
3543 * spu-tdep.c (spu2ppu_sniffer): Update.
3544 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3545 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3546 Remove.
3547 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3548 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3549 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3550 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3551 (frame_pop): Update.
3552
3553 2017-09-25 Tom Tromey <tom@tromey.com>
3554
3555 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3556 * regcache.h (regcache_xfree): Don't declare.
3557 * regcache.c (regcache_xfree): Remove.
3558 (do_regcache_xfree): Use delete.
3559 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3560 * linux-fork.c (free_fork): Use delete.
3561 (fork_save_infrun_state): Likewise.
3562 * jit.c (jit_dealloc_cache): Use delete.
3563 * infrun.c (discard_infcall_suspend_state): Use delete.
3564
3565 2017-09-25 Tom Tromey <tom@tromey.com>
3566
3567 * regcache.h (regcache_xmalloc): Don't declare.
3568 (regcache_raw_set_cached_value): Update comment.
3569 * regcache.c (regcache_xmalloc): Remove.
3570 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3571 * jit.c (jit_frame_sniffer): Use new.
3572 * frame.c (frame_save_as_regcache): Use new.
3573
3574 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3575
3576 * NEWS: Advertise support for guarded-storage registers on IBM z.
3577
3578 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3579
3580 * s390-linux-nat.c (have_regset_gs): New static variable.
3581 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3582 control block and guarded-storage broadcast control regsets.
3583 (s390_read_description): Detect whether the target has
3584 guarded-storage support, return appropriate tdesc.
3585 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3586 (features/s390x-gs-linux64.c): Likewise.
3587 (struct gdbarch_tdep) <have_gs>: New field.
3588 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3589 (s390_gsbc_regset): New variables.
3590 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3591 and s390_gsbc_regset, if applicable.
3592 (s390_core_read_description): Check whether core file was from a
3593 target with guarded-storage support; include appropriate regsets.
3594 (s390_gdbarch_init): Add registers for guarded-storage support.
3595 (_initialize_s390_tdep): Initialize new target descriptions that
3596 include registers for guarded-storage support.
3597 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3598 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3599 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3600 (S390_NUM_REGS): Adjust macro definition.
3601 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3602 (tdesc_s390x_gs_linux64): New declarations.
3603
3604 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3605
3606 * features/s390-gs-linux64.xml: New file.
3607 * features/s390-gs.xml: New file.
3608 * features/s390-gsbc.xml: New file.
3609 * features/s390x-gs-linux64.xml: New file.
3610 * features/Makefile (WHICH): Add s390-gs-linux64 and
3611 s390x-gs-linux64.
3612 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3613 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3614 * features/s390-gs-linux64.c: New generated file.
3615 * features/s390x-gs-linux64.c: New file.
3616 * regformats/s390-gs-linux64.dat: New file.
3617 * regformats/s390x-gs-linux64.dat: New file.
3618
3619 2017-09-23 Tom Tromey <tom@tromey.com>
3620
3621 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3622
3623 2017-09-22 Tom Tromey <tom@tromey.com>
3624
3625 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3626 type to scoped_restore_tmpl.
3627 <scoped_input_handler>: Initialize m_quit_handler directly.
3628
3629 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3630
3631 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3632 (cd_command): Likewise. Free "current_directory" before
3633 assigning to it.
3634 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3635 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3636 * top.c (gdb_dirbuf): Remove global declaration.
3637 * top.h (gdb_dirbuf): Likewise.
3638
3639 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3640
3641 * gnulib/aclocal.m4: Regenerate.
3642 * gnulib/config.in: Regenerate.
3643 * gnulib/configure: Regenerate.
3644 * gnulib/import/Makefile.am: Regenerate.
3645 * gnulib/import/Makefile.in: Regenerate.
3646 * gnulib/import/assure.h: New file.
3647 * gnulib/import/at-func.c: Likewise
3648 * gnulib/import/chdir-long.c: New file.
3649 * gnulib/import/chdir-long.h: New file.
3650 * gnulib/import/cloexec.c: New file.
3651 * gnulib/import/cloexec.h: New file.
3652 * gnulib/import/close.c: New file.
3653 * gnulib/import/closedir.c: New file.
3654 * gnulib/import/dirent-private.h: New file.
3655 * gnulib/import/dup-safer.c: New file.
3656 * gnulib/import/dup.c: New file.
3657 * gnulib/import/dup2.c: New file.
3658 * gnulib/import/error.c: New file.
3659 * gnulib/import/error.h: New file.
3660 * gnulib/import/exitfail.c: New file.
3661 * gnulib/import/exitfail.h: New file.
3662 * gnulib/import/fchdir.c: New file.
3663 * gnulib/import/fcntl.c: New file.
3664 * gnulib/import/fcntl.in.h: New file.
3665 * gnulib/import/fd-hook.c: New file.
3666 * gnulib/import/fd-hook.h: New file.
3667 * gnulib/import/fd-safer.c: New file.
3668 * gnulib/import/fdopendir.c: New file.
3669 * gnulib/import/filename.h: New file.
3670 * gnulib/import/filenamecat-lgpl.c: New file.
3671 * gnulib/import/filenamecat.h: New file.
3672 * gnulib/import/fstat.c: New file.
3673 * gnulib/import/fstatat.c: New file.
3674 * gnulib/import/getcwd-lgpl.c: New file.
3675 * gnulib/import/getcwd.c: New file.
3676 * gnulib/import/getdtablesize.c: New file.
3677 * gnulib/import/getlogin_r.c: New file.
3678 * gnulib/import/getprogname.c: New file.
3679 * gnulib/import/getprogname.h: New file.
3680 * gnulib/import/gettext.h: New file.
3681 * gnulib/import/glob-libc.h: New file.
3682 * gnulib/import/glob.c: New file.
3683 * gnulib/import/glob.in.h: New file.
3684 * gnulib/import/intprops.h: New file.
3685 * gnulib/import/m4/chdir-long.m4: New file.
3686 * gnulib/import/m4/close.m4: New file.
3687 * gnulib/import/m4/closedir.m4: New file.
3688 * gnulib/import/m4/d-ino.m4: New file.
3689 * gnulib/import/m4/d-type.m4: New file.
3690 * gnulib/import/m4/dup.m4: New file.
3691 * gnulib/import/m4/dup2.m4: New file.
3692 * gnulib/import/m4/error.m4: New file.
3693 * gnulib/import/m4/fchdir.m4: New file.
3694 * gnulib/import/m4/fcntl.m4: New file.
3695 * gnulib/import/m4/fcntl_h.m4: New file.
3696 * gnulib/import/m4/fdopendir.m4: New file.
3697 * gnulib/import/m4/filenamecat.m4: New file.
3698 * gnulib/import/m4/fstat.m4: New file.
3699 * gnulib/import/m4/fstatat.m4: New file.
3700 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3701 * gnulib/import/m4/getcwd-path-max.m4: New file.
3702 * gnulib/import/m4/getcwd.m4: New file.
3703 * gnulib/import/m4/getdtablesize.m4: New file.
3704 * gnulib/import/m4/getlogin_r.m4: New file.
3705 * gnulib/import/m4/getprogname.m4: New file.
3706 * gnulib/import/m4/glob.m4: New file.
3707 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3708 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3709 * gnulib/import/m4/mempcpy.m4: New file.
3710 * gnulib/import/m4/memrchr.m4: New file.
3711 * gnulib/import/m4/mode_t.m4: New file.
3712 * gnulib/import/m4/msvc-inval.m4: New file.
3713 * gnulib/import/m4/msvc-nothrow.m4: New file.
3714 * gnulib/import/m4/open.m4: New file.
3715 * gnulib/import/m4/openat.m4: New file.
3716 * gnulib/import/m4/opendir.m4: New file.
3717 * gnulib/import/m4/readdir.m4: New file.
3718 * gnulib/import/m4/realloc.m4: New file.
3719 * gnulib/import/m4/rewinddir.m4: New file.
3720 * gnulib/import/m4/save-cwd.m4: New file.
3721 * gnulib/import/m4/strdup.m4: New file.
3722 * gnulib/import/m4/strerror.m4: New file.
3723 * gnulib/import/m4/unistd-safer.m4: New file.
3724 * gnulib/import/mempcpy.c: New file.
3725 * gnulib/import/memrchr.c: New file.
3726 * gnulib/import/msvc-inval.c: New file.
3727 * gnulib/import/msvc-inval.h: New file.
3728 * gnulib/import/msvc-nothrow.c: New file.
3729 * gnulib/import/msvc-nothrow.h: New file.
3730 * gnulib/import/open.c: New file.
3731 * gnulib/import/openat-die.c: New file.
3732 * gnulib/import/openat-priv.h: New file.
3733 * gnulib/import/openat-proc.c: New file.
3734 * gnulib/import/openat.c: New file.
3735 * gnulib/import/openat.h: New file.
3736 * gnulib/import/opendir.c: New file.
3737 * gnulib/import/pipe-safer.c: New file.
3738 * gnulib/import/readdir.c: New file.
3739 * gnulib/import/realloc.c: New file.
3740 * gnulib/import/rewinddir.c: New file.
3741 * gnulib/import/save-cwd.c: New file.
3742 * gnulib/import/save-cwd.h: New file.
3743 * gnulib/import/strdup.c: New file.
3744 * gnulib/import/strerror-override.c: New file.
3745 * gnulib/import/strerror-override.h: New file.
3746 * gnulib/import/strerror.c: New file.
3747 * gnulib/import/unistd--.h: New file.
3748 * gnulib/import/unistd-safer.h: New file.
3749 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3750 "getcwd" and "glob".
3751 * ser-tcp.c: Undefine "close" before redefining it.
3752
3753 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3754
3755 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3756 get rid of res_val.
3757
3758 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3759
3760 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3761 <sol2,sparc>: Likewise.
3762 <sol2-64,i386>: Likewise.
3763
3764 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3765 -Wdeprecated-declarations on *-*-solaris*.
3766 * configure: Regenerate.
3767
3768 * procfs.c: Include "nat/inferior.h".
3769 (procfs_info_proc): Fix typo.
3770
3771 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3772
3773 * remote.c (vector): Include.
3774 (struct private_thread_info): Add field, thread_handle.
3775 (free_private_thread_info): Deallocate storage associated with
3776 thread handle.
3777 (get_private_info_thread): Initialize `thread_handle' field.
3778 (struct thread_item): Add field, thread_handle.
3779 (clear_threads_listing_context): Deallocate storage associated
3780 with thread handle.
3781 (start_thread): Add support for "handle" attribute.
3782 (thread_attributes): Add "handle".
3783 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3784 field.
3785 (remote_update_thread_list): Update thread_handle.
3786 (remote_thread_handle_to_thread_info): New function.
3787 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3788
3789 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3790
3791 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3792 function.
3793 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3794 * python/python-internal.h (thread_object_type): Declare.
3795
3796 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3797
3798 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3799 (target_thread_handle_to_thread_info): Declare.
3800 * target.c (target_thread_handle_to_thread_info): New function.
3801 * target-delegates.c: Regenerate.
3802 * gdbthread.h (find_thread_by_handle): Declare.
3803 * thread.c (find_thread_by_handle): New function.
3804 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3805 function.
3806 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3807
3808 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3809
3810 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3811
3812 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3813
3814 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3815
3816 2017-09-21 Yao Qi <yao.qi@linaro.org>
3817
3818 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3819 to gdb_target_obs.
3820
3821 2017-09-20 Tom Tromey <tom@tromey.com>
3822
3823 * breakpoint.c (struct counted_command_line): Remove.
3824 (breakpoint_commands): Update.
3825 (alloc_counted_command_line, incref_counted_command_line)
3826 (decref_counted_command_line, do_cleanup_counted_command_line)
3827 (make_cleanup_decref_counted_command_line): Remove.
3828 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3829 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3830 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3831 (save_breakpoints): Update.
3832 * breakpoint.h (counted_command_line): Now a typedef to
3833 shared_ptr.
3834 (struct breakpoint) <commands>: Now a counted_command_line.
3835 (struct bpstats) <command>: Likewise.
3836
3837 2017-09-20 Tom Tromey <tom@tromey.com>
3838
3839 * breakpoint.c (struct commands_info, do_map_commands_command):
3840 Remove.
3841 (commands_command_1): Update.
3842 (iterate_over_related_breakpoints): Take a function_view.
3843 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3844 (delete_command): Update.
3845 (map_breakpoint_numbers): Take a function_view.
3846 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3847 (disable_command): Update.
3848 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3849 (enable_command): Update.
3850 (struct disp_data, do_enable_breakpoint_disp)
3851 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3852 (do_map_enable_delete_breakpoint): Remove.
3853 (enable_once_command, enable_count_command, enable_delete_command)
3854 (delete_trace_variable_command): Update.
3855
3856 2017-09-20 Tom Tromey <tom@tromey.com>
3857
3858 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3859 (bpstat_clear): Use delete.
3860 (bpstats): New constructors.
3861 (bpstat_copy, bpstat_stop_status): Use new.
3862 (dprintf_after_condition_true): Update.
3863 * breakpoint.h (bpstats::bpstats): Add constructors.
3864 (bpstats::~bpstats): Add destructor.
3865
3866 2017-09-20 Pedro Alves <palves@redhat.com>
3867
3868 * eval.c (make_params): Delete, refactored as ...
3869 (class fake_method): ... this new type's ctor.
3870 (fake_method::~fake_method): New.
3871 (evaluate_subexp_standard): Use 'fake_method'.
3872
3873 2017-09-20 Tom Tromey <tom@tromey.com>
3874
3875 * windows-nat.c (get_windows_debug_event, windows_wait)
3876 (do_initial_windows_stuff, windows_attach): Update.
3877 * utils.c (vwarning, internal_vproblem): Update.
3878 (ui_unregister_input_event_handler_cleanup)
3879 (prepare_to_handle_input): Remove.
3880 (class scoped_input_handler): New.
3881 (defaulted_query, prompt_for_continue): Update.
3882 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3883 Update.
3884 * top.c (undo_terminal_modifications_before_exit): Update.
3885 * target/target.h (target_terminal_init, target_terminal_inferior)
3886 (target_terminal_ours): Don't declare.
3887 (class target_terminal): New.
3888 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3889 (target_terminal_ours_for_output)
3890 (make_cleanup_restore_target_terminal): Don't declare.
3891 (target_terminal_info): Remove.
3892 * target.c (enum terminal_state, terminal_state): Remove.
3893 (target_terminal::terminal_state): Define.
3894 (target_terminal::init): Rename from target_terminal_init.
3895 (target_terminal::inferior): Rename from
3896 target_terminal_inferior.
3897 (target_terminal::ours): Rename from target_terminal_ours.
3898 (target_terminal::ours_for_output): Rename from
3899 target_terminal_ours_for_output.
3900 (target_terminal::info): New method.
3901 (cleanup_restore_target_terminal)
3902 (make_cleanup_restore_target_terminal): Remove.
3903 * solib.c (handle_solib_event): Update.
3904 * remote.c (remote_serial_quit_handler): Update.
3905 (remote_terminal_inferior, remote_wait_as): Update.
3906 * record-full.c (record_full_wait_1): Update.
3907 * nto-procfs.c (procfs_create_inferior): Update.
3908 * nat/fork-inferior.c (startup_inferior): Update.
3909 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3910 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3911 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3912 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3913 (mi_breakpoint_created, mi_breakpoint_deleted)
3914 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3915 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3916 (mi_user_selected_context_changed, report_initial_inferior):
3917 Update.
3918 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3919 (linux_nat_terminal_inferior): Update.
3920 * infrun.c (follow_fork_inferior)
3921 (handle_vfork_child_exec_or_exit, do_target_resume)
3922 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3923 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3924 Update.
3925 * inflow.c (child_terminal_init, info_terminal_command): Update.
3926 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3927 (attach_command): Update.
3928 * infcall.c (call_thread_fsm_should_stop): Update.
3929 * gnu-nat.c (gnu_attach): Update.
3930 * extension.c (struct active_ext_lang_state)
3931 (restore_active_ext_lang): Update.
3932 * exceptions.c (print_flush): Update.
3933 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3934 (struct quit_handler_cleanup_data, restore_quit_handler)
3935 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3936 Remove.
3937 * cp-support.c (gdb_demangle): Update.
3938 * breakpoint.c (update_inserted_breakpoint_locations)
3939 (insert_breakpoint_locations, handle_jit_event)
3940 (disable_breakpoints_in_unloaded_shlib): Update.
3941 * annotate.c (annotate_breakpoints_invalid)
3942 (annotate_frames_invalid): Update.
3943
3944 2017-09-20 Tom Tromey <tom@tromey.com>
3945
3946 * main.c (catch_command_errors): Rename from
3947 catch_command_errors_const.
3948 (captured_main_1): Update.
3949
3950 2017-09-20 Pedro Alves <palves@redhat.com>
3951
3952 * cli/cli-cmds.c (list_command): Use print_sal_location.
3953 (print_sal_location): New function.
3954 (ambiguous_line_spec): Use print_sal_location.
3955 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3956 * symtab.c (find_function_start_sal): Likewise.
3957 * symtab.h (symtab_and_line::symbol): New field.
3958
3959 2017-09-20 Pedro Alves <palves@redhat.com>
3960
3961 * linespec.c (minsym_found): Handle non-text minsyms.
3962 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3963
3964 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3965
3966 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3967 backslash.
3968
3969 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3970
3971 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3972 vmovups instead vmovaps.
3973 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3974
3975 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3976
3977 * NEWS (Changes since GDB 8.0): Add starti.
3978 * infcmd.c (enum run_break): New.
3979 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3980 case.
3981 (run_command): Use enum run_how.
3982 (start_command): Likewise.
3983 (starti_command): New function.
3984 (RUN_ARGS_HELP): New macro.
3985 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3986 commands. Add starti command.
3987
3988 2017-09-19 Yao Qi <yao.qi@linaro.org>
3989
3990 * Makefile.in (monitor.o): Remove the rule.
3991
3992 2017-09-19 Yao Qi <yao.qi@linaro.org>
3993
3994 * annotate.h (struct annotate_arg_emitter): Use
3995 DISABLE_COPY_AND_ASSIGN.
3996 * common/refcounted-object.h (refcounted_object): Likewise.
3997 * completer.h (struct completion_result): Likewise.
3998 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3999 * filename-seen-cache.h (filename_seen_cache): Likewise.
4000 * gdbcore.h (thread_section_name): Likewise.
4001 * gdb_regex.h (compiled_regex): Likewise.
4002 * gdbthread.h (scoped_restore_current_thread): Likewise.
4003 * inferior.h (scoped_restore_current_inferior): Likewise.
4004 * jit.c (jit_reader): Likewise.
4005 * linespec.h (struct linespec_result): Likewise.
4006 * mi/mi-parse.h (struct mi_parse): Likewise.
4007 * nat/fork-inferior.c (execv_argv): Likewise.
4008 * progspace.h (scoped_restore_current_program_space): Likewise.
4009 * python/python-internal.h (class gdbpy_enter): Likewise.
4010 * regcache.h (regcache): Likewise.
4011 * target-descriptions.c (struct tdesc_reg): Likewise.
4012 (struct tdesc_type): Likewise.
4013 (struct tdesc_feature): Likewise.
4014 * ui-out.h (ui_out_emit_type): Likewise.
4015
4016 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4017
4018 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4019 label abort_expression.
4020
4021 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4022
4023 * common/buffer.c (buffer_xml_printf): Adjust.
4024 * common/xml-utils.c (xml_escape_text): Change return type to
4025 std::string, update code accordingly.
4026 * common/xml-utils.h (xml_escape_text): Change return type to
4027 std::string.
4028 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4029 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4030 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4031 Adjust.
4032
4033 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4034
4035 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4036 (SUBDIR_UNITTESTS_OBS): Add new object file.
4037 * unittests/xml-utils-selftests.c: New file.
4038
4039 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4040
4041 * common/selftest.h (selftest): New struct/interface.
4042 (register_test): Add name parameter, add new overload.
4043 (run_tests): Add filter parameter.
4044 (for_each_selftest_ftype): New typedef.
4045 (for_each_selftest): New declaration.
4046 * common/selftest.c (tests): Change type to
4047 map<string, unique_ptr<selftest>>.
4048 (simple_selftest): New struct.
4049 (register_test): New function.
4050 (register_test): Add name parameter and use it.
4051 (run_tests): Add filter parameter and use it. Add prints.
4052 Adjust to vector -> map change.
4053 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4054 registering selftests.
4055 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4056 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4057 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4058 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4059 * findvar.c (_initialize_findvar): Likewise.
4060 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4061 * maint.c (maintenance_selftest): Update call to run_tests.
4062 (maintenance_info_selftests): New function.
4063 (_initialize_maint_cmds): Register "maintenance info selftests"
4064 command. Update "maintenance selftest" doc.
4065 * regcache.c (_initialize_regcache): Add names when registering
4066 selftests.
4067 * rust-exp.y (_initialize_rust_exp): Likewise.
4068 * selftest-arch.c (gdbarch_selftest): New struct.
4069 (gdbarch_tests): Remove.
4070 (register_test_foreach_arch): Add name parameter. Call
4071 register_test.
4072 (tests_with_arch): Remove, move most content to
4073 gdbarch_selftest::operator().
4074 (_initialize_selftests_foreach_arch): Remove.
4075 * selftest-arch.h (register_test_foreach_arch): Add name
4076 parameter.
4077 (run_tests_with_arch): New declaration.
4078 * utils-selftests.c (_initialize_utils_selftests): Add names
4079 when registering selftests.
4080 * utils.c (_initialize_utils): Likewise.
4081 * unittests/array-view-selftests.c
4082 (_initialize_array_view_selftests): Likewise.
4083 * unittests/environ-selftests.c (_initialize_environ_selftests):
4084 Likewise.
4085 * unittests/function-view-selftests.c
4086 (_initialize_function_view_selftests): Likewise.
4087 * unittests/offset-type-selftests.c
4088 (_initialize_offset_type_selftests): Likewise.
4089 * unittests/optional-selftests.c
4090 (_initialize_optional_selftests): Likewise.
4091 * unittests/scoped_restore-selftests.c
4092 (_initialize_scoped_restore_selftests): Likewise.
4093 * NEWS: Document "maintenance selftest" and "maint info
4094 selftests".
4095
4096 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4097
4098 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4099 scoped_restore.
4100
4101 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4102
4103 * mi/mi-main.c (mi_load_progress): Make uiout variable
4104 a unique_ptr.
4105
4106 2017-09-15 Pedro Alves <palves@redhat.com>
4107
4108 * compile/compile-c-types.c (convert_enum, convert_int)
4109 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4110
4111 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4112
4113 * dwarf2read.c (copy_string): Remove.
4114 (parse_macro_definition): Replace copy_string with savestring.
4115
4116 2017-09-15 Yao Qi <yao.qi@linaro.org>
4117
4118 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4119 gdb_target_obs.
4120 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4121 Likewise.
4122 (i[34567]86-*-linux*): Likewise.
4123
4124 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4125
4126 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4127 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4128 <stack>: Change type to std::vector.
4129 <stack_len, stack_allocated>: Remove.
4130 <grow_stack>: Remove.
4131 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4132 (dwarf_expr_context::~dwarf_expr_context): Remove.
4133 (dwarf_expr_context::grow_stack): Remove.
4134 (dwarf_expr_context::push): Adjust.
4135 (dwarf_expr_context::pop): Adjust.
4136 (dwarf_expr_context::fetch): Adjust.
4137 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4138 (dwarf_expr_context::stack_empty_p): Adjust.
4139 (dwarf_expr_context::execute_stack_op): Adjust.
4140
4141 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4142
4143 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4144 return type to bool.
4145 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4146
4147 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4148
4149 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4150 Change type to bool.
4151 (dwarf_stack_value) <in_stack_memory>: Likewise.
4152 (dwarf_expr_context) <push_address>: Change parameter type to
4153 bool.
4154 <fetch_in_stack_memory>: Change return type to bool.
4155 <push>: Change parameter type to bool.
4156 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4157 to bool.
4158 (dwarf_expr_context::push_address): Likewise.
4159 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4160 to bool.
4161 (dwarf_expr_context::execute_stack_op): Adjust.
4162 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4163
4164 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4165
4166 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4167 (struct dwarf_expr_context) <n_pieces>: Remove.
4168 <pieces>: Change type to std::vector.
4169 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4170 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4171 pieces.
4172 (dwarf_expr_context::add_piece): Adjust.
4173 * dwarf2loc.c (struct piece_closure): Initialize fields.
4174 <n_pieces>: Remove.
4175 <pieces>: Change type to std::vector.
4176 (allocate_piece_closure): Adjust, change parameter to
4177 std::vector rvalue and std::move it to piece_closure.
4178 (rw_pieced_value): Adjust.
4179 (check_pieced_synthetic_pointer): Adjust.
4180 (indirect_synthetic_pointer): Adjust.
4181 (coerce_pieced_ref): Adjust.
4182 (free_pieced_value_closure): Adjust. Use delete to free
4183 piece_closure.
4184 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4185 to allocate_piece_closure.
4186 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4187
4188 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4189
4190 * probe.h (probe_ops_cp): Remove typedef.
4191 (DEF_VEC_P (probe_ops_cp)): Remove.
4192 (all_probe_ops): Change type to std::vector.
4193 * probe.c (info_probes_for_ops): Adjust to vector change.
4194 (probe_linespec_to_ops): Likewise.
4195 (all_probe_ops): Change type to std::vector.
4196 (_initialize_probe): Adjust to vector change.
4197 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4198 * elfread.c (elf_get_probes): Likewise.
4199 * stap-probe.c (_initialize_stap_probe): Likewise.
4200
4201 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4202
4203 * probe.h (struct bound_probe): Define constructors.
4204 * probe.c (bound_probe_s): Remove typedef.
4205 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4206 (collect_probes): Change return type to std::vector, remove
4207 cleanup.
4208 (compare_probes): Return bool, change parameter type. Change
4209 semantic to "less than".
4210 (gen_ui_out_table_header_info): Change parameter to std::vector
4211 and update.
4212 (exists_probe_with_pops): Likewise.
4213 (info_probes_for_ops): Update to std::vector change.
4214 (enable_probes_command): Likewise.
4215 (disable_probes_command): Likewise.
4216
4217 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4218
4219 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4220 vec to std::vector.
4221 * probe.c (parse_probes_in_pspace): Update.
4222 (find_probes_in_objfile): Update.
4223 (find_probe_by_pc): Update.
4224 (collect_probes): Update.
4225 (probe_any_get_probes): Update.
4226 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4227 return type to reference to std::vector.
4228 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4229 std::vector and update.
4230 (dtrace_process_dof): Likewise.
4231 (dtrace_get_probes): Likewise.
4232 * elfread.c (elf_get_probes): Change return type to std::vector,
4233 store an std::vector in bfd_data.
4234 (probe_key_free): Update to std::vector.
4235 * stap-probe.c (handle_stap_probe): Change parameter to
4236 std::vector and update.
4237 (stap_get_probes): Likewise.
4238 * symfile-debug.c (debug_sym_get_probes): Change return type to
4239 std::vector and update.
4240
4241 2017-09-11 Tom Tromey <tom@tromey.com>
4242
4243 * breakpoint.c (program_breakpoint_here_p): Update.
4244 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4245 from make_show_memory_breakpoints_cleanup. Return a
4246 scoped_restore_tmpl<int>.
4247 (restore_show_memory_breakpoints): Remove.
4248 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4249 * mem-break.c (memory_validate_breakpoint): Update.
4250 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4251 (ia64_memory_remove_breakpoint): Update.
4252 (ia64_breakpoint_from_pc): Update.
4253 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4254 from make_show_memory_breakpoints_cleanup.
4255
4256 2017-09-11 Tom Tromey <tom@tromey.com>
4257
4258 * d-namespace.c (d_lookup_symbol): Use std::string.
4259 (find_symbol_in_baseclass): Likewise.
4260
4261 2017-09-11 Tom Tromey <tom@tromey.com>
4262
4263 * ctf.c (ctf_start): Use std::string.
4264
4265 2017-09-11 Tom Tromey <tom@tromey.com>
4266
4267 * ada-lang.c (is_known_support_routine): Update.
4268 (ada_unhandled_exception_name_addr_from_raise): Update.
4269 * guile/scm-frame.c (gdbscm_frame_name): Update.
4270 * python/py-frame.c (frapy_name): Update.
4271 (frapy_function): Update.
4272 * stack.h (find_frame_funname): Update.
4273 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4274 (print_frame): Update.
4275
4276 2017-09-11 Tom Tromey <tom@tromey.com>
4277
4278 * findcmd.c (put_bits): Take a gdb::byte_vector.
4279 (parse_find_args): Return gdb::byte_vector. "args" now const.
4280 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4281 cleanups.
4282 (find_command): Update.
4283
4284 2017-09-11 Tom Tromey <tom@tromey.com>
4285
4286 * cli/cli-script.c (class scoped_restore_hook_in): New.
4287 (clear_hook_in_cleanup): Remove.
4288 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4289 scoped_restore_hook_in.
4290
4291 2017-09-11 Tom Tromey <tom@tromey.com>
4292
4293 * cli/cli-script.c (restore_interp): Remove.
4294 (read_command_lines): Use scoped_restore_interp.
4295 * interps.c (scoped_restore_interp::set_temp): Rename from
4296 interp_set_temp.
4297 * interps.h (class scoped_restore_interp): New.
4298 (interp_set_temp): Remove.
4299
4300 2017-09-11 Tom Tromey <tom@tromey.com>
4301
4302 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4303 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4304 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4305 scoped_restore.
4306 (mi_cmd_break_insert_1): Update.
4307 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4308 scoped_restore.
4309
4310 2017-09-11 Tom Tromey <tom@tromey.com>
4311
4312 * demangle.c (demangle_command): Update.
4313 * breakpoint.c (disable_command): Update.
4314 (enable_command): Update.
4315 (find_location_by_number): Make "number" const. Use
4316 get_number_trailer.
4317 * cli/cli-utils.c (extract_arg): Return std::string.
4318 * probe.c (parse_probe_linespec): Update. Change types.
4319 (collect_probes): Take string arguments.
4320 (parse_probe_linespec): Likewise.
4321 (info_probes_for_ops): Update.
4322 (enable_probes_command): Update.
4323 (disable_probes_command): Update.
4324 * break-catch-sig.c (catch_signal_split_args): Update.
4325 * mi/mi-parse.c (mi_parse): Update.
4326
4327 2017-09-11 Tom Tromey <tom@tromey.com>
4328
4329 * language.h (language_enum): Make argument const.
4330 * language.c (language_enum): Make argument const.
4331
4332 2017-09-11 Tom Tromey <tom@tromey.com>
4333
4334 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4335 as function.
4336 (skip_to_space): Rename from skip_to_space_const.
4337 * common/common-utils.c (skip_to_space): New function.
4338 (skip_to_space): Rename from skip_to_space_const.
4339 * cli/cli-utils.h (get_number): Rename from get_number_const.
4340 (extract_arg): Rename from extract_arg_const.
4341 * cli/cli-utils.c (get_number): Rename from get_number_const.
4342 (extract_arg): Rename from extract_arg_const.
4343 (number_or_range_parser::get_number): Use ::get_number.
4344 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4345 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4346 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4347 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4348 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4349 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4350 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4351 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4352
4353 2017-09-11 Tom Tromey <tom@tromey.com>
4354
4355 * python/python.c (do_start_initialization): Use
4356 py-event-types.def to initialize types.
4357 Define all object type structures.
4358 * python/python-internal.h: Don't declare event initialization
4359 functions.
4360 * python/py-threadevent.c (thread_event_object_type): Don't
4361 define.
4362 * python/py-stopevent.c (stop_event_object_type): Don't define.
4363 * python/py-signalevent.c (signal_event_object_type): Don't
4364 declare or define.
4365 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4366 (clear_objfiles_event_object_type): Don't declare or define.
4367 * python/py-infevents.c (inferior_call_pre_event_object_type)
4368 (inferior_call_post_event_object_type)
4369 (register_changed_event_object_type)
4370 (memory_changed_event_object_type): Don't declare or define.
4371 * python/py-inferior.c (new_thread_event_object_type)
4372 (new_inferior_event_object_type)
4373 (inferior_deleted_event_object_type): Don't declare or define.
4374 * python/py-exitedevent.c (exited_event_object_type): Don't
4375 declare or define.
4376 * python/py-evts.c (gdbpy_initialize_py_events): Use
4377 py-all-events.def.
4378 * python/py-events.h (thread_event_object_type): Don't declare.
4379 (events_object): Use py-all-events.def.
4380 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4381 py-event-types.def.
4382 * python/py-event-types.def: New file.
4383 * python/py-continueevent.c (create_continue_event_object): Don't
4384 declare or define.
4385 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4386 declare or define.
4387 * python/py-all-events.def: New file.
4388
4389 2017-09-11 Tom Tromey <tom@tromey.com>
4390
4391 * python/py-threadevent.c (create_thread_event_object): Return
4392 gdbpy_ref.
4393 * python/py-stopevent.h (create_stop_event_object)
4394 (create_breakpoint_event_object, create_signal_event_object):
4395 Update.
4396 * python/py-stopevent.c (create_stop_event_object): Return
4397 gdbpy_ref.
4398 (emit_stop_event): Update.
4399 * python/py-signalevent.c (create_signal_event_object): Return
4400 gdbpy_ref.
4401 * python/py-infevents.c (create_inferior_call_event_object):
4402 Update.
4403 * python/py-event.h (create_event_object)
4404 (create_thread_event_object): Update.
4405 * python/py-event.c (create_event_object): Return gdbpy_ref.
4406 * python/py-continueevent.c: Return gdbpy_ref.
4407 * python/py-bpevent.c (create_breakpoint_event_object): Return
4408 gdbpy_ref.
4409
4410 2017-09-11 Tom Tromey <tom@tromey.com>
4411
4412 PR python/15622:
4413 * NEWS: Add entry.
4414 * python/python.c (do_start_initialization): Initialize new event
4415 types.
4416 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4417 (gdbpy_initialize_inferior_deleted_event)
4418 (gdbpy_initialize_new_thread_event): Declare.
4419 * python/py-threadevent.c (create_thread_event_object): Add option
4420 "thread" parameter.
4421 * python/py-inferior.c (new_thread_event_object_type)
4422 (new_inferior_event_object_type)
4423 (inferior_deleted_event_object_type): Declare.
4424 (python_new_inferior, python_inferior_deleted): New functions.
4425 (add_thread_object): Emit new_thread event.
4426 (gdbpy_initialize_inferior): Attach new functions to corresponding
4427 observers.
4428 (new_thread, new_inferior, inferior_deleted): Define new event
4429 types.
4430 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4431 registries.
4432 * python/py-events.h (events_object) <new_inferior,
4433 inferior_deleted, new_thread>: New fields.
4434 * python/py-event.h (create_thread_event_breakpoint): Add optional
4435 "thread" parameter.
4436
4437 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4438
4439 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4440 check current_ui instead.
4441 (internal_vproblem): Likewise.
4442
4443 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4444
4445 * thread.c (print_thread_info_1): Remove unnecessary calls to
4446 uiout->is_mi_like_p.
4447
4448 2017-09-09 Tom Tromey <tom@tromey.com>
4449
4450 * namespace.h (add_using_directive): Update.
4451 * namespace.c (add_using_directive): Change type of excludes to
4452 std::vector.
4453 * dwarf2read.c (read_import_statement): Use std::vector.
4454 (read_namespace): Update.
4455 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4456
4457 2017-09-09 Tom Tromey <tom@tromey.com>
4458
4459 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4460
4461 2017-09-09 Tom Tromey <tom@tromey.com>
4462
4463 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4464
4465 2017-09-09 Tom Tromey <tom@tromey.com>
4466
4467 * stack.c (func_command): Use gdb::def_vector.
4468
4469 2017-09-09 Tom Tromey <tom@tromey.com>
4470
4471 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4472 ui_out_emit_list, ui_out_emit_tuple.
4473 (mi_cmd_var_update): Likewise.
4474
4475 2017-09-09 Tom Tromey <tom@tromey.com>
4476
4477 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4478 ui_out_redirect_pop.
4479 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4480 ui_out_redirect_pop.
4481 * utils.c (do_ui_out_redirect_pop)
4482 (make_cleanup_ui_out_redirect_pop): Remove.
4483 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4484 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4485 * ui-out.h (ui_out_redirect_pop): New class.
4486
4487 2017-09-09 Tom Tromey <tom@tromey.com>
4488
4489 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4490 (list_available_thread_groups, mi_cmd_list_thread_groups)
4491 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4492 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4493 Likewise.
4494
4495 2017-09-09 Tom Tromey <tom@tromey.com>
4496
4497 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4498 ui_out_emit_tuple.
4499
4500 2017-09-09 Tom Tromey <tom@tromey.com>
4501
4502 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4503 * stack.c (print_frame): Use ui_out_emit_tuple.
4504 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4505 (info_spu_mailbox_command, info_spu_dma_command)
4506 (info_spu_proxydma_command): Likewise.
4507 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4508 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4509 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4510 ui_out_emit_tuple.
4511 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4512
4513 2017-09-09 Tom Tromey <tom@tromey.com>
4514
4515 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4516 (class ui_out_emit_table): Update comment.
4517 * ui-out.c (do_cleanup_table_end)
4518 (make_cleanup_ui_out_table_begin_end): Remove.
4519 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4520 (info_spu_dma_cmdlist): Likewise.
4521 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4522 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4523 ui_out_emit_table.
4524
4525 2017-09-09 Tom Tromey <tom@tromey.com>
4526
4527 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4528 ui_out_emit_list, gdb::optional.
4529
4530 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4531
4532 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4533 prototype.
4534 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4535 prototype.
4536 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4537 prototype.
4538 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4539 * ada-exp.y: Remove _initialize_ada_exp prototype.
4540 * ada-lang.c: Remove _initialize_ada_language prototype.
4541 * ada-tasks.c: Remove _initialize_tasks prototype.
4542 * addrmap.c: Remove _initialize_addrmap prototype.
4543 * agent.c: Remove _initialize_agent prototype.
4544 * aix-thread.c: Remove _initialize_aix_thread prototype.
4545 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4546 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4547 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4548 prototype.
4549 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4550 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4551 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4552 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4553 prototype.
4554 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4555 prototype.
4556 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4557 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4558 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4559 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4560 prototype.
4561 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4562 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4563 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4564 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4565 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4566 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4567 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4568 prototype.
4569 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4570 prototype.
4571 * annotate.c: Remove _initialize_annotate prototype.
4572 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4573 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4574 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4575 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4576 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4577 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4578 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4579 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4580 prototype.
4581 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4582 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4583 * auto-load.c: Remove _initialize_auto_load prototype.
4584 * auxv.c: Remove _initialize_auxv prototype.
4585 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4586 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4587 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4588 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4589 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4590 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4591 prototype.
4592 * break-catch-throw.c: Remove _initialize_break_catch_throw
4593 prototype.
4594 * breakpoint.c: Remove _initialize_breakpoint prototype.
4595 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4596 * btrace.c: Remove _initialize_btrace prototype.
4597 * charset.c: Remove _initialize_charset prototype.
4598 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4599 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4600 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4601 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4602 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4603 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4604 * coffread.c: Remove _initialize_coffread prototype.
4605 * compile/compile.c: Remove _initialize_compile prototype.
4606 * complaints.c: Remove _initialize_complaints prototype.
4607 * completer.c: Remove _initialize_completer prototype.
4608 * copying.awk: Remove _initialize_copying prototype.
4609 * copying.c: Regenerate.
4610 * core-regset.c: Remove _initialize_core_regset prototype.
4611 * corefile.c: Remove _initialize_core prototype.
4612 * corelow.c: Remove _initialize_corelow prototype.
4613 * cp-abi.c: Remove _initialize_cp_abi prototype.
4614 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4615 * cp-support.c: Remove _initialize_cp_support prototype.
4616 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4617 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4618 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4619 * ctf.c: Remove _initialize_ctf prototype.
4620 * d-lang.c: Remove _initialize_d_language prototype.
4621 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4622 prototype.
4623 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4624 * dbxread.c: Remove _initialize_dbxread prototype.
4625 * dcache.c: Remove _initialize_dcache prototype.
4626 * demangle.c: Remove _initialize_demangler prototype.
4627 * disasm-selftests.c: Remove _initialize_disasm_selftests
4628 prototype.
4629 * disasm.c: Remove _initialize_disasm prototype.
4630 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4631 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4632 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4633 prototype.
4634 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4635 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4636 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4637 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4638 * elfread.c: Remove _initialize_elfread prototype.
4639 * exec.c: Remove _initialize_exec prototype.
4640 * extension.c: Remove _initialize_extension prototype.
4641 * f-lang.c: Remove _initialize_f_language prototype.
4642 * f-valprint.c: Remove _initialize_f_valprint prototype.
4643 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4644 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4645 * filesystem.c: Remove _initialize_filesystem prototype.
4646 * findcmd.c: Remove _initialize_mem_search prototype.
4647 * fork-child.c: Remove _initialize_fork_child prototype.
4648 * frame-base.c: Remove _initialize_frame_base prototype.
4649 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4650 * frame.c: Remove _initialize_frame prototype.
4651 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4652 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4653 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4654 * gcore.c: Remove _initialize_gcore prototype.
4655 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4656 * gdbarch.c: Regenerate.
4657 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4658 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4659 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4660 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4661 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4662 * go-lang.c: Remove _initialize_go_language prototype.
4663 * go32-nat.c: Remove _initialize_go32_nat prototype.
4664 * guile/guile.c: Remove _initialize_guile prototype.
4665 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4666 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4667 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4668 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4669 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4670 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4671 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4672 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4673 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4674 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4675 prototype.
4676 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4677 prototype.
4678 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4679 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4680 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4681 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4682 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4683 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4684 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4685 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4686 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4687 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4688 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4689 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4690 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4691 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4692 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4693 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4694 prototype.
4695 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4696 prototype.
4697 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4698 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4699 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4700 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4701 * infcall.c: Remove _initialize_infcall prototype.
4702 * infcmd.c: Remove _initialize_infcmd prototype.
4703 * inferior.c: Remove _initialize_inferiors prototype.
4704 * inflow.c: Remove _initialize_inflow prototype.
4705 * infrun.c: Remove _initialize_infrun prototype.
4706 * interps.c: Remove _initialize_interpreter prototype.
4707 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4708 * jit.c: Remove _initialize_jit prototype.
4709 * language.c: Remove _initialize_language prototype.
4710 * linux-fork.c: Remove _initialize_linux_fork prototype.
4711 * linux-nat.c: Remove _initialize_linux_nat prototype.
4712 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4713 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4714 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4715 * m2-lang.c: Remove _initialize_m2_language prototype.
4716 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4717 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4718 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4719 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4720 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4721 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4722 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4723 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4724 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4725 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4726 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4727 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4728 * machoread.c: Remove _initialize_machoread prototype.
4729 * macrocmd.c: Remove _initialize_macrocmd prototype.
4730 * macroscope.c: Remove _initialize_macroscope prototype.
4731 * maint.c: Remove _initialize_maint_cmds prototype.
4732 * mdebugread.c: Remove _initialize_mdebugread prototype.
4733 * memattr.c: Remove _initialize_mem prototype.
4734 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4735 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4736 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4737 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4738 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4739 * microblaze-linux-tdep.c: Remove
4740 _initialize_microblaze_linux_tdep prototype.
4741 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4742 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4743 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4744 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4745 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4746 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4747 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4748 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4749 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4750 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4751 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4752 prototype.
4753 * mipsread.c: Remove _initialize_mipsread prototype.
4754 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4755 prototype.
4756 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4757 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4758 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4759 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4760 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4761 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4762 prototype.
4763 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4764 * nto-procfs.c: Remove _initialize_procfs prototype.
4765 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4766 * objc-lang.c: Remove _initialize_objc_language prototype.
4767 * objfiles.c: Remove _initialize_objfiles prototype.
4768 * observer.c: Remove observer_test_first_notification_function,
4769 observer_test_second_notification_function,
4770 observer_test_third_notification_function, and
4771 _initialize_observer prototypes.
4772 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4773 * osabi.c: Remove _initialize_gdb_osabi prototype.
4774 * osdata.c: Remove _initialize_osdata prototype.
4775 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4776 * parse.c: Remove _initialize_parse prototype.
4777 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4778 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4779 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4780 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4781 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4782 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4783 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4784 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4785 * printcmd.c: Remove _initialize_printcmd prototype.
4786 * probe.c: Remove _initialize_probe prototype.
4787 * proc-api.c: Remove _initialize_proc_api prototype.
4788 * proc-events.c: Remove _initialize_proc_events prototype.
4789 * proc-service.c: Remove _initialize_proc_service prototype.
4790 * procfs.c: Remove _initialize_procfs prototype.
4791 * psymtab.c: Remove _initialize_psymtab prototype.
4792 * python/python.c: Remove _initialize_python prototype.
4793 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4794 * record-btrace.c: Remove _initialize_record_btrace prototype.
4795 * record-full.c: Remove _initialize_record_full prototype.
4796 * record.c: Remove _initialize_record prototype.
4797 * regcache.c: Remove _initialize_regcache prototype.
4798 * reggroups.c: Remove _initialize_reggroup prototype.
4799 * remote-notif.c: Remove _initialize_notif prototype.
4800 * remote-sim.c: Remove _initialize_remote_sim prototype.
4801 * remote.c: Remove _initialize_remote prototype.
4802 * reverse.c: Remove _initialize_reverse prototype.
4803 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4804 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4805 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4806 prototype.
4807 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4808 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4809 * rust-exp.y: Remove _initialize_rust_exp prototype.
4810 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4811 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4812 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4813 * score-tdep.c: Remove _initialize_score_tdep prototype.
4814 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4815 prototype.
4816 * ser-go32.c: Remove _initialize_ser_dos prototype.
4817 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4818 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4819 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4820 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4821 * serial.c: Remove _initialize_serial prototype.
4822 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4823 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4824 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4825 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4826 * skip.c: Remove _initialize_step_skip prototype.
4827 * sol-thread.c: Remove _initialize_sol_thread prototype.
4828 * solib-aix.c: Remove _initialize_solib_aix prototype.
4829 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4830 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4831 * solib-frv.c: Remove _initialize_frv_solib prototype.
4832 * solib-spu.c: Remove _initialize_spu_solib prototype.
4833 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4834 * solib-target.c: Remove _initialize_solib_target prototype.
4835 * solib.c: Remove _initialize_solib prototype.
4836 * source.c: Remove _initialize_source prototype.
4837 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4838 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4839 prototype.
4840 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4841 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4842 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4843 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4844 prototype.
4845 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4846 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4847 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4848 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4849 prototype.
4850 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4851 prototype.
4852 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4853 prototype.
4854 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4855 prototype.
4856 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4857 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4858 prototype.
4859 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4860 prototype.
4861 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4862 prototype.
4863 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4864 prototype.
4865 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4866 prototype.
4867 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4868 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4869 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4870 * stabsread.c: Remove _initialize_stabsread prototype.
4871 * stack.c: Remove _initialize_stack prototype.
4872 * stap-probe.c: Remove _initialize_stap_probe prototype.
4873 * std-regs.c: Remove _initialize_frame_reg prototype.
4874 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4875 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4876 * symfile.c: Remove _initialize_symfile prototype.
4877 * symmisc.c: Remove _initialize_symmisc prototype.
4878 * symtab.c: Remove _initialize_symtab prototype.
4879 * target-dcache.c: Remove _initialize_target_dcache prototype.
4880 * target-descriptions.c: Remove _initialize_target_descriptions
4881 prototype.
4882 * thread.c: Remove _initialize_thread prototype.
4883 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4884 prototype.
4885 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4886 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4887 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4888 prototype.
4889 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4890 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4891 * tracefile.c: Remove _initialize_tracefile prototype.
4892 * tracepoint.c: Remove _initialize_tracepoint prototype.
4893 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4894 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4895 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4896 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4897 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4898 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4899 * tui/tui.c: Remove _initialize_tui prototype.
4900 * typeprint.c: Remove _initialize_typeprint prototype.
4901 * user-regs.c: Remove _initialize_user_regs prototype.
4902 * utils.c: Remove _initialize_utils prototype.
4903 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4904 * valarith.c: Remove _initialize_valarith prototype.
4905 * valops.c: Remove _initialize_valops prototype.
4906 * valprint.c: Remove _initialize_valprint prototype.
4907 * value.c: Remove _initialize_values prototype.
4908 * varobj.c: Remove _initialize_varobj prototype.
4909 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4910 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4911 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4912 * windows-nat.c: Remove _initialize_windows_nat,
4913 _initialize_check_for_gdb_ini, and _initialize_loadable
4914 prototypes.
4915 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4916 * xcoffread.c: Remove _initialize_xcoffread prototype.
4917 * xml-support.c: Remove _initialize_xml_support prototype.
4918 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4919 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4920 prototype.
4921 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4922 prototype.
4923 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4924
4925 2017-09-08 Keith Seitz <keiths@redhat.com>
4926
4927 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4928 field.
4929
4930 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4931
4932 * f-valprint.c (f_val_print): Remove check for one byte
4933 sized integers. Remove printing of character type.
4934
4935 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4936 Christoph Weinmann <christoph.t.weinmann@intel.com>
4937 Bernhard Heckel <bernhard.heckel@intel.com>
4938
4939 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4940 to maintain proper indentation when printing pointers/refs.
4941
4942 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4943
4944 GDB 8.0.1 released.
4945
4946 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4947
4948 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4949
4950 2017-09-05 Tom Tromey <tom@tromey.com>
4951
4952 * parse.c (funcall_chain): Now a std::vector.
4953 (start_arglist, end_arglist): Simplify.
4954 (free_funcalls): Remove.
4955 (parse_exp_in_context_1): Remove cleanup.
4956
4957 2017-09-05 Tom Tromey <tom@tromey.com>
4958
4959 * go-exp.y (go_parse): Don't create a cleanup.
4960
4961 2017-09-05 Tom Tromey <tom@tromey.com>
4962
4963 * d-exp.y (PrimaryExpression): Use std::string.
4964 (d_parse): Don't create a cleanup.
4965
4966 2017-09-05 Tom Tromey <tom@tromey.com>
4967
4968 * utils.c (do_clear_parser_state): Remove.
4969 (make_cleanup_clear_parser_state): Remove.
4970 * p-exp.y (pascal_parse): Use scoped_restore.
4971 * m2-exp.y (m2_parse): Use scoped_restore.
4972 * f-exp.y (f_parse): Use scoped_restore.
4973 * d-exp.y (d_parse): Use scoped_restore.
4974 * c-exp.y (c_parse): Use scoped_restore.
4975 * ada-exp.y (ada_parse): Use scoped_restore.
4976 * utils.h (make_cleanup_clear_parser_state): Remove.
4977
4978 2017-09-06 Keith Seitz <keiths@redhat.com>
4979
4980 * dwarf2read.c (dw2_linkage_name_attr): New function.
4981 (dw2_linkage_name): New function.
4982 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4983 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4984 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4985
4986 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4987
4988 * config/djgpp/djconfig.sh: Correct shell portability issue.
4989
4990 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4991
4992 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4993
4994 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4995
4996 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4997 * NEWS: Mention new FreeBSD/mips native configuration.
4998 * configure.host: Add aarch64*-*-freebsd*.
4999 * configure.nat: Likewise.
5000 * aarch64-fbsd-nat.c: New file.
5001
5002 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5003
5004 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5005 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5006 * NEWS: Mention new FreeBSD/aarch64 target.
5007 * configure.tgt: Add aarch64*-*-freebsd*.
5008 * aarch64-fbsd-tdep.c: New file.
5009 * aarch64-fbsd-tdep.h: New file.
5010
5011 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5012
5013 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5014
5015 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5016
5017 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5018 of TLS symbols.
5019
5020 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5021
5022 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5023 call.
5024
5025 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5026
5027 * infrun.c (follow_exec): Call add_thread after
5028 target_find_description.
5029
5030 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5031
5032 * infrun.c (handle_inferior_event_1): When exec'ing, read
5033 stop_pc after follow_exec.
5034
5035 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5036
5037 * remote.c (process_g_packet): Update error message.
5038
5039 2017-09-05 Yao Qi <yao.qi@linaro.org>
5040
5041 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5042 targets.
5043
5044 2017-09-05 Pedro Alves <palves@redhat.com>
5045
5046 * eval.c (eval_call, evaluate_funcall): New functions, factored
5047 out from ...
5048 (evaluate_subexp_standard): ... this.
5049
5050 2017-09-05 Yao Qi <yao.qi@linaro.org>
5051
5052 * amd64-tdep.c (amd64_target_description): Create target
5053 descriptions.
5054 (_initialize_amd64_tdep): Don't call functions
5055 initialize_tdesc_amd64_*. Add self tests.
5056 * arch/amd64.c (amd64_create_target_description): Add parameter
5057 is_linux. Call set_tdesc_osabi if is_linux is true.
5058 * arch/amd64.h (amd64_create_target_description): Update the
5059 declaration.
5060 * arch/i386.c (i386_create_target_description): Add parameter
5061 is_linux. Call set_tdesc_osabi if is_linux is true.
5062 * arch/i386.h (i386_create_target_description): Update
5063 declaration.
5064 * configure.tgt: Add i386.o to gdb_target_obs.
5065 * features/Makefile (XMLTOC): Remove i386/*.xml.
5066 * features/i386/amd64-avx-avx512.c: Remove.
5067 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5068 * features/i386/amd64-avx-mpx.c: Remove.
5069 * features/i386/amd64-avx.c: Remove.
5070 * features/i386/amd64-mpx.c: Remove.
5071 * features/i386/amd64.c: Remove.
5072 * features/i386/i386-avx-avx512.c: Remove.
5073 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5074 * features/i386/i386-avx-mpx.c: Remove.
5075 * features/i386/i386-avx.c: Remove.
5076 * features/i386/i386-mmx.c: Remove.
5077 * features/i386/i386-mpx.c: Remove.
5078 * features/i386/i386.c: Remove.
5079 * i386-tdep.c: Don't include features/i386/i386*.c., include
5080 target-descriptions.h and arch/i386.h.
5081 (i386_target_description): Create target descriptions.
5082 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5083 functions. Do self tests.
5084
5085 2017-09-05 Yao Qi <yao.qi@linaro.org>
5086
5087 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5088 * features/i386/amd64-avx-avx512-linux.c: Removed.
5089 * features/i386/amd64-avx-linux.c: Removed.
5090 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5091 * features/i386/amd64-avx-mpx-linux.c: Removed.
5092 * features/i386/amd64-linux.c: Removed.
5093 * features/i386/amd64-mpx-linux.c: Removed.
5094 * features/i386/x32-avx-avx512-linux.c: Removed.
5095 * features/i386/x32-avx-linux.c: Removed.
5096 * features/i386/x32-linux.c: Removed.
5097
5098 2017-09-05 Yao Qi <yao.qi@linaro.org>
5099
5100 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5101 features/i386/*.c.
5102 (amd64_linux_read_description): Call
5103 amd64_create_target_description.
5104 * arch/amd64.c: New file.
5105 * arch/amd64.h: New file.
5106 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5107 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5108
5109 2017-09-05 Yao Qi <yao.qi@linaro.org>
5110
5111 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5112 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5113 (amd64_linux_read_description): Create target descriptions.
5114 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5115 functions. Add unit tests.
5116 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5117 x32-core.xml.
5118 * features/i386/64bit-avx.c: Generated.
5119 * features/i386/64bit-avx512.c: Generated.
5120 * features/i386/64bit-core.c: Generated.
5121 * features/i386/64bit-linux.c: Generated.
5122 * features/i386/64bit-mpx.c: Generated.
5123 * features/i386/64bit-pkeys.c: Generated.
5124 * features/i386/64bit-segments.c: Generated.
5125 * features/i386/64bit-sse.c: Generated.
5126 * features/i386/x32-core.c: Generated.
5127 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5128 c files for amd64-linux and x32-linux.
5129
5130 2017-09-05 Yao Qi <yao.qi@linaro.org>
5131
5132 * amd64-linux-tdep.c (amd64_linux_read_description): New
5133 function.
5134 (amd64_linux_core_read_description): Call
5135 amd64_linux_read_description.
5136 (amd64_linux_init_abi): Likewise.
5137 (amd64_x32_linux_init_abi): Likewise.
5138 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5139 * x86-linux-nat.c (x86_linux_read_description): Call
5140 amd64_linux_read_description.
5141
5142 2017-09-05 Yao Qi <yao.qi@linaro.org>
5143
5144 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5145 comments.
5146
5147 2017-09-05 Yao Qi <yao.qi@linaro.org>
5148
5149 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5150 * features/i386/i386-avx-avx512-linux.c: Remove.
5151 * features/i386/i386-avx-linux.c: Remove.
5152 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5153 * features/i386/i386-avx-mpx-linux.c: Remove.
5154 * features/i386/i386-linux.c: Remove.
5155 * features/i386/i386-mmx-linux.c: Remove.
5156 * features/i386/i386-mpx-linux.c: Remove.
5157
5158 2017-09-05 Yao Qi <yao.qi@linaro.org>
5159
5160 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5161 (SFILES): Add arch/i386.c.
5162 (HFILES_NO_SRCDIR): Add arch/i386.h.
5163 * arch/i386.c: New file.
5164 * arch/i386.h: New file.
5165 * arch/tdesc.h (allocate_target_description): Declare.
5166 (set_tdesc_architecture): Declare.
5167 (set_tdesc_osabi): Declare.
5168 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5169 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5170 include arch/i386.h.
5171 (i386_linux_read_description): Remove code and call
5172 i386_create_target_description.
5173 (set_tdesc_architecture): New function.
5174 (set_tdesc_osabi): New function.
5175 * target-descriptions.h (allocate_target_description): Remove.
5176
5177 2017-09-05 Yao Qi <yao.qi@linaro.org>
5178
5179 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5180 * target-descriptions.c (tdesc_create_feature): Likewise, and
5181 adjust code.
5182 * features/i386/32bit-avx.c: Re-generated.
5183 * features/i386/32bit-avx512.c: Re-generated.
5184 * features/i386/32bit-core.c: Re-generated.
5185 * features/i386/32bit-linux.c: Re-generated.
5186 * features/i386/32bit-mpx.c: Re-generated.
5187 * features/i386/32bit-pkeys.c: Re-generated.
5188 * features/i386/32bit-sse.c: Re-generated.
5189
5190 2017-09-05 Yao Qi <yao.qi@linaro.org>
5191
5192 * regformats/regdef.h (struct reg): Override operator == and !=.
5193
5194 2017-09-05 Yao Qi <yao.qi@linaro.org>
5195
5196 * arch/tdesc.h: New file.
5197 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5198 * target-descriptions.c: Update comments.
5199 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5200 declarations.
5201 * features/i386/32bit-avx.c: Re-generated.
5202 * features/i386/32bit-avx512.c: Re-generated.
5203 * features/i386/32bit-core.c: Re-generated.
5204 * features/i386/32bit-linux.c: Re-generated.
5205 * features/i386/32bit-mpx.c: Re-generated.
5206 * features/i386/32bit-pkeys.c: Re-generated.
5207 * features/i386/32bit-sse.c: Re-generated.
5208
5209 2017-09-05 Yao Qi <yao.qi@linaro.org>
5210
5211 * regformats/regdat.sh: Update generated code.
5212
5213 2017-09-05 Yao Qi <yao.qi@linaro.org>
5214
5215 * regformats/regdat.sh: Adjust code order.
5216
5217 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5218
5219 * expprint.c (dump_subexp_body_standard): Use constant format
5220 string in fprintf_filtered call.
5221
5222 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5223
5224 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5225 NetBSD/i386.
5226 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5227
5228 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5229
5230 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5231
5232 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5233
5234 * bsd-kvm.o: Define _KMEMUSER.
5235 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5236 * configure: Regenerate.
5237
5238 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5239
5240 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5241 * i386-fbsd-nat.c: Likewise.
5242
5243 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5244
5245 * unittests/array-view-selftests.c: Add include of <array>.
5246
5247 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5248
5249 * spu-tdep.c (flush_ea_cache): Add missing argument to
5250 call_function_by_hand.
5251
5252 2017-09-04 Pedro Alves <palves@redhat.com>
5253
5254 * NEWS (Safer support for debugging with no debug info): New.
5255
5256 2017-09-04 Pedro Alves <palves@redhat.com>
5257
5258 * c-exp.y (function_method, function_method_void): Add current
5259 instance flags to TYPE_INSTANCE.
5260 * dwarf2read.c (check_modifier): New.
5261 (compute_delayed_physnames): Assert that only C++ adds delayed
5262 physnames. Mark fn_fields as const/volatile depending on
5263 physname.
5264 * eval.c (make_params): New type_instance_flags parameter. Use
5265 it as the new type's instance flags.
5266 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5267 flags element and pass it to make_params.
5268 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5269 instance flags element.
5270 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5271 * gdbtypes.h: Include "enum-flags.h".
5272 (type_instance_flags): New enum-flags type.
5273 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5274 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5275 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5276 (follow_type_instance_flags): New function.
5277 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5278 * parser-defs.h (follow_type_instance_flags): Declare.
5279 * valops.c (value_struct_elt_for_reference): const/volatile must
5280 match too.
5281
5282 2017-09-04 Pedro Alves <palves@redhat.com>
5283
5284 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5285 function/method scopes; lookup the nested name as a function local
5286 static variable.
5287
5288 2017-09-04 Pedro Alves <palves@redhat.com>
5289
5290 (%type <voidval>): Add function_method.
5291 * c-exp.y (exp): New production for calls with no arguments.
5292 (function_method, function_method_void_or_typelist): New
5293 productions.
5294 (exp): New production for "method()::static_var".
5295 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5296 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5297 Handle OP_FUNC_STATIC_VAR.
5298 * parse.c (operator_length_standard):
5299 Handle OP_FUNC_STATIC_VAR.
5300
5301 2017-09-04 Pedro Alves <palves@redhat.com>
5302
5303 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5304 handling.
5305 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5306 Ditto.
5307 * parse.c (operator_length_standard, operator_check_standard):
5308 Ditto.
5309 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5310
5311 2017-09-04 Pedro Alves <palves@redhat.com>
5312
5313 * ax-gdb.c: Include "typeprint.h".
5314 (gen_expr_for_cast): New function.
5315 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5316 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5317 type is unknown.
5318 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5319 nodebug_data_symbol.
5320 * eval.c: Include "typeprint.h".
5321 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5322 Error out if symbol has unknown type.
5323 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5324 evaluate_subexp_for_cast.
5325 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5326 OP_VAR_MSYM_VALUE.
5327 (evaluate_subexp_for_cast): New function.
5328 * gdbtypes.c (init_nodebug_var_type): New function.
5329 (objfile_type): Use it to initialize types of variables with no
5330 debug info.
5331 * typeprint.c (error_unknown_type): New.
5332 * typeprint.h (error_unknown_type): New declaration.
5333 * compile/compile-c-types.c (convert_type_basic): Handle
5334 TYPE_CODE_ERROR; warn and fallback to int for variables with
5335 unknown type.
5336
5337 2017-09-04 Pedro Alves <palves@redhat.com>
5338
5339 * eval.c (evaluate_var_value): New function, factored out from ...
5340 (evaluate_subexp_standard): ... here.
5341
5342 2017-09-04 Pedro Alves <palves@redhat.com>
5343
5344 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5345 Remove useless assignments to 'op'.
5346
5347 2017-09-04 Pedro Alves <palves@redhat.com>
5348
5349 * eval.c (eval_skip_value): New function.
5350 (evaluate_subexp_standard): Use it.
5351
5352 2017-09-04 Pedro Alves <palves@redhat.com>
5353
5354 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5355 function name from symbol/minsym and pass it to
5356 error_call_unknown_return_type.
5357
5358 2017-09-04 Pedro Alves <palves@redhat.com>
5359
5360 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5361 * ax-gdb.c (gen_msym_var_ref): New function.
5362 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5363 * eval.c (evaluate_var_msym_value): New function.
5364 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5365 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5366 to call_function_by_hand.
5367 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5368 Handle OP_VAR_MSYM_VALUE.
5369 (union exp_element) <msymbol>: New field.
5370 * minsyms.h (struct type): Forward declare.
5371 (find_minsym_type_and_address): Declare.
5372 * parse.c (write_exp_elt_msym): New function.
5373 (write_exp_msymbol): Delete, refactored as ...
5374 (find_minsym_type_and_address): ... this new function.
5375 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5376 (operator_length_standard, operator_check_standard): Handle
5377 OP_VAR_MSYM_VALUE.
5378 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5379
5380 2017-09-04 Pedro Alves <palves@redhat.com>
5381
5382 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5383 TYPE_GNU_IFUNC specially here. Throw error if return type is
5384 unknown.
5385 * ada-typeprint.c (print_func_type): Handle functions with unknown
5386 return type.
5387 * c-typeprint.c (c_type_print_base): Handle functions and methods
5388 with unknown return type.
5389 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5390 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5391 * compile/compile-c-types.c: Include "objfiles.h".
5392 (convert_func): For functions with unknown return type, warn and
5393 default to int.
5394 * compile/compile-object-run.c (compile_object_run): Adjust call
5395 to call_function_by_hand_dummy.
5396 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5397 call_function_by_hand.
5398 * eval.c (evaluate_subexp_standard): Adjust calls to
5399 call_function_by_hand. Handle functions and methods with unknown
5400 return type. Pass expect_type to call_function_by_hand.
5401 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5402 return type.
5403 * gcore.c (call_target_sbrk): Adjust call to
5404 call_function_by_hand.
5405 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5406 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5407 an integer address type instead of nodebug.
5408 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5409 call_function_by_hand.
5410 * infcall.c (error_call_unknown_return_type): New function.
5411 (call_function_by_hand): New "default_return_type" parameter.
5412 Pass it down.
5413 (call_function_by_hand_dummy): New "default_return_type"
5414 parameter. Use it instead of defaulting to int. If there's no
5415 default and the return type is unknown, throw an error. If
5416 there's a default return type, and the called function has no
5417 debug info, then assume the function is prototyped.
5418 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5419 New "default_return_type" parameter.
5420 (error_call_unknown_return_type): New declaration.
5421 * linux-fork.c (call_lseek): Cast return type of lseek.
5422 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5423 call_function_by_hand.
5424 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5425 calls to call_function_by_hand.
5426 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5427 return type.
5428 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5429 (value_nsstring, print_object_command): Adjust calls to
5430 call_function_by_hand.
5431 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5432 functions with unknown return type.
5433 (pascal_type_print_func_varspec_suffix): New function.
5434 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5435 TYPE_CODE_METHOD>: Use it.
5436 * python/py-value.c (valpy_call): Adjust call to
5437 call_function_by_hand.
5438 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5439 call_function_by_hand.
5440 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5441 call_function_by_hand.
5442 * valops.c (value_allocate_space_in_inferior): Adjust call to
5443 call_function_by_hand.
5444 * typeprint.c (type_print_unknown_return_type): New function.
5445 * typeprint.h (type_print_unknown_return_type): New declaration.
5446
5447 2017-09-04 Pedro Alves <palves@redhat.com>
5448
5449 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5450 types with more than one parameter as prototyped.
5451
5452 2017-09-04 Pedro Alves <palves@redhat.com>
5453
5454 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5455 (disassemble_command): Use gdb_disassembly_flags instead of bare
5456 int.
5457 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5458 (dump_insns, do_mixed_source_and_assembly_deprecated)
5459 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5460 Use gdb_disassembly_flags instead of bare int.
5461 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5462 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5463 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5464 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5465 (enum gdb_disassembly_flag): ... values of this new enumeration.
5466 (gdb_disassembly_flags): Define.
5467 (gdb_disassembly)
5468 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5469 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5470 gdb_disassembly_flags instead of bare int.
5471 * record-btrace.c (btrace_insn_history)
5472 (record_btrace_insn_history, record_btrace_insn_history_range)
5473 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5474 instead of bare int.
5475 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5476 Use gdb_disassembly_flags instead of bare int.
5477 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5478 Define.
5479 * target-delegates.c: Regenerate.
5480 * target.c (target_insn_history, target_insn_history_from)
5481 (target_insn_history_range): Use gdb_disassembly_flags instead of
5482 bare int.
5483 * target.h: Include "disasm.h".
5484 (struct target_ops) <to_insn_history, to_insn_history_from,
5485 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5486 int.
5487 (target_insn_history, target_insn_history_from)
5488 (target_insn_history_range): Use gdb_disassembly_flags instead of
5489 bare int.
5490
5491 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5492
5493 * cli/cli-script.c (build_command_line): For if/while commands,
5494 check whether args is empty.
5495
5496 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5497
5498 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5499 (enum command_control_type): Likewise.
5500 (struct command_line): Likewise.
5501 (free_command_lines): Likewise.
5502 (struct command_lines_deleter): Likewise.
5503 (command_line_up): Likewise.
5504 (read_command_lines): Likewise.
5505 (read_command_lines_1): Likewise.
5506 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5507 (enum command_control_type): Likewise.
5508 (struct command_line): Likewise.
5509 (free_command_lines): Likewise.
5510 (struct command_lines_deleter): Likewise.
5511 (command_line_up): Likewise.
5512 (read_command_lines): Likewise.
5513 (read_command_lines_1): Likewise.
5514 * breakpoint.h: Include cli/cli-script.h.
5515 * extension-priv.h: Likewise.
5516 * gdbcmd.h: Likewise.
5517
5518 2017-09-04 Pedro Alves <palves@redhat.com>
5519
5520 * ada-lang.c (is_known_support_routine): Move sal declaration to
5521 where it is initialized.
5522 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5523 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5524 (clear_command, update_static_tracepoint): Remove init_sal
5525 references. Move declarations closer to initializations.
5526 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5527 initializations.
5528 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5529 references. Move sal declarations closer to initializations.
5530 * frame.c (find_frame_sal): Return a symtab_and_line via function
5531 return instead of output parameter. Remove init_sal references.
5532 * frame.h (find_frame_sal): Return a symtab_and_line via function
5533 return instead of output parameter.
5534 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5535 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5536 instead of memset.
5537 (gdbscm_find_pc_line): Remove init_sal reference.
5538 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5539 references. Move declarations closer to initializations.
5540 * infcmd.c (set_step_frame): Update. Move declarations closer to
5541 initializations.
5542 (finish_backward): Remove init_sal references. Move declarations
5543 closer to initializations.
5544 * infrun.c (process_event_stop_test, handle_step_into_function)
5545 (insert_hp_step_resume_breakpoint_at_frame)
5546 (insert_step_resume_breakpoint_at_caller): Likewise.
5547 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5548 (symbol_to_sal): Likewise.
5549 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5550 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5551 to its initialization.
5552 * reverse.c (save_bookmark_command): Use new/delete. Remove
5553 init_sal references. Move declarations closer to initializations.
5554 * source.c (get_current_source_symtab_and_line): Remove brace
5555 initialization.
5556 (set_current_source_symtab_and_line): Now takes the sal by const
5557 reference. Remove brace initialization.
5558 (line_info): Remove init_sal reference.
5559 * source.h (set_current_source_symtab_and_line): Now takes a
5560 symtab_and_line via const reference.
5561 * stack.c (set_current_sal_from_frame): Adjust.
5562 (print_frame_info): Adjust.
5563 (get_last_displayed_sal): Return the sal via function return
5564 instead of via output parameter. Simplify.
5565 (frame_info): Adjust.
5566 * stack.h (get_last_displayed_sal): Return the sal via function
5567 return instead of via output parameter.
5568 * symtab.c (init_sal): Delete.
5569 (find_pc_sect_line): Remove init_sal references. Move
5570 declarations closer to initializations.
5571 (find_function_start_sal): Remove init_sal references. Move
5572 declarations closer to initializations.
5573 * symtab.h (struct symtab_and_line): In-class initialize all
5574 fields.
5575 * tracepoint.c (set_traceframe_context)
5576 (print_one_static_tracepoint_marker): Remove init_sal references.
5577 Move declarations closer to initializations.
5578 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5579 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5580 declarations closer to initializations.
5581 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5582 init_sal references. Adjust.
5583
5584 2017-09-04 Pedro Alves <palves@redhat.com>
5585
5586 * ax-gdb.c (agent_command_1): Use range-for.
5587 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5588 * breakpoint.c: Include "common/array-view.h".
5589 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5590 parameter from struct symtabs_and_lines to
5591 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5592 (breakpoint_sals_to_pc): Change sals parameter from struct
5593 symtabs_and_lines to std::vector reference.
5594 (check_fast_tracepoint_sals): Change sals parameter from struct
5595 symtabs_and_lines to std::array_view. Use range-for.
5596 (decode_static_tracepoint_spec): Return a std::vector instead of
5597 symtabs_and_lines. Update.
5598 (create_breakpoint): Update.
5599 (break_range_command, until_break_command, clear_command): Update.
5600 (base_breakpoint_decode_location, bkpt_decode_location)
5601 (bkpt_probe_create_sals_from_location)
5602 (bkpt_probe_decode_location, tracepoint_decode_location)
5603 (tracepoint_probe_decode_location)
5604 (strace_marker_create_sals_from_location): Return a std::vector
5605 instead of symtabs_and_lines.
5606 (strace_marker_create_breakpoints_sal): Update.
5607 (strace_marker_decode_location): Return a std::vector instead of
5608 symtabs_and_lines. Update.
5609 (update_breakpoint_locations): Change struct symtabs_and_lines
5610 parameters to gdb::array_view. Adjust.
5611 (location_to_sals): Return a std::vector instead of
5612 symtabs_and_lines. Update.
5613 (breakpoint_re_set_default): Use std::vector instead of struct
5614 symtabs_and_lines.
5615 (decode_location_default): Return a std::vector instead of
5616 symtabs_and_lines. Update.
5617 * breakpoint.h: Include "common/array-view.h".
5618 (struct breakpoint_ops) <decode_location>: Now returns a
5619 std::vector instead of returning a symtabs_and_lines via output
5620 parameter.
5621 (update_breakpoint_locations): Change sals parameters to use
5622 gdb::array_view.
5623 * cli/cli-cmds.c (edit_command, list_command): Update to use
5624 std::vector and gdb::array_view.
5625 (ambiguous_line_spec): Adjust to use gdb::array_view and
5626 range-for.
5627 (compare_symtabs): Rename to ...
5628 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5629 const reference and adjust.
5630 (filter_sals): Rewrite using std::vector and standard algorithms.
5631 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5632 (jump_command): Update to use std::vector.
5633 * linespec.c (struct linespec_state) <canonical_names>: Update
5634 comment.
5635 (add_sal_to_sals_basic): Delete.
5636 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5637 (decode_line_2, create_sals_line_offset)
5638 (convert_address_location_to_sals, convert_linespec_to_sals)
5639 (convert_explicit_location_to_sals, parse_linespec)
5640 (event_location_to_sals, decode_line_full, decode_line_1)
5641 (decode_line_with_current_source)
5642 (decode_line_with_last_displayed, decode_objc)
5643 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5644 (linespec_result::~linespec_result): Adjust to use std::vector
5645 instead of symtabs_and_lines.
5646 * linespec.h (linespec_sals::sals): Now a std::vector.
5647 (struct linespec_result): Use std::vector, bool, and in-class
5648 initialization.
5649 (decode_line_1, decode_line_with_current_source)
5650 (decode_line_with_last_displayed): Return std::vector.
5651 * macrocmd.c (info_macros_command): Use std::vector.
5652 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5653 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5654 std::vector.
5655 * probe.h (parse_probes): Return a std::vector.
5656 * python/python.c (gdbpy_decode_line): Use std::vector and
5657 gdb::array_view.
5658 * source.c (select_source_symtab, line_info): Use std::vector.
5659 * stack.c (func_command): Use std::vector.
5660 * symtab.h (struct symtabs_and_lines): Delete.
5661 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5662
5663 2017-09-04 Pedro Alves <palves@redhat.com>
5664
5665 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5666 unittests/array-view-selftests.c.
5667 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5668 * common/array-view.h: New file.
5669 * unittests/array-view-selftests.c: New file.
5670
5671 2017-09-04 Pedro Alves <palves@redhat.com>
5672
5673 * cli/cli-cmds.c (edit_command): Pass message to
5674 ambiguous_line_spec.
5675 (list_command): Pass message to ambiguous_line_spec. Say
5676 "first"/"last" instead of "start" and "end" to be consistent with
5677 the manual.
5678 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5679 them to print formatted message.
5680
5681 2017-09-04 Pedro Alves <palves@redhat.com>
5682
5683 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5684 ftrace_update_insns by reference instead of pointer.
5685
5686 2017-09-04 Yao Qi <yao.qi@linaro.org>
5687
5688 * i386-go32-tdep.c: Include x86-xstate.h.
5689 (i386_go32_init_abi): Call i386_target_description.
5690 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5691 if xcr0 is X86_XSTATE_X87_MASK.
5692 * i386-tdep.h (tdesc_i386): Remove the declaration.
5693 (tdesc_i386_mmx): Likewise.
5694
5695 2017-09-04 Yao Qi <yao.qi@linaro.org>
5696
5697 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5698 X86_XSTATE_SSE_MASK instead of 0.
5699
5700 2017-09-04 Yao Qi <yao.qi@linaro.org>
5701
5702 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5703 i386_target_description.
5704 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5705 i386_target_description.
5706 * i386-tdep.c (i386_gdbarch_init): Likewise.
5707
5708 2017-09-04 Yao Qi <yao.qi@linaro.org>
5709
5710 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5711 (x86_darwin_init_abi_64): Call amd64_target_description.
5712 * amd64-dicos-tdep.c: Likewise.
5713 * amd64-fbsd-nat.c: Likewise.
5714 * amd64-fbsd-tdep.c: Likewise.
5715 * amd64-nbsd-tdep.c: Likewise.
5716 * amd64-obsd-tdep.c: Likewise.
5717 * amd64-sol2-tdep.c: Likewise.
5718 * amd64-windows-tdep.c: Likewise.
5719 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5720
5721 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5722
5723 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5724 (btrace_function) <insn>: Change type to use std::vector.
5725 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5726 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5727 ftrace_update_insns, ftrace_compute_global_level_offset,
5728 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5729 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5730 change to std::vector.
5731 (ftrace_update_insns): Adjust to change to std::vector, change
5732 type of INSN parameter.
5733 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5734 * record-btrace.c (btrace_call_history_insn_range,
5735 btrace_compute_src_line_range,
5736 record_btrace_frame_prev_register): Adjust to change to
5737 std::vector.
5738 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5739 to change to std::vector.
5740
5741 2017-09-03 Tom Tromey <tom@tromey.com>
5742
5743 * corefile.c (reopen_exec_file): Use std::string.
5744
5745 2017-09-03 Tom Tromey <tom@tromey.com>
5746
5747 * compile/compile.c (compile_register_name_mangled): Return
5748 std::string.
5749 * compile/compile-loc2c.c (pushf_register_address): Update.
5750 (pushf_register): Update.
5751 * compile/compile-c-types.c (convert_array): Update.
5752 * compile/compile-c-symbols.c (generate_vla_size): Update.
5753 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5754 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5755 (convert_one_symbol): Update.
5756 (generate_c_for_for_one_variable): Update.
5757 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5758 std::string.
5759 (generate_register_struct): Update.
5760 * compile/compile-internal.h (c_get_range_decl_name): Return a
5761 std::string.
5762 (compile_register_name_mangled): Return std::string.
5763
5764 2017-09-03 Tom Tromey <tom@tromey.com>
5765
5766 * utils.c (perror_string): Return a std::string.
5767 (throw_perror_with_name, perror_warning_with_name): Update.
5768
5769 2017-09-03 Tom Tromey <tom@tromey.com>
5770
5771 * demangle.c (demangle_command): Use std::string,
5772 unique_xmalloc_ptr.
5773
5774 2017-09-03 Tom Tromey <tom@tromey.com>
5775
5776 * cli/cli-setshow.c (do_set_command): Use std::string.
5777
5778 2017-09-03 Tom Tromey <tom@tromey.com>
5779
5780 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5781
5782 2017-09-03 Tom Tromey <tom@tromey.com>
5783
5784 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5785
5786 2017-09-03 Tom Tromey <tom@tromey.com>
5787
5788 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5789 gdb::unique_xmalloc_ptr.
5790
5791 2017-09-03 Tom Tromey <tom@tromey.com>
5792
5793 * thread.c (print_thread_info_1): Use string_printf.
5794 (thread_apply_command, thread_apply_all_command): Use
5795 std::string.
5796
5797 2017-09-03 Tom Tromey <tom@tromey.com>
5798
5799 * valprint.c (val_print_string): Update.
5800 * gdbcore.h (memory_error_message): Return std::string.
5801 * corefile.c (memory_error_message): Return std::string.
5802 (memory_error): Update.
5803 * breakpoint.c (insert_bp_location): Update.
5804
5805 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5806
5807 * target/waitstatus.h (target_waitstatus_to_string): Change
5808 return type to std::string.
5809 * target/waitstatus.c (target_waitstatus_to_string): Return
5810 std::string.
5811 * target.h (target_waitstatus_to_string): Remove declaration.
5812 * infrun.c (resume, clear_proceed_status_thread,
5813 print_target_wait_results, do_target_wait, save_waitstatus,
5814 stop_all_threads): Adjust.
5815 * record-btrace.c (record_btrace_wait): Adjust.
5816 * target-debug.h
5817 (target_debug_print_struct_target_waitstatus_p): Adjust.
5818
5819 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5820
5821 PR gdb/22046
5822 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5823 detection.
5824
5825 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5826
5827 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5828 for setting/unsetting environment variables on the remote target.
5829 (New remote packets): Add entries for QEnvironmentHexEncoded,
5830 QEnvironmentUnset and QEnvironmentReset.
5831 * common/environ.c (gdb_environ::operator=): Extend method to
5832 handle m_user_set_env_list and m_user_unset_env_list.
5833 (gdb_environ::clear): Likewise.
5834 (match_var_in_string): Change type of first parameter from 'char
5835 *' to 'const char *'.
5836 (gdb_environ::set): Extend method to handle
5837 m_user_set_env_list and m_user_unset_env_list.
5838 (gdb_environ::unset): Likewise.
5839 (gdb_environ::clear_user_set_env): New method.
5840 (gdb_environ::user_set_envp): Likewise.
5841 (gdb_environ::user_unset_envp): Likewise.
5842 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5843 m_user_unset_env_list on move constructor/assignment.
5844 (unset): Add new default parameter 'update_unset_list = true'.
5845 (clear_user_set_env): New method.
5846 (user_set_envp): Likewise.
5847 (user_unset_envp): Likewise.
5848 (m_user_set_env_list): New std::set.
5849 (m_user_unset_env_list): Likewise.
5850 * common/rsp-low.c (hex2str): New function.
5851 (bin2hex): New overload for bin2hex function.
5852 * common/rsp-low.c (hex2str): New prototype.
5853 (str2hex): New overload prototype.
5854 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5855 QEnvironmentUnset and QEnvironmentReset.
5856 (remote_protocol_features): Add QEnvironmentHexEncoded,
5857 QEnvironmentUnset and QEnvironmentReset packets.
5858 (send_environment_packet): New function.
5859 (extended_remote_environment_support): Likewise.
5860 (extended_remote_create_inferior): Call
5861 extended_remote_environment_support.
5862 (_initialize_remote): Add QEnvironmentHexEncoded,
5863 QEnvironmentUnset and QEnvironmentReset packet configs.
5864 * unittests/environ-selftests.c (gdb_selftest_env_var):
5865 New variable.
5866 (test_vector_initialization): New function.
5867 (test_init_from_host_environ): Likewise.
5868 (test_reinit_from_host_environ): Likewise.
5869 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5870 Likewise.
5871 (test_unset_set_empty_vector): Likewise.
5872 (test_vector_clear): Likewise.
5873 (test_std_move): Likewise.
5874 (test_move_constructor):
5875 (test_self_move): Likewise.
5876 (test_set_unset_reset): Likewise.
5877 (run_tests): Rewrite in terms of the functions above.
5878
5879 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5880
5881 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5882 (adi_available): Use a temp variable of type CORE_ADDR as argument
5883 3 when calling target_auxv_search.
5884 (adi_normalize_address): Use masks and xor operators to calculate
5885 normalized address.
5886 (adi_read_versions, adi_write_versions, adi_print_versions)
5887 (do_examine, do_assign): Use paddress.
5888
5889 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5890
5891 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5892 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5893 out of loop and add supply of FIR.
5894 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5895 add collect of FIR.
5896
5897 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5898
5899 PR gdb/21827
5900 * cli/cli-script.c (define_command): Don't convert command name
5901 to lower case.
5902
5903 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5904
5905 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5906 Update all callers accordingly. Remove all code blocks handling
5907 the case where DISPP is not NULL.
5908
5909 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5910
5911 PR symtab/22003
5912 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5913 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5914 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5915
5916 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5917
5918 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5919 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5920 (read_comp_units_from_section): New parameter abbrev_section, use
5921 read_and_check_comp_unit_head, allocate signatured_type if needed.
5922 (create_all_comp_units): Update read_comp_units_from_section caller.
5923
5924 2017-08-23 Pedro Alves <palves@redhat.com>
5925
5926 PR remote/21852
5927 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5928 to null_ptid and switch to thread without reading the registers
5929 after adding the inferior.
5930
5931 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5932
5933 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5934 compile-gcc.
5935 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5936 (compile_to_object): Implement compile_gcc.
5937 (_initialize_compile): Install "set compile-gcc". Initialize
5938 compile_gcc.
5939
5940 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5941
5942 * compile/compile.c (compile_to_object): Conditionally call
5943 set_verbose. Conditionally call compile or compile_v0.
5944
5945 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5946
5947 * sparc64-tdep.h: (adi_normalize_address): New export.
5948 * sparc-nat.h: (open_adi_tag_fd): New export.
5949 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5950 * sparc64-linux-tdep.c:
5951 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5952 (sparc64_linux_handle_segmentation_fault): New function.
5953 (sparc64_linux_init_abi): Register
5954 sparc64_linux_handle_segmentation_fault
5955 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5956 (sparc64_addr_bits_remove): New function.
5957 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5958 (MAX_PROC_NAME_SIZE): New macro.
5959 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5960 (sparc64adilist): New variable.
5961 (adi_proc_list): New variable.
5962 (find_adi_info): New function.
5963 (add_adi_info): New function.
5964 (get_adi_info_proc): New function.
5965 (get_adi_info): New function.
5966 (info_adi_command): New function.
5967 (read_maps_entry): New function.
5968 (adi_available): New function.
5969 (adi_normalize_address): New function.
5970 (adi_align_address): New function.
5971 (adi_convert_byte_count): New function.
5972 (adi_tag_fd): New function.
5973 (adi_is_addr_mapped): New function.
5974 (adi_read_versions): New function.
5975 (adi_write_versions): New function.
5976 (adi_print_versions): New function.
5977 (do_examine): New function.
5978 (do_assign): New function.
5979 (adi_examine_command): New function.
5980 (adi_assign_command): New function.
5981 (_initialize_sparc64_adi_tdep): New function.
5982
5983 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5984
5985 * breakpoint.c (breakpoints_info): Rename to ...
5986 (info_breakpoints_command): ... this.
5987 (watchpoints_info): Rename to ...
5988 (info_watchpoints_command): ... this.
5989 (tracepoints_info): Rename to ...
5990 (info_tracepoints_command): ... this.
5991 (_initialize_breakpoint): Adjust.
5992 * dcache.c (dcache_info): Rename to ...
5993 (info_display_command): ... this.
5994 (_initialize_dcache): Adjust.
5995 * frame.h (args_info): Rename to ...
5996 (info_args_command): ... this.
5997 (locals_info): Rename to ...
5998 (info_locals_command): ... this.
5999 * infcmd.c (nofp_registers_info): Rename to ...
6000 (info_registers_command): ... this.
6001 (float_info): Rename to ...
6002 (info_float_command): ... this.
6003 (program_info): Rename to ...
6004 (info_program_command): ... this.
6005 (all_registers_info): Rename to ...
6006 (info_all_registers_command): ... this.
6007 (vector_info): Rename to ...
6008 (info_vector_command): ... this.
6009 (float_info): Rename to ...
6010 (info_float_command): ... this.
6011 (_initialize_infcmd): Adjust.
6012 * inferior.h (term_info): Rename to ...
6013 (info_terminal_command): ... this.
6014 * inflow.c (term_info): Rename to ...
6015 (info_terminal_command): ... this.
6016 (_initialize_inflow): Adjust.
6017 * infrun.c (signals_info): Rename to ...
6018 (info_signals_command): ... this.
6019 (_initialize_infrun): Adjust.
6020 * objc-lang.c (classes_info): Rename to ...
6021 (info_classes_command): ... this.
6022 (selectors_info): Rename to ...
6023 (info_selectors_command): ... this.
6024 (_initialize_objc_language): Adjust.
6025 * printcmd.c (sym_info): Rename to ...
6026 (info_symbol_command): ... this.
6027 (address_info): Rename to ...
6028 (info_address_command): ... this.
6029 (display_info): Rename to ...
6030 (info_display_command): ... this.
6031 (_initialize_printcmd): Adjust.
6032 * reverse.c (bookmarks_info): Rename to ...
6033 (info_breakpoints_command): ... this.
6034 (_initialize_reverse): Adjust.
6035 * ser-go32.c (dos_info): Rename to ...
6036 (info_serial_command): ... this.
6037 (_initialize_ser_dos): Adjust.
6038 * skip.c (skip_info): Rename to ...
6039 (info_skip_command): ... this.
6040 (_initialize_step_skip): Adjust.
6041 * source.c (line_info): Rename to ...
6042 (info_line_command): ... this.
6043 (source_info): Rename to ...
6044 (info_source_command)
6045 * stack.c (frame_info): Rename to ...
6046 (info_frame_command): ... this.
6047 (locals_info): Rename to ...
6048 (info_locals_command): ... this.
6049 (args_info): Rename to ...
6050 (info_args_command): ... this.
6051 (_initialize_stack): Adjust.
6052 * symtab.c (sources_info): Rename to ...
6053 (info_sources_command): ... this.
6054 (variables_info): Rename to ...
6055 (info_variables_command): ... this.
6056 (functions_info): Rename to ...
6057 (info_functions_command): ... this.
6058 (types_info): Rename to ...
6059 (info_types_command): ... this.
6060 (_initialize_symtab): Adjust.
6061 * target.c (target_info): Rename to ...
6062 (info_target_command): ... this.
6063 (initialize_targets): Adjust.
6064 * tracepoint.c (tvariables_info): Rename to ...
6065 (info_tvariables_command): ... this.
6066 (scope_info): Rename to ...
6067 (info_scope_command): ... this.
6068 (trace_dump_actions): Adjust.
6069 (_initialize_tracepoint): Adjust.
6070
6071 2017-08-22 Tom Tromey <tom@tromey.com>
6072
6073 * breakpoint.h (install_breakpoint): Update.
6074 * breakpoint.c (add_solib_catchpoint): Update.
6075 (install_breakpoint): Change argument to a std::unique_ptr.
6076 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6077 (create_breakpoint_sal, create_breakpoint): Update.
6078 (watch_command_1, catch_exec_command_1)
6079 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6080 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6081 Return the breakpoint.
6082 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6083 (new_single_step_breakpoint): Update.
6084 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6085 std::unique_ptr.
6086 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6087 std::unique_ptr.
6088 * break-catch-sig.c (create_signal_catchpoint): Use
6089 std::unique_ptr.
6090 * ada-lang.c (create_ada_exception_catchpoint): Use
6091 std::unique_ptr.
6092
6093 2017-08-22 Tom Tromey <tom@tromey.com>
6094
6095 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6096
6097 2017-08-22 Tom Tromey <tom@tromey.com>
6098
6099 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6100 (lookup_partial_symbol): Update.
6101
6102 2017-08-22 Tom Tromey <tom@tromey.com>
6103
6104 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6105 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6106 (find_and_open_source, symtab_to_fullname): Update.
6107 * psymtab.c (psymtab_to_fullname): Update.
6108
6109 2017-08-22 Tom Tromey <tom@tromey.com>
6110
6111 * exec.c (exec_file_attach): Update.
6112 * linux-thread-db.c (try_thread_db_load): Update.
6113 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6114 * utils.c (gdb_realpath): Change return type.
6115 (gdb_realpath_keepfile): Update.
6116 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6117 (_initialize_utils): Register the new self test.
6118 * source.c (openp): Update.
6119 (find_and_open_source): Update.
6120 * nto-tdep.c (nto_find_and_open_solib): Update.
6121 * main.c (set_gdb_data_directory): Update.
6122 (captured_main_1): Update.
6123 * dwarf2read.c (dwarf2_get_dwz_file): Update
6124 (dw2_map_symbol_filenames): Update.
6125 * auto-load.c (auto_load_safe_path_vec_update): Update.
6126 (filename_is_in_auto_load_safe_path_vec): Change type of
6127 "filename_realp".
6128 (auto_load_objfile_script): Update.
6129 (file_is_auto_load_safe): Update. Use std::string.
6130 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6131
6132 2017-08-22 Tom Tromey <tom@tromey.com>
6133
6134 * utils.c (gdb_realpath_keepfile): Return a
6135 gdb::unique_xmalloc_ptr.
6136 * exec.c (exec_file_attach): Update.
6137 * utils.h (gdb_realpath_keepfile): Return a
6138 gdb::unique_xmalloc_ptr.
6139
6140 2017-08-22 Tom Tromey <tom@tromey.com>
6141
6142 * compile/compile.c (compile_file_command): Use
6143 gdb::unique_xmalloc_ptr, std::string.
6144 * utils.c (gdb_abspath): Change return type.
6145 * source.c (openp): Update.
6146 * objfiles.c (allocate_objfile): Update.
6147 * main.c (set_gdb_data_directory): Update.
6148 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6149
6150 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6151
6152 * cli-cmds.c (list_commands): List actual code around more than
6153 one location.
6154
6155 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6156
6157 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6158
6159 2017-08-21 Pedro Alves <palves@redhat.com>
6160
6161 PR gdb/19487
6162 * c-exp.y (variable production): Handle function aliases.
6163 * minsyms.c (msymbol_is_text): New function.
6164 * minsyms.h (msymbol_is_text): Declare.
6165 * symtab.c (find_function_alias_target): New function.
6166 * symtab.h (find_function_alias_target): Declare.
6167
6168 2017-08-21 Pedro Alves <palves@redhat.com>
6169
6170 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6171 typedefs.
6172 * typeprint.c (whatis_exp): If handling "whatis", and expression
6173 is OP_TYPE, strip one typedef level. Otherwise don't strip
6174 typedefs here.
6175 * valops.c (value_cast): Save "to" type before resolving
6176 stubs/typedefs. Use that type as resulting value's type.
6177
6178 2017-08-18 Tom Tromey <tom@tromey.com>
6179 Pedro Alves <palves@redhat.com>
6180
6181 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6182 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6183 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6184 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6185 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6186 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6187 (linux_get_siginfo_data): Add "thread" argument. Use
6188 scoped_restore.
6189 * linux-nat.c (linux_child_follow_fork)
6190 (check_stopped_by_watchpoint): Use scoped_restore.
6191 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6192 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6193 (restore_inferior_ptid, save_inferior_ptid): Remove.
6194 * btrace.c (btrace_fetch): Use scoped_restore.
6195 * bsd-uthread.c (bsd_uthread_fetch_registers)
6196 (bsd_uthread_store_registers): Use scoped_restore.
6197 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6198 scoped_restore.
6199 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6200 (aix_thread_xfer_partial): Use scoped_restore.
6201 * inferior.h (save_inferior_ptid): Remove.
6202
6203 2017-08-18 Yao Qi <yao.qi@linaro.org>
6204
6205 PR tdep/21818
6206 * arm-tdep.c (gdb_print_insn_arm): Mark
6207 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6208
6209 2017-08-18 Yao Qi <yao.qi@linaro.org>
6210
6211 * NEWS: Mention GDBserver's new option "--selftest".
6212 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6213 * selftest.c: Move it to common/selftest.c.
6214 * selftest.h: Move it to common/selftest.h.
6215 * selftest-arch.c (reset): New function.
6216 (tests_with_arch): Call reset.
6217
6218 2017-08-18 Yao Qi <yao.qi@linaro.org>
6219
6220 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6221 instead of exception_fprintf and printf_filtered.
6222
6223 2017-08-18 Yao Qi <yao.qi@linaro.org>
6224
6225 * selftest.c (register_self_test): Rename it to
6226 selftests::register_test.
6227 (run_self_tests): selftest::run_tests.
6228 * selftest.h: Update declarations.
6229 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6230 selftests::register_test_foreach_arch.
6231 * selftest-arch.h: Update declaration.
6232 * aarch64-tdep.c: Update.
6233 * arm-tdep.c: Likewise.
6234 * disasm-selftests.c: Likewise.
6235 * dwarf2loc.c: Likewise.
6236 * dwarf2-frame.c: Likewise.
6237 * findvar.c: Likewise.
6238 * gdbarch-selftests.c: Likewise.
6239 * maint.c (maintenance_selftest): Likewise.
6240 * regcache.c: Likewise.
6241 * rust-exp.y: Likewise.
6242 * selftest-arch.c: Likewise.
6243 * unittests/environ-selftests.c: Likewise.
6244 * unittests/function-view-selftests.c: Likewise.
6245 * unittests/offset-type-selftests.c: Likewise.
6246 * unittests/optional-selftests.c: Likewise.
6247 * unittests/scoped_restore-selftests.c: Likewise.
6248 * utils-selftests.c: Likewise.
6249
6250 2017-08-17 Pedro Alves <palves@redhat.com>
6251
6252 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6253 local.
6254
6255 2017-08-17 Pedro Alves <palves@redhat.com>
6256
6257 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6258 field.
6259 (reset_die_in_process): Delete, replaced by ...
6260 (process_die_scope): ... this new class. Make it responsible for
6261 freeing cu->line_header too.
6262 (process_die): Use process_die_scope.
6263 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6264 cu->line_header_die_owner. Don't release the line header if it's
6265 owned by the CU.
6266 (setup_type_unit_groups): Make the CU/DIE own the line header.
6267 Don't release the line header here.
6268
6269 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6270
6271 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6272
6273 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6274
6275 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6276 Single-Key mode
6277
6278 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6279
6280 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6281 mode command list.
6282
6283 2017-08-15 Stafford Horne <shorne@gmail.com>
6284
6285 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6286
6287 2017-08-15 Stafford Horne <shorne@gmail.com>
6288
6289 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6290
6291 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6292
6293 PR gdb/21954
6294 * infcmd.c (unset_environment_command): Use the 'clear' method on
6295 the environment instead of resetting it.
6296
6297 2017-08-15 John Baldwin <jhb@FreeBSD.org>
6298
6299 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6300 platforms.
6301
6302 2017-08-14 Tom Tromey <tom@tromey.com>
6303
6304 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6305 (print_binary_chars): Likewise.
6306 (BITS_IN_BYTES): Remove.
6307
6308 2017-08-14 Tom Tromey <tom@tromey.com>
6309
6310 PR gdb/21675
6311 * valprint.c (LOW_ZERO): Change value to 034.
6312 (print_octal_chars): Add static_asserts for octal constants.
6313 * printcmd.c (print_scalar_formatted): Add 'd' case.
6314
6315 2017-08-11 Tom Tromey <tom@tromey.com>
6316
6317 * symfile.c (add_symbol_file_command): Use std::vector.
6318
6319 2017-08-14 Tom Tromey <tom@tromey.com>
6320
6321 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6322 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6323 std::move.
6324 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6325
6326 2017-08-11 Pedro Alves <palves@redhat.com>
6327
6328 * infrun.c (process_event_stop_test): Adjust
6329 function_name_is_marked_for_skip call.
6330 * skip.c: Include <list>.
6331 (skiplist_entry): Make it a class with private fields, and
6332 getters/setters.
6333 (skiplist_entry_chain): Delete.
6334 (skiplist_entries): New.
6335 (skiplist_entry_count): Delete.
6336 (highest_skiplist_entry_num): New.
6337 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6338 (add_skiplist_entry): Delete.
6339 (skiplist_entry::skiplist_entry): New.
6340 (skiplist_entry::add_entry): New.
6341 (skip_file_command, skip_function): Adjust.
6342 (compile_skip_regexp): Delete.
6343 (skip_command): Don't compile regexp here. Adjust to use
6344 skiplist_entry::add_entry.
6345 (skip_info): Adjust to use range-for and getters.
6346 (skip_enable_command, skip_disable_command): Adjust to use
6347 range-for and setters.
6348 (skip_delete_command): Adjust to use std::list.
6349 (add_skiplist_entry): Delete.
6350 (skip_file_p): Delete, refactored as ...
6351 (skiplist_entry::do_skip_file_p): ... this new method.
6352 (skip_gfile_p): Delete, refactored as ...
6353 (skiplist_entry::do_gskip_file_p): ... this new method.
6354 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6355 (skiplist_entry::skip_function_p): ... this new method.
6356 (function_name_is_marked_for_skip): Now returns bool, and takes
6357 the function sal by const reference. Adjust to use range-for and
6358 skiplist_entry methods.
6359 (_initialize_step_skip): Remove references to
6360 skiplist_entry_chain, skiplist_entry_count.
6361 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6362 takes the function sal by const reference.
6363
6364 2017-08-11 Yao Qi <yao.qi@linaro.org>
6365
6366 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6367 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6368 (dwarf2_frame_cache):
6369 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6370 RETURN_MASK_ALL and set *this_case to NULL.
6371 * frame-unwind.h: Update comments.
6372
6373 2017-08-11 Yao Qi <yao.qi@linaro.org>
6374
6375 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6376 (dwarf2_frame_state_copy_regs): Remove.
6377 (dwarf2_frame_state_free_regs): Remove.
6378 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6379 (dwarf2_restore_rule): Call method .alloc_regs instead of
6380 dwarf2_frame_state_alloc_regs.
6381 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6382 constructor. Call std::move.
6383 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6384 (dwarf2_frame_cache): Likewise.
6385
6386 [GDB_SELF_TEST]: Include selftest.h and
6387 selftest-arch.h.
6388 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6389 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6390 execute_cfa_program_test.
6391
6392 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6393 copy ctor, assignment operator, move assignment.
6394 <alloc_regs>: New method.
6395 <swap>: New method.
6396 (struct dwarf2_frame_state): Delete dtor.
6397 (dwarf2_frame_state_alloc_regs): Remove declaration.
6398 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6399 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6400
6401 2017-08-11 Yao Qi <yao.qi@linaro.org>
6402
6403 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6404 (dwarf2_frame_state::dwarf2_frame_state): New.
6405 (dwarf2_frame_state::~dwarf2_frame_state): New.
6406 (dwarf2_fetch_cfa_info): Update.
6407 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6408 rather than a pointer. Update code.
6409 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6410 dtor.
6411 <data_align, code_align, retaddr_column>: Change them to const.
6412 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6413 to bool.
6414
6415 2017-08-11 Yao Qi <yao.qi@linaro.org>
6416
6417 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6418 <loc.exp>: New field.
6419 * dwarf2-frame.c (execute_cfa_program): Update.
6420 (dwarf2_frame_prev_register): Update.
6421
6422 2017-08-10 Pedro Alves <palves@redhat.com>
6423
6424 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6425
6426 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6427
6428 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6429 (fbsd_pending_children): Use std::list.
6430 (fbsd_remember_child): Likewise.
6431 (fbsd_is_child_pending): Likewise.
6432 (fbsd_pending_vfork_done): Use std::forward_list.
6433 (fbsd_add_vfork_done): Likewise.
6434 (fbsd_is_vfork_done_pending): Likewise.
6435 (fbsd_next_vfork_done): Likewise.
6436
6437 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6438
6439 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6440 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6441 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6442 for `mapfilename'.
6443 (fbsd_xfer_partial): Use gdb::byte_vector.
6444 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6445
6446 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6447
6448 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6449 "filestuff.h".
6450 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6451
6452 2017-08-09 Tom Tromey <tom@tromey.com>
6453
6454 * skip.c (skiplist_entry): New constructor.
6455 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6456 (skiplist_entry::file_is_glob): Now bool.
6457 (skiplist_entry::file, skiplist_entry::function): Now
6458 std::string.
6459 (make_skip_entry): Return a unique_ptr. Use new.
6460 (free_skiplist_entry, free_skiplist_entry_cleanup)
6461 (make_free_skiplist_entry_cleanup): Remove.
6462 (skip_command, skip_disable_command, add_skiplist_entry)
6463 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6464 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6465 (function_name_is_marked_for_skip): Update.
6466 (skip_delete_command): Update. Use delete.
6467
6468 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6469
6470 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6471 (aarch64_linux_core_read_description): New function.
6472 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6473
6474 2017-08-09 Pedro Alves <palves@redhat.com>
6475
6476 * cp-name-parser.y (cp_comp_to_string): Return a
6477 gdb::unique_xmalloc_ptr<char>.
6478 * cp-support.c (replace_typedefs_qualified_name)
6479 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6480 (cp_canonicalize_string_full): Use op= instead of explicit
6481 convertion.
6482 (cp_class_name_from_physname, method_name_from_physname)
6483 (cp_func_name, cp_remove_params): Adjust to use
6484 gdb::unique_xmalloc_ptr<char>.
6485 * cp-support.h (cp_comp_to_string): Return a
6486 gdb::unique_xmalloc_ptr<char>.
6487 * python/py-type.c (typy_lookup_type): Adjust to use
6488 gdb::unique_xmalloc_ptr<char>.
6489
6490 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6491
6492 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6493
6494 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6495 Yao Qi <yao.qi@linaro.org>
6496
6497 * cp-support.c (cp_canonicalize_string_full): Use
6498 gdb::unique_xmalloc_ptr<char>.
6499 (cp_canonicalize_string): Likewise.
6500
6501 2017-08-09 Yao Qi <yao.qi@linaro.org>
6502
6503 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6504 * regformats/i386/amd64-avx-avx512.dat: Remove.
6505 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6506 * regformats/i386/amd64-avx-mpx.dat:Remove.
6507 * regformats/i386/amd64-avx.dat: Remove.
6508 * regformats/i386/amd64-mpx.dat: Remove.
6509 * regformats/i386/i386-avx-avx512.dat: Remove.
6510 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6511 * regformats/i386/i386-avx-mpx.dat: Remove.
6512 * regformats/i386/i386-mmx.dat: Remove.
6513 * regformats/i386/i386-mpx.dat: Remove.
6514
6515 2017-08-09 Yao Qi <yao.qi@linaro.org>
6516
6517 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6518 * amd64-tdep.c: Don't include features/i386/x32*.c.
6519 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6520 functions.
6521 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6522 and i386/x32-avx-avx512.
6523 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6524 and i386/x32.xml.
6525 * features/i386/x32-avx-avx512.c: Removed.
6526 * features/i386/x32-avx-avx512.xml: Removed.
6527 * features/i386/x32-avx.c: Removed.
6528 * features/i386/x32-avx.xml: Removed.
6529 * features/i386/x32.c: Removed.
6530 * features/i386/x32.xml: Removed.
6531 * regformats/i386/x32-avx-avx512.dat: Removed.
6532 * regformats/i386/x32-avx.dat: Removed.
6533 * regformats/i386/x32.dat: Removed.
6534
6535 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6536
6537 PR breakpoints/21886
6538 * mem-break.c (default_memory_insert_breakpoint): Use
6539 `->placed_address' rather than `->reqstd_address' for the
6540 breakpoint location.
6541
6542 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6543
6544 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6545 assertions.
6546
6547 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6548
6549 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6550 a union of `tdep_info', `tdesc_data' and `id'.
6551 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6552 rather than `info.tdep_info'.
6553 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6554 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6555 * i386-tdep.c (i386_gdbarch_init): Likewise.
6556 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6557 * mips-tdep.c (mips_gdbarch_init): Likewise.
6558 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6559 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6560 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6561 `info.tdep_info'.
6562 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6563 `info.tdep_info'.
6564 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6565 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6566 `info.tdep_info'.
6567 * spu-tdep.c (spu_gdbarch_init): Likewise.
6568 * gdbarch.h: Regenerate.
6569
6570 2017-08-07 Leszek Swirski <leszeks@google.com>
6571
6572 PR symtab/20899
6573 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6574
6575 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6576
6577 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6578 (gdbsim_open): Rename gdb_argv args object to argv.
6579
6580 2017-08-05 Tom Tromey <tom@tromey.com>
6581
6582 * compile/compile-object-load.c (compile_object_load): Use
6583 gdb::unique_xmalloc_ptr.
6584 * cli/cli-dump.c (scan_filename): Rename from
6585 scan_filename_with_cleanup. Change return type.
6586 (scan_expression): Rename from scan_expression_with_cleanup.
6587 Change return type.
6588 (dump_memory_to_file, dump_value_to_file, restore_command):
6589 Use gdb::unique_xmalloc_ptr. Update.
6590 * cli/cli-cmds.c (find_and_open_script): Use
6591 gdb::unique_xmalloc_ptr.
6592 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6593 * symmisc.c (maintenance_print_symbols)
6594 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6595 * symfile.c (symfile_bfd_open, generic_load)
6596 (add_symbol_file_command, remove_symbol_file_command): Use
6597 gdb::unique_xmalloc_ptr.
6598 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6599 * psymtab.c (maintenance_print_psymbols): Use
6600 gdb::unique_xmalloc_ptr.
6601 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6602 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6603 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6604 (reload_shared_libraries_1): Likewise.
6605
6606 2017-08-05 Tom Tromey <tom@tromey.com>
6607
6608 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6609 (rust_op_vector, rust_set_vector): New typedefs.
6610 (current_parser): New global.
6611 (work_obstack): Change to pointer type. Update all users.
6612 (rust_ast, pstate): Remove globals.
6613 (struct rust_parser): New.
6614 (%union) <params, field_inits>: Change type.
6615 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6616 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6617 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6618 (convert_params_to_types, convert_params_to_expression): Change
6619 type of "params".
6620 (ast_string): Change type of "fields".
6621 (rust_parse): Make a rust_parser. Remove cleanups.
6622 (rust_lex_tests): Make and install an auto_obstack.
6623
6624 2017-08-04 Yao Qi <yao.qi@linaro.org>
6625
6626 * configure.srv (ipa_x32_linux_regobj): New.
6627 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6628 instead of X86_TDESC_AVX512.
6629 (initialize_low_tracepoint): Call
6630 init_registers_x32_avx_avx512_linux.
6631
6632 2017-08-04 Yao Qi <yao.qi@linaro.org>
6633
6634 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6635
6636 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6637
6638 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6639
6640 2017-08-03 Tom Tromey <tom@tromey.com>
6641
6642 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6643 Remove.
6644 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6645
6646 2017-08-03 Tom Tromey <tom@tromey.com>
6647
6648 * python/py-param.c (compute_enum_values): Use gdb_argv.
6649
6650 2017-08-03 Tom Tromey <tom@tromey.com>
6651
6652 * utils.h (struct gdb_argv_deleter): New.
6653 (gdb_argv): New class.
6654 * utils.c (gdb_argv::reset): New method.
6655 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6656 * tracefile.c (tsave_command): Use gdb_argv.
6657 * top.c (new_ui_command): Use gdb_argv.
6658 * symmisc.c (maintenance_print_symbols)
6659 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6660 * symfile.c (symbol_file_command, generic_load)
6661 (remove_symbol_file_command): Use gdb_argv.
6662 * stack.c (backtrace_command): Use gdb_argv.
6663 * source.c (add_path, show_substitute_path_command)
6664 (unset_substitute_path_command, set_substitute_path_command):
6665 Use gdb_argv.
6666 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6667 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6668 * remote.c (extended_remote_run, remote_put_command)
6669 (remote_get_command, remote_delete_command): Use gdb_argv.
6670 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6671 (gdbsim_open): Use gdb_argv.
6672 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6673 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6674 * procfs.c (procfs_info_proc): Use gdb_argv.
6675 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6676 * infrun.c (handle_command): Use gdb_argv.
6677 * inferior.c (add_inferior_command, clone_inferior_command):
6678 Use gdb_argv.
6679 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6680 * exec.c (exec_file_command): Use gdb_argv.
6681 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6682 * compile/compile.c (build_argc_argv): Use gdb_argv.
6683
6684 2017-08-03 Tom Tromey <tom@tromey.com>
6685
6686 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6687
6688 2017-08-03 Tom Tromey <tom@tromey.com>
6689
6690 * python/python.c (compute_python_string): Return std::string.
6691 (gdbpy_eval_from_control_command): Update.
6692 (do_start_initialization): Use std::string.
6693 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6694 xstrprintf.
6695 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6696 xstrprintf.
6697
6698 2017-08-03 Tom Tromey <tom@tromey.com>
6699
6700 * top.h (do_restore_instream_cleanup): Remove.
6701 * top.c (do_restore_instream_cleanup): Remove.
6702 (read_command_file): Use scoped_restore.
6703 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6704
6705 2017-08-03 Tom Tromey <tom@tromey.com>
6706
6707 * cli/cli-script.c (execute_user_command)
6708 (execute_control_command): Use scoped_restore.
6709
6710 2017-08-03 Tom Tromey <tom@tromey.com>
6711
6712 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6713 (execute_user_command): Remove user_call_depth; use
6714 user_args_stack's size instead.
6715
6716 2017-08-03 Tom Tromey <tom@tromey.com>
6717
6718 * top.h (in_user_command): Remove.
6719 * top.c (in_user_command): Remove.
6720 * cli/cli-script.c (do_restore_user_call_depth)
6721 (execute_user_command): Update.
6722
6723 2017-08-03 Tom Tromey <tom@tromey.com>
6724
6725 * valops.c (search_struct_method): Use gdb::byte_vector.
6726 * valarith.c (value_concat): Use std::vector.
6727 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6728 (simple_search_memory): Likewise.
6729 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6730 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6731 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6732 * elfread.c (elf_rel_plt_read): Use std::string.
6733 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6734 * cli/cli-dump.c (restore_section_callback): Use
6735 gdb::byte_vector.
6736
6737 2017-08-03 Tom Tromey <tom@tromey.com>
6738
6739 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6740
6741 2017-08-03 Tom Tromey <tom@tromey.com>
6742
6743 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6744 (tui_register_format): Use scoped_restore.
6745
6746 2017-08-03 Tom Tromey <tom@tromey.com>
6747
6748 * reverse.c (exec_direction_default): Remove.
6749 (exec_reverse_once): Use scoped_restore.
6750 * remote.c (restore_remote_timeout): Remove.
6751 (remote_flash_erase, remote_flash_write, remote_flash_done)
6752 (readchar, remote_serial_write): Use scoped_restore.
6753 * cli/cli-script.c (struct source_cleanup_lines_args)
6754 (source_cleanup_lines): Remove.
6755 (script_from_file): Use scoped_restore.
6756 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6757 (source_command): Use scoped_restore.
6758
6759 2017-08-03 Tom Tromey <tom@tromey.com>
6760
6761 * utils.h (make_cleanup_free_so): Remove.
6762 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6763 * solist.h (struct so_deleter): New.
6764 (so_list_up): New typedef.
6765 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6766
6767 2017-08-03 Tom Tromey <tom@tromey.com>
6768
6769 * utils.h (make_cleanup_restore_current_language): Remove.
6770 * utils.c (do_restore_current_language)
6771 (make_cleanup_restore_current_language): Remove.
6772 * parse.c (parse_exp_in_context_1)
6773 (parse_expression_with_language): Use
6774 scoped_restore_current_language.
6775 * mi/mi-main.c (mi_cmd_execute): Use
6776 scoped_restore_current_language.
6777 * language.h (scoped_restore_current_language): New class.
6778
6779 2017-08-03 Tom Tromey <tom@tromey.com>
6780
6781 * compile/compile.c (cleanup_unlink_file): Remove.
6782 (compile_to_object): Use gdb::unlinker.
6783 (eval_compile_command): Likewise.
6784
6785 2017-08-03 Tom Tromey <tom@tromey.com>
6786
6787 * utils.h (make_cleanup_fclose): Remove.
6788 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6789
6790 2017-08-03 Tom Tromey <tom@tromey.com>
6791
6792 * top.c (open_terminal_stream): Return gdb_file_up.
6793 (new_ui_command): Update.
6794
6795 2017-08-03 Tom Tromey <tom@tromey.com>
6796
6797 * source.c (print_source_lines_base, forward_search_command)
6798 (reverse_search_command): Use gdb_file_up.
6799
6800 2017-08-03 Tom Tromey <tom@tromey.com>
6801
6802 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6803
6804 2017-08-03 Tom Tromey <tom@tromey.com>
6805
6806 * cli/cli-cmds.c (find_and_open_script): Change return type.
6807 Remove "streamp" and "full_path" parameters.
6808 (source_script_with_search): Update.
6809 * auto-load.c (source_script_file): Update.
6810 * cli/cli-cmds.h (find_and_open_script): Change type.
6811 (open_script): New struct.
6812
6813 2017-08-03 Tom Tromey <tom@tromey.com>
6814
6815 * xml-support.c (xml_fetch_content_from_file): Update.
6816 * ui-file.c (stdio_file::open): Update.
6817 * tracefile-tfile.c (tfile_start): Update.
6818 * remote.c (remote_file_put, remote_file_get): Update.
6819 * nat/linux-procfs.c (linux_proc_get_int)
6820 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6821 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6822 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6823 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6824 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6825 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6826 * linux-nat.c (linux_proc_pending_signals): Update.
6827 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6828 (file_closer): Remove.
6829 * compile/compile.c (compile_to_object): Update.
6830 * common/filestuff.h (struct gdb_file_deleter): New.
6831 (gdb_file_up): New typedef.
6832 (gdb_fopen_cloexec): Change return type.
6833 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6834 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6835 (dump_binary_file, restore_binary_file): Update.
6836 * auto-load.c (auto_load_objfile_script_1): Update.
6837
6838 2017-08-03 Tom Tromey <tom@tromey.com>
6839
6840 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6841 (info_static_tracepoint_markers_command): Likewise.
6842 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6843 * skip.c (skip_info): Use ui_out_emit_table.
6844 * progspace.c (print_program_space): Use ui_out_emit_table.
6845 * osdata.c (info_osdata): Use ui_out_emit_table.
6846 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6847 ui_out_emit_table.
6848 * linux-thread-db.c (info_auto_load_libthread_db): Use
6849 ui_out_emit_table.
6850 * inferior.c (print_inferior): Use ui_out_emit_table.
6851 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6852 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6853 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6854 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6855 * ui-out.h (class ui_out_emit_table): New.
6856
6857 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6858
6859 * mips-tdep.c (mips_fpu_type_str): New function.
6860 (mips_dump_tdep): Call it.
6861
6862 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6863
6864 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6865 `->mips_fpu_type'.
6866
6867 2017-07-31 Xavier Roirand <roirand@adacore.com>
6868
6869 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6870
6871 2017-07-27 Xavier Roirand <roirand@adacore.com>
6872
6873 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6874
6875 2017-07-26 Yao Qi <yao.qi@linaro.org>
6876
6877 * cli/cli-cmds.c (maintenancechecklist): New variable.
6878 * gdbcmd.h (maintenancechecklist): Declare it.
6879 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6880 Call i386_linux_read_description with different masks.
6881 * maint.c (maintenance_check_command): New function.
6882 (_initialize_maint_cmds): Call add_prefix_cmd.
6883 * target-descriptions.c (tdesc_reg): override operator != and ==.
6884 (tdesc_type): Likewise.
6885 (tdesc_feature): Likewise.
6886 (target_desc): Likewise.
6887 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6888 (maintenance_check_xml_descriptions): New function.
6889 (_initialize_target_descriptions) Add command "xml-descriptions".
6890 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6891
6892 2017-07-26 Yao Qi <yao.qi@linaro.org>
6893
6894 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6895 Include features/i386/32bit-*.c.
6896 (i386_linux_read_description): Generate target description if it
6897 doesn't exist.
6898 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6899 functions.
6900 * features/i386/32bit-linux.c: Re-generated.
6901 * features/i386/32bit-sse.c: Likewise.
6902 * target-descriptions.c (print_c_feature::visit): Print code to
6903 set register number if needed.
6904 (print_c_feature) <m_next_regnum>: New field.
6905
6906 2017-07-26 Yao Qi <yao.qi@linaro.org>
6907
6908 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6909 (FEATURE_XMLFILES): New.
6910 (FEATURE_CFILES): New.
6911 New rules.
6912 (clean-cfiles): Remove generated c files.
6913 * features/i386/32bit-avx.c: Generated.
6914 * features/i386/32bit-avx512.c: Generated.
6915 * features/i386/32bit-core.c: Generated.
6916 * features/i386/32bit-linux.c: Generated.
6917 * features/i386/32bit-mpx.c: Generated.
6918 * features/i386/32bit-pkeys.c: Generated.
6919 * features/i386/32bit-sse.c: Generated.
6920 * target-descriptions.c: Include algorithm.
6921 (tdesc_element_visitor): Add method visit_end.
6922 (print_c_tdesc): Implement visit_end.
6923 (print_c_tdesc:: m_filename_after_features): Move it to
6924 protected.
6925 (print_c_feature): New class.
6926 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6927 name starts with "i386/32bit-".
6928
6929 2017-07-26 Yao Qi <yao.qi@linaro.org>
6930
6931 * target-descriptions.c (tdesc_element_visitor): New class.
6932 (tdesc_element): New class.
6933 (tdesc_reg): Inherit from tdesc_element.
6934 (tdesc_reg::accept): New function.
6935 (tdesc_type): Inherit from tdesc_element.
6936 (tdesc_type::accept): New function.
6937 (tdesc_feature): Inherit from tdesc_element.
6938 (tdesc_feature::accept): New function.
6939 (target_desc): Inherit from tdesc_element.
6940 (target_desc::target_desc): New.
6941 (target_desc::~target_desc): New.
6942 (target_desc::accept): New.
6943 (allocate_target_description): Use new.
6944 (free_target_description): Use delete.
6945 (print_c_tdesc): New class.
6946 (maint_print_c_tdesc_cmd): Adjust.
6947
6948 * features/aarch64.c: Re-generated.
6949 * features/arc-arcompact.c: Re-generated.
6950 * features/arc-v2.c: Re-generated.
6951 * features/arm/arm-with-iwmmxt.c: Re-generated.
6952 * features/arm/arm-with-m.c: Re-generated.
6953 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6954 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6955 * features/arm/arm-with-neon.c: Re-generated.
6956 * features/arm/arm-with-vfpv2.c: Re-generated.
6957 * features/arm/arm-with-vfpv3.c: Re-generated.
6958 * features/i386/amd64-avx-avx512.c: Re-generated.
6959 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6960 * features/i386/amd64-avx.c: Re-generated.
6961 * features/i386/amd64-avx-linux.c: Re-generated.
6962 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6963 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6964 * features/i386/amd64-avx-mpx.c: Re-generated.
6965 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6966 * features/i386/amd64.c: Re-generated.
6967 * features/i386/amd64-linux.c: Re-generated.
6968 * features/i386/amd64-mpx.c: Re-generated.
6969 * features/i386/amd64-mpx-linux.c: Re-generated.
6970 * features/i386/i386-avx-avx512.c: Re-generated.
6971 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6972 * features/i386/i386-avx.c: Re-generated.
6973 * features/i386/i386-avx-linux.c: Re-generated.
6974 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6975 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6976 * features/i386/i386-avx-mpx.c: Re-generated.
6977 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6978 * features/i386/i386.c: Re-generated.
6979 * features/i386/i386-linux.c: Re-generated.
6980 * features/i386/i386-mmx.c: Re-generated.
6981 * features/i386/i386-mmx-linux.c: Re-generated.
6982 * features/i386/i386-mpx.c: Re-generated.
6983 * features/i386/i386-mpx-linux.c: Re-generated.
6984 * features/i386/x32-avx-avx512.c: Re-generated.
6985 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6986 * features/i386/x32-avx.c: Re-generated.
6987 * features/i386/x32-avx-linux.c: Re-generated.
6988 * features/i386/x32.c: Re-generated.
6989 * features/i386/x32-linux.c: Re-generated.
6990 * features/microblaze.c: Re-generated.
6991 * features/microblaze-with-stack-protect.c: Re-generated.
6992 * features/mips64-dsp-linux.c: Re-generated.
6993 * features/mips64-linux.c: Re-generated.
6994 * features/mips-dsp-linux.c: Re-generated.
6995 * features/mips-linux.c: Re-generated.
6996 * features/nds32.c: Re-generated.
6997 * features/nios2.c: Re-generated.
6998 * features/nios2-linux.c: Re-generated.
6999 * features/rs6000/powerpc-32.c: Re-generated.
7000 * features/rs6000/powerpc-32l.c: Re-generated.
7001 * features/rs6000/powerpc-403.c: Re-generated.
7002 * features/rs6000/powerpc-403gc.c : Re-generated.
7003 * features/rs6000/powerpc-405.c: Re-generated.
7004 * features/rs6000/powerpc-505.c: Re-generated.
7005 * features/rs6000/powerpc-601.c: Re-generated.
7006 * features/rs6000/powerpc-602.c: Re-generated.
7007 * features/rs6000/powerpc-603.c: Re-generated.
7008 * features/rs6000/powerpc-604.c: Re-generated.
7009 * features/rs6000/powerpc-64.c: Re-generated.
7010 * features/rs6000/powerpc-64l.c: Re-generated.
7011 * features/rs6000/powerpc-7400.c: Re-generated.
7012 * features/rs6000/powerpc-750.c: Re-generated.
7013 * features/rs6000/powerpc-860.c: Re-generated.
7014 * features/rs6000/powerpc-altivec32.c: Re-generated.
7015 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7016 * features/rs6000/powerpc-altivec64.c: Re-generated.
7017 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7018 * features/rs6000/powerpc-cell32l.c: Re-generated.
7019 * features/rs6000/powerpc-cell64l.c: Re-generated.
7020 * features/rs6000/powerpc-e500.c: Re-generated.
7021 * features/rs6000/powerpc-e500l.c: Re-generated.
7022 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7023 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7024 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7025 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7026 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7027 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7028 * features/rs6000/powerpc-vsx32.c: Re-generated.
7029 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7030 * features/rs6000/powerpc-vsx64.c: Re-generated.
7031 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7032 * features/rs6000/rs6000.c: Re-generated.
7033 * features/s390-linux32.c: Re-generated.
7034 * features/s390-linux32v1.c: Re-generated.
7035 * features/s390-linux32v2.c: Re-generated.
7036 * features/s390-linux64.c: Re-generated.
7037 * features/s390-linux64v1.c: Re-generated.
7038 * features/s390-linux64v2.c: Re-generated.
7039 * features/s390-te-linux64.c: Re-generated.
7040 * features/s390-tevx-linux64.c: Re-generated.
7041 * features/s390-vx-linux64.c: Re-generated.
7042 * features/s390x-linux64.c: Re-generated.
7043 * features/s390x-linux64v1.c: Re-generated.
7044 * features/s390x-linux64v2.c: Re-generated.
7045 * features/s390x-te-linux64.c: Re-generated.
7046 * features/s390x-tevx-linux64.c: Re-generated.
7047 * features/s390x-vx-linux64.c: Re-generated.
7048 * features/sparc/sparc32-solaris.c: Re-generated.
7049 * features/sparc/sparc64-solaris.c: Re-generated.
7050 * features/tic6x-c62x.c: Re-generated.
7051 * features/tic6x-c62x-linux.c: Re-generated.
7052 * features/tic6x-c64x.c: Re-generated.
7053 * features/tic6x-c64x-linux.c: Re-generated.
7054 * features/tic6x-c64xp.c: Re-generated.
7055 * features/tic6x-c64xp-linux.c: Re-generated.
7056
7057 2017-07-26 Yao Qi <yao.qi@linaro.org>
7058
7059 * i386-linux-tdep.c (i386_linux_read_description): New function.
7060 (i386_linux_core_read_description): Call
7061 i386_linux_read_description.
7062 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7063 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7064 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7065 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7066 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7067 * x86-linux-nat.c (x86_linux_read_description): Call
7068 i386_linux_read_description.
7069
7070 2017-07-26 Yao Qi <yao.qi@linaro.org>
7071
7072 * NEWS: Mention it.
7073 * features/Makefile (%.c: %.xml): Pass the xml file name to
7074 command "maint print c-tdesc".
7075 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7076 name from 'arg'.
7077
7078 2017-07-26 Yao Qi <yao.qi@linaro.org>
7079
7080 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7081 in-class initialization.
7082 (tdesc_create_feature): Call new instead of XCNEW.
7083 (free_target_description): Ue delete.
7084
7085 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7086
7087 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7088
7089 2017-07-25 Yao Qi <yao.qi@linaro.org>
7090
7091 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7092 constant.
7093 (amd64_x32_init_abi): Likewise.
7094 * amd64-tdep.h (amd64_init_abi): Update declaration.
7095 (amd64_x32_init_abi): Likewise.
7096
7097 2017-07-25 Yao Qi <yao.qi@linaro.org>
7098
7099 PR tdep/21717
7100 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7101 condition for FPSCR.
7102 (arm_linux_store_inferior_registers): Likewise.
7103
7104 2017-07-22 Tom Tromey <tom@tromey.com>
7105
7106 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7107 <syscalls_counts>: Now a std::vector.
7108 (get_catch_syscall_inferior_data): Use "new".
7109 (catch_syscall_inferior_data_cleanup): Use "delete".
7110 (insert_catch_syscall, remove_catch_syscall)
7111 (clear_syscall_counts): Update.
7112
7113 2017-07-22 Tom Tromey <tom@tromey.com>
7114
7115 * break-catch-syscall.c (syscall_catchpoint)
7116 <syscalls_to_be_caught>: Now a std::vector<int>
7117 (~syscall_catchpoint): Remove.
7118 (insert_catch_syscall, remove_catch_syscall)
7119 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7120 (print_mention_catch_syscall, print_recreate_catch_syscall):
7121 Update.
7122 (create_syscall_event_catchpoint): Change type of "filter"
7123 parameter.
7124 (catch_syscall_split_args): Return a std::vector.
7125 (catch_syscall_command_1, catching_syscall_number_1): Update.
7126
7127 2017-07-22 Tom Tromey <tom@tromey.com>
7128
7129 * break-catch-throw.c (struct exception_catchpoint)
7130 <exception_rx>: Now a std::string.
7131 (~exception_catchpoint): Remove.
7132 (print_one_detail_exception_catchpoint): Update.
7133 (handle_gnu_v3_exceptions): Change type of except_rx.
7134 (extract_exception_regexp): Return a std::string.
7135 (catch_exception_command_1): Update.
7136
7137 2017-07-22 Tom Tromey <tom@tromey.com>
7138
7139 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7140 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7141 std::vector.
7142 <catch_all>: Now a bool.
7143 (~signal_catchpoint): Remove.
7144 (signal_catchpoint_insert_location)
7145 (signal_catchpoint_remove_location)
7146 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7147 (signal_catchpoint_print_mention)
7148 (signal_catchpoint_print_recreate)
7149 (signal_catchpoint_explains_signal): Update.
7150 (create_signal_catchpoint): Change type of "filter" and
7151 "catch_all".
7152 (catch_signal_split_args): Return a std::vector. Change type of
7153 "catch_all".
7154 (catch_signal_command): Update.
7155
7156 2017-07-20 Pedro Alves <palves@redhat.com>
7157
7158 * ada-lang.c (ada_language_defn): Make extern.
7159 (_initialize_ada_language): Remove add_language call.
7160 * c-lang.c (c_language_defn, cplus_language_defn)
7161 (asm_language_defn, minimal_language_defn): Make extern.
7162 (_initialize_c_language): Delete.
7163 * completer.c (compare_cstrings): Delete, moved to utils.h.
7164 * d-lang.c (d_language_defn): Make extern.
7165 (_initialize_d_language): Remove add_language calls.
7166 * defs.h (enum language): Add comment.
7167 * f-lang.c (f_language_defn): Make extern.
7168 (_initialize_f_language): Remove add_language call.
7169 * go-lang.c (go_language_defn): Make extern.
7170 (_initialize_go_language): Remove add_language call.
7171 * language.c: Include <algorithm>.
7172 (languages): Redefine as const array.
7173 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7174 (set_language_command): Handle "local". Use for-range loop.
7175 (set_language): Remove loop.
7176 (language_enum): Rewrite.
7177 (language_def, language_str): Remove loops.
7178 (add_language): Delete.
7179 (add_set_language_command): New, based on add_languages.
7180 (skip_language_trampoline): Adjust.
7181 (local_language_defn): Delete.
7182 (language_gdbarch_post_init): Adjust.
7183 (_initialize_language): Remove add_language calls. Call
7184 add_set_language_command.
7185 * language.h (add_language): Delete.
7186 (auto_language_defn)
7187 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7188 (asm_language_defn, c_language_defn, cplus_language_defn)
7189 (d_language_defn, f_language_defn, go_language_defn)
7190 (m2_language_defn, objc_language_defn, opencl_language_defn)
7191 (pascal_language_defn, rust_language_defn): Declare.
7192 * m2-lang.c (m2_language_defn): Make extern.
7193 (_initialize_m2_language): Remove add_language call.
7194 * objc-lang.c (objc_language_defn): Make extern.
7195 (_initialize_objc_language): Remove add_language call.
7196 * opencl-lang.c (opencl_language_defn): Make extern.
7197 (_initialize_opencl_language): Remove add_language call.
7198 * p-lang.c (pascal_language_defn): Make extern.
7199 (_initialize_pascal_language): Delete.
7200 * rust-lang.c (rust_language_defn): Make extern.
7201 (_initialize_rust_language): Delete.
7202 * utils.h (compare_cstrings): New static inline function.
7203
7204 2017-07-20 Pedro Alves <palves@redhat.com>
7205
7206 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7207 (get_var_value): Constify parameters.
7208 (get_int_var_value): Change prototype.
7209 (to_fixed_range_type): Adjust.
7210 * ada-lang.h (get_int_var_value): Change prototype.
7211
7212 2017-07-20 Pedro Alves <palves@redhat.com>
7213
7214 * dwarf2read.c (dw2_lookup_symbol): Use
7215 SYMBOL_MATCHES_SEARCH_NAME.
7216 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7217
7218 2017-07-20 Pedro Alves <palves@redhat.com>
7219
7220 * block.c (block_iter_name_step, block_iter_name_first)
7221 (block_iter_name_next): Delete.
7222 (block_lookup_symbol_primary): Adjust to use
7223 dict_iter_match_first/dict_iter_match_next.
7224 * block.h (block_iter_name_first, block_iter_name_next): Delete
7225 declarations.
7226 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7227 dict_iter_match_first/dict_iter_match_next.
7228
7229 2017-07-20 Pedro Alves <palves@redhat.com>
7230
7231 * cp-support.c (cp_find_first_component_aux): Add missing case for
7232 end of string.
7233
7234 2017-07-18 David Blaikie <dblaikie@gmail.com>
7235
7236 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7237 of dwo_cu's dwo_file.
7238
7239 2017-07-18 Yao Qi <yao.qi@linaro.org>
7240
7241 * remote.c (store_registers_using_G): Remove one line comment.
7242
7243 2017-07-18 Yao Qi <yao.qi@linaro.org>
7244
7245 * regcache.c (regcache_cpy): Simplify it.
7246 (regcache::cpy_no_passthrough): Remove it.
7247 * regcache.h (cpy_no_passthrough): Remove it.
7248 (regcache_dup, regcache_cpy): Update comments.
7249
7250 2017-07-18 Pedro Alves <palves@redhat.com>
7251
7252 * remote-sim.c (sim_command_completer): Adjust to work with a
7253 completion_tracker instead of a VEC.
7254
7255 2017-07-17 Pedro Alves <palves@redhat.com>
7256
7257 * completer.c (complete_source_filenames): New function.
7258 (complete_address_and_linespec_locations): New function.
7259 (location_completer): Use complete_address_and_linespec_locations.
7260 (completion_tracker::build_completion_result): Honor the tracker's
7261 request to suppress append.
7262 * completer.h (completion_tracker::suppress_append_ws)
7263 (completion_tracker::set_suppress_append_ws): New methods.
7264 (completion_tracker::m_suppress_append_ws): New field.
7265 (complete_source_filenames): New declaration.
7266 * linespec.c (linespec_complete_what): New.
7267 (struct ls_parser) <complete_what, completion_word,
7268 completion_quote_char, completion_quote_end, completion_tracker>:
7269 New fields.
7270 (string_find_incomplete_keyword_at_end): New.
7271 (linespec_lexer_lex_string): Record quote char. If in completion
7272 mode, don't throw.
7273 (linespec_lexer_consume_token): Advance the completion word point.
7274 (linespec_lexer_peek_token): Save/restore completion info.
7275 (save_stream_and_consume_token): New.
7276 (set_completion_after_number): New.
7277 (linespec_parse_basic): Set what to complete next depending on
7278 token. Handle function and label completions specially.
7279 (parse_linespec): Disable objc shortcut in completion mode. Set
7280 what to complete next depending on token type. Skip keyword if in
7281 completion mode.
7282 (complete_linespec_component, linespec_complete): New.
7283 * linespec.h (linespec_complete): Declare.
7284
7285 2017-07-17 Pedro Alves <palves@redhat.com>
7286
7287 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7288 Handle 'operator<' / 'operator<<'.
7289
7290 2017-07-17 Pedro Alves <palves@redhat.com>
7291
7292 * completer.c (collect_explicit_location_matches): Handle
7293 MATCH_LABEL.
7294 (convert_explicit_location_to_linespec): New, factored out from
7295 ...
7296 (convert_explicit_location_to_sals): ... this.
7297 (complete_label): New.
7298 (linespec_complete_label, find_label_symbols_in_block): New.
7299 (find_label_symbols): Add completion_mode parameter and adjust to
7300 call find_label_symbols_in_block.
7301 * linespec.h (linespec_complete_label): Declare.
7302
7303 2017-07-17 Pedro Alves <palves@redhat.com>
7304
7305 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7306 complete_symbol_mode parameter.
7307 * cli/cli-cmds.c (complete_command): Get the completion result out
7308 of the handle_brkchars tracker if used a custom word point.
7309 * completer.c: Include "linespec.h".
7310 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7311 (advance_to_expression_complete_word_point): New.
7312 (completion_tracker::completes_to_completion_word): New.
7313 (complete_files_symbols): Pass down
7314 complete_symbol_mode::EXPRESSION.
7315 (explicit_options, probe_options): New.
7316 (collect_explicit_location_matches): Complete on the
7317 explictit_loc->foo instead of word. Use
7318 linespec_complete_function. Handle MATCH_LINE. Handle offering
7319 keyword and options completions.
7320 (backup_text_ptr): Delete.
7321 (skip_keyword): New.
7322 (complete_explicit_location): Remove 'word' parameter. Add
7323 language, quoted_arg_start and quoted_arg_end parameters.
7324 Rewrite, parsing left to right.
7325 (location_completer): Rewrite.
7326 (location_completer_handle_brkchars): New function.
7327 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7328 (enum complete_line_internal_reason): Adjust comments.
7329 (completion_tracker::discard_completions): New.
7330 (completer_handle_brkchars_func_for_completer): Handle
7331 location_completer.
7332 (gdb_custom_word_point_brkchars)
7333 (gdb_org_rl_basic_quote_characters): New.
7334 (gdb_completion_word_break_characters_throw)
7335 (completion_find_completion_word): Handle trackers that use a
7336 custom word point.
7337 (completion_tracker::advance_custom_word_point_by): New.
7338 (completion_tracker::build_completion_result): Don't rely on
7339 readline appending the quote char.
7340 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7341 use a custom word point.
7342 (gdb_rl_attempted_completion_function): Restore
7343 rl_basic_quote_characters.
7344 * completer.h (class completion_tracker): Extend intro comment.
7345 (completion_tracker::set_quote_char)
7346 (completion_tracker::quote_char)
7347 (completion_tracker::set_use_custom_word_point)
7348 (completion_tracker::use_custom_word_point)
7349 (completion_tracker::custom_word_point)
7350 (completion_tracker::set_custom_word_point)
7351 (completion_tracker::advance_custom_word_point_by)
7352 (completion_tracker::completes_to_completion_word)
7353 (completion_tracker::discard_completions): New methods.
7354 (completion_tracker::m_quote_char)
7355 (completion_tracker::m_use_custom_word_point)
7356 (completion_tracker::m_custom_word_point): New fields.
7357 (advance_to_expression_complete_word_point): Declare.
7358 * f-lang.c (f_collect_symbol_completion_matches): Add
7359 complete_symbol_mode parameter.
7360 * language.h (struct language_defn)
7361 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7362 parameter.
7363 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7364 (linespec_complete_function): New function.
7365 (linespec_lexer_lex_keyword): Adjust.
7366 * linespec.h (linespec_keywords, linespec_complete_function): New
7367 declarations.
7368 * location.c (find_end_quote): New function.
7369 (explicit_location_lex_one): Add explicit_completion_info
7370 parameter. Save quoting info. Don't throw if being called for
7371 completion. Don't handle Ada operators here.
7372 (is_cp_operator, skip_op_false_positives, first_of)
7373 (explicit_location_lex_one_function): New function.
7374 (string_to_explicit_location): Replace 'dont_throw' parameter with
7375 an explicit_completion_info pointer parameter. Handle it. Don't
7376 use explicit_location_lex_one to lex function names. Use
7377 explicit_location_lex_one_function instead.
7378 * location.h (struct explicit_completion_info): New.
7379 (string_to_explicit_location): Replace 'dont_throw' parameter with
7380 an explicit_completion_info pointer parameter.
7381 * symtab.c (default_collect_symbol_completion_matches_break_on):
7382 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7383 (default_collect_symbol_completion_matches)
7384 (collect_symbol_completion_matches): Add complete_symbol_mode
7385 parameter.
7386 (collect_symbol_completion_matches_type): Pass down
7387 complete_symbol_mode::EXPRESSION.
7388 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7389 parameter. Handle LINESPEC mode.
7390 * symtab.h (complete_symbol_mode): New.
7391 (default_collect_symbol_completion_matches_break_on)
7392 (default_collect_symbol_completion_matches)
7393 (collect_symbol_completion_matches)
7394 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7395 parameter.
7396
7397 2017-07-17 Pedro Alves <palves@redhat.com>
7398
7399 * utils.c (enum class strncmp_iw_mode): New.
7400 (strcmp_iw): Rename to ...
7401 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7402 parameters. Handle them.
7403 (strncmp_iw): New.
7404 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7405 * utils.h (strncmp_iw): Declare.
7406 (strcmp_iw): Move describing comments here.
7407
7408 2017-07-17 Pedro Alves <palves@redhat.com>
7409
7410 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7411 CP_OPERATOR_STR.
7412 * c-typeprint.c (is_type_conversion_operator): Use
7413 CP_OPERATOR_STR.
7414 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7415 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7416 CP_OPERATOR_LEN.
7417 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7418 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7419 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7420 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7421 CP_OPERATOR_STR.
7422 * location.c: Include "cp-support.h".
7423 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7424 CP_OPERATOR_STR.
7425 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7426 CP_OPERATOR_LEN.
7427
7428 2017-07-17 Pedro Alves <palves@redhat.com>
7429
7430 * cli/cli-cmds.c (complete_command): Use a completion tracker
7431 along with completion_find_completion_word for handle_brkchars
7432 phase.
7433 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7434 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7435 (struct gdb_rl_completion_word_info): New.
7436 (gdb_rl_find_completion_word): New.
7437 (completion_find_completion_word): New.
7438 * completer.h (completion_find_completion_word): Declare.
7439
7440 2017-07-17 Pedro Alves <palves@redhat.com>
7441
7442 * ada-lang.c (symbol_completion_match): Adjust comments.
7443 (symbol_completion_add): Replace vector parameter with
7444 completion_tracker parameter. Use it.
7445 (ada_make_symbol_completion_list): Rename to...
7446 (ada_collect_symbol_completion_matches): ... this. Add
7447 completion_tracker parameter and use it.
7448 (ada_language_defn): Adjust.
7449 * break-catch-syscall.c (catch_syscall_completer): Adjust
7450 prototype and work with completion_tracker instead of VEC.
7451 * breakpoint.c (condition_completer): Adjust prototype and work
7452 with completion_tracker instead of VEC.
7453 * c-lang.c (c_language_defn, cplus_language_defn)
7454 (asm_language_defn, minimal_language_defn): Adjust to renames.
7455 * cli/cli-cmds.c (complete_command): Rework using
7456 completion_tracker. Catch exceptions when completing.
7457 * cli/cli-decode.c (integer_unlimited_completer)
7458 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7459 with completion_tracker instead of VEC.
7460 * command.h (struct completion_tracker): Forward declare.
7461 (completer_ftype, completer_handle_brkchars_ftype): Change
7462 types.
7463 (complete_on_cmdlist, complete_on_enum): Adjust.
7464 * completer.c: Include <algorithm>.
7465 (struct gdb_completer_state): New.
7466 (current_completion): New global.
7467 (readline_line_completion_function): Delete.
7468 (noop_completer, filename_completer)
7469 (filename_completer_handle_brkchars, complete_files_symbols)
7470 (linespec_location_completer): Adjust to work with a
7471 completion_tracker instead of a VEC.
7472 (string_or_empty): New.
7473 (collect_explicit_location_matches): Adjust to work with a
7474 completion_tracker instead of a VEC.
7475 (explicit_location_completer): Rename to ...
7476 (complete_explicit_location): ... this and adjust to work with a
7477 completion_tracker instead of a VEC.
7478 (location_completer): Adjust to work with a completion_tracker
7479 instead of a VEC.
7480 (add_struct_fields): Adjust to work with a completion_list instead
7481 of VEC.
7482 (expression_completer): Rename to ...
7483 (complete_expression): ... this and adjust to work with a
7484 completion_tracker instead of a VEC. Use complete_files_symbols.
7485 (expression_completer): Reimplement on top of complete_expression.
7486 (symbol_completer): Adjust to work with a completion_tracker
7487 instead of a VEC.
7488 (enum complete_line_internal_reason): Add describing comments.
7489 (complete_line_internal_normal_command): Adjust to work with a
7490 completion_tracker instead of a VEC.
7491 (complete_line_internal): Rename to ...
7492 (complete_line_internal_1): ... this and adjust to work with a
7493 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7494 handle_brkchars phase.
7495 (new_completion_tracker): Delete.
7496 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7497 complete_line_internal_1.
7498 (free_completion_tracker): Delete.
7499 (INITIAL_COMPLETION_HTAB_SIZE): New.
7500 (completion_tracker::completion_tracker)
7501 (completion_tracker::~completion_tracker): New.
7502 (maybe_add_completion): Delete.
7503 (completion_tracker::maybe_add_completion)
7504 (completion_tracker::add_completion)
7505 (completion_tracker::add_completions): New.
7506 (throw_max_completions_reached_error): Delete.
7507 (complete_line): Adjust to work with a completion_tracker instead
7508 of a VEC. Don't create a completion_tracker_t or check for max
7509 completions here.
7510 (command_completer, command_completer_handle_brkchars)
7511 (signal_completer, reg_or_group_completer_1)
7512 (reg_or_group_completer, default_completer_handle_brkchars):
7513 Adjust to work with a completion_tracker.
7514 (gdb_completion_word_break_characters_throw): New.
7515 (gdb_completion_word_break_characters): Reimplement.
7516 (line_completion_function): Delete.
7517 (completion_tracker::recompute_lowest_common_denominator)
7518 (expand_preserving_ws)
7519 (completion_tracker::build_completion_result)
7520 (completion_result::completion_result)
7521 (completion_result::completion_result)
7522 (completion_result::~completion_result)
7523 (completion_result::completion_result)
7524 (completion_result::release_match_list, compare_cstrings)
7525 (completion_result::sort_match_list)
7526 (completion_result::reset_match_list)
7527 (gdb_rl_attempted_completion_function_throw)
7528 (gdb_rl_attempted_completion_function): New.
7529 * completer.h (completion_list, struct completion_result)
7530 (class completion_tracker): New.
7531 (complete_line): Add completion_tracker parameter.
7532 (readline_line_completion_function): Delete.
7533 (gdb_rl_attempted_completion_function): New.
7534 (noop_completer, filename_completer, expression_completer)
7535 (location_completer, symbol_completer, command_completer)
7536 (signal_completer, reg_or_group_completer): Update prototypes.
7537 (completion_tracker_t, new_completion_tracker)
7538 (make_cleanup_free_completion_tracker): Delete.
7539 (enum maybe_add_completion_enum): Delete.
7540 (maybe_add_completion): Delete.
7541 (throw_max_completions_reached_error): Delete.
7542 * corefile.c (complete_set_gnutarget): Adjust to work with a
7543 completion_tracker instead of a VEC.
7544 * cp-abi.c (cp_abi_completer): Adjust to work with a
7545 completion_tracker instead of a VEC.
7546 * d-lang.c (d_language_defn): Adjust.
7547 * disasm.c (disassembler_options_completer): Adjust to work with a
7548 completion_tracker instead of a VEC.
7549 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7550 (f_collect_symbol_completion_matches): ... this. Adjust to work
7551 with a completion_tracker instead of a VEC.
7552 (f_language_defn): Adjust.
7553 * go-lang.c (go_language_defn): Adjust.
7554 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7555 Adjust to work with a completion_tracker instead of a VEC.
7556 * infrun.c (handle_completer): Likewise.
7557 * interps.c (interpreter_completer): Likewise.
7558 * interps.h (interpreter_completer): Likewise.
7559 * language.c (unknown_language_defn, auto_language_defn)
7560 (local_language_defn): Adjust.
7561 * language.h (language_defn::la_make_symbol_completion_list):
7562 Rename to ...
7563 (language_defn::la_collect_symbol_completion_matches): ... this
7564 and adjust to work with a completion_tracker instead of a VEC.
7565 * m2-lang.c (m2_language_defn): Adjust.
7566 * objc-lang.c (objc_language_defn): Adjust.
7567 * opencl-lang.c (opencl_language_defn): Adjust.
7568 * p-lang.c (pascal_language_defn): Adjust.
7569 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7570 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7571 with a completion_tracker.
7572 * rust-lang.c (rust_language_defn): Adjust.
7573 * symtab.c (free_completion_list, do_free_completion_list)
7574 (return_val, completion_tracker): Delete.
7575 (completion_list_add_name, completion_list_add_symbol)
7576 (completion_list_add_msymbol, completion_list_objc_symbol)
7577 (completion_list_add_fields, add_symtab_completions): Add
7578 completion_tracker parameter and use it.
7579 (default_make_symbol_completion_list_break_on_1): Rename to...
7580 (default_collect_symbol_completion_matches_break_on): ... this.
7581 Add completion_tracker parameter and use it instead of allocating
7582 a completion tracker here.
7583 (default_make_symbol_completion_list_break_on): Delete old
7584 implementation.
7585 (default_make_symbol_completion_list): Delete.
7586 (default_collect_symbol_completion_matches): New.
7587 (make_symbol_completion_list): Delete.
7588 (collect_symbol_completion_matches): New.
7589 (make_symbol_completion_type): Rename to ...
7590 (collect_symbol_completion_matches_type): ... this. Add
7591 completion_tracker parameter and use it instead of VEC.
7592 (make_file_symbol_completion_list_1): Rename to...
7593 (collect_file_symbol_completion_matches): ... this. Add
7594 completion_tracker parameter and use it instead of VEC.
7595 (make_file_symbol_completion_list): Delete.
7596 (add_filename_to_list): Use completion_list instead of a VEC.
7597 (add_partial_filename_data::list): Now a completion_list.
7598 (make_source_files_completion_list): Work with a completion_list
7599 instead of a VEC.
7600 * symtab.h: Include "completer.h".
7601 (default_make_symbol_completion_list_break_on)
7602 (default_make_symbol_completion_list, make_symbol_completion_list)
7603 (make_symbol_completion_type, make_file_symbol_completion_list)
7604 (make_source_files_completion_list): Delete.
7605 (default_collect_symbol_completion_matches_break_on)
7606 (default_collect_symbol_completion_matches)
7607 (collect_symbol_completion_matches)
7608 (collect_symbol_completion_matches_type)
7609 (collect_file_symbol_completion_matches)
7610 (make_source_files_completion_list): New.
7611 * top.c (init_main): Don't install a rl_completion_entry_function
7612 hook. Install a rl_attempted_completion_function hook instead.
7613 * tui/tui-layout.c (layout_completer): Adjust to work with a
7614 completion_tracker.
7615 * tui/tui-regs.c (tui_reggroup_completer):
7616 * tui/tui-win.c (window_name_completer, focus_completer)
7617 (winheight_completer): Adjust to work with a completion_tracker.
7618 * value.c: Include "completer.h".
7619 (complete_internalvar): Adjust to work with a completion_tracker.
7620 * value.h (complete_internalvar): Likewise.
7621
7622 2017-07-17 Pedro Alves <palves@redhat.com>
7623
7624 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7625 renames.
7626 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7627 comments to completer_ftype's declaration.
7628 <completer_handle_brkchars>: Change type to
7629 completer_handle_brkchars_ftype.
7630 * command.h (completer_ftype): Add describing comment and give
7631 names to parameters.
7632 (completer_ftype_void): Rename to ...
7633 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7634 (set_cmd_completer_handle_brkchars): Adjust.
7635 * completer.c (filename_completer_handle_brkchars): New function.
7636 (complete_line_internal_normal_command): New function, factored
7637 out from ...
7638 (complete_line_internal): ... here.
7639 (command_completer_handle_brkchars)
7640 (default_completer_handle_brkchars)
7641 (completer_handle_brkchars_func_for_completer): New functions.
7642 * completer.h (set_gdb_completion_word_break_characters): Delete
7643 declaration.
7644 (completer_handle_brkchars_func_for_completer): New declaration.
7645 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7646 completer_handle_brkchars_func_for_completer.
7647
7648 2017-07-17 Pedro Alves <palves@redhat.com>
7649
7650 * completer.c (symbol_completer): New function, based on
7651 make_symbol_completion_list_fn.
7652 * completer.h (symbol_completer): New declaration.
7653 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7654 * python/py-cmd.c (completers): Adjust.
7655 * symtab.c (make_symbol_completion_list_fn): Delete.
7656 * symtab.h (make_symbol_completion_list_fn): Delete.
7657 * cli/cli-decode.c (add_cmd): Adjust.
7658
7659 2017-07-17 Pedro Alves <palves@redhat.com>
7660
7661 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7662 * dwarf2read.c: Include "filename-seen-cache.h".
7663 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7664 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7665 * filename-seen-cache.c: New file.
7666 * filename-seen-cache.h: New file.
7667 * symtab.c: Include "filename-seen-cache.h".
7668 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7669 (create_filename_seen_cache, clear_filename_seen_cache)
7670 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7671 to filename-seen-cache.h/filename-seen-cache.c.
7672 (output_source_filename, sources_info)
7673 (maybe_add_partial_symtab_filename)
7674 (make_source_files_completion_list): Adjust to use
7675 filename_seen_cache.
7676
7677 2017-07-17 Pedro Alves <palves@redhat.com>
7678
7679 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7680 fields.
7681 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7682 dwarf2_debug_sections*)): New.
7683 (dwarf2_per_objfile::dwarf2_per_objfile(const
7684 dwarf2_per_objfile&)): Declare as deleted.
7685 (dwarf2_per_objfile::operator=): Declare as deleted.
7686 (dwarf2_per_objfile::dwarf2_per_objfile)
7687 (dwarf2_per_objfile::~dwarf2_per_objfile)
7688 (dwarf2_per_objfile::free_cached_comp_units): New.
7689 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7690 ctor. Call dwarf2_per_objfile's ctor manually.
7691 (dwarf2_locate_sections): Deleted/refactored as ...
7692 (dwarf2_per_objfile::locate_sections): ... this new method.
7693 (free_cached_comp_units): Defer to
7694 dwarf2_per_objfile::free_cached_comp_units.
7695 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7696
7697 2017-07-14 Tom Tromey <tom@tromey.com>
7698
7699 PR rust/21764:
7700 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7701 parameter.
7702 <UNOP_SIZEOF>: Split into separate case.
7703 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7704
7705 2017-07-14 Tom Tromey <tom@tromey.com>
7706
7707 PR rust/21763:
7708 * symtab.c (symbol_matches_domain): Add language_rust to special
7709 case.
7710 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7711 treat LOC_TYPEDEF symbols as variables.
7712
7713 2017-07-14 Pedro Alves <palves@redhat.com>
7714
7715 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7716 symtabs matching all symtabs with SRCFILE as file name instead of
7717 only considering the first hit, with lookup_symtab.
7718
7719 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7720
7721 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7722 operator_name parameters.
7723 (gen_expr): Update function call.
7724
7725 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7726
7727 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7728 parameter.
7729 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7730 Likewise.
7731 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7732 parameter, use agent_expr::gdbarch instead, update function
7733 calls.
7734 (locexpr_tracepoint_var_ref): Likewise.
7735 (loclist_tracepoint_var_ref): Likewise.
7736 * ax-gdb.c (gen_trace_static_fields): Likewise.
7737 (gen_traced_pop): Likewise.
7738 (gen_frame_args_address): Likewise.
7739 (gen_frame_locals_address): Likewise.
7740 (gen_var_ref): Likewise.
7741 (gen_struct_ref_recursive): Likewise.
7742 (gen_static_field): Likewise.
7743 (gen_maybe_namespace_elt): Likewise.
7744 (gen_expr): Likewise.
7745 (gen_trace_for_var): Likewise.
7746 (gen_trace_for_expr): Likewise.
7747 (gen_trace_for_return_address): Likewise.
7748
7749 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7750
7751 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7752 parameter.
7753 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7754
7755 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7756
7757 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7758 from ax, update calls.
7759 (gen_usual_arithmetic): Likewise.
7760 (gen_integral_promotions): Likewise.
7761 (gen_bitfield_ref): Likewise.
7762 (gen_primitive_field): Likewise.
7763 (gen_struct_ref_recursive): Likewise.
7764 (gen_struct_ref): Likewise.
7765 (gen_maybe_namespace_elt): Likewise.
7766 (gen_struct_elt_for_reference): Likewise.
7767 (gen_namespace_elt): Likewise.
7768 (gen_aggregate_elt_ref): Likewise.
7769 (gen_expr): Get gdbarch from ax, update calls.
7770 (gen_expr_binop_rest): Likewise.
7771
7772 2017-07-13 Pedro Alves <palves@redhat.com>
7773
7774 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7775 as default tdesc.
7776 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7777 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7778 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7779 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7780 tdep.
7781 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7782 Get final tdesc from the tdep.
7783 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7784 default tdesc.
7785 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7786 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7787 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7788 Use it as default tdesc.
7789 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7790 down to amd_init_abi. No longer handle fallback tdesc here.
7791 * amd64-tdep.h (tdesc_x32): Declare.
7792 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7793 parameter.
7794 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7795 as default tdesc.
7796
7797 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7798
7799 * s390-linux-tdep.c (s390_process_record): Add support for
7800 instructions new in arch12.
7801
7802 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7803
7804 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7805 PT_GETFSBASE and PT_GETGSBASE.
7806 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7807 PT_SETGSBASE.
7808
7809 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7810
7811 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7812 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7813 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7814 those rules.
7815 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7816 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7817 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7818 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7819 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7820 * features/i386/amd64.xml: Add 64bit-segments.xml.
7821 * features/i386/amd64-avx-avx512.c: Regenerated.
7822 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7823 * features/i386/amd64-avx-mpx.c: Regenerated.
7824 * features/i386/amd64-avx.c: Regenerated.
7825 * features/i386/amd64-mpx.c: Regenerated.
7826 * features/i386/amd64.c: Regenerated.
7827 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7828 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7829 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7830 * regformats/i386/amd64-avx.dat: Regenerated.
7831 * regformats/i386/amd64-mpx.dat: Regenerated.
7832 * regformats/i386/amd64.dat: Regenerated.
7833
7834 2017-07-10 Yao Qi <yao.qi@linaro.org>
7835
7836 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7837 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7838
7839 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7840
7841 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7842 unsetenv.
7843 * gnulib/aclocal.m4: Regenerate.
7844 * gnulib/config.in: Regenerate.
7845 * gnulib/configure: Regenerate.
7846 * gnulib/import/Makefile.am: Regenerate.
7847 * gnulib/import/Makefile.in: Regenerate.
7848 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7849 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7850 * gnulib/import/m4/environ.m4: New file.
7851 * gnulib/import/m4/setenv.m4: New file.
7852 * gnulib/import/setenv.c: New file.
7853 * gnulib/import/unsetenv.c: New file.
7854
7855 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7856
7857 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7858 address when op is DW_OP_addr.
7859
7860 2017-07-09 Tom Tromey <tom@tromey.com>
7861
7862 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7863 check and apply to outer type.
7864
7865 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7866
7867 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7868 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7869 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7870 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7871
7872 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7873
7874 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7875
7876 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7877
7878 * corelow.c (get_core_siginfo): Remove.
7879 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7880 instead of get_core_siginfo.
7881 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7882 * gdbarch.h: Re-generate.
7883 * gdbarch.c: Re-generate.
7884 * linux-tdep.c (linux_core_xfer_siginfo): New.
7885 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7886
7887 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7888
7889 * corelow.c (thread_section_name): Move to ...
7890 * gdbcore.h (thread_section_name): ... here.
7891
7892 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7893
7894 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7895 (struct siginfo32): New.
7896 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7897 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7898 via ptrace(PT_LWPINFO).
7899
7900 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7901
7902 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7903 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7904 (fbsd_get_siginfo_type): New.
7905 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7906 (_initialize_fbsd_tdep): New.
7907
7908 2017-07-06 David Blaikie <dblaikie@gmail.com>
7909
7910 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7911 a singular dwo_unit*) to support multiple CUs in the same way that
7912 multiple TUs are supported.
7913 (create_cus_hash_table): Replace create_dwo_cu with a function for
7914 parsing multiple CUs from a DWO file.
7915 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7916 create_dwo_cu.
7917 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7918 htab_find, rather than comparing the signature to a singleton CU in
7919 the dwo_file.
7920
7921 2017-07-06 Pedro Alves <palves@redhat.com>
7922
7923 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7924
7925 2017-07-04 Pedro Alves <palves@redhat.com>
7926
7927 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7928 * gdbtypes.h (TYPE_STATIC): Delete.
7929 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7930 is_synchronized, is_native>: Delete.
7931 <dummy>: Bump.
7932 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7933 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7934 (TYPE_FN_FIELD_ABSTRACT): Delete.
7935
7936 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7937
7938 * buffer.h (buffer_finish): Fix spelling mistakes.
7939
7940 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7941
7942 * .dir-locals.el: Automatically switch to C-style comments in
7943 versions of Emacs that support the feature.
7944
7945 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7946 Pedro Alves <palves@redhat.com>
7947
7948 PR cli/21688
7949 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7950 (process_next_line): New variable 'inline_cmd'.
7951 Adjust 'if' clauses for "python", "compile" and "guile" to use
7952 'command_name_equals' and check for '!inline_cmd'.
7953
7954 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7955
7956 PR cli/21688
7957 * cli/cli-script.c (command_name_equals_not_inline): New function.
7958 (process_next_line): Adjust 'if' clauses for "python", "compile"
7959 and "guile" to use command_name_equals_not_inline.
7960
7961 2017-06-29 Pedro Alves <palves@redhat.com>
7962
7963 * completer.c (expression_completer): Call
7964 linespec_location_completer instead of location_completer.
7965
7966 2017-06-29 Pedro Alves <palves@redhat.com>
7967
7968 * completer.c (expression_completer): Remove code that recomputes
7969 'text' from 'word'.
7970
7971 2017-06-29 Yao Qi <yao.qi@linaro.org>
7972
7973 * regformats/regdat.sh: Generate code with
7974 "ifndef IN_PROCESS_AGENT".
7975
7976 2017-06-28 Pedro Alves <palves@redhat.com>
7977
7978 * command.h: Include "common/scoped_restore.h".
7979
7980 2017-06-28 Yao Qi <yao.qi@linaro.org>
7981
7982 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7983 instead of obstack_grow.
7984
7985 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7986
7987 PR gdb/21337
7988 * symfile.c (reread_symbols): Call objfiles_changed just before
7989 read_symbols.
7990
7991 2017-06-27 Pedro Alves <palves@redhat.com>
7992
7993 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7994 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7995 (completion_list_add_symbol, completion_list_add_msymbol):
7996 ... these new functions.
7997 (add_symtab_completions)
7998 (default_make_symbol_completion_list_break_on_1): Adjust.
7999
8000 2017-06-27 Pedro Alves <palves@redhat.com>
8001
8002 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8003 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8004 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8005 dtor.
8006 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8007 'storage_obstack' field an auto_obstack. In-class initialize all
8008 non-bitfield fields. Make minsyms_read bool.
8009 * symfile.c (read_symbols): Adjust.
8010
8011 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8012
8013 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8014 (gdbsim_store_register): Likewise.
8015
8016 2017-06-27 Pedro Alves <palves@redhat.com>
8017
8018 * c-exp.y (name_obstack): Now an auto_obstack.
8019 (yylex): Use auto_obstack::clear.
8020 (c_parse): Use auto_obstack::clear instead of reinitializing and
8021 freeing the obstack.
8022 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8023 * d-exp.y (name_obstack): Now an auto_obstack.
8024 (yylex): Use auto_obstack::clear.
8025 (d_parse): Use auto_obstack::clear instead of reinitializing and
8026 freeing the obstack.
8027 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8028 auto_obstack.
8029 * dwarf2read.c (create_addrmap_from_index)
8030 (dwarf2_build_psymtabs_hard)
8031 (update_enumeration_type_from_children): Likewise.
8032 * gdb_obstack.h (auto_obstack): New type.
8033 * go-exp.y (name_obstack): Now an auto_obstack.
8034 (build_packaged_name): Use auto_obstack::clear.
8035 (go_parse): Use auto_obstack::clear instead of reinitializing and
8036 freeing the obstack.
8037 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8038 auto_obstack.
8039 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8040 * rust-exp.y (work_obstack): Now an auto_obstack.
8041 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8042 reinitializing and freeing the obstack.
8043 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8044 (host_char_to_target): Use auto_obstack.
8045 * utils.h (make_cleanup_obstack_free): Delete declaration.
8046 * valprint.c (generic_emit_char, generic_printstr): Use
8047 auto_obstack.
8048
8049 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8050
8051 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8052 thread.
8053 (darwin_init_thread_list): Don't update dummy thread.
8054 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8055
8056 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8057
8058 * record-full.c (netorder16): Remove.
8059
8060 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8061
8062 * common/diagnostics.h: Define macros for GCC.
8063 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8064 * common/vec.h: Include diagnostics.h.
8065 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8066 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8067 warning.
8068
8069 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8070
8071 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8072 New macro.
8073 * ada-lex.l: Ignore deprecated register warnings.
8074
8075 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8076
8077 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8078 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8079
8080 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8081
8082 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8083 its own line.
8084
8085 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8086
8087 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8088
8089 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8090
8091 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8092 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8093 (xtensa_register_read_masked): Likewise.
8094
8095 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8096
8097 * common/environ.c (gdb_environ::unset): Update comment.
8098
8099 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8100
8101 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8102 registers.
8103
8104 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8105
8106 * record-full.c (record_full_exec_insn): Use byte_vector.
8107
8108 2017-06-22 Yao Qi <yao.qi@linaro.org>
8109
8110 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8111 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8112
8113 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8114
8115 * remote.c (cached_reg): Move from here...
8116 * regcache.h (cached_reg): ...to here.
8117 * python/py-unwind.c (struct reg_info): Remove.
8118 (cached_frame_info): Use cached_reg_t.
8119 (pyuw_prev_register): Likewise.
8120 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8121 (pyuw_dealloc_cache): Free all registers.
8122
8123 2017-06-22 Pedro Alves <palves@redhat.com>
8124 Simon Marchi <simon.marchi@ericsson.com>
8125
8126 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8127 warning.
8128 * common/diagnostics.h: New file.
8129
8130 2017-06-22 Pedro Alves <palves@redhat.com>
8131
8132 * common/agent.h: Add include guards.
8133
8134 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8135
8136 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8137 talk about addressable units instead of bytes.
8138
8139 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8140
8141 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8142 of '::const_iterator'.
8143
8144 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8145
8146 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8147 'unittests/environ-selftests.c'.
8148 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8149 * charset.c (find_charset_names): Declare object 'iconv_env'.
8150 Update code to use 'iconv_env' object. Remove call to
8151 'free_environ'.
8152 * common/environ.c: Include <utility>.
8153 (make_environ): Delete function.
8154 (free_environ): Delete function.
8155 (gdb_environ::clear): New function.
8156 (gdb_environ::operator=): New function.
8157 (gdb_environ::get): Likewise.
8158 (environ_vector): Delete function.
8159 (set_in_environ): Delete function.
8160 (gdb_environ::set): New function.
8161 (unset_in_environ): Delete function.
8162 (gdb_environ::unset): New function.
8163 (gdb_environ::envp): Likewise.
8164 * common/environ.h: Include <vector>.
8165 (struct gdb_environ): Delete; transform into...
8166 (class gdb_environ): ... this class.
8167 (free_environ): Delete prototype.
8168 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8169 environ_vector): Likewise.
8170 * infcmd.c (run_command_1): Update code to call
8171 'envp' from 'gdb_environ' class.
8172 (environment_info): Update code to call methods from 'gdb_environ'
8173 class.
8174 (unset_environment_command): Likewise.
8175 (path_info): Likewise.
8176 (path_command): Likewise.
8177 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8178 (inferior::inferior): Initialize 'environment' using the host's
8179 information.
8180 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8181 Include "environ.h".
8182 (class inferior) <environment>: Change type from 'struct
8183 gdb_environ' to 'gdb_environ'.
8184 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8185 methods from 'gdb_environ' class.
8186 * solib.c (solib_find_1): Likewise
8187 * unittests/environ-selftests.c: New file.
8188
8189 2017-06-20 Yao Qi <yao.qi@linaro.org>
8190
8191 * features/i386/i386-linux.xml: Exchange the order of including
8192 32bit-linux.xml and 32bit-sse.xml.
8193 * features/i386/i386-linux.c: Regenerated.
8194
8195 2017-06-20 Yao Qi <yao.qi@linaro.org>
8196
8197 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8198 Delete copy ctor and assignment operator.
8199 (tdesc_type): Likewise.
8200 (tdesc_feature): Likewise.
8201 (tdesc_free_reg): Remove.
8202 (tdesc_create_reg): Use new.
8203 (tdesc_free_type): Remove.
8204 (tdesc_create_vector): Use new.
8205 (tdesc_create_union): Likewise.
8206 (tdesc_create_flags): Likewise.
8207 (tdesc_create_enum): Likewise.
8208 (tdesc_free_feature): Delete.
8209 (free_target_description): Use delete.
8210
8211 2017-06-19 John Baldwin <jhb@FreeBSD.org>
8212
8213 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8214 registers.
8215
8216 2017-06-19 Pedro Alves <palves@redhat.com>
8217
8218 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8219 after gdb::unlinker.
8220
8221 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8222
8223 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8224 gdb_environ to access an environment variable.
8225
8226 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8227
8228 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8229 gdb_byte*.
8230
8231 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8232
8233 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8234
8235 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8236
8237 * configure: Re-generate.
8238 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8239
8240 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8241
8242 * configure: Re-generate.
8243 * warning.m4: Pass -Werror to compiler when checking for
8244 supported warning flags.
8245
8246 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8247
8248 * Makefile.in (COMPILE.pre): Add "-x c++".
8249
8250 2017-06-16 Alan Hayward <alan.hayward@arm.com>
8251 Pedro Alves <palves@redhat.com>
8252 Yao Qi <yao.qi@linaro.org>
8253
8254 * defs.h (RequireLongest): New.
8255 (extract_integer): Declare function template.
8256 (extract_signed_integer): Remove the declaration, but define it
8257 static inline.
8258 (extract_unsigned_integer): Likewise.
8259 (store_integer): Declare function template.
8260 (store_signed_integer): Remove the declaration, but define it
8261 static inline.
8262 (store_unsigned_integer): Likewise.
8263 * findvar.c (extract_integer): New function template.
8264 (extract_signed_integer): Remove.
8265 (extract_unsigned_integer): Remove.
8266 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8267 instantiations.
8268 (store_integer): New function template.
8269 (store_signed_integer): Remove.
8270 (store_unsigned_integer): Remove.
8271 (store_integer): Explicit instantiations.
8272 * regcache.c (regcache_raw_read_signed): Update.
8273 (regcache::raw_read): New function.
8274 (regcache::raw_read_signed): Remove.
8275 (regcache::raw_read_unsigned): Remove.
8276 (regcache_raw_read_unsigned): Update.
8277 (regcache_raw_write_unsigned): Update.
8278 (regcache::raw_write_signed): Remove.
8279 (regcache::raw_write): New function.
8280 (regcache_cooked_read_signed): Update.
8281 (regcache::raw_write_unsigned): Remove.
8282 (regcache::cooked_read_signed): Remove.
8283 (regcache_cooked_read_unsigned): Update.
8284 (regcache::cooked_read_unsigned): Remove.
8285 (regcache_cooked_write_signed): Update.
8286 (regcache_cooked_write_unsigned): Update.
8287 * regcache.h (regcache) <raw_read_signed>: Remove.
8288 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8289 <raw_read, raw_write>: New.
8290 <cooked_read_signed, cooked_write_signed>: Remove.
8291 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8292 <cooked_read, cooked_write>: New.
8293 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8294 (sh64_pseudo_register_write): Update.
8295
8296 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8297
8298 * arc-tdep.c (arc_disassembler_options): New variable.
8299 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8300 of default_print_insn.
8301 (arc_delayed_print_insn): Set info->section when needed,
8302 use default_print_insn to retrieve a disassembler.
8303
8304 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8305
8306 PR gdb/21574
8307 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8308 to mention $SHELL and startup-with-shell.
8309
8310 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8311
8312 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8313
8314 2017-06-14 Yao Qi <yao.qi@linaro.org>
8315
8316 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8317 default_print_insn instead of print_insn_aarch64.
8318 * arm-tdep.c (gdb_print_insn_arm): Call
8319 default_print_insn instead of print_insn_big_arm
8320 and print_insn_little_arm.
8321 * i386-tdep.c (i386_print_insn): Call default_print_insn
8322 instead of print_insn_i386.
8323 * ia64-tdep.c (ia64_print_insn): Call
8324 default_print_insn instead of print_insn_ia64.
8325 * mips-tdep.c (gdb_print_insn_mips): Call
8326 default_print_insn instead of print_insn_big_mips
8327 and print_insn_little_mips.
8328 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8329 instead of print_insn_spu.
8330
8331 2017-06-14 Pedro Alves <palves@redhat.com>
8332
8333 * ada-lang.c: Include "common/byte-vector.h".
8334 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8335 * charset.c (wchar_iterator::iterate): Resize the vector instead
8336 of reserving it.
8337 * common/byte-vector.h: Include "common/def-vector.h".
8338 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8339 * cli/cli-dump.c: Include "common/byte-vector.h".
8340 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8341 * common/byte-vector.h: New file.
8342 * common/def-vector.h: New file.
8343 * common/default-init-alloc.h: New file.
8344 * dwarf2loc.c: Include "common/byte-vector.h".
8345 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8346 instead of reserving it.
8347 * dwarf2read.c: Include "common/byte-vector.h".
8348 (data_buf::m_vec): Now a gdb::byte_vector.
8349 * gdb_regex.c: Include "common/def-vector.h".
8350 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8351 * mi/mi-main.c: Include "common/byte-vector.h".
8352 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8353 * printcmd.c: Include "common/byte-vector.h".
8354 (print_scalar_formatted): Use gdb::byte_vector.
8355 * valprint.c: Include "common/byte-vector.h".
8356 (maybe_negate_by_bytes, print_decimal_chars): Use
8357 gdb::byte_vector.
8358
8359 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8360
8361 * darwin-nat.c: Include "nat/fork-inferior.h".
8362
8363 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8364
8365 * configure.nat: Factor out Darwin bits that are not
8366 architecture-specific. Add fork-inferior.o.
8367
8368 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8369
8370 * configure.nat: Factor out AIX bits that are not
8371 architecture-specific. Add fork-inferior.o.
8372
8373 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8374
8375 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8376 (read_pieced_value, write_pieced_value): ...here. Reduce to
8377 wrappers that just call rw_pieced_value.
8378
8379 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8380
8381 * dwarf2loc.c (write_pieced_value): When writing the data for a
8382 memory piece, use write_memory_with_notification instead of
8383 write_memory.
8384
8385 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8386
8387 * valops.c (read_value_memory): Change embedded_offset to
8388 represent a bit offset instead of a byte offset.
8389 * value.h (read_value_memory): Adjust comment.
8390
8391 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8392
8393 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8394 dest_offset_bits and source_offset_bits.
8395 (write_pieced_value): Likewise.
8396
8397 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8398
8399 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8400 given by DW_OP_bit_piece.
8401 (write_pieced_value): Likewise.
8402
8403 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8404
8405 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8406 some other preparations to the places where sufficient information
8407 is available.
8408 (write_pieced_value): Likewise.
8409
8410 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8411
8412 * dwarf2loc.c (bits_to_bytes): New function.
8413 (read_pieced_value): Fix offset calculations for register pieces
8414 on big-endian targets.
8415 (write_pieced_value): Likewise.
8416
8417 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8418
8419 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8420 (write_pieced_value): Likewise.
8421
8422 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8423
8424 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8425 transfer the source value's least significant bits, instead of its
8426 lowest-addressed ones. Rename type_len to max_offset.
8427 (read_pieced_value): Mirror above changes to write_pieced_value as
8428 applicable.
8429
8430 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8431
8432 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8433 truncate full bytes from dest_offset_bits before using it as an
8434 offset into the buffer.
8435
8436 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8437
8438 * dwarf2loc.c (write_pieced_value): Include transfer size in
8439 byte-wise check.
8440
8441 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8442
8443 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8444 calculation of this_size.
8445
8446 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8447
8448 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8449 when targeting a bit-field.
8450 (write_pieced_value): Likewise.
8451
8452 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8453
8454 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8455 (allocate_piece_closure): Drop addr_size parameter.
8456 (dwarf2_evaluate_loc_desc_full): Adjust call to
8457 allocate_piece_closure.
8458
8459 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8460
8461 PR gdb/21226
8462 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8463 the LSB end, independent of endianness.
8464
8465 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8466
8467 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8468 size capping.
8469
8470 2017-06-13 Yao Qi <yao.qi@linaro.org>
8471
8472 * mips-linux-nat.c: Move include features/mips*-linux.c to
8473 mips-linux-tdep.c.
8474 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8475 to mips-linux-tdep.c.
8476 * mips-linux-tdep.c: Include features/mips*-linux.c
8477 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8478 functions.
8479 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8480 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8481 (tdesc_mips64_dsp_linux): Declare.
8482
8483 2017-06-12 Tom Tromey <tom@tromey.com>
8484
8485 * valprint.h (val_print_type_code_int): Remove.
8486 * valprint.c (generic_val_print_int): Always call
8487 val_print_scalar_formatted.
8488 (val_print_type_code_int): Remove.
8489 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8490 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8491 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8492 * ada-valprint.c (ada_val_print_num): Use
8493 val_print_scalar_formatted.
8494
8495 2017-06-12 Tom Tromey <tom@tromey.com>
8496
8497 * printcmd.c (print_scalar_formatted): Unify the two switches.
8498 Don't convert scalars to LONGEST.
8499
8500 2017-06-12 Tom Tromey <tom@tromey.com>
8501
8502 PR exp/16225:
8503 * valprint.h (print_decimal_chars): Update.
8504 * valprint.c (maybe_negate_by_bytes): New function.
8505 (print_decimal_chars): Add "is_signed" argument.
8506 * printcmd.c (print_scalar_formatted): Update.
8507
8508 2017-06-12 Tom Tromey <tom@tromey.com>
8509
8510 PR exp/16225:
8511 * valprint.h (print_binary_chars, print_hex_chars): Update.
8512 * valprint.c (val_print_type_code_int): Update.
8513 (print_binary_chars): Add "zero_pad" argument.
8514 (emit_octal_digit): New function.
8515 (print_octal_chars): Don't zero-pad.
8516 (print_decimal_chars): Likewise.
8517 (print_hex_chars): Add "zero_pad" argument.
8518 * sh64-tdep.c (sh64_do_fp_register): Update.
8519 * regcache.c (regcache::dump): Update.
8520 * printcmd.c (print_scalar_formatted): Update.
8521 * infcmd.c (default_print_one_register_info): Update.
8522
8523 2017-06-12 Pedro Alves <palves@redhat.com>
8524 Alan Hayward <alan.hayward@arm.com>
8525
8526 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8527 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8528 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8529 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8530 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8531
8532 2017-06-12 Pedro Alves <palves@redhat.com>
8533
8534 * dwarf2read.c (mapped_symtab::data): Now a vector of
8535 symtab_index_entry instead of vector of
8536 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8537 whether an element's name is NULL instead of checking whether the
8538 element itself is NULL.
8539 (find_slot): Change return type. Adjust.
8540 (hash_expand, , add_index_entry, uniquify_cu_indices)
8541 (write_hash_table): Adjust.
8542
8543 2017-06-12 Pedro Alves <palves@redhat.com>
8544
8545 * dwarf2read.c (recursively_count_psymbols): New function.
8546 (write_psymtabs_to_index): Call it to compute number of psyms and
8547 pass estimate size of psyms_seen to unordered_set's ctor.
8548
8549 2017-06-12 Pedro Alves <palves@redhat.com>
8550
8551 * dwarf2read.c (write_hash_table): Check if key already exists
8552 before emplacing.
8553
8554 2017-06-12 Pedro Alves <palves@redhat.com>
8555
8556 * dwarf2read.c (data_buf::append_space): Rename to...
8557 (data_buf::grow): ... this, and make private. Adjust all callers.
8558 (data_buf::append_uint): New method.
8559 (add_address_entry, write_one_signatured_type)
8560 (write_psymtabs_to_index): Use it.
8561
8562 2017-06-12 Pedro Alves <palves@redhat.com>
8563
8564 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8565 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8566 (data_buf::file_write): Call ::fwrite directly.
8567
8568 2017-06-12 Pedro Alves <palves@redhat.com>
8569
8570 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8571 std::vector::erase.
8572
8573 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8574
8575 Code cleanup: C++ify .gdb_index producer.
8576 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8577 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8578 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8579 (create_strtab, add_string): Remove.
8580 (file_write, data_buf): New.
8581 (struct symtab_index_entry): Use std::vector for cu_indices.
8582 (struct mapped_symtab): Use std::vector for data.
8583 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8584 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8585 Remove.
8586 (find_slot): Change return type. Update it to the new data structures.
8587 (hash_expand, add_index_entry): Update it to the new data structures.
8588 (offset_type_compare): Remove.
8589 (uniquify_cu_indices): Update it to the new data structures.
8590 (c_str_view, c_str_view_hasher, vector_hasher): New.
8591 (add_indices_to_cpool): Remove.
8592 (write_hash_table): Update it to the new data structures.
8593 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8594 (eq_psymtab_cu_index): Remove.
8595 (psym_index_map): New typedef.
8596 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8597 reference and std::unordered_map for cu_index_htab.
8598 (add_address_entry, add_address_entry_worker, write_address_map)
8599 (write_psymbols): Update it to the new data structures.
8600 (write_obstack): Remove.
8601 (struct signatured_type_index_data): Change types_list to a data_buf
8602 reference and psyms_seen to a std::unordered_set reference.
8603 (write_one_signatured_type, recursively_write_psymbols)
8604 (write_psymtabs_to_index): Update it to the new data structures.
8605
8606 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8607
8608 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8609 separate-debug-file commands.
8610 * symfile.h (separate_debug_file_debug): New global.
8611 * symfile.c (separate_debug_file_debug): New global.
8612 (separate_debug_file_exists, find_separate_debug_file): Add
8613 debug output.
8614 (_initialize_symfile): Add "set debug separate-debug-file"
8615 command.
8616 * build-id.c (build_id_to_debug_bfd,
8617 find_separate_debug_file_by_buildid): Add debug output.
8618
8619 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8620
8621 * gdbarch.sh (displaced_step_free_closure): Remove.
8622 * gdbarch.h, gdbarch.c: Re-generate.
8623 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8624 displaced_step_free_closure.
8625 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8626 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8627 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8628 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8629 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8630 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8631 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8632 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8633 * infrun.c (displaced_step_clear): Call xfree instead of
8634 gdbarch_displaced_step_free_closure.
8635
8636 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8637
8638 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8639 NULL".
8640
8641 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8642
8643 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8644 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8645 (mn10300_push_dummy_call): Likewise.
8646
8647 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8648
8649 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8650
8651 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8652
8653 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8654
8655 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8656
8657 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8658 able to start inferiors using a shell.
8659 (New remote packets): Announce new packet "QStartupWithShell".
8660 * remote.c: Add PACKET_QStartupWithShell.
8661 (extended_remote_create_inferior): Handle new
8662 PACKET_QStartupWithShell.
8663 (remote_protocol_features) <QStartupWithShell>: New entry for
8664 PACKET_QStartupWithShell.
8665 (_initialize_remote): Call "add_packet_config_cmd" for
8666 QStartupShell.
8667
8668 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8669 Pedro Alves <palves@redhat.com>
8670
8671 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8672 and "nat/fork-inferior.h".
8673 * common/common-inferior.h: New file, with contents from
8674 "gdb/inferior.h".
8675 * commom/common-utils.c: Include "common-utils.h".
8676 (stringify_argv): New function.
8677 * common/common-utils.h (stringify_argv): New prototype.
8678 * configure.nat: Add "fork-inferior.o" as a dependency for
8679 "*linux*", "fbsd*" and "nbsd*" hosts.
8680 * corefile.c (get_exec_file): Update comment.
8681 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8682 instead of "startup_inferior".
8683 (darwin_create_inferior): Call "add_thread_silent" after
8684 "fork_inferior".
8685 * fork-child.c: Cleanup unnecessary includes.
8686 (SHELL_FILE): Move to "common/common-fork-child.c".
8687 (environ): Likewise.
8688 (exec_wrapper): Initialize.
8689 (get_exec_wrapper): New function.
8690 (breakup_args): Move to "common/common-fork-child.c"; rename to
8691 "breakup_args_for_exec".
8692 (escape_bang_in_quoted_argument): Move to
8693 "common/common-fork-child.c".
8694 (saved_ui): New variable.
8695 (prefork_hook): New function.
8696 (postfork_hook): Likewise.
8697 (postfork_child_hook): Likewise.
8698 (gdb_startup_inferior): Likewise.
8699 (fork_inferior): Move to "common/common-fork-child.c". Update
8700 function to support gdbserver.
8701 (startup_inferior): Likewise.
8702 * gdbcore.h (get_exec_file): Remove declaration.
8703 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8704 instead of "startup_inferior". Call "add_thread_silent" after
8705 "fork_inferior".
8706 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8707 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8708 instead of "startup_inferior". Call "add_thread_silent" after
8709 "fork_inferior".
8710 * inferior.h: Include "common-inferior.h".
8711 (trace_start_error): Move to "common/common-utils.h".
8712 (trace_start_error_with_name): Likewise.
8713 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8714 (startup_inferior): Likewise.
8715 (gdb_startup_inferior): New prototype.
8716 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8717 * nat/fork-inferior.h: New file.
8718 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8719 instead of "startup_inferior". Call "add_thread_silent" after
8720 "fork_inferior".
8721 * target.h (target_terminal_init): Move prototype to
8722 "target/target.h".
8723 (target_terminal_inferior): Likewise.
8724 (target_terminal_ours): Likewise.
8725 * target/target.h (target_terminal_init): New prototype, moved
8726 from "target.h".
8727 (target_terminal_inferior): Likewise.
8728 (target_terminal_ours): Likewise.
8729 * utils.c (gdb_flush_out_err): New function.
8730
8731 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8732
8733 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8734 * common/common-gdbthread.h: New file, with parts from
8735 "gdb/gdbthread.h".
8736 * gdbthread.h: Include "common-gdbthread.h".
8737 (switch_to_thread): Moved to "common/common-gdbthread.h".
8738
8739 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8740
8741 * Makefile.in (SFILES): Add "common/job-control.c".
8742 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8743 (COMMON_OBS): Add "job-control.o".
8744 * common/job-control.c: New file, with contents from
8745 "gdb/inflow.c".
8746 * common/job-control.h: New file, with contents from "terminal.h".
8747 * fork-child.c: Include "job-control.h".
8748 * inflow.c: Include "job-control.h".
8749 (gdb_setpgid): Move to "common/common-inflow.c".
8750 (_initialize_inflow): Move setting of "job_control" to
8751 "handle_job_control".
8752 * terminal.h (job_control): Moved to "common/common-terminal.h".
8753 (gdb_setpgid): Likewise.
8754 * top.c: Include "job_control.h".
8755 * utils.c: Likewise.
8756 (job_control): Moved to "job-control.c".
8757
8758 2017-06-07 Pedro Alves <palves@redhat.com>
8759
8760 * Makefile.in (SFILES): Add gdb_regex.c.
8761 (COMMON_OBS): Add gdb_regex.o.
8762 * ada-lang.c (ada_add_standard_exceptions)
8763 (ada_add_exceptions_from_frame, name_matches_regex)
8764 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8765 parameter type to compiled_regex. Adjust.
8766 (ada_exceptions_list): Use compiled_regex.
8767 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8768 std::unique_ptr<compiled_regex>.
8769 (exception_catchpoint::~exception_catchpoint): Remove regfree
8770 call.
8771 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8772 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8773 * breakpoint.c (solib_catchpoint::compiled): Now a
8774 std::unique_ptr<compiled_regex>.
8775 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8776 (check_status_catch_solib): Adjust to use compiled_regex.
8777 (add_solib_catchpoint): Adjust to use compiled_regex.
8778 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8779 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8780 compiled_regex reference. Adjust to use it.
8781 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8782 declaration. Include "gdb_regex.h".
8783 (apropos_cmd): Change regex parameter to compiled_regex reference.
8784 * gdb_regex.c: New file.
8785 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8786 declarations.
8787 (class compiled_regex): New.
8788 * linux-tdep.c: Include "common/gdb_optional.h".
8789 (struct mapping_regexes): New, factored out from
8790 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8791 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8792 gdb::optional and remove cleanups. Adjust to compiled_regex.
8793 * probe.c: Include "common/gdb_optional.h".
8794 (collect_probes): Use compiled_regex and gdb::optional and remove
8795 cleanups.
8796 * skip.c: Include "common/gdb_optional.h".
8797 (skiplist_entry::compiled_function_regexp): Now a
8798 gdb::optional<compiled_regex>.
8799 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8800 (free_skiplist_entry): Remove regfree call.
8801 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8802 compiled_regex and gdb::optional.
8803 * symtab.c: Include "common/gdb_optional.h".
8804 (search_symbols): Use compiled_regex and gdb::optional.
8805 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8806 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8807 to gdb_regex.c.
8808
8809 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8810
8811 * regcache.c (regcache::save): Avoid buffer use.
8812 (regcache::dump): Likewise.
8813
8814 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8815
8816 * sh-tdep.c (sh_pseudo_register_read): Remove
8817 MAX_REGISTER_SIZE.
8818 (sh_pseudo_register_write): Likewise.
8819 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8820 (sh64_pseudo_register_write): Likewise
8821
8822 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8823
8824 * aarch64-tdep.c (aarch64_store_return_value): Use
8825 V_REGISTER_SIZE.
8826 (aarch64_pseudo_read_value): Likewise.
8827 (aarch64_pseudo_write): Likewise.
8828
8829 2017-06-06 Yao Qi <yao.qi@linaro.org>
8830
8831 * regformats/regdef.h (set_register_cache): Remove the
8832 declaration.
8833
8834 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8835
8836 * frame.c (frame_unwind_register_signed): Use
8837 frame_unwind_register_value.
8838
8839 2017-06-06 Pedro Alves <palves@redhat.com>
8840
8841 PR breakpoints/21553
8842 * breakpoint.c (create_breakpoints_sal_default)
8843 (init_breakpoint_sal, create_breakpoint_sal): Use
8844 gdb::unique_xmalloc_ptr for string parameters.
8845 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8846 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8847 (base_breakpoint_create_breakpoints_sal)
8848 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8849 (strace_marker_create_breakpoints_sal)
8850 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8851 string parameters.
8852 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8853 gdb::unique_xmalloc_ptr for string parameters.
8854 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8855 parameters.
8856
8857 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8858
8859 * alpha-tdep.c (alpha_register_to_value): Use
8860 get_frame_register_value.
8861 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8862
8863 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8864
8865 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8866 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8867 (ia64_value_to_register): Likewise.
8868 (ia64_extract_return_value): Likewise.
8869 (ia64_store_return_value): Likewise.
8870 (ia64_push_dummy_call): Likewise.
8871
8872 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8873
8874 GDB 8.0 released.
8875
8876 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8877
8878 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8879
8880 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8881
8882 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8883 parameter.
8884 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8885
8886 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8887
8888 * event-loop.c (poll_timers): Unallocate timer using delete
8889 instead of xfree.
8890
8891 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8892
8893 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8894 (struct breakpoint) <~breakpoint>: New.
8895 (struct watchpoint): Inherit from breakpoint.
8896 <~watchpoint>: New.
8897 <base>: Remove.
8898 (struct tracepoint): Inherit from breakpoint.
8899 <base>: Remove.
8900 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8901 (struct longjmp_breakpoint): Inherit from breakpoint.
8902 <~longjmp_breakpoint>: New.
8903 <base>: Remove.
8904 (new_breakpoint_from_type): Remove casts.
8905 (watchpoint_in_thread_scope): Remove reference to base field.
8906 (watchpoint_del_at_next_stop): Likewise.
8907 (update_watchpoint): Likewise.
8908 (watchpoint_check): Likewise.
8909 (bpstat_check_watchpoint): Likewise.
8910 (set_longjmp_breakpoint): Likewise.
8911 (struct fork_catchpoint): Inherit from breakpoint.
8912 <base>: Remove.
8913 (struct solib_catchpoint): Inherit from breakpoint.
8914 <~solib_catchpoint>: New.
8915 <base>: Remove.
8916 (dtor_catch_solib): Change to ...
8917 (solib_catchpoint::~solib_catchpoint): ... this.
8918 (breakpoint_hit_catch_solib): Remove reference to base field.
8919 (add_solib_catchpoint): Likewise.
8920 (create_fork_vfork_event_catchpoint): Likewise.
8921 (struct exec_catchpoint): Inherit from breakpoint.
8922 <~exec_catchpoint>: New.
8923 <base>: Remove.
8924 (dtor_catch_exec): Change to ...
8925 (exec_catchpoint::~exec_catchpoint): ... this.
8926 (dtor_watchpoint): Change to ...
8927 (watchpoint::~watchpoint): ... this.
8928 (watch_command_1): Remove reference to base field.
8929 (catch_exec_command_1): Likewise.
8930 (base_breakpoint_dtor): Change to ...
8931 (breakpoint::~breakpoint): ... this.
8932 (base_breakpoint_ops): Remove dtor field value.
8933 (longjmp_bkpt_dtor): Change to ...
8934 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8935 (strace_marker_create_breakpoints_sal): Remove reference to base
8936 field.
8937 (delete_breakpoint): Don't manually call breakpoint destructor.
8938 (create_tracepoint_from_upload): Remove reference to base field.
8939 (trace_pass_set_count): Likewise.
8940 (initialize_breakpoint_ops): Don't initialize
8941 momentary_breakpoint_ops, don't set dtors.
8942 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8943 <~ada_catchpoint>: New.
8944 <base>: Remove.
8945 (create_excep_cond_exprs): Remove reference to base field.
8946 (dtor_exception): Change to ...
8947 (ada_catchpoint::~ada_catchpoint): ... this.
8948 (dtor_catch_exception): Remove.
8949 (dtor_catch_exception_unhandled): Remove.
8950 (dtor_catch_assert): Remove.
8951 (create_ada_exception_catchpoint): Remove reference to base
8952 field.
8953 (initialize_ada_catchpoint_ops): Don't set dtors.
8954 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8955 breakpoint.
8956 <~signal_catchpoint>: New.
8957 <base>: Remove.
8958 (signal_catchpoint_dtor): Change to ...
8959 (signal_catchpoint::~signal_catchpoint): ... this.
8960 (create_signal_catchpoint): Remove reference to base field.
8961 (initialize_signal_catchpoint_ops): Don't set dtor.
8962 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8963 from breakpoint.
8964 <~syscall_catchpoint>: New.
8965 <base>: Remove.
8966 (dtor_catch_syscall): Change to ...
8967 (syscall_catchpoint::~syscall_catchpoint): ... this.
8968 (create_syscall_event_catchpoint): Remove reference to base
8969 field.
8970 (initialize_syscall_catchpoint_ops): Don't set dtor.
8971 * break-catch-throw.c (struct exception_catchpoint): Inherit
8972 from breakpoint.
8973 <~exception_catchpoint>: New.
8974 <base>: Remove.
8975 (dtor_exception_catchpoint): Change to ...
8976 (exception_catchpoint::~exception_catchpoint): ... this.
8977 (handle_gnu_v3_exceptions): Remove reference to base field.
8978 (initialize_throw_catchpoint_ops): Don't set dtor.
8979 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8980 field.
8981 * remote.c (remote_get_tracepoint_status): Likewise.
8982 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8983 * tracefile.c (tracefile_fetch_registers): Likewise.
8984 * tracepoint.c (actions_command): Likewise.
8985 (validate_actionline): Likewise.
8986 (tfind_1): Likewise.
8987 (get_traceframe_location): Likewise.
8988 (find_matching_tracepoint_location): Likewise.
8989 (parse_tracepoint_status): Likewise.
8990 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8991
8992 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8993
8994 * breakpoint.c (struct longjmp_breakpoint): New struct.
8995 (is_tracepoint_type): Change return type to bool.
8996 (is_longjmp_type): New function.
8997 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8998 (set_raw_breakpoint_without_location): Use
8999 new_breakpoint_from_type.
9000 (set_raw_breakpoint): Likewise.
9001
9002 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9003
9004 * breakpoint.c (new_breakpoint_from_type): New function.
9005 (create_breakpoint_sal): Use new_breakpoint_from_type and
9006 unique_ptr.
9007 (create_breakpoint): Likewise.
9008
9009 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9010
9011 * memattr.c (mem_info_command): Rename to ...
9012 (info_mem_command): ... this.
9013 (mem_enable_command): Rename to ...
9014 (enable_mem_command): ... this.
9015 (mem_disable_command): Rename to ...
9016 (disable_mem_command): ... this.
9017 (mem_delete_command): Rename to ...
9018 (delete_mem_command): ... this.
9019 (_initialize_mem): Adjust function names.
9020
9021 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9022
9023 * btrace.c (handle_pt_insn_events): New.
9024 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9025 STATUS. Split into this and ...
9026 (handle_pt_insn_event_flags): ... this.
9027
9028 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9029
9030 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9031 and struct pt_insn.resynced.
9032 * configure: Regenerated.
9033 * config.in: Regenerated.
9034
9035 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9036
9037 * btrace.c (ftrace_find_call_by_number): New function.
9038 (ftrace_new_function): Store objects, not pointers.
9039 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9040 ftrace_new_gap, ftrace_update_function,
9041 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9042 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9043 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9044 btrace_ends_with_single_insn, btrace_call_get): Account for
9045 btrace_thread_info::functions now storing objects.
9046 * btrace.h (struct btrace_thread_info): Add constructor.
9047 (struct btrace_thread_info) <functions>: Make std::vector.
9048 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9049 Initialize with default values.
9050 * record-btrace.c (record_btrace_frame_sniffer): Account for
9051 btrace_thread_info::functions now storing objects.
9052
9053 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9054
9055 * btrace.c: Remove typedef bfun_s.
9056 (ftrace_new_gap): Directly add gaps to the list of gaps.
9057 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9058 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9059 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9060 instead of gdb VEC.
9061
9062 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9063
9064 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9065 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9066 with btrace_thread_info::next_segment and
9067 btrace_thread_info::prev_segment.
9068 * btrace.h: Remove struct btrace_func_link.
9069 (struct btrace_function): Replace pair of function segment pointers
9070 with pair of indices.
9071 * python/py-record-btrace.c (btpy_call_prev_sibling,
9072 btpy_call_next_sibling): Replace references to
9073 btrace_thread_info::segment with btrace_thread_info::next_segment and
9074 btrace_thread_info::prev_segment.
9075 * record-btrace.c (record_btrace_frame_this_id): Use
9076 btrace_find_call_by_number.
9077
9078 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9079
9080 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9081 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9082 btrace_insn_next, btrace_insn_prev): Remove references to
9083 btrace_thread_info::flow.
9084 * btrace.h (struct btrace_function): Remove FLOW.
9085
9086 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9087
9088 * btrace.c (ftrace_find_call_by_number): New function.
9089 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9090 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9091 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9092 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9093 index.
9094 * btrace.h (struct btrace_function): Turn UP into an index.
9095 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9096 as an index.
9097 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9098 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9099 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9100
9101 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9102
9103 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9104 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9105 ftrace_update_function, ftrace_compute_global_level_offset,
9106 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9107 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9108 btrace_insn_end, btrace_is_empty): Remove references to
9109 btrace_thread_info::begin and btrace_thread_info::end.
9110 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9111 (struct btrace_thread_info) <functions>: Adjust comment.
9112 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9113 btrace_thread_info::begin.
9114
9115 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9116
9117 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9118 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9119 ftrace_update_function): Remove arguments that implicitly were always
9120 BTINFO->END.
9121 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9122 Don't pass BTINFO->END.
9123
9124 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9125
9126 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9127 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9128 btrace_find_insn_by_number): Replace function segment pointer with
9129 index.
9130 (btrace_insn_cmp): Simplify.
9131 * btrace.h: (struct btrace_insn_iterator) Rename index to
9132 insn_index. Replace function segment pointer with index into function
9133 segment vector.
9134 * record-btrace.c (record_btrace_call_history): Replace function
9135 segment pointer use with index.
9136 (record_btrace_frame_sniffer): Retrieve function call segment through
9137 vector.
9138 (record_btrace_set_replay): Remove defunc't safety check.
9139
9140 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9141
9142 * btrace.c (btrace_ends_with_single_insn): New function.
9143 (btrace_call_get, btrace_call_number, btrace_call_begin,
9144 btrace_call_end, btrace_call_next, btrace_call_prev,
9145 btrace_find_call_by_number): Use index into call segment vector
9146 instead of pointer.
9147 (btrace_call_cmp): Simplify.
9148 * btrace.h (struct btrace_call_iterator): Replace function call segment
9149 pointer with index into vector.
9150 * record-btrace.c (record_btrace_call_history): Use index instead of
9151 pointer.
9152
9153 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9154
9155 * btrace.c (btrace_insn_begin, btrace_insn_end,
9156 btrace_find_insn_by_number): Add btinfo to iterator.
9157 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9158
9159 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9160
9161 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9162 and save pointers directly.
9163 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9164 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9165 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9166 changed signature of functions.
9167 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9168 (btrace_fetch): Remove code that adds btrace_function pointers to
9169 vector of btrace_functions.
9170 (btrace_clear): Simplify freeing vector of btrace_functions.
9171
9172 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9173
9174 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9175 Replace VEC_* with std::vector functions.
9176 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9177 (struct btrace_thread_info)<functions>: Change type to std::vector.
9178
9179 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9180
9181 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9182 "Removed targets and native configurations" up. Merge duplicate
9183 "New commands" sub-sections. Add "New options" sub-sections.
9184
9185 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9186
9187 * defs.h (copy_integer_to_size): New declaration.
9188 * findvar.c (copy_integer_to_size): New function.
9189 (do_cint_test): New selftest function.
9190 (copy_integer_to_size_test): Likewise.
9191 (_initialize_findvar): Likewise.
9192 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9193 (mips_fbsd_collect_reg): Use raw_collect_integer.
9194 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9195 (mips64_fill_gregset): Use raw_collect_integer
9196 (mips64_fill_fpregset): Use raw_supply_integer.
9197 * regcache.c (regcache::raw_supply_integer): New function.
9198 (regcache::raw_collect_integer): Likewise.
9199 * regcache.h: (regcache::raw_supply_integer): New declaration.
9200 (regcache::raw_collect_integer): Likewise.
9201
9202 2017-05-24 Yao Qi <yao.qi@linaro.org>
9203
9204 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9205 (COMMON_OBS): Add gdbarch-selftests.o.
9206 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9207 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9208 * gdbarch-selftests.c: New file.
9209 * regcache.h (regcache) <~regcache>: Mark it virtual if
9210 GDB_SELF_TEST.
9211 <raw_write>: Likewise.
9212
9213 2017-05-24 Yao Qi <yao.qi@linaro.org>
9214
9215 * regcache.c (current_regcache): Change it to
9216 regcache::current_regcache.
9217 (regcache_observer_target_changed): Update.
9218 (regcache_thread_ptid_changed): Make it a regcache static
9219 method.
9220 (regcache_thread_ptid_changed): Update.
9221 (class regcache_access): New.
9222 (current_regcache_test): Update.
9223 (_initialize_regcache): Update.
9224 * regcache.h: Include forward_list.
9225 (regcache): Declare regcache_thread_ptid_changed and declare
9226 registers_changed_ptid as friend.
9227
9228 2017-05-24 Yao Qi <yao.qi@linaro.org>
9229
9230 * i387-tdep.c (i387_register_to_value): Use register_size
9231 instead of TYPE_LENGTH.
9232 * m68k-tdep.c (m68k_register_to_value): Likewise.
9233
9234 2017-05-24 Yao Qi <yao.qi@linaro.org>
9235
9236 * i387-tdep.c (i387_convert_register_p): Return false if type
9237 code isn't TYPE_CODE_FLT.
9238
9239 2017-05-24 Yao Qi <yao.qi@linaro.org>
9240
9241 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9242 length is 4.
9243 (alpha_register_to_value): Remove type length check.
9244 (alpha_value_to_register): Likewise.
9245
9246 2017-05-24 Yao Qi <yao.qi@linaro.org>
9247
9248 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9249 TYPE_CODE_FLT.
9250
9251 2017-05-24 Yao Qi <yao.qi@linaro.org>
9252
9253 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9254 TYPE_CODE_FLT or not.
9255
9256 2017-05-24 Yao Qi <yao.qi@linaro.org>
9257
9258 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9259 * avr-tdep.c (avr_gdbarch_init): Likewise.
9260 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9261 * cris-tdep.c (cris_gdbarch_init): Likewise.
9262 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9263 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9264 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9265 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9266 * mep-tdep.c (mep_gdbarch_init): Likewise.
9267 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9268 * mips-tdep.c (mips_gdbarch_init): Likewise.
9269 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9270 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9271 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9272 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9273 * v850-tdep.c (v850_gdbarch_init): Likewise.
9274
9275 2017-05-24 Yao Qi <yao.qi@linaro.org>
9276
9277 * selftest-arch.c (tests_with_arch): Call registers_changed
9278 and reinit_frame_cache.
9279 * selftest.c (run_self_tests): Likewise.
9280
9281 2017-05-24 Yao Qi <yao.qi@linaro.org>
9282
9283 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9284 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9285
9286 2017-05-24 Yao Qi <yao.qi@linaro.org>
9287
9288 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9289 set_gdbarch_print_insn.
9290
9291 2017-05-24 Yao Qi <yao.qi@linaro.org>
9292
9293 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9294 set_gdbarch_print_insn.
9295
9296 2017-05-24 Yao Qi <yao.qi@linaro.org>
9297
9298 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9299 set_gdbarch_print_insn.
9300 * arc-tdep.c (arc_gdbarch_init): Likewise.
9301 * arch-utils.c: include dis-asm.h.
9302 (default_print_insn): New function.
9303 * arch-utils.h (default_print_insn): Declare.
9304 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9305 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9306 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9307 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9308 * frv-tdep.c (frv_gdbarch_init): Likewise.
9309 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9310 * gdbarch.sh (print_insn): Use default_print_insn.
9311 * gdbarch.c: Regenerated.
9312 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9313 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9314 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9315 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9316 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9317 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9318 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9319 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9320 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9321 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9322 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9323 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9324 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9325 * mt-tdep.c (mt_gdbarch_init): Likewise.
9326 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9327 * nios2-tdep.c (nios2_print_insn): Remove.
9328 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9329 * rx-tdep.c (rx_gdbarch_init): Likewise.
9330 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9331 * score-tdep.c (score_print_insn): Remove.
9332 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9333 * sh-tdep.c (sh_gdbarch_init): Likewise.
9334 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9335 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9336 * tic6x-tdep.c (tic6x_print_insn): Remove.
9337 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9338 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9339 * v850-tdep.c (v850_gdbarch_init): Likewise.
9340 * vax-tdep.c (vax_gdbarch_init): Likewise.
9341 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9342 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9343
9344 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9345
9346 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9347 (MIPS_FP0_REGNUM): Remove.
9348 (MIPS_FSR_REGNUM): Remove.
9349 (mips_fbsd_supply_fpregs): Use mips_regnum.
9350 (mips_fbsd_supply_gregs): Likewise.
9351 (mips_fbsd_collect_fpregs): Likewise.
9352 (mips_fbsd_collect_gregs): Likewise.
9353
9354 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9355
9356 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9357 (getpfpregs_supplies): New function.
9358 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9359 getfpregs_supplies.
9360 (mips_fbsd_store_inferior_registers): Likewise.
9361
9362 2017-05-22 Pedro Alves <palves@redhat.com>
9363
9364 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9365 maintainer.
9366
9367 2017-05-22 Alan Hayward <alan.hayward@arm.com>
9368
9369 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9370 (store_register): Likewise.
9371 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9372 (get_decimal_float_return_value): Likewise.
9373 (do_ppc_sysv_return_value): Likewise.
9374 (ppc64_sysv_abi_push_integer): Likewise.
9375 (ppc64_sysv_abi_push_freg): Likewise.
9376 (ppc64_sysv_abi_return_value_base): Likewise.
9377 (ppc64_sysv_abi_return_value): Likewise.
9378 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9379 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9380 * rs6000-nat.c: Likewise.
9381 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9382 (rs6000_value_to_register): Likewise.
9383 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9384
9385 2017-05-21 Tom Tromey <tom@tromey.com>
9386
9387 PR rust/21466:
9388 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9389 arrays as "[T]", not "[T; ]".
9390
9391 2017-05-19 Tom Tromey <tom@tromey.com>
9392
9393 PR rust/21484:
9394 * rust-lang.c (exp_descriptor_rust): New function.
9395 (rust_language_defn): Use it.
9396 * p-lang.c (pascal_language_defn): Update.
9397 * opencl-lang.c (opencl_language_defn): Update.
9398 * objc-lang.c (objc_language_defn): Update.
9399 * m2-lang.c (m2_language_defn): Update.
9400 * language.h (struct language_defn)
9401 <la_watch_location_expression>: New member.
9402 * language.c (unknown_language_defn, auto_language_defn)
9403 (local_language_defn): Update.
9404 * go-lang.c (go_language_defn): Update.
9405 * f-lang.c (f_language_defn): Update.
9406 * d-lang.c (d_language_defn): Update.
9407 * c-lang.h (c_watch_location_expression): Declare.
9408 * c-lang.c (c_watch_location_expression): New function.
9409 (c_language_defn, cplus_language_defn, asm_language_defn)
9410 (minimal_language_defn): Use it.
9411 * breakpoint.c (watch_command_1): Call
9412 la_watch_location_expression.
9413 * ada-lang.c (ada_language_defn): Update.
9414
9415 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9416
9417 PR tui/21482
9418 * gdb_curses.h (NOMACROS): Define.
9419 (NCURSES_NOMACROS): Define.
9420
9421 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9422
9423 PR tui/21482
9424 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9425 arg to char *.
9426 * tui/tui-wingeneral.c (box_win): Likewise.
9427 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9428 (tui_show_source_line): Likewise.
9429 (tui_show_exec_info_content): Likewise.
9430
9431 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9432
9433 * sparc-tdep.c (sparc_structure_return_p)
9434 (sparc_arg_on_registers_p): New functions.
9435 (sparc32_store_arguments): Use them.
9436 * sparc64-tdep.c (sparc64_16_byte_align_p)
9437 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9438 Handle TYPE_CODE_ARRAY.
9439
9440 2017-05-17 Yao Qi <yao.qi@linaro.org>
9441
9442 * cli/cli-decode.c (add_alias_cmd): New function.
9443 * command.h (add_alias_cmd): Declare.
9444 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9445 instead call add_alias_cmd.
9446
9447 2017-05-17 Pedro Alves <palves@redhat.com>
9448
9449 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9450 (nat_makefile_frag): ... this. All references updated.
9451 * configure.ac: Likewise.
9452 * configure.nat: Likewise. Enhance comments.
9453 * configure: Regenerate.
9454
9455 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9456
9457 * procfs.c (procfs_create_inferior): Change prototype to match
9458 definition.
9459
9460 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9461
9462 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9463 C++ compiler warning.
9464
9465 2017-05-12 Tom Tromey <tom@tromey.com>
9466
9467 PR rust/21483:
9468 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9469 recurse, just call value_struct_elt directly.
9470
9471 2017-05-12 Tom Tromey <tom@tromey.com>
9472
9473 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9474 OP_RUST_ARRAY>: Fix.
9475
9476 2017-05-12 Tom Tromey <tom@tromey.com>
9477
9478 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9479
9480 2017-05-09 Yao Qi <yao.qi@linaro.org>
9481
9482 * regcache.c: Include <forward_list>.
9483 (struct regcache_list): Remove.
9484 (current_regcache): Update.
9485 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9486 (regcache_thread_ptid_changed): Likewise.
9487 (registers_changed_ptid): Likewise.
9488 (current_regcache_size): Likewise.
9489
9490 2017-05-09 Yao Qi <yao.qi@linaro.org>
9491
9492 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9493 (current_regcache_size): New function.
9494 (current_regcache_test): New function.
9495 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9496
9497 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9498
9499 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9500 (print_gp_register_row): Use get_frame_register_value.
9501
9502 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9503
9504 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9505 (mips_supply_fpregset): Likewise.
9506 (mips64_supply_gregset): Likewise.
9507
9508 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9509
9510 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9511 regcache->raw_supply_zeroed.
9512
9513 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9514
9515 * configure.nat: Rearrange 'case' statements to match
9516 host before cpu.
9517
9518 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9519
9520 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9521 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9522 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9523 "@nat_extra_makefile_frag@".
9524 (Makefile): Remove dependency on "@frags@".
9525 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9526 (data-directory/Makefile): Likewise.
9527 * config/aarch64/linux.mh: Deleted; moved contents to
9528 "gdb/configure.nat".
9529 * config/alpha/alpha-linux.mh: Likewise.
9530 * config/alpha/nbsd.mh: Likewise.
9531 * config/arm/linux.mh: Likewise.
9532 * config/arm/nbsdelf.mh: Likewise.
9533 * config/i386/cygwin.mh: Likewise.
9534 * config/i386/cygwin64.mh: Likewise.
9535 * config/i386/darwin.mh: Likewise.
9536 * config/i386/fbsd.mh: Likewise.
9537 * config/i386/fbsd64.mh: Likewise.
9538 * config/i386/go32.mh: Likewise.
9539 * config/i386/i386gnu.mh: Likewise.
9540 * config/i386/i386sol2.mh: Likewise.
9541 * config/i386/linux.mh: Likewise.
9542 * config/i386/linux64.mh: Likewise.
9543 * config/i386/mingw.mh: Likewise.
9544 * config/i386/mingw64.mh: Likewise.
9545 * config/i386/nbsd64.mh: Likewise.
9546 * config/i386/nbsdelf.mh: Likewise.
9547 * config/i386/nto.mh: Likewise.
9548 * config/i386/obsd.mh: Likewise.
9549 * config/i386/obsd64.mh: Likewise.
9550 * config/i386/sol2-64.mh: Likewise.
9551 * config/ia64/linux.mh: Likewise.
9552 * config/m32r/linux.mh: Likewise.
9553 * config/m68k/linux.mh: Likewise.
9554 * config/m68k/nbsdelf.mh: Likewise.
9555 * config/m68k/obsd.mh: Likewise.
9556 * config/m88k/obsd.mh: Likewise.
9557 * config/mips/fbsd.mh: Likewise.
9558 * config/mips/linux.mh: Likewise.
9559 * config/mips/nbsd.mh: Likewise.
9560 * config/mips/obsd64.mh: Likewise.
9561 * config/pa/linux.mh: Likewise.
9562 * config/pa/nbsd.mh: Likewise.
9563 * config/pa/obsd.mh: Likewise.
9564 * config/powerpc/aix.mh: Likewise.
9565 * config/powerpc/fbsd.mh: Likewise.
9566 * config/powerpc/linux.mh: Likewise.
9567 * config/powerpc/nbsd.mh: Likewise.
9568 * config/powerpc/obsd.mh: Likewise.
9569 * config/powerpc/ppc64-linux.mh: Likewise.
9570 * config/powerpc/spu-linux.mh: Likewise.
9571 * config/s390/linux.mh: Likewise.
9572 * config/sh/nbsd.mh: Likewise.
9573 * config/sparc/fbsd.mh: Likewise.
9574 * config/sparc/linux.mh: Likewise.
9575 * config/sparc/linux64.mh: Likewise.
9576 * config/sparc/nbsd64.mh: Likewise.
9577 * config/sparc/nbsdelf.mh: Likewise.
9578 * config/sparc/obsd64.mh: Likewise.
9579 * config/sparc/sol2.mh: Likewise.
9580 * config/tilegx/linux.mh: Likewise.
9581 * config/vax/nbsdelf.mh: Likewise.
9582 * config/vax/obsd.mh: Likewise.
9583 * config/xtensa/linux.mh: Likewise.
9584 * config/i386/i386gnu.mn: New file, with excerpts from
9585 "config/i386/i386gnu.mh".
9586 * configure: Regenerate.
9587 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9588 *.mh files under "gdb/config".
9589 * configure.nat: New file, with contents from the
9590 "gdb/config/*/*.mh" files.
9591
9592 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9593
9594 * btrace.c (btrace_clear): Free insn vector.
9595
9596 2017-05-05 Pedro Alves <palves@redhat.com>
9597
9598 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9599 * configure: Regenerate.
9600
9601 2017-05-04 Pedro Alves <palves@redhat.com>
9602
9603 * Makefile.in (SFILES): Add progspace-and-thread.c.
9604 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9605 (COMMON_OBS): Add progspace-and-thread.o.
9606 * breakpoint.c: Include "progspace-and-thread.h".
9607 (update_inserted_breakpoint_locations)
9608 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9609 Use scoped_restore_current_pspace_and_thread.
9610 (create_std_terminate_master_breakpoint): Use
9611 scoped_restore_current_program_space.
9612 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9613 (print_breakpoint_location): Use
9614 scoped_restore_current_program_space.
9615 (bp_loc_is_permanent): Use
9616 scoped_restore_current_pspace_and_thread.
9617 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9618 (download_tracepoint_locations): Use
9619 scoped_restore_current_pspace_and_thread.
9620 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9621 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9622 (enum step_over_calls_kind): Moved from inferior.h.
9623 (class scoped_restore_current_thread): New class.
9624 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9625 declaration.
9626 (scoped_restore_current_thread): New class.
9627 * infcmd.c: Include "common/gdb_optional.h".
9628 (continue_1, proceed_after_attach): Use
9629 scoped_restore_current_thread.
9630 (notice_new_inferior): Use scoped_restore_current_thread.
9631 * inferior.c: Include "progspace-and-thread.h".
9632 (restore_inferior, save_current_inferior): Delete.
9633 (add_inferior_command, clone_inferior_command): Use
9634 scoped_restore_current_pspace_and_thread.
9635 * inferior.h (scoped_restore_current_inferior): New class.
9636 * infrun.c: Include "progspace-and-thread.h" and
9637 "common/gdb_optional.h".
9638 (follow_fork_inferior): Use
9639 scoped_restore_current_pspace_and_thread.
9640 (scoped_restore_exited_inferior): New class.
9641 (handle_vfork_child_exec_or_exit): Use
9642 scoped_restore_exited_inferior,
9643 scoped_restore_current_pspace_and_thread,
9644 scoped_restore_current_thread and scoped_restore.
9645 (fetch_inferior_event): Use scoped_restore_current_thread.
9646 * linespec.c (decode_line_full, decode_line_1): Use
9647 scoped_restore_current_program_space.
9648 * mi/mi-main.c: Include "progspace-and-thread.h".
9649 (exec_continue): Use scoped_restore_current_thread.
9650 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9651 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9652 * proc-service.c (ps_pglobal_lookup): Use
9653 scoped_restore_current_program_space.
9654 * progspace-and-thread.c: New file.
9655 * progspace-and-thread.h: New file.
9656 * progspace.c (release_program_space, clone_program_space): Use
9657 scoped_restore_current_program_space.
9658 (restore_program_space, save_current_program_space)
9659 (save_current_space_and_thread): Delete.
9660 (switch_to_program_space_and_thread): Moved to
9661 progspace-and-thread.c.
9662 * progspace.h (save_current_program_space)
9663 (save_current_space_and_thread): Delete declarations.
9664 (scoped_restore_current_program_space): New class.
9665 * remote.c (remote_btrace_maybe_reopen): Use
9666 scoped_restore_current_thread.
9667 * symtab.c: Include "progspace-and-thread.h".
9668 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9669 * thread.c (print_thread_info_1): Use
9670 scoped_restore_current_thread.
9671 (struct current_thread_cleanup): Delete.
9672 (do_restore_current_thread_cleanup)
9673 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9674 (scoped_restore_current_thread::~scoped_restore_current_thread):
9675 ... this new dtor.
9676 (make_cleanup_restore_current_thread): Rename/convert to ...
9677 (scoped_restore_current_thread::scoped_restore_current_thread):
9678 ... this new ctor.
9679 (thread_apply_all_command): Use scoped_restore_current_thread.
9680 (thread_apply_command): Use scoped_restore_current_thread.
9681 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9682 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9683
9684 2017-05-04 Pedro Alves <palves@redhat.com>
9685
9686 * thread.c (make_cleanup_restore_current_thread): Move
9687 find_thread_ptid call before the is_stopped call. Assert that the
9688 thread is found. Replace is_stopped call by checking the thread's
9689 state directly. Remove unnecessary NULL-thread check.
9690
9691 2017-05-04 Pedro Alves <palves@redhat.com>
9692
9693 * corelow.c (thread_section_name): New class.
9694 (get_core_register_section, get_core_siginfo): Use it.
9695
9696 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9697
9698 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9699 (get_core_register_section): Remove xfree of NULL pointer.
9700
9701 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9702
9703 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9704 * regcache.c (regcache::raw_supply_zeroed): New function.
9705 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9706
9707 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9708
9709 * gdbarch.sh: Remove commented out definition of
9710 TARGET_CHAR_BIT.
9711 * gdbarch.h: Re-generate.
9712
9713 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9714
9715 * configure: Regenerate.
9716
9717 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9718
9719 * solib-target.c (solib_target_relocate_section_addresses):
9720 Remove num_section_bases, num_bases, segment_bases variables.
9721
9722 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9723
9724 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9725
9726 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9727
9728 * solib-target.c: Include <vector>
9729 (struct lm_info_target) <~lm_info_target>: Remove.
9730 <segment_bases, section_bases>: Change type to
9731 std::vector<CORE_ADDR>.
9732 (library_list_start_segment, library_list_start_section,
9733 library_list_end_library,
9734 solib_target_relocate_section_addresses): Adjust.
9735
9736 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9737
9738 * gdbarch.sh (software_single_step): Change return type to
9739 std::vector<CORE_ADDR>.
9740 * gdbarch.c, gdbarch.h: Re-generate.
9741 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9742 Adjust.
9743 (arm_deal_with_atomic_sequence_raw): Adjust.
9744 (thumb_get_next_pcs_raw): Adjust.
9745 (arm_get_next_pcs_raw): Adjust.
9746 (arm_get_next_pcs): Adjust.
9747 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9748 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9749 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9750 (alpha_software_single_step): Adjust.
9751 * alpha-tdep.h (alpha_software_single_step): Adjust.
9752 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9753 * arm-tdep.c (arm_software_single_step): Adjust.
9754 (arm_breakpoint_kind_from_current_state): Adjust.
9755 * arm-tdep.h (arm_software_single_step): Adjust.
9756 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9757 * cris-tdep.c (cris_software_single_step): Adjust.
9758 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9759 (micromips_deal_with_atomic_sequence): Adjust.
9760 (deal_with_atomic_sequence): Adjust.
9761 (mips_software_single_step): Adjust.
9762 * mips-tdep.h (mips_software_single_step): Adjust.
9763 * moxie-tdep.c (moxie_software_single_step): Adjust.
9764 * nios2-tdep.c (nios2_software_single_step): Adjust.
9765 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9766 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9767 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9768 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9769 * sparc-tdep.c (sparc_software_single_step): Adjust.
9770 * spu-tdep.c (spu_software_single_step): Adjust.
9771 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9772
9773 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9774
9775 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9776 * gdbarch.h: Re-generate.
9777
9778 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9779
9780 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9781 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9782 * python/py-instruction.c, python/py-instruction.h: New file.
9783 * python/py-record.c: Add py-instruction.h include.
9784 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9785 gdb.RecordInstruction.
9786 * python/python-internal.h: Add gdbpy_initialize_instruction
9787 declaration.
9788 * python/python.c (do_start_initialization): Add
9789 gdbpy_initialize_instruction.
9790
9791 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9792
9793 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9794 Remove.
9795 (btrace_func_from_recpy_func): New function.
9796 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9797 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9798 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9799 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9800 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9801 Also, use new helper functions.
9802 (btpy_list_item): Use new helper functions.
9803 (recpy_bt_function_call_history): Use new type name.
9804 (btpy_call_getset): Remove.
9805 (gdbpy_initialize_btrace): Remove code to initialize
9806 gdb.BtraceFunctionCall.
9807 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9808 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9809 recpy_bt_func_prev, recpy_bt_func_next): New export.
9810 * python/py-record.c (recpy_func_type): New static object.
9811 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9812 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9813 recpy_func_next): New function.
9814 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9815 (recpy_func_getset): New static object.
9816 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9817 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9818
9819 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9820
9821 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9822 (btpy_object, btpy_insn_type, btpy_new): Remove.
9823 (btpy_list_object): Use gdb.RecordInstruction type instead of
9824 gdb.BtraceInstruction type.
9825 (btrace_insn_from_recpy_insn): New function.
9826 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9827 btpy_new.
9828 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9829 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9830 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9831 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9832 instead of btpy_object.
9833 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9834 btpy_insn_data, btpy_insn_decode): Rename to ...
9835 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9836 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9837 recpy_bt_insn_decode): This. Also, use new helper functions.
9838 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9839 recpy_insn_type.
9840 (btpy_insn_getset): Remove.
9841 (gdbpy_initialize_btrace): Remove code to initialize
9842 gdb.BtraceInstruction. Use recpy_element_object.
9843 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9844 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9845 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9846 * python/py-record.c (recpy_insn_type): New static object.
9847 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9848 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9849 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9850 New function.
9851 (recpy_insn_getset): New static object.
9852 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9853 * python/py-record.h (recpy_element_object): New typedef.
9854 (recpy_insn_type, recpy_insn_new): New export.
9855
9856 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9857
9858 * py-record-btrace.c (btpy_insn_new): Removed.
9859 (btpy_insn_or_gap_new): New function.
9860 (btpy_insn_error): Removed.
9861 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9862 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9863 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9864 btpy_insn_or_gap_new instead of btpy_insn_new.
9865 (btpy_insn_getset): Remove btpy_insn_error.
9866 * py-record.c (recpy_gap_type): New static object.
9867 (recpy_gap_object): New typedef.
9868 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9869 recpy_gap_reason_string): New function.
9870 (recpy_gap_getset): New static object.
9871 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9872 * py-record.h (recpy_gap_new): New export.
9873
9874 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9875
9876 * python/py-record.c (recpy_ptid): Remove.
9877 (recpy_record_getset): Remove recpy_ptid.
9878
9879 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9880
9881 * btrace.c (btrace_fetch): Set inferior_ptid.
9882 * python/py-record-btrace.c: Add "py-record.h" include.
9883 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9884 recpy_bt_end, recpy_bt_instruction_history,
9885 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9886 in gdb.Record object instead of current ptid.
9887 * python/py-record.c: Include new "py-record.h" file.
9888 (recpy_record_object): Moved to py-record.h.
9889 * python/py-record.h: New file.
9890
9891 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9892
9893 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9894 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9895 indentation.
9896
9897 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9898
9899 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9900 the past maintainers section.
9901
9902 2017-04-28 Yao Qi <yao.qi@linaro.org>
9903
9904 * infcmd.c (get_return_value): Use regcache ctor, and remove
9905 cleanup.
9906
9907 2017-04-28 Yao Qi <yao.qi@linaro.org>
9908 Pedro Alves <palves@redhat.com>
9909
9910 * regcache.c (regcache::regcache): New tag dispatch ctor.
9911 (do_cooked_read): Moved above.
9912 (regcache_dup): Use the tag dispatch ctor..
9913 * regcache.h (regcache): Declare ctor, delete copy ctor and
9914 assignment operator, remove friend regcache_dup.
9915
9916 2017-04-28 Yao Qi <yao.qi@linaro.org>
9917
9918 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9919 call method save instead of regcache_cpy.
9920 * regcache.h (struct regcache): Make regcache_dup a friend.
9921
9922 2017-04-28 Yao Qi <yao.qi@linaro.org>
9923
9924 * regcache.c (struct regcache): Move to regcache.h
9925 (regcache::arch): New method.
9926 (regcache_get_ptid): Update.
9927 (get_regcache_arch): Call arch method.
9928 (get_regcache_aspace): Call method aspace.
9929 (register_buffer): Change it to method.
9930 (regcache_save): Change it to regcache::save.
9931 (regcache_restore): Likewise.
9932 (regcache_cpy_no_passthrough): Remove the declaration.
9933 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9934 (regcache_cpy_no_passthrough): Change it to method
9935 cpy_no_passthrough.
9936 (regcache_register_status): Change it to method
9937 get_register_status.
9938 (regcache_invalidate): Change it to method invalidate.
9939 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9940 (regcache_raw_update): Change it to method raw_update.
9941 (regcache_raw_read): Likewise.
9942 (regcache_raw_read_signed): Likewise.
9943 (regcache_raw_read_unsigned): Likewise.
9944 (regcache_raw_write_signed): Likewise.
9945 (regcache_raw_write_unsigned): Likewise.
9946 (regcache_cooked_read): Likewise.
9947 (regcache_cooked_read_value): Likewise.
9948 (regcache_cooked_read_signed): Likewise.
9949 (regcache_cooked_read_unsigned): Likewise.
9950 (regcache_cooked_write_signed): Likewise.
9951 (regcache_cooked_write_unsigned): Likewise.
9952 (regcache_raw_set_cached_value): Likewise.
9953 (regcache_raw_write): Likewise.
9954 (regcache_cooked_write): Likewise.
9955 (regcache_xfer_part): Likewise.
9956 (regcache_raw_read_part): Likewise.
9957 (regcache_raw_write_part): Likewise.
9958 (regcache_cooked_read_part): Likewise.
9959 (regcache_cooked_write_part): Likewise.
9960 (regcache_raw_supply): Likewise.
9961 (regcache_raw_collect): Likewise.
9962 (regcache_transfer_regset): Likewise.
9963 (regcache_supply_regset): Likewise.
9964 (regcache_collect_regset): Likewise.
9965 (regcache_debug_print_register): Likewise.
9966 (enum regcache_dump_what): Move it to regcache.h.
9967 (regcache_dump): Change it to method dump.
9968 * regcache.h (enum regcache_dump_what): New.
9969 (class regcache): New.
9970 * target.c (target_fetch_registers): Call method
9971 debug_print_register.
9972 (target_store_registers): Likewise.
9973
9974 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9975
9976 * windows-nat.c (struct lm_info_windows): Initialize field.
9977 (windows_make_so): Allocate lm_info_windows with new.
9978 (windows_free_so): Free lm_info_windows with delete.
9979
9980 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9981
9982 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9983 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9984 cleanup.
9985 (darwin_free_so): Free lm_info_darwin with delete.
9986
9987 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9988
9989 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9990 <l_addr_p>: Change type to bool.
9991 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9992 (svr4_free_so): Free lm_info_svr4 with delete.
9993 (svr4_copy_library_list): Replace memcpy with call to copy
9994 constructor.
9995 (library_list_start_library, svr4_default_sos): Allocate
9996 lm_info_svr4 with new.
9997
9998 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9999
10000 * solib-target.c (struct lm_info_target): Add destructor,
10001 initialize fields.
10002 <name>: Change type to std::string.
10003 (library_list_start_library): Allocate lm_info_target with new.
10004 (solib_target_free_library_list): Free lm_info_target with
10005 delete.
10006 (solib_target_current_sos): Adapt to std::string.
10007 (solib_target_free_so): Free lm_info_target with delete.
10008
10009 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10010
10011 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10012 fields.
10013 (frv_current_sos): Allocate lm_info_frv with new.
10014 (frv_relocate_main_executable): Free lm_info_frv with delete,
10015 allocate with new.
10016 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10017
10018 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10019
10020 * solib-frv.c (struct lm_info_frv): Fix indentation.
10021
10022 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10023
10024 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10025 map field.
10026 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10027 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10028 and allocate with new.
10029 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10030
10031 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10032
10033 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10034 <filename, member_name>: Change type to std::string.
10035 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10036 (library_list_start_library): Allocate lm_info_aix with new.
10037 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10038 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10039 with copy constructor.
10040
10041 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10042
10043 * solist.h (struct lm_info): Remove.
10044 (struct lm_info_base): New class.
10045 (struct so_list) <lm_info>: Change type to lm_info_base *.
10046 * nto-tdep.c (struct lm_info): Remove.
10047 (lm_addr): Adjust.
10048 * solib-aix.c (struct lm_info): Rename to ...
10049 (struct lm_info_aix): ... this. Extend lm_info_base.
10050 (lm_info_p): Rename to ...
10051 (lm_info_aix_p): ... this, and adjust.
10052 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10053 solib_aix_parse_libraries, library_list_start_library,
10054 solib_aix_free_library_list, solib_aix_parse_libraries,
10055 solib_aix_get_library_list,
10056 solib_aix_relocate_section_addresses, solib_aix_free_so,
10057 solib_aix_get_section_offsets,
10058 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10059 Adjust.
10060 (struct solib_aix_inferior_data) <library_list>: Adjust.
10061 * solib-darwin.c (struct lm_info): Rename to ...
10062 (struct lm_info_darwin): ... this. Extend lm_info_base.
10063 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10064 * solib-dsbt.c (struct lm_info): Rename to ...
10065 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10066 (struct dsbt_info) <main_executable_lm_info): Adjust.
10067 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10068 dsbt_relocate_section_addresses): Adjust.
10069 * solib-frv.c (struct lm_info): Rename to ...
10070 (struct lm_info_frv): ... this. Extend lm_info_base.
10071 (main_executable_lm_info): Adjust.
10072 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10073 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10074 find_canonical_descriptor_in_load_object,
10075 frv_fdpic_find_canonical_descriptor): Adjust.
10076 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10077 to lm_info_svr4.
10078 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10079 svr4_clear_so, svr4_copy_library_list,
10080 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10081 svr4_current_sos, svr4_fetch_objfile_link_map,
10082 solist_update_incremental): Adjust.
10083 * solib-svr4.h (struct lm_info_svr4): Move here from
10084 solib-svr4.c.
10085 * solib-target.c (struct lm_info): Rename to ...
10086 (struct lm_info_target): ... this. Extend lm_info_base.
10087 (lm_info_p): Rename to ...
10088 (lm_info_target_p): ... this.
10089 (solib_target_parse_libraries, library_list_start_segment,
10090 library_list_start_section, library_list_start_library,
10091 library_list_end_library, solib_target_free_library_list,
10092 solib_target_current_sos, solib_target_free_so,
10093 solib_target_relocate_section_addresses): Adjust.
10094 * windows-nat.c (struct lm_info): Rename to ...
10095 (struct lm_info_windows): ... this. Extend lm_info_base.
10096 (windows_make_so, handle_load_dll, handle_unload_dll,
10097 windows_xfer_shared_libraries): Adjust.
10098
10099 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10100
10101 * solib-darwin.c (struct darwin_so_list): Remove.
10102 (darwin_current_sos): Allocate an so_list object instead of a
10103 darwin_so_list, separately allocate an lm_info object.
10104 (darwin_free_so): Free lm_info.
10105
10106 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10107
10108 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10109 with fprintf_filtered.
10110
10111 2017-04-28 Yao Qi <yao.qi@linaro.org>
10112
10113 * regcache.c (regcache::regcache): New function.
10114 (regcache::~regcache): New function.
10115 (regcache_xmalloc_1): Remove.
10116 (regcache_xmalloc): Call new regcache.
10117 (regcache_xfree): Call delete regcache.
10118 (get_thread_arch_aspace_regcache): Call new regcache.
10119
10120 2017-04-28 Yao Qi <yao.qi@linaro.org>
10121
10122 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10123 lwp instead of ptid_get_lwp.
10124
10125 2017-04-28 Yao Qi <yao.qi@linaro.org>
10126
10127 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10128 lwp_info instead of getting from inferior_ptid.
10129
10130 2017-04-27 Keith Seitz <keiths@redhat.com>
10131
10132 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10133 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10134 (CV_CONVERSION_BADNESS): Define.
10135 (rank_one_type): Remove overly restrictive rvalue reference
10136 rank checks.
10137 Add cv-qualifier checks and subranks for type equality.
10138 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10139 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10140 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10141
10142 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10143
10144 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10145 count when creating the object.
10146
10147 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10148 Ulrich Weigand <uweigand@de.ibm.com>
10149
10150 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10151 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10152 is used in AIX.
10153 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10154 (process_xcoff_symbol): Likewise.
10155 (scan_xcoff_symtab): Likewise.
10156
10157 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10158
10159 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10160 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10161 (ia64_access_reg): Use get_frame_register_unsigned.
10162 (ia64_access_rse_reg): Likewise.
10163 (ia64_libunwind_frame_prev_register): Likewise.
10164
10165 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10166
10167 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10168 * gdbarch.c: Regenerated.
10169 * gdbarch.h: Regenerated.
10170 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10171 visibility external.
10172 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10173 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10174 (enum cfa_how_kind): Move to ...
10175 (struct dwarf2_frame_state_reg_info): Likewise.
10176 (struct dwarf2_frame_state): Likewise.
10177 * dwarf2-frame.h: ... here.
10178 (dwarf2_frame_state_alloc_regs): New declaration.
10179 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10180 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10181
10182 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10183
10184 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10185 regcache_raw_read_unsigned.
10186 (xtensa_pseudo_register_write): Likewise.
10187
10188 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10189
10190 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10191 (nds32_pseudo_register_write): Likewise.
10192
10193 2017-04-25 Yao Qi <yao.qi@linaro.org>
10194
10195 * regcache.c (struct regcache) <readonly_p>: Change its type
10196 to bool.
10197 (regcache_xmalloc_1): Update parameter type and callers update.
10198
10199 2017-04-25 Yao Qi <yao.qi@linaro.org>
10200
10201 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10202 set_gdbarch_wchar_bit.
10203 * arm-tdep.c (arm_gdbarch_init): Likewise.
10204
10205 2017-04-25 Pedro Alves <palves@redhat.com>
10206
10207 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10208 (BothAreRelocatable, memcopy, memmove): Don't define.
10209 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10210 macros.
10211
10212 2017-04-25 Pedro Alves <palves@redhat.com>
10213
10214 * common/common-defs.h: Include "common/poison.h".
10215 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10216 and adjust.
10217 * common/poison.h: New file.
10218 * common/traits.h: Include <type_traits>.
10219 (Not, Or, Requires): New, moved from common/function-view.h.
10220
10221 2017-04-25 Pedro Alves <palves@redhat.com>
10222
10223 * breakpoint.h (struct breakpoint): In-class initialize all
10224 fields. Make boolean fields "bool".
10225 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10226 memset call and initializations no longer necessary.
10227
10228 2017-04-25 Pedro Alves <palves@redhat.com>
10229
10230 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10231 reference.
10232 (pt_btrace_insn): New function.
10233 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10234
10235 2017-04-25 Pedro Alves <palves@redhat.com>
10236
10237 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10238 "base" field and inherit from "bp_location" instead. Add
10239 non-default ctor.
10240 (allocate_location_exception): Use new non-default ctor.
10241 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10242 (init_bp_location): Convert to ...
10243 (bp_location::bp_location): ... this new ctor, and remove memset
10244 call.
10245 (base_breakpoint_allocate_location): Use the new non-default ctor.
10246 * breakpoint.h (bp_location): Now a class. Declare default and
10247 non-default ctors. In-class initialize all members.
10248 (init_bp_location): Remove declaration.
10249
10250 2017-04-25 Pedro Alves <palves@redhat.com>
10251
10252 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10253 assignment operator.
10254
10255 2017-04-24 Yao Qi <yao.qi@linaro.org>
10256
10257 * doublest.c (convert_doublest_to_floatformat): Call
10258 floatformat_totalsize_bytes.
10259
10260 2017-04-22 Tom Tromey <tom@tromey.com>
10261
10262 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10263 ui_out_emit_list.
10264 * stack.c (print_frame): Use ui_out_emit_list.
10265 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10266 ui_out_emit_list.
10267 * mi/mi-main.c (print_one_inferior)
10268 (mi_cmd_data_list_register_names)
10269 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10270 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10271 ui_out_emit_list.
10272 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10273 (mi_output_solib_attribs): Use ui_out_emit_list,
10274 ui_out_emit_tuple.
10275 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10276 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10277 (mi_cmd_stack_list_args, list_args_or_locals): Use
10278 ui_out_emit_list.
10279 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10280 * breakpoint.c (print_solib_event, output_thread_groups): Use
10281 ui_out_emit_list.
10282
10283 2017-04-22 Tom Tromey <tom@tromey.com>
10284
10285 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10286 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10287 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10288
10289 2017-04-22 Tom Tromey <tom@tromey.com>
10290
10291 * tracepoint.c (tvariables_info_1)
10292 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10293
10294 2017-04-22 Tom Tromey <tom@tromey.com>
10295
10296 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10297 annotate_arg_emitter.
10298 * breakpoint.c (print_mention_watchpoint)
10299 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10300 * annotate.h (struct annotate_arg_emitter): New.
10301
10302 2017-04-22 Tom Tromey <tom@tromey.com>
10303
10304 * record-btrace.c (record_btrace_insn_history)
10305 (record_btrace_insn_history_range, record_btrace_call_history)
10306 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10307 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10308 ui_out_emit_tuple.
10309 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10310 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10311 * skip.c (skip_info): Use ui_out_emit_tuple.
10312 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10313 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10314 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10315 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10316 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10317 ui_out_emit_tuple.
10318 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10319 (output_register, mi_cmd_data_read_memory)
10320 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10321 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10322 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10323 Use ui_out_emit_tuple.
10324 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10325 ui_out_emit_tuple.
10326 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10327 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10328 * linux-thread-db.c (info_auto_load_libthread_db): Use
10329 ui_out_emit_tuple.
10330 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10331 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10332 * disasm.c (do_mixed_source_and_assembly_deprecated)
10333 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10334 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10335 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10336 * breakpoint.c (print_one_breakpoint_location)
10337 (print_one_breakpoint): Use ui_out_emit_tuple.
10338 * auto-load.c (print_script, info_auto_load_cmd): Use
10339 ui_out_emit_tuple.
10340 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10341
10342 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10343
10344 * thread.c (print_thread_info_1): Remove dead code.
10345
10346 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10347
10348 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10349 GDB_SELF_TEST.
10350 * arm-tdep.c (selftests::arm_record_test): Likewise.
10351
10352 2017-04-21 Yao Qi <yao.qi@linaro.org>
10353
10354 * regcache.c (regcache_restore): Remove argument 2. Replace
10355 argument 3 with regcache. Get register status from
10356 src->register_status and get register contents from
10357 register_buffer (src, regnum).
10358 (regcache_cpy): Update.
10359
10360 2017-04-19 Pedro Alves <palves@redhat.com>
10361
10362 * gdbthread.h (thread): Add missing closing parenthesis in
10363 comment.
10364
10365 2017-04-19 Pedro Alves <palves@redhat.com>
10366
10367 * common/refcounted-object.h: New file.
10368 * gdbthread.h: Include "common/refcounted-object.h".
10369 (thread_info): Inherit from refcounted_object and add comments.
10370 (thread_info::incref, thread_info::decref)
10371 (thread_info::m_refcount): Delete.
10372 (thread_info::deletable): Use the refcounted_object::refcount()
10373 method.
10374 * inferior.c (current_inferior_): Add comment.
10375 (set_current_inferior): Increment/decrement refcounts.
10376 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10377 not-deletable instead of comparing with the current inferior.
10378 (initialize_inferiors): Increment the initial inferior's refcount.
10379 * inferior.h (struct inferior): Forward declare.
10380 Include "common/refcounted-object.h".
10381 (current_inferior, set_current_inferior): Move declaration to
10382 before struct inferior's definition, and fix comment.
10383 (inferior): Inherit from refcounted_object. Add comments.
10384 * thread.c (switch_to_thread_no_regs): Reference the thread's
10385 inferior pointer directly instead of doing a ptid lookup.
10386 (switch_to_no_thread): New function.
10387 (switch_to_thread(thread_info *)): New function, factored out
10388 from ...
10389 (switch_to_thread(ptid_t)): ... this.
10390 (restore_current_thread): Delete.
10391 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10392 fields, and add 'inf' field.
10393 (do_restore_current_thread_cleanup): Check whether old->inf is
10394 alive instead of looking up an inferior by ptid. Use
10395 switch_to_thread and switch_to_no_thread.
10396 (restore_current_thread_cleanup_dtor): Use old->inf directly
10397 instead of lookup up an inferior by id. Decref the inferior.
10398 Don't restore 'removable'.
10399 (make_cleanup_restore_current_thread): Same the inferior pointer
10400 in old, instead of the inferior number. Incref the inferior.
10401 Don't save/clear 'removable'.
10402
10403 2017-04-19 Pedro Alves <palves@redhat.com>
10404
10405 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10406 unittests/scoped_restore-selftests.c.
10407 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10408 * common/scoped_restore.h (scoped_restore_base): Make "class".
10409 (scoped_restore_base::release): New public method.
10410 (scoped_restore_base::scoped_restore_base): New protected ctor.
10411 (scoped_restore_base::m_saved_var): New protected field.
10412 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10413 scoped_restore_base base class instead of m_saved_var directly.
10414 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10415 (scoped_restore_tmpl::scoped_restore_tmpl(const
10416 scoped_restore_tmpl<T>&)): Likewise.
10417 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10418 method.
10419 (scoped_restore_tmpl::saved_var): New method.
10420 (scoped_restore_tmpl::m_saved_var): Delete.
10421 * inferior.h (inferior::detaching): Now a bool.
10422 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10423 cleanup.
10424 * unittests/scoped_restore-selftests.c: New file.
10425
10426 2017-04-19 Pedro Alves <palves@redhat.com>
10427
10428 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10429 Re-sort in alphabetic order.
10430
10431 2017-04-18 Pedro Alves <palves@redhat.com>
10432
10433 * xml-support.c (obstack_xml_printf): Delete.
10434 * xml-support.h (obstack_xml_printf): Delete.
10435
10436 2017-04-18 Pedro Alves <palves@redhat.com>
10437
10438 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10439 vdebug, verror, body_text, start_element, end_element, name,
10440 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10441 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10442 is_xinclude>: Make private and add m_ prefix.
10443 (gdb_xml_parser::body_text): New method, based on ...
10444 (gdb_xml_body_text): ... this. Adjust.
10445 (gdb_xml_parser::vdebug): New method, based on ...
10446 (gdb_xml_debug): ... this. Adjust.
10447 (gdb_xml_parser::verror): New method, based on ...
10448 (gdb_xml_error): ... this. Adjust.
10449 (gdb_xml_parser::start_element): New method, based on ...
10450 (gdb_xml_start_element): ... this. Adjust.
10451 (gdb_xml_start_element_wrapper): Defer to
10452 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10453 (gdb_xml_parser::end_element): New method, based on ...
10454 (gdb_xml_end_element_wrapper): ... this. Adjust.
10455 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10456 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10457 (gdb_xml_parser::use_dtd): New method, based on ...
10458 (gdb_xml_use_dtd): ... this. Adjust.
10459 (gdb_xml_parser::parse): New method, based on ...
10460 (gdb_xml_parse): ... this. Adjust.
10461 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10462 (xinclude_start_include): Adjust to call the parser's name method.
10463 (xml_xinclude_default, xml_xinclude_start_doctype)
10464 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10465 method.
10466 (xml_process_xincludes): Adjust to call parser methods.
10467 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10468 declarations.
10469
10470 2017-04-18 Pedro Alves <palves@redhat.com>
10471
10472 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10473 gdb::optional<std::string>.
10474 * xml-support.c: Include <string>.
10475 (scope_level::scope_level(scope_level &&))
10476 (scope_level::~scope_level): Delete.
10477 (scope_level::body): Now a std::string.
10478 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10479 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10480 parameter.
10481 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10482 (xinclude_parsing_data::output): Now a std::string reference.
10483 (xinclude_start_include): Adjust.
10484 (xml_xinclude_default): Adjust.
10485 (xml_process_xincludes): Add 'output' parameter, and return bool.
10486 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10487 and return bool.
10488 * xml-tdesc.c: Include <unordered_map> and <string>.
10489 (tdesc_xml_cache): Delete.
10490 (tdesc_xml_cache_s): Delete.
10491 (xml_cache): Now an std::unordered_map.
10492 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10493 (target_fetch_description_xml): Change return type to
10494 gdb::optional<std::string>, and adjust.
10495 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10496 (target_fetch_description_xml): Change return type to
10497 gdb::optional<std::string>.
10498
10499 2017-04-18 Pedro Alves <palves@redhat.com>
10500
10501 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10502 unittests/optional-selftests.c.
10503 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10504 * unittests/optional-selftests.c: New file.
10505 * unittests/optional/assignment/1.cc: New file.
10506 * unittests/optional/assignment/2.cc: New file.
10507 * unittests/optional/assignment/3.cc: New file.
10508 * unittests/optional/assignment/4.cc: New file.
10509 * unittests/optional/assignment/5.cc: New file.
10510 * unittests/optional/assignment/6.cc: New file.
10511 * unittests/optional/assignment/7.cc: New file.
10512 * unittests/optional/cons/copy.cc: New file.
10513 * unittests/optional/cons/default.cc: New file.
10514 * unittests/optional/cons/move.cc: New file.
10515 * unittests/optional/cons/value.cc: New file.
10516 * unittests/optional/in_place.cc: New file.
10517 * unittests/optional/observers/1.cc: New file.
10518 * unittests/optional/observers/2.cc: New file.
10519
10520 2017-04-18 Pedro Alves <palves@redhat.com>
10521
10522 * common/gdb_optional.h: Include common/traits.h.
10523 (in_place_t): New type.
10524 (in_place): New constexpr variable.
10525 (optional::optional): Remove member initialization of
10526 m_instantiated.
10527 (optional::optional(in_place_t...)): New constructor.
10528 (optional::~optional): Use reset.
10529 (optional::optional(const optional&)): New.
10530 (optional::optional(const optional&&)): New.
10531 (optional::optional(T &)): New.
10532 (optional::optional(T &&)): New.
10533 (operator::operator=(const optional &)): New.
10534 (operator::operator=(optional &&)): New.
10535 (operator::operator= (const T &))
10536 (operator::operator= (T &&))
10537 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10538 (operator::reset): New.
10539 (operator::m_instantiated):: Add in-class initializer.
10540 * common/traits.h: Include <type_traits>.
10541 (struct And): New types.
10542
10543 2017-04-18 Pedro Alves <palves@redhat.com>
10544
10545 * xml-support.c: Include <vector>.
10546 (scope_level::scope_level(const gdb_xml_element *))
10547 (scope_level::scope_level(scope_level&&)): New.
10548 (scope_level::~scope_level): New.
10549 (scope_level_s): Delete.
10550 (gdb_xml_parser::scopes): Now a std::vector.
10551 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10552 Use std::vector.
10553 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10554 scope cleanup code.
10555 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10556 of the scopes member. Use std::vector::emplace_back.
10557
10558 2017-04-18 Pedro Alves <palves@redhat.com>
10559
10560 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10561 a bool.
10562 (gdb_xml_end_element): Change type of first parameter.
10563 (gdb_xml_cleanup): Rename to ...
10564 (gdb_xml_parser::~gdb_xml_parser): ... this.
10565 (gdb_xml_create_parser_and_cleanup): Delete with ...
10566 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10567 to this new ctor.
10568 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10569 using gdb_xml_create_parser_and_cleanup.
10570 (xinclude_parsing_data): Add ctor/dtor.
10571 (xml_xinclude_cleanup): Delete.
10572 (xml_process_xincludes): Create a local xinclude_parsing_data
10573 instead of heap-allocating one. Create a local gdb_xml_parser
10574 instead of heap-allocating one with
10575 gdb_xml_create_parser_and_cleanup.
10576
10577 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10578
10579 PR threads/20743
10580 * fbsd-nat.c (resume_one_thread_cb): Remove.
10581 (resume_all_threads_cb): Remove.
10582 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10583 iterate_over_threads.
10584
10585 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10586
10587 * NEWS: Create a new section for the next release branch.
10588 Rename the section of the current branch, now that it has
10589 been cut.
10590
10591 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10592
10593 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10594 * version.in: Bump version to 8.0.50.DATE-git.
10595
10596 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10597
10598 PR gdb/21385
10599 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10600 independently of the host, and fix build breakage on Cygwin.
10601
10602 2017-04-13 Pedro Alves <palves@redhat.com>
10603
10604 * inferior.c (free_inferior): Convert to ...
10605 (inferior::~inferior): ... this dtor.
10606 (inferior::inferior): New ctor, factored out from ...
10607 (add_inferior_silent): ... here. Allocate the inferior with a new
10608 expression.
10609 (delete_inferior): Call delete instead of free_inferior.
10610 * inferior.h (gdb_environ, continuation): Forward declare.
10611 (inferior): Now a class. Add in-class initialization to all
10612 members. Make boolean fields bool, except 'detaching'.
10613 (inferior::inferior): New explicit ctor.
10614 (inferior::~inferior): New.
10615
10616 2017-04-13 Pedro Alves <palves@redhat.com>
10617
10618 * inferior.c (init_inferior_list): Delete.
10619 * inferior.h (init_inferior_list): Delete.
10620
10621 2017-04-13 Pedro Alves <palves@redhat.com>
10622
10623 PR threads/13217
10624 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10625 (top level): Call it twice, with different thread sets.
10626
10627 2017-04-13 Pedro Alves <palves@redhat.com>
10628
10629 * thread.c: Include <algorithm>.
10630 (thread_array_cleanup): Delete.
10631 (scoped_inc_dec_ref): New class.
10632 (live_threads_count): New function.
10633 (set_thread_refcount): Delete.
10634 (tp_array_compar_ascending): Now a bool.
10635 (tp_array_compar): Convert to a std::sort comparison function.
10636 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10637 and live_threads_count.
10638
10639 2017-04-13 Pedro Alves <palves@redhat.com>
10640
10641 * infrun.c (follow_fork_inferior): Also switch the current
10642 inferior.
10643
10644 2017-04-13 Pedro Alves <palves@redhat.com>
10645
10646 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10647 before calling create_internal_breakpoint.
10648
10649 2017-04-13 Pedro Alves <palves@redhat.com>
10650
10651 * fork-child.c (execv_argv): New class.
10652 (breakup_args): Refactored as ...
10653 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10654 Copy arguments to storage and replace separators with NULL
10655 terminators in place.
10656 (escape_bang_in_quoted_argument): Adjust to return bool.
10657 (execv_argv::execv_argv): New ctor.
10658 (execv_argv::init_for_shell): New method, factored out from
10659 fork_inferior. Don't strdup strings into the vector.
10660 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10661 Remove free_vector_argv call.
10662
10663 2017-04-13 Yao Qi <yao.qi@linaro.org>
10664
10665 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10666 tdep->rx_psw_type.
10667
10668 2017-04-13 Yao Qi <yao.qi@linaro.org>
10669
10670 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10671 * rx-tdep.c (rx_gdbarch_init): Likewise.
10672
10673 2017-04-13 Pedro Alves <palves@redhat.com>
10674
10675 * breakpoint.h (struct breakpoint): Reindent.
10676
10677 2017-04-13 Pedro Alves <palves@redhat.com>
10678
10679 * breakpoint.c (bp_location): Rename to ...
10680 (bp_locations): ... this. All references updated.
10681 (bp_location_count): Rename to ...
10682 (bp_locations_count): ... this. All references updated.
10683 (bp_location_placed_address_before_address_max): Rename to ...
10684 (bp_locations_placed_address_before_address_max): ... this. All
10685 references updated.
10686 (bp_location_shadow_len_after_address_max): Rename to ...
10687 (bp_locations_shadow_len_after_address_max): ... this. All
10688 references updated.
10689 (bp_location_compare_addrs): Rename to ...
10690 (bp_locations_compare_addrs): ... this. All references updated.
10691 (bp_location_compare):Rename to ...
10692 (bp_locations_compare): ... this. All references updated.
10693 (bp_location_target_extensions_update): Rename to ...
10694 (bp_locations_target_extensions_update): ... this. All references
10695 updated.
10696
10697 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10698
10699 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10700 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10701 'sgtty.h'.
10702 * common/gdb_termios.h: New file, with parts of "terminal.h".
10703 * inflow.c: Include "gdb_termios.h".
10704 * ser-unix.c: Include "gdb_termios.h".
10705 * terminal.h: Move terminal-related defines to
10706 "common/gdb_termios.h".
10707
10708 2017-04-12 Tom Tromey <tom@tromey.com>
10709
10710 * probe.c (parse_probes): Update.
10711 * location.h (delete_event_location): Don't declare.
10712 (event_location_deleter::operator()): Update.
10713 * location.c (event_location_deleter::operator()): Rename from
10714 delete_event_location.
10715 * linespec.h (linespec_result) <location>: Change type to
10716 event_location_up.
10717 * linespec.c (canonicalize_linespec, event_location_to_sals)
10718 (decode_objc): Update.
10719 (linespec_result): Don't call delete_event_location.
10720 * breakpoint.c (create_breakpoints_sal)
10721 (bkpt_probe_create_sals_from_location)
10722 (strace_marker_create_sals_from_location): Update.
10723
10724 2017-04-12 Tom Tromey <tom@tromey.com>
10725
10726 * linespec.h (struct linespec_result): Add constructor and
10727 destructor.
10728 (init_linespec_result, destroy_linespec_result)
10729 (make_cleanup_destroy_linespec_result): Don't declare.
10730 * linespec.c (init_linespec_result): Remove.
10731 (linespec_result::~linespec_result): Rename from
10732 destroy_linespec_result. Update.
10733 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10734 Remove.
10735 * breakpoint.c (create_breakpoint, break_range_command)
10736 (decode_location_default): Update.
10737 * ax-gdb.c (agent_command_1): Update.
10738
10739 2017-04-12 Tom Tromey <tom@tromey.com>
10740
10741 * remote.c (remote_download_tracepoint): Update.
10742 * python/py-breakpoint.c (bppy_get_location): Update.
10743 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10744 (gdbscm_breakpoint_location): Update.
10745 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10746 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10747 Change type to event_location_up.
10748 * breakpoint.c (create_overlay_event_breakpoint)
10749 (create_longjmp_master_breakpoint)
10750 (create_std_terminate_master_breakpoint)
10751 (create_exception_master_breakpoint)
10752 (breakpoint_event_location_empty_p, print_breakpoint_location)
10753 (print_one_breakpoint_location, create_thread_event_breakpoint)
10754 (init_breakpoint_sal, create_breakpoint)
10755 (print_recreate_ranged_breakpoint, break_range_command)
10756 (init_ada_exception_breakpoint, say_where): Update.
10757 (base_breakpoint_dtor): Don't call delete_event_location.
10758 (bkpt_print_recreate, tracepoint_print_recreate)
10759 (dprintf_print_recreate, update_static_tracepoint)
10760 (breakpoint_re_set_default): Update.
10761
10762 2017-04-12 Tom Tromey <tom@tromey.com>
10763
10764 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10765 type of "to_do". Update.
10766 (compute_stack_depth): Use std::vector.
10767
10768 2017-04-12 Tom Tromey <tom@tromey.com>
10769
10770 * printcmd.c (find_instruction_backward): Use std::vector.
10771
10772 2017-04-12 Tom Tromey <tom@tromey.com>
10773
10774 * symfile.c (objfilep): Remove typedef.
10775 (reread_symbols): Use a std::vector.
10776
10777 2017-04-12 Tom Tromey <tom@tromey.com>
10778
10779 * mi/mi-main.c (exec_direction_forward): Remove.
10780 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10781 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10782 scoped_restore.
10783 * guile/guile.c (guile_repl_command, guile_command)
10784 (gdbscm_execute_gdb_command): Use scoped_restore.
10785 * go-exp.y (go_parse): Use scoped_restore.
10786 * d-exp.y (d_parse): Use scoped_restore.
10787 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10788 * c-exp.y (c_parse): Use scoped_restore.
10789
10790 2017-04-12 Tom Tromey <tom@tromey.com>
10791
10792 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10793 (mi_parse): Update return type.
10794 (mi_parse_free): Remove.
10795 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10796 (mi_parse::~mi_parse): Rename from mi_parse_free.
10797 (mi_parse_cleanup): Remove.
10798 (mi_parse): Return a unique_ptr. Use new.
10799 * mi/mi-main.c (mi_execute_command): Update.
10800
10801 2017-04-12 Tom Tromey <tom@tromey.com>
10802
10803 * location.c (explicit_location_lex_one): Return a
10804 unique_xmalloc_ptr.
10805 (string_to_explicit_location): Update. Remove cleanups.
10806
10807 2017-04-12 Tom Tromey <tom@tromey.com>
10808
10809 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10810 (compare_value_and_voffset): Change type. Update.
10811 (compute_vtable_size): Change type of "offset_vec".
10812 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10813 (gnuv3_get_typeid): Remove extraneous declaration.
10814
10815 2017-04-12 Tom Tromey <tom@tromey.com>
10816
10817 * charset.h (wchar_iterator): Fix comment.
10818
10819 2017-04-12 Tom Tromey <tom@tromey.com>
10820
10821 * charset.c (iconv_wrapper): New class.
10822 (cleanup_iconv): Remove.
10823 (convert_between_encodings): Use it.
10824
10825 2017-04-12 Tom Tromey <tom@tromey.com>
10826
10827 * symfile.h (increment_reading_symtab): Update type.
10828 * symfile.c (decrement_reading_symtab): Remove.
10829 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10830 * psymtab.c (psymtab_to_symtab): Update.
10831 * dwarf2read.c (dw2_instantiate_symtab): Update.
10832
10833 2017-04-12 Tom Tromey <tom@tromey.com>
10834
10835 * jit.c (struct jit_reader): Declare separately. Add constructor
10836 and destructor. Change type of "handle".
10837 (loaded_jit_reader): Define separately.
10838 (jit_reader_load): Update. New "new".
10839 (jit_reader_unload_command): Use "delete".
10840 * gdb-dlfcn.h (struct dlclose_deleter): New.
10841 (gdb_dlhandle_up): New typedef.
10842 (gdb_dlopen, gdb_dlsym): Update types.
10843 (gdb_dlclose): Remove.
10844 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10845 (gdb_dlsym): Change type of "handle".
10846 (make_cleanup_dlclose): Remove.
10847 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10848 * compile/compile-c-support.c (load_libcc): Update.
10849
10850 2017-04-12 Tom Tromey <tom@tromey.com>
10851
10852 * symtab.h (find_pcs_for_symtab_line): Change return type.
10853 * symtab.c (find_pcs_for_symtab_line): Change return type.
10854 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10855 type of "vec". Update.
10856 (ltpy_get_pcs_for_line): Update.
10857 * linespec.c (decode_digits_ordinary): Update.
10858
10859 2017-04-12 Tom Tromey <tom@tromey.com>
10860
10861 * tracepoint.c (actions_command): Update.
10862 * python/python.c (python_command, python_interactive_command):
10863 Update.
10864 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10865 * guile/guile.c (guile_command): Update.
10866 * defs.h (read_command_lines, read_command_lines_1): Return
10867 command_line_up.
10868 (command_lines_deleter): New struct.
10869 (command_line_up): New typedef.
10870 * compile/compile.c (compile_code_command)
10871 (compile_print_command): Update.
10872 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10873 command_line_up.
10874 (make_cleanup_free_command_lines): Remove.
10875 * cli/cli-script.c (get_command_line, read_command_lines_1)
10876 (copy_command_lines): Return command_line_up.
10877 (while_command, if_command, read_command_lines, define_command)
10878 (document_command): Update.
10879 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10880 Remove.
10881 * breakpoint.h (breakpoint_set_commands): Change type of
10882 "commands".
10883 * breakpoint.c (breakpoint_set_commands): Change type of
10884 "commands". Update.
10885 (do_map_commands_command, update_dprintf_command_list)
10886 (create_tracepoint_from_upload): Update.
10887
10888 2017-04-12 Tom Tromey <tom@tromey.com>
10889
10890 * tracepoint.c (scope_info): Update.
10891 * spu-tdep.c (spu_catch_start): Update.
10892 * python/python.c (gdbpy_decode_line): Update.
10893 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10894 * python/py-breakpoint.c (bppy_init): Update.
10895 * probe.c (parse_probes): Update.
10896 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10897 * location.h (event_location_deleter): New struct.
10898 (event_location_up): New typedef.
10899 (new_linespec_location, new_address_location, new_probe_location)
10900 (new_explicit_location, copy_event_location)
10901 (string_to_event_location, string_to_event_location_basic)
10902 (string_to_explicit_location): Update return type.
10903 (make_cleanup_delete_event_location): Remove.
10904 * location.c (new_linespec_location, new_address_location)
10905 (new_probe_location, new_explicit_location, copy_event_location):
10906 Return event_location_up.
10907 (delete_event_location_cleanup)
10908 (make_cleanup_delete_event_location): Remove.
10909 (string_to_explicit_location, string_to_event_location_basic)
10910 (string_to_event_location): Return event_location_up.
10911 * linespec.c (canonicalize_linespec, event_location_to_sals)
10912 (decode_line_with_current_source)
10913 (decode_line_with_last_displayed, decode_objc): Update.
10914 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10915 * completer.c (location_completer): Update.
10916 * cli/cli-cmds.c (edit_command, list_command): Update.
10917 * breakpoint.c (create_overlay_event_breakpoint)
10918 (create_longjmp_master_breakpoint)
10919 (create_std_terminate_master_breakpoint)
10920 (create_exception_master_breakpoint)
10921 (create_thread_event_breakpoint): Update.
10922 (init_breakpoint_sal): Update. Remove some dead code.
10923 (create_breakpoint_sal): Change type of "location". Update.
10924 (create_breakpoints_sal, create_breakpoint, break_command_1)
10925 (dprintf_command, break_range_command, until_break_command)
10926 (init_ada_exception_breakpoint)
10927 (strace_marker_create_sals_from_location)
10928 (update_static_tracepoint, trace_command, ftrace_command)
10929 (strace_command, create_tracepoint_from_upload): Update.
10930 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10931 * ax-gdb.c (agent_command_1): Update.
10932
10933 2017-04-12 Pedro Alves <palves@redhat.com>
10934
10935 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10936 * configure.tgt: Handle i[34567]86-*-go32* and
10937 i[34567]86-*-msdosdjgpp*.
10938 * i386-tdep.c (i386_svr4_reg_to_regnum):
10939 Make extern.
10940 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10941 i386-go32-tdep.c.
10942 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10943 * i386-go32-tdep.c: New file.
10944 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10945 declarations.
10946
10947 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10948
10949 * aix-thread.c (pd_status2str): Change return type to const char *.
10950
10951 2017-04-12 Pedro Alves <palves@redhat.com>
10952
10953 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10954 calls to set_gdbarch_gnu_triplet_regexp.
10955
10956 2017-04-12 Pedro Alves <palves@redhat.com>
10957
10958 PR gdb/21323
10959 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10960 New enum value.
10961 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10962 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10963 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10964 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10965 * gdbarch.h, gdbarch.c: Regenerate.
10966 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10967 gdbarch_wchar_bit and gdbarch_wchar_signed.
10968 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10969 * arm-tdep.c (arm_gdbarch_init): Likewise.
10970 * avr-tdep.c (avr_gdbarch_init): Likewise.
10971 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10972 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10973 * i386-tdep.c (i386_go32_init_abi): Likewise.
10974 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10975 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10976 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10977 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10978 * sh-tdep.c (sh_gdbarch_init): Likewise.
10979 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10980 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10981 * windows-tdep.c (windows_init_abi): Likewise.
10982 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10983
10984 2017-04-12 Pedro Alves <palves@redhat.com>
10985
10986 PR c++/21323
10987 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10988 cplus_primitive_type_char32_t>: New enum values.
10989 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10990 and cplus_primitive_type_char32_t.
10991 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10992 32, use the archtecture's built-in type for char16_t and char32_t,
10993 respectively. Otherwise, fallback to init_integer_type as before,
10994 but make the type unsigned, and issue a complaint.
10995 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10996
10997 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10998
10999 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11000 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11001
11002 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11003
11004 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11005 'const char *'.
11006
11007 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11008
11009 * common/common-utils.c (free_vector_argv): New function.
11010 * common/common-utils.h: Include <vector>.
11011 (free_vector_argv): New prototype.
11012 * darwin-nat.c (darwin_create_inferior): Rewrite function
11013 prototype in order to constify "exec_file" and accept a
11014 "std::string" for "allargs".
11015 * fork-child.c: Include <vector>.
11016 (breakup_args): Rewrite function, using C++.
11017 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11018 and accept "std::string" for "allargs". Update the code to
11019 calculate "argv" based on "allargs". Update calls to "exec_fun"
11020 and "execvp".
11021 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11022 order to constify "exec_file" and accept a "std::string" for
11023 "allargs".
11024 * go32-nat.c (go32_create_inferior): Likewise.
11025 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11026 * infcmd.c (run_command_1): Constify "exec_file". Use
11027 "std::string" for inferior arguments.
11028 * inferior.h (fork_inferior): Update prototype.
11029 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11030 prototype in order to constify "exec_file" and accept a
11031 "std::string" for "allargs".
11032 * nto-procfs.c (procfs_create_inferior): Likewise.
11033 * procfs.c (procfs_create_inferior): Likewise.
11034 * remote-sim.c (gdbsim_create_inferior): Likewise.
11035 * remote.c (extended_remote_run): Update code to accept
11036 "std::string" as argument.
11037 (extended_remote_create_inferior): Rewrite function prototype in
11038 order to constify "exec_file" and accept a "std::string" for
11039 "allargs".
11040 * rs6000-nat.c (super_create_inferior): Likewise.
11041 (rs6000_create_inferior): Likewise.
11042 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11043 * windows-nat.c (windows_create_inferior): Likewise.
11044
11045 2017-04-11 Pedro Alves <palves@redhat.com>
11046
11047 * thread.c: Fix whitespace throughout.
11048
11049 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11050
11051 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11052
11053 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11054
11055 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11056
11057 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11058
11059 PR gdb/21364
11060 * osdata.c (info_osdata): Check if 'type' is an empty string
11061 instead of NULL.
11062
11063 2017-04-10 Pedro Alves <palves@redhat.com>
11064
11065 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11066 (ptid_to_global_thread_id, in_thread_list)
11067 (do_captured_list_thread_ids, set_resumed, set_running)
11068 (set_executing, set_stop_requested, finish_thread_state)
11069 (validate_registers_access, can_access_registers_ptid)
11070 (print_thread_info_1, switch_to_thread)
11071 (do_restore_current_thread_cleanup)
11072 (make_cleanup_restore_current_thread, thread_command)
11073 (thread_name_command): Use operator== instead of ptid_equal.
11074
11075 2017-04-10 Pedro Alves <palves@redhat.com>
11076
11077 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11078 (current_thread_cleanup_chain): Delete.
11079 (restore_current_thread_cleanup_dtor)
11080 (make_cleanup_restore_current_thread): Remove references to
11081 current_thread_cleanup_chain.
11082
11083 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11084
11085 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11086 REG_UNKNOWN.
11087
11088 2017-04-10 Yao Qi <yao.qi@linaro.org>
11089
11090 PR gdb/19942
11091 * gdbthread.h (thread_info::deletable): New method.
11092 (thread_info::incref): New method.
11093 (thread_info::decref): New method.
11094 (thread_info::refcount): Move it to private.
11095 * infrun.c (save_stop_context): Call inc_refcount.
11096 (release_stop_context_cleanup): Likewise.
11097 * thread.c (set_thread_exited): New function.
11098 (init_thread_list): Delete "tp" only it is deletable, otherwise
11099 call set_thread_exited.
11100 (delete_thread_1): Call set_thread_exited.
11101 (current_thread_cleanup) <inferior_pid>: Remove.
11102 <thread>: New field.
11103 (restore_current_thread_ptid_changed): Removed.
11104 (do_restore_current_thread_cleanup): Adjust.
11105 (restore_current_thread_cleanup_dtor): Don't call
11106 find_thread_ptid.
11107 (set_thread_refcount): Use dec_refcount.
11108 (make_cleanup_restore_current_thread): Adjust.
11109 (thread_apply_all_command): Call inc_refcount.
11110 (_initialize_thread): Don't call
11111 observer_attach_thread_ptid_changed.
11112
11113 2017-04-10 Yao Qi <yao.qi@linaro.org>
11114
11115 * thread.c (delete_thread_1): Hoist code on marking thread as
11116 exited.
11117
11118 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11119
11120 * windows-nat.c (windows_detach): Initialize ptid with
11121 minus_one_ptid.
11122
11123 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11124
11125 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11126
11127 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11128
11129 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11130 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11131 (bfin_pseudo_register_write): Likewise
11132
11133 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11134
11135 * common/ptid.h (struct ptid): Change to...
11136 (class ptid_t): ... this.
11137 <ptid_t>: New constructors.
11138 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11139 matches>: New methods.
11140 <make_null, make_minus_one>: New static methods.
11141 <pid>: Rename to...
11142 <m_pid>: ...this.
11143 <lwp>: Rename to...
11144 <m_lwp>: ...this.
11145 <tid>: Rename to...
11146 <m_tid>: ...this.
11147 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11148 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11149 as references, move comment to class ptid_t.
11150 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11151 ptid_t static methods.
11152 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11153 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11154 Take ptid arguments as references, implement using ptid_t methods.
11155 * unittests/ptid-selftests.c: New file.
11156 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11157 unittests/ptid-selftests.c.
11158 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11159
11160 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11161
11162 * python/python.c (python_run_simple_file): Cast mode literal to
11163 non-const char pointer as expected by PyFile_FromString.
11164
11165 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11166
11167 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11168 minus_one_ptid and null_ptid.
11169
11170 2017-04-05 Pedro Alves <palves@redhat.com>
11171
11172 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11173 * configure: Regenerate.
11174
11175 2017-04-05 Pedro Alves <palves@redhat.com>
11176
11177 * ada-exp.y (yyerror): Constify.
11178 * ada-lang.c (bound_name, get_selections)
11179 (ada_variant_discrim_type)
11180 (ada_variant_discrim_name, ada_value_struct_elt)
11181 (ada_lookup_struct_elt_type, is_unchecked_variant)
11182 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11183 (catch_ada_exception_command_split)
11184 (catch_ada_assert_command_split, catch_assert_command)
11185 (ada_op_name): Constify.
11186 * ada-lang.h (ada_yyerror, get_selections)
11187 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11188 * arc-tdep.c (arc_print_frame_cache): Constify.
11189 * arm-tdep.c (arm_skip_stub): Constify.
11190 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11191 (gen_aggregate_elt_ref): Constify.
11192 * bcache.c (print_bcache_statistics): Constify.
11193 * bcache.h (print_bcache_statistics): Constify.
11194 * break-catch-throw.c (catch_exception_command_1):
11195 * breakpoint.c (struct ep_type_description::description):
11196 Constify.
11197 (add_solib_catchpoint): Constify.
11198 (catch_fork_command_1): Add cast.
11199 (add_catch_command): Constify.
11200 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11201 Constify.
11202 * bsd-uthread.c (bsd_uthread_state): Constify.
11203 * buildsym.c (patch_subfile_names): Constify.
11204 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11205 Constify.
11206 * c-exp.y (yyerror): Constify.
11207 (token::oper): Constify.
11208 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11209 * c-varobj.c (cplus_describe_child): Constify.
11210 * charset.c (find_charset_names): Add cast.
11211 (find_charset_names): Constify array and add const_cast.
11212 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11213 (edit_command): Constify.
11214 * cli/cli-decode.c (lookup_cmd): Constify.
11215 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11216 Constify.
11217 (struct dump_context): Constify.
11218 (add_dump_command, restore_command): Constify.
11219 * cli/cli-script.c (get_command_line): Constify.
11220 * cli/cli-script.h (get_command_line): Constify.
11221 * cli/cli-utils.c (check_for_argument): Constify.
11222 * cli/cli-utils.h (check_for_argument): Constify.
11223 * coff-pe-read.c (struct read_pe_section_data): Constify.
11224 * command.h (lookup_cmd): Constify.
11225 * common/print-utils.c (decimal2str): Constify.
11226 * completer.c (gdb_print_filename): Constify.
11227 * corefile.c (set_gnutarget): Constify.
11228 * cp-name-parser.y (yyerror): Constify.
11229 * cp-valprint.c (cp_print_class_member): Constify.
11230 * cris-tdep.c (cris_register_name, crisv32_register_name):
11231 Constify.
11232 * d-exp.y (yyerror): Constify.
11233 (struct token::oper): Constify.
11234 * d-lang.h (d_yyerror): Constify.
11235 * dbxread.c (struct header_file_location::name): Constify.
11236 (add_old_header_file, add_new_header_file, last_function_name)
11237 (dbx_next_symbol_text, add_bincl_to_list)
11238 (find_corresponding_bincl_psymtab, set_namestring)
11239 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11240 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11241 * defs.h (command_line_input, print_address_symbolic)
11242 (deprecated_readline_begin_hook): Constify.
11243 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11244 Constify.
11245 * event-top.c (handle_line_of_input): Constify and add cast.
11246 * exceptions.c (catch_errors): Constify.
11247 * exceptions.h (catch_errors): Constify.
11248 * expprint.c (print_subexp_standard, op_string, op_name)
11249 (op_name_standard, dump_raw_expression, dump_raw_expression):
11250 * expression.h (op_name, op_string, dump_raw_expression):
11251 Constify.
11252 * f-exp.y (yyerror): Constify.
11253 (struct token::oper): Constify.
11254 (struct f77_boolean_val::name): Constify.
11255 * f-lang.c (f_word_break_characters): Constify.
11256 * f-lang.h (f_yyerror): Constify.
11257 * fork-child.c (fork_inferior): Add cast.
11258 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11259 (new_variant): Constify.
11260 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11261 * gdbarch.c: Regenerate.
11262 * gdbcore.h (set_gnutarget): Constify.
11263 * go-exp.y (yyerror): Constify.
11264 (token::oper): Constify.
11265 * go-lang.h (go_yyerror): Constify.
11266 * go32-nat.c (go32_sysinfo): Constify.
11267 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11268 * guile/scm-cmd.c (cmdscm_function): Constify.
11269 * guile/scm-param.c (pascm_param_value): Constify.
11270 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11271 (h8300sx_register_name): Constify.
11272 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11273 Constify.
11274 * ia64-tdep.c (ia64_register_names): Constify.
11275 * infcmd.c (construct_inferior_arguments): Constify.
11276 (path_command, attach_post_wait): Constify.
11277 * language.c (show_range_command, show_case_command)
11278 (unk_lang_error): Constify.
11279 * language.h (language_defn::la_error)
11280 (language_defn::la_name_of_this): Constify.
11281 * linespec.c (decode_line_2): Constify.
11282 * linux-thread-db.c (thread_db_err_str): Constify.
11283 * lm32-tdep.c (lm32_register_name): Constify.
11284 * m2-exp.y (yyerror): Constify.
11285 * m2-lang.h (m2_yyerror): Constify.
11286 * m32r-tdep.c (m32r_register_names): Constify and make static.
11287 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11288 * m88k-tdep.c (m88k_register_name): Constify.
11289 * macroexp.c (appendmem): Constify.
11290 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11291 (upgrade_type, parse_external, parse_partial_symbols)
11292 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11293 (new_symbol): Constify.
11294 * memattr.c (mem_info_command): Constify.
11295 * mep-tdep.c (register_name_from_keyword): Constify.
11296 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11297 Constify.
11298 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11299 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11300 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11301 cast.
11302 (mi_execute_async_cli_command): Constify.
11303 * mips-tdep.c (mips_register_name): Constify.
11304 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11305 (am33_register_name, am33_2_register_name)
11306 * moxie-tdep.c (moxie_register_names): Constify.
11307 * nat/linux-osdata.c (osdata_type): Constify fields.
11308 * nto-tdep.c (nto_parse_redirection): Constify.
11309 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11310 (lookup_child_selector): Constify.
11311 (objc_methcall::name): Constify.
11312 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11313 (lookup_struct_typedef): Constify.
11314 * objfiles.c (pc_in_section): Constify.
11315 * objfiles.h (pc_in_section): Constify.
11316 * p-exp.y (struct token::oper): Constify.
11317 (yyerror): Constify.
11318 * p-lang.h (pascal_yyerror): Constify.
11319 * parser-defs.h (op_name_standard): Constify.
11320 (op_print::string): Constify.
11321 (exp_descriptor::op_name): Constify.
11322 * printcmd.c (print_address_symbolic): Constify.
11323 * psymtab.c (print_partial_symbols): Constify.
11324 * python/py-breakpoint.c (stop_func): Constify.
11325 (bppy_get_expression): Constify.
11326 * python/py-cmd.c (cmdpy_completer::name): Constify.
11327 (cmdpy_function): Constify.
11328 * python/py-event.c (evpy_add_attribute)
11329 (gdbpy_initialize_event_generic): Constify.
11330 * python/py-event.h (evpy_add_attribute)
11331 (gdbpy_initialize_event_generic): Constify.
11332 * python/py-evts.c (add_new_registry): Constify.
11333 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11334 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11335 * python/py-inferior.c (get_buffer): Add cast.
11336 * python/py-param.c (parm_constant::name): Constify.
11337 * python/py-unwind.c (fprint_frame_id): Constify.
11338 * python/python.c (gdbpy_parameter_value): Constify.
11339 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11340 * remote.c (memory_packet_config::name): Constify.
11341 (show_packet_config_cmd, remote_write_bytes)
11342 (remote_buffer_add_string):
11343 * reverse.c (exec_reverse_once): Constify.
11344 * rs6000-tdep.c (variant::name, variant::description): Constify.
11345 * rust-exp.y (rustyyerror): Constify.
11346 * rust-lang.c (rust_op_name): Constify.
11347 * rust-lang.h (rustyyerror): Constify.
11348 * serial.h (serial_ops::name): Constify.
11349 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11350 (sh_sh3e_register_name, sh_sh2e_register_name)
11351 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11352 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11353 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11354 (sh_sh4al_dsp_register_name): Constify.
11355 * sh64-tdep.c (sh64_register_name): Constify.
11356 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11357 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11358 * stabsread.c (patch_block_stabs, read_type_number)
11359 (ref_map::stabs, ref_add, process_reference)
11360 (symbol_reference_defined, define_symbol, define_symbol)
11361 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11362 (read_one_struct_field, read_struct_fields, read_baseclasses)
11363 (read_tilde_fields, read_struct_type, read_array_type)
11364 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11365 (read_huge_number, read_range_type, read_args, common_block_start)
11366 (find_name_end): Constify.
11367 * stabsread.h (common_block_start, define_symbol)
11368 (process_one_symbol, symbol_reference_defined, ref_add):
11369 * symfile.c (get_section_index, add_symbol_file_command):
11370 * symfile.h (get_section_index): Constify.
11371 * target-descriptions.c (tdesc_type::name): Constify.
11372 (tdesc_free_type): Add cast.
11373 * target.c (find_default_run_target):
11374 (add_deprecated_target_alias, find_default_run_target)
11375 (target_announce_detach): Constify.
11376 (do_option): Constify.
11377 * target.h (add_deprecated_target_alias): Constify.
11378 * thread.c (print_thread_info_1): Constify.
11379 * top.c (deprecated_readline_begin_hook, command_line_input):
11380 Constify.
11381 (init_main): Add casts.
11382 * top.h (handle_line_of_input): Constify.
11383 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11384 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11385 (tfind_command): Rename to ...
11386 (tfind_command_1): ... this and constify.
11387 (tfind_command): New function.
11388 (tfind_end_command, tfind_start_command): Adjust.
11389 (encode_source_string): Constify.
11390 * tracepoint.h (encode_source_string): Constify.
11391 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11392 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11393 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11394 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11395 * tui/tui-win.c (parse_scrolling_args): Constify.
11396 * tui/tui-windata.c (tui_erase_data_content): Constify.
11397 * tui/tui-windata.h (tui_erase_data_content): Constify.
11398 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11399 * tui/tui.c (tui_enable): Add cast.
11400 * utils.c (defaulted_query): Constify.
11401 (init_page_info): Add cast.
11402 (puts_debug, subset_compare): Constify.
11403 * utils.h (subset_compare): Constify.
11404 * varobj.c (varobj_format_string): Constify.
11405 * varobj.h (varobj_format_string): Constify.
11406 * vax-tdep.c (vax_register_name): Constify.
11407 * windows-nat.c (windows_detach): Constify.
11408 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11409 * xml-support.c (gdb_xml_end_element): Constify.
11410 * xml-tdesc.c (tdesc_start_reg): Constify.
11411 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11412 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11413 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11414
11415 2017-04-05 Pedro Alves <palves@redhat.com>
11416
11417 * proc-api.c (struct trans): Constify.
11418 (procfs_note): Constify.
11419 * proc-events.c (struct trans, syscall_table):
11420 * proc-flags.c (struct trans): Constify.
11421 * proc-utils.h (procfs_note): Constify.
11422 * proc-why.c (struct trans): Constify.
11423 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11424 (procfs_detach): Constify.
11425 * sol-thread.c (struct string_map): Constify.
11426 (td_err_string, td_state_string): Constify.
11427
11428 2017-04-05 Pedro Alves <palves@redhat.com>
11429
11430 * proc-api.c (procfs_filename): Don't initialize
11431 procfs_filename.
11432 (prepare_to_trace): Assume procfs_filename is non-NULL.
11433 (_initialize_proc_api): Give procfs_filename a default value here.
11434
11435 2017-04-05 Pedro Alves <palves@redhat.com>
11436
11437 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11438 'cond_string' parameter.
11439 (extract_exception_regexp): Constify 'string' parameter.
11440 (catch_exception_command_1): Constify.
11441 * breakpoint.c (init_catchpoint)
11442 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11443 parameter.
11444 (ep_parse_optional_if_clause, catch_fork_command_1)
11445 (catch_exec_command_1): Constify.
11446 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11447 parameter.
11448 (ep_parse_optional_if_clause): Constify.
11449 * cli/cli-utils.c (remove_trailing_whitespace)
11450 (check_for_argument): Constify.
11451 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11452 non-const overload.
11453 (check_for_argument): Likewise.
11454
11455 2017-04-05 Pedro Alves <palves@redhat.com>
11456
11457 * event-top.c (command_line_handler): Add cast to execute_command
11458 call.
11459 * record-btrace.c (cmd_record_btrace_bts_start)
11460 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11461 (cmd_record_btrace_start): Add cast to execute_command call.
11462 * record-full.c (record_full_goto_insn):
11463 * record.c (record_start, record_stop): Add cast to
11464 execute_command_to_string calls.
11465 (cmd_record_start): Add cast to execute_command calls.
11466
11467 2017-04-05 Pedro Alves <palves@redhat.com>
11468
11469 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11470 static inline function.
11471 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11472 array and use gdb_PyArg_ParseTupleAndKeywords.
11473 * python/py-cmd.c (cmdpy_init): Likewise.
11474 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11475 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11476 (infpy_search_memory): Likewise.
11477 * python/py-objfile.c (objfpy_add_separate_debug_file)
11478 (gdbpy_lookup_objfile): Likewise.
11479 * python/py-symbol.c (gdbpy_lookup_symbol)
11480 (gdbpy_lookup_global_symbol): Likewise.
11481 * python/py-type.c (gdbpy_lookup_type): Likewise.
11482 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11483 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11484 Likewise.
11485
11486 2017-04-05 Pedro Alves <palves@redhat.com>
11487
11488 * python/python-internal.h (gdb_PyGetSetDef): New type.
11489 * python/py-block.c (block_object_getset)
11490 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11491 * python/py-event.c (event_object_getset)
11492 (finish_breakpoint_object_getset): Likewise.
11493 * python/py-inferior.c (inferior_object_getset): Likewise.
11494 * python/py-infthread.c (thread_object_getset): Likewise.
11495 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11496 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11497 * python/py-objfile.c (objfile_getset): Likewise.
11498 * python/py-progspace.c (pspace_getset): Likewise.
11499 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11500 Likewise.
11501 * python/py-record.c (recpy_record_getset): Likewise.
11502 * python/py-symbol.c (symbol_object_getset): Likewise.
11503 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11504 Likewise.
11505 * python/py-type.c (type_object_getset, field_object_getset):
11506 Likewise.
11507 * python/py-value.c (value_object_getset): Likewise.
11508
11509 2017-04-05 Pedro Alves <palves@redhat.com>
11510
11511 * python/python-internal.h (gdb_PyObject_CallMethod)
11512 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11513 New functions.
11514 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11515 (PySys_GetObject, PySys_SetPath): New macros.
11516
11517 2017-04-05 Pedro Alves <palves@redhat.com>
11518
11519 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11520 info_osdata_command.
11521 * osdata.c (info_osdata_command): Rename to ...
11522 (info_osdata): ... this. Constify 'type' parameter, and remove
11523 the 'from_tty' parameter. Accept NULL TYPE.
11524 (info_osdata_command): New function.
11525 * osdata.h (info_osdata_command): Remove declaration.
11526 (info_osdata): New declaration.
11527
11528 2017-04-05 Pedro Alves <palves@redhat.com>
11529
11530 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11531 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11532 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11533 parameter.
11534 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11535 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11536 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11537 parameter.
11538 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11539 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11540 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11541 (mi_cmd_file_list_exec_source_files)
11542 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11543 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11544 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11545 parameter.
11546 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11547 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11548 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11549 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11550 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11551 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11552 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11553 'command' parameter.
11554 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11555 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11556 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11557 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11558 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11559 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11560 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11561 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11562 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11563 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11564 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11565 parameter.
11566 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11567 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11568 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11569 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11570 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11571 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11572 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11573 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11574 (mi_cmd_data_list_changed_registers)
11575 (mi_cmd_data_write_register_values)
11576 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11577 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11578 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11579 (mi_cmd_list_features, mi_cmd_list_target_features)
11580 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11581 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11582 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11583 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11584 (mi_cmd_trace_frame_collected): Constify 'command'
11585 parameter.
11586 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11587 'command' parameter.
11588
11589 2017-04-05 Pedro Alves <palves@redhat.com>
11590
11591 * ada-lang.c (ada_completer_word_break_characters): Now a const
11592 array.
11593 (ada_get_gdb_completer_word_break_characters): Constify.
11594 * completer.c (gdb_completer_command_word_break_characters)
11595 (gdb_completer_file_name_break_characters)
11596 (gdb_completer_quote_characters): Now const arrays.
11597 (get_gdb_completer_quote_characters): Constify.
11598 (set_rl_completer_word_break_characters): New function.
11599 (set_gdb_completion_word_break_characters)
11600 (complete_line_internal): Use it.
11601 * completer.h (get_gdb_completer_quote_characters): Constify.
11602 (set_rl_completer_word_break_characters): Declare.
11603 * f-lang.c (f_word_break_characters): Constify.
11604 * language.c (default_word_break_characters): Constify.
11605 * language.h (language_defn::la_word_break_characters): Constify.
11606 (default_word_break_characters): Constify.
11607 * top.c (init_main): Use set_rl_completer_word_break_characters.
11608
11609 2017-04-05 Pedro Alves <palves@redhat.com>
11610
11611 * aix-thread.c (aix_thread_pid_to_str)
11612 (aix_thread_extra_thread_info): Constify.
11613 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11614 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11615 (bsd_uthread_pid_to_str): Constify.
11616 * corelow.c (core_pid_to_str): Constify.
11617 * darwin-nat.c (darwin_pid_to_str): Constify.
11618 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11619 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11620 Constify.
11621 * gnu-nat.c (gnu_pid_to_str): Constify.
11622 * go32-nat.c (go32_pid_to_str): Constify.
11623 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11624 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11625 * inferior.c (inferior_pid_to_str): Constify.
11626 * linux-nat.c (linux_nat_pid_to_str): Constify.
11627 * linux-tdep.c (linux_core_pid_to_str): Constify.
11628 * linux-thread-db.c (thread_db_pid_to_str)
11629 (thread_db_extra_thread_info): Constify.
11630 * nto-tdep.c (nto_extra_thread_info): Constify.
11631 * nto-tdep.h (nto_extra_thread_info): Constify.
11632 * obsd-nat.c (obsd_pid_to_str): Constify.
11633 * procfs.c (procfs_pid_to_str): Constify.
11634 * ravenscar-thread.c (ravenscar_extra_thread_info)
11635 (ravenscar_pid_to_str): Constify.
11636 * remote-sim.c (gdbsim_pid_to_str): Constify.
11637 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11638 Constify.
11639 * sol-thread.c (solaris_pid_to_str): Constify.
11640 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11641 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11642 * target.c (default_pid_to_str, target_pid_to_str)
11643 (normal_pid_to_str, default_pid_to_str): Constify.
11644 * target.h (target_ops::to_pid_to_str)
11645 (target_ops::to_extra_thread_info): Constify.
11646 (target_pid_to_str, normal_pid_to_str): Constify.
11647 * windows-nat.c (windows_pid_to_str): Constify.
11648 * gdbarch.sh (core_pid_to_str): Constify.
11649 * target-delegates.c: Regenerate.
11650 * gdbarch.h, gdbarch.c: Regenerate.
11651
11652 2017-04-05 Pedro Alves <palves@redhat.com>
11653
11654 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11655 the memory of the temporary warning_pre_print override.
11656 * utils.c (warning_pre_print): Constify.
11657 * utils.h (warning_pre_print): Constify.
11658
11659 2017-04-05 Pedro Alves <palves@redhat.com>
11660
11661 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11662 (shell_command): New function.
11663 (make_command): Use std::string.
11664 (init_cli_cmds): Register shell_command instead of shell_escape.
11665
11666 2017-04-05 Pedro Alves <palves@redhat.com>
11667
11668 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11669 * tracepoint.c (default_collect): Don't initialize.
11670
11671 2017-04-05 Pedro Alves <palves@redhat.com>
11672
11673 * macroexp.c (macro_buffer::shared): Now a bool.
11674 (init_buffer): Update.
11675 (init_shared_buffer): Constify 'addr' parameter.
11676 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11677 casts.
11678
11679 2017-04-05 Pedro Alves <palves@redhat.com>
11680
11681 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11682 * disasm.c (set_disassembler_options): Constify local.
11683 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11684
11685 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11686
11687 PR gdb/21352
11688 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11689 option.
11690
11691 2017-04-05 Yao Qi <yao.qi@linaro.org>
11692
11693 * frame.c (frame_unwind_register_unsigned): Call
11694 frame_unwind_register_value.
11695
11696 2017-04-05 Yao Qi <yao.qi@linaro.org>
11697
11698 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11699 Use gdb_test_multiple, and don't match anchor.
11700
11701 2017-04-05 Pedro Alves <palves@redhat.com>
11702
11703 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11704 (Write After Approval): Remove Simon Marchi.
11705
11706 2017-04-05 Pedro Alves <palves@redhat.com>
11707
11708 * common/gdb_optional.h (optional::optional): Make constexpr and
11709 initialize m_dummy.
11710
11711 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11712
11713 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11714 (amd64fbsd_jmp_buf_reg_offset): Remove.
11715 (amd64fbsd_supply_uthread): Remove function.
11716 (amd64fbsd_collect_uthread): Remove function.
11717 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11718 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11719 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11720 (fbsd-nat.c): Update comment.
11721 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11722 (i386fbsd_jmp_buf_reg_offset): Remove.
11723 (i386fbsd_supply_uthread): Remove function.
11724 (i386fbsd_collect_uthread): Remove function.
11725 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11726
11727 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11728
11729 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11730 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11731 * NEWS: Mention that support for FreeBSD/alpha was removed.
11732 * alpha-fbsd-tdep.c: Delete file.
11733 * config/alpha/fbsd.mh: Delete file.
11734 * configure.host: Delete alpha*-*-freebsd* and
11735 alpha*-*-kfreebsd*-gnu.
11736 * configure.tgt: Delete alpha*-*-freebsd* and
11737 alpha*-*-kfreebsd*-gnu.
11738
11739 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11740
11741 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11742 amd64bsd_store_inferior_registers): Use ptid from regcache.
11743
11744 2017-04-04 Pedro Alves <palves@redhat.com>
11745
11746 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11747 data fields, make them private and add "m_" prefixes.
11748 (lnp_state_machine::lnp_state_machine): New ctor.
11749 (record_line, check_line_address, handle_set_discriminator)
11750 (handle_set_address, handle_advance_pc, handle_special_opcode)
11751 (handle_advance_line, handle_set_file, handle_negate_stmt)
11752 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11753 (end_sequence, advance_line): New methods.
11754 (m_gdbarch, m_record_lines_p): New fields.
11755 (lnp_reader_state): Delete.
11756 (dwarf_record_line): Rename to ...
11757 (lnp_state_machine::record_line): ... adjust.
11758 (init_lnp_state_machine): Delete.
11759 (lnp_state_machine::lnp_state_machine): New.
11760 (check_line_address): Rename to ...
11761 (lnp_state_machine::check_line_address): This.
11762 (dwarf_decode_lines_1): Remove reference to "reader_state".
11763 Adjust lnp_state_machine having a non-default ctor. Use bool.
11764 State machine internal state manipulation moved to
11765 lnp_state_machine methods.
11766
11767 2017-04-04 Pedro Alves <palves@redhat.com>
11768
11769 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11770 unittests/offset-type-selftests.c.
11771 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11772 * common/offset-type.h: New file.
11773 * common/preprocessor.h: New file.
11774 * common/traits.h: New file.
11775 * common/valid-expr.h: New file.
11776 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11777 sect_offset and cu_offset strong typedefs throughout.
11778 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11779 typedefs throughout.
11780 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11781 sect_offset and cu_offset strong typedefs throughout.
11782 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11783 typedefs throughout.
11784 * gdbtypes.h: Include "common/offset-type.h".
11785 (cu_offset): Now an offset type (strong typedef) instead of a
11786 struct.
11787 (sect_offset): Likewise.
11788 (union call_site_parameter_u): Rename "param_offset" field to
11789 "param_cu_off".
11790 * unittests/offset-type-selftests.c: New file.
11791
11792 2017-04-04 Pedro Alves <palves@redhat.com>
11793
11794 * common/underlying.h: New file.
11795 * dwarf2read.c: Include "common/gdb_optional.h" and
11796 "common/underlying.h".
11797 (dir_index, file_name_index): New types.
11798 (file_entry): Use them.
11799 (file_entry::include): Use to_underlying.
11800 (line_header::add_file_name): Use dir_index.
11801 (read_formatted_entries): Use gdb::optional. Read form before
11802 writting to file_entry.
11803 (dwarf_decode_line_header): Use dir_index.
11804 (lnp_state_machine::current_file): Use to_underlying.
11805 (lnp_state_machine::file): Change type to file_name_index.
11806 (dwarf_record_line): Use to_underlying.
11807 (init_lnp_state_machine): Use file_name_index.
11808 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11809
11810 2017-04-04 Pedro Alves <palves@redhat.com>
11811
11812 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11813 operator bool, has_value and get methods.
11814
11815 2017-04-04 Pedro Alves <palves@redhat.com>
11816
11817 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11818 fields.
11819 (line_header): Initialize all data fields. Change type of
11820 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11821 Change type of include_dirs to std::vector<const char *>. Remove
11822 num_include_dirs, include_dirs_size. Change type of file_names to
11823 std::vector<file_entry>. Remove num_file_names, file_names_size.
11824 (line_header::line_header): New.
11825 (line_header::add_include_dir, line_header::add_file_name): New
11826 methods.
11827 (line_header::include_dir_at): Remove NULL check.
11828 (line_header::file_name_at): Add const overload.
11829 (line_header_up): New unique_ptr typedef.
11830 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11831 std::vector. Remove free_line_header call.
11832 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11833 free_line_header call.
11834 (free_cu_line_header): Delete.
11835 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11836 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11837 Adjust to use std::vector.
11838 (free_line_header): Delete.
11839 (free_line_header_voidp): Use delete.
11840 (add_include_dir): Replace with ...
11841 (line_header::add_include_dir): ... this method. Use std::vector.
11842 (add_file_name): Replace with ...
11843 (line_header::add_file_name): ... this method. Use std::vector.
11844 (add_include_dir_stub): Delete.
11845 (read_formatted_entries): Remove memset.
11846 (dwarf_decode_line_header): Return a line_header_up instead of a
11847 raw pointer. Remove cleanup handling. Pass lambdas to
11848 read_formatted_entries. Adjust to use line_header methods.
11849 (dwarf_decode_lines_1): Adjust to use line_header methods.
11850 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11851 use std::vector.
11852
11853 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11854
11855 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11856 instead of struct ptid.
11857
11858 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11859
11860 * frame.c (get_frame_register_bytes): Unwind using value.
11861 (put_frame_register_bytes): Likewise.
11862
11863 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11864
11865 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11866 aggregate-like.
11867
11868 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11869
11870 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11871
11872 2017-03-29 Yao Qi <yao.qi@linaro.org>
11873
11874 * gdbthread.h (struct thread_info): Declare constructor and
11875 destructor. Add some in-class member initializers.
11876 * thread.c (free_thread): Remove.
11877 (init_thread_list): Call delete instead of free_thread.
11878 (new_thread): Call thread_info constructor.
11879 (thread_info::thread_info): New function.
11880 (thread_info::~thread_info): New function.
11881 (delete_thread_1): Call delete instead of free_thread.
11882 (make_cleanup_restore_current_thread): Move tp and frame to
11883 inner block.
11884
11885 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11886
11887 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11888 (arc_skip_prologue): Likewise.
11889 (arc_make_frame_cache): Likewise.
11890 (arc_pv_get_operand): New function.
11891 (arc_is_in_prologue): Likewise.
11892 (arc_analyze_prologue): Likewise.
11893 (arc_print_frame_cache): Likewise.
11894 (MAX_PROLOGUE_LENGTH): New constant.
11895
11896 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11897
11898 * configure.tgt: Add arc-insn.o.
11899 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11900 (dump_arc_instruction_command): New function.
11901 (arc_fprintf_disasm): Likewise.
11902 (arc_disassemble_info): Likewise.
11903 (arc_insn_get_operand_value): Likewise.
11904 (arc_insn_get_operand_value_signed): Likewise.
11905 (arc_insn_get_memory_base_reg): Likewise.
11906 (arc_insn_get_memory_offset): Likewise.
11907 (arc_insn_get_branch_target): Likewise.
11908 (arc_insn_dump): Likewise.
11909 (arc_insn_get_linear_next_pc): Likewise.
11910 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11911 (arc_disassemble_info): Likewise.
11912 (arc_insn_get_branch_target): Likewise.
11913 (arc_insn_get_linear_next_pc): Likewise.
11914 * NEWS: Mention new "maint print arc arc-instruction".
11915
11916 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11917
11918 * arc-tdep (maintenance_print_arc_list): New variable.
11919 (maintenance_print_arc_command): New function.
11920
11921 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11922
11923 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11924 Add "limm" and "reserved".
11925 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11926 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11927 * arc-tdep.h (arc_regnum): Likewise.
11928
11929 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11930
11931 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11932 for THREADPTR register.
11933 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11934 register.
11935 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11936 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11937 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11938
11939 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11940
11941 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11942 registers above gdbarch_num_regs (gdbarch) as privileged in
11943 call0 ABI.
11944
11945 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11946
11947 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11948 for a single specified register or for all registers in
11949 a0_base..a0_base + C0_NREGS range.
11950 (supply_gregset_reg): Call regcache_raw_supply for a single
11951 specified register or for all registers in a0_base..a0_base +
11952 C0_NREGS range.
11953
11954 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11955
11956 * arch/xtensa.h (C0_NREGS): Add definition.
11957 * xtensa-tdep.c (C0_NREGS): Remove definition.
11958
11959 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11960
11961 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11962 Drop xtensa_default_isa initialization.
11963 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11964
11965 2017-03-27 Pedro Alves <palves@redhat.com>
11966
11967 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11968 (file_entry::include_dir): New method.
11969 (line_header::include_dir_at, line_header::file_name_at): New
11970 methods.
11971 (setup_type_unit_groups, setup_type_unit_groups)
11972 (psymtab_include_file_name): Simplify using the new methods.
11973 (lnp_state_machine) <the_line_header>: New field.
11974 <file>: Add comment.
11975 (lnp_state_machine::current_file): New method.
11976 (dwarf_record_line): Simplify using the new methods.
11977 (init_lnp_state_machine): Initialize the "the_line_header" field.
11978 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11979 Simplify using the new methods.
11980
11981 2017-03-27 Pedro Alves <palves@redhat.com>
11982
11983 * cp-name-parser.y (make_empty): Delete.
11984 (demangler_special, nested_name, ptr_operator, array_indicator)
11985 (direct_declarator, declarator_1): Use fill_comp instead of
11986 make_empty.
11987
11988 2017-03-27 Pedro Alves <palves@redhat.com>
11989
11990 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11991 to ATTRIBUTE_PRINTF.
11992 * solib-target.c (library_list_start_list): Print "string" not
11993 "version".
11994 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11995 gdb_xml_error call.
11996
11997 2017-03-27 Pedro Alves <palves@redhat.com>
11998
11999 * dwarf2read.c (struct file_and_directory): New.
12000 (dwarf2_get_dwz_file): Adjust to use std::string.
12001 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12002 (find_file_and_directory): Adjust to return a file_and_directory
12003 object.
12004 (read_file_scope): Adjust to use file_and_directory. Remove
12005 make_cleanup/do_cleanups calls.
12006 (open_and_init_dwp_file): Adjust to use std::string. Remove
12007 make_cleanup/do_cleanups calls.
12008 * python/python.c (do_start_initialization): Adjust to ldirname
12009 returning a std::string.
12010 * utils.c (ldirname): Now returns a std::string.
12011 * utils.h (ldirname): Change return type to std::string.
12012 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12013 returning a std::string.
12014 * xml-tdesc.c (file_read_description_xml): Likewise.
12015
12016 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12017
12018 * regcache.c (regcache_debug_print_register): New function.
12019 * regcache.h (regcache_debug_print_register): New declaration.
12020 * target.c (debug_print_register): Remove.
12021 (target_fetch_registers): Call regcache_debug_print_register.
12022 (target_store_registers): Likewise.
12023
12024 2017-03-24 Pádraig Brady <pbrady@fb.com>
12025
12026 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12027 reference beyond the 'lh->include_dirs' array before accessing to
12028 it.
12029 (psymtab_include_file_name): Likewise.
12030 (dwarf_decode_lines_1): Likewise.
12031 (dwarf_decode_lines): Likewise.
12032 (file_file_name): Likewise.
12033
12034 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12035
12036 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12037 inferior_ptid.
12038 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12039 ps_lsetfpregs): Likewise.
12040 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12041 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12042 ps_lsetfpregs): Likewise.
12043 * target.c (target_fetch_registers, target_store_registers):
12044 Remove asserts.
12045
12046 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12047
12048 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12049
12050 2017-03-23 Yao Qi <yao.qi@linaro.org>
12051
12052 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12053 (_initialize_aarch64_tdep): Register it.
12054 (aarch64_record_load_store): Handle PRFM instruction.
12055 (aarch64_process_record_test): New function.
12056
12057 2017-03-23 Yao Qi <yao.qi@linaro.org>
12058
12059 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12060 indentation.
12061
12062 2017-03-23 Yao Qi <yao.qi@linaro.org>
12063
12064 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12065
12066 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12067
12068 python/python.c (do_start_initialization): Fix memory leak.
12069
12070 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12071
12072 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12073 using get_ptrace_pid.
12074 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12075 inferior_ptid.
12076 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12077 inferior_ptid instead of pid.
12078
12079 2017-03-22 Yao Qi <yao.qi@linaro.org>
12080
12081 * aarch64-tdep.c: Wrap locally used classes in anonymous
12082 namespace.
12083 * arm-tdep.c: Likewise.
12084 * linespec.c: Likewise.
12085 * ui-out.c: Likewise.
12086
12087 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12088
12089 PR gdb/19637
12090 * python/lib/gdb/printer/bound_registers.py: Import sys.
12091
12092 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12093
12094 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12095 windows_thread_info parameter and use it instead of
12096 current_thread.
12097 (windows_fetch_inferior_registers): Don't set current_thread,
12098 pass the thread to do_windows_fetch_inferior_registers. Use
12099 ptid from regcache instead of inferior_ptid.
12100 (do_windows_store_inferior_registers): Add windows_thread_info
12101 parameter and use it instead of current_thread.
12102 (windows_store_inferior_registers): Don't set current_thread,
12103 pass the thread to do_windows_store_inferior_registers. Use
12104 ptid from regcache instead of inferior_ptid.
12105
12106 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12107
12108 * ser-mingw.c (ser_windows_raw): Remove reference to
12109 struct serial::current_timeout.
12110
12111 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12112
12113 PR tdep/20928
12114 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12115 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12116 (sparc64_fsr_type): Fix %fsr decoding.
12117
12118 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12119
12120 * python/py-record-btrace.c (btpy_insn_data): Change return type
12121 for Python 2.
12122
12123 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12124
12125 * spu-linux-nat.c (spu_fetch_inferior_registers,
12126 spu_store_inferior_registers): Use ptid from regcache, set and
12127 restore inferior_ptid.
12128 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12129 Likewise.
12130
12131 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12132
12133 * i386-linux-nat.c (fetch_register, store_register,
12134 i386_linux_fetch_inferior_registers,
12135 i386_linux_store_inferior_registers): Use ptid from regcache.
12136 * ia64-linux-nat.c (ia64_linux_fetch_register,
12137 ia64_linux_store_register): Likewise.
12138 * inf-ptrace.c (inf_ptrace_fetch_register,
12139 inf_ptrace_store_register): Likewise.
12140 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12141 m32r_linux_store_inferior_registers): Likewise.
12142 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12143 m68kbsd_store_inferior_registers): Likewise.
12144 * m68k-linux-nat.c (fetch_register, store_register,
12145 m68k_linux_fetch_inferior_registers,
12146 m68k_linux_store_inferior_registers): Likewise.
12147 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12148 m88kbsd_store_inferior_registers): Likewise.
12149 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12150 mips_fbsd_store_inferior_registers): Likewise.
12151 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12152 mips64_linux_regsets_store_registers): Likewise.
12153 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12154 mipsnbsd_store_inferior_registers): Likewise.
12155 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12156 mips64obsd_store_inferior_registers): Likewise.
12157 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12158 Likewise.
12159 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12160 ppcfbsd_store_inferior_registers): Likewise.
12161 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12162 ppc_linux_store_inferior_registers): Likewise.
12163 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12164 ppcnbsd_store_inferior_registers): Likewise.
12165 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12166 ppcobsd_store_registers): Likewise.
12167 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12168 Likewise.
12169 * ravenscar-thread.c (ravenscar_fetch_registers,
12170 ravenscar_store_registers, ravenscar_prepare_to_store):
12171 Likewise.
12172 * record-btrace.c (record_btrace_fetch_registers,
12173 record_btrace_store_registers, record_btrace_prepare_to_store):
12174 Likewise.
12175 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12176 Lookup inferior using ptid from regcache, instead of
12177 current_inferior.
12178 * remote.c (remote_fetch_registers, remote_store_registers): Use
12179 ptid from regcache.
12180 * rs6000-nat.c (fetch_register, store_register): Likewise.
12181 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12182 s390_linux_store_inferior_registers): Likewise.
12183 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12184 shnbsd_store_inferior_registers): Likewise.
12185 * sol-thread.c (sol_thread_fetch_registers,
12186 sol_thread_store_registers): Likewise.
12187 * sparc-nat.c (sparc_fetch_inferior_registers,
12188 sparc_store_inferior_registers): Likewise.
12189 * tilegx-linux-nat.c (fetch_inferior_registers,
12190 store_inferior_registers): Likewise.
12191 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12192 vaxbsd_store_inferior_registers): Likewise.
12193 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12194 store_xtregs): Likewise.
12195
12196 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12197
12198 PR gdb/14441
12199 * NEWS: Mention support for rvalue references in GDB and python.
12200 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12201 supports both lvalue and rvalue references.
12202
12203 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12204
12205 PR gdb/14441
12206 * gdbtypes.c (rank_one_type): Implement overloading
12207 resolution rules regarding rvalue references.
12208
12209 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12210
12211 PR gdb/14441
12212 * aarch64-tdep.c (aarch64_type_align)
12213 (aarch64_extract_return_value, aarch64_store_return_value): Change
12214 lvalue reference type checks to general reference type checks.
12215 * amd64-tdep.c (amd64_classify): Likewise.
12216 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12217 Likewise.
12218 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12219 (arm_store_return_value): Likewise.
12220 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12221 * c-typeprint.c (c_print_type): Likewise.
12222 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12223 (cplus_number_of_children, cplus_describe_child): Likewise.
12224 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12225 * completer.c (expression_completer): Likewise.
12226 * cp-support.c (make_symbol_overload_list_adl_namespace):
12227 Likewise.
12228 * darwin-nat-info.c (info_mach_region_command): Likewise.
12229 * dwarf2loc.c (entry_data_value_coerce_ref)
12230 (value_of_dwarf_reg_entry): Likewise.
12231 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12232 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12233 Likewise.
12234 * findvar.c (extract_typed_address, store_typed_address):
12235 Likewise.
12236 * gdbtypes.c (rank_one_type): Likewise.
12237 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12238 * infcall.c (value_arg_coerce): Likewise.
12239 * language.c (pointer_type): Likewise.
12240 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12241 Likewise.
12242 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12243 * mn10300-tdep.c (mn10300_type_align): Likewise.
12244 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12245 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12246 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12247 Likewise.
12248 * printcmd.c (print_formatted, x_command): Likewise.
12249 * python/py-type.c (typy_get_composite, typy_template_argument):
12250 Likewise.
12251 * python/py-value.c (valpy_referenced_value)
12252 (valpy_get_dynamic_type, value_has_field): Likewise.
12253 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12254 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12255 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12256 * spu-tdep.c (spu_scalar_value_p): Likewise.
12257 * symtab.c (lookup_symbol_aux): Likewise.
12258 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12259 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12260 Likewise.
12261 * valops.c (value_cast_pointers, value_cast)
12262 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12263 (value_struct_elt, value_struct_elt_bitpos)
12264 (value_find_oload_method_list, find_overload_match)
12265 (value_rtti_indirect_type): Likewise.
12266 * valprint.c (val_print_scalar_type_p, generic_val_print):
12267 Likewise.
12268 * value.c (value_actual_type, value_as_address, unpack_long)
12269 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12270 (coerce_ref): Likewise.
12271 * varobj.c (varobj_get_value_type): Likewise.
12272
12273 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12274
12275 PR gdb/14441
12276 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12277 table of constants.
12278 * python/lib/gdb/command/explore.py: Support exploring values
12279 of rvalue reference types.
12280 * python/lib/gdb/types.py: Implement get_basic_type() for
12281 rvalue reference types.
12282 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12283 constant.
12284 * python/py-value.c (valpy_getitem): Add an rvalue reference
12285 check.
12286 (valpy_reference_value): Add new parameter "refcode".
12287 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12288 New wrappers for valpy_reference_value().
12289 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12290 (gdbpy_invoke_xmethod): Likewise.
12291
12292 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12293
12294 PR gdb/14441
12295 * dwarf2read.c (process_die, read_type_die_1): Handle the
12296 DW_TAG_rvalue_reference_type DIE.
12297 (read_tag_reference_type): Add new parameter "refcode".
12298
12299 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12300
12301 PR gdb/14441
12302 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12303 (c_type_print_modifier, c_type_print_varspec_suffix)
12304 (c_type_print_base): Support printing rvalue reference types.
12305 * c-valprint.c (c_val_print, c_value_print): Support printing
12306 rvalue reference values.
12307
12308 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12309
12310 PR gdb/14441
12311 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12312 typename.
12313 * cp-support.c (replace_typedefs): Handle
12314 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12315 * python/py-type.c (typy_lookup_type): Likewise.
12316
12317 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12318
12319 PR gdb/14441
12320 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12321 * parse.c (insert_type): Change assert statement.
12322 (follow_types): Handle rvalue reference types.
12323 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12324 constant.
12325
12326 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12327
12328 PR gdb/14441
12329 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12330 value_ref() interface.
12331 * c-valprint.c (c_value_print): Likewise.
12332 * infcall.c (value_arg_coerce): Likewise.
12333 * python/py-value.c (valpy_reference_value): Likewise.
12334 * valops.c (value_cast, value_reinterpret_cast)
12335 (value_dynamic_cast, typecmp): Likewise.
12336 (value_ref): Parameterize by kind of return value reference type.
12337 * value.h (value_ref): Add new parameter "refcode".
12338
12339 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12340
12341 PR gdb/14441
12342 * dwarf2read.c (read_tag_reference_type): Use
12343 lookup_lvalue_reference_type() instead of lookup_reference_type().
12344 * eval.c (evaluate_subexp_standard): Likewise.
12345 * f-exp.y: Likewise.
12346 * gdbtypes.c (make_reference_type, lookup_reference_type):
12347 Generalize with rvalue reference types.
12348 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12349 convenience wrappers for lookup_reference_type().
12350 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12351 reference kind parameter.
12352 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12353 wrappers for lookup_reference_type().
12354 * guile/scm-type.c (gdbscm_type_reference): Use
12355 lookup_lvalue_reference_type() instead of lookup_reference_type().
12356 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12357 * parse.c (follow_types): Likewise.
12358 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12359 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12360 Likewise.
12361 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12362 (gdbpy_invoke_xmethod): Likewise.
12363 * stabsread.c: Provide extra argument to make_reference_type()
12364 call.
12365 * valops.c (value_ref, value_rtti_indirect_type): Use
12366 lookup_lvalue_reference_type() instead of lookup_reference_type().
12367
12368 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12369
12370 PR gdb/14441
12371 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12372 (TYPE_IS_REFERENCE): New macro.
12373 (struct type): Add rvalue_reference_type field.
12374 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12375
12376 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12377
12378 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12379 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12380 New function definition.
12381 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12382 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12383 New function declaration.
12384 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12385 * mi/mi-interp.h: New file.
12386 * solib.c (info_sharedlibrary_command): Replace for loop with
12387 ALL_SO_LIBS macro
12388 * solib.h (update_solib_list): New function declaration.
12389 (so_list_head): Move macro.
12390 * solist.h (ALL_SO_LIBS): New macro.
12391
12392 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12393
12394 * infcmd.c (post_create_inferior): Remove unused argument in
12395 call to solib_add.
12396 * remote.c (remote_start_remote): Likewise.
12397 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12398 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12399 (enable_break): Likewise.
12400 * solib.c (update_solib_list): Remove unused target argument
12401 and its documentation.
12402 (solib_add): Remove unused target argument. Remove unused
12403 argument in call to update_solib_list.
12404 (info_sharedlibrary_command): Remove unused argument in call
12405 to update_solib_list.
12406 (sharedlibrary_command): Remove unused argument in call to
12407 solib_add.
12408 (handle_solib_event): Likewise.
12409 (reload_shared_libraries): Likewise.
12410 * solib.h (solib_add): Remove unused target argument.
12411
12412 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12413
12414 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12415 (s390_displaced_step_fixup): Cover relative branches with the
12416 default fixup handling. This fixes lack of support for some
12417 relative branch instructions.
12418
12419 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12420
12421 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12422 ptid from regcache.
12423
12424 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12425
12426 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12427 i386_darwin_store_inferior_registers): Use ptid from regcache.
12428
12429 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12430
12431 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12432 i386bsd_store_inferior_registers): Use ptid from regcache.
12433
12434 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12435
12436 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12437 hppaobsd_store_registers): Use ptid from regcache.
12438
12439 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12440
12441 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12442 hppanbsd_store_registers): Use ptid from regcache.
12443
12444 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12445
12446 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12447 from regcache. Use get_ptrace_pid.
12448
12449 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12450
12451 * corelow.c (get_core_register_section): Use ptid from regcache,
12452 update doc.
12453
12454 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12455
12456 * bsd-uthread.c (bsd_uthread_fetch_registers,
12457 bsd_uthread_store_registers): Use ptid from regcache, set and
12458 restore inferior_ptid.
12459
12460 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12461
12462 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12463 fetch_fp_regs, store_register, store_regs, store_fp_register,
12464 store_fp_regs): Use ptid from regcache.
12465
12466 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12467
12468 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12469 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12470 store_vfp_regs): Use ptid from regcache.
12471
12472 2017-03-17 Pedro Alves <palves@redhat.com>
12473
12474 PR remote/21188
12475 * ser-base.c (ser_base_wait_for): Add comment.
12476 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12477 version.
12478 * ser-unix.c (hardwire_raw): Remove reference to
12479 scb->current_timeout.
12480 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12481 (hardwire_ops): Install ser_base_readchar instead of
12482 hardwire_readchar.
12483 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12484 Remove fields.
12485
12486 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12487
12488 PR gdb/19637
12489 * python/lib/gdb/printer/bound_registers.py: Add support for
12490 Python 3.
12491
12492 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12493
12494 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12495 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12496 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12497 byte_offset to subobj_byte_offset. Fix the handling of
12498 DWARF_VALUE_STACK on big-endian targets when coming via an
12499 implicit pointer.
12500 (dwarf2_evaluate_loc_desc): Adjust call to
12501 dwarf2_evaluate_loc_desc_full.
12502 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12503 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12504
12505 2017-03-16 Yao Qi <yao.qi@linaro.org>
12506
12507 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12508 and REVSH instructions.
12509
12510 2017-03-16 Yao Qi <yao.qi@linaro.org>
12511
12512 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12513 (arm_record_test): Declare.
12514 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12515 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12516 align with the manual.
12517 (thumb_record_misc): Adjust the code order to align with the
12518 manual.
12519 (thumb2_record_decode_insn_handler): Fix instruction matching.
12520 (instruction_reader_thumb): New class.
12521 (arm_record_test): New function.
12522
12523 2017-03-16 Yao Qi <yao.qi@linaro.org>
12524
12525 * arm-tdep.c (abstract_memory_reader): New class.
12526 (instruction_reader): New class.
12527 (extract_arm_insn): Add argument 'reader'. Callers updated.
12528 (decode_insn): Likewise.
12529
12530 2017-03-16 Doug Evans <dje@google.com>
12531
12532 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12533 member. Change type of TYPE member to SCM. All uses updated.
12534 (lsscm_make_lazy_string_smob): Add assert.
12535 (lsscm_make_lazy_string): Flag bad length values.
12536 (lsscm_elt_type): New function.
12537 (gdbscm_lazy_string_to_value): Rewrite to use
12538 lsscm_safe_lazy_string_to_value.
12539 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12540 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12541 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12542 in incoming type.
12543 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12544 * guile/scm-type.c (tyscm_scm_to_type): New function.
12545
12546 2017-03-15 Doug Evans <dje@google.com>
12547
12548 PR python/17728, python/18439, python/18779
12549 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12550 member. Change type of TYPE member to PyObject *. All uses updated.
12551 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12552 (gdbpy_create_lazy_string_object): Flag bad length values.
12553 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12554 Handle typedefs in incoming type.
12555 (stpy_lazy_string_elt_type): New function.
12556 (gdbpy_extract_lazy_string): Call it.
12557 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12558 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12559 typedefs in incoming type.
12560
12561 2017-03-16 Doug Evans <dje@google.com>
12562
12563 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12564 * guile/scm-type.c (tyscm_scm_to_type): New function.
12565
12566 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12567
12568 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12569 "ULONGEST" for "skip".
12570
12571 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12572
12573 PR gdb/21220
12574 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12575 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12576 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12577 over ptrace peek/poke until end of buffer or error.
12578
12579 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12580
12581 * parse.c (length_of_subexp): Make static.
12582 * parser-defs.h (length_of_subexp): Remove.
12583
12584 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12585
12586 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12587 as well.
12588
12589 2017-03-14 Pedro Alves <palves@redhat.com>
12590
12591 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12592 (main): Use std::unique_ptr. Remove calls to
12593 cp_demangled_name_parse_free.
12594
12595 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12596
12597 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12598 alphabsd_store_inferior_registers): Use regcache->ptid instead
12599 of inferior_ptid.
12600
12601 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12602
12603 * aix-thread.c (aix_thread_fetch_registers,
12604 aix_thread_store_registers): Use regcache->ptid instead of
12605 inferior_ptid.
12606
12607 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12608
12609 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12610 store_gregs_to_thread, fetch_fpregs_from_thread,
12611 store_fpregs_to_thread): Use regcache->ptid instead of
12612 inferior_ptid.
12613
12614 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12615
12616 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12617 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12618 instead of inferior_ptid.
12619
12620 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12621
12622 * target.c (target_fetch_registers, target_store_registers): Add
12623 assert.
12624
12625 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12626
12627 * regcache.h (regcache_get_ptid): New function.
12628 * regcache.c (regcache_get_ptid): New function.
12629
12630 2017-03-13 Mark Wielaard <mark@klomp.org>
12631
12632 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12633
12634 2017-03-10 Keith Seitz <keiths@redhat.com>
12635
12636 PR c++/8218
12637 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12638
12639 2017-03-08 Pedro Alves <palves@redhat.com>
12640
12641 PR gdb/18360
12642 * infrun.c (start_step_over, do_target_resume, resume)
12643 (restart_threads): Assert we're not resuming a thread that is
12644 meant to be stopped.
12645 (infrun_thread_stop_requested_callback): Delete.
12646 (infrun_thread_stop_requested): If the thread is internally
12647 stopped, queue a pending stop event and clear the thread's
12648 inline-frame state.
12649 (handle_stop_requested): New function.
12650 (handle_syscall_event, handle_inferior_event_1): Use
12651 handle_stop_requested.
12652 (handle_stop_requested): New function.
12653 (handle_signal_stop): Set the thread's stop_signal here instead of
12654 at caller.
12655 (finish_step_over): Clear step over info unconditionally.
12656 (handle_signal_stop): If the user had interrupted the event
12657 thread, consider the stop a random signal.
12658 (handle_signal_stop) <signal arrived while stepping over
12659 breakpoint>: Don't restart threads here.
12660 (stop_waiting): Don't clear step-over info here.
12661
12662 2017-03-08 Pedro Alves <palves@redhat.com>
12663
12664 PR 21206
12665 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12666 goes to argument 2, not 1.
12667
12668 2017-03-08 Pedro Alves <palves@redhat.com>
12669
12670 PR cli/21218
12671 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12672 display_gdb_prompt.
12673 (command_line_input): Add comment.
12674
12675 2017-03-08 Pedro Alves <palves@redhat.com>
12676
12677 PR tui/21216
12678 * tui/tui-file.c (tui_file::write): New.
12679 * tui/tui-file.h (tui_file): Override "write".
12680 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12681 factored out from ...
12682 (tui_puts): ... here.
12683 (tui_putc): Use them.
12684 (tui_write): New function.
12685 * tui/tui-io.h (tui_write): Declare.
12686
12687 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12688
12689 * Makefile.in (SFILES): Replace "environ.c" with
12690 "common/environ.c".
12691 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12692 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12693 to...
12694 * common/environ.c: ... here.
12695 * environ.h: Moved to...
12696 * common/environ.h: ... here.
12697
12698 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12699
12700 * gdbarch.sh (pstring_ptr): New static function.
12701 (gdbarch_disassembler_options): Use it.
12702 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12703 not valid_disassembler_option->name.
12704 * gdbarch.c: Regenerate.
12705
12706 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12707
12708 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12709
12710 2017-03-07 Pedro Alves <palves@redhat.com>
12711
12712 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12713
12714 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12715
12716 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12717 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12718 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12719 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12720
12721 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12722
12723 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12724
12725 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12726
12727 * remote.c (remote_add_target_side_commands): Use range-based
12728 for loop.
12729
12730 2017-03-03 Yao Qi <yao.qi@linaro.org>
12731
12732 PR gdb/21165
12733 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12734 value is lazy.
12735 * valprint.c (common_val_print): Likewise.
12736
12737 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12738
12739 * NEWS: Mention new set/show disassembler-options commands.
12740 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12741 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12742 (prospective_options): New static variable.
12743 (gdb_disassembler::gdb_disassembler): Initialize
12744 m_di.disassembler_options.
12745 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12746 (get_disassembler_options): New function.
12747 (set_disassembler_options): Likewise.
12748 (set_disassembler_options_sfunc): Likewise.
12749 (show_disassembler_options_sfunc): Likewise.
12750 (disassembler_options_completer): Likewise.
12751 (_initialize_disasm): Likewise.
12752 * disasm.h (get_disassembler_options): New prototype.
12753 (set_disassembler_options): Likewise.
12754 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12755 (gdbarch_verify_disassembler_options): Likewise.
12756 * gdbarch.c: Regenerate.
12757 * gdbarch.h: Likewise.
12758 * arm-tdep.c (num_disassembly_options): Delete.
12759 (set_disassembly_style): Likewise.
12760 (arm_disassembler_options): New static variable.
12761 (set_disassembly_style_sfunc): Convert short style name into long
12762 option name. Call set_disassembler_options.
12763 (show_disassembly_style_sfunc): New function.
12764 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12765 set_gdbarch_verify_disassembler_options.
12766 (_initialize_arm_tdep): Delete regnames variable and update callers.
12767 (arm_disassembler_options): Initialize.
12768 (disasm_options): New variable.
12769 (num_disassembly_options): Rename from this...
12770 (num_disassembly_styles): ...to this. Compute by scanning through
12771 disasm_options.
12772 (valid_disassembly_styles): Initialize using disasm_options.
12773 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12774 set_arm_regname_option.
12775 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12776 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12777 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12778 set_gdbarch_verify_disassembler_options.
12779 * s390-tdep.c (s390_disassembler_options): New static variable.
12780 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12781 set_gdbarch_verify_disassembler_options.
12782
12783 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12784
12785 * remote.c (remote_add_target_side_condition): Remove "struct"
12786 keyword from range-based for loop.
12787
12788 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12789
12790 * remote.c (remote_add_target_side_condition): Use range-based
12791 for loop. Update comment.
12792
12793 2017-02-27 Yao Qi <yao.qi@linaro.org>
12794
12795 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12796
12797 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12798
12799 * regcache.c (regcache_raw_update): New function.
12800 (regcache_raw_read): Move code to regcache_raw_update.
12801 * regcache.h (regcache_raw_update): New declaration.
12802 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12803
12804 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12805
12806 * dwarf2read.c (create_debug_type_hash_table): Initialize
12807 header.signature and header.type_offset_in_tu.
12808
12809 2017-02-24 Pedro Alves <palves@redhat.com>
12810
12811 * symtab.c (make_file_symbol_completion_list_1): Use
12812 add_symtab_completions.
12813
12814 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12815
12816 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12817
12818 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12819
12820 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12821 I386_MAX_REGISTER_SIZE.
12822 (i386_pseudo_register_write): Likewise.
12823 (i386_process_record): Likewise.
12824 * i387-tdep.c (i387_supply_xsave): Likewise.
12825 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12826 (store_register): Likewise.
12827
12828 2017-02-23 Pedro Alves <palves@redhat.com>
12829
12830 * ada-lang.c: Include "common/function-view.h".
12831 (ada_iterate_over_symbols): Adjust to use function_view as
12832 callback type.
12833 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12834 (ada_make_symbol_completion_list): Use a lambda.
12835 (ada_exc_search_name_matches): Delete.
12836 (name_matches_regex): New.
12837 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12838 * compile/compile-c-support.c: Include "common/function-view.h".
12839 (print_one_macro): Change prototype to accept a ui_file pointer.
12840 (write_macro_definitions): Use a lambda.
12841 * dwarf2read.c: Include "common/function-view.h".
12842 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12843 (dw2_expand_symtabs_matching): Adjust to use function_view as
12844 callback type.
12845 * language.h: Include "common/function-view.h".
12846 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12847 function_view as callback type.
12848 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12849 * linespec.c: Include "common/function-view.h".
12850 (collect_info::add_symbol): New method.
12851 (struct symbol_and_data_callback, iterate_inline_only, struct
12852 symbol_matcher_data, iterate_name_matcher): Delete.
12853 (iterate_over_all_matching_symtabs): Adjust to use function_view
12854 as callback type and lambdas.
12855 (iterate_over_file_blocks): Adjust to use function_view as
12856 callback type.
12857 (decode_compound_collector): Now a class with private fields.
12858 (decode_compound_collector::release_symbols): New method.
12859 (collect_one_symbol): Rename to...
12860 (decode_compound_collector::operator()): ... this and adjust.
12861 (lookup_prefix_sym): decode_compound_collector construction bits
12862 move to decode_compound_collector ctor. Pass the
12863 decode_compound_collector object directly as callback. Remove
12864 cleanups and use decode_compound_collector::release_symbols
12865 instead.
12866 (symtab_collector): Now a class with private fields.
12867 (symtab_collector::release_symtabs): New method.
12868 (add_symtabs_to_list): Rename to...
12869 (symtab_collector::operator()): ... this and adjust.
12870 (collect_symtabs_from_filename): symtab_collector construction
12871 bits move to symtab_collector ctor. Pass the symtab_collector
12872 object directly as callback. Remove cleanups and use
12873 symtab_collector::release_symtabs instead.
12874 (collect_symbols): Delete.
12875 (add_matching_symbols_to_info): Use lambdas.
12876 * macrocmd.c (print_macro_callback): Delete.
12877 (info_macro_command): Use a lambda.
12878 (info_macros_command): Pass print_macro_definition as callable
12879 directly.
12880 (print_one_macro): Remove 'ignore' parameter.
12881 (macro_list_command): Adjust.
12882 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12883 (macro_for_each_data::user_data): Delete field.
12884 (foreach_macro): Adjust to call the function_view.
12885 (macro_for_each): Adjust to use function_view as callback type.
12886 (foreach_macro_in_scope): Adjust to call the function_view.
12887 (macro_for_each_in_scope): Adjust to use function_view as callback
12888 type.
12889 * macrotab.h: Include "common/function-view.h".
12890 (macro_callback_fn): Declare a prototype instead of a pointer.
12891 Remove "user_data" parameter.
12892 (macro_for_each, macro_for_each_in_scope): Adjust to use
12893 function_view as callback type.
12894 * psymtab.c (partial_map_expand_apply)
12895 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12896 Adjust to use function_view as callback type and to return bool.
12897 (psym_expand_symtabs_matching): Adjust to use function_view as
12898 callback types.
12899 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12900 to use function_view as callback type and to return bool.
12901 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12902 callback types.
12903 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12904 as callback types.
12905 * symfile.h: Include "common/function-view.h".
12906 (expand_symtabs_file_matcher_ftype)
12907 (expand_symtabs_symbol_matcher_ftype)
12908 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12909 return bool.
12910 (quick_symbol_functions::map_symtabs_matching_filename)
12911 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12912 function_view as callback type and return bool.
12913 (expand_symtabs_matching): Adjust to use function_view as callback
12914 type.
12915 (maintenance_expand_name_matcher)
12916 (maintenance_expand_file_matcher): Delete.
12917 (maintenance_expand_symtabs): Use lambdas.
12918 * symtab.c (iterate_over_some_symtabs): Adjust to use
12919 function_view as callback types and return bool.
12920 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12921 of a cleanup.
12922 (lookup_symtab_callback): Delete.
12923 (lookup_symtab): Use a lambda.
12924 (iterate_over_symbols): Adjust to use function_view as callback
12925 type.
12926 (struct search_symbols_data, search_symbols_file_matches)
12927 (search_symbols_name_matches): Delete.
12928 (search_symbols): Use a pair of lambdas.
12929 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12930 (symtab_expansion_callback): Delete.
12931 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12932 * symtab.h: Include "common/function-view.h".
12933 (iterate_over_some_symtabs): Adjust to use function_view as
12934 callback type and return bool.
12935 (iterate_over_symtabs): Adjust to use function_view as callback
12936 type.
12937 (symbol_found_callback_ftype): Remove 'data' parameter and return
12938 bool.
12939 (iterate_over_symbols): Adjust to use function_view as callback
12940 type.
12941
12942 2017-02-23 Pedro Alves <palves@redhat.com>
12943
12944 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12945 (%.o) <unittests/%.c>: New pattern.
12946 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12947 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12948 * common/function-view.h: New file.
12949 * unittests/function-view-selftests.c: New file.
12950 * configure: Regenerate.
12951
12952 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12953
12954 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12955 inferior_ptid.
12956 * go32-nat.c (go32_thread_alive): Likewise.
12957
12958 2017-02-23 Yao Qi <yao.qi@linaro.org>
12959
12960 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12961 delete.
12962
12963 2017-02-23 Yao Qi <yao.qi@linaro.org>
12964
12965 * varobj.c (varobj_clear_saved_item): Use delete instead of
12966 xfree.
12967 (update_dynamic_varobj_children): Likewise.
12968
12969 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12970
12971 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12972
12973 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12974
12975 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12976 m_enum_value to 0 in default constructor.
12977
12978 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12979
12980 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12981 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12982 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12983 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12984 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12985 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12986 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12987 IS_STORE_CONDITIONAL_INSN.
12988
12989 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12990
12991 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12992
12993 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12994
12995 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12996
12997 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12998
12999 * dwarf2read.c (skip_one_die, read_attribute_value)
13000 (dwarf2_const_value_attr, dump_die_shallow)
13001 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13002 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13003
13004 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13005
13006 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13007 (dwarf_parse_macro_header): Accept DWARF version 5.
13008 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13009
13010 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13011
13012 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13013 DW_AT_GNU_*.
13014 * common/common-exceptions.h (enum errors): Likewise.
13015 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13016 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13017 (dwarf_expr_context::execute_stack_op): Likewise.
13018 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13019 Likewise.
13020 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13021 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13022 (show_entry_values_debug, call_site_to_target_addr)
13023 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13024 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13025 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13026 (value_of_dwarf_block_entry, indirect_pieced_value)
13027 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13028 (disassemble_dwarf_expression): Likewise.
13029 * dwarf2read.c (process_die, inherit_abstract_dies)
13030 (read_call_site_scope): Likewise.
13031 * gdbtypes.h (struct func_type, struct call_site_parameter)
13032 (struct call_site): Likewise.
13033 * stack.c (read_frame_arg): Likewise.
13034 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13035
13036 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13037
13038 * defs.h (read_unsigned_leb128): New declaration.
13039 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13040 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13041 (dwarf2_find_location_expression): Call also
13042 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13043 * dwarf2loc.h (dwarf2_version): New declaration.
13044 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13045 rnglists.
13046 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13047 .debug_rnglists.
13048 (struct dwop_section_names): Add loclists_dwo.
13049 (dwop_section_names): Add .debug_loclists.dwo.
13050 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13051 (struct dwarf2_per_cu_data): Add dwarf_version.
13052 (struct dwo_sections): Add loclists.
13053 (struct attr_abbrev): Add implicit_const.
13054 (read_indirect_line_string): New declaration.
13055 (read_unsigned_leb128): Delete declaration.
13056 (rcuh_kind): New definition.
13057 (read_and_check_comp_unit_head): Change parameter
13058 is_debug_types_section to section_kind.
13059 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13060 (read_comp_unit_head): Change parameter abfd to section, add parameter
13061 section_kind. Handle DWARF-5.
13062 (error_check_comp_unit_head): Accept also DWARF version 5.
13063 (read_and_check_comp_unit_head): Change parameter
13064 is_debug_types_section to section_kind.
13065 (read_and_check_type_unit_head): Delete function.
13066 (read_abbrev_offset): Handle DWARF-5.
13067 (create_debug_type_hash_table): Add parameter section_kind. Process
13068 only DW_UT_type. Use signature and type_offset_in_tu from struct
13069 comp_unit_head.
13070 (create_debug_types_hash_table): Update create_debug_type_hash_table
13071 caller.
13072 (create_all_type_units): Call create_debug_type_hash_table.
13073 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13074 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13075 caller.
13076 (skip_one_die): Handle DW_FORM_implicit_const.
13077 (dwarf2_rnglists_process): New function.
13078 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13079 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13080 (read_attribute_value): Handle DW_FORM_implicit_const,
13081 DW_FORM_line_strp.
13082 (read_attribute): Handle DW_FORM_implicit_const.
13083 (read_indirect_string_at_offset_from): New function from
13084 read_indirect_string_at_offset.
13085 (read_indirect_string_at_offset): Call
13086 read_indirect_string_at_offset_from.
13087 (read_indirect_line_string_at_offset): New function.
13088 (read_indirect_string): New function comment.
13089 (read_indirect_line_string): New function.
13090 (read_unsigned_leb128): Make it global.
13091 (dwarf2_string_attr): Handle DWARF-5.
13092 (add_include_dir_stub, read_formatted_entries): New functions.
13093 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13094 Handle DWARF-5.
13095 (per_cu_header_read_in): Update read_comp_unit_head caller.
13096 (dwarf2_version): New function.
13097 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13098 rnglists.
13099 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13100 fields.
13101
13102 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13103
13104 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13105
13106 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13107
13108 * dwarf2read.c (dwarf2_ranges_process): New function from
13109 dwarf2_ranges_read.
13110 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13111 dwarf2_ranges_process.
13112
13113 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13114
13115 * dwarf2read.c (create_debug_type_hash_table): New function from
13116 create_debug_types_hash_table.
13117 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13118 (create_all_type_units, open_and_init_dwo_file): Update
13119 create_debug_types_hash_table callers.
13120
13121 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13122
13123 PR gdb/16188
13124 * fork-child.c (trace_start_error): Fix thinko. va_end should
13125 refer to 'ap', not 'args'.
13126
13127 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13128 Pedro Alves <palves@redhat.com>
13129
13130 PR gdb/16188
13131 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13132 calls succeeded.
13133 * fork-child.c (trace_start_error): New function.
13134 (trace_start_error_with_name): Likewise.
13135 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13136 * inf-ptrace.c (inf_ptrace_me): Likewise.
13137 * inferior.h (trace_start_error): New prototype.
13138 (trace_start_error_with_name): Likewise.
13139
13140 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13141
13142 PR gdb/21164
13143 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13144 NULL before using it.
13145 * symmisc.c (maintenance_print_symbols): Likewise.
13146 (maintenance_print_msymbols): Likewise.
13147
13148 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13149
13150 * NEWS: Add record Python bindings entry.
13151
13152 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13153
13154 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13155 py-record-full.o.
13156 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13157 * python/py-record-btrace.c, python/py-record-btrace.h,
13158 python/py-record-full.c, python/py-record-full.h: New file.
13159 * python/py-record.c: Add include for py-record-btrace.h and
13160 py-record-full.h.
13161 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13162 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13163 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13164 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13165 New definition.
13166 (gdbpy_initialize_btrace): New export.
13167 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13168
13169 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13170
13171 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13172 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13173 * python/py-record.c: New file.
13174 * python/python-internal.h (gdbpy_start_recording,
13175 gdbpy_current_recording, gdpy_stop_recording,
13176 gdbpy_initialize_record): New export.
13177 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13178 (python_GdbMethods): Add gdbpy_start_recording,
13179 gdbpy_current_recording and gdbpy_stop_recording.
13180
13181 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13182
13183 * record-btrace.c (record_btrace_record_method): New function.
13184 (init_record_btrace_ops): Initialize to_record_method.
13185 * record-full.c (record_full_record_method): New function.
13186 (init_record_full_ops, init_record_full_core_ops): Add
13187 record_full_record_method.
13188 * record.h (enum record_method): New enum.
13189 * target-debug.h (target_debug_print_enum_record_method: New define.
13190 * target-delegates.c: Regenerate.
13191 * target.c (target_record_method): New function.
13192 * target.h: Include record.h.
13193 (struct target_ops) <to_record_method>: New field.
13194 (target_record_method): New export.
13195
13196 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13197
13198 * record.h (record_start, record_stop): New export.
13199 * record.c (record_start, record_stop): New function.
13200
13201 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13202
13203 * btrace.c (btrace_fetch): Copy function call segments pointer
13204 into a vector.
13205 (btrace_clear): Clear the vector.
13206 (btrace_find_insn_by_number): Use binary search to find the correct
13207 function call segment.
13208 * btrace.h (brace_fun_p): New typedef.
13209 (struct btrace_thread_info) <functions>: New field.
13210
13211 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13212
13213 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13214 * btrace.c (btrace_decode_error): ... here. New function.
13215 * btrace.h (btrace_decode_error): New export.
13216
13217 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13218
13219 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13220 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13221 btrace_find_insn_by_number): Remove special case for gaps.
13222 * btrace.h (btrace_insn_get_error): New export.
13223 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13224 * record-btrace.c (btrace_insn_history): Print number for gaps.
13225 (record_btrace_info, record_btrace_goto): Handle gaps.
13226
13227 2017-02-14 Tom Tromey <tom@tromey.com>
13228
13229 PR python/13598:
13230 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13231 event.
13232 * python/py-evts.c (gdbpy_initialize_py_events): Add
13233 before_prompt registry.
13234 * python/py-events.h (events_object) <before_prompt>: New field.
13235
13236 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13237
13238 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13239
13240 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
13241
13242 * symfile (_initialize_symfile): Add usage text to the load command's
13243 help text.
13244
13245 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13246
13247 * utils.c (defaulted_query): Don't query on secondary UIs.
13248
13249 2017-02-10 Tom Tromey <tom@tromey.com>
13250
13251 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13252
13253 2017-02-10 Tom Tromey <tom@tromey.com>
13254
13255 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13256 "cleanup" local.
13257 * python/py-type.c (typy_legacy_template_argument): Remove
13258 unnecessary "cleanup" local.
13259
13260 2017-02-10 Tom Tromey <tom@tromey.com>
13261
13262 * python/python.c (do_start_initialization): New function, from
13263 _initialize_python.
13264 (_initialize_python): Call do_start_initialization.
13265 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13266 goto.
13267
13268 2017-02-10 Tom Tromey <tom@tromey.com>
13269
13270 * python/py-prettyprint.c (pretty_print_one_value): Use
13271 gdbpy_ref.
13272
13273 2017-02-10 Tom Tromey <tom@tromey.com>
13274
13275 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13276 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13277 gdbpy_ref.
13278 * python/py-type.c (field_new): Use gdbpy_ref.
13279 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13280 gdbpy_ref.
13281 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13282 (py_free_pspace): Likewise.
13283 (pspace_to_pspace_object): Likewise.
13284 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13285 (py_free_objfile): Likewise.
13286 (objfile_to_objfile_object): Likewise.
13287 * python/py-inferior.c (delete_thread_object): Use
13288 gdbpy_ref.
13289 (infpy_read_memory): Likewise.
13290 (py_free_inferior): Likewise.
13291 * python/py-evtregistry.c (create_eventregistry_object): Use
13292 gdbpy_ref.
13293 * python/py-event.c (create_event_object): Use gdbpy_ref.
13294
13295 2017-02-10 Tom Tromey <tom@tromey.com>
13296
13297 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13298 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13299 used.
13300 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13301 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13302 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13303 python/py-framefilter.c, python/py-function.c,
13304 python/py-inferior.c, python/py-infevents.c,
13305 python/py-linetable.c, python/py-newobjfileevent.c,
13306 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13307 python/py-signalevent.c, python/py-stopevent.c,
13308 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13309 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13310 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13311 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13312
13313 2017-02-10 Tom Tromey <tom@tromey.com>
13314
13315 * ui-out.h (ui_out_emit_type): New class.
13316 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13317 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13318 and ui_out_emit_tuple.
13319 (enumerate_locals): Likewise.
13320 (py_mi_print_variables, py_print_locals, py_print_args): Use
13321 ui_out_emit_list.
13322 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13323 ui_out_emit_list.
13324 * common/gdb_optional.h: New file.
13325
13326 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13327
13328 * MAINTAINERS (Write After Approval): Update my e-mail address.
13329
13330 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13331
13332 PR gdb/21122
13333 * breakpoint.c (_initialize_breakpoint): Update the help description
13334 of the 'commands' command to indicate that it takes a list argument.
13335
13336 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13337
13338 * interps.c (current_interp_set_logging): Remove "return".
13339
13340 2017-02-09 Gary Benson <gbenson@redhat.com>
13341
13342 * symtab.c (add_symtab_completions): Prevent NULL pointer
13343 dereference.
13344
13345 2017-02-08 Pedro Alves <palves@redhat.com>
13346
13347 * interps.c (interp::interp): Remove reference to quiet_p.
13348 (interp_set): Make static. Remove dead "Switching to" output
13349 code.
13350 (interp_quiet_p, interp_set_quiet): Delete.
13351 (interpreter_exec_cmd): Don't set the interpreter quiet.
13352 * interps.h (interp_quiet_p): Make static.
13353 (class interp) <quiet_p>: Remove field
13354
13355 2017-02-08 Jerome Guitton <guitton@adacore.com>
13356
13357 * cli/cli-decode.c (find_command_name_length): Make it extern.
13358 * cli/cli-decode.h (find_command_name_length): Declare.
13359 * cli/cli-script.c (command_name_equals, line_first_arg):
13360 New functions.
13361 (process_next_line): Use cli-decode to parse command names.
13362 (build_command_line): Make args a constant pointer.
13363
13364 2017-02-08 Jerome Guitton <guitton@adacore.com>
13365
13366 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13367 Remove case-insensitive search.
13368
13369 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13370
13371 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13372 at the end of the line. Avoids an ARI warning.
13373
13374 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
13375
13376 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13377 rdseed instructions.
13378 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13379
13380 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13381
13382 PR tdep/20936
13383 Provide and use sparc32 and sparc64 target description XML files.
13384 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13385 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13386 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13387 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13388 * features/sparc/sparc32-solaris.xml: New file.
13389 * features/sparc/sparc64-solaris.xml: New file.
13390 * features/sparc/sparc32-solaris.c: Generated.
13391 * features/sparc/sparc64-solaris.c: Generated.
13392 * sparc-tdep.h: Account for differences in target descriptions.
13393 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13394 (sparc32_register_type): Use target provided registers.
13395 (validate_tdesc_registers): New function.
13396 (sparc32_gdbarch_init): Use tdesc_has_registers.
13397 Set pseudoregister functions.
13398 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13399 (sparc64_register_type): Use target provided registers.
13400 (sparc64_init_abi): Set pseudoregister functions.
13401
13402 2017-02-03 Tom Tromey <tom@tromey.com>
13403
13404 PR rust/21097:
13405 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13406 with a single member.
13407
13408 2017-02-03 Pedro Alves <palves@redhat.com>
13409
13410 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13411 (cli_interp_base::~cli_interp_base): New.
13412 (cli_interp): New struct.
13413 (as_cli_interp): Cast the interp itself to cli_interp.
13414 (cli_interpreter_pre_command_loop): Rename to ...
13415 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13416 parameter.
13417 (cli_interpreter_init): Rename to ...
13418 (cli_interp::init): ... this. Remove 'self' parameter. Use
13419 boolean. Make extern.
13420 (cli_interpreter_resume): Rename to ...
13421 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13422 extern.
13423 (cli_interpreter_suspend): Rename to ...
13424 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13425 extern.
13426 (cli_interpreter_exec): Rename to ...
13427 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13428 extern.
13429 (cli_interpreter_supports_command_editing): Rename to ...
13430 (cli_interp_base::supports_command_editing): ... this. Remove
13431 'interp' parameter. Make extern.
13432 (cli_ui_out): Rename to ...
13433 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13434 Make extern.
13435 (cli_set_logging): Rename to ...
13436 (cli_interp_base::set_logging): ... this. Remove 'interp'
13437 parameter. Make extern.
13438 (cli_interp_procs): Delete.
13439 (cli_interp_factory): Adjust to use "new".
13440 * cli/cli-interp.h: Include "interps.h".
13441 (struct cli_interp_base): New struct.
13442 * interps.c (struct interp): Delete. Fields moved to interps.h.
13443 (interp_new): Delete.
13444 (interp::interp, interp::~interp): New.
13445 (interp_set): Use bool, and return void. Assume the interpreter
13446 has suspend, init and resume methods, and that the all return
13447 void.
13448 (set_top_level_interpreter): interp_set returns void.
13449 (interp_ui_out): Adapt.
13450 (current_interp_set_logging): Adapt.
13451 (interp_data): Delete.
13452 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13453 (interp_exec): Adapt.
13454 (top_level_interpreter_data): Delete.
13455 * interps.h (interp_init_ftype, interp_resume_ftype)
13456 (interp_suspend_ftype, interp_exec_ftype)
13457 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13458 (class interp): New.
13459 (interp_new): Delete.
13460 (interp_set): Now returns void. Use bool.
13461 (interp_data, top_level_interpreter_data): Delete.
13462 * mi/mi-common.h: Include interps.h.
13463 (class mi_interp): Inherit from interp. Define a ctor. Declare
13464 init, resume, suspect, exec, interp_ui_out, set_logging and
13465 pre_command_loop methods.
13466 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13467 (mi_interpreter_init): Rename to ...
13468 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13469 bool, return void and make extern. Adjust.
13470 (mi_interpreter_resume): ... Rename to ...
13471 (mi_interp::resume): ... this. Remove the 'data' parameter,
13472 return void and make extern. Adjust.
13473 (mi_interpreter_suspend): ... Rename to ...
13474 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13475 return void and make extern. Adjust.
13476 (mi_interpreter_exec): ... Rename to ...
13477 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13478 extern. Adjust.
13479 (mi_interpreter_pre_command_loop): ... Rename to ...
13480 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13481 parameter and make extern.
13482 (mi_on_normal_stop_1): Adjust.
13483 (mi_ui_out): Rename to ...
13484 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13485 parameter and make extern. Adjust.
13486 (mi_set_logging): Rename to ...
13487 (mi_interp::set_logging): ... this. Remove the 'interp'
13488 parameter and make extern. Adjust.
13489 (mi_interp_procs): Delete.
13490 (mi_interp_factory): Adjust to use 'new'.
13491 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13492 (mi_print_exception, mi_execute_command, mi_load_progress):
13493 Adjust.
13494 * tui/tui-interp.c (tui_interp): New class.
13495 (as_tui_interp): Return a tui_interp pointer.
13496 (tui_on_normal_stop, tui_on_signal_received)
13497 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13498 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13499 to use interp::interp_ui_out.
13500 (tui_init): Rename to ...
13501 (tui_interp::init): ... this. Remove the 'self' parameter, use
13502 bool, return void and make extern. Adjust.
13503 (tui_resume): Rename to ...
13504 (tui_interp::resume): ... this. Remove the 'data' parameter,
13505 return void and make extern. Adjust.
13506 (tui_suspend): Rename to ...
13507 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13508 return void and make extern. Adjust.
13509 (tui_ui_out): Rename to ...
13510 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13511 parameter, and make extern. Adjust.
13512 (tui_exec): Rename to ...
13513 (tui_interp::exec): ... this. Remove the 'data' parameter and
13514 make extern.
13515 (tui_interp_procs): Delete.
13516 (tui_interp_factory): Use "new".
13517
13518 2017-02-02 Tom Tromey <tom@tromey.com>
13519
13520 * rust-exp.y (ends_raw_string, space_then_number)
13521 (rust_identifier_start_p): Return bool.
13522 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13523 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13524 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13525 (rust_chartype_p): Return bool.
13526 (val_print_struct, rust_print_struct_def, rust_print_type):
13527 Update.
13528 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13529 Return bool.
13530
13531 2017-02-02 Tom Tromey <tom@tromey.com>
13532
13533 * rust-lang.c: Reindent.
13534
13535 2017-02-02 Tom Tromey <tom@tromey.com>
13536
13537 * rust-lang.h (rust_crate_for_block): Update.
13538 * rust-lang.c (rust_crate_for_block): Return std::string.
13539 (rust_get_disr_info): Use std:;string, not
13540 gdb::unique_xmalloc_ptr.
13541 * rust-exp.y (crate_name): Update.
13542
13543 2017-02-02 Pedro Alves <palves@redhat.com>
13544
13545 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13546 field out of gdb_disassembler_test and make it static.
13547
13548 2017-02-02 Pedro Alves <palves@redhat.com>
13549
13550 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13551 mi1_interp and mi_interp fields.
13552
13553 2017-02-02 Pedro Alves <palves@redhat.com>
13554
13555 * cli/cli-interp.c (struct saved_output_files, saved_output):
13556 Moved from cli/cli-logging.c.
13557 (cli_set_logging): New function.
13558 (cli_interp_procs): Install cli_set_logging.
13559 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13560 Declare.
13561 * cli/cli-logging.c (struct saved_output_files, saved_output):
13562 Moved to cli/cli-interp.c.
13563 (pop_output_files): Don't save outputs here.
13564 (make_logging_output): New function.
13565 (handle_redirections): Don't build tee nor save previous outputs
13566 here.
13567 * interps.c (current_interp_set_logging): Change prototype.
13568 Assume there's always a set_logging_proc method installed.
13569 * interps.h (interp_set_logging_ftype): Change prototype.
13570 (current_interp_set_logging): Change prototype and adjust comment.
13571 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13572 use make_logging_output.
13573 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13574 2017-02-02 Pedro Alves <palves@redhat.com>
13575
13576 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13577 from ...
13578 (set_logging_overwrite): ... here.
13579 (logging_no_redirect_file): Delete.
13580 (set_logging_redirect): Don't handle redirection on the fly.
13581 Instead warn that "logging off" / "logging on" is necessary.
13582 (pop_output_files): Delete references to logging_no_redirect_file.
13583 (show_logging_command): Always speak in terms of what will happen
13584 once logging is reenabled.
13585
13586 2017-02-02 Pedro Alves <palves@redhat.com>
13587
13588 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13589
13590 2017-02-02 Pedro Alves <palves@redhat.com>
13591
13592 * disasm.c (gdb_pretty_print_insn): Rename to ...
13593 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13594 Remove gdbarch parameter. Adapt to clear the object's buffers
13595 instead of allocating new buffers, and to print using the object's
13596 gdb_disassembler instead of calling gdb_print_insn.
13597 (dump_insns): Use gdb_pretty_print_disassembler.
13598 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13599 (gdb_pretty_print_disassembler): New class.
13600 * record-btrace.c (btrace_insn_history): Use
13601 gdb_pretty_print_disassembler.
13602
13603 2017-02-02 Pedro Alves <palves@redhat.com>
13604
13605 * ada-lang.c (type_as_string): Use string_file.
13606 * ada-valprint.c (ada_print_floating): Use string_file.
13607 * ada-varobj.c (ada_varobj_scalar_image)
13608 (ada_varobj_get_value_image): Use string_file.
13609 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13610 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13611 * breakpoint.c (update_inserted_breakpoint_locations)
13612 (insert_breakpoint_locations, reattach_breakpoints)
13613 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13614 (print_it_watchpoint): Use string_file.
13615 (save_breakpoints): Use stdio_file.
13616 * c-exp.y (oper): Use string_file.
13617 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13618 tee_file.
13619 (pop_output_files): Use delete.
13620 (handle_redirections): Use stdio_file and tee_file.
13621 * cli/cli-setshow.c (do_show_command): Use string_file.
13622 * compile/compile-c-support.c (c_compute_program): Use
13623 string_file.
13624 * compile/compile-c-symbols.c (generate_vla_size): Take a
13625 'string_file &' instead of a 'ui_file *'.
13626 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13627 of a 'ui_file *'. Use string_file.
13628 (generate_c_for_variable_locations): Take a 'string_file &'
13629 instead of a 'ui_file *'.
13630 * compile/compile-internal.h (generate_c_for_for_one_variable):
13631 Take a 'string_file &' instead of a 'ui_file *'.
13632 * compile/compile-loc2c.c (push, pushf, unary, binary)
13633 (print_label, pushf_register_address, pushf_register)
13634 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13635 'ui_file *'. Adjust.
13636 * compile/compile.c (compile_to_object): Use string_file.
13637 * compile/compile.h (compile_dwarf_expr_to_c)
13638 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13639 'ui_file *'.
13640 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13641 (replace_typedefs_qualified_name): Use string_file and
13642 obstack_copy0.
13643 * disasm.c (gdb_pretty_print_insn): Use string_file.
13644 (gdb_disassembly): Adjust reference the null_stream global.
13645 (do_ui_file_delete): Delete.
13646 (gdb_insn_length): Use null_stream.
13647 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13648 * dwarf2loc.c (dwarf2_compile_property_to_c)
13649 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13650 'string_file &' instead of a 'ui_file *'.
13651 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13652 * dwarf2read.c (do_ui_file_peek_last): Delete.
13653 (dwarf2_compute_name): Use string_file.
13654 * event-top.c (gdb_setup_readline): Use stdio_file.
13655 * gdbarch.sh (verify_gdbarch): Use string_file.
13656 * gdbtypes.c (safe_parse_type): Use null_stream.
13657 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13658 string_file.
13659 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13660 'string_file *' instead of a 'ui_file *'.
13661 (gdbscm_arch_disassemble): Use string_file.
13662 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13663 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13664 inherits from ui_file.
13665 (ioscm_file_port_delete, ioscm_file_port_rewind)
13666 (ioscm_file_port_put): Delete.
13667 (ioscm_file_port_write): Rename to ...
13668 (ioscm_file_port::write): ... this. Remove file_port_magic
13669 checks.
13670 (ioscm_file_port_new): Delete.
13671 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13672 ui_file_up.
13673 * guile/scm-type.c (tyscm_type_name): Use string_file.
13674 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13675 Use string_file.
13676 * infcmd.c (print_return_value_1): Use string_file.
13677 * infrun.c (print_target_wait_results): Use string_file.
13678 * language.c (add_language): Use string_file.
13679 * location.c (explicit_to_string_internal): Use string_file.
13680 * main.c (captured_main_1): Use null_file.
13681 * maint.c (maintenance_print_architecture): Use stdio_file.
13682 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13683 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13684 event_channel>: Change type to mi_console_file pointer.
13685 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13686 (mi_console_file_delete): Delete.
13687 (struct mi_console_file): Delete.
13688 (mi_console_file_magic): Delete.
13689 (mi_console_file_new): Delete.
13690 (mi_console_file::mi_console_file): New.
13691 (mi_console_file_delete): Delete.
13692 (mi_console_file_fputs): Delete.
13693 (mi_console_file::write): New.
13694 (mi_console_raw_packet): Delete.
13695 (mi_console_file::flush): New.
13696 (mi_console_file_flush): Delete.
13697 (mi_console_set_raw): Rename to ...
13698 (mi_console_file::set_raw): ... this.
13699 * mi/mi-console.h (class mi_console_file): New class.
13700 (mi_console_file_new, mi_console_set_raw): Delete.
13701 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13702 (mi_set_logging): Use delete and tee_file. Adjust.
13703 * mi/mi-main.c (output_register): Use string_file.
13704 (mi_cmd_data_evaluate_expression): Use string_file.
13705 (mi_cmd_data_read_memory): Use string_file.
13706 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13707 * mi/mi-out.c (mi_ui_out::main_stream): New.
13708 (mi_ui_out::rewind): Use main_stream and
13709 string_file.
13710 (mi_ui_out::put): Use main_stream and string_file.
13711 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13712 Allocate a 'string_file' instead.
13713 (mi_out_new): Don't allocate a mem_fileopen stream here.
13714 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13715 (mi_ui_out::main_stream): Declare method.
13716 * printcmd.c (eval_command): Use string_file.
13717 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13718 * python/py-arch.c (archpy_disassemble): Use string_file.
13719 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13720 * python/py-frame.c (frapy_str): Use string_file.
13721 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13722 Use string_file.
13723 * python/py-type.c (typy_str): Use string_file.
13724 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13725 * python/py-value.c (valpy_str): Use string_file.
13726 * record-btrace.c (btrace_insn_history): Use string_file.
13727 * regcache.c (regcache_print): Use stdio_file.
13728 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13729 * remote.c (escape_buffer): Use string_file.
13730 * rust-lang.c (rust_get_disr_info): Use string_file.
13731 * serial.c (serial_open_ops_1): Use stdio_file.
13732 (do_serial_close): Use delete.
13733 * stack.c (print_frame_arg): Use string_file.
13734 (print_frame_args): Remove local mem_fileopen stream, not used.
13735 (print_frame): Use string_file.
13736 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13737 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13738 Take a 'string_file *' instead of a 'ui_file *'.
13739 * top.c (new_ui): Use stdio_file and stderr_file.
13740 (free_ui): Use delete.
13741 (execute_command_to_string): Use string_file.
13742 (quit_confirm): Use string_file.
13743 * tracepoint.c (collection_list::append_exp): Use string_file.
13744 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13745 * tui/tui-file.c: Don't include "ui-file.h".
13746 (enum streamtype, struct tui_stream): Delete.
13747 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13748 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13749 (tui_file::tui_file): New method.
13750 (tui_file_fputs): Delete.
13751 (tui_file_get_strbuf): Delete.
13752 (tui_file::puts): New method.
13753 (tui_file_adjust_strbuf): Delete.
13754 (tui_file_flush): Delete.
13755 (tui_file::flush): New method.
13756 * tui/tui-file.h: Tweak intro comment.
13757 Include ui-file.h.
13758 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13759 (tui_file_adjust_strbuf): Delete declarations.
13760 (class tui_file): New class.
13761 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13762 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13763 (tui_register_format): Use string_stream.
13764 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13765 (tui_get_function_from_frame): Use string_file.
13766 * typeprint.c (type_to_string): Use string_file.
13767 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13768 (null_stream): New global.
13769 (ui_file_delete): Delete.
13770 (ui_file::ui_file): New.
13771 (null_file_isatty): Delete.
13772 (ui_file::~ui_file): New.
13773 (null_file_rewind): Delete.
13774 (ui_file::printf): New.
13775 (null_file_put): Delete.
13776 (null_file_flush): Delete.
13777 (ui_file::putstr): New.
13778 (null_file_write): Delete.
13779 (ui_file::putstrn): New.
13780 (null_file_read): Delete.
13781 (ui_file::putc): New.
13782 (null_file_fputs): Delete.
13783 (null_file_write_async_safe): Delete.
13784 (ui_file::vprintf): New.
13785 (null_file_delete): Delete.
13786 (null_file::write): New.
13787 (null_file_fseek): Delete.
13788 (null_file::puts): New.
13789 (ui_file_data): Delete.
13790 (null_file::write_async_safe): New.
13791 (gdb_flush, ui_file_isatty): Adjust.
13792 (ui_file_put, ui_file_rewind): Delete.
13793 (ui_file_write): Adjust.
13794 (ui_file_write_for_put): Delete.
13795 (ui_file_write_async_safe, ui_file_read): Adjust.
13796 (ui_file_fseek): Delete.
13797 (fputs_unfiltered): Adjust.
13798 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13799 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13800 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13801 (set_ui_file_data): Delete.
13802 (string_file::~string_file, string_file::write)
13803 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13804 (do_ui_file_as_string, ui_file_as_string): Delete.
13805 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13806 (struct mem_file): Delete.
13807 (mem_file_new): Delete.
13808 (stdio_file::stdio_file): New.
13809 (mem_file_delete): Delete.
13810 (stdio_file::stdio_file): New.
13811 (mem_fileopen): Delete.
13812 (stdio_file::~stdio_file): New.
13813 (mem_file_rewind): Delete.
13814 (stdio_file::set_stream): New.
13815 (mem_file_put): Delete.
13816 (stdio_file::open): New.
13817 (mem_file_write): Delete.
13818 (stdio_file_magic, struct stdio_file): Delete.
13819 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13820 (stdio_file::flush): New.
13821 (stdio_file_read): Rename to ...
13822 (stdio_file::read): ... this. Adjust.
13823 (stdio_file_write): Rename to ...
13824 (stdio_file::write): ... this. Adjust.
13825 (stdio_file_write_async_safe): Rename to ...
13826 (stdio_file::write_async_safe) ... this. Adjust.
13827 (stdio_file_fputs): Rename to ...
13828 (stdio_file::puts) ... this. Adjust.
13829 (stdio_file_isatty): Delete.
13830 (stdio_file_fseek): Delete.
13831 (stdio_file::isatty): New.
13832 (stderr_file_write): Rename to ...
13833 (stderr_file::write) ... this. Adjust.
13834 (stderr_file_fputs): Rename to ...
13835 (stderr_file::puts) ... this. Adjust.
13836 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13837 (stderr_file::stderr_file): New.
13838 (tee_file_magic): Delete.
13839 (struct tee_file): Delete.
13840 (tee_file::tee_file): New.
13841 (tee_file_new): Delete.
13842 (tee_file::~tee_file): New.
13843 (tee_file_delete): Delete.
13844 (tee_file_flush): Rename to ...
13845 (tee_file::flush): ... this. Adjust.
13846 (tee_file_write): Rename to ...
13847 (tee_file::write): ... this. Adjust.
13848 (tee_file::write_async_safe): New.
13849 (tee_file_fputs): Rename to ...
13850 (tee_file::puts): ... this. Adjust.
13851 (tee_file_isatty): Rename to ...
13852 (tee_file::isatty): ... this. Adjust.
13853 * ui-file.h (struct obstack, struct ui_file): Don't
13854 forward-declare.
13855 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13856 (ui_file_write_ftype)
13857 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13858 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13859 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13860 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13861 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13862 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13863 (set_ui_file_fseek): Delete.
13864 (ui_file_data, ui_file_delete, ui_file_rewind)
13865 (struct ui_file): New.
13866 (ui_file_up): New.
13867 (class null_file): New.
13868 (null_stream): Declare.
13869 (ui_file_write_for_put, ui_file_put): Delete.
13870 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13871 Delete.
13872 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13873 (gdb_fopen, tee_file_new): Delete.
13874 (struct string_file): New.
13875 (struct stdio_file): New.
13876 (stdio_file_up): New.
13877 (struct stderr_file): New.
13878 (class tee_file): New.
13879 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13880 of a 'ui_file *'. Adjust.
13881 * ui-out.h (class ui_out) <field_stream>: Likewise.
13882 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13883 (null_stream): Delete.
13884 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13885 Adjust.
13886 * utils.h (struct ui_file): Delete forward declaration..
13887 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13888 (error_stream): Take a 'string_file &' instead of a
13889 'ui_file *'.
13890 * varobj.c (varobj_value_get_print_value): Use string_file.
13891 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13892 * gdbarch.c: Regenerate.
13893
13894 2017-02-02 Pedro Alves <palves@redhat.com>
13895
13896 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13897 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13898 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13899 Adjust to call gdb_print_insn instead of
13900 gdb_disassembler::print_insn.
13901 (dump_insns, do_mixed_source_and_assembly_deprecated)
13902 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13903 'gdbarch' parameter. Remove gdb_disassembler parameter.
13904 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13905 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13906 declaration.
13907 (gdb_pretty_print_insn): Re-add declaration.
13908 * record-btrace.c (btrace_insn_history): Don't allocate a
13909 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13910
13911 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13912
13913 * disasm.h (gdb_disassembly): Remove file_string parameter.
13914 * disasm.c (gdb_disassembly): Likewise.
13915 * cli/cli-cmds.c (print_disassembly): Adapt.
13916 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13917 * stack.c (do_gdb_disassembly): Likewise.
13918
13919 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13920
13921 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13922 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13923 targets. And if the implicit value is longer than needed, extract
13924 the first bytes instead of the "least significant" ones.
13925
13926 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13927
13928 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13929 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13930 (btrace_fetch): Assert can_access_registers_ptid.
13931 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13932 validate_registers_access.
13933
13934 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13935
13936 * gdbthread.h (can_access_registers_ptid): New.
13937 * thread.c (can_access_registers_ptid): New.
13938
13939 2017-02-01 Pedro Alves <palves@redhat.com>
13940
13941 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13942
13943 2017-01-31 Pedro Alves <palves@redhat.com>
13944
13945 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13946 Fix typos.
13947
13948 2017-01-31 Pedro Alves <palves@redhat.com>
13949
13950 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13951 not used.
13952
13953 2017-01-31 Pedro Alves <palves@redhat.com>
13954
13955 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13956
13957 2017-01-31 Pedro Alves <palves@redhat.com>
13958
13959 * common/scoped_restore.h
13960 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13961 change the value's parameter type to T2.
13962 (make_scoped_restore): Likewise.
13963
13964 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13965 Richard Henderson <rth@redhat.com>
13966
13967 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13968 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13969 GS_BASE for older kernels.
13970 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13971 GS_BASE for older kernels.
13972 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13973 and GS_BASE to the offset table.
13974 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13975 system register group.
13976 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13977 for older kernels.
13978 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13979 amd64 ABI.
13980 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13981 AMD64_GSBASE_REGNUM.
13982 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13983 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13984 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13985 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13986 i386/64bit-segments.xml in those rules.
13987 * features/i386/64bit-segments.xml: New file.
13988 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13989 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13990 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13991 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13992 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13993 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13994 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13995 * features/i386/amd64-avx-linux.c: Regenerated.
13996 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13997 * features/i386/amd64-avx-mpx.c: Regenerated.
13998 * features/i386/amd64-avx512-linux.c: Regenerated.
13999 * features/i386/amd64-linux.c: Regenerated.
14000 * features/i386/amd64-mpx-linux.c: Regenerated.
14001 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14002 * features/i386/i386-avx-mpx.c: Regenerated.
14003 * features/i386/x32-avx-linux.c: Regenerated.
14004 * features/i386/x32-avx512-linux.c: Regenerated.
14005 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14006 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14007 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14008 * regformats/i386/amd64-linux.dat: Regenerated.
14009 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14010 * regformats/i386/x32-avx-linux.dat: Regenerated.
14011 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14012 * regformats/i386/x32-linux.dat: Regenerated.
14013
14014 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14015
14016 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14017 Set to AMD64_NUM_REGS.
14018
14019 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14020
14021 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14022 that checks validity of a register number.
14023
14024 2017-01-27 Kees Cook <keescook@google.com>
14025
14026 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14027 fetch_fpregs if target has fpa registers.
14028 (arm_linux_store_inferior_registers): Call store_fpregs if target
14029 has fpa registers.
14030
14031 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14032
14033 * cris-tdep.c (cris_gdbarch_init): Remove check for
14034 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14035
14036 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14037
14038 * corelow.c (get_core_register_section): Check for regset
14039 existence before checking for REGSET_VARIABLE_SIZE.
14040
14041 2017-01-26 Yao Qi <yao.qi@linaro.org>
14042 Pedro Alves <palves@redhat.com>
14043
14044 PR gdb/20939
14045 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14046 call memory_error, save memaddr instead.
14047 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14048 negative, cal memory_error.
14049 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14050
14051 2017-01-26 Yao Qi <yao.qi@linaro.org>
14052
14053 * disasm-selftests.c (memory_error_test): New function.
14054 (_initialize_disasm_selftests): Register memory_error_test.
14055
14056 2017-01-26 Yao Qi <yao.qi@linaro.org>
14057
14058 * Makefile.in (SFILES): Add disasm-selftests.c and
14059 selftest-arch.c.
14060 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14061 * disasm-selftests.c: New file.
14062 * selftest-arch.c: New file.
14063 * selftest-arch.h: New file.
14064
14065 2017-01-26 Yao Qi <yao.qi@linaro.org>
14066
14067 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14068 to bfd_arch_mep. Don't return 0 if section is not
14069 found. Call print_insn_mep.
14070
14071 2017-01-26 Pedro Alves <palves@redhat.com>
14072 Yao Qi <yao.qi@linaro.org>
14073
14074 * arm-tdep.c: Include "disasm.h".
14075 (gdb_print_insn_arm): Update code to get gdbarch.
14076 * disasm.c (dis_asm_read_memory): Change it to
14077 gdb_disassembler::dis_asm_read_memory.
14078 (dis_asm_memory_error): Likewise.
14079 (dis_asm_print_address): Likewise.
14080 (gdb_pretty_print_insn): Change it to
14081 gdb_disassembler::pretty_print_insn.
14082 (dump_insns): Add one argument gdb_disassemlber. All
14083 callers updated.
14084 (do_mixed_source_and_assembly_deprecated): Likewise.
14085 (do_mixed_source_and_assembly): Likewise.
14086 (do_assembly_only): Likewise.
14087 (gdb_disassembler::gdb_disassembler): New.
14088 (gdb_disassembler::print_insn): New.
14089 * disasm.h (class gdb_disassembler): New.
14090 (gdb_pretty_print_insn): Remove declaration.
14091 (gdb_disassemble_info): Likewise.
14092 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14093 (gdbscm_disasm_read_memory_worker): Update.
14094 (gdbscm_disasm_read_memory): Update.
14095 (gdbscm_disasm_memory_error): Remove.
14096 (gdbscm_disasm_print_address): Remove.
14097 (gdbscm_disassembler::gdbscm_disassembler): New.
14098 (gdbscm_print_insn_from_port): Update.
14099 * mips-tdep.c: Include disasm.h.
14100 (gdb_print_insn_mips): Update code to get gdbarch.
14101 * record-btrace.c (btrace_insn_history): Update.
14102 * spu-tdep.c: Include disasm.h.
14103 (struct spu_dis_asm_data): Remove.
14104 (struct spu_dis_asm_info): New.
14105 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14106 SPU id.
14107 (gdb_print_insn_spu): Cast disassemble_info to
14108 spu_dis_asm_info.
14109
14110 2017-01-26 Yao Qi <yao.qi@linaro.org>
14111
14112 * disasm.c (do_ui_file_delete): Delete.
14113 (gdb_insn_length): Move code creating stream to ...
14114 * utils.c (null_stream): ... here. New function.
14115 * utils.h (null_stream): Declare.
14116
14117 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14118
14119 * python/py-inferior.c (find_thread_object): Return directly
14120 from the loop. Remove "found" variable.
14121
14122 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14123
14124 GDB 7.12.1 released.
14125
14126 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14127
14128 * python/py-function.c (fnpy_call): Reorder declarations to have
14129 the gdbpy_enter object declared first.
14130 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14131
14132 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14133
14134 PR python/21068
14135 * python/python-internal.h (PyMem_RawMalloc): Define for
14136 Python < 3.4.
14137 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14138 PyMem_RawMalloc instead of PyMem_Malloc.
14139
14140 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14141 Luis Machado <lgustavo@codesourcery.com>
14142
14143 * NEWS (New commands): Mention flash-erase.
14144 (New MI commands): Mention target-flash-erase.
14145 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14146 command.
14147 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14148 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14149 * target.c (flash_erase_command): New function.
14150 (initialize_targets): Add new flash-erase command.
14151 * target.h (flash_erase_command): New declaration.
14152
14153 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14154
14155 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14156 HAVE_SYS_PROCFS_H is defined.
14157
14158 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14159
14160 * remote.c (struct cached_reg): Change data into a pointer.
14161 * (stop_reply_dtr): Free data pointers before deleting vector.
14162 (process_stop_reply): Likewise.
14163 (remote_parse_stop_reply): Allocate space for data
14164
14165 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14166
14167 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14168 MAX_REGISTER_SIZE.
14169 (amd64_pseudo_register_read_value): Likewise.
14170 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14171 (store_register_using_P): Likewise.
14172 * regcache.c (regcache_xfer_part): Likewise.
14173
14174 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14175
14176 Split real and pseudo registers.
14177 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14178 (sparc32_pseudo_regnum): New enum.
14179 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14180 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14181 (SPARC32_CP0_REGISTERS): New macro.
14182 (sparc32_pseudo_register_name): New function.
14183 (sparc32_register_name): Use sparc32_pseudo_register_name.
14184 (sparc32_pseudo_register_type): New function.
14185 (sparc32_register_type): Use sparc32_pseudo_register_type.
14186 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14187 pseudo register numbers.
14188 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14189 (SPARC64_CP0_REGISTERS): New macro.
14190 (sparc64_pseudo_register_name): New function.
14191 (sparc64_register_name): Use sparc64_pseudo_register_name.
14192 (sparc64_pseudo_register_type): New function.
14193 (sparc64_register_type): Use sparc64_pseudo_register_type.
14194 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14195 pseudo register numbers.
14196 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14197 sparc64_store_arguments): Handle pseudo register numbers.
14198
14199 2017-01-13 Yao Qi <yao.qi@linaro.org>
14200
14201 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14202 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14203 output.
14204 (getpkt_or_notif_sane_1): Likewise.
14205
14206 2017-01-13 Yao Qi <yao.qi@linaro.org>
14207
14208 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14209 of CC. Pass "-x c++-header" instead of "-x c".
14210
14211 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14212
14213 * remote.c (remote_can_async_p): Update comment.
14214
14215 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14216
14217 * linux-nat.c (linux_nat_can_async_p): Update comment.
14218
14219 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14220
14221 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14222
14223 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14224
14225 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14226
14227 2017-01-10 Tom Tromey <tom@tromey.com>
14228
14229 * python/py-type.c (typy_legacy_template_argument): Update.
14230 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14231 ~demangle_parse_info): Declare new members.
14232 (cp_demangled_name_to_comp): Return unique_ptr.
14233 (cp_demangled_name_parse_free)
14234 (make_cleanup_cp_demangled_name_parse_free)
14235 (cp_new_demangle_parse_info): Remove.
14236 * cp-support.c (do_demangled_name_parse_free_cleanup)
14237 (make_cleanup_cp_demangled_name_parse_free): Remove.
14238 (inspect_type, cp_canonicalize_string_full)
14239 (cp_canonicalize_string): Update.
14240 (mangled_name_to_comp): Change return type.
14241 (cp_class_name_from_physname, method_name_from_physname)
14242 (cp_func_name, cp_remove_params): Update.
14243 * cp-name-parser.y (demangle_parse_info): New constructor, from
14244 cp_new_demangle_parse_info.
14245 (~demangle_parse_info): New destructor, from
14246 cp_demangled_name_parse_free.
14247 (cp_merge_demangle_parse_infos): Update.
14248 (cp_demangled_name_to_comp): Change return type.
14249
14250 2017-01-10 Tom Tromey <tom@tromey.com>
14251
14252 * top.c (prevent_dont_repeat): Change return type.
14253 * python/python.c (execute_gdb_command): Use std::string.
14254 Update.
14255 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14256 * command.h (prevent_dont_repeat): Change return type.
14257 * breakpoint.c (bpstat_do_actions_1): Update.
14258
14259 2017-01-10 Tom Tromey <tom@tromey.com>
14260
14261 * value.h (scoped_value_mark::~scoped_value_mark): Call
14262 free_to_mark.
14263 (scoped_value_mark::free_to_mark): New method.
14264 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14265 scoped_value_mark.
14266
14267 2017-01-10 Tom Tromey <tom@tromey.com>
14268
14269 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14270 (valpy_reference_value, valpy_const_value, valpy_get_address)
14271 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14272 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14273 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14274 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14275 scoped_value_mark.
14276 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14277 * value.h (scoped_value_mark): New class.
14278
14279 2017-01-10 Tom Tromey <tom@tromey.com>
14280
14281 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14282 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14283 * psymtab.c (discard_psymtabs_upto): Remove.
14284 (make_cleanup_discard_psymtabs): Remove.
14285 (struct psymtab_state): Remove.
14286
14287 2017-01-10 Tom Tromey <tom@tromey.com>
14288
14289 * record-full.c (record_full_save_cleanups): Remove.
14290 (record_full_save): Use gdb::unlinker.
14291 * gcore.c (do_bfd_delete_cleanup): Remove.
14292 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14293 cleanups.
14294 * dwarf2read.c (unlink_if_set): Remove.
14295 (write_psymtabs_to_index): Use gdb::unlinker.
14296 * common/gdb_unlinker.h: New file.
14297
14298 2017-01-10 Tom Tromey <tom@tromey.com>
14299
14300 * windows-tdep.c (windows_xfer_shared_library): Update.
14301 * windows-nat.c (windows_make_so): Update.
14302 * utils.h (make_cleanup_bfd_unref): Remove.
14303 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14304 * symfile.h (symfile_bfd_open)
14305 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14306 * symfile.c (read_symbols, symbol_file_add)
14307 (separate_debug_file_exists): Update.
14308 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14309 (generic_load, reread_symbols): Update.
14310 * symfile-mem.c (symbol_file_add_from_memory): Update.
14311 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14312 (spu_symbol_file_add_from_memory): Update.
14313 * solist.h (struct target_so_ops) <bfd_open>: Return
14314 gdb_bfd_ref_ptr.
14315 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14316 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14317 gdb_bfd_ref_ptr.
14318 (solib_map_sections, reload_shared_libraries_1): Update.
14319 * solib-svr4.c (enable_break): Update.
14320 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14321 * solib-frv.c (enable_break2): Update.
14322 * solib-dsbt.c (enable_break): Update.
14323 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14324 gdb_bfd_ref_ptr.
14325 (darwin_solib_get_all_image_info_addr_at_init): Update.
14326 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14327 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14328 * record-full.c (record_full_save): Update.
14329 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14330 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14331 * minidebug.c (find_separate_debug_file_in_section): Return
14332 gdb_bfd_ref_ptr.
14333 * machoread.c (macho_add_oso_symfile): Change abfd to
14334 gdb_bfd_ref_ptr.
14335 (macho_symfile_read_all_oso): Update.
14336 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14337 (macho_symfile_read): Update.
14338 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14339 (jit_bfd_try_read_symtab): Update.
14340 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14341 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14342 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14343 gdb_bfd_ref_ptr.
14344 (gdb_bfd_ref_policy): New struct.
14345 (gdb_bfd_ref_ptr): New typedef.
14346 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14347 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14348 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14349 gdb_bfd_ref_ptr.
14350 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14351 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14352 (gcore_command): Update.
14353 * exec.c (exec_file_attach): Update.
14354 * elfread.c (elf_symfile_read): Update.
14355 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14356 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14357 (open_and_init_dwo_file): Update.
14358 (open_dwp_file): Return gdb_bfd_ref_ptr.
14359 (open_and_init_dwp_file): Update.
14360 * corelow.c (core_open): Update.
14361 * compile/compile-object-load.c (compile_object_load): Update.
14362 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14363 * coffread.c (coff_symfile_read): Update.
14364 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14365 gdb_bfd_ref_ptr. Rename.
14366 (dump_bfd_file, restore_command): Update.
14367 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14368 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14369 (find_separate_debug_file_by_buildid): Update.
14370
14371 2017-01-10 Tom Tromey <tom@tromey.com>
14372
14373 * common/gdb_ref_ptr.h: New file.
14374 * python/py-ref.h (struct gdbpy_ref_policy): New.
14375 (gdbpy_ref): Now a typedef.
14376
14377 2017-01-10 Tom Tromey <tom@tromey.com>
14378
14379 * utils.h (make_cleanup_htab_delete): Don't declare.
14380 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14381 Remove.
14382 * linespec.c (decode_compound_collector): Add constructor,
14383 destructor.
14384 (lookup_prefix_sym): Remove cleanup.
14385 (symtab_collector): Add constructor, destructor.
14386 (collect_symtabs_from_filename): Remove cleanup.
14387 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14388 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14389 Use htab_up.
14390 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14391 * dwarf2read.c (dw2_expand_symtabs_matching)
14392 (dw2_map_symbol_filenames, dwarf_decode_macros)
14393 (write_psymtabs_to_index): Use htab_up.
14394 * dwarf2loc.c (func_verify_no_selftailcall)
14395 (call_site_find_chain_1, func_verify_no_selftailcall)
14396 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14397 std::vector, gdb::unique_xmalloc_ptr.
14398 (call_sitep): Remove typedef.
14399 (dwarf2_locexpr_baton_eval): Remove unused variable.
14400
14401 2017-01-10 Tom Tromey <tom@tromey.com>
14402
14403 * python/python-internal.h (make_cleanup_py_decref)
14404 (make_cleanup_py_xdecref): Don't declare.
14405 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14406 (py_xdecref, make_cleanup_py_xdecref): Remove.
14407
14408 2017-01-10 Tom Tromey <tom@tromey.com>
14409
14410 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14411 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14412
14413 2017-01-10 Tom Tromey <tom@tromey.com>
14414
14415 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14416
14417 2017-01-10 Tom Tromey <tom@tromey.com>
14418
14419 * python/py-utils.c (unicode_to_encoded_string)
14420 (python_string_to_target_string)
14421 (python_string_to_target_python_string)
14422 (python_string_to_host_string, gdbpy_obj_to_string)
14423 (get_addr_from_python): Use gdbpy_ref.
14424
14425 2017-01-10 Tom Tromey <tom@tromey.com>
14426
14427 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14428 gdbpy_ref.
14429
14430 2017-01-10 Tom Tromey <tom@tromey.com>
14431
14432 * python/python.c (eval_python_command, gdbpy_decode_line)
14433 (gdbpy_run_events, gdbpy_start_type_printers)
14434 (gdbpy_apply_type_printers): Use gdbpy_ref.
14435
14436 2017-01-10 Tom Tromey <tom@tromey.com>
14437
14438 * python/py-param.c (get_doc_string, compute_enum_values): Use
14439 gdbpy_ref.
14440
14441 2017-01-10 Tom Tromey <tom@tromey.com>
14442
14443 * python/py-inferior.c (find_thread_object, build_inferior_list):
14444 Use gdbpy_ref.
14445
14446 2017-01-10 Tom Tromey <tom@tromey.com>
14447
14448 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14449
14450 2017-01-10 Tom Tromey <tom@tromey.com>
14451
14452 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14453 gdbpy_ref.
14454
14455 2017-01-10 Tom Tromey <tom@tromey.com>
14456
14457 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14458 extra incref.
14459 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14460 Use gdbpy_ref.
14461
14462 2017-01-10 Tom Tromey <tom@tromey.com>
14463
14464 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14465 gdbpy_ref.
14466
14467 2017-01-10 Tom Tromey <tom@tromey.com>
14468
14469 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14470 decref results of PyArg_ParseTupleAndKeywords.
14471
14472 2017-01-10 Tom Tromey <tom@tromey.com>
14473
14474 * python/python.c (python_run_simple_file): Use
14475 unique_xmalloc_ptr, gdbpy_ref.
14476
14477 2017-01-10 Tom Tromey <tom@tromey.com>
14478
14479 * python/py-prettyprint.c (print_stack_unless_memory_error)
14480 (print_string_repr, print_children): Use gdbpy_ref.
14481 (dummy_python_frame): New class.
14482 (dummy_python_frame::dummy_python_frame): Rename from
14483 push_dummy_python_frame.
14484 (py_restore_tstate): Remove.
14485
14486 2017-01-10 Tom Tromey <tom@tromey.com>
14487
14488 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14489
14490 2017-01-10 Tom Tromey <tom@tromey.com>
14491
14492 * python/python.c (ensure_python_env, restore_python_env):
14493 Remove.
14494 * python/python-internal.h (ensure_python_env): Don't declare.
14495 * varobj.h (varobj_ensure_python_env): Don't declare.
14496 * varobj.c (varobj_ensure_python_env): Remove.
14497
14498 2017-01-10 Tom Tromey <tom@tromey.com>
14499
14500 * varobj.c (varobj_value_get_print_value): Use
14501 gdbpy_enter_varobj.
14502
14503 2017-01-10 Tom Tromey <tom@tromey.com>
14504
14505 * python/py-prettyprint.c (print_string_repr, print_children):
14506 Update.
14507 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14508 of "encoding".
14509 * varobj.c (varobj_value_get_print_value): Update.
14510 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14511
14512 2017-01-10 Tom Tromey <tom@tromey.com>
14513
14514 * varobj.c (varobj_get_display_hint)
14515 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14516 (varobj_set_visualizer, free_variable): Use
14517 gdbpy_enter_varobj.
14518
14519 2017-01-10 Tom Tromey <tom@tromey.com>
14520
14521 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14522 (do_finish_initialization): New function. Use gdbpy_ref.
14523 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14524 do_finish_initialization.
14525
14526 2017-01-10 Tom Tromey <tom@tromey.com>
14527
14528 * python/py-param.c (get_set_value, get_show_value): Use
14529 gdbpy_enter, gdbpy_ref.
14530
14531 2017-01-10 Tom Tromey <tom@tromey.com>
14532
14533 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14534
14535 2017-01-10 Tom Tromey <tom@tromey.com>
14536
14537 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14538
14539 2017-01-10 Tom Tromey <tom@tromey.com>
14540
14541 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14542 Use gdbpy_enter_varobj.
14543
14544 2017-01-10 Tom Tromey <tom@tromey.com>
14545
14546 * varobj.c (gdbpy_enter_varobj): New constructor.
14547 * python/python-internal.h (gdbpy_enter_varobj): New class.
14548 * python/py-varobj.c (py_varobj_get_iterator): Use
14549 gdbpy_enter_varobj.
14550
14551 2017-01-10 Tom Tromey <tom@tromey.com>
14552
14553 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14554 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14555 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14556 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14557 unique_xmalloc_ptr.
14558 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14559
14560 2017-01-10 Tom Tromey <tom@tromey.com>
14561
14562 * python/py-xmethods.c (invoke_match_method): Use
14563 gdbpy_ref.
14564
14565 2017-01-10 Tom Tromey <tom@tromey.com>
14566
14567 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14568 gdbpy_enter, gdbpy_ref.
14569
14570 2017-01-10 Tom Tromey <tom@tromey.com>
14571
14572 * python/python.c (python_interactive_command): Use gdbpy_enter.
14573
14574 2017-01-10 Tom Tromey <tom@tromey.com>
14575
14576 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14577 gdbpy_ref.
14578
14579 2017-01-10 Tom Tromey <tom@tromey.com>
14580
14581 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14582 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14583
14584 2017-01-10 Tom Tromey <tom@tromey.com>
14585
14586 * utils.h (htab_deleter): New struct.
14587 (htab_up): New typedef.
14588 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14589 gdbpy_enter, gdbpy_ref, htab_up.
14590
14591 2017-01-10 Tom Tromey <tom@tromey.com>
14592
14593 * python/py-unwind.c (pending_frame_invalidate): Remove.
14594 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14595
14596 2017-01-10 Tom Tromey <tom@tromey.com>
14597
14598 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14599 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14600
14601 2017-01-10 Tom Tromey <tom@tromey.com>
14602
14603 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14604
14605 2017-01-10 Tom Tromey <tom@tromey.com>
14606
14607 * python/python.c (gdbpy_eval_from_control_command)
14608 (gdbpy_source_script, gdbpy_run_events)
14609 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14610 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14611 gdbpy_enter.
14612
14613 2017-01-10 Tom Tromey <tom@tromey.com>
14614
14615 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14616
14617 2017-01-10 Tom Tromey <tom@tromey.com>
14618
14619 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14620
14621 2017-01-10 Tom Tromey <tom@tromey.com>
14622
14623 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14624 (python_on_inferior_call_pre, python_on_inferior_call_post)
14625 (python_on_memory_change, python_on_register_change)
14626 (python_inferior_exit, python_new_objfile, add_thread_object)
14627 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14628
14629 2017-01-10 Tom Tromey <tom@tromey.com>
14630
14631 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14632 (bpfinishpy_handle_exit): Use gdbpy_enter.
14633
14634 2017-01-10 Tom Tromey <tom@tromey.com>
14635
14636 * python/py-cmd.c (cmdpy_destroyer)
14637 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14638 gdbpy_enter.
14639
14640 2017-01-10 Tom Tromey <tom@tromey.com>
14641
14642 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14643 gdbpy_enter.
14644 (gdbpy_breakpoint_has_cond): Likewise.
14645
14646 2017-01-10 Tom Tromey <tom@tromey.com>
14647
14648 * python/python.c (gdbpy_enter): New constructor.
14649 (~gdbpy_enter): New destructor.
14650 (restore_python_env, ensure_python_env): Rewrite.
14651 * python/python-internal.h (gdbpy_enter): New class.
14652
14653 2017-01-10 Tom Tromey <tom@tromey.com>
14654
14655 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14656
14657 2017-01-10 Tom Tromey <tom@tromey.com>
14658
14659 * python/py-value.c (value_has_field, get_field_flag)
14660 (get_field_type, valpy_getitem, convert_value_from_python): Use
14661 gdbpy_ref.
14662
14663 2017-01-10 Tom Tromey <tom@tromey.com>
14664
14665 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14666 gdbpy_ref.
14667
14668 2017-01-10 Tom Tromey <tom@tromey.com>
14669
14670 * python/py-prettyprint.c (search_pp_list)
14671 (find_pretty_printer_from_objfiles)
14672 (find_pretty_printer_from_progspace)
14673 (find_pretty_printer_from_gdb, find_pretty_printer)
14674 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14675 gdbpy_ref.
14676
14677 2017-01-10 Tom Tromey <tom@tromey.com>
14678
14679 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14680
14681 2017-01-10 Tom Tromey <tom@tromey.com>
14682
14683 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14684 (ltpy_get_all_source_lines): Use gdbpy_ref.
14685
14686 2017-01-10 Tom Tromey <tom@tromey.com>
14687
14688 * python/py-framefilter.c (extract_sym, extract_value)
14689 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14690 gdbpy_ref.
14691
14692 2017-01-10 Tom Tromey <tom@tromey.com>
14693
14694 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14695
14696 2017-01-10 Tom Tromey <tom@tromey.com>
14697
14698 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14699
14700 2017-01-10 Tom Tromey <tom@tromey.com>
14701
14702 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14703 gdbpy_ref.
14704
14705 2017-01-10 Tom Tromey <tom@tromey.com>
14706
14707 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14708
14709 2017-01-10 Tom Tromey <tom@tromey.com>
14710
14711 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14712 (typy_range): Use gdbpy_ref.
14713
14714 2017-01-10 Tom Tromey <tom@tromey.com>
14715
14716 * python/py-threadevent.c (create_thread_event_object): Use
14717 gdbpy_ref.
14718 * python/py-stopevent.c (create_stop_event_object): Simplify.
14719 (emit_stop_event): Use gdbpy_ref.
14720 * python/py-signalevent.c (create_signal_event_object): Use
14721 gdbpy_ref.
14722 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14723 (emit_new_objfile_event, create_clear_objfiles_event_object)
14724 (emit_clear_objfiles_event): Use gdbpy_ref.
14725 * python/py-infevents.c (create_inferior_call_event_object)
14726 (create_register_changed_event_object)
14727 (create_memory_changed_event_object, emit_inferior_call_event)
14728 (emit_memory_changed_event, emit_register_changed_event): Use
14729 gdbpy_ref.
14730 * python/py-exitedevent.c (create_exited_event_object)
14731 (emit_exited_event): Use gdbpy_ref.
14732 * python/py-event.h (evpy_emit_event): Remove
14733 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14734 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14735 * python/py-continueevent.c (emit_continue_event): Use
14736 gdbpy_ref.
14737 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14738 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14739 gdbpy_ref.
14740 * python/py-bpevent.c (create_breakpoint_event_object): Use
14741 gdbpy_ref.
14742
14743 2017-01-10 Tom Tromey <tom@tromey.com>
14744
14745 * python/py-ref.h: New file.
14746
14747 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14748
14749 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14750 void.
14751 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14752 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14753 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14754 * ui-out.c (ui_out::redirect): Likewise.
14755 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14756 * cli/cli-logging.c (set_logging_redirect): Update call site of
14757 ui_out::redirect.
14758 (handle_redirections): Likewise.
14759 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14760 * top.c (execute_command_to_string): Likewise.
14761 * utils.c (do_ui_out_redirect_pop): Likewise.
14762
14763 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14764
14765 * stack.c (_initialize_stack): Update "frame" command help message.
14766
14767 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14768
14769 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14770
14771 2017-01-06 Yao Qi <yao.qi@linaro.org>
14772
14773 * x86-linux-nat.h: Include gdb_proc_service.h.
14774
14775 2017-01-06 Yao Qi <yao.qi@linaro.org>
14776
14777 * ser-base.h: Include serial.h.
14778
14779 2017-01-06 Yao Qi <yao.qi@linaro.org>
14780
14781 * ppc-linux-tdep.h: Include ppc-tdep.h.
14782
14783 2017-01-06 Yao Qi <yao.qi@linaro.org>
14784
14785 * nat/amd64-linux-siginfo.h: Include signal.h.
14786
14787 2017-01-06 Yao Qi <yao.qi@linaro.org>
14788
14789 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14790
14791 2017-01-06 Yao Qi <yao.qi@linaro.org>
14792
14793 * mi/mi-parse.h: Include mi-cmds.h.
14794
14795 2017-01-06 Yao Qi <yao.qi@linaro.org>
14796
14797 * inf-loop.c: Don't include "target.h".
14798 * inf-loop.h: Include it here.
14799
14800 2017-01-06 Yao Qi <yao.qi@linaro.org>
14801
14802 * dfp.h: Include "dboulest.h" and "expression.h".
14803
14804 2017-01-06 Yao Qi <yao.qi@linaro.org>
14805
14806 * ax-gdb.h: Include "ax.h".
14807
14808 2017-01-06 Yao Qi <yao.qi@linaro.org>
14809
14810 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14811 with nat/gdb_ptrace.h.
14812
14813 2017-01-05 Yao Qi <yao.qi@linaro.org>
14814
14815 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14816 new line.
14817 (mips64_fbsd_sigframe_init): Likewise.
14818
14819 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14820
14821 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14822 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14823
14824 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14825
14826 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14827 * NEWS: Mention new FreeBSD/mips native configuration.
14828 * config/mips/fbsd.mh: New file.
14829 * configure.host: Add mips*-*-freebsd*.
14830 * mips-fbsd-nat.c: New file.
14831
14832 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14833
14834 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14835 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14836 * NEWS: Mention new FreeBSD/mips target.
14837 * configure.tgt: Add mips*-*-freebsd*.
14838 * mips-fbsd-tdep.c: New file.
14839 * mips-fbsd-tdep.h: New file.
14840
14841 2017-01-04 Yao Qi <yao.qi@linaro.org>
14842
14843 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14844 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14845
14846 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14847
14848 Update copyright year range in all GDB files.
14849
14850 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14851
14852 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14853
14854 For older changes see ChangeLog-2016.
14855 \f
14856 Local Variables:
14857 mode: change-log
14858 left-margin: 8
14859 fill-column: 74
14860 version-control: never
14861 coding: utf-8
14862 End:
This page took 0.317577 seconds and 5 git commands to generate.