1 2017-11-07 Tom Tromey <tom@tromey.com>
3 * source.c (directory_switch, mod_path, add_path): Constify.
4 * defs.h (add_path, mod_path, directory_switch): Constify.
5 * mi/mi-cmd-env.c (env_mod_path): Constify.
7 2017-11-07 Tom Tromey <tom@tromey.com>
9 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
10 (run_command_1, continue_command, step_1, jump_command)
11 (signal_command, until_command, advance_command, finish_command)
12 (attach_command): Update.
14 2017-11-07 Tom Tromey <tom@tromey.com>
16 * command.h (set_cmd_cfunc): Don't declare.
17 * cli/cli-decode.c (set_cmd_cfunc): Now static.
19 2017-11-07 Tom Tromey <tom@tromey.com>
21 * stack.c (select_frame_command): Constify.
22 * cli/cli-decode.c (add_com_suppress_notification): Constify.
23 * command.h (add_com_suppress_notification): Constify.
25 2017-11-07 Tom Tromey <tom@tromey.com>
27 * breakpoint.c (stop_command): Constify.
28 * cli/cli-decode.c (struct cmd_list_element): Constify.
29 * command.h (add_abbrev_prefix_cmd): Constify.
31 2017-11-07 Pedro Alves <palves@redhat.com>
33 * breakpoint.c (extract_bp_kind): New enum.
34 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
36 (extract_bp_number_and_location): ... here.
37 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
39 2017-11-07 Pedro Alves <palves@redhat.com>
41 * breakpoint.c (extract_bp_number_and_location): Change return
42 type to void. Throw error instead of warning.
43 (enable_disable_command): Adjust.
45 2017-11-07 Xavier Roirand <roirand@adacore.com>
46 Pedro Alves <palves@redhat.com>
48 * breakpoint.c (map_breakpoint_number_range): New, factored out
50 (map_breakpoint_numbers): ... here.
51 (find_location_by_number): Change parameters from string to
52 breakpoint number and location.
53 (extract_bp_number_and_location): New function.
54 (enable_disable_bp_num_loc)
55 (enable_disable_breakpoint_location_range)
56 (enable_disable_command): New functions, factored out ...
57 (enable_command, disable_command): ... these functions, and
58 adjusted to support ranges.
59 * NEWS: Document enable/disable breakpoint location range feature.
61 2017-11-06 Luis Machado <luis.machado@linaro.org>
63 * MAINTAINERS (Write After Approval): Update my e-mail address.
65 2017-11-06 Pedro Alves <palves@redhat.com>
67 * gnu-nat.c (gnu_terminal_init): Delete.
68 (gnu_target): Don't install gnu_terminal_init.
69 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
70 (child_terminal_init): ... this function.
72 2017-11-06 Pedro Alves <palves@redhat.com>
74 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
76 * config.in, configure: Regenerate.
78 2017-11-06 Pedro Alves <palves@redhat.com>
80 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
81 (async_init_signals): Adjust.
82 (handle_stop_sig): Rename to ...
83 (handle_sigtstp): ... this.
84 (async_stop_sig): Rename to ...
85 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
87 * event-top.h: Move signal.h include to the top. Check SIGTSTP
88 instead of STOP_SIGNAL thoughout.
89 (handle_stop_sig): Rename to ...
90 (handle_sigtstp): ... this.
91 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
93 2017-11-06 Pedro Alves <palves@redhat.com>
95 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
96 longer set flags twice in row.
98 2017-11-06 Pedro Alves <palves@redhat.com>
100 * Makefile.in (SER_HARDWIRE): Update comment.
101 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
102 * common/gdb_termios.h: Delete file.
103 * common/job-control.c: Include termios.h and unistd.h instead of
105 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
107 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
109 * configure.ac: No longer check for termio.h and sgtty.h.
110 * configure: Regenerate.
111 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
112 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
113 Replace PROCESS_GROUP_TYPE references with pid_t references
115 (gdb_getpgrp): Delete.
116 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
117 (child_terminal_inferior): Remove comment. Remove sgtty code.
118 (child_terminal_ours_1): Use tcgetpgrp directly instead of
119 gdb_getpgrp. Use serial_set_tty_state instead aof
120 serial_noflush_set_tty_state. Remove sgtty code.
121 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
122 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
123 (inferior_process_group): Now returns pid_t.
124 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
125 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
126 * ser-event.c (serial_event_ops): Update.
127 * ser-go32.c (dos_noflush_set_tty_state): Delete.
129 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
130 * ser-pipe.c (pipe_ops): Update.
131 * ser-tcp.c (tcp_ops): Update.
132 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
134 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
135 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
136 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
138 (hardwire_noflush_set_tty_state): Delete.
139 (hardwire_print_tty_state, hardwire_drain_output)
140 (hardwire_flush_output, hardwire_flush_input)
141 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
142 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
143 code, and assume termios.
144 (hardwire_ops): Update.
145 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
146 * serial.c (serial_noflush_set_tty_state): Delete.
147 * serial.h (serial_noflush_set_tty_state): Delete.
148 (serial_ops::noflush_set_tty_state): Delete.
150 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
152 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
153 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
154 (COMMON_OBS): Remove doublest.o and dfp.o.
155 Do not build target-float.c (instead of doublest.c)
156 with -Wformat-nonliteral.
158 * doublest.c: Remove file.
159 * doublest.h: Remove file.
160 * dfp.c: Remove file.
161 * dfp.h: Remove file.
163 * target-float.c: Do not include "doublest.h" and "dfp.h".
164 (DOUBLEST): Move here from doublest.h.
165 (enum float_kind): Likewise.
166 (FLOATFORMAT_CHAR_BIT): Likewise.
167 (FLOATFORMAT_LARGEST_BYTES): Likewise.
168 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
169 (floatformat_precision): Likewise.
170 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
171 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
173 (host_float_format, host_double_format, host_long_double_format):
175 (floatformat_to_string, floatformat_from_string): Likewise.
176 (floatformat_to_doublest): Likewise. Also, inline the original
177 convert_floatformat_to_doublest.
178 (floatformat_from_doublest): Likewise. Also, inline the original
179 convert_floatformat_from_doublest.
181 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
182 (MAX_DECIMAL_STRING): Move here from dfp.c.
183 (match_endianness): Likewise.
184 (set_decnumber_context, decimal_check_errors): Likewise.
185 (decimal_from_number, decimal_to_number): Likewise.
186 (decimal_to_string, decimal_from_string): Likewise. Make static.
187 (decimal_from_longest, decimal_from_ulongest): Likewise.
188 (decimal_to_longest): Likewise.
189 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
190 (decimal_convert): Likewise.
192 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
194 * doublest.c: Do not include "gdbtypes.h".
195 (extract_typed_floating): Remove.
196 (store_typed_floating): Remove.
197 (convert_typed_floating): Remove.
198 * doublest.h (struct type): Remove.
199 (DOUBLEST_PRINT_FORMAT): Remove.
200 (DOUBLEST_SCAN_FORMAT): Remove.
201 (extract_typed_floating): Remove.
202 (store_typed_floating): Remove.
203 (convert_typed_floating): Remove.
205 * dfp.c (decimal_from_doublest): Remove.
206 (decimal_to_doublest): Remove.
207 * dfp.h: Do not include "doublest.h".
208 (decimal_from_doublest): Remove.
209 (decimal_to_doublest): Remove.
211 * value.c: Do not include "doublest.h" and "dfp.h".
212 (value_as_double): Remove.
213 (unpack_double): Remove.
214 (value_from_double): Remove.
215 (value_from_decfloat): Remove.
216 * value.h: Do not include "doublest.h".
217 (value_as_double): Remove.
218 (unpack_double): Remove.
219 (value_from_double): Remove.
220 (value_from_decfloat): Remove.
222 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
224 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
225 (i386_extract_return_value): Use target_float_convert.
226 (i386_store_return_value): Likewise.
227 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
228 (i387_value_to_register): Likewise.
229 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
230 (ia64_register_to_value): Use target_float_convert.
231 (ia64_value_to_register): Likewise.
232 (ia64_extract_return_value): Likewise.
233 (ia64_store_return_value): Likewise.
234 (ia64_push_dummy_call): Likewise.
235 * m68k-tdep.c: Include "target-float.h".
236 (m68k_register_to_value): Use target_float_convert.
237 (m68k_value_to_register): Likewise.
238 (m68k_svr4_extract_return_value): Likewise.
239 (m68k_svr4_store_return_value): Likewise.
240 * ppc-sysv-tdep.c: Include "target-float.h".
241 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
242 (do_ppc_sysv_return_value): Likewise.
243 (ppc64_sysv_abi_push_freg): Likewise.
244 (ppc64_sysv_abi_return_value_base): Likewise.
245 * rs6000-aix-tdep.c: Include "target-float.h".
246 (rs6000_push_dummy_call): Use target_float_convert.
247 (rs6000_return_value): Likewise.
248 * rs6000-lynx178-tdep.c: Include "target-float.h".
249 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
250 (rs6000_lynx178_return_value): Likewise.
251 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
252 (rs6000_register_to_value): Use target_float_convert.
253 (rs6000_value_to_register): Likewise.
254 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
255 (arm_extract_return_value): Use target_float_convert.
256 (arm_store_return_value): Likewise.
257 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
258 (sh_register_convert_to_virtual): Use target_float_convert.
259 (sh_register_convert_to_raw): Likewise.
260 * sh64-tdep.c: Include "target-float.h".
261 (sh64_extract_return_value): Use target_float_convert.
262 (sh64_register_convert_to_virtual): Likewise.
263 (sh64_register_convert_to_raw): Likewise. Fix argument types.
265 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
267 * target-float.c (floatformat_to_host_double): New function.
268 (floatformat_from_host_double): Likewise.
269 (target_float_to_host_double): Likewise.
270 (target_float_from_host_double): Likewise.
271 * target-float.h (target_float_to_host_double): Add prototype.
272 (target_float_from_host_double): Likewise.
274 * guile/scm-value.c: Include "target-float.h".
275 (gdbscm_value_to_real): Use target_float_to_host_double.
276 Handle integer source values via value_as_long.
277 * guile/scm-math.c: Include "target-float.h". Do not include
278 "doublest.h", "dfp.h", and "expression.h".
279 (vlscm_convert_typed_number): Use target_float_from_host_double.
280 (vlscm_convert_number): Likewise.
282 * python/py-value.c (valpy_float): Use target_float_to_host_double.
283 (convert_value_from_python): Use target_float_from_host_double.
285 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
287 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
288 (cast_from_fixed): Likewise.
289 (ada_scaling_type): New function.
290 (ada_delta): Return value instead of DOUBLEST. Perform target
291 arithmetic instead of host arithmetic.
292 (scaling_factor): Rename to ...
293 (ada_scaling_factor) ... this. Make non-static. Return value instead
294 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
295 (ada_fixed_to_float): Remove.
296 (ada_float_to_fixed): Remove.
297 * ada-lang.h (ada_fixed_to_float): Remove.
298 (ada_float_to_fixed): Remove.
299 (ada_delta): Return value instead of DOUBLEST.
300 (ada_scaling_factor): Add prototype.
302 * ada-typeprint.c: Include "target-float.h".
303 (print_fixed_point_type): Perform target arithmetic instead of
305 * ada-valprint.c: Include "target-float.h".
306 (ada_val_print_num): Perform target arithmetic instead of
307 host arithmetic for fixed-point types.
309 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
311 * target-float.c: Include <math.h>.
312 (floatformat_binop): New function.
313 (floatformat_compare): Likewise.
314 (target_float_binop): Likewise.
315 (target_float_compare): Likewise.
316 * target-float.h: Include "expression.h".
317 (target_float_binop): Add prototype.
318 (target_float_compare): Likewise.
320 * valarith.c: Do not include "doublest.h" and "dfp.h".
321 Include "common/byte-vector.h".
322 (value_args_as_decimal): Remove, replace by ...
323 (value_args_as_target_float): ... this function. Handle both
324 binary and decimal target floating-point formats.
325 (scalar_binop): Handle both binary and decimal FP using
326 value_args_as_target_float and target_float_binop.
327 (value_equal): Handle both binary and decimal FP using
328 value_args_as_target_float and target_float_compare.
329 (value_less): Likewise.
330 (value_pos): Handle all scalar types as simple copy.
331 (value_neg): Handle all scalar types via BINOP_SUB from 0.
332 * dfp.c (decimal_binop): Throw error instead of internal_error
333 when called with an unsupported operation code.
335 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
337 * target-float.c (target_float_to_string): New function.
338 (target_float_from_string): New function.
339 * target-float.h (target_float_to_string): Add prototype.
340 (target_float_from_string): Add prototype.
342 * valprint.c: Include "target-float.h". Do not include
343 "doublest.h" and "dfp.h".
344 (print_floating): Use target_float_to_string.
345 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
346 (printf_floating): Use target_float_to_string.
347 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
348 (print_i387_value): Use target_float_to_string.
349 * mips-tdep.c: Include "target-float.h".
350 (mips_print_fp_register): Use target_float_to_string.
351 * sh64-tdep.c: Include "target-float.h".
352 (sh64_do_fp_register): Use target_float_to_string.
354 * parse.c: Include "target-float.h". Do not include
355 "doublest.h" and "dfp.h".
356 (parse_float): Use target_float_from_string.
357 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
358 (define_symbol): Use target_float_from_string.
359 * gdbarch-selftests.c: Include "target-float.h".
360 (register_to_value_test): Use target_float_from_string.
362 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
364 * Makefile.c (SFILES): Add target-float.c.
365 (HFILES_NO_SRCDIR): Add target-float.h.
366 (COMMON_OBS): Add target-float.o.
367 * target-float.h: New file.
368 * target-float.c: New file.
370 * doublest.c (floatformat_classify): Fix detection of float_zero.
372 * gdbtypes.c (is_floating_type): New function.
373 * gdbtypes.h (is_floating_type): Add prototype.
375 * value.c: Do not include "floatformat.h".
376 (unpack_double): Use target_float_is_valid.
377 (is_floating_value): New function.
378 * value.h (is_floating_value): Add prototype-
380 * valarith.c: Include "target-float.h".
381 (value_logical_not): Use target_float_is_zero.
383 * python/py-value.c: Include "target-float.h".
384 (valpy_nonzero): Use target_float_is_zero.
386 2017-11-04 Tom Tromey <tom@tromey.com>
388 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
390 2017-11-04 Tom Tromey <tom@tromey.com>
392 * breakpoint.c (set_momentary_breakpoint): Return
394 (until_break_command): Update.
395 (new_until_break_fsm): Change argument types to
397 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
398 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
400 * infcmd.c (finish_forward): Update.
401 * breakpoint.h (set_momentary_breakpoint)
402 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
403 (make_cleanup_delete_breakpoint): Remove.
404 (struct breakpoint_deleter): New.
405 (breakpoint_up): New typedef.
406 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
407 (insert_exception_resume_breakpoint): Update.
408 (insert_exception_resume_from_probe): Update.
409 (insert_longjmp_resume_breakpoint): Update.
410 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
411 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
412 * infcall.c (call_function_by_hand_dummy): Update
414 2017-11-04 Tom Tromey <tom@tromey.com>
416 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
418 2017-11-04 Tom Tromey <tom@tromey.com>
420 * linux-tdep.c (linux_core_info_proc_mappings): Use
422 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
424 (linux_corefile_thread): Update.
425 (linux_make_corefile_notes): Remove unused variable.
427 2017-11-04 Tom Tromey <tom@tromey.com>
429 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
432 2017-11-04 Tom Tromey <tom@tromey.com>
434 * objfiles.c (do_free_objfile_cleanup): Remove.
435 * compile/compile-object-load.c (compile_object_load): Update.
436 * objfiles.h (make_cleanup_free_objfile): Remove.
438 2017-11-04 Tom Tromey <tom@tromey.com>
440 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
441 (adi_read_versions): Change "tags" to "gdb_byte *".
442 (adi_print_versions): Likewise.
444 2017-11-04 Tom Tromey <tom@tromey.com>
447 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
448 from start_rbreak_breakpoints.
449 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
450 * breakpoint.h (class scoped_rbreak_breakpoints): New.
451 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
452 * symtab.c (do_end_rbreak_breakpoints): Remove.
453 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
455 2017-11-04 Tom Tromey <tom@tromey.com>
457 * cp-namespace.c (reset_directive_searched): Remove.
458 (cp_lookup_symbol_via_imports): Use scoped_restore.
459 * cp-support.c (reset_directive_searched): Remove.
460 (make_symbol_overload_list_using): Use scoped_restore.
461 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
462 (reset_directive_searched): Remove.
464 2017-11-04 Tom Tromey <tom@tromey.com>
466 * symfile.c (find_separate_debug_file_by_debuglink): Use
469 2017-11-04 Tom Tromey <tom@tromey.com>
471 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
473 (compute_stack_depth): Likewise.
474 (do_compile_dwarf_expr_to_c): Use std::vector.
476 2017-11-04 Tom Tromey <tom@tromey.com>
478 * compile/compile-object-load.c (link_callbacks_einfo): Use
481 2017-11-04 Tom Tromey <tom@tromey.com>
483 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
484 Use scoped_free_pendings.
485 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
486 scoped_free_pendings.
487 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
488 (xcoff_initial_scan): Likewise.
489 * buildsym.c (reset_symtab_globals): Update comment.
490 (scoped_free_pendings): Rename from really_free_pendings.
491 (prepare_for_building): Update comment.
492 (buildsym_init): Likewise.
493 * buildsym.h (class scoped_free_pendings): New class.
494 (really_free_pendings): Don't declare.
496 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
498 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
499 output when converting a zero value to a special byteorder format.
501 2017-11-02 Yao Qi <yao.qi@linaro.org>
503 * frame.c (do_frame_register_read): Remove aspace.
504 * jit.c (jit_frame_sniffer): Likwise.
505 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
506 * regcache.c (regcache::regcache): Pass nullptr.
507 (regcache_print): Caller updated.
508 * regcache.h (regcache::regcache): Remove one constructor
511 2017-11-02 Yao Qi <yao.qi@linaro.org>
513 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
515 2017-11-02 Yao Qi <yao.qi@linaro.org>
517 * breakpoint.c (insert_single_step_breakpoints): Update.
518 * frame.c (struct frame_info) <aspace>: Add const.
519 (frame_save_as_regcache): Add const.
520 (get_frame_address_space): Return const address_space *.
521 * frame.h (get_frame_address_space): Update declaration.
522 * infrun.c (struct step_over_info) <aspace>: Add const.
523 (set_step_over_info): Make aspace const.
524 (displaced_step_prepare_throw): Change variable const.
527 (adjust_pc_after_break): Likewise.
528 (save_waitstatus): Likewise.
529 (handle_signal_stop): Likewise.
530 (keep_going_pass_signal): Likewise.
531 * jit.c (jit_frame_sniffer): Add const.
532 * mips-tdep.c (mips_single_step_through_delay): Likewise.
533 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
534 * record-full.c (record_full_wait_1): Likewise.
535 * regcache.c (regcache::regcache): Change parameter to const.
536 * regcache.h (regcache::regcache): Likewise.
537 (regcache::aspace): Return const address_space *.
538 (regcache) <m_aspace>: Add const.
540 2017-11-02 Yao Qi <yao.qi@linaro.org>
542 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
543 * frame.c (create_sentinel_frame): Likewise.
544 * infrun.c (displaced_step_prepare_throw): Likewise.
546 (thread_still_needs_step_over_bp): Likewise.
548 (do_target_wait): Likewise.
549 (adjust_pc_after_break): Likewise.
550 (handle_syscall_event): Likewise.
551 (save_waitstatus): Likewise.
552 (handle_inferior_event_1): Likewise.
553 (handle_signal_stop): Likewise.
554 (keep_going_pass_signal): Likewise.
555 * linux-nat.c (status_callback): Likewise.
556 (save_stop_reason): Likewise.
557 (resume_stopped_resumed_lwps): Likewise.
558 * record-full.c (record_full_exec_insn): Likewise.
559 (record_full_wait_1): Likewise.
560 * regcache.c (get_regcache_aspace): Remove.
561 * regcache.h (get_regcache_aspace): Remove.
563 2017-11-02 Yao Qi <yao.qi@linaro.org>
565 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
566 (init_regcache_descr): Use gdbarch_num_regs.
567 (regcache::regcache): Likewise.
568 (regcache::get_register_status): Likewise.
569 (regcache::assert_raw_regnum): Likewise.
570 (regcache::cooked_read): Likewise.
571 (regcache::cooked_read_value): Likewise.
572 (regcache::cooked_write): Likewise.
573 (regcache::dump): Likewise.
574 (regcache::num_raw_registers): New method.
575 * regcache.h (class regcache) <num_raw_registers>: New.
577 2017-11-02 Yao Qi <yao.qi@linaro.org>
579 * regcache.c (regcache::assert_regnum): New method.
580 (regcache::invalidate): Call assert_regnum.
581 (regcache::raw_update): Likewise.
582 (regcache::raw_write): Likewise.
583 (regcache::raw_read_part): Likewise.
584 (regcache::raw_write_part): Likewise.
585 (regcache::raw_supply): Likewise.
586 (regcache::raw_supply_integer): Likewise.
587 (regcache::raw_supply_zeroed): Likewise.
588 (regcache::raw_collect): Likewise.
589 (regcache::raw_collect_integer): Likewise.
590 * regcache.h (regcache::assert_regnum): Declare.
592 2017-11-02 Yao Qi <yao.qi@linaro.org>
594 * regcache.c (regcache::dump): Remove code.
596 2017-11-02 Yao Qi <yao.qi@linaro.org>
598 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
600 <sizeof_cooked_register_status>: Remove.
601 (init_regcache_descr): Update.
602 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
603 (regcache::save): Likewise.
604 (regcache::dump): Likewise.
606 2017-11-01 James Bowman <james.bowman@ftdichip.com>
608 * ft32-tdep.c (ft32_fetch_instruction): New function.
609 (ft32_analyze_prologue): Use ft32_fetch_instruction().
611 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
613 * cli/cli-script.c (execute_control_command): Rename to ...
614 (execute_control_command_1): ... this.
615 (execute_control_command): New function.
617 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
619 * tracepoint.c (tfind_command): Remove const_cast.
621 2017-10-30 Mike Gulick <mgulick@mathworks.com>
623 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
625 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
627 * common/common-utils.h (in_inclusive_range): New function.
628 * arm-tdep.c (arm_record_extension_space): Use
630 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
631 * cris-tdep.c (cris_spec_reg_applicable): Use
634 2017-10-30 Pedro Alves <palves@redhat.com>
635 Simon Marchi <simon.marchi@ericsson.com>
637 * remote.c (remote_set_syscall_catchpoint): Build a std::string
638 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
640 2017-10-30 Pedro Alves <palves@redhat.com>
642 * common/common-utils.c (string_appendf, string_vappendf): New
644 * common/common-utils.h (string_appendf, string_vappendf): New
646 * unittests/common-utils-selftests.c (string_appendf_func)
647 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
648 (string_vappendf_tests): New functions.
649 (_initialize_common_utils_selftests): Register "string_appendf" and
650 "string_vappendf tests".
652 2017-10-30 Pedro Alves <palves@redhat.com>
654 * unittests/common-utils-selftests.c (format_func): New typedef.
655 (string_printf_tests, string_vprintf_tests): Tests factored out
657 (test_format_func): ... this new function.
658 (string_printf_tests, string_vprintf_tests): Reimplement on top of
661 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
663 * darwin-nat.c: Remove include of gdb.h.
665 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
667 * xtensa-xtregs.c: Fix formatting issues.
669 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
671 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
673 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
676 * python/py-infthread.c (thpy_get_inferior): Increment reference
677 of inferior before returning it.
679 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
681 * unittests/common-utils-selftests.c (format): Add
684 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
686 * xml-syscall.c (struct syscall_desc): Add constructor.
687 <name>: Change type to std::string.
688 (syscall_desc_up): New typedef.
689 (syscall_desc_p): Remove typeder.
690 (DEF_VEC_P(syscall_desc_p)): Remove.
691 (struct syscall_group_desc): Add constructor.
692 <name>: Change type to std::string.
693 <syscalls>: Change type to std::vector.
694 (syscall_group_desc_up): New typedef.
695 (syscall_group_desc_p): Remove typedef.
696 (DEF_VEC_P(syscall_group_desc_p)): Remove.
697 (struct syscalls_info) <syscalls>: Change type to std::vector of
700 <my_gdb_datadir>: Change type to std::string.
701 (syscalls_info_up): New typedef.
702 (allocate_syscalls_info): Remove.
703 (syscalls_info_free_syscalls_desc): Remove.
704 (syscalls_info_free_syscall_group_desc): Remove.
705 (free_syscalls_info): Remove.
706 (make_cleanup_free_syscalls_info): Remove.
707 (syscall_group_create_syscall_group_desc): Adjust.
708 (syscall_group_add_syscall): Adjust.
709 (syscall_create_syscall_desc): Adjust.
710 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
711 (init_syscalls_info): Adjust.
712 (syscall_group_get_group_by_name): Adjust.
713 (xml_get_syscall_number): Adjust.
714 (xml_get_syscall_name): Adjust.
715 (xml_list_of_syscalls): Adjust.
716 (xml_list_syscalls_by_group): Adjust.
717 (xml_list_of_groups): Adjust.
719 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
721 * probe.h: Don't include gdb_vecs.h.
722 (DEF_VEC_P (probe_p)): Remove.
723 (find_probes_in_objfile): Return an std::vector.
724 * probe.c (find_probes_in_objfile): Likewise.
725 * breakpoint.c (breakpoint_objfile_data)
726 <longjmp_probes>: Change type to std::vector.
727 <exception_probes>: Likewise.
728 (free_breakpoint_probes): Don't manually free vectors.
729 (create_longjmp_master_breakpoint): Adjust.
730 (create_exception_master_breakpoint): Adjust.
731 * solib-svr4.c (svr4_create_probe_breakpoints): Change
732 parameter type, adjust.
733 (svr4_create_solib_event_breakpoints): Adjust.
735 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
737 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
738 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
740 (free_breakpoint_probes): Rename to ...
741 (free_breakpoint_objfile_data): ... this, and call delete on
744 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
746 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
747 (loaded_script_ptr): Remove typedef.
748 (DEF_VEC_P (loaded_script_ptr)): Remove.
749 (struct collect_matching_scripts_data): Add constructor.
750 <scripts_p>: Change type to (pointer to) std::vector.
751 (collect_matching_scripts_data): Adjust.
752 (sort_scripts_by_name): Make suitable for std::sort.
753 (print_scripts): Don't sort vector, adjust to std::vector.
754 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
756 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
758 * symfile.c (filename_language): Make struct, not typedef. Add
760 <ext>: Change type to std::string.
761 (DEF_VEC_O (filename_language)): Remove.
762 (filename_language_table): Change type to std::vector.
763 (add_filename_language): Adjust.
764 (set_ext_lang_command): Adjust.
765 (info_ext_lang_command): Adjust.
766 (deduce_language_from_filename): Adjust.
767 (class scoped_restore_filename_language_table): Remove.
768 (test_filename_language): Use scoped_restore.
769 (test_set_ext_lang_command): Use scoped_restore, adjust to
772 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
774 * symfile.c: Include selftest.h.
775 (class scoped_restore_filename_language_table): New.
776 (test_filename_language): New test.
777 (test_set_ext_lang_command): New test.
778 (_initialize_symfile): Register tests.
780 2017-10-27 Keith Seitz <keiths@redhat.com>
782 * breakpoint.c (print_breakpoint_location): Use the symbol saved
783 in the bp_location, falling back to find_pc_sect_function when
785 (add_location_to_breakpoint): Save sal->symbol.
786 * breakpoint.h (struct bp_location) <symbol>: New field.
787 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
788 * symtab.h (struct symtab_and_line) <symbol>: New field.
790 2017-10-26 Patrick Frants <osscontribute@gmail.com>
793 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
796 2017-10-26 Pedro Alves <palves@redhat.com>
798 * remote.c (remote_async_terminal_ours_p): Delete.
799 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
800 Remove references to 'remote_async_terminal_ours_p'.
802 2017-10-26 Yao Qi <yao.qi@linaro.org>
804 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
806 2017-10-26 Yao Qi <yao.qi@linaro.org>
808 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
810 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
812 * breakpoint.c (bpstat_check_location): Remove cast.
813 (breakpoint_hit_catch_fork): Make aspce const.
814 (breakpoint_hit_catch_solib): Likewise.
815 (breakpoint_hit_catch_exec): Likewise.
816 (breakpoint_hit_ranged_breakpoint): Likewise.
817 (breakpoint_hit_watchpoint): Likewise.
818 (base_breakpoint_breakpoint_hit): Likewise.
819 (bkpt_breakpoint_hit): Likewise.
820 (dprintf_breakpoint_hit): Likewise.
821 (tracepoint_breakpoint_hit): Likewise.
822 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
824 2017-10-26 Yao Qi <yao.qi@linaro.org>
826 * breakpoint.c (breakpoint_location_address_match): Change
827 "struct address_space *" to "const address_space".
828 (breakpoint_location_address_range_overlap): Likewise.
829 (breakpoint_here_p): Likewise.
830 (breakpoint_in_range_p): Likewise.
831 (moribund_breakpoint_here_p): Likewise.
832 (bp_location_inserted_here_p): Likewise.
833 (software_breakpoint_inserted_here_p): Likewise.
834 (hardware_breakpoint_inserted_here_p): Likewise.
835 (hardware_watchpoint_inserted_in_range): Likewise.
836 (bpstat_check_location): Likewise.
837 (bpstat_stop_status): Likewise.
838 (breakpoint_address_match): Likewise.
839 (breakpoint_address_match_range): Likewise.
840 (breakpoint_location_address_match): Likewise.
841 (breakpoint_location_address_range_overlap): Likewise.
842 (insert_single_step_breakpoint): Likewise.
843 (breakpoint_has_location_inserted_here): Likewise.
844 (single_step_breakpoint_inserted_here_p): Likewise.
845 (pc_at_non_inline_function): Likewise.
846 * breakpoint.h (bpstat_stop_status): Update declaration.
847 (breakpoint_here_p): Likewise.
848 (breakpoint_in_range_p): Likewise.
849 (moribund_breakpoint_here_p): Likewise.
850 (breakpoint_inserted_here_p): Likewise.
851 (software_breakpoint_inserted_here_p): Likewise.
852 (hardware_breakpoint_inserted_here_p): Likewise.
853 (breakpoint_has_location_inserted_here): Likewise.
854 (single_step_breakpoint_inserted_here_p): Likewise.
855 (hardware_watchpoint_inserted_in_range): Likewise.
856 (breakpoint_address_match): Likewise.
857 (insert_single_step_breakpoint): Likewise.
858 (pc_at_non_inline_function): Likewise.
859 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
860 * record.c (record_check_stopped_by_breakpoint): Likewise.
861 * record.h (record_check_stopped_by_breakpoint): Likewise.
862 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
864 2017-10-25 Yao Qi <yao.qi@linaro.org>
866 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
867 regcache->arch () instead get_regcache_arch.
868 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
870 (aarch64_fbsd_store_inferior_registers): Likewise.
871 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
872 (store_gregs_to_thread): Likewise.
873 (fetch_fpregs_from_thread): Likewise.
874 (store_fpregs_to_thread): Likewise.
875 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
876 (aarch64_store_return_value): Likewise.
877 (aarch64_software_single_step): Likewise.
878 * aix-thread.c (aix_thread_wait): Likewise.
879 (supply_reg32): Likewise.
880 (supply_sprs64): Likewise.
881 (supply_sprs32): Likewise.
882 (fill_gprs64): Likewise.
883 (fill_gprs32): Likewise.
884 (fill_sprs64): Likewise.
885 (fill_sprs32): Likewise.
886 (store_regs_user_thread): Likewise.
887 (store_regs_kernel_thread): Likewise.
888 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
889 (alphabsd_store_inferior_registers): Likewise.
890 * alpha-tdep.c (alpha_extract_return_value): Likewise.
891 (alpha_store_return_value): Likewise.
892 (alpha_deal_with_atomic_sequence): Likewise.
893 (alpha_next_pc): Likewise.
894 (alpha_software_single_step): Likewise.
895 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
896 (amd64bsd_store_inferior_registers): Likewise.
897 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
899 (amd64_linux_store_inferior_registers): Likewise.
900 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
901 (amd64_collect_native_gregset): Likewise.
902 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
903 (amd64obsd_collect_uthread): Likewise.
904 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
905 (amd64_collect_fpregset): Likewise.
906 (amd64_supply_fxsave): Likewise.
907 (amd64_supply_xsave): Likewise.
908 (amd64_collect_fxsave): Likewise.
909 (amd64_collect_xsave): Likewise.
910 * arc-tdep.c (arc_write_pc): Likewise.
911 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
912 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
913 (arm_fbsd_store_inferior_registers): Likewise.
914 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
915 (store_vfp_regs): Likewise.
916 (arm_linux_fetch_inferior_registers): Likewise.
917 (arm_linux_store_inferior_registers): Likewise.
918 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
919 (arm_linux_sigreturn_next_pc): Likewise.
920 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
921 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
922 (fetch_register): Likewise.
923 (store_register): Likewise.
924 * arm-tdep.c (arm_is_thumb): Likewise.
925 (displaced_in_arm_mode): Likewise.
926 (bx_write_pc): Likewise.
927 (arm_get_next_pcs_addr_bits_remove): Likewise.
928 (arm_software_single_step): Likewise.
929 (arm_extract_return_value): Likewise.
930 (arm_store_return_value): Likewise.
931 (arm_write_pc): Likewise.
932 * bfin-tdep.c (bfin_extract_return_value): Likewise.
933 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
934 (bsd_uthread_store_registers): Likewise.
935 * core-regset.c (fetch_core_registers): Likewise.
936 * corelow.c (get_core_registers): Likewise.
937 * cris-tdep.c (cris_store_return_value): Likewise.
938 (cris_extract_return_value): Likewise.
939 (find_step_target): Likewise.
940 (find_step_target): Likewise.
941 (cris_software_single_step): Likewise.
942 * ctf.c (ctf_fetch_registers): Likewise.
943 * darwin-nat.c (cancel_breakpoint): Likewise.
944 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
945 * frv-tdep.c (frv_extract_return_value): Likewise.
946 * ft32-tdep.c (ft32_store_return_value): Likewise.
947 (ft32_extract_return_value): Likewise.
948 * go32-nat.c (fetch_register): Likewise.
949 (go32_fetch_registers): Likewise.
950 (go32_store_registers): Likewise.
951 (store_register): Likewise.
952 * h8300-tdep.c (h8300_extract_return_value): Likewise.
953 (h8300_store_return_value): Likewise.
954 * hppa-linux-nat.c (fetch_register): Likewise.
955 (store_register): Likewise.
956 (hppa_linux_fetch_inferior_registers): Likewise.
957 (hppa_linux_store_inferior_registers): Likewise.
958 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
959 (i386_darwin_store_inferior_registers): Likewise.
960 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
961 (gnu_store_registers): Likewise.
962 * i386-linux-nat.c (fetch_register): Likewise.
963 (store_register): Likewise.
964 (supply_gregset): Likewise.
965 (fill_gregset): Likewise.
966 (i386_linux_fetch_inferior_registers): Likewise.
967 (i386_linux_store_inferior_registers): Likewise.
968 (i386_linux_resume): Likewise.
969 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
971 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
972 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
973 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
974 (i386obsd_collect_uthread): Likewise.
975 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
976 (i386_supply_gregset): Likewise.
977 (i386_collect_gregset): Likewise.
978 (i386_supply_fpregset): Likewise.
979 (i386_collect_fpregset): Likewise.
980 (i386_mpx_bd_base): Likewise.
981 * i386-v4-nat.c (supply_fpregset): Likewise.
982 (fill_fpregset): Likewise.
983 * i387-tdep.c (i387_supply_fsave): Likewise.
984 (i387_collect_fsave): Likewise.
985 (i387_supply_fxsave): Likewise.
986 (i387_collect_fxsave): Likewise.
987 (i387_supply_xsave): Likewise.
988 (i387_collect_xsave): Likewise.
989 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
990 (ia64_linux_store_registers): Likewise.
991 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
992 (ia64_extract_return_value): Likewise.
993 (ia64_store_return_value): Likewise.
994 (find_func_descr): Likewise.
995 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
996 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
997 (inf_ptrace_store_registers): Likewise.
998 * infrun.c (use_displaced_stepping): Likewise.
999 (displaced_step_prepare_throw): Likewise.
1001 (proceed): Likewise.
1002 (do_target_wait): Likewise.
1003 (adjust_pc_after_break): Likewise.
1004 (handle_inferior_event_1): Likewise.
1005 (handle_signal_stop): Likewise.
1006 (save_infcall_suspend_state): Likewise.
1007 (restore_infcall_suspend_state): Likewise.
1008 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1009 * jit.c (jit_frame_prev_register): Likewise.
1010 * linux-nat.c (save_stop_reason): Likewise.
1011 (linux_nat_wait_1): Likewise.
1012 (resume_stopped_resumed_lwps): Likewise.
1013 * linux-record.c (record_linux_sockaddr): Likewise.
1014 (record_linux_msghdr): Likewise.
1015 (record_linux_system_call): Likewise.
1016 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1017 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1018 (lm32_store_return_value): Likewise.
1019 * m32c-tdep.c (m32c_read_flg): Likewise.
1020 (m32c_pseudo_register_read): Likewise.
1021 (m32c_pseudo_register_write): Likewise.
1022 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1023 (m32r_linux_collect_gregset): Likewise.
1024 * m32r-tdep.c (m32r_store_return_value): Likewise.
1025 (m32r_extract_return_value): Likewise.
1026 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1027 (m68kbsd_collect_fpregset): Likewise.
1028 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1029 * m68k-linux-nat.c (fetch_register): Likewise.
1030 (old_fetch_inferior_registers): Likewise.
1031 (old_store_inferior_registers): Likewise.
1032 (store_regs): Likewise.
1033 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1034 (m68k_svr4_store_return_value): Likewise.
1035 * m88k-tdep.c (m88k_store_arguments): Likewise.
1036 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1037 (mi_cmd_data_write_register_values): Likewise.
1038 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1039 (mips_fbsd_store_inferior_registers): Likewise.
1040 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1041 (mips_fbsd_supply_gregs): Likewise.
1042 (mips_fbsd_collect_fpregs): Likewise.
1043 (mips_fbsd_collect_gregs): Likewise.
1044 (mips_fbsd_supply_fpregset): Likewise.
1045 (mips_fbsd_collect_fpregset): Likewise.
1046 (mips_fbsd_supply_gregset): Likewise.
1047 (mips_fbsd_collect_gregset): Likewise.
1048 * mips-linux-nat.c (supply_gregset): Likewise.
1049 (fill_gregset): Likewise.
1050 (supply_fpregset): Likewise.
1051 (fill_fpregset): Likewise.
1052 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1053 (mips_fill_gregset): Likewise.
1054 (mips_supply_fpregset): Likewise.
1055 (mips_fill_fpregset): Likewise.
1056 (mips64_supply_gregset): Likewise.
1057 (micromips_linux_sigframe_validate): Likewise.
1058 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1059 (mipsnbsd_fetch_inferior_registers): Likewise.
1060 (mipsnbsd_store_inferior_registers): Likewise.
1061 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1062 (mipsnbsd_supply_gregset): Likewise.
1063 (mipsnbsd_iterate_over_regset_sections): Likewise.
1064 (mipsnbsd_supply_reg): Likewise.
1065 (mipsnbsd_supply_fpreg): Likewise.
1066 * mips-tdep.c (mips_in_frame_stub): Likewise.
1067 (mips_dummy_id): Likewise.
1068 (is_octeon_bbit_op): Likewise.
1069 (micromips_bc1_pc): Likewise.
1070 (extended_mips16_next_pc): Likewise.
1071 (mips16_next_pc): Likewise.
1072 (deal_with_atomic_sequence): Likewise.
1073 * moxie-tdep.c (moxie_process_readu): Likewise.
1074 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1075 * nto-procfs.c (procfs_store_registers): Likewise.
1076 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1077 (ppcfbsd_store_inferior_registers): Likewise.
1078 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1079 (fetch_altivec_register): Likewise.
1080 (get_spe_registers): Likewise.
1081 (fetch_spe_register): Likewise.
1082 (fetch_altivec_registers): Likewise.
1083 (fetch_all_gp_regs): Likewise.
1084 (fetch_all_fp_regs): Likewise.
1085 (store_vsx_register): Likewise.
1086 (store_altivec_register): Likewise.
1087 (set_spe_registers): Likewise.
1088 (store_spe_register): Likewise.
1089 (store_altivec_registers): Likewise.
1090 (store_all_gp_regs): Likewise.
1091 (store_all_fp_regs): Likewise.
1092 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1093 (ppc_linux_collect_gregset): Likewise.
1094 (ppc_canonicalize_syscall): Likewise.
1095 (ppc_linux_record_signal): Likewise.
1096 (ppu2spu_prev_register): Likewise.
1097 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1098 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1099 (ppcobsd_store_registers): Likewise.
1100 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1102 (ppc_ravenscar_generic_store_registers): Likewise.
1103 * procfs.c (procfs_fetch_registers): Likewise.
1104 (procfs_store_registers): Likewise.
1105 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1106 (ravenscar_store_registers): Likewise.
1107 (ravenscar_prepare_to_store): Likewise.
1108 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1109 * record-full.c (record_full_wait_1): Likewise.
1110 (record_full_registers_change): Likewise.
1111 (record_full_store_registers): Likewise.
1112 (record_full_core_fetch_registers): Likewise.
1113 (record_full_save): Likewise.
1114 (record_full_goto_insn): Likewise.
1115 * regcache.c (regcache_register_size): Likewise.
1116 (get_regcache_arch): Remove.
1117 (regcache_read_pc): Likewise.
1118 * regcache.h (get_regcache_arch): Remove.
1119 * remote-sim.c (gdbsim_fetch_register): Likewise.
1120 (gdbsim_store_register): Likewise.
1121 * remote.c (fetch_register_using_p): Likewise.
1122 (send_g_packet): Likewise.
1123 (remote_prepare_to_store): Likewise.
1124 (store_registers_using_G): Likewise.
1125 * reverse.c (save_bookmark_command): Likewise.
1126 (goto_bookmark_command): Likewise.
1127 * rs6000-aix-tdep.c (branch_dest): Likewise.
1128 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1129 (fetch_register): Likewise.
1130 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1131 (ppc_collect_reg): Likewise.
1132 (ppc_collect_gregset): Likewise.
1133 (ppc_collect_fpregset): Likewise.
1134 (ppc_collect_vsxregset): Likewise.
1135 (ppc_collect_vrregset): Likewise.
1136 (ppc_displaced_step_hw_singlestep): Likewise.
1137 (rs6000_pseudo_register_read): Likewise.
1138 (rs6000_pseudo_register_write): Likewise.
1139 * s390-linux-nat.c (supply_gregset): Likewise.
1140 (fill_gregset): Likewise.
1141 (s390_linux_fetch_inferior_registers): Likewise.
1142 * s390-linux-tdep.c (s390_write_pc): Likewise.
1143 (s390_software_single_step): Likewise.
1144 (s390_all_but_pc_registers_record): Likewise.
1145 (s390_linux_syscall_record): Likewise.
1146 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1147 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1148 (shnbsd_store_inferior_registers): Likewise.
1149 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1150 (sh_extract_return_value_fpu): Likewise.
1151 (sh_store_return_value_nofpu): Likewise.
1152 (sh_corefile_supply_regset): Likewise.
1153 (sh_corefile_collect_regset): Likewise.
1154 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1155 (sh64_store_return_value): Likewise.
1156 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1157 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1158 (sparc_store_inferior_registers): Likewise.
1159 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1160 (sparc_ravenscar_prepare_to_store): Likewise.
1161 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1162 (sparc_analyze_control_transfer): Likewise.
1163 (sparc_step_trap): Likewise.
1164 (sparc_software_single_step): Likewise.
1165 (sparc32_gdbarch_init): Likewise.
1166 (sparc_supply_rwindow): Likewise.
1167 (sparc_collect_rwindow): Likewise.
1168 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1169 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1170 (sparc64nbsd_collect_gregset): Likewise.
1171 (sparc64nbsd_supply_fpregset): Likewise.
1172 (sparc64nbsd_collect_fpregset): Likewise.
1173 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1174 (sparc64_supply_gregset): Likewise.
1175 (sparc64_collect_gregset): Likewise.
1176 (sparc64_supply_fpregset): Likewise.
1177 (sparc64_collect_fpregset): Likewise.
1178 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1179 * spu-tdep.c (spu_unwind_sp): Likewise.
1180 (spu2ppu_prev_register): Likewise.
1181 (spu_memory_remove_breakpoint): Likewise.
1182 * stack.c (return_command): Likewise.
1183 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1184 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1185 * tracefile.c (trace_save_ctf): Likewise.
1186 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1187 (do_windows_store_inferior_registers): Likewise.
1188 (windows_resume): Likewise.
1189 * xtensa-linux-nat.c (fill_gregset): Likewise.
1190 (supply_gregset_reg): Likewise.
1191 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1192 (xtensa_register_read_masked): Likewise.
1193 (xtensa_supply_gregset): Likewise.
1194 (xtensa_extract_return_value): Likewise.
1195 (xtensa_store_return_value): Likewise.
1197 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1199 * doublest.c (floatformat_from_string): New function.
1200 * doublest.h (floatformat_from_string): Add prototype.
1202 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1203 (OP_FLOAT): ... this.
1204 * expression.h: Do not include "doublest.h".
1205 (union exp_element): Replace doubleconst and decfloatconst by
1206 new element floatconst.
1207 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1208 (ada_evaluate_subexp): Likewise.
1209 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1210 OP_DOUBLE and OP_DECFLOAT.
1211 * expprint.c (print_subexp_standard): Likewise.
1212 (dump_subexp_body_standard): Likewise.
1213 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1215 * parse.c: Include "dfp.h".
1216 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1217 (write_exp_elt_floatcst): New function.
1218 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1220 (operator_check_standard): Likewise.
1221 (parse_float): Do not accept suffix. Take type as input. Return bool.
1222 Return target format buffer instead of host DOUBLEST.
1223 Use floatformat_from_string and decimal_from_string to parse
1224 either binary or decimal floating-point types.
1225 (parse_c_float): Remove.
1226 * parser-defs.h: Do not include "doublest.h".
1227 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1228 (write_exp_elt_floatcst): Add prototype.
1229 (parse_float): Update prototype.
1230 (parse_c_float): Remove.
1232 * c-exp.y: Do not include "dfp.h".
1233 (typed_val_float): Use byte buffer instead of DOUBLEST.
1234 (typed_val_decfloat): Remove.
1236 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1237 (parse_number): Update to new parse_float interface.
1238 Parse suffixes and determine type before calling parse_float.
1239 Handle decimal and binary FP types the same way.
1241 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1242 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1243 (parse_number): Update to new parse_float interface.
1244 Parse suffixes and determine type before calling parse_float.
1246 * f-exp.y: Replace dval by typed_val_float.
1247 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1248 (parse_number): Use parse_float instead of atof.
1250 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1251 (parse_go_float): Remove.
1252 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1253 (parse_number): Call parse_float instead of parse_go_float.
1254 Parse suffixes and determine type before calling parse_float.
1256 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1257 (FLOAT): 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.
1261 * m2-exp.y: Replace dval by byte buffer val.
1262 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1263 (parse_number): Call parse_float instead of atof.
1265 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1266 (lex_number): Call parse_float instead of strtod.
1267 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1268 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1269 Use write_exp_elt_floatcst.
1270 (unit_testing): Remove static variable.
1271 (rust_type): Do not check unit_testing.
1272 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1274 * ada-exp.y (type_float, type_double): Remove.
1275 (typed_val_float): Use byte buffer instead of DOUBLEST.
1276 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1277 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1279 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1281 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1282 * arch/aarch64.h: New file.
1284 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1286 * dfp.h (decimal_from_string): Use const reference for argument.
1287 * dfp.c (decimal_from_string): Likewise.
1289 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1291 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1292 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1293 * mips-tdep.c (mips_print_fp_register): Likewise.
1295 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1297 * common/format.h (enum argclass): Replace decfloat_arg by
1298 dec32float_arg, dec64float_arg, and dec128float_arg.
1299 * common/format.c (parse_format_string): Update to return
1300 new decimal float argument classes.
1302 * printcmd.c (printf_decfloat): Rename to ...
1303 (printf_floating): ... this. Add argclass argument, and use it
1304 instead of parsing the format string again. Add support for
1305 binary floating-point values, using floatformat_to_string.
1306 Convert value to the target format if it doesn't already match.
1307 (ui_printf): Call printf_floating instead of printf_decfloat,
1308 also for double_arg / long_double_arg. Pass argclass.
1310 * dfp.c (decimal_to_string): Add format string argument.
1311 * dfp.h (decimal_to_string): Likewise.
1313 * doublest.c (floatformat_to_string): Add format string argument.
1314 * doublest.h (floatformat_to_string): Likewise.
1316 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1318 * doublest.c (floatformat_precision): New routine.
1319 (floatformat_to_string): Likewise.
1320 * doublest.c (floatformat_to_string): Add prototype.
1322 * printcmd.c (print_scalar_formatted): Only call print_floating
1323 on floating-point types.
1324 * valprint.c: Do not include "floatformat.h".
1325 (generic_val_print_decfloat): Remove.
1326 (generic_val_print): Call generic_val_print_float for both
1327 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1328 (print_floating): Use floatformat_to_string. Handle decimal float.
1329 (print_decimal_floating): Remove, merge into floatformat_to_string.
1330 * value.h (print_decimal_floating): Remove.
1332 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1334 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1336 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1338 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1340 * memattr.h: Don't include vec.h.
1341 (struct mem_attrib): Initialize fields.
1342 <unknown>: New static method.
1343 (struct mem_region): Add constructors, operator<, initialize
1345 * memattr.c: Include algorithm.
1346 (default_mem_attrib, unknown_mem_attrib): Remove.
1347 (user_mem_region_list): New global.
1348 (target_mem_region_list, mem_region_list): Change type to
1349 std::vector<mem_region>.
1350 (mem_use_target): Now a function.
1351 (target_mem_regions_valid): Change type to bool.
1352 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1353 (require_user_regions): Adjust.
1354 (require_target_regions): Adjust.
1355 (create_mem_region): Adjust.
1356 (lookup_mem_region): Adjust.
1357 (invalidate_target_mem_regions): Adjust.
1358 (mem_clear): Rename to...
1359 (user_mem_clear): ... this, and adjust.
1360 (mem_command): Adjust.
1361 (info_mem_command): Adjust.
1362 (mem_enable, enable_mem_command, mem_disable,
1363 disable_mem_command): Adjust.
1364 (mem_delete): Adjust.
1365 (delete_mem_command): Adjust.
1366 * memory-map.h (parse_memory_map): Return an std::vector.
1367 * memory-map.c (parse_memory_map): Likewise.
1368 (struct memory_map_parsing_data): Add constructor.
1369 <memory_map>: Point to std::vector.
1370 (memory_map_start_memory): Adjust.
1371 (memory_map_end_memory): Adjust.
1372 (memory_map_end_property): Adjust.
1373 (clear_result): Remove.
1374 * remote.c (remote_memory_map): Return an std::vector.
1375 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1377 (target_debug_print_mem_region_vector): New.
1378 * target-delegates.c: Regenerate.
1379 * target.h (mem_region_vector): New typedef.
1380 (to_memory_map): Return mem_region_vector.
1381 (target_memory_map): Return an std::vector.
1382 * target.c (target_memory_map): Return an std::vector.
1383 (flash_erase_command): Adjust.
1385 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1387 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1388 Change type to std::string.
1389 (memory_map_start_property): Adjust.
1390 (memory_map_end_property): Adjust.
1392 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1394 * infrun.h: Include common/byte-vector.h.
1395 (struct displaced_step_closure): New struct.
1396 (struct buf_displaced_step_closure): New struct.
1397 * infrun.c (displaced_step_closure::~displaced_step_closure):
1398 Provide default implementation.
1399 (displaced_step_clear): Deallocate step closure with delete.
1400 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1401 (aarch64_displaced_step_closure): ... this, extend
1402 displaced_step_closure.
1403 (aarch64_displaced_step_data) <dsc>: Change type to
1404 aarch64_displaced_step_closure.
1405 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1407 (aarch64_displaced_step_fixup): Add cast for displaced step
1409 * amd64-tdep.c (displaced_step_closure): Rename to ...
1410 (amd64_displaced_step_closure): ... this, extend
1411 displaced_step_closure.
1412 <insn_buf>: Change type to std::vector<gdb_byte>.
1414 (fixup_riprel): Change type of DSC parameter, adjust to type
1416 (fixup_displaced_copy): Change type of DSC parameter.
1417 (amd64_displaced_step_copy_insn): Instantiate
1418 amd64_displaced_step_closure.
1419 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1420 to type change of insn_buf.
1421 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1423 (arm_linux_copy_svc): Likewise.
1424 (cleanup_kernel_helper_return): Likewise.
1425 (arm_catch_kernel_helper_return): Likewise.
1426 (arm_linux_displaced_step_copy_insn): Instantiate
1427 arm_displaced_step_closure.
1428 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1429 (displaced_read_reg): Change type of parameter DSC.
1430 (branch_write_pc): Likewise.
1431 (load_write_pc): Likewise.
1432 (alu_write_pc): Likewise.
1433 (displaced_write_reg): Likewise.
1434 (arm_copy_unmodified): Likewise.
1435 (thumb_copy_unmodified_32bit): Likewise.
1436 (thumb_copy_unmodified_16bit): Likewise.
1437 (cleanup_preload): Likewise.
1438 (install_preload): Likewise.
1439 (arm_copy_preload): Likewise.
1440 (thumb2_copy_preload): Likewise.
1441 (install_preload_reg): Likewise.
1442 (arm_copy_preload_reg): Likewise.
1443 (cleanup_copro_load_store): Likewise.
1444 (install_copro_load_store): Likewise.
1445 (arm_copy_copro_load_store) Likewise.
1446 (thumb2_copy_copro_load_store): Likewise.
1447 (cleanup_branch): Likewise.
1448 (install_b_bl_blx): Likewise.
1449 (arm_copy_b_bl_blx): Likewise.
1450 (thumb2_copy_b_bl_blx): Likewise.
1451 (thumb_copy_b): Likewise.
1452 (install_bx_blx_reg): Likewise.
1453 (arm_copy_bx_blx_reg): Likewise.
1454 (thumb_copy_bx_blx_reg): Likewise.
1455 (cleanup_alu_imm): Likewise.
1456 (arm_copy_alu_imm): Likewise.
1457 (thumb2_copy_alu_imm): Likewise.
1458 (cleanup_alu_reg): Likewise.
1459 (install_alu_reg): Likewise.
1460 (arm_copy_alu_reg): Likewise.
1461 (thumb_copy_alu_reg): Likewise.
1462 (cleanup_alu_shifted_reg): Likewise.
1463 (install_alu_shifted_reg): Likewise.
1464 (arm_copy_alu_shifted_reg): Likewise.
1465 (cleanup_load): Likewise.
1466 (cleanup_store): Likewise.
1467 (arm_copy_extra_ld_st): Likewise.
1468 (install_load_store): Likewise.
1469 (thumb2_copy_load_literal): Likewise.
1470 (thumb2_copy_load_reg_imm): Likewise.
1471 (arm_copy_ldr_str_ldrb_strb): Likewise.
1472 (cleanup_block_load_all): Likewise.
1473 (cleanup_block_store_pc): Likewise.
1474 (cleanup_block_load_pc): Likewise.
1475 (arm_copy_block_xfer): Likewise.
1476 (thumb2_copy_block_xfer): Likewise.
1477 (cleanup_svc): Likewise.
1478 (install_svc): Likewise.
1479 (arm_copy_svc): Likewise.
1480 (thumb_copy_svc): Likewise.
1481 (arm_copy_undef): Likewise.
1482 (thumb_32bit_copy_undef): Likewise.
1483 (arm_copy_unpred): Likewise.
1484 (arm_decode_misc_memhint_neon): Likewise.
1485 (arm_decode_unconditional): Likewise.
1486 (arm_decode_miscellaneous): Likewise.
1487 (arm_decode_dp_misc): Likewise.
1488 (arm_decode_ld_st_word_ubyte): Likewise.
1489 (arm_decode_media): Likewise.
1490 (arm_decode_b_bl_ldmstm): Likewise.
1491 (arm_decode_ext_reg_ld_st): Likewise.
1492 (thumb2_decode_dp_shift_reg): Likewise.
1493 (thumb2_decode_ext_reg_ld_st): Likewise.
1494 (arm_decode_svc_copro): Likewise.
1495 (thumb2_decode_svc_copro): Likewise.
1496 (install_pc_relative): Likewise.
1497 (thumb_copy_pc_relative_16bit): Likewise.
1498 (thumb_decode_pc_relative_16bit): Likewise.
1499 (thumb_copy_pc_relative_32bit): Likewise.
1500 (thumb_copy_16bit_ldr_literal): Likewise.
1501 (thumb_copy_cbnz_cbz): Likewise.
1502 (thumb2_copy_table_branch): Likewise.
1503 (cleanup_pop_pc_16bit_all): Likewise.
1504 (thumb_copy_pop_pc_16bit): Likewise.
1505 (thumb_process_displaced_16bit_insn): Likewise.
1506 (decode_thumb_32bit_ld_mem_hints): Likewise.
1507 (thumb_process_displaced_32bit_insn): Likewise.
1508 (thumb_process_displaced_insn): Likewise.
1509 (arm_process_displaced_insn): Likewise.
1510 (arm_displaced_init_closure): Likewise.
1511 (arm_displaced_step_fixup): Add cast for closure.
1512 * arm-tdep.h: Include infrun.h.
1513 (displaced_step_closure): Rename to ...
1514 (arm_displaced_step_closure): ... this, extend
1515 displaced_step_closure.
1516 <u::svc::copy_svc_os>: Change type of parameter DSC.
1517 <cleanup>: Likewise.
1518 (arm_process_displaced_insn): Likewise.
1519 (arm_displaced_init_closure): Likewise.
1520 (displaced_read_reg): Likewise.
1521 (displaced_write_reg): Likewise.
1522 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1524 * i386-tdep.h: Include infrun.h.
1525 (i386_displaced_step_closure): New typedef.
1526 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1527 i386_displaced_step_closure.
1528 (i386_displaced_step_fixup): Adjust.
1529 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1530 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1532 (ppc_displaced_step_fixup): Adjust.
1533 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1534 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1536 (s390_displaced_step_fixup): Adjust.
1538 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1540 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1541 Remove declarations.
1543 2017-10-20 Tom Tromey <tom@tromey.com>
1545 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1547 (gdb_bfd_record_inclusion): Update.
1548 (bfdp): Remove typedef.
1550 2017-10-20 Tom Tromey <tom@tromey.com>
1552 * gdb_bfd.c (gdb_bfd_ref): Use new.
1553 (struct gdb_bfd_data): Add constructor, destructor, and member
1555 (gdb_bfd_unref): Use delete.
1557 2017-10-20 Tom Tromey <tom@tromey.com>
1559 * exec.c (exec_file_attach): Use new_bfd_ref.
1560 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1561 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1562 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1564 * gdb_bfd.h (new_bfd_ref): New function.
1566 2017-10-20 Pedro Alves <palves@redhat.com>
1568 * main.c (captured_command_loop): Add attribute noinline.
1570 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1572 * interps.c (struct interp_factory): Add constructor.
1573 (interp_factory_p): Remove typedef.
1574 (DEF_VEC_P(interp_factory_p)): Remove.
1575 (interpreter_factories): Change type to std::vector.
1576 (interp_factory_register): Adjust.
1577 (interp_lookup): Adjust.
1578 (interpreter_completer): Adjust.
1580 2017-10-19 Tom Tromey <tom@tromey.com>
1582 * break-catch-syscall.c (catch_syscall_completer): Use
1583 std::string, gdb::unique_xmalloc_ptr.
1585 2017-10-19 Tom Tromey <tom@tromey.com>
1587 * infcall.c (call_function_by_hand_dummy): Use std::string.
1589 2017-10-19 Tom Tromey <tom@tromey.com>
1591 * mi/mi-main.c (mi_cmd_execute): Update.
1592 * top.h (prepare_execute_command): Return scoped_value_mark.
1593 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1594 Add move constructor.
1595 * top.c (prepare_execute_command): Return scoped_value_mark.
1596 (execute_command): Update.
1598 2017-10-19 Pedro Alves <palves@redhat.com>
1600 * xml-support.c (xml_fetch_content_from_file): Check fread's
1603 2017-10-19 Pedro Alves <palves@redhat.com>
1605 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1607 (handle_error_fd): New function.
1608 (ser_base_async): Add/delete an event loop file handler for
1611 2017-10-19 Pedro Alves <palves@redhat.com>
1613 * xml-support.c (xml_fetch_content_from_file): Don't read in
1614 chunks. Instead use fseek to determine the file's size, and read
1617 2017-11-18 Keith Seitz <keiths@redhat.com>
1619 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1621 Add whitespace to front of type name.
1623 2017-10-18 Keith Seitz <keiths@redhat.com>
1625 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1626 DW_AT_accessibility.
1628 2017-10-18 Yao Qi <yao.qi@linaro.org>
1630 * features/tic6x-c62x-linux.c: Remove.
1632 2017-10-17 Tom Tromey <tom@tromey.com>
1634 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1635 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1636 (do_mixed_source_and_assembly): Likewise.
1638 2017-10-17 Tom Tromey <tom@tromey.com>
1640 * regcache.c (regcache::xfer_part): Remove assertion.
1642 2017-10-17 Pedro Alves <palves@redhat.com>
1644 * xml-support.c (xml_fetch_content_from_file): Call
1645 unique_ptr::release() instead unique_ptr::get() when passing
1648 2017-10-17 Yao Qi <yao.qi@linaro.org>
1650 * regcache.c (regcache::xfer_part): Remove parameters read and
1651 write, add parameter is_raw. All callers are updated.
1653 2017-10-16 Keith Seitz <keiths@redhat.com>
1655 * c-typeprint.c (enum access_specifier): Moved here from
1657 (output_access_specifier): New function.
1658 (c_type_print_base): Consider typedefs when assessing
1659 whether access labels are needed.
1660 Use output_access_specifier as needed.
1661 Output access specifier for typedefs, if needed.
1662 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1663 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1665 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1668 2017-10-16 Tom Tromey <tom@tromey.com>
1670 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1671 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1672 * target.c (target_fileio_read_stralloc): Update.
1673 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1674 * target.h (target_fileio_read_stralloc): Return
1677 2017-10-16 Tom Tromey <tom@tromey.com>
1679 * xml-syscall.c (xml_init_syscalls_info): Update.
1680 * xml-support.c (xinclude_start_include): Update.
1681 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1682 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1683 (xml_fetch_content_from_file): Likewise.
1684 * osdata.c (get_osdata): Update.
1685 * target.h (target_read_stralloc, target_get_osdata): Return
1687 * solib-aix.c (solib_aix_get_library_list): Update.
1688 * solib-target.c (solib_target_current_sos): Update.
1689 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1690 * xml-tdesc.c (fetch_available_features_from_target): Update.
1691 (target_fetch_description_xml): Update.
1692 (file_read_description_xml): Update.
1693 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1694 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1695 (remote_pid_to_exec_file): Update.
1696 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1697 (target_get_osdata): Likewise.
1699 2017-10-16 Tom Tromey <tom@tromey.com>
1701 * remote.c (remote_register_number_and_offset): Use std::vector.
1702 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1703 (putpkt_binary): Use gdb::def_vector.
1704 (compare_sections_command): Use gdb::byte_vector.
1706 2017-10-16 Tom Tromey <tom@tromey.com>
1708 * ppc-linux-nat.c (hwdebug_insert_point): Use
1709 gdb::unique_xmalloc_ptr, XDUP.
1711 2017-10-16 Tom Tromey <tom@tromey.com>
1713 * probe.c (parse_probes): Use std::string.
1714 (info_probes_for_ops, enable_probes_command)
1715 (disable_probes_command): Remove cleanups.
1717 2017-10-16 Tom Tromey <tom@tromey.com>
1719 * buildsym.c (block_compar): Remove.
1720 (end_symtab_get_static_block): Use std::vector.
1722 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1724 * memrange.h (struct mem_range): Define operator< and operator==.
1725 (mem_range_s): Remove.
1726 (DEF_VEC_O (mem_range_s)): Remove.
1727 (normalize_mem_ranges): Change parameter type to std::vector.
1728 * memrange.c (compare_mem_ranges): Remove.
1729 (normalize_mem_ranges): Change parameter type to std::vector,
1730 adjust to vector change.
1731 * exec.c (section_table_available_memory): Return vector, remove
1733 (section_table_read_available_memory): Adjust to std::vector
1735 * remote.c (remote_read_bytes): Adjust to std::vector
1737 * tracepoint.h (traceframe_available_memory): Change parameter
1738 type to std::vector.
1739 * tracepoint.c (traceframe_available_memory): Change parameter
1740 type to std::vector, adjust.
1741 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1743 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1744 unittests/memrange-selftests.c.
1745 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1746 * gdb/unittests/memrange-selftests.c: New file.
1748 2017-10-16 Pedro Alves <palves@redhat.com>
1750 * elfread.c (probe_key_free): Rename range-for variable.
1751 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1752 (find_probe_by_pc, collect_probes): Rename range-for variable.
1754 2017-10-16 Yao Qi <yao.qi@linaro.org>
1756 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1757 * features/tic6x-c62x.c: Remove.
1758 * features/tic6x-c64x-linux.c: Remove.
1759 * features/tic6x-c64x.c: Remove.
1760 * features/tic6x-c64xp-linux.c: Remove.
1761 * features/tic6x-c64xp.c: Remove.
1762 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1763 initialize_tdesc_tic6x_*_linux functions.
1764 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1765 initialize_tdesc_tic6x_* functions.
1767 2017-10-16 Yao Qi <yao.qi@linaro.org>
1769 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1771 * regformats/tic6x-c62x.dat: Remove.
1772 * regformats/tic6x-c64x.dat: Remove.
1773 * regformats/tic6x-c64xp.dat: Remove.
1775 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1777 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1778 (the !HAVE_LIBEXPAT version).
1780 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1782 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1785 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1787 * target.h: Include tracepoint.h.
1788 (enum trace_find_type): Move to tracepoint.h.
1789 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1790 * tracepoint.h: Don't include target.h
1791 (enum trace_find_type): Move from target.h.
1792 (parse_traceframe_info): Return a unique ptr.
1793 * tracepoint.c (current_traceframe_info): Change type to unique
1795 (free_traceframe_info): Remove.
1796 (clear_traceframe_info): Don't manually free
1797 current_traceframe_info.
1798 (free_result): Remove.
1799 (parse_traceframe_info): Return a unique ptr.
1800 (get_traceframe_info): Adjust to unique ptr.
1801 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1802 * remote.c (remote_traceframe_info): Return a unique ptr.
1803 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1805 * target-debug.h (target_debug_print_traceframe_info_up): New
1807 * target-delegates.c: Regenerate.
1809 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1811 * memrange.h (struct mem_range): Add constructors.
1812 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1813 std::vector<mem_range>.
1814 * tracepoint.c (free_traceframe_info): Don't manually free
1816 (traceframe_info_start_memory): Adjust to vector change.
1817 (traceframe_available_memory): Likewise.
1818 * tracefile-tfile.c (build_traceframe_info): Likewise.
1819 * ctf.c (ctf_traceframe_info): Likewise.
1821 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1823 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1825 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1826 (traceframe_info_start_tvar): Adjust to vector change.
1827 (parse_traceframe_info): Allocate with new.
1828 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1830 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1832 tfile_traceframe_info): Allocate with new.
1833 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1836 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1838 * tracepoint.c (traceframe_info): Rename to...
1839 (current_traceframe_info): ...this.
1840 (clear_traceframe_info): Adjust.
1841 (get_traceframe_info): Adjust.
1843 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1845 * nat/linux-osdata.c: Include algorithm.
1846 (compare_processes): Remove.
1847 (struct pid_pgid_entry): New struct.
1848 (linux_xfer_osdata_processgroups): Use std::vector instead of
1851 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1853 * objfiles.h: Don't include symfile.h.
1854 (struct partial_symbol): Remove forward-declaration.
1855 (struct objfile) <global_psymbols, static_psymbols>: Change type
1856 to std::vector<partial_symbol *>.
1857 * objfiles.c (objfile::objfile): Don't memset those fields.
1858 (objfile::~objfile): Don't free those fields.
1859 * psympriv.h (struct psymbol_allocation_list): Remove
1860 forward-declaration.
1861 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1863 (start_psymtab_common): Change parameters to std::vector.
1864 * psymtab.c: Include algorithm.
1865 (require_partial_symbols): Call shrink_to_fit.
1866 (find_pc_sect_psymbol): Adjust to vector change.
1867 (match_partial_symbol): Likewise.
1868 (lookup_partial_symbol): Likewise.
1869 (psym_relocate): Likewise.
1870 (dump_psymtab): Likewise.
1871 (recursively_search_psymtabs): Likewise.
1872 (compare_psymbols): Remove.
1873 (sort_pst_symbols): Adjust to vector change.
1874 (start_psymtab_common): Likewise.
1875 (end_psymtab_common): Likewise.
1876 (psymbol_bcache_full): De-constify return value.
1877 (add_psymbol_to_bcache): Likewise.
1878 (extend_psymbol_list): Remove.
1879 (append_psymbol_to_list): Adjust to vector change.
1880 (add_psymbol_to_list): Likewise.
1881 (init_psymbol_list): Likewise.
1882 (maintenance_info_psymtabs): Likewise.
1883 (maintenance_check_psymtabs): Likewise.
1884 * symfile.h (struct psymbol_allocation_list): Remove.
1885 * symfile.c (reread_symbols): Adjust to vector change.
1886 * dbxread.c (start_psymtab): Change type of parameters.
1887 (dbx_symfile_read): Adjust to vector change.
1888 (read_dbx_symtab): Likewise.
1889 (start_psymtab): Change type of parameters.
1890 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1891 (create_partial_symtab): Likewise.
1892 (add_partial_symbol): Likewise.
1893 (write_one_signatured_type): Likewise.
1894 (recursively_write_psymbols): Likewise.
1895 * mdebugread.c (parse_partial_symbols): Likewise.
1896 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1897 (scan_xcoff_symtab): Adjust to vector change.
1898 (xcoff_initial_scan): Likewise.
1900 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1902 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1904 2017-10-13 Yao Qi <yao.qi@linaro.org>
1906 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1907 Remove s390x-*-expedite, add s390x-expedite.
1909 2017-10-13 Yao Qi <yao.qi@linaro.org>
1911 * features/s390-gs-linux64.c: Regenerated.
1912 * features/s390x-gs-linux64.c: Regenerated.
1914 2017-10-13 Tom Tromey <tom@tromey.com>
1916 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1917 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1919 * symfile.c (symbol_file_add_with_addrs): Use new.
1920 (symbol_file_add_separate): Update comment.
1921 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1922 * jit.c (jit_object_close_impl): Use new.
1923 (jit_unregister_code): Use delete.
1924 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1925 (~objfile): Rename from free_objfile.
1926 (free_objfile_separate_debug, do_free_objfile_cleanup)
1927 (free_all_objfiles, objfile_purge_solibs): Use delete.
1928 * objfiles.h (struct objfile): Add constructor and destructor.
1929 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1930 (allocate_objfile, free_objfile): Don't declare.
1931 (struct objstats): Add initializers.
1933 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1935 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1936 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1937 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1938 * gdbarch.h: Regenerate.
1939 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1941 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1942 (i386_displaced_step_fixup): Adjust comment.
1943 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1945 2017-10-12 Tom Tromey <tom@tromey.com>
1947 * prologue-value.h (pv_area::store_would_trash): Return bool.
1948 (pv_area::find_reg): Likewise.
1949 * prologue-value.c (pv_area::store_would_trash): Return bool.
1950 (pv_area::find_reg): Likewise.
1952 2017-10-12 Tom Tromey <tom@tromey.com>
1954 * s390-linux-tdep.c (s390_store, s390_load)
1955 (s390_check_for_saved, s390_analyze_prologue): Update.
1956 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1957 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1958 * prologue-value.h (class pv_area): Move from prologue-value.c.
1959 Change names of members. Add constructor, destructor, member
1961 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1962 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1963 (pv_area_fetch, pv_area_scan): Don't declare.
1964 * prologue-value.c (struct pv_area::area_entry): Now member of
1966 (struct pv_area): Move to prologue-value.h.
1967 (pv_area::pv_area): Rename from make_pv_area.
1968 (pv_area::~pv_area): Rename from free_pv_area.
1969 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1970 (clear_entries, find_entry, overlaps, store_would_trash, store)
1971 (fetch, find_reg, scan): Now member of pv_area.
1972 Remove "area" argument. Update.
1973 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1975 * mn10300-tdep.c (push_reg, check_for_saved)
1976 (mn10300_analyze_prologue): Update.
1977 * mep-tdep.c (is_arg_spill, check_for_saved)
1978 (mep_analyze_prologue): Update.
1979 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1980 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1981 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1982 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1984 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1985 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1987 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1989 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1990 * linux-nat.c (linux_nat_delete_thread): New variable.
1991 (lwp_free): Invoke linux_nat_delete_thread if set.
1992 (linux_nat_set_delete_thread): New function.
1993 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1994 thread delete callback.
1995 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1996 (_initialize_arm_linux_nat): Assign thread delete callback.
1997 * s390-linux-nat.c (s390_delete_thread): New function.
1998 (_initialize_s390_nat): Assign thread delete callback.
1999 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2000 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2002 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2004 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2005 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2007 2017-10-09 Tom Tromey <tom@tromey.com>
2009 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2011 * tui/tui-layout.c (enum tui_status): Use std::string.
2013 2017-10-11 Tom Tromey <tom@tromey.com>
2015 * gdbthread.h (thread_command): Constify.
2016 * inferior.h (detach_command): Constify.
2017 * top.h (set_history, show_history): Constify.
2018 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2019 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2020 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2021 * printcmd.c (set_command): Constify.
2022 (non_const_set_command): New function.
2023 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2024 * breakpoint.c (enable_command, disable_command, delete_command)
2025 (catch_command, tcatch_command, set_breakpoint_cmd)
2026 (show_breakpoint_cmd): Constify.
2027 * macrocmd.c (macro_command): Constify.
2028 * infcmd.c (unset_command, kill_command, detach_command)
2029 (info_proc_cmd): Constify.
2030 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2031 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2032 (info_auto_load_cmd): Constify.
2033 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2034 (unset_tdesc_cmd): Constify.
2035 * ada-lang.c (set_ada_command, show_ada_command)
2036 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2037 * guile/guile.c (set_guile_command, show_guile_command)
2038 (info_guile_command): Constify.
2039 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2041 * skip.c (skip_command): Constify.
2042 * compile/compile.c (_initialize_compile): Constify.
2043 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2044 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2045 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2046 (maint_btrace_pt_show_cmd): Constify.
2047 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2049 * python/python.c (user_show_python, user_set_python): Constify.
2050 * mips-tdep.c (set_mips_command, show_mips_command)
2051 (set_mipsfpu_command): Constify.
2052 * record-btrace.c (cmd_record_btrace_start)
2053 (cmd_set_record_btrace, cmd_show_record_btrace)
2054 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2055 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2056 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2058 * symfile.c (overlay_command): Constify.
2059 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2060 * cli/cli-logging.c (set_logging_command, show_logging_command):
2062 * cli/cli-dump.c (dump_command, append_command)
2063 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2064 (tekhex_dump_command, binary_dump_command)
2065 (binary_append_command): Constify.
2066 * cli/cli-decode.c (struct cmd_list_element): Change type of
2068 * cli/cli-cmds.c (info_command, show_command, set_debug)
2069 (show_debug): Constify.
2070 (show_command): Add non-const overload.
2071 * top.c (set_history, show_history): Constify.
2072 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2073 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2074 * target.c (target_command): Constify.
2075 * sparc64-tdep.c (info_adi_command): Constify.
2076 * record-full.c (cmd_record_full_start): Constify.
2077 (set_record_full_command): Constify. Fix typo.
2078 (show_record_full_command): Constify.
2079 * thread.c (thread_command, thread_apply_command): Constify.
2080 * memattr.c (dummy_cmd): Constify.
2081 * value.c (function_command): Constify.
2082 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2083 * probe.c (info_probes_command): Constify.
2084 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2085 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2086 (show_thread_cmd, set_thread_default_cmd)
2087 (show_thread_default_cmd): Constify.
2088 (check_empty): Constify.
2089 * tracepoint.c (tfind_command): Constify.
2090 * cp-support.c (maint_cplus_command): Constify.
2091 * windows-tdep.c (info_w32_command): Constify.
2092 * record.c (cmd_record_start, set_record_command)
2093 (show_record_command, info_record_command, cmd_record_goto):
2095 * ravenscar-thread.c (set_ravenscar_command)
2096 (show_ravenscar_command): Constify.
2097 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2099 (add_internal_problem_command): Remove casts.
2100 * arc-tdep.c (maintenance_print_arc_command): Constify.
2101 * valprint.c (set_print, show_print, set_print_raw)
2102 (show_print_raw): Constify.
2103 * maint.c (maintenance_command, maintenance_info_command)
2104 (maintenance_print_command, maintenance_set_cmd)
2105 (maintenance_show_cmd, set_per_command_cmd)
2106 (show_per_command_cmd, maintenance_check_command): Constify.
2107 * language.c (set_check, show_check): Constify.
2108 * typeprint.c (show_print_type, set_print_type): Constify.
2109 * go32-nat.c (go32_info_dos_command): Constify.
2111 2017-10-11 Tom Tromey <tom@tromey.com>
2113 * breakpoint.c (prepare_re_set_context): Remove.
2114 (breakpoint_re_set_one): Update. Don't use cleanups.
2115 (breakpoint_re_set): Use scoped_restore, std::string, and
2116 scoped_restore_current_language.
2118 2017-10-11 Tom Tromey <tom@tromey.com>
2120 * breakpoint.c (commands_command_1): Use std::string.
2121 (cleanup_executing_breakpoints): Remove.
2122 (bpstat_do_actions_1): Use scoped_restore.
2123 (bpstat_check_watchpoint): Use std::string.
2124 (decode_static_tracepoint_spec): Likewise.
2125 (break_range_command): Likewise.
2126 (watch_command_1): Likewise.
2127 (compare_breakpoints): Change argument types.
2128 (clear_command): Use std::vector.
2129 (cleanup_executing_breakpoints): Remove.
2130 (update_global_location_list): Use unique_xmalloc_ptr.
2131 (strace_command): Remove unused declaration.
2133 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2135 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2136 * NEWS: Mention new FreeBSD/arm native configuration.
2137 * configure.host: Add arm*-*-freebsd*.
2138 * configure.nat: Likewise.
2139 * arm-fbsd-nat.c: New file.
2141 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2143 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2144 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2145 * NEWS: Mention new FreeBSD/arm target.
2146 * configure.tgt: Add arm*-*-freebsd*.
2147 * arm-fbsd-tdep.c: New file.
2148 * arm-fbsd-tdep.h: New file.
2150 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2152 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2153 `gdbarch_elfcore_write_linux_prpsinfo'.
2154 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2156 (elf_internal_linux_prpsinfo): Remove declaration.
2157 * gdbarch.h: Regenerate.
2158 * gdbarch.c: Regenerate.
2160 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2162 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2163 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2165 2017-10-11 Pedro Alves <palves@redhat.com>
2167 * breakpoint.c (reattach_breakpoints): Delete.
2168 * breakpoint.h (reattach_breakpoints): Delete.
2170 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2172 * symfile.c (registered_sym_fns): Make struct, not typedef.
2173 (DEF_VEC_O (registered_sym_fns)): Remove.
2174 (symtab_fns): Change type to std::vector.
2175 (add_symtab_fns): Adjust.
2176 (find_sym_fns): Adjust.
2178 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2180 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2181 * arc-tdep.h (arc_arch_is_em): New function.
2182 (arc_arch_is_hs): Likewise.
2184 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2186 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2187 parentheses in the declaration.
2188 (macro_lookup_inclusion): Likewise.
2189 (macro_lookup_definition): Likewise.
2190 * p-lang.h (pascal_builtin_types): Likewise.
2191 * tui/tui-data.c (tui_win_list): Likewise.
2192 * tui/tui-data.h (tui_win_list): Likewise.
2193 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2195 2017-10-11 Mark Rages <markrages@gmail.com>
2197 * target-memory.c (block_boundaries): Fix for block address not
2198 aligned on block size.
2200 2017-10-10 Pedro Alves <palves@redhat.com>
2201 Tom Tromey <tom@tromey.com>
2203 * breakpoint.c (struct captured_breakpoint_query_args)
2204 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2205 (print_breakpoint): New.
2206 * breakpoint.h (print_breakpoint): Declare.
2207 * common/common-exceptions.h (enum return_reason): Remove
2208 references to catch_exceptions.
2209 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2211 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2212 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2214 * gdbthread.h (thread_select): Declare.
2215 * mi/mi-cmd-break.c: Don't include gdb.h.
2216 (breakpoint_notify): Use print_breakpoint.
2217 * mi/mi-cmd-catch.c: Don't include gdb.h.
2218 * mi/mi-interp.c: Don't include gdb.h.
2219 (mi_print_breakpoint_for_event): New.
2220 (mi_breakpoint_created, mi_breakpoint_modified): Use
2221 mi_print_breakpoint_for_event.
2222 * mi/mi-main.c: Don't include gdb.h.
2223 (mi_cmd_thread_select): Parse the global thread ID here. Use
2224 thread_select instead of gdb_thread_select.
2225 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2226 of using gdb_list_thread_ids.
2227 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2229 (remote_fileio_request): Use TRY/CATCH instead of
2231 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2232 (symbol_file_add_from_memory_wrapper): Delete.
2233 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2234 * thread.c: Don't include gdb.h.
2235 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2236 (thread_alive): Use thread_select.
2237 (do_captured_thread_select): Delete, parts salvaged as ...
2238 (thread_select): ... this new function.
2239 (gdb_thread_select): Delete.
2241 2017-10-10 Pedro Alves <palves@redhat.com>
2242 Tom Tromey <tom@tromey.com>
2244 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2246 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2247 No longer macros. Instead ...
2248 (enum wp_check_result): They're now values of this new
2250 (watchpoint_check): Change return type to wp_check_result and
2251 parameter type to bpstat.
2252 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2253 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2254 catch_errors. Reverse logic of watchpoint_check call.
2255 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2256 pointer as parameter.
2257 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2258 * common/common-exceptions.c (throw_exception_sjlj): Update
2259 comments to avoid mentioning catch_errors.
2260 * exceptions.c (catch_errors): Delete.
2261 * exceptions.h: Update comments to avoid mentioning catch_errors.
2262 (catch_errors_ftype, catch_errors): Delete.
2263 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2264 (hook_stop_stub): Delete.
2265 (restore_selected_frame): Change return type to void, and
2266 parameter type to const frame_id &.
2267 (restore_infcall_control_state): Use TRY/CATCH instead of
2269 * main.c (captured_command_loop): Return void and remove
2270 parameter. Remove references to catch_errors.
2271 (captured_main): Use TRY/CATCH instead of catch_errors.
2272 * objc-lang.c (objc_submethod_helper_data)
2273 (find_objc_msgcall_submethod_helper): Delete.
2274 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2276 * record-full.c (record_full_message): Return void.
2277 (record_full_message_args, record_full_message_wrapper): Delete.
2278 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2279 instead of catch_errors.
2280 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2281 parameter type to int.
2282 * solib-darwin.c (open_symbol_file_object): Ditto.
2283 * solib-dsbt.c (open_symbol_file_object): Ditto.
2284 * solib-frv.c (open_symbol_file_object): Ditto.
2285 * solib-svr4.c (open_symbol_file_object): Ditto.
2286 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2287 * solib.c (update_solib_list): Use TRY/CATCH instead of
2289 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2291 * symmisc.c (struct print_symbol_args): Remove.
2292 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2293 (print_symbol): Change type.
2294 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2295 and remove parameters.
2296 (catch_errors): New.
2297 (get_windows_debug_event): Adjust.
2299 2017-10-09 Tom Tromey <tom@tromey.com>
2301 * mi/mi-main.c (free_splay_tree): Remove.
2302 (list_available_thread_groups): Use splay_tree_up.
2303 * common/gdb_splay_tree.h: New file.
2305 2017-10-09 Tom Tromey <tom@tromey.com>
2307 * mi/mi-main.c (do_nothing): Remove.
2308 (list_available_thread_groups): Update.
2310 2017-10-09 Pedro Alves <palves@redhat.com>
2312 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2313 reading registers when switching context.
2315 2017-10-09 John Baldwin <jhb@FreeBSD.org>
2317 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2318 (fbsd_convert_siginfo): Likewise.
2319 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2321 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2323 * configure.ac (try_guile_versions): Remove guile-2.2.
2324 * configure: Regenerate.
2326 2017-10-09 Tom Tromey <tom@tromey.com>
2328 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2329 (COMPILE.pre): Use $(CXX).
2331 2017-10-09 Pedro Alves <palves@redhat.com>
2333 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2335 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2336 * cp-support.h (cp_remove_params): Now returns a
2337 gdb::unique_xmalloc_ptr.
2338 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2339 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2340 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2341 returning a gdb::unique_xmalloc_ptr.
2342 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2343 * stack.c (find_frame_funname): Adjust to cp_remove_params
2344 returning a gdb::unique_xmalloc_ptr.
2346 2017-10-08 Tom Tromey <tom@tromey.com>
2348 * dwarf2read.c (dwarf2_get_dwz_file): Use
2349 gdb::unique_xmalloc_ptr.
2350 (find_slot_in_mapped_hash): Likewise.
2351 (dwarf2_physname): Likewise.
2352 (create_dwo_unit_in_dwp_v1): Use std::string.
2353 (create_dwo_unit_in_dwp_v2): Likewise.
2354 (lookup_dwo_cutu): Likewise.
2355 (inherit_abstract_dies): Use std::vector.
2356 (read_array_type): Likewise.
2357 (dwarf_decode_macros): Remove unused declaration.
2358 (unsigned_int_compar): Remove.
2359 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2360 (psymtabs_addrmap_cleanup): Remove.
2362 2017-10-08 Tom Tromey <tom@tromey.com>
2364 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2365 * frame.h (frame_cleanup_after_sniffer): Declare.
2366 (frame_prepare_for_sniffer): Return void.
2367 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2369 (frame_prepare_for_sniffer): Return void.
2371 2017-10-08 Tom Tromey <tom@tromey.com>
2373 * utils.h (make_cleanup_value_free): Remove.
2374 * utils.c (do_value_free, struct cleanup): Remove.
2375 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2377 * value.h (struct value_deleter): New.
2378 (gdb_value_up): New typedef.
2380 2017-10-08 Tom Tromey <tom@tromey.com>
2382 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2383 (make_cleanup_free_search_symbols): Remove.
2384 (search_symbols): Return std::vector.
2385 (symbol_search::compare_search_syms): Now member of
2386 symbol_search. Change arguments.
2387 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2388 (symtab_symbol_info, rbreak_command): Update.
2389 * symtab.h (struct symbol_search) <next>: Remove.
2391 (symbol_search::operator<): New function.
2392 (symbol_search::operator==): New function.
2393 (search_symbols): Remove std::vector.
2394 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2395 (symbol_search::compare_search_syms): Declare.
2397 2017-10-06 Yao Qi <yao.qi@linaro.org>
2399 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2400 arch/aarch64-insn.o.
2402 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2404 2017-10-06 Yao Qi <yao.qi@linaro.org>
2406 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2407 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2408 arch/arm-linux.o respectively.
2409 * configure.tgt: Likewise.
2411 2017-10-06 Yao Qi <yao.qi@linaro.org>
2413 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2414 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2416 2017-10-06 Pedro Alves <palves@redhat.com>
2418 * windows-nat.c: Include <algorithm>.
2420 2017-10-06 Yao Qi <yao.qi@linaro.org>
2422 * configure.tgt (i386_tobjs): New variable.
2423 (amd64_tobjs): New variable.
2424 Set $cpu_obs and $os_obs.
2426 2017-10-06 Yao Qi <yao.qi@linaro.org>
2428 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2429 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2430 (clean): Remove object files and dependency files.
2431 (distclean): Remove the directory.
2432 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2433 * configure: Re-generated.
2434 * configure.tgt: Replace amd64.o with arch/amd64.o.
2436 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2439 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2442 2017-10-05 Pedro Alves <palves@redhat.com>
2444 * linux-nat.c (linux_child_follow_fork): When following the parent
2445 and detaching the child, consult the parent thread's architecture
2446 instead of the child's.
2448 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2450 * ax.h: Do not include "doublest.h".
2451 (union agent_val): Remove.
2453 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2455 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2456 (decimal_to_string): Return std::string object.
2457 (decimal_from_string): Accept std::string object. Return bool.
2458 (decimal_from_integral, decimal_from_doublest): Remove.
2459 (decimal_from_longest): Add prototype.
2460 (decimal_from_ulongest): Likewise.
2461 (decimal_to_longest): Likewise.
2462 (decimal_from_doublest): Likewise.
2463 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2464 (MAX_DECIMAL_STRING): Move here.
2465 (decimal_to_string): Return std::string object.
2466 (decimal_from_string): Accept std::string object. Return bool.
2467 (decimal_from_integral): Remove, replace by ...
2468 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2469 (decimal_to_longest): New function.
2470 (decimal_from_floating): Remove, replace by ...
2471 (decimal_from_doublest): ... this new function.
2472 (decimal_to_doublest): Update to new decimal_to_string interface.
2474 * value.c (unpack_long): Use decimal_to_longest.
2475 * valops.c (value_cast): Use decimal_from_doublest instead of
2476 decimal_from_floating. Use decimal_from_[u]longest isntead of
2477 decimal_from_integral.
2478 * valarith.c (value_args_as_decimal): Likewise.
2479 * valprint.c (print_decimal_floating): Update to new
2480 decimal_to_string interface.
2481 * printcmd.c (printf_decfloat): Likewise.
2482 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2484 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2486 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2487 * gdbtypes.c: Include "floatformat.h".
2488 * value.c: Likewise.
2489 * m68k-tdep.c: Likewise.
2491 * findvar.c: Do not include "floatformat.h".
2492 * amd64-darwin-tdep.c: Likewise.
2493 * arm-linux-tdep.c: Likewise.
2494 * i386-darwin-tdep.c: Likewise.
2495 * i387-tdep.c: Likewise.
2496 * m68k-linux-tdep.c: Likewise.
2497 * mep-tdep.c: Likewise.
2498 * mips-tdep.c: Likewise.
2499 * nios2-tdep.c: Likewise.
2500 * s390-linux-tdep.c: Likewise.
2501 * sparc-obsd-tdep.c: Likewise.
2502 * sparc-tdep.c: Likewise.
2503 * sparc64-tdep.c: Likewise.
2504 * spu-tdep.c: Likewise.
2505 * tic6x-tdep.c: Likewise.
2506 * tilegx-tdep.c: Likewise.
2507 * vax-tdep.c: Likewise.
2508 * xstormy16-tdep.c: Likewise.
2509 * xtensa-tdep.c: Likewise.
2511 * top.c: Do not include "doublest.h".
2512 * aarch64-tdep.c: Likewise.
2513 * alpha-tdep.c: Likewise.
2514 * arm-linux-tdep.c: Likewise.
2515 * m68k-linux-tdep.c: Likewise.
2516 * tilegx-tdep.c: Likewise.
2517 * xstormy16-tdep.c: Likewise.
2519 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2521 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2522 (mipsn32_fbsd_sigframe): Define.
2523 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2524 for FreeBSD/mipsn32.
2526 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2528 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2531 2017-10-05 Tristan Gingold <tgingold@free.fr>
2533 * MAINTAINERS (Misc): Update my email address.
2535 2017-10-04 Pedro Alves <palves@redhat.com>
2537 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2538 it instead of target_gdbarch.
2539 (get_remote_state, get_remote_packet_size): Adjust
2540 get_remote_arch_state calls, passing down target_gdbarch
2542 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2543 'gdbarch' and use it instead of target_gdbarch.
2544 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2545 passing down target_gdbarch explicitly.
2546 (struct stop_reply) <arch>: New field.
2547 (remote_parse_stop_reply): Use the stopped thread's architecture,
2548 not the current inferior's. Save the architecture in the
2550 (process_stop_reply): Use the stop reply's architecture.
2551 (process_g_packet, remote_fetch_registers)
2552 (remote_prepare_to_store, store_registers_using_G)
2553 (remote_store_registers): Adjust get_remote_arch_state calls,
2554 using the regcache's architecture.
2555 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2556 passing down target_gdbarch explicitly.
2557 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2558 beneath instead of calling target_gdbarch.
2559 * target.c (default_thread_architecture): Use the specified
2560 inferior's architecture, instead of the current inferior's
2561 architecture (via target_gdbarch).
2563 2017-10-04 Pedro Alves <palves@redhat.com>
2565 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2567 (regcache_print): Handle !target_has_registers here instead.
2569 2017-10-04 Pedro Alves <palves@redhat.com>
2571 * frame.c (create_test_frame): Delete.
2572 * frame.h (create_test_frame): Delete.
2573 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2574 (class regcache_test): Delete.
2575 (test_target_has_registers, test_target_has_stack)
2576 (test_target_has_memory, test_target_prepare_to_store)
2577 (test_target_store_registers): New functions.
2578 (test_target_ops): New class.
2579 (register_to_value_test): Error out if there's already a
2580 process_stratum (or higher) target pushed. Create a fuller mock
2581 environment, with mock target_ops, inferior, address space, thread
2583 * progspace.c (struct address_space): Move to ...
2584 * progspace.h (struct address_space): ... here.
2585 * regcache.h (regcache::~regcache, regcache::raw_write)
2586 [GDB_SELF_TEST]: No longer virtual.
2588 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2590 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2592 2017-10-04 Pedro Alves <palves@redhat.com>
2594 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2595 out of 'between TRY and CATCH'.
2597 2017-10-04 Pedro Alves <palves@redhat.com>
2599 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2600 * common/common-exceptions.h (TRY): Open an outermost scope.
2601 Expand intro comment.
2603 (END_CATCH): Close the outermost scope.
2604 * completer.c (complete_line_internal): Add missing END_CATCH.
2606 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2608 * NEWS (Changes since GDB 8.0): Add entry about new
2609 'set-cwd-on-gdbserver' feature.
2610 (New remote packets): Add entry for QSetWorkingDir.
2611 * common/common-inferior.h (set_inferior_cwd): New prototype.
2612 * infcmd.c (set_inferior_cwd): Remove "static".
2613 (show_cwd_command): Expand text to include remote debugging.
2614 * remote.c: Add PACKET_QSetWorkingDir.
2615 (remote_protocol_features) <QSetWorkingDir>: New entry for
2616 PACKET_QSetWorkingDir.
2617 (extended_remote_set_inferior_cwd): New function.
2618 (extended_remote_create_inferior): Call
2619 "extended_remote_set_inferior_cwd".
2620 (_initialize_remote): Call "add_packet_config_cmd" for
2623 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2625 * NEWS (New commands): Mention "set/show cwd".
2626 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2627 "cd" command's help text.
2628 * common/common-inferior.h (get_inferior_cwd): New prototype.
2629 * infcmd.c (inferior_cwd_scratch): New global variable.
2630 (set_inferior_cwd): New function.
2631 (get_inferior_cwd): Likewise.
2632 (set_cwd_command): Likewise.
2633 (show_cwd_command): Likewise.
2634 (_initialize_infcmd): Add "set/show cwd" commands.
2635 * inferior.h (class inferior) <cwd>: New field.
2636 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2637 (fork_inferior): Change inferior's cwd before its execution.
2638 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2641 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2643 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2644 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2645 (COMMON_OBS): Add gdb_tilde_expand.o.
2646 * common/gdb_tilde_expand.c: New file.
2647 * common/gdb_tilde_expand.h: Likewise.
2649 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2651 * gdbarch.sh (objfile): Remove duplicate declaration.
2652 * gdbarch.h: Regenerate.
2654 2017-10-03 Tom Tromey <tom@tromey.com>
2656 * utils.c (internal_vproblem): Use string_vprintf.
2658 2017-10-03 Tom Tromey <tom@tromey.com>
2660 * printcmd.c (info_symbol_command): Use std::string.
2662 2017-10-03 Tom Tromey <tom@tromey.com>
2664 * top.c (gdb_safe_append_history): Use std::string.
2666 2017-10-03 Tom Tromey <tom@tromey.com>
2668 * event-top.c (stdin_event_handler): Update.
2669 * main.c (captured_main_1): Update.
2670 * top.h (make_delete_ui_cleanup): Remove.
2671 (struct ui): Add constructor and destructor.
2672 (new_ui, delete_ui): Remove.
2673 * top.c (make_delete_ui_cleanup): Remove.
2674 (new_ui_command): Use std::unique_ptr.
2675 (delete_ui_cleanup): Remove.
2676 (ui::ui): Rename from new_ui. Update.
2678 (ui::~ui): Rename from delete_ui. Update.
2680 2017-10-03 Tom Tromey <tom@tromey.com>
2682 * symfile.c (load_progress): Use gdb::byte_vector.
2684 2017-10-03 Tom Tromey <tom@tromey.com>
2686 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2688 * printcmd.c (x_command): Remove unused declaration.
2689 * symfile.c (symbol_file_command): Remove unused declaration.
2691 2017-10-03 Tom Tromey <tom@tromey.com>
2693 * utils.c (internal_vproblem): Use std::string.
2694 (defaulted_query): Likewise.
2696 2017-10-03 Tom Tromey <tom@tromey.com>
2698 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2699 * top.c (execute_command_to_string): Update.
2700 * utils.c (make_cleanup_restore_page_info): Remove.
2701 (do_restore_page_info_cleanup): Remove.
2702 (set_batch_flag_and_restore_page_info):
2704 (make_cleanup_restore_page_info): Remove.
2705 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2706 (~set_batch_flag_and_restore_page_info): New
2707 (make_cleanup_restore_uinteger): Remove.
2708 (make_cleanup_restore_integer): Remove.
2709 (struct restore_integer_closure): Remove.
2710 (restore_integer): Remove.
2711 * utils.h (struct set_batch_flag_and_restore_page_info): New
2713 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2714 (make_cleanup_restore_page_info): Remove.
2715 (make_cleanup_restore_uinteger) Remove.
2716 (make_cleanup_restore_integer) Remove.
2718 2017-10-03 Tom Tromey <tom@tromey.com>
2720 * record-full.h (record_full_gdb_operation_disable_set): Return
2721 scoped_restore_tmpl<int>.
2722 * infrun.c (adjust_pc_after_break): Update.
2723 (handle_signal_stop): Update.
2724 * record-full.c (record_full_gdb_operation_disable_set): Return
2725 scoped_restore_tmpl<int>.
2726 (record_full_wait_1, record_full_insert_breakpoint)
2727 (record_full_remove_breakpoint, record_full_save)
2728 (record_full_goto_insn): Update.
2730 2017-10-02 Tom Tromey <tom@tromey.com>
2733 * rust-lang.c (rust_val_print_str): New function.
2734 (val_print_struct): Call it.
2735 (rust_subscript): Preserve name of slice type.
2737 2017-10-02 Tom Tromey <tom@tromey.com>
2739 * rust-lang.c (rust_subscript): Handle slices in
2740 EVAL_AVOID_SIDE_EFFECTS case.
2742 2017-10-02 Tom Tromey <tom@tromey.com>
2744 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2746 2017-10-02 Tom Tromey <tom@tromey.com>
2748 * rust-lang.h (rust_slice_type): Add "extern".
2750 2017-10-02 Tom Tromey <tom@tromey.com>
2751 Pedro Alves <palves@redhat.com>
2753 * ada-lang.h (ada_exc_info::operator<): Make const.
2754 (ada_exc_info::operator==): Make const.
2755 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2758 2017-09-29 Tom Tromey <tom@tromey.com>
2760 * target.c (read_whatever_is_readable): Change type of "result".
2762 (free_memory_read_result_vector): Remove.
2763 (read_memory_robust): Change return type. Update.
2764 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2765 bin2hex, std::string.
2766 * target.h (memory_read_result_s): Remove typedef.
2767 (free_memory_read_result_vector): Remove.
2768 (read_memory_robust): Return std::vector.
2770 2017-09-29 Tom Tromey <tom@tromey.com>
2772 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2774 2017-09-29 Tom Tromey <tom@tromey.com>
2776 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2777 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2778 operator< and operator==.
2779 (ada_exceptions_list): Return a std::vector.
2780 * ada-lang.c (ada_exc_info::operator<): Rename from
2781 compare_ada_exception_info.
2782 (ada_exc_info::operator==): New.
2783 (sort_remove_dups_ada_exceptions_list): Change type of
2785 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2786 (ada_add_global_exceptions): Likewise.
2787 (ada_exceptions_list_1): Return a std::vector.
2788 (ada_exceptions_list): Likewise.
2790 2017-09-29 Tom Tromey <tom@tromey.com>
2792 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2794 (print_one_inferior): Update.
2795 (free_vector_of_ints): Remove.
2796 (list_available_thread_groups): Change "ids" to std::set.
2797 (mi_cmd_list_thread_groups): Update.
2798 (struct collect_cores_data) <core>: Now a std::set.
2799 (collect_cores): Update.
2801 (print_one_inferior): Update.
2803 2017-09-29 Tom Tromey <tom@tromey.com>
2805 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2806 (mi_execute_async_cli_command): Likewise.
2807 (mi_cmd_trace_frame_collected): Use field_fmt.
2809 2017-09-29 Tom Tromey <tom@tromey.com>
2811 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2814 2017-09-29 Tom Tromey <tom@tromey.com>
2816 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2818 2017-09-29 Tom Tromey <tom@tromey.com>
2820 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2822 2017-09-29 Tom Tromey <tom@tromey.com>
2824 * varobj.h (varobj_gen_name): Return std::string.
2825 * varobj.c (varobj_gen_name): Return std::string.
2826 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2827 (mi_cmd_var_delete): Don't copy "name".
2829 2017-09-29 Tom Tromey <tom@tromey.com>
2831 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2832 (mi_cmd_break_insert_1): Update.
2834 2017-09-29 Tom Tromey <tom@tromey.com>
2836 * target.h (make_scoped_defer_target_commit_resume): Update.
2837 * target.c (make_scoped_defer_target_commit_resume): Rename from
2838 make_cleanup_defer_target_commit_resume. Return a
2840 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2842 2017-09-29 Tom Tromey <tom@tromey.com>
2844 * main.c (captured_main_1): Remove unused declaration.
2845 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2847 2017-09-29 Tom Tromey <tom@tromey.com>
2849 * symtab.c (search_symbols): Remove unused outer cleanup.
2850 (make_source_files_completion_list): Remove unused declaration.
2852 2017-09-29 Tom Tromey <tom@tromey.com>
2854 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2856 2017-09-29 Tom Tromey <tom@tromey.com>
2858 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2861 2017-09-29 Tom Tromey <tom@tromey.com>
2863 * complaints.c (vcomplaint): Use std::string.
2865 2017-09-29 Tom Tromey <tom@tromey.com>
2867 * tracepoint.c (trace_variable_command): Use std::string.
2868 (encode_actions_1): Remove unused declarations.
2869 (create_tsv_from_upload): Use std::string.
2871 2017-09-29 Tom Tromey <tom@tromey.com>
2873 * cp-support.c (gdb_demangle): Use std::string.
2875 2017-09-29 Tom Tromey <tom@tromey.com>
2877 * stack.c (parse_frame_specification): Use std::string
2878 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2880 2017-09-29 Tom Tromey <tom@tromey.com>
2882 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2884 2017-09-29 Tom Tromey <tom@tromey.com>
2886 * utils.c (vfprintf_maybe_filtered): Use std::string.
2887 (vfprintf_unfiltered): Likewise.
2889 2017-09-29 Tom Tromey <tom@tromey.com>
2891 * event-top.c (top_level_prompt): Return std::string.
2892 (display_gdb_prompt): Update.
2894 2017-09-29 Tom Tromey <tom@tromey.com>
2896 * unittests/common-utils-selftests.c (format): New function.
2897 (string_vprintf_tests): New function.
2898 (_initialize_common_utils_selftests): Register new tests.
2899 * common/common-utils.c (string_vprintf): New function.
2900 * common/common-utils.h (string_vprintf): Declare.
2902 2017-09-29 Pedro Alves <palves@redhat.com>
2904 * common/rsp-low.c (unpack_varlen_hex): Constify.
2905 * common/rsp-low.h (unpack_varlen_hex): Constify.
2906 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2908 * remote.c (remote_set_permissions, read_ptid)
2909 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2910 (remote_static_tracepoint_marker_at)
2911 (remote_static_tracepoint_markers_by_strid)
2912 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2913 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2914 (parse_tracepoint_definition, parse_tsv_definition)
2915 (parse_static_tracepoint_marker_definition): Constify.
2916 * tracepoint.h (parse_static_tracepoint_marker_definition)
2917 (parse_trace_status, parse_tracepoint_status)
2918 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2920 2017-09-29 Pedro Alves <palves@redhat.com>
2922 * remote.c (target_buf, target_buf_size): Delete.
2923 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2924 Use the connection's packet buffer instead.
2925 All callers adjusted.
2926 (_initialize_remote): Remove references to target_buf and
2929 2017-09-28 Pedro Alves <palves@redhat.com>
2931 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2932 unittests/common-utils-selftests.c.
2933 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2934 (COMMON_OBS): Remove utils-selftests.o.
2935 * utils-selftests.c: Move to ...
2936 * unittests/common-utils-selftests.c: ... here and rename self
2937 test to "string_printf".
2939 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2941 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2942 having NULL cus or tus.
2944 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2946 * arm-tdep.c: (convert_from_extended): Remove.
2947 (convert_to_extended): Likewise.
2948 (arm_extract_return_value): Use convert_typed_floating.
2949 (arm_store_return_value): Likewise.
2951 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2952 * sh-tdep.c: Do not include "floatformat.h".
2953 (sh_littlebyte_bigword_type): New function.
2954 (sh_register_convert_to_virtual): Use convert_typed_floating.
2955 (sh_register_convert_to_raw): Likewise.
2956 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2957 (sh64_littlebyte_bigword_type): New function.
2958 (sh64_extract_return_value): Use convert_typed_floating.
2959 (sh64_register_convert_to_virtual): Likewise.
2960 (sh64_register_convert_to_raw): Likewise.
2962 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2964 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2965 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2967 * gdbtypes.h (union type_specific): Make field floatformat hold
2968 just a single struct floatformat, not an array.
2969 (floatformat_from_type): Move here.
2970 * gdbtypes.c (floatformat_from_type): Move here. Update to
2971 changed TYPE_FLOATFORMAT definition.
2972 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2973 (recursive_dump_type): Likewise.
2974 (init_float_type): Install correct floatformat for byte order.
2975 (arch_float_type): Likewise.
2977 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2979 * gdbtypes.c (init_type): Change incoming argument from
2980 length-in-bytes to length-in-bits. Assert length is a
2981 multiple of TARGET_CHAR_BITS.
2982 (arch_type, arch_flags_type): Likewise.
2983 (init_integer_type): Update call to init_type.
2984 (init_character_type): Likewise.
2985 (init_boolean_type): Likewise.
2986 (init_float_type): Likewise.
2987 (init_decfloat_type): Likewise.
2988 (init_complex_type): Likewise.
2989 (init_pointer_type): Likewise.
2990 (objfile_type): Likewise.
2991 (arch_integer_type): Update call to arch_type.
2992 (arch_character_type): Likewise.
2993 (arch_boolean_type): Likewise.
2994 (arch_float_type): Likewise.
2995 (arch_decfloat_type): Likewise.
2996 (arch_complex_type): Likewise.
2997 (arch_pointer_type): Likewise.
2998 (gdbtypes_post_init): Likewise.
3000 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3001 (read_base_type): Likewise.
3002 * mdebugread.c (basic_type): Likewise.
3003 * stabsread.c (dbx_init_float_type): Likewise.
3004 (rs6000_builtin_type): Likewise.
3005 (read_range_type): Likewise. Also, fix call to init_integer_type
3006 with erroneous length argument.
3008 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3009 * d-lang.c (build_d_types): Likewise.
3010 * f-lang.c (build_fortran_types): Likewise.
3011 * go-lang.c (build_go_types): Likewise.
3012 * opencl-lang.c (build_opencl_types): Likewise.
3013 * jit.c (finalize_symtab): Likewise.
3014 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3015 (build_std_type_info_type): Likewise.
3016 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3017 update call to arch_flags_type.
3019 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3021 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3022 * windows-tdep.c (windows_get_tlb_type): Likewise.
3024 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3025 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3026 * m32c-tdep.c (make_types): Likewise.
3027 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3028 (rl78_psw_type): Update call to arch_flags_type.
3029 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3030 * rx-tdep.c (rx_psw_type): Likewise.
3031 (rx_fpsw_type): Likewise.
3032 * sparc-tdep.c (sparc_psr_type): Likewise.
3033 (sparc_fsr_type): Likewise.
3034 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3035 (sparc64_ccr_type): Likewise.
3036 (sparc64_fsr_type): Likewise.
3037 (sparc64_fprs_type): Likewise.
3039 2017-09-27 Tom Tromey <tom@tromey.com>
3041 * findcmd.c (find_command): Constify.
3043 2017-09-27 Tom Tromey <tom@tromey.com>
3045 * ada-tasks.c (task_command_1, task_command): Constify.
3047 2017-09-27 Tom Tromey <tom@tromey.com>
3049 * symtab.c (maintenance_print_symbol_cache)
3050 (maintenance_flush_symbol_cache)
3051 (maintenance_print_symbol_cache_statistics): Constify.
3053 2017-09-27 Tom Tromey <tom@tromey.com>
3055 * inferior.c (detach_inferior_command, kill_inferior_command)
3056 (inferior_command): Constify.
3058 2017-09-27 Tom Tromey <tom@tromey.com>
3060 * regcache.c (regcache_print, maintenance_print_registers)
3061 (maintenance_print_raw_registers)
3062 (maintenance_print_cooked_registers)
3063 (maintenance_print_register_groups)
3064 (maintenance_print_remote_registers): Constify.
3066 2017-09-27 Tom Tromey <tom@tromey.com>
3068 * printcmd.c (map_display_numbers, undisplay_command)
3069 (enable_disable_display_command, enable_display_command)
3070 (disable_display_command): Constify.
3072 2017-09-27 Tom Tromey <tom@tromey.com>
3074 * breakpoint.h (delete_command): Don't declare.
3075 * breakpoint.c (delete_command, enable_once_command)
3076 (enable_count_command, enable_delete_command, breakpoint_1)
3077 (maintenance_info_breakpoints, stopin_command, stopat_command)
3078 (delete_command, delete_trace_command, save_breakpoints)
3079 (save_breakpoints_command, save_tracepoints_command): Constify.
3081 2017-09-27 Tom Tromey <tom@tromey.com>
3083 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3084 (skip_ws, extract_identifier, macro_define_command)
3085 (macro_undef_command, macro_list_command): Constify.
3087 2017-09-27 Tom Tromey <tom@tromey.com>
3089 * infcmd.c (environment_info, set_environment_command)
3090 (unset_environment_command, path_info, info_proc_cmd_1)
3091 (info_proc_cmd_mappings, info_proc_cmd_stat)
3092 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3093 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3095 2017-09-27 Tom Tromey <tom@tromey.com>
3097 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3100 2017-09-27 Tom Tromey <tom@tromey.com>
3102 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3104 2017-09-27 Tom Tromey <tom@tromey.com>
3106 * demangle.c (demangle_command): Constify.
3108 2017-09-27 Tom Tromey <tom@tromey.com>
3110 * progspace.c (maintenance_info_program_spaces_command):
3113 2017-09-27 Tom Tromey <tom@tromey.com>
3115 * compile/compile.c (check_raw_argument, compile_file_command)
3116 (compile_code_command, compile_print_command): Constify.
3118 2017-09-27 Tom Tromey <tom@tromey.com>
3120 * reggroups.c (maintenance_print_reggroups): Constify.
3122 2017-09-27 Tom Tromey <tom@tromey.com>
3124 * dwarf2read.c (save_gdb_index_command): Constify.
3126 2017-09-27 Tom Tromey <tom@tromey.com>
3128 * stap-probe.c (info_probes_stap_command): Constify.
3130 2017-09-27 Tom Tromey <tom@tromey.com>
3132 * fork-child.c (unset_exec_wrapper_command): Constify.
3134 2017-09-27 Tom Tromey <tom@tromey.com>
3136 * btrace.c (get_uint, get_context_size, no_chunk)
3137 (maint_btrace_packet_history_cmd)
3138 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3139 (maint_info_btrace_cmd): Constify.
3141 2017-09-27 Tom Tromey <tom@tromey.com>
3143 * reverse.c (delete_bookmark_command): Constify.
3145 2017-09-27 Tom Tromey <tom@tromey.com>
3147 * remote.c (set_memory_packet_size)
3148 (set_memory_write_packet_size, show_memory_write_packet_size)
3149 (set_memory_read_packet_size, show_memory_read_packet_size)
3150 (compare_sections_command, packet_command, remote_put_command)
3151 (remote_get_command, remote_delete_command): Constify.
3153 2017-09-27 Tom Tromey <tom@tromey.com>
3155 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3156 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3157 (set_mipsfpu_auto_command): Constify.
3159 2017-09-27 Tom Tromey <tom@tromey.com>
3161 * cli/cli-cmds.h (cd_command): Constify.
3162 * cli/cli-cmds.c (cd_command): Constify.
3164 2017-09-27 Tom Tromey <tom@tromey.com>
3166 * thread.c (thread_name_command, thread_find_command): Constify.
3168 2017-09-27 Tom Tromey <tom@tromey.com>
3170 * probe.c (enable_probes_command, disable_probes_command):
3173 2017-09-27 Tom Tromey <tom@tromey.com>
3175 * symfile.c (symbol_file_command): Constify.
3176 * gdbcore.h (deprecated_file_changed_hook): Constify.
3177 * exec.c (deprecated_file_changed_hook, exec_file_command)
3178 (file_command): Constify.
3179 * defs.h (symbol_file_command): Constify.
3181 2017-09-27 Tom Tromey <tom@tromey.com>
3183 * remote-fileio.c (set_system_call_allowed)
3184 (show_system_call_allowed): Constify.
3186 2017-09-27 Tom Tromey <tom@tromey.com>
3188 * tracepoint.c (delete_trace_variable_command)
3189 (tfind_end_command, tfind_start_command, tfind_pc_command)
3190 (tfind_tracepoint_command, tfind_line_command)
3191 (tfind_range_command, tfind_outside_command): Constify.
3193 2017-09-27 Tom Tromey <tom@tromey.com>
3195 * ax-gdb.c (maint_agent_printf_command, agent_command)
3196 (agent_eval_command): Constify.
3198 2017-09-27 Tom Tromey <tom@tromey.com>
3200 * tracepoint.c (info_scope_command): Constify.
3201 * python/python.c (gdbpy_decode_line): Constify.
3202 * python/py-breakpoint.c (bppy_init): Constify.
3203 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3204 * location.h: (new_linespec_location)
3205 (string_to_event_location_basic, string_to_event_location):
3207 * location.c (new_linespec_location)
3208 (string_to_event_location_basic, string_to_event_location):
3210 * linespec.h (decode_line_with_current_source)
3211 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3212 * linespec.c (linespec_lex_to_end)
3213 (decode_line_with_current_source)
3214 (decode_line_with_last_displayed): Constify.
3215 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3217 * cli/cli-cmds.c (edit_command, list_command): Constify.
3218 * breakpoint.h (until_break_command, watch_command_wrapper)
3219 (awatch_command_wrapper, rwatch_command_wrapper)
3220 (init_ada_exception_breakpoint): Constify.
3221 * breakpoint.c (break_command_1, dprintf_command)
3222 (break_range_command, watch_command_wrapper)
3223 (rwatch_command_wrapper, awatch_command_wrapper)
3224 (until_break_command, init_ada_exception_breakpoint)
3225 (strace_marker_create_sals_from_location, trace_command)
3226 (ftrace_command, strace_command, struct tracepoint): Constify.
3227 * ax-gdb.c (agent_command_1): Constify.
3228 * ada-lang.c (ada_exception_sal): Constify.
3230 2017-09-27 Tom Tromey <tom@tromey.com>
3232 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3233 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3234 (get_context_size, no_chunk, get_insn_history_modifiers)
3235 (cmd_record_insn_history, get_call_history_modifiers)
3236 (cmd_record_call_history): Constify.
3238 2017-09-27 Tom Tromey <tom@tromey.com>
3240 * source.c (show_substitute_path_command)
3241 (unset_substitute_path_command, set_substitute_path_command):
3244 2017-09-27 Tom Tromey <tom@tromey.com>
3246 * typeprint.c (maintenance_print_type): Constify.
3247 * maint.c (maintenance_dump_me, maintenance_demangle)
3248 (maintenance_time_display, maintenance_info_sections)
3249 (maintenance_print_statistics, maintenance_deprecate)
3250 (maintenance_undeprecate): Constify.
3251 (maintenance_do_deprecate): Constify. Use std::string.
3252 (maintenance_selftest): Constify.
3253 * gdbtypes.h (maintenance_print_type): Constify.
3255 2017-09-27 Tom Tromey <tom@tromey.com>
3257 * hppa-tdep.c (unwind_command): Constify.
3259 2017-09-27 Tom Tromey <tom@tromey.com>
3261 * target-descriptions.c (unset_tdesc_filename_cmd)
3262 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3265 2017-09-27 Tom Tromey <tom@tromey.com>
3267 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3269 2017-09-27 Tom Tromey <tom@tromey.com>
3271 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3273 2017-09-27 Tom Tromey <tom@tromey.com>
3275 * tui/tui-regs.c (tui_reg_command): Constify.
3277 2017-09-27 Tom Tromey <tom@tromey.com>
3279 * skip.c (skip_file_command, skip_function_command)
3280 (skip_enable_command, skip_disable_command, skip_delete_command):
3283 2017-09-27 Tom Tromey <tom@tromey.com>
3285 * record-btrace.c (cmd_record_btrace_bts_start)
3286 (cmd_record_btrace_pt_start): Constify.
3288 2017-09-27 Tom Tromey <tom@tromey.com>
3290 * symmisc.c (maintenance_print_symbols)
3291 (maintenance_print_msymbols, maintenance_print_objfiles)
3292 (maintenance_info_symtabs, maintenance_check_symtabs)
3293 (maintenance_expand_symtabs, maintenance_info_line_tables):
3296 2017-09-27 Tom Tromey <tom@tromey.com>
3298 * top.c (new_ui_command): Constify.
3300 2017-09-27 Tom Tromey <tom@tromey.com>
3302 * symfile.c (add_symbol_file_command)
3303 (remove_symbol_file_command, list_overlays_command)
3304 (map_overlay_command, unmap_overlay_command)
3305 (overlay_auto_command, overlay_manual_command)
3306 (overlay_off_command, overlay_load_command): Constify.
3308 2017-09-27 Tom Tromey <tom@tromey.com>
3310 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3311 (info_spu_mailbox_command, info_spu_dma_command)
3312 (info_spu_proxydma_command): Constify.
3314 2017-09-27 Tom Tromey <tom@tromey.com>
3316 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3318 2017-09-27 Tom Tromey <tom@tromey.com>
3320 * cli/cli-script.c (user_defined_command): Constify.
3322 2017-09-27 Tom Tromey <tom@tromey.com>
3324 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3325 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3326 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3327 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3328 (dump_binary_value, append_binary_memory, append_binary_value):
3330 (struct dump_context) <func>: Constify.
3331 (add_dump_command): Update.
3333 2017-09-27 Tom Tromey <tom@tromey.com>
3335 * cli/cli-cmds.c (show_version, show_configuration)
3336 (source_command, show_user): Constify.
3338 2017-09-27 Tom Tromey <tom@tromey.com>
3340 * target.c (maintenance_print_target_stack): Constify.
3342 2017-09-27 Tom Tromey <tom@tromey.com>
3344 * interps.c (interpreter_exec_cmd): Constify.
3346 2017-09-27 Tom Tromey <tom@tromey.com>
3348 * record-full.c (cmd_record_full_restore): Constify.
3350 2017-09-27 Tom Tromey <tom@tromey.com>
3352 * memattr.c (enable_mem_command, disable_mem_command)
3353 (delete_mem_command): Constify.
3355 2017-09-27 Tom Tromey <tom@tromey.com>
3357 * value.c (show_convenience): Constify.
3359 2017-09-27 Tom Tromey <tom@tromey.com>
3361 * gdbcore.h (core_file_command): Update.
3362 * corefile.c (core_file_command): Constify.
3364 2017-09-27 Tom Tromey <tom@tromey.com>
3366 * user-regs.c (maintenance_print_user_registers): Constify.
3368 2017-09-27 Tom Tromey <tom@tromey.com>
3370 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3372 2017-09-27 Tom Tromey <tom@tromey.com>
3374 * cp-support.c (first_component_command): Constify.
3376 2017-09-27 Tom Tromey <tom@tromey.com>
3378 * psymtab.c (maintenance_print_psymbols)
3379 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3382 2017-09-27 Tom Tromey <tom@tromey.com>
3384 * windows-tdep.c (display_tib): Constify.
3386 2017-09-27 Tom Tromey <tom@tromey.com>
3388 * linux-fork.c (delete_checkpoint_command)
3389 (detach_checkpoint_command): Constify.
3391 2017-09-27 Tom Tromey <tom@tromey.com>
3393 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3395 2017-09-27 Tom Tromey <tom@tromey.com>
3397 * arc-tdep.c (dump_arc_instruction_command): Constify.
3399 2017-09-27 Tom Tromey <tom@tromey.com>
3401 * valprint.c (set_radix, show_radix): Constify.
3403 2017-09-27 Tom Tromey <tom@tromey.com>
3405 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3407 2017-09-27 Tom Tromey <tom@tromey.com>
3409 * command.h (not_just_help_class_command): Update.
3410 * cli/cli-decode.h (not_just_help_class_command): Update.
3411 * cli/cli-decode.c (not_just_help_class_command): Constify.
3413 2017-09-27 Tom Tromey <tom@tromey.com>
3415 * gdb_bfd.c (maintenance_info_bfds): Constify.
3417 2017-09-27 Tom Tromey <tom@tromey.com>
3419 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3421 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3422 (do_const_cfunc): New function.
3423 (cmd_cfunc_eq): New overload.
3424 (cli_user_command_p): Check do_const_cfunc.
3425 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3427 * command.h (add_cmd): Add const overload and no-function
3429 (set_cmd_cfunc): Add const overload.
3430 (cmd_const_cfunc_ftype): Declare.
3431 (cmd_cfunc_eq): Add const overload.
3432 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3433 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3436 2017-09-27 Tom Tromey <tom@tromey.com>
3438 * macroexp.c (get_next_token_for_substitution): New function.
3439 (substitute_args): Call it. Check for __VA_OPT__.
3441 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3442 Pedro Alves <palves@redhat.com>
3444 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3445 producer_is_icc_lt_14.
3446 (producer_is_icc_lt_14): New function.
3447 (check_producer): Add code for checking version of ICC.
3448 (producer_is_icc): Move to producer.c.
3449 (read_structure_type): Restrict ICC workaround to ICC<14.
3450 * producer.c: Include selftest.h.
3451 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3453 * producer.h (producer_is_icc): New declaration.
3455 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3457 * Makefile.in (SFILES): Add producer.c.
3458 (COMMON_OBS): Add producer.o
3459 * amd64-tdep.c (producer.h): Add new include.
3460 * dwarf2read.c (producer.h): Add new include.
3461 * producer.c: New file.
3462 * producer.h: New file.
3463 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3465 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3468 2017-09-26 Matthias Klose <doko@ubuntu.com>
3470 * configure.ac: Search ncursesw before ncurses.
3471 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3472 * gdb_curses.h: Include <ncursesw/ncurses.h>
3473 * config.in, configure: Regenerate.
3475 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3478 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3480 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3481 Remove i386sol2 support.
3482 * configure.nat <i386sol2>: Remove.
3483 <sol2-64>: Fold into ...
3485 Move common settings to default section.
3487 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3488 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3489 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3490 <i[34567]86-*-solaris*>: Remove.
3491 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3493 * configure.ac: Remove wctype in libw check.
3494 (_MSE_INT_H): Don't define on Solaris 7-9.
3495 <solaris*>: Remove libthread_db.so.1 check.
3496 * configure: Regenerate.
3497 * config.in: Regenerate.
3499 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3500 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3501 (gdb_ps_size_t): Remove.
3502 Use base types in users.
3503 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3505 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3507 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3510 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3511 (adi_is_addr_mapped): Likewise.
3512 (PSR_ICC): Don't redefine.
3513 (PSR_IMPL): Likewise.
3515 2017-09-25 Tom Tromey <tom@tromey.com>
3517 * regcache.c (regcache::dump): Use string_printf.
3519 2017-09-25 Tom Tromey <tom@tromey.com>
3521 * regcache.c (class regcache_invalidator): New.
3522 (struct register_to_invalidate): Remove.
3523 (make_cleanup_regcache_invalidate): Remove.
3524 (regcache::raw_write): Use regcache_invalidator.
3526 2017-09-25 Tom Tromey <tom@tromey.com>
3528 * spu-tdep.c (spu2ppu_sniffer): Update.
3529 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3530 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3532 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3533 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3534 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3535 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3536 (frame_pop): Update.
3538 2017-09-25 Tom Tromey <tom@tromey.com>
3540 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3541 * regcache.h (regcache_xfree): Don't declare.
3542 * regcache.c (regcache_xfree): Remove.
3543 (do_regcache_xfree): Use delete.
3544 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3545 * linux-fork.c (free_fork): Use delete.
3546 (fork_save_infrun_state): Likewise.
3547 * jit.c (jit_dealloc_cache): Use delete.
3548 * infrun.c (discard_infcall_suspend_state): Use delete.
3550 2017-09-25 Tom Tromey <tom@tromey.com>
3552 * regcache.h (regcache_xmalloc): Don't declare.
3553 (regcache_raw_set_cached_value): Update comment.
3554 * regcache.c (regcache_xmalloc): Remove.
3555 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3556 * jit.c (jit_frame_sniffer): Use new.
3557 * frame.c (frame_save_as_regcache): Use new.
3559 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3561 * NEWS: Advertise support for guarded-storage registers on IBM z.
3563 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3565 * s390-linux-nat.c (have_regset_gs): New static variable.
3566 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3567 control block and guarded-storage broadcast control regsets.
3568 (s390_read_description): Detect whether the target has
3569 guarded-storage support, return appropriate tdesc.
3570 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3571 (features/s390x-gs-linux64.c): Likewise.
3572 (struct gdbarch_tdep) <have_gs>: New field.
3573 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3574 (s390_gsbc_regset): New variables.
3575 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3576 and s390_gsbc_regset, if applicable.
3577 (s390_core_read_description): Check whether core file was from a
3578 target with guarded-storage support; include appropriate regsets.
3579 (s390_gdbarch_init): Add registers for guarded-storage support.
3580 (_initialize_s390_tdep): Initialize new target descriptions that
3581 include registers for guarded-storage support.
3582 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3583 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3584 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3585 (S390_NUM_REGS): Adjust macro definition.
3586 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3587 (tdesc_s390x_gs_linux64): New declarations.
3589 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3591 * features/s390-gs-linux64.xml: New file.
3592 * features/s390-gs.xml: New file.
3593 * features/s390-gsbc.xml: New file.
3594 * features/s390x-gs-linux64.xml: New file.
3595 * features/Makefile (WHICH): Add s390-gs-linux64 and
3597 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3598 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3599 * features/s390-gs-linux64.c: New generated file.
3600 * features/s390x-gs-linux64.c: New file.
3601 * regformats/s390-gs-linux64.dat: New file.
3602 * regformats/s390x-gs-linux64.dat: New file.
3604 2017-09-23 Tom Tromey <tom@tromey.com>
3606 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3608 2017-09-22 Tom Tromey <tom@tromey.com>
3610 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3611 type to scoped_restore_tmpl.
3612 <scoped_input_handler>: Initialize m_quit_handler directly.
3614 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3616 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3617 (cd_command): Likewise. Free "current_directory" before
3619 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3620 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3621 * top.c (gdb_dirbuf): Remove global declaration.
3622 * top.h (gdb_dirbuf): Likewise.
3624 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3626 * gnulib/aclocal.m4: Regenerate.
3627 * gnulib/config.in: Regenerate.
3628 * gnulib/configure: Regenerate.
3629 * gnulib/import/Makefile.am: Regenerate.
3630 * gnulib/import/Makefile.in: Regenerate.
3631 * gnulib/import/assure.h: New file.
3632 * gnulib/import/at-func.c: Likewise
3633 * gnulib/import/chdir-long.c: New file.
3634 * gnulib/import/chdir-long.h: New file.
3635 * gnulib/import/cloexec.c: New file.
3636 * gnulib/import/cloexec.h: New file.
3637 * gnulib/import/close.c: New file.
3638 * gnulib/import/closedir.c: New file.
3639 * gnulib/import/dirent-private.h: New file.
3640 * gnulib/import/dup-safer.c: New file.
3641 * gnulib/import/dup.c: New file.
3642 * gnulib/import/dup2.c: New file.
3643 * gnulib/import/error.c: New file.
3644 * gnulib/import/error.h: New file.
3645 * gnulib/import/exitfail.c: New file.
3646 * gnulib/import/exitfail.h: New file.
3647 * gnulib/import/fchdir.c: New file.
3648 * gnulib/import/fcntl.c: New file.
3649 * gnulib/import/fcntl.in.h: New file.
3650 * gnulib/import/fd-hook.c: New file.
3651 * gnulib/import/fd-hook.h: New file.
3652 * gnulib/import/fd-safer.c: New file.
3653 * gnulib/import/fdopendir.c: New file.
3654 * gnulib/import/filename.h: New file.
3655 * gnulib/import/filenamecat-lgpl.c: New file.
3656 * gnulib/import/filenamecat.h: New file.
3657 * gnulib/import/fstat.c: New file.
3658 * gnulib/import/fstatat.c: New file.
3659 * gnulib/import/getcwd-lgpl.c: New file.
3660 * gnulib/import/getcwd.c: New file.
3661 * gnulib/import/getdtablesize.c: New file.
3662 * gnulib/import/getlogin_r.c: New file.
3663 * gnulib/import/getprogname.c: New file.
3664 * gnulib/import/getprogname.h: New file.
3665 * gnulib/import/gettext.h: New file.
3666 * gnulib/import/glob-libc.h: New file.
3667 * gnulib/import/glob.c: New file.
3668 * gnulib/import/glob.in.h: New file.
3669 * gnulib/import/intprops.h: New file.
3670 * gnulib/import/m4/chdir-long.m4: New file.
3671 * gnulib/import/m4/close.m4: New file.
3672 * gnulib/import/m4/closedir.m4: New file.
3673 * gnulib/import/m4/d-ino.m4: New file.
3674 * gnulib/import/m4/d-type.m4: New file.
3675 * gnulib/import/m4/dup.m4: New file.
3676 * gnulib/import/m4/dup2.m4: New file.
3677 * gnulib/import/m4/error.m4: New file.
3678 * gnulib/import/m4/fchdir.m4: New file.
3679 * gnulib/import/m4/fcntl.m4: New file.
3680 * gnulib/import/m4/fcntl_h.m4: New file.
3681 * gnulib/import/m4/fdopendir.m4: New file.
3682 * gnulib/import/m4/filenamecat.m4: New file.
3683 * gnulib/import/m4/fstat.m4: New file.
3684 * gnulib/import/m4/fstatat.m4: New file.
3685 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3686 * gnulib/import/m4/getcwd-path-max.m4: New file.
3687 * gnulib/import/m4/getcwd.m4: New file.
3688 * gnulib/import/m4/getdtablesize.m4: New file.
3689 * gnulib/import/m4/getlogin_r.m4: New file.
3690 * gnulib/import/m4/getprogname.m4: New file.
3691 * gnulib/import/m4/glob.m4: New file.
3692 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3693 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3694 * gnulib/import/m4/mempcpy.m4: New file.
3695 * gnulib/import/m4/memrchr.m4: New file.
3696 * gnulib/import/m4/mode_t.m4: New file.
3697 * gnulib/import/m4/msvc-inval.m4: New file.
3698 * gnulib/import/m4/msvc-nothrow.m4: New file.
3699 * gnulib/import/m4/open.m4: New file.
3700 * gnulib/import/m4/openat.m4: New file.
3701 * gnulib/import/m4/opendir.m4: New file.
3702 * gnulib/import/m4/readdir.m4: New file.
3703 * gnulib/import/m4/realloc.m4: New file.
3704 * gnulib/import/m4/rewinddir.m4: New file.
3705 * gnulib/import/m4/save-cwd.m4: New file.
3706 * gnulib/import/m4/strdup.m4: New file.
3707 * gnulib/import/m4/strerror.m4: New file.
3708 * gnulib/import/m4/unistd-safer.m4: New file.
3709 * gnulib/import/mempcpy.c: New file.
3710 * gnulib/import/memrchr.c: New file.
3711 * gnulib/import/msvc-inval.c: New file.
3712 * gnulib/import/msvc-inval.h: New file.
3713 * gnulib/import/msvc-nothrow.c: New file.
3714 * gnulib/import/msvc-nothrow.h: New file.
3715 * gnulib/import/open.c: New file.
3716 * gnulib/import/openat-die.c: New file.
3717 * gnulib/import/openat-priv.h: New file.
3718 * gnulib/import/openat-proc.c: New file.
3719 * gnulib/import/openat.c: New file.
3720 * gnulib/import/openat.h: New file.
3721 * gnulib/import/opendir.c: New file.
3722 * gnulib/import/pipe-safer.c: New file.
3723 * gnulib/import/readdir.c: New file.
3724 * gnulib/import/realloc.c: New file.
3725 * gnulib/import/rewinddir.c: New file.
3726 * gnulib/import/save-cwd.c: New file.
3727 * gnulib/import/save-cwd.h: New file.
3728 * gnulib/import/strdup.c: New file.
3729 * gnulib/import/strerror-override.c: New file.
3730 * gnulib/import/strerror-override.h: New file.
3731 * gnulib/import/strerror.c: New file.
3732 * gnulib/import/unistd--.h: New file.
3733 * gnulib/import/unistd-safer.h: New file.
3734 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3735 "getcwd" and "glob".
3736 * ser-tcp.c: Undefine "close" before redefining it.
3738 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3740 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3743 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3745 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3746 <sol2,sparc>: Likewise.
3747 <sol2-64,i386>: Likewise.
3749 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3750 -Wdeprecated-declarations on *-*-solaris*.
3751 * configure: Regenerate.
3753 * procfs.c: Include "nat/inferior.h".
3754 (procfs_info_proc): Fix typo.
3756 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3758 * remote.c (vector): Include.
3759 (struct private_thread_info): Add field, thread_handle.
3760 (free_private_thread_info): Deallocate storage associated with
3762 (get_private_info_thread): Initialize `thread_handle' field.
3763 (struct thread_item): Add field, thread_handle.
3764 (clear_threads_listing_context): Deallocate storage associated
3766 (start_thread): Add support for "handle" attribute.
3767 (thread_attributes): Add "handle".
3768 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3770 (remote_update_thread_list): Update thread_handle.
3771 (remote_thread_handle_to_thread_info): New function.
3772 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3774 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3776 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3778 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3779 * python/python-internal.h (thread_object_type): Declare.
3781 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3783 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3784 (target_thread_handle_to_thread_info): Declare.
3785 * target.c (target_thread_handle_to_thread_info): New function.
3786 * target-delegates.c: Regenerate.
3787 * gdbthread.h (find_thread_by_handle): Declare.
3788 * thread.c (find_thread_by_handle): New function.
3789 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3791 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3793 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3795 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3797 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3799 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3801 2017-09-21 Yao Qi <yao.qi@linaro.org>
3803 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3806 2017-09-20 Tom Tromey <tom@tromey.com>
3808 * breakpoint.c (struct counted_command_line): Remove.
3809 (breakpoint_commands): Update.
3810 (alloc_counted_command_line, incref_counted_command_line)
3811 (decref_counted_command_line, do_cleanup_counted_command_line)
3812 (make_cleanup_decref_counted_command_line): Remove.
3813 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3814 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3815 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3816 (save_breakpoints): Update.
3817 * breakpoint.h (counted_command_line): Now a typedef to
3819 (struct breakpoint) <commands>: Now a counted_command_line.
3820 (struct bpstats) <command>: Likewise.
3822 2017-09-20 Tom Tromey <tom@tromey.com>
3824 * breakpoint.c (struct commands_info, do_map_commands_command):
3826 (commands_command_1): Update.
3827 (iterate_over_related_breakpoints): Take a function_view.
3828 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3829 (delete_command): Update.
3830 (map_breakpoint_numbers): Take a function_view.
3831 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3832 (disable_command): Update.
3833 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3834 (enable_command): Update.
3835 (struct disp_data, do_enable_breakpoint_disp)
3836 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3837 (do_map_enable_delete_breakpoint): Remove.
3838 (enable_once_command, enable_count_command, enable_delete_command)
3839 (delete_trace_variable_command): Update.
3841 2017-09-20 Tom Tromey <tom@tromey.com>
3843 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3844 (bpstat_clear): Use delete.
3845 (bpstats): New constructors.
3846 (bpstat_copy, bpstat_stop_status): Use new.
3847 (dprintf_after_condition_true): Update.
3848 * breakpoint.h (bpstats::bpstats): Add constructors.
3849 (bpstats::~bpstats): Add destructor.
3851 2017-09-20 Pedro Alves <palves@redhat.com>
3853 * eval.c (make_params): Delete, refactored as ...
3854 (class fake_method): ... this new type's ctor.
3855 (fake_method::~fake_method): New.
3856 (evaluate_subexp_standard): Use 'fake_method'.
3858 2017-09-20 Tom Tromey <tom@tromey.com>
3860 * windows-nat.c (get_windows_debug_event, windows_wait)
3861 (do_initial_windows_stuff, windows_attach): Update.
3862 * utils.c (vwarning, internal_vproblem): Update.
3863 (ui_unregister_input_event_handler_cleanup)
3864 (prepare_to_handle_input): Remove.
3865 (class scoped_input_handler): New.
3866 (defaulted_query, prompt_for_continue): Update.
3867 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3869 * top.c (undo_terminal_modifications_before_exit): Update.
3870 * target/target.h (target_terminal_init, target_terminal_inferior)
3871 (target_terminal_ours): Don't declare.
3872 (class target_terminal): New.
3873 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3874 (target_terminal_ours_for_output)
3875 (make_cleanup_restore_target_terminal): Don't declare.
3876 (target_terminal_info): Remove.
3877 * target.c (enum terminal_state, terminal_state): Remove.
3878 (target_terminal::terminal_state): Define.
3879 (target_terminal::init): Rename from target_terminal_init.
3880 (target_terminal::inferior): Rename from
3881 target_terminal_inferior.
3882 (target_terminal::ours): Rename from target_terminal_ours.
3883 (target_terminal::ours_for_output): Rename from
3884 target_terminal_ours_for_output.
3885 (target_terminal::info): New method.
3886 (cleanup_restore_target_terminal)
3887 (make_cleanup_restore_target_terminal): Remove.
3888 * solib.c (handle_solib_event): Update.
3889 * remote.c (remote_serial_quit_handler): Update.
3890 (remote_terminal_inferior, remote_wait_as): Update.
3891 * record-full.c (record_full_wait_1): Update.
3892 * nto-procfs.c (procfs_create_inferior): Update.
3893 * nat/fork-inferior.c (startup_inferior): Update.
3894 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3895 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3896 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3897 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3898 (mi_breakpoint_created, mi_breakpoint_deleted)
3899 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3900 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3901 (mi_user_selected_context_changed, report_initial_inferior):
3903 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3904 (linux_nat_terminal_inferior): Update.
3905 * infrun.c (follow_fork_inferior)
3906 (handle_vfork_child_exec_or_exit, do_target_resume)
3907 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3908 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3910 * inflow.c (child_terminal_init, info_terminal_command): Update.
3911 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3912 (attach_command): Update.
3913 * infcall.c (call_thread_fsm_should_stop): Update.
3914 * gnu-nat.c (gnu_attach): Update.
3915 * extension.c (struct active_ext_lang_state)
3916 (restore_active_ext_lang): Update.
3917 * exceptions.c (print_flush): Update.
3918 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3919 (struct quit_handler_cleanup_data, restore_quit_handler)
3920 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3922 * cp-support.c (gdb_demangle): Update.
3923 * breakpoint.c (update_inserted_breakpoint_locations)
3924 (insert_breakpoint_locations, handle_jit_event)
3925 (disable_breakpoints_in_unloaded_shlib): Update.
3926 * annotate.c (annotate_breakpoints_invalid)
3927 (annotate_frames_invalid): Update.
3929 2017-09-20 Tom Tromey <tom@tromey.com>
3931 * main.c (catch_command_errors): Rename from
3932 catch_command_errors_const.
3933 (captured_main_1): Update.
3935 2017-09-20 Pedro Alves <palves@redhat.com>
3937 * cli/cli-cmds.c (list_command): Use print_sal_location.
3938 (print_sal_location): New function.
3939 (ambiguous_line_spec): Use print_sal_location.
3940 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3941 * symtab.c (find_function_start_sal): Likewise.
3942 * symtab.h (symtab_and_line::symbol): New field.
3944 2017-09-20 Pedro Alves <palves@redhat.com>
3946 * linespec.c (minsym_found): Handle non-text minsyms.
3947 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3949 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3951 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3954 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3956 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3957 vmovups instead vmovaps.
3958 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3960 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3962 * NEWS (Changes since GDB 8.0): Add starti.
3963 * infcmd.c (enum run_break): New.
3964 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3966 (run_command): Use enum run_how.
3967 (start_command): Likewise.
3968 (starti_command): New function.
3969 (RUN_ARGS_HELP): New macro.
3970 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3971 commands. Add starti command.
3973 2017-09-19 Yao Qi <yao.qi@linaro.org>
3975 * Makefile.in (monitor.o): Remove the rule.
3977 2017-09-19 Yao Qi <yao.qi@linaro.org>
3979 * annotate.h (struct annotate_arg_emitter): Use
3980 DISABLE_COPY_AND_ASSIGN.
3981 * common/refcounted-object.h (refcounted_object): Likewise.
3982 * completer.h (struct completion_result): Likewise.
3983 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3984 * filename-seen-cache.h (filename_seen_cache): Likewise.
3985 * gdbcore.h (thread_section_name): Likewise.
3986 * gdb_regex.h (compiled_regex): Likewise.
3987 * gdbthread.h (scoped_restore_current_thread): Likewise.
3988 * inferior.h (scoped_restore_current_inferior): Likewise.
3989 * jit.c (jit_reader): Likewise.
3990 * linespec.h (struct linespec_result): Likewise.
3991 * mi/mi-parse.h (struct mi_parse): Likewise.
3992 * nat/fork-inferior.c (execv_argv): Likewise.
3993 * progspace.h (scoped_restore_current_program_space): Likewise.
3994 * python/python-internal.h (class gdbpy_enter): Likewise.
3995 * regcache.h (regcache): Likewise.
3996 * target-descriptions.c (struct tdesc_reg): Likewise.
3997 (struct tdesc_type): Likewise.
3998 (struct tdesc_feature): Likewise.
3999 * ui-out.h (ui_out_emit_type): Likewise.
4001 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4003 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4004 label abort_expression.
4006 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4008 * common/buffer.c (buffer_xml_printf): Adjust.
4009 * common/xml-utils.c (xml_escape_text): Change return type to
4010 std::string, update code accordingly.
4011 * common/xml-utils.h (xml_escape_text): Change return type to
4013 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4014 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4015 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4018 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4020 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4021 (SUBDIR_UNITTESTS_OBS): Add new object file.
4022 * unittests/xml-utils-selftests.c: New file.
4024 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4026 * common/selftest.h (selftest): New struct/interface.
4027 (register_test): Add name parameter, add new overload.
4028 (run_tests): Add filter parameter.
4029 (for_each_selftest_ftype): New typedef.
4030 (for_each_selftest): New declaration.
4031 * common/selftest.c (tests): Change type to
4032 map<string, unique_ptr<selftest>>.
4033 (simple_selftest): New struct.
4034 (register_test): New function.
4035 (register_test): Add name parameter and use it.
4036 (run_tests): Add filter parameter and use it. Add prints.
4037 Adjust to vector -> map change.
4038 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4039 registering selftests.
4040 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4041 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4042 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4043 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4044 * findvar.c (_initialize_findvar): Likewise.
4045 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4046 * maint.c (maintenance_selftest): Update call to run_tests.
4047 (maintenance_info_selftests): New function.
4048 (_initialize_maint_cmds): Register "maintenance info selftests"
4049 command. Update "maintenance selftest" doc.
4050 * regcache.c (_initialize_regcache): Add names when registering
4052 * rust-exp.y (_initialize_rust_exp): Likewise.
4053 * selftest-arch.c (gdbarch_selftest): New struct.
4054 (gdbarch_tests): Remove.
4055 (register_test_foreach_arch): Add name parameter. Call
4057 (tests_with_arch): Remove, move most content to
4058 gdbarch_selftest::operator().
4059 (_initialize_selftests_foreach_arch): Remove.
4060 * selftest-arch.h (register_test_foreach_arch): Add name
4062 (run_tests_with_arch): New declaration.
4063 * utils-selftests.c (_initialize_utils_selftests): Add names
4064 when registering selftests.
4065 * utils.c (_initialize_utils): Likewise.
4066 * unittests/array-view-selftests.c
4067 (_initialize_array_view_selftests): Likewise.
4068 * unittests/environ-selftests.c (_initialize_environ_selftests):
4070 * unittests/function-view-selftests.c
4071 (_initialize_function_view_selftests): Likewise.
4072 * unittests/offset-type-selftests.c
4073 (_initialize_offset_type_selftests): Likewise.
4074 * unittests/optional-selftests.c
4075 (_initialize_optional_selftests): Likewise.
4076 * unittests/scoped_restore-selftests.c
4077 (_initialize_scoped_restore_selftests): Likewise.
4078 * NEWS: Document "maintenance selftest" and "maint info
4081 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4083 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4086 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4088 * mi/mi-main.c (mi_load_progress): Make uiout variable
4091 2017-09-15 Pedro Alves <palves@redhat.com>
4093 * compile/compile-c-types.c (convert_enum, convert_int)
4094 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4096 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4098 * dwarf2read.c (copy_string): Remove.
4099 (parse_macro_definition): Replace copy_string with savestring.
4101 2017-09-15 Yao Qi <yao.qi@linaro.org>
4103 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4105 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4107 (i[34567]86-*-linux*): Likewise.
4109 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4111 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4112 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4113 <stack>: Change type to std::vector.
4114 <stack_len, stack_allocated>: Remove.
4115 <grow_stack>: Remove.
4116 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4117 (dwarf_expr_context::~dwarf_expr_context): Remove.
4118 (dwarf_expr_context::grow_stack): Remove.
4119 (dwarf_expr_context::push): Adjust.
4120 (dwarf_expr_context::pop): Adjust.
4121 (dwarf_expr_context::fetch): Adjust.
4122 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4123 (dwarf_expr_context::stack_empty_p): Adjust.
4124 (dwarf_expr_context::execute_stack_op): Adjust.
4126 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4128 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4129 return type to bool.
4130 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4132 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4134 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4135 Change type to bool.
4136 (dwarf_stack_value) <in_stack_memory>: Likewise.
4137 (dwarf_expr_context) <push_address>: Change parameter type to
4139 <fetch_in_stack_memory>: Change return type to bool.
4140 <push>: Change parameter type to bool.
4141 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4143 (dwarf_expr_context::push_address): Likewise.
4144 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4146 (dwarf_expr_context::execute_stack_op): Adjust.
4147 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4149 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4151 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4152 (struct dwarf_expr_context) <n_pieces>: Remove.
4153 <pieces>: Change type to std::vector.
4154 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4155 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4157 (dwarf_expr_context::add_piece): Adjust.
4158 * dwarf2loc.c (struct piece_closure): Initialize fields.
4160 <pieces>: Change type to std::vector.
4161 (allocate_piece_closure): Adjust, change parameter to
4162 std::vector rvalue and std::move it to piece_closure.
4163 (rw_pieced_value): Adjust.
4164 (check_pieced_synthetic_pointer): Adjust.
4165 (indirect_synthetic_pointer): Adjust.
4166 (coerce_pieced_ref): Adjust.
4167 (free_pieced_value_closure): Adjust. Use delete to free
4169 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4170 to allocate_piece_closure.
4171 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4173 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4175 * probe.h (probe_ops_cp): Remove typedef.
4176 (DEF_VEC_P (probe_ops_cp)): Remove.
4177 (all_probe_ops): Change type to std::vector.
4178 * probe.c (info_probes_for_ops): Adjust to vector change.
4179 (probe_linespec_to_ops): Likewise.
4180 (all_probe_ops): Change type to std::vector.
4181 (_initialize_probe): Adjust to vector change.
4182 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4183 * elfread.c (elf_get_probes): Likewise.
4184 * stap-probe.c (_initialize_stap_probe): Likewise.
4186 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4188 * probe.h (struct bound_probe): Define constructors.
4189 * probe.c (bound_probe_s): Remove typedef.
4190 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4191 (collect_probes): Change return type to std::vector, remove
4193 (compare_probes): Return bool, change parameter type. Change
4194 semantic to "less than".
4195 (gen_ui_out_table_header_info): Change parameter to std::vector
4197 (exists_probe_with_pops): Likewise.
4198 (info_probes_for_ops): Update to std::vector change.
4199 (enable_probes_command): Likewise.
4200 (disable_probes_command): Likewise.
4202 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4204 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4206 * probe.c (parse_probes_in_pspace): Update.
4207 (find_probes_in_objfile): Update.
4208 (find_probe_by_pc): Update.
4209 (collect_probes): Update.
4210 (probe_any_get_probes): Update.
4211 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4212 return type to reference to std::vector.
4213 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4214 std::vector and update.
4215 (dtrace_process_dof): Likewise.
4216 (dtrace_get_probes): Likewise.
4217 * elfread.c (elf_get_probes): Change return type to std::vector,
4218 store an std::vector in bfd_data.
4219 (probe_key_free): Update to std::vector.
4220 * stap-probe.c (handle_stap_probe): Change parameter to
4221 std::vector and update.
4222 (stap_get_probes): Likewise.
4223 * symfile-debug.c (debug_sym_get_probes): Change return type to
4224 std::vector and update.
4226 2017-09-11 Tom Tromey <tom@tromey.com>
4228 * breakpoint.c (program_breakpoint_here_p): Update.
4229 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4230 from make_show_memory_breakpoints_cleanup. Return a
4231 scoped_restore_tmpl<int>.
4232 (restore_show_memory_breakpoints): Remove.
4233 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4234 * mem-break.c (memory_validate_breakpoint): Update.
4235 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4236 (ia64_memory_remove_breakpoint): Update.
4237 (ia64_breakpoint_from_pc): Update.
4238 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4239 from make_show_memory_breakpoints_cleanup.
4241 2017-09-11 Tom Tromey <tom@tromey.com>
4243 * d-namespace.c (d_lookup_symbol): Use std::string.
4244 (find_symbol_in_baseclass): Likewise.
4246 2017-09-11 Tom Tromey <tom@tromey.com>
4248 * ctf.c (ctf_start): Use std::string.
4250 2017-09-11 Tom Tromey <tom@tromey.com>
4252 * ada-lang.c (is_known_support_routine): Update.
4253 (ada_unhandled_exception_name_addr_from_raise): Update.
4254 * guile/scm-frame.c (gdbscm_frame_name): Update.
4255 * python/py-frame.c (frapy_name): Update.
4256 (frapy_function): Update.
4257 * stack.h (find_frame_funname): Update.
4258 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4259 (print_frame): Update.
4261 2017-09-11 Tom Tromey <tom@tromey.com>
4263 * findcmd.c (put_bits): Take a gdb::byte_vector.
4264 (parse_find_args): Return gdb::byte_vector. "args" now const.
4265 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4267 (find_command): Update.
4269 2017-09-11 Tom Tromey <tom@tromey.com>
4271 * cli/cli-script.c (class scoped_restore_hook_in): New.
4272 (clear_hook_in_cleanup): Remove.
4273 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4274 scoped_restore_hook_in.
4276 2017-09-11 Tom Tromey <tom@tromey.com>
4278 * cli/cli-script.c (restore_interp): Remove.
4279 (read_command_lines): Use scoped_restore_interp.
4280 * interps.c (scoped_restore_interp::set_temp): Rename from
4282 * interps.h (class scoped_restore_interp): New.
4283 (interp_set_temp): Remove.
4285 2017-09-11 Tom Tromey <tom@tromey.com>
4287 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4288 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4289 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4291 (mi_cmd_break_insert_1): Update.
4292 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4295 2017-09-11 Tom Tromey <tom@tromey.com>
4297 * demangle.c (demangle_command): Update.
4298 * breakpoint.c (disable_command): Update.
4299 (enable_command): Update.
4300 (find_location_by_number): Make "number" const. Use
4302 * cli/cli-utils.c (extract_arg): Return std::string.
4303 * probe.c (parse_probe_linespec): Update. Change types.
4304 (collect_probes): Take string arguments.
4305 (parse_probe_linespec): Likewise.
4306 (info_probes_for_ops): Update.
4307 (enable_probes_command): Update.
4308 (disable_probes_command): Update.
4309 * break-catch-sig.c (catch_signal_split_args): Update.
4310 * mi/mi-parse.c (mi_parse): Update.
4312 2017-09-11 Tom Tromey <tom@tromey.com>
4314 * language.h (language_enum): Make argument const.
4315 * language.c (language_enum): Make argument const.
4317 2017-09-11 Tom Tromey <tom@tromey.com>
4319 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4321 (skip_to_space): Rename from skip_to_space_const.
4322 * common/common-utils.c (skip_to_space): New function.
4323 (skip_to_space): Rename from skip_to_space_const.
4324 * cli/cli-utils.h (get_number): Rename from get_number_const.
4325 (extract_arg): Rename from extract_arg_const.
4326 * cli/cli-utils.c (get_number): Rename from get_number_const.
4327 (extract_arg): Rename from extract_arg_const.
4328 (number_or_range_parser::get_number): Use ::get_number.
4329 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4330 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4331 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4332 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4333 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4334 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4335 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4336 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4338 2017-09-11 Tom Tromey <tom@tromey.com>
4340 * python/python.c (do_start_initialization): Use
4341 py-event-types.def to initialize types.
4342 Define all object type structures.
4343 * python/python-internal.h: Don't declare event initialization
4345 * python/py-threadevent.c (thread_event_object_type): Don't
4347 * python/py-stopevent.c (stop_event_object_type): Don't define.
4348 * python/py-signalevent.c (signal_event_object_type): Don't
4350 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4351 (clear_objfiles_event_object_type): Don't declare or define.
4352 * python/py-infevents.c (inferior_call_pre_event_object_type)
4353 (inferior_call_post_event_object_type)
4354 (register_changed_event_object_type)
4355 (memory_changed_event_object_type): Don't declare or define.
4356 * python/py-inferior.c (new_thread_event_object_type)
4357 (new_inferior_event_object_type)
4358 (inferior_deleted_event_object_type): Don't declare or define.
4359 * python/py-exitedevent.c (exited_event_object_type): Don't
4361 * python/py-evts.c (gdbpy_initialize_py_events): Use
4363 * python/py-events.h (thread_event_object_type): Don't declare.
4364 (events_object): Use py-all-events.def.
4365 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4367 * python/py-event-types.def: New file.
4368 * python/py-continueevent.c (create_continue_event_object): Don't
4370 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4372 * python/py-all-events.def: New file.
4374 2017-09-11 Tom Tromey <tom@tromey.com>
4376 * python/py-threadevent.c (create_thread_event_object): Return
4378 * python/py-stopevent.h (create_stop_event_object)
4379 (create_breakpoint_event_object, create_signal_event_object):
4381 * python/py-stopevent.c (create_stop_event_object): Return
4383 (emit_stop_event): Update.
4384 * python/py-signalevent.c (create_signal_event_object): Return
4386 * python/py-infevents.c (create_inferior_call_event_object):
4388 * python/py-event.h (create_event_object)
4389 (create_thread_event_object): Update.
4390 * python/py-event.c (create_event_object): Return gdbpy_ref.
4391 * python/py-continueevent.c: Return gdbpy_ref.
4392 * python/py-bpevent.c (create_breakpoint_event_object): Return
4395 2017-09-11 Tom Tromey <tom@tromey.com>
4399 * python/python.c (do_start_initialization): Initialize new event
4401 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4402 (gdbpy_initialize_inferior_deleted_event)
4403 (gdbpy_initialize_new_thread_event): Declare.
4404 * python/py-threadevent.c (create_thread_event_object): Add option
4406 * python/py-inferior.c (new_thread_event_object_type)
4407 (new_inferior_event_object_type)
4408 (inferior_deleted_event_object_type): Declare.
4409 (python_new_inferior, python_inferior_deleted): New functions.
4410 (add_thread_object): Emit new_thread event.
4411 (gdbpy_initialize_inferior): Attach new functions to corresponding
4413 (new_thread, new_inferior, inferior_deleted): Define new event
4415 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4417 * python/py-events.h (events_object) <new_inferior,
4418 inferior_deleted, new_thread>: New fields.
4419 * python/py-event.h (create_thread_event_breakpoint): Add optional
4422 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4424 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4425 check current_ui instead.
4426 (internal_vproblem): Likewise.
4428 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4430 * thread.c (print_thread_info_1): Remove unnecessary calls to
4431 uiout->is_mi_like_p.
4433 2017-09-09 Tom Tromey <tom@tromey.com>
4435 * namespace.h (add_using_directive): Update.
4436 * namespace.c (add_using_directive): Change type of excludes to
4438 * dwarf2read.c (read_import_statement): Use std::vector.
4439 (read_namespace): Update.
4440 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4442 2017-09-09 Tom Tromey <tom@tromey.com>
4444 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4446 2017-09-09 Tom Tromey <tom@tromey.com>
4448 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4450 2017-09-09 Tom Tromey <tom@tromey.com>
4452 * stack.c (func_command): Use gdb::def_vector.
4454 2017-09-09 Tom Tromey <tom@tromey.com>
4456 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4457 ui_out_emit_list, ui_out_emit_tuple.
4458 (mi_cmd_var_update): Likewise.
4460 2017-09-09 Tom Tromey <tom@tromey.com>
4462 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4463 ui_out_redirect_pop.
4464 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4465 ui_out_redirect_pop.
4466 * utils.c (do_ui_out_redirect_pop)
4467 (make_cleanup_ui_out_redirect_pop): Remove.
4468 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4469 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4470 * ui-out.h (ui_out_redirect_pop): New class.
4472 2017-09-09 Tom Tromey <tom@tromey.com>
4474 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4475 (list_available_thread_groups, mi_cmd_list_thread_groups)
4476 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4477 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4480 2017-09-09 Tom Tromey <tom@tromey.com>
4482 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4485 2017-09-09 Tom Tromey <tom@tromey.com>
4487 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4488 * stack.c (print_frame): Use ui_out_emit_tuple.
4489 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4490 (info_spu_mailbox_command, info_spu_dma_command)
4491 (info_spu_proxydma_command): Likewise.
4492 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4493 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4494 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4496 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4498 2017-09-09 Tom Tromey <tom@tromey.com>
4500 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4501 (class ui_out_emit_table): Update comment.
4502 * ui-out.c (do_cleanup_table_end)
4503 (make_cleanup_ui_out_table_begin_end): Remove.
4504 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4505 (info_spu_dma_cmdlist): Likewise.
4506 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4507 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4510 2017-09-09 Tom Tromey <tom@tromey.com>
4512 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4513 ui_out_emit_list, gdb::optional.
4515 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4517 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4519 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4521 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4523 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4524 * ada-exp.y: Remove _initialize_ada_exp prototype.
4525 * ada-lang.c: Remove _initialize_ada_language prototype.
4526 * ada-tasks.c: Remove _initialize_tasks prototype.
4527 * addrmap.c: Remove _initialize_addrmap prototype.
4528 * agent.c: Remove _initialize_agent prototype.
4529 * aix-thread.c: Remove _initialize_aix_thread prototype.
4530 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4531 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4532 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4534 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4535 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4536 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4537 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4539 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4541 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4542 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4543 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4544 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4546 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4547 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4548 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4549 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4550 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4551 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4552 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4554 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4556 * annotate.c: Remove _initialize_annotate prototype.
4557 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4558 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4559 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4560 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4561 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4562 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4563 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4564 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4566 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4567 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4568 * auto-load.c: Remove _initialize_auto_load prototype.
4569 * auxv.c: Remove _initialize_auxv prototype.
4570 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4571 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4572 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4573 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4574 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4575 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4577 * break-catch-throw.c: Remove _initialize_break_catch_throw
4579 * breakpoint.c: Remove _initialize_breakpoint prototype.
4580 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4581 * btrace.c: Remove _initialize_btrace prototype.
4582 * charset.c: Remove _initialize_charset prototype.
4583 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4584 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4585 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4586 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4587 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4588 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4589 * coffread.c: Remove _initialize_coffread prototype.
4590 * compile/compile.c: Remove _initialize_compile prototype.
4591 * complaints.c: Remove _initialize_complaints prototype.
4592 * completer.c: Remove _initialize_completer prototype.
4593 * copying.awk: Remove _initialize_copying prototype.
4594 * copying.c: Regenerate.
4595 * core-regset.c: Remove _initialize_core_regset prototype.
4596 * corefile.c: Remove _initialize_core prototype.
4597 * corelow.c: Remove _initialize_corelow prototype.
4598 * cp-abi.c: Remove _initialize_cp_abi prototype.
4599 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4600 * cp-support.c: Remove _initialize_cp_support prototype.
4601 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4602 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4603 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4604 * ctf.c: Remove _initialize_ctf prototype.
4605 * d-lang.c: Remove _initialize_d_language prototype.
4606 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4608 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4609 * dbxread.c: Remove _initialize_dbxread prototype.
4610 * dcache.c: Remove _initialize_dcache prototype.
4611 * demangle.c: Remove _initialize_demangler prototype.
4612 * disasm-selftests.c: Remove _initialize_disasm_selftests
4614 * disasm.c: Remove _initialize_disasm prototype.
4615 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4616 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4617 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4619 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4620 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4621 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4622 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4623 * elfread.c: Remove _initialize_elfread prototype.
4624 * exec.c: Remove _initialize_exec prototype.
4625 * extension.c: Remove _initialize_extension prototype.
4626 * f-lang.c: Remove _initialize_f_language prototype.
4627 * f-valprint.c: Remove _initialize_f_valprint prototype.
4628 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4629 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4630 * filesystem.c: Remove _initialize_filesystem prototype.
4631 * findcmd.c: Remove _initialize_mem_search prototype.
4632 * fork-child.c: Remove _initialize_fork_child prototype.
4633 * frame-base.c: Remove _initialize_frame_base prototype.
4634 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4635 * frame.c: Remove _initialize_frame prototype.
4636 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4637 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4638 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4639 * gcore.c: Remove _initialize_gcore prototype.
4640 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4641 * gdbarch.c: Regenerate.
4642 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4643 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4644 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4645 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4646 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4647 * go-lang.c: Remove _initialize_go_language prototype.
4648 * go32-nat.c: Remove _initialize_go32_nat prototype.
4649 * guile/guile.c: Remove _initialize_guile prototype.
4650 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4651 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4652 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4653 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4654 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4655 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4656 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4657 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4658 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4659 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4661 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4663 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4664 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4665 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4666 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4667 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4668 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4669 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4670 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4671 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4672 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4673 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4674 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4675 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4676 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4677 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4678 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4680 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4682 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4683 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4684 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4685 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4686 * infcall.c: Remove _initialize_infcall prototype.
4687 * infcmd.c: Remove _initialize_infcmd prototype.
4688 * inferior.c: Remove _initialize_inferiors prototype.
4689 * inflow.c: Remove _initialize_inflow prototype.
4690 * infrun.c: Remove _initialize_infrun prototype.
4691 * interps.c: Remove _initialize_interpreter prototype.
4692 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4693 * jit.c: Remove _initialize_jit prototype.
4694 * language.c: Remove _initialize_language prototype.
4695 * linux-fork.c: Remove _initialize_linux_fork prototype.
4696 * linux-nat.c: Remove _initialize_linux_nat prototype.
4697 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4698 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4699 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4700 * m2-lang.c: Remove _initialize_m2_language prototype.
4701 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4702 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4703 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4704 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4705 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4706 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4707 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4708 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4709 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4710 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4711 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4712 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4713 * machoread.c: Remove _initialize_machoread prototype.
4714 * macrocmd.c: Remove _initialize_macrocmd prototype.
4715 * macroscope.c: Remove _initialize_macroscope prototype.
4716 * maint.c: Remove _initialize_maint_cmds prototype.
4717 * mdebugread.c: Remove _initialize_mdebugread prototype.
4718 * memattr.c: Remove _initialize_mem prototype.
4719 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4720 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4721 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4722 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4723 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4724 * microblaze-linux-tdep.c: Remove
4725 _initialize_microblaze_linux_tdep prototype.
4726 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4727 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4728 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4729 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4730 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4731 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4732 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4733 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4734 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4735 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4736 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4738 * mipsread.c: Remove _initialize_mipsread prototype.
4739 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4741 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4742 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4743 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4744 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4745 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4746 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4748 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4749 * nto-procfs.c: Remove _initialize_procfs prototype.
4750 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4751 * objc-lang.c: Remove _initialize_objc_language prototype.
4752 * objfiles.c: Remove _initialize_objfiles prototype.
4753 * observer.c: Remove observer_test_first_notification_function,
4754 observer_test_second_notification_function,
4755 observer_test_third_notification_function, and
4756 _initialize_observer prototypes.
4757 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4758 * osabi.c: Remove _initialize_gdb_osabi prototype.
4759 * osdata.c: Remove _initialize_osdata prototype.
4760 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4761 * parse.c: Remove _initialize_parse prototype.
4762 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4763 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4764 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4765 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4766 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4767 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4768 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4769 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4770 * printcmd.c: Remove _initialize_printcmd prototype.
4771 * probe.c: Remove _initialize_probe prototype.
4772 * proc-api.c: Remove _initialize_proc_api prototype.
4773 * proc-events.c: Remove _initialize_proc_events prototype.
4774 * proc-service.c: Remove _initialize_proc_service prototype.
4775 * procfs.c: Remove _initialize_procfs prototype.
4776 * psymtab.c: Remove _initialize_psymtab prototype.
4777 * python/python.c: Remove _initialize_python prototype.
4778 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4779 * record-btrace.c: Remove _initialize_record_btrace prototype.
4780 * record-full.c: Remove _initialize_record_full prototype.
4781 * record.c: Remove _initialize_record prototype.
4782 * regcache.c: Remove _initialize_regcache prototype.
4783 * reggroups.c: Remove _initialize_reggroup prototype.
4784 * remote-notif.c: Remove _initialize_notif prototype.
4785 * remote-sim.c: Remove _initialize_remote_sim prototype.
4786 * remote.c: Remove _initialize_remote prototype.
4787 * reverse.c: Remove _initialize_reverse prototype.
4788 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4789 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4790 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4792 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4793 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4794 * rust-exp.y: Remove _initialize_rust_exp prototype.
4795 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4796 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4797 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4798 * score-tdep.c: Remove _initialize_score_tdep prototype.
4799 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4801 * ser-go32.c: Remove _initialize_ser_dos prototype.
4802 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4803 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4804 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4805 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4806 * serial.c: Remove _initialize_serial prototype.
4807 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4808 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4809 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4810 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4811 * skip.c: Remove _initialize_step_skip prototype.
4812 * sol-thread.c: Remove _initialize_sol_thread prototype.
4813 * solib-aix.c: Remove _initialize_solib_aix prototype.
4814 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4815 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4816 * solib-frv.c: Remove _initialize_frv_solib prototype.
4817 * solib-spu.c: Remove _initialize_spu_solib prototype.
4818 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4819 * solib-target.c: Remove _initialize_solib_target prototype.
4820 * solib.c: Remove _initialize_solib prototype.
4821 * source.c: Remove _initialize_source prototype.
4822 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4823 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4825 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4826 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4827 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4828 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4830 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4831 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4832 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4833 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4835 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4837 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4839 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4841 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4842 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4844 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4846 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4848 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4850 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4852 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4853 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4854 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4855 * stabsread.c: Remove _initialize_stabsread prototype.
4856 * stack.c: Remove _initialize_stack prototype.
4857 * stap-probe.c: Remove _initialize_stap_probe prototype.
4858 * std-regs.c: Remove _initialize_frame_reg prototype.
4859 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4860 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4861 * symfile.c: Remove _initialize_symfile prototype.
4862 * symmisc.c: Remove _initialize_symmisc prototype.
4863 * symtab.c: Remove _initialize_symtab prototype.
4864 * target-dcache.c: Remove _initialize_target_dcache prototype.
4865 * target-descriptions.c: Remove _initialize_target_descriptions
4867 * thread.c: Remove _initialize_thread prototype.
4868 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4870 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4871 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4872 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4874 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4875 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4876 * tracefile.c: Remove _initialize_tracefile prototype.
4877 * tracepoint.c: Remove _initialize_tracepoint prototype.
4878 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4879 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4880 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4881 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4882 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4883 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4884 * tui/tui.c: Remove _initialize_tui prototype.
4885 * typeprint.c: Remove _initialize_typeprint prototype.
4886 * user-regs.c: Remove _initialize_user_regs prototype.
4887 * utils.c: Remove _initialize_utils prototype.
4888 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4889 * valarith.c: Remove _initialize_valarith prototype.
4890 * valops.c: Remove _initialize_valops prototype.
4891 * valprint.c: Remove _initialize_valprint prototype.
4892 * value.c: Remove _initialize_values prototype.
4893 * varobj.c: Remove _initialize_varobj prototype.
4894 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4895 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4896 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4897 * windows-nat.c: Remove _initialize_windows_nat,
4898 _initialize_check_for_gdb_ini, and _initialize_loadable
4900 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4901 * xcoffread.c: Remove _initialize_xcoffread prototype.
4902 * xml-support.c: Remove _initialize_xml_support prototype.
4903 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4904 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4906 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4908 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4910 2017-09-08 Keith Seitz <keiths@redhat.com>
4912 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4915 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4917 * f-valprint.c (f_val_print): Remove check for one byte
4918 sized integers. Remove printing of character type.
4920 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4921 Christoph Weinmann <christoph.t.weinmann@intel.com>
4922 Bernhard Heckel <bernhard.heckel@intel.com>
4924 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4925 to maintain proper indentation when printing pointers/refs.
4927 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4931 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4933 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4935 2017-09-05 Tom Tromey <tom@tromey.com>
4937 * parse.c (funcall_chain): Now a std::vector.
4938 (start_arglist, end_arglist): Simplify.
4939 (free_funcalls): Remove.
4940 (parse_exp_in_context_1): Remove cleanup.
4942 2017-09-05 Tom Tromey <tom@tromey.com>
4944 * go-exp.y (go_parse): Don't create a cleanup.
4946 2017-09-05 Tom Tromey <tom@tromey.com>
4948 * d-exp.y (PrimaryExpression): Use std::string.
4949 (d_parse): Don't create a cleanup.
4951 2017-09-05 Tom Tromey <tom@tromey.com>
4953 * utils.c (do_clear_parser_state): Remove.
4954 (make_cleanup_clear_parser_state): Remove.
4955 * p-exp.y (pascal_parse): Use scoped_restore.
4956 * m2-exp.y (m2_parse): Use scoped_restore.
4957 * f-exp.y (f_parse): Use scoped_restore.
4958 * d-exp.y (d_parse): Use scoped_restore.
4959 * c-exp.y (c_parse): Use scoped_restore.
4960 * ada-exp.y (ada_parse): Use scoped_restore.
4961 * utils.h (make_cleanup_clear_parser_state): Remove.
4963 2017-09-06 Keith Seitz <keiths@redhat.com>
4965 * dwarf2read.c (dw2_linkage_name_attr): New function.
4966 (dw2_linkage_name): New function.
4967 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4968 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4969 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4971 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4973 * config/djgpp/djconfig.sh: Correct shell portability issue.
4975 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4977 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4979 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4981 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4982 * NEWS: Mention new FreeBSD/mips native configuration.
4983 * configure.host: Add aarch64*-*-freebsd*.
4984 * configure.nat: Likewise.
4985 * aarch64-fbsd-nat.c: New file.
4987 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4989 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4990 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4991 * NEWS: Mention new FreeBSD/aarch64 target.
4992 * configure.tgt: Add aarch64*-*-freebsd*.
4993 * aarch64-fbsd-tdep.c: New file.
4994 * aarch64-fbsd-tdep.h: New file.
4996 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4998 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5000 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5002 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5005 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5007 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5010 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5012 * infrun.c (follow_exec): Call add_thread after
5013 target_find_description.
5015 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5017 * infrun.c (handle_inferior_event_1): When exec'ing, read
5018 stop_pc after follow_exec.
5020 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5022 * remote.c (process_g_packet): Update error message.
5024 2017-09-05 Yao Qi <yao.qi@linaro.org>
5026 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5029 2017-09-05 Pedro Alves <palves@redhat.com>
5031 * eval.c (eval_call, evaluate_funcall): New functions, factored
5033 (evaluate_subexp_standard): ... this.
5035 2017-09-05 Yao Qi <yao.qi@linaro.org>
5037 * amd64-tdep.c (amd64_target_description): Create target
5039 (_initialize_amd64_tdep): Don't call functions
5040 initialize_tdesc_amd64_*. Add self tests.
5041 * arch/amd64.c (amd64_create_target_description): Add parameter
5042 is_linux. Call set_tdesc_osabi if is_linux is true.
5043 * arch/amd64.h (amd64_create_target_description): Update the
5045 * arch/i386.c (i386_create_target_description): Add parameter
5046 is_linux. Call set_tdesc_osabi if is_linux is true.
5047 * arch/i386.h (i386_create_target_description): Update
5049 * configure.tgt: Add i386.o to gdb_target_obs.
5050 * features/Makefile (XMLTOC): Remove i386/*.xml.
5051 * features/i386/amd64-avx-avx512.c: Remove.
5052 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5053 * features/i386/amd64-avx-mpx.c: Remove.
5054 * features/i386/amd64-avx.c: Remove.
5055 * features/i386/amd64-mpx.c: Remove.
5056 * features/i386/amd64.c: Remove.
5057 * features/i386/i386-avx-avx512.c: Remove.
5058 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5059 * features/i386/i386-avx-mpx.c: Remove.
5060 * features/i386/i386-avx.c: Remove.
5061 * features/i386/i386-mmx.c: Remove.
5062 * features/i386/i386-mpx.c: Remove.
5063 * features/i386/i386.c: Remove.
5064 * i386-tdep.c: Don't include features/i386/i386*.c., include
5065 target-descriptions.h and arch/i386.h.
5066 (i386_target_description): Create target descriptions.
5067 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5068 functions. Do self tests.
5070 2017-09-05 Yao Qi <yao.qi@linaro.org>
5072 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5073 * features/i386/amd64-avx-avx512-linux.c: Removed.
5074 * features/i386/amd64-avx-linux.c: Removed.
5075 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5076 * features/i386/amd64-avx-mpx-linux.c: Removed.
5077 * features/i386/amd64-linux.c: Removed.
5078 * features/i386/amd64-mpx-linux.c: Removed.
5079 * features/i386/x32-avx-avx512-linux.c: Removed.
5080 * features/i386/x32-avx-linux.c: Removed.
5081 * features/i386/x32-linux.c: Removed.
5083 2017-09-05 Yao Qi <yao.qi@linaro.org>
5085 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5087 (amd64_linux_read_description): Call
5088 amd64_create_target_description.
5089 * arch/amd64.c: New file.
5090 * arch/amd64.h: New file.
5091 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5092 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5094 2017-09-05 Yao Qi <yao.qi@linaro.org>
5096 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5097 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5098 (amd64_linux_read_description): Create target descriptions.
5099 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5100 functions. Add unit tests.
5101 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5103 * features/i386/64bit-avx.c: Generated.
5104 * features/i386/64bit-avx512.c: Generated.
5105 * features/i386/64bit-core.c: Generated.
5106 * features/i386/64bit-linux.c: Generated.
5107 * features/i386/64bit-mpx.c: Generated.
5108 * features/i386/64bit-pkeys.c: Generated.
5109 * features/i386/64bit-segments.c: Generated.
5110 * features/i386/64bit-sse.c: Generated.
5111 * features/i386/x32-core.c: Generated.
5112 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5113 c files for amd64-linux and x32-linux.
5115 2017-09-05 Yao Qi <yao.qi@linaro.org>
5117 * amd64-linux-tdep.c (amd64_linux_read_description): New
5119 (amd64_linux_core_read_description): Call
5120 amd64_linux_read_description.
5121 (amd64_linux_init_abi): Likewise.
5122 (amd64_x32_linux_init_abi): Likewise.
5123 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5124 * x86-linux-nat.c (x86_linux_read_description): Call
5125 amd64_linux_read_description.
5127 2017-09-05 Yao Qi <yao.qi@linaro.org>
5129 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5132 2017-09-05 Yao Qi <yao.qi@linaro.org>
5134 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5135 * features/i386/i386-avx-avx512-linux.c: Remove.
5136 * features/i386/i386-avx-linux.c: Remove.
5137 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5138 * features/i386/i386-avx-mpx-linux.c: Remove.
5139 * features/i386/i386-linux.c: Remove.
5140 * features/i386/i386-mmx-linux.c: Remove.
5141 * features/i386/i386-mpx-linux.c: Remove.
5143 2017-09-05 Yao Qi <yao.qi@linaro.org>
5145 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5146 (SFILES): Add arch/i386.c.
5147 (HFILES_NO_SRCDIR): Add arch/i386.h.
5148 * arch/i386.c: New file.
5149 * arch/i386.h: New file.
5150 * arch/tdesc.h (allocate_target_description): Declare.
5151 (set_tdesc_architecture): Declare.
5152 (set_tdesc_osabi): Declare.
5153 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5154 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5155 include arch/i386.h.
5156 (i386_linux_read_description): Remove code and call
5157 i386_create_target_description.
5158 (set_tdesc_architecture): New function.
5159 (set_tdesc_osabi): New function.
5160 * target-descriptions.h (allocate_target_description): Remove.
5162 2017-09-05 Yao Qi <yao.qi@linaro.org>
5164 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5165 * target-descriptions.c (tdesc_create_feature): Likewise, and
5167 * features/i386/32bit-avx.c: Re-generated.
5168 * features/i386/32bit-avx512.c: Re-generated.
5169 * features/i386/32bit-core.c: Re-generated.
5170 * features/i386/32bit-linux.c: Re-generated.
5171 * features/i386/32bit-mpx.c: Re-generated.
5172 * features/i386/32bit-pkeys.c: Re-generated.
5173 * features/i386/32bit-sse.c: Re-generated.
5175 2017-09-05 Yao Qi <yao.qi@linaro.org>
5177 * regformats/regdef.h (struct reg): Override operator == and !=.
5179 2017-09-05 Yao Qi <yao.qi@linaro.org>
5181 * arch/tdesc.h: New file.
5182 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5183 * target-descriptions.c: Update comments.
5184 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5186 * features/i386/32bit-avx.c: Re-generated.
5187 * features/i386/32bit-avx512.c: Re-generated.
5188 * features/i386/32bit-core.c: Re-generated.
5189 * features/i386/32bit-linux.c: Re-generated.
5190 * features/i386/32bit-mpx.c: Re-generated.
5191 * features/i386/32bit-pkeys.c: Re-generated.
5192 * features/i386/32bit-sse.c: Re-generated.
5194 2017-09-05 Yao Qi <yao.qi@linaro.org>
5196 * regformats/regdat.sh: Update generated code.
5198 2017-09-05 Yao Qi <yao.qi@linaro.org>
5200 * regformats/regdat.sh: Adjust code order.
5202 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5204 * expprint.c (dump_subexp_body_standard): Use constant format
5205 string in fprintf_filtered call.
5207 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5209 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5211 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5213 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5215 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5217 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5219 * bsd-kvm.o: Define _KMEMUSER.
5220 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5221 * configure: Regenerate.
5223 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5225 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5226 * i386-fbsd-nat.c: Likewise.
5228 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5230 * unittests/array-view-selftests.c: Add include of <array>.
5232 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5234 * spu-tdep.c (flush_ea_cache): Add missing argument to
5235 call_function_by_hand.
5237 2017-09-04 Pedro Alves <palves@redhat.com>
5239 * NEWS (Safer support for debugging with no debug info): New.
5241 2017-09-04 Pedro Alves <palves@redhat.com>
5243 * c-exp.y (function_method, function_method_void): Add current
5244 instance flags to TYPE_INSTANCE.
5245 * dwarf2read.c (check_modifier): New.
5246 (compute_delayed_physnames): Assert that only C++ adds delayed
5247 physnames. Mark fn_fields as const/volatile depending on
5249 * eval.c (make_params): New type_instance_flags parameter. Use
5250 it as the new type's instance flags.
5251 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5252 flags element and pass it to make_params.
5253 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5254 instance flags element.
5255 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5256 * gdbtypes.h: Include "enum-flags.h".
5257 (type_instance_flags): New enum-flags type.
5258 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5259 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5260 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5261 (follow_type_instance_flags): New function.
5262 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5263 * parser-defs.h (follow_type_instance_flags): Declare.
5264 * valops.c (value_struct_elt_for_reference): const/volatile must
5267 2017-09-04 Pedro Alves <palves@redhat.com>
5269 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5270 function/method scopes; lookup the nested name as a function local
5273 2017-09-04 Pedro Alves <palves@redhat.com>
5275 (%type <voidval>): Add function_method.
5276 * c-exp.y (exp): New production for calls with no arguments.
5277 (function_method, function_method_void_or_typelist): New
5279 (exp): New production for "method()::static_var".
5280 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5281 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5282 Handle OP_FUNC_STATIC_VAR.
5283 * parse.c (operator_length_standard):
5284 Handle OP_FUNC_STATIC_VAR.
5286 2017-09-04 Pedro Alves <palves@redhat.com>
5288 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5290 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5292 * parse.c (operator_length_standard, operator_check_standard):
5294 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5296 2017-09-04 Pedro Alves <palves@redhat.com>
5298 * ax-gdb.c: Include "typeprint.h".
5299 (gen_expr_for_cast): New function.
5300 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5301 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5303 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5304 nodebug_data_symbol.
5305 * eval.c: Include "typeprint.h".
5306 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5307 Error out if symbol has unknown type.
5308 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5309 evaluate_subexp_for_cast.
5310 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5312 (evaluate_subexp_for_cast): New function.
5313 * gdbtypes.c (init_nodebug_var_type): New function.
5314 (objfile_type): Use it to initialize types of variables with no
5316 * typeprint.c (error_unknown_type): New.
5317 * typeprint.h (error_unknown_type): New declaration.
5318 * compile/compile-c-types.c (convert_type_basic): Handle
5319 TYPE_CODE_ERROR; warn and fallback to int for variables with
5322 2017-09-04 Pedro Alves <palves@redhat.com>
5324 * eval.c (evaluate_var_value): New function, factored out from ...
5325 (evaluate_subexp_standard): ... here.
5327 2017-09-04 Pedro Alves <palves@redhat.com>
5329 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5330 Remove useless assignments to 'op'.
5332 2017-09-04 Pedro Alves <palves@redhat.com>
5334 * eval.c (eval_skip_value): New function.
5335 (evaluate_subexp_standard): Use it.
5337 2017-09-04 Pedro Alves <palves@redhat.com>
5339 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5340 function name from symbol/minsym and pass it to
5341 error_call_unknown_return_type.
5343 2017-09-04 Pedro Alves <palves@redhat.com>
5345 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5346 * ax-gdb.c (gen_msym_var_ref): New function.
5347 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5348 * eval.c (evaluate_var_msym_value): New function.
5349 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5350 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5351 to call_function_by_hand.
5352 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5353 Handle OP_VAR_MSYM_VALUE.
5354 (union exp_element) <msymbol>: New field.
5355 * minsyms.h (struct type): Forward declare.
5356 (find_minsym_type_and_address): Declare.
5357 * parse.c (write_exp_elt_msym): New function.
5358 (write_exp_msymbol): Delete, refactored as ...
5359 (find_minsym_type_and_address): ... this new function.
5360 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5361 (operator_length_standard, operator_check_standard): Handle
5363 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5365 2017-09-04 Pedro Alves <palves@redhat.com>
5367 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5368 TYPE_GNU_IFUNC specially here. Throw error if return type is
5370 * ada-typeprint.c (print_func_type): Handle functions with unknown
5372 * c-typeprint.c (c_type_print_base): Handle functions and methods
5373 with unknown return type.
5374 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5375 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5376 * compile/compile-c-types.c: Include "objfiles.h".
5377 (convert_func): For functions with unknown return type, warn and
5379 * compile/compile-object-run.c (compile_object_run): Adjust call
5380 to call_function_by_hand_dummy.
5381 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5382 call_function_by_hand.
5383 * eval.c (evaluate_subexp_standard): Adjust calls to
5384 call_function_by_hand. Handle functions and methods with unknown
5385 return type. Pass expect_type to call_function_by_hand.
5386 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5388 * gcore.c (call_target_sbrk): Adjust call to
5389 call_function_by_hand.
5390 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5391 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5392 an integer address type instead of nodebug.
5393 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5394 call_function_by_hand.
5395 * infcall.c (error_call_unknown_return_type): New function.
5396 (call_function_by_hand): New "default_return_type" parameter.
5398 (call_function_by_hand_dummy): New "default_return_type"
5399 parameter. Use it instead of defaulting to int. If there's no
5400 default and the return type is unknown, throw an error. If
5401 there's a default return type, and the called function has no
5402 debug info, then assume the function is prototyped.
5403 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5404 New "default_return_type" parameter.
5405 (error_call_unknown_return_type): New declaration.
5406 * linux-fork.c (call_lseek): Cast return type of lseek.
5407 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5408 call_function_by_hand.
5409 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5410 calls to call_function_by_hand.
5411 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5413 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5414 (value_nsstring, print_object_command): Adjust calls to
5415 call_function_by_hand.
5416 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5417 functions with unknown return type.
5418 (pascal_type_print_func_varspec_suffix): New function.
5419 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5420 TYPE_CODE_METHOD>: Use it.
5421 * python/py-value.c (valpy_call): Adjust call to
5422 call_function_by_hand.
5423 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5424 call_function_by_hand.
5425 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5426 call_function_by_hand.
5427 * valops.c (value_allocate_space_in_inferior): Adjust call to
5428 call_function_by_hand.
5429 * typeprint.c (type_print_unknown_return_type): New function.
5430 * typeprint.h (type_print_unknown_return_type): New declaration.
5432 2017-09-04 Pedro Alves <palves@redhat.com>
5434 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5435 types with more than one parameter as prototyped.
5437 2017-09-04 Pedro Alves <palves@redhat.com>
5439 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5440 (disassemble_command): Use gdb_disassembly_flags instead of bare
5442 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5443 (dump_insns, do_mixed_source_and_assembly_deprecated)
5444 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5445 Use gdb_disassembly_flags instead of bare int.
5446 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5447 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5448 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5449 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5450 (enum gdb_disassembly_flag): ... values of this new enumeration.
5451 (gdb_disassembly_flags): Define.
5453 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5454 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5455 gdb_disassembly_flags instead of bare int.
5456 * record-btrace.c (btrace_insn_history)
5457 (record_btrace_insn_history, record_btrace_insn_history_range)
5458 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5459 instead of bare int.
5460 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5461 Use gdb_disassembly_flags instead of bare int.
5462 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5464 * target-delegates.c: Regenerate.
5465 * target.c (target_insn_history, target_insn_history_from)
5466 (target_insn_history_range): Use gdb_disassembly_flags instead of
5468 * target.h: Include "disasm.h".
5469 (struct target_ops) <to_insn_history, to_insn_history_from,
5470 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5472 (target_insn_history, target_insn_history_from)
5473 (target_insn_history_range): Use gdb_disassembly_flags instead of
5476 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5478 * cli/cli-script.c (build_command_line): For if/while commands,
5479 check whether args is empty.
5481 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5483 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5484 (enum command_control_type): Likewise.
5485 (struct command_line): Likewise.
5486 (free_command_lines): Likewise.
5487 (struct command_lines_deleter): Likewise.
5488 (command_line_up): Likewise.
5489 (read_command_lines): Likewise.
5490 (read_command_lines_1): Likewise.
5491 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5492 (enum command_control_type): Likewise.
5493 (struct command_line): Likewise.
5494 (free_command_lines): Likewise.
5495 (struct command_lines_deleter): Likewise.
5496 (command_line_up): Likewise.
5497 (read_command_lines): Likewise.
5498 (read_command_lines_1): Likewise.
5499 * breakpoint.h: Include cli/cli-script.h.
5500 * extension-priv.h: Likewise.
5501 * gdbcmd.h: Likewise.
5503 2017-09-04 Pedro Alves <palves@redhat.com>
5505 * ada-lang.c (is_known_support_routine): Move sal declaration to
5506 where it is initialized.
5507 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5508 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5509 (clear_command, update_static_tracepoint): Remove init_sal
5510 references. Move declarations closer to initializations.
5511 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5513 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5514 references. Move sal declarations closer to initializations.
5515 * frame.c (find_frame_sal): Return a symtab_and_line via function
5516 return instead of output parameter. Remove init_sal references.
5517 * frame.h (find_frame_sal): Return a symtab_and_line via function
5518 return instead of output parameter.
5519 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5520 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5522 (gdbscm_find_pc_line): Remove init_sal reference.
5523 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5524 references. Move declarations closer to initializations.
5525 * infcmd.c (set_step_frame): Update. Move declarations closer to
5527 (finish_backward): Remove init_sal references. Move declarations
5528 closer to initializations.
5529 * infrun.c (process_event_stop_test, handle_step_into_function)
5530 (insert_hp_step_resume_breakpoint_at_frame)
5531 (insert_step_resume_breakpoint_at_caller): Likewise.
5532 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5533 (symbol_to_sal): Likewise.
5534 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5535 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5536 to its initialization.
5537 * reverse.c (save_bookmark_command): Use new/delete. Remove
5538 init_sal references. Move declarations closer to initializations.
5539 * source.c (get_current_source_symtab_and_line): Remove brace
5541 (set_current_source_symtab_and_line): Now takes the sal by const
5542 reference. Remove brace initialization.
5543 (line_info): Remove init_sal reference.
5544 * source.h (set_current_source_symtab_and_line): Now takes a
5545 symtab_and_line via const reference.
5546 * stack.c (set_current_sal_from_frame): Adjust.
5547 (print_frame_info): Adjust.
5548 (get_last_displayed_sal): Return the sal via function return
5549 instead of via output parameter. Simplify.
5550 (frame_info): Adjust.
5551 * stack.h (get_last_displayed_sal): Return the sal via function
5552 return instead of via output parameter.
5553 * symtab.c (init_sal): Delete.
5554 (find_pc_sect_line): Remove init_sal references. Move
5555 declarations closer to initializations.
5556 (find_function_start_sal): Remove init_sal references. Move
5557 declarations closer to initializations.
5558 * symtab.h (struct symtab_and_line): In-class initialize all
5560 * tracepoint.c (set_traceframe_context)
5561 (print_one_static_tracepoint_marker): Remove init_sal references.
5562 Move declarations closer to initializations.
5563 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5564 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5565 declarations closer to initializations.
5566 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5567 init_sal references. Adjust.
5569 2017-09-04 Pedro Alves <palves@redhat.com>
5571 * ax-gdb.c (agent_command_1): Use range-for.
5572 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5573 * breakpoint.c: Include "common/array-view.h".
5574 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5575 parameter from struct symtabs_and_lines to
5576 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5577 (breakpoint_sals_to_pc): Change sals parameter from struct
5578 symtabs_and_lines to std::vector reference.
5579 (check_fast_tracepoint_sals): Change sals parameter from struct
5580 symtabs_and_lines to std::array_view. Use range-for.
5581 (decode_static_tracepoint_spec): Return a std::vector instead of
5582 symtabs_and_lines. Update.
5583 (create_breakpoint): Update.
5584 (break_range_command, until_break_command, clear_command): Update.
5585 (base_breakpoint_decode_location, bkpt_decode_location)
5586 (bkpt_probe_create_sals_from_location)
5587 (bkpt_probe_decode_location, tracepoint_decode_location)
5588 (tracepoint_probe_decode_location)
5589 (strace_marker_create_sals_from_location): Return a std::vector
5590 instead of symtabs_and_lines.
5591 (strace_marker_create_breakpoints_sal): Update.
5592 (strace_marker_decode_location): Return a std::vector instead of
5593 symtabs_and_lines. Update.
5594 (update_breakpoint_locations): Change struct symtabs_and_lines
5595 parameters to gdb::array_view. Adjust.
5596 (location_to_sals): Return a std::vector instead of
5597 symtabs_and_lines. Update.
5598 (breakpoint_re_set_default): Use std::vector instead of struct
5600 (decode_location_default): Return a std::vector instead of
5601 symtabs_and_lines. Update.
5602 * breakpoint.h: Include "common/array-view.h".
5603 (struct breakpoint_ops) <decode_location>: Now returns a
5604 std::vector instead of returning a symtabs_and_lines via output
5606 (update_breakpoint_locations): Change sals parameters to use
5608 * cli/cli-cmds.c (edit_command, list_command): Update to use
5609 std::vector and gdb::array_view.
5610 (ambiguous_line_spec): Adjust to use gdb::array_view and
5612 (compare_symtabs): Rename to ...
5613 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5614 const reference and adjust.
5615 (filter_sals): Rewrite using std::vector and standard algorithms.
5616 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5617 (jump_command): Update to use std::vector.
5618 * linespec.c (struct linespec_state) <canonical_names>: Update
5620 (add_sal_to_sals_basic): Delete.
5621 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5622 (decode_line_2, create_sals_line_offset)
5623 (convert_address_location_to_sals, convert_linespec_to_sals)
5624 (convert_explicit_location_to_sals, parse_linespec)
5625 (event_location_to_sals, decode_line_full, decode_line_1)
5626 (decode_line_with_current_source)
5627 (decode_line_with_last_displayed, decode_objc)
5628 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5629 (linespec_result::~linespec_result): Adjust to use std::vector
5630 instead of symtabs_and_lines.
5631 * linespec.h (linespec_sals::sals): Now a std::vector.
5632 (struct linespec_result): Use std::vector, bool, and in-class
5634 (decode_line_1, decode_line_with_current_source)
5635 (decode_line_with_last_displayed): Return std::vector.
5636 * macrocmd.c (info_macros_command): Use std::vector.
5637 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5638 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5640 * probe.h (parse_probes): Return a std::vector.
5641 * python/python.c (gdbpy_decode_line): Use std::vector and
5643 * source.c (select_source_symtab, line_info): Use std::vector.
5644 * stack.c (func_command): Use std::vector.
5645 * symtab.h (struct symtabs_and_lines): Delete.
5646 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5648 2017-09-04 Pedro Alves <palves@redhat.com>
5650 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5651 unittests/array-view-selftests.c.
5652 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5653 * common/array-view.h: New file.
5654 * unittests/array-view-selftests.c: New file.
5656 2017-09-04 Pedro Alves <palves@redhat.com>
5658 * cli/cli-cmds.c (edit_command): Pass message to
5659 ambiguous_line_spec.
5660 (list_command): Pass message to ambiguous_line_spec. Say
5661 "first"/"last" instead of "start" and "end" to be consistent with
5663 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5664 them to print formatted message.
5666 2017-09-04 Pedro Alves <palves@redhat.com>
5668 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5669 ftrace_update_insns by reference instead of pointer.
5671 2017-09-04 Yao Qi <yao.qi@linaro.org>
5673 * i386-go32-tdep.c: Include x86-xstate.h.
5674 (i386_go32_init_abi): Call i386_target_description.
5675 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5676 if xcr0 is X86_XSTATE_X87_MASK.
5677 * i386-tdep.h (tdesc_i386): Remove the declaration.
5678 (tdesc_i386_mmx): Likewise.
5680 2017-09-04 Yao Qi <yao.qi@linaro.org>
5682 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5683 X86_XSTATE_SSE_MASK instead of 0.
5685 2017-09-04 Yao Qi <yao.qi@linaro.org>
5687 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5688 i386_target_description.
5689 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5690 i386_target_description.
5691 * i386-tdep.c (i386_gdbarch_init): Likewise.
5693 2017-09-04 Yao Qi <yao.qi@linaro.org>
5695 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5696 (x86_darwin_init_abi_64): Call amd64_target_description.
5697 * amd64-dicos-tdep.c: Likewise.
5698 * amd64-fbsd-nat.c: Likewise.
5699 * amd64-fbsd-tdep.c: Likewise.
5700 * amd64-nbsd-tdep.c: Likewise.
5701 * amd64-obsd-tdep.c: Likewise.
5702 * amd64-sol2-tdep.c: Likewise.
5703 * amd64-windows-tdep.c: Likewise.
5704 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5706 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5708 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5709 (btrace_function) <insn>: Change type to use std::vector.
5710 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5711 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5712 ftrace_update_insns, ftrace_compute_global_level_offset,
5713 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5714 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5715 change to std::vector.
5716 (ftrace_update_insns): Adjust to change to std::vector, change
5717 type of INSN parameter.
5718 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5719 * record-btrace.c (btrace_call_history_insn_range,
5720 btrace_compute_src_line_range,
5721 record_btrace_frame_prev_register): Adjust to change to
5723 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5724 to change to std::vector.
5726 2017-09-03 Tom Tromey <tom@tromey.com>
5728 * corefile.c (reopen_exec_file): Use std::string.
5730 2017-09-03 Tom Tromey <tom@tromey.com>
5732 * compile/compile.c (compile_register_name_mangled): Return
5734 * compile/compile-loc2c.c (pushf_register_address): Update.
5735 (pushf_register): Update.
5736 * compile/compile-c-types.c (convert_array): Update.
5737 * compile/compile-c-symbols.c (generate_vla_size): Update.
5738 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5739 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5740 (convert_one_symbol): Update.
5741 (generate_c_for_for_one_variable): Update.
5742 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5744 (generate_register_struct): Update.
5745 * compile/compile-internal.h (c_get_range_decl_name): Return a
5747 (compile_register_name_mangled): Return std::string.
5749 2017-09-03 Tom Tromey <tom@tromey.com>
5751 * utils.c (perror_string): Return a std::string.
5752 (throw_perror_with_name, perror_warning_with_name): Update.
5754 2017-09-03 Tom Tromey <tom@tromey.com>
5756 * demangle.c (demangle_command): Use std::string,
5759 2017-09-03 Tom Tromey <tom@tromey.com>
5761 * cli/cli-setshow.c (do_set_command): Use std::string.
5763 2017-09-03 Tom Tromey <tom@tromey.com>
5765 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5767 2017-09-03 Tom Tromey <tom@tromey.com>
5769 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5771 2017-09-03 Tom Tromey <tom@tromey.com>
5773 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5774 gdb::unique_xmalloc_ptr.
5776 2017-09-03 Tom Tromey <tom@tromey.com>
5778 * thread.c (print_thread_info_1): Use string_printf.
5779 (thread_apply_command, thread_apply_all_command): Use
5782 2017-09-03 Tom Tromey <tom@tromey.com>
5784 * valprint.c (val_print_string): Update.
5785 * gdbcore.h (memory_error_message): Return std::string.
5786 * corefile.c (memory_error_message): Return std::string.
5787 (memory_error): Update.
5788 * breakpoint.c (insert_bp_location): Update.
5790 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5792 * target/waitstatus.h (target_waitstatus_to_string): Change
5793 return type to std::string.
5794 * target/waitstatus.c (target_waitstatus_to_string): Return
5796 * target.h (target_waitstatus_to_string): Remove declaration.
5797 * infrun.c (resume, clear_proceed_status_thread,
5798 print_target_wait_results, do_target_wait, save_waitstatus,
5799 stop_all_threads): Adjust.
5800 * record-btrace.c (record_btrace_wait): Adjust.
5802 (target_debug_print_struct_target_waitstatus_p): Adjust.
5804 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5807 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5810 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5812 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5813 for setting/unsetting environment variables on the remote target.
5814 (New remote packets): Add entries for QEnvironmentHexEncoded,
5815 QEnvironmentUnset and QEnvironmentReset.
5816 * common/environ.c (gdb_environ::operator=): Extend method to
5817 handle m_user_set_env_list and m_user_unset_env_list.
5818 (gdb_environ::clear): Likewise.
5819 (match_var_in_string): Change type of first parameter from 'char
5820 *' to 'const char *'.
5821 (gdb_environ::set): Extend method to handle
5822 m_user_set_env_list and m_user_unset_env_list.
5823 (gdb_environ::unset): Likewise.
5824 (gdb_environ::clear_user_set_env): New method.
5825 (gdb_environ::user_set_envp): Likewise.
5826 (gdb_environ::user_unset_envp): Likewise.
5827 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5828 m_user_unset_env_list on move constructor/assignment.
5829 (unset): Add new default parameter 'update_unset_list = true'.
5830 (clear_user_set_env): New method.
5831 (user_set_envp): Likewise.
5832 (user_unset_envp): Likewise.
5833 (m_user_set_env_list): New std::set.
5834 (m_user_unset_env_list): Likewise.
5835 * common/rsp-low.c (hex2str): New function.
5836 (bin2hex): New overload for bin2hex function.
5837 * common/rsp-low.c (hex2str): New prototype.
5838 (str2hex): New overload prototype.
5839 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5840 QEnvironmentUnset and QEnvironmentReset.
5841 (remote_protocol_features): Add QEnvironmentHexEncoded,
5842 QEnvironmentUnset and QEnvironmentReset packets.
5843 (send_environment_packet): New function.
5844 (extended_remote_environment_support): Likewise.
5845 (extended_remote_create_inferior): Call
5846 extended_remote_environment_support.
5847 (_initialize_remote): Add QEnvironmentHexEncoded,
5848 QEnvironmentUnset and QEnvironmentReset packet configs.
5849 * unittests/environ-selftests.c (gdb_selftest_env_var):
5851 (test_vector_initialization): New function.
5852 (test_init_from_host_environ): Likewise.
5853 (test_reinit_from_host_environ): Likewise.
5854 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5856 (test_unset_set_empty_vector): Likewise.
5857 (test_vector_clear): Likewise.
5858 (test_std_move): Likewise.
5859 (test_move_constructor):
5860 (test_self_move): Likewise.
5861 (test_set_unset_reset): Likewise.
5862 (run_tests): Rewrite in terms of the functions above.
5864 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5866 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5867 (adi_available): Use a temp variable of type CORE_ADDR as argument
5868 3 when calling target_auxv_search.
5869 (adi_normalize_address): Use masks and xor operators to calculate
5871 (adi_read_versions, adi_write_versions, adi_print_versions)
5872 (do_examine, do_assign): Use paddress.
5874 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5876 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5877 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5878 out of loop and add supply of FIR.
5879 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5882 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5885 * cli/cli-script.c (define_command): Don't convert command name
5888 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5890 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5891 Update all callers accordingly. Remove all code blocks handling
5892 the case where DISPP is not NULL.
5894 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5897 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5898 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5899 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5901 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5903 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5904 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5905 (read_comp_units_from_section): New parameter abbrev_section, use
5906 read_and_check_comp_unit_head, allocate signatured_type if needed.
5907 (create_all_comp_units): Update read_comp_units_from_section caller.
5909 2017-08-23 Pedro Alves <palves@redhat.com>
5912 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5913 to null_ptid and switch to thread without reading the registers
5914 after adding the inferior.
5916 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5918 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5920 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5921 (compile_to_object): Implement compile_gcc.
5922 (_initialize_compile): Install "set compile-gcc". Initialize
5925 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5927 * compile/compile.c (compile_to_object): Conditionally call
5928 set_verbose. Conditionally call compile or compile_v0.
5930 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5932 * sparc64-tdep.h: (adi_normalize_address): New export.
5933 * sparc-nat.h: (open_adi_tag_fd): New export.
5934 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5935 * sparc64-linux-tdep.c:
5936 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5937 (sparc64_linux_handle_segmentation_fault): New function.
5938 (sparc64_linux_init_abi): Register
5939 sparc64_linux_handle_segmentation_fault
5940 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5941 (sparc64_addr_bits_remove): New function.
5942 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5943 (MAX_PROC_NAME_SIZE): New macro.
5944 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5945 (sparc64adilist): New variable.
5946 (adi_proc_list): New variable.
5947 (find_adi_info): New function.
5948 (add_adi_info): New function.
5949 (get_adi_info_proc): New function.
5950 (get_adi_info): New function.
5951 (info_adi_command): New function.
5952 (read_maps_entry): New function.
5953 (adi_available): New function.
5954 (adi_normalize_address): New function.
5955 (adi_align_address): New function.
5956 (adi_convert_byte_count): New function.
5957 (adi_tag_fd): New function.
5958 (adi_is_addr_mapped): New function.
5959 (adi_read_versions): New function.
5960 (adi_write_versions): New function.
5961 (adi_print_versions): New function.
5962 (do_examine): New function.
5963 (do_assign): New function.
5964 (adi_examine_command): New function.
5965 (adi_assign_command): New function.
5966 (_initialize_sparc64_adi_tdep): New function.
5968 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5970 * breakpoint.c (breakpoints_info): Rename to ...
5971 (info_breakpoints_command): ... this.
5972 (watchpoints_info): Rename to ...
5973 (info_watchpoints_command): ... this.
5974 (tracepoints_info): Rename to ...
5975 (info_tracepoints_command): ... this.
5976 (_initialize_breakpoint): Adjust.
5977 * dcache.c (dcache_info): Rename to ...
5978 (info_display_command): ... this.
5979 (_initialize_dcache): Adjust.
5980 * frame.h (args_info): Rename to ...
5981 (info_args_command): ... this.
5982 (locals_info): Rename to ...
5983 (info_locals_command): ... this.
5984 * infcmd.c (nofp_registers_info): Rename to ...
5985 (info_registers_command): ... this.
5986 (float_info): Rename to ...
5987 (info_float_command): ... this.
5988 (program_info): Rename to ...
5989 (info_program_command): ... this.
5990 (all_registers_info): Rename to ...
5991 (info_all_registers_command): ... this.
5992 (vector_info): Rename to ...
5993 (info_vector_command): ... this.
5994 (float_info): Rename to ...
5995 (info_float_command): ... this.
5996 (_initialize_infcmd): Adjust.
5997 * inferior.h (term_info): Rename to ...
5998 (info_terminal_command): ... this.
5999 * inflow.c (term_info): Rename to ...
6000 (info_terminal_command): ... this.
6001 (_initialize_inflow): Adjust.
6002 * infrun.c (signals_info): Rename to ...
6003 (info_signals_command): ... this.
6004 (_initialize_infrun): Adjust.
6005 * objc-lang.c (classes_info): Rename to ...
6006 (info_classes_command): ... this.
6007 (selectors_info): Rename to ...
6008 (info_selectors_command): ... this.
6009 (_initialize_objc_language): Adjust.
6010 * printcmd.c (sym_info): Rename to ...
6011 (info_symbol_command): ... this.
6012 (address_info): Rename to ...
6013 (info_address_command): ... this.
6014 (display_info): Rename to ...
6015 (info_display_command): ... this.
6016 (_initialize_printcmd): Adjust.
6017 * reverse.c (bookmarks_info): Rename to ...
6018 (info_breakpoints_command): ... this.
6019 (_initialize_reverse): Adjust.
6020 * ser-go32.c (dos_info): Rename to ...
6021 (info_serial_command): ... this.
6022 (_initialize_ser_dos): Adjust.
6023 * skip.c (skip_info): Rename to ...
6024 (info_skip_command): ... this.
6025 (_initialize_step_skip): Adjust.
6026 * source.c (line_info): Rename to ...
6027 (info_line_command): ... this.
6028 (source_info): Rename to ...
6029 (info_source_command)
6030 * stack.c (frame_info): Rename to ...
6031 (info_frame_command): ... this.
6032 (locals_info): Rename to ...
6033 (info_locals_command): ... this.
6034 (args_info): Rename to ...
6035 (info_args_command): ... this.
6036 (_initialize_stack): Adjust.
6037 * symtab.c (sources_info): Rename to ...
6038 (info_sources_command): ... this.
6039 (variables_info): Rename to ...
6040 (info_variables_command): ... this.
6041 (functions_info): Rename to ...
6042 (info_functions_command): ... this.
6043 (types_info): Rename to ...
6044 (info_types_command): ... this.
6045 (_initialize_symtab): Adjust.
6046 * target.c (target_info): Rename to ...
6047 (info_target_command): ... this.
6048 (initialize_targets): Adjust.
6049 * tracepoint.c (tvariables_info): Rename to ...
6050 (info_tvariables_command): ... this.
6051 (scope_info): Rename to ...
6052 (info_scope_command): ... this.
6053 (trace_dump_actions): Adjust.
6054 (_initialize_tracepoint): Adjust.
6056 2017-08-22 Tom Tromey <tom@tromey.com>
6058 * breakpoint.h (install_breakpoint): Update.
6059 * breakpoint.c (add_solib_catchpoint): Update.
6060 (install_breakpoint): Change argument to a std::unique_ptr.
6061 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6062 (create_breakpoint_sal, create_breakpoint): Update.
6063 (watch_command_1, catch_exec_command_1)
6064 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6065 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6066 Return the breakpoint.
6067 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6068 (new_single_step_breakpoint): Update.
6069 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6071 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6073 * break-catch-sig.c (create_signal_catchpoint): Use
6075 * ada-lang.c (create_ada_exception_catchpoint): Use
6078 2017-08-22 Tom Tromey <tom@tromey.com>
6080 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6082 2017-08-22 Tom Tromey <tom@tromey.com>
6084 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6085 (lookup_partial_symbol): Update.
6087 2017-08-22 Tom Tromey <tom@tromey.com>
6089 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6090 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6091 (find_and_open_source, symtab_to_fullname): Update.
6092 * psymtab.c (psymtab_to_fullname): Update.
6094 2017-08-22 Tom Tromey <tom@tromey.com>
6096 * exec.c (exec_file_attach): Update.
6097 * linux-thread-db.c (try_thread_db_load): Update.
6098 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6099 * utils.c (gdb_realpath): Change return type.
6100 (gdb_realpath_keepfile): Update.
6101 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6102 (_initialize_utils): Register the new self test.
6103 * source.c (openp): Update.
6104 (find_and_open_source): Update.
6105 * nto-tdep.c (nto_find_and_open_solib): Update.
6106 * main.c (set_gdb_data_directory): Update.
6107 (captured_main_1): Update.
6108 * dwarf2read.c (dwarf2_get_dwz_file): Update
6109 (dw2_map_symbol_filenames): Update.
6110 * auto-load.c (auto_load_safe_path_vec_update): Update.
6111 (filename_is_in_auto_load_safe_path_vec): Change type of
6113 (auto_load_objfile_script): Update.
6114 (file_is_auto_load_safe): Update. Use std::string.
6115 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6117 2017-08-22 Tom Tromey <tom@tromey.com>
6119 * utils.c (gdb_realpath_keepfile): Return a
6120 gdb::unique_xmalloc_ptr.
6121 * exec.c (exec_file_attach): Update.
6122 * utils.h (gdb_realpath_keepfile): Return a
6123 gdb::unique_xmalloc_ptr.
6125 2017-08-22 Tom Tromey <tom@tromey.com>
6127 * compile/compile.c (compile_file_command): Use
6128 gdb::unique_xmalloc_ptr, std::string.
6129 * utils.c (gdb_abspath): Change return type.
6130 * source.c (openp): Update.
6131 * objfiles.c (allocate_objfile): Update.
6132 * main.c (set_gdb_data_directory): Update.
6133 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6135 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6137 * cli-cmds.c (list_commands): List actual code around more than
6140 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6142 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6144 2017-08-21 Pedro Alves <palves@redhat.com>
6147 * c-exp.y (variable production): Handle function aliases.
6148 * minsyms.c (msymbol_is_text): New function.
6149 * minsyms.h (msymbol_is_text): Declare.
6150 * symtab.c (find_function_alias_target): New function.
6151 * symtab.h (find_function_alias_target): Declare.
6153 2017-08-21 Pedro Alves <palves@redhat.com>
6155 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6157 * typeprint.c (whatis_exp): If handling "whatis", and expression
6158 is OP_TYPE, strip one typedef level. Otherwise don't strip
6160 * valops.c (value_cast): Save "to" type before resolving
6161 stubs/typedefs. Use that type as resulting value's type.
6163 2017-08-18 Tom Tromey <tom@tromey.com>
6164 Pedro Alves <palves@redhat.com>
6166 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6167 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6168 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6169 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6170 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6171 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6172 (linux_get_siginfo_data): Add "thread" argument. Use
6174 * linux-nat.c (linux_child_follow_fork)
6175 (check_stopped_by_watchpoint): Use scoped_restore.
6176 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6177 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6178 (restore_inferior_ptid, save_inferior_ptid): Remove.
6179 * btrace.c (btrace_fetch): Use scoped_restore.
6180 * bsd-uthread.c (bsd_uthread_fetch_registers)
6181 (bsd_uthread_store_registers): Use scoped_restore.
6182 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6184 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6185 (aix_thread_xfer_partial): Use scoped_restore.
6186 * inferior.h (save_inferior_ptid): Remove.
6188 2017-08-18 Yao Qi <yao.qi@linaro.org>
6191 * arm-tdep.c (gdb_print_insn_arm): Mark
6192 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6194 2017-08-18 Yao Qi <yao.qi@linaro.org>
6196 * NEWS: Mention GDBserver's new option "--selftest".
6197 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6198 * selftest.c: Move it to common/selftest.c.
6199 * selftest.h: Move it to common/selftest.h.
6200 * selftest-arch.c (reset): New function.
6201 (tests_with_arch): Call reset.
6203 2017-08-18 Yao Qi <yao.qi@linaro.org>
6205 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6206 instead of exception_fprintf and printf_filtered.
6208 2017-08-18 Yao Qi <yao.qi@linaro.org>
6210 * selftest.c (register_self_test): Rename it to
6211 selftests::register_test.
6212 (run_self_tests): selftest::run_tests.
6213 * selftest.h: Update declarations.
6214 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6215 selftests::register_test_foreach_arch.
6216 * selftest-arch.h: Update declaration.
6217 * aarch64-tdep.c: Update.
6218 * arm-tdep.c: Likewise.
6219 * disasm-selftests.c: Likewise.
6220 * dwarf2loc.c: Likewise.
6221 * dwarf2-frame.c: Likewise.
6222 * findvar.c: Likewise.
6223 * gdbarch-selftests.c: Likewise.
6224 * maint.c (maintenance_selftest): Likewise.
6225 * regcache.c: Likewise.
6226 * rust-exp.y: Likewise.
6227 * selftest-arch.c: Likewise.
6228 * unittests/environ-selftests.c: Likewise.
6229 * unittests/function-view-selftests.c: Likewise.
6230 * unittests/offset-type-selftests.c: Likewise.
6231 * unittests/optional-selftests.c: Likewise.
6232 * unittests/scoped_restore-selftests.c: Likewise.
6233 * utils-selftests.c: Likewise.
6235 2017-08-17 Pedro Alves <palves@redhat.com>
6237 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6240 2017-08-17 Pedro Alves <palves@redhat.com>
6242 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6244 (reset_die_in_process): Delete, replaced by ...
6245 (process_die_scope): ... this new class. Make it responsible for
6246 freeing cu->line_header too.
6247 (process_die): Use process_die_scope.
6248 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6249 cu->line_header_die_owner. Don't release the line header if it's
6251 (setup_type_unit_groups): Make the CU/DIE own the line header.
6252 Don't release the line header here.
6254 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6256 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6258 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6260 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6263 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6265 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6268 2017-08-15 Stafford Horne <shorne@gmail.com>
6270 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6272 2017-08-15 Stafford Horne <shorne@gmail.com>
6274 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6276 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6279 * infcmd.c (unset_environment_command): Use the 'clear' method on
6280 the environment instead of resetting it.
6282 2017-08-15 John Baldwin <jhb@FreeBSD.org>
6284 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6287 2017-08-14 Tom Tromey <tom@tromey.com>
6289 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6290 (print_binary_chars): Likewise.
6291 (BITS_IN_BYTES): Remove.
6293 2017-08-14 Tom Tromey <tom@tromey.com>
6296 * valprint.c (LOW_ZERO): Change value to 034.
6297 (print_octal_chars): Add static_asserts for octal constants.
6298 * printcmd.c (print_scalar_formatted): Add 'd' case.
6300 2017-08-11 Tom Tromey <tom@tromey.com>
6302 * symfile.c (add_symbol_file_command): Use std::vector.
6304 2017-08-14 Tom Tromey <tom@tromey.com>
6306 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6307 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6309 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6311 2017-08-11 Pedro Alves <palves@redhat.com>
6313 * infrun.c (process_event_stop_test): Adjust
6314 function_name_is_marked_for_skip call.
6315 * skip.c: Include <list>.
6316 (skiplist_entry): Make it a class with private fields, and
6318 (skiplist_entry_chain): Delete.
6319 (skiplist_entries): New.
6320 (skiplist_entry_count): Delete.
6321 (highest_skiplist_entry_num): New.
6322 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6323 (add_skiplist_entry): Delete.
6324 (skiplist_entry::skiplist_entry): New.
6325 (skiplist_entry::add_entry): New.
6326 (skip_file_command, skip_function): Adjust.
6327 (compile_skip_regexp): Delete.
6328 (skip_command): Don't compile regexp here. Adjust to use
6329 skiplist_entry::add_entry.
6330 (skip_info): Adjust to use range-for and getters.
6331 (skip_enable_command, skip_disable_command): Adjust to use
6332 range-for and setters.
6333 (skip_delete_command): Adjust to use std::list.
6334 (add_skiplist_entry): Delete.
6335 (skip_file_p): Delete, refactored as ...
6336 (skiplist_entry::do_skip_file_p): ... this new method.
6337 (skip_gfile_p): Delete, refactored as ...
6338 (skiplist_entry::do_gskip_file_p): ... this new method.
6339 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6340 (skiplist_entry::skip_function_p): ... this new method.
6341 (function_name_is_marked_for_skip): Now returns bool, and takes
6342 the function sal by const reference. Adjust to use range-for and
6343 skiplist_entry methods.
6344 (_initialize_step_skip): Remove references to
6345 skiplist_entry_chain, skiplist_entry_count.
6346 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6347 takes the function sal by const reference.
6349 2017-08-11 Yao Qi <yao.qi@linaro.org>
6351 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6352 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6353 (dwarf2_frame_cache):
6354 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6355 RETURN_MASK_ALL and set *this_case to NULL.
6356 * frame-unwind.h: Update comments.
6358 2017-08-11 Yao Qi <yao.qi@linaro.org>
6360 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6361 (dwarf2_frame_state_copy_regs): Remove.
6362 (dwarf2_frame_state_free_regs): Remove.
6363 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6364 (dwarf2_restore_rule): Call method .alloc_regs instead of
6365 dwarf2_frame_state_alloc_regs.
6366 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6367 constructor. Call std::move.
6368 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6369 (dwarf2_frame_cache): Likewise.
6371 [GDB_SELF_TEST]: Include selftest.h and
6373 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6374 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6375 execute_cfa_program_test.
6377 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6378 copy ctor, assignment operator, move assignment.
6379 <alloc_regs>: New method.
6381 (struct dwarf2_frame_state): Delete dtor.
6382 (dwarf2_frame_state_alloc_regs): Remove declaration.
6383 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6384 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6386 2017-08-11 Yao Qi <yao.qi@linaro.org>
6388 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6389 (dwarf2_frame_state::dwarf2_frame_state): New.
6390 (dwarf2_frame_state::~dwarf2_frame_state): New.
6391 (dwarf2_fetch_cfa_info): Update.
6392 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6393 rather than a pointer. Update code.
6394 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6396 <data_align, code_align, retaddr_column>: Change them to const.
6397 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6400 2017-08-11 Yao Qi <yao.qi@linaro.org>
6402 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6403 <loc.exp>: New field.
6404 * dwarf2-frame.c (execute_cfa_program): Update.
6405 (dwarf2_frame_prev_register): Update.
6407 2017-08-10 Pedro Alves <palves@redhat.com>
6409 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6411 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6413 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6414 (fbsd_pending_children): Use std::list.
6415 (fbsd_remember_child): Likewise.
6416 (fbsd_is_child_pending): Likewise.
6417 (fbsd_pending_vfork_done): Use std::forward_list.
6418 (fbsd_add_vfork_done): Likewise.
6419 (fbsd_is_vfork_done_pending): Likewise.
6420 (fbsd_next_vfork_done): Likewise.
6422 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6424 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6425 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6426 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6428 (fbsd_xfer_partial): Use gdb::byte_vector.
6429 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6431 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6433 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6435 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6437 2017-08-09 Tom Tromey <tom@tromey.com>
6439 * skip.c (skiplist_entry): New constructor.
6440 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6441 (skiplist_entry::file_is_glob): Now bool.
6442 (skiplist_entry::file, skiplist_entry::function): Now
6444 (make_skip_entry): Return a unique_ptr. Use new.
6445 (free_skiplist_entry, free_skiplist_entry_cleanup)
6446 (make_free_skiplist_entry_cleanup): Remove.
6447 (skip_command, skip_disable_command, add_skiplist_entry)
6448 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6449 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6450 (function_name_is_marked_for_skip): Update.
6451 (skip_delete_command): Update. Use delete.
6453 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6455 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6456 (aarch64_linux_core_read_description): New function.
6457 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6459 2017-08-09 Pedro Alves <palves@redhat.com>
6461 * cp-name-parser.y (cp_comp_to_string): Return a
6462 gdb::unique_xmalloc_ptr<char>.
6463 * cp-support.c (replace_typedefs_qualified_name)
6464 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6465 (cp_canonicalize_string_full): Use op= instead of explicit
6467 (cp_class_name_from_physname, method_name_from_physname)
6468 (cp_func_name, cp_remove_params): Adjust to use
6469 gdb::unique_xmalloc_ptr<char>.
6470 * cp-support.h (cp_comp_to_string): Return a
6471 gdb::unique_xmalloc_ptr<char>.
6472 * python/py-type.c (typy_lookup_type): Adjust to use
6473 gdb::unique_xmalloc_ptr<char>.
6475 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6477 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6479 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6480 Yao Qi <yao.qi@linaro.org>
6482 * cp-support.c (cp_canonicalize_string_full): Use
6483 gdb::unique_xmalloc_ptr<char>.
6484 (cp_canonicalize_string): Likewise.
6486 2017-08-09 Yao Qi <yao.qi@linaro.org>
6488 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6489 * regformats/i386/amd64-avx-avx512.dat: Remove.
6490 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6491 * regformats/i386/amd64-avx-mpx.dat:Remove.
6492 * regformats/i386/amd64-avx.dat: Remove.
6493 * regformats/i386/amd64-mpx.dat: Remove.
6494 * regformats/i386/i386-avx-avx512.dat: Remove.
6495 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6496 * regformats/i386/i386-avx-mpx.dat: Remove.
6497 * regformats/i386/i386-mmx.dat: Remove.
6498 * regformats/i386/i386-mpx.dat: Remove.
6500 2017-08-09 Yao Qi <yao.qi@linaro.org>
6502 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6503 * amd64-tdep.c: Don't include features/i386/x32*.c.
6504 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6506 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6507 and i386/x32-avx-avx512.
6508 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6510 * features/i386/x32-avx-avx512.c: Removed.
6511 * features/i386/x32-avx-avx512.xml: Removed.
6512 * features/i386/x32-avx.c: Removed.
6513 * features/i386/x32-avx.xml: Removed.
6514 * features/i386/x32.c: Removed.
6515 * features/i386/x32.xml: Removed.
6516 * regformats/i386/x32-avx-avx512.dat: Removed.
6517 * regformats/i386/x32-avx.dat: Removed.
6518 * regformats/i386/x32.dat: Removed.
6520 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6522 PR breakpoints/21886
6523 * mem-break.c (default_memory_insert_breakpoint): Use
6524 `->placed_address' rather than `->reqstd_address' for the
6525 breakpoint location.
6527 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6529 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6532 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6534 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6535 a union of `tdep_info', `tdesc_data' and `id'.
6536 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6537 rather than `info.tdep_info'.
6538 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6539 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6540 * i386-tdep.c (i386_gdbarch_init): Likewise.
6541 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6542 * mips-tdep.c (mips_gdbarch_init): Likewise.
6543 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6544 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6545 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6547 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6549 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6550 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6552 * spu-tdep.c (spu_gdbarch_init): Likewise.
6553 * gdbarch.h: Regenerate.
6555 2017-08-07 Leszek Swirski <leszeks@google.com>
6558 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6560 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6562 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6563 (gdbsim_open): Rename gdb_argv args object to argv.
6565 2017-08-05 Tom Tromey <tom@tromey.com>
6567 * compile/compile-object-load.c (compile_object_load): Use
6568 gdb::unique_xmalloc_ptr.
6569 * cli/cli-dump.c (scan_filename): Rename from
6570 scan_filename_with_cleanup. Change return type.
6571 (scan_expression): Rename from scan_expression_with_cleanup.
6573 (dump_memory_to_file, dump_value_to_file, restore_command):
6574 Use gdb::unique_xmalloc_ptr. Update.
6575 * cli/cli-cmds.c (find_and_open_script): Use
6576 gdb::unique_xmalloc_ptr.
6577 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6578 * symmisc.c (maintenance_print_symbols)
6579 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6580 * symfile.c (symfile_bfd_open, generic_load)
6581 (add_symbol_file_command, remove_symbol_file_command): Use
6582 gdb::unique_xmalloc_ptr.
6583 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6584 * psymtab.c (maintenance_print_psymbols): Use
6585 gdb::unique_xmalloc_ptr.
6586 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6587 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6588 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6589 (reload_shared_libraries_1): Likewise.
6591 2017-08-05 Tom Tromey <tom@tromey.com>
6593 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6594 (rust_op_vector, rust_set_vector): New typedefs.
6595 (current_parser): New global.
6596 (work_obstack): Change to pointer type. Update all users.
6597 (rust_ast, pstate): Remove globals.
6598 (struct rust_parser): New.
6599 (%union) <params, field_inits>: Change type.
6600 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6601 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6602 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6603 (convert_params_to_types, convert_params_to_expression): Change
6605 (ast_string): Change type of "fields".
6606 (rust_parse): Make a rust_parser. Remove cleanups.
6607 (rust_lex_tests): Make and install an auto_obstack.
6609 2017-08-04 Yao Qi <yao.qi@linaro.org>
6611 * configure.srv (ipa_x32_linux_regobj): New.
6612 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6613 instead of X86_TDESC_AVX512.
6614 (initialize_low_tracepoint): Call
6615 init_registers_x32_avx_avx512_linux.
6617 2017-08-04 Yao Qi <yao.qi@linaro.org>
6619 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6621 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6623 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6625 2017-08-03 Tom Tromey <tom@tromey.com>
6627 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6629 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6631 2017-08-03 Tom Tromey <tom@tromey.com>
6633 * python/py-param.c (compute_enum_values): Use gdb_argv.
6635 2017-08-03 Tom Tromey <tom@tromey.com>
6637 * utils.h (struct gdb_argv_deleter): New.
6638 (gdb_argv): New class.
6639 * utils.c (gdb_argv::reset): New method.
6640 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6641 * tracefile.c (tsave_command): Use gdb_argv.
6642 * top.c (new_ui_command): Use gdb_argv.
6643 * symmisc.c (maintenance_print_symbols)
6644 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6645 * symfile.c (symbol_file_command, generic_load)
6646 (remove_symbol_file_command): Use gdb_argv.
6647 * stack.c (backtrace_command): Use gdb_argv.
6648 * source.c (add_path, show_substitute_path_command)
6649 (unset_substitute_path_command, set_substitute_path_command):
6651 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6652 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6653 * remote.c (extended_remote_run, remote_put_command)
6654 (remote_get_command, remote_delete_command): Use gdb_argv.
6655 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6656 (gdbsim_open): Use gdb_argv.
6657 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6658 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6659 * procfs.c (procfs_info_proc): Use gdb_argv.
6660 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6661 * infrun.c (handle_command): Use gdb_argv.
6662 * inferior.c (add_inferior_command, clone_inferior_command):
6664 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6665 * exec.c (exec_file_command): Use gdb_argv.
6666 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6667 * compile/compile.c (build_argc_argv): Use gdb_argv.
6669 2017-08-03 Tom Tromey <tom@tromey.com>
6671 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6673 2017-08-03 Tom Tromey <tom@tromey.com>
6675 * python/python.c (compute_python_string): Return std::string.
6676 (gdbpy_eval_from_control_command): Update.
6677 (do_start_initialization): Use std::string.
6678 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6680 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6683 2017-08-03 Tom Tromey <tom@tromey.com>
6685 * top.h (do_restore_instream_cleanup): Remove.
6686 * top.c (do_restore_instream_cleanup): Remove.
6687 (read_command_file): Use scoped_restore.
6688 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6690 2017-08-03 Tom Tromey <tom@tromey.com>
6692 * cli/cli-script.c (execute_user_command)
6693 (execute_control_command): Use scoped_restore.
6695 2017-08-03 Tom Tromey <tom@tromey.com>
6697 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6698 (execute_user_command): Remove user_call_depth; use
6699 user_args_stack's size instead.
6701 2017-08-03 Tom Tromey <tom@tromey.com>
6703 * top.h (in_user_command): Remove.
6704 * top.c (in_user_command): Remove.
6705 * cli/cli-script.c (do_restore_user_call_depth)
6706 (execute_user_command): Update.
6708 2017-08-03 Tom Tromey <tom@tromey.com>
6710 * valops.c (search_struct_method): Use gdb::byte_vector.
6711 * valarith.c (value_concat): Use std::vector.
6712 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6713 (simple_search_memory): Likewise.
6714 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6715 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6716 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6717 * elfread.c (elf_rel_plt_read): Use std::string.
6718 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6719 * cli/cli-dump.c (restore_section_callback): Use
6722 2017-08-03 Tom Tromey <tom@tromey.com>
6724 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6726 2017-08-03 Tom Tromey <tom@tromey.com>
6728 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6729 (tui_register_format): Use scoped_restore.
6731 2017-08-03 Tom Tromey <tom@tromey.com>
6733 * reverse.c (exec_direction_default): Remove.
6734 (exec_reverse_once): Use scoped_restore.
6735 * remote.c (restore_remote_timeout): Remove.
6736 (remote_flash_erase, remote_flash_write, remote_flash_done)
6737 (readchar, remote_serial_write): Use scoped_restore.
6738 * cli/cli-script.c (struct source_cleanup_lines_args)
6739 (source_cleanup_lines): Remove.
6740 (script_from_file): Use scoped_restore.
6741 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6742 (source_command): Use scoped_restore.
6744 2017-08-03 Tom Tromey <tom@tromey.com>
6746 * utils.h (make_cleanup_free_so): Remove.
6747 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6748 * solist.h (struct so_deleter): New.
6749 (so_list_up): New typedef.
6750 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6752 2017-08-03 Tom Tromey <tom@tromey.com>
6754 * utils.h (make_cleanup_restore_current_language): Remove.
6755 * utils.c (do_restore_current_language)
6756 (make_cleanup_restore_current_language): Remove.
6757 * parse.c (parse_exp_in_context_1)
6758 (parse_expression_with_language): Use
6759 scoped_restore_current_language.
6760 * mi/mi-main.c (mi_cmd_execute): Use
6761 scoped_restore_current_language.
6762 * language.h (scoped_restore_current_language): New class.
6764 2017-08-03 Tom Tromey <tom@tromey.com>
6766 * compile/compile.c (cleanup_unlink_file): Remove.
6767 (compile_to_object): Use gdb::unlinker.
6768 (eval_compile_command): Likewise.
6770 2017-08-03 Tom Tromey <tom@tromey.com>
6772 * utils.h (make_cleanup_fclose): Remove.
6773 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6775 2017-08-03 Tom Tromey <tom@tromey.com>
6777 * top.c (open_terminal_stream): Return gdb_file_up.
6778 (new_ui_command): Update.
6780 2017-08-03 Tom Tromey <tom@tromey.com>
6782 * source.c (print_source_lines_base, forward_search_command)
6783 (reverse_search_command): Use gdb_file_up.
6785 2017-08-03 Tom Tromey <tom@tromey.com>
6787 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6789 2017-08-03 Tom Tromey <tom@tromey.com>
6791 * cli/cli-cmds.c (find_and_open_script): Change return type.
6792 Remove "streamp" and "full_path" parameters.
6793 (source_script_with_search): Update.
6794 * auto-load.c (source_script_file): Update.
6795 * cli/cli-cmds.h (find_and_open_script): Change type.
6796 (open_script): New struct.
6798 2017-08-03 Tom Tromey <tom@tromey.com>
6800 * xml-support.c (xml_fetch_content_from_file): Update.
6801 * ui-file.c (stdio_file::open): Update.
6802 * tracefile-tfile.c (tfile_start): Update.
6803 * remote.c (remote_file_put, remote_file_get): Update.
6804 * nat/linux-procfs.c (linux_proc_get_int)
6805 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6806 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6807 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6808 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6809 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6810 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6811 * linux-nat.c (linux_proc_pending_signals): Update.
6812 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6813 (file_closer): Remove.
6814 * compile/compile.c (compile_to_object): Update.
6815 * common/filestuff.h (struct gdb_file_deleter): New.
6816 (gdb_file_up): New typedef.
6817 (gdb_fopen_cloexec): Change return type.
6818 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6819 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6820 (dump_binary_file, restore_binary_file): Update.
6821 * auto-load.c (auto_load_objfile_script_1): Update.
6823 2017-08-03 Tom Tromey <tom@tromey.com>
6825 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6826 (info_static_tracepoint_markers_command): Likewise.
6827 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6828 * skip.c (skip_info): Use ui_out_emit_table.
6829 * progspace.c (print_program_space): Use ui_out_emit_table.
6830 * osdata.c (info_osdata): Use ui_out_emit_table.
6831 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6833 * linux-thread-db.c (info_auto_load_libthread_db): Use
6835 * inferior.c (print_inferior): Use ui_out_emit_table.
6836 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6837 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6838 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6839 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6840 * ui-out.h (class ui_out_emit_table): New.
6842 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6844 * mips-tdep.c (mips_fpu_type_str): New function.
6845 (mips_dump_tdep): Call it.
6847 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6849 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6852 2017-07-31 Xavier Roirand <roirand@adacore.com>
6854 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6856 2017-07-27 Xavier Roirand <roirand@adacore.com>
6858 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6860 2017-07-26 Yao Qi <yao.qi@linaro.org>
6862 * cli/cli-cmds.c (maintenancechecklist): New variable.
6863 * gdbcmd.h (maintenancechecklist): Declare it.
6864 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6865 Call i386_linux_read_description with different masks.
6866 * maint.c (maintenance_check_command): New function.
6867 (_initialize_maint_cmds): Call add_prefix_cmd.
6868 * target-descriptions.c (tdesc_reg): override operator != and ==.
6869 (tdesc_type): Likewise.
6870 (tdesc_feature): Likewise.
6871 (target_desc): Likewise.
6872 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6873 (maintenance_check_xml_descriptions): New function.
6874 (_initialize_target_descriptions) Add command "xml-descriptions".
6875 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6877 2017-07-26 Yao Qi <yao.qi@linaro.org>
6879 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6880 Include features/i386/32bit-*.c.
6881 (i386_linux_read_description): Generate target description if it
6883 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6885 * features/i386/32bit-linux.c: Re-generated.
6886 * features/i386/32bit-sse.c: Likewise.
6887 * target-descriptions.c (print_c_feature::visit): Print code to
6888 set register number if needed.
6889 (print_c_feature) <m_next_regnum>: New field.
6891 2017-07-26 Yao Qi <yao.qi@linaro.org>
6893 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6894 (FEATURE_XMLFILES): New.
6895 (FEATURE_CFILES): New.
6897 (clean-cfiles): Remove generated c files.
6898 * features/i386/32bit-avx.c: Generated.
6899 * features/i386/32bit-avx512.c: Generated.
6900 * features/i386/32bit-core.c: Generated.
6901 * features/i386/32bit-linux.c: Generated.
6902 * features/i386/32bit-mpx.c: Generated.
6903 * features/i386/32bit-pkeys.c: Generated.
6904 * features/i386/32bit-sse.c: Generated.
6905 * target-descriptions.c: Include algorithm.
6906 (tdesc_element_visitor): Add method visit_end.
6907 (print_c_tdesc): Implement visit_end.
6908 (print_c_tdesc:: m_filename_after_features): Move it to
6910 (print_c_feature): New class.
6911 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6912 name starts with "i386/32bit-".
6914 2017-07-26 Yao Qi <yao.qi@linaro.org>
6916 * target-descriptions.c (tdesc_element_visitor): New class.
6917 (tdesc_element): New class.
6918 (tdesc_reg): Inherit from tdesc_element.
6919 (tdesc_reg::accept): New function.
6920 (tdesc_type): Inherit from tdesc_element.
6921 (tdesc_type::accept): New function.
6922 (tdesc_feature): Inherit from tdesc_element.
6923 (tdesc_feature::accept): New function.
6924 (target_desc): Inherit from tdesc_element.
6925 (target_desc::target_desc): New.
6926 (target_desc::~target_desc): New.
6927 (target_desc::accept): New.
6928 (allocate_target_description): Use new.
6929 (free_target_description): Use delete.
6930 (print_c_tdesc): New class.
6931 (maint_print_c_tdesc_cmd): Adjust.
6933 * features/aarch64.c: Re-generated.
6934 * features/arc-arcompact.c: Re-generated.
6935 * features/arc-v2.c: Re-generated.
6936 * features/arm/arm-with-iwmmxt.c: Re-generated.
6937 * features/arm/arm-with-m.c: Re-generated.
6938 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6939 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6940 * features/arm/arm-with-neon.c: Re-generated.
6941 * features/arm/arm-with-vfpv2.c: Re-generated.
6942 * features/arm/arm-with-vfpv3.c: Re-generated.
6943 * features/i386/amd64-avx-avx512.c: Re-generated.
6944 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6945 * features/i386/amd64-avx.c: Re-generated.
6946 * features/i386/amd64-avx-linux.c: Re-generated.
6947 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6948 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6949 * features/i386/amd64-avx-mpx.c: Re-generated.
6950 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6951 * features/i386/amd64.c: Re-generated.
6952 * features/i386/amd64-linux.c: Re-generated.
6953 * features/i386/amd64-mpx.c: Re-generated.
6954 * features/i386/amd64-mpx-linux.c: Re-generated.
6955 * features/i386/i386-avx-avx512.c: Re-generated.
6956 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6957 * features/i386/i386-avx.c: Re-generated.
6958 * features/i386/i386-avx-linux.c: Re-generated.
6959 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6960 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6961 * features/i386/i386-avx-mpx.c: Re-generated.
6962 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6963 * features/i386/i386.c: Re-generated.
6964 * features/i386/i386-linux.c: Re-generated.
6965 * features/i386/i386-mmx.c: Re-generated.
6966 * features/i386/i386-mmx-linux.c: Re-generated.
6967 * features/i386/i386-mpx.c: Re-generated.
6968 * features/i386/i386-mpx-linux.c: Re-generated.
6969 * features/i386/x32-avx-avx512.c: Re-generated.
6970 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6971 * features/i386/x32-avx.c: Re-generated.
6972 * features/i386/x32-avx-linux.c: Re-generated.
6973 * features/i386/x32.c: Re-generated.
6974 * features/i386/x32-linux.c: Re-generated.
6975 * features/microblaze.c: Re-generated.
6976 * features/microblaze-with-stack-protect.c: Re-generated.
6977 * features/mips64-dsp-linux.c: Re-generated.
6978 * features/mips64-linux.c: Re-generated.
6979 * features/mips-dsp-linux.c: Re-generated.
6980 * features/mips-linux.c: Re-generated.
6981 * features/nds32.c: Re-generated.
6982 * features/nios2.c: Re-generated.
6983 * features/nios2-linux.c: Re-generated.
6984 * features/rs6000/powerpc-32.c: Re-generated.
6985 * features/rs6000/powerpc-32l.c: Re-generated.
6986 * features/rs6000/powerpc-403.c: Re-generated.
6987 * features/rs6000/powerpc-403gc.c : Re-generated.
6988 * features/rs6000/powerpc-405.c: Re-generated.
6989 * features/rs6000/powerpc-505.c: Re-generated.
6990 * features/rs6000/powerpc-601.c: Re-generated.
6991 * features/rs6000/powerpc-602.c: Re-generated.
6992 * features/rs6000/powerpc-603.c: Re-generated.
6993 * features/rs6000/powerpc-604.c: Re-generated.
6994 * features/rs6000/powerpc-64.c: Re-generated.
6995 * features/rs6000/powerpc-64l.c: Re-generated.
6996 * features/rs6000/powerpc-7400.c: Re-generated.
6997 * features/rs6000/powerpc-750.c: Re-generated.
6998 * features/rs6000/powerpc-860.c: Re-generated.
6999 * features/rs6000/powerpc-altivec32.c: Re-generated.
7000 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7001 * features/rs6000/powerpc-altivec64.c: Re-generated.
7002 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7003 * features/rs6000/powerpc-cell32l.c: Re-generated.
7004 * features/rs6000/powerpc-cell64l.c: Re-generated.
7005 * features/rs6000/powerpc-e500.c: Re-generated.
7006 * features/rs6000/powerpc-e500l.c: Re-generated.
7007 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7008 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7009 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7010 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7011 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7012 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7013 * features/rs6000/powerpc-vsx32.c: Re-generated.
7014 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7015 * features/rs6000/powerpc-vsx64.c: Re-generated.
7016 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7017 * features/rs6000/rs6000.c: Re-generated.
7018 * features/s390-linux32.c: Re-generated.
7019 * features/s390-linux32v1.c: Re-generated.
7020 * features/s390-linux32v2.c: Re-generated.
7021 * features/s390-linux64.c: Re-generated.
7022 * features/s390-linux64v1.c: Re-generated.
7023 * features/s390-linux64v2.c: Re-generated.
7024 * features/s390-te-linux64.c: Re-generated.
7025 * features/s390-tevx-linux64.c: Re-generated.
7026 * features/s390-vx-linux64.c: Re-generated.
7027 * features/s390x-linux64.c: Re-generated.
7028 * features/s390x-linux64v1.c: Re-generated.
7029 * features/s390x-linux64v2.c: Re-generated.
7030 * features/s390x-te-linux64.c: Re-generated.
7031 * features/s390x-tevx-linux64.c: Re-generated.
7032 * features/s390x-vx-linux64.c: Re-generated.
7033 * features/sparc/sparc32-solaris.c: Re-generated.
7034 * features/sparc/sparc64-solaris.c: Re-generated.
7035 * features/tic6x-c62x.c: Re-generated.
7036 * features/tic6x-c62x-linux.c: Re-generated.
7037 * features/tic6x-c64x.c: Re-generated.
7038 * features/tic6x-c64x-linux.c: Re-generated.
7039 * features/tic6x-c64xp.c: Re-generated.
7040 * features/tic6x-c64xp-linux.c: Re-generated.
7042 2017-07-26 Yao Qi <yao.qi@linaro.org>
7044 * i386-linux-tdep.c (i386_linux_read_description): New function.
7045 (i386_linux_core_read_description): Call
7046 i386_linux_read_description.
7047 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7048 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7049 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7050 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7051 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7052 * x86-linux-nat.c (x86_linux_read_description): Call
7053 i386_linux_read_description.
7055 2017-07-26 Yao Qi <yao.qi@linaro.org>
7058 * features/Makefile (%.c: %.xml): Pass the xml file name to
7059 command "maint print c-tdesc".
7060 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7063 2017-07-26 Yao Qi <yao.qi@linaro.org>
7065 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7066 in-class initialization.
7067 (tdesc_create_feature): Call new instead of XCNEW.
7068 (free_target_description): Ue delete.
7070 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7072 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7074 2017-07-25 Yao Qi <yao.qi@linaro.org>
7076 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7078 (amd64_x32_init_abi): Likewise.
7079 * amd64-tdep.h (amd64_init_abi): Update declaration.
7080 (amd64_x32_init_abi): Likewise.
7082 2017-07-25 Yao Qi <yao.qi@linaro.org>
7085 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7086 condition for FPSCR.
7087 (arm_linux_store_inferior_registers): Likewise.
7089 2017-07-22 Tom Tromey <tom@tromey.com>
7091 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7092 <syscalls_counts>: Now a std::vector.
7093 (get_catch_syscall_inferior_data): Use "new".
7094 (catch_syscall_inferior_data_cleanup): Use "delete".
7095 (insert_catch_syscall, remove_catch_syscall)
7096 (clear_syscall_counts): Update.
7098 2017-07-22 Tom Tromey <tom@tromey.com>
7100 * break-catch-syscall.c (syscall_catchpoint)
7101 <syscalls_to_be_caught>: Now a std::vector<int>
7102 (~syscall_catchpoint): Remove.
7103 (insert_catch_syscall, remove_catch_syscall)
7104 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7105 (print_mention_catch_syscall, print_recreate_catch_syscall):
7107 (create_syscall_event_catchpoint): Change type of "filter"
7109 (catch_syscall_split_args): Return a std::vector.
7110 (catch_syscall_command_1, catching_syscall_number_1): Update.
7112 2017-07-22 Tom Tromey <tom@tromey.com>
7114 * break-catch-throw.c (struct exception_catchpoint)
7115 <exception_rx>: Now a std::string.
7116 (~exception_catchpoint): Remove.
7117 (print_one_detail_exception_catchpoint): Update.
7118 (handle_gnu_v3_exceptions): Change type of except_rx.
7119 (extract_exception_regexp): Return a std::string.
7120 (catch_exception_command_1): Update.
7122 2017-07-22 Tom Tromey <tom@tromey.com>
7124 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7125 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7127 <catch_all>: Now a bool.
7128 (~signal_catchpoint): Remove.
7129 (signal_catchpoint_insert_location)
7130 (signal_catchpoint_remove_location)
7131 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7132 (signal_catchpoint_print_mention)
7133 (signal_catchpoint_print_recreate)
7134 (signal_catchpoint_explains_signal): Update.
7135 (create_signal_catchpoint): Change type of "filter" and
7137 (catch_signal_split_args): Return a std::vector. Change type of
7139 (catch_signal_command): Update.
7141 2017-07-20 Pedro Alves <palves@redhat.com>
7143 * ada-lang.c (ada_language_defn): Make extern.
7144 (_initialize_ada_language): Remove add_language call.
7145 * c-lang.c (c_language_defn, cplus_language_defn)
7146 (asm_language_defn, minimal_language_defn): Make extern.
7147 (_initialize_c_language): Delete.
7148 * completer.c (compare_cstrings): Delete, moved to utils.h.
7149 * d-lang.c (d_language_defn): Make extern.
7150 (_initialize_d_language): Remove add_language calls.
7151 * defs.h (enum language): Add comment.
7152 * f-lang.c (f_language_defn): Make extern.
7153 (_initialize_f_language): Remove add_language call.
7154 * go-lang.c (go_language_defn): Make extern.
7155 (_initialize_go_language): Remove add_language call.
7156 * language.c: Include <algorithm>.
7157 (languages): Redefine as const array.
7158 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7159 (set_language_command): Handle "local". Use for-range loop.
7160 (set_language): Remove loop.
7161 (language_enum): Rewrite.
7162 (language_def, language_str): Remove loops.
7163 (add_language): Delete.
7164 (add_set_language_command): New, based on add_languages.
7165 (skip_language_trampoline): Adjust.
7166 (local_language_defn): Delete.
7167 (language_gdbarch_post_init): Adjust.
7168 (_initialize_language): Remove add_language calls. Call
7169 add_set_language_command.
7170 * language.h (add_language): Delete.
7171 (auto_language_defn)
7172 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7173 (asm_language_defn, c_language_defn, cplus_language_defn)
7174 (d_language_defn, f_language_defn, go_language_defn)
7175 (m2_language_defn, objc_language_defn, opencl_language_defn)
7176 (pascal_language_defn, rust_language_defn): Declare.
7177 * m2-lang.c (m2_language_defn): Make extern.
7178 (_initialize_m2_language): Remove add_language call.
7179 * objc-lang.c (objc_language_defn): Make extern.
7180 (_initialize_objc_language): Remove add_language call.
7181 * opencl-lang.c (opencl_language_defn): Make extern.
7182 (_initialize_opencl_language): Remove add_language call.
7183 * p-lang.c (pascal_language_defn): Make extern.
7184 (_initialize_pascal_language): Delete.
7185 * rust-lang.c (rust_language_defn): Make extern.
7186 (_initialize_rust_language): Delete.
7187 * utils.h (compare_cstrings): New static inline function.
7189 2017-07-20 Pedro Alves <palves@redhat.com>
7191 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7192 (get_var_value): Constify parameters.
7193 (get_int_var_value): Change prototype.
7194 (to_fixed_range_type): Adjust.
7195 * ada-lang.h (get_int_var_value): Change prototype.
7197 2017-07-20 Pedro Alves <palves@redhat.com>
7199 * dwarf2read.c (dw2_lookup_symbol): Use
7200 SYMBOL_MATCHES_SEARCH_NAME.
7201 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7203 2017-07-20 Pedro Alves <palves@redhat.com>
7205 * block.c (block_iter_name_step, block_iter_name_first)
7206 (block_iter_name_next): Delete.
7207 (block_lookup_symbol_primary): Adjust to use
7208 dict_iter_match_first/dict_iter_match_next.
7209 * block.h (block_iter_name_first, block_iter_name_next): Delete
7211 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7212 dict_iter_match_first/dict_iter_match_next.
7214 2017-07-20 Pedro Alves <palves@redhat.com>
7216 * cp-support.c (cp_find_first_component_aux): Add missing case for
7219 2017-07-18 David Blaikie <dblaikie@gmail.com>
7221 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7222 of dwo_cu's dwo_file.
7224 2017-07-18 Yao Qi <yao.qi@linaro.org>
7226 * remote.c (store_registers_using_G): Remove one line comment.
7228 2017-07-18 Yao Qi <yao.qi@linaro.org>
7230 * regcache.c (regcache_cpy): Simplify it.
7231 (regcache::cpy_no_passthrough): Remove it.
7232 * regcache.h (cpy_no_passthrough): Remove it.
7233 (regcache_dup, regcache_cpy): Update comments.
7235 2017-07-18 Pedro Alves <palves@redhat.com>
7237 * remote-sim.c (sim_command_completer): Adjust to work with a
7238 completion_tracker instead of a VEC.
7240 2017-07-17 Pedro Alves <palves@redhat.com>
7242 * completer.c (complete_source_filenames): New function.
7243 (complete_address_and_linespec_locations): New function.
7244 (location_completer): Use complete_address_and_linespec_locations.
7245 (completion_tracker::build_completion_result): Honor the tracker's
7246 request to suppress append.
7247 * completer.h (completion_tracker::suppress_append_ws)
7248 (completion_tracker::set_suppress_append_ws): New methods.
7249 (completion_tracker::m_suppress_append_ws): New field.
7250 (complete_source_filenames): New declaration.
7251 * linespec.c (linespec_complete_what): New.
7252 (struct ls_parser) <complete_what, completion_word,
7253 completion_quote_char, completion_quote_end, completion_tracker>:
7255 (string_find_incomplete_keyword_at_end): New.
7256 (linespec_lexer_lex_string): Record quote char. If in completion
7258 (linespec_lexer_consume_token): Advance the completion word point.
7259 (linespec_lexer_peek_token): Save/restore completion info.
7260 (save_stream_and_consume_token): New.
7261 (set_completion_after_number): New.
7262 (linespec_parse_basic): Set what to complete next depending on
7263 token. Handle function and label completions specially.
7264 (parse_linespec): Disable objc shortcut in completion mode. Set
7265 what to complete next depending on token type. Skip keyword if in
7267 (complete_linespec_component, linespec_complete): New.
7268 * linespec.h (linespec_complete): Declare.
7270 2017-07-17 Pedro Alves <palves@redhat.com>
7272 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7273 Handle 'operator<' / 'operator<<'.
7275 2017-07-17 Pedro Alves <palves@redhat.com>
7277 * completer.c (collect_explicit_location_matches): Handle
7279 (convert_explicit_location_to_linespec): New, factored out from
7281 (convert_explicit_location_to_sals): ... this.
7282 (complete_label): New.
7283 (linespec_complete_label, find_label_symbols_in_block): New.
7284 (find_label_symbols): Add completion_mode parameter and adjust to
7285 call find_label_symbols_in_block.
7286 * linespec.h (linespec_complete_label): Declare.
7288 2017-07-17 Pedro Alves <palves@redhat.com>
7290 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7291 complete_symbol_mode parameter.
7292 * cli/cli-cmds.c (complete_command): Get the completion result out
7293 of the handle_brkchars tracker if used a custom word point.
7294 * completer.c: Include "linespec.h".
7295 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7296 (advance_to_expression_complete_word_point): New.
7297 (completion_tracker::completes_to_completion_word): New.
7298 (complete_files_symbols): Pass down
7299 complete_symbol_mode::EXPRESSION.
7300 (explicit_options, probe_options): New.
7301 (collect_explicit_location_matches): Complete on the
7302 explictit_loc->foo instead of word. Use
7303 linespec_complete_function. Handle MATCH_LINE. Handle offering
7304 keyword and options completions.
7305 (backup_text_ptr): Delete.
7306 (skip_keyword): New.
7307 (complete_explicit_location): Remove 'word' parameter. Add
7308 language, quoted_arg_start and quoted_arg_end parameters.
7309 Rewrite, parsing left to right.
7310 (location_completer): Rewrite.
7311 (location_completer_handle_brkchars): New function.
7312 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7313 (enum complete_line_internal_reason): Adjust comments.
7314 (completion_tracker::discard_completions): New.
7315 (completer_handle_brkchars_func_for_completer): Handle
7317 (gdb_custom_word_point_brkchars)
7318 (gdb_org_rl_basic_quote_characters): New.
7319 (gdb_completion_word_break_characters_throw)
7320 (completion_find_completion_word): Handle trackers that use a
7322 (completion_tracker::advance_custom_word_point_by): New.
7323 (completion_tracker::build_completion_result): Don't rely on
7324 readline appending the quote char.
7325 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7326 use a custom word point.
7327 (gdb_rl_attempted_completion_function): Restore
7328 rl_basic_quote_characters.
7329 * completer.h (class completion_tracker): Extend intro comment.
7330 (completion_tracker::set_quote_char)
7331 (completion_tracker::quote_char)
7332 (completion_tracker::set_use_custom_word_point)
7333 (completion_tracker::use_custom_word_point)
7334 (completion_tracker::custom_word_point)
7335 (completion_tracker::set_custom_word_point)
7336 (completion_tracker::advance_custom_word_point_by)
7337 (completion_tracker::completes_to_completion_word)
7338 (completion_tracker::discard_completions): New methods.
7339 (completion_tracker::m_quote_char)
7340 (completion_tracker::m_use_custom_word_point)
7341 (completion_tracker::m_custom_word_point): New fields.
7342 (advance_to_expression_complete_word_point): Declare.
7343 * f-lang.c (f_collect_symbol_completion_matches): Add
7344 complete_symbol_mode parameter.
7345 * language.h (struct language_defn)
7346 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7348 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7349 (linespec_complete_function): New function.
7350 (linespec_lexer_lex_keyword): Adjust.
7351 * linespec.h (linespec_keywords, linespec_complete_function): New
7353 * location.c (find_end_quote): New function.
7354 (explicit_location_lex_one): Add explicit_completion_info
7355 parameter. Save quoting info. Don't throw if being called for
7356 completion. Don't handle Ada operators here.
7357 (is_cp_operator, skip_op_false_positives, first_of)
7358 (explicit_location_lex_one_function): New function.
7359 (string_to_explicit_location): Replace 'dont_throw' parameter with
7360 an explicit_completion_info pointer parameter. Handle it. Don't
7361 use explicit_location_lex_one to lex function names. Use
7362 explicit_location_lex_one_function instead.
7363 * location.h (struct explicit_completion_info): New.
7364 (string_to_explicit_location): Replace 'dont_throw' parameter with
7365 an explicit_completion_info pointer parameter.
7366 * symtab.c (default_collect_symbol_completion_matches_break_on):
7367 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7368 (default_collect_symbol_completion_matches)
7369 (collect_symbol_completion_matches): Add complete_symbol_mode
7371 (collect_symbol_completion_matches_type): Pass down
7372 complete_symbol_mode::EXPRESSION.
7373 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7374 parameter. Handle LINESPEC mode.
7375 * symtab.h (complete_symbol_mode): New.
7376 (default_collect_symbol_completion_matches_break_on)
7377 (default_collect_symbol_completion_matches)
7378 (collect_symbol_completion_matches)
7379 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7382 2017-07-17 Pedro Alves <palves@redhat.com>
7384 * utils.c (enum class strncmp_iw_mode): New.
7385 (strcmp_iw): Rename to ...
7386 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7387 parameters. Handle them.
7389 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7390 * utils.h (strncmp_iw): Declare.
7391 (strcmp_iw): Move describing comments here.
7393 2017-07-17 Pedro Alves <palves@redhat.com>
7395 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7397 * c-typeprint.c (is_type_conversion_operator): Use
7399 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7400 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7402 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7403 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7404 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7405 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7407 * location.c: Include "cp-support.h".
7408 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7410 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7413 2017-07-17 Pedro Alves <palves@redhat.com>
7415 * cli/cli-cmds.c (complete_command): Use a completion tracker
7416 along with completion_find_completion_word for handle_brkchars
7418 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7419 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7420 (struct gdb_rl_completion_word_info): New.
7421 (gdb_rl_find_completion_word): New.
7422 (completion_find_completion_word): New.
7423 * completer.h (completion_find_completion_word): Declare.
7425 2017-07-17 Pedro Alves <palves@redhat.com>
7427 * ada-lang.c (symbol_completion_match): Adjust comments.
7428 (symbol_completion_add): Replace vector parameter with
7429 completion_tracker parameter. Use it.
7430 (ada_make_symbol_completion_list): Rename to...
7431 (ada_collect_symbol_completion_matches): ... this. Add
7432 completion_tracker parameter and use it.
7433 (ada_language_defn): Adjust.
7434 * break-catch-syscall.c (catch_syscall_completer): Adjust
7435 prototype and work with completion_tracker instead of VEC.
7436 * breakpoint.c (condition_completer): Adjust prototype and work
7437 with completion_tracker instead of VEC.
7438 * c-lang.c (c_language_defn, cplus_language_defn)
7439 (asm_language_defn, minimal_language_defn): Adjust to renames.
7440 * cli/cli-cmds.c (complete_command): Rework using
7441 completion_tracker. Catch exceptions when completing.
7442 * cli/cli-decode.c (integer_unlimited_completer)
7443 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7444 with completion_tracker instead of VEC.
7445 * command.h (struct completion_tracker): Forward declare.
7446 (completer_ftype, completer_handle_brkchars_ftype): Change
7448 (complete_on_cmdlist, complete_on_enum): Adjust.
7449 * completer.c: Include <algorithm>.
7450 (struct gdb_completer_state): New.
7451 (current_completion): New global.
7452 (readline_line_completion_function): Delete.
7453 (noop_completer, filename_completer)
7454 (filename_completer_handle_brkchars, complete_files_symbols)
7455 (linespec_location_completer): Adjust to work with a
7456 completion_tracker instead of a VEC.
7457 (string_or_empty): New.
7458 (collect_explicit_location_matches): Adjust to work with a
7459 completion_tracker instead of a VEC.
7460 (explicit_location_completer): Rename to ...
7461 (complete_explicit_location): ... this and adjust to work with a
7462 completion_tracker instead of a VEC.
7463 (location_completer): Adjust to work with a completion_tracker
7465 (add_struct_fields): Adjust to work with a completion_list instead
7467 (expression_completer): Rename to ...
7468 (complete_expression): ... this and adjust to work with a
7469 completion_tracker instead of a VEC. Use complete_files_symbols.
7470 (expression_completer): Reimplement on top of complete_expression.
7471 (symbol_completer): Adjust to work with a completion_tracker
7473 (enum complete_line_internal_reason): Add describing comments.
7474 (complete_line_internal_normal_command): Adjust to work with a
7475 completion_tracker instead of a VEC.
7476 (complete_line_internal): Rename to ...
7477 (complete_line_internal_1): ... this and adjust to work with a
7478 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7479 handle_brkchars phase.
7480 (new_completion_tracker): Delete.
7481 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7482 complete_line_internal_1.
7483 (free_completion_tracker): Delete.
7484 (INITIAL_COMPLETION_HTAB_SIZE): New.
7485 (completion_tracker::completion_tracker)
7486 (completion_tracker::~completion_tracker): New.
7487 (maybe_add_completion): Delete.
7488 (completion_tracker::maybe_add_completion)
7489 (completion_tracker::add_completion)
7490 (completion_tracker::add_completions): New.
7491 (throw_max_completions_reached_error): Delete.
7492 (complete_line): Adjust to work with a completion_tracker instead
7493 of a VEC. Don't create a completion_tracker_t or check for max
7495 (command_completer, command_completer_handle_brkchars)
7496 (signal_completer, reg_or_group_completer_1)
7497 (reg_or_group_completer, default_completer_handle_brkchars):
7498 Adjust to work with a completion_tracker.
7499 (gdb_completion_word_break_characters_throw): New.
7500 (gdb_completion_word_break_characters): Reimplement.
7501 (line_completion_function): Delete.
7502 (completion_tracker::recompute_lowest_common_denominator)
7503 (expand_preserving_ws)
7504 (completion_tracker::build_completion_result)
7505 (completion_result::completion_result)
7506 (completion_result::completion_result)
7507 (completion_result::~completion_result)
7508 (completion_result::completion_result)
7509 (completion_result::release_match_list, compare_cstrings)
7510 (completion_result::sort_match_list)
7511 (completion_result::reset_match_list)
7512 (gdb_rl_attempted_completion_function_throw)
7513 (gdb_rl_attempted_completion_function): New.
7514 * completer.h (completion_list, struct completion_result)
7515 (class completion_tracker): New.
7516 (complete_line): Add completion_tracker parameter.
7517 (readline_line_completion_function): Delete.
7518 (gdb_rl_attempted_completion_function): New.
7519 (noop_completer, filename_completer, expression_completer)
7520 (location_completer, symbol_completer, command_completer)
7521 (signal_completer, reg_or_group_completer): Update prototypes.
7522 (completion_tracker_t, new_completion_tracker)
7523 (make_cleanup_free_completion_tracker): Delete.
7524 (enum maybe_add_completion_enum): Delete.
7525 (maybe_add_completion): Delete.
7526 (throw_max_completions_reached_error): Delete.
7527 * corefile.c (complete_set_gnutarget): Adjust to work with a
7528 completion_tracker instead of a VEC.
7529 * cp-abi.c (cp_abi_completer): Adjust to work with a
7530 completion_tracker instead of a VEC.
7531 * d-lang.c (d_language_defn): Adjust.
7532 * disasm.c (disassembler_options_completer): Adjust to work with a
7533 completion_tracker instead of a VEC.
7534 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7535 (f_collect_symbol_completion_matches): ... this. Adjust to work
7536 with a completion_tracker instead of a VEC.
7537 (f_language_defn): Adjust.
7538 * go-lang.c (go_language_defn): Adjust.
7539 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7540 Adjust to work with a completion_tracker instead of a VEC.
7541 * infrun.c (handle_completer): Likewise.
7542 * interps.c (interpreter_completer): Likewise.
7543 * interps.h (interpreter_completer): Likewise.
7544 * language.c (unknown_language_defn, auto_language_defn)
7545 (local_language_defn): Adjust.
7546 * language.h (language_defn::la_make_symbol_completion_list):
7548 (language_defn::la_collect_symbol_completion_matches): ... this
7549 and adjust to work with a completion_tracker instead of a VEC.
7550 * m2-lang.c (m2_language_defn): Adjust.
7551 * objc-lang.c (objc_language_defn): Adjust.
7552 * opencl-lang.c (opencl_language_defn): Adjust.
7553 * p-lang.c (pascal_language_defn): Adjust.
7554 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7555 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7556 with a completion_tracker.
7557 * rust-lang.c (rust_language_defn): Adjust.
7558 * symtab.c (free_completion_list, do_free_completion_list)
7559 (return_val, completion_tracker): Delete.
7560 (completion_list_add_name, completion_list_add_symbol)
7561 (completion_list_add_msymbol, completion_list_objc_symbol)
7562 (completion_list_add_fields, add_symtab_completions): Add
7563 completion_tracker parameter and use it.
7564 (default_make_symbol_completion_list_break_on_1): Rename to...
7565 (default_collect_symbol_completion_matches_break_on): ... this.
7566 Add completion_tracker parameter and use it instead of allocating
7567 a completion tracker here.
7568 (default_make_symbol_completion_list_break_on): Delete old
7570 (default_make_symbol_completion_list): Delete.
7571 (default_collect_symbol_completion_matches): New.
7572 (make_symbol_completion_list): Delete.
7573 (collect_symbol_completion_matches): New.
7574 (make_symbol_completion_type): Rename to ...
7575 (collect_symbol_completion_matches_type): ... this. Add
7576 completion_tracker parameter and use it instead of VEC.
7577 (make_file_symbol_completion_list_1): Rename to...
7578 (collect_file_symbol_completion_matches): ... this. Add
7579 completion_tracker parameter and use it instead of VEC.
7580 (make_file_symbol_completion_list): Delete.
7581 (add_filename_to_list): Use completion_list instead of a VEC.
7582 (add_partial_filename_data::list): Now a completion_list.
7583 (make_source_files_completion_list): Work with a completion_list
7585 * symtab.h: Include "completer.h".
7586 (default_make_symbol_completion_list_break_on)
7587 (default_make_symbol_completion_list, make_symbol_completion_list)
7588 (make_symbol_completion_type, make_file_symbol_completion_list)
7589 (make_source_files_completion_list): Delete.
7590 (default_collect_symbol_completion_matches_break_on)
7591 (default_collect_symbol_completion_matches)
7592 (collect_symbol_completion_matches)
7593 (collect_symbol_completion_matches_type)
7594 (collect_file_symbol_completion_matches)
7595 (make_source_files_completion_list): New.
7596 * top.c (init_main): Don't install a rl_completion_entry_function
7597 hook. Install a rl_attempted_completion_function hook instead.
7598 * tui/tui-layout.c (layout_completer): Adjust to work with a
7600 * tui/tui-regs.c (tui_reggroup_completer):
7601 * tui/tui-win.c (window_name_completer, focus_completer)
7602 (winheight_completer): Adjust to work with a completion_tracker.
7603 * value.c: Include "completer.h".
7604 (complete_internalvar): Adjust to work with a completion_tracker.
7605 * value.h (complete_internalvar): Likewise.
7607 2017-07-17 Pedro Alves <palves@redhat.com>
7609 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7611 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7612 comments to completer_ftype's declaration.
7613 <completer_handle_brkchars>: Change type to
7614 completer_handle_brkchars_ftype.
7615 * command.h (completer_ftype): Add describing comment and give
7616 names to parameters.
7617 (completer_ftype_void): Rename to ...
7618 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7619 (set_cmd_completer_handle_brkchars): Adjust.
7620 * completer.c (filename_completer_handle_brkchars): New function.
7621 (complete_line_internal_normal_command): New function, factored
7623 (complete_line_internal): ... here.
7624 (command_completer_handle_brkchars)
7625 (default_completer_handle_brkchars)
7626 (completer_handle_brkchars_func_for_completer): New functions.
7627 * completer.h (set_gdb_completion_word_break_characters): Delete
7629 (completer_handle_brkchars_func_for_completer): New declaration.
7630 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7631 completer_handle_brkchars_func_for_completer.
7633 2017-07-17 Pedro Alves <palves@redhat.com>
7635 * completer.c (symbol_completer): New function, based on
7636 make_symbol_completion_list_fn.
7637 * completer.h (symbol_completer): New declaration.
7638 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7639 * python/py-cmd.c (completers): Adjust.
7640 * symtab.c (make_symbol_completion_list_fn): Delete.
7641 * symtab.h (make_symbol_completion_list_fn): Delete.
7642 * cli/cli-decode.c (add_cmd): Adjust.
7644 2017-07-17 Pedro Alves <palves@redhat.com>
7646 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7647 * dwarf2read.c: Include "filename-seen-cache.h".
7648 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7649 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7650 * filename-seen-cache.c: New file.
7651 * filename-seen-cache.h: New file.
7652 * symtab.c: Include "filename-seen-cache.h".
7653 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7654 (create_filename_seen_cache, clear_filename_seen_cache)
7655 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7656 to filename-seen-cache.h/filename-seen-cache.c.
7657 (output_source_filename, sources_info)
7658 (maybe_add_partial_symtab_filename)
7659 (make_source_files_completion_list): Adjust to use
7660 filename_seen_cache.
7662 2017-07-17 Pedro Alves <palves@redhat.com>
7664 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7666 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7667 dwarf2_debug_sections*)): New.
7668 (dwarf2_per_objfile::dwarf2_per_objfile(const
7669 dwarf2_per_objfile&)): Declare as deleted.
7670 (dwarf2_per_objfile::operator=): Declare as deleted.
7671 (dwarf2_per_objfile::dwarf2_per_objfile)
7672 (dwarf2_per_objfile::~dwarf2_per_objfile)
7673 (dwarf2_per_objfile::free_cached_comp_units): New.
7674 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7675 ctor. Call dwarf2_per_objfile's ctor manually.
7676 (dwarf2_locate_sections): Deleted/refactored as ...
7677 (dwarf2_per_objfile::locate_sections): ... this new method.
7678 (free_cached_comp_units): Defer to
7679 dwarf2_per_objfile::free_cached_comp_units.
7680 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7682 2017-07-14 Tom Tromey <tom@tromey.com>
7685 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7687 <UNOP_SIZEOF>: Split into separate case.
7688 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7690 2017-07-14 Tom Tromey <tom@tromey.com>
7693 * symtab.c (symbol_matches_domain): Add language_rust to special
7695 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7696 treat LOC_TYPEDEF symbols as variables.
7698 2017-07-14 Pedro Alves <palves@redhat.com>
7700 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7701 symtabs matching all symtabs with SRCFILE as file name instead of
7702 only considering the first hit, with lookup_symtab.
7704 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7706 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7707 operator_name parameters.
7708 (gen_expr): Update function call.
7710 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7712 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7714 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7716 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7717 parameter, use agent_expr::gdbarch instead, update function
7719 (locexpr_tracepoint_var_ref): Likewise.
7720 (loclist_tracepoint_var_ref): Likewise.
7721 * ax-gdb.c (gen_trace_static_fields): Likewise.
7722 (gen_traced_pop): Likewise.
7723 (gen_frame_args_address): Likewise.
7724 (gen_frame_locals_address): Likewise.
7725 (gen_var_ref): Likewise.
7726 (gen_struct_ref_recursive): Likewise.
7727 (gen_static_field): Likewise.
7728 (gen_maybe_namespace_elt): Likewise.
7729 (gen_expr): Likewise.
7730 (gen_trace_for_var): Likewise.
7731 (gen_trace_for_expr): Likewise.
7732 (gen_trace_for_return_address): Likewise.
7734 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7736 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7738 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7740 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7742 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7743 from ax, update calls.
7744 (gen_usual_arithmetic): Likewise.
7745 (gen_integral_promotions): Likewise.
7746 (gen_bitfield_ref): Likewise.
7747 (gen_primitive_field): Likewise.
7748 (gen_struct_ref_recursive): Likewise.
7749 (gen_struct_ref): Likewise.
7750 (gen_maybe_namespace_elt): Likewise.
7751 (gen_struct_elt_for_reference): Likewise.
7752 (gen_namespace_elt): Likewise.
7753 (gen_aggregate_elt_ref): Likewise.
7754 (gen_expr): Get gdbarch from ax, update calls.
7755 (gen_expr_binop_rest): Likewise.
7757 2017-07-13 Pedro Alves <palves@redhat.com>
7759 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7761 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7762 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7763 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7764 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7766 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7767 Get final tdesc from the tdep.
7768 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7770 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7771 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7772 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7773 Use it as default tdesc.
7774 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7775 down to amd_init_abi. No longer handle fallback tdesc here.
7776 * amd64-tdep.h (tdesc_x32): Declare.
7777 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7779 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7782 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7784 * s390-linux-tdep.c (s390_process_record): Add support for
7785 instructions new in arch12.
7787 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7789 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7790 PT_GETFSBASE and PT_GETGSBASE.
7791 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7794 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7796 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7797 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7798 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7800 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7801 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7802 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7803 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7804 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7805 * features/i386/amd64.xml: Add 64bit-segments.xml.
7806 * features/i386/amd64-avx-avx512.c: Regenerated.
7807 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7808 * features/i386/amd64-avx-mpx.c: Regenerated.
7809 * features/i386/amd64-avx.c: Regenerated.
7810 * features/i386/amd64-mpx.c: Regenerated.
7811 * features/i386/amd64.c: Regenerated.
7812 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7813 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7814 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7815 * regformats/i386/amd64-avx.dat: Regenerated.
7816 * regformats/i386/amd64-mpx.dat: Regenerated.
7817 * regformats/i386/amd64.dat: Regenerated.
7819 2017-07-10 Yao Qi <yao.qi@linaro.org>
7821 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7822 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7824 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7826 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7828 * gnulib/aclocal.m4: Regenerate.
7829 * gnulib/config.in: Regenerate.
7830 * gnulib/configure: Regenerate.
7831 * gnulib/import/Makefile.am: Regenerate.
7832 * gnulib/import/Makefile.in: Regenerate.
7833 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7834 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7835 * gnulib/import/m4/environ.m4: New file.
7836 * gnulib/import/m4/setenv.m4: New file.
7837 * gnulib/import/setenv.c: New file.
7838 * gnulib/import/unsetenv.c: New file.
7840 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7842 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7843 address when op is DW_OP_addr.
7845 2017-07-09 Tom Tromey <tom@tromey.com>
7847 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7848 check and apply to outer type.
7850 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7852 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7853 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7854 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7855 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7857 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7859 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7861 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7863 * corelow.c (get_core_siginfo): Remove.
7864 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7865 instead of get_core_siginfo.
7866 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7867 * gdbarch.h: Re-generate.
7868 * gdbarch.c: Re-generate.
7869 * linux-tdep.c (linux_core_xfer_siginfo): New.
7870 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7872 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7874 * corelow.c (thread_section_name): Move to ...
7875 * gdbcore.h (thread_section_name): ... here.
7877 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7879 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7880 (struct siginfo32): New.
7881 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7882 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7883 via ptrace(PT_LWPINFO).
7885 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7887 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7888 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7889 (fbsd_get_siginfo_type): New.
7890 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7891 (_initialize_fbsd_tdep): New.
7893 2017-07-06 David Blaikie <dblaikie@gmail.com>
7895 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7896 a singular dwo_unit*) to support multiple CUs in the same way that
7897 multiple TUs are supported.
7898 (create_cus_hash_table): Replace create_dwo_cu with a function for
7899 parsing multiple CUs from a DWO file.
7900 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7902 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7903 htab_find, rather than comparing the signature to a singleton CU in
7906 2017-07-06 Pedro Alves <palves@redhat.com>
7908 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7910 2017-07-04 Pedro Alves <palves@redhat.com>
7912 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7913 * gdbtypes.h (TYPE_STATIC): Delete.
7914 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7915 is_synchronized, is_native>: Delete.
7917 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7918 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7919 (TYPE_FN_FIELD_ABSTRACT): Delete.
7921 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7923 * buffer.h (buffer_finish): Fix spelling mistakes.
7925 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7927 * .dir-locals.el: Automatically switch to C-style comments in
7928 versions of Emacs that support the feature.
7930 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7931 Pedro Alves <palves@redhat.com>
7934 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7935 (process_next_line): New variable 'inline_cmd'.
7936 Adjust 'if' clauses for "python", "compile" and "guile" to use
7937 'command_name_equals' and check for '!inline_cmd'.
7939 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7942 * cli/cli-script.c (command_name_equals_not_inline): New function.
7943 (process_next_line): Adjust 'if' clauses for "python", "compile"
7944 and "guile" to use command_name_equals_not_inline.
7946 2017-06-29 Pedro Alves <palves@redhat.com>
7948 * completer.c (expression_completer): Call
7949 linespec_location_completer instead of location_completer.
7951 2017-06-29 Pedro Alves <palves@redhat.com>
7953 * completer.c (expression_completer): Remove code that recomputes
7956 2017-06-29 Yao Qi <yao.qi@linaro.org>
7958 * regformats/regdat.sh: Generate code with
7959 "ifndef IN_PROCESS_AGENT".
7961 2017-06-28 Pedro Alves <palves@redhat.com>
7963 * command.h: Include "common/scoped_restore.h".
7965 2017-06-28 Yao Qi <yao.qi@linaro.org>
7967 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7968 instead of obstack_grow.
7970 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7973 * symfile.c (reread_symbols): Call objfiles_changed just before
7976 2017-06-27 Pedro Alves <palves@redhat.com>
7978 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7979 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7980 (completion_list_add_symbol, completion_list_add_msymbol):
7981 ... these new functions.
7982 (add_symtab_completions)
7983 (default_make_symbol_completion_list_break_on_1): Adjust.
7985 2017-06-27 Pedro Alves <palves@redhat.com>
7987 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7988 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7989 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7991 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7992 'storage_obstack' field an auto_obstack. In-class initialize all
7993 non-bitfield fields. Make minsyms_read bool.
7994 * symfile.c (read_symbols): Adjust.
7996 2017-06-27 Alan Hayward <alan.hayward@arm.com>
7998 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7999 (gdbsim_store_register): Likewise.
8001 2017-06-27 Pedro Alves <palves@redhat.com>
8003 * c-exp.y (name_obstack): Now an auto_obstack.
8004 (yylex): Use auto_obstack::clear.
8005 (c_parse): Use auto_obstack::clear instead of reinitializing and
8006 freeing the obstack.
8007 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8008 * d-exp.y (name_obstack): Now an auto_obstack.
8009 (yylex): Use auto_obstack::clear.
8010 (d_parse): Use auto_obstack::clear instead of reinitializing and
8011 freeing the obstack.
8012 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8014 * dwarf2read.c (create_addrmap_from_index)
8015 (dwarf2_build_psymtabs_hard)
8016 (update_enumeration_type_from_children): Likewise.
8017 * gdb_obstack.h (auto_obstack): New type.
8018 * go-exp.y (name_obstack): Now an auto_obstack.
8019 (build_packaged_name): Use auto_obstack::clear.
8020 (go_parse): Use auto_obstack::clear instead of reinitializing and
8021 freeing the obstack.
8022 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8024 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8025 * rust-exp.y (work_obstack): Now an auto_obstack.
8026 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8027 reinitializing and freeing the obstack.
8028 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8029 (host_char_to_target): Use auto_obstack.
8030 * utils.h (make_cleanup_obstack_free): Delete declaration.
8031 * valprint.c (generic_emit_char, generic_printstr): Use
8034 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8036 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8038 (darwin_init_thread_list): Don't update dummy thread.
8039 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8041 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8043 * record-full.c (netorder16): Remove.
8045 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8047 * common/diagnostics.h: Define macros for GCC.
8048 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8049 * common/vec.h: Include diagnostics.h.
8050 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8051 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8054 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8056 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8058 * ada-lex.l: Ignore deprecated register warnings.
8060 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8062 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8063 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8065 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8067 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8070 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8072 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8074 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8076 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8077 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8078 (xtensa_register_read_masked): Likewise.
8080 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8082 * common/environ.c (gdb_environ::unset): Update comment.
8084 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8086 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8089 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8091 * record-full.c (record_full_exec_insn): Use byte_vector.
8093 2017-06-22 Yao Qi <yao.qi@linaro.org>
8095 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8096 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8098 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8100 * remote.c (cached_reg): Move from here...
8101 * regcache.h (cached_reg): ...to here.
8102 * python/py-unwind.c (struct reg_info): Remove.
8103 (cached_frame_info): Use cached_reg_t.
8104 (pyuw_prev_register): Likewise.
8105 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8106 (pyuw_dealloc_cache): Free all registers.
8108 2017-06-22 Pedro Alves <palves@redhat.com>
8109 Simon Marchi <simon.marchi@ericsson.com>
8111 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8113 * common/diagnostics.h: New file.
8115 2017-06-22 Pedro Alves <palves@redhat.com>
8117 * common/agent.h: Add include guards.
8119 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8121 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8122 talk about addressable units instead of bytes.
8124 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8126 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8127 of '::const_iterator'.
8129 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8131 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8132 'unittests/environ-selftests.c'.
8133 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8134 * charset.c (find_charset_names): Declare object 'iconv_env'.
8135 Update code to use 'iconv_env' object. Remove call to
8137 * common/environ.c: Include <utility>.
8138 (make_environ): Delete function.
8139 (free_environ): Delete function.
8140 (gdb_environ::clear): New function.
8141 (gdb_environ::operator=): New function.
8142 (gdb_environ::get): Likewise.
8143 (environ_vector): Delete function.
8144 (set_in_environ): Delete function.
8145 (gdb_environ::set): New function.
8146 (unset_in_environ): Delete function.
8147 (gdb_environ::unset): New function.
8148 (gdb_environ::envp): Likewise.
8149 * common/environ.h: Include <vector>.
8150 (struct gdb_environ): Delete; transform into...
8151 (class gdb_environ): ... this class.
8152 (free_environ): Delete prototype.
8153 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8154 environ_vector): Likewise.
8155 * infcmd.c (run_command_1): Update code to call
8156 'envp' from 'gdb_environ' class.
8157 (environment_info): Update code to call methods from 'gdb_environ'
8159 (unset_environment_command): Likewise.
8160 (path_info): Likewise.
8161 (path_command): Likewise.
8162 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8163 (inferior::inferior): Initialize 'environment' using the host's
8165 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8166 Include "environ.h".
8167 (class inferior) <environment>: Change type from 'struct
8168 gdb_environ' to 'gdb_environ'.
8169 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8170 methods from 'gdb_environ' class.
8171 * solib.c (solib_find_1): Likewise
8172 * unittests/environ-selftests.c: New file.
8174 2017-06-20 Yao Qi <yao.qi@linaro.org>
8176 * features/i386/i386-linux.xml: Exchange the order of including
8177 32bit-linux.xml and 32bit-sse.xml.
8178 * features/i386/i386-linux.c: Regenerated.
8180 2017-06-20 Yao Qi <yao.qi@linaro.org>
8182 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8183 Delete copy ctor and assignment operator.
8184 (tdesc_type): Likewise.
8185 (tdesc_feature): Likewise.
8186 (tdesc_free_reg): Remove.
8187 (tdesc_create_reg): Use new.
8188 (tdesc_free_type): Remove.
8189 (tdesc_create_vector): Use new.
8190 (tdesc_create_union): Likewise.
8191 (tdesc_create_flags): Likewise.
8192 (tdesc_create_enum): Likewise.
8193 (tdesc_free_feature): Delete.
8194 (free_target_description): Use delete.
8196 2017-06-19 John Baldwin <jhb@FreeBSD.org>
8198 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8201 2017-06-19 Pedro Alves <palves@redhat.com>
8203 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8204 after gdb::unlinker.
8206 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8208 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8209 gdb_environ to access an environment variable.
8211 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8213 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8216 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8218 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8220 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8222 * configure: Re-generate.
8223 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8225 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8227 * configure: Re-generate.
8228 * warning.m4: Pass -Werror to compiler when checking for
8229 supported warning flags.
8231 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8233 * Makefile.in (COMPILE.pre): Add "-x c++".
8235 2017-06-16 Alan Hayward <alan.hayward@arm.com>
8236 Pedro Alves <palves@redhat.com>
8237 Yao Qi <yao.qi@linaro.org>
8239 * defs.h (RequireLongest): New.
8240 (extract_integer): Declare function template.
8241 (extract_signed_integer): Remove the declaration, but define it
8243 (extract_unsigned_integer): Likewise.
8244 (store_integer): Declare function template.
8245 (store_signed_integer): Remove the declaration, but define it
8247 (store_unsigned_integer): Likewise.
8248 * findvar.c (extract_integer): New function template.
8249 (extract_signed_integer): Remove.
8250 (extract_unsigned_integer): Remove.
8251 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8253 (store_integer): New function template.
8254 (store_signed_integer): Remove.
8255 (store_unsigned_integer): Remove.
8256 (store_integer): Explicit instantiations.
8257 * regcache.c (regcache_raw_read_signed): Update.
8258 (regcache::raw_read): New function.
8259 (regcache::raw_read_signed): Remove.
8260 (regcache::raw_read_unsigned): Remove.
8261 (regcache_raw_read_unsigned): Update.
8262 (regcache_raw_write_unsigned): Update.
8263 (regcache::raw_write_signed): Remove.
8264 (regcache::raw_write): New function.
8265 (regcache_cooked_read_signed): Update.
8266 (regcache::raw_write_unsigned): Remove.
8267 (regcache::cooked_read_signed): Remove.
8268 (regcache_cooked_read_unsigned): Update.
8269 (regcache::cooked_read_unsigned): Remove.
8270 (regcache_cooked_write_signed): Update.
8271 (regcache_cooked_write_unsigned): Update.
8272 * regcache.h (regcache) <raw_read_signed>: Remove.
8273 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8274 <raw_read, raw_write>: New.
8275 <cooked_read_signed, cooked_write_signed>: Remove.
8276 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8277 <cooked_read, cooked_write>: New.
8278 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8279 (sh64_pseudo_register_write): Update.
8281 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8283 * arc-tdep.c (arc_disassembler_options): New variable.
8284 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8285 of default_print_insn.
8286 (arc_delayed_print_insn): Set info->section when needed,
8287 use default_print_insn to retrieve a disassembler.
8289 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8292 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8293 to mention $SHELL and startup-with-shell.
8295 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8297 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8299 2017-06-14 Yao Qi <yao.qi@linaro.org>
8301 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8302 default_print_insn instead of print_insn_aarch64.
8303 * arm-tdep.c (gdb_print_insn_arm): Call
8304 default_print_insn instead of print_insn_big_arm
8305 and print_insn_little_arm.
8306 * i386-tdep.c (i386_print_insn): Call default_print_insn
8307 instead of print_insn_i386.
8308 * ia64-tdep.c (ia64_print_insn): Call
8309 default_print_insn instead of print_insn_ia64.
8310 * mips-tdep.c (gdb_print_insn_mips): Call
8311 default_print_insn instead of print_insn_big_mips
8312 and print_insn_little_mips.
8313 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8314 instead of print_insn_spu.
8316 2017-06-14 Pedro Alves <palves@redhat.com>
8318 * ada-lang.c: Include "common/byte-vector.h".
8319 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8320 * charset.c (wchar_iterator::iterate): Resize the vector instead
8322 * common/byte-vector.h: Include "common/def-vector.h".
8323 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8324 * cli/cli-dump.c: Include "common/byte-vector.h".
8325 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8326 * common/byte-vector.h: New file.
8327 * common/def-vector.h: New file.
8328 * common/default-init-alloc.h: New file.
8329 * dwarf2loc.c: Include "common/byte-vector.h".
8330 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8331 instead of reserving it.
8332 * dwarf2read.c: Include "common/byte-vector.h".
8333 (data_buf::m_vec): Now a gdb::byte_vector.
8334 * gdb_regex.c: Include "common/def-vector.h".
8335 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8336 * mi/mi-main.c: Include "common/byte-vector.h".
8337 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8338 * printcmd.c: Include "common/byte-vector.h".
8339 (print_scalar_formatted): Use gdb::byte_vector.
8340 * valprint.c: Include "common/byte-vector.h".
8341 (maybe_negate_by_bytes, print_decimal_chars): Use
8344 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8346 * darwin-nat.c: Include "nat/fork-inferior.h".
8348 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8350 * configure.nat: Factor out Darwin bits that are not
8351 architecture-specific. Add fork-inferior.o.
8353 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8355 * configure.nat: Factor out AIX bits that are not
8356 architecture-specific. Add fork-inferior.o.
8358 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8360 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8361 (read_pieced_value, write_pieced_value): ...here. Reduce to
8362 wrappers that just call rw_pieced_value.
8364 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8366 * dwarf2loc.c (write_pieced_value): When writing the data for a
8367 memory piece, use write_memory_with_notification instead of
8370 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8372 * valops.c (read_value_memory): Change embedded_offset to
8373 represent a bit offset instead of a byte offset.
8374 * value.h (read_value_memory): Adjust comment.
8376 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8378 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8379 dest_offset_bits and source_offset_bits.
8380 (write_pieced_value): Likewise.
8382 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8384 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8385 given by DW_OP_bit_piece.
8386 (write_pieced_value): Likewise.
8388 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8390 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8391 some other preparations to the places where sufficient information
8393 (write_pieced_value): Likewise.
8395 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8397 * dwarf2loc.c (bits_to_bytes): New function.
8398 (read_pieced_value): Fix offset calculations for register pieces
8399 on big-endian targets.
8400 (write_pieced_value): Likewise.
8402 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8404 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8405 (write_pieced_value): Likewise.
8407 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8409 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8410 transfer the source value's least significant bits, instead of its
8411 lowest-addressed ones. Rename type_len to max_offset.
8412 (read_pieced_value): Mirror above changes to write_pieced_value as
8415 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8417 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8418 truncate full bytes from dest_offset_bits before using it as an
8419 offset into the buffer.
8421 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8423 * dwarf2loc.c (write_pieced_value): Include transfer size in
8426 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8428 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8429 calculation of this_size.
8431 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8433 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8434 when targeting a bit-field.
8435 (write_pieced_value): Likewise.
8437 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8439 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8440 (allocate_piece_closure): Drop addr_size parameter.
8441 (dwarf2_evaluate_loc_desc_full): Adjust call to
8442 allocate_piece_closure.
8444 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8447 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8448 the LSB end, independent of endianness.
8450 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8452 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8455 2017-06-13 Yao Qi <yao.qi@linaro.org>
8457 * mips-linux-nat.c: Move include features/mips*-linux.c to
8459 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8460 to mips-linux-tdep.c.
8461 * mips-linux-tdep.c: Include features/mips*-linux.c
8462 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8464 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8465 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8466 (tdesc_mips64_dsp_linux): Declare.
8468 2017-06-12 Tom Tromey <tom@tromey.com>
8470 * valprint.h (val_print_type_code_int): Remove.
8471 * valprint.c (generic_val_print_int): Always call
8472 val_print_scalar_formatted.
8473 (val_print_type_code_int): Remove.
8474 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8475 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8476 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8477 * ada-valprint.c (ada_val_print_num): Use
8478 val_print_scalar_formatted.
8480 2017-06-12 Tom Tromey <tom@tromey.com>
8482 * printcmd.c (print_scalar_formatted): Unify the two switches.
8483 Don't convert scalars to LONGEST.
8485 2017-06-12 Tom Tromey <tom@tromey.com>
8488 * valprint.h (print_decimal_chars): Update.
8489 * valprint.c (maybe_negate_by_bytes): New function.
8490 (print_decimal_chars): Add "is_signed" argument.
8491 * printcmd.c (print_scalar_formatted): Update.
8493 2017-06-12 Tom Tromey <tom@tromey.com>
8496 * valprint.h (print_binary_chars, print_hex_chars): Update.
8497 * valprint.c (val_print_type_code_int): Update.
8498 (print_binary_chars): Add "zero_pad" argument.
8499 (emit_octal_digit): New function.
8500 (print_octal_chars): Don't zero-pad.
8501 (print_decimal_chars): Likewise.
8502 (print_hex_chars): Add "zero_pad" argument.
8503 * sh64-tdep.c (sh64_do_fp_register): Update.
8504 * regcache.c (regcache::dump): Update.
8505 * printcmd.c (print_scalar_formatted): Update.
8506 * infcmd.c (default_print_one_register_info): Update.
8508 2017-06-12 Pedro Alves <palves@redhat.com>
8509 Alan Hayward <alan.hayward@arm.com>
8511 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8512 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8513 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8514 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8515 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8517 2017-06-12 Pedro Alves <palves@redhat.com>
8519 * dwarf2read.c (mapped_symtab::data): Now a vector of
8520 symtab_index_entry instead of vector of
8521 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8522 whether an element's name is NULL instead of checking whether the
8523 element itself is NULL.
8524 (find_slot): Change return type. Adjust.
8525 (hash_expand, , add_index_entry, uniquify_cu_indices)
8526 (write_hash_table): Adjust.
8528 2017-06-12 Pedro Alves <palves@redhat.com>
8530 * dwarf2read.c (recursively_count_psymbols): New function.
8531 (write_psymtabs_to_index): Call it to compute number of psyms and
8532 pass estimate size of psyms_seen to unordered_set's ctor.
8534 2017-06-12 Pedro Alves <palves@redhat.com>
8536 * dwarf2read.c (write_hash_table): Check if key already exists
8539 2017-06-12 Pedro Alves <palves@redhat.com>
8541 * dwarf2read.c (data_buf::append_space): Rename to...
8542 (data_buf::grow): ... this, and make private. Adjust all callers.
8543 (data_buf::append_uint): New method.
8544 (add_address_entry, write_one_signatured_type)
8545 (write_psymtabs_to_index): Use it.
8547 2017-06-12 Pedro Alves <palves@redhat.com>
8549 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8550 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8551 (data_buf::file_write): Call ::fwrite directly.
8553 2017-06-12 Pedro Alves <palves@redhat.com>
8555 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8558 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8560 Code cleanup: C++ify .gdb_index producer.
8561 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8562 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8563 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8564 (create_strtab, add_string): Remove.
8565 (file_write, data_buf): New.
8566 (struct symtab_index_entry): Use std::vector for cu_indices.
8567 (struct mapped_symtab): Use std::vector for data.
8568 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8569 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8571 (find_slot): Change return type. Update it to the new data structures.
8572 (hash_expand, add_index_entry): Update it to the new data structures.
8573 (offset_type_compare): Remove.
8574 (uniquify_cu_indices): Update it to the new data structures.
8575 (c_str_view, c_str_view_hasher, vector_hasher): New.
8576 (add_indices_to_cpool): Remove.
8577 (write_hash_table): Update it to the new data structures.
8578 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8579 (eq_psymtab_cu_index): Remove.
8580 (psym_index_map): New typedef.
8581 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8582 reference and std::unordered_map for cu_index_htab.
8583 (add_address_entry, add_address_entry_worker, write_address_map)
8584 (write_psymbols): Update it to the new data structures.
8585 (write_obstack): Remove.
8586 (struct signatured_type_index_data): Change types_list to a data_buf
8587 reference and psyms_seen to a std::unordered_set reference.
8588 (write_one_signatured_type, recursively_write_psymbols)
8589 (write_psymtabs_to_index): Update it to the new data structures.
8591 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8593 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8594 separate-debug-file commands.
8595 * symfile.h (separate_debug_file_debug): New global.
8596 * symfile.c (separate_debug_file_debug): New global.
8597 (separate_debug_file_exists, find_separate_debug_file): Add
8599 (_initialize_symfile): Add "set debug separate-debug-file"
8601 * build-id.c (build_id_to_debug_bfd,
8602 find_separate_debug_file_by_buildid): Add debug output.
8604 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8606 * gdbarch.sh (displaced_step_free_closure): Remove.
8607 * gdbarch.h, gdbarch.c: Re-generate.
8608 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8609 displaced_step_free_closure.
8610 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8611 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8612 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8613 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8614 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8615 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8616 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8617 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8618 * infrun.c (displaced_step_clear): Call xfree instead of
8619 gdbarch_displaced_step_free_closure.
8621 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8623 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8626 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8628 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8629 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8630 (mn10300_push_dummy_call): Likewise.
8632 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8634 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8636 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8638 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8640 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8642 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8643 able to start inferiors using a shell.
8644 (New remote packets): Announce new packet "QStartupWithShell".
8645 * remote.c: Add PACKET_QStartupWithShell.
8646 (extended_remote_create_inferior): Handle new
8647 PACKET_QStartupWithShell.
8648 (remote_protocol_features) <QStartupWithShell>: New entry for
8649 PACKET_QStartupWithShell.
8650 (_initialize_remote): Call "add_packet_config_cmd" for
8653 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8654 Pedro Alves <palves@redhat.com>
8656 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8657 and "nat/fork-inferior.h".
8658 * common/common-inferior.h: New file, with contents from
8660 * commom/common-utils.c: Include "common-utils.h".
8661 (stringify_argv): New function.
8662 * common/common-utils.h (stringify_argv): New prototype.
8663 * configure.nat: Add "fork-inferior.o" as a dependency for
8664 "*linux*", "fbsd*" and "nbsd*" hosts.
8665 * corefile.c (get_exec_file): Update comment.
8666 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8667 instead of "startup_inferior".
8668 (darwin_create_inferior): Call "add_thread_silent" after
8670 * fork-child.c: Cleanup unnecessary includes.
8671 (SHELL_FILE): Move to "common/common-fork-child.c".
8672 (environ): Likewise.
8673 (exec_wrapper): Initialize.
8674 (get_exec_wrapper): New function.
8675 (breakup_args): Move to "common/common-fork-child.c"; rename to
8676 "breakup_args_for_exec".
8677 (escape_bang_in_quoted_argument): Move to
8678 "common/common-fork-child.c".
8679 (saved_ui): New variable.
8680 (prefork_hook): New function.
8681 (postfork_hook): Likewise.
8682 (postfork_child_hook): Likewise.
8683 (gdb_startup_inferior): Likewise.
8684 (fork_inferior): Move to "common/common-fork-child.c". Update
8685 function to support gdbserver.
8686 (startup_inferior): Likewise.
8687 * gdbcore.h (get_exec_file): Remove declaration.
8688 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8689 instead of "startup_inferior". Call "add_thread_silent" after
8691 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8692 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8693 instead of "startup_inferior". Call "add_thread_silent" after
8695 * inferior.h: Include "common-inferior.h".
8696 (trace_start_error): Move to "common/common-utils.h".
8697 (trace_start_error_with_name): Likewise.
8698 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8699 (startup_inferior): Likewise.
8700 (gdb_startup_inferior): New prototype.
8701 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8702 * nat/fork-inferior.h: New file.
8703 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8704 instead of "startup_inferior". Call "add_thread_silent" after
8706 * target.h (target_terminal_init): Move prototype to
8708 (target_terminal_inferior): Likewise.
8709 (target_terminal_ours): Likewise.
8710 * target/target.h (target_terminal_init): New prototype, moved
8712 (target_terminal_inferior): Likewise.
8713 (target_terminal_ours): Likewise.
8714 * utils.c (gdb_flush_out_err): New function.
8716 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8718 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8719 * common/common-gdbthread.h: New file, with parts from
8721 * gdbthread.h: Include "common-gdbthread.h".
8722 (switch_to_thread): Moved to "common/common-gdbthread.h".
8724 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8726 * Makefile.in (SFILES): Add "common/job-control.c".
8727 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8728 (COMMON_OBS): Add "job-control.o".
8729 * common/job-control.c: New file, with contents from
8731 * common/job-control.h: New file, with contents from "terminal.h".
8732 * fork-child.c: Include "job-control.h".
8733 * inflow.c: Include "job-control.h".
8734 (gdb_setpgid): Move to "common/common-inflow.c".
8735 (_initialize_inflow): Move setting of "job_control" to
8736 "handle_job_control".
8737 * terminal.h (job_control): Moved to "common/common-terminal.h".
8738 (gdb_setpgid): Likewise.
8739 * top.c: Include "job_control.h".
8740 * utils.c: Likewise.
8741 (job_control): Moved to "job-control.c".
8743 2017-06-07 Pedro Alves <palves@redhat.com>
8745 * Makefile.in (SFILES): Add gdb_regex.c.
8746 (COMMON_OBS): Add gdb_regex.o.
8747 * ada-lang.c (ada_add_standard_exceptions)
8748 (ada_add_exceptions_from_frame, name_matches_regex)
8749 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8750 parameter type to compiled_regex. Adjust.
8751 (ada_exceptions_list): Use compiled_regex.
8752 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8753 std::unique_ptr<compiled_regex>.
8754 (exception_catchpoint::~exception_catchpoint): Remove regfree
8756 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8757 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8758 * breakpoint.c (solib_catchpoint::compiled): Now a
8759 std::unique_ptr<compiled_regex>.
8760 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8761 (check_status_catch_solib): Adjust to use compiled_regex.
8762 (add_solib_catchpoint): Adjust to use compiled_regex.
8763 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8764 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8765 compiled_regex reference. Adjust to use it.
8766 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8767 declaration. Include "gdb_regex.h".
8768 (apropos_cmd): Change regex parameter to compiled_regex reference.
8769 * gdb_regex.c: New file.
8770 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8772 (class compiled_regex): New.
8773 * linux-tdep.c: Include "common/gdb_optional.h".
8774 (struct mapping_regexes): New, factored out from
8775 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8776 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8777 gdb::optional and remove cleanups. Adjust to compiled_regex.
8778 * probe.c: Include "common/gdb_optional.h".
8779 (collect_probes): Use compiled_regex and gdb::optional and remove
8781 * skip.c: Include "common/gdb_optional.h".
8782 (skiplist_entry::compiled_function_regexp): Now a
8783 gdb::optional<compiled_regex>.
8784 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8785 (free_skiplist_entry): Remove regfree call.
8786 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8787 compiled_regex and gdb::optional.
8788 * symtab.c: Include "common/gdb_optional.h".
8789 (search_symbols): Use compiled_regex and gdb::optional.
8790 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8791 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8794 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8796 * regcache.c (regcache::save): Avoid buffer use.
8797 (regcache::dump): Likewise.
8799 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8801 * sh-tdep.c (sh_pseudo_register_read): Remove
8803 (sh_pseudo_register_write): Likewise.
8804 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8805 (sh64_pseudo_register_write): Likewise
8807 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8809 * aarch64-tdep.c (aarch64_store_return_value): Use
8811 (aarch64_pseudo_read_value): Likewise.
8812 (aarch64_pseudo_write): Likewise.
8814 2017-06-06 Yao Qi <yao.qi@linaro.org>
8816 * regformats/regdef.h (set_register_cache): Remove the
8819 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8821 * frame.c (frame_unwind_register_signed): Use
8822 frame_unwind_register_value.
8824 2017-06-06 Pedro Alves <palves@redhat.com>
8826 PR breakpoints/21553
8827 * breakpoint.c (create_breakpoints_sal_default)
8828 (init_breakpoint_sal, create_breakpoint_sal): Use
8829 gdb::unique_xmalloc_ptr for string parameters.
8830 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8831 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8832 (base_breakpoint_create_breakpoints_sal)
8833 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8834 (strace_marker_create_breakpoints_sal)
8835 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8837 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8838 gdb::unique_xmalloc_ptr for string parameters.
8839 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8842 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8844 * alpha-tdep.c (alpha_register_to_value): Use
8845 get_frame_register_value.
8846 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8848 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8850 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8851 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8852 (ia64_value_to_register): Likewise.
8853 (ia64_extract_return_value): Likewise.
8854 (ia64_store_return_value): Likewise.
8855 (ia64_push_dummy_call): Likewise.
8857 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8861 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8863 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8865 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8867 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8869 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8871 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8873 * event-loop.c (poll_timers): Unallocate timer using delete
8876 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8878 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8879 (struct breakpoint) <~breakpoint>: New.
8880 (struct watchpoint): Inherit from breakpoint.
8883 (struct tracepoint): Inherit from breakpoint.
8885 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8886 (struct longjmp_breakpoint): Inherit from breakpoint.
8887 <~longjmp_breakpoint>: New.
8889 (new_breakpoint_from_type): Remove casts.
8890 (watchpoint_in_thread_scope): Remove reference to base field.
8891 (watchpoint_del_at_next_stop): Likewise.
8892 (update_watchpoint): Likewise.
8893 (watchpoint_check): Likewise.
8894 (bpstat_check_watchpoint): Likewise.
8895 (set_longjmp_breakpoint): Likewise.
8896 (struct fork_catchpoint): Inherit from breakpoint.
8898 (struct solib_catchpoint): Inherit from breakpoint.
8899 <~solib_catchpoint>: New.
8901 (dtor_catch_solib): Change to ...
8902 (solib_catchpoint::~solib_catchpoint): ... this.
8903 (breakpoint_hit_catch_solib): Remove reference to base field.
8904 (add_solib_catchpoint): Likewise.
8905 (create_fork_vfork_event_catchpoint): Likewise.
8906 (struct exec_catchpoint): Inherit from breakpoint.
8907 <~exec_catchpoint>: New.
8909 (dtor_catch_exec): Change to ...
8910 (exec_catchpoint::~exec_catchpoint): ... this.
8911 (dtor_watchpoint): Change to ...
8912 (watchpoint::~watchpoint): ... this.
8913 (watch_command_1): Remove reference to base field.
8914 (catch_exec_command_1): Likewise.
8915 (base_breakpoint_dtor): Change to ...
8916 (breakpoint::~breakpoint): ... this.
8917 (base_breakpoint_ops): Remove dtor field value.
8918 (longjmp_bkpt_dtor): Change to ...
8919 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8920 (strace_marker_create_breakpoints_sal): Remove reference to base
8922 (delete_breakpoint): Don't manually call breakpoint destructor.
8923 (create_tracepoint_from_upload): Remove reference to base field.
8924 (trace_pass_set_count): Likewise.
8925 (initialize_breakpoint_ops): Don't initialize
8926 momentary_breakpoint_ops, don't set dtors.
8927 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8928 <~ada_catchpoint>: New.
8930 (create_excep_cond_exprs): Remove reference to base field.
8931 (dtor_exception): Change to ...
8932 (ada_catchpoint::~ada_catchpoint): ... this.
8933 (dtor_catch_exception): Remove.
8934 (dtor_catch_exception_unhandled): Remove.
8935 (dtor_catch_assert): Remove.
8936 (create_ada_exception_catchpoint): Remove reference to base
8938 (initialize_ada_catchpoint_ops): Don't set dtors.
8939 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8941 <~signal_catchpoint>: New.
8943 (signal_catchpoint_dtor): Change to ...
8944 (signal_catchpoint::~signal_catchpoint): ... this.
8945 (create_signal_catchpoint): Remove reference to base field.
8946 (initialize_signal_catchpoint_ops): Don't set dtor.
8947 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8949 <~syscall_catchpoint>: New.
8951 (dtor_catch_syscall): Change to ...
8952 (syscall_catchpoint::~syscall_catchpoint): ... this.
8953 (create_syscall_event_catchpoint): Remove reference to base
8955 (initialize_syscall_catchpoint_ops): Don't set dtor.
8956 * break-catch-throw.c (struct exception_catchpoint): Inherit
8958 <~exception_catchpoint>: New.
8960 (dtor_exception_catchpoint): Change to ...
8961 (exception_catchpoint::~exception_catchpoint): ... this.
8962 (handle_gnu_v3_exceptions): Remove reference to base field.
8963 (initialize_throw_catchpoint_ops): Don't set dtor.
8964 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8966 * remote.c (remote_get_tracepoint_status): Likewise.
8967 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8968 * tracefile.c (tracefile_fetch_registers): Likewise.
8969 * tracepoint.c (actions_command): Likewise.
8970 (validate_actionline): Likewise.
8971 (tfind_1): Likewise.
8972 (get_traceframe_location): Likewise.
8973 (find_matching_tracepoint_location): Likewise.
8974 (parse_tracepoint_status): Likewise.
8975 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8977 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8979 * breakpoint.c (struct longjmp_breakpoint): New struct.
8980 (is_tracepoint_type): Change return type to bool.
8981 (is_longjmp_type): New function.
8982 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8983 (set_raw_breakpoint_without_location): Use
8984 new_breakpoint_from_type.
8985 (set_raw_breakpoint): Likewise.
8987 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8989 * breakpoint.c (new_breakpoint_from_type): New function.
8990 (create_breakpoint_sal): Use new_breakpoint_from_type and
8992 (create_breakpoint): Likewise.
8994 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8996 * memattr.c (mem_info_command): Rename to ...
8997 (info_mem_command): ... this.
8998 (mem_enable_command): Rename to ...
8999 (enable_mem_command): ... this.
9000 (mem_disable_command): Rename to ...
9001 (disable_mem_command): ... this.
9002 (mem_delete_command): Rename to ...
9003 (delete_mem_command): ... this.
9004 (_initialize_mem): Adjust function names.
9006 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9008 * btrace.c (handle_pt_insn_events): New.
9009 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9010 STATUS. Split into this and ...
9011 (handle_pt_insn_event_flags): ... this.
9013 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9015 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9016 and struct pt_insn.resynced.
9017 * configure: Regenerated.
9018 * config.in: Regenerated.
9020 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9022 * btrace.c (ftrace_find_call_by_number): New function.
9023 (ftrace_new_function): Store objects, not pointers.
9024 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9025 ftrace_new_gap, ftrace_update_function,
9026 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9027 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9028 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9029 btrace_ends_with_single_insn, btrace_call_get): Account for
9030 btrace_thread_info::functions now storing objects.
9031 * btrace.h (struct btrace_thread_info): Add constructor.
9032 (struct btrace_thread_info) <functions>: Make std::vector.
9033 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9034 Initialize with default values.
9035 * record-btrace.c (record_btrace_frame_sniffer): Account for
9036 btrace_thread_info::functions now storing objects.
9038 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9040 * btrace.c: Remove typedef bfun_s.
9041 (ftrace_new_gap): Directly add gaps to the list of gaps.
9042 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9043 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9044 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9047 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9049 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9050 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9051 with btrace_thread_info::next_segment and
9052 btrace_thread_info::prev_segment.
9053 * btrace.h: Remove struct btrace_func_link.
9054 (struct btrace_function): Replace pair of function segment pointers
9055 with pair of indices.
9056 * python/py-record-btrace.c (btpy_call_prev_sibling,
9057 btpy_call_next_sibling): Replace references to
9058 btrace_thread_info::segment with btrace_thread_info::next_segment and
9059 btrace_thread_info::prev_segment.
9060 * record-btrace.c (record_btrace_frame_this_id): Use
9061 btrace_find_call_by_number.
9063 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9065 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9066 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9067 btrace_insn_next, btrace_insn_prev): Remove references to
9068 btrace_thread_info::flow.
9069 * btrace.h (struct btrace_function): Remove FLOW.
9071 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9073 * btrace.c (ftrace_find_call_by_number): New function.
9074 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9075 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9076 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9077 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9079 * btrace.h (struct btrace_function): Turn UP into an index.
9080 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9082 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9083 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9084 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9086 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9088 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9089 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9090 ftrace_update_function, ftrace_compute_global_level_offset,
9091 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9092 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9093 btrace_insn_end, btrace_is_empty): Remove references to
9094 btrace_thread_info::begin and btrace_thread_info::end.
9095 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9096 (struct btrace_thread_info) <functions>: Adjust comment.
9097 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9098 btrace_thread_info::begin.
9100 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9102 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9103 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9104 ftrace_update_function): Remove arguments that implicitly were always
9106 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9107 Don't pass BTINFO->END.
9109 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9111 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9112 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9113 btrace_find_insn_by_number): Replace function segment pointer with
9115 (btrace_insn_cmp): Simplify.
9116 * btrace.h: (struct btrace_insn_iterator) Rename index to
9117 insn_index. Replace function segment pointer with index into function
9119 * record-btrace.c (record_btrace_call_history): Replace function
9120 segment pointer use with index.
9121 (record_btrace_frame_sniffer): Retrieve function call segment through
9123 (record_btrace_set_replay): Remove defunc't safety check.
9125 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9127 * btrace.c (btrace_ends_with_single_insn): New function.
9128 (btrace_call_get, btrace_call_number, btrace_call_begin,
9129 btrace_call_end, btrace_call_next, btrace_call_prev,
9130 btrace_find_call_by_number): Use index into call segment vector
9132 (btrace_call_cmp): Simplify.
9133 * btrace.h (struct btrace_call_iterator): Replace function call segment
9134 pointer with index into vector.
9135 * record-btrace.c (record_btrace_call_history): Use index instead of
9138 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9140 * btrace.c (btrace_insn_begin, btrace_insn_end,
9141 btrace_find_insn_by_number): Add btinfo to iterator.
9142 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9144 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9146 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9147 and save pointers directly.
9148 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9149 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9150 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9151 changed signature of functions.
9152 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9153 (btrace_fetch): Remove code that adds btrace_function pointers to
9154 vector of btrace_functions.
9155 (btrace_clear): Simplify freeing vector of btrace_functions.
9157 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9159 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9160 Replace VEC_* with std::vector functions.
9161 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9162 (struct btrace_thread_info)<functions>: Change type to std::vector.
9164 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9166 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9167 "Removed targets and native configurations" up. Merge duplicate
9168 "New commands" sub-sections. Add "New options" sub-sections.
9170 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9172 * defs.h (copy_integer_to_size): New declaration.
9173 * findvar.c (copy_integer_to_size): New function.
9174 (do_cint_test): New selftest function.
9175 (copy_integer_to_size_test): Likewise.
9176 (_initialize_findvar): Likewise.
9177 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9178 (mips_fbsd_collect_reg): Use raw_collect_integer.
9179 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9180 (mips64_fill_gregset): Use raw_collect_integer
9181 (mips64_fill_fpregset): Use raw_supply_integer.
9182 * regcache.c (regcache::raw_supply_integer): New function.
9183 (regcache::raw_collect_integer): Likewise.
9184 * regcache.h: (regcache::raw_supply_integer): New declaration.
9185 (regcache::raw_collect_integer): Likewise.
9187 2017-05-24 Yao Qi <yao.qi@linaro.org>
9189 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9190 (COMMON_OBS): Add gdbarch-selftests.o.
9191 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9192 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9193 * gdbarch-selftests.c: New file.
9194 * regcache.h (regcache) <~regcache>: Mark it virtual if
9196 <raw_write>: Likewise.
9198 2017-05-24 Yao Qi <yao.qi@linaro.org>
9200 * regcache.c (current_regcache): Change it to
9201 regcache::current_regcache.
9202 (regcache_observer_target_changed): Update.
9203 (regcache_thread_ptid_changed): Make it a regcache static
9205 (regcache_thread_ptid_changed): Update.
9206 (class regcache_access): New.
9207 (current_regcache_test): Update.
9208 (_initialize_regcache): Update.
9209 * regcache.h: Include forward_list.
9210 (regcache): Declare regcache_thread_ptid_changed and declare
9211 registers_changed_ptid as friend.
9213 2017-05-24 Yao Qi <yao.qi@linaro.org>
9215 * i387-tdep.c (i387_register_to_value): Use register_size
9216 instead of TYPE_LENGTH.
9217 * m68k-tdep.c (m68k_register_to_value): Likewise.
9219 2017-05-24 Yao Qi <yao.qi@linaro.org>
9221 * i387-tdep.c (i387_convert_register_p): Return false if type
9222 code isn't TYPE_CODE_FLT.
9224 2017-05-24 Yao Qi <yao.qi@linaro.org>
9226 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9228 (alpha_register_to_value): Remove type length check.
9229 (alpha_value_to_register): Likewise.
9231 2017-05-24 Yao Qi <yao.qi@linaro.org>
9233 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9236 2017-05-24 Yao Qi <yao.qi@linaro.org>
9238 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9239 TYPE_CODE_FLT or not.
9241 2017-05-24 Yao Qi <yao.qi@linaro.org>
9243 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9244 * avr-tdep.c (avr_gdbarch_init): Likewise.
9245 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9246 * cris-tdep.c (cris_gdbarch_init): Likewise.
9247 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9248 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9249 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9250 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9251 * mep-tdep.c (mep_gdbarch_init): Likewise.
9252 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9253 * mips-tdep.c (mips_gdbarch_init): Likewise.
9254 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9255 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9256 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9257 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9258 * v850-tdep.c (v850_gdbarch_init): Likewise.
9260 2017-05-24 Yao Qi <yao.qi@linaro.org>
9262 * selftest-arch.c (tests_with_arch): Call registers_changed
9263 and reinit_frame_cache.
9264 * selftest.c (run_self_tests): Likewise.
9266 2017-05-24 Yao Qi <yao.qi@linaro.org>
9268 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9269 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9271 2017-05-24 Yao Qi <yao.qi@linaro.org>
9273 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9274 set_gdbarch_print_insn.
9276 2017-05-24 Yao Qi <yao.qi@linaro.org>
9278 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9279 set_gdbarch_print_insn.
9281 2017-05-24 Yao Qi <yao.qi@linaro.org>
9283 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9284 set_gdbarch_print_insn.
9285 * arc-tdep.c (arc_gdbarch_init): Likewise.
9286 * arch-utils.c: include dis-asm.h.
9287 (default_print_insn): New function.
9288 * arch-utils.h (default_print_insn): Declare.
9289 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9290 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9291 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9292 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9293 * frv-tdep.c (frv_gdbarch_init): Likewise.
9294 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9295 * gdbarch.sh (print_insn): Use default_print_insn.
9296 * gdbarch.c: Regenerated.
9297 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9298 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9299 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9300 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9301 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9302 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9303 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9304 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9305 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9306 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9307 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9308 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9309 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9310 * mt-tdep.c (mt_gdbarch_init): Likewise.
9311 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9312 * nios2-tdep.c (nios2_print_insn): Remove.
9313 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9314 * rx-tdep.c (rx_gdbarch_init): Likewise.
9315 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9316 * score-tdep.c (score_print_insn): Remove.
9317 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9318 * sh-tdep.c (sh_gdbarch_init): Likewise.
9319 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9320 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9321 * tic6x-tdep.c (tic6x_print_insn): Remove.
9322 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9323 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9324 * v850-tdep.c (v850_gdbarch_init): Likewise.
9325 * vax-tdep.c (vax_gdbarch_init): Likewise.
9326 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9327 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9329 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9331 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9332 (MIPS_FP0_REGNUM): Remove.
9333 (MIPS_FSR_REGNUM): Remove.
9334 (mips_fbsd_supply_fpregs): Use mips_regnum.
9335 (mips_fbsd_supply_gregs): Likewise.
9336 (mips_fbsd_collect_fpregs): Likewise.
9337 (mips_fbsd_collect_gregs): Likewise.
9339 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9341 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9342 (getpfpregs_supplies): New function.
9343 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9345 (mips_fbsd_store_inferior_registers): Likewise.
9347 2017-05-22 Pedro Alves <palves@redhat.com>
9349 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9352 2017-05-22 Alan Hayward <alan.hayward@arm.com>
9354 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9355 (store_register): Likewise.
9356 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9357 (get_decimal_float_return_value): Likewise.
9358 (do_ppc_sysv_return_value): Likewise.
9359 (ppc64_sysv_abi_push_integer): Likewise.
9360 (ppc64_sysv_abi_push_freg): Likewise.
9361 (ppc64_sysv_abi_return_value_base): Likewise.
9362 (ppc64_sysv_abi_return_value): Likewise.
9363 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9364 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9365 * rs6000-nat.c: Likewise.
9366 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9367 (rs6000_value_to_register): Likewise.
9368 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9370 2017-05-21 Tom Tromey <tom@tromey.com>
9373 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9374 arrays as "[T]", not "[T; ]".
9376 2017-05-19 Tom Tromey <tom@tromey.com>
9379 * rust-lang.c (exp_descriptor_rust): New function.
9380 (rust_language_defn): Use it.
9381 * p-lang.c (pascal_language_defn): Update.
9382 * opencl-lang.c (opencl_language_defn): Update.
9383 * objc-lang.c (objc_language_defn): Update.
9384 * m2-lang.c (m2_language_defn): Update.
9385 * language.h (struct language_defn)
9386 <la_watch_location_expression>: New member.
9387 * language.c (unknown_language_defn, auto_language_defn)
9388 (local_language_defn): Update.
9389 * go-lang.c (go_language_defn): Update.
9390 * f-lang.c (f_language_defn): Update.
9391 * d-lang.c (d_language_defn): Update.
9392 * c-lang.h (c_watch_location_expression): Declare.
9393 * c-lang.c (c_watch_location_expression): New function.
9394 (c_language_defn, cplus_language_defn, asm_language_defn)
9395 (minimal_language_defn): Use it.
9396 * breakpoint.c (watch_command_1): Call
9397 la_watch_location_expression.
9398 * ada-lang.c (ada_language_defn): Update.
9400 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9403 * gdb_curses.h (NOMACROS): Define.
9404 (NCURSES_NOMACROS): Define.
9406 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9409 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9411 * tui/tui-wingeneral.c (box_win): Likewise.
9412 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9413 (tui_show_source_line): Likewise.
9414 (tui_show_exec_info_content): Likewise.
9416 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9418 * sparc-tdep.c (sparc_structure_return_p)
9419 (sparc_arg_on_registers_p): New functions.
9420 (sparc32_store_arguments): Use them.
9421 * sparc64-tdep.c (sparc64_16_byte_align_p)
9422 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9423 Handle TYPE_CODE_ARRAY.
9425 2017-05-17 Yao Qi <yao.qi@linaro.org>
9427 * cli/cli-decode.c (add_alias_cmd): New function.
9428 * command.h (add_alias_cmd): Declare.
9429 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9430 instead call add_alias_cmd.
9432 2017-05-17 Pedro Alves <palves@redhat.com>
9434 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9435 (nat_makefile_frag): ... this. All references updated.
9436 * configure.ac: Likewise.
9437 * configure.nat: Likewise. Enhance comments.
9438 * configure: Regenerate.
9440 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9442 * procfs.c (procfs_create_inferior): Change prototype to match
9445 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9447 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9448 C++ compiler warning.
9450 2017-05-12 Tom Tromey <tom@tromey.com>
9453 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9454 recurse, just call value_struct_elt directly.
9456 2017-05-12 Tom Tromey <tom@tromey.com>
9458 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9459 OP_RUST_ARRAY>: Fix.
9461 2017-05-12 Tom Tromey <tom@tromey.com>
9463 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9465 2017-05-09 Yao Qi <yao.qi@linaro.org>
9467 * regcache.c: Include <forward_list>.
9468 (struct regcache_list): Remove.
9469 (current_regcache): Update.
9470 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9471 (regcache_thread_ptid_changed): Likewise.
9472 (registers_changed_ptid): Likewise.
9473 (current_regcache_size): Likewise.
9475 2017-05-09 Yao Qi <yao.qi@linaro.org>
9477 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9478 (current_regcache_size): New function.
9479 (current_regcache_test): New function.
9480 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9482 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9484 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9485 (print_gp_register_row): Use get_frame_register_value.
9487 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9489 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9490 (mips_supply_fpregset): Likewise.
9491 (mips64_supply_gregset): Likewise.
9493 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9495 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9496 regcache->raw_supply_zeroed.
9498 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9500 * configure.nat: Rearrange 'case' statements to match
9503 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9505 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9506 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9507 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9508 "@nat_extra_makefile_frag@".
9509 (Makefile): Remove dependency on "@frags@".
9510 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9511 (data-directory/Makefile): Likewise.
9512 * config/aarch64/linux.mh: Deleted; moved contents to
9513 "gdb/configure.nat".
9514 * config/alpha/alpha-linux.mh: Likewise.
9515 * config/alpha/nbsd.mh: Likewise.
9516 * config/arm/linux.mh: Likewise.
9517 * config/arm/nbsdelf.mh: Likewise.
9518 * config/i386/cygwin.mh: Likewise.
9519 * config/i386/cygwin64.mh: Likewise.
9520 * config/i386/darwin.mh: Likewise.
9521 * config/i386/fbsd.mh: Likewise.
9522 * config/i386/fbsd64.mh: Likewise.
9523 * config/i386/go32.mh: Likewise.
9524 * config/i386/i386gnu.mh: Likewise.
9525 * config/i386/i386sol2.mh: Likewise.
9526 * config/i386/linux.mh: Likewise.
9527 * config/i386/linux64.mh: Likewise.
9528 * config/i386/mingw.mh: Likewise.
9529 * config/i386/mingw64.mh: Likewise.
9530 * config/i386/nbsd64.mh: Likewise.
9531 * config/i386/nbsdelf.mh: Likewise.
9532 * config/i386/nto.mh: Likewise.
9533 * config/i386/obsd.mh: Likewise.
9534 * config/i386/obsd64.mh: Likewise.
9535 * config/i386/sol2-64.mh: Likewise.
9536 * config/ia64/linux.mh: Likewise.
9537 * config/m32r/linux.mh: Likewise.
9538 * config/m68k/linux.mh: Likewise.
9539 * config/m68k/nbsdelf.mh: Likewise.
9540 * config/m68k/obsd.mh: Likewise.
9541 * config/m88k/obsd.mh: Likewise.
9542 * config/mips/fbsd.mh: Likewise.
9543 * config/mips/linux.mh: Likewise.
9544 * config/mips/nbsd.mh: Likewise.
9545 * config/mips/obsd64.mh: Likewise.
9546 * config/pa/linux.mh: Likewise.
9547 * config/pa/nbsd.mh: Likewise.
9548 * config/pa/obsd.mh: Likewise.
9549 * config/powerpc/aix.mh: Likewise.
9550 * config/powerpc/fbsd.mh: Likewise.
9551 * config/powerpc/linux.mh: Likewise.
9552 * config/powerpc/nbsd.mh: Likewise.
9553 * config/powerpc/obsd.mh: Likewise.
9554 * config/powerpc/ppc64-linux.mh: Likewise.
9555 * config/powerpc/spu-linux.mh: Likewise.
9556 * config/s390/linux.mh: Likewise.
9557 * config/sh/nbsd.mh: Likewise.
9558 * config/sparc/fbsd.mh: Likewise.
9559 * config/sparc/linux.mh: Likewise.
9560 * config/sparc/linux64.mh: Likewise.
9561 * config/sparc/nbsd64.mh: Likewise.
9562 * config/sparc/nbsdelf.mh: Likewise.
9563 * config/sparc/obsd64.mh: Likewise.
9564 * config/sparc/sol2.mh: Likewise.
9565 * config/tilegx/linux.mh: Likewise.
9566 * config/vax/nbsdelf.mh: Likewise.
9567 * config/vax/obsd.mh: Likewise.
9568 * config/xtensa/linux.mh: Likewise.
9569 * config/i386/i386gnu.mn: New file, with excerpts from
9570 "config/i386/i386gnu.mh".
9571 * configure: Regenerate.
9572 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9573 *.mh files under "gdb/config".
9574 * configure.nat: New file, with contents from the
9575 "gdb/config/*/*.mh" files.
9577 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9579 * btrace.c (btrace_clear): Free insn vector.
9581 2017-05-05 Pedro Alves <palves@redhat.com>
9583 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9584 * configure: Regenerate.
9586 2017-05-04 Pedro Alves <palves@redhat.com>
9588 * Makefile.in (SFILES): Add progspace-and-thread.c.
9589 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9590 (COMMON_OBS): Add progspace-and-thread.o.
9591 * breakpoint.c: Include "progspace-and-thread.h".
9592 (update_inserted_breakpoint_locations)
9593 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9594 Use scoped_restore_current_pspace_and_thread.
9595 (create_std_terminate_master_breakpoint): Use
9596 scoped_restore_current_program_space.
9597 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9598 (print_breakpoint_location): Use
9599 scoped_restore_current_program_space.
9600 (bp_loc_is_permanent): Use
9601 scoped_restore_current_pspace_and_thread.
9602 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9603 (download_tracepoint_locations): Use
9604 scoped_restore_current_pspace_and_thread.
9605 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9606 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9607 (enum step_over_calls_kind): Moved from inferior.h.
9608 (class scoped_restore_current_thread): New class.
9609 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9611 (scoped_restore_current_thread): New class.
9612 * infcmd.c: Include "common/gdb_optional.h".
9613 (continue_1, proceed_after_attach): Use
9614 scoped_restore_current_thread.
9615 (notice_new_inferior): Use scoped_restore_current_thread.
9616 * inferior.c: Include "progspace-and-thread.h".
9617 (restore_inferior, save_current_inferior): Delete.
9618 (add_inferior_command, clone_inferior_command): Use
9619 scoped_restore_current_pspace_and_thread.
9620 * inferior.h (scoped_restore_current_inferior): New class.
9621 * infrun.c: Include "progspace-and-thread.h" and
9622 "common/gdb_optional.h".
9623 (follow_fork_inferior): Use
9624 scoped_restore_current_pspace_and_thread.
9625 (scoped_restore_exited_inferior): New class.
9626 (handle_vfork_child_exec_or_exit): Use
9627 scoped_restore_exited_inferior,
9628 scoped_restore_current_pspace_and_thread,
9629 scoped_restore_current_thread and scoped_restore.
9630 (fetch_inferior_event): Use scoped_restore_current_thread.
9631 * linespec.c (decode_line_full, decode_line_1): Use
9632 scoped_restore_current_program_space.
9633 * mi/mi-main.c: Include "progspace-and-thread.h".
9634 (exec_continue): Use scoped_restore_current_thread.
9635 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9636 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9637 * proc-service.c (ps_pglobal_lookup): Use
9638 scoped_restore_current_program_space.
9639 * progspace-and-thread.c: New file.
9640 * progspace-and-thread.h: New file.
9641 * progspace.c (release_program_space, clone_program_space): Use
9642 scoped_restore_current_program_space.
9643 (restore_program_space, save_current_program_space)
9644 (save_current_space_and_thread): Delete.
9645 (switch_to_program_space_and_thread): Moved to
9646 progspace-and-thread.c.
9647 * progspace.h (save_current_program_space)
9648 (save_current_space_and_thread): Delete declarations.
9649 (scoped_restore_current_program_space): New class.
9650 * remote.c (remote_btrace_maybe_reopen): Use
9651 scoped_restore_current_thread.
9652 * symtab.c: Include "progspace-and-thread.h".
9653 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9654 * thread.c (print_thread_info_1): Use
9655 scoped_restore_current_thread.
9656 (struct current_thread_cleanup): Delete.
9657 (do_restore_current_thread_cleanup)
9658 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9659 (scoped_restore_current_thread::~scoped_restore_current_thread):
9661 (make_cleanup_restore_current_thread): Rename/convert to ...
9662 (scoped_restore_current_thread::scoped_restore_current_thread):
9664 (thread_apply_all_command): Use scoped_restore_current_thread.
9665 (thread_apply_command): Use scoped_restore_current_thread.
9666 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9667 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9669 2017-05-04 Pedro Alves <palves@redhat.com>
9671 * thread.c (make_cleanup_restore_current_thread): Move
9672 find_thread_ptid call before the is_stopped call. Assert that the
9673 thread is found. Replace is_stopped call by checking the thread's
9674 state directly. Remove unnecessary NULL-thread check.
9676 2017-05-04 Pedro Alves <palves@redhat.com>
9678 * corelow.c (thread_section_name): New class.
9679 (get_core_register_section, get_core_siginfo): Use it.
9681 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9683 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9684 (get_core_register_section): Remove xfree of NULL pointer.
9686 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9688 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9689 * regcache.c (regcache::raw_supply_zeroed): New function.
9690 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9692 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9694 * gdbarch.sh: Remove commented out definition of
9696 * gdbarch.h: Re-generate.
9698 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9700 * configure: Regenerate.
9702 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9704 * solib-target.c (solib_target_relocate_section_addresses):
9705 Remove num_section_bases, num_bases, segment_bases variables.
9707 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9709 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9711 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9713 * solib-target.c: Include <vector>
9714 (struct lm_info_target) <~lm_info_target>: Remove.
9715 <segment_bases, section_bases>: Change type to
9716 std::vector<CORE_ADDR>.
9717 (library_list_start_segment, library_list_start_section,
9718 library_list_end_library,
9719 solib_target_relocate_section_addresses): Adjust.
9721 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9723 * gdbarch.sh (software_single_step): Change return type to
9724 std::vector<CORE_ADDR>.
9725 * gdbarch.c, gdbarch.h: Re-generate.
9726 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9728 (arm_deal_with_atomic_sequence_raw): Adjust.
9729 (thumb_get_next_pcs_raw): Adjust.
9730 (arm_get_next_pcs_raw): Adjust.
9731 (arm_get_next_pcs): Adjust.
9732 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9733 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9734 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9735 (alpha_software_single_step): Adjust.
9736 * alpha-tdep.h (alpha_software_single_step): Adjust.
9737 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9738 * arm-tdep.c (arm_software_single_step): Adjust.
9739 (arm_breakpoint_kind_from_current_state): Adjust.
9740 * arm-tdep.h (arm_software_single_step): Adjust.
9741 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9742 * cris-tdep.c (cris_software_single_step): Adjust.
9743 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9744 (micromips_deal_with_atomic_sequence): Adjust.
9745 (deal_with_atomic_sequence): Adjust.
9746 (mips_software_single_step): Adjust.
9747 * mips-tdep.h (mips_software_single_step): Adjust.
9748 * moxie-tdep.c (moxie_software_single_step): Adjust.
9749 * nios2-tdep.c (nios2_software_single_step): Adjust.
9750 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9751 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9752 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9753 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9754 * sparc-tdep.c (sparc_software_single_step): Adjust.
9755 * spu-tdep.c (spu_software_single_step): Adjust.
9756 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9758 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9760 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9761 * gdbarch.h: Re-generate.
9763 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9765 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9766 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9767 * python/py-instruction.c, python/py-instruction.h: New file.
9768 * python/py-record.c: Add py-instruction.h include.
9769 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9770 gdb.RecordInstruction.
9771 * python/python-internal.h: Add gdbpy_initialize_instruction
9773 * python/python.c (do_start_initialization): Add
9774 gdbpy_initialize_instruction.
9776 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9778 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9780 (btrace_func_from_recpy_func): New function.
9781 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9782 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9783 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9784 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9785 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9786 Also, use new helper functions.
9787 (btpy_list_item): Use new helper functions.
9788 (recpy_bt_function_call_history): Use new type name.
9789 (btpy_call_getset): Remove.
9790 (gdbpy_initialize_btrace): Remove code to initialize
9791 gdb.BtraceFunctionCall.
9792 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9793 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9794 recpy_bt_func_prev, recpy_bt_func_next): New export.
9795 * python/py-record.c (recpy_func_type): New static object.
9796 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9797 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9798 recpy_func_next): New function.
9799 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9800 (recpy_func_getset): New static object.
9801 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9802 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9804 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9806 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9807 (btpy_object, btpy_insn_type, btpy_new): Remove.
9808 (btpy_list_object): Use gdb.RecordInstruction type instead of
9809 gdb.BtraceInstruction type.
9810 (btrace_insn_from_recpy_insn): New function.
9811 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9813 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9814 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9815 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9816 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9817 instead of btpy_object.
9818 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9819 btpy_insn_data, btpy_insn_decode): Rename to ...
9820 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9821 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9822 recpy_bt_insn_decode): This. Also, use new helper functions.
9823 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9825 (btpy_insn_getset): Remove.
9826 (gdbpy_initialize_btrace): Remove code to initialize
9827 gdb.BtraceInstruction. Use recpy_element_object.
9828 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9829 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9830 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9831 * python/py-record.c (recpy_insn_type): New static object.
9832 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9833 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9834 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9836 (recpy_insn_getset): New static object.
9837 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9838 * python/py-record.h (recpy_element_object): New typedef.
9839 (recpy_insn_type, recpy_insn_new): New export.
9841 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9843 * py-record-btrace.c (btpy_insn_new): Removed.
9844 (btpy_insn_or_gap_new): New function.
9845 (btpy_insn_error): Removed.
9846 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9847 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9848 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9849 btpy_insn_or_gap_new instead of btpy_insn_new.
9850 (btpy_insn_getset): Remove btpy_insn_error.
9851 * py-record.c (recpy_gap_type): New static object.
9852 (recpy_gap_object): New typedef.
9853 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9854 recpy_gap_reason_string): New function.
9855 (recpy_gap_getset): New static object.
9856 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9857 * py-record.h (recpy_gap_new): New export.
9859 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9861 * python/py-record.c (recpy_ptid): Remove.
9862 (recpy_record_getset): Remove recpy_ptid.
9864 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9866 * btrace.c (btrace_fetch): Set inferior_ptid.
9867 * python/py-record-btrace.c: Add "py-record.h" include.
9868 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9869 recpy_bt_end, recpy_bt_instruction_history,
9870 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9871 in gdb.Record object instead of current ptid.
9872 * python/py-record.c: Include new "py-record.h" file.
9873 (recpy_record_object): Moved to py-record.h.
9874 * python/py-record.h: New file.
9876 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9878 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9879 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9882 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9884 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9885 the past maintainers section.
9887 2017-04-28 Yao Qi <yao.qi@linaro.org>
9889 * infcmd.c (get_return_value): Use regcache ctor, and remove
9892 2017-04-28 Yao Qi <yao.qi@linaro.org>
9893 Pedro Alves <palves@redhat.com>
9895 * regcache.c (regcache::regcache): New tag dispatch ctor.
9896 (do_cooked_read): Moved above.
9897 (regcache_dup): Use the tag dispatch ctor..
9898 * regcache.h (regcache): Declare ctor, delete copy ctor and
9899 assignment operator, remove friend regcache_dup.
9901 2017-04-28 Yao Qi <yao.qi@linaro.org>
9903 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9904 call method save instead of regcache_cpy.
9905 * regcache.h (struct regcache): Make regcache_dup a friend.
9907 2017-04-28 Yao Qi <yao.qi@linaro.org>
9909 * regcache.c (struct regcache): Move to regcache.h
9910 (regcache::arch): New method.
9911 (regcache_get_ptid): Update.
9912 (get_regcache_arch): Call arch method.
9913 (get_regcache_aspace): Call method aspace.
9914 (register_buffer): Change it to method.
9915 (regcache_save): Change it to regcache::save.
9916 (regcache_restore): Likewise.
9917 (regcache_cpy_no_passthrough): Remove the declaration.
9918 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9919 (regcache_cpy_no_passthrough): Change it to method
9921 (regcache_register_status): Change it to method
9922 get_register_status.
9923 (regcache_invalidate): Change it to method invalidate.
9924 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9925 (regcache_raw_update): Change it to method raw_update.
9926 (regcache_raw_read): Likewise.
9927 (regcache_raw_read_signed): Likewise.
9928 (regcache_raw_read_unsigned): Likewise.
9929 (regcache_raw_write_signed): Likewise.
9930 (regcache_raw_write_unsigned): Likewise.
9931 (regcache_cooked_read): Likewise.
9932 (regcache_cooked_read_value): Likewise.
9933 (regcache_cooked_read_signed): Likewise.
9934 (regcache_cooked_read_unsigned): Likewise.
9935 (regcache_cooked_write_signed): Likewise.
9936 (regcache_cooked_write_unsigned): Likewise.
9937 (regcache_raw_set_cached_value): Likewise.
9938 (regcache_raw_write): Likewise.
9939 (regcache_cooked_write): Likewise.
9940 (regcache_xfer_part): Likewise.
9941 (regcache_raw_read_part): Likewise.
9942 (regcache_raw_write_part): Likewise.
9943 (regcache_cooked_read_part): Likewise.
9944 (regcache_cooked_write_part): Likewise.
9945 (regcache_raw_supply): Likewise.
9946 (regcache_raw_collect): Likewise.
9947 (regcache_transfer_regset): Likewise.
9948 (regcache_supply_regset): Likewise.
9949 (regcache_collect_regset): Likewise.
9950 (regcache_debug_print_register): Likewise.
9951 (enum regcache_dump_what): Move it to regcache.h.
9952 (regcache_dump): Change it to method dump.
9953 * regcache.h (enum regcache_dump_what): New.
9954 (class regcache): New.
9955 * target.c (target_fetch_registers): Call method
9956 debug_print_register.
9957 (target_store_registers): Likewise.
9959 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9961 * windows-nat.c (struct lm_info_windows): Initialize field.
9962 (windows_make_so): Allocate lm_info_windows with new.
9963 (windows_free_so): Free lm_info_windows with delete.
9965 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9967 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9968 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9970 (darwin_free_so): Free lm_info_darwin with delete.
9972 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9974 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9975 <l_addr_p>: Change type to bool.
9976 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9977 (svr4_free_so): Free lm_info_svr4 with delete.
9978 (svr4_copy_library_list): Replace memcpy with call to copy
9980 (library_list_start_library, svr4_default_sos): Allocate
9981 lm_info_svr4 with new.
9983 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9985 * solib-target.c (struct lm_info_target): Add destructor,
9987 <name>: Change type to std::string.
9988 (library_list_start_library): Allocate lm_info_target with new.
9989 (solib_target_free_library_list): Free lm_info_target with
9991 (solib_target_current_sos): Adapt to std::string.
9992 (solib_target_free_so): Free lm_info_target with delete.
9994 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9996 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9998 (frv_current_sos): Allocate lm_info_frv with new.
9999 (frv_relocate_main_executable): Free lm_info_frv with delete,
10001 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10003 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10005 * solib-frv.c (struct lm_info_frv): Fix indentation.
10007 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10009 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10011 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10012 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10013 and allocate with new.
10014 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10016 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10018 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10019 <filename, member_name>: Change type to std::string.
10020 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10021 (library_list_start_library): Allocate lm_info_aix with new.
10022 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10023 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10024 with copy constructor.
10026 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10028 * solist.h (struct lm_info): Remove.
10029 (struct lm_info_base): New class.
10030 (struct so_list) <lm_info>: Change type to lm_info_base *.
10031 * nto-tdep.c (struct lm_info): Remove.
10033 * solib-aix.c (struct lm_info): Rename to ...
10034 (struct lm_info_aix): ... this. Extend lm_info_base.
10035 (lm_info_p): Rename to ...
10036 (lm_info_aix_p): ... this, and adjust.
10037 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10038 solib_aix_parse_libraries, library_list_start_library,
10039 solib_aix_free_library_list, solib_aix_parse_libraries,
10040 solib_aix_get_library_list,
10041 solib_aix_relocate_section_addresses, solib_aix_free_so,
10042 solib_aix_get_section_offsets,
10043 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10045 (struct solib_aix_inferior_data) <library_list>: Adjust.
10046 * solib-darwin.c (struct lm_info): Rename to ...
10047 (struct lm_info_darwin): ... this. Extend lm_info_base.
10048 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10049 * solib-dsbt.c (struct lm_info): Rename to ...
10050 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10051 (struct dsbt_info) <main_executable_lm_info): Adjust.
10052 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10053 dsbt_relocate_section_addresses): Adjust.
10054 * solib-frv.c (struct lm_info): Rename to ...
10055 (struct lm_info_frv): ... this. Extend lm_info_base.
10056 (main_executable_lm_info): Adjust.
10057 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10058 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10059 find_canonical_descriptor_in_load_object,
10060 frv_fdpic_find_canonical_descriptor): Adjust.
10061 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10063 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10064 svr4_clear_so, svr4_copy_library_list,
10065 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10066 svr4_current_sos, svr4_fetch_objfile_link_map,
10067 solist_update_incremental): Adjust.
10068 * solib-svr4.h (struct lm_info_svr4): Move here from
10070 * solib-target.c (struct lm_info): Rename to ...
10071 (struct lm_info_target): ... this. Extend lm_info_base.
10072 (lm_info_p): Rename to ...
10073 (lm_info_target_p): ... this.
10074 (solib_target_parse_libraries, library_list_start_segment,
10075 library_list_start_section, library_list_start_library,
10076 library_list_end_library, solib_target_free_library_list,
10077 solib_target_current_sos, solib_target_free_so,
10078 solib_target_relocate_section_addresses): Adjust.
10079 * windows-nat.c (struct lm_info): Rename to ...
10080 (struct lm_info_windows): ... this. Extend lm_info_base.
10081 (windows_make_so, handle_load_dll, handle_unload_dll,
10082 windows_xfer_shared_libraries): Adjust.
10084 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10086 * solib-darwin.c (struct darwin_so_list): Remove.
10087 (darwin_current_sos): Allocate an so_list object instead of a
10088 darwin_so_list, separately allocate an lm_info object.
10089 (darwin_free_so): Free lm_info.
10091 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10093 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10094 with fprintf_filtered.
10096 2017-04-28 Yao Qi <yao.qi@linaro.org>
10098 * regcache.c (regcache::regcache): New function.
10099 (regcache::~regcache): New function.
10100 (regcache_xmalloc_1): Remove.
10101 (regcache_xmalloc): Call new regcache.
10102 (regcache_xfree): Call delete regcache.
10103 (get_thread_arch_aspace_regcache): Call new regcache.
10105 2017-04-28 Yao Qi <yao.qi@linaro.org>
10107 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10108 lwp instead of ptid_get_lwp.
10110 2017-04-28 Yao Qi <yao.qi@linaro.org>
10112 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10113 lwp_info instead of getting from inferior_ptid.
10115 2017-04-27 Keith Seitz <keiths@redhat.com>
10117 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10118 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10119 (CV_CONVERSION_BADNESS): Define.
10120 (rank_one_type): Remove overly restrictive rvalue reference
10122 Add cv-qualifier checks and subranks for type equality.
10123 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10124 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10125 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10127 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10129 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10130 count when creating the object.
10132 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10133 Ulrich Weigand <uweigand@de.ibm.com>
10135 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10136 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10138 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10139 (process_xcoff_symbol): Likewise.
10140 (scan_xcoff_symtab): Likewise.
10142 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10144 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10145 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10146 (ia64_access_reg): Use get_frame_register_unsigned.
10147 (ia64_access_rse_reg): Likewise.
10148 (ia64_libunwind_frame_prev_register): Likewise.
10150 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10152 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10153 * gdbarch.c: Regenerated.
10154 * gdbarch.h: Regenerated.
10155 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10156 visibility external.
10157 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10158 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10159 (enum cfa_how_kind): Move to ...
10160 (struct dwarf2_frame_state_reg_info): Likewise.
10161 (struct dwarf2_frame_state): Likewise.
10162 * dwarf2-frame.h: ... here.
10163 (dwarf2_frame_state_alloc_regs): New declaration.
10164 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10165 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10167 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10169 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10170 regcache_raw_read_unsigned.
10171 (xtensa_pseudo_register_write): Likewise.
10173 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10175 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10176 (nds32_pseudo_register_write): Likewise.
10178 2017-04-25 Yao Qi <yao.qi@linaro.org>
10180 * regcache.c (struct regcache) <readonly_p>: Change its type
10182 (regcache_xmalloc_1): Update parameter type and callers update.
10184 2017-04-25 Yao Qi <yao.qi@linaro.org>
10186 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10187 set_gdbarch_wchar_bit.
10188 * arm-tdep.c (arm_gdbarch_init): Likewise.
10190 2017-04-25 Pedro Alves <palves@redhat.com>
10192 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10193 (BothAreRelocatable, memcopy, memmove): Don't define.
10194 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10197 2017-04-25 Pedro Alves <palves@redhat.com>
10199 * common/common-defs.h: Include "common/poison.h".
10200 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10202 * common/poison.h: New file.
10203 * common/traits.h: Include <type_traits>.
10204 (Not, Or, Requires): New, moved from common/function-view.h.
10206 2017-04-25 Pedro Alves <palves@redhat.com>
10208 * breakpoint.h (struct breakpoint): In-class initialize all
10209 fields. Make boolean fields "bool".
10210 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10211 memset call and initializations no longer necessary.
10213 2017-04-25 Pedro Alves <palves@redhat.com>
10215 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10217 (pt_btrace_insn): New function.
10218 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10220 2017-04-25 Pedro Alves <palves@redhat.com>
10222 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10223 "base" field and inherit from "bp_location" instead. Add
10225 (allocate_location_exception): Use new non-default ctor.
10226 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10227 (init_bp_location): Convert to ...
10228 (bp_location::bp_location): ... this new ctor, and remove memset
10230 (base_breakpoint_allocate_location): Use the new non-default ctor.
10231 * breakpoint.h (bp_location): Now a class. Declare default and
10232 non-default ctors. In-class initialize all members.
10233 (init_bp_location): Remove declaration.
10235 2017-04-25 Pedro Alves <palves@redhat.com>
10237 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10238 assignment operator.
10240 2017-04-24 Yao Qi <yao.qi@linaro.org>
10242 * doublest.c (convert_doublest_to_floatformat): Call
10243 floatformat_totalsize_bytes.
10245 2017-04-22 Tom Tromey <tom@tromey.com>
10247 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10249 * stack.c (print_frame): Use ui_out_emit_list.
10250 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10252 * mi/mi-main.c (print_one_inferior)
10253 (mi_cmd_data_list_register_names)
10254 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10255 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10257 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10258 (mi_output_solib_attribs): Use ui_out_emit_list,
10260 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10261 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10262 (mi_cmd_stack_list_args, list_args_or_locals): Use
10264 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10265 * breakpoint.c (print_solib_event, output_thread_groups): Use
10268 2017-04-22 Tom Tromey <tom@tromey.com>
10270 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10271 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10272 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10274 2017-04-22 Tom Tromey <tom@tromey.com>
10276 * tracepoint.c (tvariables_info_1)
10277 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10279 2017-04-22 Tom Tromey <tom@tromey.com>
10281 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10282 annotate_arg_emitter.
10283 * breakpoint.c (print_mention_watchpoint)
10284 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10285 * annotate.h (struct annotate_arg_emitter): New.
10287 2017-04-22 Tom Tromey <tom@tromey.com>
10289 * record-btrace.c (record_btrace_insn_history)
10290 (record_btrace_insn_history_range, record_btrace_call_history)
10291 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10292 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10294 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10295 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10296 * skip.c (skip_info): Use ui_out_emit_tuple.
10297 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10298 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10299 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10300 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10301 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10303 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10304 (output_register, mi_cmd_data_read_memory)
10305 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10306 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10307 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10308 Use ui_out_emit_tuple.
10309 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10311 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10312 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10313 * linux-thread-db.c (info_auto_load_libthread_db): Use
10315 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10316 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10317 * disasm.c (do_mixed_source_and_assembly_deprecated)
10318 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10319 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10320 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10321 * breakpoint.c (print_one_breakpoint_location)
10322 (print_one_breakpoint): Use ui_out_emit_tuple.
10323 * auto-load.c (print_script, info_auto_load_cmd): Use
10325 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10327 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10329 * thread.c (print_thread_info_1): Remove dead code.
10331 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10333 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10335 * arm-tdep.c (selftests::arm_record_test): Likewise.
10337 2017-04-21 Yao Qi <yao.qi@linaro.org>
10339 * regcache.c (regcache_restore): Remove argument 2. Replace
10340 argument 3 with regcache. Get register status from
10341 src->register_status and get register contents from
10342 register_buffer (src, regnum).
10343 (regcache_cpy): Update.
10345 2017-04-19 Pedro Alves <palves@redhat.com>
10347 * gdbthread.h (thread): Add missing closing parenthesis in
10350 2017-04-19 Pedro Alves <palves@redhat.com>
10352 * common/refcounted-object.h: New file.
10353 * gdbthread.h: Include "common/refcounted-object.h".
10354 (thread_info): Inherit from refcounted_object and add comments.
10355 (thread_info::incref, thread_info::decref)
10356 (thread_info::m_refcount): Delete.
10357 (thread_info::deletable): Use the refcounted_object::refcount()
10359 * inferior.c (current_inferior_): Add comment.
10360 (set_current_inferior): Increment/decrement refcounts.
10361 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10362 not-deletable instead of comparing with the current inferior.
10363 (initialize_inferiors): Increment the initial inferior's refcount.
10364 * inferior.h (struct inferior): Forward declare.
10365 Include "common/refcounted-object.h".
10366 (current_inferior, set_current_inferior): Move declaration to
10367 before struct inferior's definition, and fix comment.
10368 (inferior): Inherit from refcounted_object. Add comments.
10369 * thread.c (switch_to_thread_no_regs): Reference the thread's
10370 inferior pointer directly instead of doing a ptid lookup.
10371 (switch_to_no_thread): New function.
10372 (switch_to_thread(thread_info *)): New function, factored out
10374 (switch_to_thread(ptid_t)): ... this.
10375 (restore_current_thread): Delete.
10376 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10377 fields, and add 'inf' field.
10378 (do_restore_current_thread_cleanup): Check whether old->inf is
10379 alive instead of looking up an inferior by ptid. Use
10380 switch_to_thread and switch_to_no_thread.
10381 (restore_current_thread_cleanup_dtor): Use old->inf directly
10382 instead of lookup up an inferior by id. Decref the inferior.
10383 Don't restore 'removable'.
10384 (make_cleanup_restore_current_thread): Same the inferior pointer
10385 in old, instead of the inferior number. Incref the inferior.
10386 Don't save/clear 'removable'.
10388 2017-04-19 Pedro Alves <palves@redhat.com>
10390 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10391 unittests/scoped_restore-selftests.c.
10392 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10393 * common/scoped_restore.h (scoped_restore_base): Make "class".
10394 (scoped_restore_base::release): New public method.
10395 (scoped_restore_base::scoped_restore_base): New protected ctor.
10396 (scoped_restore_base::m_saved_var): New protected field.
10397 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10398 scoped_restore_base base class instead of m_saved_var directly.
10399 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10400 (scoped_restore_tmpl::scoped_restore_tmpl(const
10401 scoped_restore_tmpl<T>&)): Likewise.
10402 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10404 (scoped_restore_tmpl::saved_var): New method.
10405 (scoped_restore_tmpl::m_saved_var): Delete.
10406 * inferior.h (inferior::detaching): Now a bool.
10407 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10409 * unittests/scoped_restore-selftests.c: New file.
10411 2017-04-19 Pedro Alves <palves@redhat.com>
10413 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10414 Re-sort in alphabetic order.
10416 2017-04-18 Pedro Alves <palves@redhat.com>
10418 * xml-support.c (obstack_xml_printf): Delete.
10419 * xml-support.h (obstack_xml_printf): Delete.
10421 2017-04-18 Pedro Alves <palves@redhat.com>
10423 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10424 vdebug, verror, body_text, start_element, end_element, name,
10425 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10426 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10427 is_xinclude>: Make private and add m_ prefix.
10428 (gdb_xml_parser::body_text): New method, based on ...
10429 (gdb_xml_body_text): ... this. Adjust.
10430 (gdb_xml_parser::vdebug): New method, based on ...
10431 (gdb_xml_debug): ... this. Adjust.
10432 (gdb_xml_parser::verror): New method, based on ...
10433 (gdb_xml_error): ... this. Adjust.
10434 (gdb_xml_parser::start_element): New method, based on ...
10435 (gdb_xml_start_element): ... this. Adjust.
10436 (gdb_xml_start_element_wrapper): Defer to
10437 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10438 (gdb_xml_parser::end_element): New method, based on ...
10439 (gdb_xml_end_element_wrapper): ... this. Adjust.
10440 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10441 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10442 (gdb_xml_parser::use_dtd): New method, based on ...
10443 (gdb_xml_use_dtd): ... this. Adjust.
10444 (gdb_xml_parser::parse): New method, based on ...
10445 (gdb_xml_parse): ... this. Adjust.
10446 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10447 (xinclude_start_include): Adjust to call the parser's name method.
10448 (xml_xinclude_default, xml_xinclude_start_doctype)
10449 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10451 (xml_process_xincludes): Adjust to call parser methods.
10452 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10455 2017-04-18 Pedro Alves <palves@redhat.com>
10457 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10458 gdb::optional<std::string>.
10459 * xml-support.c: Include <string>.
10460 (scope_level::scope_level(scope_level &&))
10461 (scope_level::~scope_level): Delete.
10462 (scope_level::body): Now a std::string.
10463 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10464 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10466 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10467 (xinclude_parsing_data::output): Now a std::string reference.
10468 (xinclude_start_include): Adjust.
10469 (xml_xinclude_default): Adjust.
10470 (xml_process_xincludes): Add 'output' parameter, and return bool.
10471 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10473 * xml-tdesc.c: Include <unordered_map> and <string>.
10474 (tdesc_xml_cache): Delete.
10475 (tdesc_xml_cache_s): Delete.
10476 (xml_cache): Now an std::unordered_map.
10477 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10478 (target_fetch_description_xml): Change return type to
10479 gdb::optional<std::string>, and adjust.
10480 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10481 (target_fetch_description_xml): Change return type to
10482 gdb::optional<std::string>.
10484 2017-04-18 Pedro Alves <palves@redhat.com>
10486 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10487 unittests/optional-selftests.c.
10488 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10489 * unittests/optional-selftests.c: New file.
10490 * unittests/optional/assignment/1.cc: New file.
10491 * unittests/optional/assignment/2.cc: New file.
10492 * unittests/optional/assignment/3.cc: New file.
10493 * unittests/optional/assignment/4.cc: New file.
10494 * unittests/optional/assignment/5.cc: New file.
10495 * unittests/optional/assignment/6.cc: New file.
10496 * unittests/optional/assignment/7.cc: New file.
10497 * unittests/optional/cons/copy.cc: New file.
10498 * unittests/optional/cons/default.cc: New file.
10499 * unittests/optional/cons/move.cc: New file.
10500 * unittests/optional/cons/value.cc: New file.
10501 * unittests/optional/in_place.cc: New file.
10502 * unittests/optional/observers/1.cc: New file.
10503 * unittests/optional/observers/2.cc: New file.
10505 2017-04-18 Pedro Alves <palves@redhat.com>
10507 * common/gdb_optional.h: Include common/traits.h.
10508 (in_place_t): New type.
10509 (in_place): New constexpr variable.
10510 (optional::optional): Remove member initialization of
10512 (optional::optional(in_place_t...)): New constructor.
10513 (optional::~optional): Use reset.
10514 (optional::optional(const optional&)): New.
10515 (optional::optional(const optional&&)): New.
10516 (optional::optional(T &)): New.
10517 (optional::optional(T &&)): New.
10518 (operator::operator=(const optional &)): New.
10519 (operator::operator=(optional &&)): New.
10520 (operator::operator= (const T &))
10521 (operator::operator= (T &&))
10522 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10523 (operator::reset): New.
10524 (operator::m_instantiated):: Add in-class initializer.
10525 * common/traits.h: Include <type_traits>.
10526 (struct And): New types.
10528 2017-04-18 Pedro Alves <palves@redhat.com>
10530 * xml-support.c: Include <vector>.
10531 (scope_level::scope_level(const gdb_xml_element *))
10532 (scope_level::scope_level(scope_level&&)): New.
10533 (scope_level::~scope_level): New.
10534 (scope_level_s): Delete.
10535 (gdb_xml_parser::scopes): Now a std::vector.
10536 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10538 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10539 scope cleanup code.
10540 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10541 of the scopes member. Use std::vector::emplace_back.
10543 2017-04-18 Pedro Alves <palves@redhat.com>
10545 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10547 (gdb_xml_end_element): Change type of first parameter.
10548 (gdb_xml_cleanup): Rename to ...
10549 (gdb_xml_parser::~gdb_xml_parser): ... this.
10550 (gdb_xml_create_parser_and_cleanup): Delete with ...
10551 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10553 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10554 using gdb_xml_create_parser_and_cleanup.
10555 (xinclude_parsing_data): Add ctor/dtor.
10556 (xml_xinclude_cleanup): Delete.
10557 (xml_process_xincludes): Create a local xinclude_parsing_data
10558 instead of heap-allocating one. Create a local gdb_xml_parser
10559 instead of heap-allocating one with
10560 gdb_xml_create_parser_and_cleanup.
10562 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10565 * fbsd-nat.c (resume_one_thread_cb): Remove.
10566 (resume_all_threads_cb): Remove.
10567 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10568 iterate_over_threads.
10570 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10572 * NEWS: Create a new section for the next release branch.
10573 Rename the section of the current branch, now that it has
10576 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10578 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10579 * version.in: Bump version to 8.0.50.DATE-git.
10581 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10584 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10585 independently of the host, and fix build breakage on Cygwin.
10587 2017-04-13 Pedro Alves <palves@redhat.com>
10589 * inferior.c (free_inferior): Convert to ...
10590 (inferior::~inferior): ... this dtor.
10591 (inferior::inferior): New ctor, factored out from ...
10592 (add_inferior_silent): ... here. Allocate the inferior with a new
10594 (delete_inferior): Call delete instead of free_inferior.
10595 * inferior.h (gdb_environ, continuation): Forward declare.
10596 (inferior): Now a class. Add in-class initialization to all
10597 members. Make boolean fields bool, except 'detaching'.
10598 (inferior::inferior): New explicit ctor.
10599 (inferior::~inferior): New.
10601 2017-04-13 Pedro Alves <palves@redhat.com>
10603 * inferior.c (init_inferior_list): Delete.
10604 * inferior.h (init_inferior_list): Delete.
10606 2017-04-13 Pedro Alves <palves@redhat.com>
10609 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10610 (top level): Call it twice, with different thread sets.
10612 2017-04-13 Pedro Alves <palves@redhat.com>
10614 * thread.c: Include <algorithm>.
10615 (thread_array_cleanup): Delete.
10616 (scoped_inc_dec_ref): New class.
10617 (live_threads_count): New function.
10618 (set_thread_refcount): Delete.
10619 (tp_array_compar_ascending): Now a bool.
10620 (tp_array_compar): Convert to a std::sort comparison function.
10621 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10622 and live_threads_count.
10624 2017-04-13 Pedro Alves <palves@redhat.com>
10626 * infrun.c (follow_fork_inferior): Also switch the current
10629 2017-04-13 Pedro Alves <palves@redhat.com>
10631 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10632 before calling create_internal_breakpoint.
10634 2017-04-13 Pedro Alves <palves@redhat.com>
10636 * fork-child.c (execv_argv): New class.
10637 (breakup_args): Refactored as ...
10638 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10639 Copy arguments to storage and replace separators with NULL
10640 terminators in place.
10641 (escape_bang_in_quoted_argument): Adjust to return bool.
10642 (execv_argv::execv_argv): New ctor.
10643 (execv_argv::init_for_shell): New method, factored out from
10644 fork_inferior. Don't strdup strings into the vector.
10645 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10646 Remove free_vector_argv call.
10648 2017-04-13 Yao Qi <yao.qi@linaro.org>
10650 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10653 2017-04-13 Yao Qi <yao.qi@linaro.org>
10655 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10656 * rx-tdep.c (rx_gdbarch_init): Likewise.
10658 2017-04-13 Pedro Alves <palves@redhat.com>
10660 * breakpoint.h (struct breakpoint): Reindent.
10662 2017-04-13 Pedro Alves <palves@redhat.com>
10664 * breakpoint.c (bp_location): Rename to ...
10665 (bp_locations): ... this. All references updated.
10666 (bp_location_count): Rename to ...
10667 (bp_locations_count): ... this. All references updated.
10668 (bp_location_placed_address_before_address_max): Rename to ...
10669 (bp_locations_placed_address_before_address_max): ... this. All
10670 references updated.
10671 (bp_location_shadow_len_after_address_max): Rename to ...
10672 (bp_locations_shadow_len_after_address_max): ... this. All
10673 references updated.
10674 (bp_location_compare_addrs): Rename to ...
10675 (bp_locations_compare_addrs): ... this. All references updated.
10676 (bp_location_compare):Rename to ...
10677 (bp_locations_compare): ... this. All references updated.
10678 (bp_location_target_extensions_update): Rename to ...
10679 (bp_locations_target_extensions_update): ... this. All references
10682 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10684 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10685 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10687 * common/gdb_termios.h: New file, with parts of "terminal.h".
10688 * inflow.c: Include "gdb_termios.h".
10689 * ser-unix.c: Include "gdb_termios.h".
10690 * terminal.h: Move terminal-related defines to
10691 "common/gdb_termios.h".
10693 2017-04-12 Tom Tromey <tom@tromey.com>
10695 * probe.c (parse_probes): Update.
10696 * location.h (delete_event_location): Don't declare.
10697 (event_location_deleter::operator()): Update.
10698 * location.c (event_location_deleter::operator()): Rename from
10699 delete_event_location.
10700 * linespec.h (linespec_result) <location>: Change type to
10702 * linespec.c (canonicalize_linespec, event_location_to_sals)
10703 (decode_objc): Update.
10704 (linespec_result): Don't call delete_event_location.
10705 * breakpoint.c (create_breakpoints_sal)
10706 (bkpt_probe_create_sals_from_location)
10707 (strace_marker_create_sals_from_location): Update.
10709 2017-04-12 Tom Tromey <tom@tromey.com>
10711 * linespec.h (struct linespec_result): Add constructor and
10713 (init_linespec_result, destroy_linespec_result)
10714 (make_cleanup_destroy_linespec_result): Don't declare.
10715 * linespec.c (init_linespec_result): Remove.
10716 (linespec_result::~linespec_result): Rename from
10717 destroy_linespec_result. Update.
10718 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10720 * breakpoint.c (create_breakpoint, break_range_command)
10721 (decode_location_default): Update.
10722 * ax-gdb.c (agent_command_1): Update.
10724 2017-04-12 Tom Tromey <tom@tromey.com>
10726 * remote.c (remote_download_tracepoint): Update.
10727 * python/py-breakpoint.c (bppy_get_location): Update.
10728 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10729 (gdbscm_breakpoint_location): Update.
10730 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10731 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10732 Change type to event_location_up.
10733 * breakpoint.c (create_overlay_event_breakpoint)
10734 (create_longjmp_master_breakpoint)
10735 (create_std_terminate_master_breakpoint)
10736 (create_exception_master_breakpoint)
10737 (breakpoint_event_location_empty_p, print_breakpoint_location)
10738 (print_one_breakpoint_location, create_thread_event_breakpoint)
10739 (init_breakpoint_sal, create_breakpoint)
10740 (print_recreate_ranged_breakpoint, break_range_command)
10741 (init_ada_exception_breakpoint, say_where): Update.
10742 (base_breakpoint_dtor): Don't call delete_event_location.
10743 (bkpt_print_recreate, tracepoint_print_recreate)
10744 (dprintf_print_recreate, update_static_tracepoint)
10745 (breakpoint_re_set_default): Update.
10747 2017-04-12 Tom Tromey <tom@tromey.com>
10749 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10750 type of "to_do". Update.
10751 (compute_stack_depth): Use std::vector.
10753 2017-04-12 Tom Tromey <tom@tromey.com>
10755 * printcmd.c (find_instruction_backward): Use std::vector.
10757 2017-04-12 Tom Tromey <tom@tromey.com>
10759 * symfile.c (objfilep): Remove typedef.
10760 (reread_symbols): Use a std::vector.
10762 2017-04-12 Tom Tromey <tom@tromey.com>
10764 * mi/mi-main.c (exec_direction_forward): Remove.
10765 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10766 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10768 * guile/guile.c (guile_repl_command, guile_command)
10769 (gdbscm_execute_gdb_command): Use scoped_restore.
10770 * go-exp.y (go_parse): Use scoped_restore.
10771 * d-exp.y (d_parse): Use scoped_restore.
10772 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10773 * c-exp.y (c_parse): Use scoped_restore.
10775 2017-04-12 Tom Tromey <tom@tromey.com>
10777 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10778 (mi_parse): Update return type.
10779 (mi_parse_free): Remove.
10780 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10781 (mi_parse::~mi_parse): Rename from mi_parse_free.
10782 (mi_parse_cleanup): Remove.
10783 (mi_parse): Return a unique_ptr. Use new.
10784 * mi/mi-main.c (mi_execute_command): Update.
10786 2017-04-12 Tom Tromey <tom@tromey.com>
10788 * location.c (explicit_location_lex_one): Return a
10789 unique_xmalloc_ptr.
10790 (string_to_explicit_location): Update. Remove cleanups.
10792 2017-04-12 Tom Tromey <tom@tromey.com>
10794 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10795 (compare_value_and_voffset): Change type. Update.
10796 (compute_vtable_size): Change type of "offset_vec".
10797 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10798 (gnuv3_get_typeid): Remove extraneous declaration.
10800 2017-04-12 Tom Tromey <tom@tromey.com>
10802 * charset.h (wchar_iterator): Fix comment.
10804 2017-04-12 Tom Tromey <tom@tromey.com>
10806 * charset.c (iconv_wrapper): New class.
10807 (cleanup_iconv): Remove.
10808 (convert_between_encodings): Use it.
10810 2017-04-12 Tom Tromey <tom@tromey.com>
10812 * symfile.h (increment_reading_symtab): Update type.
10813 * symfile.c (decrement_reading_symtab): Remove.
10814 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10815 * psymtab.c (psymtab_to_symtab): Update.
10816 * dwarf2read.c (dw2_instantiate_symtab): Update.
10818 2017-04-12 Tom Tromey <tom@tromey.com>
10820 * jit.c (struct jit_reader): Declare separately. Add constructor
10821 and destructor. Change type of "handle".
10822 (loaded_jit_reader): Define separately.
10823 (jit_reader_load): Update. New "new".
10824 (jit_reader_unload_command): Use "delete".
10825 * gdb-dlfcn.h (struct dlclose_deleter): New.
10826 (gdb_dlhandle_up): New typedef.
10827 (gdb_dlopen, gdb_dlsym): Update types.
10828 (gdb_dlclose): Remove.
10829 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10830 (gdb_dlsym): Change type of "handle".
10831 (make_cleanup_dlclose): Remove.
10832 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10833 * compile/compile-c-support.c (load_libcc): Update.
10835 2017-04-12 Tom Tromey <tom@tromey.com>
10837 * symtab.h (find_pcs_for_symtab_line): Change return type.
10838 * symtab.c (find_pcs_for_symtab_line): Change return type.
10839 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10840 type of "vec". Update.
10841 (ltpy_get_pcs_for_line): Update.
10842 * linespec.c (decode_digits_ordinary): Update.
10844 2017-04-12 Tom Tromey <tom@tromey.com>
10846 * tracepoint.c (actions_command): Update.
10847 * python/python.c (python_command, python_interactive_command):
10849 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10850 * guile/guile.c (guile_command): Update.
10851 * defs.h (read_command_lines, read_command_lines_1): Return
10853 (command_lines_deleter): New struct.
10854 (command_line_up): New typedef.
10855 * compile/compile.c (compile_code_command)
10856 (compile_print_command): Update.
10857 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10859 (make_cleanup_free_command_lines): Remove.
10860 * cli/cli-script.c (get_command_line, read_command_lines_1)
10861 (copy_command_lines): Return command_line_up.
10862 (while_command, if_command, read_command_lines, define_command)
10863 (document_command): Update.
10864 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10866 * breakpoint.h (breakpoint_set_commands): Change type of
10868 * breakpoint.c (breakpoint_set_commands): Change type of
10869 "commands". Update.
10870 (do_map_commands_command, update_dprintf_command_list)
10871 (create_tracepoint_from_upload): Update.
10873 2017-04-12 Tom Tromey <tom@tromey.com>
10875 * tracepoint.c (scope_info): Update.
10876 * spu-tdep.c (spu_catch_start): Update.
10877 * python/python.c (gdbpy_decode_line): Update.
10878 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10879 * python/py-breakpoint.c (bppy_init): Update.
10880 * probe.c (parse_probes): Update.
10881 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10882 * location.h (event_location_deleter): New struct.
10883 (event_location_up): New typedef.
10884 (new_linespec_location, new_address_location, new_probe_location)
10885 (new_explicit_location, copy_event_location)
10886 (string_to_event_location, string_to_event_location_basic)
10887 (string_to_explicit_location): Update return type.
10888 (make_cleanup_delete_event_location): Remove.
10889 * location.c (new_linespec_location, new_address_location)
10890 (new_probe_location, new_explicit_location, copy_event_location):
10891 Return event_location_up.
10892 (delete_event_location_cleanup)
10893 (make_cleanup_delete_event_location): Remove.
10894 (string_to_explicit_location, string_to_event_location_basic)
10895 (string_to_event_location): Return event_location_up.
10896 * linespec.c (canonicalize_linespec, event_location_to_sals)
10897 (decode_line_with_current_source)
10898 (decode_line_with_last_displayed, decode_objc): Update.
10899 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10900 * completer.c (location_completer): Update.
10901 * cli/cli-cmds.c (edit_command, list_command): Update.
10902 * breakpoint.c (create_overlay_event_breakpoint)
10903 (create_longjmp_master_breakpoint)
10904 (create_std_terminate_master_breakpoint)
10905 (create_exception_master_breakpoint)
10906 (create_thread_event_breakpoint): Update.
10907 (init_breakpoint_sal): Update. Remove some dead code.
10908 (create_breakpoint_sal): Change type of "location". Update.
10909 (create_breakpoints_sal, create_breakpoint, break_command_1)
10910 (dprintf_command, break_range_command, until_break_command)
10911 (init_ada_exception_breakpoint)
10912 (strace_marker_create_sals_from_location)
10913 (update_static_tracepoint, trace_command, ftrace_command)
10914 (strace_command, create_tracepoint_from_upload): Update.
10915 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10916 * ax-gdb.c (agent_command_1): Update.
10918 2017-04-12 Pedro Alves <palves@redhat.com>
10920 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10921 * configure.tgt: Handle i[34567]86-*-go32* and
10922 i[34567]86-*-msdosdjgpp*.
10923 * i386-tdep.c (i386_svr4_reg_to_regnum):
10925 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10927 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10928 * i386-go32-tdep.c: New file.
10929 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10932 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10934 * aix-thread.c (pd_status2str): Change return type to const char *.
10936 2017-04-12 Pedro Alves <palves@redhat.com>
10938 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10939 calls to set_gdbarch_gnu_triplet_regexp.
10941 2017-04-12 Pedro Alves <palves@redhat.com>
10944 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10946 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10947 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10948 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10949 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10950 * gdbarch.h, gdbarch.c: Regenerate.
10951 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10952 gdbarch_wchar_bit and gdbarch_wchar_signed.
10953 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10954 * arm-tdep.c (arm_gdbarch_init): Likewise.
10955 * avr-tdep.c (avr_gdbarch_init): Likewise.
10956 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10957 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10958 * i386-tdep.c (i386_go32_init_abi): Likewise.
10959 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10960 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10961 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10962 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10963 * sh-tdep.c (sh_gdbarch_init): Likewise.
10964 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10965 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10966 * windows-tdep.c (windows_init_abi): Likewise.
10967 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10969 2017-04-12 Pedro Alves <palves@redhat.com>
10972 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10973 cplus_primitive_type_char32_t>: New enum values.
10974 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10975 and cplus_primitive_type_char32_t.
10976 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10977 32, use the archtecture's built-in type for char16_t and char32_t,
10978 respectively. Otherwise, fallback to init_integer_type as before,
10979 but make the type unsigned, and issue a complaint.
10980 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10982 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10984 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10985 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10987 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10989 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10992 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10994 * common/common-utils.c (free_vector_argv): New function.
10995 * common/common-utils.h: Include <vector>.
10996 (free_vector_argv): New prototype.
10997 * darwin-nat.c (darwin_create_inferior): Rewrite function
10998 prototype in order to constify "exec_file" and accept a
10999 "std::string" for "allargs".
11000 * fork-child.c: Include <vector>.
11001 (breakup_args): Rewrite function, using C++.
11002 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11003 and accept "std::string" for "allargs". Update the code to
11004 calculate "argv" based on "allargs". Update calls to "exec_fun"
11006 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11007 order to constify "exec_file" and accept a "std::string" for
11009 * go32-nat.c (go32_create_inferior): Likewise.
11010 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11011 * infcmd.c (run_command_1): Constify "exec_file". Use
11012 "std::string" for inferior arguments.
11013 * inferior.h (fork_inferior): Update prototype.
11014 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11015 prototype in order to constify "exec_file" and accept a
11016 "std::string" for "allargs".
11017 * nto-procfs.c (procfs_create_inferior): Likewise.
11018 * procfs.c (procfs_create_inferior): Likewise.
11019 * remote-sim.c (gdbsim_create_inferior): Likewise.
11020 * remote.c (extended_remote_run): Update code to accept
11021 "std::string" as argument.
11022 (extended_remote_create_inferior): Rewrite function prototype in
11023 order to constify "exec_file" and accept a "std::string" for
11025 * rs6000-nat.c (super_create_inferior): Likewise.
11026 (rs6000_create_inferior): Likewise.
11027 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11028 * windows-nat.c (windows_create_inferior): Likewise.
11030 2017-04-11 Pedro Alves <palves@redhat.com>
11032 * thread.c: Fix whitespace throughout.
11034 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11036 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11038 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11040 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11042 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11045 * osdata.c (info_osdata): Check if 'type' is an empty string
11048 2017-04-10 Pedro Alves <palves@redhat.com>
11050 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11051 (ptid_to_global_thread_id, in_thread_list)
11052 (do_captured_list_thread_ids, set_resumed, set_running)
11053 (set_executing, set_stop_requested, finish_thread_state)
11054 (validate_registers_access, can_access_registers_ptid)
11055 (print_thread_info_1, switch_to_thread)
11056 (do_restore_current_thread_cleanup)
11057 (make_cleanup_restore_current_thread, thread_command)
11058 (thread_name_command): Use operator== instead of ptid_equal.
11060 2017-04-10 Pedro Alves <palves@redhat.com>
11062 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11063 (current_thread_cleanup_chain): Delete.
11064 (restore_current_thread_cleanup_dtor)
11065 (make_cleanup_restore_current_thread): Remove references to
11066 current_thread_cleanup_chain.
11068 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11070 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11073 2017-04-10 Yao Qi <yao.qi@linaro.org>
11076 * gdbthread.h (thread_info::deletable): New method.
11077 (thread_info::incref): New method.
11078 (thread_info::decref): New method.
11079 (thread_info::refcount): Move it to private.
11080 * infrun.c (save_stop_context): Call inc_refcount.
11081 (release_stop_context_cleanup): Likewise.
11082 * thread.c (set_thread_exited): New function.
11083 (init_thread_list): Delete "tp" only it is deletable, otherwise
11084 call set_thread_exited.
11085 (delete_thread_1): Call set_thread_exited.
11086 (current_thread_cleanup) <inferior_pid>: Remove.
11087 <thread>: New field.
11088 (restore_current_thread_ptid_changed): Removed.
11089 (do_restore_current_thread_cleanup): Adjust.
11090 (restore_current_thread_cleanup_dtor): Don't call
11092 (set_thread_refcount): Use dec_refcount.
11093 (make_cleanup_restore_current_thread): Adjust.
11094 (thread_apply_all_command): Call inc_refcount.
11095 (_initialize_thread): Don't call
11096 observer_attach_thread_ptid_changed.
11098 2017-04-10 Yao Qi <yao.qi@linaro.org>
11100 * thread.c (delete_thread_1): Hoist code on marking thread as
11103 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11105 * windows-nat.c (windows_detach): Initialize ptid with
11108 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11110 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11112 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11114 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11115 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11116 (bfin_pseudo_register_write): Likewise
11118 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11120 * common/ptid.h (struct ptid): Change to...
11121 (class ptid_t): ... this.
11122 <ptid_t>: New constructors.
11123 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11124 matches>: New methods.
11125 <make_null, make_minus_one>: New static methods.
11126 <pid>: Rename to...
11128 <lwp>: Rename to...
11130 <tid>: Rename to...
11132 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11133 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11134 as references, move comment to class ptid_t.
11135 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11136 ptid_t static methods.
11137 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11138 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11139 Take ptid arguments as references, implement using ptid_t methods.
11140 * unittests/ptid-selftests.c: New file.
11141 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11142 unittests/ptid-selftests.c.
11143 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11145 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11147 * python/python.c (python_run_simple_file): Cast mode literal to
11148 non-const char pointer as expected by PyFile_FromString.
11150 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11152 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11153 minus_one_ptid and null_ptid.
11155 2017-04-05 Pedro Alves <palves@redhat.com>
11157 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11158 * configure: Regenerate.
11160 2017-04-05 Pedro Alves <palves@redhat.com>
11162 * ada-exp.y (yyerror): Constify.
11163 * ada-lang.c (bound_name, get_selections)
11164 (ada_variant_discrim_type)
11165 (ada_variant_discrim_name, ada_value_struct_elt)
11166 (ada_lookup_struct_elt_type, is_unchecked_variant)
11167 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11168 (catch_ada_exception_command_split)
11169 (catch_ada_assert_command_split, catch_assert_command)
11170 (ada_op_name): Constify.
11171 * ada-lang.h (ada_yyerror, get_selections)
11172 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11173 * arc-tdep.c (arc_print_frame_cache): Constify.
11174 * arm-tdep.c (arm_skip_stub): Constify.
11175 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11176 (gen_aggregate_elt_ref): Constify.
11177 * bcache.c (print_bcache_statistics): Constify.
11178 * bcache.h (print_bcache_statistics): Constify.
11179 * break-catch-throw.c (catch_exception_command_1):
11180 * breakpoint.c (struct ep_type_description::description):
11182 (add_solib_catchpoint): Constify.
11183 (catch_fork_command_1): Add cast.
11184 (add_catch_command): Constify.
11185 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11187 * bsd-uthread.c (bsd_uthread_state): Constify.
11188 * buildsym.c (patch_subfile_names): Constify.
11189 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11191 * c-exp.y (yyerror): Constify.
11192 (token::oper): Constify.
11193 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11194 * c-varobj.c (cplus_describe_child): Constify.
11195 * charset.c (find_charset_names): Add cast.
11196 (find_charset_names): Constify array and add const_cast.
11197 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11198 (edit_command): Constify.
11199 * cli/cli-decode.c (lookup_cmd): Constify.
11200 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11202 (struct dump_context): Constify.
11203 (add_dump_command, restore_command): Constify.
11204 * cli/cli-script.c (get_command_line): Constify.
11205 * cli/cli-script.h (get_command_line): Constify.
11206 * cli/cli-utils.c (check_for_argument): Constify.
11207 * cli/cli-utils.h (check_for_argument): Constify.
11208 * coff-pe-read.c (struct read_pe_section_data): Constify.
11209 * command.h (lookup_cmd): Constify.
11210 * common/print-utils.c (decimal2str): Constify.
11211 * completer.c (gdb_print_filename): Constify.
11212 * corefile.c (set_gnutarget): Constify.
11213 * cp-name-parser.y (yyerror): Constify.
11214 * cp-valprint.c (cp_print_class_member): Constify.
11215 * cris-tdep.c (cris_register_name, crisv32_register_name):
11217 * d-exp.y (yyerror): Constify.
11218 (struct token::oper): Constify.
11219 * d-lang.h (d_yyerror): Constify.
11220 * dbxread.c (struct header_file_location::name): Constify.
11221 (add_old_header_file, add_new_header_file, last_function_name)
11222 (dbx_next_symbol_text, add_bincl_to_list)
11223 (find_corresponding_bincl_psymtab, set_namestring)
11224 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11225 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11226 * defs.h (command_line_input, print_address_symbolic)
11227 (deprecated_readline_begin_hook): Constify.
11228 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11230 * event-top.c (handle_line_of_input): Constify and add cast.
11231 * exceptions.c (catch_errors): Constify.
11232 * exceptions.h (catch_errors): Constify.
11233 * expprint.c (print_subexp_standard, op_string, op_name)
11234 (op_name_standard, dump_raw_expression, dump_raw_expression):
11235 * expression.h (op_name, op_string, dump_raw_expression):
11237 * f-exp.y (yyerror): Constify.
11238 (struct token::oper): Constify.
11239 (struct f77_boolean_val::name): Constify.
11240 * f-lang.c (f_word_break_characters): Constify.
11241 * f-lang.h (f_yyerror): Constify.
11242 * fork-child.c (fork_inferior): Add cast.
11243 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11244 (new_variant): Constify.
11245 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11246 * gdbarch.c: Regenerate.
11247 * gdbcore.h (set_gnutarget): Constify.
11248 * go-exp.y (yyerror): Constify.
11249 (token::oper): Constify.
11250 * go-lang.h (go_yyerror): Constify.
11251 * go32-nat.c (go32_sysinfo): Constify.
11252 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11253 * guile/scm-cmd.c (cmdscm_function): Constify.
11254 * guile/scm-param.c (pascm_param_value): Constify.
11255 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11256 (h8300sx_register_name): Constify.
11257 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11259 * ia64-tdep.c (ia64_register_names): Constify.
11260 * infcmd.c (construct_inferior_arguments): Constify.
11261 (path_command, attach_post_wait): Constify.
11262 * language.c (show_range_command, show_case_command)
11263 (unk_lang_error): Constify.
11264 * language.h (language_defn::la_error)
11265 (language_defn::la_name_of_this): Constify.
11266 * linespec.c (decode_line_2): Constify.
11267 * linux-thread-db.c (thread_db_err_str): Constify.
11268 * lm32-tdep.c (lm32_register_name): Constify.
11269 * m2-exp.y (yyerror): Constify.
11270 * m2-lang.h (m2_yyerror): Constify.
11271 * m32r-tdep.c (m32r_register_names): Constify and make static.
11272 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11273 * m88k-tdep.c (m88k_register_name): Constify.
11274 * macroexp.c (appendmem): Constify.
11275 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11276 (upgrade_type, parse_external, parse_partial_symbols)
11277 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11278 (new_symbol): Constify.
11279 * memattr.c (mem_info_command): Constify.
11280 * mep-tdep.c (register_name_from_keyword): Constify.
11281 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11283 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11284 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11285 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11287 (mi_execute_async_cli_command): Constify.
11288 * mips-tdep.c (mips_register_name): Constify.
11289 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11290 (am33_register_name, am33_2_register_name)
11291 * moxie-tdep.c (moxie_register_names): Constify.
11292 * nat/linux-osdata.c (osdata_type): Constify fields.
11293 * nto-tdep.c (nto_parse_redirection): Constify.
11294 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11295 (lookup_child_selector): Constify.
11296 (objc_methcall::name): Constify.
11297 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11298 (lookup_struct_typedef): Constify.
11299 * objfiles.c (pc_in_section): Constify.
11300 * objfiles.h (pc_in_section): Constify.
11301 * p-exp.y (struct token::oper): Constify.
11302 (yyerror): Constify.
11303 * p-lang.h (pascal_yyerror): Constify.
11304 * parser-defs.h (op_name_standard): Constify.
11305 (op_print::string): Constify.
11306 (exp_descriptor::op_name): Constify.
11307 * printcmd.c (print_address_symbolic): Constify.
11308 * psymtab.c (print_partial_symbols): Constify.
11309 * python/py-breakpoint.c (stop_func): Constify.
11310 (bppy_get_expression): Constify.
11311 * python/py-cmd.c (cmdpy_completer::name): Constify.
11312 (cmdpy_function): Constify.
11313 * python/py-event.c (evpy_add_attribute)
11314 (gdbpy_initialize_event_generic): Constify.
11315 * python/py-event.h (evpy_add_attribute)
11316 (gdbpy_initialize_event_generic): Constify.
11317 * python/py-evts.c (add_new_registry): Constify.
11318 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11319 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11320 * python/py-inferior.c (get_buffer): Add cast.
11321 * python/py-param.c (parm_constant::name): Constify.
11322 * python/py-unwind.c (fprint_frame_id): Constify.
11323 * python/python.c (gdbpy_parameter_value): Constify.
11324 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11325 * remote.c (memory_packet_config::name): Constify.
11326 (show_packet_config_cmd, remote_write_bytes)
11327 (remote_buffer_add_string):
11328 * reverse.c (exec_reverse_once): Constify.
11329 * rs6000-tdep.c (variant::name, variant::description): Constify.
11330 * rust-exp.y (rustyyerror): Constify.
11331 * rust-lang.c (rust_op_name): Constify.
11332 * rust-lang.h (rustyyerror): Constify.
11333 * serial.h (serial_ops::name): Constify.
11334 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11335 (sh_sh3e_register_name, sh_sh2e_register_name)
11336 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11337 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11338 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11339 (sh_sh4al_dsp_register_name): Constify.
11340 * sh64-tdep.c (sh64_register_name): Constify.
11341 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11342 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11343 * stabsread.c (patch_block_stabs, read_type_number)
11344 (ref_map::stabs, ref_add, process_reference)
11345 (symbol_reference_defined, define_symbol, define_symbol)
11346 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11347 (read_one_struct_field, read_struct_fields, read_baseclasses)
11348 (read_tilde_fields, read_struct_type, read_array_type)
11349 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11350 (read_huge_number, read_range_type, read_args, common_block_start)
11351 (find_name_end): Constify.
11352 * stabsread.h (common_block_start, define_symbol)
11353 (process_one_symbol, symbol_reference_defined, ref_add):
11354 * symfile.c (get_section_index, add_symbol_file_command):
11355 * symfile.h (get_section_index): Constify.
11356 * target-descriptions.c (tdesc_type::name): Constify.
11357 (tdesc_free_type): Add cast.
11358 * target.c (find_default_run_target):
11359 (add_deprecated_target_alias, find_default_run_target)
11360 (target_announce_detach): Constify.
11361 (do_option): Constify.
11362 * target.h (add_deprecated_target_alias): Constify.
11363 * thread.c (print_thread_info_1): Constify.
11364 * top.c (deprecated_readline_begin_hook, command_line_input):
11366 (init_main): Add casts.
11367 * top.h (handle_line_of_input): Constify.
11368 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11369 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11370 (tfind_command): Rename to ...
11371 (tfind_command_1): ... this and constify.
11372 (tfind_command): New function.
11373 (tfind_end_command, tfind_start_command): Adjust.
11374 (encode_source_string): Constify.
11375 * tracepoint.h (encode_source_string): Constify.
11376 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11377 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11378 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11379 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11380 * tui/tui-win.c (parse_scrolling_args): Constify.
11381 * tui/tui-windata.c (tui_erase_data_content): Constify.
11382 * tui/tui-windata.h (tui_erase_data_content): Constify.
11383 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11384 * tui/tui.c (tui_enable): Add cast.
11385 * utils.c (defaulted_query): Constify.
11386 (init_page_info): Add cast.
11387 (puts_debug, subset_compare): Constify.
11388 * utils.h (subset_compare): Constify.
11389 * varobj.c (varobj_format_string): Constify.
11390 * varobj.h (varobj_format_string): Constify.
11391 * vax-tdep.c (vax_register_name): Constify.
11392 * windows-nat.c (windows_detach): Constify.
11393 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11394 * xml-support.c (gdb_xml_end_element): Constify.
11395 * xml-tdesc.c (tdesc_start_reg): Constify.
11396 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11397 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11398 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11400 2017-04-05 Pedro Alves <palves@redhat.com>
11402 * proc-api.c (struct trans): Constify.
11403 (procfs_note): Constify.
11404 * proc-events.c (struct trans, syscall_table):
11405 * proc-flags.c (struct trans): Constify.
11406 * proc-utils.h (procfs_note): Constify.
11407 * proc-why.c (struct trans): Constify.
11408 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11409 (procfs_detach): Constify.
11410 * sol-thread.c (struct string_map): Constify.
11411 (td_err_string, td_state_string): Constify.
11413 2017-04-05 Pedro Alves <palves@redhat.com>
11415 * proc-api.c (procfs_filename): Don't initialize
11417 (prepare_to_trace): Assume procfs_filename is non-NULL.
11418 (_initialize_proc_api): Give procfs_filename a default value here.
11420 2017-04-05 Pedro Alves <palves@redhat.com>
11422 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11423 'cond_string' parameter.
11424 (extract_exception_regexp): Constify 'string' parameter.
11425 (catch_exception_command_1): Constify.
11426 * breakpoint.c (init_catchpoint)
11427 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11429 (ep_parse_optional_if_clause, catch_fork_command_1)
11430 (catch_exec_command_1): Constify.
11431 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11433 (ep_parse_optional_if_clause): Constify.
11434 * cli/cli-utils.c (remove_trailing_whitespace)
11435 (check_for_argument): Constify.
11436 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11437 non-const overload.
11438 (check_for_argument): Likewise.
11440 2017-04-05 Pedro Alves <palves@redhat.com>
11442 * event-top.c (command_line_handler): Add cast to execute_command
11444 * record-btrace.c (cmd_record_btrace_bts_start)
11445 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11446 (cmd_record_btrace_start): Add cast to execute_command call.
11447 * record-full.c (record_full_goto_insn):
11448 * record.c (record_start, record_stop): Add cast to
11449 execute_command_to_string calls.
11450 (cmd_record_start): Add cast to execute_command calls.
11452 2017-04-05 Pedro Alves <palves@redhat.com>
11454 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11455 static inline function.
11456 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11457 array and use gdb_PyArg_ParseTupleAndKeywords.
11458 * python/py-cmd.c (cmdpy_init): Likewise.
11459 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11460 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11461 (infpy_search_memory): Likewise.
11462 * python/py-objfile.c (objfpy_add_separate_debug_file)
11463 (gdbpy_lookup_objfile): Likewise.
11464 * python/py-symbol.c (gdbpy_lookup_symbol)
11465 (gdbpy_lookup_global_symbol): Likewise.
11466 * python/py-type.c (gdbpy_lookup_type): Likewise.
11467 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11468 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11471 2017-04-05 Pedro Alves <palves@redhat.com>
11473 * python/python-internal.h (gdb_PyGetSetDef): New type.
11474 * python/py-block.c (block_object_getset)
11475 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11476 * python/py-event.c (event_object_getset)
11477 (finish_breakpoint_object_getset): Likewise.
11478 * python/py-inferior.c (inferior_object_getset): Likewise.
11479 * python/py-infthread.c (thread_object_getset): Likewise.
11480 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11481 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11482 * python/py-objfile.c (objfile_getset): Likewise.
11483 * python/py-progspace.c (pspace_getset): Likewise.
11484 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11486 * python/py-record.c (recpy_record_getset): Likewise.
11487 * python/py-symbol.c (symbol_object_getset): Likewise.
11488 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11490 * python/py-type.c (type_object_getset, field_object_getset):
11492 * python/py-value.c (value_object_getset): Likewise.
11494 2017-04-05 Pedro Alves <palves@redhat.com>
11496 * python/python-internal.h (gdb_PyObject_CallMethod)
11497 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11499 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11500 (PySys_GetObject, PySys_SetPath): New macros.
11502 2017-04-05 Pedro Alves <palves@redhat.com>
11504 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11505 info_osdata_command.
11506 * osdata.c (info_osdata_command): Rename to ...
11507 (info_osdata): ... this. Constify 'type' parameter, and remove
11508 the 'from_tty' parameter. Accept NULL TYPE.
11509 (info_osdata_command): New function.
11510 * osdata.h (info_osdata_command): Remove declaration.
11511 (info_osdata): New declaration.
11513 2017-04-05 Pedro Alves <palves@redhat.com>
11515 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11516 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11517 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11519 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11520 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11521 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11523 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11524 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11525 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11526 (mi_cmd_file_list_exec_source_files)
11527 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11528 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11529 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11531 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11532 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11533 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11534 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11535 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11536 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11537 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11538 'command' parameter.
11539 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11540 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11541 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11542 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11543 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11544 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11545 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11546 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11547 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11548 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11549 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11551 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11552 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11553 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11554 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11555 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11556 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11557 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11558 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11559 (mi_cmd_data_list_changed_registers)
11560 (mi_cmd_data_write_register_values)
11561 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11562 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11563 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11564 (mi_cmd_list_features, mi_cmd_list_target_features)
11565 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11566 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11567 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11568 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11569 (mi_cmd_trace_frame_collected): Constify 'command'
11571 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11572 'command' parameter.
11574 2017-04-05 Pedro Alves <palves@redhat.com>
11576 * ada-lang.c (ada_completer_word_break_characters): Now a const
11578 (ada_get_gdb_completer_word_break_characters): Constify.
11579 * completer.c (gdb_completer_command_word_break_characters)
11580 (gdb_completer_file_name_break_characters)
11581 (gdb_completer_quote_characters): Now const arrays.
11582 (get_gdb_completer_quote_characters): Constify.
11583 (set_rl_completer_word_break_characters): New function.
11584 (set_gdb_completion_word_break_characters)
11585 (complete_line_internal): Use it.
11586 * completer.h (get_gdb_completer_quote_characters): Constify.
11587 (set_rl_completer_word_break_characters): Declare.
11588 * f-lang.c (f_word_break_characters): Constify.
11589 * language.c (default_word_break_characters): Constify.
11590 * language.h (language_defn::la_word_break_characters): Constify.
11591 (default_word_break_characters): Constify.
11592 * top.c (init_main): Use set_rl_completer_word_break_characters.
11594 2017-04-05 Pedro Alves <palves@redhat.com>
11596 * aix-thread.c (aix_thread_pid_to_str)
11597 (aix_thread_extra_thread_info): Constify.
11598 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11599 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11600 (bsd_uthread_pid_to_str): Constify.
11601 * corelow.c (core_pid_to_str): Constify.
11602 * darwin-nat.c (darwin_pid_to_str): Constify.
11603 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11604 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11606 * gnu-nat.c (gnu_pid_to_str): Constify.
11607 * go32-nat.c (go32_pid_to_str): Constify.
11608 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11609 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11610 * inferior.c (inferior_pid_to_str): Constify.
11611 * linux-nat.c (linux_nat_pid_to_str): Constify.
11612 * linux-tdep.c (linux_core_pid_to_str): Constify.
11613 * linux-thread-db.c (thread_db_pid_to_str)
11614 (thread_db_extra_thread_info): Constify.
11615 * nto-tdep.c (nto_extra_thread_info): Constify.
11616 * nto-tdep.h (nto_extra_thread_info): Constify.
11617 * obsd-nat.c (obsd_pid_to_str): Constify.
11618 * procfs.c (procfs_pid_to_str): Constify.
11619 * ravenscar-thread.c (ravenscar_extra_thread_info)
11620 (ravenscar_pid_to_str): Constify.
11621 * remote-sim.c (gdbsim_pid_to_str): Constify.
11622 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11624 * sol-thread.c (solaris_pid_to_str): Constify.
11625 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11626 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11627 * target.c (default_pid_to_str, target_pid_to_str)
11628 (normal_pid_to_str, default_pid_to_str): Constify.
11629 * target.h (target_ops::to_pid_to_str)
11630 (target_ops::to_extra_thread_info): Constify.
11631 (target_pid_to_str, normal_pid_to_str): Constify.
11632 * windows-nat.c (windows_pid_to_str): Constify.
11633 * gdbarch.sh (core_pid_to_str): Constify.
11634 * target-delegates.c: Regenerate.
11635 * gdbarch.h, gdbarch.c: Regenerate.
11637 2017-04-05 Pedro Alves <palves@redhat.com>
11639 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11640 the memory of the temporary warning_pre_print override.
11641 * utils.c (warning_pre_print): Constify.
11642 * utils.h (warning_pre_print): Constify.
11644 2017-04-05 Pedro Alves <palves@redhat.com>
11646 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11647 (shell_command): New function.
11648 (make_command): Use std::string.
11649 (init_cli_cmds): Register shell_command instead of shell_escape.
11651 2017-04-05 Pedro Alves <palves@redhat.com>
11653 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11654 * tracepoint.c (default_collect): Don't initialize.
11656 2017-04-05 Pedro Alves <palves@redhat.com>
11658 * macroexp.c (macro_buffer::shared): Now a bool.
11659 (init_buffer): Update.
11660 (init_shared_buffer): Constify 'addr' parameter.
11661 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11664 2017-04-05 Pedro Alves <palves@redhat.com>
11666 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11667 * disasm.c (set_disassembler_options): Constify local.
11668 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11670 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11673 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11676 2017-04-05 Yao Qi <yao.qi@linaro.org>
11678 * frame.c (frame_unwind_register_unsigned): Call
11679 frame_unwind_register_value.
11681 2017-04-05 Yao Qi <yao.qi@linaro.org>
11683 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11684 Use gdb_test_multiple, and don't match anchor.
11686 2017-04-05 Pedro Alves <palves@redhat.com>
11688 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11689 (Write After Approval): Remove Simon Marchi.
11691 2017-04-05 Pedro Alves <palves@redhat.com>
11693 * common/gdb_optional.h (optional::optional): Make constexpr and
11694 initialize m_dummy.
11696 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11698 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11699 (amd64fbsd_jmp_buf_reg_offset): Remove.
11700 (amd64fbsd_supply_uthread): Remove function.
11701 (amd64fbsd_collect_uthread): Remove function.
11702 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11703 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11704 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11705 (fbsd-nat.c): Update comment.
11706 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11707 (i386fbsd_jmp_buf_reg_offset): Remove.
11708 (i386fbsd_supply_uthread): Remove function.
11709 (i386fbsd_collect_uthread): Remove function.
11710 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11712 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11714 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11715 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11716 * NEWS: Mention that support for FreeBSD/alpha was removed.
11717 * alpha-fbsd-tdep.c: Delete file.
11718 * config/alpha/fbsd.mh: Delete file.
11719 * configure.host: Delete alpha*-*-freebsd* and
11720 alpha*-*-kfreebsd*-gnu.
11721 * configure.tgt: Delete alpha*-*-freebsd* and
11722 alpha*-*-kfreebsd*-gnu.
11724 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11726 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11727 amd64bsd_store_inferior_registers): Use ptid from regcache.
11729 2017-04-04 Pedro Alves <palves@redhat.com>
11731 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11732 data fields, make them private and add "m_" prefixes.
11733 (lnp_state_machine::lnp_state_machine): New ctor.
11734 (record_line, check_line_address, handle_set_discriminator)
11735 (handle_set_address, handle_advance_pc, handle_special_opcode)
11736 (handle_advance_line, handle_set_file, handle_negate_stmt)
11737 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11738 (end_sequence, advance_line): New methods.
11739 (m_gdbarch, m_record_lines_p): New fields.
11740 (lnp_reader_state): Delete.
11741 (dwarf_record_line): Rename to ...
11742 (lnp_state_machine::record_line): ... adjust.
11743 (init_lnp_state_machine): Delete.
11744 (lnp_state_machine::lnp_state_machine): New.
11745 (check_line_address): Rename to ...
11746 (lnp_state_machine::check_line_address): This.
11747 (dwarf_decode_lines_1): Remove reference to "reader_state".
11748 Adjust lnp_state_machine having a non-default ctor. Use bool.
11749 State machine internal state manipulation moved to
11750 lnp_state_machine methods.
11752 2017-04-04 Pedro Alves <palves@redhat.com>
11754 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11755 unittests/offset-type-selftests.c.
11756 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11757 * common/offset-type.h: New file.
11758 * common/preprocessor.h: New file.
11759 * common/traits.h: New file.
11760 * common/valid-expr.h: New file.
11761 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11762 sect_offset and cu_offset strong typedefs throughout.
11763 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11764 typedefs throughout.
11765 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11766 sect_offset and cu_offset strong typedefs throughout.
11767 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11768 typedefs throughout.
11769 * gdbtypes.h: Include "common/offset-type.h".
11770 (cu_offset): Now an offset type (strong typedef) instead of a
11772 (sect_offset): Likewise.
11773 (union call_site_parameter_u): Rename "param_offset" field to
11775 * unittests/offset-type-selftests.c: New file.
11777 2017-04-04 Pedro Alves <palves@redhat.com>
11779 * common/underlying.h: New file.
11780 * dwarf2read.c: Include "common/gdb_optional.h" and
11781 "common/underlying.h".
11782 (dir_index, file_name_index): New types.
11783 (file_entry): Use them.
11784 (file_entry::include): Use to_underlying.
11785 (line_header::add_file_name): Use dir_index.
11786 (read_formatted_entries): Use gdb::optional. Read form before
11787 writting to file_entry.
11788 (dwarf_decode_line_header): Use dir_index.
11789 (lnp_state_machine::current_file): Use to_underlying.
11790 (lnp_state_machine::file): Change type to file_name_index.
11791 (dwarf_record_line): Use to_underlying.
11792 (init_lnp_state_machine): Use file_name_index.
11793 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11795 2017-04-04 Pedro Alves <palves@redhat.com>
11797 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11798 operator bool, has_value and get methods.
11800 2017-04-04 Pedro Alves <palves@redhat.com>
11802 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11804 (line_header): Initialize all data fields. Change type of
11805 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11806 Change type of include_dirs to std::vector<const char *>. Remove
11807 num_include_dirs, include_dirs_size. Change type of file_names to
11808 std::vector<file_entry>. Remove num_file_names, file_names_size.
11809 (line_header::line_header): New.
11810 (line_header::add_include_dir, line_header::add_file_name): New
11812 (line_header::include_dir_at): Remove NULL check.
11813 (line_header::file_name_at): Add const overload.
11814 (line_header_up): New unique_ptr typedef.
11815 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11816 std::vector. Remove free_line_header call.
11817 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11818 free_line_header call.
11819 (free_cu_line_header): Delete.
11820 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11821 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11822 Adjust to use std::vector.
11823 (free_line_header): Delete.
11824 (free_line_header_voidp): Use delete.
11825 (add_include_dir): Replace with ...
11826 (line_header::add_include_dir): ... this method. Use std::vector.
11827 (add_file_name): Replace with ...
11828 (line_header::add_file_name): ... this method. Use std::vector.
11829 (add_include_dir_stub): Delete.
11830 (read_formatted_entries): Remove memset.
11831 (dwarf_decode_line_header): Return a line_header_up instead of a
11832 raw pointer. Remove cleanup handling. Pass lambdas to
11833 read_formatted_entries. Adjust to use line_header methods.
11834 (dwarf_decode_lines_1): Adjust to use line_header methods.
11835 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11838 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11840 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11841 instead of struct ptid.
11843 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11845 * frame.c (get_frame_register_bytes): Unwind using value.
11846 (put_frame_register_bytes): Likewise.
11848 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11850 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11853 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11855 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11857 2017-03-29 Yao Qi <yao.qi@linaro.org>
11859 * gdbthread.h (struct thread_info): Declare constructor and
11860 destructor. Add some in-class member initializers.
11861 * thread.c (free_thread): Remove.
11862 (init_thread_list): Call delete instead of free_thread.
11863 (new_thread): Call thread_info constructor.
11864 (thread_info::thread_info): New function.
11865 (thread_info::~thread_info): New function.
11866 (delete_thread_1): Call delete instead of free_thread.
11867 (make_cleanup_restore_current_thread): Move tp and frame to
11870 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11872 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11873 (arc_skip_prologue): Likewise.
11874 (arc_make_frame_cache): Likewise.
11875 (arc_pv_get_operand): New function.
11876 (arc_is_in_prologue): Likewise.
11877 (arc_analyze_prologue): Likewise.
11878 (arc_print_frame_cache): Likewise.
11879 (MAX_PROLOGUE_LENGTH): New constant.
11881 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11883 * configure.tgt: Add arc-insn.o.
11884 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11885 (dump_arc_instruction_command): New function.
11886 (arc_fprintf_disasm): Likewise.
11887 (arc_disassemble_info): Likewise.
11888 (arc_insn_get_operand_value): Likewise.
11889 (arc_insn_get_operand_value_signed): Likewise.
11890 (arc_insn_get_memory_base_reg): Likewise.
11891 (arc_insn_get_memory_offset): Likewise.
11892 (arc_insn_get_branch_target): Likewise.
11893 (arc_insn_dump): Likewise.
11894 (arc_insn_get_linear_next_pc): Likewise.
11895 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11896 (arc_disassemble_info): Likewise.
11897 (arc_insn_get_branch_target): Likewise.
11898 (arc_insn_get_linear_next_pc): Likewise.
11899 * NEWS: Mention new "maint print arc arc-instruction".
11901 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11903 * arc-tdep (maintenance_print_arc_list): New variable.
11904 (maintenance_print_arc_command): New function.
11906 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11908 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11909 Add "limm" and "reserved".
11910 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11911 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11912 * arc-tdep.h (arc_regnum): Likewise.
11914 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11916 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11917 for THREADPTR register.
11918 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11920 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11921 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11922 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11924 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11926 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11927 registers above gdbarch_num_regs (gdbarch) as privileged in
11930 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11932 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11933 for a single specified register or for all registers in
11934 a0_base..a0_base + C0_NREGS range.
11935 (supply_gregset_reg): Call regcache_raw_supply for a single
11936 specified register or for all registers in a0_base..a0_base +
11939 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11941 * arch/xtensa.h (C0_NREGS): Add definition.
11942 * xtensa-tdep.c (C0_NREGS): Remove definition.
11944 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11946 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11947 Drop xtensa_default_isa initialization.
11948 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11950 2017-03-27 Pedro Alves <palves@redhat.com>
11952 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11953 (file_entry::include_dir): New method.
11954 (line_header::include_dir_at, line_header::file_name_at): New
11956 (setup_type_unit_groups, setup_type_unit_groups)
11957 (psymtab_include_file_name): Simplify using the new methods.
11958 (lnp_state_machine) <the_line_header>: New field.
11959 <file>: Add comment.
11960 (lnp_state_machine::current_file): New method.
11961 (dwarf_record_line): Simplify using the new methods.
11962 (init_lnp_state_machine): Initialize the "the_line_header" field.
11963 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11964 Simplify using the new methods.
11966 2017-03-27 Pedro Alves <palves@redhat.com>
11968 * cp-name-parser.y (make_empty): Delete.
11969 (demangler_special, nested_name, ptr_operator, array_indicator)
11970 (direct_declarator, declarator_1): Use fill_comp instead of
11973 2017-03-27 Pedro Alves <palves@redhat.com>
11975 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11976 to ATTRIBUTE_PRINTF.
11977 * solib-target.c (library_list_start_list): Print "string" not
11979 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11980 gdb_xml_error call.
11982 2017-03-27 Pedro Alves <palves@redhat.com>
11984 * dwarf2read.c (struct file_and_directory): New.
11985 (dwarf2_get_dwz_file): Adjust to use std::string.
11986 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11987 (find_file_and_directory): Adjust to return a file_and_directory
11989 (read_file_scope): Adjust to use file_and_directory. Remove
11990 make_cleanup/do_cleanups calls.
11991 (open_and_init_dwp_file): Adjust to use std::string. Remove
11992 make_cleanup/do_cleanups calls.
11993 * python/python.c (do_start_initialization): Adjust to ldirname
11994 returning a std::string.
11995 * utils.c (ldirname): Now returns a std::string.
11996 * utils.h (ldirname): Change return type to std::string.
11997 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11998 returning a std::string.
11999 * xml-tdesc.c (file_read_description_xml): Likewise.
12001 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12003 * regcache.c (regcache_debug_print_register): New function.
12004 * regcache.h (regcache_debug_print_register): New declaration.
12005 * target.c (debug_print_register): Remove.
12006 (target_fetch_registers): Call regcache_debug_print_register.
12007 (target_store_registers): Likewise.
12009 2017-03-24 Pádraig Brady <pbrady@fb.com>
12011 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12012 reference beyond the 'lh->include_dirs' array before accessing to
12014 (psymtab_include_file_name): Likewise.
12015 (dwarf_decode_lines_1): Likewise.
12016 (dwarf_decode_lines): Likewise.
12017 (file_file_name): Likewise.
12019 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12021 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12023 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12024 ps_lsetfpregs): Likewise.
12025 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12026 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12027 ps_lsetfpregs): Likewise.
12028 * target.c (target_fetch_registers, target_store_registers):
12031 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12033 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12035 2017-03-23 Yao Qi <yao.qi@linaro.org>
12037 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12038 (_initialize_aarch64_tdep): Register it.
12039 (aarch64_record_load_store): Handle PRFM instruction.
12040 (aarch64_process_record_test): New function.
12042 2017-03-23 Yao Qi <yao.qi@linaro.org>
12044 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12047 2017-03-23 Yao Qi <yao.qi@linaro.org>
12049 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12051 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12053 python/python.c (do_start_initialization): Fix memory leak.
12055 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12057 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12058 using get_ptrace_pid.
12059 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12061 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12062 inferior_ptid instead of pid.
12064 2017-03-22 Yao Qi <yao.qi@linaro.org>
12066 * aarch64-tdep.c: Wrap locally used classes in anonymous
12068 * arm-tdep.c: Likewise.
12069 * linespec.c: Likewise.
12070 * ui-out.c: Likewise.
12072 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12075 * python/lib/gdb/printer/bound_registers.py: Import sys.
12077 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12079 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12080 windows_thread_info parameter and use it instead of
12082 (windows_fetch_inferior_registers): Don't set current_thread,
12083 pass the thread to do_windows_fetch_inferior_registers. Use
12084 ptid from regcache instead of inferior_ptid.
12085 (do_windows_store_inferior_registers): Add windows_thread_info
12086 parameter and use it instead of current_thread.
12087 (windows_store_inferior_registers): Don't set current_thread,
12088 pass the thread to do_windows_store_inferior_registers. Use
12089 ptid from regcache instead of inferior_ptid.
12091 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12093 * ser-mingw.c (ser_windows_raw): Remove reference to
12094 struct serial::current_timeout.
12096 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12099 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12100 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12101 (sparc64_fsr_type): Fix %fsr decoding.
12103 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12105 * python/py-record-btrace.c (btpy_insn_data): Change return type
12108 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12110 * spu-linux-nat.c (spu_fetch_inferior_registers,
12111 spu_store_inferior_registers): Use ptid from regcache, set and
12112 restore inferior_ptid.
12113 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12116 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12118 * i386-linux-nat.c (fetch_register, store_register,
12119 i386_linux_fetch_inferior_registers,
12120 i386_linux_store_inferior_registers): Use ptid from regcache.
12121 * ia64-linux-nat.c (ia64_linux_fetch_register,
12122 ia64_linux_store_register): Likewise.
12123 * inf-ptrace.c (inf_ptrace_fetch_register,
12124 inf_ptrace_store_register): Likewise.
12125 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12126 m32r_linux_store_inferior_registers): Likewise.
12127 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12128 m68kbsd_store_inferior_registers): Likewise.
12129 * m68k-linux-nat.c (fetch_register, store_register,
12130 m68k_linux_fetch_inferior_registers,
12131 m68k_linux_store_inferior_registers): Likewise.
12132 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12133 m88kbsd_store_inferior_registers): Likewise.
12134 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12135 mips_fbsd_store_inferior_registers): Likewise.
12136 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12137 mips64_linux_regsets_store_registers): Likewise.
12138 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12139 mipsnbsd_store_inferior_registers): Likewise.
12140 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12141 mips64obsd_store_inferior_registers): Likewise.
12142 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12144 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12145 ppcfbsd_store_inferior_registers): Likewise.
12146 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12147 ppc_linux_store_inferior_registers): Likewise.
12148 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12149 ppcnbsd_store_inferior_registers): Likewise.
12150 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12151 ppcobsd_store_registers): Likewise.
12152 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12154 * ravenscar-thread.c (ravenscar_fetch_registers,
12155 ravenscar_store_registers, ravenscar_prepare_to_store):
12157 * record-btrace.c (record_btrace_fetch_registers,
12158 record_btrace_store_registers, record_btrace_prepare_to_store):
12160 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12161 Lookup inferior using ptid from regcache, instead of
12163 * remote.c (remote_fetch_registers, remote_store_registers): Use
12164 ptid from regcache.
12165 * rs6000-nat.c (fetch_register, store_register): Likewise.
12166 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12167 s390_linux_store_inferior_registers): Likewise.
12168 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12169 shnbsd_store_inferior_registers): Likewise.
12170 * sol-thread.c (sol_thread_fetch_registers,
12171 sol_thread_store_registers): Likewise.
12172 * sparc-nat.c (sparc_fetch_inferior_registers,
12173 sparc_store_inferior_registers): Likewise.
12174 * tilegx-linux-nat.c (fetch_inferior_registers,
12175 store_inferior_registers): Likewise.
12176 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12177 vaxbsd_store_inferior_registers): Likewise.
12178 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12179 store_xtregs): Likewise.
12181 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12184 * NEWS: Mention support for rvalue references in GDB and python.
12185 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12186 supports both lvalue and rvalue references.
12188 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12191 * gdbtypes.c (rank_one_type): Implement overloading
12192 resolution rules regarding rvalue references.
12194 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12197 * aarch64-tdep.c (aarch64_type_align)
12198 (aarch64_extract_return_value, aarch64_store_return_value): Change
12199 lvalue reference type checks to general reference type checks.
12200 * amd64-tdep.c (amd64_classify): Likewise.
12201 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12203 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12204 (arm_store_return_value): Likewise.
12205 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12206 * c-typeprint.c (c_print_type): Likewise.
12207 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12208 (cplus_number_of_children, cplus_describe_child): Likewise.
12209 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12210 * completer.c (expression_completer): Likewise.
12211 * cp-support.c (make_symbol_overload_list_adl_namespace):
12213 * darwin-nat-info.c (info_mach_region_command): Likewise.
12214 * dwarf2loc.c (entry_data_value_coerce_ref)
12215 (value_of_dwarf_reg_entry): Likewise.
12216 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12217 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12219 * findvar.c (extract_typed_address, store_typed_address):
12221 * gdbtypes.c (rank_one_type): Likewise.
12222 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12223 * infcall.c (value_arg_coerce): Likewise.
12224 * language.c (pointer_type): Likewise.
12225 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12227 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12228 * mn10300-tdep.c (mn10300_type_align): Likewise.
12229 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12230 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12231 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12233 * printcmd.c (print_formatted, x_command): Likewise.
12234 * python/py-type.c (typy_get_composite, typy_template_argument):
12236 * python/py-value.c (valpy_referenced_value)
12237 (valpy_get_dynamic_type, value_has_field): Likewise.
12238 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12239 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12240 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12241 * spu-tdep.c (spu_scalar_value_p): Likewise.
12242 * symtab.c (lookup_symbol_aux): Likewise.
12243 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12244 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12246 * valops.c (value_cast_pointers, value_cast)
12247 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12248 (value_struct_elt, value_struct_elt_bitpos)
12249 (value_find_oload_method_list, find_overload_match)
12250 (value_rtti_indirect_type): Likewise.
12251 * valprint.c (val_print_scalar_type_p, generic_val_print):
12253 * value.c (value_actual_type, value_as_address, unpack_long)
12254 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12255 (coerce_ref): Likewise.
12256 * varobj.c (varobj_get_value_type): Likewise.
12258 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12261 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12262 table of constants.
12263 * python/lib/gdb/command/explore.py: Support exploring values
12264 of rvalue reference types.
12265 * python/lib/gdb/types.py: Implement get_basic_type() for
12266 rvalue reference types.
12267 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12269 * python/py-value.c (valpy_getitem): Add an rvalue reference
12271 (valpy_reference_value): Add new parameter "refcode".
12272 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12273 New wrappers for valpy_reference_value().
12274 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12275 (gdbpy_invoke_xmethod): Likewise.
12277 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12280 * dwarf2read.c (process_die, read_type_die_1): Handle the
12281 DW_TAG_rvalue_reference_type DIE.
12282 (read_tag_reference_type): Add new parameter "refcode".
12284 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12287 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12288 (c_type_print_modifier, c_type_print_varspec_suffix)
12289 (c_type_print_base): Support printing rvalue reference types.
12290 * c-valprint.c (c_val_print, c_value_print): Support printing
12291 rvalue reference values.
12293 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12296 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12298 * cp-support.c (replace_typedefs): Handle
12299 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12300 * python/py-type.c (typy_lookup_type): Likewise.
12302 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12305 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12306 * parse.c (insert_type): Change assert statement.
12307 (follow_types): Handle rvalue reference types.
12308 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12311 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12314 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12315 value_ref() interface.
12316 * c-valprint.c (c_value_print): Likewise.
12317 * infcall.c (value_arg_coerce): Likewise.
12318 * python/py-value.c (valpy_reference_value): Likewise.
12319 * valops.c (value_cast, value_reinterpret_cast)
12320 (value_dynamic_cast, typecmp): Likewise.
12321 (value_ref): Parameterize by kind of return value reference type.
12322 * value.h (value_ref): Add new parameter "refcode".
12324 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12327 * dwarf2read.c (read_tag_reference_type): Use
12328 lookup_lvalue_reference_type() instead of lookup_reference_type().
12329 * eval.c (evaluate_subexp_standard): Likewise.
12330 * f-exp.y: Likewise.
12331 * gdbtypes.c (make_reference_type, lookup_reference_type):
12332 Generalize with rvalue reference types.
12333 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12334 convenience wrappers for lookup_reference_type().
12335 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12336 reference kind parameter.
12337 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12338 wrappers for lookup_reference_type().
12339 * guile/scm-type.c (gdbscm_type_reference): Use
12340 lookup_lvalue_reference_type() instead of lookup_reference_type().
12341 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12342 * parse.c (follow_types): Likewise.
12343 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12344 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12346 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12347 (gdbpy_invoke_xmethod): Likewise.
12348 * stabsread.c: Provide extra argument to make_reference_type()
12350 * valops.c (value_ref, value_rtti_indirect_type): Use
12351 lookup_lvalue_reference_type() instead of lookup_reference_type().
12353 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12356 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12357 (TYPE_IS_REFERENCE): New macro.
12358 (struct type): Add rvalue_reference_type field.
12359 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12361 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12363 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12364 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12365 New function definition.
12366 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12367 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12368 New function declaration.
12369 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12370 * mi/mi-interp.h: New file.
12371 * solib.c (info_sharedlibrary_command): Replace for loop with
12373 * solib.h (update_solib_list): New function declaration.
12374 (so_list_head): Move macro.
12375 * solist.h (ALL_SO_LIBS): New macro.
12377 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12379 * infcmd.c (post_create_inferior): Remove unused argument in
12381 * remote.c (remote_start_remote): Likewise.
12382 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12383 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12384 (enable_break): Likewise.
12385 * solib.c (update_solib_list): Remove unused target argument
12386 and its documentation.
12387 (solib_add): Remove unused target argument. Remove unused
12388 argument in call to update_solib_list.
12389 (info_sharedlibrary_command): Remove unused argument in call
12390 to update_solib_list.
12391 (sharedlibrary_command): Remove unused argument in call to
12393 (handle_solib_event): Likewise.
12394 (reload_shared_libraries): Likewise.
12395 * solib.h (solib_add): Remove unused target argument.
12397 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12399 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12400 (s390_displaced_step_fixup): Cover relative branches with the
12401 default fixup handling. This fixes lack of support for some
12402 relative branch instructions.
12404 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12406 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12407 ptid from regcache.
12409 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12411 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12412 i386_darwin_store_inferior_registers): Use ptid from regcache.
12414 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12416 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12417 i386bsd_store_inferior_registers): Use ptid from regcache.
12419 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12421 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12422 hppaobsd_store_registers): Use ptid from regcache.
12424 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12426 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12427 hppanbsd_store_registers): Use ptid from regcache.
12429 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12431 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12432 from regcache. Use get_ptrace_pid.
12434 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12436 * corelow.c (get_core_register_section): Use ptid from regcache,
12439 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12441 * bsd-uthread.c (bsd_uthread_fetch_registers,
12442 bsd_uthread_store_registers): Use ptid from regcache, set and
12443 restore inferior_ptid.
12445 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12447 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12448 fetch_fp_regs, store_register, store_regs, store_fp_register,
12449 store_fp_regs): Use ptid from regcache.
12451 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12453 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12454 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12455 store_vfp_regs): Use ptid from regcache.
12457 2017-03-17 Pedro Alves <palves@redhat.com>
12460 * ser-base.c (ser_base_wait_for): Add comment.
12461 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12463 * ser-unix.c (hardwire_raw): Remove reference to
12464 scb->current_timeout.
12465 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12466 (hardwire_ops): Install ser_base_readchar instead of
12468 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12471 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12474 * python/lib/gdb/printer/bound_registers.py: Add support for
12477 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12479 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12480 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12481 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12482 byte_offset to subobj_byte_offset. Fix the handling of
12483 DWARF_VALUE_STACK on big-endian targets when coming via an
12485 (dwarf2_evaluate_loc_desc): Adjust call to
12486 dwarf2_evaluate_loc_desc_full.
12487 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12488 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12490 2017-03-16 Yao Qi <yao.qi@linaro.org>
12492 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12493 and REVSH instructions.
12495 2017-03-16 Yao Qi <yao.qi@linaro.org>
12497 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12498 (arm_record_test): Declare.
12499 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12500 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12501 align with the manual.
12502 (thumb_record_misc): Adjust the code order to align with the
12504 (thumb2_record_decode_insn_handler): Fix instruction matching.
12505 (instruction_reader_thumb): New class.
12506 (arm_record_test): New function.
12508 2017-03-16 Yao Qi <yao.qi@linaro.org>
12510 * arm-tdep.c (abstract_memory_reader): New class.
12511 (instruction_reader): New class.
12512 (extract_arm_insn): Add argument 'reader'. Callers updated.
12513 (decode_insn): Likewise.
12515 2017-03-16 Doug Evans <dje@google.com>
12517 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12518 member. Change type of TYPE member to SCM. All uses updated.
12519 (lsscm_make_lazy_string_smob): Add assert.
12520 (lsscm_make_lazy_string): Flag bad length values.
12521 (lsscm_elt_type): New function.
12522 (gdbscm_lazy_string_to_value): Rewrite to use
12523 lsscm_safe_lazy_string_to_value.
12524 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12525 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12526 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12528 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12529 * guile/scm-type.c (tyscm_scm_to_type): New function.
12531 2017-03-15 Doug Evans <dje@google.com>
12533 PR python/17728, python/18439, python/18779
12534 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12535 member. Change type of TYPE member to PyObject *. All uses updated.
12536 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12537 (gdbpy_create_lazy_string_object): Flag bad length values.
12538 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12539 Handle typedefs in incoming type.
12540 (stpy_lazy_string_elt_type): New function.
12541 (gdbpy_extract_lazy_string): Call it.
12542 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12543 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12544 typedefs in incoming type.
12546 2017-03-16 Doug Evans <dje@google.com>
12548 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12549 * guile/scm-type.c (tyscm_scm_to_type): New function.
12551 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12553 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12554 "ULONGEST" for "skip".
12556 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12559 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12560 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12561 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12562 over ptrace peek/poke until end of buffer or error.
12564 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12566 * parse.c (length_of_subexp): Make static.
12567 * parser-defs.h (length_of_subexp): Remove.
12569 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12571 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12574 2017-03-14 Pedro Alves <palves@redhat.com>
12576 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12577 (main): Use std::unique_ptr. Remove calls to
12578 cp_demangled_name_parse_free.
12580 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12582 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12583 alphabsd_store_inferior_registers): Use regcache->ptid instead
12586 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12588 * aix-thread.c (aix_thread_fetch_registers,
12589 aix_thread_store_registers): Use regcache->ptid instead of
12592 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12594 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12595 store_gregs_to_thread, fetch_fpregs_from_thread,
12596 store_fpregs_to_thread): Use regcache->ptid instead of
12599 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12601 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12602 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12603 instead of inferior_ptid.
12605 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12607 * target.c (target_fetch_registers, target_store_registers): Add
12610 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12612 * regcache.h (regcache_get_ptid): New function.
12613 * regcache.c (regcache_get_ptid): New function.
12615 2017-03-13 Mark Wielaard <mark@klomp.org>
12617 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12619 2017-03-10 Keith Seitz <keiths@redhat.com>
12622 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12624 2017-03-08 Pedro Alves <palves@redhat.com>
12627 * infrun.c (start_step_over, do_target_resume, resume)
12628 (restart_threads): Assert we're not resuming a thread that is
12629 meant to be stopped.
12630 (infrun_thread_stop_requested_callback): Delete.
12631 (infrun_thread_stop_requested): If the thread is internally
12632 stopped, queue a pending stop event and clear the thread's
12633 inline-frame state.
12634 (handle_stop_requested): New function.
12635 (handle_syscall_event, handle_inferior_event_1): Use
12636 handle_stop_requested.
12637 (handle_stop_requested): New function.
12638 (handle_signal_stop): Set the thread's stop_signal here instead of
12640 (finish_step_over): Clear step over info unconditionally.
12641 (handle_signal_stop): If the user had interrupted the event
12642 thread, consider the stop a random signal.
12643 (handle_signal_stop) <signal arrived while stepping over
12644 breakpoint>: Don't restart threads here.
12645 (stop_waiting): Don't clear step-over info here.
12647 2017-03-08 Pedro Alves <palves@redhat.com>
12650 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12651 goes to argument 2, not 1.
12653 2017-03-08 Pedro Alves <palves@redhat.com>
12656 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12657 display_gdb_prompt.
12658 (command_line_input): Add comment.
12660 2017-03-08 Pedro Alves <palves@redhat.com>
12663 * tui/tui-file.c (tui_file::write): New.
12664 * tui/tui-file.h (tui_file): Override "write".
12665 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12666 factored out from ...
12667 (tui_puts): ... here.
12668 (tui_putc): Use them.
12669 (tui_write): New function.
12670 * tui/tui-io.h (tui_write): Declare.
12672 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12674 * Makefile.in (SFILES): Replace "environ.c" with
12675 "common/environ.c".
12676 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12677 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12679 * common/environ.c: ... here.
12680 * environ.h: Moved to...
12681 * common/environ.h: ... here.
12683 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12685 * gdbarch.sh (pstring_ptr): New static function.
12686 (gdbarch_disassembler_options): Use it.
12687 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12688 not valid_disassembler_option->name.
12689 * gdbarch.c: Regenerate.
12691 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12693 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12695 2017-03-07 Pedro Alves <palves@redhat.com>
12697 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12699 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12701 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12702 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12703 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12704 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12706 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12708 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12710 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12712 * remote.c (remote_add_target_side_commands): Use range-based
12715 2017-03-03 Yao Qi <yao.qi@linaro.org>
12718 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12720 * valprint.c (common_val_print): Likewise.
12722 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12724 * NEWS: Mention new set/show disassembler-options commands.
12725 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12726 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12727 (prospective_options): New static variable.
12728 (gdb_disassembler::gdb_disassembler): Initialize
12729 m_di.disassembler_options.
12730 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12731 (get_disassembler_options): New function.
12732 (set_disassembler_options): Likewise.
12733 (set_disassembler_options_sfunc): Likewise.
12734 (show_disassembler_options_sfunc): Likewise.
12735 (disassembler_options_completer): Likewise.
12736 (_initialize_disasm): Likewise.
12737 * disasm.h (get_disassembler_options): New prototype.
12738 (set_disassembler_options): Likewise.
12739 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12740 (gdbarch_verify_disassembler_options): Likewise.
12741 * gdbarch.c: Regenerate.
12742 * gdbarch.h: Likewise.
12743 * arm-tdep.c (num_disassembly_options): Delete.
12744 (set_disassembly_style): Likewise.
12745 (arm_disassembler_options): New static variable.
12746 (set_disassembly_style_sfunc): Convert short style name into long
12747 option name. Call set_disassembler_options.
12748 (show_disassembly_style_sfunc): New function.
12749 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12750 set_gdbarch_verify_disassembler_options.
12751 (_initialize_arm_tdep): Delete regnames variable and update callers.
12752 (arm_disassembler_options): Initialize.
12753 (disasm_options): New variable.
12754 (num_disassembly_options): Rename from this...
12755 (num_disassembly_styles): ...to this. Compute by scanning through
12757 (valid_disassembly_styles): Initialize using disasm_options.
12758 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12759 set_arm_regname_option.
12760 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12761 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12762 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12763 set_gdbarch_verify_disassembler_options.
12764 * s390-tdep.c (s390_disassembler_options): New static variable.
12765 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12766 set_gdbarch_verify_disassembler_options.
12768 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12770 * remote.c (remote_add_target_side_condition): Remove "struct"
12771 keyword from range-based for loop.
12773 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12775 * remote.c (remote_add_target_side_condition): Use range-based
12776 for loop. Update comment.
12778 2017-02-27 Yao Qi <yao.qi@linaro.org>
12780 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12782 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12784 * regcache.c (regcache_raw_update): New function.
12785 (regcache_raw_read): Move code to regcache_raw_update.
12786 * regcache.h (regcache_raw_update): New declaration.
12787 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12789 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12791 * dwarf2read.c (create_debug_type_hash_table): Initialize
12792 header.signature and header.type_offset_in_tu.
12794 2017-02-24 Pedro Alves <palves@redhat.com>
12796 * symtab.c (make_file_symbol_completion_list_1): Use
12797 add_symtab_completions.
12799 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12801 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12803 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12805 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12806 I386_MAX_REGISTER_SIZE.
12807 (i386_pseudo_register_write): Likewise.
12808 (i386_process_record): Likewise.
12809 * i387-tdep.c (i387_supply_xsave): Likewise.
12810 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12811 (store_register): Likewise.
12813 2017-02-23 Pedro Alves <palves@redhat.com>
12815 * ada-lang.c: Include "common/function-view.h".
12816 (ada_iterate_over_symbols): Adjust to use function_view as
12818 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12819 (ada_make_symbol_completion_list): Use a lambda.
12820 (ada_exc_search_name_matches): Delete.
12821 (name_matches_regex): New.
12822 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12823 * compile/compile-c-support.c: Include "common/function-view.h".
12824 (print_one_macro): Change prototype to accept a ui_file pointer.
12825 (write_macro_definitions): Use a lambda.
12826 * dwarf2read.c: Include "common/function-view.h".
12827 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12828 (dw2_expand_symtabs_matching): Adjust to use function_view as
12830 * language.h: Include "common/function-view.h".
12831 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12832 function_view as callback type.
12833 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12834 * linespec.c: Include "common/function-view.h".
12835 (collect_info::add_symbol): New method.
12836 (struct symbol_and_data_callback, iterate_inline_only, struct
12837 symbol_matcher_data, iterate_name_matcher): Delete.
12838 (iterate_over_all_matching_symtabs): Adjust to use function_view
12839 as callback type and lambdas.
12840 (iterate_over_file_blocks): Adjust to use function_view as
12842 (decode_compound_collector): Now a class with private fields.
12843 (decode_compound_collector::release_symbols): New method.
12844 (collect_one_symbol): Rename to...
12845 (decode_compound_collector::operator()): ... this and adjust.
12846 (lookup_prefix_sym): decode_compound_collector construction bits
12847 move to decode_compound_collector ctor. Pass the
12848 decode_compound_collector object directly as callback. Remove
12849 cleanups and use decode_compound_collector::release_symbols
12851 (symtab_collector): Now a class with private fields.
12852 (symtab_collector::release_symtabs): New method.
12853 (add_symtabs_to_list): Rename to...
12854 (symtab_collector::operator()): ... this and adjust.
12855 (collect_symtabs_from_filename): symtab_collector construction
12856 bits move to symtab_collector ctor. Pass the symtab_collector
12857 object directly as callback. Remove cleanups and use
12858 symtab_collector::release_symtabs instead.
12859 (collect_symbols): Delete.
12860 (add_matching_symbols_to_info): Use lambdas.
12861 * macrocmd.c (print_macro_callback): Delete.
12862 (info_macro_command): Use a lambda.
12863 (info_macros_command): Pass print_macro_definition as callable
12865 (print_one_macro): Remove 'ignore' parameter.
12866 (macro_list_command): Adjust.
12867 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12868 (macro_for_each_data::user_data): Delete field.
12869 (foreach_macro): Adjust to call the function_view.
12870 (macro_for_each): Adjust to use function_view as callback type.
12871 (foreach_macro_in_scope): Adjust to call the function_view.
12872 (macro_for_each_in_scope): Adjust to use function_view as callback
12874 * macrotab.h: Include "common/function-view.h".
12875 (macro_callback_fn): Declare a prototype instead of a pointer.
12876 Remove "user_data" parameter.
12877 (macro_for_each, macro_for_each_in_scope): Adjust to use
12878 function_view as callback type.
12879 * psymtab.c (partial_map_expand_apply)
12880 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12881 Adjust to use function_view as callback type and to return bool.
12882 (psym_expand_symtabs_matching): Adjust to use function_view as
12884 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12885 to use function_view as callback type and to return bool.
12886 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12888 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12890 * symfile.h: Include "common/function-view.h".
12891 (expand_symtabs_file_matcher_ftype)
12892 (expand_symtabs_symbol_matcher_ftype)
12893 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12895 (quick_symbol_functions::map_symtabs_matching_filename)
12896 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12897 function_view as callback type and return bool.
12898 (expand_symtabs_matching): Adjust to use function_view as callback
12900 (maintenance_expand_name_matcher)
12901 (maintenance_expand_file_matcher): Delete.
12902 (maintenance_expand_symtabs): Use lambdas.
12903 * symtab.c (iterate_over_some_symtabs): Adjust to use
12904 function_view as callback types and return bool.
12905 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12907 (lookup_symtab_callback): Delete.
12908 (lookup_symtab): Use a lambda.
12909 (iterate_over_symbols): Adjust to use function_view as callback
12911 (struct search_symbols_data, search_symbols_file_matches)
12912 (search_symbols_name_matches): Delete.
12913 (search_symbols): Use a pair of lambdas.
12914 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12915 (symtab_expansion_callback): Delete.
12916 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12917 * symtab.h: Include "common/function-view.h".
12918 (iterate_over_some_symtabs): Adjust to use function_view as
12919 callback type and return bool.
12920 (iterate_over_symtabs): Adjust to use function_view as callback
12922 (symbol_found_callback_ftype): Remove 'data' parameter and return
12924 (iterate_over_symbols): Adjust to use function_view as callback
12927 2017-02-23 Pedro Alves <palves@redhat.com>
12929 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12930 (%.o) <unittests/%.c>: New pattern.
12931 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12932 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12933 * common/function-view.h: New file.
12934 * unittests/function-view-selftests.c: New file.
12935 * configure: Regenerate.
12937 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12939 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12941 * go32-nat.c (go32_thread_alive): Likewise.
12943 2017-02-23 Yao Qi <yao.qi@linaro.org>
12945 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12948 2017-02-23 Yao Qi <yao.qi@linaro.org>
12950 * varobj.c (varobj_clear_saved_item): Use delete instead of
12952 (update_dynamic_varobj_children): Likewise.
12954 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12956 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12958 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12960 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12961 m_enum_value to 0 in default constructor.
12963 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12965 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12966 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12967 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12968 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12969 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12970 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12971 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12972 IS_STORE_CONDITIONAL_INSN.
12974 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12976 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12978 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12980 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12982 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12984 * dwarf2read.c (skip_one_die, read_attribute_value)
12985 (dwarf2_const_value_attr, dump_die_shallow)
12986 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12987 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12989 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12991 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12992 (dwarf_parse_macro_header): Accept DWARF version 5.
12993 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12995 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12997 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12999 * common/common-exceptions.h (enum errors): Likewise.
13000 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13001 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13002 (dwarf_expr_context::execute_stack_op): Likewise.
13003 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13005 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13006 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13007 (show_entry_values_debug, call_site_to_target_addr)
13008 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13009 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13010 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13011 (value_of_dwarf_block_entry, indirect_pieced_value)
13012 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13013 (disassemble_dwarf_expression): Likewise.
13014 * dwarf2read.c (process_die, inherit_abstract_dies)
13015 (read_call_site_scope): Likewise.
13016 * gdbtypes.h (struct func_type, struct call_site_parameter)
13017 (struct call_site): Likewise.
13018 * stack.c (read_frame_arg): Likewise.
13019 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13021 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13023 * defs.h (read_unsigned_leb128): New declaration.
13024 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13025 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13026 (dwarf2_find_location_expression): Call also
13027 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13028 * dwarf2loc.h (dwarf2_version): New declaration.
13029 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13031 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13033 (struct dwop_section_names): Add loclists_dwo.
13034 (dwop_section_names): Add .debug_loclists.dwo.
13035 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13036 (struct dwarf2_per_cu_data): Add dwarf_version.
13037 (struct dwo_sections): Add loclists.
13038 (struct attr_abbrev): Add implicit_const.
13039 (read_indirect_line_string): New declaration.
13040 (read_unsigned_leb128): Delete declaration.
13041 (rcuh_kind): New definition.
13042 (read_and_check_comp_unit_head): Change parameter
13043 is_debug_types_section to section_kind.
13044 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13045 (read_comp_unit_head): Change parameter abfd to section, add parameter
13046 section_kind. Handle DWARF-5.
13047 (error_check_comp_unit_head): Accept also DWARF version 5.
13048 (read_and_check_comp_unit_head): Change parameter
13049 is_debug_types_section to section_kind.
13050 (read_and_check_type_unit_head): Delete function.
13051 (read_abbrev_offset): Handle DWARF-5.
13052 (create_debug_type_hash_table): Add parameter section_kind. Process
13053 only DW_UT_type. Use signature and type_offset_in_tu from struct
13055 (create_debug_types_hash_table): Update create_debug_type_hash_table
13057 (create_all_type_units): Call create_debug_type_hash_table.
13058 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13059 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13061 (skip_one_die): Handle DW_FORM_implicit_const.
13062 (dwarf2_rnglists_process): New function.
13063 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13064 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13065 (read_attribute_value): Handle DW_FORM_implicit_const,
13067 (read_attribute): Handle DW_FORM_implicit_const.
13068 (read_indirect_string_at_offset_from): New function from
13069 read_indirect_string_at_offset.
13070 (read_indirect_string_at_offset): Call
13071 read_indirect_string_at_offset_from.
13072 (read_indirect_line_string_at_offset): New function.
13073 (read_indirect_string): New function comment.
13074 (read_indirect_line_string): New function.
13075 (read_unsigned_leb128): Make it global.
13076 (dwarf2_string_attr): Handle DWARF-5.
13077 (add_include_dir_stub, read_formatted_entries): New functions.
13078 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13080 (per_cu_header_read_in): Update read_comp_unit_head caller.
13081 (dwarf2_version): New function.
13082 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13084 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13087 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13089 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13091 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13093 * dwarf2read.c (dwarf2_ranges_process): New function from
13094 dwarf2_ranges_read.
13095 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13096 dwarf2_ranges_process.
13098 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13100 * dwarf2read.c (create_debug_type_hash_table): New function from
13101 create_debug_types_hash_table.
13102 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13103 (create_all_type_units, open_and_init_dwo_file): Update
13104 create_debug_types_hash_table callers.
13106 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13109 * fork-child.c (trace_start_error): Fix thinko. va_end should
13110 refer to 'ap', not 'args'.
13112 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13113 Pedro Alves <palves@redhat.com>
13116 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13118 * fork-child.c (trace_start_error): New function.
13119 (trace_start_error_with_name): Likewise.
13120 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13121 * inf-ptrace.c (inf_ptrace_me): Likewise.
13122 * inferior.h (trace_start_error): New prototype.
13123 (trace_start_error_with_name): Likewise.
13125 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13128 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13129 NULL before using it.
13130 * symmisc.c (maintenance_print_symbols): Likewise.
13131 (maintenance_print_msymbols): Likewise.
13133 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13135 * NEWS: Add record Python bindings entry.
13137 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13139 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13141 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13142 * python/py-record-btrace.c, python/py-record-btrace.h,
13143 python/py-record-full.c, python/py-record-full.h: New file.
13144 * python/py-record.c: Add include for py-record-btrace.h and
13146 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13147 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13148 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13149 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13151 (gdbpy_initialize_btrace): New export.
13152 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13154 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13156 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13157 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13158 * python/py-record.c: New file.
13159 * python/python-internal.h (gdbpy_start_recording,
13160 gdbpy_current_recording, gdpy_stop_recording,
13161 gdbpy_initialize_record): New export.
13162 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13163 (python_GdbMethods): Add gdbpy_start_recording,
13164 gdbpy_current_recording and gdbpy_stop_recording.
13166 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13168 * record-btrace.c (record_btrace_record_method): New function.
13169 (init_record_btrace_ops): Initialize to_record_method.
13170 * record-full.c (record_full_record_method): New function.
13171 (init_record_full_ops, init_record_full_core_ops): Add
13172 record_full_record_method.
13173 * record.h (enum record_method): New enum.
13174 * target-debug.h (target_debug_print_enum_record_method: New define.
13175 * target-delegates.c: Regenerate.
13176 * target.c (target_record_method): New function.
13177 * target.h: Include record.h.
13178 (struct target_ops) <to_record_method>: New field.
13179 (target_record_method): New export.
13181 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13183 * record.h (record_start, record_stop): New export.
13184 * record.c (record_start, record_stop): New function.
13186 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13188 * btrace.c (btrace_fetch): Copy function call segments pointer
13190 (btrace_clear): Clear the vector.
13191 (btrace_find_insn_by_number): Use binary search to find the correct
13192 function call segment.
13193 * btrace.h (brace_fun_p): New typedef.
13194 (struct btrace_thread_info) <functions>: New field.
13196 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13198 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13199 * btrace.c (btrace_decode_error): ... here. New function.
13200 * btrace.h (btrace_decode_error): New export.
13202 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13204 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13205 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13206 btrace_find_insn_by_number): Remove special case for gaps.
13207 * btrace.h (btrace_insn_get_error): New export.
13208 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13209 * record-btrace.c (btrace_insn_history): Print number for gaps.
13210 (record_btrace_info, record_btrace_goto): Handle gaps.
13212 2017-02-14 Tom Tromey <tom@tromey.com>
13215 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13217 * python/py-evts.c (gdbpy_initialize_py_events): Add
13218 before_prompt registry.
13219 * python/py-events.h (events_object) <before_prompt>: New field.
13221 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13223 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13225 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
13227 * symfile (_initialize_symfile): Add usage text to the load command's
13230 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13232 * utils.c (defaulted_query): Don't query on secondary UIs.
13234 2017-02-10 Tom Tromey <tom@tromey.com>
13236 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13238 2017-02-10 Tom Tromey <tom@tromey.com>
13240 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13242 * python/py-type.c (typy_legacy_template_argument): Remove
13243 unnecessary "cleanup" local.
13245 2017-02-10 Tom Tromey <tom@tromey.com>
13247 * python/python.c (do_start_initialization): New function, from
13248 _initialize_python.
13249 (_initialize_python): Call do_start_initialization.
13250 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13253 2017-02-10 Tom Tromey <tom@tromey.com>
13255 * python/py-prettyprint.c (pretty_print_one_value): Use
13258 2017-02-10 Tom Tromey <tom@tromey.com>
13260 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13261 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13263 * python/py-type.c (field_new): Use gdbpy_ref.
13264 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13266 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13267 (py_free_pspace): Likewise.
13268 (pspace_to_pspace_object): Likewise.
13269 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13270 (py_free_objfile): Likewise.
13271 (objfile_to_objfile_object): Likewise.
13272 * python/py-inferior.c (delete_thread_object): Use
13274 (infpy_read_memory): Likewise.
13275 (py_free_inferior): Likewise.
13276 * python/py-evtregistry.c (create_eventregistry_object): Use
13278 * python/py-event.c (create_event_object): Use gdbpy_ref.
13280 2017-02-10 Tom Tromey <tom@tromey.com>
13282 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13283 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13285 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13286 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13287 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13288 python/py-framefilter.c, python/py-function.c,
13289 python/py-inferior.c, python/py-infevents.c,
13290 python/py-linetable.c, python/py-newobjfileevent.c,
13291 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13292 python/py-signalevent.c, python/py-stopevent.c,
13293 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13294 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13295 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13296 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13298 2017-02-10 Tom Tromey <tom@tromey.com>
13300 * ui-out.h (ui_out_emit_type): New class.
13301 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13302 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13303 and ui_out_emit_tuple.
13304 (enumerate_locals): Likewise.
13305 (py_mi_print_variables, py_print_locals, py_print_args): Use
13307 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13309 * common/gdb_optional.h: New file.
13311 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13313 * MAINTAINERS (Write After Approval): Update my e-mail address.
13315 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13318 * breakpoint.c (_initialize_breakpoint): Update the help description
13319 of the 'commands' command to indicate that it takes a list argument.
13321 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13323 * interps.c (current_interp_set_logging): Remove "return".
13325 2017-02-09 Gary Benson <gbenson@redhat.com>
13327 * symtab.c (add_symtab_completions): Prevent NULL pointer
13330 2017-02-08 Pedro Alves <palves@redhat.com>
13332 * interps.c (interp::interp): Remove reference to quiet_p.
13333 (interp_set): Make static. Remove dead "Switching to" output
13335 (interp_quiet_p, interp_set_quiet): Delete.
13336 (interpreter_exec_cmd): Don't set the interpreter quiet.
13337 * interps.h (interp_quiet_p): Make static.
13338 (class interp) <quiet_p>: Remove field
13340 2017-02-08 Jerome Guitton <guitton@adacore.com>
13342 * cli/cli-decode.c (find_command_name_length): Make it extern.
13343 * cli/cli-decode.h (find_command_name_length): Declare.
13344 * cli/cli-script.c (command_name_equals, line_first_arg):
13346 (process_next_line): Use cli-decode to parse command names.
13347 (build_command_line): Make args a constant pointer.
13349 2017-02-08 Jerome Guitton <guitton@adacore.com>
13351 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13352 Remove case-insensitive search.
13354 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13356 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13357 at the end of the line. Avoids an ARI warning.
13359 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
13361 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13362 rdseed instructions.
13363 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13365 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13368 Provide and use sparc32 and sparc64 target description XML files.
13369 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13370 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13371 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13372 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13373 * features/sparc/sparc32-solaris.xml: New file.
13374 * features/sparc/sparc64-solaris.xml: New file.
13375 * features/sparc/sparc32-solaris.c: Generated.
13376 * features/sparc/sparc64-solaris.c: Generated.
13377 * sparc-tdep.h: Account for differences in target descriptions.
13378 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13379 (sparc32_register_type): Use target provided registers.
13380 (validate_tdesc_registers): New function.
13381 (sparc32_gdbarch_init): Use tdesc_has_registers.
13382 Set pseudoregister functions.
13383 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13384 (sparc64_register_type): Use target provided registers.
13385 (sparc64_init_abi): Set pseudoregister functions.
13387 2017-02-03 Tom Tromey <tom@tromey.com>
13390 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13391 with a single member.
13393 2017-02-03 Pedro Alves <palves@redhat.com>
13395 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13396 (cli_interp_base::~cli_interp_base): New.
13397 (cli_interp): New struct.
13398 (as_cli_interp): Cast the interp itself to cli_interp.
13399 (cli_interpreter_pre_command_loop): Rename to ...
13400 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13402 (cli_interpreter_init): Rename to ...
13403 (cli_interp::init): ... this. Remove 'self' parameter. Use
13404 boolean. Make extern.
13405 (cli_interpreter_resume): Rename to ...
13406 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13408 (cli_interpreter_suspend): Rename to ...
13409 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13411 (cli_interpreter_exec): Rename to ...
13412 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13414 (cli_interpreter_supports_command_editing): Rename to ...
13415 (cli_interp_base::supports_command_editing): ... this. Remove
13416 'interp' parameter. Make extern.
13417 (cli_ui_out): Rename to ...
13418 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13420 (cli_set_logging): Rename to ...
13421 (cli_interp_base::set_logging): ... this. Remove 'interp'
13422 parameter. Make extern.
13423 (cli_interp_procs): Delete.
13424 (cli_interp_factory): Adjust to use "new".
13425 * cli/cli-interp.h: Include "interps.h".
13426 (struct cli_interp_base): New struct.
13427 * interps.c (struct interp): Delete. Fields moved to interps.h.
13428 (interp_new): Delete.
13429 (interp::interp, interp::~interp): New.
13430 (interp_set): Use bool, and return void. Assume the interpreter
13431 has suspend, init and resume methods, and that the all return
13433 (set_top_level_interpreter): interp_set returns void.
13434 (interp_ui_out): Adapt.
13435 (current_interp_set_logging): Adapt.
13436 (interp_data): Delete.
13437 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13438 (interp_exec): Adapt.
13439 (top_level_interpreter_data): Delete.
13440 * interps.h (interp_init_ftype, interp_resume_ftype)
13441 (interp_suspend_ftype, interp_exec_ftype)
13442 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13443 (class interp): New.
13444 (interp_new): Delete.
13445 (interp_set): Now returns void. Use bool.
13446 (interp_data, top_level_interpreter_data): Delete.
13447 * mi/mi-common.h: Include interps.h.
13448 (class mi_interp): Inherit from interp. Define a ctor. Declare
13449 init, resume, suspect, exec, interp_ui_out, set_logging and
13450 pre_command_loop methods.
13451 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13452 (mi_interpreter_init): Rename to ...
13453 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13454 bool, return void and make extern. Adjust.
13455 (mi_interpreter_resume): ... Rename to ...
13456 (mi_interp::resume): ... this. Remove the 'data' parameter,
13457 return void and make extern. Adjust.
13458 (mi_interpreter_suspend): ... Rename to ...
13459 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13460 return void and make extern. Adjust.
13461 (mi_interpreter_exec): ... Rename to ...
13462 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13464 (mi_interpreter_pre_command_loop): ... Rename to ...
13465 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13466 parameter and make extern.
13467 (mi_on_normal_stop_1): Adjust.
13468 (mi_ui_out): Rename to ...
13469 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13470 parameter and make extern. Adjust.
13471 (mi_set_logging): Rename to ...
13472 (mi_interp::set_logging): ... this. Remove the 'interp'
13473 parameter and make extern. Adjust.
13474 (mi_interp_procs): Delete.
13475 (mi_interp_factory): Adjust to use 'new'.
13476 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13477 (mi_print_exception, mi_execute_command, mi_load_progress):
13479 * tui/tui-interp.c (tui_interp): New class.
13480 (as_tui_interp): Return a tui_interp pointer.
13481 (tui_on_normal_stop, tui_on_signal_received)
13482 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13483 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13484 to use interp::interp_ui_out.
13485 (tui_init): Rename to ...
13486 (tui_interp::init): ... this. Remove the 'self' parameter, use
13487 bool, return void and make extern. Adjust.
13488 (tui_resume): Rename to ...
13489 (tui_interp::resume): ... this. Remove the 'data' parameter,
13490 return void and make extern. Adjust.
13491 (tui_suspend): Rename to ...
13492 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13493 return void and make extern. Adjust.
13494 (tui_ui_out): Rename to ...
13495 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13496 parameter, and make extern. Adjust.
13497 (tui_exec): Rename to ...
13498 (tui_interp::exec): ... this. Remove the 'data' parameter and
13500 (tui_interp_procs): Delete.
13501 (tui_interp_factory): Use "new".
13503 2017-02-02 Tom Tromey <tom@tromey.com>
13505 * rust-exp.y (ends_raw_string, space_then_number)
13506 (rust_identifier_start_p): Return bool.
13507 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13508 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13509 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13510 (rust_chartype_p): Return bool.
13511 (val_print_struct, rust_print_struct_def, rust_print_type):
13513 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13516 2017-02-02 Tom Tromey <tom@tromey.com>
13518 * rust-lang.c: Reindent.
13520 2017-02-02 Tom Tromey <tom@tromey.com>
13522 * rust-lang.h (rust_crate_for_block): Update.
13523 * rust-lang.c (rust_crate_for_block): Return std::string.
13524 (rust_get_disr_info): Use std:;string, not
13525 gdb::unique_xmalloc_ptr.
13526 * rust-exp.y (crate_name): Update.
13528 2017-02-02 Pedro Alves <palves@redhat.com>
13530 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13531 field out of gdb_disassembler_test and make it static.
13533 2017-02-02 Pedro Alves <palves@redhat.com>
13535 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13536 mi1_interp and mi_interp fields.
13538 2017-02-02 Pedro Alves <palves@redhat.com>
13540 * cli/cli-interp.c (struct saved_output_files, saved_output):
13541 Moved from cli/cli-logging.c.
13542 (cli_set_logging): New function.
13543 (cli_interp_procs): Install cli_set_logging.
13544 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13546 * cli/cli-logging.c (struct saved_output_files, saved_output):
13547 Moved to cli/cli-interp.c.
13548 (pop_output_files): Don't save outputs here.
13549 (make_logging_output): New function.
13550 (handle_redirections): Don't build tee nor save previous outputs
13552 * interps.c (current_interp_set_logging): Change prototype.
13553 Assume there's always a set_logging_proc method installed.
13554 * interps.h (interp_set_logging_ftype): Change prototype.
13555 (current_interp_set_logging): Change prototype and adjust comment.
13556 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13557 use make_logging_output.
13558 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13559 2017-02-02 Pedro Alves <palves@redhat.com>
13561 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13563 (set_logging_overwrite): ... here.
13564 (logging_no_redirect_file): Delete.
13565 (set_logging_redirect): Don't handle redirection on the fly.
13566 Instead warn that "logging off" / "logging on" is necessary.
13567 (pop_output_files): Delete references to logging_no_redirect_file.
13568 (show_logging_command): Always speak in terms of what will happen
13569 once logging is reenabled.
13571 2017-02-02 Pedro Alves <palves@redhat.com>
13573 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13575 2017-02-02 Pedro Alves <palves@redhat.com>
13577 * disasm.c (gdb_pretty_print_insn): Rename to ...
13578 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13579 Remove gdbarch parameter. Adapt to clear the object's buffers
13580 instead of allocating new buffers, and to print using the object's
13581 gdb_disassembler instead of calling gdb_print_insn.
13582 (dump_insns): Use gdb_pretty_print_disassembler.
13583 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13584 (gdb_pretty_print_disassembler): New class.
13585 * record-btrace.c (btrace_insn_history): Use
13586 gdb_pretty_print_disassembler.
13588 2017-02-02 Pedro Alves <palves@redhat.com>
13590 * ada-lang.c (type_as_string): Use string_file.
13591 * ada-valprint.c (ada_print_floating): Use string_file.
13592 * ada-varobj.c (ada_varobj_scalar_image)
13593 (ada_varobj_get_value_image): Use string_file.
13594 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13595 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13596 * breakpoint.c (update_inserted_breakpoint_locations)
13597 (insert_breakpoint_locations, reattach_breakpoints)
13598 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13599 (print_it_watchpoint): Use string_file.
13600 (save_breakpoints): Use stdio_file.
13601 * c-exp.y (oper): Use string_file.
13602 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13604 (pop_output_files): Use delete.
13605 (handle_redirections): Use stdio_file and tee_file.
13606 * cli/cli-setshow.c (do_show_command): Use string_file.
13607 * compile/compile-c-support.c (c_compute_program): Use
13609 * compile/compile-c-symbols.c (generate_vla_size): Take a
13610 'string_file &' instead of a 'ui_file *'.
13611 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13612 of a 'ui_file *'. Use string_file.
13613 (generate_c_for_variable_locations): Take a 'string_file &'
13614 instead of a 'ui_file *'.
13615 * compile/compile-internal.h (generate_c_for_for_one_variable):
13616 Take a 'string_file &' instead of a 'ui_file *'.
13617 * compile/compile-loc2c.c (push, pushf, unary, binary)
13618 (print_label, pushf_register_address, pushf_register)
13619 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13620 'ui_file *'. Adjust.
13621 * compile/compile.c (compile_to_object): Use string_file.
13622 * compile/compile.h (compile_dwarf_expr_to_c)
13623 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13625 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13626 (replace_typedefs_qualified_name): Use string_file and
13628 * disasm.c (gdb_pretty_print_insn): Use string_file.
13629 (gdb_disassembly): Adjust reference the null_stream global.
13630 (do_ui_file_delete): Delete.
13631 (gdb_insn_length): Use null_stream.
13632 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13633 * dwarf2loc.c (dwarf2_compile_property_to_c)
13634 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13635 'string_file &' instead of a 'ui_file *'.
13636 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13637 * dwarf2read.c (do_ui_file_peek_last): Delete.
13638 (dwarf2_compute_name): Use string_file.
13639 * event-top.c (gdb_setup_readline): Use stdio_file.
13640 * gdbarch.sh (verify_gdbarch): Use string_file.
13641 * gdbtypes.c (safe_parse_type): Use null_stream.
13642 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13644 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13645 'string_file *' instead of a 'ui_file *'.
13646 (gdbscm_arch_disassemble): Use string_file.
13647 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13648 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13649 inherits from ui_file.
13650 (ioscm_file_port_delete, ioscm_file_port_rewind)
13651 (ioscm_file_port_put): Delete.
13652 (ioscm_file_port_write): Rename to ...
13653 (ioscm_file_port::write): ... this. Remove file_port_magic
13655 (ioscm_file_port_new): Delete.
13656 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13658 * guile/scm-type.c (tyscm_type_name): Use string_file.
13659 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13661 * infcmd.c (print_return_value_1): Use string_file.
13662 * infrun.c (print_target_wait_results): Use string_file.
13663 * language.c (add_language): Use string_file.
13664 * location.c (explicit_to_string_internal): Use string_file.
13665 * main.c (captured_main_1): Use null_file.
13666 * maint.c (maintenance_print_architecture): Use stdio_file.
13667 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13668 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13669 event_channel>: Change type to mi_console_file pointer.
13670 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13671 (mi_console_file_delete): Delete.
13672 (struct mi_console_file): Delete.
13673 (mi_console_file_magic): Delete.
13674 (mi_console_file_new): Delete.
13675 (mi_console_file::mi_console_file): New.
13676 (mi_console_file_delete): Delete.
13677 (mi_console_file_fputs): Delete.
13678 (mi_console_file::write): New.
13679 (mi_console_raw_packet): Delete.
13680 (mi_console_file::flush): New.
13681 (mi_console_file_flush): Delete.
13682 (mi_console_set_raw): Rename to ...
13683 (mi_console_file::set_raw): ... this.
13684 * mi/mi-console.h (class mi_console_file): New class.
13685 (mi_console_file_new, mi_console_set_raw): Delete.
13686 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13687 (mi_set_logging): Use delete and tee_file. Adjust.
13688 * mi/mi-main.c (output_register): Use string_file.
13689 (mi_cmd_data_evaluate_expression): Use string_file.
13690 (mi_cmd_data_read_memory): Use string_file.
13691 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13692 * mi/mi-out.c (mi_ui_out::main_stream): New.
13693 (mi_ui_out::rewind): Use main_stream and
13695 (mi_ui_out::put): Use main_stream and string_file.
13696 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13697 Allocate a 'string_file' instead.
13698 (mi_out_new): Don't allocate a mem_fileopen stream here.
13699 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13700 (mi_ui_out::main_stream): Declare method.
13701 * printcmd.c (eval_command): Use string_file.
13702 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13703 * python/py-arch.c (archpy_disassemble): Use string_file.
13704 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13705 * python/py-frame.c (frapy_str): Use string_file.
13706 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13708 * python/py-type.c (typy_str): Use string_file.
13709 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13710 * python/py-value.c (valpy_str): Use string_file.
13711 * record-btrace.c (btrace_insn_history): Use string_file.
13712 * regcache.c (regcache_print): Use stdio_file.
13713 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13714 * remote.c (escape_buffer): Use string_file.
13715 * rust-lang.c (rust_get_disr_info): Use string_file.
13716 * serial.c (serial_open_ops_1): Use stdio_file.
13717 (do_serial_close): Use delete.
13718 * stack.c (print_frame_arg): Use string_file.
13719 (print_frame_args): Remove local mem_fileopen stream, not used.
13720 (print_frame): Use string_file.
13721 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13722 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13723 Take a 'string_file *' instead of a 'ui_file *'.
13724 * top.c (new_ui): Use stdio_file and stderr_file.
13725 (free_ui): Use delete.
13726 (execute_command_to_string): Use string_file.
13727 (quit_confirm): Use string_file.
13728 * tracepoint.c (collection_list::append_exp): Use string_file.
13729 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13730 * tui/tui-file.c: Don't include "ui-file.h".
13731 (enum streamtype, struct tui_stream): Delete.
13732 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13733 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13734 (tui_file::tui_file): New method.
13735 (tui_file_fputs): Delete.
13736 (tui_file_get_strbuf): Delete.
13737 (tui_file::puts): New method.
13738 (tui_file_adjust_strbuf): Delete.
13739 (tui_file_flush): Delete.
13740 (tui_file::flush): New method.
13741 * tui/tui-file.h: Tweak intro comment.
13743 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13744 (tui_file_adjust_strbuf): Delete declarations.
13745 (class tui_file): New class.
13746 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13747 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13748 (tui_register_format): Use string_stream.
13749 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13750 (tui_get_function_from_frame): Use string_file.
13751 * typeprint.c (type_to_string): Use string_file.
13752 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13753 (null_stream): New global.
13754 (ui_file_delete): Delete.
13755 (ui_file::ui_file): New.
13756 (null_file_isatty): Delete.
13757 (ui_file::~ui_file): New.
13758 (null_file_rewind): Delete.
13759 (ui_file::printf): New.
13760 (null_file_put): Delete.
13761 (null_file_flush): Delete.
13762 (ui_file::putstr): New.
13763 (null_file_write): Delete.
13764 (ui_file::putstrn): New.
13765 (null_file_read): Delete.
13766 (ui_file::putc): New.
13767 (null_file_fputs): Delete.
13768 (null_file_write_async_safe): Delete.
13769 (ui_file::vprintf): New.
13770 (null_file_delete): Delete.
13771 (null_file::write): New.
13772 (null_file_fseek): Delete.
13773 (null_file::puts): New.
13774 (ui_file_data): Delete.
13775 (null_file::write_async_safe): New.
13776 (gdb_flush, ui_file_isatty): Adjust.
13777 (ui_file_put, ui_file_rewind): Delete.
13778 (ui_file_write): Adjust.
13779 (ui_file_write_for_put): Delete.
13780 (ui_file_write_async_safe, ui_file_read): Adjust.
13781 (ui_file_fseek): Delete.
13782 (fputs_unfiltered): Adjust.
13783 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13784 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13785 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13786 (set_ui_file_data): Delete.
13787 (string_file::~string_file, string_file::write)
13788 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13789 (do_ui_file_as_string, ui_file_as_string): Delete.
13790 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13791 (struct mem_file): Delete.
13792 (mem_file_new): Delete.
13793 (stdio_file::stdio_file): New.
13794 (mem_file_delete): Delete.
13795 (stdio_file::stdio_file): New.
13796 (mem_fileopen): Delete.
13797 (stdio_file::~stdio_file): New.
13798 (mem_file_rewind): Delete.
13799 (stdio_file::set_stream): New.
13800 (mem_file_put): Delete.
13801 (stdio_file::open): New.
13802 (mem_file_write): Delete.
13803 (stdio_file_magic, struct stdio_file): Delete.
13804 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13805 (stdio_file::flush): New.
13806 (stdio_file_read): Rename to ...
13807 (stdio_file::read): ... this. Adjust.
13808 (stdio_file_write): Rename to ...
13809 (stdio_file::write): ... this. Adjust.
13810 (stdio_file_write_async_safe): Rename to ...
13811 (stdio_file::write_async_safe) ... this. Adjust.
13812 (stdio_file_fputs): Rename to ...
13813 (stdio_file::puts) ... this. Adjust.
13814 (stdio_file_isatty): Delete.
13815 (stdio_file_fseek): Delete.
13816 (stdio_file::isatty): New.
13817 (stderr_file_write): Rename to ...
13818 (stderr_file::write) ... this. Adjust.
13819 (stderr_file_fputs): Rename to ...
13820 (stderr_file::puts) ... this. Adjust.
13821 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13822 (stderr_file::stderr_file): New.
13823 (tee_file_magic): Delete.
13824 (struct tee_file): Delete.
13825 (tee_file::tee_file): New.
13826 (tee_file_new): Delete.
13827 (tee_file::~tee_file): New.
13828 (tee_file_delete): Delete.
13829 (tee_file_flush): Rename to ...
13830 (tee_file::flush): ... this. Adjust.
13831 (tee_file_write): Rename to ...
13832 (tee_file::write): ... this. Adjust.
13833 (tee_file::write_async_safe): New.
13834 (tee_file_fputs): Rename to ...
13835 (tee_file::puts): ... this. Adjust.
13836 (tee_file_isatty): Rename to ...
13837 (tee_file::isatty): ... this. Adjust.
13838 * ui-file.h (struct obstack, struct ui_file): Don't
13840 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13841 (ui_file_write_ftype)
13842 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13843 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13844 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13845 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13846 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13847 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13848 (set_ui_file_fseek): Delete.
13849 (ui_file_data, ui_file_delete, ui_file_rewind)
13850 (struct ui_file): New.
13852 (class null_file): New.
13853 (null_stream): Declare.
13854 (ui_file_write_for_put, ui_file_put): Delete.
13855 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13857 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13858 (gdb_fopen, tee_file_new): Delete.
13859 (struct string_file): New.
13860 (struct stdio_file): New.
13861 (stdio_file_up): New.
13862 (struct stderr_file): New.
13863 (class tee_file): New.
13864 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13865 of a 'ui_file *'. Adjust.
13866 * ui-out.h (class ui_out) <field_stream>: Likewise.
13867 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13868 (null_stream): Delete.
13869 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13871 * utils.h (struct ui_file): Delete forward declaration..
13872 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13873 (error_stream): Take a 'string_file &' instead of a
13875 * varobj.c (varobj_value_get_print_value): Use string_file.
13876 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13877 * gdbarch.c: Regenerate.
13879 2017-02-02 Pedro Alves <palves@redhat.com>
13881 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13882 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13883 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13884 Adjust to call gdb_print_insn instead of
13885 gdb_disassembler::print_insn.
13886 (dump_insns, do_mixed_source_and_assembly_deprecated)
13887 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13888 'gdbarch' parameter. Remove gdb_disassembler parameter.
13889 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13890 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13892 (gdb_pretty_print_insn): Re-add declaration.
13893 * record-btrace.c (btrace_insn_history): Don't allocate a
13894 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13896 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13898 * disasm.h (gdb_disassembly): Remove file_string parameter.
13899 * disasm.c (gdb_disassembly): Likewise.
13900 * cli/cli-cmds.c (print_disassembly): Adapt.
13901 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13902 * stack.c (do_gdb_disassembly): Likewise.
13904 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13906 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13907 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13908 targets. And if the implicit value is longer than needed, extract
13909 the first bytes instead of the "least significant" ones.
13911 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13913 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13914 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13915 (btrace_fetch): Assert can_access_registers_ptid.
13916 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13917 validate_registers_access.
13919 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13921 * gdbthread.h (can_access_registers_ptid): New.
13922 * thread.c (can_access_registers_ptid): New.
13924 2017-02-01 Pedro Alves <palves@redhat.com>
13926 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13928 2017-01-31 Pedro Alves <palves@redhat.com>
13930 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13933 2017-01-31 Pedro Alves <palves@redhat.com>
13935 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13938 2017-01-31 Pedro Alves <palves@redhat.com>
13940 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13942 2017-01-31 Pedro Alves <palves@redhat.com>
13944 * common/scoped_restore.h
13945 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13946 change the value's parameter type to T2.
13947 (make_scoped_restore): Likewise.
13949 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13950 Richard Henderson <rth@redhat.com>
13952 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13953 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13954 GS_BASE for older kernels.
13955 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13956 GS_BASE for older kernels.
13957 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13958 and GS_BASE to the offset table.
13959 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13960 system register group.
13961 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13963 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13965 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13966 AMD64_GSBASE_REGNUM.
13967 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13968 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13969 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13970 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13971 i386/64bit-segments.xml in those rules.
13972 * features/i386/64bit-segments.xml: New file.
13973 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13974 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13975 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13976 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13977 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13978 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13979 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13980 * features/i386/amd64-avx-linux.c: Regenerated.
13981 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13982 * features/i386/amd64-avx-mpx.c: Regenerated.
13983 * features/i386/amd64-avx512-linux.c: Regenerated.
13984 * features/i386/amd64-linux.c: Regenerated.
13985 * features/i386/amd64-mpx-linux.c: Regenerated.
13986 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13987 * features/i386/i386-avx-mpx.c: Regenerated.
13988 * features/i386/x32-avx-linux.c: Regenerated.
13989 * features/i386/x32-avx512-linux.c: Regenerated.
13990 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13991 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13992 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13993 * regformats/i386/amd64-linux.dat: Regenerated.
13994 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13995 * regformats/i386/x32-avx-linux.dat: Regenerated.
13996 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13997 * regformats/i386/x32-linux.dat: Regenerated.
13999 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14001 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14002 Set to AMD64_NUM_REGS.
14004 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14006 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14007 that checks validity of a register number.
14009 2017-01-27 Kees Cook <keescook@google.com>
14011 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14012 fetch_fpregs if target has fpa registers.
14013 (arm_linux_store_inferior_registers): Call store_fpregs if target
14016 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14018 * cris-tdep.c (cris_gdbarch_init): Remove check for
14019 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14021 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14023 * corelow.c (get_core_register_section): Check for regset
14024 existence before checking for REGSET_VARIABLE_SIZE.
14026 2017-01-26 Yao Qi <yao.qi@linaro.org>
14027 Pedro Alves <palves@redhat.com>
14030 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14031 call memory_error, save memaddr instead.
14032 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14033 negative, cal memory_error.
14034 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14036 2017-01-26 Yao Qi <yao.qi@linaro.org>
14038 * disasm-selftests.c (memory_error_test): New function.
14039 (_initialize_disasm_selftests): Register memory_error_test.
14041 2017-01-26 Yao Qi <yao.qi@linaro.org>
14043 * Makefile.in (SFILES): Add disasm-selftests.c and
14045 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14046 * disasm-selftests.c: New file.
14047 * selftest-arch.c: New file.
14048 * selftest-arch.h: New file.
14050 2017-01-26 Yao Qi <yao.qi@linaro.org>
14052 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14053 to bfd_arch_mep. Don't return 0 if section is not
14054 found. Call print_insn_mep.
14056 2017-01-26 Pedro Alves <palves@redhat.com>
14057 Yao Qi <yao.qi@linaro.org>
14059 * arm-tdep.c: Include "disasm.h".
14060 (gdb_print_insn_arm): Update code to get gdbarch.
14061 * disasm.c (dis_asm_read_memory): Change it to
14062 gdb_disassembler::dis_asm_read_memory.
14063 (dis_asm_memory_error): Likewise.
14064 (dis_asm_print_address): Likewise.
14065 (gdb_pretty_print_insn): Change it to
14066 gdb_disassembler::pretty_print_insn.
14067 (dump_insns): Add one argument gdb_disassemlber. All
14069 (do_mixed_source_and_assembly_deprecated): Likewise.
14070 (do_mixed_source_and_assembly): Likewise.
14071 (do_assembly_only): Likewise.
14072 (gdb_disassembler::gdb_disassembler): New.
14073 (gdb_disassembler::print_insn): New.
14074 * disasm.h (class gdb_disassembler): New.
14075 (gdb_pretty_print_insn): Remove declaration.
14076 (gdb_disassemble_info): Likewise.
14077 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14078 (gdbscm_disasm_read_memory_worker): Update.
14079 (gdbscm_disasm_read_memory): Update.
14080 (gdbscm_disasm_memory_error): Remove.
14081 (gdbscm_disasm_print_address): Remove.
14082 (gdbscm_disassembler::gdbscm_disassembler): New.
14083 (gdbscm_print_insn_from_port): Update.
14084 * mips-tdep.c: Include disasm.h.
14085 (gdb_print_insn_mips): Update code to get gdbarch.
14086 * record-btrace.c (btrace_insn_history): Update.
14087 * spu-tdep.c: Include disasm.h.
14088 (struct spu_dis_asm_data): Remove.
14089 (struct spu_dis_asm_info): New.
14090 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14092 (gdb_print_insn_spu): Cast disassemble_info to
14095 2017-01-26 Yao Qi <yao.qi@linaro.org>
14097 * disasm.c (do_ui_file_delete): Delete.
14098 (gdb_insn_length): Move code creating stream to ...
14099 * utils.c (null_stream): ... here. New function.
14100 * utils.h (null_stream): Declare.
14102 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14104 * python/py-inferior.c (find_thread_object): Return directly
14105 from the loop. Remove "found" variable.
14107 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14109 GDB 7.12.1 released.
14111 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14113 * python/py-function.c (fnpy_call): Reorder declarations to have
14114 the gdbpy_enter object declared first.
14115 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14117 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14120 * python/python-internal.h (PyMem_RawMalloc): Define for
14122 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14123 PyMem_RawMalloc instead of PyMem_Malloc.
14125 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14126 Luis Machado <lgustavo@codesourcery.com>
14128 * NEWS (New commands): Mention flash-erase.
14129 (New MI commands): Mention target-flash-erase.
14130 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14132 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14133 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14134 * target.c (flash_erase_command): New function.
14135 (initialize_targets): Add new flash-erase command.
14136 * target.h (flash_erase_command): New declaration.
14138 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14140 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14141 HAVE_SYS_PROCFS_H is defined.
14143 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14145 * remote.c (struct cached_reg): Change data into a pointer.
14146 * (stop_reply_dtr): Free data pointers before deleting vector.
14147 (process_stop_reply): Likewise.
14148 (remote_parse_stop_reply): Allocate space for data
14150 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14152 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14154 (amd64_pseudo_register_read_value): Likewise.
14155 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14156 (store_register_using_P): Likewise.
14157 * regcache.c (regcache_xfer_part): Likewise.
14159 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14161 Split real and pseudo registers.
14162 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14163 (sparc32_pseudo_regnum): New enum.
14164 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14165 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14166 (SPARC32_CP0_REGISTERS): New macro.
14167 (sparc32_pseudo_register_name): New function.
14168 (sparc32_register_name): Use sparc32_pseudo_register_name.
14169 (sparc32_pseudo_register_type): New function.
14170 (sparc32_register_type): Use sparc32_pseudo_register_type.
14171 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14172 pseudo register numbers.
14173 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14174 (SPARC64_CP0_REGISTERS): New macro.
14175 (sparc64_pseudo_register_name): New function.
14176 (sparc64_register_name): Use sparc64_pseudo_register_name.
14177 (sparc64_pseudo_register_type): New function.
14178 (sparc64_register_type): Use sparc64_pseudo_register_type.
14179 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14180 pseudo register numbers.
14181 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14182 sparc64_store_arguments): Handle pseudo register numbers.
14184 2017-01-13 Yao Qi <yao.qi@linaro.org>
14186 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14187 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14189 (getpkt_or_notif_sane_1): Likewise.
14191 2017-01-13 Yao Qi <yao.qi@linaro.org>
14193 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14194 of CC. Pass "-x c++-header" instead of "-x c".
14196 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14198 * remote.c (remote_can_async_p): Update comment.
14200 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14202 * linux-nat.c (linux_nat_can_async_p): Update comment.
14204 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14206 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14208 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14210 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14212 2017-01-10 Tom Tromey <tom@tromey.com>
14214 * python/py-type.c (typy_legacy_template_argument): Update.
14215 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14216 ~demangle_parse_info): Declare new members.
14217 (cp_demangled_name_to_comp): Return unique_ptr.
14218 (cp_demangled_name_parse_free)
14219 (make_cleanup_cp_demangled_name_parse_free)
14220 (cp_new_demangle_parse_info): Remove.
14221 * cp-support.c (do_demangled_name_parse_free_cleanup)
14222 (make_cleanup_cp_demangled_name_parse_free): Remove.
14223 (inspect_type, cp_canonicalize_string_full)
14224 (cp_canonicalize_string): Update.
14225 (mangled_name_to_comp): Change return type.
14226 (cp_class_name_from_physname, method_name_from_physname)
14227 (cp_func_name, cp_remove_params): Update.
14228 * cp-name-parser.y (demangle_parse_info): New constructor, from
14229 cp_new_demangle_parse_info.
14230 (~demangle_parse_info): New destructor, from
14231 cp_demangled_name_parse_free.
14232 (cp_merge_demangle_parse_infos): Update.
14233 (cp_demangled_name_to_comp): Change return type.
14235 2017-01-10 Tom Tromey <tom@tromey.com>
14237 * top.c (prevent_dont_repeat): Change return type.
14238 * python/python.c (execute_gdb_command): Use std::string.
14240 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14241 * command.h (prevent_dont_repeat): Change return type.
14242 * breakpoint.c (bpstat_do_actions_1): Update.
14244 2017-01-10 Tom Tromey <tom@tromey.com>
14246 * value.h (scoped_value_mark::~scoped_value_mark): Call
14248 (scoped_value_mark::free_to_mark): New method.
14249 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14252 2017-01-10 Tom Tromey <tom@tromey.com>
14254 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14255 (valpy_reference_value, valpy_const_value, valpy_get_address)
14256 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14257 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14258 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14259 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14261 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14262 * value.h (scoped_value_mark): New class.
14264 2017-01-10 Tom Tromey <tom@tromey.com>
14266 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14267 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14268 * psymtab.c (discard_psymtabs_upto): Remove.
14269 (make_cleanup_discard_psymtabs): Remove.
14270 (struct psymtab_state): Remove.
14272 2017-01-10 Tom Tromey <tom@tromey.com>
14274 * record-full.c (record_full_save_cleanups): Remove.
14275 (record_full_save): Use gdb::unlinker.
14276 * gcore.c (do_bfd_delete_cleanup): Remove.
14277 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14279 * dwarf2read.c (unlink_if_set): Remove.
14280 (write_psymtabs_to_index): Use gdb::unlinker.
14281 * common/gdb_unlinker.h: New file.
14283 2017-01-10 Tom Tromey <tom@tromey.com>
14285 * windows-tdep.c (windows_xfer_shared_library): Update.
14286 * windows-nat.c (windows_make_so): Update.
14287 * utils.h (make_cleanup_bfd_unref): Remove.
14288 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14289 * symfile.h (symfile_bfd_open)
14290 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14291 * symfile.c (read_symbols, symbol_file_add)
14292 (separate_debug_file_exists): Update.
14293 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14294 (generic_load, reread_symbols): Update.
14295 * symfile-mem.c (symbol_file_add_from_memory): Update.
14296 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14297 (spu_symbol_file_add_from_memory): Update.
14298 * solist.h (struct target_so_ops) <bfd_open>: Return
14300 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14301 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14303 (solib_map_sections, reload_shared_libraries_1): Update.
14304 * solib-svr4.c (enable_break): Update.
14305 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14306 * solib-frv.c (enable_break2): Update.
14307 * solib-dsbt.c (enable_break): Update.
14308 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14310 (darwin_solib_get_all_image_info_addr_at_init): Update.
14311 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14312 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14313 * record-full.c (record_full_save): Update.
14314 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14315 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14316 * minidebug.c (find_separate_debug_file_in_section): Return
14318 * machoread.c (macho_add_oso_symfile): Change abfd to
14320 (macho_symfile_read_all_oso): Update.
14321 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14322 (macho_symfile_read): Update.
14323 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14324 (jit_bfd_try_read_symtab): Update.
14325 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14326 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14327 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14329 (gdb_bfd_ref_policy): New struct.
14330 (gdb_bfd_ref_ptr): New typedef.
14331 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14332 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14333 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14335 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14336 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14337 (gcore_command): Update.
14338 * exec.c (exec_file_attach): Update.
14339 * elfread.c (elf_symfile_read): Update.
14340 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14341 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14342 (open_and_init_dwo_file): Update.
14343 (open_dwp_file): Return gdb_bfd_ref_ptr.
14344 (open_and_init_dwp_file): Update.
14345 * corelow.c (core_open): Update.
14346 * compile/compile-object-load.c (compile_object_load): Update.
14347 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14348 * coffread.c (coff_symfile_read): Update.
14349 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14350 gdb_bfd_ref_ptr. Rename.
14351 (dump_bfd_file, restore_command): Update.
14352 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14353 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14354 (find_separate_debug_file_by_buildid): Update.
14356 2017-01-10 Tom Tromey <tom@tromey.com>
14358 * common/gdb_ref_ptr.h: New file.
14359 * python/py-ref.h (struct gdbpy_ref_policy): New.
14360 (gdbpy_ref): Now a typedef.
14362 2017-01-10 Tom Tromey <tom@tromey.com>
14364 * utils.h (make_cleanup_htab_delete): Don't declare.
14365 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14367 * linespec.c (decode_compound_collector): Add constructor,
14369 (lookup_prefix_sym): Remove cleanup.
14370 (symtab_collector): Add constructor, destructor.
14371 (collect_symtabs_from_filename): Remove cleanup.
14372 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14373 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14375 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14376 * dwarf2read.c (dw2_expand_symtabs_matching)
14377 (dw2_map_symbol_filenames, dwarf_decode_macros)
14378 (write_psymtabs_to_index): Use htab_up.
14379 * dwarf2loc.c (func_verify_no_selftailcall)
14380 (call_site_find_chain_1, func_verify_no_selftailcall)
14381 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14382 std::vector, gdb::unique_xmalloc_ptr.
14383 (call_sitep): Remove typedef.
14384 (dwarf2_locexpr_baton_eval): Remove unused variable.
14386 2017-01-10 Tom Tromey <tom@tromey.com>
14388 * python/python-internal.h (make_cleanup_py_decref)
14389 (make_cleanup_py_xdecref): Don't declare.
14390 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14391 (py_xdecref, make_cleanup_py_xdecref): Remove.
14393 2017-01-10 Tom Tromey <tom@tromey.com>
14395 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14396 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14398 2017-01-10 Tom Tromey <tom@tromey.com>
14400 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14402 2017-01-10 Tom Tromey <tom@tromey.com>
14404 * python/py-utils.c (unicode_to_encoded_string)
14405 (python_string_to_target_string)
14406 (python_string_to_target_python_string)
14407 (python_string_to_host_string, gdbpy_obj_to_string)
14408 (get_addr_from_python): Use gdbpy_ref.
14410 2017-01-10 Tom Tromey <tom@tromey.com>
14412 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14415 2017-01-10 Tom Tromey <tom@tromey.com>
14417 * python/python.c (eval_python_command, gdbpy_decode_line)
14418 (gdbpy_run_events, gdbpy_start_type_printers)
14419 (gdbpy_apply_type_printers): Use gdbpy_ref.
14421 2017-01-10 Tom Tromey <tom@tromey.com>
14423 * python/py-param.c (get_doc_string, compute_enum_values): Use
14426 2017-01-10 Tom Tromey <tom@tromey.com>
14428 * python/py-inferior.c (find_thread_object, build_inferior_list):
14431 2017-01-10 Tom Tromey <tom@tromey.com>
14433 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14435 2017-01-10 Tom Tromey <tom@tromey.com>
14437 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14440 2017-01-10 Tom Tromey <tom@tromey.com>
14442 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14444 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14447 2017-01-10 Tom Tromey <tom@tromey.com>
14449 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14452 2017-01-10 Tom Tromey <tom@tromey.com>
14454 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14455 decref results of PyArg_ParseTupleAndKeywords.
14457 2017-01-10 Tom Tromey <tom@tromey.com>
14459 * python/python.c (python_run_simple_file): Use
14460 unique_xmalloc_ptr, gdbpy_ref.
14462 2017-01-10 Tom Tromey <tom@tromey.com>
14464 * python/py-prettyprint.c (print_stack_unless_memory_error)
14465 (print_string_repr, print_children): Use gdbpy_ref.
14466 (dummy_python_frame): New class.
14467 (dummy_python_frame::dummy_python_frame): Rename from
14468 push_dummy_python_frame.
14469 (py_restore_tstate): Remove.
14471 2017-01-10 Tom Tromey <tom@tromey.com>
14473 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14475 2017-01-10 Tom Tromey <tom@tromey.com>
14477 * python/python.c (ensure_python_env, restore_python_env):
14479 * python/python-internal.h (ensure_python_env): Don't declare.
14480 * varobj.h (varobj_ensure_python_env): Don't declare.
14481 * varobj.c (varobj_ensure_python_env): Remove.
14483 2017-01-10 Tom Tromey <tom@tromey.com>
14485 * varobj.c (varobj_value_get_print_value): Use
14486 gdbpy_enter_varobj.
14488 2017-01-10 Tom Tromey <tom@tromey.com>
14490 * python/py-prettyprint.c (print_string_repr, print_children):
14492 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14494 * varobj.c (varobj_value_get_print_value): Update.
14495 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14497 2017-01-10 Tom Tromey <tom@tromey.com>
14499 * varobj.c (varobj_get_display_hint)
14500 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14501 (varobj_set_visualizer, free_variable): Use
14502 gdbpy_enter_varobj.
14504 2017-01-10 Tom Tromey <tom@tromey.com>
14506 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14507 (do_finish_initialization): New function. Use gdbpy_ref.
14508 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14509 do_finish_initialization.
14511 2017-01-10 Tom Tromey <tom@tromey.com>
14513 * python/py-param.c (get_set_value, get_show_value): Use
14514 gdbpy_enter, gdbpy_ref.
14516 2017-01-10 Tom Tromey <tom@tromey.com>
14518 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14520 2017-01-10 Tom Tromey <tom@tromey.com>
14522 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14524 2017-01-10 Tom Tromey <tom@tromey.com>
14526 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14527 Use gdbpy_enter_varobj.
14529 2017-01-10 Tom Tromey <tom@tromey.com>
14531 * varobj.c (gdbpy_enter_varobj): New constructor.
14532 * python/python-internal.h (gdbpy_enter_varobj): New class.
14533 * python/py-varobj.c (py_varobj_get_iterator): Use
14534 gdbpy_enter_varobj.
14536 2017-01-10 Tom Tromey <tom@tromey.com>
14538 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14539 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14540 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14541 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14542 unique_xmalloc_ptr.
14543 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14545 2017-01-10 Tom Tromey <tom@tromey.com>
14547 * python/py-xmethods.c (invoke_match_method): Use
14550 2017-01-10 Tom Tromey <tom@tromey.com>
14552 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14553 gdbpy_enter, gdbpy_ref.
14555 2017-01-10 Tom Tromey <tom@tromey.com>
14557 * python/python.c (python_interactive_command): Use gdbpy_enter.
14559 2017-01-10 Tom Tromey <tom@tromey.com>
14561 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14564 2017-01-10 Tom Tromey <tom@tromey.com>
14566 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14567 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14569 2017-01-10 Tom Tromey <tom@tromey.com>
14571 * utils.h (htab_deleter): New struct.
14572 (htab_up): New typedef.
14573 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14574 gdbpy_enter, gdbpy_ref, htab_up.
14576 2017-01-10 Tom Tromey <tom@tromey.com>
14578 * python/py-unwind.c (pending_frame_invalidate): Remove.
14579 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14581 2017-01-10 Tom Tromey <tom@tromey.com>
14583 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14584 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14586 2017-01-10 Tom Tromey <tom@tromey.com>
14588 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14590 2017-01-10 Tom Tromey <tom@tromey.com>
14592 * python/python.c (gdbpy_eval_from_control_command)
14593 (gdbpy_source_script, gdbpy_run_events)
14594 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14595 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14598 2017-01-10 Tom Tromey <tom@tromey.com>
14600 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14602 2017-01-10 Tom Tromey <tom@tromey.com>
14604 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14606 2017-01-10 Tom Tromey <tom@tromey.com>
14608 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14609 (python_on_inferior_call_pre, python_on_inferior_call_post)
14610 (python_on_memory_change, python_on_register_change)
14611 (python_inferior_exit, python_new_objfile, add_thread_object)
14612 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14614 2017-01-10 Tom Tromey <tom@tromey.com>
14616 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14617 (bpfinishpy_handle_exit): Use gdbpy_enter.
14619 2017-01-10 Tom Tromey <tom@tromey.com>
14621 * python/py-cmd.c (cmdpy_destroyer)
14622 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14625 2017-01-10 Tom Tromey <tom@tromey.com>
14627 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14629 (gdbpy_breakpoint_has_cond): Likewise.
14631 2017-01-10 Tom Tromey <tom@tromey.com>
14633 * python/python.c (gdbpy_enter): New constructor.
14634 (~gdbpy_enter): New destructor.
14635 (restore_python_env, ensure_python_env): Rewrite.
14636 * python/python-internal.h (gdbpy_enter): New class.
14638 2017-01-10 Tom Tromey <tom@tromey.com>
14640 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14642 2017-01-10 Tom Tromey <tom@tromey.com>
14644 * python/py-value.c (value_has_field, get_field_flag)
14645 (get_field_type, valpy_getitem, convert_value_from_python): Use
14648 2017-01-10 Tom Tromey <tom@tromey.com>
14650 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14653 2017-01-10 Tom Tromey <tom@tromey.com>
14655 * python/py-prettyprint.c (search_pp_list)
14656 (find_pretty_printer_from_objfiles)
14657 (find_pretty_printer_from_progspace)
14658 (find_pretty_printer_from_gdb, find_pretty_printer)
14659 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14662 2017-01-10 Tom Tromey <tom@tromey.com>
14664 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14666 2017-01-10 Tom Tromey <tom@tromey.com>
14668 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14669 (ltpy_get_all_source_lines): Use gdbpy_ref.
14671 2017-01-10 Tom Tromey <tom@tromey.com>
14673 * python/py-framefilter.c (extract_sym, extract_value)
14674 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14677 2017-01-10 Tom Tromey <tom@tromey.com>
14679 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14681 2017-01-10 Tom Tromey <tom@tromey.com>
14683 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14685 2017-01-10 Tom Tromey <tom@tromey.com>
14687 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14690 2017-01-10 Tom Tromey <tom@tromey.com>
14692 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14694 2017-01-10 Tom Tromey <tom@tromey.com>
14696 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14697 (typy_range): Use gdbpy_ref.
14699 2017-01-10 Tom Tromey <tom@tromey.com>
14701 * python/py-threadevent.c (create_thread_event_object): Use
14703 * python/py-stopevent.c (create_stop_event_object): Simplify.
14704 (emit_stop_event): Use gdbpy_ref.
14705 * python/py-signalevent.c (create_signal_event_object): Use
14707 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14708 (emit_new_objfile_event, create_clear_objfiles_event_object)
14709 (emit_clear_objfiles_event): Use gdbpy_ref.
14710 * python/py-infevents.c (create_inferior_call_event_object)
14711 (create_register_changed_event_object)
14712 (create_memory_changed_event_object, emit_inferior_call_event)
14713 (emit_memory_changed_event, emit_register_changed_event): Use
14715 * python/py-exitedevent.c (create_exited_event_object)
14716 (emit_exited_event): Use gdbpy_ref.
14717 * python/py-event.h (evpy_emit_event): Remove
14718 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14719 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14720 * python/py-continueevent.c (emit_continue_event): Use
14722 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14723 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14725 * python/py-bpevent.c (create_breakpoint_event_object): Use
14728 2017-01-10 Tom Tromey <tom@tromey.com>
14730 * python/py-ref.h: New file.
14732 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14734 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14736 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14737 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14738 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14739 * ui-out.c (ui_out::redirect): Likewise.
14740 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14741 * cli/cli-logging.c (set_logging_redirect): Update call site of
14743 (handle_redirections): Likewise.
14744 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14745 * top.c (execute_command_to_string): Likewise.
14746 * utils.c (do_ui_out_redirect_pop): Likewise.
14748 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14750 * stack.c (_initialize_stack): Update "frame" command help message.
14752 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14754 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14756 2017-01-06 Yao Qi <yao.qi@linaro.org>
14758 * x86-linux-nat.h: Include gdb_proc_service.h.
14760 2017-01-06 Yao Qi <yao.qi@linaro.org>
14762 * ser-base.h: Include serial.h.
14764 2017-01-06 Yao Qi <yao.qi@linaro.org>
14766 * ppc-linux-tdep.h: Include ppc-tdep.h.
14768 2017-01-06 Yao Qi <yao.qi@linaro.org>
14770 * nat/amd64-linux-siginfo.h: Include signal.h.
14772 2017-01-06 Yao Qi <yao.qi@linaro.org>
14774 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14776 2017-01-06 Yao Qi <yao.qi@linaro.org>
14778 * mi/mi-parse.h: Include mi-cmds.h.
14780 2017-01-06 Yao Qi <yao.qi@linaro.org>
14782 * inf-loop.c: Don't include "target.h".
14783 * inf-loop.h: Include it here.
14785 2017-01-06 Yao Qi <yao.qi@linaro.org>
14787 * dfp.h: Include "dboulest.h" and "expression.h".
14789 2017-01-06 Yao Qi <yao.qi@linaro.org>
14791 * ax-gdb.h: Include "ax.h".
14793 2017-01-06 Yao Qi <yao.qi@linaro.org>
14795 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14796 with nat/gdb_ptrace.h.
14798 2017-01-05 Yao Qi <yao.qi@linaro.org>
14800 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14802 (mips64_fbsd_sigframe_init): Likewise.
14804 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14806 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14807 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14809 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14811 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14812 * NEWS: Mention new FreeBSD/mips native configuration.
14813 * config/mips/fbsd.mh: New file.
14814 * configure.host: Add mips*-*-freebsd*.
14815 * mips-fbsd-nat.c: New file.
14817 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14819 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14820 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14821 * NEWS: Mention new FreeBSD/mips target.
14822 * configure.tgt: Add mips*-*-freebsd*.
14823 * mips-fbsd-tdep.c: New file.
14824 * mips-fbsd-tdep.h: New file.
14826 2017-01-04 Yao Qi <yao.qi@linaro.org>
14828 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14829 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14831 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14833 Update copyright year range in all GDB files.
14835 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14837 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14839 For older changes see ChangeLog-2016.
14845 version-control: never