1 2017-09-27 Tom Tromey <tom@tromey.com>
3 * tracepoint.c (info_scope_command): Constify.
4 * python/python.c (gdbpy_decode_line): Constify.
5 * python/py-breakpoint.c (bppy_init): Constify.
6 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
7 * location.h: (new_linespec_location)
8 (string_to_event_location_basic, string_to_event_location):
10 * location.c (new_linespec_location)
11 (string_to_event_location_basic, string_to_event_location):
13 * linespec.h (decode_line_with_current_source)
14 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
15 * linespec.c (linespec_lex_to_end)
16 (decode_line_with_current_source)
17 (decode_line_with_last_displayed): Constify.
18 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
20 * cli/cli-cmds.c (edit_command, list_command): Constify.
21 * breakpoint.h (until_break_command, watch_command_wrapper)
22 (awatch_command_wrapper, rwatch_command_wrapper)
23 (init_ada_exception_breakpoint): Constify.
24 * breakpoint.c (break_command_1, dprintf_command)
25 (break_range_command, watch_command_wrapper)
26 (rwatch_command_wrapper, awatch_command_wrapper)
27 (until_break_command, init_ada_exception_breakpoint)
28 (strace_marker_create_sals_from_location, trace_command)
29 (ftrace_command, strace_command, struct tracepoint): Constify.
30 * ax-gdb.c (agent_command_1): Constify.
31 * ada-lang.c (ada_exception_sal): Constify.
33 2017-09-27 Tom Tromey <tom@tromey.com>
35 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
36 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
37 (get_context_size, no_chunk, get_insn_history_modifiers)
38 (cmd_record_insn_history, get_call_history_modifiers)
39 (cmd_record_call_history): Constify.
41 2017-09-27 Tom Tromey <tom@tromey.com>
43 * source.c (show_substitute_path_command)
44 (unset_substitute_path_command, set_substitute_path_command):
47 2017-09-27 Tom Tromey <tom@tromey.com>
49 * typeprint.c (maintenance_print_type): Constify.
50 * maint.c (maintenance_dump_me, maintenance_demangle)
51 (maintenance_time_display, maintenance_info_sections)
52 (maintenance_print_statistics, maintenance_deprecate)
53 (maintenance_undeprecate): Constify.
54 (maintenance_do_deprecate): Constify. Use std::string.
55 (maintenance_selftest): Constify.
56 * gdbtypes.h (maintenance_print_type): Constify.
58 2017-09-27 Tom Tromey <tom@tromey.com>
60 * hppa-tdep.c (unwind_command): Constify.
62 2017-09-27 Tom Tromey <tom@tromey.com>
64 * target-descriptions.c (unset_tdesc_filename_cmd)
65 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
68 2017-09-27 Tom Tromey <tom@tromey.com>
70 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
72 2017-09-27 Tom Tromey <tom@tromey.com>
74 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
76 2017-09-27 Tom Tromey <tom@tromey.com>
78 * tui/tui-regs.c (tui_reg_command): Constify.
80 2017-09-27 Tom Tromey <tom@tromey.com>
82 * skip.c (skip_file_command, skip_function_command)
83 (skip_enable_command, skip_disable_command, skip_delete_command):
86 2017-09-27 Tom Tromey <tom@tromey.com>
88 * record-btrace.c (cmd_record_btrace_bts_start)
89 (cmd_record_btrace_pt_start): Constify.
91 2017-09-27 Tom Tromey <tom@tromey.com>
93 * symmisc.c (maintenance_print_symbols)
94 (maintenance_print_msymbols, maintenance_print_objfiles)
95 (maintenance_info_symtabs, maintenance_check_symtabs)
96 (maintenance_expand_symtabs, maintenance_info_line_tables):
99 2017-09-27 Tom Tromey <tom@tromey.com>
101 * top.c (new_ui_command): Constify.
103 2017-09-27 Tom Tromey <tom@tromey.com>
105 * symfile.c (add_symbol_file_command)
106 (remove_symbol_file_command, list_overlays_command)
107 (map_overlay_command, unmap_overlay_command)
108 (overlay_auto_command, overlay_manual_command)
109 (overlay_off_command, overlay_load_command): Constify.
111 2017-09-27 Tom Tromey <tom@tromey.com>
113 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
114 (info_spu_mailbox_command, info_spu_dma_command)
115 (info_spu_proxydma_command): Constify.
117 2017-09-27 Tom Tromey <tom@tromey.com>
119 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
121 2017-09-27 Tom Tromey <tom@tromey.com>
123 * cli/cli-script.c (user_defined_command): Constify.
125 2017-09-27 Tom Tromey <tom@tromey.com>
127 * cli/cli-dump.c (dump_memory_command, dump_value_command)
128 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
129 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
130 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
131 (dump_binary_value, append_binary_memory, append_binary_value):
133 (struct dump_context) <func>: Constify.
134 (add_dump_command): Update.
136 2017-09-27 Tom Tromey <tom@tromey.com>
138 * cli/cli-cmds.c (show_version, show_configuration)
139 (source_command, show_user): Constify.
141 2017-09-27 Tom Tromey <tom@tromey.com>
143 * target.c (maintenance_print_target_stack): Constify.
145 2017-09-27 Tom Tromey <tom@tromey.com>
147 * interps.c (interpreter_exec_cmd): Constify.
149 2017-09-27 Tom Tromey <tom@tromey.com>
151 * record-full.c (cmd_record_full_restore): Constify.
153 2017-09-27 Tom Tromey <tom@tromey.com>
155 * memattr.c (enable_mem_command, disable_mem_command)
156 (delete_mem_command): Constify.
158 2017-09-27 Tom Tromey <tom@tromey.com>
160 * value.c (show_convenience): Constify.
162 2017-09-27 Tom Tromey <tom@tromey.com>
164 * gdbcore.h (core_file_command): Update.
165 * corefile.c (core_file_command): Constify.
167 2017-09-27 Tom Tromey <tom@tromey.com>
169 * user-regs.c (maintenance_print_user_registers): Constify.
171 2017-09-27 Tom Tromey <tom@tromey.com>
173 * cp-namespace.c (maintenance_cplus_namespace): Constify.
175 2017-09-27 Tom Tromey <tom@tromey.com>
177 * cp-support.c (first_component_command): Constify.
179 2017-09-27 Tom Tromey <tom@tromey.com>
181 * psymtab.c (maintenance_print_psymbols)
182 (maintenance_info_psymtabs, maintenance_check_psymtabs):
185 2017-09-27 Tom Tromey <tom@tromey.com>
187 * windows-tdep.c (display_tib): Constify.
189 2017-09-27 Tom Tromey <tom@tromey.com>
191 * linux-fork.c (delete_checkpoint_command)
192 (detach_checkpoint_command): Constify.
194 2017-09-27 Tom Tromey <tom@tromey.com>
196 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
198 2017-09-27 Tom Tromey <tom@tromey.com>
200 * arc-tdep.c (dump_arc_instruction_command): Constify.
202 2017-09-27 Tom Tromey <tom@tromey.com>
204 * valprint.c (set_radix, show_radix): Constify.
206 2017-09-27 Tom Tromey <tom@tromey.com>
208 * dtrace-probe.c (info_probes_dtrace_command): Constify.
210 2017-09-27 Tom Tromey <tom@tromey.com>
212 * command.h (not_just_help_class_command): Update.
213 * cli/cli-decode.h (not_just_help_class_command): Update.
214 * cli/cli-decode.c (not_just_help_class_command): Constify.
216 2017-09-27 Tom Tromey <tom@tromey.com>
218 * gdb_bfd.c (maintenance_info_bfds): Constify.
220 2017-09-27 Tom Tromey <tom@tromey.com>
222 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
224 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
225 (do_const_cfunc): New function.
226 (cmd_cfunc_eq): New overload.
227 (cli_user_command_p): Check do_const_cfunc.
228 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
230 * command.h (add_cmd): Add const overload and no-function
232 (set_cmd_cfunc): Add const overload.
233 (cmd_const_cfunc_ftype): Declare.
234 (cmd_cfunc_eq): Add const overload.
235 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
236 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
239 2017-09-27 Tom Tromey <tom@tromey.com>
241 * macroexp.c (get_next_token_for_substitution): New function.
242 (substitute_args): Call it. Check for __VA_OPT__.
244 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
245 Pedro Alves <palves@redhat.com>
247 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
248 producer_is_icc_lt_14.
249 (producer_is_icc_lt_14): New function.
250 (check_producer): Add code for checking version of ICC.
251 (producer_is_icc): Move to producer.c.
252 (read_structure_type): Restrict ICC workaround to ICC<14.
253 * producer.c: Include selftest.h.
254 (producer_is_icc, producer_parsing_tests, _initialize_producer):
256 * producer.h (producer_is_icc): New declaration.
258 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
260 * Makefile.in (SFILES): Add producer.c.
261 (COMMON_OBS): Add producer.o
262 * amd64-tdep.c (producer.h): Add new include.
263 * dwarf2read.c (producer.h): Add new include.
264 * producer.c: New file.
265 * producer.h: New file.
266 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
268 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
271 2017-09-26 Matthias Klose <doko@ubuntu.com>
273 * configure.ac: Search ncursesw before ncurses.
274 Check ncursesw/ncurses.h before ncurses/ncurses.h.
275 * gdb_curses.h: Include <ncursesw/ncurses.h>
276 * config.in, configure: Regenerate.
278 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
281 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
283 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
284 Remove i386sol2 support.
285 * configure.nat <i386sol2>: Remove.
286 <sol2-64>: Fold into ...
288 Move common settings to default section.
290 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
291 x86_64-*-solaris2.1[0-9]*>: Rename to ...
292 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
293 <i[34567]86-*-solaris*>: Remove.
294 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
296 * configure.ac: Remove wctype in libw check.
297 (_MSE_INT_H): Don't define on Solaris 7-9.
298 <solaris*>: Remove libthread_db.so.1 check.
299 * configure: Regenerate.
300 * config.in: Regenerate.
302 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
303 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
304 (gdb_ps_size_t): Remove.
305 Use base types in users.
306 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
308 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
310 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
313 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
314 (adi_is_addr_mapped): Likewise.
315 (PSR_ICC): Don't redefine.
316 (PSR_IMPL): Likewise.
318 2017-09-25 Tom Tromey <tom@tromey.com>
320 * regcache.c (regcache::dump): Use string_printf.
322 2017-09-25 Tom Tromey <tom@tromey.com>
324 * regcache.c (class regcache_invalidator): New.
325 (struct register_to_invalidate): Remove.
326 (make_cleanup_regcache_invalidate): Remove.
327 (regcache::raw_write): Use regcache_invalidator.
329 2017-09-25 Tom Tromey <tom@tromey.com>
331 * spu-tdep.c (spu2ppu_sniffer): Update.
332 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
333 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
335 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
336 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
337 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
338 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
341 2017-09-25 Tom Tromey <tom@tromey.com>
343 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
344 * regcache.h (regcache_xfree): Don't declare.
345 * regcache.c (regcache_xfree): Remove.
346 (do_regcache_xfree): Use delete.
347 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
348 * linux-fork.c (free_fork): Use delete.
349 (fork_save_infrun_state): Likewise.
350 * jit.c (jit_dealloc_cache): Use delete.
351 * infrun.c (discard_infcall_suspend_state): Use delete.
353 2017-09-25 Tom Tromey <tom@tromey.com>
355 * regcache.h (regcache_xmalloc): Don't declare.
356 (regcache_raw_set_cached_value): Update comment.
357 * regcache.c (regcache_xmalloc): Remove.
358 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
359 * jit.c (jit_frame_sniffer): Use new.
360 * frame.c (frame_save_as_regcache): Use new.
362 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
364 * NEWS: Advertise support for guarded-storage registers on IBM z.
366 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
368 * s390-linux-nat.c (have_regset_gs): New static variable.
369 (s390_linux_fetch_inferior_registers): Handle guarded-storage
370 control block and guarded-storage broadcast control regsets.
371 (s390_read_description): Detect whether the target has
372 guarded-storage support, return appropriate tdesc.
373 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
374 (features/s390x-gs-linux64.c): Likewise.
375 (struct gdbarch_tdep) <have_gs>: New field.
376 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
377 (s390_gsbc_regset): New variables.
378 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
379 and s390_gsbc_regset, if applicable.
380 (s390_core_read_description): Check whether core file was from a
381 target with guarded-storage support; include appropriate regsets.
382 (s390_gdbarch_init): Add registers for guarded-storage support.
383 (_initialize_s390_tdep): Initialize new target descriptions that
384 include registers for guarded-storage support.
385 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
386 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
387 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
388 (S390_NUM_REGS): Adjust macro definition.
389 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
390 (tdesc_s390x_gs_linux64): New declarations.
392 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
394 * features/s390-gs-linux64.xml: New file.
395 * features/s390-gs.xml: New file.
396 * features/s390-gsbc.xml: New file.
397 * features/s390x-gs-linux64.xml: New file.
398 * features/Makefile (WHICH): Add s390-gs-linux64 and
400 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
401 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
402 * features/s390-gs-linux64.c: New generated file.
403 * features/s390x-gs-linux64.c: New file.
404 * regformats/s390-gs-linux64.dat: New file.
405 * regformats/s390x-gs-linux64.dat: New file.
407 2017-09-23 Tom Tromey <tom@tromey.com>
409 * defs.h (make_cleanup_override_quit_handler): Don't declare.
411 2017-09-22 Tom Tromey <tom@tromey.com>
413 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
414 type to scoped_restore_tmpl.
415 <scoped_input_handler>: Initialize m_quit_handler directly.
417 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
419 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
420 (cd_command): Likewise. Free "current_directory" before
422 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
423 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
424 * top.c (gdb_dirbuf): Remove global declaration.
425 * top.h (gdb_dirbuf): Likewise.
427 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
429 * gnulib/aclocal.m4: Regenerate.
430 * gnulib/config.in: Regenerate.
431 * gnulib/configure: Regenerate.
432 * gnulib/import/Makefile.am: Regenerate.
433 * gnulib/import/Makefile.in: Regenerate.
434 * gnulib/import/assure.h: New file.
435 * gnulib/import/at-func.c: Likewise
436 * gnulib/import/chdir-long.c: New file.
437 * gnulib/import/chdir-long.h: New file.
438 * gnulib/import/cloexec.c: New file.
439 * gnulib/import/cloexec.h: New file.
440 * gnulib/import/close.c: New file.
441 * gnulib/import/closedir.c: New file.
442 * gnulib/import/dirent-private.h: New file.
443 * gnulib/import/dup-safer.c: New file.
444 * gnulib/import/dup.c: New file.
445 * gnulib/import/dup2.c: New file.
446 * gnulib/import/error.c: New file.
447 * gnulib/import/error.h: New file.
448 * gnulib/import/exitfail.c: New file.
449 * gnulib/import/exitfail.h: New file.
450 * gnulib/import/fchdir.c: New file.
451 * gnulib/import/fcntl.c: New file.
452 * gnulib/import/fcntl.in.h: New file.
453 * gnulib/import/fd-hook.c: New file.
454 * gnulib/import/fd-hook.h: New file.
455 * gnulib/import/fd-safer.c: New file.
456 * gnulib/import/fdopendir.c: New file.
457 * gnulib/import/filename.h: New file.
458 * gnulib/import/filenamecat-lgpl.c: New file.
459 * gnulib/import/filenamecat.h: New file.
460 * gnulib/import/fstat.c: New file.
461 * gnulib/import/fstatat.c: New file.
462 * gnulib/import/getcwd-lgpl.c: New file.
463 * gnulib/import/getcwd.c: New file.
464 * gnulib/import/getdtablesize.c: New file.
465 * gnulib/import/getlogin_r.c: New file.
466 * gnulib/import/getprogname.c: New file.
467 * gnulib/import/getprogname.h: New file.
468 * gnulib/import/gettext.h: New file.
469 * gnulib/import/glob-libc.h: New file.
470 * gnulib/import/glob.c: New file.
471 * gnulib/import/glob.in.h: New file.
472 * gnulib/import/intprops.h: New file.
473 * gnulib/import/m4/chdir-long.m4: New file.
474 * gnulib/import/m4/close.m4: New file.
475 * gnulib/import/m4/closedir.m4: New file.
476 * gnulib/import/m4/d-ino.m4: New file.
477 * gnulib/import/m4/d-type.m4: New file.
478 * gnulib/import/m4/dup.m4: New file.
479 * gnulib/import/m4/dup2.m4: New file.
480 * gnulib/import/m4/error.m4: New file.
481 * gnulib/import/m4/fchdir.m4: New file.
482 * gnulib/import/m4/fcntl.m4: New file.
483 * gnulib/import/m4/fcntl_h.m4: New file.
484 * gnulib/import/m4/fdopendir.m4: New file.
485 * gnulib/import/m4/filenamecat.m4: New file.
486 * gnulib/import/m4/fstat.m4: New file.
487 * gnulib/import/m4/fstatat.m4: New file.
488 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
489 * gnulib/import/m4/getcwd-path-max.m4: New file.
490 * gnulib/import/m4/getcwd.m4: New file.
491 * gnulib/import/m4/getdtablesize.m4: New file.
492 * gnulib/import/m4/getlogin_r.m4: New file.
493 * gnulib/import/m4/getprogname.m4: New file.
494 * gnulib/import/m4/glob.m4: New file.
495 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
496 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
497 * gnulib/import/m4/mempcpy.m4: New file.
498 * gnulib/import/m4/memrchr.m4: New file.
499 * gnulib/import/m4/mode_t.m4: New file.
500 * gnulib/import/m4/msvc-inval.m4: New file.
501 * gnulib/import/m4/msvc-nothrow.m4: New file.
502 * gnulib/import/m4/open.m4: New file.
503 * gnulib/import/m4/openat.m4: New file.
504 * gnulib/import/m4/opendir.m4: New file.
505 * gnulib/import/m4/readdir.m4: New file.
506 * gnulib/import/m4/realloc.m4: New file.
507 * gnulib/import/m4/rewinddir.m4: New file.
508 * gnulib/import/m4/save-cwd.m4: New file.
509 * gnulib/import/m4/strdup.m4: New file.
510 * gnulib/import/m4/strerror.m4: New file.
511 * gnulib/import/m4/unistd-safer.m4: New file.
512 * gnulib/import/mempcpy.c: New file.
513 * gnulib/import/memrchr.c: New file.
514 * gnulib/import/msvc-inval.c: New file.
515 * gnulib/import/msvc-inval.h: New file.
516 * gnulib/import/msvc-nothrow.c: New file.
517 * gnulib/import/msvc-nothrow.h: New file.
518 * gnulib/import/open.c: New file.
519 * gnulib/import/openat-die.c: New file.
520 * gnulib/import/openat-priv.h: New file.
521 * gnulib/import/openat-proc.c: New file.
522 * gnulib/import/openat.c: New file.
523 * gnulib/import/openat.h: New file.
524 * gnulib/import/opendir.c: New file.
525 * gnulib/import/pipe-safer.c: New file.
526 * gnulib/import/readdir.c: New file.
527 * gnulib/import/realloc.c: New file.
528 * gnulib/import/rewinddir.c: New file.
529 * gnulib/import/save-cwd.c: New file.
530 * gnulib/import/save-cwd.h: New file.
531 * gnulib/import/strdup.c: New file.
532 * gnulib/import/strerror-override.c: New file.
533 * gnulib/import/strerror-override.h: New file.
534 * gnulib/import/strerror.c: New file.
535 * gnulib/import/unistd--.h: New file.
536 * gnulib/import/unistd-safer.h: New file.
537 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
539 * ser-tcp.c: Undefine "close" before redefining it.
541 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
543 * guile/scm-value.c (gdbscm_value_address): Initialize address,
546 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
548 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
549 <sol2,sparc>: Likewise.
550 <sol2-64,i386>: Likewise.
552 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
553 -Wdeprecated-declarations on *-*-solaris*.
554 * configure: Regenerate.
556 * procfs.c: Include "nat/inferior.h".
557 (procfs_info_proc): Fix typo.
559 2017-09-21 Kevin Buettner <kevinb@redhat.com>
561 * remote.c (vector): Include.
562 (struct private_thread_info): Add field, thread_handle.
563 (free_private_thread_info): Deallocate storage associated with
565 (get_private_info_thread): Initialize `thread_handle' field.
566 (struct thread_item): Add field, thread_handle.
567 (clear_threads_listing_context): Deallocate storage associated
569 (start_thread): Add support for "handle" attribute.
570 (thread_attributes): Add "handle".
571 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
573 (remote_update_thread_list): Update thread_handle.
574 (remote_thread_handle_to_thread_info): New function.
575 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
577 2017-09-21 Kevin Buettner <kevinb@redhat.com>
579 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
581 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
582 * python/python-internal.h (thread_object_type): Declare.
584 2017-09-21 Kevin Buettner <kevinb@redhat.com>
586 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
587 (target_thread_handle_to_thread_info): Declare.
588 * target.c (target_thread_handle_to_thread_info): New function.
589 * target-delegates.c: Regenerate.
590 * gdbthread.h (find_thread_by_handle): Declare.
591 * thread.c (find_thread_by_handle): New function.
592 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
594 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
596 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
598 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
600 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
602 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
604 2017-09-21 Yao Qi <yao.qi@linaro.org>
606 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
609 2017-09-20 Tom Tromey <tom@tromey.com>
611 * breakpoint.c (struct counted_command_line): Remove.
612 (breakpoint_commands): Update.
613 (alloc_counted_command_line, incref_counted_command_line)
614 (decref_counted_command_line, do_cleanup_counted_command_line)
615 (make_cleanup_decref_counted_command_line): Remove.
616 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
617 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
618 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
619 (save_breakpoints): Update.
620 * breakpoint.h (counted_command_line): Now a typedef to
622 (struct breakpoint) <commands>: Now a counted_command_line.
623 (struct bpstats) <command>: Likewise.
625 2017-09-20 Tom Tromey <tom@tromey.com>
627 * breakpoint.c (struct commands_info, do_map_commands_command):
629 (commands_command_1): Update.
630 (iterate_over_related_breakpoints): Take a function_view.
631 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
632 (delete_command): Update.
633 (map_breakpoint_numbers): Take a function_view.
634 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
635 (disable_command): Update.
636 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
637 (enable_command): Update.
638 (struct disp_data, do_enable_breakpoint_disp)
639 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
640 (do_map_enable_delete_breakpoint): Remove.
641 (enable_once_command, enable_count_command, enable_delete_command)
642 (delete_trace_variable_command): Update.
644 2017-09-20 Tom Tromey <tom@tromey.com>
646 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
647 (bpstat_clear): Use delete.
648 (bpstats): New constructors.
649 (bpstat_copy, bpstat_stop_status): Use new.
650 (dprintf_after_condition_true): Update.
651 * breakpoint.h (bpstats::bpstats): Add constructors.
652 (bpstats::~bpstats): Add destructor.
654 2017-09-20 Pedro Alves <palves@redhat.com>
656 * eval.c (make_params): Delete, refactored as ...
657 (class fake_method): ... this new type's ctor.
658 (fake_method::~fake_method): New.
659 (evaluate_subexp_standard): Use 'fake_method'.
661 2017-09-20 Tom Tromey <tom@tromey.com>
663 * windows-nat.c (get_windows_debug_event, windows_wait)
664 (do_initial_windows_stuff, windows_attach): Update.
665 * utils.c (vwarning, internal_vproblem): Update.
666 (ui_unregister_input_event_handler_cleanup)
667 (prepare_to_handle_input): Remove.
668 (class scoped_input_handler): New.
669 (defaulted_query, prompt_for_continue): Update.
670 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
672 * top.c (undo_terminal_modifications_before_exit): Update.
673 * target/target.h (target_terminal_init, target_terminal_inferior)
674 (target_terminal_ours): Don't declare.
675 (class target_terminal): New.
676 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
677 (target_terminal_ours_for_output)
678 (make_cleanup_restore_target_terminal): Don't declare.
679 (target_terminal_info): Remove.
680 * target.c (enum terminal_state, terminal_state): Remove.
681 (target_terminal::terminal_state): Define.
682 (target_terminal::init): Rename from target_terminal_init.
683 (target_terminal::inferior): Rename from
684 target_terminal_inferior.
685 (target_terminal::ours): Rename from target_terminal_ours.
686 (target_terminal::ours_for_output): Rename from
687 target_terminal_ours_for_output.
688 (target_terminal::info): New method.
689 (cleanup_restore_target_terminal)
690 (make_cleanup_restore_target_terminal): Remove.
691 * solib.c (handle_solib_event): Update.
692 * remote.c (remote_serial_quit_handler): Update.
693 (remote_terminal_inferior, remote_wait_as): Update.
694 * record-full.c (record_full_wait_1): Update.
695 * nto-procfs.c (procfs_create_inferior): Update.
696 * nat/fork-inferior.c (startup_inferior): Update.
697 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
698 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
699 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
700 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
701 (mi_breakpoint_created, mi_breakpoint_deleted)
702 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
703 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
704 (mi_user_selected_context_changed, report_initial_inferior):
706 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
707 (linux_nat_terminal_inferior): Update.
708 * infrun.c (follow_fork_inferior)
709 (handle_vfork_child_exec_or_exit, do_target_resume)
710 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
711 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
713 * inflow.c (child_terminal_init, info_terminal_command): Update.
714 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
715 (attach_command): Update.
716 * infcall.c (call_thread_fsm_should_stop): Update.
717 * gnu-nat.c (gnu_attach): Update.
718 * extension.c (struct active_ext_lang_state)
719 (restore_active_ext_lang): Update.
720 * exceptions.c (print_flush): Update.
721 * event-top.c (async_enable_stdin, default_quit_handler): Update.
722 (struct quit_handler_cleanup_data, restore_quit_handler)
723 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
725 * cp-support.c (gdb_demangle): Update.
726 * breakpoint.c (update_inserted_breakpoint_locations)
727 (insert_breakpoint_locations, handle_jit_event)
728 (disable_breakpoints_in_unloaded_shlib): Update.
729 * annotate.c (annotate_breakpoints_invalid)
730 (annotate_frames_invalid): Update.
732 2017-09-20 Tom Tromey <tom@tromey.com>
734 * main.c (catch_command_errors): Rename from
735 catch_command_errors_const.
736 (captured_main_1): Update.
738 2017-09-20 Pedro Alves <palves@redhat.com>
740 * cli/cli-cmds.c (list_command): Use print_sal_location.
741 (print_sal_location): New function.
742 (ambiguous_line_spec): Use print_sal_location.
743 * linespec.c (symbol_to_sal): Record the symbol in the sal.
744 * symtab.c (find_function_start_sal): Likewise.
745 * symtab.h (symtab_and_line::symbol): New field.
747 2017-09-20 Pedro Alves <palves@redhat.com>
749 * linespec.c (minsym_found): Handle non-text minsyms.
750 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
752 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
754 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
757 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
759 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
760 vmovups instead vmovaps.
761 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
763 2017-09-19 John Baldwin <jhb@FreeBSD.org>
765 * NEWS (Changes since GDB 8.0): Add starti.
766 * infcmd.c (enum run_break): New.
767 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
769 (run_command): Use enum run_how.
770 (start_command): Likewise.
771 (starti_command): New function.
772 (RUN_ARGS_HELP): New macro.
773 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
774 commands. Add starti command.
776 2017-09-19 Yao Qi <yao.qi@linaro.org>
778 * Makefile.in (monitor.o): Remove the rule.
780 2017-09-19 Yao Qi <yao.qi@linaro.org>
782 * annotate.h (struct annotate_arg_emitter): Use
783 DISABLE_COPY_AND_ASSIGN.
784 * common/refcounted-object.h (refcounted_object): Likewise.
785 * completer.h (struct completion_result): Likewise.
786 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
787 * filename-seen-cache.h (filename_seen_cache): Likewise.
788 * gdbcore.h (thread_section_name): Likewise.
789 * gdb_regex.h (compiled_regex): Likewise.
790 * gdbthread.h (scoped_restore_current_thread): Likewise.
791 * inferior.h (scoped_restore_current_inferior): Likewise.
792 * jit.c (jit_reader): Likewise.
793 * linespec.h (struct linespec_result): Likewise.
794 * mi/mi-parse.h (struct mi_parse): Likewise.
795 * nat/fork-inferior.c (execv_argv): Likewise.
796 * progspace.h (scoped_restore_current_program_space): Likewise.
797 * python/python-internal.h (class gdbpy_enter): Likewise.
798 * regcache.h (regcache): Likewise.
799 * target-descriptions.c (struct tdesc_reg): Likewise.
800 (struct tdesc_type): Likewise.
801 (struct tdesc_feature): Likewise.
802 * ui-out.h (ui_out_emit_type): Likewise.
804 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
806 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
807 label abort_expression.
809 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
811 * common/buffer.c (buffer_xml_printf): Adjust.
812 * common/xml-utils.c (xml_escape_text): Change return type to
813 std::string, update code accordingly.
814 * common/xml-utils.h (xml_escape_text): Change return type to
816 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
817 * windows-tdep.c (windows_xfer_shared_library): Adjust.
818 * unittests/xml-utils-selftests.c (test_xml_escape_text):
821 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
823 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
824 (SUBDIR_UNITTESTS_OBS): Add new object file.
825 * unittests/xml-utils-selftests.c: New file.
827 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
829 * common/selftest.h (selftest): New struct/interface.
830 (register_test): Add name parameter, add new overload.
831 (run_tests): Add filter parameter.
832 (for_each_selftest_ftype): New typedef.
833 (for_each_selftest): New declaration.
834 * common/selftest.c (tests): Change type to
835 map<string, unique_ptr<selftest>>.
836 (simple_selftest): New struct.
837 (register_test): New function.
838 (register_test): Add name parameter and use it.
839 (run_tests): Add filter parameter and use it. Add prints.
840 Adjust to vector -> map change.
841 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
842 registering selftests.
843 * arm-tdep.c (_initialize_arm_tdep): Likewise.
844 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
845 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
846 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
847 * findvar.c (_initialize_findvar): Likewise.
848 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
849 * maint.c (maintenance_selftest): Update call to run_tests.
850 (maintenance_info_selftests): New function.
851 (_initialize_maint_cmds): Register "maintenance info selftests"
852 command. Update "maintenance selftest" doc.
853 * regcache.c (_initialize_regcache): Add names when registering
855 * rust-exp.y (_initialize_rust_exp): Likewise.
856 * selftest-arch.c (gdbarch_selftest): New struct.
857 (gdbarch_tests): Remove.
858 (register_test_foreach_arch): Add name parameter. Call
860 (tests_with_arch): Remove, move most content to
861 gdbarch_selftest::operator().
862 (_initialize_selftests_foreach_arch): Remove.
863 * selftest-arch.h (register_test_foreach_arch): Add name
865 (run_tests_with_arch): New declaration.
866 * utils-selftests.c (_initialize_utils_selftests): Add names
867 when registering selftests.
868 * utils.c (_initialize_utils): Likewise.
869 * unittests/array-view-selftests.c
870 (_initialize_array_view_selftests): Likewise.
871 * unittests/environ-selftests.c (_initialize_environ_selftests):
873 * unittests/function-view-selftests.c
874 (_initialize_function_view_selftests): Likewise.
875 * unittests/offset-type-selftests.c
876 (_initialize_offset_type_selftests): Likewise.
877 * unittests/optional-selftests.c
878 (_initialize_optional_selftests): Likewise.
879 * unittests/scoped_restore-selftests.c
880 (_initialize_scoped_restore_selftests): Likewise.
881 * NEWS: Document "maintenance selftest" and "maint info
884 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
886 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
889 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
891 * mi/mi-main.c (mi_load_progress): Make uiout variable
894 2017-09-15 Pedro Alves <palves@redhat.com>
896 * compile/compile-c-types.c (convert_enum, convert_int)
897 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
899 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
901 * dwarf2read.c (copy_string): Remove.
902 (parse_macro_definition): Replace copy_string with savestring.
904 2017-09-15 Yao Qi <yao.qi@linaro.org>
906 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
908 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
910 (i[34567]86-*-linux*): Likewise.
912 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
914 * dwarf2expr.h (dwarf_stack_value): Add constructor.
915 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
916 <stack>: Change type to std::vector.
917 <stack_len, stack_allocated>: Remove.
918 <grow_stack>: Remove.
919 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
920 (dwarf_expr_context::~dwarf_expr_context): Remove.
921 (dwarf_expr_context::grow_stack): Remove.
922 (dwarf_expr_context::push): Adjust.
923 (dwarf_expr_context::pop): Adjust.
924 (dwarf_expr_context::fetch): Adjust.
925 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
926 (dwarf_expr_context::stack_empty_p): Adjust.
927 (dwarf_expr_context::execute_stack_op): Adjust.
929 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
931 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
933 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
935 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
937 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
939 (dwarf_stack_value) <in_stack_memory>: Likewise.
940 (dwarf_expr_context) <push_address>: Change parameter type to
942 <fetch_in_stack_memory>: Change return type to bool.
943 <push>: Change parameter type to bool.
944 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
946 (dwarf_expr_context::push_address): Likewise.
947 (dwarf_expr_context::fetch_in_stack_memory): Change return type
949 (dwarf_expr_context::execute_stack_op): Adjust.
950 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
952 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
954 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
955 (struct dwarf_expr_context) <n_pieces>: Remove.
956 <pieces>: Change type to std::vector.
957 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
958 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
960 (dwarf_expr_context::add_piece): Adjust.
961 * dwarf2loc.c (struct piece_closure): Initialize fields.
963 <pieces>: Change type to std::vector.
964 (allocate_piece_closure): Adjust, change parameter to
965 std::vector rvalue and std::move it to piece_closure.
966 (rw_pieced_value): Adjust.
967 (check_pieced_synthetic_pointer): Adjust.
968 (indirect_synthetic_pointer): Adjust.
969 (coerce_pieced_ref): Adjust.
970 (free_pieced_value_closure): Adjust. Use delete to free
972 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
973 to allocate_piece_closure.
974 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
976 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
978 * probe.h (probe_ops_cp): Remove typedef.
979 (DEF_VEC_P (probe_ops_cp)): Remove.
980 (all_probe_ops): Change type to std::vector.
981 * probe.c (info_probes_for_ops): Adjust to vector change.
982 (probe_linespec_to_ops): Likewise.
983 (all_probe_ops): Change type to std::vector.
984 (_initialize_probe): Adjust to vector change.
985 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
986 * elfread.c (elf_get_probes): Likewise.
987 * stap-probe.c (_initialize_stap_probe): Likewise.
989 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
991 * probe.h (struct bound_probe): Define constructors.
992 * probe.c (bound_probe_s): Remove typedef.
993 (DEF_VEC_O (bound_probe_s)): Remove VEC.
994 (collect_probes): Change return type to std::vector, remove
996 (compare_probes): Return bool, change parameter type. Change
997 semantic to "less than".
998 (gen_ui_out_table_header_info): Change parameter to std::vector
1000 (exists_probe_with_pops): Likewise.
1001 (info_probes_for_ops): Update to std::vector change.
1002 (enable_probes_command): Likewise.
1003 (disable_probes_command): Likewise.
1005 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1007 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1009 * probe.c (parse_probes_in_pspace): Update.
1010 (find_probes_in_objfile): Update.
1011 (find_probe_by_pc): Update.
1012 (collect_probes): Update.
1013 (probe_any_get_probes): Update.
1014 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1015 return type to reference to std::vector.
1016 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1017 std::vector and update.
1018 (dtrace_process_dof): Likewise.
1019 (dtrace_get_probes): Likewise.
1020 * elfread.c (elf_get_probes): Change return type to std::vector,
1021 store an std::vector in bfd_data.
1022 (probe_key_free): Update to std::vector.
1023 * stap-probe.c (handle_stap_probe): Change parameter to
1024 std::vector and update.
1025 (stap_get_probes): Likewise.
1026 * symfile-debug.c (debug_sym_get_probes): Change return type to
1027 std::vector and update.
1029 2017-09-11 Tom Tromey <tom@tromey.com>
1031 * breakpoint.c (program_breakpoint_here_p): Update.
1032 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1033 from make_show_memory_breakpoints_cleanup. Return a
1034 scoped_restore_tmpl<int>.
1035 (restore_show_memory_breakpoints): Remove.
1036 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1037 * mem-break.c (memory_validate_breakpoint): Update.
1038 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1039 (ia64_memory_remove_breakpoint): Update.
1040 (ia64_breakpoint_from_pc): Update.
1041 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1042 from make_show_memory_breakpoints_cleanup.
1044 2017-09-11 Tom Tromey <tom@tromey.com>
1046 * d-namespace.c (d_lookup_symbol): Use std::string.
1047 (find_symbol_in_baseclass): Likewise.
1049 2017-09-11 Tom Tromey <tom@tromey.com>
1051 * ctf.c (ctf_start): Use std::string.
1053 2017-09-11 Tom Tromey <tom@tromey.com>
1055 * ada-lang.c (is_known_support_routine): Update.
1056 (ada_unhandled_exception_name_addr_from_raise): Update.
1057 * guile/scm-frame.c (gdbscm_frame_name): Update.
1058 * python/py-frame.c (frapy_name): Update.
1059 (frapy_function): Update.
1060 * stack.h (find_frame_funname): Update.
1061 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1062 (print_frame): Update.
1064 2017-09-11 Tom Tromey <tom@tromey.com>
1066 * findcmd.c (put_bits): Take a gdb::byte_vector.
1067 (parse_find_args): Return gdb::byte_vector. "args" now const.
1068 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1070 (find_command): Update.
1072 2017-09-11 Tom Tromey <tom@tromey.com>
1074 * cli/cli-script.c (class scoped_restore_hook_in): New.
1075 (clear_hook_in_cleanup): Remove.
1076 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1077 scoped_restore_hook_in.
1079 2017-09-11 Tom Tromey <tom@tromey.com>
1081 * cli/cli-script.c (restore_interp): Remove.
1082 (read_command_lines): Use scoped_restore_interp.
1083 * interps.c (scoped_restore_interp::set_temp): Rename from
1085 * interps.h (class scoped_restore_interp): New.
1086 (interp_set_temp): Remove.
1088 2017-09-11 Tom Tromey <tom@tromey.com>
1090 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1091 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1092 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1094 (mi_cmd_break_insert_1): Update.
1095 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1098 2017-09-11 Tom Tromey <tom@tromey.com>
1100 * demangle.c (demangle_command): Update.
1101 * breakpoint.c (disable_command): Update.
1102 (enable_command): Update.
1103 (find_location_by_number): Make "number" const. Use
1105 * cli/cli-utils.c (extract_arg): Return std::string.
1106 * probe.c (parse_probe_linespec): Update. Change types.
1107 (collect_probes): Take string arguments.
1108 (parse_probe_linespec): Likewise.
1109 (info_probes_for_ops): Update.
1110 (enable_probes_command): Update.
1111 (disable_probes_command): Update.
1112 * break-catch-sig.c (catch_signal_split_args): Update.
1113 * mi/mi-parse.c (mi_parse): Update.
1115 2017-09-11 Tom Tromey <tom@tromey.com>
1117 * language.h (language_enum): Make argument const.
1118 * language.c (language_enum): Make argument const.
1120 2017-09-11 Tom Tromey <tom@tromey.com>
1122 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1124 (skip_to_space): Rename from skip_to_space_const.
1125 * common/common-utils.c (skip_to_space): New function.
1126 (skip_to_space): Rename from skip_to_space_const.
1127 * cli/cli-utils.h (get_number): Rename from get_number_const.
1128 (extract_arg): Rename from extract_arg_const.
1129 * cli/cli-utils.c (get_number): Rename from get_number_const.
1130 (extract_arg): Rename from extract_arg_const.
1131 (number_or_range_parser::get_number): Use ::get_number.
1132 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1133 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1134 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1135 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1136 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1137 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1138 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1139 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1141 2017-09-11 Tom Tromey <tom@tromey.com>
1143 * python/python.c (do_start_initialization): Use
1144 py-event-types.def to initialize types.
1145 Define all object type structures.
1146 * python/python-internal.h: Don't declare event initialization
1148 * python/py-threadevent.c (thread_event_object_type): Don't
1150 * python/py-stopevent.c (stop_event_object_type): Don't define.
1151 * python/py-signalevent.c (signal_event_object_type): Don't
1153 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1154 (clear_objfiles_event_object_type): Don't declare or define.
1155 * python/py-infevents.c (inferior_call_pre_event_object_type)
1156 (inferior_call_post_event_object_type)
1157 (register_changed_event_object_type)
1158 (memory_changed_event_object_type): Don't declare or define.
1159 * python/py-inferior.c (new_thread_event_object_type)
1160 (new_inferior_event_object_type)
1161 (inferior_deleted_event_object_type): Don't declare or define.
1162 * python/py-exitedevent.c (exited_event_object_type): Don't
1164 * python/py-evts.c (gdbpy_initialize_py_events): Use
1166 * python/py-events.h (thread_event_object_type): Don't declare.
1167 (events_object): Use py-all-events.def.
1168 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1170 * python/py-event-types.def: New file.
1171 * python/py-continueevent.c (create_continue_event_object): Don't
1173 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1175 * python/py-all-events.def: New file.
1177 2017-09-11 Tom Tromey <tom@tromey.com>
1179 * python/py-threadevent.c (create_thread_event_object): Return
1181 * python/py-stopevent.h (create_stop_event_object)
1182 (create_breakpoint_event_object, create_signal_event_object):
1184 * python/py-stopevent.c (create_stop_event_object): Return
1186 (emit_stop_event): Update.
1187 * python/py-signalevent.c (create_signal_event_object): Return
1189 * python/py-infevents.c (create_inferior_call_event_object):
1191 * python/py-event.h (create_event_object)
1192 (create_thread_event_object): Update.
1193 * python/py-event.c (create_event_object): Return gdbpy_ref.
1194 * python/py-continueevent.c: Return gdbpy_ref.
1195 * python/py-bpevent.c (create_breakpoint_event_object): Return
1198 2017-09-11 Tom Tromey <tom@tromey.com>
1202 * python/python.c (do_start_initialization): Initialize new event
1204 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1205 (gdbpy_initialize_inferior_deleted_event)
1206 (gdbpy_initialize_new_thread_event): Declare.
1207 * python/py-threadevent.c (create_thread_event_object): Add option
1209 * python/py-inferior.c (new_thread_event_object_type)
1210 (new_inferior_event_object_type)
1211 (inferior_deleted_event_object_type): Declare.
1212 (python_new_inferior, python_inferior_deleted): New functions.
1213 (add_thread_object): Emit new_thread event.
1214 (gdbpy_initialize_inferior): Attach new functions to corresponding
1216 (new_thread, new_inferior, inferior_deleted): Define new event
1218 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1220 * python/py-events.h (events_object) <new_inferior,
1221 inferior_deleted, new_thread>: New fields.
1222 * python/py-event.h (create_thread_event_breakpoint): Add optional
1225 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1227 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1228 check current_ui instead.
1229 (internal_vproblem): Likewise.
1231 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1233 * thread.c (print_thread_info_1): Remove unnecessary calls to
1234 uiout->is_mi_like_p.
1236 2017-09-09 Tom Tromey <tom@tromey.com>
1238 * namespace.h (add_using_directive): Update.
1239 * namespace.c (add_using_directive): Change type of excludes to
1241 * dwarf2read.c (read_import_statement): Use std::vector.
1242 (read_namespace): Update.
1243 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1245 2017-09-09 Tom Tromey <tom@tromey.com>
1247 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1249 2017-09-09 Tom Tromey <tom@tromey.com>
1251 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1253 2017-09-09 Tom Tromey <tom@tromey.com>
1255 * stack.c (func_command): Use gdb::def_vector.
1257 2017-09-09 Tom Tromey <tom@tromey.com>
1259 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1260 ui_out_emit_list, ui_out_emit_tuple.
1261 (mi_cmd_var_update): Likewise.
1263 2017-09-09 Tom Tromey <tom@tromey.com>
1265 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1266 ui_out_redirect_pop.
1267 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1268 ui_out_redirect_pop.
1269 * utils.c (do_ui_out_redirect_pop)
1270 (make_cleanup_ui_out_redirect_pop): Remove.
1271 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1272 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1273 * ui-out.h (ui_out_redirect_pop): New class.
1275 2017-09-09 Tom Tromey <tom@tromey.com>
1277 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1278 (list_available_thread_groups, mi_cmd_list_thread_groups)
1279 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1280 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1283 2017-09-09 Tom Tromey <tom@tromey.com>
1285 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1288 2017-09-09 Tom Tromey <tom@tromey.com>
1290 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1291 * stack.c (print_frame): Use ui_out_emit_tuple.
1292 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1293 (info_spu_mailbox_command, info_spu_dma_command)
1294 (info_spu_proxydma_command): Likewise.
1295 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1296 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1297 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1299 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1301 2017-09-09 Tom Tromey <tom@tromey.com>
1303 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1304 (class ui_out_emit_table): Update comment.
1305 * ui-out.c (do_cleanup_table_end)
1306 (make_cleanup_ui_out_table_begin_end): Remove.
1307 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1308 (info_spu_dma_cmdlist): Likewise.
1309 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1310 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1313 2017-09-09 Tom Tromey <tom@tromey.com>
1315 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1316 ui_out_emit_list, gdb::optional.
1318 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1320 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1322 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1324 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1326 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1327 * ada-exp.y: Remove _initialize_ada_exp prototype.
1328 * ada-lang.c: Remove _initialize_ada_language prototype.
1329 * ada-tasks.c: Remove _initialize_tasks prototype.
1330 * addrmap.c: Remove _initialize_addrmap prototype.
1331 * agent.c: Remove _initialize_agent prototype.
1332 * aix-thread.c: Remove _initialize_aix_thread prototype.
1333 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1334 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1335 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1337 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1338 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1339 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1340 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1342 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1344 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1345 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1346 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1347 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1349 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1350 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1351 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1352 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1353 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1354 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1355 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1357 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1359 * annotate.c: Remove _initialize_annotate prototype.
1360 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1361 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1362 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1363 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1364 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1365 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1366 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1367 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1369 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1370 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1371 * auto-load.c: Remove _initialize_auto_load prototype.
1372 * auxv.c: Remove _initialize_auxv prototype.
1373 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1374 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1375 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1376 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1377 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1378 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1380 * break-catch-throw.c: Remove _initialize_break_catch_throw
1382 * breakpoint.c: Remove _initialize_breakpoint prototype.
1383 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1384 * btrace.c: Remove _initialize_btrace prototype.
1385 * charset.c: Remove _initialize_charset prototype.
1386 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1387 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1388 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1389 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1390 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1391 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1392 * coffread.c: Remove _initialize_coffread prototype.
1393 * compile/compile.c: Remove _initialize_compile prototype.
1394 * complaints.c: Remove _initialize_complaints prototype.
1395 * completer.c: Remove _initialize_completer prototype.
1396 * copying.awk: Remove _initialize_copying prototype.
1397 * copying.c: Regenerate.
1398 * core-regset.c: Remove _initialize_core_regset prototype.
1399 * corefile.c: Remove _initialize_core prototype.
1400 * corelow.c: Remove _initialize_corelow prototype.
1401 * cp-abi.c: Remove _initialize_cp_abi prototype.
1402 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1403 * cp-support.c: Remove _initialize_cp_support prototype.
1404 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1405 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1406 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1407 * ctf.c: Remove _initialize_ctf prototype.
1408 * d-lang.c: Remove _initialize_d_language prototype.
1409 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1411 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1412 * dbxread.c: Remove _initialize_dbxread prototype.
1413 * dcache.c: Remove _initialize_dcache prototype.
1414 * demangle.c: Remove _initialize_demangler prototype.
1415 * disasm-selftests.c: Remove _initialize_disasm_selftests
1417 * disasm.c: Remove _initialize_disasm prototype.
1418 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1419 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1420 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1422 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1423 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1424 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1425 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1426 * elfread.c: Remove _initialize_elfread prototype.
1427 * exec.c: Remove _initialize_exec prototype.
1428 * extension.c: Remove _initialize_extension prototype.
1429 * f-lang.c: Remove _initialize_f_language prototype.
1430 * f-valprint.c: Remove _initialize_f_valprint prototype.
1431 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1432 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1433 * filesystem.c: Remove _initialize_filesystem prototype.
1434 * findcmd.c: Remove _initialize_mem_search prototype.
1435 * fork-child.c: Remove _initialize_fork_child prototype.
1436 * frame-base.c: Remove _initialize_frame_base prototype.
1437 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1438 * frame.c: Remove _initialize_frame prototype.
1439 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1440 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1441 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1442 * gcore.c: Remove _initialize_gcore prototype.
1443 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1444 * gdbarch.c: Regenerate.
1445 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1446 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1447 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1448 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1449 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1450 * go-lang.c: Remove _initialize_go_language prototype.
1451 * go32-nat.c: Remove _initialize_go32_nat prototype.
1452 * guile/guile.c: Remove _initialize_guile prototype.
1453 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1454 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1455 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1456 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1457 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1458 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1459 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1460 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1461 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1462 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1464 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1466 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1467 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1468 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1469 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1470 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1471 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1472 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1473 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1474 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1475 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1476 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1477 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1478 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1479 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1480 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1481 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1483 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1485 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1486 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1487 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1488 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1489 * infcall.c: Remove _initialize_infcall prototype.
1490 * infcmd.c: Remove _initialize_infcmd prototype.
1491 * inferior.c: Remove _initialize_inferiors prototype.
1492 * inflow.c: Remove _initialize_inflow prototype.
1493 * infrun.c: Remove _initialize_infrun prototype.
1494 * interps.c: Remove _initialize_interpreter prototype.
1495 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1496 * jit.c: Remove _initialize_jit prototype.
1497 * language.c: Remove _initialize_language prototype.
1498 * linux-fork.c: Remove _initialize_linux_fork prototype.
1499 * linux-nat.c: Remove _initialize_linux_nat prototype.
1500 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1501 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1502 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1503 * m2-lang.c: Remove _initialize_m2_language prototype.
1504 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1505 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1506 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1507 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1508 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1509 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1510 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1511 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1512 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1513 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1514 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1515 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1516 * machoread.c: Remove _initialize_machoread prototype.
1517 * macrocmd.c: Remove _initialize_macrocmd prototype.
1518 * macroscope.c: Remove _initialize_macroscope prototype.
1519 * maint.c: Remove _initialize_maint_cmds prototype.
1520 * mdebugread.c: Remove _initialize_mdebugread prototype.
1521 * memattr.c: Remove _initialize_mem prototype.
1522 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1523 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1524 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1525 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1526 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1527 * microblaze-linux-tdep.c: Remove
1528 _initialize_microblaze_linux_tdep prototype.
1529 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1530 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1531 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1532 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1533 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1534 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1535 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1536 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1537 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1538 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1539 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1541 * mipsread.c: Remove _initialize_mipsread prototype.
1542 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1544 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1545 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1546 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1547 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1548 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1549 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1551 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1552 * nto-procfs.c: Remove _initialize_procfs prototype.
1553 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1554 * objc-lang.c: Remove _initialize_objc_language prototype.
1555 * objfiles.c: Remove _initialize_objfiles prototype.
1556 * observer.c: Remove observer_test_first_notification_function,
1557 observer_test_second_notification_function,
1558 observer_test_third_notification_function, and
1559 _initialize_observer prototypes.
1560 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1561 * osabi.c: Remove _initialize_gdb_osabi prototype.
1562 * osdata.c: Remove _initialize_osdata prototype.
1563 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1564 * parse.c: Remove _initialize_parse prototype.
1565 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1566 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1567 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1568 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1569 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1570 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1571 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1572 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1573 * printcmd.c: Remove _initialize_printcmd prototype.
1574 * probe.c: Remove _initialize_probe prototype.
1575 * proc-api.c: Remove _initialize_proc_api prototype.
1576 * proc-events.c: Remove _initialize_proc_events prototype.
1577 * proc-service.c: Remove _initialize_proc_service prototype.
1578 * procfs.c: Remove _initialize_procfs prototype.
1579 * psymtab.c: Remove _initialize_psymtab prototype.
1580 * python/python.c: Remove _initialize_python prototype.
1581 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1582 * record-btrace.c: Remove _initialize_record_btrace prototype.
1583 * record-full.c: Remove _initialize_record_full prototype.
1584 * record.c: Remove _initialize_record prototype.
1585 * regcache.c: Remove _initialize_regcache prototype.
1586 * reggroups.c: Remove _initialize_reggroup prototype.
1587 * remote-notif.c: Remove _initialize_notif prototype.
1588 * remote-sim.c: Remove _initialize_remote_sim prototype.
1589 * remote.c: Remove _initialize_remote prototype.
1590 * reverse.c: Remove _initialize_reverse prototype.
1591 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1592 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1593 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1595 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1596 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1597 * rust-exp.y: Remove _initialize_rust_exp prototype.
1598 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1599 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1600 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1601 * score-tdep.c: Remove _initialize_score_tdep prototype.
1602 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1604 * ser-go32.c: Remove _initialize_ser_dos prototype.
1605 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1606 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1607 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1608 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1609 * serial.c: Remove _initialize_serial prototype.
1610 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1611 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1612 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1613 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1614 * skip.c: Remove _initialize_step_skip prototype.
1615 * sol-thread.c: Remove _initialize_sol_thread prototype.
1616 * solib-aix.c: Remove _initialize_solib_aix prototype.
1617 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1618 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1619 * solib-frv.c: Remove _initialize_frv_solib prototype.
1620 * solib-spu.c: Remove _initialize_spu_solib prototype.
1621 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1622 * solib-target.c: Remove _initialize_solib_target prototype.
1623 * solib.c: Remove _initialize_solib prototype.
1624 * source.c: Remove _initialize_source prototype.
1625 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1626 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1628 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1629 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1630 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1631 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1633 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1634 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1635 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1636 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1638 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1640 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1642 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1644 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1645 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1647 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1649 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1651 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1653 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1655 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1656 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1657 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1658 * stabsread.c: Remove _initialize_stabsread prototype.
1659 * stack.c: Remove _initialize_stack prototype.
1660 * stap-probe.c: Remove _initialize_stap_probe prototype.
1661 * std-regs.c: Remove _initialize_frame_reg prototype.
1662 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1663 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1664 * symfile.c: Remove _initialize_symfile prototype.
1665 * symmisc.c: Remove _initialize_symmisc prototype.
1666 * symtab.c: Remove _initialize_symtab prototype.
1667 * target-dcache.c: Remove _initialize_target_dcache prototype.
1668 * target-descriptions.c: Remove _initialize_target_descriptions
1670 * thread.c: Remove _initialize_thread prototype.
1671 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1673 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1674 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1675 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1677 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1678 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1679 * tracefile.c: Remove _initialize_tracefile prototype.
1680 * tracepoint.c: Remove _initialize_tracepoint prototype.
1681 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1682 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1683 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1684 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1685 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1686 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1687 * tui/tui.c: Remove _initialize_tui prototype.
1688 * typeprint.c: Remove _initialize_typeprint prototype.
1689 * user-regs.c: Remove _initialize_user_regs prototype.
1690 * utils.c: Remove _initialize_utils prototype.
1691 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1692 * valarith.c: Remove _initialize_valarith prototype.
1693 * valops.c: Remove _initialize_valops prototype.
1694 * valprint.c: Remove _initialize_valprint prototype.
1695 * value.c: Remove _initialize_values prototype.
1696 * varobj.c: Remove _initialize_varobj prototype.
1697 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1698 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1699 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1700 * windows-nat.c: Remove _initialize_windows_nat,
1701 _initialize_check_for_gdb_ini, and _initialize_loadable
1703 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1704 * xcoffread.c: Remove _initialize_xcoffread prototype.
1705 * xml-support.c: Remove _initialize_xml_support prototype.
1706 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1707 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1709 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1711 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1713 2017-09-08 Keith Seitz <keiths@redhat.com>
1715 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1718 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1720 * f-valprint.c (f_val_print): Remove check for one byte
1721 sized integers. Remove printing of character type.
1723 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1724 Christoph Weinmann <christoph.t.weinmann@intel.com>
1725 Bernhard Heckel <bernhard.heckel@intel.com>
1727 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1728 to maintain proper indentation when printing pointers/refs.
1730 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1734 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1736 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1738 2017-09-05 Tom Tromey <tom@tromey.com>
1740 * parse.c (funcall_chain): Now a std::vector.
1741 (start_arglist, end_arglist): Simplify.
1742 (free_funcalls): Remove.
1743 (parse_exp_in_context_1): Remove cleanup.
1745 2017-09-05 Tom Tromey <tom@tromey.com>
1747 * go-exp.y (go_parse): Don't create a cleanup.
1749 2017-09-05 Tom Tromey <tom@tromey.com>
1751 * d-exp.y (PrimaryExpression): Use std::string.
1752 (d_parse): Don't create a cleanup.
1754 2017-09-05 Tom Tromey <tom@tromey.com>
1756 * utils.c (do_clear_parser_state): Remove.
1757 (make_cleanup_clear_parser_state): Remove.
1758 * p-exp.y (pascal_parse): Use scoped_restore.
1759 * m2-exp.y (m2_parse): Use scoped_restore.
1760 * f-exp.y (f_parse): Use scoped_restore.
1761 * d-exp.y (d_parse): Use scoped_restore.
1762 * c-exp.y (c_parse): Use scoped_restore.
1763 * ada-exp.y (ada_parse): Use scoped_restore.
1764 * utils.h (make_cleanup_clear_parser_state): Remove.
1766 2017-09-06 Keith Seitz <keiths@redhat.com>
1768 * dwarf2read.c (dw2_linkage_name_attr): New function.
1769 (dw2_linkage_name): New function.
1770 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1771 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1772 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1774 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1776 * config/djgpp/djconfig.sh: Correct shell portability issue.
1778 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1780 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1782 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1784 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1785 * NEWS: Mention new FreeBSD/mips native configuration.
1786 * configure.host: Add aarch64*-*-freebsd*.
1787 * configure.nat: Likewise.
1788 * aarch64-fbsd-nat.c: New file.
1790 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1792 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1793 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1794 * NEWS: Mention new FreeBSD/aarch64 target.
1795 * configure.tgt: Add aarch64*-*-freebsd*.
1796 * aarch64-fbsd-tdep.c: New file.
1797 * aarch64-fbsd-tdep.h: New file.
1799 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1801 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1803 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1805 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1808 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1810 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1813 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1815 * infrun.c (follow_exec): Call add_thread after
1816 target_find_description.
1818 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1820 * infrun.c (handle_inferior_event_1): When exec'ing, read
1821 stop_pc after follow_exec.
1823 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1825 * remote.c (process_g_packet): Update error message.
1827 2017-09-05 Yao Qi <yao.qi@linaro.org>
1829 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1832 2017-09-05 Pedro Alves <palves@redhat.com>
1834 * eval.c (eval_call, evaluate_funcall): New functions, factored
1836 (evaluate_subexp_standard): ... this.
1838 2017-09-05 Yao Qi <yao.qi@linaro.org>
1840 * amd64-tdep.c (amd64_target_description): Create target
1842 (_initialize_amd64_tdep): Don't call functions
1843 initialize_tdesc_amd64_*. Add self tests.
1844 * arch/amd64.c (amd64_create_target_description): Add parameter
1845 is_linux. Call set_tdesc_osabi if is_linux is true.
1846 * arch/amd64.h (amd64_create_target_description): Update the
1848 * arch/i386.c (i386_create_target_description): Add parameter
1849 is_linux. Call set_tdesc_osabi if is_linux is true.
1850 * arch/i386.h (i386_create_target_description): Update
1852 * configure.tgt: Add i386.o to gdb_target_obs.
1853 * features/Makefile (XMLTOC): Remove i386/*.xml.
1854 * features/i386/amd64-avx-avx512.c: Remove.
1855 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1856 * features/i386/amd64-avx-mpx.c: Remove.
1857 * features/i386/amd64-avx.c: Remove.
1858 * features/i386/amd64-mpx.c: Remove.
1859 * features/i386/amd64.c: Remove.
1860 * features/i386/i386-avx-avx512.c: Remove.
1861 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1862 * features/i386/i386-avx-mpx.c: Remove.
1863 * features/i386/i386-avx.c: Remove.
1864 * features/i386/i386-mmx.c: Remove.
1865 * features/i386/i386-mpx.c: Remove.
1866 * features/i386/i386.c: Remove.
1867 * i386-tdep.c: Don't include features/i386/i386*.c., include
1868 target-descriptions.h and arch/i386.h.
1869 (i386_target_description): Create target descriptions.
1870 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1871 functions. Do self tests.
1873 2017-09-05 Yao Qi <yao.qi@linaro.org>
1875 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1876 * features/i386/amd64-avx-avx512-linux.c: Removed.
1877 * features/i386/amd64-avx-linux.c: Removed.
1878 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1879 * features/i386/amd64-avx-mpx-linux.c: Removed.
1880 * features/i386/amd64-linux.c: Removed.
1881 * features/i386/amd64-mpx-linux.c: Removed.
1882 * features/i386/x32-avx-avx512-linux.c: Removed.
1883 * features/i386/x32-avx-linux.c: Removed.
1884 * features/i386/x32-linux.c: Removed.
1886 2017-09-05 Yao Qi <yao.qi@linaro.org>
1888 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1890 (amd64_linux_read_description): Call
1891 amd64_create_target_description.
1892 * arch/amd64.c: New file.
1893 * arch/amd64.h: New file.
1894 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1895 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1897 2017-09-05 Yao Qi <yao.qi@linaro.org>
1899 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1900 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1901 (amd64_linux_read_description): Create target descriptions.
1902 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1903 functions. Add unit tests.
1904 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1906 * features/i386/64bit-avx.c: Generated.
1907 * features/i386/64bit-avx512.c: Generated.
1908 * features/i386/64bit-core.c: Generated.
1909 * features/i386/64bit-linux.c: Generated.
1910 * features/i386/64bit-mpx.c: Generated.
1911 * features/i386/64bit-pkeys.c: Generated.
1912 * features/i386/64bit-segments.c: Generated.
1913 * features/i386/64bit-sse.c: Generated.
1914 * features/i386/x32-core.c: Generated.
1915 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1916 c files for amd64-linux and x32-linux.
1918 2017-09-05 Yao Qi <yao.qi@linaro.org>
1920 * amd64-linux-tdep.c (amd64_linux_read_description): New
1922 (amd64_linux_core_read_description): Call
1923 amd64_linux_read_description.
1924 (amd64_linux_init_abi): Likewise.
1925 (amd64_x32_linux_init_abi): Likewise.
1926 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1927 * x86-linux-nat.c (x86_linux_read_description): Call
1928 amd64_linux_read_description.
1930 2017-09-05 Yao Qi <yao.qi@linaro.org>
1932 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1935 2017-09-05 Yao Qi <yao.qi@linaro.org>
1937 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1938 * features/i386/i386-avx-avx512-linux.c: Remove.
1939 * features/i386/i386-avx-linux.c: Remove.
1940 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1941 * features/i386/i386-avx-mpx-linux.c: Remove.
1942 * features/i386/i386-linux.c: Remove.
1943 * features/i386/i386-mmx-linux.c: Remove.
1944 * features/i386/i386-mpx-linux.c: Remove.
1946 2017-09-05 Yao Qi <yao.qi@linaro.org>
1948 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1949 (SFILES): Add arch/i386.c.
1950 (HFILES_NO_SRCDIR): Add arch/i386.h.
1951 * arch/i386.c: New file.
1952 * arch/i386.h: New file.
1953 * arch/tdesc.h (allocate_target_description): Declare.
1954 (set_tdesc_architecture): Declare.
1955 (set_tdesc_osabi): Declare.
1956 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1957 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1958 include arch/i386.h.
1959 (i386_linux_read_description): Remove code and call
1960 i386_create_target_description.
1961 (set_tdesc_architecture): New function.
1962 (set_tdesc_osabi): New function.
1963 * target-descriptions.h (allocate_target_description): Remove.
1965 2017-09-05 Yao Qi <yao.qi@linaro.org>
1967 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1968 * target-descriptions.c (tdesc_create_feature): Likewise, and
1970 * features/i386/32bit-avx.c: Re-generated.
1971 * features/i386/32bit-avx512.c: Re-generated.
1972 * features/i386/32bit-core.c: Re-generated.
1973 * features/i386/32bit-linux.c: Re-generated.
1974 * features/i386/32bit-mpx.c: Re-generated.
1975 * features/i386/32bit-pkeys.c: Re-generated.
1976 * features/i386/32bit-sse.c: Re-generated.
1978 2017-09-05 Yao Qi <yao.qi@linaro.org>
1980 * regformats/regdef.h (struct reg): Override operator == and !=.
1982 2017-09-05 Yao Qi <yao.qi@linaro.org>
1984 * arch/tdesc.h: New file.
1985 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1986 * target-descriptions.c: Update comments.
1987 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1989 * features/i386/32bit-avx.c: Re-generated.
1990 * features/i386/32bit-avx512.c: Re-generated.
1991 * features/i386/32bit-core.c: Re-generated.
1992 * features/i386/32bit-linux.c: Re-generated.
1993 * features/i386/32bit-mpx.c: Re-generated.
1994 * features/i386/32bit-pkeys.c: Re-generated.
1995 * features/i386/32bit-sse.c: Re-generated.
1997 2017-09-05 Yao Qi <yao.qi@linaro.org>
1999 * regformats/regdat.sh: Update generated code.
2001 2017-09-05 Yao Qi <yao.qi@linaro.org>
2003 * regformats/regdat.sh: Adjust code order.
2005 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2007 * expprint.c (dump_subexp_body_standard): Use constant format
2008 string in fprintf_filtered call.
2010 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2012 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2014 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2016 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2018 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2020 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2022 * bsd-kvm.o: Define _KMEMUSER.
2023 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2024 * configure: Regenerate.
2026 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2028 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2029 * i386-fbsd-nat.c: Likewise.
2031 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2033 * unittests/array-view-selftests.c: Add include of <array>.
2035 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2037 * spu-tdep.c (flush_ea_cache): Add missing argument to
2038 call_function_by_hand.
2040 2017-09-04 Pedro Alves <palves@redhat.com>
2042 * NEWS (Safer support for debugging with no debug info): New.
2044 2017-09-04 Pedro Alves <palves@redhat.com>
2046 * c-exp.y (function_method, function_method_void): Add current
2047 instance flags to TYPE_INSTANCE.
2048 * dwarf2read.c (check_modifier): New.
2049 (compute_delayed_physnames): Assert that only C++ adds delayed
2050 physnames. Mark fn_fields as const/volatile depending on
2052 * eval.c (make_params): New type_instance_flags parameter. Use
2053 it as the new type's instance flags.
2054 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2055 flags element and pass it to make_params.
2056 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2057 instance flags element.
2058 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2059 * gdbtypes.h: Include "enum-flags.h".
2060 (type_instance_flags): New enum-flags type.
2061 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2062 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2063 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2064 (follow_type_instance_flags): New function.
2065 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2066 * parser-defs.h (follow_type_instance_flags): Declare.
2067 * valops.c (value_struct_elt_for_reference): const/volatile must
2070 2017-09-04 Pedro Alves <palves@redhat.com>
2072 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2073 function/method scopes; lookup the nested name as a function local
2076 2017-09-04 Pedro Alves <palves@redhat.com>
2078 (%type <voidval>): Add function_method.
2079 * c-exp.y (exp): New production for calls with no arguments.
2080 (function_method, function_method_void_or_typelist): New
2082 (exp): New production for "method()::static_var".
2083 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2084 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2085 Handle OP_FUNC_STATIC_VAR.
2086 * parse.c (operator_length_standard):
2087 Handle OP_FUNC_STATIC_VAR.
2089 2017-09-04 Pedro Alves <palves@redhat.com>
2091 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2093 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2095 * parse.c (operator_length_standard, operator_check_standard):
2097 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2099 2017-09-04 Pedro Alves <palves@redhat.com>
2101 * ax-gdb.c: Include "typeprint.h".
2102 (gen_expr_for_cast): New function.
2103 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2104 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2106 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2107 nodebug_data_symbol.
2108 * eval.c: Include "typeprint.h".
2109 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2110 Error out if symbol has unknown type.
2111 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2112 evaluate_subexp_for_cast.
2113 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2115 (evaluate_subexp_for_cast): New function.
2116 * gdbtypes.c (init_nodebug_var_type): New function.
2117 (objfile_type): Use it to initialize types of variables with no
2119 * typeprint.c (error_unknown_type): New.
2120 * typeprint.h (error_unknown_type): New declaration.
2121 * compile/compile-c-types.c (convert_type_basic): Handle
2122 TYPE_CODE_ERROR; warn and fallback to int for variables with
2125 2017-09-04 Pedro Alves <palves@redhat.com>
2127 * eval.c (evaluate_var_value): New function, factored out from ...
2128 (evaluate_subexp_standard): ... here.
2130 2017-09-04 Pedro Alves <palves@redhat.com>
2132 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2133 Remove useless assignments to 'op'.
2135 2017-09-04 Pedro Alves <palves@redhat.com>
2137 * eval.c (eval_skip_value): New function.
2138 (evaluate_subexp_standard): Use it.
2140 2017-09-04 Pedro Alves <palves@redhat.com>
2142 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2143 function name from symbol/minsym and pass it to
2144 error_call_unknown_return_type.
2146 2017-09-04 Pedro Alves <palves@redhat.com>
2148 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2149 * ax-gdb.c (gen_msym_var_ref): New function.
2150 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2151 * eval.c (evaluate_var_msym_value): New function.
2152 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2153 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2154 to call_function_by_hand.
2155 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2156 Handle OP_VAR_MSYM_VALUE.
2157 (union exp_element) <msymbol>: New field.
2158 * minsyms.h (struct type): Forward declare.
2159 (find_minsym_type_and_address): Declare.
2160 * parse.c (write_exp_elt_msym): New function.
2161 (write_exp_msymbol): Delete, refactored as ...
2162 (find_minsym_type_and_address): ... this new function.
2163 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2164 (operator_length_standard, operator_check_standard): Handle
2166 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2168 2017-09-04 Pedro Alves <palves@redhat.com>
2170 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2171 TYPE_GNU_IFUNC specially here. Throw error if return type is
2173 * ada-typeprint.c (print_func_type): Handle functions with unknown
2175 * c-typeprint.c (c_type_print_base): Handle functions and methods
2176 with unknown return type.
2177 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2178 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2179 * compile/compile-c-types.c: Include "objfiles.h".
2180 (convert_func): For functions with unknown return type, warn and
2182 * compile/compile-object-run.c (compile_object_run): Adjust call
2183 to call_function_by_hand_dummy.
2184 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2185 call_function_by_hand.
2186 * eval.c (evaluate_subexp_standard): Adjust calls to
2187 call_function_by_hand. Handle functions and methods with unknown
2188 return type. Pass expect_type to call_function_by_hand.
2189 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2191 * gcore.c (call_target_sbrk): Adjust call to
2192 call_function_by_hand.
2193 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2194 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2195 an integer address type instead of nodebug.
2196 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2197 call_function_by_hand.
2198 * infcall.c (error_call_unknown_return_type): New function.
2199 (call_function_by_hand): New "default_return_type" parameter.
2201 (call_function_by_hand_dummy): New "default_return_type"
2202 parameter. Use it instead of defaulting to int. If there's no
2203 default and the return type is unknown, throw an error. If
2204 there's a default return type, and the called function has no
2205 debug info, then assume the function is prototyped.
2206 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2207 New "default_return_type" parameter.
2208 (error_call_unknown_return_type): New declaration.
2209 * linux-fork.c (call_lseek): Cast return type of lseek.
2210 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2211 call_function_by_hand.
2212 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2213 calls to call_function_by_hand.
2214 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2216 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2217 (value_nsstring, print_object_command): Adjust calls to
2218 call_function_by_hand.
2219 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2220 functions with unknown return type.
2221 (pascal_type_print_func_varspec_suffix): New function.
2222 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2223 TYPE_CODE_METHOD>: Use it.
2224 * python/py-value.c (valpy_call): Adjust call to
2225 call_function_by_hand.
2226 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2227 call_function_by_hand.
2228 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2229 call_function_by_hand.
2230 * valops.c (value_allocate_space_in_inferior): Adjust call to
2231 call_function_by_hand.
2232 * typeprint.c (type_print_unknown_return_type): New function.
2233 * typeprint.h (type_print_unknown_return_type): New declaration.
2235 2017-09-04 Pedro Alves <palves@redhat.com>
2237 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2238 types with more than one parameter as prototyped.
2240 2017-09-04 Pedro Alves <palves@redhat.com>
2242 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2243 (disassemble_command): Use gdb_disassembly_flags instead of bare
2245 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2246 (dump_insns, do_mixed_source_and_assembly_deprecated)
2247 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2248 Use gdb_disassembly_flags instead of bare int.
2249 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2250 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2251 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2252 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2253 (enum gdb_disassembly_flag): ... values of this new enumeration.
2254 (gdb_disassembly_flags): Define.
2256 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2257 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2258 gdb_disassembly_flags instead of bare int.
2259 * record-btrace.c (btrace_insn_history)
2260 (record_btrace_insn_history, record_btrace_insn_history_range)
2261 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2262 instead of bare int.
2263 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2264 Use gdb_disassembly_flags instead of bare int.
2265 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2267 * target-delegates.c: Regenerate.
2268 * target.c (target_insn_history, target_insn_history_from)
2269 (target_insn_history_range): Use gdb_disassembly_flags instead of
2271 * target.h: Include "disasm.h".
2272 (struct target_ops) <to_insn_history, to_insn_history_from,
2273 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2275 (target_insn_history, target_insn_history_from)
2276 (target_insn_history_range): Use gdb_disassembly_flags instead of
2279 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2281 * cli/cli-script.c (build_command_line): For if/while commands,
2282 check whether args is empty.
2284 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2286 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2287 (enum command_control_type): Likewise.
2288 (struct command_line): Likewise.
2289 (free_command_lines): Likewise.
2290 (struct command_lines_deleter): Likewise.
2291 (command_line_up): Likewise.
2292 (read_command_lines): Likewise.
2293 (read_command_lines_1): Likewise.
2294 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2295 (enum command_control_type): Likewise.
2296 (struct command_line): Likewise.
2297 (free_command_lines): Likewise.
2298 (struct command_lines_deleter): Likewise.
2299 (command_line_up): Likewise.
2300 (read_command_lines): Likewise.
2301 (read_command_lines_1): Likewise.
2302 * breakpoint.h: Include cli/cli-script.h.
2303 * extension-priv.h: Likewise.
2304 * gdbcmd.h: Likewise.
2306 2017-09-04 Pedro Alves <palves@redhat.com>
2308 * ada-lang.c (is_known_support_routine): Move sal declaration to
2309 where it is initialized.
2310 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2311 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2312 (clear_command, update_static_tracepoint): Remove init_sal
2313 references. Move declarations closer to initializations.
2314 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2316 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2317 references. Move sal declarations closer to initializations.
2318 * frame.c (find_frame_sal): Return a symtab_and_line via function
2319 return instead of output parameter. Remove init_sal references.
2320 * frame.h (find_frame_sal): Return a symtab_and_line via function
2321 return instead of output parameter.
2322 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2323 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2325 (gdbscm_find_pc_line): Remove init_sal reference.
2326 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2327 references. Move declarations closer to initializations.
2328 * infcmd.c (set_step_frame): Update. Move declarations closer to
2330 (finish_backward): Remove init_sal references. Move declarations
2331 closer to initializations.
2332 * infrun.c (process_event_stop_test, handle_step_into_function)
2333 (insert_hp_step_resume_breakpoint_at_frame)
2334 (insert_step_resume_breakpoint_at_caller): Likewise.
2335 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2336 (symbol_to_sal): Likewise.
2337 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2338 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2339 to its initialization.
2340 * reverse.c (save_bookmark_command): Use new/delete. Remove
2341 init_sal references. Move declarations closer to initializations.
2342 * source.c (get_current_source_symtab_and_line): Remove brace
2344 (set_current_source_symtab_and_line): Now takes the sal by const
2345 reference. Remove brace initialization.
2346 (line_info): Remove init_sal reference.
2347 * source.h (set_current_source_symtab_and_line): Now takes a
2348 symtab_and_line via const reference.
2349 * stack.c (set_current_sal_from_frame): Adjust.
2350 (print_frame_info): Adjust.
2351 (get_last_displayed_sal): Return the sal via function return
2352 instead of via output parameter. Simplify.
2353 (frame_info): Adjust.
2354 * stack.h (get_last_displayed_sal): Return the sal via function
2355 return instead of via output parameter.
2356 * symtab.c (init_sal): Delete.
2357 (find_pc_sect_line): Remove init_sal references. Move
2358 declarations closer to initializations.
2359 (find_function_start_sal): Remove init_sal references. Move
2360 declarations closer to initializations.
2361 * symtab.h (struct symtab_and_line): In-class initialize all
2363 * tracepoint.c (set_traceframe_context)
2364 (print_one_static_tracepoint_marker): Remove init_sal references.
2365 Move declarations closer to initializations.
2366 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2367 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2368 declarations closer to initializations.
2369 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2370 init_sal references. Adjust.
2372 2017-09-04 Pedro Alves <palves@redhat.com>
2374 * ax-gdb.c (agent_command_1): Use range-for.
2375 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2376 * breakpoint.c: Include "common/array-view.h".
2377 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2378 parameter from struct symtabs_and_lines to
2379 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2380 (breakpoint_sals_to_pc): Change sals parameter from struct
2381 symtabs_and_lines to std::vector reference.
2382 (check_fast_tracepoint_sals): Change sals parameter from struct
2383 symtabs_and_lines to std::array_view. Use range-for.
2384 (decode_static_tracepoint_spec): Return a std::vector instead of
2385 symtabs_and_lines. Update.
2386 (create_breakpoint): Update.
2387 (break_range_command, until_break_command, clear_command): Update.
2388 (base_breakpoint_decode_location, bkpt_decode_location)
2389 (bkpt_probe_create_sals_from_location)
2390 (bkpt_probe_decode_location, tracepoint_decode_location)
2391 (tracepoint_probe_decode_location)
2392 (strace_marker_create_sals_from_location): Return a std::vector
2393 instead of symtabs_and_lines.
2394 (strace_marker_create_breakpoints_sal): Update.
2395 (strace_marker_decode_location): Return a std::vector instead of
2396 symtabs_and_lines. Update.
2397 (update_breakpoint_locations): Change struct symtabs_and_lines
2398 parameters to gdb::array_view. Adjust.
2399 (location_to_sals): Return a std::vector instead of
2400 symtabs_and_lines. Update.
2401 (breakpoint_re_set_default): Use std::vector instead of struct
2403 (decode_location_default): Return a std::vector instead of
2404 symtabs_and_lines. Update.
2405 * breakpoint.h: Include "common/array-view.h".
2406 (struct breakpoint_ops) <decode_location>: Now returns a
2407 std::vector instead of returning a symtabs_and_lines via output
2409 (update_breakpoint_locations): Change sals parameters to use
2411 * cli/cli-cmds.c (edit_command, list_command): Update to use
2412 std::vector and gdb::array_view.
2413 (ambiguous_line_spec): Adjust to use gdb::array_view and
2415 (compare_symtabs): Rename to ...
2416 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2417 const reference and adjust.
2418 (filter_sals): Rewrite using std::vector and standard algorithms.
2419 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2420 (jump_command): Update to use std::vector.
2421 * linespec.c (struct linespec_state) <canonical_names>: Update
2423 (add_sal_to_sals_basic): Delete.
2424 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2425 (decode_line_2, create_sals_line_offset)
2426 (convert_address_location_to_sals, convert_linespec_to_sals)
2427 (convert_explicit_location_to_sals, parse_linespec)
2428 (event_location_to_sals, decode_line_full, decode_line_1)
2429 (decode_line_with_current_source)
2430 (decode_line_with_last_displayed, decode_objc)
2431 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2432 (linespec_result::~linespec_result): Adjust to use std::vector
2433 instead of symtabs_and_lines.
2434 * linespec.h (linespec_sals::sals): Now a std::vector.
2435 (struct linespec_result): Use std::vector, bool, and in-class
2437 (decode_line_1, decode_line_with_current_source)
2438 (decode_line_with_last_displayed): Return std::vector.
2439 * macrocmd.c (info_macros_command): Use std::vector.
2440 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2441 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2443 * probe.h (parse_probes): Return a std::vector.
2444 * python/python.c (gdbpy_decode_line): Use std::vector and
2446 * source.c (select_source_symtab, line_info): Use std::vector.
2447 * stack.c (func_command): Use std::vector.
2448 * symtab.h (struct symtabs_and_lines): Delete.
2449 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2451 2017-09-04 Pedro Alves <palves@redhat.com>
2453 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2454 unittests/array-view-selftests.c.
2455 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2456 * common/array-view.h: New file.
2457 * unittests/array-view-selftests.c: New file.
2459 2017-09-04 Pedro Alves <palves@redhat.com>
2461 * cli/cli-cmds.c (edit_command): Pass message to
2462 ambiguous_line_spec.
2463 (list_command): Pass message to ambiguous_line_spec. Say
2464 "first"/"last" instead of "start" and "end" to be consistent with
2466 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2467 them to print formatted message.
2469 2017-09-04 Pedro Alves <palves@redhat.com>
2471 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2472 ftrace_update_insns by reference instead of pointer.
2474 2017-09-04 Yao Qi <yao.qi@linaro.org>
2476 * i386-go32-tdep.c: Include x86-xstate.h.
2477 (i386_go32_init_abi): Call i386_target_description.
2478 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2479 if xcr0 is X86_XSTATE_X87_MASK.
2480 * i386-tdep.h (tdesc_i386): Remove the declaration.
2481 (tdesc_i386_mmx): Likewise.
2483 2017-09-04 Yao Qi <yao.qi@linaro.org>
2485 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2486 X86_XSTATE_SSE_MASK instead of 0.
2488 2017-09-04 Yao Qi <yao.qi@linaro.org>
2490 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2491 i386_target_description.
2492 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2493 i386_target_description.
2494 * i386-tdep.c (i386_gdbarch_init): Likewise.
2496 2017-09-04 Yao Qi <yao.qi@linaro.org>
2498 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2499 (x86_darwin_init_abi_64): Call amd64_target_description.
2500 * amd64-dicos-tdep.c: Likewise.
2501 * amd64-fbsd-nat.c: Likewise.
2502 * amd64-fbsd-tdep.c: Likewise.
2503 * amd64-nbsd-tdep.c: Likewise.
2504 * amd64-obsd-tdep.c: Likewise.
2505 * amd64-sol2-tdep.c: Likewise.
2506 * amd64-windows-tdep.c: Likewise.
2507 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2509 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2511 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2512 (btrace_function) <insn>: Change type to use std::vector.
2513 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2514 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2515 ftrace_update_insns, ftrace_compute_global_level_offset,
2516 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2517 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2518 change to std::vector.
2519 (ftrace_update_insns): Adjust to change to std::vector, change
2520 type of INSN parameter.
2521 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2522 * record-btrace.c (btrace_call_history_insn_range,
2523 btrace_compute_src_line_range,
2524 record_btrace_frame_prev_register): Adjust to change to
2526 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2527 to change to std::vector.
2529 2017-09-03 Tom Tromey <tom@tromey.com>
2531 * corefile.c (reopen_exec_file): Use std::string.
2533 2017-09-03 Tom Tromey <tom@tromey.com>
2535 * compile/compile.c (compile_register_name_mangled): Return
2537 * compile/compile-loc2c.c (pushf_register_address): Update.
2538 (pushf_register): Update.
2539 * compile/compile-c-types.c (convert_array): Update.
2540 * compile/compile-c-symbols.c (generate_vla_size): Update.
2541 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2542 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2543 (convert_one_symbol): Update.
2544 (generate_c_for_for_one_variable): Update.
2545 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2547 (generate_register_struct): Update.
2548 * compile/compile-internal.h (c_get_range_decl_name): Return a
2550 (compile_register_name_mangled): Return std::string.
2552 2017-09-03 Tom Tromey <tom@tromey.com>
2554 * utils.c (perror_string): Return a std::string.
2555 (throw_perror_with_name, perror_warning_with_name): Update.
2557 2017-09-03 Tom Tromey <tom@tromey.com>
2559 * demangle.c (demangle_command): Use std::string,
2562 2017-09-03 Tom Tromey <tom@tromey.com>
2564 * cli/cli-setshow.c (do_set_command): Use std::string.
2566 2017-09-03 Tom Tromey <tom@tromey.com>
2568 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2570 2017-09-03 Tom Tromey <tom@tromey.com>
2572 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2574 2017-09-03 Tom Tromey <tom@tromey.com>
2576 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2577 gdb::unique_xmalloc_ptr.
2579 2017-09-03 Tom Tromey <tom@tromey.com>
2581 * thread.c (print_thread_info_1): Use string_printf.
2582 (thread_apply_command, thread_apply_all_command): Use
2585 2017-09-03 Tom Tromey <tom@tromey.com>
2587 * valprint.c (val_print_string): Update.
2588 * gdbcore.h (memory_error_message): Return std::string.
2589 * corefile.c (memory_error_message): Return std::string.
2590 (memory_error): Update.
2591 * breakpoint.c (insert_bp_location): Update.
2593 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2595 * target/waitstatus.h (target_waitstatus_to_string): Change
2596 return type to std::string.
2597 * target/waitstatus.c (target_waitstatus_to_string): Return
2599 * target.h (target_waitstatus_to_string): Remove declaration.
2600 * infrun.c (resume, clear_proceed_status_thread,
2601 print_target_wait_results, do_target_wait, save_waitstatus,
2602 stop_all_threads): Adjust.
2603 * record-btrace.c (record_btrace_wait): Adjust.
2605 (target_debug_print_struct_target_waitstatus_p): Adjust.
2607 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2610 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2613 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2615 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2616 for setting/unsetting environment variables on the remote target.
2617 (New remote packets): Add entries for QEnvironmentHexEncoded,
2618 QEnvironmentUnset and QEnvironmentReset.
2619 * common/environ.c (gdb_environ::operator=): Extend method to
2620 handle m_user_set_env_list and m_user_unset_env_list.
2621 (gdb_environ::clear): Likewise.
2622 (match_var_in_string): Change type of first parameter from 'char
2623 *' to 'const char *'.
2624 (gdb_environ::set): Extend method to handle
2625 m_user_set_env_list and m_user_unset_env_list.
2626 (gdb_environ::unset): Likewise.
2627 (gdb_environ::clear_user_set_env): New method.
2628 (gdb_environ::user_set_envp): Likewise.
2629 (gdb_environ::user_unset_envp): Likewise.
2630 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2631 m_user_unset_env_list on move constructor/assignment.
2632 (unset): Add new default parameter 'update_unset_list = true'.
2633 (clear_user_set_env): New method.
2634 (user_set_envp): Likewise.
2635 (user_unset_envp): Likewise.
2636 (m_user_set_env_list): New std::set.
2637 (m_user_unset_env_list): Likewise.
2638 * common/rsp-low.c (hex2str): New function.
2639 (bin2hex): New overload for bin2hex function.
2640 * common/rsp-low.c (hex2str): New prototype.
2641 (str2hex): New overload prototype.
2642 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2643 QEnvironmentUnset and QEnvironmentReset.
2644 (remote_protocol_features): Add QEnvironmentHexEncoded,
2645 QEnvironmentUnset and QEnvironmentReset packets.
2646 (send_environment_packet): New function.
2647 (extended_remote_environment_support): Likewise.
2648 (extended_remote_create_inferior): Call
2649 extended_remote_environment_support.
2650 (_initialize_remote): Add QEnvironmentHexEncoded,
2651 QEnvironmentUnset and QEnvironmentReset packet configs.
2652 * unittests/environ-selftests.c (gdb_selftest_env_var):
2654 (test_vector_initialization): New function.
2655 (test_init_from_host_environ): Likewise.
2656 (test_reinit_from_host_environ): Likewise.
2657 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2659 (test_unset_set_empty_vector): Likewise.
2660 (test_vector_clear): Likewise.
2661 (test_std_move): Likewise.
2662 (test_move_constructor):
2663 (test_self_move): Likewise.
2664 (test_set_unset_reset): Likewise.
2665 (run_tests): Rewrite in terms of the functions above.
2667 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2669 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2670 (adi_available): Use a temp variable of type CORE_ADDR as argument
2671 3 when calling target_auxv_search.
2672 (adi_normalize_address): Use masks and xor operators to calculate
2674 (adi_read_versions, adi_write_versions, adi_print_versions)
2675 (do_examine, do_assign): Use paddress.
2677 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2679 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2680 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2681 out of loop and add supply of FIR.
2682 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2685 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2688 * cli/cli-script.c (define_command): Don't convert command name
2691 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2693 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2694 Update all callers accordingly. Remove all code blocks handling
2695 the case where DISPP is not NULL.
2697 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2700 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2701 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2702 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2704 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2706 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2707 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2708 (read_comp_units_from_section): New parameter abbrev_section, use
2709 read_and_check_comp_unit_head, allocate signatured_type if needed.
2710 (create_all_comp_units): Update read_comp_units_from_section caller.
2712 2017-08-23 Pedro Alves <palves@redhat.com>
2715 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2716 to null_ptid and switch to thread without reading the registers
2717 after adding the inferior.
2719 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2721 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2723 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2724 (compile_to_object): Implement compile_gcc.
2725 (_initialize_compile): Install "set compile-gcc". Initialize
2728 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2730 * compile/compile.c (compile_to_object): Conditionally call
2731 set_verbose. Conditionally call compile or compile_v0.
2733 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2735 * sparc64-tdep.h: (adi_normalize_address): New export.
2736 * sparc-nat.h: (open_adi_tag_fd): New export.
2737 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2738 * sparc64-linux-tdep.c:
2739 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2740 (sparc64_linux_handle_segmentation_fault): New function.
2741 (sparc64_linux_init_abi): Register
2742 sparc64_linux_handle_segmentation_fault
2743 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2744 (sparc64_addr_bits_remove): New function.
2745 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2746 (MAX_PROC_NAME_SIZE): New macro.
2747 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2748 (sparc64adilist): New variable.
2749 (adi_proc_list): New variable.
2750 (find_adi_info): New function.
2751 (add_adi_info): New function.
2752 (get_adi_info_proc): New function.
2753 (get_adi_info): New function.
2754 (info_adi_command): New function.
2755 (read_maps_entry): New function.
2756 (adi_available): New function.
2757 (adi_normalize_address): New function.
2758 (adi_align_address): New function.
2759 (adi_convert_byte_count): New function.
2760 (adi_tag_fd): New function.
2761 (adi_is_addr_mapped): New function.
2762 (adi_read_versions): New function.
2763 (adi_write_versions): New function.
2764 (adi_print_versions): New function.
2765 (do_examine): New function.
2766 (do_assign): New function.
2767 (adi_examine_command): New function.
2768 (adi_assign_command): New function.
2769 (_initialize_sparc64_adi_tdep): New function.
2771 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2773 * breakpoint.c (breakpoints_info): Rename to ...
2774 (info_breakpoints_command): ... this.
2775 (watchpoints_info): Rename to ...
2776 (info_watchpoints_command): ... this.
2777 (tracepoints_info): Rename to ...
2778 (info_tracepoints_command): ... this.
2779 (_initialize_breakpoint): Adjust.
2780 * dcache.c (dcache_info): Rename to ...
2781 (info_display_command): ... this.
2782 (_initialize_dcache): Adjust.
2783 * frame.h (args_info): Rename to ...
2784 (info_args_command): ... this.
2785 (locals_info): Rename to ...
2786 (info_locals_command): ... this.
2787 * infcmd.c (nofp_registers_info): Rename to ...
2788 (info_registers_command): ... this.
2789 (float_info): Rename to ...
2790 (info_float_command): ... this.
2791 (program_info): Rename to ...
2792 (info_program_command): ... this.
2793 (all_registers_info): Rename to ...
2794 (info_all_registers_command): ... this.
2795 (vector_info): Rename to ...
2796 (info_vector_command): ... this.
2797 (float_info): Rename to ...
2798 (info_float_command): ... this.
2799 (_initialize_infcmd): Adjust.
2800 * inferior.h (term_info): Rename to ...
2801 (info_terminal_command): ... this.
2802 * inflow.c (term_info): Rename to ...
2803 (info_terminal_command): ... this.
2804 (_initialize_inflow): Adjust.
2805 * infrun.c (signals_info): Rename to ...
2806 (info_signals_command): ... this.
2807 (_initialize_infrun): Adjust.
2808 * objc-lang.c (classes_info): Rename to ...
2809 (info_classes_command): ... this.
2810 (selectors_info): Rename to ...
2811 (info_selectors_command): ... this.
2812 (_initialize_objc_language): Adjust.
2813 * printcmd.c (sym_info): Rename to ...
2814 (info_symbol_command): ... this.
2815 (address_info): Rename to ...
2816 (info_address_command): ... this.
2817 (display_info): Rename to ...
2818 (info_display_command): ... this.
2819 (_initialize_printcmd): Adjust.
2820 * reverse.c (bookmarks_info): Rename to ...
2821 (info_breakpoints_command): ... this.
2822 (_initialize_reverse): Adjust.
2823 * ser-go32.c (dos_info): Rename to ...
2824 (info_serial_command): ... this.
2825 (_initialize_ser_dos): Adjust.
2826 * skip.c (skip_info): Rename to ...
2827 (info_skip_command): ... this.
2828 (_initialize_step_skip): Adjust.
2829 * source.c (line_info): Rename to ...
2830 (info_line_command): ... this.
2831 (source_info): Rename to ...
2832 (info_source_command)
2833 * stack.c (frame_info): Rename to ...
2834 (info_frame_command): ... this.
2835 (locals_info): Rename to ...
2836 (info_locals_command): ... this.
2837 (args_info): Rename to ...
2838 (info_args_command): ... this.
2839 (_initialize_stack): Adjust.
2840 * symtab.c (sources_info): Rename to ...
2841 (info_sources_command): ... this.
2842 (variables_info): Rename to ...
2843 (info_variables_command): ... this.
2844 (functions_info): Rename to ...
2845 (info_functions_command): ... this.
2846 (types_info): Rename to ...
2847 (info_types_command): ... this.
2848 (_initialize_symtab): Adjust.
2849 * target.c (target_info): Rename to ...
2850 (info_target_command): ... this.
2851 (initialize_targets): Adjust.
2852 * tracepoint.c (tvariables_info): Rename to ...
2853 (info_tvariables_command): ... this.
2854 (scope_info): Rename to ...
2855 (info_scope_command): ... this.
2856 (trace_dump_actions): Adjust.
2857 (_initialize_tracepoint): Adjust.
2859 2017-08-22 Tom Tromey <tom@tromey.com>
2861 * breakpoint.h (install_breakpoint): Update.
2862 * breakpoint.c (add_solib_catchpoint): Update.
2863 (install_breakpoint): Change argument to a std::unique_ptr.
2864 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2865 (create_breakpoint_sal, create_breakpoint): Update.
2866 (watch_command_1, catch_exec_command_1)
2867 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2868 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2869 Return the breakpoint.
2870 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2871 (new_single_step_breakpoint): Update.
2872 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2874 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2876 * break-catch-sig.c (create_signal_catchpoint): Use
2878 * ada-lang.c (create_ada_exception_catchpoint): Use
2881 2017-08-22 Tom Tromey <tom@tromey.com>
2883 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2885 2017-08-22 Tom Tromey <tom@tromey.com>
2887 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2888 (lookup_partial_symbol): Update.
2890 2017-08-22 Tom Tromey <tom@tromey.com>
2892 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2893 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2894 (find_and_open_source, symtab_to_fullname): Update.
2895 * psymtab.c (psymtab_to_fullname): Update.
2897 2017-08-22 Tom Tromey <tom@tromey.com>
2899 * exec.c (exec_file_attach): Update.
2900 * linux-thread-db.c (try_thread_db_load): Update.
2901 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2902 * utils.c (gdb_realpath): Change return type.
2903 (gdb_realpath_keepfile): Update.
2904 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2905 (_initialize_utils): Register the new self test.
2906 * source.c (openp): Update.
2907 (find_and_open_source): Update.
2908 * nto-tdep.c (nto_find_and_open_solib): Update.
2909 * main.c (set_gdb_data_directory): Update.
2910 (captured_main_1): Update.
2911 * dwarf2read.c (dwarf2_get_dwz_file): Update
2912 (dw2_map_symbol_filenames): Update.
2913 * auto-load.c (auto_load_safe_path_vec_update): Update.
2914 (filename_is_in_auto_load_safe_path_vec): Change type of
2916 (auto_load_objfile_script): Update.
2917 (file_is_auto_load_safe): Update. Use std::string.
2918 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2920 2017-08-22 Tom Tromey <tom@tromey.com>
2922 * utils.c (gdb_realpath_keepfile): Return a
2923 gdb::unique_xmalloc_ptr.
2924 * exec.c (exec_file_attach): Update.
2925 * utils.h (gdb_realpath_keepfile): Return a
2926 gdb::unique_xmalloc_ptr.
2928 2017-08-22 Tom Tromey <tom@tromey.com>
2930 * compile/compile.c (compile_file_command): Use
2931 gdb::unique_xmalloc_ptr, std::string.
2932 * utils.c (gdb_abspath): Change return type.
2933 * source.c (openp): Update.
2934 * objfiles.c (allocate_objfile): Update.
2935 * main.c (set_gdb_data_directory): Update.
2936 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2938 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2940 * cli-cmds.c (list_commands): List actual code around more than
2943 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2945 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2947 2017-08-21 Pedro Alves <palves@redhat.com>
2950 * c-exp.y (variable production): Handle function aliases.
2951 * minsyms.c (msymbol_is_text): New function.
2952 * minsyms.h (msymbol_is_text): Declare.
2953 * symtab.c (find_function_alias_target): New function.
2954 * symtab.h (find_function_alias_target): Declare.
2956 2017-08-21 Pedro Alves <palves@redhat.com>
2958 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2960 * typeprint.c (whatis_exp): If handling "whatis", and expression
2961 is OP_TYPE, strip one typedef level. Otherwise don't strip
2963 * valops.c (value_cast): Save "to" type before resolving
2964 stubs/typedefs. Use that type as resulting value's type.
2966 2017-08-18 Tom Tromey <tom@tromey.com>
2967 Pedro Alves <palves@redhat.com>
2969 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2970 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2971 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2972 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2973 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2974 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2975 (linux_get_siginfo_data): Add "thread" argument. Use
2977 * linux-nat.c (linux_child_follow_fork)
2978 (check_stopped_by_watchpoint): Use scoped_restore.
2979 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2980 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2981 (restore_inferior_ptid, save_inferior_ptid): Remove.
2982 * btrace.c (btrace_fetch): Use scoped_restore.
2983 * bsd-uthread.c (bsd_uthread_fetch_registers)
2984 (bsd_uthread_store_registers): Use scoped_restore.
2985 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2987 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2988 (aix_thread_xfer_partial): Use scoped_restore.
2989 * inferior.h (save_inferior_ptid): Remove.
2991 2017-08-18 Yao Qi <yao.qi@linaro.org>
2994 * arm-tdep.c (gdb_print_insn_arm): Mark
2995 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2997 2017-08-18 Yao Qi <yao.qi@linaro.org>
2999 * NEWS: Mention GDBserver's new option "--selftest".
3000 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3001 * selftest.c: Move it to common/selftest.c.
3002 * selftest.h: Move it to common/selftest.h.
3003 * selftest-arch.c (reset): New function.
3004 (tests_with_arch): Call reset.
3006 2017-08-18 Yao Qi <yao.qi@linaro.org>
3008 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3009 instead of exception_fprintf and printf_filtered.
3011 2017-08-18 Yao Qi <yao.qi@linaro.org>
3013 * selftest.c (register_self_test): Rename it to
3014 selftests::register_test.
3015 (run_self_tests): selftest::run_tests.
3016 * selftest.h: Update declarations.
3017 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3018 selftests::register_test_foreach_arch.
3019 * selftest-arch.h: Update declaration.
3020 * aarch64-tdep.c: Update.
3021 * arm-tdep.c: Likewise.
3022 * disasm-selftests.c: Likewise.
3023 * dwarf2loc.c: Likewise.
3024 * dwarf2-frame.c: Likewise.
3025 * findvar.c: Likewise.
3026 * gdbarch-selftests.c: Likewise.
3027 * maint.c (maintenance_selftest): Likewise.
3028 * regcache.c: Likewise.
3029 * rust-exp.y: Likewise.
3030 * selftest-arch.c: Likewise.
3031 * unittests/environ-selftests.c: Likewise.
3032 * unittests/function-view-selftests.c: Likewise.
3033 * unittests/offset-type-selftests.c: Likewise.
3034 * unittests/optional-selftests.c: Likewise.
3035 * unittests/scoped_restore-selftests.c: Likewise.
3036 * utils-selftests.c: Likewise.
3038 2017-08-17 Pedro Alves <palves@redhat.com>
3040 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3043 2017-08-17 Pedro Alves <palves@redhat.com>
3045 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3047 (reset_die_in_process): Delete, replaced by ...
3048 (process_die_scope): ... this new class. Make it responsible for
3049 freeing cu->line_header too.
3050 (process_die): Use process_die_scope.
3051 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3052 cu->line_header_die_owner. Don't release the line header if it's
3054 (setup_type_unit_groups): Make the CU/DIE own the line header.
3055 Don't release the line header here.
3057 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3059 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3061 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3063 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3066 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3068 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3071 2017-08-15 Stafford Horne <shorne@gmail.com>
3073 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3075 2017-08-15 Stafford Horne <shorne@gmail.com>
3077 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3079 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3082 * infcmd.c (unset_environment_command): Use the 'clear' method on
3083 the environment instead of resetting it.
3085 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3087 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3090 2017-08-14 Tom Tromey <tom@tromey.com>
3092 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3093 (print_binary_chars): Likewise.
3094 (BITS_IN_BYTES): Remove.
3096 2017-08-14 Tom Tromey <tom@tromey.com>
3099 * valprint.c (LOW_ZERO): Change value to 034.
3100 (print_octal_chars): Add static_asserts for octal constants.
3101 * printcmd.c (print_scalar_formatted): Add 'd' case.
3103 2017-08-11 Tom Tromey <tom@tromey.com>
3105 * symfile.c (add_symbol_file_command): Use std::vector.
3107 2017-08-14 Tom Tromey <tom@tromey.com>
3109 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3110 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3112 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3114 2017-08-11 Pedro Alves <palves@redhat.com>
3116 * infrun.c (process_event_stop_test): Adjust
3117 function_name_is_marked_for_skip call.
3118 * skip.c: Include <list>.
3119 (skiplist_entry): Make it a class with private fields, and
3121 (skiplist_entry_chain): Delete.
3122 (skiplist_entries): New.
3123 (skiplist_entry_count): Delete.
3124 (highest_skiplist_entry_num): New.
3125 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3126 (add_skiplist_entry): Delete.
3127 (skiplist_entry::skiplist_entry): New.
3128 (skiplist_entry::add_entry): New.
3129 (skip_file_command, skip_function): Adjust.
3130 (compile_skip_regexp): Delete.
3131 (skip_command): Don't compile regexp here. Adjust to use
3132 skiplist_entry::add_entry.
3133 (skip_info): Adjust to use range-for and getters.
3134 (skip_enable_command, skip_disable_command): Adjust to use
3135 range-for and setters.
3136 (skip_delete_command): Adjust to use std::list.
3137 (add_skiplist_entry): Delete.
3138 (skip_file_p): Delete, refactored as ...
3139 (skiplist_entry::do_skip_file_p): ... this new method.
3140 (skip_gfile_p): Delete, refactored as ...
3141 (skiplist_entry::do_gskip_file_p): ... this new method.
3142 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3143 (skiplist_entry::skip_function_p): ... this new method.
3144 (function_name_is_marked_for_skip): Now returns bool, and takes
3145 the function sal by const reference. Adjust to use range-for and
3146 skiplist_entry methods.
3147 (_initialize_step_skip): Remove references to
3148 skiplist_entry_chain, skiplist_entry_count.
3149 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3150 takes the function sal by const reference.
3152 2017-08-11 Yao Qi <yao.qi@linaro.org>
3154 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3155 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3156 (dwarf2_frame_cache):
3157 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3158 RETURN_MASK_ALL and set *this_case to NULL.
3159 * frame-unwind.h: Update comments.
3161 2017-08-11 Yao Qi <yao.qi@linaro.org>
3163 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3164 (dwarf2_frame_state_copy_regs): Remove.
3165 (dwarf2_frame_state_free_regs): Remove.
3166 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3167 (dwarf2_restore_rule): Call method .alloc_regs instead of
3168 dwarf2_frame_state_alloc_regs.
3169 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3170 constructor. Call std::move.
3171 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3172 (dwarf2_frame_cache): Likewise.
3174 [GDB_SELF_TEST]: Include selftest.h and
3176 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3177 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3178 execute_cfa_program_test.
3180 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3181 copy ctor, assignment operator, move assignment.
3182 <alloc_regs>: New method.
3184 (struct dwarf2_frame_state): Delete dtor.
3185 (dwarf2_frame_state_alloc_regs): Remove declaration.
3186 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3187 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3189 2017-08-11 Yao Qi <yao.qi@linaro.org>
3191 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3192 (dwarf2_frame_state::dwarf2_frame_state): New.
3193 (dwarf2_frame_state::~dwarf2_frame_state): New.
3194 (dwarf2_fetch_cfa_info): Update.
3195 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3196 rather than a pointer. Update code.
3197 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3199 <data_align, code_align, retaddr_column>: Change them to const.
3200 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3203 2017-08-11 Yao Qi <yao.qi@linaro.org>
3205 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3206 <loc.exp>: New field.
3207 * dwarf2-frame.c (execute_cfa_program): Update.
3208 (dwarf2_frame_prev_register): Update.
3210 2017-08-10 Pedro Alves <palves@redhat.com>
3212 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3214 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3216 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3217 (fbsd_pending_children): Use std::list.
3218 (fbsd_remember_child): Likewise.
3219 (fbsd_is_child_pending): Likewise.
3220 (fbsd_pending_vfork_done): Use std::forward_list.
3221 (fbsd_add_vfork_done): Likewise.
3222 (fbsd_is_vfork_done_pending): Likewise.
3223 (fbsd_next_vfork_done): Likewise.
3225 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3227 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3228 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3229 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3231 (fbsd_xfer_partial): Use gdb::byte_vector.
3232 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3234 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3236 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3238 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3240 2017-08-09 Tom Tromey <tom@tromey.com>
3242 * skip.c (skiplist_entry): New constructor.
3243 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3244 (skiplist_entry::file_is_glob): Now bool.
3245 (skiplist_entry::file, skiplist_entry::function): Now
3247 (make_skip_entry): Return a unique_ptr. Use new.
3248 (free_skiplist_entry, free_skiplist_entry_cleanup)
3249 (make_free_skiplist_entry_cleanup): Remove.
3250 (skip_command, skip_disable_command, add_skiplist_entry)
3251 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3252 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3253 (function_name_is_marked_for_skip): Update.
3254 (skip_delete_command): Update. Use delete.
3256 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3258 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3259 (aarch64_linux_core_read_description): New function.
3260 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3262 2017-08-09 Pedro Alves <palves@redhat.com>
3264 * cp-name-parser.y (cp_comp_to_string): Return a
3265 gdb::unique_xmalloc_ptr<char>.
3266 * cp-support.c (replace_typedefs_qualified_name)
3267 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3268 (cp_canonicalize_string_full): Use op= instead of explicit
3270 (cp_class_name_from_physname, method_name_from_physname)
3271 (cp_func_name, cp_remove_params): Adjust to use
3272 gdb::unique_xmalloc_ptr<char>.
3273 * cp-support.h (cp_comp_to_string): Return a
3274 gdb::unique_xmalloc_ptr<char>.
3275 * python/py-type.c (typy_lookup_type): Adjust to use
3276 gdb::unique_xmalloc_ptr<char>.
3278 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3280 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3282 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3283 Yao Qi <yao.qi@linaro.org>
3285 * cp-support.c (cp_canonicalize_string_full): Use
3286 gdb::unique_xmalloc_ptr<char>.
3287 (cp_canonicalize_string): Likewise.
3289 2017-08-09 Yao Qi <yao.qi@linaro.org>
3291 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3292 * regformats/i386/amd64-avx-avx512.dat: Remove.
3293 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3294 * regformats/i386/amd64-avx-mpx.dat:Remove.
3295 * regformats/i386/amd64-avx.dat: Remove.
3296 * regformats/i386/amd64-mpx.dat: Remove.
3297 * regformats/i386/i386-avx-avx512.dat: Remove.
3298 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3299 * regformats/i386/i386-avx-mpx.dat: Remove.
3300 * regformats/i386/i386-mmx.dat: Remove.
3301 * regformats/i386/i386-mpx.dat: Remove.
3303 2017-08-09 Yao Qi <yao.qi@linaro.org>
3305 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3306 * amd64-tdep.c: Don't include features/i386/x32*.c.
3307 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3309 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3310 and i386/x32-avx-avx512.
3311 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3313 * features/i386/x32-avx-avx512.c: Removed.
3314 * features/i386/x32-avx-avx512.xml: Removed.
3315 * features/i386/x32-avx.c: Removed.
3316 * features/i386/x32-avx.xml: Removed.
3317 * features/i386/x32.c: Removed.
3318 * features/i386/x32.xml: Removed.
3319 * regformats/i386/x32-avx-avx512.dat: Removed.
3320 * regformats/i386/x32-avx.dat: Removed.
3321 * regformats/i386/x32.dat: Removed.
3323 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3325 PR breakpoints/21886
3326 * mem-break.c (default_memory_insert_breakpoint): Use
3327 `->placed_address' rather than `->reqstd_address' for the
3328 breakpoint location.
3330 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3332 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3335 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3337 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3338 a union of `tdep_info', `tdesc_data' and `id'.
3339 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3340 rather than `info.tdep_info'.
3341 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3342 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3343 * i386-tdep.c (i386_gdbarch_init): Likewise.
3344 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3345 * mips-tdep.c (mips_gdbarch_init): Likewise.
3346 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3347 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3348 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3350 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3352 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3353 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3355 * spu-tdep.c (spu_gdbarch_init): Likewise.
3356 * gdbarch.h: Regenerate.
3358 2017-08-07 Leszek Swirski <leszeks@google.com>
3361 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3363 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3365 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3366 (gdbsim_open): Rename gdb_argv args object to argv.
3368 2017-08-05 Tom Tromey <tom@tromey.com>
3370 * compile/compile-object-load.c (compile_object_load): Use
3371 gdb::unique_xmalloc_ptr.
3372 * cli/cli-dump.c (scan_filename): Rename from
3373 scan_filename_with_cleanup. Change return type.
3374 (scan_expression): Rename from scan_expression_with_cleanup.
3376 (dump_memory_to_file, dump_value_to_file, restore_command):
3377 Use gdb::unique_xmalloc_ptr. Update.
3378 * cli/cli-cmds.c (find_and_open_script): Use
3379 gdb::unique_xmalloc_ptr.
3380 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3381 * symmisc.c (maintenance_print_symbols)
3382 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3383 * symfile.c (symfile_bfd_open, generic_load)
3384 (add_symbol_file_command, remove_symbol_file_command): Use
3385 gdb::unique_xmalloc_ptr.
3386 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3387 * psymtab.c (maintenance_print_psymbols): Use
3388 gdb::unique_xmalloc_ptr.
3389 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3390 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3391 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3392 (reload_shared_libraries_1): Likewise.
3394 2017-08-05 Tom Tromey <tom@tromey.com>
3396 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3397 (rust_op_vector, rust_set_vector): New typedefs.
3398 (current_parser): New global.
3399 (work_obstack): Change to pointer type. Update all users.
3400 (rust_ast, pstate): Remove globals.
3401 (struct rust_parser): New.
3402 (%union) <params, field_inits>: Change type.
3403 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3404 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3405 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3406 (convert_params_to_types, convert_params_to_expression): Change
3408 (ast_string): Change type of "fields".
3409 (rust_parse): Make a rust_parser. Remove cleanups.
3410 (rust_lex_tests): Make and install an auto_obstack.
3412 2017-08-04 Yao Qi <yao.qi@linaro.org>
3414 * configure.srv (ipa_x32_linux_regobj): New.
3415 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3416 instead of X86_TDESC_AVX512.
3417 (initialize_low_tracepoint): Call
3418 init_registers_x32_avx_avx512_linux.
3420 2017-08-04 Yao Qi <yao.qi@linaro.org>
3422 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3424 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3426 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3428 2017-08-03 Tom Tromey <tom@tromey.com>
3430 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3432 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3434 2017-08-03 Tom Tromey <tom@tromey.com>
3436 * python/py-param.c (compute_enum_values): Use gdb_argv.
3438 2017-08-03 Tom Tromey <tom@tromey.com>
3440 * utils.h (struct gdb_argv_deleter): New.
3441 (gdb_argv): New class.
3442 * utils.c (gdb_argv::reset): New method.
3443 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3444 * tracefile.c (tsave_command): Use gdb_argv.
3445 * top.c (new_ui_command): Use gdb_argv.
3446 * symmisc.c (maintenance_print_symbols)
3447 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3448 * symfile.c (symbol_file_command, generic_load)
3449 (remove_symbol_file_command): Use gdb_argv.
3450 * stack.c (backtrace_command): Use gdb_argv.
3451 * source.c (add_path, show_substitute_path_command)
3452 (unset_substitute_path_command, set_substitute_path_command):
3454 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3455 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3456 * remote.c (extended_remote_run, remote_put_command)
3457 (remote_get_command, remote_delete_command): Use gdb_argv.
3458 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3459 (gdbsim_open): Use gdb_argv.
3460 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3461 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3462 * procfs.c (procfs_info_proc): Use gdb_argv.
3463 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3464 * infrun.c (handle_command): Use gdb_argv.
3465 * inferior.c (add_inferior_command, clone_inferior_command):
3467 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3468 * exec.c (exec_file_command): Use gdb_argv.
3469 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3470 * compile/compile.c (build_argc_argv): Use gdb_argv.
3472 2017-08-03 Tom Tromey <tom@tromey.com>
3474 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3476 2017-08-03 Tom Tromey <tom@tromey.com>
3478 * python/python.c (compute_python_string): Return std::string.
3479 (gdbpy_eval_from_control_command): Update.
3480 (do_start_initialization): Use std::string.
3481 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3483 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3486 2017-08-03 Tom Tromey <tom@tromey.com>
3488 * top.h (do_restore_instream_cleanup): Remove.
3489 * top.c (do_restore_instream_cleanup): Remove.
3490 (read_command_file): Use scoped_restore.
3491 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3493 2017-08-03 Tom Tromey <tom@tromey.com>
3495 * cli/cli-script.c (execute_user_command)
3496 (execute_control_command): Use scoped_restore.
3498 2017-08-03 Tom Tromey <tom@tromey.com>
3500 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3501 (execute_user_command): Remove user_call_depth; use
3502 user_args_stack's size instead.
3504 2017-08-03 Tom Tromey <tom@tromey.com>
3506 * top.h (in_user_command): Remove.
3507 * top.c (in_user_command): Remove.
3508 * cli/cli-script.c (do_restore_user_call_depth)
3509 (execute_user_command): Update.
3511 2017-08-03 Tom Tromey <tom@tromey.com>
3513 * valops.c (search_struct_method): Use gdb::byte_vector.
3514 * valarith.c (value_concat): Use std::vector.
3515 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3516 (simple_search_memory): Likewise.
3517 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3518 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3519 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3520 * elfread.c (elf_rel_plt_read): Use std::string.
3521 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3522 * cli/cli-dump.c (restore_section_callback): Use
3525 2017-08-03 Tom Tromey <tom@tromey.com>
3527 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3529 2017-08-03 Tom Tromey <tom@tromey.com>
3531 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3532 (tui_register_format): Use scoped_restore.
3534 2017-08-03 Tom Tromey <tom@tromey.com>
3536 * reverse.c (exec_direction_default): Remove.
3537 (exec_reverse_once): Use scoped_restore.
3538 * remote.c (restore_remote_timeout): Remove.
3539 (remote_flash_erase, remote_flash_write, remote_flash_done)
3540 (readchar, remote_serial_write): Use scoped_restore.
3541 * cli/cli-script.c (struct source_cleanup_lines_args)
3542 (source_cleanup_lines): Remove.
3543 (script_from_file): Use scoped_restore.
3544 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3545 (source_command): Use scoped_restore.
3547 2017-08-03 Tom Tromey <tom@tromey.com>
3549 * utils.h (make_cleanup_free_so): Remove.
3550 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3551 * solist.h (struct so_deleter): New.
3552 (so_list_up): New typedef.
3553 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3555 2017-08-03 Tom Tromey <tom@tromey.com>
3557 * utils.h (make_cleanup_restore_current_language): Remove.
3558 * utils.c (do_restore_current_language)
3559 (make_cleanup_restore_current_language): Remove.
3560 * parse.c (parse_exp_in_context_1)
3561 (parse_expression_with_language): Use
3562 scoped_restore_current_language.
3563 * mi/mi-main.c (mi_cmd_execute): Use
3564 scoped_restore_current_language.
3565 * language.h (scoped_restore_current_language): New class.
3567 2017-08-03 Tom Tromey <tom@tromey.com>
3569 * compile/compile.c (cleanup_unlink_file): Remove.
3570 (compile_to_object): Use gdb::unlinker.
3571 (eval_compile_command): Likewise.
3573 2017-08-03 Tom Tromey <tom@tromey.com>
3575 * utils.h (make_cleanup_fclose): Remove.
3576 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3578 2017-08-03 Tom Tromey <tom@tromey.com>
3580 * top.c (open_terminal_stream): Return gdb_file_up.
3581 (new_ui_command): Update.
3583 2017-08-03 Tom Tromey <tom@tromey.com>
3585 * source.c (print_source_lines_base, forward_search_command)
3586 (reverse_search_command): Use gdb_file_up.
3588 2017-08-03 Tom Tromey <tom@tromey.com>
3590 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3592 2017-08-03 Tom Tromey <tom@tromey.com>
3594 * cli/cli-cmds.c (find_and_open_script): Change return type.
3595 Remove "streamp" and "full_path" parameters.
3596 (source_script_with_search): Update.
3597 * auto-load.c (source_script_file): Update.
3598 * cli/cli-cmds.h (find_and_open_script): Change type.
3599 (open_script): New struct.
3601 2017-08-03 Tom Tromey <tom@tromey.com>
3603 * xml-support.c (xml_fetch_content_from_file): Update.
3604 * ui-file.c (stdio_file::open): Update.
3605 * tracefile-tfile.c (tfile_start): Update.
3606 * remote.c (remote_file_put, remote_file_get): Update.
3607 * nat/linux-procfs.c (linux_proc_get_int)
3608 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3609 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3610 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3611 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3612 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3613 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3614 * linux-nat.c (linux_proc_pending_signals): Update.
3615 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3616 (file_closer): Remove.
3617 * compile/compile.c (compile_to_object): Update.
3618 * common/filestuff.h (struct gdb_file_deleter): New.
3619 (gdb_file_up): New typedef.
3620 (gdb_fopen_cloexec): Change return type.
3621 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3622 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3623 (dump_binary_file, restore_binary_file): Update.
3624 * auto-load.c (auto_load_objfile_script_1): Update.
3626 2017-08-03 Tom Tromey <tom@tromey.com>
3628 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3629 (info_static_tracepoint_markers_command): Likewise.
3630 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3631 * skip.c (skip_info): Use ui_out_emit_table.
3632 * progspace.c (print_program_space): Use ui_out_emit_table.
3633 * osdata.c (info_osdata): Use ui_out_emit_table.
3634 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3636 * linux-thread-db.c (info_auto_load_libthread_db): Use
3638 * inferior.c (print_inferior): Use ui_out_emit_table.
3639 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3640 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3641 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3642 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3643 * ui-out.h (class ui_out_emit_table): New.
3645 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3647 * mips-tdep.c (mips_fpu_type_str): New function.
3648 (mips_dump_tdep): Call it.
3650 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3652 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3655 2017-07-31 Xavier Roirand <roirand@adacore.com>
3657 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3659 2017-07-27 Xavier Roirand <roirand@adacore.com>
3661 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3663 2017-07-26 Yao Qi <yao.qi@linaro.org>
3665 * cli/cli-cmds.c (maintenancechecklist): New variable.
3666 * gdbcmd.h (maintenancechecklist): Declare it.
3667 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3668 Call i386_linux_read_description with different masks.
3669 * maint.c (maintenance_check_command): New function.
3670 (_initialize_maint_cmds): Call add_prefix_cmd.
3671 * target-descriptions.c (tdesc_reg): override operator != and ==.
3672 (tdesc_type): Likewise.
3673 (tdesc_feature): Likewise.
3674 (target_desc): Likewise.
3675 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3676 (maintenance_check_xml_descriptions): New function.
3677 (_initialize_target_descriptions) Add command "xml-descriptions".
3678 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3680 2017-07-26 Yao Qi <yao.qi@linaro.org>
3682 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3683 Include features/i386/32bit-*.c.
3684 (i386_linux_read_description): Generate target description if it
3686 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3688 * features/i386/32bit-linux.c: Re-generated.
3689 * features/i386/32bit-sse.c: Likewise.
3690 * target-descriptions.c (print_c_feature::visit): Print code to
3691 set register number if needed.
3692 (print_c_feature) <m_next_regnum>: New field.
3694 2017-07-26 Yao Qi <yao.qi@linaro.org>
3696 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3697 (FEATURE_XMLFILES): New.
3698 (FEATURE_CFILES): New.
3700 (clean-cfiles): Remove generated c files.
3701 * features/i386/32bit-avx.c: Generated.
3702 * features/i386/32bit-avx512.c: Generated.
3703 * features/i386/32bit-core.c: Generated.
3704 * features/i386/32bit-linux.c: Generated.
3705 * features/i386/32bit-mpx.c: Generated.
3706 * features/i386/32bit-pkeys.c: Generated.
3707 * features/i386/32bit-sse.c: Generated.
3708 * target-descriptions.c: Include algorithm.
3709 (tdesc_element_visitor): Add method visit_end.
3710 (print_c_tdesc): Implement visit_end.
3711 (print_c_tdesc:: m_filename_after_features): Move it to
3713 (print_c_feature): New class.
3714 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3715 name starts with "i386/32bit-".
3717 2017-07-26 Yao Qi <yao.qi@linaro.org>
3719 * target-descriptions.c (tdesc_element_visitor): New class.
3720 (tdesc_element): New class.
3721 (tdesc_reg): Inherit from tdesc_element.
3722 (tdesc_reg::accept): New function.
3723 (tdesc_type): Inherit from tdesc_element.
3724 (tdesc_type::accept): New function.
3725 (tdesc_feature): Inherit from tdesc_element.
3726 (tdesc_feature::accept): New function.
3727 (target_desc): Inherit from tdesc_element.
3728 (target_desc::target_desc): New.
3729 (target_desc::~target_desc): New.
3730 (target_desc::accept): New.
3731 (allocate_target_description): Use new.
3732 (free_target_description): Use delete.
3733 (print_c_tdesc): New class.
3734 (maint_print_c_tdesc_cmd): Adjust.
3736 * features/aarch64.c: Re-generated.
3737 * features/arc-arcompact.c: Re-generated.
3738 * features/arc-v2.c: Re-generated.
3739 * features/arm/arm-with-iwmmxt.c: Re-generated.
3740 * features/arm/arm-with-m.c: Re-generated.
3741 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3742 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3743 * features/arm/arm-with-neon.c: Re-generated.
3744 * features/arm/arm-with-vfpv2.c: Re-generated.
3745 * features/arm/arm-with-vfpv3.c: Re-generated.
3746 * features/i386/amd64-avx-avx512.c: Re-generated.
3747 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3748 * features/i386/amd64-avx.c: Re-generated.
3749 * features/i386/amd64-avx-linux.c: Re-generated.
3750 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3751 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3752 * features/i386/amd64-avx-mpx.c: Re-generated.
3753 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3754 * features/i386/amd64.c: Re-generated.
3755 * features/i386/amd64-linux.c: Re-generated.
3756 * features/i386/amd64-mpx.c: Re-generated.
3757 * features/i386/amd64-mpx-linux.c: Re-generated.
3758 * features/i386/i386-avx-avx512.c: Re-generated.
3759 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3760 * features/i386/i386-avx.c: Re-generated.
3761 * features/i386/i386-avx-linux.c: Re-generated.
3762 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3763 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3764 * features/i386/i386-avx-mpx.c: Re-generated.
3765 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3766 * features/i386/i386.c: Re-generated.
3767 * features/i386/i386-linux.c: Re-generated.
3768 * features/i386/i386-mmx.c: Re-generated.
3769 * features/i386/i386-mmx-linux.c: Re-generated.
3770 * features/i386/i386-mpx.c: Re-generated.
3771 * features/i386/i386-mpx-linux.c: Re-generated.
3772 * features/i386/x32-avx-avx512.c: Re-generated.
3773 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3774 * features/i386/x32-avx.c: Re-generated.
3775 * features/i386/x32-avx-linux.c: Re-generated.
3776 * features/i386/x32.c: Re-generated.
3777 * features/i386/x32-linux.c: Re-generated.
3778 * features/microblaze.c: Re-generated.
3779 * features/microblaze-with-stack-protect.c: Re-generated.
3780 * features/mips64-dsp-linux.c: Re-generated.
3781 * features/mips64-linux.c: Re-generated.
3782 * features/mips-dsp-linux.c: Re-generated.
3783 * features/mips-linux.c: Re-generated.
3784 * features/nds32.c: Re-generated.
3785 * features/nios2.c: Re-generated.
3786 * features/nios2-linux.c: Re-generated.
3787 * features/rs6000/powerpc-32.c: Re-generated.
3788 * features/rs6000/powerpc-32l.c: Re-generated.
3789 * features/rs6000/powerpc-403.c: Re-generated.
3790 * features/rs6000/powerpc-403gc.c : Re-generated.
3791 * features/rs6000/powerpc-405.c: Re-generated.
3792 * features/rs6000/powerpc-505.c: Re-generated.
3793 * features/rs6000/powerpc-601.c: Re-generated.
3794 * features/rs6000/powerpc-602.c: Re-generated.
3795 * features/rs6000/powerpc-603.c: Re-generated.
3796 * features/rs6000/powerpc-604.c: Re-generated.
3797 * features/rs6000/powerpc-64.c: Re-generated.
3798 * features/rs6000/powerpc-64l.c: Re-generated.
3799 * features/rs6000/powerpc-7400.c: Re-generated.
3800 * features/rs6000/powerpc-750.c: Re-generated.
3801 * features/rs6000/powerpc-860.c: Re-generated.
3802 * features/rs6000/powerpc-altivec32.c: Re-generated.
3803 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3804 * features/rs6000/powerpc-altivec64.c: Re-generated.
3805 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3806 * features/rs6000/powerpc-cell32l.c: Re-generated.
3807 * features/rs6000/powerpc-cell64l.c: Re-generated.
3808 * features/rs6000/powerpc-e500.c: Re-generated.
3809 * features/rs6000/powerpc-e500l.c: Re-generated.
3810 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3811 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3812 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3813 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3814 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3815 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3816 * features/rs6000/powerpc-vsx32.c: Re-generated.
3817 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3818 * features/rs6000/powerpc-vsx64.c: Re-generated.
3819 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3820 * features/rs6000/rs6000.c: Re-generated.
3821 * features/s390-linux32.c: Re-generated.
3822 * features/s390-linux32v1.c: Re-generated.
3823 * features/s390-linux32v2.c: Re-generated.
3824 * features/s390-linux64.c: Re-generated.
3825 * features/s390-linux64v1.c: Re-generated.
3826 * features/s390-linux64v2.c: Re-generated.
3827 * features/s390-te-linux64.c: Re-generated.
3828 * features/s390-tevx-linux64.c: Re-generated.
3829 * features/s390-vx-linux64.c: Re-generated.
3830 * features/s390x-linux64.c: Re-generated.
3831 * features/s390x-linux64v1.c: Re-generated.
3832 * features/s390x-linux64v2.c: Re-generated.
3833 * features/s390x-te-linux64.c: Re-generated.
3834 * features/s390x-tevx-linux64.c: Re-generated.
3835 * features/s390x-vx-linux64.c: Re-generated.
3836 * features/sparc/sparc32-solaris.c: Re-generated.
3837 * features/sparc/sparc64-solaris.c: Re-generated.
3838 * features/tic6x-c62x.c: Re-generated.
3839 * features/tic6x-c62x-linux.c: Re-generated.
3840 * features/tic6x-c64x.c: Re-generated.
3841 * features/tic6x-c64x-linux.c: Re-generated.
3842 * features/tic6x-c64xp.c: Re-generated.
3843 * features/tic6x-c64xp-linux.c: Re-generated.
3845 2017-07-26 Yao Qi <yao.qi@linaro.org>
3847 * i386-linux-tdep.c (i386_linux_read_description): New function.
3848 (i386_linux_core_read_description): Call
3849 i386_linux_read_description.
3850 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3851 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3852 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3853 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3854 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3855 * x86-linux-nat.c (x86_linux_read_description): Call
3856 i386_linux_read_description.
3858 2017-07-26 Yao Qi <yao.qi@linaro.org>
3861 * features/Makefile (%.c: %.xml): Pass the xml file name to
3862 command "maint print c-tdesc".
3863 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3866 2017-07-26 Yao Qi <yao.qi@linaro.org>
3868 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3869 in-class initialization.
3870 (tdesc_create_feature): Call new instead of XCNEW.
3871 (free_target_description): Ue delete.
3873 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3875 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3877 2017-07-25 Yao Qi <yao.qi@linaro.org>
3879 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3881 (amd64_x32_init_abi): Likewise.
3882 * amd64-tdep.h (amd64_init_abi): Update declaration.
3883 (amd64_x32_init_abi): Likewise.
3885 2017-07-25 Yao Qi <yao.qi@linaro.org>
3888 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3889 condition for FPSCR.
3890 (arm_linux_store_inferior_registers): Likewise.
3892 2017-07-22 Tom Tromey <tom@tromey.com>
3894 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3895 <syscalls_counts>: Now a std::vector.
3896 (get_catch_syscall_inferior_data): Use "new".
3897 (catch_syscall_inferior_data_cleanup): Use "delete".
3898 (insert_catch_syscall, remove_catch_syscall)
3899 (clear_syscall_counts): Update.
3901 2017-07-22 Tom Tromey <tom@tromey.com>
3903 * break-catch-syscall.c (syscall_catchpoint)
3904 <syscalls_to_be_caught>: Now a std::vector<int>
3905 (~syscall_catchpoint): Remove.
3906 (insert_catch_syscall, remove_catch_syscall)
3907 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3908 (print_mention_catch_syscall, print_recreate_catch_syscall):
3910 (create_syscall_event_catchpoint): Change type of "filter"
3912 (catch_syscall_split_args): Return a std::vector.
3913 (catch_syscall_command_1, catching_syscall_number_1): Update.
3915 2017-07-22 Tom Tromey <tom@tromey.com>
3917 * break-catch-throw.c (struct exception_catchpoint)
3918 <exception_rx>: Now a std::string.
3919 (~exception_catchpoint): Remove.
3920 (print_one_detail_exception_catchpoint): Update.
3921 (handle_gnu_v3_exceptions): Change type of except_rx.
3922 (extract_exception_regexp): Return a std::string.
3923 (catch_exception_command_1): Update.
3925 2017-07-22 Tom Tromey <tom@tromey.com>
3927 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3928 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3930 <catch_all>: Now a bool.
3931 (~signal_catchpoint): Remove.
3932 (signal_catchpoint_insert_location)
3933 (signal_catchpoint_remove_location)
3934 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3935 (signal_catchpoint_print_mention)
3936 (signal_catchpoint_print_recreate)
3937 (signal_catchpoint_explains_signal): Update.
3938 (create_signal_catchpoint): Change type of "filter" and
3940 (catch_signal_split_args): Return a std::vector. Change type of
3942 (catch_signal_command): Update.
3944 2017-07-20 Pedro Alves <palves@redhat.com>
3946 * ada-lang.c (ada_language_defn): Make extern.
3947 (_initialize_ada_language): Remove add_language call.
3948 * c-lang.c (c_language_defn, cplus_language_defn)
3949 (asm_language_defn, minimal_language_defn): Make extern.
3950 (_initialize_c_language): Delete.
3951 * completer.c (compare_cstrings): Delete, moved to utils.h.
3952 * d-lang.c (d_language_defn): Make extern.
3953 (_initialize_d_language): Remove add_language calls.
3954 * defs.h (enum language): Add comment.
3955 * f-lang.c (f_language_defn): Make extern.
3956 (_initialize_f_language): Remove add_language call.
3957 * go-lang.c (go_language_defn): Make extern.
3958 (_initialize_go_language): Remove add_language call.
3959 * language.c: Include <algorithm>.
3960 (languages): Redefine as const array.
3961 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3962 (set_language_command): Handle "local". Use for-range loop.
3963 (set_language): Remove loop.
3964 (language_enum): Rewrite.
3965 (language_def, language_str): Remove loops.
3966 (add_language): Delete.
3967 (add_set_language_command): New, based on add_languages.
3968 (skip_language_trampoline): Adjust.
3969 (local_language_defn): Delete.
3970 (language_gdbarch_post_init): Adjust.
3971 (_initialize_language): Remove add_language calls. Call
3972 add_set_language_command.
3973 * language.h (add_language): Delete.
3974 (auto_language_defn)
3975 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3976 (asm_language_defn, c_language_defn, cplus_language_defn)
3977 (d_language_defn, f_language_defn, go_language_defn)
3978 (m2_language_defn, objc_language_defn, opencl_language_defn)
3979 (pascal_language_defn, rust_language_defn): Declare.
3980 * m2-lang.c (m2_language_defn): Make extern.
3981 (_initialize_m2_language): Remove add_language call.
3982 * objc-lang.c (objc_language_defn): Make extern.
3983 (_initialize_objc_language): Remove add_language call.
3984 * opencl-lang.c (opencl_language_defn): Make extern.
3985 (_initialize_opencl_language): Remove add_language call.
3986 * p-lang.c (pascal_language_defn): Make extern.
3987 (_initialize_pascal_language): Delete.
3988 * rust-lang.c (rust_language_defn): Make extern.
3989 (_initialize_rust_language): Delete.
3990 * utils.h (compare_cstrings): New static inline function.
3992 2017-07-20 Pedro Alves <palves@redhat.com>
3994 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3995 (get_var_value): Constify parameters.
3996 (get_int_var_value): Change prototype.
3997 (to_fixed_range_type): Adjust.
3998 * ada-lang.h (get_int_var_value): Change prototype.
4000 2017-07-20 Pedro Alves <palves@redhat.com>
4002 * dwarf2read.c (dw2_lookup_symbol): Use
4003 SYMBOL_MATCHES_SEARCH_NAME.
4004 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4006 2017-07-20 Pedro Alves <palves@redhat.com>
4008 * block.c (block_iter_name_step, block_iter_name_first)
4009 (block_iter_name_next): Delete.
4010 (block_lookup_symbol_primary): Adjust to use
4011 dict_iter_match_first/dict_iter_match_next.
4012 * block.h (block_iter_name_first, block_iter_name_next): Delete
4014 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4015 dict_iter_match_first/dict_iter_match_next.
4017 2017-07-20 Pedro Alves <palves@redhat.com>
4019 * cp-support.c (cp_find_first_component_aux): Add missing case for
4022 2017-07-18 David Blaikie <dblaikie@gmail.com>
4024 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4025 of dwo_cu's dwo_file.
4027 2017-07-18 Yao Qi <yao.qi@linaro.org>
4029 * remote.c (store_registers_using_G): Remove one line comment.
4031 2017-07-18 Yao Qi <yao.qi@linaro.org>
4033 * regcache.c (regcache_cpy): Simplify it.
4034 (regcache::cpy_no_passthrough): Remove it.
4035 * regcache.h (cpy_no_passthrough): Remove it.
4036 (regcache_dup, regcache_cpy): Update comments.
4038 2017-07-18 Pedro Alves <palves@redhat.com>
4040 * remote-sim.c (sim_command_completer): Adjust to work with a
4041 completion_tracker instead of a VEC.
4043 2017-07-17 Pedro Alves <palves@redhat.com>
4045 * completer.c (complete_source_filenames): New function.
4046 (complete_address_and_linespec_locations): New function.
4047 (location_completer): Use complete_address_and_linespec_locations.
4048 (completion_tracker::build_completion_result): Honor the tracker's
4049 request to suppress append.
4050 * completer.h (completion_tracker::suppress_append_ws)
4051 (completion_tracker::set_suppress_append_ws): New methods.
4052 (completion_tracker::m_suppress_append_ws): New field.
4053 (complete_source_filenames): New declaration.
4054 * linespec.c (linespec_complete_what): New.
4055 (struct ls_parser) <complete_what, completion_word,
4056 completion_quote_char, completion_quote_end, completion_tracker>:
4058 (string_find_incomplete_keyword_at_end): New.
4059 (linespec_lexer_lex_string): Record quote char. If in completion
4061 (linespec_lexer_consume_token): Advance the completion word point.
4062 (linespec_lexer_peek_token): Save/restore completion info.
4063 (save_stream_and_consume_token): New.
4064 (set_completion_after_number): New.
4065 (linespec_parse_basic): Set what to complete next depending on
4066 token. Handle function and label completions specially.
4067 (parse_linespec): Disable objc shortcut in completion mode. Set
4068 what to complete next depending on token type. Skip keyword if in
4070 (complete_linespec_component, linespec_complete): New.
4071 * linespec.h (linespec_complete): Declare.
4073 2017-07-17 Pedro Alves <palves@redhat.com>
4075 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4076 Handle 'operator<' / 'operator<<'.
4078 2017-07-17 Pedro Alves <palves@redhat.com>
4080 * completer.c (collect_explicit_location_matches): Handle
4082 (convert_explicit_location_to_linespec): New, factored out from
4084 (convert_explicit_location_to_sals): ... this.
4085 (complete_label): New.
4086 (linespec_complete_label, find_label_symbols_in_block): New.
4087 (find_label_symbols): Add completion_mode parameter and adjust to
4088 call find_label_symbols_in_block.
4089 * linespec.h (linespec_complete_label): Declare.
4091 2017-07-17 Pedro Alves <palves@redhat.com>
4093 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4094 complete_symbol_mode parameter.
4095 * cli/cli-cmds.c (complete_command): Get the completion result out
4096 of the handle_brkchars tracker if used a custom word point.
4097 * completer.c: Include "linespec.h".
4098 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4099 (advance_to_expression_complete_word_point): New.
4100 (completion_tracker::completes_to_completion_word): New.
4101 (complete_files_symbols): Pass down
4102 complete_symbol_mode::EXPRESSION.
4103 (explicit_options, probe_options): New.
4104 (collect_explicit_location_matches): Complete on the
4105 explictit_loc->foo instead of word. Use
4106 linespec_complete_function. Handle MATCH_LINE. Handle offering
4107 keyword and options completions.
4108 (backup_text_ptr): Delete.
4109 (skip_keyword): New.
4110 (complete_explicit_location): Remove 'word' parameter. Add
4111 language, quoted_arg_start and quoted_arg_end parameters.
4112 Rewrite, parsing left to right.
4113 (location_completer): Rewrite.
4114 (location_completer_handle_brkchars): New function.
4115 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4116 (enum complete_line_internal_reason): Adjust comments.
4117 (completion_tracker::discard_completions): New.
4118 (completer_handle_brkchars_func_for_completer): Handle
4120 (gdb_custom_word_point_brkchars)
4121 (gdb_org_rl_basic_quote_characters): New.
4122 (gdb_completion_word_break_characters_throw)
4123 (completion_find_completion_word): Handle trackers that use a
4125 (completion_tracker::advance_custom_word_point_by): New.
4126 (completion_tracker::build_completion_result): Don't rely on
4127 readline appending the quote char.
4128 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4129 use a custom word point.
4130 (gdb_rl_attempted_completion_function): Restore
4131 rl_basic_quote_characters.
4132 * completer.h (class completion_tracker): Extend intro comment.
4133 (completion_tracker::set_quote_char)
4134 (completion_tracker::quote_char)
4135 (completion_tracker::set_use_custom_word_point)
4136 (completion_tracker::use_custom_word_point)
4137 (completion_tracker::custom_word_point)
4138 (completion_tracker::set_custom_word_point)
4139 (completion_tracker::advance_custom_word_point_by)
4140 (completion_tracker::completes_to_completion_word)
4141 (completion_tracker::discard_completions): New methods.
4142 (completion_tracker::m_quote_char)
4143 (completion_tracker::m_use_custom_word_point)
4144 (completion_tracker::m_custom_word_point): New fields.
4145 (advance_to_expression_complete_word_point): Declare.
4146 * f-lang.c (f_collect_symbol_completion_matches): Add
4147 complete_symbol_mode parameter.
4148 * language.h (struct language_defn)
4149 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4151 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4152 (linespec_complete_function): New function.
4153 (linespec_lexer_lex_keyword): Adjust.
4154 * linespec.h (linespec_keywords, linespec_complete_function): New
4156 * location.c (find_end_quote): New function.
4157 (explicit_location_lex_one): Add explicit_completion_info
4158 parameter. Save quoting info. Don't throw if being called for
4159 completion. Don't handle Ada operators here.
4160 (is_cp_operator, skip_op_false_positives, first_of)
4161 (explicit_location_lex_one_function): New function.
4162 (string_to_explicit_location): Replace 'dont_throw' parameter with
4163 an explicit_completion_info pointer parameter. Handle it. Don't
4164 use explicit_location_lex_one to lex function names. Use
4165 explicit_location_lex_one_function instead.
4166 * location.h (struct explicit_completion_info): New.
4167 (string_to_explicit_location): Replace 'dont_throw' parameter with
4168 an explicit_completion_info pointer parameter.
4169 * symtab.c (default_collect_symbol_completion_matches_break_on):
4170 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4171 (default_collect_symbol_completion_matches)
4172 (collect_symbol_completion_matches): Add complete_symbol_mode
4174 (collect_symbol_completion_matches_type): Pass down
4175 complete_symbol_mode::EXPRESSION.
4176 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4177 parameter. Handle LINESPEC mode.
4178 * symtab.h (complete_symbol_mode): New.
4179 (default_collect_symbol_completion_matches_break_on)
4180 (default_collect_symbol_completion_matches)
4181 (collect_symbol_completion_matches)
4182 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4185 2017-07-17 Pedro Alves <palves@redhat.com>
4187 * utils.c (enum class strncmp_iw_mode): New.
4188 (strcmp_iw): Rename to ...
4189 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4190 parameters. Handle them.
4192 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4193 * utils.h (strncmp_iw): Declare.
4194 (strcmp_iw): Move describing comments here.
4196 2017-07-17 Pedro Alves <palves@redhat.com>
4198 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4200 * c-typeprint.c (is_type_conversion_operator): Use
4202 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4203 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4205 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4206 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4207 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4208 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4210 * location.c: Include "cp-support.h".
4211 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4213 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4216 2017-07-17 Pedro Alves <palves@redhat.com>
4218 * cli/cli-cmds.c (complete_command): Use a completion tracker
4219 along with completion_find_completion_word for handle_brkchars
4221 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4222 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4223 (struct gdb_rl_completion_word_info): New.
4224 (gdb_rl_find_completion_word): New.
4225 (completion_find_completion_word): New.
4226 * completer.h (completion_find_completion_word): Declare.
4228 2017-07-17 Pedro Alves <palves@redhat.com>
4230 * ada-lang.c (symbol_completion_match): Adjust comments.
4231 (symbol_completion_add): Replace vector parameter with
4232 completion_tracker parameter. Use it.
4233 (ada_make_symbol_completion_list): Rename to...
4234 (ada_collect_symbol_completion_matches): ... this. Add
4235 completion_tracker parameter and use it.
4236 (ada_language_defn): Adjust.
4237 * break-catch-syscall.c (catch_syscall_completer): Adjust
4238 prototype and work with completion_tracker instead of VEC.
4239 * breakpoint.c (condition_completer): Adjust prototype and work
4240 with completion_tracker instead of VEC.
4241 * c-lang.c (c_language_defn, cplus_language_defn)
4242 (asm_language_defn, minimal_language_defn): Adjust to renames.
4243 * cli/cli-cmds.c (complete_command): Rework using
4244 completion_tracker. Catch exceptions when completing.
4245 * cli/cli-decode.c (integer_unlimited_completer)
4246 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4247 with completion_tracker instead of VEC.
4248 * command.h (struct completion_tracker): Forward declare.
4249 (completer_ftype, completer_handle_brkchars_ftype): Change
4251 (complete_on_cmdlist, complete_on_enum): Adjust.
4252 * completer.c: Include <algorithm>.
4253 (struct gdb_completer_state): New.
4254 (current_completion): New global.
4255 (readline_line_completion_function): Delete.
4256 (noop_completer, filename_completer)
4257 (filename_completer_handle_brkchars, complete_files_symbols)
4258 (linespec_location_completer): Adjust to work with a
4259 completion_tracker instead of a VEC.
4260 (string_or_empty): New.
4261 (collect_explicit_location_matches): Adjust to work with a
4262 completion_tracker instead of a VEC.
4263 (explicit_location_completer): Rename to ...
4264 (complete_explicit_location): ... this and adjust to work with a
4265 completion_tracker instead of a VEC.
4266 (location_completer): Adjust to work with a completion_tracker
4268 (add_struct_fields): Adjust to work with a completion_list instead
4270 (expression_completer): Rename to ...
4271 (complete_expression): ... this and adjust to work with a
4272 completion_tracker instead of a VEC. Use complete_files_symbols.
4273 (expression_completer): Reimplement on top of complete_expression.
4274 (symbol_completer): Adjust to work with a completion_tracker
4276 (enum complete_line_internal_reason): Add describing comments.
4277 (complete_line_internal_normal_command): Adjust to work with a
4278 completion_tracker instead of a VEC.
4279 (complete_line_internal): Rename to ...
4280 (complete_line_internal_1): ... this and adjust to work with a
4281 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4282 handle_brkchars phase.
4283 (new_completion_tracker): Delete.
4284 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4285 complete_line_internal_1.
4286 (free_completion_tracker): Delete.
4287 (INITIAL_COMPLETION_HTAB_SIZE): New.
4288 (completion_tracker::completion_tracker)
4289 (completion_tracker::~completion_tracker): New.
4290 (maybe_add_completion): Delete.
4291 (completion_tracker::maybe_add_completion)
4292 (completion_tracker::add_completion)
4293 (completion_tracker::add_completions): New.
4294 (throw_max_completions_reached_error): Delete.
4295 (complete_line): Adjust to work with a completion_tracker instead
4296 of a VEC. Don't create a completion_tracker_t or check for max
4298 (command_completer, command_completer_handle_brkchars)
4299 (signal_completer, reg_or_group_completer_1)
4300 (reg_or_group_completer, default_completer_handle_brkchars):
4301 Adjust to work with a completion_tracker.
4302 (gdb_completion_word_break_characters_throw): New.
4303 (gdb_completion_word_break_characters): Reimplement.
4304 (line_completion_function): Delete.
4305 (completion_tracker::recompute_lowest_common_denominator)
4306 (expand_preserving_ws)
4307 (completion_tracker::build_completion_result)
4308 (completion_result::completion_result)
4309 (completion_result::completion_result)
4310 (completion_result::~completion_result)
4311 (completion_result::completion_result)
4312 (completion_result::release_match_list, compare_cstrings)
4313 (completion_result::sort_match_list)
4314 (completion_result::reset_match_list)
4315 (gdb_rl_attempted_completion_function_throw)
4316 (gdb_rl_attempted_completion_function): New.
4317 * completer.h (completion_list, struct completion_result)
4318 (class completion_tracker): New.
4319 (complete_line): Add completion_tracker parameter.
4320 (readline_line_completion_function): Delete.
4321 (gdb_rl_attempted_completion_function): New.
4322 (noop_completer, filename_completer, expression_completer)
4323 (location_completer, symbol_completer, command_completer)
4324 (signal_completer, reg_or_group_completer): Update prototypes.
4325 (completion_tracker_t, new_completion_tracker)
4326 (make_cleanup_free_completion_tracker): Delete.
4327 (enum maybe_add_completion_enum): Delete.
4328 (maybe_add_completion): Delete.
4329 (throw_max_completions_reached_error): Delete.
4330 * corefile.c (complete_set_gnutarget): Adjust to work with a
4331 completion_tracker instead of a VEC.
4332 * cp-abi.c (cp_abi_completer): Adjust to work with a
4333 completion_tracker instead of a VEC.
4334 * d-lang.c (d_language_defn): Adjust.
4335 * disasm.c (disassembler_options_completer): Adjust to work with a
4336 completion_tracker instead of a VEC.
4337 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4338 (f_collect_symbol_completion_matches): ... this. Adjust to work
4339 with a completion_tracker instead of a VEC.
4340 (f_language_defn): Adjust.
4341 * go-lang.c (go_language_defn): Adjust.
4342 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4343 Adjust to work with a completion_tracker instead of a VEC.
4344 * infrun.c (handle_completer): Likewise.
4345 * interps.c (interpreter_completer): Likewise.
4346 * interps.h (interpreter_completer): Likewise.
4347 * language.c (unknown_language_defn, auto_language_defn)
4348 (local_language_defn): Adjust.
4349 * language.h (language_defn::la_make_symbol_completion_list):
4351 (language_defn::la_collect_symbol_completion_matches): ... this
4352 and adjust to work with a completion_tracker instead of a VEC.
4353 * m2-lang.c (m2_language_defn): Adjust.
4354 * objc-lang.c (objc_language_defn): Adjust.
4355 * opencl-lang.c (opencl_language_defn): Adjust.
4356 * p-lang.c (pascal_language_defn): Adjust.
4357 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4358 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4359 with a completion_tracker.
4360 * rust-lang.c (rust_language_defn): Adjust.
4361 * symtab.c (free_completion_list, do_free_completion_list)
4362 (return_val, completion_tracker): Delete.
4363 (completion_list_add_name, completion_list_add_symbol)
4364 (completion_list_add_msymbol, completion_list_objc_symbol)
4365 (completion_list_add_fields, add_symtab_completions): Add
4366 completion_tracker parameter and use it.
4367 (default_make_symbol_completion_list_break_on_1): Rename to...
4368 (default_collect_symbol_completion_matches_break_on): ... this.
4369 Add completion_tracker parameter and use it instead of allocating
4370 a completion tracker here.
4371 (default_make_symbol_completion_list_break_on): Delete old
4373 (default_make_symbol_completion_list): Delete.
4374 (default_collect_symbol_completion_matches): New.
4375 (make_symbol_completion_list): Delete.
4376 (collect_symbol_completion_matches): New.
4377 (make_symbol_completion_type): Rename to ...
4378 (collect_symbol_completion_matches_type): ... this. Add
4379 completion_tracker parameter and use it instead of VEC.
4380 (make_file_symbol_completion_list_1): Rename to...
4381 (collect_file_symbol_completion_matches): ... this. Add
4382 completion_tracker parameter and use it instead of VEC.
4383 (make_file_symbol_completion_list): Delete.
4384 (add_filename_to_list): Use completion_list instead of a VEC.
4385 (add_partial_filename_data::list): Now a completion_list.
4386 (make_source_files_completion_list): Work with a completion_list
4388 * symtab.h: Include "completer.h".
4389 (default_make_symbol_completion_list_break_on)
4390 (default_make_symbol_completion_list, make_symbol_completion_list)
4391 (make_symbol_completion_type, make_file_symbol_completion_list)
4392 (make_source_files_completion_list): Delete.
4393 (default_collect_symbol_completion_matches_break_on)
4394 (default_collect_symbol_completion_matches)
4395 (collect_symbol_completion_matches)
4396 (collect_symbol_completion_matches_type)
4397 (collect_file_symbol_completion_matches)
4398 (make_source_files_completion_list): New.
4399 * top.c (init_main): Don't install a rl_completion_entry_function
4400 hook. Install a rl_attempted_completion_function hook instead.
4401 * tui/tui-layout.c (layout_completer): Adjust to work with a
4403 * tui/tui-regs.c (tui_reggroup_completer):
4404 * tui/tui-win.c (window_name_completer, focus_completer)
4405 (winheight_completer): Adjust to work with a completion_tracker.
4406 * value.c: Include "completer.h".
4407 (complete_internalvar): Adjust to work with a completion_tracker.
4408 * value.h (complete_internalvar): Likewise.
4410 2017-07-17 Pedro Alves <palves@redhat.com>
4412 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4414 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4415 comments to completer_ftype's declaration.
4416 <completer_handle_brkchars>: Change type to
4417 completer_handle_brkchars_ftype.
4418 * command.h (completer_ftype): Add describing comment and give
4419 names to parameters.
4420 (completer_ftype_void): Rename to ...
4421 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4422 (set_cmd_completer_handle_brkchars): Adjust.
4423 * completer.c (filename_completer_handle_brkchars): New function.
4424 (complete_line_internal_normal_command): New function, factored
4426 (complete_line_internal): ... here.
4427 (command_completer_handle_brkchars)
4428 (default_completer_handle_brkchars)
4429 (completer_handle_brkchars_func_for_completer): New functions.
4430 * completer.h (set_gdb_completion_word_break_characters): Delete
4432 (completer_handle_brkchars_func_for_completer): New declaration.
4433 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4434 completer_handle_brkchars_func_for_completer.
4436 2017-07-17 Pedro Alves <palves@redhat.com>
4438 * completer.c (symbol_completer): New function, based on
4439 make_symbol_completion_list_fn.
4440 * completer.h (symbol_completer): New declaration.
4441 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4442 * python/py-cmd.c (completers): Adjust.
4443 * symtab.c (make_symbol_completion_list_fn): Delete.
4444 * symtab.h (make_symbol_completion_list_fn): Delete.
4445 * cli/cli-decode.c (add_cmd): Adjust.
4447 2017-07-17 Pedro Alves <palves@redhat.com>
4449 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4450 * dwarf2read.c: Include "filename-seen-cache.h".
4451 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4452 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4453 * filename-seen-cache.c: New file.
4454 * filename-seen-cache.h: New file.
4455 * symtab.c: Include "filename-seen-cache.h".
4456 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4457 (create_filename_seen_cache, clear_filename_seen_cache)
4458 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4459 to filename-seen-cache.h/filename-seen-cache.c.
4460 (output_source_filename, sources_info)
4461 (maybe_add_partial_symtab_filename)
4462 (make_source_files_completion_list): Adjust to use
4463 filename_seen_cache.
4465 2017-07-17 Pedro Alves <palves@redhat.com>
4467 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4469 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4470 dwarf2_debug_sections*)): New.
4471 (dwarf2_per_objfile::dwarf2_per_objfile(const
4472 dwarf2_per_objfile&)): Declare as deleted.
4473 (dwarf2_per_objfile::operator=): Declare as deleted.
4474 (dwarf2_per_objfile::dwarf2_per_objfile)
4475 (dwarf2_per_objfile::~dwarf2_per_objfile)
4476 (dwarf2_per_objfile::free_cached_comp_units): New.
4477 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4478 ctor. Call dwarf2_per_objfile's ctor manually.
4479 (dwarf2_locate_sections): Deleted/refactored as ...
4480 (dwarf2_per_objfile::locate_sections): ... this new method.
4481 (free_cached_comp_units): Defer to
4482 dwarf2_per_objfile::free_cached_comp_units.
4483 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4485 2017-07-14 Tom Tromey <tom@tromey.com>
4488 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4490 <UNOP_SIZEOF>: Split into separate case.
4491 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4493 2017-07-14 Tom Tromey <tom@tromey.com>
4496 * symtab.c (symbol_matches_domain): Add language_rust to special
4498 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4499 treat LOC_TYPEDEF symbols as variables.
4501 2017-07-14 Pedro Alves <palves@redhat.com>
4503 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4504 symtabs matching all symtabs with SRCFILE as file name instead of
4505 only considering the first hit, with lookup_symtab.
4507 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4509 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4510 operator_name parameters.
4511 (gen_expr): Update function call.
4513 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4515 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4517 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4519 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4520 parameter, use agent_expr::gdbarch instead, update function
4522 (locexpr_tracepoint_var_ref): Likewise.
4523 (loclist_tracepoint_var_ref): Likewise.
4524 * ax-gdb.c (gen_trace_static_fields): Likewise.
4525 (gen_traced_pop): Likewise.
4526 (gen_frame_args_address): Likewise.
4527 (gen_frame_locals_address): Likewise.
4528 (gen_var_ref): Likewise.
4529 (gen_struct_ref_recursive): Likewise.
4530 (gen_static_field): Likewise.
4531 (gen_maybe_namespace_elt): Likewise.
4532 (gen_expr): Likewise.
4533 (gen_trace_for_var): Likewise.
4534 (gen_trace_for_expr): Likewise.
4535 (gen_trace_for_return_address): Likewise.
4537 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4539 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4541 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4543 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4545 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4546 from ax, update calls.
4547 (gen_usual_arithmetic): Likewise.
4548 (gen_integral_promotions): Likewise.
4549 (gen_bitfield_ref): Likewise.
4550 (gen_primitive_field): Likewise.
4551 (gen_struct_ref_recursive): Likewise.
4552 (gen_struct_ref): Likewise.
4553 (gen_maybe_namespace_elt): Likewise.
4554 (gen_struct_elt_for_reference): Likewise.
4555 (gen_namespace_elt): Likewise.
4556 (gen_aggregate_elt_ref): Likewise.
4557 (gen_expr): Get gdbarch from ax, update calls.
4558 (gen_expr_binop_rest): Likewise.
4560 2017-07-13 Pedro Alves <palves@redhat.com>
4562 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4564 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4565 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4566 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4567 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4569 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4570 Get final tdesc from the tdep.
4571 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4573 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4574 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4575 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4576 Use it as default tdesc.
4577 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4578 down to amd_init_abi. No longer handle fallback tdesc here.
4579 * amd64-tdep.h (tdesc_x32): Declare.
4580 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4582 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4585 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4587 * s390-linux-tdep.c (s390_process_record): Add support for
4588 instructions new in arch12.
4590 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4592 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4593 PT_GETFSBASE and PT_GETGSBASE.
4594 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4597 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4599 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4600 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4601 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4603 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4604 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4605 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4606 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4607 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4608 * features/i386/amd64.xml: Add 64bit-segments.xml.
4609 * features/i386/amd64-avx-avx512.c: Regenerated.
4610 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4611 * features/i386/amd64-avx-mpx.c: Regenerated.
4612 * features/i386/amd64-avx.c: Regenerated.
4613 * features/i386/amd64-mpx.c: Regenerated.
4614 * features/i386/amd64.c: Regenerated.
4615 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4616 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4617 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4618 * regformats/i386/amd64-avx.dat: Regenerated.
4619 * regformats/i386/amd64-mpx.dat: Regenerated.
4620 * regformats/i386/amd64.dat: Regenerated.
4622 2017-07-10 Yao Qi <yao.qi@linaro.org>
4624 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4625 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4627 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4629 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4631 * gnulib/aclocal.m4: Regenerate.
4632 * gnulib/config.in: Regenerate.
4633 * gnulib/configure: Regenerate.
4634 * gnulib/import/Makefile.am: Regenerate.
4635 * gnulib/import/Makefile.in: Regenerate.
4636 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4637 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4638 * gnulib/import/m4/environ.m4: New file.
4639 * gnulib/import/m4/setenv.m4: New file.
4640 * gnulib/import/setenv.c: New file.
4641 * gnulib/import/unsetenv.c: New file.
4643 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4645 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4646 address when op is DW_OP_addr.
4648 2017-07-09 Tom Tromey <tom@tromey.com>
4650 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4651 check and apply to outer type.
4653 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4655 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4656 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4657 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4658 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4660 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4662 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4664 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4666 * corelow.c (get_core_siginfo): Remove.
4667 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4668 instead of get_core_siginfo.
4669 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4670 * gdbarch.h: Re-generate.
4671 * gdbarch.c: Re-generate.
4672 * linux-tdep.c (linux_core_xfer_siginfo): New.
4673 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4675 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4677 * corelow.c (thread_section_name): Move to ...
4678 * gdbcore.h (thread_section_name): ... here.
4680 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4682 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4683 (struct siginfo32): New.
4684 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4685 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4686 via ptrace(PT_LWPINFO).
4688 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4690 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4691 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4692 (fbsd_get_siginfo_type): New.
4693 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4694 (_initialize_fbsd_tdep): New.
4696 2017-07-06 David Blaikie <dblaikie@gmail.com>
4698 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4699 a singular dwo_unit*) to support multiple CUs in the same way that
4700 multiple TUs are supported.
4701 (create_cus_hash_table): Replace create_dwo_cu with a function for
4702 parsing multiple CUs from a DWO file.
4703 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4705 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4706 htab_find, rather than comparing the signature to a singleton CU in
4709 2017-07-06 Pedro Alves <palves@redhat.com>
4711 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4713 2017-07-04 Pedro Alves <palves@redhat.com>
4715 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4716 * gdbtypes.h (TYPE_STATIC): Delete.
4717 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4718 is_synchronized, is_native>: Delete.
4720 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4721 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4722 (TYPE_FN_FIELD_ABSTRACT): Delete.
4724 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4726 * buffer.h (buffer_finish): Fix spelling mistakes.
4728 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4730 * .dir-locals.el: Automatically switch to C-style comments in
4731 versions of Emacs that support the feature.
4733 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4734 Pedro Alves <palves@redhat.com>
4737 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4738 (process_next_line): New variable 'inline_cmd'.
4739 Adjust 'if' clauses for "python", "compile" and "guile" to use
4740 'command_name_equals' and check for '!inline_cmd'.
4742 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4745 * cli/cli-script.c (command_name_equals_not_inline): New function.
4746 (process_next_line): Adjust 'if' clauses for "python", "compile"
4747 and "guile" to use command_name_equals_not_inline.
4749 2017-06-29 Pedro Alves <palves@redhat.com>
4751 * completer.c (expression_completer): Call
4752 linespec_location_completer instead of location_completer.
4754 2017-06-29 Pedro Alves <palves@redhat.com>
4756 * completer.c (expression_completer): Remove code that recomputes
4759 2017-06-29 Yao Qi <yao.qi@linaro.org>
4761 * regformats/regdat.sh: Generate code with
4762 "ifndef IN_PROCESS_AGENT".
4764 2017-06-28 Pedro Alves <palves@redhat.com>
4766 * command.h: Include "common/scoped_restore.h".
4768 2017-06-28 Yao Qi <yao.qi@linaro.org>
4770 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4771 instead of obstack_grow.
4773 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4776 * symfile.c (reread_symbols): Call objfiles_changed just before
4779 2017-06-27 Pedro Alves <palves@redhat.com>
4781 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4782 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4783 (completion_list_add_symbol, completion_list_add_msymbol):
4784 ... these new functions.
4785 (add_symtab_completions)
4786 (default_make_symbol_completion_list_break_on_1): Adjust.
4788 2017-06-27 Pedro Alves <palves@redhat.com>
4790 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4791 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4792 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4794 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4795 'storage_obstack' field an auto_obstack. In-class initialize all
4796 non-bitfield fields. Make minsyms_read bool.
4797 * symfile.c (read_symbols): Adjust.
4799 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4801 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4802 (gdbsim_store_register): Likewise.
4804 2017-06-27 Pedro Alves <palves@redhat.com>
4806 * c-exp.y (name_obstack): Now an auto_obstack.
4807 (yylex): Use auto_obstack::clear.
4808 (c_parse): Use auto_obstack::clear instead of reinitializing and
4809 freeing the obstack.
4810 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4811 * d-exp.y (name_obstack): Now an auto_obstack.
4812 (yylex): Use auto_obstack::clear.
4813 (d_parse): Use auto_obstack::clear instead of reinitializing and
4814 freeing the obstack.
4815 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4817 * dwarf2read.c (create_addrmap_from_index)
4818 (dwarf2_build_psymtabs_hard)
4819 (update_enumeration_type_from_children): Likewise.
4820 * gdb_obstack.h (auto_obstack): New type.
4821 * go-exp.y (name_obstack): Now an auto_obstack.
4822 (build_packaged_name): Use auto_obstack::clear.
4823 (go_parse): Use auto_obstack::clear instead of reinitializing and
4824 freeing the obstack.
4825 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4827 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4828 * rust-exp.y (work_obstack): Now an auto_obstack.
4829 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4830 reinitializing and freeing the obstack.
4831 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4832 (host_char_to_target): Use auto_obstack.
4833 * utils.h (make_cleanup_obstack_free): Delete declaration.
4834 * valprint.c (generic_emit_char, generic_printstr): Use
4837 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4839 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4841 (darwin_init_thread_list): Don't update dummy thread.
4842 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4844 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4846 * record-full.c (netorder16): Remove.
4848 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4850 * common/diagnostics.h: Define macros for GCC.
4851 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4852 * common/vec.h: Include diagnostics.h.
4853 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4854 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4857 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4859 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4861 * ada-lex.l: Ignore deprecated register warnings.
4863 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4865 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4866 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4868 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4870 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4873 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4875 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4877 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4879 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4880 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4881 (xtensa_register_read_masked): Likewise.
4883 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4885 * common/environ.c (gdb_environ::unset): Update comment.
4887 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4889 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4892 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4894 * record-full.c (record_full_exec_insn): Use byte_vector.
4896 2017-06-22 Yao Qi <yao.qi@linaro.org>
4898 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4899 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4901 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4903 * remote.c (cached_reg): Move from here...
4904 * regcache.h (cached_reg): ...to here.
4905 * python/py-unwind.c (struct reg_info): Remove.
4906 (cached_frame_info): Use cached_reg_t.
4907 (pyuw_prev_register): Likewise.
4908 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4909 (pyuw_dealloc_cache): Free all registers.
4911 2017-06-22 Pedro Alves <palves@redhat.com>
4912 Simon Marchi <simon.marchi@ericsson.com>
4914 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4916 * common/diagnostics.h: New file.
4918 2017-06-22 Pedro Alves <palves@redhat.com>
4920 * common/agent.h: Add include guards.
4922 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4924 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4925 talk about addressable units instead of bytes.
4927 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4929 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4930 of '::const_iterator'.
4932 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4934 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4935 'unittests/environ-selftests.c'.
4936 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4937 * charset.c (find_charset_names): Declare object 'iconv_env'.
4938 Update code to use 'iconv_env' object. Remove call to
4940 * common/environ.c: Include <utility>.
4941 (make_environ): Delete function.
4942 (free_environ): Delete function.
4943 (gdb_environ::clear): New function.
4944 (gdb_environ::operator=): New function.
4945 (gdb_environ::get): Likewise.
4946 (environ_vector): Delete function.
4947 (set_in_environ): Delete function.
4948 (gdb_environ::set): New function.
4949 (unset_in_environ): Delete function.
4950 (gdb_environ::unset): New function.
4951 (gdb_environ::envp): Likewise.
4952 * common/environ.h: Include <vector>.
4953 (struct gdb_environ): Delete; transform into...
4954 (class gdb_environ): ... this class.
4955 (free_environ): Delete prototype.
4956 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4957 environ_vector): Likewise.
4958 * infcmd.c (run_command_1): Update code to call
4959 'envp' from 'gdb_environ' class.
4960 (environment_info): Update code to call methods from 'gdb_environ'
4962 (unset_environment_command): Likewise.
4963 (path_info): Likewise.
4964 (path_command): Likewise.
4965 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4966 (inferior::inferior): Initialize 'environment' using the host's
4968 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4969 Include "environ.h".
4970 (class inferior) <environment>: Change type from 'struct
4971 gdb_environ' to 'gdb_environ'.
4972 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4973 methods from 'gdb_environ' class.
4974 * solib.c (solib_find_1): Likewise
4975 * unittests/environ-selftests.c: New file.
4977 2017-06-20 Yao Qi <yao.qi@linaro.org>
4979 * features/i386/i386-linux.xml: Exchange the order of including
4980 32bit-linux.xml and 32bit-sse.xml.
4981 * features/i386/i386-linux.c: Regenerated.
4983 2017-06-20 Yao Qi <yao.qi@linaro.org>
4985 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4986 Delete copy ctor and assignment operator.
4987 (tdesc_type): Likewise.
4988 (tdesc_feature): Likewise.
4989 (tdesc_free_reg): Remove.
4990 (tdesc_create_reg): Use new.
4991 (tdesc_free_type): Remove.
4992 (tdesc_create_vector): Use new.
4993 (tdesc_create_union): Likewise.
4994 (tdesc_create_flags): Likewise.
4995 (tdesc_create_enum): Likewise.
4996 (tdesc_free_feature): Delete.
4997 (free_target_description): Use delete.
4999 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5001 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5004 2017-06-19 Pedro Alves <palves@redhat.com>
5006 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5007 after gdb::unlinker.
5009 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5011 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5012 gdb_environ to access an environment variable.
5014 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5016 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5019 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5021 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5023 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5025 * configure: Re-generate.
5026 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5028 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5030 * configure: Re-generate.
5031 * warning.m4: Pass -Werror to compiler when checking for
5032 supported warning flags.
5034 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5036 * Makefile.in (COMPILE.pre): Add "-x c++".
5038 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5039 Pedro Alves <palves@redhat.com>
5040 Yao Qi <yao.qi@linaro.org>
5042 * defs.h (RequireLongest): New.
5043 (extract_integer): Declare function template.
5044 (extract_signed_integer): Remove the declaration, but define it
5046 (extract_unsigned_integer): Likewise.
5047 (store_integer): Declare function template.
5048 (store_signed_integer): Remove the declaration, but define it
5050 (store_unsigned_integer): Likewise.
5051 * findvar.c (extract_integer): New function template.
5052 (extract_signed_integer): Remove.
5053 (extract_unsigned_integer): Remove.
5054 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5056 (store_integer): New function template.
5057 (store_signed_integer): Remove.
5058 (store_unsigned_integer): Remove.
5059 (store_integer): Explicit instantiations.
5060 * regcache.c (regcache_raw_read_signed): Update.
5061 (regcache::raw_read): New function.
5062 (regcache::raw_read_signed): Remove.
5063 (regcache::raw_read_unsigned): Remove.
5064 (regcache_raw_read_unsigned): Update.
5065 (regcache_raw_write_unsigned): Update.
5066 (regcache::raw_write_signed): Remove.
5067 (regcache::raw_write): New function.
5068 (regcache_cooked_read_signed): Update.
5069 (regcache::raw_write_unsigned): Remove.
5070 (regcache::cooked_read_signed): Remove.
5071 (regcache_cooked_read_unsigned): Update.
5072 (regcache::cooked_read_unsigned): Remove.
5073 (regcache_cooked_write_signed): Update.
5074 (regcache_cooked_write_unsigned): Update.
5075 * regcache.h (regcache) <raw_read_signed>: Remove.
5076 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5077 <raw_read, raw_write>: New.
5078 <cooked_read_signed, cooked_write_signed>: Remove.
5079 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5080 <cooked_read, cooked_write>: New.
5081 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5082 (sh64_pseudo_register_write): Update.
5084 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5086 * arc-tdep.c (arc_disassembler_options): New variable.
5087 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5088 of default_print_insn.
5089 (arc_delayed_print_insn): Set info->section when needed,
5090 use default_print_insn to retrieve a disassembler.
5092 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5095 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5096 to mention $SHELL and startup-with-shell.
5098 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5100 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5102 2017-06-14 Yao Qi <yao.qi@linaro.org>
5104 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5105 default_print_insn instead of print_insn_aarch64.
5106 * arm-tdep.c (gdb_print_insn_arm): Call
5107 default_print_insn instead of print_insn_big_arm
5108 and print_insn_little_arm.
5109 * i386-tdep.c (i386_print_insn): Call default_print_insn
5110 instead of print_insn_i386.
5111 * ia64-tdep.c (ia64_print_insn): Call
5112 default_print_insn instead of print_insn_ia64.
5113 * mips-tdep.c (gdb_print_insn_mips): Call
5114 default_print_insn instead of print_insn_big_mips
5115 and print_insn_little_mips.
5116 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5117 instead of print_insn_spu.
5119 2017-06-14 Pedro Alves <palves@redhat.com>
5121 * ada-lang.c: Include "common/byte-vector.h".
5122 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5123 * charset.c (wchar_iterator::iterate): Resize the vector instead
5125 * common/byte-vector.h: Include "common/def-vector.h".
5126 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5127 * cli/cli-dump.c: Include "common/byte-vector.h".
5128 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5129 * common/byte-vector.h: New file.
5130 * common/def-vector.h: New file.
5131 * common/default-init-alloc.h: New file.
5132 * dwarf2loc.c: Include "common/byte-vector.h".
5133 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5134 instead of reserving it.
5135 * dwarf2read.c: Include "common/byte-vector.h".
5136 (data_buf::m_vec): Now a gdb::byte_vector.
5137 * gdb_regex.c: Include "common/def-vector.h".
5138 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5139 * mi/mi-main.c: Include "common/byte-vector.h".
5140 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5141 * printcmd.c: Include "common/byte-vector.h".
5142 (print_scalar_formatted): Use gdb::byte_vector.
5143 * valprint.c: Include "common/byte-vector.h".
5144 (maybe_negate_by_bytes, print_decimal_chars): Use
5147 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5149 * darwin-nat.c: Include "nat/fork-inferior.h".
5151 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5153 * configure.nat: Factor out Darwin bits that are not
5154 architecture-specific. Add fork-inferior.o.
5156 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5158 * configure.nat: Factor out AIX bits that are not
5159 architecture-specific. Add fork-inferior.o.
5161 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5163 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5164 (read_pieced_value, write_pieced_value): ...here. Reduce to
5165 wrappers that just call rw_pieced_value.
5167 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5169 * dwarf2loc.c (write_pieced_value): When writing the data for a
5170 memory piece, use write_memory_with_notification instead of
5173 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5175 * valops.c (read_value_memory): Change embedded_offset to
5176 represent a bit offset instead of a byte offset.
5177 * value.h (read_value_memory): Adjust comment.
5179 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5181 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5182 dest_offset_bits and source_offset_bits.
5183 (write_pieced_value): Likewise.
5185 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5187 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5188 given by DW_OP_bit_piece.
5189 (write_pieced_value): Likewise.
5191 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5193 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5194 some other preparations to the places where sufficient information
5196 (write_pieced_value): Likewise.
5198 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5200 * dwarf2loc.c (bits_to_bytes): New function.
5201 (read_pieced_value): Fix offset calculations for register pieces
5202 on big-endian targets.
5203 (write_pieced_value): Likewise.
5205 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5207 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5208 (write_pieced_value): Likewise.
5210 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5212 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5213 transfer the source value's least significant bits, instead of its
5214 lowest-addressed ones. Rename type_len to max_offset.
5215 (read_pieced_value): Mirror above changes to write_pieced_value as
5218 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5220 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5221 truncate full bytes from dest_offset_bits before using it as an
5222 offset into the buffer.
5224 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5226 * dwarf2loc.c (write_pieced_value): Include transfer size in
5229 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5231 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5232 calculation of this_size.
5234 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5236 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5237 when targeting a bit-field.
5238 (write_pieced_value): Likewise.
5240 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5242 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5243 (allocate_piece_closure): Drop addr_size parameter.
5244 (dwarf2_evaluate_loc_desc_full): Adjust call to
5245 allocate_piece_closure.
5247 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5250 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5251 the LSB end, independent of endianness.
5253 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5255 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5258 2017-06-13 Yao Qi <yao.qi@linaro.org>
5260 * mips-linux-nat.c: Move include features/mips*-linux.c to
5262 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5263 to mips-linux-tdep.c.
5264 * mips-linux-tdep.c: Include features/mips*-linux.c
5265 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5267 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5268 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5269 (tdesc_mips64_dsp_linux): Declare.
5271 2017-06-12 Tom Tromey <tom@tromey.com>
5273 * valprint.h (val_print_type_code_int): Remove.
5274 * valprint.c (generic_val_print_int): Always call
5275 val_print_scalar_formatted.
5276 (val_print_type_code_int): Remove.
5277 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5278 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5279 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5280 * ada-valprint.c (ada_val_print_num): Use
5281 val_print_scalar_formatted.
5283 2017-06-12 Tom Tromey <tom@tromey.com>
5285 * printcmd.c (print_scalar_formatted): Unify the two switches.
5286 Don't convert scalars to LONGEST.
5288 2017-06-12 Tom Tromey <tom@tromey.com>
5291 * valprint.h (print_decimal_chars): Update.
5292 * valprint.c (maybe_negate_by_bytes): New function.
5293 (print_decimal_chars): Add "is_signed" argument.
5294 * printcmd.c (print_scalar_formatted): Update.
5296 2017-06-12 Tom Tromey <tom@tromey.com>
5299 * valprint.h (print_binary_chars, print_hex_chars): Update.
5300 * valprint.c (val_print_type_code_int): Update.
5301 (print_binary_chars): Add "zero_pad" argument.
5302 (emit_octal_digit): New function.
5303 (print_octal_chars): Don't zero-pad.
5304 (print_decimal_chars): Likewise.
5305 (print_hex_chars): Add "zero_pad" argument.
5306 * sh64-tdep.c (sh64_do_fp_register): Update.
5307 * regcache.c (regcache::dump): Update.
5308 * printcmd.c (print_scalar_formatted): Update.
5309 * infcmd.c (default_print_one_register_info): Update.
5311 2017-06-12 Pedro Alves <palves@redhat.com>
5312 Alan Hayward <alan.hayward@arm.com>
5314 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5315 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5316 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5317 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5318 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5320 2017-06-12 Pedro Alves <palves@redhat.com>
5322 * dwarf2read.c (mapped_symtab::data): Now a vector of
5323 symtab_index_entry instead of vector of
5324 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5325 whether an element's name is NULL instead of checking whether the
5326 element itself is NULL.
5327 (find_slot): Change return type. Adjust.
5328 (hash_expand, , add_index_entry, uniquify_cu_indices)
5329 (write_hash_table): Adjust.
5331 2017-06-12 Pedro Alves <palves@redhat.com>
5333 * dwarf2read.c (recursively_count_psymbols): New function.
5334 (write_psymtabs_to_index): Call it to compute number of psyms and
5335 pass estimate size of psyms_seen to unordered_set's ctor.
5337 2017-06-12 Pedro Alves <palves@redhat.com>
5339 * dwarf2read.c (write_hash_table): Check if key already exists
5342 2017-06-12 Pedro Alves <palves@redhat.com>
5344 * dwarf2read.c (data_buf::append_space): Rename to...
5345 (data_buf::grow): ... this, and make private. Adjust all callers.
5346 (data_buf::append_uint): New method.
5347 (add_address_entry, write_one_signatured_type)
5348 (write_psymtabs_to_index): Use it.
5350 2017-06-12 Pedro Alves <palves@redhat.com>
5352 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5353 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5354 (data_buf::file_write): Call ::fwrite directly.
5356 2017-06-12 Pedro Alves <palves@redhat.com>
5358 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5361 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5363 Code cleanup: C++ify .gdb_index producer.
5364 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5365 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5366 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5367 (create_strtab, add_string): Remove.
5368 (file_write, data_buf): New.
5369 (struct symtab_index_entry): Use std::vector for cu_indices.
5370 (struct mapped_symtab): Use std::vector for data.
5371 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5372 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5374 (find_slot): Change return type. Update it to the new data structures.
5375 (hash_expand, add_index_entry): Update it to the new data structures.
5376 (offset_type_compare): Remove.
5377 (uniquify_cu_indices): Update it to the new data structures.
5378 (c_str_view, c_str_view_hasher, vector_hasher): New.
5379 (add_indices_to_cpool): Remove.
5380 (write_hash_table): Update it to the new data structures.
5381 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5382 (eq_psymtab_cu_index): Remove.
5383 (psym_index_map): New typedef.
5384 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5385 reference and std::unordered_map for cu_index_htab.
5386 (add_address_entry, add_address_entry_worker, write_address_map)
5387 (write_psymbols): Update it to the new data structures.
5388 (write_obstack): Remove.
5389 (struct signatured_type_index_data): Change types_list to a data_buf
5390 reference and psyms_seen to a std::unordered_set reference.
5391 (write_one_signatured_type, recursively_write_psymbols)
5392 (write_psymtabs_to_index): Update it to the new data structures.
5394 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5396 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5397 separate-debug-file commands.
5398 * symfile.h (separate_debug_file_debug): New global.
5399 * symfile.c (separate_debug_file_debug): New global.
5400 (separate_debug_file_exists, find_separate_debug_file): Add
5402 (_initialize_symfile): Add "set debug separate-debug-file"
5404 * build-id.c (build_id_to_debug_bfd,
5405 find_separate_debug_file_by_buildid): Add debug output.
5407 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5409 * gdbarch.sh (displaced_step_free_closure): Remove.
5410 * gdbarch.h, gdbarch.c: Re-generate.
5411 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5412 displaced_step_free_closure.
5413 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5414 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5415 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5416 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5417 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5418 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5419 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5420 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5421 * infrun.c (displaced_step_clear): Call xfree instead of
5422 gdbarch_displaced_step_free_closure.
5424 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5426 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5429 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5431 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5432 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5433 (mn10300_push_dummy_call): Likewise.
5435 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5437 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5439 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5441 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5443 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5445 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5446 able to start inferiors using a shell.
5447 (New remote packets): Announce new packet "QStartupWithShell".
5448 * remote.c: Add PACKET_QStartupWithShell.
5449 (extended_remote_create_inferior): Handle new
5450 PACKET_QStartupWithShell.
5451 (remote_protocol_features) <QStartupWithShell>: New entry for
5452 PACKET_QStartupWithShell.
5453 (_initialize_remote): Call "add_packet_config_cmd" for
5456 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5457 Pedro Alves <palves@redhat.com>
5459 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5460 and "nat/fork-inferior.h".
5461 * common/common-inferior.h: New file, with contents from
5463 * commom/common-utils.c: Include "common-utils.h".
5464 (stringify_argv): New function.
5465 * common/common-utils.h (stringify_argv): New prototype.
5466 * configure.nat: Add "fork-inferior.o" as a dependency for
5467 "*linux*", "fbsd*" and "nbsd*" hosts.
5468 * corefile.c (get_exec_file): Update comment.
5469 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5470 instead of "startup_inferior".
5471 (darwin_create_inferior): Call "add_thread_silent" after
5473 * fork-child.c: Cleanup unnecessary includes.
5474 (SHELL_FILE): Move to "common/common-fork-child.c".
5475 (environ): Likewise.
5476 (exec_wrapper): Initialize.
5477 (get_exec_wrapper): New function.
5478 (breakup_args): Move to "common/common-fork-child.c"; rename to
5479 "breakup_args_for_exec".
5480 (escape_bang_in_quoted_argument): Move to
5481 "common/common-fork-child.c".
5482 (saved_ui): New variable.
5483 (prefork_hook): New function.
5484 (postfork_hook): Likewise.
5485 (postfork_child_hook): Likewise.
5486 (gdb_startup_inferior): Likewise.
5487 (fork_inferior): Move to "common/common-fork-child.c". Update
5488 function to support gdbserver.
5489 (startup_inferior): Likewise.
5490 * gdbcore.h (get_exec_file): Remove declaration.
5491 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5492 instead of "startup_inferior". Call "add_thread_silent" after
5494 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5495 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5496 instead of "startup_inferior". Call "add_thread_silent" after
5498 * inferior.h: Include "common-inferior.h".
5499 (trace_start_error): Move to "common/common-utils.h".
5500 (trace_start_error_with_name): Likewise.
5501 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5502 (startup_inferior): Likewise.
5503 (gdb_startup_inferior): New prototype.
5504 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5505 * nat/fork-inferior.h: New file.
5506 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5507 instead of "startup_inferior". Call "add_thread_silent" after
5509 * target.h (target_terminal_init): Move prototype to
5511 (target_terminal_inferior): Likewise.
5512 (target_terminal_ours): Likewise.
5513 * target/target.h (target_terminal_init): New prototype, moved
5515 (target_terminal_inferior): Likewise.
5516 (target_terminal_ours): Likewise.
5517 * utils.c (gdb_flush_out_err): New function.
5519 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5521 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5522 * common/common-gdbthread.h: New file, with parts from
5524 * gdbthread.h: Include "common-gdbthread.h".
5525 (switch_to_thread): Moved to "common/common-gdbthread.h".
5527 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5529 * Makefile.in (SFILES): Add "common/job-control.c".
5530 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5531 (COMMON_OBS): Add "job-control.o".
5532 * common/job-control.c: New file, with contents from
5534 * common/job-control.h: New file, with contents from "terminal.h".
5535 * fork-child.c: Include "job-control.h".
5536 * inflow.c: Include "job-control.h".
5537 (gdb_setpgid): Move to "common/common-inflow.c".
5538 (_initialize_inflow): Move setting of "job_control" to
5539 "handle_job_control".
5540 * terminal.h (job_control): Moved to "common/common-terminal.h".
5541 (gdb_setpgid): Likewise.
5542 * top.c: Include "job_control.h".
5543 * utils.c: Likewise.
5544 (job_control): Moved to "job-control.c".
5546 2017-06-07 Pedro Alves <palves@redhat.com>
5548 * Makefile.in (SFILES): Add gdb_regex.c.
5549 (COMMON_OBS): Add gdb_regex.o.
5550 * ada-lang.c (ada_add_standard_exceptions)
5551 (ada_add_exceptions_from_frame, name_matches_regex)
5552 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5553 parameter type to compiled_regex. Adjust.
5554 (ada_exceptions_list): Use compiled_regex.
5555 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5556 std::unique_ptr<compiled_regex>.
5557 (exception_catchpoint::~exception_catchpoint): Remove regfree
5559 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5560 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5561 * breakpoint.c (solib_catchpoint::compiled): Now a
5562 std::unique_ptr<compiled_regex>.
5563 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5564 (check_status_catch_solib): Adjust to use compiled_regex.
5565 (add_solib_catchpoint): Adjust to use compiled_regex.
5566 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5567 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5568 compiled_regex reference. Adjust to use it.
5569 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5570 declaration. Include "gdb_regex.h".
5571 (apropos_cmd): Change regex parameter to compiled_regex reference.
5572 * gdb_regex.c: New file.
5573 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5575 (class compiled_regex): New.
5576 * linux-tdep.c: Include "common/gdb_optional.h".
5577 (struct mapping_regexes): New, factored out from
5578 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5579 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5580 gdb::optional and remove cleanups. Adjust to compiled_regex.
5581 * probe.c: Include "common/gdb_optional.h".
5582 (collect_probes): Use compiled_regex and gdb::optional and remove
5584 * skip.c: Include "common/gdb_optional.h".
5585 (skiplist_entry::compiled_function_regexp): Now a
5586 gdb::optional<compiled_regex>.
5587 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5588 (free_skiplist_entry): Remove regfree call.
5589 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5590 compiled_regex and gdb::optional.
5591 * symtab.c: Include "common/gdb_optional.h".
5592 (search_symbols): Use compiled_regex and gdb::optional.
5593 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5594 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5597 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5599 * regcache.c (regcache::save): Avoid buffer use.
5600 (regcache::dump): Likewise.
5602 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5604 * sh-tdep.c (sh_pseudo_register_read): Remove
5606 (sh_pseudo_register_write): Likewise.
5607 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5608 (sh64_pseudo_register_write): Likewise
5610 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5612 * aarch64-tdep.c (aarch64_store_return_value): Use
5614 (aarch64_pseudo_read_value): Likewise.
5615 (aarch64_pseudo_write): Likewise.
5617 2017-06-06 Yao Qi <yao.qi@linaro.org>
5619 * regformats/regdef.h (set_register_cache): Remove the
5622 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5624 * frame.c (frame_unwind_register_signed): Use
5625 frame_unwind_register_value.
5627 2017-06-06 Pedro Alves <palves@redhat.com>
5629 PR breakpoints/21553
5630 * breakpoint.c (create_breakpoints_sal_default)
5631 (init_breakpoint_sal, create_breakpoint_sal): Use
5632 gdb::unique_xmalloc_ptr for string parameters.
5633 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5634 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5635 (base_breakpoint_create_breakpoints_sal)
5636 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5637 (strace_marker_create_breakpoints_sal)
5638 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5640 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5641 gdb::unique_xmalloc_ptr for string parameters.
5642 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5645 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5647 * alpha-tdep.c (alpha_register_to_value): Use
5648 get_frame_register_value.
5649 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5651 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5653 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5654 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5655 (ia64_value_to_register): Likewise.
5656 (ia64_extract_return_value): Likewise.
5657 (ia64_store_return_value): Likewise.
5658 (ia64_push_dummy_call): Likewise.
5660 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5664 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5666 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5668 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5670 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5672 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5674 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5676 * event-loop.c (poll_timers): Unallocate timer using delete
5679 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5681 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5682 (struct breakpoint) <~breakpoint>: New.
5683 (struct watchpoint): Inherit from breakpoint.
5686 (struct tracepoint): Inherit from breakpoint.
5688 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5689 (struct longjmp_breakpoint): Inherit from breakpoint.
5690 <~longjmp_breakpoint>: New.
5692 (new_breakpoint_from_type): Remove casts.
5693 (watchpoint_in_thread_scope): Remove reference to base field.
5694 (watchpoint_del_at_next_stop): Likewise.
5695 (update_watchpoint): Likewise.
5696 (watchpoint_check): Likewise.
5697 (bpstat_check_watchpoint): Likewise.
5698 (set_longjmp_breakpoint): Likewise.
5699 (struct fork_catchpoint): Inherit from breakpoint.
5701 (struct solib_catchpoint): Inherit from breakpoint.
5702 <~solib_catchpoint>: New.
5704 (dtor_catch_solib): Change to ...
5705 (solib_catchpoint::~solib_catchpoint): ... this.
5706 (breakpoint_hit_catch_solib): Remove reference to base field.
5707 (add_solib_catchpoint): Likewise.
5708 (create_fork_vfork_event_catchpoint): Likewise.
5709 (struct exec_catchpoint): Inherit from breakpoint.
5710 <~exec_catchpoint>: New.
5712 (dtor_catch_exec): Change to ...
5713 (exec_catchpoint::~exec_catchpoint): ... this.
5714 (dtor_watchpoint): Change to ...
5715 (watchpoint::~watchpoint): ... this.
5716 (watch_command_1): Remove reference to base field.
5717 (catch_exec_command_1): Likewise.
5718 (base_breakpoint_dtor): Change to ...
5719 (breakpoint::~breakpoint): ... this.
5720 (base_breakpoint_ops): Remove dtor field value.
5721 (longjmp_bkpt_dtor): Change to ...
5722 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5723 (strace_marker_create_breakpoints_sal): Remove reference to base
5725 (delete_breakpoint): Don't manually call breakpoint destructor.
5726 (create_tracepoint_from_upload): Remove reference to base field.
5727 (trace_pass_set_count): Likewise.
5728 (initialize_breakpoint_ops): Don't initialize
5729 momentary_breakpoint_ops, don't set dtors.
5730 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5731 <~ada_catchpoint>: New.
5733 (create_excep_cond_exprs): Remove reference to base field.
5734 (dtor_exception): Change to ...
5735 (ada_catchpoint::~ada_catchpoint): ... this.
5736 (dtor_catch_exception): Remove.
5737 (dtor_catch_exception_unhandled): Remove.
5738 (dtor_catch_assert): Remove.
5739 (create_ada_exception_catchpoint): Remove reference to base
5741 (initialize_ada_catchpoint_ops): Don't set dtors.
5742 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5744 <~signal_catchpoint>: New.
5746 (signal_catchpoint_dtor): Change to ...
5747 (signal_catchpoint::~signal_catchpoint): ... this.
5748 (create_signal_catchpoint): Remove reference to base field.
5749 (initialize_signal_catchpoint_ops): Don't set dtor.
5750 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5752 <~syscall_catchpoint>: New.
5754 (dtor_catch_syscall): Change to ...
5755 (syscall_catchpoint::~syscall_catchpoint): ... this.
5756 (create_syscall_event_catchpoint): Remove reference to base
5758 (initialize_syscall_catchpoint_ops): Don't set dtor.
5759 * break-catch-throw.c (struct exception_catchpoint): Inherit
5761 <~exception_catchpoint>: New.
5763 (dtor_exception_catchpoint): Change to ...
5764 (exception_catchpoint::~exception_catchpoint): ... this.
5765 (handle_gnu_v3_exceptions): Remove reference to base field.
5766 (initialize_throw_catchpoint_ops): Don't set dtor.
5767 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5769 * remote.c (remote_get_tracepoint_status): Likewise.
5770 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5771 * tracefile.c (tracefile_fetch_registers): Likewise.
5772 * tracepoint.c (actions_command): Likewise.
5773 (validate_actionline): Likewise.
5774 (tfind_1): Likewise.
5775 (get_traceframe_location): Likewise.
5776 (find_matching_tracepoint_location): Likewise.
5777 (parse_tracepoint_status): Likewise.
5778 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5780 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5782 * breakpoint.c (struct longjmp_breakpoint): New struct.
5783 (is_tracepoint_type): Change return type to bool.
5784 (is_longjmp_type): New function.
5785 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5786 (set_raw_breakpoint_without_location): Use
5787 new_breakpoint_from_type.
5788 (set_raw_breakpoint): Likewise.
5790 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5792 * breakpoint.c (new_breakpoint_from_type): New function.
5793 (create_breakpoint_sal): Use new_breakpoint_from_type and
5795 (create_breakpoint): Likewise.
5797 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5799 * memattr.c (mem_info_command): Rename to ...
5800 (info_mem_command): ... this.
5801 (mem_enable_command): Rename to ...
5802 (enable_mem_command): ... this.
5803 (mem_disable_command): Rename to ...
5804 (disable_mem_command): ... this.
5805 (mem_delete_command): Rename to ...
5806 (delete_mem_command): ... this.
5807 (_initialize_mem): Adjust function names.
5809 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5811 * btrace.c (handle_pt_insn_events): New.
5812 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5813 STATUS. Split into this and ...
5814 (handle_pt_insn_event_flags): ... this.
5816 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5818 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5819 and struct pt_insn.resynced.
5820 * configure: Regenerated.
5821 * config.in: Regenerated.
5823 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5825 * btrace.c (ftrace_find_call_by_number): New function.
5826 (ftrace_new_function): Store objects, not pointers.
5827 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5828 ftrace_new_gap, ftrace_update_function,
5829 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5830 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5831 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5832 btrace_ends_with_single_insn, btrace_call_get): Account for
5833 btrace_thread_info::functions now storing objects.
5834 * btrace.h (struct btrace_thread_info): Add constructor.
5835 (struct btrace_thread_info) <functions>: Make std::vector.
5836 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5837 Initialize with default values.
5838 * record-btrace.c (record_btrace_frame_sniffer): Account for
5839 btrace_thread_info::functions now storing objects.
5841 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5843 * btrace.c: Remove typedef bfun_s.
5844 (ftrace_new_gap): Directly add gaps to the list of gaps.
5845 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5846 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5847 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5850 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5852 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5853 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5854 with btrace_thread_info::next_segment and
5855 btrace_thread_info::prev_segment.
5856 * btrace.h: Remove struct btrace_func_link.
5857 (struct btrace_function): Replace pair of function segment pointers
5858 with pair of indices.
5859 * python/py-record-btrace.c (btpy_call_prev_sibling,
5860 btpy_call_next_sibling): Replace references to
5861 btrace_thread_info::segment with btrace_thread_info::next_segment and
5862 btrace_thread_info::prev_segment.
5863 * record-btrace.c (record_btrace_frame_this_id): Use
5864 btrace_find_call_by_number.
5866 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5868 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5869 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5870 btrace_insn_next, btrace_insn_prev): Remove references to
5871 btrace_thread_info::flow.
5872 * btrace.h (struct btrace_function): Remove FLOW.
5874 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5876 * btrace.c (ftrace_find_call_by_number): New function.
5877 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5878 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5879 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5880 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5882 * btrace.h (struct btrace_function): Turn UP into an index.
5883 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5885 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5886 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5887 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5889 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5891 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5892 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5893 ftrace_update_function, ftrace_compute_global_level_offset,
5894 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5895 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5896 btrace_insn_end, btrace_is_empty): Remove references to
5897 btrace_thread_info::begin and btrace_thread_info::end.
5898 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5899 (struct btrace_thread_info) <functions>: Adjust comment.
5900 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5901 btrace_thread_info::begin.
5903 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5905 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5906 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5907 ftrace_update_function): Remove arguments that implicitly were always
5909 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5910 Don't pass BTINFO->END.
5912 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5914 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5915 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5916 btrace_find_insn_by_number): Replace function segment pointer with
5918 (btrace_insn_cmp): Simplify.
5919 * btrace.h: (struct btrace_insn_iterator) Rename index to
5920 insn_index. Replace function segment pointer with index into function
5922 * record-btrace.c (record_btrace_call_history): Replace function
5923 segment pointer use with index.
5924 (record_btrace_frame_sniffer): Retrieve function call segment through
5926 (record_btrace_set_replay): Remove defunc't safety check.
5928 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5930 * btrace.c (btrace_ends_with_single_insn): New function.
5931 (btrace_call_get, btrace_call_number, btrace_call_begin,
5932 btrace_call_end, btrace_call_next, btrace_call_prev,
5933 btrace_find_call_by_number): Use index into call segment vector
5935 (btrace_call_cmp): Simplify.
5936 * btrace.h (struct btrace_call_iterator): Replace function call segment
5937 pointer with index into vector.
5938 * record-btrace.c (record_btrace_call_history): Use index instead of
5941 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5943 * btrace.c (btrace_insn_begin, btrace_insn_end,
5944 btrace_find_insn_by_number): Add btinfo to iterator.
5945 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5947 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5949 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5950 and save pointers directly.
5951 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5952 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5953 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5954 changed signature of functions.
5955 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5956 (btrace_fetch): Remove code that adds btrace_function pointers to
5957 vector of btrace_functions.
5958 (btrace_clear): Simplify freeing vector of btrace_functions.
5960 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5962 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5963 Replace VEC_* with std::vector functions.
5964 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5965 (struct btrace_thread_info)<functions>: Change type to std::vector.
5967 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5969 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5970 "Removed targets and native configurations" up. Merge duplicate
5971 "New commands" sub-sections. Add "New options" sub-sections.
5973 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5975 * defs.h (copy_integer_to_size): New declaration.
5976 * findvar.c (copy_integer_to_size): New function.
5977 (do_cint_test): New selftest function.
5978 (copy_integer_to_size_test): Likewise.
5979 (_initialize_findvar): Likewise.
5980 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5981 (mips_fbsd_collect_reg): Use raw_collect_integer.
5982 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5983 (mips64_fill_gregset): Use raw_collect_integer
5984 (mips64_fill_fpregset): Use raw_supply_integer.
5985 * regcache.c (regcache::raw_supply_integer): New function.
5986 (regcache::raw_collect_integer): Likewise.
5987 * regcache.h: (regcache::raw_supply_integer): New declaration.
5988 (regcache::raw_collect_integer): Likewise.
5990 2017-05-24 Yao Qi <yao.qi@linaro.org>
5992 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5993 (COMMON_OBS): Add gdbarch-selftests.o.
5994 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5995 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5996 * gdbarch-selftests.c: New file.
5997 * regcache.h (regcache) <~regcache>: Mark it virtual if
5999 <raw_write>: Likewise.
6001 2017-05-24 Yao Qi <yao.qi@linaro.org>
6003 * regcache.c (current_regcache): Change it to
6004 regcache::current_regcache.
6005 (regcache_observer_target_changed): Update.
6006 (regcache_thread_ptid_changed): Make it a regcache static
6008 (regcache_thread_ptid_changed): Update.
6009 (class regcache_access): New.
6010 (current_regcache_test): Update.
6011 (_initialize_regcache): Update.
6012 * regcache.h: Include forward_list.
6013 (regcache): Declare regcache_thread_ptid_changed and declare
6014 registers_changed_ptid as friend.
6016 2017-05-24 Yao Qi <yao.qi@linaro.org>
6018 * i387-tdep.c (i387_register_to_value): Use register_size
6019 instead of TYPE_LENGTH.
6020 * m68k-tdep.c (m68k_register_to_value): Likewise.
6022 2017-05-24 Yao Qi <yao.qi@linaro.org>
6024 * i387-tdep.c (i387_convert_register_p): Return false if type
6025 code isn't TYPE_CODE_FLT.
6027 2017-05-24 Yao Qi <yao.qi@linaro.org>
6029 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6031 (alpha_register_to_value): Remove type length check.
6032 (alpha_value_to_register): Likewise.
6034 2017-05-24 Yao Qi <yao.qi@linaro.org>
6036 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6039 2017-05-24 Yao Qi <yao.qi@linaro.org>
6041 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6042 TYPE_CODE_FLT or not.
6044 2017-05-24 Yao Qi <yao.qi@linaro.org>
6046 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6047 * avr-tdep.c (avr_gdbarch_init): Likewise.
6048 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6049 * cris-tdep.c (cris_gdbarch_init): Likewise.
6050 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6051 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6052 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6053 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6054 * mep-tdep.c (mep_gdbarch_init): Likewise.
6055 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6056 * mips-tdep.c (mips_gdbarch_init): Likewise.
6057 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6058 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6059 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6060 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6061 * v850-tdep.c (v850_gdbarch_init): Likewise.
6063 2017-05-24 Yao Qi <yao.qi@linaro.org>
6065 * selftest-arch.c (tests_with_arch): Call registers_changed
6066 and reinit_frame_cache.
6067 * selftest.c (run_self_tests): Likewise.
6069 2017-05-24 Yao Qi <yao.qi@linaro.org>
6071 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6072 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6074 2017-05-24 Yao Qi <yao.qi@linaro.org>
6076 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6077 set_gdbarch_print_insn.
6079 2017-05-24 Yao Qi <yao.qi@linaro.org>
6081 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6082 set_gdbarch_print_insn.
6084 2017-05-24 Yao Qi <yao.qi@linaro.org>
6086 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6087 set_gdbarch_print_insn.
6088 * arc-tdep.c (arc_gdbarch_init): Likewise.
6089 * arch-utils.c: include dis-asm.h.
6090 (default_print_insn): New function.
6091 * arch-utils.h (default_print_insn): Declare.
6092 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6093 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6094 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6095 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6096 * frv-tdep.c (frv_gdbarch_init): Likewise.
6097 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6098 * gdbarch.sh (print_insn): Use default_print_insn.
6099 * gdbarch.c: Regenerated.
6100 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6101 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6102 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6103 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6104 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6105 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6106 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6107 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6108 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6109 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6110 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6111 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6112 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6113 * mt-tdep.c (mt_gdbarch_init): Likewise.
6114 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6115 * nios2-tdep.c (nios2_print_insn): Remove.
6116 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6117 * rx-tdep.c (rx_gdbarch_init): Likewise.
6118 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6119 * score-tdep.c (score_print_insn): Remove.
6120 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6121 * sh-tdep.c (sh_gdbarch_init): Likewise.
6122 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6123 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6124 * tic6x-tdep.c (tic6x_print_insn): Remove.
6125 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6126 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6127 * v850-tdep.c (v850_gdbarch_init): Likewise.
6128 * vax-tdep.c (vax_gdbarch_init): Likewise.
6129 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6130 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6132 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6134 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6135 (MIPS_FP0_REGNUM): Remove.
6136 (MIPS_FSR_REGNUM): Remove.
6137 (mips_fbsd_supply_fpregs): Use mips_regnum.
6138 (mips_fbsd_supply_gregs): Likewise.
6139 (mips_fbsd_collect_fpregs): Likewise.
6140 (mips_fbsd_collect_gregs): Likewise.
6142 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6144 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6145 (getpfpregs_supplies): New function.
6146 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6148 (mips_fbsd_store_inferior_registers): Likewise.
6150 2017-05-22 Pedro Alves <palves@redhat.com>
6152 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6155 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6157 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6158 (store_register): Likewise.
6159 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6160 (get_decimal_float_return_value): Likewise.
6161 (do_ppc_sysv_return_value): Likewise.
6162 (ppc64_sysv_abi_push_integer): Likewise.
6163 (ppc64_sysv_abi_push_freg): Likewise.
6164 (ppc64_sysv_abi_return_value_base): Likewise.
6165 (ppc64_sysv_abi_return_value): Likewise.
6166 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6167 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6168 * rs6000-nat.c: Likewise.
6169 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6170 (rs6000_value_to_register): Likewise.
6171 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6173 2017-05-21 Tom Tromey <tom@tromey.com>
6176 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6177 arrays as "[T]", not "[T; ]".
6179 2017-05-19 Tom Tromey <tom@tromey.com>
6182 * rust-lang.c (exp_descriptor_rust): New function.
6183 (rust_language_defn): Use it.
6184 * p-lang.c (pascal_language_defn): Update.
6185 * opencl-lang.c (opencl_language_defn): Update.
6186 * objc-lang.c (objc_language_defn): Update.
6187 * m2-lang.c (m2_language_defn): Update.
6188 * language.h (struct language_defn)
6189 <la_watch_location_expression>: New member.
6190 * language.c (unknown_language_defn, auto_language_defn)
6191 (local_language_defn): Update.
6192 * go-lang.c (go_language_defn): Update.
6193 * f-lang.c (f_language_defn): Update.
6194 * d-lang.c (d_language_defn): Update.
6195 * c-lang.h (c_watch_location_expression): Declare.
6196 * c-lang.c (c_watch_location_expression): New function.
6197 (c_language_defn, cplus_language_defn, asm_language_defn)
6198 (minimal_language_defn): Use it.
6199 * breakpoint.c (watch_command_1): Call
6200 la_watch_location_expression.
6201 * ada-lang.c (ada_language_defn): Update.
6203 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6206 * gdb_curses.h (NOMACROS): Define.
6207 (NCURSES_NOMACROS): Define.
6209 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6212 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6214 * tui/tui-wingeneral.c (box_win): Likewise.
6215 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6216 (tui_show_source_line): Likewise.
6217 (tui_show_exec_info_content): Likewise.
6219 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6221 * sparc-tdep.c (sparc_structure_return_p)
6222 (sparc_arg_on_registers_p): New functions.
6223 (sparc32_store_arguments): Use them.
6224 * sparc64-tdep.c (sparc64_16_byte_align_p)
6225 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6226 Handle TYPE_CODE_ARRAY.
6228 2017-05-17 Yao Qi <yao.qi@linaro.org>
6230 * cli/cli-decode.c (add_alias_cmd): New function.
6231 * command.h (add_alias_cmd): Declare.
6232 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6233 instead call add_alias_cmd.
6235 2017-05-17 Pedro Alves <palves@redhat.com>
6237 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6238 (nat_makefile_frag): ... this. All references updated.
6239 * configure.ac: Likewise.
6240 * configure.nat: Likewise. Enhance comments.
6241 * configure: Regenerate.
6243 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6245 * procfs.c (procfs_create_inferior): Change prototype to match
6248 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6250 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6251 C++ compiler warning.
6253 2017-05-12 Tom Tromey <tom@tromey.com>
6256 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6257 recurse, just call value_struct_elt directly.
6259 2017-05-12 Tom Tromey <tom@tromey.com>
6261 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6262 OP_RUST_ARRAY>: Fix.
6264 2017-05-12 Tom Tromey <tom@tromey.com>
6266 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6268 2017-05-09 Yao Qi <yao.qi@linaro.org>
6270 * regcache.c: Include <forward_list>.
6271 (struct regcache_list): Remove.
6272 (current_regcache): Update.
6273 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6274 (regcache_thread_ptid_changed): Likewise.
6275 (registers_changed_ptid): Likewise.
6276 (current_regcache_size): Likewise.
6278 2017-05-09 Yao Qi <yao.qi@linaro.org>
6280 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6281 (current_regcache_size): New function.
6282 (current_regcache_test): New function.
6283 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6285 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6287 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6288 (print_gp_register_row): Use get_frame_register_value.
6290 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6292 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6293 (mips_supply_fpregset): Likewise.
6294 (mips64_supply_gregset): Likewise.
6296 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6298 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6299 regcache->raw_supply_zeroed.
6301 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6303 * configure.nat: Rearrange 'case' statements to match
6306 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6308 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6309 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6310 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6311 "@nat_extra_makefile_frag@".
6312 (Makefile): Remove dependency on "@frags@".
6313 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6314 (data-directory/Makefile): Likewise.
6315 * config/aarch64/linux.mh: Deleted; moved contents to
6316 "gdb/configure.nat".
6317 * config/alpha/alpha-linux.mh: Likewise.
6318 * config/alpha/nbsd.mh: Likewise.
6319 * config/arm/linux.mh: Likewise.
6320 * config/arm/nbsdelf.mh: Likewise.
6321 * config/i386/cygwin.mh: Likewise.
6322 * config/i386/cygwin64.mh: Likewise.
6323 * config/i386/darwin.mh: Likewise.
6324 * config/i386/fbsd.mh: Likewise.
6325 * config/i386/fbsd64.mh: Likewise.
6326 * config/i386/go32.mh: Likewise.
6327 * config/i386/i386gnu.mh: Likewise.
6328 * config/i386/i386sol2.mh: Likewise.
6329 * config/i386/linux.mh: Likewise.
6330 * config/i386/linux64.mh: Likewise.
6331 * config/i386/mingw.mh: Likewise.
6332 * config/i386/mingw64.mh: Likewise.
6333 * config/i386/nbsd64.mh: Likewise.
6334 * config/i386/nbsdelf.mh: Likewise.
6335 * config/i386/nto.mh: Likewise.
6336 * config/i386/obsd.mh: Likewise.
6337 * config/i386/obsd64.mh: Likewise.
6338 * config/i386/sol2-64.mh: Likewise.
6339 * config/ia64/linux.mh: Likewise.
6340 * config/m32r/linux.mh: Likewise.
6341 * config/m68k/linux.mh: Likewise.
6342 * config/m68k/nbsdelf.mh: Likewise.
6343 * config/m68k/obsd.mh: Likewise.
6344 * config/m88k/obsd.mh: Likewise.
6345 * config/mips/fbsd.mh: Likewise.
6346 * config/mips/linux.mh: Likewise.
6347 * config/mips/nbsd.mh: Likewise.
6348 * config/mips/obsd64.mh: Likewise.
6349 * config/pa/linux.mh: Likewise.
6350 * config/pa/nbsd.mh: Likewise.
6351 * config/pa/obsd.mh: Likewise.
6352 * config/powerpc/aix.mh: Likewise.
6353 * config/powerpc/fbsd.mh: Likewise.
6354 * config/powerpc/linux.mh: Likewise.
6355 * config/powerpc/nbsd.mh: Likewise.
6356 * config/powerpc/obsd.mh: Likewise.
6357 * config/powerpc/ppc64-linux.mh: Likewise.
6358 * config/powerpc/spu-linux.mh: Likewise.
6359 * config/s390/linux.mh: Likewise.
6360 * config/sh/nbsd.mh: Likewise.
6361 * config/sparc/fbsd.mh: Likewise.
6362 * config/sparc/linux.mh: Likewise.
6363 * config/sparc/linux64.mh: Likewise.
6364 * config/sparc/nbsd64.mh: Likewise.
6365 * config/sparc/nbsdelf.mh: Likewise.
6366 * config/sparc/obsd64.mh: Likewise.
6367 * config/sparc/sol2.mh: Likewise.
6368 * config/tilegx/linux.mh: Likewise.
6369 * config/vax/nbsdelf.mh: Likewise.
6370 * config/vax/obsd.mh: Likewise.
6371 * config/xtensa/linux.mh: Likewise.
6372 * config/i386/i386gnu.mn: New file, with excerpts from
6373 "config/i386/i386gnu.mh".
6374 * configure: Regenerate.
6375 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6376 *.mh files under "gdb/config".
6377 * configure.nat: New file, with contents from the
6378 "gdb/config/*/*.mh" files.
6380 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6382 * btrace.c (btrace_clear): Free insn vector.
6384 2017-05-05 Pedro Alves <palves@redhat.com>
6386 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6387 * configure: Regenerate.
6389 2017-05-04 Pedro Alves <palves@redhat.com>
6391 * Makefile.in (SFILES): Add progspace-and-thread.c.
6392 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6393 (COMMON_OBS): Add progspace-and-thread.o.
6394 * breakpoint.c: Include "progspace-and-thread.h".
6395 (update_inserted_breakpoint_locations)
6396 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6397 Use scoped_restore_current_pspace_and_thread.
6398 (create_std_terminate_master_breakpoint): Use
6399 scoped_restore_current_program_space.
6400 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6401 (print_breakpoint_location): Use
6402 scoped_restore_current_program_space.
6403 (bp_loc_is_permanent): Use
6404 scoped_restore_current_pspace_and_thread.
6405 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6406 (download_tracepoint_locations): Use
6407 scoped_restore_current_pspace_and_thread.
6408 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6409 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6410 (enum step_over_calls_kind): Moved from inferior.h.
6411 (class scoped_restore_current_thread): New class.
6412 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6414 (scoped_restore_current_thread): New class.
6415 * infcmd.c: Include "common/gdb_optional.h".
6416 (continue_1, proceed_after_attach): Use
6417 scoped_restore_current_thread.
6418 (notice_new_inferior): Use scoped_restore_current_thread.
6419 * inferior.c: Include "progspace-and-thread.h".
6420 (restore_inferior, save_current_inferior): Delete.
6421 (add_inferior_command, clone_inferior_command): Use
6422 scoped_restore_current_pspace_and_thread.
6423 * inferior.h (scoped_restore_current_inferior): New class.
6424 * infrun.c: Include "progspace-and-thread.h" and
6425 "common/gdb_optional.h".
6426 (follow_fork_inferior): Use
6427 scoped_restore_current_pspace_and_thread.
6428 (scoped_restore_exited_inferior): New class.
6429 (handle_vfork_child_exec_or_exit): Use
6430 scoped_restore_exited_inferior,
6431 scoped_restore_current_pspace_and_thread,
6432 scoped_restore_current_thread and scoped_restore.
6433 (fetch_inferior_event): Use scoped_restore_current_thread.
6434 * linespec.c (decode_line_full, decode_line_1): Use
6435 scoped_restore_current_program_space.
6436 * mi/mi-main.c: Include "progspace-and-thread.h".
6437 (exec_continue): Use scoped_restore_current_thread.
6438 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6439 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6440 * proc-service.c (ps_pglobal_lookup): Use
6441 scoped_restore_current_program_space.
6442 * progspace-and-thread.c: New file.
6443 * progspace-and-thread.h: New file.
6444 * progspace.c (release_program_space, clone_program_space): Use
6445 scoped_restore_current_program_space.
6446 (restore_program_space, save_current_program_space)
6447 (save_current_space_and_thread): Delete.
6448 (switch_to_program_space_and_thread): Moved to
6449 progspace-and-thread.c.
6450 * progspace.h (save_current_program_space)
6451 (save_current_space_and_thread): Delete declarations.
6452 (scoped_restore_current_program_space): New class.
6453 * remote.c (remote_btrace_maybe_reopen): Use
6454 scoped_restore_current_thread.
6455 * symtab.c: Include "progspace-and-thread.h".
6456 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6457 * thread.c (print_thread_info_1): Use
6458 scoped_restore_current_thread.
6459 (struct current_thread_cleanup): Delete.
6460 (do_restore_current_thread_cleanup)
6461 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6462 (scoped_restore_current_thread::~scoped_restore_current_thread):
6464 (make_cleanup_restore_current_thread): Rename/convert to ...
6465 (scoped_restore_current_thread::scoped_restore_current_thread):
6467 (thread_apply_all_command): Use scoped_restore_current_thread.
6468 (thread_apply_command): Use scoped_restore_current_thread.
6469 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6470 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6472 2017-05-04 Pedro Alves <palves@redhat.com>
6474 * thread.c (make_cleanup_restore_current_thread): Move
6475 find_thread_ptid call before the is_stopped call. Assert that the
6476 thread is found. Replace is_stopped call by checking the thread's
6477 state directly. Remove unnecessary NULL-thread check.
6479 2017-05-04 Pedro Alves <palves@redhat.com>
6481 * corelow.c (thread_section_name): New class.
6482 (get_core_register_section, get_core_siginfo): Use it.
6484 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6486 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6487 (get_core_register_section): Remove xfree of NULL pointer.
6489 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6491 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6492 * regcache.c (regcache::raw_supply_zeroed): New function.
6493 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6495 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6497 * gdbarch.sh: Remove commented out definition of
6499 * gdbarch.h: Re-generate.
6501 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6503 * configure: Regenerate.
6505 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6507 * solib-target.c (solib_target_relocate_section_addresses):
6508 Remove num_section_bases, num_bases, segment_bases variables.
6510 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6512 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6514 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6516 * solib-target.c: Include <vector>
6517 (struct lm_info_target) <~lm_info_target>: Remove.
6518 <segment_bases, section_bases>: Change type to
6519 std::vector<CORE_ADDR>.
6520 (library_list_start_segment, library_list_start_section,
6521 library_list_end_library,
6522 solib_target_relocate_section_addresses): Adjust.
6524 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6526 * gdbarch.sh (software_single_step): Change return type to
6527 std::vector<CORE_ADDR>.
6528 * gdbarch.c, gdbarch.h: Re-generate.
6529 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6531 (arm_deal_with_atomic_sequence_raw): Adjust.
6532 (thumb_get_next_pcs_raw): Adjust.
6533 (arm_get_next_pcs_raw): Adjust.
6534 (arm_get_next_pcs): Adjust.
6535 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6536 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6537 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6538 (alpha_software_single_step): Adjust.
6539 * alpha-tdep.h (alpha_software_single_step): Adjust.
6540 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6541 * arm-tdep.c (arm_software_single_step): Adjust.
6542 (arm_breakpoint_kind_from_current_state): Adjust.
6543 * arm-tdep.h (arm_software_single_step): Adjust.
6544 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6545 * cris-tdep.c (cris_software_single_step): Adjust.
6546 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6547 (micromips_deal_with_atomic_sequence): Adjust.
6548 (deal_with_atomic_sequence): Adjust.
6549 (mips_software_single_step): Adjust.
6550 * mips-tdep.h (mips_software_single_step): Adjust.
6551 * moxie-tdep.c (moxie_software_single_step): Adjust.
6552 * nios2-tdep.c (nios2_software_single_step): Adjust.
6553 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6554 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6555 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6556 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6557 * sparc-tdep.c (sparc_software_single_step): Adjust.
6558 * spu-tdep.c (spu_software_single_step): Adjust.
6559 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6561 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6563 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6564 * gdbarch.h: Re-generate.
6566 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6568 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6569 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6570 * python/py-instruction.c, python/py-instruction.h: New file.
6571 * python/py-record.c: Add py-instruction.h include.
6572 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6573 gdb.RecordInstruction.
6574 * python/python-internal.h: Add gdbpy_initialize_instruction
6576 * python/python.c (do_start_initialization): Add
6577 gdbpy_initialize_instruction.
6579 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6581 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6583 (btrace_func_from_recpy_func): New function.
6584 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6585 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6586 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6587 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6588 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6589 Also, use new helper functions.
6590 (btpy_list_item): Use new helper functions.
6591 (recpy_bt_function_call_history): Use new type name.
6592 (btpy_call_getset): Remove.
6593 (gdbpy_initialize_btrace): Remove code to initialize
6594 gdb.BtraceFunctionCall.
6595 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6596 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6597 recpy_bt_func_prev, recpy_bt_func_next): New export.
6598 * python/py-record.c (recpy_func_type): New static object.
6599 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6600 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6601 recpy_func_next): New function.
6602 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6603 (recpy_func_getset): New static object.
6604 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6605 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6607 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6609 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6610 (btpy_object, btpy_insn_type, btpy_new): Remove.
6611 (btpy_list_object): Use gdb.RecordInstruction type instead of
6612 gdb.BtraceInstruction type.
6613 (btrace_insn_from_recpy_insn): New function.
6614 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6616 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6617 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6618 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6619 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6620 instead of btpy_object.
6621 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6622 btpy_insn_data, btpy_insn_decode): Rename to ...
6623 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6624 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6625 recpy_bt_insn_decode): This. Also, use new helper functions.
6626 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6628 (btpy_insn_getset): Remove.
6629 (gdbpy_initialize_btrace): Remove code to initialize
6630 gdb.BtraceInstruction. Use recpy_element_object.
6631 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6632 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6633 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6634 * python/py-record.c (recpy_insn_type): New static object.
6635 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6636 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6637 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6639 (recpy_insn_getset): New static object.
6640 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6641 * python/py-record.h (recpy_element_object): New typedef.
6642 (recpy_insn_type, recpy_insn_new): New export.
6644 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6646 * py-record-btrace.c (btpy_insn_new): Removed.
6647 (btpy_insn_or_gap_new): New function.
6648 (btpy_insn_error): Removed.
6649 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6650 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6651 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6652 btpy_insn_or_gap_new instead of btpy_insn_new.
6653 (btpy_insn_getset): Remove btpy_insn_error.
6654 * py-record.c (recpy_gap_type): New static object.
6655 (recpy_gap_object): New typedef.
6656 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6657 recpy_gap_reason_string): New function.
6658 (recpy_gap_getset): New static object.
6659 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6660 * py-record.h (recpy_gap_new): New export.
6662 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6664 * python/py-record.c (recpy_ptid): Remove.
6665 (recpy_record_getset): Remove recpy_ptid.
6667 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6669 * btrace.c (btrace_fetch): Set inferior_ptid.
6670 * python/py-record-btrace.c: Add "py-record.h" include.
6671 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6672 recpy_bt_end, recpy_bt_instruction_history,
6673 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6674 in gdb.Record object instead of current ptid.
6675 * python/py-record.c: Include new "py-record.h" file.
6676 (recpy_record_object): Moved to py-record.h.
6677 * python/py-record.h: New file.
6679 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6681 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6682 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6685 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6687 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6688 the past maintainers section.
6690 2017-04-28 Yao Qi <yao.qi@linaro.org>
6692 * infcmd.c (get_return_value): Use regcache ctor, and remove
6695 2017-04-28 Yao Qi <yao.qi@linaro.org>
6696 Pedro Alves <palves@redhat.com>
6698 * regcache.c (regcache::regcache): New tag dispatch ctor.
6699 (do_cooked_read): Moved above.
6700 (regcache_dup): Use the tag dispatch ctor..
6701 * regcache.h (regcache): Declare ctor, delete copy ctor and
6702 assignment operator, remove friend regcache_dup.
6704 2017-04-28 Yao Qi <yao.qi@linaro.org>
6706 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6707 call method save instead of regcache_cpy.
6708 * regcache.h (struct regcache): Make regcache_dup a friend.
6710 2017-04-28 Yao Qi <yao.qi@linaro.org>
6712 * regcache.c (struct regcache): Move to regcache.h
6713 (regcache::arch): New method.
6714 (regcache_get_ptid): Update.
6715 (get_regcache_arch): Call arch method.
6716 (get_regcache_aspace): Call method aspace.
6717 (register_buffer): Change it to method.
6718 (regcache_save): Change it to regcache::save.
6719 (regcache_restore): Likewise.
6720 (regcache_cpy_no_passthrough): Remove the declaration.
6721 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6722 (regcache_cpy_no_passthrough): Change it to method
6724 (regcache_register_status): Change it to method
6725 get_register_status.
6726 (regcache_invalidate): Change it to method invalidate.
6727 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6728 (regcache_raw_update): Change it to method raw_update.
6729 (regcache_raw_read): Likewise.
6730 (regcache_raw_read_signed): Likewise.
6731 (regcache_raw_read_unsigned): Likewise.
6732 (regcache_raw_write_signed): Likewise.
6733 (regcache_raw_write_unsigned): Likewise.
6734 (regcache_cooked_read): Likewise.
6735 (regcache_cooked_read_value): Likewise.
6736 (regcache_cooked_read_signed): Likewise.
6737 (regcache_cooked_read_unsigned): Likewise.
6738 (regcache_cooked_write_signed): Likewise.
6739 (regcache_cooked_write_unsigned): Likewise.
6740 (regcache_raw_set_cached_value): Likewise.
6741 (regcache_raw_write): Likewise.
6742 (regcache_cooked_write): Likewise.
6743 (regcache_xfer_part): Likewise.
6744 (regcache_raw_read_part): Likewise.
6745 (regcache_raw_write_part): Likewise.
6746 (regcache_cooked_read_part): Likewise.
6747 (regcache_cooked_write_part): Likewise.
6748 (regcache_raw_supply): Likewise.
6749 (regcache_raw_collect): Likewise.
6750 (regcache_transfer_regset): Likewise.
6751 (regcache_supply_regset): Likewise.
6752 (regcache_collect_regset): Likewise.
6753 (regcache_debug_print_register): Likewise.
6754 (enum regcache_dump_what): Move it to regcache.h.
6755 (regcache_dump): Change it to method dump.
6756 * regcache.h (enum regcache_dump_what): New.
6757 (class regcache): New.
6758 * target.c (target_fetch_registers): Call method
6759 debug_print_register.
6760 (target_store_registers): Likewise.
6762 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6764 * windows-nat.c (struct lm_info_windows): Initialize field.
6765 (windows_make_so): Allocate lm_info_windows with new.
6766 (windows_free_so): Free lm_info_windows with delete.
6768 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6770 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6771 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6773 (darwin_free_so): Free lm_info_darwin with delete.
6775 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6777 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6778 <l_addr_p>: Change type to bool.
6779 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6780 (svr4_free_so): Free lm_info_svr4 with delete.
6781 (svr4_copy_library_list): Replace memcpy with call to copy
6783 (library_list_start_library, svr4_default_sos): Allocate
6784 lm_info_svr4 with new.
6786 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6788 * solib-target.c (struct lm_info_target): Add destructor,
6790 <name>: Change type to std::string.
6791 (library_list_start_library): Allocate lm_info_target with new.
6792 (solib_target_free_library_list): Free lm_info_target with
6794 (solib_target_current_sos): Adapt to std::string.
6795 (solib_target_free_so): Free lm_info_target with delete.
6797 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6799 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6801 (frv_current_sos): Allocate lm_info_frv with new.
6802 (frv_relocate_main_executable): Free lm_info_frv with delete,
6804 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6806 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6808 * solib-frv.c (struct lm_info_frv): Fix indentation.
6810 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6812 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6814 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6815 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6816 and allocate with new.
6817 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6819 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6821 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6822 <filename, member_name>: Change type to std::string.
6823 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6824 (library_list_start_library): Allocate lm_info_aix with new.
6825 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6826 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6827 with copy constructor.
6829 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6831 * solist.h (struct lm_info): Remove.
6832 (struct lm_info_base): New class.
6833 (struct so_list) <lm_info>: Change type to lm_info_base *.
6834 * nto-tdep.c (struct lm_info): Remove.
6836 * solib-aix.c (struct lm_info): Rename to ...
6837 (struct lm_info_aix): ... this. Extend lm_info_base.
6838 (lm_info_p): Rename to ...
6839 (lm_info_aix_p): ... this, and adjust.
6840 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6841 solib_aix_parse_libraries, library_list_start_library,
6842 solib_aix_free_library_list, solib_aix_parse_libraries,
6843 solib_aix_get_library_list,
6844 solib_aix_relocate_section_addresses, solib_aix_free_so,
6845 solib_aix_get_section_offsets,
6846 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6848 (struct solib_aix_inferior_data) <library_list>: Adjust.
6849 * solib-darwin.c (struct lm_info): Rename to ...
6850 (struct lm_info_darwin): ... this. Extend lm_info_base.
6851 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6852 * solib-dsbt.c (struct lm_info): Rename to ...
6853 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6854 (struct dsbt_info) <main_executable_lm_info): Adjust.
6855 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6856 dsbt_relocate_section_addresses): Adjust.
6857 * solib-frv.c (struct lm_info): Rename to ...
6858 (struct lm_info_frv): ... this. Extend lm_info_base.
6859 (main_executable_lm_info): Adjust.
6860 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6861 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6862 find_canonical_descriptor_in_load_object,
6863 frv_fdpic_find_canonical_descriptor): Adjust.
6864 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6866 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6867 svr4_clear_so, svr4_copy_library_list,
6868 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6869 svr4_current_sos, svr4_fetch_objfile_link_map,
6870 solist_update_incremental): Adjust.
6871 * solib-svr4.h (struct lm_info_svr4): Move here from
6873 * solib-target.c (struct lm_info): Rename to ...
6874 (struct lm_info_target): ... this. Extend lm_info_base.
6875 (lm_info_p): Rename to ...
6876 (lm_info_target_p): ... this.
6877 (solib_target_parse_libraries, library_list_start_segment,
6878 library_list_start_section, library_list_start_library,
6879 library_list_end_library, solib_target_free_library_list,
6880 solib_target_current_sos, solib_target_free_so,
6881 solib_target_relocate_section_addresses): Adjust.
6882 * windows-nat.c (struct lm_info): Rename to ...
6883 (struct lm_info_windows): ... this. Extend lm_info_base.
6884 (windows_make_so, handle_load_dll, handle_unload_dll,
6885 windows_xfer_shared_libraries): Adjust.
6887 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6889 * solib-darwin.c (struct darwin_so_list): Remove.
6890 (darwin_current_sos): Allocate an so_list object instead of a
6891 darwin_so_list, separately allocate an lm_info object.
6892 (darwin_free_so): Free lm_info.
6894 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6896 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6897 with fprintf_filtered.
6899 2017-04-28 Yao Qi <yao.qi@linaro.org>
6901 * regcache.c (regcache::regcache): New function.
6902 (regcache::~regcache): New function.
6903 (regcache_xmalloc_1): Remove.
6904 (regcache_xmalloc): Call new regcache.
6905 (regcache_xfree): Call delete regcache.
6906 (get_thread_arch_aspace_regcache): Call new regcache.
6908 2017-04-28 Yao Qi <yao.qi@linaro.org>
6910 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6911 lwp instead of ptid_get_lwp.
6913 2017-04-28 Yao Qi <yao.qi@linaro.org>
6915 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6916 lwp_info instead of getting from inferior_ptid.
6918 2017-04-27 Keith Seitz <keiths@redhat.com>
6920 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6921 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6922 (CV_CONVERSION_BADNESS): Define.
6923 (rank_one_type): Remove overly restrictive rvalue reference
6925 Add cv-qualifier checks and subranks for type equality.
6926 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6927 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6928 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6930 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6932 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6933 count when creating the object.
6935 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6936 Ulrich Weigand <uweigand@de.ibm.com>
6938 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6939 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6941 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6942 (process_xcoff_symbol): Likewise.
6943 (scan_xcoff_symtab): Likewise.
6945 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6947 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6948 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6949 (ia64_access_reg): Use get_frame_register_unsigned.
6950 (ia64_access_rse_reg): Likewise.
6951 (ia64_libunwind_frame_prev_register): Likewise.
6953 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6955 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6956 * gdbarch.c: Regenerated.
6957 * gdbarch.h: Regenerated.
6958 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6959 visibility external.
6960 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6961 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6962 (enum cfa_how_kind): Move to ...
6963 (struct dwarf2_frame_state_reg_info): Likewise.
6964 (struct dwarf2_frame_state): Likewise.
6965 * dwarf2-frame.h: ... here.
6966 (dwarf2_frame_state_alloc_regs): New declaration.
6967 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6968 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6970 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6972 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6973 regcache_raw_read_unsigned.
6974 (xtensa_pseudo_register_write): Likewise.
6976 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6978 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6979 (nds32_pseudo_register_write): Likewise.
6981 2017-04-25 Yao Qi <yao.qi@linaro.org>
6983 * regcache.c (struct regcache) <readonly_p>: Change its type
6985 (regcache_xmalloc_1): Update parameter type and callers update.
6987 2017-04-25 Yao Qi <yao.qi@linaro.org>
6989 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6990 set_gdbarch_wchar_bit.
6991 * arm-tdep.c (arm_gdbarch_init): Likewise.
6993 2017-04-25 Pedro Alves <palves@redhat.com>
6995 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6996 (BothAreRelocatable, memcopy, memmove): Don't define.
6997 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7000 2017-04-25 Pedro Alves <palves@redhat.com>
7002 * common/common-defs.h: Include "common/poison.h".
7003 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7005 * common/poison.h: New file.
7006 * common/traits.h: Include <type_traits>.
7007 (Not, Or, Requires): New, moved from common/function-view.h.
7009 2017-04-25 Pedro Alves <palves@redhat.com>
7011 * breakpoint.h (struct breakpoint): In-class initialize all
7012 fields. Make boolean fields "bool".
7013 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7014 memset call and initializations no longer necessary.
7016 2017-04-25 Pedro Alves <palves@redhat.com>
7018 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7020 (pt_btrace_insn): New function.
7021 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7023 2017-04-25 Pedro Alves <palves@redhat.com>
7025 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7026 "base" field and inherit from "bp_location" instead. Add
7028 (allocate_location_exception): Use new non-default ctor.
7029 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7030 (init_bp_location): Convert to ...
7031 (bp_location::bp_location): ... this new ctor, and remove memset
7033 (base_breakpoint_allocate_location): Use the new non-default ctor.
7034 * breakpoint.h (bp_location): Now a class. Declare default and
7035 non-default ctors. In-class initialize all members.
7036 (init_bp_location): Remove declaration.
7038 2017-04-25 Pedro Alves <palves@redhat.com>
7040 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7041 assignment operator.
7043 2017-04-24 Yao Qi <yao.qi@linaro.org>
7045 * doublest.c (convert_doublest_to_floatformat): Call
7046 floatformat_totalsize_bytes.
7048 2017-04-22 Tom Tromey <tom@tromey.com>
7050 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7052 * stack.c (print_frame): Use ui_out_emit_list.
7053 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7055 * mi/mi-main.c (print_one_inferior)
7056 (mi_cmd_data_list_register_names)
7057 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7058 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7060 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7061 (mi_output_solib_attribs): Use ui_out_emit_list,
7063 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7064 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7065 (mi_cmd_stack_list_args, list_args_or_locals): Use
7067 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7068 * breakpoint.c (print_solib_event, output_thread_groups): Use
7071 2017-04-22 Tom Tromey <tom@tromey.com>
7073 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7074 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7075 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7077 2017-04-22 Tom Tromey <tom@tromey.com>
7079 * tracepoint.c (tvariables_info_1)
7080 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7082 2017-04-22 Tom Tromey <tom@tromey.com>
7084 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7085 annotate_arg_emitter.
7086 * breakpoint.c (print_mention_watchpoint)
7087 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7088 * annotate.h (struct annotate_arg_emitter): New.
7090 2017-04-22 Tom Tromey <tom@tromey.com>
7092 * record-btrace.c (record_btrace_insn_history)
7093 (record_btrace_insn_history_range, record_btrace_call_history)
7094 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7095 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7097 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7098 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7099 * skip.c (skip_info): Use ui_out_emit_tuple.
7100 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7101 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7102 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7103 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7104 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7106 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7107 (output_register, mi_cmd_data_read_memory)
7108 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7109 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7110 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7111 Use ui_out_emit_tuple.
7112 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7114 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7115 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7116 * linux-thread-db.c (info_auto_load_libthread_db): Use
7118 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7119 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7120 * disasm.c (do_mixed_source_and_assembly_deprecated)
7121 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7122 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7123 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7124 * breakpoint.c (print_one_breakpoint_location)
7125 (print_one_breakpoint): Use ui_out_emit_tuple.
7126 * auto-load.c (print_script, info_auto_load_cmd): Use
7128 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7130 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7132 * thread.c (print_thread_info_1): Remove dead code.
7134 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7136 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7138 * arm-tdep.c (selftests::arm_record_test): Likewise.
7140 2017-04-21 Yao Qi <yao.qi@linaro.org>
7142 * regcache.c (regcache_restore): Remove argument 2. Replace
7143 argument 3 with regcache. Get register status from
7144 src->register_status and get register contents from
7145 register_buffer (src, regnum).
7146 (regcache_cpy): Update.
7148 2017-04-19 Pedro Alves <palves@redhat.com>
7150 * gdbthread.h (thread): Add missing closing parenthesis in
7153 2017-04-19 Pedro Alves <palves@redhat.com>
7155 * common/refcounted-object.h: New file.
7156 * gdbthread.h: Include "common/refcounted-object.h".
7157 (thread_info): Inherit from refcounted_object and add comments.
7158 (thread_info::incref, thread_info::decref)
7159 (thread_info::m_refcount): Delete.
7160 (thread_info::deletable): Use the refcounted_object::refcount()
7162 * inferior.c (current_inferior_): Add comment.
7163 (set_current_inferior): Increment/decrement refcounts.
7164 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7165 not-deletable instead of comparing with the current inferior.
7166 (initialize_inferiors): Increment the initial inferior's refcount.
7167 * inferior.h (struct inferior): Forward declare.
7168 Include "common/refcounted-object.h".
7169 (current_inferior, set_current_inferior): Move declaration to
7170 before struct inferior's definition, and fix comment.
7171 (inferior): Inherit from refcounted_object. Add comments.
7172 * thread.c (switch_to_thread_no_regs): Reference the thread's
7173 inferior pointer directly instead of doing a ptid lookup.
7174 (switch_to_no_thread): New function.
7175 (switch_to_thread(thread_info *)): New function, factored out
7177 (switch_to_thread(ptid_t)): ... this.
7178 (restore_current_thread): Delete.
7179 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7180 fields, and add 'inf' field.
7181 (do_restore_current_thread_cleanup): Check whether old->inf is
7182 alive instead of looking up an inferior by ptid. Use
7183 switch_to_thread and switch_to_no_thread.
7184 (restore_current_thread_cleanup_dtor): Use old->inf directly
7185 instead of lookup up an inferior by id. Decref the inferior.
7186 Don't restore 'removable'.
7187 (make_cleanup_restore_current_thread): Same the inferior pointer
7188 in old, instead of the inferior number. Incref the inferior.
7189 Don't save/clear 'removable'.
7191 2017-04-19 Pedro Alves <palves@redhat.com>
7193 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7194 unittests/scoped_restore-selftests.c.
7195 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7196 * common/scoped_restore.h (scoped_restore_base): Make "class".
7197 (scoped_restore_base::release): New public method.
7198 (scoped_restore_base::scoped_restore_base): New protected ctor.
7199 (scoped_restore_base::m_saved_var): New protected field.
7200 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7201 scoped_restore_base base class instead of m_saved_var directly.
7202 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7203 (scoped_restore_tmpl::scoped_restore_tmpl(const
7204 scoped_restore_tmpl<T>&)): Likewise.
7205 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7207 (scoped_restore_tmpl::saved_var): New method.
7208 (scoped_restore_tmpl::m_saved_var): Delete.
7209 * inferior.h (inferior::detaching): Now a bool.
7210 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7212 * unittests/scoped_restore-selftests.c: New file.
7214 2017-04-19 Pedro Alves <palves@redhat.com>
7216 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7217 Re-sort in alphabetic order.
7219 2017-04-18 Pedro Alves <palves@redhat.com>
7221 * xml-support.c (obstack_xml_printf): Delete.
7222 * xml-support.h (obstack_xml_printf): Delete.
7224 2017-04-18 Pedro Alves <palves@redhat.com>
7226 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7227 vdebug, verror, body_text, start_element, end_element, name,
7228 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7229 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7230 is_xinclude>: Make private and add m_ prefix.
7231 (gdb_xml_parser::body_text): New method, based on ...
7232 (gdb_xml_body_text): ... this. Adjust.
7233 (gdb_xml_parser::vdebug): New method, based on ...
7234 (gdb_xml_debug): ... this. Adjust.
7235 (gdb_xml_parser::verror): New method, based on ...
7236 (gdb_xml_error): ... this. Adjust.
7237 (gdb_xml_parser::start_element): New method, based on ...
7238 (gdb_xml_start_element): ... this. Adjust.
7239 (gdb_xml_start_element_wrapper): Defer to
7240 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7241 (gdb_xml_parser::end_element): New method, based on ...
7242 (gdb_xml_end_element_wrapper): ... this. Adjust.
7243 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7244 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7245 (gdb_xml_parser::use_dtd): New method, based on ...
7246 (gdb_xml_use_dtd): ... this. Adjust.
7247 (gdb_xml_parser::parse): New method, based on ...
7248 (gdb_xml_parse): ... this. Adjust.
7249 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7250 (xinclude_start_include): Adjust to call the parser's name method.
7251 (xml_xinclude_default, xml_xinclude_start_doctype)
7252 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7254 (xml_process_xincludes): Adjust to call parser methods.
7255 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7258 2017-04-18 Pedro Alves <palves@redhat.com>
7260 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7261 gdb::optional<std::string>.
7262 * xml-support.c: Include <string>.
7263 (scope_level::scope_level(scope_level &&))
7264 (scope_level::~scope_level): Delete.
7265 (scope_level::body): Now a std::string.
7266 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7267 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7269 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7270 (xinclude_parsing_data::output): Now a std::string reference.
7271 (xinclude_start_include): Adjust.
7272 (xml_xinclude_default): Adjust.
7273 (xml_process_xincludes): Add 'output' parameter, and return bool.
7274 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7276 * xml-tdesc.c: Include <unordered_map> and <string>.
7277 (tdesc_xml_cache): Delete.
7278 (tdesc_xml_cache_s): Delete.
7279 (xml_cache): Now an std::unordered_map.
7280 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7281 (target_fetch_description_xml): Change return type to
7282 gdb::optional<std::string>, and adjust.
7283 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7284 (target_fetch_description_xml): Change return type to
7285 gdb::optional<std::string>.
7287 2017-04-18 Pedro Alves <palves@redhat.com>
7289 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7290 unittests/optional-selftests.c.
7291 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7292 * unittests/optional-selftests.c: New file.
7293 * unittests/optional/assignment/1.cc: New file.
7294 * unittests/optional/assignment/2.cc: New file.
7295 * unittests/optional/assignment/3.cc: New file.
7296 * unittests/optional/assignment/4.cc: New file.
7297 * unittests/optional/assignment/5.cc: New file.
7298 * unittests/optional/assignment/6.cc: New file.
7299 * unittests/optional/assignment/7.cc: New file.
7300 * unittests/optional/cons/copy.cc: New file.
7301 * unittests/optional/cons/default.cc: New file.
7302 * unittests/optional/cons/move.cc: New file.
7303 * unittests/optional/cons/value.cc: New file.
7304 * unittests/optional/in_place.cc: New file.
7305 * unittests/optional/observers/1.cc: New file.
7306 * unittests/optional/observers/2.cc: New file.
7308 2017-04-18 Pedro Alves <palves@redhat.com>
7310 * common/gdb_optional.h: Include common/traits.h.
7311 (in_place_t): New type.
7312 (in_place): New constexpr variable.
7313 (optional::optional): Remove member initialization of
7315 (optional::optional(in_place_t...)): New constructor.
7316 (optional::~optional): Use reset.
7317 (optional::optional(const optional&)): New.
7318 (optional::optional(const optional&&)): New.
7319 (optional::optional(T &)): New.
7320 (optional::optional(T &&)): New.
7321 (operator::operator=(const optional &)): New.
7322 (operator::operator=(optional &&)): New.
7323 (operator::operator= (const T &))
7324 (operator::operator= (T &&))
7325 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7326 (operator::reset): New.
7327 (operator::m_instantiated):: Add in-class initializer.
7328 * common/traits.h: Include <type_traits>.
7329 (struct And): New types.
7331 2017-04-18 Pedro Alves <palves@redhat.com>
7333 * xml-support.c: Include <vector>.
7334 (scope_level::scope_level(const gdb_xml_element *))
7335 (scope_level::scope_level(scope_level&&)): New.
7336 (scope_level::~scope_level): New.
7337 (scope_level_s): Delete.
7338 (gdb_xml_parser::scopes): Now a std::vector.
7339 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7341 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7343 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7344 of the scopes member. Use std::vector::emplace_back.
7346 2017-04-18 Pedro Alves <palves@redhat.com>
7348 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7350 (gdb_xml_end_element): Change type of first parameter.
7351 (gdb_xml_cleanup): Rename to ...
7352 (gdb_xml_parser::~gdb_xml_parser): ... this.
7353 (gdb_xml_create_parser_and_cleanup): Delete with ...
7354 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7356 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7357 using gdb_xml_create_parser_and_cleanup.
7358 (xinclude_parsing_data): Add ctor/dtor.
7359 (xml_xinclude_cleanup): Delete.
7360 (xml_process_xincludes): Create a local xinclude_parsing_data
7361 instead of heap-allocating one. Create a local gdb_xml_parser
7362 instead of heap-allocating one with
7363 gdb_xml_create_parser_and_cleanup.
7365 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7368 * fbsd-nat.c (resume_one_thread_cb): Remove.
7369 (resume_all_threads_cb): Remove.
7370 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7371 iterate_over_threads.
7373 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7375 * NEWS: Create a new section for the next release branch.
7376 Rename the section of the current branch, now that it has
7379 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7381 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7382 * version.in: Bump version to 8.0.50.DATE-git.
7384 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7387 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7388 independently of the host, and fix build breakage on Cygwin.
7390 2017-04-13 Pedro Alves <palves@redhat.com>
7392 * inferior.c (free_inferior): Convert to ...
7393 (inferior::~inferior): ... this dtor.
7394 (inferior::inferior): New ctor, factored out from ...
7395 (add_inferior_silent): ... here. Allocate the inferior with a new
7397 (delete_inferior): Call delete instead of free_inferior.
7398 * inferior.h (gdb_environ, continuation): Forward declare.
7399 (inferior): Now a class. Add in-class initialization to all
7400 members. Make boolean fields bool, except 'detaching'.
7401 (inferior::inferior): New explicit ctor.
7402 (inferior::~inferior): New.
7404 2017-04-13 Pedro Alves <palves@redhat.com>
7406 * inferior.c (init_inferior_list): Delete.
7407 * inferior.h (init_inferior_list): Delete.
7409 2017-04-13 Pedro Alves <palves@redhat.com>
7412 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7413 (top level): Call it twice, with different thread sets.
7415 2017-04-13 Pedro Alves <palves@redhat.com>
7417 * thread.c: Include <algorithm>.
7418 (thread_array_cleanup): Delete.
7419 (scoped_inc_dec_ref): New class.
7420 (live_threads_count): New function.
7421 (set_thread_refcount): Delete.
7422 (tp_array_compar_ascending): Now a bool.
7423 (tp_array_compar): Convert to a std::sort comparison function.
7424 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7425 and live_threads_count.
7427 2017-04-13 Pedro Alves <palves@redhat.com>
7429 * infrun.c (follow_fork_inferior): Also switch the current
7432 2017-04-13 Pedro Alves <palves@redhat.com>
7434 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7435 before calling create_internal_breakpoint.
7437 2017-04-13 Pedro Alves <palves@redhat.com>
7439 * fork-child.c (execv_argv): New class.
7440 (breakup_args): Refactored as ...
7441 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7442 Copy arguments to storage and replace separators with NULL
7443 terminators in place.
7444 (escape_bang_in_quoted_argument): Adjust to return bool.
7445 (execv_argv::execv_argv): New ctor.
7446 (execv_argv::init_for_shell): New method, factored out from
7447 fork_inferior. Don't strdup strings into the vector.
7448 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7449 Remove free_vector_argv call.
7451 2017-04-13 Yao Qi <yao.qi@linaro.org>
7453 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7456 2017-04-13 Yao Qi <yao.qi@linaro.org>
7458 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7459 * rx-tdep.c (rx_gdbarch_init): Likewise.
7461 2017-04-13 Pedro Alves <palves@redhat.com>
7463 * breakpoint.h (struct breakpoint): Reindent.
7465 2017-04-13 Pedro Alves <palves@redhat.com>
7467 * breakpoint.c (bp_location): Rename to ...
7468 (bp_locations): ... this. All references updated.
7469 (bp_location_count): Rename to ...
7470 (bp_locations_count): ... this. All references updated.
7471 (bp_location_placed_address_before_address_max): Rename to ...
7472 (bp_locations_placed_address_before_address_max): ... this. All
7474 (bp_location_shadow_len_after_address_max): Rename to ...
7475 (bp_locations_shadow_len_after_address_max): ... this. All
7477 (bp_location_compare_addrs): Rename to ...
7478 (bp_locations_compare_addrs): ... this. All references updated.
7479 (bp_location_compare):Rename to ...
7480 (bp_locations_compare): ... this. All references updated.
7481 (bp_location_target_extensions_update): Rename to ...
7482 (bp_locations_target_extensions_update): ... this. All references
7485 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7487 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7488 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7490 * common/gdb_termios.h: New file, with parts of "terminal.h".
7491 * inflow.c: Include "gdb_termios.h".
7492 * ser-unix.c: Include "gdb_termios.h".
7493 * terminal.h: Move terminal-related defines to
7494 "common/gdb_termios.h".
7496 2017-04-12 Tom Tromey <tom@tromey.com>
7498 * probe.c (parse_probes): Update.
7499 * location.h (delete_event_location): Don't declare.
7500 (event_location_deleter::operator()): Update.
7501 * location.c (event_location_deleter::operator()): Rename from
7502 delete_event_location.
7503 * linespec.h (linespec_result) <location>: Change type to
7505 * linespec.c (canonicalize_linespec, event_location_to_sals)
7506 (decode_objc): Update.
7507 (linespec_result): Don't call delete_event_location.
7508 * breakpoint.c (create_breakpoints_sal)
7509 (bkpt_probe_create_sals_from_location)
7510 (strace_marker_create_sals_from_location): Update.
7512 2017-04-12 Tom Tromey <tom@tromey.com>
7514 * linespec.h (struct linespec_result): Add constructor and
7516 (init_linespec_result, destroy_linespec_result)
7517 (make_cleanup_destroy_linespec_result): Don't declare.
7518 * linespec.c (init_linespec_result): Remove.
7519 (linespec_result::~linespec_result): Rename from
7520 destroy_linespec_result. Update.
7521 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7523 * breakpoint.c (create_breakpoint, break_range_command)
7524 (decode_location_default): Update.
7525 * ax-gdb.c (agent_command_1): Update.
7527 2017-04-12 Tom Tromey <tom@tromey.com>
7529 * remote.c (remote_download_tracepoint): Update.
7530 * python/py-breakpoint.c (bppy_get_location): Update.
7531 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7532 (gdbscm_breakpoint_location): Update.
7533 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7534 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7535 Change type to event_location_up.
7536 * breakpoint.c (create_overlay_event_breakpoint)
7537 (create_longjmp_master_breakpoint)
7538 (create_std_terminate_master_breakpoint)
7539 (create_exception_master_breakpoint)
7540 (breakpoint_event_location_empty_p, print_breakpoint_location)
7541 (print_one_breakpoint_location, create_thread_event_breakpoint)
7542 (init_breakpoint_sal, create_breakpoint)
7543 (print_recreate_ranged_breakpoint, break_range_command)
7544 (init_ada_exception_breakpoint, say_where): Update.
7545 (base_breakpoint_dtor): Don't call delete_event_location.
7546 (bkpt_print_recreate, tracepoint_print_recreate)
7547 (dprintf_print_recreate, update_static_tracepoint)
7548 (breakpoint_re_set_default): Update.
7550 2017-04-12 Tom Tromey <tom@tromey.com>
7552 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7553 type of "to_do". Update.
7554 (compute_stack_depth): Use std::vector.
7556 2017-04-12 Tom Tromey <tom@tromey.com>
7558 * printcmd.c (find_instruction_backward): Use std::vector.
7560 2017-04-12 Tom Tromey <tom@tromey.com>
7562 * symfile.c (objfilep): Remove typedef.
7563 (reread_symbols): Use a std::vector.
7565 2017-04-12 Tom Tromey <tom@tromey.com>
7567 * mi/mi-main.c (exec_direction_forward): Remove.
7568 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7569 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7571 * guile/guile.c (guile_repl_command, guile_command)
7572 (gdbscm_execute_gdb_command): Use scoped_restore.
7573 * go-exp.y (go_parse): Use scoped_restore.
7574 * d-exp.y (d_parse): Use scoped_restore.
7575 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7576 * c-exp.y (c_parse): Use scoped_restore.
7578 2017-04-12 Tom Tromey <tom@tromey.com>
7580 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7581 (mi_parse): Update return type.
7582 (mi_parse_free): Remove.
7583 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7584 (mi_parse::~mi_parse): Rename from mi_parse_free.
7585 (mi_parse_cleanup): Remove.
7586 (mi_parse): Return a unique_ptr. Use new.
7587 * mi/mi-main.c (mi_execute_command): Update.
7589 2017-04-12 Tom Tromey <tom@tromey.com>
7591 * location.c (explicit_location_lex_one): Return a
7593 (string_to_explicit_location): Update. Remove cleanups.
7595 2017-04-12 Tom Tromey <tom@tromey.com>
7597 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7598 (compare_value_and_voffset): Change type. Update.
7599 (compute_vtable_size): Change type of "offset_vec".
7600 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7601 (gnuv3_get_typeid): Remove extraneous declaration.
7603 2017-04-12 Tom Tromey <tom@tromey.com>
7605 * charset.h (wchar_iterator): Fix comment.
7607 2017-04-12 Tom Tromey <tom@tromey.com>
7609 * charset.c (iconv_wrapper): New class.
7610 (cleanup_iconv): Remove.
7611 (convert_between_encodings): Use it.
7613 2017-04-12 Tom Tromey <tom@tromey.com>
7615 * symfile.h (increment_reading_symtab): Update type.
7616 * symfile.c (decrement_reading_symtab): Remove.
7617 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7618 * psymtab.c (psymtab_to_symtab): Update.
7619 * dwarf2read.c (dw2_instantiate_symtab): Update.
7621 2017-04-12 Tom Tromey <tom@tromey.com>
7623 * jit.c (struct jit_reader): Declare separately. Add constructor
7624 and destructor. Change type of "handle".
7625 (loaded_jit_reader): Define separately.
7626 (jit_reader_load): Update. New "new".
7627 (jit_reader_unload_command): Use "delete".
7628 * gdb-dlfcn.h (struct dlclose_deleter): New.
7629 (gdb_dlhandle_up): New typedef.
7630 (gdb_dlopen, gdb_dlsym): Update types.
7631 (gdb_dlclose): Remove.
7632 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7633 (gdb_dlsym): Change type of "handle".
7634 (make_cleanup_dlclose): Remove.
7635 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7636 * compile/compile-c-support.c (load_libcc): Update.
7638 2017-04-12 Tom Tromey <tom@tromey.com>
7640 * symtab.h (find_pcs_for_symtab_line): Change return type.
7641 * symtab.c (find_pcs_for_symtab_line): Change return type.
7642 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7643 type of "vec". Update.
7644 (ltpy_get_pcs_for_line): Update.
7645 * linespec.c (decode_digits_ordinary): Update.
7647 2017-04-12 Tom Tromey <tom@tromey.com>
7649 * tracepoint.c (actions_command): Update.
7650 * python/python.c (python_command, python_interactive_command):
7652 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7653 * guile/guile.c (guile_command): Update.
7654 * defs.h (read_command_lines, read_command_lines_1): Return
7656 (command_lines_deleter): New struct.
7657 (command_line_up): New typedef.
7658 * compile/compile.c (compile_code_command)
7659 (compile_print_command): Update.
7660 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7662 (make_cleanup_free_command_lines): Remove.
7663 * cli/cli-script.c (get_command_line, read_command_lines_1)
7664 (copy_command_lines): Return command_line_up.
7665 (while_command, if_command, read_command_lines, define_command)
7666 (document_command): Update.
7667 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7669 * breakpoint.h (breakpoint_set_commands): Change type of
7671 * breakpoint.c (breakpoint_set_commands): Change type of
7673 (do_map_commands_command, update_dprintf_command_list)
7674 (create_tracepoint_from_upload): Update.
7676 2017-04-12 Tom Tromey <tom@tromey.com>
7678 * tracepoint.c (scope_info): Update.
7679 * spu-tdep.c (spu_catch_start): Update.
7680 * python/python.c (gdbpy_decode_line): Update.
7681 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7682 * python/py-breakpoint.c (bppy_init): Update.
7683 * probe.c (parse_probes): Update.
7684 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7685 * location.h (event_location_deleter): New struct.
7686 (event_location_up): New typedef.
7687 (new_linespec_location, new_address_location, new_probe_location)
7688 (new_explicit_location, copy_event_location)
7689 (string_to_event_location, string_to_event_location_basic)
7690 (string_to_explicit_location): Update return type.
7691 (make_cleanup_delete_event_location): Remove.
7692 * location.c (new_linespec_location, new_address_location)
7693 (new_probe_location, new_explicit_location, copy_event_location):
7694 Return event_location_up.
7695 (delete_event_location_cleanup)
7696 (make_cleanup_delete_event_location): Remove.
7697 (string_to_explicit_location, string_to_event_location_basic)
7698 (string_to_event_location): Return event_location_up.
7699 * linespec.c (canonicalize_linespec, event_location_to_sals)
7700 (decode_line_with_current_source)
7701 (decode_line_with_last_displayed, decode_objc): Update.
7702 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7703 * completer.c (location_completer): Update.
7704 * cli/cli-cmds.c (edit_command, list_command): Update.
7705 * breakpoint.c (create_overlay_event_breakpoint)
7706 (create_longjmp_master_breakpoint)
7707 (create_std_terminate_master_breakpoint)
7708 (create_exception_master_breakpoint)
7709 (create_thread_event_breakpoint): Update.
7710 (init_breakpoint_sal): Update. Remove some dead code.
7711 (create_breakpoint_sal): Change type of "location". Update.
7712 (create_breakpoints_sal, create_breakpoint, break_command_1)
7713 (dprintf_command, break_range_command, until_break_command)
7714 (init_ada_exception_breakpoint)
7715 (strace_marker_create_sals_from_location)
7716 (update_static_tracepoint, trace_command, ftrace_command)
7717 (strace_command, create_tracepoint_from_upload): Update.
7718 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7719 * ax-gdb.c (agent_command_1): Update.
7721 2017-04-12 Pedro Alves <palves@redhat.com>
7723 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7724 * configure.tgt: Handle i[34567]86-*-go32* and
7725 i[34567]86-*-msdosdjgpp*.
7726 * i386-tdep.c (i386_svr4_reg_to_regnum):
7728 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7730 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7731 * i386-go32-tdep.c: New file.
7732 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7735 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7737 * aix-thread.c (pd_status2str): Change return type to const char *.
7739 2017-04-12 Pedro Alves <palves@redhat.com>
7741 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7742 calls to set_gdbarch_gnu_triplet_regexp.
7744 2017-04-12 Pedro Alves <palves@redhat.com>
7747 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7749 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7750 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7751 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7752 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7753 * gdbarch.h, gdbarch.c: Regenerate.
7754 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7755 gdbarch_wchar_bit and gdbarch_wchar_signed.
7756 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7757 * arm-tdep.c (arm_gdbarch_init): Likewise.
7758 * avr-tdep.c (avr_gdbarch_init): Likewise.
7759 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7760 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7761 * i386-tdep.c (i386_go32_init_abi): Likewise.
7762 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7763 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7764 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7765 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7766 * sh-tdep.c (sh_gdbarch_init): Likewise.
7767 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7768 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7769 * windows-tdep.c (windows_init_abi): Likewise.
7770 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7772 2017-04-12 Pedro Alves <palves@redhat.com>
7775 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7776 cplus_primitive_type_char32_t>: New enum values.
7777 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7778 and cplus_primitive_type_char32_t.
7779 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7780 32, use the archtecture's built-in type for char16_t and char32_t,
7781 respectively. Otherwise, fallback to init_integer_type as before,
7782 but make the type unsigned, and issue a complaint.
7783 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7785 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7787 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7788 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7790 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7792 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7795 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7797 * common/common-utils.c (free_vector_argv): New function.
7798 * common/common-utils.h: Include <vector>.
7799 (free_vector_argv): New prototype.
7800 * darwin-nat.c (darwin_create_inferior): Rewrite function
7801 prototype in order to constify "exec_file" and accept a
7802 "std::string" for "allargs".
7803 * fork-child.c: Include <vector>.
7804 (breakup_args): Rewrite function, using C++.
7805 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7806 and accept "std::string" for "allargs". Update the code to
7807 calculate "argv" based on "allargs". Update calls to "exec_fun"
7809 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7810 order to constify "exec_file" and accept a "std::string" for
7812 * go32-nat.c (go32_create_inferior): Likewise.
7813 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7814 * infcmd.c (run_command_1): Constify "exec_file". Use
7815 "std::string" for inferior arguments.
7816 * inferior.h (fork_inferior): Update prototype.
7817 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7818 prototype in order to constify "exec_file" and accept a
7819 "std::string" for "allargs".
7820 * nto-procfs.c (procfs_create_inferior): Likewise.
7821 * procfs.c (procfs_create_inferior): Likewise.
7822 * remote-sim.c (gdbsim_create_inferior): Likewise.
7823 * remote.c (extended_remote_run): Update code to accept
7824 "std::string" as argument.
7825 (extended_remote_create_inferior): Rewrite function prototype in
7826 order to constify "exec_file" and accept a "std::string" for
7828 * rs6000-nat.c (super_create_inferior): Likewise.
7829 (rs6000_create_inferior): Likewise.
7830 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7831 * windows-nat.c (windows_create_inferior): Likewise.
7833 2017-04-11 Pedro Alves <palves@redhat.com>
7835 * thread.c: Fix whitespace throughout.
7837 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7839 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7841 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7843 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7845 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7848 * osdata.c (info_osdata): Check if 'type' is an empty string
7851 2017-04-10 Pedro Alves <palves@redhat.com>
7853 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7854 (ptid_to_global_thread_id, in_thread_list)
7855 (do_captured_list_thread_ids, set_resumed, set_running)
7856 (set_executing, set_stop_requested, finish_thread_state)
7857 (validate_registers_access, can_access_registers_ptid)
7858 (print_thread_info_1, switch_to_thread)
7859 (do_restore_current_thread_cleanup)
7860 (make_cleanup_restore_current_thread, thread_command)
7861 (thread_name_command): Use operator== instead of ptid_equal.
7863 2017-04-10 Pedro Alves <palves@redhat.com>
7865 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7866 (current_thread_cleanup_chain): Delete.
7867 (restore_current_thread_cleanup_dtor)
7868 (make_cleanup_restore_current_thread): Remove references to
7869 current_thread_cleanup_chain.
7871 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7873 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7876 2017-04-10 Yao Qi <yao.qi@linaro.org>
7879 * gdbthread.h (thread_info::deletable): New method.
7880 (thread_info::incref): New method.
7881 (thread_info::decref): New method.
7882 (thread_info::refcount): Move it to private.
7883 * infrun.c (save_stop_context): Call inc_refcount.
7884 (release_stop_context_cleanup): Likewise.
7885 * thread.c (set_thread_exited): New function.
7886 (init_thread_list): Delete "tp" only it is deletable, otherwise
7887 call set_thread_exited.
7888 (delete_thread_1): Call set_thread_exited.
7889 (current_thread_cleanup) <inferior_pid>: Remove.
7890 <thread>: New field.
7891 (restore_current_thread_ptid_changed): Removed.
7892 (do_restore_current_thread_cleanup): Adjust.
7893 (restore_current_thread_cleanup_dtor): Don't call
7895 (set_thread_refcount): Use dec_refcount.
7896 (make_cleanup_restore_current_thread): Adjust.
7897 (thread_apply_all_command): Call inc_refcount.
7898 (_initialize_thread): Don't call
7899 observer_attach_thread_ptid_changed.
7901 2017-04-10 Yao Qi <yao.qi@linaro.org>
7903 * thread.c (delete_thread_1): Hoist code on marking thread as
7906 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7908 * windows-nat.c (windows_detach): Initialize ptid with
7911 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7913 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7915 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7917 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7918 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7919 (bfin_pseudo_register_write): Likewise
7921 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7923 * common/ptid.h (struct ptid): Change to...
7924 (class ptid_t): ... this.
7925 <ptid_t>: New constructors.
7926 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7927 matches>: New methods.
7928 <make_null, make_minus_one>: New static methods.
7935 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7936 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7937 as references, move comment to class ptid_t.
7938 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7939 ptid_t static methods.
7940 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7941 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7942 Take ptid arguments as references, implement using ptid_t methods.
7943 * unittests/ptid-selftests.c: New file.
7944 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7945 unittests/ptid-selftests.c.
7946 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7948 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7950 * python/python.c (python_run_simple_file): Cast mode literal to
7951 non-const char pointer as expected by PyFile_FromString.
7953 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7955 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7956 minus_one_ptid and null_ptid.
7958 2017-04-05 Pedro Alves <palves@redhat.com>
7960 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7961 * configure: Regenerate.
7963 2017-04-05 Pedro Alves <palves@redhat.com>
7965 * ada-exp.y (yyerror): Constify.
7966 * ada-lang.c (bound_name, get_selections)
7967 (ada_variant_discrim_type)
7968 (ada_variant_discrim_name, ada_value_struct_elt)
7969 (ada_lookup_struct_elt_type, is_unchecked_variant)
7970 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7971 (catch_ada_exception_command_split)
7972 (catch_ada_assert_command_split, catch_assert_command)
7973 (ada_op_name): Constify.
7974 * ada-lang.h (ada_yyerror, get_selections)
7975 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7976 * arc-tdep.c (arc_print_frame_cache): Constify.
7977 * arm-tdep.c (arm_skip_stub): Constify.
7978 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7979 (gen_aggregate_elt_ref): Constify.
7980 * bcache.c (print_bcache_statistics): Constify.
7981 * bcache.h (print_bcache_statistics): Constify.
7982 * break-catch-throw.c (catch_exception_command_1):
7983 * breakpoint.c (struct ep_type_description::description):
7985 (add_solib_catchpoint): Constify.
7986 (catch_fork_command_1): Add cast.
7987 (add_catch_command): Constify.
7988 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7990 * bsd-uthread.c (bsd_uthread_state): Constify.
7991 * buildsym.c (patch_subfile_names): Constify.
7992 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7994 * c-exp.y (yyerror): Constify.
7995 (token::oper): Constify.
7996 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7997 * c-varobj.c (cplus_describe_child): Constify.
7998 * charset.c (find_charset_names): Add cast.
7999 (find_charset_names): Constify array and add const_cast.
8000 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8001 (edit_command): Constify.
8002 * cli/cli-decode.c (lookup_cmd): Constify.
8003 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8005 (struct dump_context): Constify.
8006 (add_dump_command, restore_command): Constify.
8007 * cli/cli-script.c (get_command_line): Constify.
8008 * cli/cli-script.h (get_command_line): Constify.
8009 * cli/cli-utils.c (check_for_argument): Constify.
8010 * cli/cli-utils.h (check_for_argument): Constify.
8011 * coff-pe-read.c (struct read_pe_section_data): Constify.
8012 * command.h (lookup_cmd): Constify.
8013 * common/print-utils.c (decimal2str): Constify.
8014 * completer.c (gdb_print_filename): Constify.
8015 * corefile.c (set_gnutarget): Constify.
8016 * cp-name-parser.y (yyerror): Constify.
8017 * cp-valprint.c (cp_print_class_member): Constify.
8018 * cris-tdep.c (cris_register_name, crisv32_register_name):
8020 * d-exp.y (yyerror): Constify.
8021 (struct token::oper): Constify.
8022 * d-lang.h (d_yyerror): Constify.
8023 * dbxread.c (struct header_file_location::name): Constify.
8024 (add_old_header_file, add_new_header_file, last_function_name)
8025 (dbx_next_symbol_text, add_bincl_to_list)
8026 (find_corresponding_bincl_psymtab, set_namestring)
8027 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8028 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8029 * defs.h (command_line_input, print_address_symbolic)
8030 (deprecated_readline_begin_hook): Constify.
8031 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8033 * event-top.c (handle_line_of_input): Constify and add cast.
8034 * exceptions.c (catch_errors): Constify.
8035 * exceptions.h (catch_errors): Constify.
8036 * expprint.c (print_subexp_standard, op_string, op_name)
8037 (op_name_standard, dump_raw_expression, dump_raw_expression):
8038 * expression.h (op_name, op_string, dump_raw_expression):
8040 * f-exp.y (yyerror): Constify.
8041 (struct token::oper): Constify.
8042 (struct f77_boolean_val::name): Constify.
8043 * f-lang.c (f_word_break_characters): Constify.
8044 * f-lang.h (f_yyerror): Constify.
8045 * fork-child.c (fork_inferior): Add cast.
8046 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8047 (new_variant): Constify.
8048 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8049 * gdbarch.c: Regenerate.
8050 * gdbcore.h (set_gnutarget): Constify.
8051 * go-exp.y (yyerror): Constify.
8052 (token::oper): Constify.
8053 * go-lang.h (go_yyerror): Constify.
8054 * go32-nat.c (go32_sysinfo): Constify.
8055 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8056 * guile/scm-cmd.c (cmdscm_function): Constify.
8057 * guile/scm-param.c (pascm_param_value): Constify.
8058 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8059 (h8300sx_register_name): Constify.
8060 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8062 * ia64-tdep.c (ia64_register_names): Constify.
8063 * infcmd.c (construct_inferior_arguments): Constify.
8064 (path_command, attach_post_wait): Constify.
8065 * language.c (show_range_command, show_case_command)
8066 (unk_lang_error): Constify.
8067 * language.h (language_defn::la_error)
8068 (language_defn::la_name_of_this): Constify.
8069 * linespec.c (decode_line_2): Constify.
8070 * linux-thread-db.c (thread_db_err_str): Constify.
8071 * lm32-tdep.c (lm32_register_name): Constify.
8072 * m2-exp.y (yyerror): Constify.
8073 * m2-lang.h (m2_yyerror): Constify.
8074 * m32r-tdep.c (m32r_register_names): Constify and make static.
8075 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8076 * m88k-tdep.c (m88k_register_name): Constify.
8077 * macroexp.c (appendmem): Constify.
8078 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8079 (upgrade_type, parse_external, parse_partial_symbols)
8080 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8081 (new_symbol): Constify.
8082 * memattr.c (mem_info_command): Constify.
8083 * mep-tdep.c (register_name_from_keyword): Constify.
8084 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8086 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8087 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8088 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8090 (mi_execute_async_cli_command): Constify.
8091 * mips-tdep.c (mips_register_name): Constify.
8092 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8093 (am33_register_name, am33_2_register_name)
8094 * moxie-tdep.c (moxie_register_names): Constify.
8095 * nat/linux-osdata.c (osdata_type): Constify fields.
8096 * nto-tdep.c (nto_parse_redirection): Constify.
8097 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8098 (lookup_child_selector): Constify.
8099 (objc_methcall::name): Constify.
8100 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8101 (lookup_struct_typedef): Constify.
8102 * objfiles.c (pc_in_section): Constify.
8103 * objfiles.h (pc_in_section): Constify.
8104 * p-exp.y (struct token::oper): Constify.
8105 (yyerror): Constify.
8106 * p-lang.h (pascal_yyerror): Constify.
8107 * parser-defs.h (op_name_standard): Constify.
8108 (op_print::string): Constify.
8109 (exp_descriptor::op_name): Constify.
8110 * printcmd.c (print_address_symbolic): Constify.
8111 * psymtab.c (print_partial_symbols): Constify.
8112 * python/py-breakpoint.c (stop_func): Constify.
8113 (bppy_get_expression): Constify.
8114 * python/py-cmd.c (cmdpy_completer::name): Constify.
8115 (cmdpy_function): Constify.
8116 * python/py-event.c (evpy_add_attribute)
8117 (gdbpy_initialize_event_generic): Constify.
8118 * python/py-event.h (evpy_add_attribute)
8119 (gdbpy_initialize_event_generic): Constify.
8120 * python/py-evts.c (add_new_registry): Constify.
8121 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8122 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8123 * python/py-inferior.c (get_buffer): Add cast.
8124 * python/py-param.c (parm_constant::name): Constify.
8125 * python/py-unwind.c (fprint_frame_id): Constify.
8126 * python/python.c (gdbpy_parameter_value): Constify.
8127 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8128 * remote.c (memory_packet_config::name): Constify.
8129 (show_packet_config_cmd, remote_write_bytes)
8130 (remote_buffer_add_string):
8131 * reverse.c (exec_reverse_once): Constify.
8132 * rs6000-tdep.c (variant::name, variant::description): Constify.
8133 * rust-exp.y (rustyyerror): Constify.
8134 * rust-lang.c (rust_op_name): Constify.
8135 * rust-lang.h (rustyyerror): Constify.
8136 * serial.h (serial_ops::name): Constify.
8137 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8138 (sh_sh3e_register_name, sh_sh2e_register_name)
8139 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8140 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8141 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8142 (sh_sh4al_dsp_register_name): Constify.
8143 * sh64-tdep.c (sh64_register_name): Constify.
8144 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8145 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8146 * stabsread.c (patch_block_stabs, read_type_number)
8147 (ref_map::stabs, ref_add, process_reference)
8148 (symbol_reference_defined, define_symbol, define_symbol)
8149 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8150 (read_one_struct_field, read_struct_fields, read_baseclasses)
8151 (read_tilde_fields, read_struct_type, read_array_type)
8152 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8153 (read_huge_number, read_range_type, read_args, common_block_start)
8154 (find_name_end): Constify.
8155 * stabsread.h (common_block_start, define_symbol)
8156 (process_one_symbol, symbol_reference_defined, ref_add):
8157 * symfile.c (get_section_index, add_symbol_file_command):
8158 * symfile.h (get_section_index): Constify.
8159 * target-descriptions.c (tdesc_type::name): Constify.
8160 (tdesc_free_type): Add cast.
8161 * target.c (find_default_run_target):
8162 (add_deprecated_target_alias, find_default_run_target)
8163 (target_announce_detach): Constify.
8164 (do_option): Constify.
8165 * target.h (add_deprecated_target_alias): Constify.
8166 * thread.c (print_thread_info_1): Constify.
8167 * top.c (deprecated_readline_begin_hook, command_line_input):
8169 (init_main): Add casts.
8170 * top.h (handle_line_of_input): Constify.
8171 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8172 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8173 (tfind_command): Rename to ...
8174 (tfind_command_1): ... this and constify.
8175 (tfind_command): New function.
8176 (tfind_end_command, tfind_start_command): Adjust.
8177 (encode_source_string): Constify.
8178 * tracepoint.h (encode_source_string): Constify.
8179 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8180 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8181 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8182 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8183 * tui/tui-win.c (parse_scrolling_args): Constify.
8184 * tui/tui-windata.c (tui_erase_data_content): Constify.
8185 * tui/tui-windata.h (tui_erase_data_content): Constify.
8186 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8187 * tui/tui.c (tui_enable): Add cast.
8188 * utils.c (defaulted_query): Constify.
8189 (init_page_info): Add cast.
8190 (puts_debug, subset_compare): Constify.
8191 * utils.h (subset_compare): Constify.
8192 * varobj.c (varobj_format_string): Constify.
8193 * varobj.h (varobj_format_string): Constify.
8194 * vax-tdep.c (vax_register_name): Constify.
8195 * windows-nat.c (windows_detach): Constify.
8196 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8197 * xml-support.c (gdb_xml_end_element): Constify.
8198 * xml-tdesc.c (tdesc_start_reg): Constify.
8199 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8200 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8201 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8203 2017-04-05 Pedro Alves <palves@redhat.com>
8205 * proc-api.c (struct trans): Constify.
8206 (procfs_note): Constify.
8207 * proc-events.c (struct trans, syscall_table):
8208 * proc-flags.c (struct trans): Constify.
8209 * proc-utils.h (procfs_note): Constify.
8210 * proc-why.c (struct trans): Constify.
8211 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8212 (procfs_detach): Constify.
8213 * sol-thread.c (struct string_map): Constify.
8214 (td_err_string, td_state_string): Constify.
8216 2017-04-05 Pedro Alves <palves@redhat.com>
8218 * proc-api.c (procfs_filename): Don't initialize
8220 (prepare_to_trace): Assume procfs_filename is non-NULL.
8221 (_initialize_proc_api): Give procfs_filename a default value here.
8223 2017-04-05 Pedro Alves <palves@redhat.com>
8225 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8226 'cond_string' parameter.
8227 (extract_exception_regexp): Constify 'string' parameter.
8228 (catch_exception_command_1): Constify.
8229 * breakpoint.c (init_catchpoint)
8230 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8232 (ep_parse_optional_if_clause, catch_fork_command_1)
8233 (catch_exec_command_1): Constify.
8234 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8236 (ep_parse_optional_if_clause): Constify.
8237 * cli/cli-utils.c (remove_trailing_whitespace)
8238 (check_for_argument): Constify.
8239 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8241 (check_for_argument): Likewise.
8243 2017-04-05 Pedro Alves <palves@redhat.com>
8245 * event-top.c (command_line_handler): Add cast to execute_command
8247 * record-btrace.c (cmd_record_btrace_bts_start)
8248 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8249 (cmd_record_btrace_start): Add cast to execute_command call.
8250 * record-full.c (record_full_goto_insn):
8251 * record.c (record_start, record_stop): Add cast to
8252 execute_command_to_string calls.
8253 (cmd_record_start): Add cast to execute_command calls.
8255 2017-04-05 Pedro Alves <palves@redhat.com>
8257 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8258 static inline function.
8259 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8260 array and use gdb_PyArg_ParseTupleAndKeywords.
8261 * python/py-cmd.c (cmdpy_init): Likewise.
8262 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8263 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8264 (infpy_search_memory): Likewise.
8265 * python/py-objfile.c (objfpy_add_separate_debug_file)
8266 (gdbpy_lookup_objfile): Likewise.
8267 * python/py-symbol.c (gdbpy_lookup_symbol)
8268 (gdbpy_lookup_global_symbol): Likewise.
8269 * python/py-type.c (gdbpy_lookup_type): Likewise.
8270 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8271 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8274 2017-04-05 Pedro Alves <palves@redhat.com>
8276 * python/python-internal.h (gdb_PyGetSetDef): New type.
8277 * python/py-block.c (block_object_getset)
8278 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8279 * python/py-event.c (event_object_getset)
8280 (finish_breakpoint_object_getset): Likewise.
8281 * python/py-inferior.c (inferior_object_getset): Likewise.
8282 * python/py-infthread.c (thread_object_getset): Likewise.
8283 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8284 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8285 * python/py-objfile.c (objfile_getset): Likewise.
8286 * python/py-progspace.c (pspace_getset): Likewise.
8287 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8289 * python/py-record.c (recpy_record_getset): Likewise.
8290 * python/py-symbol.c (symbol_object_getset): Likewise.
8291 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8293 * python/py-type.c (type_object_getset, field_object_getset):
8295 * python/py-value.c (value_object_getset): Likewise.
8297 2017-04-05 Pedro Alves <palves@redhat.com>
8299 * python/python-internal.h (gdb_PyObject_CallMethod)
8300 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8302 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8303 (PySys_GetObject, PySys_SetPath): New macros.
8305 2017-04-05 Pedro Alves <palves@redhat.com>
8307 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8308 info_osdata_command.
8309 * osdata.c (info_osdata_command): Rename to ...
8310 (info_osdata): ... this. Constify 'type' parameter, and remove
8311 the 'from_tty' parameter. Accept NULL TYPE.
8312 (info_osdata_command): New function.
8313 * osdata.h (info_osdata_command): Remove declaration.
8314 (info_osdata): New declaration.
8316 2017-04-05 Pedro Alves <palves@redhat.com>
8318 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8319 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8320 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8322 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8323 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8324 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8326 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8327 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8328 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8329 (mi_cmd_file_list_exec_source_files)
8330 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8331 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8332 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8334 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8335 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8336 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8337 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8338 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8339 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8340 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8341 'command' parameter.
8342 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8343 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8344 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8345 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8346 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8347 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8348 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8349 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8350 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8351 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8352 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8354 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8355 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8356 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8357 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8358 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8359 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8360 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8361 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8362 (mi_cmd_data_list_changed_registers)
8363 (mi_cmd_data_write_register_values)
8364 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8365 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8366 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8367 (mi_cmd_list_features, mi_cmd_list_target_features)
8368 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8369 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8370 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8371 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8372 (mi_cmd_trace_frame_collected): Constify 'command'
8374 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8375 'command' parameter.
8377 2017-04-05 Pedro Alves <palves@redhat.com>
8379 * ada-lang.c (ada_completer_word_break_characters): Now a const
8381 (ada_get_gdb_completer_word_break_characters): Constify.
8382 * completer.c (gdb_completer_command_word_break_characters)
8383 (gdb_completer_file_name_break_characters)
8384 (gdb_completer_quote_characters): Now const arrays.
8385 (get_gdb_completer_quote_characters): Constify.
8386 (set_rl_completer_word_break_characters): New function.
8387 (set_gdb_completion_word_break_characters)
8388 (complete_line_internal): Use it.
8389 * completer.h (get_gdb_completer_quote_characters): Constify.
8390 (set_rl_completer_word_break_characters): Declare.
8391 * f-lang.c (f_word_break_characters): Constify.
8392 * language.c (default_word_break_characters): Constify.
8393 * language.h (language_defn::la_word_break_characters): Constify.
8394 (default_word_break_characters): Constify.
8395 * top.c (init_main): Use set_rl_completer_word_break_characters.
8397 2017-04-05 Pedro Alves <palves@redhat.com>
8399 * aix-thread.c (aix_thread_pid_to_str)
8400 (aix_thread_extra_thread_info): Constify.
8401 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8402 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8403 (bsd_uthread_pid_to_str): Constify.
8404 * corelow.c (core_pid_to_str): Constify.
8405 * darwin-nat.c (darwin_pid_to_str): Constify.
8406 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8407 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8409 * gnu-nat.c (gnu_pid_to_str): Constify.
8410 * go32-nat.c (go32_pid_to_str): Constify.
8411 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8412 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8413 * inferior.c (inferior_pid_to_str): Constify.
8414 * linux-nat.c (linux_nat_pid_to_str): Constify.
8415 * linux-tdep.c (linux_core_pid_to_str): Constify.
8416 * linux-thread-db.c (thread_db_pid_to_str)
8417 (thread_db_extra_thread_info): Constify.
8418 * nto-tdep.c (nto_extra_thread_info): Constify.
8419 * nto-tdep.h (nto_extra_thread_info): Constify.
8420 * obsd-nat.c (obsd_pid_to_str): Constify.
8421 * procfs.c (procfs_pid_to_str): Constify.
8422 * ravenscar-thread.c (ravenscar_extra_thread_info)
8423 (ravenscar_pid_to_str): Constify.
8424 * remote-sim.c (gdbsim_pid_to_str): Constify.
8425 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8427 * sol-thread.c (solaris_pid_to_str): Constify.
8428 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8429 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8430 * target.c (default_pid_to_str, target_pid_to_str)
8431 (normal_pid_to_str, default_pid_to_str): Constify.
8432 * target.h (target_ops::to_pid_to_str)
8433 (target_ops::to_extra_thread_info): Constify.
8434 (target_pid_to_str, normal_pid_to_str): Constify.
8435 * windows-nat.c (windows_pid_to_str): Constify.
8436 * gdbarch.sh (core_pid_to_str): Constify.
8437 * target-delegates.c: Regenerate.
8438 * gdbarch.h, gdbarch.c: Regenerate.
8440 2017-04-05 Pedro Alves <palves@redhat.com>
8442 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8443 the memory of the temporary warning_pre_print override.
8444 * utils.c (warning_pre_print): Constify.
8445 * utils.h (warning_pre_print): Constify.
8447 2017-04-05 Pedro Alves <palves@redhat.com>
8449 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8450 (shell_command): New function.
8451 (make_command): Use std::string.
8452 (init_cli_cmds): Register shell_command instead of shell_escape.
8454 2017-04-05 Pedro Alves <palves@redhat.com>
8456 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8457 * tracepoint.c (default_collect): Don't initialize.
8459 2017-04-05 Pedro Alves <palves@redhat.com>
8461 * macroexp.c (macro_buffer::shared): Now a bool.
8462 (init_buffer): Update.
8463 (init_shared_buffer): Constify 'addr' parameter.
8464 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8467 2017-04-05 Pedro Alves <palves@redhat.com>
8469 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8470 * disasm.c (set_disassembler_options): Constify local.
8471 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8473 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8476 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8479 2017-04-05 Yao Qi <yao.qi@linaro.org>
8481 * frame.c (frame_unwind_register_unsigned): Call
8482 frame_unwind_register_value.
8484 2017-04-05 Yao Qi <yao.qi@linaro.org>
8486 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8487 Use gdb_test_multiple, and don't match anchor.
8489 2017-04-05 Pedro Alves <palves@redhat.com>
8491 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8492 (Write After Approval): Remove Simon Marchi.
8494 2017-04-05 Pedro Alves <palves@redhat.com>
8496 * common/gdb_optional.h (optional::optional): Make constexpr and
8499 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8501 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8502 (amd64fbsd_jmp_buf_reg_offset): Remove.
8503 (amd64fbsd_supply_uthread): Remove function.
8504 (amd64fbsd_collect_uthread): Remove function.
8505 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8506 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8507 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8508 (fbsd-nat.c): Update comment.
8509 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8510 (i386fbsd_jmp_buf_reg_offset): Remove.
8511 (i386fbsd_supply_uthread): Remove function.
8512 (i386fbsd_collect_uthread): Remove function.
8513 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8515 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8517 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8518 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8519 * NEWS: Mention that support for FreeBSD/alpha was removed.
8520 * alpha-fbsd-tdep.c: Delete file.
8521 * config/alpha/fbsd.mh: Delete file.
8522 * configure.host: Delete alpha*-*-freebsd* and
8523 alpha*-*-kfreebsd*-gnu.
8524 * configure.tgt: Delete alpha*-*-freebsd* and
8525 alpha*-*-kfreebsd*-gnu.
8527 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8529 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8530 amd64bsd_store_inferior_registers): Use ptid from regcache.
8532 2017-04-04 Pedro Alves <palves@redhat.com>
8534 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8535 data fields, make them private and add "m_" prefixes.
8536 (lnp_state_machine::lnp_state_machine): New ctor.
8537 (record_line, check_line_address, handle_set_discriminator)
8538 (handle_set_address, handle_advance_pc, handle_special_opcode)
8539 (handle_advance_line, handle_set_file, handle_negate_stmt)
8540 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8541 (end_sequence, advance_line): New methods.
8542 (m_gdbarch, m_record_lines_p): New fields.
8543 (lnp_reader_state): Delete.
8544 (dwarf_record_line): Rename to ...
8545 (lnp_state_machine::record_line): ... adjust.
8546 (init_lnp_state_machine): Delete.
8547 (lnp_state_machine::lnp_state_machine): New.
8548 (check_line_address): Rename to ...
8549 (lnp_state_machine::check_line_address): This.
8550 (dwarf_decode_lines_1): Remove reference to "reader_state".
8551 Adjust lnp_state_machine having a non-default ctor. Use bool.
8552 State machine internal state manipulation moved to
8553 lnp_state_machine methods.
8555 2017-04-04 Pedro Alves <palves@redhat.com>
8557 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8558 unittests/offset-type-selftests.c.
8559 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8560 * common/offset-type.h: New file.
8561 * common/preprocessor.h: New file.
8562 * common/traits.h: New file.
8563 * common/valid-expr.h: New file.
8564 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8565 sect_offset and cu_offset strong typedefs throughout.
8566 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8567 typedefs throughout.
8568 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8569 sect_offset and cu_offset strong typedefs throughout.
8570 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8571 typedefs throughout.
8572 * gdbtypes.h: Include "common/offset-type.h".
8573 (cu_offset): Now an offset type (strong typedef) instead of a
8575 (sect_offset): Likewise.
8576 (union call_site_parameter_u): Rename "param_offset" field to
8578 * unittests/offset-type-selftests.c: New file.
8580 2017-04-04 Pedro Alves <palves@redhat.com>
8582 * common/underlying.h: New file.
8583 * dwarf2read.c: Include "common/gdb_optional.h" and
8584 "common/underlying.h".
8585 (dir_index, file_name_index): New types.
8586 (file_entry): Use them.
8587 (file_entry::include): Use to_underlying.
8588 (line_header::add_file_name): Use dir_index.
8589 (read_formatted_entries): Use gdb::optional. Read form before
8590 writting to file_entry.
8591 (dwarf_decode_line_header): Use dir_index.
8592 (lnp_state_machine::current_file): Use to_underlying.
8593 (lnp_state_machine::file): Change type to file_name_index.
8594 (dwarf_record_line): Use to_underlying.
8595 (init_lnp_state_machine): Use file_name_index.
8596 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8598 2017-04-04 Pedro Alves <palves@redhat.com>
8600 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8601 operator bool, has_value and get methods.
8603 2017-04-04 Pedro Alves <palves@redhat.com>
8605 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8607 (line_header): Initialize all data fields. Change type of
8608 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8609 Change type of include_dirs to std::vector<const char *>. Remove
8610 num_include_dirs, include_dirs_size. Change type of file_names to
8611 std::vector<file_entry>. Remove num_file_names, file_names_size.
8612 (line_header::line_header): New.
8613 (line_header::add_include_dir, line_header::add_file_name): New
8615 (line_header::include_dir_at): Remove NULL check.
8616 (line_header::file_name_at): Add const overload.
8617 (line_header_up): New unique_ptr typedef.
8618 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8619 std::vector. Remove free_line_header call.
8620 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8621 free_line_header call.
8622 (free_cu_line_header): Delete.
8623 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8624 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8625 Adjust to use std::vector.
8626 (free_line_header): Delete.
8627 (free_line_header_voidp): Use delete.
8628 (add_include_dir): Replace with ...
8629 (line_header::add_include_dir): ... this method. Use std::vector.
8630 (add_file_name): Replace with ...
8631 (line_header::add_file_name): ... this method. Use std::vector.
8632 (add_include_dir_stub): Delete.
8633 (read_formatted_entries): Remove memset.
8634 (dwarf_decode_line_header): Return a line_header_up instead of a
8635 raw pointer. Remove cleanup handling. Pass lambdas to
8636 read_formatted_entries. Adjust to use line_header methods.
8637 (dwarf_decode_lines_1): Adjust to use line_header methods.
8638 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8641 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8643 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8644 instead of struct ptid.
8646 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8648 * frame.c (get_frame_register_bytes): Unwind using value.
8649 (put_frame_register_bytes): Likewise.
8651 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8653 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8656 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8658 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8660 2017-03-29 Yao Qi <yao.qi@linaro.org>
8662 * gdbthread.h (struct thread_info): Declare constructor and
8663 destructor. Add some in-class member initializers.
8664 * thread.c (free_thread): Remove.
8665 (init_thread_list): Call delete instead of free_thread.
8666 (new_thread): Call thread_info constructor.
8667 (thread_info::thread_info): New function.
8668 (thread_info::~thread_info): New function.
8669 (delete_thread_1): Call delete instead of free_thread.
8670 (make_cleanup_restore_current_thread): Move tp and frame to
8673 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8675 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8676 (arc_skip_prologue): Likewise.
8677 (arc_make_frame_cache): Likewise.
8678 (arc_pv_get_operand): New function.
8679 (arc_is_in_prologue): Likewise.
8680 (arc_analyze_prologue): Likewise.
8681 (arc_print_frame_cache): Likewise.
8682 (MAX_PROLOGUE_LENGTH): New constant.
8684 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8686 * configure.tgt: Add arc-insn.o.
8687 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8688 (dump_arc_instruction_command): New function.
8689 (arc_fprintf_disasm): Likewise.
8690 (arc_disassemble_info): Likewise.
8691 (arc_insn_get_operand_value): Likewise.
8692 (arc_insn_get_operand_value_signed): Likewise.
8693 (arc_insn_get_memory_base_reg): Likewise.
8694 (arc_insn_get_memory_offset): Likewise.
8695 (arc_insn_get_branch_target): Likewise.
8696 (arc_insn_dump): Likewise.
8697 (arc_insn_get_linear_next_pc): Likewise.
8698 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8699 (arc_disassemble_info): Likewise.
8700 (arc_insn_get_branch_target): Likewise.
8701 (arc_insn_get_linear_next_pc): Likewise.
8702 * NEWS: Mention new "maint print arc arc-instruction".
8704 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8706 * arc-tdep (maintenance_print_arc_list): New variable.
8707 (maintenance_print_arc_command): New function.
8709 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8711 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8712 Add "limm" and "reserved".
8713 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8714 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8715 * arc-tdep.h (arc_regnum): Likewise.
8717 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8719 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8720 for THREADPTR register.
8721 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8723 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8724 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8725 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8727 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8729 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8730 registers above gdbarch_num_regs (gdbarch) as privileged in
8733 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8735 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8736 for a single specified register or for all registers in
8737 a0_base..a0_base + C0_NREGS range.
8738 (supply_gregset_reg): Call regcache_raw_supply for a single
8739 specified register or for all registers in a0_base..a0_base +
8742 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8744 * arch/xtensa.h (C0_NREGS): Add definition.
8745 * xtensa-tdep.c (C0_NREGS): Remove definition.
8747 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8749 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8750 Drop xtensa_default_isa initialization.
8751 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8753 2017-03-27 Pedro Alves <palves@redhat.com>
8755 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8756 (file_entry::include_dir): New method.
8757 (line_header::include_dir_at, line_header::file_name_at): New
8759 (setup_type_unit_groups, setup_type_unit_groups)
8760 (psymtab_include_file_name): Simplify using the new methods.
8761 (lnp_state_machine) <the_line_header>: New field.
8762 <file>: Add comment.
8763 (lnp_state_machine::current_file): New method.
8764 (dwarf_record_line): Simplify using the new methods.
8765 (init_lnp_state_machine): Initialize the "the_line_header" field.
8766 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8767 Simplify using the new methods.
8769 2017-03-27 Pedro Alves <palves@redhat.com>
8771 * cp-name-parser.y (make_empty): Delete.
8772 (demangler_special, nested_name, ptr_operator, array_indicator)
8773 (direct_declarator, declarator_1): Use fill_comp instead of
8776 2017-03-27 Pedro Alves <palves@redhat.com>
8778 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8779 to ATTRIBUTE_PRINTF.
8780 * solib-target.c (library_list_start_list): Print "string" not
8782 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8785 2017-03-27 Pedro Alves <palves@redhat.com>
8787 * dwarf2read.c (struct file_and_directory): New.
8788 (dwarf2_get_dwz_file): Adjust to use std::string.
8789 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8790 (find_file_and_directory): Adjust to return a file_and_directory
8792 (read_file_scope): Adjust to use file_and_directory. Remove
8793 make_cleanup/do_cleanups calls.
8794 (open_and_init_dwp_file): Adjust to use std::string. Remove
8795 make_cleanup/do_cleanups calls.
8796 * python/python.c (do_start_initialization): Adjust to ldirname
8797 returning a std::string.
8798 * utils.c (ldirname): Now returns a std::string.
8799 * utils.h (ldirname): Change return type to std::string.
8800 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8801 returning a std::string.
8802 * xml-tdesc.c (file_read_description_xml): Likewise.
8804 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8806 * regcache.c (regcache_debug_print_register): New function.
8807 * regcache.h (regcache_debug_print_register): New declaration.
8808 * target.c (debug_print_register): Remove.
8809 (target_fetch_registers): Call regcache_debug_print_register.
8810 (target_store_registers): Likewise.
8812 2017-03-24 Pádraig Brady <pbrady@fb.com>
8814 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8815 reference beyond the 'lh->include_dirs' array before accessing to
8817 (psymtab_include_file_name): Likewise.
8818 (dwarf_decode_lines_1): Likewise.
8819 (dwarf_decode_lines): Likewise.
8820 (file_file_name): Likewise.
8822 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8824 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8826 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8827 ps_lsetfpregs): Likewise.
8828 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8829 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8830 ps_lsetfpregs): Likewise.
8831 * target.c (target_fetch_registers, target_store_registers):
8834 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8836 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8838 2017-03-23 Yao Qi <yao.qi@linaro.org>
8840 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8841 (_initialize_aarch64_tdep): Register it.
8842 (aarch64_record_load_store): Handle PRFM instruction.
8843 (aarch64_process_record_test): New function.
8845 2017-03-23 Yao Qi <yao.qi@linaro.org>
8847 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8850 2017-03-23 Yao Qi <yao.qi@linaro.org>
8852 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8854 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8856 python/python.c (do_start_initialization): Fix memory leak.
8858 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8860 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8861 using get_ptrace_pid.
8862 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8864 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8865 inferior_ptid instead of pid.
8867 2017-03-22 Yao Qi <yao.qi@linaro.org>
8869 * aarch64-tdep.c: Wrap locally used classes in anonymous
8871 * arm-tdep.c: Likewise.
8872 * linespec.c: Likewise.
8873 * ui-out.c: Likewise.
8875 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8878 * python/lib/gdb/printer/bound_registers.py: Import sys.
8880 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8882 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8883 windows_thread_info parameter and use it instead of
8885 (windows_fetch_inferior_registers): Don't set current_thread,
8886 pass the thread to do_windows_fetch_inferior_registers. Use
8887 ptid from regcache instead of inferior_ptid.
8888 (do_windows_store_inferior_registers): Add windows_thread_info
8889 parameter and use it instead of current_thread.
8890 (windows_store_inferior_registers): Don't set current_thread,
8891 pass the thread to do_windows_store_inferior_registers. Use
8892 ptid from regcache instead of inferior_ptid.
8894 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8896 * ser-mingw.c (ser_windows_raw): Remove reference to
8897 struct serial::current_timeout.
8899 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8902 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8903 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8904 (sparc64_fsr_type): Fix %fsr decoding.
8906 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8908 * python/py-record-btrace.c (btpy_insn_data): Change return type
8911 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8913 * spu-linux-nat.c (spu_fetch_inferior_registers,
8914 spu_store_inferior_registers): Use ptid from regcache, set and
8915 restore inferior_ptid.
8916 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8919 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8921 * i386-linux-nat.c (fetch_register, store_register,
8922 i386_linux_fetch_inferior_registers,
8923 i386_linux_store_inferior_registers): Use ptid from regcache.
8924 * ia64-linux-nat.c (ia64_linux_fetch_register,
8925 ia64_linux_store_register): Likewise.
8926 * inf-ptrace.c (inf_ptrace_fetch_register,
8927 inf_ptrace_store_register): Likewise.
8928 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8929 m32r_linux_store_inferior_registers): Likewise.
8930 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8931 m68kbsd_store_inferior_registers): Likewise.
8932 * m68k-linux-nat.c (fetch_register, store_register,
8933 m68k_linux_fetch_inferior_registers,
8934 m68k_linux_store_inferior_registers): Likewise.
8935 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8936 m88kbsd_store_inferior_registers): Likewise.
8937 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8938 mips_fbsd_store_inferior_registers): Likewise.
8939 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8940 mips64_linux_regsets_store_registers): Likewise.
8941 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8942 mipsnbsd_store_inferior_registers): Likewise.
8943 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8944 mips64obsd_store_inferior_registers): Likewise.
8945 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8947 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8948 ppcfbsd_store_inferior_registers): Likewise.
8949 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8950 ppc_linux_store_inferior_registers): Likewise.
8951 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8952 ppcnbsd_store_inferior_registers): Likewise.
8953 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8954 ppcobsd_store_registers): Likewise.
8955 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8957 * ravenscar-thread.c (ravenscar_fetch_registers,
8958 ravenscar_store_registers, ravenscar_prepare_to_store):
8960 * record-btrace.c (record_btrace_fetch_registers,
8961 record_btrace_store_registers, record_btrace_prepare_to_store):
8963 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8964 Lookup inferior using ptid from regcache, instead of
8966 * remote.c (remote_fetch_registers, remote_store_registers): Use
8968 * rs6000-nat.c (fetch_register, store_register): Likewise.
8969 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8970 s390_linux_store_inferior_registers): Likewise.
8971 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8972 shnbsd_store_inferior_registers): Likewise.
8973 * sol-thread.c (sol_thread_fetch_registers,
8974 sol_thread_store_registers): Likewise.
8975 * sparc-nat.c (sparc_fetch_inferior_registers,
8976 sparc_store_inferior_registers): Likewise.
8977 * tilegx-linux-nat.c (fetch_inferior_registers,
8978 store_inferior_registers): Likewise.
8979 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8980 vaxbsd_store_inferior_registers): Likewise.
8981 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8982 store_xtregs): Likewise.
8984 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8987 * NEWS: Mention support for rvalue references in GDB and python.
8988 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8989 supports both lvalue and rvalue references.
8991 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8994 * gdbtypes.c (rank_one_type): Implement overloading
8995 resolution rules regarding rvalue references.
8997 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9000 * aarch64-tdep.c (aarch64_type_align)
9001 (aarch64_extract_return_value, aarch64_store_return_value): Change
9002 lvalue reference type checks to general reference type checks.
9003 * amd64-tdep.c (amd64_classify): Likewise.
9004 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9006 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9007 (arm_store_return_value): Likewise.
9008 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9009 * c-typeprint.c (c_print_type): Likewise.
9010 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9011 (cplus_number_of_children, cplus_describe_child): Likewise.
9012 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9013 * completer.c (expression_completer): Likewise.
9014 * cp-support.c (make_symbol_overload_list_adl_namespace):
9016 * darwin-nat-info.c (info_mach_region_command): Likewise.
9017 * dwarf2loc.c (entry_data_value_coerce_ref)
9018 (value_of_dwarf_reg_entry): Likewise.
9019 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9020 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9022 * findvar.c (extract_typed_address, store_typed_address):
9024 * gdbtypes.c (rank_one_type): Likewise.
9025 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9026 * infcall.c (value_arg_coerce): Likewise.
9027 * language.c (pointer_type): Likewise.
9028 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9030 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9031 * mn10300-tdep.c (mn10300_type_align): Likewise.
9032 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9033 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9034 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9036 * printcmd.c (print_formatted, x_command): Likewise.
9037 * python/py-type.c (typy_get_composite, typy_template_argument):
9039 * python/py-value.c (valpy_referenced_value)
9040 (valpy_get_dynamic_type, value_has_field): Likewise.
9041 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9042 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9043 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9044 * spu-tdep.c (spu_scalar_value_p): Likewise.
9045 * symtab.c (lookup_symbol_aux): Likewise.
9046 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9047 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9049 * valops.c (value_cast_pointers, value_cast)
9050 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9051 (value_struct_elt, value_struct_elt_bitpos)
9052 (value_find_oload_method_list, find_overload_match)
9053 (value_rtti_indirect_type): Likewise.
9054 * valprint.c (val_print_scalar_type_p, generic_val_print):
9056 * value.c (value_actual_type, value_as_address, unpack_long)
9057 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9058 (coerce_ref): Likewise.
9059 * varobj.c (varobj_get_value_type): Likewise.
9061 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9064 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9066 * python/lib/gdb/command/explore.py: Support exploring values
9067 of rvalue reference types.
9068 * python/lib/gdb/types.py: Implement get_basic_type() for
9069 rvalue reference types.
9070 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9072 * python/py-value.c (valpy_getitem): Add an rvalue reference
9074 (valpy_reference_value): Add new parameter "refcode".
9075 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9076 New wrappers for valpy_reference_value().
9077 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9078 (gdbpy_invoke_xmethod): Likewise.
9080 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9083 * dwarf2read.c (process_die, read_type_die_1): Handle the
9084 DW_TAG_rvalue_reference_type DIE.
9085 (read_tag_reference_type): Add new parameter "refcode".
9087 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9090 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9091 (c_type_print_modifier, c_type_print_varspec_suffix)
9092 (c_type_print_base): Support printing rvalue reference types.
9093 * c-valprint.c (c_val_print, c_value_print): Support printing
9094 rvalue reference values.
9096 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9099 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9101 * cp-support.c (replace_typedefs): Handle
9102 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9103 * python/py-type.c (typy_lookup_type): Likewise.
9105 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9108 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9109 * parse.c (insert_type): Change assert statement.
9110 (follow_types): Handle rvalue reference types.
9111 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9114 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9117 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9118 value_ref() interface.
9119 * c-valprint.c (c_value_print): Likewise.
9120 * infcall.c (value_arg_coerce): Likewise.
9121 * python/py-value.c (valpy_reference_value): Likewise.
9122 * valops.c (value_cast, value_reinterpret_cast)
9123 (value_dynamic_cast, typecmp): Likewise.
9124 (value_ref): Parameterize by kind of return value reference type.
9125 * value.h (value_ref): Add new parameter "refcode".
9127 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9130 * dwarf2read.c (read_tag_reference_type): Use
9131 lookup_lvalue_reference_type() instead of lookup_reference_type().
9132 * eval.c (evaluate_subexp_standard): Likewise.
9133 * f-exp.y: Likewise.
9134 * gdbtypes.c (make_reference_type, lookup_reference_type):
9135 Generalize with rvalue reference types.
9136 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9137 convenience wrappers for lookup_reference_type().
9138 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9139 reference kind parameter.
9140 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9141 wrappers for lookup_reference_type().
9142 * guile/scm-type.c (gdbscm_type_reference): Use
9143 lookup_lvalue_reference_type() instead of lookup_reference_type().
9144 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9145 * parse.c (follow_types): Likewise.
9146 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9147 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9149 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9150 (gdbpy_invoke_xmethod): Likewise.
9151 * stabsread.c: Provide extra argument to make_reference_type()
9153 * valops.c (value_ref, value_rtti_indirect_type): Use
9154 lookup_lvalue_reference_type() instead of lookup_reference_type().
9156 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9159 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9160 (TYPE_IS_REFERENCE): New macro.
9161 (struct type): Add rvalue_reference_type field.
9162 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9164 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9166 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9167 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9168 New function definition.
9169 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9170 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9171 New function declaration.
9172 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9173 * mi/mi-interp.h: New file.
9174 * solib.c (info_sharedlibrary_command): Replace for loop with
9176 * solib.h (update_solib_list): New function declaration.
9177 (so_list_head): Move macro.
9178 * solist.h (ALL_SO_LIBS): New macro.
9180 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9182 * infcmd.c (post_create_inferior): Remove unused argument in
9184 * remote.c (remote_start_remote): Likewise.
9185 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9186 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9187 (enable_break): Likewise.
9188 * solib.c (update_solib_list): Remove unused target argument
9189 and its documentation.
9190 (solib_add): Remove unused target argument. Remove unused
9191 argument in call to update_solib_list.
9192 (info_sharedlibrary_command): Remove unused argument in call
9193 to update_solib_list.
9194 (sharedlibrary_command): Remove unused argument in call to
9196 (handle_solib_event): Likewise.
9197 (reload_shared_libraries): Likewise.
9198 * solib.h (solib_add): Remove unused target argument.
9200 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9202 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9203 (s390_displaced_step_fixup): Cover relative branches with the
9204 default fixup handling. This fixes lack of support for some
9205 relative branch instructions.
9207 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9209 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9212 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9214 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9215 i386_darwin_store_inferior_registers): Use ptid from regcache.
9217 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9219 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9220 i386bsd_store_inferior_registers): Use ptid from regcache.
9222 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9224 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9225 hppaobsd_store_registers): Use ptid from regcache.
9227 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9229 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9230 hppanbsd_store_registers): Use ptid from regcache.
9232 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9234 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9235 from regcache. Use get_ptrace_pid.
9237 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9239 * corelow.c (get_core_register_section): Use ptid from regcache,
9242 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9244 * bsd-uthread.c (bsd_uthread_fetch_registers,
9245 bsd_uthread_store_registers): Use ptid from regcache, set and
9246 restore inferior_ptid.
9248 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9250 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9251 fetch_fp_regs, store_register, store_regs, store_fp_register,
9252 store_fp_regs): Use ptid from regcache.
9254 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9256 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9257 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9258 store_vfp_regs): Use ptid from regcache.
9260 2017-03-17 Pedro Alves <palves@redhat.com>
9263 * ser-base.c (ser_base_wait_for): Add comment.
9264 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9266 * ser-unix.c (hardwire_raw): Remove reference to
9267 scb->current_timeout.
9268 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9269 (hardwire_ops): Install ser_base_readchar instead of
9271 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9274 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9277 * python/lib/gdb/printer/bound_registers.py: Add support for
9280 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9282 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9283 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9284 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9285 byte_offset to subobj_byte_offset. Fix the handling of
9286 DWARF_VALUE_STACK on big-endian targets when coming via an
9288 (dwarf2_evaluate_loc_desc): Adjust call to
9289 dwarf2_evaluate_loc_desc_full.
9290 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9291 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9293 2017-03-16 Yao Qi <yao.qi@linaro.org>
9295 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9296 and REVSH instructions.
9298 2017-03-16 Yao Qi <yao.qi@linaro.org>
9300 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9301 (arm_record_test): Declare.
9302 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9303 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9304 align with the manual.
9305 (thumb_record_misc): Adjust the code order to align with the
9307 (thumb2_record_decode_insn_handler): Fix instruction matching.
9308 (instruction_reader_thumb): New class.
9309 (arm_record_test): New function.
9311 2017-03-16 Yao Qi <yao.qi@linaro.org>
9313 * arm-tdep.c (abstract_memory_reader): New class.
9314 (instruction_reader): New class.
9315 (extract_arm_insn): Add argument 'reader'. Callers updated.
9316 (decode_insn): Likewise.
9318 2017-03-16 Doug Evans <dje@google.com>
9320 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9321 member. Change type of TYPE member to SCM. All uses updated.
9322 (lsscm_make_lazy_string_smob): Add assert.
9323 (lsscm_make_lazy_string): Flag bad length values.
9324 (lsscm_elt_type): New function.
9325 (gdbscm_lazy_string_to_value): Rewrite to use
9326 lsscm_safe_lazy_string_to_value.
9327 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9328 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9329 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9331 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9332 * guile/scm-type.c (tyscm_scm_to_type): New function.
9334 2017-03-15 Doug Evans <dje@google.com>
9336 PR python/17728, python/18439, python/18779
9337 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9338 member. Change type of TYPE member to PyObject *. All uses updated.
9339 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9340 (gdbpy_create_lazy_string_object): Flag bad length values.
9341 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9342 Handle typedefs in incoming type.
9343 (stpy_lazy_string_elt_type): New function.
9344 (gdbpy_extract_lazy_string): Call it.
9345 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9346 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9347 typedefs in incoming type.
9349 2017-03-16 Doug Evans <dje@google.com>
9351 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9352 * guile/scm-type.c (tyscm_scm_to_type): New function.
9354 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9356 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9357 "ULONGEST" for "skip".
9359 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9362 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9363 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9364 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9365 over ptrace peek/poke until end of buffer or error.
9367 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9369 * parse.c (length_of_subexp): Make static.
9370 * parser-defs.h (length_of_subexp): Remove.
9372 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9374 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9377 2017-03-14 Pedro Alves <palves@redhat.com>
9379 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9380 (main): Use std::unique_ptr. Remove calls to
9381 cp_demangled_name_parse_free.
9383 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9385 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9386 alphabsd_store_inferior_registers): Use regcache->ptid instead
9389 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9391 * aix-thread.c (aix_thread_fetch_registers,
9392 aix_thread_store_registers): Use regcache->ptid instead of
9395 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9397 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9398 store_gregs_to_thread, fetch_fpregs_from_thread,
9399 store_fpregs_to_thread): Use regcache->ptid instead of
9402 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9404 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9405 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9406 instead of inferior_ptid.
9408 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9410 * target.c (target_fetch_registers, target_store_registers): Add
9413 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9415 * regcache.h (regcache_get_ptid): New function.
9416 * regcache.c (regcache_get_ptid): New function.
9418 2017-03-13 Mark Wielaard <mark@klomp.org>
9420 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9422 2017-03-10 Keith Seitz <keiths@redhat.com>
9425 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9427 2017-03-08 Pedro Alves <palves@redhat.com>
9430 * infrun.c (start_step_over, do_target_resume, resume)
9431 (restart_threads): Assert we're not resuming a thread that is
9432 meant to be stopped.
9433 (infrun_thread_stop_requested_callback): Delete.
9434 (infrun_thread_stop_requested): If the thread is internally
9435 stopped, queue a pending stop event and clear the thread's
9437 (handle_stop_requested): New function.
9438 (handle_syscall_event, handle_inferior_event_1): Use
9439 handle_stop_requested.
9440 (handle_stop_requested): New function.
9441 (handle_signal_stop): Set the thread's stop_signal here instead of
9443 (finish_step_over): Clear step over info unconditionally.
9444 (handle_signal_stop): If the user had interrupted the event
9445 thread, consider the stop a random signal.
9446 (handle_signal_stop) <signal arrived while stepping over
9447 breakpoint>: Don't restart threads here.
9448 (stop_waiting): Don't clear step-over info here.
9450 2017-03-08 Pedro Alves <palves@redhat.com>
9453 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9454 goes to argument 2, not 1.
9456 2017-03-08 Pedro Alves <palves@redhat.com>
9459 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9461 (command_line_input): Add comment.
9463 2017-03-08 Pedro Alves <palves@redhat.com>
9466 * tui/tui-file.c (tui_file::write): New.
9467 * tui/tui-file.h (tui_file): Override "write".
9468 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9469 factored out from ...
9470 (tui_puts): ... here.
9471 (tui_putc): Use them.
9472 (tui_write): New function.
9473 * tui/tui-io.h (tui_write): Declare.
9475 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9477 * Makefile.in (SFILES): Replace "environ.c" with
9479 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9480 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9482 * common/environ.c: ... here.
9483 * environ.h: Moved to...
9484 * common/environ.h: ... here.
9486 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9488 * gdbarch.sh (pstring_ptr): New static function.
9489 (gdbarch_disassembler_options): Use it.
9490 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9491 not valid_disassembler_option->name.
9492 * gdbarch.c: Regenerate.
9494 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9496 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9498 2017-03-07 Pedro Alves <palves@redhat.com>
9500 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9502 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9504 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9505 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9506 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9507 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9509 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9511 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9513 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9515 * remote.c (remote_add_target_side_commands): Use range-based
9518 2017-03-03 Yao Qi <yao.qi@linaro.org>
9521 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9523 * valprint.c (common_val_print): Likewise.
9525 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9527 * NEWS: Mention new set/show disassembler-options commands.
9528 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9529 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9530 (prospective_options): New static variable.
9531 (gdb_disassembler::gdb_disassembler): Initialize
9532 m_di.disassembler_options.
9533 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9534 (get_disassembler_options): New function.
9535 (set_disassembler_options): Likewise.
9536 (set_disassembler_options_sfunc): Likewise.
9537 (show_disassembler_options_sfunc): Likewise.
9538 (disassembler_options_completer): Likewise.
9539 (_initialize_disasm): Likewise.
9540 * disasm.h (get_disassembler_options): New prototype.
9541 (set_disassembler_options): Likewise.
9542 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9543 (gdbarch_verify_disassembler_options): Likewise.
9544 * gdbarch.c: Regenerate.
9545 * gdbarch.h: Likewise.
9546 * arm-tdep.c (num_disassembly_options): Delete.
9547 (set_disassembly_style): Likewise.
9548 (arm_disassembler_options): New static variable.
9549 (set_disassembly_style_sfunc): Convert short style name into long
9550 option name. Call set_disassembler_options.
9551 (show_disassembly_style_sfunc): New function.
9552 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9553 set_gdbarch_verify_disassembler_options.
9554 (_initialize_arm_tdep): Delete regnames variable and update callers.
9555 (arm_disassembler_options): Initialize.
9556 (disasm_options): New variable.
9557 (num_disassembly_options): Rename from this...
9558 (num_disassembly_styles): ...to this. Compute by scanning through
9560 (valid_disassembly_styles): Initialize using disasm_options.
9561 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9562 set_arm_regname_option.
9563 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9564 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9565 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9566 set_gdbarch_verify_disassembler_options.
9567 * s390-tdep.c (s390_disassembler_options): New static variable.
9568 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9569 set_gdbarch_verify_disassembler_options.
9571 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9573 * remote.c (remote_add_target_side_condition): Remove "struct"
9574 keyword from range-based for loop.
9576 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9578 * remote.c (remote_add_target_side_condition): Use range-based
9579 for loop. Update comment.
9581 2017-02-27 Yao Qi <yao.qi@linaro.org>
9583 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9585 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9587 * regcache.c (regcache_raw_update): New function.
9588 (regcache_raw_read): Move code to regcache_raw_update.
9589 * regcache.h (regcache_raw_update): New declaration.
9590 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9592 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9594 * dwarf2read.c (create_debug_type_hash_table): Initialize
9595 header.signature and header.type_offset_in_tu.
9597 2017-02-24 Pedro Alves <palves@redhat.com>
9599 * symtab.c (make_file_symbol_completion_list_1): Use
9600 add_symtab_completions.
9602 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9604 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9606 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9608 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9609 I386_MAX_REGISTER_SIZE.
9610 (i386_pseudo_register_write): Likewise.
9611 (i386_process_record): Likewise.
9612 * i387-tdep.c (i387_supply_xsave): Likewise.
9613 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9614 (store_register): Likewise.
9616 2017-02-23 Pedro Alves <palves@redhat.com>
9618 * ada-lang.c: Include "common/function-view.h".
9619 (ada_iterate_over_symbols): Adjust to use function_view as
9621 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9622 (ada_make_symbol_completion_list): Use a lambda.
9623 (ada_exc_search_name_matches): Delete.
9624 (name_matches_regex): New.
9625 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9626 * compile/compile-c-support.c: Include "common/function-view.h".
9627 (print_one_macro): Change prototype to accept a ui_file pointer.
9628 (write_macro_definitions): Use a lambda.
9629 * dwarf2read.c: Include "common/function-view.h".
9630 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9631 (dw2_expand_symtabs_matching): Adjust to use function_view as
9633 * language.h: Include "common/function-view.h".
9634 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9635 function_view as callback type.
9636 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9637 * linespec.c: Include "common/function-view.h".
9638 (collect_info::add_symbol): New method.
9639 (struct symbol_and_data_callback, iterate_inline_only, struct
9640 symbol_matcher_data, iterate_name_matcher): Delete.
9641 (iterate_over_all_matching_symtabs): Adjust to use function_view
9642 as callback type and lambdas.
9643 (iterate_over_file_blocks): Adjust to use function_view as
9645 (decode_compound_collector): Now a class with private fields.
9646 (decode_compound_collector::release_symbols): New method.
9647 (collect_one_symbol): Rename to...
9648 (decode_compound_collector::operator()): ... this and adjust.
9649 (lookup_prefix_sym): decode_compound_collector construction bits
9650 move to decode_compound_collector ctor. Pass the
9651 decode_compound_collector object directly as callback. Remove
9652 cleanups and use decode_compound_collector::release_symbols
9654 (symtab_collector): Now a class with private fields.
9655 (symtab_collector::release_symtabs): New method.
9656 (add_symtabs_to_list): Rename to...
9657 (symtab_collector::operator()): ... this and adjust.
9658 (collect_symtabs_from_filename): symtab_collector construction
9659 bits move to symtab_collector ctor. Pass the symtab_collector
9660 object directly as callback. Remove cleanups and use
9661 symtab_collector::release_symtabs instead.
9662 (collect_symbols): Delete.
9663 (add_matching_symbols_to_info): Use lambdas.
9664 * macrocmd.c (print_macro_callback): Delete.
9665 (info_macro_command): Use a lambda.
9666 (info_macros_command): Pass print_macro_definition as callable
9668 (print_one_macro): Remove 'ignore' parameter.
9669 (macro_list_command): Adjust.
9670 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9671 (macro_for_each_data::user_data): Delete field.
9672 (foreach_macro): Adjust to call the function_view.
9673 (macro_for_each): Adjust to use function_view as callback type.
9674 (foreach_macro_in_scope): Adjust to call the function_view.
9675 (macro_for_each_in_scope): Adjust to use function_view as callback
9677 * macrotab.h: Include "common/function-view.h".
9678 (macro_callback_fn): Declare a prototype instead of a pointer.
9679 Remove "user_data" parameter.
9680 (macro_for_each, macro_for_each_in_scope): Adjust to use
9681 function_view as callback type.
9682 * psymtab.c (partial_map_expand_apply)
9683 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9684 Adjust to use function_view as callback type and to return bool.
9685 (psym_expand_symtabs_matching): Adjust to use function_view as
9687 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9688 to use function_view as callback type and to return bool.
9689 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9691 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9693 * symfile.h: Include "common/function-view.h".
9694 (expand_symtabs_file_matcher_ftype)
9695 (expand_symtabs_symbol_matcher_ftype)
9696 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9698 (quick_symbol_functions::map_symtabs_matching_filename)
9699 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9700 function_view as callback type and return bool.
9701 (expand_symtabs_matching): Adjust to use function_view as callback
9703 (maintenance_expand_name_matcher)
9704 (maintenance_expand_file_matcher): Delete.
9705 (maintenance_expand_symtabs): Use lambdas.
9706 * symtab.c (iterate_over_some_symtabs): Adjust to use
9707 function_view as callback types and return bool.
9708 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9710 (lookup_symtab_callback): Delete.
9711 (lookup_symtab): Use a lambda.
9712 (iterate_over_symbols): Adjust to use function_view as callback
9714 (struct search_symbols_data, search_symbols_file_matches)
9715 (search_symbols_name_matches): Delete.
9716 (search_symbols): Use a pair of lambdas.
9717 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9718 (symtab_expansion_callback): Delete.
9719 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9720 * symtab.h: Include "common/function-view.h".
9721 (iterate_over_some_symtabs): Adjust to use function_view as
9722 callback type and return bool.
9723 (iterate_over_symtabs): Adjust to use function_view as callback
9725 (symbol_found_callback_ftype): Remove 'data' parameter and return
9727 (iterate_over_symbols): Adjust to use function_view as callback
9730 2017-02-23 Pedro Alves <palves@redhat.com>
9732 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9733 (%.o) <unittests/%.c>: New pattern.
9734 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9735 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9736 * common/function-view.h: New file.
9737 * unittests/function-view-selftests.c: New file.
9738 * configure: Regenerate.
9740 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9742 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9744 * go32-nat.c (go32_thread_alive): Likewise.
9746 2017-02-23 Yao Qi <yao.qi@linaro.org>
9748 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9751 2017-02-23 Yao Qi <yao.qi@linaro.org>
9753 * varobj.c (varobj_clear_saved_item): Use delete instead of
9755 (update_dynamic_varobj_children): Likewise.
9757 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9759 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9761 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9763 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9764 m_enum_value to 0 in default constructor.
9766 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9768 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9769 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9770 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9771 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9772 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9773 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9774 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9775 IS_STORE_CONDITIONAL_INSN.
9777 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9779 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9781 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9783 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9785 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9787 * dwarf2read.c (skip_one_die, read_attribute_value)
9788 (dwarf2_const_value_attr, dump_die_shallow)
9789 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9790 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9792 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9794 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9795 (dwarf_parse_macro_header): Accept DWARF version 5.
9796 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9798 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9800 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9802 * common/common-exceptions.h (enum errors): Likewise.
9803 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9804 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9805 (dwarf_expr_context::execute_stack_op): Likewise.
9806 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9808 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9809 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9810 (show_entry_values_debug, call_site_to_target_addr)
9811 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9812 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9813 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9814 (value_of_dwarf_block_entry, indirect_pieced_value)
9815 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9816 (disassemble_dwarf_expression): Likewise.
9817 * dwarf2read.c (process_die, inherit_abstract_dies)
9818 (read_call_site_scope): Likewise.
9819 * gdbtypes.h (struct func_type, struct call_site_parameter)
9820 (struct call_site): Likewise.
9821 * stack.c (read_frame_arg): Likewise.
9822 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9824 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9826 * defs.h (read_unsigned_leb128): New declaration.
9827 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9828 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9829 (dwarf2_find_location_expression): Call also
9830 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9831 * dwarf2loc.h (dwarf2_version): New declaration.
9832 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9834 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9836 (struct dwop_section_names): Add loclists_dwo.
9837 (dwop_section_names): Add .debug_loclists.dwo.
9838 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9839 (struct dwarf2_per_cu_data): Add dwarf_version.
9840 (struct dwo_sections): Add loclists.
9841 (struct attr_abbrev): Add implicit_const.
9842 (read_indirect_line_string): New declaration.
9843 (read_unsigned_leb128): Delete declaration.
9844 (rcuh_kind): New definition.
9845 (read_and_check_comp_unit_head): Change parameter
9846 is_debug_types_section to section_kind.
9847 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9848 (read_comp_unit_head): Change parameter abfd to section, add parameter
9849 section_kind. Handle DWARF-5.
9850 (error_check_comp_unit_head): Accept also DWARF version 5.
9851 (read_and_check_comp_unit_head): Change parameter
9852 is_debug_types_section to section_kind.
9853 (read_and_check_type_unit_head): Delete function.
9854 (read_abbrev_offset): Handle DWARF-5.
9855 (create_debug_type_hash_table): Add parameter section_kind. Process
9856 only DW_UT_type. Use signature and type_offset_in_tu from struct
9858 (create_debug_types_hash_table): Update create_debug_type_hash_table
9860 (create_all_type_units): Call create_debug_type_hash_table.
9861 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9862 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9864 (skip_one_die): Handle DW_FORM_implicit_const.
9865 (dwarf2_rnglists_process): New function.
9866 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9867 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9868 (read_attribute_value): Handle DW_FORM_implicit_const,
9870 (read_attribute): Handle DW_FORM_implicit_const.
9871 (read_indirect_string_at_offset_from): New function from
9872 read_indirect_string_at_offset.
9873 (read_indirect_string_at_offset): Call
9874 read_indirect_string_at_offset_from.
9875 (read_indirect_line_string_at_offset): New function.
9876 (read_indirect_string): New function comment.
9877 (read_indirect_line_string): New function.
9878 (read_unsigned_leb128): Make it global.
9879 (dwarf2_string_attr): Handle DWARF-5.
9880 (add_include_dir_stub, read_formatted_entries): New functions.
9881 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9883 (per_cu_header_read_in): Update read_comp_unit_head caller.
9884 (dwarf2_version): New function.
9885 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9887 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9890 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9892 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9894 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9896 * dwarf2read.c (dwarf2_ranges_process): New function from
9898 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9899 dwarf2_ranges_process.
9901 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9903 * dwarf2read.c (create_debug_type_hash_table): New function from
9904 create_debug_types_hash_table.
9905 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9906 (create_all_type_units, open_and_init_dwo_file): Update
9907 create_debug_types_hash_table callers.
9909 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9912 * fork-child.c (trace_start_error): Fix thinko. va_end should
9913 refer to 'ap', not 'args'.
9915 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9916 Pedro Alves <palves@redhat.com>
9919 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9921 * fork-child.c (trace_start_error): New function.
9922 (trace_start_error_with_name): Likewise.
9923 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9924 * inf-ptrace.c (inf_ptrace_me): Likewise.
9925 * inferior.h (trace_start_error): New prototype.
9926 (trace_start_error_with_name): Likewise.
9928 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9931 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9932 NULL before using it.
9933 * symmisc.c (maintenance_print_symbols): Likewise.
9934 (maintenance_print_msymbols): Likewise.
9936 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9938 * NEWS: Add record Python bindings entry.
9940 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9942 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9944 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9945 * python/py-record-btrace.c, python/py-record-btrace.h,
9946 python/py-record-full.c, python/py-record-full.h: New file.
9947 * python/py-record.c: Add include for py-record-btrace.h and
9949 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9950 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9951 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9952 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9954 (gdbpy_initialize_btrace): New export.
9955 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9957 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9959 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9960 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9961 * python/py-record.c: New file.
9962 * python/python-internal.h (gdbpy_start_recording,
9963 gdbpy_current_recording, gdpy_stop_recording,
9964 gdbpy_initialize_record): New export.
9965 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9966 (python_GdbMethods): Add gdbpy_start_recording,
9967 gdbpy_current_recording and gdbpy_stop_recording.
9969 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9971 * record-btrace.c (record_btrace_record_method): New function.
9972 (init_record_btrace_ops): Initialize to_record_method.
9973 * record-full.c (record_full_record_method): New function.
9974 (init_record_full_ops, init_record_full_core_ops): Add
9975 record_full_record_method.
9976 * record.h (enum record_method): New enum.
9977 * target-debug.h (target_debug_print_enum_record_method: New define.
9978 * target-delegates.c: Regenerate.
9979 * target.c (target_record_method): New function.
9980 * target.h: Include record.h.
9981 (struct target_ops) <to_record_method>: New field.
9982 (target_record_method): New export.
9984 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9986 * record.h (record_start, record_stop): New export.
9987 * record.c (record_start, record_stop): New function.
9989 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9991 * btrace.c (btrace_fetch): Copy function call segments pointer
9993 (btrace_clear): Clear the vector.
9994 (btrace_find_insn_by_number): Use binary search to find the correct
9995 function call segment.
9996 * btrace.h (brace_fun_p): New typedef.
9997 (struct btrace_thread_info) <functions>: New field.
9999 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10001 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10002 * btrace.c (btrace_decode_error): ... here. New function.
10003 * btrace.h (btrace_decode_error): New export.
10005 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10007 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10008 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10009 btrace_find_insn_by_number): Remove special case for gaps.
10010 * btrace.h (btrace_insn_get_error): New export.
10011 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10012 * record-btrace.c (btrace_insn_history): Print number for gaps.
10013 (record_btrace_info, record_btrace_goto): Handle gaps.
10015 2017-02-14 Tom Tromey <tom@tromey.com>
10018 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10020 * python/py-evts.c (gdbpy_initialize_py_events): Add
10021 before_prompt registry.
10022 * python/py-events.h (events_object) <before_prompt>: New field.
10024 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10026 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10028 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10030 * symfile (_initialize_symfile): Add usage text to the load command's
10033 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10035 * utils.c (defaulted_query): Don't query on secondary UIs.
10037 2017-02-10 Tom Tromey <tom@tromey.com>
10039 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10041 2017-02-10 Tom Tromey <tom@tromey.com>
10043 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10045 * python/py-type.c (typy_legacy_template_argument): Remove
10046 unnecessary "cleanup" local.
10048 2017-02-10 Tom Tromey <tom@tromey.com>
10050 * python/python.c (do_start_initialization): New function, from
10051 _initialize_python.
10052 (_initialize_python): Call do_start_initialization.
10053 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10056 2017-02-10 Tom Tromey <tom@tromey.com>
10058 * python/py-prettyprint.c (pretty_print_one_value): Use
10061 2017-02-10 Tom Tromey <tom@tromey.com>
10063 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10064 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10066 * python/py-type.c (field_new): Use gdbpy_ref.
10067 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10069 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10070 (py_free_pspace): Likewise.
10071 (pspace_to_pspace_object): Likewise.
10072 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10073 (py_free_objfile): Likewise.
10074 (objfile_to_objfile_object): Likewise.
10075 * python/py-inferior.c (delete_thread_object): Use
10077 (infpy_read_memory): Likewise.
10078 (py_free_inferior): Likewise.
10079 * python/py-evtregistry.c (create_eventregistry_object): Use
10081 * python/py-event.c (create_event_object): Use gdbpy_ref.
10083 2017-02-10 Tom Tromey <tom@tromey.com>
10085 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10086 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10088 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10089 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10090 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10091 python/py-framefilter.c, python/py-function.c,
10092 python/py-inferior.c, python/py-infevents.c,
10093 python/py-linetable.c, python/py-newobjfileevent.c,
10094 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10095 python/py-signalevent.c, python/py-stopevent.c,
10096 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10097 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10098 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10099 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10101 2017-02-10 Tom Tromey <tom@tromey.com>
10103 * ui-out.h (ui_out_emit_type): New class.
10104 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10105 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10106 and ui_out_emit_tuple.
10107 (enumerate_locals): Likewise.
10108 (py_mi_print_variables, py_print_locals, py_print_args): Use
10110 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10112 * common/gdb_optional.h: New file.
10114 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10116 * MAINTAINERS (Write After Approval): Update my e-mail address.
10118 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10121 * breakpoint.c (_initialize_breakpoint): Update the help description
10122 of the 'commands' command to indicate that it takes a list argument.
10124 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10126 * interps.c (current_interp_set_logging): Remove "return".
10128 2017-02-09 Gary Benson <gbenson@redhat.com>
10130 * symtab.c (add_symtab_completions): Prevent NULL pointer
10133 2017-02-08 Pedro Alves <palves@redhat.com>
10135 * interps.c (interp::interp): Remove reference to quiet_p.
10136 (interp_set): Make static. Remove dead "Switching to" output
10138 (interp_quiet_p, interp_set_quiet): Delete.
10139 (interpreter_exec_cmd): Don't set the interpreter quiet.
10140 * interps.h (interp_quiet_p): Make static.
10141 (class interp) <quiet_p>: Remove field
10143 2017-02-08 Jerome Guitton <guitton@adacore.com>
10145 * cli/cli-decode.c (find_command_name_length): Make it extern.
10146 * cli/cli-decode.h (find_command_name_length): Declare.
10147 * cli/cli-script.c (command_name_equals, line_first_arg):
10149 (process_next_line): Use cli-decode to parse command names.
10150 (build_command_line): Make args a constant pointer.
10152 2017-02-08 Jerome Guitton <guitton@adacore.com>
10154 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10155 Remove case-insensitive search.
10157 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10159 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10160 at the end of the line. Avoids an ARI warning.
10162 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10164 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10165 rdseed instructions.
10166 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10168 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10171 Provide and use sparc32 and sparc64 target description XML files.
10172 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10173 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10174 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10175 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10176 * features/sparc/sparc32-solaris.xml: New file.
10177 * features/sparc/sparc64-solaris.xml: New file.
10178 * features/sparc/sparc32-solaris.c: Generated.
10179 * features/sparc/sparc64-solaris.c: Generated.
10180 * sparc-tdep.h: Account for differences in target descriptions.
10181 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10182 (sparc32_register_type): Use target provided registers.
10183 (validate_tdesc_registers): New function.
10184 (sparc32_gdbarch_init): Use tdesc_has_registers.
10185 Set pseudoregister functions.
10186 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10187 (sparc64_register_type): Use target provided registers.
10188 (sparc64_init_abi): Set pseudoregister functions.
10190 2017-02-03 Tom Tromey <tom@tromey.com>
10193 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10194 with a single member.
10196 2017-02-03 Pedro Alves <palves@redhat.com>
10198 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10199 (cli_interp_base::~cli_interp_base): New.
10200 (cli_interp): New struct.
10201 (as_cli_interp): Cast the interp itself to cli_interp.
10202 (cli_interpreter_pre_command_loop): Rename to ...
10203 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10205 (cli_interpreter_init): Rename to ...
10206 (cli_interp::init): ... this. Remove 'self' parameter. Use
10207 boolean. Make extern.
10208 (cli_interpreter_resume): Rename to ...
10209 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10211 (cli_interpreter_suspend): Rename to ...
10212 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10214 (cli_interpreter_exec): Rename to ...
10215 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10217 (cli_interpreter_supports_command_editing): Rename to ...
10218 (cli_interp_base::supports_command_editing): ... this. Remove
10219 'interp' parameter. Make extern.
10220 (cli_ui_out): Rename to ...
10221 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10223 (cli_set_logging): Rename to ...
10224 (cli_interp_base::set_logging): ... this. Remove 'interp'
10225 parameter. Make extern.
10226 (cli_interp_procs): Delete.
10227 (cli_interp_factory): Adjust to use "new".
10228 * cli/cli-interp.h: Include "interps.h".
10229 (struct cli_interp_base): New struct.
10230 * interps.c (struct interp): Delete. Fields moved to interps.h.
10231 (interp_new): Delete.
10232 (interp::interp, interp::~interp): New.
10233 (interp_set): Use bool, and return void. Assume the interpreter
10234 has suspend, init and resume methods, and that the all return
10236 (set_top_level_interpreter): interp_set returns void.
10237 (interp_ui_out): Adapt.
10238 (current_interp_set_logging): Adapt.
10239 (interp_data): Delete.
10240 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10241 (interp_exec): Adapt.
10242 (top_level_interpreter_data): Delete.
10243 * interps.h (interp_init_ftype, interp_resume_ftype)
10244 (interp_suspend_ftype, interp_exec_ftype)
10245 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10246 (class interp): New.
10247 (interp_new): Delete.
10248 (interp_set): Now returns void. Use bool.
10249 (interp_data, top_level_interpreter_data): Delete.
10250 * mi/mi-common.h: Include interps.h.
10251 (class mi_interp): Inherit from interp. Define a ctor. Declare
10252 init, resume, suspect, exec, interp_ui_out, set_logging and
10253 pre_command_loop methods.
10254 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10255 (mi_interpreter_init): Rename to ...
10256 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10257 bool, return void and make extern. Adjust.
10258 (mi_interpreter_resume): ... Rename to ...
10259 (mi_interp::resume): ... this. Remove the 'data' parameter,
10260 return void and make extern. Adjust.
10261 (mi_interpreter_suspend): ... Rename to ...
10262 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10263 return void and make extern. Adjust.
10264 (mi_interpreter_exec): ... Rename to ...
10265 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10267 (mi_interpreter_pre_command_loop): ... Rename to ...
10268 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10269 parameter and make extern.
10270 (mi_on_normal_stop_1): Adjust.
10271 (mi_ui_out): Rename to ...
10272 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10273 parameter and make extern. Adjust.
10274 (mi_set_logging): Rename to ...
10275 (mi_interp::set_logging): ... this. Remove the 'interp'
10276 parameter and make extern. Adjust.
10277 (mi_interp_procs): Delete.
10278 (mi_interp_factory): Adjust to use 'new'.
10279 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10280 (mi_print_exception, mi_execute_command, mi_load_progress):
10282 * tui/tui-interp.c (tui_interp): New class.
10283 (as_tui_interp): Return a tui_interp pointer.
10284 (tui_on_normal_stop, tui_on_signal_received)
10285 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10286 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10287 to use interp::interp_ui_out.
10288 (tui_init): Rename to ...
10289 (tui_interp::init): ... this. Remove the 'self' parameter, use
10290 bool, return void and make extern. Adjust.
10291 (tui_resume): Rename to ...
10292 (tui_interp::resume): ... this. Remove the 'data' parameter,
10293 return void and make extern. Adjust.
10294 (tui_suspend): Rename to ...
10295 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10296 return void and make extern. Adjust.
10297 (tui_ui_out): Rename to ...
10298 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10299 parameter, and make extern. Adjust.
10300 (tui_exec): Rename to ...
10301 (tui_interp::exec): ... this. Remove the 'data' parameter and
10303 (tui_interp_procs): Delete.
10304 (tui_interp_factory): Use "new".
10306 2017-02-02 Tom Tromey <tom@tromey.com>
10308 * rust-exp.y (ends_raw_string, space_then_number)
10309 (rust_identifier_start_p): Return bool.
10310 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10311 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10312 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10313 (rust_chartype_p): Return bool.
10314 (val_print_struct, rust_print_struct_def, rust_print_type):
10316 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10319 2017-02-02 Tom Tromey <tom@tromey.com>
10321 * rust-lang.c: Reindent.
10323 2017-02-02 Tom Tromey <tom@tromey.com>
10325 * rust-lang.h (rust_crate_for_block): Update.
10326 * rust-lang.c (rust_crate_for_block): Return std::string.
10327 (rust_get_disr_info): Use std:;string, not
10328 gdb::unique_xmalloc_ptr.
10329 * rust-exp.y (crate_name): Update.
10331 2017-02-02 Pedro Alves <palves@redhat.com>
10333 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10334 field out of gdb_disassembler_test and make it static.
10336 2017-02-02 Pedro Alves <palves@redhat.com>
10338 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10339 mi1_interp and mi_interp fields.
10341 2017-02-02 Pedro Alves <palves@redhat.com>
10343 * cli/cli-interp.c (struct saved_output_files, saved_output):
10344 Moved from cli/cli-logging.c.
10345 (cli_set_logging): New function.
10346 (cli_interp_procs): Install cli_set_logging.
10347 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10349 * cli/cli-logging.c (struct saved_output_files, saved_output):
10350 Moved to cli/cli-interp.c.
10351 (pop_output_files): Don't save outputs here.
10352 (make_logging_output): New function.
10353 (handle_redirections): Don't build tee nor save previous outputs
10355 * interps.c (current_interp_set_logging): Change prototype.
10356 Assume there's always a set_logging_proc method installed.
10357 * interps.h (interp_set_logging_ftype): Change prototype.
10358 (current_interp_set_logging): Change prototype and adjust comment.
10359 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10360 use make_logging_output.
10361 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10362 2017-02-02 Pedro Alves <palves@redhat.com>
10364 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10366 (set_logging_overwrite): ... here.
10367 (logging_no_redirect_file): Delete.
10368 (set_logging_redirect): Don't handle redirection on the fly.
10369 Instead warn that "logging off" / "logging on" is necessary.
10370 (pop_output_files): Delete references to logging_no_redirect_file.
10371 (show_logging_command): Always speak in terms of what will happen
10372 once logging is reenabled.
10374 2017-02-02 Pedro Alves <palves@redhat.com>
10376 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10378 2017-02-02 Pedro Alves <palves@redhat.com>
10380 * disasm.c (gdb_pretty_print_insn): Rename to ...
10381 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10382 Remove gdbarch parameter. Adapt to clear the object's buffers
10383 instead of allocating new buffers, and to print using the object's
10384 gdb_disassembler instead of calling gdb_print_insn.
10385 (dump_insns): Use gdb_pretty_print_disassembler.
10386 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10387 (gdb_pretty_print_disassembler): New class.
10388 * record-btrace.c (btrace_insn_history): Use
10389 gdb_pretty_print_disassembler.
10391 2017-02-02 Pedro Alves <palves@redhat.com>
10393 * ada-lang.c (type_as_string): Use string_file.
10394 * ada-valprint.c (ada_print_floating): Use string_file.
10395 * ada-varobj.c (ada_varobj_scalar_image)
10396 (ada_varobj_get_value_image): Use string_file.
10397 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10398 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10399 * breakpoint.c (update_inserted_breakpoint_locations)
10400 (insert_breakpoint_locations, reattach_breakpoints)
10401 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10402 (print_it_watchpoint): Use string_file.
10403 (save_breakpoints): Use stdio_file.
10404 * c-exp.y (oper): Use string_file.
10405 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10407 (pop_output_files): Use delete.
10408 (handle_redirections): Use stdio_file and tee_file.
10409 * cli/cli-setshow.c (do_show_command): Use string_file.
10410 * compile/compile-c-support.c (c_compute_program): Use
10412 * compile/compile-c-symbols.c (generate_vla_size): Take a
10413 'string_file &' instead of a 'ui_file *'.
10414 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10415 of a 'ui_file *'. Use string_file.
10416 (generate_c_for_variable_locations): Take a 'string_file &'
10417 instead of a 'ui_file *'.
10418 * compile/compile-internal.h (generate_c_for_for_one_variable):
10419 Take a 'string_file &' instead of a 'ui_file *'.
10420 * compile/compile-loc2c.c (push, pushf, unary, binary)
10421 (print_label, pushf_register_address, pushf_register)
10422 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10423 'ui_file *'. Adjust.
10424 * compile/compile.c (compile_to_object): Use string_file.
10425 * compile/compile.h (compile_dwarf_expr_to_c)
10426 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10428 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10429 (replace_typedefs_qualified_name): Use string_file and
10431 * disasm.c (gdb_pretty_print_insn): Use string_file.
10432 (gdb_disassembly): Adjust reference the null_stream global.
10433 (do_ui_file_delete): Delete.
10434 (gdb_insn_length): Use null_stream.
10435 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10436 * dwarf2loc.c (dwarf2_compile_property_to_c)
10437 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10438 'string_file &' instead of a 'ui_file *'.
10439 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10440 * dwarf2read.c (do_ui_file_peek_last): Delete.
10441 (dwarf2_compute_name): Use string_file.
10442 * event-top.c (gdb_setup_readline): Use stdio_file.
10443 * gdbarch.sh (verify_gdbarch): Use string_file.
10444 * gdbtypes.c (safe_parse_type): Use null_stream.
10445 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10447 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10448 'string_file *' instead of a 'ui_file *'.
10449 (gdbscm_arch_disassemble): Use string_file.
10450 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10451 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10452 inherits from ui_file.
10453 (ioscm_file_port_delete, ioscm_file_port_rewind)
10454 (ioscm_file_port_put): Delete.
10455 (ioscm_file_port_write): Rename to ...
10456 (ioscm_file_port::write): ... this. Remove file_port_magic
10458 (ioscm_file_port_new): Delete.
10459 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10461 * guile/scm-type.c (tyscm_type_name): Use string_file.
10462 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10464 * infcmd.c (print_return_value_1): Use string_file.
10465 * infrun.c (print_target_wait_results): Use string_file.
10466 * language.c (add_language): Use string_file.
10467 * location.c (explicit_to_string_internal): Use string_file.
10468 * main.c (captured_main_1): Use null_file.
10469 * maint.c (maintenance_print_architecture): Use stdio_file.
10470 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10471 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10472 event_channel>: Change type to mi_console_file pointer.
10473 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10474 (mi_console_file_delete): Delete.
10475 (struct mi_console_file): Delete.
10476 (mi_console_file_magic): Delete.
10477 (mi_console_file_new): Delete.
10478 (mi_console_file::mi_console_file): New.
10479 (mi_console_file_delete): Delete.
10480 (mi_console_file_fputs): Delete.
10481 (mi_console_file::write): New.
10482 (mi_console_raw_packet): Delete.
10483 (mi_console_file::flush): New.
10484 (mi_console_file_flush): Delete.
10485 (mi_console_set_raw): Rename to ...
10486 (mi_console_file::set_raw): ... this.
10487 * mi/mi-console.h (class mi_console_file): New class.
10488 (mi_console_file_new, mi_console_set_raw): Delete.
10489 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10490 (mi_set_logging): Use delete and tee_file. Adjust.
10491 * mi/mi-main.c (output_register): Use string_file.
10492 (mi_cmd_data_evaluate_expression): Use string_file.
10493 (mi_cmd_data_read_memory): Use string_file.
10494 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10495 * mi/mi-out.c (mi_ui_out::main_stream): New.
10496 (mi_ui_out::rewind): Use main_stream and
10498 (mi_ui_out::put): Use main_stream and string_file.
10499 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10500 Allocate a 'string_file' instead.
10501 (mi_out_new): Don't allocate a mem_fileopen stream here.
10502 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10503 (mi_ui_out::main_stream): Declare method.
10504 * printcmd.c (eval_command): Use string_file.
10505 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10506 * python/py-arch.c (archpy_disassemble): Use string_file.
10507 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10508 * python/py-frame.c (frapy_str): Use string_file.
10509 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10511 * python/py-type.c (typy_str): Use string_file.
10512 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10513 * python/py-value.c (valpy_str): Use string_file.
10514 * record-btrace.c (btrace_insn_history): Use string_file.
10515 * regcache.c (regcache_print): Use stdio_file.
10516 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10517 * remote.c (escape_buffer): Use string_file.
10518 * rust-lang.c (rust_get_disr_info): Use string_file.
10519 * serial.c (serial_open_ops_1): Use stdio_file.
10520 (do_serial_close): Use delete.
10521 * stack.c (print_frame_arg): Use string_file.
10522 (print_frame_args): Remove local mem_fileopen stream, not used.
10523 (print_frame): Use string_file.
10524 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10525 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10526 Take a 'string_file *' instead of a 'ui_file *'.
10527 * top.c (new_ui): Use stdio_file and stderr_file.
10528 (free_ui): Use delete.
10529 (execute_command_to_string): Use string_file.
10530 (quit_confirm): Use string_file.
10531 * tracepoint.c (collection_list::append_exp): Use string_file.
10532 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10533 * tui/tui-file.c: Don't include "ui-file.h".
10534 (enum streamtype, struct tui_stream): Delete.
10535 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10536 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10537 (tui_file::tui_file): New method.
10538 (tui_file_fputs): Delete.
10539 (tui_file_get_strbuf): Delete.
10540 (tui_file::puts): New method.
10541 (tui_file_adjust_strbuf): Delete.
10542 (tui_file_flush): Delete.
10543 (tui_file::flush): New method.
10544 * tui/tui-file.h: Tweak intro comment.
10546 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10547 (tui_file_adjust_strbuf): Delete declarations.
10548 (class tui_file): New class.
10549 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10550 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10551 (tui_register_format): Use string_stream.
10552 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10553 (tui_get_function_from_frame): Use string_file.
10554 * typeprint.c (type_to_string): Use string_file.
10555 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10556 (null_stream): New global.
10557 (ui_file_delete): Delete.
10558 (ui_file::ui_file): New.
10559 (null_file_isatty): Delete.
10560 (ui_file::~ui_file): New.
10561 (null_file_rewind): Delete.
10562 (ui_file::printf): New.
10563 (null_file_put): Delete.
10564 (null_file_flush): Delete.
10565 (ui_file::putstr): New.
10566 (null_file_write): Delete.
10567 (ui_file::putstrn): New.
10568 (null_file_read): Delete.
10569 (ui_file::putc): New.
10570 (null_file_fputs): Delete.
10571 (null_file_write_async_safe): Delete.
10572 (ui_file::vprintf): New.
10573 (null_file_delete): Delete.
10574 (null_file::write): New.
10575 (null_file_fseek): Delete.
10576 (null_file::puts): New.
10577 (ui_file_data): Delete.
10578 (null_file::write_async_safe): New.
10579 (gdb_flush, ui_file_isatty): Adjust.
10580 (ui_file_put, ui_file_rewind): Delete.
10581 (ui_file_write): Adjust.
10582 (ui_file_write_for_put): Delete.
10583 (ui_file_write_async_safe, ui_file_read): Adjust.
10584 (ui_file_fseek): Delete.
10585 (fputs_unfiltered): Adjust.
10586 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10587 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10588 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10589 (set_ui_file_data): Delete.
10590 (string_file::~string_file, string_file::write)
10591 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10592 (do_ui_file_as_string, ui_file_as_string): Delete.
10593 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10594 (struct mem_file): Delete.
10595 (mem_file_new): Delete.
10596 (stdio_file::stdio_file): New.
10597 (mem_file_delete): Delete.
10598 (stdio_file::stdio_file): New.
10599 (mem_fileopen): Delete.
10600 (stdio_file::~stdio_file): New.
10601 (mem_file_rewind): Delete.
10602 (stdio_file::set_stream): New.
10603 (mem_file_put): Delete.
10604 (stdio_file::open): New.
10605 (mem_file_write): Delete.
10606 (stdio_file_magic, struct stdio_file): Delete.
10607 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10608 (stdio_file::flush): New.
10609 (stdio_file_read): Rename to ...
10610 (stdio_file::read): ... this. Adjust.
10611 (stdio_file_write): Rename to ...
10612 (stdio_file::write): ... this. Adjust.
10613 (stdio_file_write_async_safe): Rename to ...
10614 (stdio_file::write_async_safe) ... this. Adjust.
10615 (stdio_file_fputs): Rename to ...
10616 (stdio_file::puts) ... this. Adjust.
10617 (stdio_file_isatty): Delete.
10618 (stdio_file_fseek): Delete.
10619 (stdio_file::isatty): New.
10620 (stderr_file_write): Rename to ...
10621 (stderr_file::write) ... this. Adjust.
10622 (stderr_file_fputs): Rename to ...
10623 (stderr_file::puts) ... this. Adjust.
10624 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10625 (stderr_file::stderr_file): New.
10626 (tee_file_magic): Delete.
10627 (struct tee_file): Delete.
10628 (tee_file::tee_file): New.
10629 (tee_file_new): Delete.
10630 (tee_file::~tee_file): New.
10631 (tee_file_delete): Delete.
10632 (tee_file_flush): Rename to ...
10633 (tee_file::flush): ... this. Adjust.
10634 (tee_file_write): Rename to ...
10635 (tee_file::write): ... this. Adjust.
10636 (tee_file::write_async_safe): New.
10637 (tee_file_fputs): Rename to ...
10638 (tee_file::puts): ... this. Adjust.
10639 (tee_file_isatty): Rename to ...
10640 (tee_file::isatty): ... this. Adjust.
10641 * ui-file.h (struct obstack, struct ui_file): Don't
10643 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10644 (ui_file_write_ftype)
10645 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10646 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10647 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10648 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10649 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10650 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10651 (set_ui_file_fseek): Delete.
10652 (ui_file_data, ui_file_delete, ui_file_rewind)
10653 (struct ui_file): New.
10655 (class null_file): New.
10656 (null_stream): Declare.
10657 (ui_file_write_for_put, ui_file_put): Delete.
10658 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10660 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10661 (gdb_fopen, tee_file_new): Delete.
10662 (struct string_file): New.
10663 (struct stdio_file): New.
10664 (stdio_file_up): New.
10665 (struct stderr_file): New.
10666 (class tee_file): New.
10667 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10668 of a 'ui_file *'. Adjust.
10669 * ui-out.h (class ui_out) <field_stream>: Likewise.
10670 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10671 (null_stream): Delete.
10672 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10674 * utils.h (struct ui_file): Delete forward declaration..
10675 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10676 (error_stream): Take a 'string_file &' instead of a
10678 * varobj.c (varobj_value_get_print_value): Use string_file.
10679 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10680 * gdbarch.c: Regenerate.
10682 2017-02-02 Pedro Alves <palves@redhat.com>
10684 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10685 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10686 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10687 Adjust to call gdb_print_insn instead of
10688 gdb_disassembler::print_insn.
10689 (dump_insns, do_mixed_source_and_assembly_deprecated)
10690 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10691 'gdbarch' parameter. Remove gdb_disassembler parameter.
10692 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10693 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10695 (gdb_pretty_print_insn): Re-add declaration.
10696 * record-btrace.c (btrace_insn_history): Don't allocate a
10697 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10699 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10701 * disasm.h (gdb_disassembly): Remove file_string parameter.
10702 * disasm.c (gdb_disassembly): Likewise.
10703 * cli/cli-cmds.c (print_disassembly): Adapt.
10704 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10705 * stack.c (do_gdb_disassembly): Likewise.
10707 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10709 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10710 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10711 targets. And if the implicit value is longer than needed, extract
10712 the first bytes instead of the "least significant" ones.
10714 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10716 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10717 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10718 (btrace_fetch): Assert can_access_registers_ptid.
10719 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10720 validate_registers_access.
10722 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10724 * gdbthread.h (can_access_registers_ptid): New.
10725 * thread.c (can_access_registers_ptid): New.
10727 2017-02-01 Pedro Alves <palves@redhat.com>
10729 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10731 2017-01-31 Pedro Alves <palves@redhat.com>
10733 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10736 2017-01-31 Pedro Alves <palves@redhat.com>
10738 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10741 2017-01-31 Pedro Alves <palves@redhat.com>
10743 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10745 2017-01-31 Pedro Alves <palves@redhat.com>
10747 * common/scoped_restore.h
10748 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10749 change the value's parameter type to T2.
10750 (make_scoped_restore): Likewise.
10752 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10753 Richard Henderson <rth@redhat.com>
10755 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10756 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10757 GS_BASE for older kernels.
10758 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10759 GS_BASE for older kernels.
10760 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10761 and GS_BASE to the offset table.
10762 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10763 system register group.
10764 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10766 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10768 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10769 AMD64_GSBASE_REGNUM.
10770 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10771 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10772 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10773 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10774 i386/64bit-segments.xml in those rules.
10775 * features/i386/64bit-segments.xml: New file.
10776 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10777 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10778 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10779 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10780 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10781 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10782 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10783 * features/i386/amd64-avx-linux.c: Regenerated.
10784 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10785 * features/i386/amd64-avx-mpx.c: Regenerated.
10786 * features/i386/amd64-avx512-linux.c: Regenerated.
10787 * features/i386/amd64-linux.c: Regenerated.
10788 * features/i386/amd64-mpx-linux.c: Regenerated.
10789 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10790 * features/i386/i386-avx-mpx.c: Regenerated.
10791 * features/i386/x32-avx-linux.c: Regenerated.
10792 * features/i386/x32-avx512-linux.c: Regenerated.
10793 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10794 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10795 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10796 * regformats/i386/amd64-linux.dat: Regenerated.
10797 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10798 * regformats/i386/x32-avx-linux.dat: Regenerated.
10799 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10800 * regformats/i386/x32-linux.dat: Regenerated.
10802 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10804 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10805 Set to AMD64_NUM_REGS.
10807 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10809 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10810 that checks validity of a register number.
10812 2017-01-27 Kees Cook <keescook@google.com>
10814 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10815 fetch_fpregs if target has fpa registers.
10816 (arm_linux_store_inferior_registers): Call store_fpregs if target
10819 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10821 * cris-tdep.c (cris_gdbarch_init): Remove check for
10822 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10824 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10826 * corelow.c (get_core_register_section): Check for regset
10827 existence before checking for REGSET_VARIABLE_SIZE.
10829 2017-01-26 Yao Qi <yao.qi@linaro.org>
10830 Pedro Alves <palves@redhat.com>
10833 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10834 call memory_error, save memaddr instead.
10835 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10836 negative, cal memory_error.
10837 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10839 2017-01-26 Yao Qi <yao.qi@linaro.org>
10841 * disasm-selftests.c (memory_error_test): New function.
10842 (_initialize_disasm_selftests): Register memory_error_test.
10844 2017-01-26 Yao Qi <yao.qi@linaro.org>
10846 * Makefile.in (SFILES): Add disasm-selftests.c and
10848 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10849 * disasm-selftests.c: New file.
10850 * selftest-arch.c: New file.
10851 * selftest-arch.h: New file.
10853 2017-01-26 Yao Qi <yao.qi@linaro.org>
10855 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10856 to bfd_arch_mep. Don't return 0 if section is not
10857 found. Call print_insn_mep.
10859 2017-01-26 Pedro Alves <palves@redhat.com>
10860 Yao Qi <yao.qi@linaro.org>
10862 * arm-tdep.c: Include "disasm.h".
10863 (gdb_print_insn_arm): Update code to get gdbarch.
10864 * disasm.c (dis_asm_read_memory): Change it to
10865 gdb_disassembler::dis_asm_read_memory.
10866 (dis_asm_memory_error): Likewise.
10867 (dis_asm_print_address): Likewise.
10868 (gdb_pretty_print_insn): Change it to
10869 gdb_disassembler::pretty_print_insn.
10870 (dump_insns): Add one argument gdb_disassemlber. All
10872 (do_mixed_source_and_assembly_deprecated): Likewise.
10873 (do_mixed_source_and_assembly): Likewise.
10874 (do_assembly_only): Likewise.
10875 (gdb_disassembler::gdb_disassembler): New.
10876 (gdb_disassembler::print_insn): New.
10877 * disasm.h (class gdb_disassembler): New.
10878 (gdb_pretty_print_insn): Remove declaration.
10879 (gdb_disassemble_info): Likewise.
10880 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10881 (gdbscm_disasm_read_memory_worker): Update.
10882 (gdbscm_disasm_read_memory): Update.
10883 (gdbscm_disasm_memory_error): Remove.
10884 (gdbscm_disasm_print_address): Remove.
10885 (gdbscm_disassembler::gdbscm_disassembler): New.
10886 (gdbscm_print_insn_from_port): Update.
10887 * mips-tdep.c: Include disasm.h.
10888 (gdb_print_insn_mips): Update code to get gdbarch.
10889 * record-btrace.c (btrace_insn_history): Update.
10890 * spu-tdep.c: Include disasm.h.
10891 (struct spu_dis_asm_data): Remove.
10892 (struct spu_dis_asm_info): New.
10893 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10895 (gdb_print_insn_spu): Cast disassemble_info to
10898 2017-01-26 Yao Qi <yao.qi@linaro.org>
10900 * disasm.c (do_ui_file_delete): Delete.
10901 (gdb_insn_length): Move code creating stream to ...
10902 * utils.c (null_stream): ... here. New function.
10903 * utils.h (null_stream): Declare.
10905 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10907 * python/py-inferior.c (find_thread_object): Return directly
10908 from the loop. Remove "found" variable.
10910 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10912 GDB 7.12.1 released.
10914 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10916 * python/py-function.c (fnpy_call): Reorder declarations to have
10917 the gdbpy_enter object declared first.
10918 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10920 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10923 * python/python-internal.h (PyMem_RawMalloc): Define for
10925 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10926 PyMem_RawMalloc instead of PyMem_Malloc.
10928 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10929 Luis Machado <lgustavo@codesourcery.com>
10931 * NEWS (New commands): Mention flash-erase.
10932 (New MI commands): Mention target-flash-erase.
10933 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10935 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10936 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10937 * target.c (flash_erase_command): New function.
10938 (initialize_targets): Add new flash-erase command.
10939 * target.h (flash_erase_command): New declaration.
10941 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10943 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10944 HAVE_SYS_PROCFS_H is defined.
10946 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10948 * remote.c (struct cached_reg): Change data into a pointer.
10949 * (stop_reply_dtr): Free data pointers before deleting vector.
10950 (process_stop_reply): Likewise.
10951 (remote_parse_stop_reply): Allocate space for data
10953 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10955 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10957 (amd64_pseudo_register_read_value): Likewise.
10958 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10959 (store_register_using_P): Likewise.
10960 * regcache.c (regcache_xfer_part): Likewise.
10962 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10964 Split real and pseudo registers.
10965 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10966 (sparc32_pseudo_regnum): New enum.
10967 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10968 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10969 (SPARC32_CP0_REGISTERS): New macro.
10970 (sparc32_pseudo_register_name): New function.
10971 (sparc32_register_name): Use sparc32_pseudo_register_name.
10972 (sparc32_pseudo_register_type): New function.
10973 (sparc32_register_type): Use sparc32_pseudo_register_type.
10974 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10975 pseudo register numbers.
10976 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10977 (SPARC64_CP0_REGISTERS): New macro.
10978 (sparc64_pseudo_register_name): New function.
10979 (sparc64_register_name): Use sparc64_pseudo_register_name.
10980 (sparc64_pseudo_register_type): New function.
10981 (sparc64_register_type): Use sparc64_pseudo_register_type.
10982 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10983 pseudo register numbers.
10984 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10985 sparc64_store_arguments): Handle pseudo register numbers.
10987 2017-01-13 Yao Qi <yao.qi@linaro.org>
10989 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10990 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10992 (getpkt_or_notif_sane_1): Likewise.
10994 2017-01-13 Yao Qi <yao.qi@linaro.org>
10996 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10997 of CC. Pass "-x c++-header" instead of "-x c".
10999 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11001 * remote.c (remote_can_async_p): Update comment.
11003 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11005 * linux-nat.c (linux_nat_can_async_p): Update comment.
11007 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11009 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11011 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11013 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11015 2017-01-10 Tom Tromey <tom@tromey.com>
11017 * python/py-type.c (typy_legacy_template_argument): Update.
11018 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11019 ~demangle_parse_info): Declare new members.
11020 (cp_demangled_name_to_comp): Return unique_ptr.
11021 (cp_demangled_name_parse_free)
11022 (make_cleanup_cp_demangled_name_parse_free)
11023 (cp_new_demangle_parse_info): Remove.
11024 * cp-support.c (do_demangled_name_parse_free_cleanup)
11025 (make_cleanup_cp_demangled_name_parse_free): Remove.
11026 (inspect_type, cp_canonicalize_string_full)
11027 (cp_canonicalize_string): Update.
11028 (mangled_name_to_comp): Change return type.
11029 (cp_class_name_from_physname, method_name_from_physname)
11030 (cp_func_name, cp_remove_params): Update.
11031 * cp-name-parser.y (demangle_parse_info): New constructor, from
11032 cp_new_demangle_parse_info.
11033 (~demangle_parse_info): New destructor, from
11034 cp_demangled_name_parse_free.
11035 (cp_merge_demangle_parse_infos): Update.
11036 (cp_demangled_name_to_comp): Change return type.
11038 2017-01-10 Tom Tromey <tom@tromey.com>
11040 * top.c (prevent_dont_repeat): Change return type.
11041 * python/python.c (execute_gdb_command): Use std::string.
11043 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11044 * command.h (prevent_dont_repeat): Change return type.
11045 * breakpoint.c (bpstat_do_actions_1): Update.
11047 2017-01-10 Tom Tromey <tom@tromey.com>
11049 * value.h (scoped_value_mark::~scoped_value_mark): Call
11051 (scoped_value_mark::free_to_mark): New method.
11052 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11055 2017-01-10 Tom Tromey <tom@tromey.com>
11057 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11058 (valpy_reference_value, valpy_const_value, valpy_get_address)
11059 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11060 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11061 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11062 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11064 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11065 * value.h (scoped_value_mark): New class.
11067 2017-01-10 Tom Tromey <tom@tromey.com>
11069 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11070 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11071 * psymtab.c (discard_psymtabs_upto): Remove.
11072 (make_cleanup_discard_psymtabs): Remove.
11073 (struct psymtab_state): Remove.
11075 2017-01-10 Tom Tromey <tom@tromey.com>
11077 * record-full.c (record_full_save_cleanups): Remove.
11078 (record_full_save): Use gdb::unlinker.
11079 * gcore.c (do_bfd_delete_cleanup): Remove.
11080 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11082 * dwarf2read.c (unlink_if_set): Remove.
11083 (write_psymtabs_to_index): Use gdb::unlinker.
11084 * common/gdb_unlinker.h: New file.
11086 2017-01-10 Tom Tromey <tom@tromey.com>
11088 * windows-tdep.c (windows_xfer_shared_library): Update.
11089 * windows-nat.c (windows_make_so): Update.
11090 * utils.h (make_cleanup_bfd_unref): Remove.
11091 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11092 * symfile.h (symfile_bfd_open)
11093 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11094 * symfile.c (read_symbols, symbol_file_add)
11095 (separate_debug_file_exists): Update.
11096 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11097 (generic_load, reread_symbols): Update.
11098 * symfile-mem.c (symbol_file_add_from_memory): Update.
11099 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11100 (spu_symbol_file_add_from_memory): Update.
11101 * solist.h (struct target_so_ops) <bfd_open>: Return
11103 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11104 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11106 (solib_map_sections, reload_shared_libraries_1): Update.
11107 * solib-svr4.c (enable_break): Update.
11108 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11109 * solib-frv.c (enable_break2): Update.
11110 * solib-dsbt.c (enable_break): Update.
11111 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11113 (darwin_solib_get_all_image_info_addr_at_init): Update.
11114 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11115 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11116 * record-full.c (record_full_save): Update.
11117 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11118 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11119 * minidebug.c (find_separate_debug_file_in_section): Return
11121 * machoread.c (macho_add_oso_symfile): Change abfd to
11123 (macho_symfile_read_all_oso): Update.
11124 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11125 (macho_symfile_read): Update.
11126 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11127 (jit_bfd_try_read_symtab): Update.
11128 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11129 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11130 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11132 (gdb_bfd_ref_policy): New struct.
11133 (gdb_bfd_ref_ptr): New typedef.
11134 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11135 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11136 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11138 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11139 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11140 (gcore_command): Update.
11141 * exec.c (exec_file_attach): Update.
11142 * elfread.c (elf_symfile_read): Update.
11143 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11144 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11145 (open_and_init_dwo_file): Update.
11146 (open_dwp_file): Return gdb_bfd_ref_ptr.
11147 (open_and_init_dwp_file): Update.
11148 * corelow.c (core_open): Update.
11149 * compile/compile-object-load.c (compile_object_load): Update.
11150 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11151 * coffread.c (coff_symfile_read): Update.
11152 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11153 gdb_bfd_ref_ptr. Rename.
11154 (dump_bfd_file, restore_command): Update.
11155 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11156 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11157 (find_separate_debug_file_by_buildid): Update.
11159 2017-01-10 Tom Tromey <tom@tromey.com>
11161 * common/gdb_ref_ptr.h: New file.
11162 * python/py-ref.h (struct gdbpy_ref_policy): New.
11163 (gdbpy_ref): Now a typedef.
11165 2017-01-10 Tom Tromey <tom@tromey.com>
11167 * utils.h (make_cleanup_htab_delete): Don't declare.
11168 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11170 * linespec.c (decode_compound_collector): Add constructor,
11172 (lookup_prefix_sym): Remove cleanup.
11173 (symtab_collector): Add constructor, destructor.
11174 (collect_symtabs_from_filename): Remove cleanup.
11175 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11176 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11178 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11179 * dwarf2read.c (dw2_expand_symtabs_matching)
11180 (dw2_map_symbol_filenames, dwarf_decode_macros)
11181 (write_psymtabs_to_index): Use htab_up.
11182 * dwarf2loc.c (func_verify_no_selftailcall)
11183 (call_site_find_chain_1, func_verify_no_selftailcall)
11184 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11185 std::vector, gdb::unique_xmalloc_ptr.
11186 (call_sitep): Remove typedef.
11187 (dwarf2_locexpr_baton_eval): Remove unused variable.
11189 2017-01-10 Tom Tromey <tom@tromey.com>
11191 * python/python-internal.h (make_cleanup_py_decref)
11192 (make_cleanup_py_xdecref): Don't declare.
11193 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11194 (py_xdecref, make_cleanup_py_xdecref): Remove.
11196 2017-01-10 Tom Tromey <tom@tromey.com>
11198 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11199 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11201 2017-01-10 Tom Tromey <tom@tromey.com>
11203 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11205 2017-01-10 Tom Tromey <tom@tromey.com>
11207 * python/py-utils.c (unicode_to_encoded_string)
11208 (python_string_to_target_string)
11209 (python_string_to_target_python_string)
11210 (python_string_to_host_string, gdbpy_obj_to_string)
11211 (get_addr_from_python): Use gdbpy_ref.
11213 2017-01-10 Tom Tromey <tom@tromey.com>
11215 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11218 2017-01-10 Tom Tromey <tom@tromey.com>
11220 * python/python.c (eval_python_command, gdbpy_decode_line)
11221 (gdbpy_run_events, gdbpy_start_type_printers)
11222 (gdbpy_apply_type_printers): Use gdbpy_ref.
11224 2017-01-10 Tom Tromey <tom@tromey.com>
11226 * python/py-param.c (get_doc_string, compute_enum_values): Use
11229 2017-01-10 Tom Tromey <tom@tromey.com>
11231 * python/py-inferior.c (find_thread_object, build_inferior_list):
11234 2017-01-10 Tom Tromey <tom@tromey.com>
11236 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11238 2017-01-10 Tom Tromey <tom@tromey.com>
11240 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11243 2017-01-10 Tom Tromey <tom@tromey.com>
11245 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11247 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11250 2017-01-10 Tom Tromey <tom@tromey.com>
11252 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11255 2017-01-10 Tom Tromey <tom@tromey.com>
11257 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11258 decref results of PyArg_ParseTupleAndKeywords.
11260 2017-01-10 Tom Tromey <tom@tromey.com>
11262 * python/python.c (python_run_simple_file): Use
11263 unique_xmalloc_ptr, gdbpy_ref.
11265 2017-01-10 Tom Tromey <tom@tromey.com>
11267 * python/py-prettyprint.c (print_stack_unless_memory_error)
11268 (print_string_repr, print_children): Use gdbpy_ref.
11269 (dummy_python_frame): New class.
11270 (dummy_python_frame::dummy_python_frame): Rename from
11271 push_dummy_python_frame.
11272 (py_restore_tstate): Remove.
11274 2017-01-10 Tom Tromey <tom@tromey.com>
11276 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11278 2017-01-10 Tom Tromey <tom@tromey.com>
11280 * python/python.c (ensure_python_env, restore_python_env):
11282 * python/python-internal.h (ensure_python_env): Don't declare.
11283 * varobj.h (varobj_ensure_python_env): Don't declare.
11284 * varobj.c (varobj_ensure_python_env): Remove.
11286 2017-01-10 Tom Tromey <tom@tromey.com>
11288 * varobj.c (varobj_value_get_print_value): Use
11289 gdbpy_enter_varobj.
11291 2017-01-10 Tom Tromey <tom@tromey.com>
11293 * python/py-prettyprint.c (print_string_repr, print_children):
11295 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11297 * varobj.c (varobj_value_get_print_value): Update.
11298 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11300 2017-01-10 Tom Tromey <tom@tromey.com>
11302 * varobj.c (varobj_get_display_hint)
11303 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11304 (varobj_set_visualizer, free_variable): Use
11305 gdbpy_enter_varobj.
11307 2017-01-10 Tom Tromey <tom@tromey.com>
11309 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11310 (do_finish_initialization): New function. Use gdbpy_ref.
11311 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11312 do_finish_initialization.
11314 2017-01-10 Tom Tromey <tom@tromey.com>
11316 * python/py-param.c (get_set_value, get_show_value): Use
11317 gdbpy_enter, gdbpy_ref.
11319 2017-01-10 Tom Tromey <tom@tromey.com>
11321 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11323 2017-01-10 Tom Tromey <tom@tromey.com>
11325 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11327 2017-01-10 Tom Tromey <tom@tromey.com>
11329 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11330 Use gdbpy_enter_varobj.
11332 2017-01-10 Tom Tromey <tom@tromey.com>
11334 * varobj.c (gdbpy_enter_varobj): New constructor.
11335 * python/python-internal.h (gdbpy_enter_varobj): New class.
11336 * python/py-varobj.c (py_varobj_get_iterator): Use
11337 gdbpy_enter_varobj.
11339 2017-01-10 Tom Tromey <tom@tromey.com>
11341 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11342 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11343 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11344 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11345 unique_xmalloc_ptr.
11346 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11348 2017-01-10 Tom Tromey <tom@tromey.com>
11350 * python/py-xmethods.c (invoke_match_method): Use
11353 2017-01-10 Tom Tromey <tom@tromey.com>
11355 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11356 gdbpy_enter, gdbpy_ref.
11358 2017-01-10 Tom Tromey <tom@tromey.com>
11360 * python/python.c (python_interactive_command): Use gdbpy_enter.
11362 2017-01-10 Tom Tromey <tom@tromey.com>
11364 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11367 2017-01-10 Tom Tromey <tom@tromey.com>
11369 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11370 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11372 2017-01-10 Tom Tromey <tom@tromey.com>
11374 * utils.h (htab_deleter): New struct.
11375 (htab_up): New typedef.
11376 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11377 gdbpy_enter, gdbpy_ref, htab_up.
11379 2017-01-10 Tom Tromey <tom@tromey.com>
11381 * python/py-unwind.c (pending_frame_invalidate): Remove.
11382 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11384 2017-01-10 Tom Tromey <tom@tromey.com>
11386 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11387 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11389 2017-01-10 Tom Tromey <tom@tromey.com>
11391 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11393 2017-01-10 Tom Tromey <tom@tromey.com>
11395 * python/python.c (gdbpy_eval_from_control_command)
11396 (gdbpy_source_script, gdbpy_run_events)
11397 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11398 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11401 2017-01-10 Tom Tromey <tom@tromey.com>
11403 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11405 2017-01-10 Tom Tromey <tom@tromey.com>
11407 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11409 2017-01-10 Tom Tromey <tom@tromey.com>
11411 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11412 (python_on_inferior_call_pre, python_on_inferior_call_post)
11413 (python_on_memory_change, python_on_register_change)
11414 (python_inferior_exit, python_new_objfile, add_thread_object)
11415 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11417 2017-01-10 Tom Tromey <tom@tromey.com>
11419 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11420 (bpfinishpy_handle_exit): Use gdbpy_enter.
11422 2017-01-10 Tom Tromey <tom@tromey.com>
11424 * python/py-cmd.c (cmdpy_destroyer)
11425 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11428 2017-01-10 Tom Tromey <tom@tromey.com>
11430 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11432 (gdbpy_breakpoint_has_cond): Likewise.
11434 2017-01-10 Tom Tromey <tom@tromey.com>
11436 * python/python.c (gdbpy_enter): New constructor.
11437 (~gdbpy_enter): New destructor.
11438 (restore_python_env, ensure_python_env): Rewrite.
11439 * python/python-internal.h (gdbpy_enter): New class.
11441 2017-01-10 Tom Tromey <tom@tromey.com>
11443 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11445 2017-01-10 Tom Tromey <tom@tromey.com>
11447 * python/py-value.c (value_has_field, get_field_flag)
11448 (get_field_type, valpy_getitem, convert_value_from_python): Use
11451 2017-01-10 Tom Tromey <tom@tromey.com>
11453 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11456 2017-01-10 Tom Tromey <tom@tromey.com>
11458 * python/py-prettyprint.c (search_pp_list)
11459 (find_pretty_printer_from_objfiles)
11460 (find_pretty_printer_from_progspace)
11461 (find_pretty_printer_from_gdb, find_pretty_printer)
11462 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11465 2017-01-10 Tom Tromey <tom@tromey.com>
11467 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11469 2017-01-10 Tom Tromey <tom@tromey.com>
11471 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11472 (ltpy_get_all_source_lines): Use gdbpy_ref.
11474 2017-01-10 Tom Tromey <tom@tromey.com>
11476 * python/py-framefilter.c (extract_sym, extract_value)
11477 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11480 2017-01-10 Tom Tromey <tom@tromey.com>
11482 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11484 2017-01-10 Tom Tromey <tom@tromey.com>
11486 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11488 2017-01-10 Tom Tromey <tom@tromey.com>
11490 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11493 2017-01-10 Tom Tromey <tom@tromey.com>
11495 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11497 2017-01-10 Tom Tromey <tom@tromey.com>
11499 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11500 (typy_range): Use gdbpy_ref.
11502 2017-01-10 Tom Tromey <tom@tromey.com>
11504 * python/py-threadevent.c (create_thread_event_object): Use
11506 * python/py-stopevent.c (create_stop_event_object): Simplify.
11507 (emit_stop_event): Use gdbpy_ref.
11508 * python/py-signalevent.c (create_signal_event_object): Use
11510 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11511 (emit_new_objfile_event, create_clear_objfiles_event_object)
11512 (emit_clear_objfiles_event): Use gdbpy_ref.
11513 * python/py-infevents.c (create_inferior_call_event_object)
11514 (create_register_changed_event_object)
11515 (create_memory_changed_event_object, emit_inferior_call_event)
11516 (emit_memory_changed_event, emit_register_changed_event): Use
11518 * python/py-exitedevent.c (create_exited_event_object)
11519 (emit_exited_event): Use gdbpy_ref.
11520 * python/py-event.h (evpy_emit_event): Remove
11521 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11522 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11523 * python/py-continueevent.c (emit_continue_event): Use
11525 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11526 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11528 * python/py-bpevent.c (create_breakpoint_event_object): Use
11531 2017-01-10 Tom Tromey <tom@tromey.com>
11533 * python/py-ref.h: New file.
11535 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11537 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11539 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11540 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11541 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11542 * ui-out.c (ui_out::redirect): Likewise.
11543 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11544 * cli/cli-logging.c (set_logging_redirect): Update call site of
11546 (handle_redirections): Likewise.
11547 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11548 * top.c (execute_command_to_string): Likewise.
11549 * utils.c (do_ui_out_redirect_pop): Likewise.
11551 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11553 * stack.c (_initialize_stack): Update "frame" command help message.
11555 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11557 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11559 2017-01-06 Yao Qi <yao.qi@linaro.org>
11561 * x86-linux-nat.h: Include gdb_proc_service.h.
11563 2017-01-06 Yao Qi <yao.qi@linaro.org>
11565 * ser-base.h: Include serial.h.
11567 2017-01-06 Yao Qi <yao.qi@linaro.org>
11569 * ppc-linux-tdep.h: Include ppc-tdep.h.
11571 2017-01-06 Yao Qi <yao.qi@linaro.org>
11573 * nat/amd64-linux-siginfo.h: Include signal.h.
11575 2017-01-06 Yao Qi <yao.qi@linaro.org>
11577 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11579 2017-01-06 Yao Qi <yao.qi@linaro.org>
11581 * mi/mi-parse.h: Include mi-cmds.h.
11583 2017-01-06 Yao Qi <yao.qi@linaro.org>
11585 * inf-loop.c: Don't include "target.h".
11586 * inf-loop.h: Include it here.
11588 2017-01-06 Yao Qi <yao.qi@linaro.org>
11590 * dfp.h: Include "dboulest.h" and "expression.h".
11592 2017-01-06 Yao Qi <yao.qi@linaro.org>
11594 * ax-gdb.h: Include "ax.h".
11596 2017-01-06 Yao Qi <yao.qi@linaro.org>
11598 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11599 with nat/gdb_ptrace.h.
11601 2017-01-05 Yao Qi <yao.qi@linaro.org>
11603 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11605 (mips64_fbsd_sigframe_init): Likewise.
11607 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11609 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11610 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11612 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11614 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11615 * NEWS: Mention new FreeBSD/mips native configuration.
11616 * config/mips/fbsd.mh: New file.
11617 * configure.host: Add mips*-*-freebsd*.
11618 * mips-fbsd-nat.c: New file.
11620 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11622 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11623 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11624 * NEWS: Mention new FreeBSD/mips target.
11625 * configure.tgt: Add mips*-*-freebsd*.
11626 * mips-fbsd-tdep.c: New file.
11627 * mips-fbsd-tdep.h: New file.
11629 2017-01-04 Yao Qi <yao.qi@linaro.org>
11631 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11632 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11634 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11636 Update copyright year range in all GDB files.
11638 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11640 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11642 For older changes see ChangeLog-2016.
11648 version-control: never