S390: Document guarded-storage register support
[binutils-gdb.git] / gdb / ChangeLog
1 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * NEWS: Advertise support for guarded-storage registers on IBM z.
4
5 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6
7 * s390-linux-nat.c (have_regset_gs): New static variable.
8 (s390_linux_fetch_inferior_registers): Handle guarded-storage
9 control block and guarded-storage broadcast control regsets.
10 (s390_read_description): Detect whether the target has
11 guarded-storage support, return appropriate tdesc.
12 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
13 (features/s390x-gs-linux64.c): Likewise.
14 (struct gdbarch_tdep) <have_gs>: New field.
15 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
16 (s390_gsbc_regset): New variables.
17 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
18 and s390_gsbc_regset, if applicable.
19 (s390_core_read_description): Check whether core file was from a
20 target with guarded-storage support; include appropriate regsets.
21 (s390_gdbarch_init): Add registers for guarded-storage support.
22 (_initialize_s390_tdep): Initialize new target descriptions that
23 include registers for guarded-storage support.
24 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
25 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
26 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
27 (S390_NUM_REGS): Adjust macro definition.
28 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
29 (tdesc_s390x_gs_linux64): New declarations.
30
31 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
32
33 * features/s390-gs-linux64.xml: New file.
34 * features/s390-gs.xml: New file.
35 * features/s390-gsbc.xml: New file.
36 * features/s390x-gs-linux64.xml: New file.
37 * features/Makefile (WHICH): Add s390-gs-linux64 and
38 s390x-gs-linux64.
39 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
40 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
41 * features/s390-gs-linux64.c: New generated file.
42 * features/s390x-gs-linux64.c: New file.
43 * regformats/s390-gs-linux64.dat: New file.
44 * regformats/s390x-gs-linux64.dat: New file.
45
46 2017-09-23 Tom Tromey <tom@tromey.com>
47
48 * defs.h (make_cleanup_override_quit_handler): Don't declare.
49
50 2017-09-22 Tom Tromey <tom@tromey.com>
51
52 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
53 type to scoped_restore_tmpl.
54 <scoped_input_handler>: Initialize m_quit_handler directly.
55
56 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
57
58 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
59 (cd_command): Likewise. Free "current_directory" before
60 assigning to it.
61 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
62 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
63 * top.c (gdb_dirbuf): Remove global declaration.
64 * top.h (gdb_dirbuf): Likewise.
65
66 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
67
68 * gnulib/aclocal.m4: Regenerate.
69 * gnulib/config.in: Regenerate.
70 * gnulib/configure: Regenerate.
71 * gnulib/import/Makefile.am: Regenerate.
72 * gnulib/import/Makefile.in: Regenerate.
73 * gnulib/import/assure.h: New file.
74 * gnulib/import/at-func.c: Likewise
75 * gnulib/import/chdir-long.c: New file.
76 * gnulib/import/chdir-long.h: New file.
77 * gnulib/import/cloexec.c: New file.
78 * gnulib/import/cloexec.h: New file.
79 * gnulib/import/close.c: New file.
80 * gnulib/import/closedir.c: New file.
81 * gnulib/import/dirent-private.h: New file.
82 * gnulib/import/dup-safer.c: New file.
83 * gnulib/import/dup.c: New file.
84 * gnulib/import/dup2.c: New file.
85 * gnulib/import/error.c: New file.
86 * gnulib/import/error.h: New file.
87 * gnulib/import/exitfail.c: New file.
88 * gnulib/import/exitfail.h: New file.
89 * gnulib/import/fchdir.c: New file.
90 * gnulib/import/fcntl.c: New file.
91 * gnulib/import/fcntl.in.h: New file.
92 * gnulib/import/fd-hook.c: New file.
93 * gnulib/import/fd-hook.h: New file.
94 * gnulib/import/fd-safer.c: New file.
95 * gnulib/import/fdopendir.c: New file.
96 * gnulib/import/filename.h: New file.
97 * gnulib/import/filenamecat-lgpl.c: New file.
98 * gnulib/import/filenamecat.h: New file.
99 * gnulib/import/fstat.c: New file.
100 * gnulib/import/fstatat.c: New file.
101 * gnulib/import/getcwd-lgpl.c: New file.
102 * gnulib/import/getcwd.c: New file.
103 * gnulib/import/getdtablesize.c: New file.
104 * gnulib/import/getlogin_r.c: New file.
105 * gnulib/import/getprogname.c: New file.
106 * gnulib/import/getprogname.h: New file.
107 * gnulib/import/gettext.h: New file.
108 * gnulib/import/glob-libc.h: New file.
109 * gnulib/import/glob.c: New file.
110 * gnulib/import/glob.in.h: New file.
111 * gnulib/import/intprops.h: New file.
112 * gnulib/import/m4/chdir-long.m4: New file.
113 * gnulib/import/m4/close.m4: New file.
114 * gnulib/import/m4/closedir.m4: New file.
115 * gnulib/import/m4/d-ino.m4: New file.
116 * gnulib/import/m4/d-type.m4: New file.
117 * gnulib/import/m4/dup.m4: New file.
118 * gnulib/import/m4/dup2.m4: New file.
119 * gnulib/import/m4/error.m4: New file.
120 * gnulib/import/m4/fchdir.m4: New file.
121 * gnulib/import/m4/fcntl.m4: New file.
122 * gnulib/import/m4/fcntl_h.m4: New file.
123 * gnulib/import/m4/fdopendir.m4: New file.
124 * gnulib/import/m4/filenamecat.m4: New file.
125 * gnulib/import/m4/fstat.m4: New file.
126 * gnulib/import/m4/fstatat.m4: New file.
127 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
128 * gnulib/import/m4/getcwd-path-max.m4: New file.
129 * gnulib/import/m4/getcwd.m4: New file.
130 * gnulib/import/m4/getdtablesize.m4: New file.
131 * gnulib/import/m4/getlogin_r.m4: New file.
132 * gnulib/import/m4/getprogname.m4: New file.
133 * gnulib/import/m4/glob.m4: New file.
134 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
135 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
136 * gnulib/import/m4/mempcpy.m4: New file.
137 * gnulib/import/m4/memrchr.m4: New file.
138 * gnulib/import/m4/mode_t.m4: New file.
139 * gnulib/import/m4/msvc-inval.m4: New file.
140 * gnulib/import/m4/msvc-nothrow.m4: New file.
141 * gnulib/import/m4/open.m4: New file.
142 * gnulib/import/m4/openat.m4: New file.
143 * gnulib/import/m4/opendir.m4: New file.
144 * gnulib/import/m4/readdir.m4: New file.
145 * gnulib/import/m4/realloc.m4: New file.
146 * gnulib/import/m4/rewinddir.m4: New file.
147 * gnulib/import/m4/save-cwd.m4: New file.
148 * gnulib/import/m4/strdup.m4: New file.
149 * gnulib/import/m4/strerror.m4: New file.
150 * gnulib/import/m4/unistd-safer.m4: New file.
151 * gnulib/import/mempcpy.c: New file.
152 * gnulib/import/memrchr.c: New file.
153 * gnulib/import/msvc-inval.c: New file.
154 * gnulib/import/msvc-inval.h: New file.
155 * gnulib/import/msvc-nothrow.c: New file.
156 * gnulib/import/msvc-nothrow.h: New file.
157 * gnulib/import/open.c: New file.
158 * gnulib/import/openat-die.c: New file.
159 * gnulib/import/openat-priv.h: New file.
160 * gnulib/import/openat-proc.c: New file.
161 * gnulib/import/openat.c: New file.
162 * gnulib/import/openat.h: New file.
163 * gnulib/import/opendir.c: New file.
164 * gnulib/import/pipe-safer.c: New file.
165 * gnulib/import/readdir.c: New file.
166 * gnulib/import/realloc.c: New file.
167 * gnulib/import/rewinddir.c: New file.
168 * gnulib/import/save-cwd.c: New file.
169 * gnulib/import/save-cwd.h: New file.
170 * gnulib/import/strdup.c: New file.
171 * gnulib/import/strerror-override.c: New file.
172 * gnulib/import/strerror-override.h: New file.
173 * gnulib/import/strerror.c: New file.
174 * gnulib/import/unistd--.h: New file.
175 * gnulib/import/unistd-safer.h: New file.
176 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
177 "getcwd" and "glob".
178 * ser-tcp.c: Undefine "close" before redefining it.
179
180 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
181
182 * guile/scm-value.c (gdbscm_value_address): Initialize address,
183 get rid of res_val.
184
185 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
186
187 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
188 <sol2,sparc>: Likewise.
189 <sol2-64,i386>: Likewise.
190
191 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
192 -Wdeprecated-declarations on *-*-solaris*.
193 * configure: Regenerate.
194
195 * procfs.c: Include "nat/inferior.h".
196 (procfs_info_proc): Fix typo.
197
198 2017-09-21 Kevin Buettner <kevinb@redhat.com>
199
200 * remote.c (vector): Include.
201 (struct private_thread_info): Add field, thread_handle.
202 (free_private_thread_info): Deallocate storage associated with
203 thread handle.
204 (get_private_info_thread): Initialize `thread_handle' field.
205 (struct thread_item): Add field, thread_handle.
206 (clear_threads_listing_context): Deallocate storage associated
207 with thread handle.
208 (start_thread): Add support for "handle" attribute.
209 (thread_attributes): Add "handle".
210 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
211 field.
212 (remote_update_thread_list): Update thread_handle.
213 (remote_thread_handle_to_thread_info): New function.
214 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
215
216 2017-09-21 Kevin Buettner <kevinb@redhat.com>
217
218 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
219 function.
220 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
221 * python/python-internal.h (thread_object_type): Declare.
222
223 2017-09-21 Kevin Buettner <kevinb@redhat.com>
224
225 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
226 (target_thread_handle_to_thread_info): Declare.
227 * target.c (target_thread_handle_to_thread_info): New function.
228 * target-delegates.c: Regenerate.
229 * gdbthread.h (find_thread_by_handle): Declare.
230 * thread.c (find_thread_by_handle): New function.
231 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
232 function.
233 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
234
235 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
236
237 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
238
239 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
240
241 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
242
243 2017-09-21 Yao Qi <yao.qi@linaro.org>
244
245 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
246 to gdb_target_obs.
247
248 2017-09-20 Tom Tromey <tom@tromey.com>
249
250 * breakpoint.c (struct counted_command_line): Remove.
251 (breakpoint_commands): Update.
252 (alloc_counted_command_line, incref_counted_command_line)
253 (decref_counted_command_line, do_cleanup_counted_command_line)
254 (make_cleanup_decref_counted_command_line): Remove.
255 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
256 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
257 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
258 (save_breakpoints): Update.
259 * breakpoint.h (counted_command_line): Now a typedef to
260 shared_ptr.
261 (struct breakpoint) <commands>: Now a counted_command_line.
262 (struct bpstats) <command>: Likewise.
263
264 2017-09-20 Tom Tromey <tom@tromey.com>
265
266 * breakpoint.c (struct commands_info, do_map_commands_command):
267 Remove.
268 (commands_command_1): Update.
269 (iterate_over_related_breakpoints): Take a function_view.
270 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
271 (delete_command): Update.
272 (map_breakpoint_numbers): Take a function_view.
273 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
274 (disable_command): Update.
275 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
276 (enable_command): Update.
277 (struct disp_data, do_enable_breakpoint_disp)
278 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
279 (do_map_enable_delete_breakpoint): Remove.
280 (enable_once_command, enable_count_command, enable_delete_command)
281 (delete_trace_variable_command): Update.
282
283 2017-09-20 Tom Tromey <tom@tromey.com>
284
285 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
286 (bpstat_clear): Use delete.
287 (bpstats): New constructors.
288 (bpstat_copy, bpstat_stop_status): Use new.
289 (dprintf_after_condition_true): Update.
290 * breakpoint.h (bpstats::bpstats): Add constructors.
291 (bpstats::~bpstats): Add destructor.
292
293 2017-09-20 Pedro Alves <palves@redhat.com>
294
295 * eval.c (make_params): Delete, refactored as ...
296 (class fake_method): ... this new type's ctor.
297 (fake_method::~fake_method): New.
298 (evaluate_subexp_standard): Use 'fake_method'.
299
300 2017-09-20 Tom Tromey <tom@tromey.com>
301
302 * windows-nat.c (get_windows_debug_event, windows_wait)
303 (do_initial_windows_stuff, windows_attach): Update.
304 * utils.c (vwarning, internal_vproblem): Update.
305 (ui_unregister_input_event_handler_cleanup)
306 (prepare_to_handle_input): Remove.
307 (class scoped_input_handler): New.
308 (defaulted_query, prompt_for_continue): Update.
309 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
310 Update.
311 * top.c (undo_terminal_modifications_before_exit): Update.
312 * target/target.h (target_terminal_init, target_terminal_inferior)
313 (target_terminal_ours): Don't declare.
314 (class target_terminal): New.
315 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
316 (target_terminal_ours_for_output)
317 (make_cleanup_restore_target_terminal): Don't declare.
318 (target_terminal_info): Remove.
319 * target.c (enum terminal_state, terminal_state): Remove.
320 (target_terminal::terminal_state): Define.
321 (target_terminal::init): Rename from target_terminal_init.
322 (target_terminal::inferior): Rename from
323 target_terminal_inferior.
324 (target_terminal::ours): Rename from target_terminal_ours.
325 (target_terminal::ours_for_output): Rename from
326 target_terminal_ours_for_output.
327 (target_terminal::info): New method.
328 (cleanup_restore_target_terminal)
329 (make_cleanup_restore_target_terminal): Remove.
330 * solib.c (handle_solib_event): Update.
331 * remote.c (remote_serial_quit_handler): Update.
332 (remote_terminal_inferior, remote_wait_as): Update.
333 * record-full.c (record_full_wait_1): Update.
334 * nto-procfs.c (procfs_create_inferior): Update.
335 * nat/fork-inferior.c (startup_inferior): Update.
336 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
337 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
338 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
339 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
340 (mi_breakpoint_created, mi_breakpoint_deleted)
341 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
342 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
343 (mi_user_selected_context_changed, report_initial_inferior):
344 Update.
345 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
346 (linux_nat_terminal_inferior): Update.
347 * infrun.c (follow_fork_inferior)
348 (handle_vfork_child_exec_or_exit, do_target_resume)
349 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
350 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
351 Update.
352 * inflow.c (child_terminal_init, info_terminal_command): Update.
353 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
354 (attach_command): Update.
355 * infcall.c (call_thread_fsm_should_stop): Update.
356 * gnu-nat.c (gnu_attach): Update.
357 * extension.c (struct active_ext_lang_state)
358 (restore_active_ext_lang): Update.
359 * exceptions.c (print_flush): Update.
360 * event-top.c (async_enable_stdin, default_quit_handler): Update.
361 (struct quit_handler_cleanup_data, restore_quit_handler)
362 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
363 Remove.
364 * cp-support.c (gdb_demangle): Update.
365 * breakpoint.c (update_inserted_breakpoint_locations)
366 (insert_breakpoint_locations, handle_jit_event)
367 (disable_breakpoints_in_unloaded_shlib): Update.
368 * annotate.c (annotate_breakpoints_invalid)
369 (annotate_frames_invalid): Update.
370
371 2017-09-20 Tom Tromey <tom@tromey.com>
372
373 * main.c (catch_command_errors): Rename from
374 catch_command_errors_const.
375 (captured_main_1): Update.
376
377 2017-09-20 Pedro Alves <palves@redhat.com>
378
379 * cli/cli-cmds.c (list_command): Use print_sal_location.
380 (print_sal_location): New function.
381 (ambiguous_line_spec): Use print_sal_location.
382 * linespec.c (symbol_to_sal): Record the symbol in the sal.
383 * symtab.c (find_function_start_sal): Likewise.
384 * symtab.h (symtab_and_line::symbol): New field.
385
386 2017-09-20 Pedro Alves <palves@redhat.com>
387
388 * linespec.c (minsym_found): Handle non-text minsyms.
389 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
390
391 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
392
393 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
394 backslash.
395
396 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
397
398 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
399 vmovups instead vmovaps.
400 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
401
402 2017-09-19 John Baldwin <jhb@FreeBSD.org>
403
404 * NEWS (Changes since GDB 8.0): Add starti.
405 * infcmd.c (enum run_break): New.
406 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
407 case.
408 (run_command): Use enum run_how.
409 (start_command): Likewise.
410 (starti_command): New function.
411 (RUN_ARGS_HELP): New macro.
412 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
413 commands. Add starti command.
414
415 2017-09-19 Yao Qi <yao.qi@linaro.org>
416
417 * Makefile.in (monitor.o): Remove the rule.
418
419 2017-09-19 Yao Qi <yao.qi@linaro.org>
420
421 * annotate.h (struct annotate_arg_emitter): Use
422 DISABLE_COPY_AND_ASSIGN.
423 * common/refcounted-object.h (refcounted_object): Likewise.
424 * completer.h (struct completion_result): Likewise.
425 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
426 * filename-seen-cache.h (filename_seen_cache): Likewise.
427 * gdbcore.h (thread_section_name): Likewise.
428 * gdb_regex.h (compiled_regex): Likewise.
429 * gdbthread.h (scoped_restore_current_thread): Likewise.
430 * inferior.h (scoped_restore_current_inferior): Likewise.
431 * jit.c (jit_reader): Likewise.
432 * linespec.h (struct linespec_result): Likewise.
433 * mi/mi-parse.h (struct mi_parse): Likewise.
434 * nat/fork-inferior.c (execv_argv): Likewise.
435 * progspace.h (scoped_restore_current_program_space): Likewise.
436 * python/python-internal.h (class gdbpy_enter): Likewise.
437 * regcache.h (regcache): Likewise.
438 * target-descriptions.c (struct tdesc_reg): Likewise.
439 (struct tdesc_type): Likewise.
440 (struct tdesc_feature): Likewise.
441 * ui-out.h (ui_out_emit_type): Likewise.
442
443 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
444
445 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
446 label abort_expression.
447
448 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
449
450 * common/buffer.c (buffer_xml_printf): Adjust.
451 * common/xml-utils.c (xml_escape_text): Change return type to
452 std::string, update code accordingly.
453 * common/xml-utils.h (xml_escape_text): Change return type to
454 std::string.
455 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
456 * windows-tdep.c (windows_xfer_shared_library): Adjust.
457 * unittests/xml-utils-selftests.c (test_xml_escape_text):
458 Adjust.
459
460 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
461
462 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
463 (SUBDIR_UNITTESTS_OBS): Add new object file.
464 * unittests/xml-utils-selftests.c: New file.
465
466 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
467
468 * common/selftest.h (selftest): New struct/interface.
469 (register_test): Add name parameter, add new overload.
470 (run_tests): Add filter parameter.
471 (for_each_selftest_ftype): New typedef.
472 (for_each_selftest): New declaration.
473 * common/selftest.c (tests): Change type to
474 map<string, unique_ptr<selftest>>.
475 (simple_selftest): New struct.
476 (register_test): New function.
477 (register_test): Add name parameter and use it.
478 (run_tests): Add filter parameter and use it. Add prints.
479 Adjust to vector -> map change.
480 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
481 registering selftests.
482 * arm-tdep.c (_initialize_arm_tdep): Likewise.
483 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
484 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
485 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
486 * findvar.c (_initialize_findvar): Likewise.
487 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
488 * maint.c (maintenance_selftest): Update call to run_tests.
489 (maintenance_info_selftests): New function.
490 (_initialize_maint_cmds): Register "maintenance info selftests"
491 command. Update "maintenance selftest" doc.
492 * regcache.c (_initialize_regcache): Add names when registering
493 selftests.
494 * rust-exp.y (_initialize_rust_exp): Likewise.
495 * selftest-arch.c (gdbarch_selftest): New struct.
496 (gdbarch_tests): Remove.
497 (register_test_foreach_arch): Add name parameter. Call
498 register_test.
499 (tests_with_arch): Remove, move most content to
500 gdbarch_selftest::operator().
501 (_initialize_selftests_foreach_arch): Remove.
502 * selftest-arch.h (register_test_foreach_arch): Add name
503 parameter.
504 (run_tests_with_arch): New declaration.
505 * utils-selftests.c (_initialize_utils_selftests): Add names
506 when registering selftests.
507 * utils.c (_initialize_utils): Likewise.
508 * unittests/array-view-selftests.c
509 (_initialize_array_view_selftests): Likewise.
510 * unittests/environ-selftests.c (_initialize_environ_selftests):
511 Likewise.
512 * unittests/function-view-selftests.c
513 (_initialize_function_view_selftests): Likewise.
514 * unittests/offset-type-selftests.c
515 (_initialize_offset_type_selftests): Likewise.
516 * unittests/optional-selftests.c
517 (_initialize_optional_selftests): Likewise.
518 * unittests/scoped_restore-selftests.c
519 (_initialize_scoped_restore_selftests): Likewise.
520 * NEWS: Document "maintenance selftest" and "maint info
521 selftests".
522
523 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
524
525 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
526 scoped_restore.
527
528 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
529
530 * mi/mi-main.c (mi_load_progress): Make uiout variable
531 a unique_ptr.
532
533 2017-09-15 Pedro Alves <palves@redhat.com>
534
535 * compile/compile-c-types.c (convert_enum, convert_int)
536 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
537
538 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
539
540 * dwarf2read.c (copy_string): Remove.
541 (parse_macro_definition): Replace copy_string with savestring.
542
543 2017-09-15 Yao Qi <yao.qi@linaro.org>
544
545 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
546 gdb_target_obs.
547 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
548 Likewise.
549 (i[34567]86-*-linux*): Likewise.
550
551 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
552
553 * dwarf2expr.h (dwarf_stack_value): Add constructor.
554 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
555 <stack>: Change type to std::vector.
556 <stack_len, stack_allocated>: Remove.
557 <grow_stack>: Remove.
558 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
559 (dwarf_expr_context::~dwarf_expr_context): Remove.
560 (dwarf_expr_context::grow_stack): Remove.
561 (dwarf_expr_context::push): Adjust.
562 (dwarf_expr_context::pop): Adjust.
563 (dwarf_expr_context::fetch): Adjust.
564 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
565 (dwarf_expr_context::stack_empty_p): Adjust.
566 (dwarf_expr_context::execute_stack_op): Adjust.
567
568 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
569
570 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
571 return type to bool.
572 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
573
574 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
575
576 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
577 Change type to bool.
578 (dwarf_stack_value) <in_stack_memory>: Likewise.
579 (dwarf_expr_context) <push_address>: Change parameter type to
580 bool.
581 <fetch_in_stack_memory>: Change return type to bool.
582 <push>: Change parameter type to bool.
583 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
584 to bool.
585 (dwarf_expr_context::push_address): Likewise.
586 (dwarf_expr_context::fetch_in_stack_memory): Change return type
587 to bool.
588 (dwarf_expr_context::execute_stack_op): Adjust.
589 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
590
591 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
592
593 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
594 (struct dwarf_expr_context) <n_pieces>: Remove.
595 <pieces>: Change type to std::vector.
596 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
597 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
598 pieces.
599 (dwarf_expr_context::add_piece): Adjust.
600 * dwarf2loc.c (struct piece_closure): Initialize fields.
601 <n_pieces>: Remove.
602 <pieces>: Change type to std::vector.
603 (allocate_piece_closure): Adjust, change parameter to
604 std::vector rvalue and std::move it to piece_closure.
605 (rw_pieced_value): Adjust.
606 (check_pieced_synthetic_pointer): Adjust.
607 (indirect_synthetic_pointer): Adjust.
608 (coerce_pieced_ref): Adjust.
609 (free_pieced_value_closure): Adjust. Use delete to free
610 piece_closure.
611 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
612 to allocate_piece_closure.
613 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
614
615 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
616
617 * probe.h (probe_ops_cp): Remove typedef.
618 (DEF_VEC_P (probe_ops_cp)): Remove.
619 (all_probe_ops): Change type to std::vector.
620 * probe.c (info_probes_for_ops): Adjust to vector change.
621 (probe_linespec_to_ops): Likewise.
622 (all_probe_ops): Change type to std::vector.
623 (_initialize_probe): Adjust to vector change.
624 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
625 * elfread.c (elf_get_probes): Likewise.
626 * stap-probe.c (_initialize_stap_probe): Likewise.
627
628 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
629
630 * probe.h (struct bound_probe): Define constructors.
631 * probe.c (bound_probe_s): Remove typedef.
632 (DEF_VEC_O (bound_probe_s)): Remove VEC.
633 (collect_probes): Change return type to std::vector, remove
634 cleanup.
635 (compare_probes): Return bool, change parameter type. Change
636 semantic to "less than".
637 (gen_ui_out_table_header_info): Change parameter to std::vector
638 and update.
639 (exists_probe_with_pops): Likewise.
640 (info_probes_for_ops): Update to std::vector change.
641 (enable_probes_command): Likewise.
642 (disable_probes_command): Likewise.
643
644 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
645
646 * probe.h (struct probe_ops) <get_probes>: Change parameter from
647 vec to std::vector.
648 * probe.c (parse_probes_in_pspace): Update.
649 (find_probes_in_objfile): Update.
650 (find_probe_by_pc): Update.
651 (collect_probes): Update.
652 (probe_any_get_probes): Update.
653 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
654 return type to reference to std::vector.
655 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
656 std::vector and update.
657 (dtrace_process_dof): Likewise.
658 (dtrace_get_probes): Likewise.
659 * elfread.c (elf_get_probes): Change return type to std::vector,
660 store an std::vector in bfd_data.
661 (probe_key_free): Update to std::vector.
662 * stap-probe.c (handle_stap_probe): Change parameter to
663 std::vector and update.
664 (stap_get_probes): Likewise.
665 * symfile-debug.c (debug_sym_get_probes): Change return type to
666 std::vector and update.
667
668 2017-09-11 Tom Tromey <tom@tromey.com>
669
670 * breakpoint.c (program_breakpoint_here_p): Update.
671 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
672 from make_show_memory_breakpoints_cleanup. Return a
673 scoped_restore_tmpl<int>.
674 (restore_show_memory_breakpoints): Remove.
675 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
676 * mem-break.c (memory_validate_breakpoint): Update.
677 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
678 (ia64_memory_remove_breakpoint): Update.
679 (ia64_breakpoint_from_pc): Update.
680 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
681 from make_show_memory_breakpoints_cleanup.
682
683 2017-09-11 Tom Tromey <tom@tromey.com>
684
685 * d-namespace.c (d_lookup_symbol): Use std::string.
686 (find_symbol_in_baseclass): Likewise.
687
688 2017-09-11 Tom Tromey <tom@tromey.com>
689
690 * ctf.c (ctf_start): Use std::string.
691
692 2017-09-11 Tom Tromey <tom@tromey.com>
693
694 * ada-lang.c (is_known_support_routine): Update.
695 (ada_unhandled_exception_name_addr_from_raise): Update.
696 * guile/scm-frame.c (gdbscm_frame_name): Update.
697 * python/py-frame.c (frapy_name): Update.
698 (frapy_function): Update.
699 * stack.h (find_frame_funname): Update.
700 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
701 (print_frame): Update.
702
703 2017-09-11 Tom Tromey <tom@tromey.com>
704
705 * findcmd.c (put_bits): Take a gdb::byte_vector.
706 (parse_find_args): Return gdb::byte_vector. "args" now const.
707 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
708 cleanups.
709 (find_command): Update.
710
711 2017-09-11 Tom Tromey <tom@tromey.com>
712
713 * cli/cli-script.c (class scoped_restore_hook_in): New.
714 (clear_hook_in_cleanup): Remove.
715 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
716 scoped_restore_hook_in.
717
718 2017-09-11 Tom Tromey <tom@tromey.com>
719
720 * cli/cli-script.c (restore_interp): Remove.
721 (read_command_lines): Use scoped_restore_interp.
722 * interps.c (scoped_restore_interp::set_temp): Rename from
723 interp_set_temp.
724 * interps.h (class scoped_restore_interp): New.
725 (interp_set_temp): Remove.
726
727 2017-09-11 Tom Tromey <tom@tromey.com>
728
729 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
730 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
731 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
732 scoped_restore.
733 (mi_cmd_break_insert_1): Update.
734 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
735 scoped_restore.
736
737 2017-09-11 Tom Tromey <tom@tromey.com>
738
739 * demangle.c (demangle_command): Update.
740 * breakpoint.c (disable_command): Update.
741 (enable_command): Update.
742 (find_location_by_number): Make "number" const. Use
743 get_number_trailer.
744 * cli/cli-utils.c (extract_arg): Return std::string.
745 * probe.c (parse_probe_linespec): Update. Change types.
746 (collect_probes): Take string arguments.
747 (parse_probe_linespec): Likewise.
748 (info_probes_for_ops): Update.
749 (enable_probes_command): Update.
750 (disable_probes_command): Update.
751 * break-catch-sig.c (catch_signal_split_args): Update.
752 * mi/mi-parse.c (mi_parse): Update.
753
754 2017-09-11 Tom Tromey <tom@tromey.com>
755
756 * language.h (language_enum): Make argument const.
757 * language.c (language_enum): Make argument const.
758
759 2017-09-11 Tom Tromey <tom@tromey.com>
760
761 * common/common-utils.h (skip_to_space): Remove macro, redeclare
762 as function.
763 (skip_to_space): Rename from skip_to_space_const.
764 * common/common-utils.c (skip_to_space): New function.
765 (skip_to_space): Rename from skip_to_space_const.
766 * cli/cli-utils.h (get_number): Rename from get_number_const.
767 (extract_arg): Rename from extract_arg_const.
768 * cli/cli-utils.c (get_number): Rename from get_number_const.
769 (extract_arg): Rename from extract_arg_const.
770 (number_or_range_parser::get_number): Use ::get_number.
771 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
772 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
773 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
774 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
775 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
776 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
777 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
778 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
779
780 2017-09-11 Tom Tromey <tom@tromey.com>
781
782 * python/python.c (do_start_initialization): Use
783 py-event-types.def to initialize types.
784 Define all object type structures.
785 * python/python-internal.h: Don't declare event initialization
786 functions.
787 * python/py-threadevent.c (thread_event_object_type): Don't
788 define.
789 * python/py-stopevent.c (stop_event_object_type): Don't define.
790 * python/py-signalevent.c (signal_event_object_type): Don't
791 declare or define.
792 * python/py-newobjfileevent.c (new_objfile_event_object_type)
793 (clear_objfiles_event_object_type): Don't declare or define.
794 * python/py-infevents.c (inferior_call_pre_event_object_type)
795 (inferior_call_post_event_object_type)
796 (register_changed_event_object_type)
797 (memory_changed_event_object_type): Don't declare or define.
798 * python/py-inferior.c (new_thread_event_object_type)
799 (new_inferior_event_object_type)
800 (inferior_deleted_event_object_type): Don't declare or define.
801 * python/py-exitedevent.c (exited_event_object_type): Don't
802 declare or define.
803 * python/py-evts.c (gdbpy_initialize_py_events): Use
804 py-all-events.def.
805 * python/py-events.h (thread_event_object_type): Don't declare.
806 (events_object): Use py-all-events.def.
807 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
808 py-event-types.def.
809 * python/py-event-types.def: New file.
810 * python/py-continueevent.c (create_continue_event_object): Don't
811 declare or define.
812 * python/py-bpevent.c (breakpoint_event_object_type): Don't
813 declare or define.
814 * python/py-all-events.def: New file.
815
816 2017-09-11 Tom Tromey <tom@tromey.com>
817
818 * python/py-threadevent.c (create_thread_event_object): Return
819 gdbpy_ref.
820 * python/py-stopevent.h (create_stop_event_object)
821 (create_breakpoint_event_object, create_signal_event_object):
822 Update.
823 * python/py-stopevent.c (create_stop_event_object): Return
824 gdbpy_ref.
825 (emit_stop_event): Update.
826 * python/py-signalevent.c (create_signal_event_object): Return
827 gdbpy_ref.
828 * python/py-infevents.c (create_inferior_call_event_object):
829 Update.
830 * python/py-event.h (create_event_object)
831 (create_thread_event_object): Update.
832 * python/py-event.c (create_event_object): Return gdbpy_ref.
833 * python/py-continueevent.c: Return gdbpy_ref.
834 * python/py-bpevent.c (create_breakpoint_event_object): Return
835 gdbpy_ref.
836
837 2017-09-11 Tom Tromey <tom@tromey.com>
838
839 PR python/15622:
840 * NEWS: Add entry.
841 * python/python.c (do_start_initialization): Initialize new event
842 types.
843 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
844 (gdbpy_initialize_inferior_deleted_event)
845 (gdbpy_initialize_new_thread_event): Declare.
846 * python/py-threadevent.c (create_thread_event_object): Add option
847 "thread" parameter.
848 * python/py-inferior.c (new_thread_event_object_type)
849 (new_inferior_event_object_type)
850 (inferior_deleted_event_object_type): Declare.
851 (python_new_inferior, python_inferior_deleted): New functions.
852 (add_thread_object): Emit new_thread event.
853 (gdbpy_initialize_inferior): Attach new functions to corresponding
854 observers.
855 (new_thread, new_inferior, inferior_deleted): Define new event
856 types.
857 * python/py-evts.c (gdbpy_initialize_py_events): Add new
858 registries.
859 * python/py-events.h (events_object) <new_inferior,
860 inferior_deleted, new_thread>: New fields.
861 * python/py-event.h (create_thread_event_breakpoint): Add optional
862 "thread" parameter.
863
864 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
865
866 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
867 check current_ui instead.
868 (internal_vproblem): Likewise.
869
870 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
871
872 * thread.c (print_thread_info_1): Remove unnecessary calls to
873 uiout->is_mi_like_p.
874
875 2017-09-09 Tom Tromey <tom@tromey.com>
876
877 * namespace.h (add_using_directive): Update.
878 * namespace.c (add_using_directive): Change type of excludes to
879 std::vector.
880 * dwarf2read.c (read_import_statement): Use std::vector.
881 (read_namespace): Update.
882 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
883
884 2017-09-09 Tom Tromey <tom@tromey.com>
885
886 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
887
888 2017-09-09 Tom Tromey <tom@tromey.com>
889
890 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
891
892 2017-09-09 Tom Tromey <tom@tromey.com>
893
894 * stack.c (func_command): Use gdb::def_vector.
895
896 2017-09-09 Tom Tromey <tom@tromey.com>
897
898 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
899 ui_out_emit_list, ui_out_emit_tuple.
900 (mi_cmd_var_update): Likewise.
901
902 2017-09-09 Tom Tromey <tom@tromey.com>
903
904 * mi/mi-interp.c (mi_user_selected_context_changed): Use
905 ui_out_redirect_pop.
906 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
907 ui_out_redirect_pop.
908 * utils.c (do_ui_out_redirect_pop)
909 (make_cleanup_ui_out_redirect_pop): Remove.
910 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
911 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
912 * ui-out.h (ui_out_redirect_pop): New class.
913
914 2017-09-09 Tom Tromey <tom@tromey.com>
915
916 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
917 (list_available_thread_groups, mi_cmd_list_thread_groups)
918 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
919 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
920 Likewise.
921
922 2017-09-09 Tom Tromey <tom@tromey.com>
923
924 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
925 ui_out_emit_tuple.
926
927 2017-09-09 Tom Tromey <tom@tromey.com>
928
929 * target.c (flash_erase_command): Use ui_out_emit_tuple.
930 * stack.c (print_frame): Use ui_out_emit_tuple.
931 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
932 (info_spu_mailbox_command, info_spu_dma_command)
933 (info_spu_proxydma_command): Likewise.
934 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
935 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
936 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
937 ui_out_emit_tuple.
938 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
939
940 2017-09-09 Tom Tromey <tom@tromey.com>
941
942 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
943 (class ui_out_emit_table): Update comment.
944 * ui-out.c (do_cleanup_table_end)
945 (make_cleanup_ui_out_table_begin_end): Remove.
946 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
947 (info_spu_dma_cmdlist): Likewise.
948 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
949 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
950 ui_out_emit_table.
951
952 2017-09-09 Tom Tromey <tom@tromey.com>
953
954 * thread.c (print_thread_info_1): Use ui_out_emit_table,
955 ui_out_emit_list, gdb::optional.
956
957 2017-09-09 John Baldwin <jhb@FreeBSD.org>
958
959 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
960 prototype.
961 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
962 prototype.
963 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
964 prototype.
965 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
966 * ada-exp.y: Remove _initialize_ada_exp prototype.
967 * ada-lang.c: Remove _initialize_ada_language prototype.
968 * ada-tasks.c: Remove _initialize_tasks prototype.
969 * addrmap.c: Remove _initialize_addrmap prototype.
970 * agent.c: Remove _initialize_agent prototype.
971 * aix-thread.c: Remove _initialize_aix_thread prototype.
972 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
973 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
974 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
975 prototype.
976 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
977 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
978 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
979 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
980 prototype.
981 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
982 prototype.
983 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
984 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
985 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
986 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
987 prototype.
988 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
989 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
990 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
991 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
992 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
993 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
994 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
995 prototype.
996 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
997 prototype.
998 * annotate.c: Remove _initialize_annotate prototype.
999 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1000 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1001 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1002 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1003 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1004 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1005 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1006 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1007 prototype.
1008 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1009 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1010 * auto-load.c: Remove _initialize_auto_load prototype.
1011 * auxv.c: Remove _initialize_auxv prototype.
1012 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1013 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1014 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1015 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1016 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1017 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1018 prototype.
1019 * break-catch-throw.c: Remove _initialize_break_catch_throw
1020 prototype.
1021 * breakpoint.c: Remove _initialize_breakpoint prototype.
1022 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1023 * btrace.c: Remove _initialize_btrace prototype.
1024 * charset.c: Remove _initialize_charset prototype.
1025 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1026 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1027 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1028 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1029 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1030 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1031 * coffread.c: Remove _initialize_coffread prototype.
1032 * compile/compile.c: Remove _initialize_compile prototype.
1033 * complaints.c: Remove _initialize_complaints prototype.
1034 * completer.c: Remove _initialize_completer prototype.
1035 * copying.awk: Remove _initialize_copying prototype.
1036 * copying.c: Regenerate.
1037 * core-regset.c: Remove _initialize_core_regset prototype.
1038 * corefile.c: Remove _initialize_core prototype.
1039 * corelow.c: Remove _initialize_corelow prototype.
1040 * cp-abi.c: Remove _initialize_cp_abi prototype.
1041 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1042 * cp-support.c: Remove _initialize_cp_support prototype.
1043 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1044 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1045 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1046 * ctf.c: Remove _initialize_ctf prototype.
1047 * d-lang.c: Remove _initialize_d_language prototype.
1048 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1049 prototype.
1050 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1051 * dbxread.c: Remove _initialize_dbxread prototype.
1052 * dcache.c: Remove _initialize_dcache prototype.
1053 * demangle.c: Remove _initialize_demangler prototype.
1054 * disasm-selftests.c: Remove _initialize_disasm_selftests
1055 prototype.
1056 * disasm.c: Remove _initialize_disasm prototype.
1057 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1058 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1059 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1060 prototype.
1061 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1062 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1063 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1064 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1065 * elfread.c: Remove _initialize_elfread prototype.
1066 * exec.c: Remove _initialize_exec prototype.
1067 * extension.c: Remove _initialize_extension prototype.
1068 * f-lang.c: Remove _initialize_f_language prototype.
1069 * f-valprint.c: Remove _initialize_f_valprint prototype.
1070 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1071 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1072 * filesystem.c: Remove _initialize_filesystem prototype.
1073 * findcmd.c: Remove _initialize_mem_search prototype.
1074 * fork-child.c: Remove _initialize_fork_child prototype.
1075 * frame-base.c: Remove _initialize_frame_base prototype.
1076 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1077 * frame.c: Remove _initialize_frame prototype.
1078 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1079 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1080 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1081 * gcore.c: Remove _initialize_gcore prototype.
1082 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1083 * gdbarch.c: Regenerate.
1084 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1085 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1086 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1087 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1088 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1089 * go-lang.c: Remove _initialize_go_language prototype.
1090 * go32-nat.c: Remove _initialize_go32_nat prototype.
1091 * guile/guile.c: Remove _initialize_guile prototype.
1092 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1093 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1094 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1095 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1096 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1097 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1098 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1099 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1100 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1101 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1102 prototype.
1103 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1104 prototype.
1105 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1106 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1107 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1108 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1109 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1110 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1111 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1112 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1113 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1114 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1115 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1116 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1117 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1118 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1119 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1120 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1121 prototype.
1122 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1123 prototype.
1124 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1125 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1126 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1127 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1128 * infcall.c: Remove _initialize_infcall prototype.
1129 * infcmd.c: Remove _initialize_infcmd prototype.
1130 * inferior.c: Remove _initialize_inferiors prototype.
1131 * inflow.c: Remove _initialize_inflow prototype.
1132 * infrun.c: Remove _initialize_infrun prototype.
1133 * interps.c: Remove _initialize_interpreter prototype.
1134 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1135 * jit.c: Remove _initialize_jit prototype.
1136 * language.c: Remove _initialize_language prototype.
1137 * linux-fork.c: Remove _initialize_linux_fork prototype.
1138 * linux-nat.c: Remove _initialize_linux_nat prototype.
1139 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1140 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1141 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1142 * m2-lang.c: Remove _initialize_m2_language prototype.
1143 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1144 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1145 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1146 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1147 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1148 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1149 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1150 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1151 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1152 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1153 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1154 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1155 * machoread.c: Remove _initialize_machoread prototype.
1156 * macrocmd.c: Remove _initialize_macrocmd prototype.
1157 * macroscope.c: Remove _initialize_macroscope prototype.
1158 * maint.c: Remove _initialize_maint_cmds prototype.
1159 * mdebugread.c: Remove _initialize_mdebugread prototype.
1160 * memattr.c: Remove _initialize_mem prototype.
1161 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1162 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1163 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1164 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1165 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1166 * microblaze-linux-tdep.c: Remove
1167 _initialize_microblaze_linux_tdep prototype.
1168 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1169 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1170 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1171 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1172 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1173 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1174 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1175 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1176 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1177 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1178 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1179 prototype.
1180 * mipsread.c: Remove _initialize_mipsread prototype.
1181 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1182 prototype.
1183 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1184 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1185 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1186 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1187 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1188 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1189 prototype.
1190 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1191 * nto-procfs.c: Remove _initialize_procfs prototype.
1192 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1193 * objc-lang.c: Remove _initialize_objc_language prototype.
1194 * objfiles.c: Remove _initialize_objfiles prototype.
1195 * observer.c: Remove observer_test_first_notification_function,
1196 observer_test_second_notification_function,
1197 observer_test_third_notification_function, and
1198 _initialize_observer prototypes.
1199 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1200 * osabi.c: Remove _initialize_gdb_osabi prototype.
1201 * osdata.c: Remove _initialize_osdata prototype.
1202 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1203 * parse.c: Remove _initialize_parse prototype.
1204 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1205 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1206 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1207 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1208 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1209 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1210 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1211 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1212 * printcmd.c: Remove _initialize_printcmd prototype.
1213 * probe.c: Remove _initialize_probe prototype.
1214 * proc-api.c: Remove _initialize_proc_api prototype.
1215 * proc-events.c: Remove _initialize_proc_events prototype.
1216 * proc-service.c: Remove _initialize_proc_service prototype.
1217 * procfs.c: Remove _initialize_procfs prototype.
1218 * psymtab.c: Remove _initialize_psymtab prototype.
1219 * python/python.c: Remove _initialize_python prototype.
1220 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1221 * record-btrace.c: Remove _initialize_record_btrace prototype.
1222 * record-full.c: Remove _initialize_record_full prototype.
1223 * record.c: Remove _initialize_record prototype.
1224 * regcache.c: Remove _initialize_regcache prototype.
1225 * reggroups.c: Remove _initialize_reggroup prototype.
1226 * remote-notif.c: Remove _initialize_notif prototype.
1227 * remote-sim.c: Remove _initialize_remote_sim prototype.
1228 * remote.c: Remove _initialize_remote prototype.
1229 * reverse.c: Remove _initialize_reverse prototype.
1230 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1231 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1232 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1233 prototype.
1234 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1235 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1236 * rust-exp.y: Remove _initialize_rust_exp prototype.
1237 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1238 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1239 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1240 * score-tdep.c: Remove _initialize_score_tdep prototype.
1241 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1242 prototype.
1243 * ser-go32.c: Remove _initialize_ser_dos prototype.
1244 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1245 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1246 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1247 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1248 * serial.c: Remove _initialize_serial prototype.
1249 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1250 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1251 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1252 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1253 * skip.c: Remove _initialize_step_skip prototype.
1254 * sol-thread.c: Remove _initialize_sol_thread prototype.
1255 * solib-aix.c: Remove _initialize_solib_aix prototype.
1256 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1257 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1258 * solib-frv.c: Remove _initialize_frv_solib prototype.
1259 * solib-spu.c: Remove _initialize_spu_solib prototype.
1260 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1261 * solib-target.c: Remove _initialize_solib_target prototype.
1262 * solib.c: Remove _initialize_solib prototype.
1263 * source.c: Remove _initialize_source prototype.
1264 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1265 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1266 prototype.
1267 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1268 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1269 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1270 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1271 prototype.
1272 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1273 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1274 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1275 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1276 prototype.
1277 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1278 prototype.
1279 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1280 prototype.
1281 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1282 prototype.
1283 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1284 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1285 prototype.
1286 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1287 prototype.
1288 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1289 prototype.
1290 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1291 prototype.
1292 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1293 prototype.
1294 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1295 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1296 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1297 * stabsread.c: Remove _initialize_stabsread prototype.
1298 * stack.c: Remove _initialize_stack prototype.
1299 * stap-probe.c: Remove _initialize_stap_probe prototype.
1300 * std-regs.c: Remove _initialize_frame_reg prototype.
1301 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1302 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1303 * symfile.c: Remove _initialize_symfile prototype.
1304 * symmisc.c: Remove _initialize_symmisc prototype.
1305 * symtab.c: Remove _initialize_symtab prototype.
1306 * target-dcache.c: Remove _initialize_target_dcache prototype.
1307 * target-descriptions.c: Remove _initialize_target_descriptions
1308 prototype.
1309 * thread.c: Remove _initialize_thread prototype.
1310 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1311 prototype.
1312 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1313 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1314 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1315 prototype.
1316 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1317 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1318 * tracefile.c: Remove _initialize_tracefile prototype.
1319 * tracepoint.c: Remove _initialize_tracepoint prototype.
1320 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1321 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1322 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1323 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1324 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1325 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1326 * tui/tui.c: Remove _initialize_tui prototype.
1327 * typeprint.c: Remove _initialize_typeprint prototype.
1328 * user-regs.c: Remove _initialize_user_regs prototype.
1329 * utils.c: Remove _initialize_utils prototype.
1330 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1331 * valarith.c: Remove _initialize_valarith prototype.
1332 * valops.c: Remove _initialize_valops prototype.
1333 * valprint.c: Remove _initialize_valprint prototype.
1334 * value.c: Remove _initialize_values prototype.
1335 * varobj.c: Remove _initialize_varobj prototype.
1336 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1337 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1338 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1339 * windows-nat.c: Remove _initialize_windows_nat,
1340 _initialize_check_for_gdb_ini, and _initialize_loadable
1341 prototypes.
1342 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1343 * xcoffread.c: Remove _initialize_xcoffread prototype.
1344 * xml-support.c: Remove _initialize_xml_support prototype.
1345 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1346 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1347 prototype.
1348 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1349 prototype.
1350 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1351
1352 2017-09-08 Keith Seitz <keiths@redhat.com>
1353
1354 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1355 field.
1356
1357 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1358
1359 * f-valprint.c (f_val_print): Remove check for one byte
1360 sized integers. Remove printing of character type.
1361
1362 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1363 Christoph Weinmann <christoph.t.weinmann@intel.com>
1364 Bernhard Heckel <bernhard.heckel@intel.com>
1365
1366 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1367 to maintain proper indentation when printing pointers/refs.
1368
1369 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1370
1371 GDB 8.0.1 released.
1372
1373 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1374
1375 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1376
1377 2017-09-05 Tom Tromey <tom@tromey.com>
1378
1379 * parse.c (funcall_chain): Now a std::vector.
1380 (start_arglist, end_arglist): Simplify.
1381 (free_funcalls): Remove.
1382 (parse_exp_in_context_1): Remove cleanup.
1383
1384 2017-09-05 Tom Tromey <tom@tromey.com>
1385
1386 * go-exp.y (go_parse): Don't create a cleanup.
1387
1388 2017-09-05 Tom Tromey <tom@tromey.com>
1389
1390 * d-exp.y (PrimaryExpression): Use std::string.
1391 (d_parse): Don't create a cleanup.
1392
1393 2017-09-05 Tom Tromey <tom@tromey.com>
1394
1395 * utils.c (do_clear_parser_state): Remove.
1396 (make_cleanup_clear_parser_state): Remove.
1397 * p-exp.y (pascal_parse): Use scoped_restore.
1398 * m2-exp.y (m2_parse): Use scoped_restore.
1399 * f-exp.y (f_parse): Use scoped_restore.
1400 * d-exp.y (d_parse): Use scoped_restore.
1401 * c-exp.y (c_parse): Use scoped_restore.
1402 * ada-exp.y (ada_parse): Use scoped_restore.
1403 * utils.h (make_cleanup_clear_parser_state): Remove.
1404
1405 2017-09-06 Keith Seitz <keiths@redhat.com>
1406
1407 * dwarf2read.c (dw2_linkage_name_attr): New function.
1408 (dw2_linkage_name): New function.
1409 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1410 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1411 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1412
1413 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1414
1415 * config/djgpp/djconfig.sh: Correct shell portability issue.
1416
1417 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1418
1419 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1420
1421 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1422
1423 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1424 * NEWS: Mention new FreeBSD/mips native configuration.
1425 * configure.host: Add aarch64*-*-freebsd*.
1426 * configure.nat: Likewise.
1427 * aarch64-fbsd-nat.c: New file.
1428
1429 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1430
1431 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1432 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1433 * NEWS: Mention new FreeBSD/aarch64 target.
1434 * configure.tgt: Add aarch64*-*-freebsd*.
1435 * aarch64-fbsd-tdep.c: New file.
1436 * aarch64-fbsd-tdep.h: New file.
1437
1438 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1439
1440 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1441
1442 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1443
1444 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1445 of TLS symbols.
1446
1447 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1448
1449 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1450 call.
1451
1452 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1453
1454 * infrun.c (follow_exec): Call add_thread after
1455 target_find_description.
1456
1457 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1458
1459 * infrun.c (handle_inferior_event_1): When exec'ing, read
1460 stop_pc after follow_exec.
1461
1462 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1463
1464 * remote.c (process_g_packet): Update error message.
1465
1466 2017-09-05 Yao Qi <yao.qi@linaro.org>
1467
1468 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1469 targets.
1470
1471 2017-09-05 Pedro Alves <palves@redhat.com>
1472
1473 * eval.c (eval_call, evaluate_funcall): New functions, factored
1474 out from ...
1475 (evaluate_subexp_standard): ... this.
1476
1477 2017-09-05 Yao Qi <yao.qi@linaro.org>
1478
1479 * amd64-tdep.c (amd64_target_description): Create target
1480 descriptions.
1481 (_initialize_amd64_tdep): Don't call functions
1482 initialize_tdesc_amd64_*. Add self tests.
1483 * arch/amd64.c (amd64_create_target_description): Add parameter
1484 is_linux. Call set_tdesc_osabi if is_linux is true.
1485 * arch/amd64.h (amd64_create_target_description): Update the
1486 declaration.
1487 * arch/i386.c (i386_create_target_description): Add parameter
1488 is_linux. Call set_tdesc_osabi if is_linux is true.
1489 * arch/i386.h (i386_create_target_description): Update
1490 declaration.
1491 * configure.tgt: Add i386.o to gdb_target_obs.
1492 * features/Makefile (XMLTOC): Remove i386/*.xml.
1493 * features/i386/amd64-avx-avx512.c: Remove.
1494 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1495 * features/i386/amd64-avx-mpx.c: Remove.
1496 * features/i386/amd64-avx.c: Remove.
1497 * features/i386/amd64-mpx.c: Remove.
1498 * features/i386/amd64.c: Remove.
1499 * features/i386/i386-avx-avx512.c: Remove.
1500 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1501 * features/i386/i386-avx-mpx.c: Remove.
1502 * features/i386/i386-avx.c: Remove.
1503 * features/i386/i386-mmx.c: Remove.
1504 * features/i386/i386-mpx.c: Remove.
1505 * features/i386/i386.c: Remove.
1506 * i386-tdep.c: Don't include features/i386/i386*.c., include
1507 target-descriptions.h and arch/i386.h.
1508 (i386_target_description): Create target descriptions.
1509 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1510 functions. Do self tests.
1511
1512 2017-09-05 Yao Qi <yao.qi@linaro.org>
1513
1514 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1515 * features/i386/amd64-avx-avx512-linux.c: Removed.
1516 * features/i386/amd64-avx-linux.c: Removed.
1517 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1518 * features/i386/amd64-avx-mpx-linux.c: Removed.
1519 * features/i386/amd64-linux.c: Removed.
1520 * features/i386/amd64-mpx-linux.c: Removed.
1521 * features/i386/x32-avx-avx512-linux.c: Removed.
1522 * features/i386/x32-avx-linux.c: Removed.
1523 * features/i386/x32-linux.c: Removed.
1524
1525 2017-09-05 Yao Qi <yao.qi@linaro.org>
1526
1527 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1528 features/i386/*.c.
1529 (amd64_linux_read_description): Call
1530 amd64_create_target_description.
1531 * arch/amd64.c: New file.
1532 * arch/amd64.h: New file.
1533 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1534 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1535
1536 2017-09-05 Yao Qi <yao.qi@linaro.org>
1537
1538 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1539 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1540 (amd64_linux_read_description): Create target descriptions.
1541 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1542 functions. Add unit tests.
1543 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1544 x32-core.xml.
1545 * features/i386/64bit-avx.c: Generated.
1546 * features/i386/64bit-avx512.c: Generated.
1547 * features/i386/64bit-core.c: Generated.
1548 * features/i386/64bit-linux.c: Generated.
1549 * features/i386/64bit-mpx.c: Generated.
1550 * features/i386/64bit-pkeys.c: Generated.
1551 * features/i386/64bit-segments.c: Generated.
1552 * features/i386/64bit-sse.c: Generated.
1553 * features/i386/x32-core.c: Generated.
1554 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1555 c files for amd64-linux and x32-linux.
1556
1557 2017-09-05 Yao Qi <yao.qi@linaro.org>
1558
1559 * amd64-linux-tdep.c (amd64_linux_read_description): New
1560 function.
1561 (amd64_linux_core_read_description): Call
1562 amd64_linux_read_description.
1563 (amd64_linux_init_abi): Likewise.
1564 (amd64_x32_linux_init_abi): Likewise.
1565 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1566 * x86-linux-nat.c (x86_linux_read_description): Call
1567 amd64_linux_read_description.
1568
1569 2017-09-05 Yao Qi <yao.qi@linaro.org>
1570
1571 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1572 comments.
1573
1574 2017-09-05 Yao Qi <yao.qi@linaro.org>
1575
1576 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1577 * features/i386/i386-avx-avx512-linux.c: Remove.
1578 * features/i386/i386-avx-linux.c: Remove.
1579 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1580 * features/i386/i386-avx-mpx-linux.c: Remove.
1581 * features/i386/i386-linux.c: Remove.
1582 * features/i386/i386-mmx-linux.c: Remove.
1583 * features/i386/i386-mpx-linux.c: Remove.
1584
1585 2017-09-05 Yao Qi <yao.qi@linaro.org>
1586
1587 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1588 (SFILES): Add arch/i386.c.
1589 (HFILES_NO_SRCDIR): Add arch/i386.h.
1590 * arch/i386.c: New file.
1591 * arch/i386.h: New file.
1592 * arch/tdesc.h (allocate_target_description): Declare.
1593 (set_tdesc_architecture): Declare.
1594 (set_tdesc_osabi): Declare.
1595 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1596 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1597 include arch/i386.h.
1598 (i386_linux_read_description): Remove code and call
1599 i386_create_target_description.
1600 (set_tdesc_architecture): New function.
1601 (set_tdesc_osabi): New function.
1602 * target-descriptions.h (allocate_target_description): Remove.
1603
1604 2017-09-05 Yao Qi <yao.qi@linaro.org>
1605
1606 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1607 * target-descriptions.c (tdesc_create_feature): Likewise, and
1608 adjust code.
1609 * features/i386/32bit-avx.c: Re-generated.
1610 * features/i386/32bit-avx512.c: Re-generated.
1611 * features/i386/32bit-core.c: Re-generated.
1612 * features/i386/32bit-linux.c: Re-generated.
1613 * features/i386/32bit-mpx.c: Re-generated.
1614 * features/i386/32bit-pkeys.c: Re-generated.
1615 * features/i386/32bit-sse.c: Re-generated.
1616
1617 2017-09-05 Yao Qi <yao.qi@linaro.org>
1618
1619 * regformats/regdef.h (struct reg): Override operator == and !=.
1620
1621 2017-09-05 Yao Qi <yao.qi@linaro.org>
1622
1623 * arch/tdesc.h: New file.
1624 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1625 * target-descriptions.c: Update comments.
1626 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1627 declarations.
1628 * features/i386/32bit-avx.c: Re-generated.
1629 * features/i386/32bit-avx512.c: Re-generated.
1630 * features/i386/32bit-core.c: Re-generated.
1631 * features/i386/32bit-linux.c: Re-generated.
1632 * features/i386/32bit-mpx.c: Re-generated.
1633 * features/i386/32bit-pkeys.c: Re-generated.
1634 * features/i386/32bit-sse.c: Re-generated.
1635
1636 2017-09-05 Yao Qi <yao.qi@linaro.org>
1637
1638 * regformats/regdat.sh: Update generated code.
1639
1640 2017-09-05 Yao Qi <yao.qi@linaro.org>
1641
1642 * regformats/regdat.sh: Adjust code order.
1643
1644 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1645
1646 * expprint.c (dump_subexp_body_standard): Use constant format
1647 string in fprintf_filtered call.
1648
1649 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1650
1651 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1652 NetBSD/i386.
1653 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1654
1655 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1656
1657 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1658
1659 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1660
1661 * bsd-kvm.o: Define _KMEMUSER.
1662 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1663 * configure: Regenerate.
1664
1665 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1666
1667 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1668 * i386-fbsd-nat.c: Likewise.
1669
1670 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1671
1672 * unittests/array-view-selftests.c: Add include of <array>.
1673
1674 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1675
1676 * spu-tdep.c (flush_ea_cache): Add missing argument to
1677 call_function_by_hand.
1678
1679 2017-09-04 Pedro Alves <palves@redhat.com>
1680
1681 * NEWS (Safer support for debugging with no debug info): New.
1682
1683 2017-09-04 Pedro Alves <palves@redhat.com>
1684
1685 * c-exp.y (function_method, function_method_void): Add current
1686 instance flags to TYPE_INSTANCE.
1687 * dwarf2read.c (check_modifier): New.
1688 (compute_delayed_physnames): Assert that only C++ adds delayed
1689 physnames. Mark fn_fields as const/volatile depending on
1690 physname.
1691 * eval.c (make_params): New type_instance_flags parameter. Use
1692 it as the new type's instance flags.
1693 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1694 flags element and pass it to make_params.
1695 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1696 instance flags element.
1697 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1698 * gdbtypes.h: Include "enum-flags.h".
1699 (type_instance_flags): New enum-flags type.
1700 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1701 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1702 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1703 (follow_type_instance_flags): New function.
1704 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1705 * parser-defs.h (follow_type_instance_flags): Declare.
1706 * valops.c (value_struct_elt_for_reference): const/volatile must
1707 match too.
1708
1709 2017-09-04 Pedro Alves <palves@redhat.com>
1710
1711 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1712 function/method scopes; lookup the nested name as a function local
1713 static variable.
1714
1715 2017-09-04 Pedro Alves <palves@redhat.com>
1716
1717 (%type <voidval>): Add function_method.
1718 * c-exp.y (exp): New production for calls with no arguments.
1719 (function_method, function_method_void_or_typelist): New
1720 productions.
1721 (exp): New production for "method()::static_var".
1722 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1723 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1724 Handle OP_FUNC_STATIC_VAR.
1725 * parse.c (operator_length_standard):
1726 Handle OP_FUNC_STATIC_VAR.
1727
1728 2017-09-04 Pedro Alves <palves@redhat.com>
1729
1730 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1731 handling.
1732 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1733 Ditto.
1734 * parse.c (operator_length_standard, operator_check_standard):
1735 Ditto.
1736 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1737
1738 2017-09-04 Pedro Alves <palves@redhat.com>
1739
1740 * ax-gdb.c: Include "typeprint.h".
1741 (gen_expr_for_cast): New function.
1742 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1743 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1744 type is unknown.
1745 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1746 nodebug_data_symbol.
1747 * eval.c: Include "typeprint.h".
1748 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1749 Error out if symbol has unknown type.
1750 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1751 evaluate_subexp_for_cast.
1752 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1753 OP_VAR_MSYM_VALUE.
1754 (evaluate_subexp_for_cast): New function.
1755 * gdbtypes.c (init_nodebug_var_type): New function.
1756 (objfile_type): Use it to initialize types of variables with no
1757 debug info.
1758 * typeprint.c (error_unknown_type): New.
1759 * typeprint.h (error_unknown_type): New declaration.
1760 * compile/compile-c-types.c (convert_type_basic): Handle
1761 TYPE_CODE_ERROR; warn and fallback to int for variables with
1762 unknown type.
1763
1764 2017-09-04 Pedro Alves <palves@redhat.com>
1765
1766 * eval.c (evaluate_var_value): New function, factored out from ...
1767 (evaluate_subexp_standard): ... here.
1768
1769 2017-09-04 Pedro Alves <palves@redhat.com>
1770
1771 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1772 Remove useless assignments to 'op'.
1773
1774 2017-09-04 Pedro Alves <palves@redhat.com>
1775
1776 * eval.c (eval_skip_value): New function.
1777 (evaluate_subexp_standard): Use it.
1778
1779 2017-09-04 Pedro Alves <palves@redhat.com>
1780
1781 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1782 function name from symbol/minsym and pass it to
1783 error_call_unknown_return_type.
1784
1785 2017-09-04 Pedro Alves <palves@redhat.com>
1786
1787 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1788 * ax-gdb.c (gen_msym_var_ref): New function.
1789 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1790 * eval.c (evaluate_var_msym_value): New function.
1791 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1792 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1793 to call_function_by_hand.
1794 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1795 Handle OP_VAR_MSYM_VALUE.
1796 (union exp_element) <msymbol>: New field.
1797 * minsyms.h (struct type): Forward declare.
1798 (find_minsym_type_and_address): Declare.
1799 * parse.c (write_exp_elt_msym): New function.
1800 (write_exp_msymbol): Delete, refactored as ...
1801 (find_minsym_type_and_address): ... this new function.
1802 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1803 (operator_length_standard, operator_check_standard): Handle
1804 OP_VAR_MSYM_VALUE.
1805 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1806
1807 2017-09-04 Pedro Alves <palves@redhat.com>
1808
1809 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1810 TYPE_GNU_IFUNC specially here. Throw error if return type is
1811 unknown.
1812 * ada-typeprint.c (print_func_type): Handle functions with unknown
1813 return type.
1814 * c-typeprint.c (c_type_print_base): Handle functions and methods
1815 with unknown return type.
1816 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1817 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1818 * compile/compile-c-types.c: Include "objfiles.h".
1819 (convert_func): For functions with unknown return type, warn and
1820 default to int.
1821 * compile/compile-object-run.c (compile_object_run): Adjust call
1822 to call_function_by_hand_dummy.
1823 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1824 call_function_by_hand.
1825 * eval.c (evaluate_subexp_standard): Adjust calls to
1826 call_function_by_hand. Handle functions and methods with unknown
1827 return type. Pass expect_type to call_function_by_hand.
1828 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1829 return type.
1830 * gcore.c (call_target_sbrk): Adjust call to
1831 call_function_by_hand.
1832 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1833 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1834 an integer address type instead of nodebug.
1835 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1836 call_function_by_hand.
1837 * infcall.c (error_call_unknown_return_type): New function.
1838 (call_function_by_hand): New "default_return_type" parameter.
1839 Pass it down.
1840 (call_function_by_hand_dummy): New "default_return_type"
1841 parameter. Use it instead of defaulting to int. If there's no
1842 default and the return type is unknown, throw an error. If
1843 there's a default return type, and the called function has no
1844 debug info, then assume the function is prototyped.
1845 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1846 New "default_return_type" parameter.
1847 (error_call_unknown_return_type): New declaration.
1848 * linux-fork.c (call_lseek): Cast return type of lseek.
1849 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1850 call_function_by_hand.
1851 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1852 calls to call_function_by_hand.
1853 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1854 return type.
1855 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1856 (value_nsstring, print_object_command): Adjust calls to
1857 call_function_by_hand.
1858 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1859 functions with unknown return type.
1860 (pascal_type_print_func_varspec_suffix): New function.
1861 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1862 TYPE_CODE_METHOD>: Use it.
1863 * python/py-value.c (valpy_call): Adjust call to
1864 call_function_by_hand.
1865 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1866 call_function_by_hand.
1867 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1868 call_function_by_hand.
1869 * valops.c (value_allocate_space_in_inferior): Adjust call to
1870 call_function_by_hand.
1871 * typeprint.c (type_print_unknown_return_type): New function.
1872 * typeprint.h (type_print_unknown_return_type): New declaration.
1873
1874 2017-09-04 Pedro Alves <palves@redhat.com>
1875
1876 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1877 types with more than one parameter as prototyped.
1878
1879 2017-09-04 Pedro Alves <palves@redhat.com>
1880
1881 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1882 (disassemble_command): Use gdb_disassembly_flags instead of bare
1883 int.
1884 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1885 (dump_insns, do_mixed_source_and_assembly_deprecated)
1886 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1887 Use gdb_disassembly_flags instead of bare int.
1888 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1889 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1890 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1891 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1892 (enum gdb_disassembly_flag): ... values of this new enumeration.
1893 (gdb_disassembly_flags): Define.
1894 (gdb_disassembly)
1895 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1896 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1897 gdb_disassembly_flags instead of bare int.
1898 * record-btrace.c (btrace_insn_history)
1899 (record_btrace_insn_history, record_btrace_insn_history_range)
1900 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1901 instead of bare int.
1902 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1903 Use gdb_disassembly_flags instead of bare int.
1904 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1905 Define.
1906 * target-delegates.c: Regenerate.
1907 * target.c (target_insn_history, target_insn_history_from)
1908 (target_insn_history_range): Use gdb_disassembly_flags instead of
1909 bare int.
1910 * target.h: Include "disasm.h".
1911 (struct target_ops) <to_insn_history, to_insn_history_from,
1912 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1913 int.
1914 (target_insn_history, target_insn_history_from)
1915 (target_insn_history_range): Use gdb_disassembly_flags instead of
1916 bare int.
1917
1918 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1919
1920 * cli/cli-script.c (build_command_line): For if/while commands,
1921 check whether args is empty.
1922
1923 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1926 (enum command_control_type): Likewise.
1927 (struct command_line): Likewise.
1928 (free_command_lines): Likewise.
1929 (struct command_lines_deleter): Likewise.
1930 (command_line_up): Likewise.
1931 (read_command_lines): Likewise.
1932 (read_command_lines_1): Likewise.
1933 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1934 (enum command_control_type): Likewise.
1935 (struct command_line): Likewise.
1936 (free_command_lines): Likewise.
1937 (struct command_lines_deleter): Likewise.
1938 (command_line_up): Likewise.
1939 (read_command_lines): Likewise.
1940 (read_command_lines_1): Likewise.
1941 * breakpoint.h: Include cli/cli-script.h.
1942 * extension-priv.h: Likewise.
1943 * gdbcmd.h: Likewise.
1944
1945 2017-09-04 Pedro Alves <palves@redhat.com>
1946
1947 * ada-lang.c (is_known_support_routine): Move sal declaration to
1948 where it is initialized.
1949 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1950 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1951 (clear_command, update_static_tracepoint): Remove init_sal
1952 references. Move declarations closer to initializations.
1953 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1954 initializations.
1955 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1956 references. Move sal declarations closer to initializations.
1957 * frame.c (find_frame_sal): Return a symtab_and_line via function
1958 return instead of output parameter. Remove init_sal references.
1959 * frame.h (find_frame_sal): Return a symtab_and_line via function
1960 return instead of output parameter.
1961 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1962 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1963 instead of memset.
1964 (gdbscm_find_pc_line): Remove init_sal reference.
1965 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1966 references. Move declarations closer to initializations.
1967 * infcmd.c (set_step_frame): Update. Move declarations closer to
1968 initializations.
1969 (finish_backward): Remove init_sal references. Move declarations
1970 closer to initializations.
1971 * infrun.c (process_event_stop_test, handle_step_into_function)
1972 (insert_hp_step_resume_breakpoint_at_frame)
1973 (insert_step_resume_breakpoint_at_caller): Likewise.
1974 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1975 (symbol_to_sal): Likewise.
1976 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1977 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1978 to its initialization.
1979 * reverse.c (save_bookmark_command): Use new/delete. Remove
1980 init_sal references. Move declarations closer to initializations.
1981 * source.c (get_current_source_symtab_and_line): Remove brace
1982 initialization.
1983 (set_current_source_symtab_and_line): Now takes the sal by const
1984 reference. Remove brace initialization.
1985 (line_info): Remove init_sal reference.
1986 * source.h (set_current_source_symtab_and_line): Now takes a
1987 symtab_and_line via const reference.
1988 * stack.c (set_current_sal_from_frame): Adjust.
1989 (print_frame_info): Adjust.
1990 (get_last_displayed_sal): Return the sal via function return
1991 instead of via output parameter. Simplify.
1992 (frame_info): Adjust.
1993 * stack.h (get_last_displayed_sal): Return the sal via function
1994 return instead of via output parameter.
1995 * symtab.c (init_sal): Delete.
1996 (find_pc_sect_line): Remove init_sal references. Move
1997 declarations closer to initializations.
1998 (find_function_start_sal): Remove init_sal references. Move
1999 declarations closer to initializations.
2000 * symtab.h (struct symtab_and_line): In-class initialize all
2001 fields.
2002 * tracepoint.c (set_traceframe_context)
2003 (print_one_static_tracepoint_marker): Remove init_sal references.
2004 Move declarations closer to initializations.
2005 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2006 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2007 declarations closer to initializations.
2008 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2009 init_sal references. Adjust.
2010
2011 2017-09-04 Pedro Alves <palves@redhat.com>
2012
2013 * ax-gdb.c (agent_command_1): Use range-for.
2014 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2015 * breakpoint.c: Include "common/array-view.h".
2016 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2017 parameter from struct symtabs_and_lines to
2018 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2019 (breakpoint_sals_to_pc): Change sals parameter from struct
2020 symtabs_and_lines to std::vector reference.
2021 (check_fast_tracepoint_sals): Change sals parameter from struct
2022 symtabs_and_lines to std::array_view. Use range-for.
2023 (decode_static_tracepoint_spec): Return a std::vector instead of
2024 symtabs_and_lines. Update.
2025 (create_breakpoint): Update.
2026 (break_range_command, until_break_command, clear_command): Update.
2027 (base_breakpoint_decode_location, bkpt_decode_location)
2028 (bkpt_probe_create_sals_from_location)
2029 (bkpt_probe_decode_location, tracepoint_decode_location)
2030 (tracepoint_probe_decode_location)
2031 (strace_marker_create_sals_from_location): Return a std::vector
2032 instead of symtabs_and_lines.
2033 (strace_marker_create_breakpoints_sal): Update.
2034 (strace_marker_decode_location): Return a std::vector instead of
2035 symtabs_and_lines. Update.
2036 (update_breakpoint_locations): Change struct symtabs_and_lines
2037 parameters to gdb::array_view. Adjust.
2038 (location_to_sals): Return a std::vector instead of
2039 symtabs_and_lines. Update.
2040 (breakpoint_re_set_default): Use std::vector instead of struct
2041 symtabs_and_lines.
2042 (decode_location_default): Return a std::vector instead of
2043 symtabs_and_lines. Update.
2044 * breakpoint.h: Include "common/array-view.h".
2045 (struct breakpoint_ops) <decode_location>: Now returns a
2046 std::vector instead of returning a symtabs_and_lines via output
2047 parameter.
2048 (update_breakpoint_locations): Change sals parameters to use
2049 gdb::array_view.
2050 * cli/cli-cmds.c (edit_command, list_command): Update to use
2051 std::vector and gdb::array_view.
2052 (ambiguous_line_spec): Adjust to use gdb::array_view and
2053 range-for.
2054 (compare_symtabs): Rename to ...
2055 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2056 const reference and adjust.
2057 (filter_sals): Rewrite using std::vector and standard algorithms.
2058 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2059 (jump_command): Update to use std::vector.
2060 * linespec.c (struct linespec_state) <canonical_names>: Update
2061 comment.
2062 (add_sal_to_sals_basic): Delete.
2063 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2064 (decode_line_2, create_sals_line_offset)
2065 (convert_address_location_to_sals, convert_linespec_to_sals)
2066 (convert_explicit_location_to_sals, parse_linespec)
2067 (event_location_to_sals, decode_line_full, decode_line_1)
2068 (decode_line_with_current_source)
2069 (decode_line_with_last_displayed, decode_objc)
2070 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2071 (linespec_result::~linespec_result): Adjust to use std::vector
2072 instead of symtabs_and_lines.
2073 * linespec.h (linespec_sals::sals): Now a std::vector.
2074 (struct linespec_result): Use std::vector, bool, and in-class
2075 initialization.
2076 (decode_line_1, decode_line_with_current_source)
2077 (decode_line_with_last_displayed): Return std::vector.
2078 * macrocmd.c (info_macros_command): Use std::vector.
2079 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2080 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2081 std::vector.
2082 * probe.h (parse_probes): Return a std::vector.
2083 * python/python.c (gdbpy_decode_line): Use std::vector and
2084 gdb::array_view.
2085 * source.c (select_source_symtab, line_info): Use std::vector.
2086 * stack.c (func_command): Use std::vector.
2087 * symtab.h (struct symtabs_and_lines): Delete.
2088 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2089
2090 2017-09-04 Pedro Alves <palves@redhat.com>
2091
2092 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2093 unittests/array-view-selftests.c.
2094 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2095 * common/array-view.h: New file.
2096 * unittests/array-view-selftests.c: New file.
2097
2098 2017-09-04 Pedro Alves <palves@redhat.com>
2099
2100 * cli/cli-cmds.c (edit_command): Pass message to
2101 ambiguous_line_spec.
2102 (list_command): Pass message to ambiguous_line_spec. Say
2103 "first"/"last" instead of "start" and "end" to be consistent with
2104 the manual.
2105 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2106 them to print formatted message.
2107
2108 2017-09-04 Pedro Alves <palves@redhat.com>
2109
2110 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2111 ftrace_update_insns by reference instead of pointer.
2112
2113 2017-09-04 Yao Qi <yao.qi@linaro.org>
2114
2115 * i386-go32-tdep.c: Include x86-xstate.h.
2116 (i386_go32_init_abi): Call i386_target_description.
2117 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2118 if xcr0 is X86_XSTATE_X87_MASK.
2119 * i386-tdep.h (tdesc_i386): Remove the declaration.
2120 (tdesc_i386_mmx): Likewise.
2121
2122 2017-09-04 Yao Qi <yao.qi@linaro.org>
2123
2124 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2125 X86_XSTATE_SSE_MASK instead of 0.
2126
2127 2017-09-04 Yao Qi <yao.qi@linaro.org>
2128
2129 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2130 i386_target_description.
2131 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2132 i386_target_description.
2133 * i386-tdep.c (i386_gdbarch_init): Likewise.
2134
2135 2017-09-04 Yao Qi <yao.qi@linaro.org>
2136
2137 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2138 (x86_darwin_init_abi_64): Call amd64_target_description.
2139 * amd64-dicos-tdep.c: Likewise.
2140 * amd64-fbsd-nat.c: Likewise.
2141 * amd64-fbsd-tdep.c: Likewise.
2142 * amd64-nbsd-tdep.c: Likewise.
2143 * amd64-obsd-tdep.c: Likewise.
2144 * amd64-sol2-tdep.c: Likewise.
2145 * amd64-windows-tdep.c: Likewise.
2146 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2147
2148 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2149
2150 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2151 (btrace_function) <insn>: Change type to use std::vector.
2152 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2153 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2154 ftrace_update_insns, ftrace_compute_global_level_offset,
2155 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2156 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2157 change to std::vector.
2158 (ftrace_update_insns): Adjust to change to std::vector, change
2159 type of INSN parameter.
2160 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2161 * record-btrace.c (btrace_call_history_insn_range,
2162 btrace_compute_src_line_range,
2163 record_btrace_frame_prev_register): Adjust to change to
2164 std::vector.
2165 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2166 to change to std::vector.
2167
2168 2017-09-03 Tom Tromey <tom@tromey.com>
2169
2170 * corefile.c (reopen_exec_file): Use std::string.
2171
2172 2017-09-03 Tom Tromey <tom@tromey.com>
2173
2174 * compile/compile.c (compile_register_name_mangled): Return
2175 std::string.
2176 * compile/compile-loc2c.c (pushf_register_address): Update.
2177 (pushf_register): Update.
2178 * compile/compile-c-types.c (convert_array): Update.
2179 * compile/compile-c-symbols.c (generate_vla_size): Update.
2180 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2181 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2182 (convert_one_symbol): Update.
2183 (generate_c_for_for_one_variable): Update.
2184 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2185 std::string.
2186 (generate_register_struct): Update.
2187 * compile/compile-internal.h (c_get_range_decl_name): Return a
2188 std::string.
2189 (compile_register_name_mangled): Return std::string.
2190
2191 2017-09-03 Tom Tromey <tom@tromey.com>
2192
2193 * utils.c (perror_string): Return a std::string.
2194 (throw_perror_with_name, perror_warning_with_name): Update.
2195
2196 2017-09-03 Tom Tromey <tom@tromey.com>
2197
2198 * demangle.c (demangle_command): Use std::string,
2199 unique_xmalloc_ptr.
2200
2201 2017-09-03 Tom Tromey <tom@tromey.com>
2202
2203 * cli/cli-setshow.c (do_set_command): Use std::string.
2204
2205 2017-09-03 Tom Tromey <tom@tromey.com>
2206
2207 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2208
2209 2017-09-03 Tom Tromey <tom@tromey.com>
2210
2211 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2212
2213 2017-09-03 Tom Tromey <tom@tromey.com>
2214
2215 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2216 gdb::unique_xmalloc_ptr.
2217
2218 2017-09-03 Tom Tromey <tom@tromey.com>
2219
2220 * thread.c (print_thread_info_1): Use string_printf.
2221 (thread_apply_command, thread_apply_all_command): Use
2222 std::string.
2223
2224 2017-09-03 Tom Tromey <tom@tromey.com>
2225
2226 * valprint.c (val_print_string): Update.
2227 * gdbcore.h (memory_error_message): Return std::string.
2228 * corefile.c (memory_error_message): Return std::string.
2229 (memory_error): Update.
2230 * breakpoint.c (insert_bp_location): Update.
2231
2232 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2233
2234 * target/waitstatus.h (target_waitstatus_to_string): Change
2235 return type to std::string.
2236 * target/waitstatus.c (target_waitstatus_to_string): Return
2237 std::string.
2238 * target.h (target_waitstatus_to_string): Remove declaration.
2239 * infrun.c (resume, clear_proceed_status_thread,
2240 print_target_wait_results, do_target_wait, save_waitstatus,
2241 stop_all_threads): Adjust.
2242 * record-btrace.c (record_btrace_wait): Adjust.
2243 * target-debug.h
2244 (target_debug_print_struct_target_waitstatus_p): Adjust.
2245
2246 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2247
2248 PR gdb/22046
2249 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2250 detection.
2251
2252 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2253
2254 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2255 for setting/unsetting environment variables on the remote target.
2256 (New remote packets): Add entries for QEnvironmentHexEncoded,
2257 QEnvironmentUnset and QEnvironmentReset.
2258 * common/environ.c (gdb_environ::operator=): Extend method to
2259 handle m_user_set_env_list and m_user_unset_env_list.
2260 (gdb_environ::clear): Likewise.
2261 (match_var_in_string): Change type of first parameter from 'char
2262 *' to 'const char *'.
2263 (gdb_environ::set): Extend method to handle
2264 m_user_set_env_list and m_user_unset_env_list.
2265 (gdb_environ::unset): Likewise.
2266 (gdb_environ::clear_user_set_env): New method.
2267 (gdb_environ::user_set_envp): Likewise.
2268 (gdb_environ::user_unset_envp): Likewise.
2269 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2270 m_user_unset_env_list on move constructor/assignment.
2271 (unset): Add new default parameter 'update_unset_list = true'.
2272 (clear_user_set_env): New method.
2273 (user_set_envp): Likewise.
2274 (user_unset_envp): Likewise.
2275 (m_user_set_env_list): New std::set.
2276 (m_user_unset_env_list): Likewise.
2277 * common/rsp-low.c (hex2str): New function.
2278 (bin2hex): New overload for bin2hex function.
2279 * common/rsp-low.c (hex2str): New prototype.
2280 (str2hex): New overload prototype.
2281 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2282 QEnvironmentUnset and QEnvironmentReset.
2283 (remote_protocol_features): Add QEnvironmentHexEncoded,
2284 QEnvironmentUnset and QEnvironmentReset packets.
2285 (send_environment_packet): New function.
2286 (extended_remote_environment_support): Likewise.
2287 (extended_remote_create_inferior): Call
2288 extended_remote_environment_support.
2289 (_initialize_remote): Add QEnvironmentHexEncoded,
2290 QEnvironmentUnset and QEnvironmentReset packet configs.
2291 * unittests/environ-selftests.c (gdb_selftest_env_var):
2292 New variable.
2293 (test_vector_initialization): New function.
2294 (test_init_from_host_environ): Likewise.
2295 (test_reinit_from_host_environ): Likewise.
2296 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2297 Likewise.
2298 (test_unset_set_empty_vector): Likewise.
2299 (test_vector_clear): Likewise.
2300 (test_std_move): Likewise.
2301 (test_move_constructor):
2302 (test_self_move): Likewise.
2303 (test_set_unset_reset): Likewise.
2304 (run_tests): Rewrite in terms of the functions above.
2305
2306 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2307
2308 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2309 (adi_available): Use a temp variable of type CORE_ADDR as argument
2310 3 when calling target_auxv_search.
2311 (adi_normalize_address): Use masks and xor operators to calculate
2312 normalized address.
2313 (adi_read_versions, adi_write_versions, adi_print_versions)
2314 (do_examine, do_assign): Use paddress.
2315
2316 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2317
2318 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2319 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2320 out of loop and add supply of FIR.
2321 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2322 add collect of FIR.
2323
2324 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 PR gdb/21827
2327 * cli/cli-script.c (define_command): Don't convert command name
2328 to lower case.
2329
2330 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2331
2332 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2333 Update all callers accordingly. Remove all code blocks handling
2334 the case where DISPP is not NULL.
2335
2336 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2337
2338 PR symtab/22003
2339 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2340 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2341 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2342
2343 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2344
2345 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2346 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2347 (read_comp_units_from_section): New parameter abbrev_section, use
2348 read_and_check_comp_unit_head, allocate signatured_type if needed.
2349 (create_all_comp_units): Update read_comp_units_from_section caller.
2350
2351 2017-08-23 Pedro Alves <palves@redhat.com>
2352
2353 PR remote/21852
2354 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2355 to null_ptid and switch to thread without reading the registers
2356 after adding the inferior.
2357
2358 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2359
2360 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2361 compile-gcc.
2362 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2363 (compile_to_object): Implement compile_gcc.
2364 (_initialize_compile): Install "set compile-gcc". Initialize
2365 compile_gcc.
2366
2367 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2368
2369 * compile/compile.c (compile_to_object): Conditionally call
2370 set_verbose. Conditionally call compile or compile_v0.
2371
2372 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2373
2374 * sparc64-tdep.h: (adi_normalize_address): New export.
2375 * sparc-nat.h: (open_adi_tag_fd): New export.
2376 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2377 * sparc64-linux-tdep.c:
2378 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2379 (sparc64_linux_handle_segmentation_fault): New function.
2380 (sparc64_linux_init_abi): Register
2381 sparc64_linux_handle_segmentation_fault
2382 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2383 (sparc64_addr_bits_remove): New function.
2384 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2385 (MAX_PROC_NAME_SIZE): New macro.
2386 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2387 (sparc64adilist): New variable.
2388 (adi_proc_list): New variable.
2389 (find_adi_info): New function.
2390 (add_adi_info): New function.
2391 (get_adi_info_proc): New function.
2392 (get_adi_info): New function.
2393 (info_adi_command): New function.
2394 (read_maps_entry): New function.
2395 (adi_available): New function.
2396 (adi_normalize_address): New function.
2397 (adi_align_address): New function.
2398 (adi_convert_byte_count): New function.
2399 (adi_tag_fd): New function.
2400 (adi_is_addr_mapped): New function.
2401 (adi_read_versions): New function.
2402 (adi_write_versions): New function.
2403 (adi_print_versions): New function.
2404 (do_examine): New function.
2405 (do_assign): New function.
2406 (adi_examine_command): New function.
2407 (adi_assign_command): New function.
2408 (_initialize_sparc64_adi_tdep): New function.
2409
2410 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2411
2412 * breakpoint.c (breakpoints_info): Rename to ...
2413 (info_breakpoints_command): ... this.
2414 (watchpoints_info): Rename to ...
2415 (info_watchpoints_command): ... this.
2416 (tracepoints_info): Rename to ...
2417 (info_tracepoints_command): ... this.
2418 (_initialize_breakpoint): Adjust.
2419 * dcache.c (dcache_info): Rename to ...
2420 (info_display_command): ... this.
2421 (_initialize_dcache): Adjust.
2422 * frame.h (args_info): Rename to ...
2423 (info_args_command): ... this.
2424 (locals_info): Rename to ...
2425 (info_locals_command): ... this.
2426 * infcmd.c (nofp_registers_info): Rename to ...
2427 (info_registers_command): ... this.
2428 (float_info): Rename to ...
2429 (info_float_command): ... this.
2430 (program_info): Rename to ...
2431 (info_program_command): ... this.
2432 (all_registers_info): Rename to ...
2433 (info_all_registers_command): ... this.
2434 (vector_info): Rename to ...
2435 (info_vector_command): ... this.
2436 (float_info): Rename to ...
2437 (info_float_command): ... this.
2438 (_initialize_infcmd): Adjust.
2439 * inferior.h (term_info): Rename to ...
2440 (info_terminal_command): ... this.
2441 * inflow.c (term_info): Rename to ...
2442 (info_terminal_command): ... this.
2443 (_initialize_inflow): Adjust.
2444 * infrun.c (signals_info): Rename to ...
2445 (info_signals_command): ... this.
2446 (_initialize_infrun): Adjust.
2447 * objc-lang.c (classes_info): Rename to ...
2448 (info_classes_command): ... this.
2449 (selectors_info): Rename to ...
2450 (info_selectors_command): ... this.
2451 (_initialize_objc_language): Adjust.
2452 * printcmd.c (sym_info): Rename to ...
2453 (info_symbol_command): ... this.
2454 (address_info): Rename to ...
2455 (info_address_command): ... this.
2456 (display_info): Rename to ...
2457 (info_display_command): ... this.
2458 (_initialize_printcmd): Adjust.
2459 * reverse.c (bookmarks_info): Rename to ...
2460 (info_breakpoints_command): ... this.
2461 (_initialize_reverse): Adjust.
2462 * ser-go32.c (dos_info): Rename to ...
2463 (info_serial_command): ... this.
2464 (_initialize_ser_dos): Adjust.
2465 * skip.c (skip_info): Rename to ...
2466 (info_skip_command): ... this.
2467 (_initialize_step_skip): Adjust.
2468 * source.c (line_info): Rename to ...
2469 (info_line_command): ... this.
2470 (source_info): Rename to ...
2471 (info_source_command)
2472 * stack.c (frame_info): Rename to ...
2473 (info_frame_command): ... this.
2474 (locals_info): Rename to ...
2475 (info_locals_command): ... this.
2476 (args_info): Rename to ...
2477 (info_args_command): ... this.
2478 (_initialize_stack): Adjust.
2479 * symtab.c (sources_info): Rename to ...
2480 (info_sources_command): ... this.
2481 (variables_info): Rename to ...
2482 (info_variables_command): ... this.
2483 (functions_info): Rename to ...
2484 (info_functions_command): ... this.
2485 (types_info): Rename to ...
2486 (info_types_command): ... this.
2487 (_initialize_symtab): Adjust.
2488 * target.c (target_info): Rename to ...
2489 (info_target_command): ... this.
2490 (initialize_targets): Adjust.
2491 * tracepoint.c (tvariables_info): Rename to ...
2492 (info_tvariables_command): ... this.
2493 (scope_info): Rename to ...
2494 (info_scope_command): ... this.
2495 (trace_dump_actions): Adjust.
2496 (_initialize_tracepoint): Adjust.
2497
2498 2017-08-22 Tom Tromey <tom@tromey.com>
2499
2500 * breakpoint.h (install_breakpoint): Update.
2501 * breakpoint.c (add_solib_catchpoint): Update.
2502 (install_breakpoint): Change argument to a std::unique_ptr.
2503 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2504 (create_breakpoint_sal, create_breakpoint): Update.
2505 (watch_command_1, catch_exec_command_1)
2506 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2507 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2508 Return the breakpoint.
2509 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2510 (new_single_step_breakpoint): Update.
2511 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2512 std::unique_ptr.
2513 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2514 std::unique_ptr.
2515 * break-catch-sig.c (create_signal_catchpoint): Use
2516 std::unique_ptr.
2517 * ada-lang.c (create_ada_exception_catchpoint): Use
2518 std::unique_ptr.
2519
2520 2017-08-22 Tom Tromey <tom@tromey.com>
2521
2522 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2523
2524 2017-08-22 Tom Tromey <tom@tromey.com>
2525
2526 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2527 (lookup_partial_symbol): Update.
2528
2529 2017-08-22 Tom Tromey <tom@tromey.com>
2530
2531 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2532 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2533 (find_and_open_source, symtab_to_fullname): Update.
2534 * psymtab.c (psymtab_to_fullname): Update.
2535
2536 2017-08-22 Tom Tromey <tom@tromey.com>
2537
2538 * exec.c (exec_file_attach): Update.
2539 * linux-thread-db.c (try_thread_db_load): Update.
2540 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2541 * utils.c (gdb_realpath): Change return type.
2542 (gdb_realpath_keepfile): Update.
2543 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2544 (_initialize_utils): Register the new self test.
2545 * source.c (openp): Update.
2546 (find_and_open_source): Update.
2547 * nto-tdep.c (nto_find_and_open_solib): Update.
2548 * main.c (set_gdb_data_directory): Update.
2549 (captured_main_1): Update.
2550 * dwarf2read.c (dwarf2_get_dwz_file): Update
2551 (dw2_map_symbol_filenames): Update.
2552 * auto-load.c (auto_load_safe_path_vec_update): Update.
2553 (filename_is_in_auto_load_safe_path_vec): Change type of
2554 "filename_realp".
2555 (auto_load_objfile_script): Update.
2556 (file_is_auto_load_safe): Update. Use std::string.
2557 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2558
2559 2017-08-22 Tom Tromey <tom@tromey.com>
2560
2561 * utils.c (gdb_realpath_keepfile): Return a
2562 gdb::unique_xmalloc_ptr.
2563 * exec.c (exec_file_attach): Update.
2564 * utils.h (gdb_realpath_keepfile): Return a
2565 gdb::unique_xmalloc_ptr.
2566
2567 2017-08-22 Tom Tromey <tom@tromey.com>
2568
2569 * compile/compile.c (compile_file_command): Use
2570 gdb::unique_xmalloc_ptr, std::string.
2571 * utils.c (gdb_abspath): Change return type.
2572 * source.c (openp): Update.
2573 * objfiles.c (allocate_objfile): Update.
2574 * main.c (set_gdb_data_directory): Update.
2575 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2576
2577 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2578
2579 * cli-cmds.c (list_commands): List actual code around more than
2580 one location.
2581
2582 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2583
2584 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2585
2586 2017-08-21 Pedro Alves <palves@redhat.com>
2587
2588 PR gdb/19487
2589 * c-exp.y (variable production): Handle function aliases.
2590 * minsyms.c (msymbol_is_text): New function.
2591 * minsyms.h (msymbol_is_text): Declare.
2592 * symtab.c (find_function_alias_target): New function.
2593 * symtab.h (find_function_alias_target): Declare.
2594
2595 2017-08-21 Pedro Alves <palves@redhat.com>
2596
2597 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2598 typedefs.
2599 * typeprint.c (whatis_exp): If handling "whatis", and expression
2600 is OP_TYPE, strip one typedef level. Otherwise don't strip
2601 typedefs here.
2602 * valops.c (value_cast): Save "to" type before resolving
2603 stubs/typedefs. Use that type as resulting value's type.
2604
2605 2017-08-18 Tom Tromey <tom@tromey.com>
2606 Pedro Alves <palves@redhat.com>
2607
2608 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2609 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2610 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2611 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2612 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2613 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2614 (linux_get_siginfo_data): Add "thread" argument. Use
2615 scoped_restore.
2616 * linux-nat.c (linux_child_follow_fork)
2617 (check_stopped_by_watchpoint): Use scoped_restore.
2618 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2619 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2620 (restore_inferior_ptid, save_inferior_ptid): Remove.
2621 * btrace.c (btrace_fetch): Use scoped_restore.
2622 * bsd-uthread.c (bsd_uthread_fetch_registers)
2623 (bsd_uthread_store_registers): Use scoped_restore.
2624 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2625 scoped_restore.
2626 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2627 (aix_thread_xfer_partial): Use scoped_restore.
2628 * inferior.h (save_inferior_ptid): Remove.
2629
2630 2017-08-18 Yao Qi <yao.qi@linaro.org>
2631
2632 PR tdep/21818
2633 * arm-tdep.c (gdb_print_insn_arm): Mark
2634 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2635
2636 2017-08-18 Yao Qi <yao.qi@linaro.org>
2637
2638 * NEWS: Mention GDBserver's new option "--selftest".
2639 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2640 * selftest.c: Move it to common/selftest.c.
2641 * selftest.h: Move it to common/selftest.h.
2642 * selftest-arch.c (reset): New function.
2643 (tests_with_arch): Call reset.
2644
2645 2017-08-18 Yao Qi <yao.qi@linaro.org>
2646
2647 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2648 instead of exception_fprintf and printf_filtered.
2649
2650 2017-08-18 Yao Qi <yao.qi@linaro.org>
2651
2652 * selftest.c (register_self_test): Rename it to
2653 selftests::register_test.
2654 (run_self_tests): selftest::run_tests.
2655 * selftest.h: Update declarations.
2656 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2657 selftests::register_test_foreach_arch.
2658 * selftest-arch.h: Update declaration.
2659 * aarch64-tdep.c: Update.
2660 * arm-tdep.c: Likewise.
2661 * disasm-selftests.c: Likewise.
2662 * dwarf2loc.c: Likewise.
2663 * dwarf2-frame.c: Likewise.
2664 * findvar.c: Likewise.
2665 * gdbarch-selftests.c: Likewise.
2666 * maint.c (maintenance_selftest): Likewise.
2667 * regcache.c: Likewise.
2668 * rust-exp.y: Likewise.
2669 * selftest-arch.c: Likewise.
2670 * unittests/environ-selftests.c: Likewise.
2671 * unittests/function-view-selftests.c: Likewise.
2672 * unittests/offset-type-selftests.c: Likewise.
2673 * unittests/optional-selftests.c: Likewise.
2674 * unittests/scoped_restore-selftests.c: Likewise.
2675 * utils-selftests.c: Likewise.
2676
2677 2017-08-17 Pedro Alves <palves@redhat.com>
2678
2679 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2680 local.
2681
2682 2017-08-17 Pedro Alves <palves@redhat.com>
2683
2684 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2685 field.
2686 (reset_die_in_process): Delete, replaced by ...
2687 (process_die_scope): ... this new class. Make it responsible for
2688 freeing cu->line_header too.
2689 (process_die): Use process_die_scope.
2690 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2691 cu->line_header_die_owner. Don't release the line header if it's
2692 owned by the CU.
2693 (setup_type_unit_groups): Make the CU/DIE own the line header.
2694 Don't release the line header here.
2695
2696 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2697
2698 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2699
2700 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2701
2702 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2703 Single-Key mode
2704
2705 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2706
2707 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2708 mode command list.
2709
2710 2017-08-15 Stafford Horne <shorne@gmail.com>
2711
2712 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2713
2714 2017-08-15 Stafford Horne <shorne@gmail.com>
2715
2716 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2717
2718 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2719
2720 PR gdb/21954
2721 * infcmd.c (unset_environment_command): Use the 'clear' method on
2722 the environment instead of resetting it.
2723
2724 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2725
2726 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2727 platforms.
2728
2729 2017-08-14 Tom Tromey <tom@tromey.com>
2730
2731 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2732 (print_binary_chars): Likewise.
2733 (BITS_IN_BYTES): Remove.
2734
2735 2017-08-14 Tom Tromey <tom@tromey.com>
2736
2737 PR gdb/21675
2738 * valprint.c (LOW_ZERO): Change value to 034.
2739 (print_octal_chars): Add static_asserts for octal constants.
2740 * printcmd.c (print_scalar_formatted): Add 'd' case.
2741
2742 2017-08-11 Tom Tromey <tom@tromey.com>
2743
2744 * symfile.c (add_symbol_file_command): Use std::vector.
2745
2746 2017-08-14 Tom Tromey <tom@tromey.com>
2747
2748 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2749 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2750 std::move.
2751 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2752
2753 2017-08-11 Pedro Alves <palves@redhat.com>
2754
2755 * infrun.c (process_event_stop_test): Adjust
2756 function_name_is_marked_for_skip call.
2757 * skip.c: Include <list>.
2758 (skiplist_entry): Make it a class with private fields, and
2759 getters/setters.
2760 (skiplist_entry_chain): Delete.
2761 (skiplist_entries): New.
2762 (skiplist_entry_count): Delete.
2763 (highest_skiplist_entry_num): New.
2764 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2765 (add_skiplist_entry): Delete.
2766 (skiplist_entry::skiplist_entry): New.
2767 (skiplist_entry::add_entry): New.
2768 (skip_file_command, skip_function): Adjust.
2769 (compile_skip_regexp): Delete.
2770 (skip_command): Don't compile regexp here. Adjust to use
2771 skiplist_entry::add_entry.
2772 (skip_info): Adjust to use range-for and getters.
2773 (skip_enable_command, skip_disable_command): Adjust to use
2774 range-for and setters.
2775 (skip_delete_command): Adjust to use std::list.
2776 (add_skiplist_entry): Delete.
2777 (skip_file_p): Delete, refactored as ...
2778 (skiplist_entry::do_skip_file_p): ... this new method.
2779 (skip_gfile_p): Delete, refactored as ...
2780 (skiplist_entry::do_gskip_file_p): ... this new method.
2781 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2782 (skiplist_entry::skip_function_p): ... this new method.
2783 (function_name_is_marked_for_skip): Now returns bool, and takes
2784 the function sal by const reference. Adjust to use range-for and
2785 skiplist_entry methods.
2786 (_initialize_step_skip): Remove references to
2787 skiplist_entry_chain, skiplist_entry_count.
2788 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2789 takes the function sal by const reference.
2790
2791 2017-08-11 Yao Qi <yao.qi@linaro.org>
2792
2793 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2794 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2795 (dwarf2_frame_cache):
2796 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2797 RETURN_MASK_ALL and set *this_case to NULL.
2798 * frame-unwind.h: Update comments.
2799
2800 2017-08-11 Yao Qi <yao.qi@linaro.org>
2801
2802 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2803 (dwarf2_frame_state_copy_regs): Remove.
2804 (dwarf2_frame_state_free_regs): Remove.
2805 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2806 (dwarf2_restore_rule): Call method .alloc_regs instead of
2807 dwarf2_frame_state_alloc_regs.
2808 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2809 constructor. Call std::move.
2810 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2811 (dwarf2_frame_cache): Likewise.
2812
2813 [GDB_SELF_TEST]: Include selftest.h and
2814 selftest-arch.h.
2815 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2816 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2817 execute_cfa_program_test.
2818
2819 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2820 copy ctor, assignment operator, move assignment.
2821 <alloc_regs>: New method.
2822 <swap>: New method.
2823 (struct dwarf2_frame_state): Delete dtor.
2824 (dwarf2_frame_state_alloc_regs): Remove declaration.
2825 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2826 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2827
2828 2017-08-11 Yao Qi <yao.qi@linaro.org>
2829
2830 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2831 (dwarf2_frame_state::dwarf2_frame_state): New.
2832 (dwarf2_frame_state::~dwarf2_frame_state): New.
2833 (dwarf2_fetch_cfa_info): Update.
2834 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2835 rather than a pointer. Update code.
2836 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2837 dtor.
2838 <data_align, code_align, retaddr_column>: Change them to const.
2839 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2840 to bool.
2841
2842 2017-08-11 Yao Qi <yao.qi@linaro.org>
2843
2844 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2845 <loc.exp>: New field.
2846 * dwarf2-frame.c (execute_cfa_program): Update.
2847 (dwarf2_frame_prev_register): Update.
2848
2849 2017-08-10 Pedro Alves <palves@redhat.com>
2850
2851 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2852
2853 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2854
2855 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2856 (fbsd_pending_children): Use std::list.
2857 (fbsd_remember_child): Likewise.
2858 (fbsd_is_child_pending): Likewise.
2859 (fbsd_pending_vfork_done): Use std::forward_list.
2860 (fbsd_add_vfork_done): Likewise.
2861 (fbsd_is_vfork_done_pending): Likewise.
2862 (fbsd_next_vfork_done): Likewise.
2863
2864 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2865
2866 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2867 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2868 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2869 for `mapfilename'.
2870 (fbsd_xfer_partial): Use gdb::byte_vector.
2871 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2872
2873 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2874
2875 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2876 "filestuff.h".
2877 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2878
2879 2017-08-09 Tom Tromey <tom@tromey.com>
2880
2881 * skip.c (skiplist_entry): New constructor.
2882 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2883 (skiplist_entry::file_is_glob): Now bool.
2884 (skiplist_entry::file, skiplist_entry::function): Now
2885 std::string.
2886 (make_skip_entry): Return a unique_ptr. Use new.
2887 (free_skiplist_entry, free_skiplist_entry_cleanup)
2888 (make_free_skiplist_entry_cleanup): Remove.
2889 (skip_command, skip_disable_command, add_skiplist_entry)
2890 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2891 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2892 (function_name_is_marked_for_skip): Update.
2893 (skip_delete_command): Update. Use delete.
2894
2895 2017-08-09 Jiong Wang <jiong.wang@arm.com>
2896
2897 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2898 (aarch64_linux_core_read_description): New function.
2899 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2900
2901 2017-08-09 Pedro Alves <palves@redhat.com>
2902
2903 * cp-name-parser.y (cp_comp_to_string): Return a
2904 gdb::unique_xmalloc_ptr<char>.
2905 * cp-support.c (replace_typedefs_qualified_name)
2906 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2907 (cp_canonicalize_string_full): Use op= instead of explicit
2908 convertion.
2909 (cp_class_name_from_physname, method_name_from_physname)
2910 (cp_func_name, cp_remove_params): Adjust to use
2911 gdb::unique_xmalloc_ptr<char>.
2912 * cp-support.h (cp_comp_to_string): Return a
2913 gdb::unique_xmalloc_ptr<char>.
2914 * python/py-type.c (typy_lookup_type): Adjust to use
2915 gdb::unique_xmalloc_ptr<char>.
2916
2917 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2918
2919 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2920
2921 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2922 Yao Qi <yao.qi@linaro.org>
2923
2924 * cp-support.c (cp_canonicalize_string_full): Use
2925 gdb::unique_xmalloc_ptr<char>.
2926 (cp_canonicalize_string): Likewise.
2927
2928 2017-08-09 Yao Qi <yao.qi@linaro.org>
2929
2930 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2931 * regformats/i386/amd64-avx-avx512.dat: Remove.
2932 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2933 * regformats/i386/amd64-avx-mpx.dat:Remove.
2934 * regformats/i386/amd64-avx.dat: Remove.
2935 * regformats/i386/amd64-mpx.dat: Remove.
2936 * regformats/i386/i386-avx-avx512.dat: Remove.
2937 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2938 * regformats/i386/i386-avx-mpx.dat: Remove.
2939 * regformats/i386/i386-mmx.dat: Remove.
2940 * regformats/i386/i386-mpx.dat: Remove.
2941
2942 2017-08-09 Yao Qi <yao.qi@linaro.org>
2943
2944 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2945 * amd64-tdep.c: Don't include features/i386/x32*.c.
2946 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2947 functions.
2948 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2949 and i386/x32-avx-avx512.
2950 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2951 and i386/x32.xml.
2952 * features/i386/x32-avx-avx512.c: Removed.
2953 * features/i386/x32-avx-avx512.xml: Removed.
2954 * features/i386/x32-avx.c: Removed.
2955 * features/i386/x32-avx.xml: Removed.
2956 * features/i386/x32.c: Removed.
2957 * features/i386/x32.xml: Removed.
2958 * regformats/i386/x32-avx-avx512.dat: Removed.
2959 * regformats/i386/x32-avx.dat: Removed.
2960 * regformats/i386/x32.dat: Removed.
2961
2962 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2963
2964 PR breakpoints/21886
2965 * mem-break.c (default_memory_insert_breakpoint): Use
2966 `->placed_address' rather than `->reqstd_address' for the
2967 breakpoint location.
2968
2969 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2970
2971 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2972 assertions.
2973
2974 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2975
2976 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2977 a union of `tdep_info', `tdesc_data' and `id'.
2978 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2979 rather than `info.tdep_info'.
2980 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2981 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2982 * i386-tdep.c (i386_gdbarch_init): Likewise.
2983 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2984 * mips-tdep.c (mips_gdbarch_init): Likewise.
2985 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2986 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2987 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2988 `info.tdep_info'.
2989 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2990 `info.tdep_info'.
2991 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2992 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2993 `info.tdep_info'.
2994 * spu-tdep.c (spu_gdbarch_init): Likewise.
2995 * gdbarch.h: Regenerate.
2996
2997 2017-08-07 Leszek Swirski <leszeks@google.com>
2998
2999 PR symtab/20899
3000 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3001
3002 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3003
3004 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3005 (gdbsim_open): Rename gdb_argv args object to argv.
3006
3007 2017-08-05 Tom Tromey <tom@tromey.com>
3008
3009 * compile/compile-object-load.c (compile_object_load): Use
3010 gdb::unique_xmalloc_ptr.
3011 * cli/cli-dump.c (scan_filename): Rename from
3012 scan_filename_with_cleanup. Change return type.
3013 (scan_expression): Rename from scan_expression_with_cleanup.
3014 Change return type.
3015 (dump_memory_to_file, dump_value_to_file, restore_command):
3016 Use gdb::unique_xmalloc_ptr. Update.
3017 * cli/cli-cmds.c (find_and_open_script): Use
3018 gdb::unique_xmalloc_ptr.
3019 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3020 * symmisc.c (maintenance_print_symbols)
3021 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3022 * symfile.c (symfile_bfd_open, generic_load)
3023 (add_symbol_file_command, remove_symbol_file_command): Use
3024 gdb::unique_xmalloc_ptr.
3025 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3026 * psymtab.c (maintenance_print_psymbols): Use
3027 gdb::unique_xmalloc_ptr.
3028 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3029 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3030 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3031 (reload_shared_libraries_1): Likewise.
3032
3033 2017-08-05 Tom Tromey <tom@tromey.com>
3034
3035 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3036 (rust_op_vector, rust_set_vector): New typedefs.
3037 (current_parser): New global.
3038 (work_obstack): Change to pointer type. Update all users.
3039 (rust_ast, pstate): Remove globals.
3040 (struct rust_parser): New.
3041 (%union) <params, field_inits>: Change type.
3042 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3043 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3044 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3045 (convert_params_to_types, convert_params_to_expression): Change
3046 type of "params".
3047 (ast_string): Change type of "fields".
3048 (rust_parse): Make a rust_parser. Remove cleanups.
3049 (rust_lex_tests): Make and install an auto_obstack.
3050
3051 2017-08-04 Yao Qi <yao.qi@linaro.org>
3052
3053 * configure.srv (ipa_x32_linux_regobj): New.
3054 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3055 instead of X86_TDESC_AVX512.
3056 (initialize_low_tracepoint): Call
3057 init_registers_x32_avx_avx512_linux.
3058
3059 2017-08-04 Yao Qi <yao.qi@linaro.org>
3060
3061 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3062
3063 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3064
3065 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3066
3067 2017-08-03 Tom Tromey <tom@tromey.com>
3068
3069 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3070 Remove.
3071 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3072
3073 2017-08-03 Tom Tromey <tom@tromey.com>
3074
3075 * python/py-param.c (compute_enum_values): Use gdb_argv.
3076
3077 2017-08-03 Tom Tromey <tom@tromey.com>
3078
3079 * utils.h (struct gdb_argv_deleter): New.
3080 (gdb_argv): New class.
3081 * utils.c (gdb_argv::reset): New method.
3082 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3083 * tracefile.c (tsave_command): Use gdb_argv.
3084 * top.c (new_ui_command): Use gdb_argv.
3085 * symmisc.c (maintenance_print_symbols)
3086 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3087 * symfile.c (symbol_file_command, generic_load)
3088 (remove_symbol_file_command): Use gdb_argv.
3089 * stack.c (backtrace_command): Use gdb_argv.
3090 * source.c (add_path, show_substitute_path_command)
3091 (unset_substitute_path_command, set_substitute_path_command):
3092 Use gdb_argv.
3093 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3094 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3095 * remote.c (extended_remote_run, remote_put_command)
3096 (remote_get_command, remote_delete_command): Use gdb_argv.
3097 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3098 (gdbsim_open): Use gdb_argv.
3099 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3100 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3101 * procfs.c (procfs_info_proc): Use gdb_argv.
3102 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3103 * infrun.c (handle_command): Use gdb_argv.
3104 * inferior.c (add_inferior_command, clone_inferior_command):
3105 Use gdb_argv.
3106 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3107 * exec.c (exec_file_command): Use gdb_argv.
3108 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3109 * compile/compile.c (build_argc_argv): Use gdb_argv.
3110
3111 2017-08-03 Tom Tromey <tom@tromey.com>
3112
3113 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3114
3115 2017-08-03 Tom Tromey <tom@tromey.com>
3116
3117 * python/python.c (compute_python_string): Return std::string.
3118 (gdbpy_eval_from_control_command): Update.
3119 (do_start_initialization): Use std::string.
3120 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3121 xstrprintf.
3122 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3123 xstrprintf.
3124
3125 2017-08-03 Tom Tromey <tom@tromey.com>
3126
3127 * top.h (do_restore_instream_cleanup): Remove.
3128 * top.c (do_restore_instream_cleanup): Remove.
3129 (read_command_file): Use scoped_restore.
3130 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3131
3132 2017-08-03 Tom Tromey <tom@tromey.com>
3133
3134 * cli/cli-script.c (execute_user_command)
3135 (execute_control_command): Use scoped_restore.
3136
3137 2017-08-03 Tom Tromey <tom@tromey.com>
3138
3139 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3140 (execute_user_command): Remove user_call_depth; use
3141 user_args_stack's size instead.
3142
3143 2017-08-03 Tom Tromey <tom@tromey.com>
3144
3145 * top.h (in_user_command): Remove.
3146 * top.c (in_user_command): Remove.
3147 * cli/cli-script.c (do_restore_user_call_depth)
3148 (execute_user_command): Update.
3149
3150 2017-08-03 Tom Tromey <tom@tromey.com>
3151
3152 * valops.c (search_struct_method): Use gdb::byte_vector.
3153 * valarith.c (value_concat): Use std::vector.
3154 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3155 (simple_search_memory): Likewise.
3156 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3157 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3158 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3159 * elfread.c (elf_rel_plt_read): Use std::string.
3160 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3161 * cli/cli-dump.c (restore_section_callback): Use
3162 gdb::byte_vector.
3163
3164 2017-08-03 Tom Tromey <tom@tromey.com>
3165
3166 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3167
3168 2017-08-03 Tom Tromey <tom@tromey.com>
3169
3170 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3171 (tui_register_format): Use scoped_restore.
3172
3173 2017-08-03 Tom Tromey <tom@tromey.com>
3174
3175 * reverse.c (exec_direction_default): Remove.
3176 (exec_reverse_once): Use scoped_restore.
3177 * remote.c (restore_remote_timeout): Remove.
3178 (remote_flash_erase, remote_flash_write, remote_flash_done)
3179 (readchar, remote_serial_write): Use scoped_restore.
3180 * cli/cli-script.c (struct source_cleanup_lines_args)
3181 (source_cleanup_lines): Remove.
3182 (script_from_file): Use scoped_restore.
3183 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3184 (source_command): Use scoped_restore.
3185
3186 2017-08-03 Tom Tromey <tom@tromey.com>
3187
3188 * utils.h (make_cleanup_free_so): Remove.
3189 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3190 * solist.h (struct so_deleter): New.
3191 (so_list_up): New typedef.
3192 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3193
3194 2017-08-03 Tom Tromey <tom@tromey.com>
3195
3196 * utils.h (make_cleanup_restore_current_language): Remove.
3197 * utils.c (do_restore_current_language)
3198 (make_cleanup_restore_current_language): Remove.
3199 * parse.c (parse_exp_in_context_1)
3200 (parse_expression_with_language): Use
3201 scoped_restore_current_language.
3202 * mi/mi-main.c (mi_cmd_execute): Use
3203 scoped_restore_current_language.
3204 * language.h (scoped_restore_current_language): New class.
3205
3206 2017-08-03 Tom Tromey <tom@tromey.com>
3207
3208 * compile/compile.c (cleanup_unlink_file): Remove.
3209 (compile_to_object): Use gdb::unlinker.
3210 (eval_compile_command): Likewise.
3211
3212 2017-08-03 Tom Tromey <tom@tromey.com>
3213
3214 * utils.h (make_cleanup_fclose): Remove.
3215 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3216
3217 2017-08-03 Tom Tromey <tom@tromey.com>
3218
3219 * top.c (open_terminal_stream): Return gdb_file_up.
3220 (new_ui_command): Update.
3221
3222 2017-08-03 Tom Tromey <tom@tromey.com>
3223
3224 * source.c (print_source_lines_base, forward_search_command)
3225 (reverse_search_command): Use gdb_file_up.
3226
3227 2017-08-03 Tom Tromey <tom@tromey.com>
3228
3229 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3230
3231 2017-08-03 Tom Tromey <tom@tromey.com>
3232
3233 * cli/cli-cmds.c (find_and_open_script): Change return type.
3234 Remove "streamp" and "full_path" parameters.
3235 (source_script_with_search): Update.
3236 * auto-load.c (source_script_file): Update.
3237 * cli/cli-cmds.h (find_and_open_script): Change type.
3238 (open_script): New struct.
3239
3240 2017-08-03 Tom Tromey <tom@tromey.com>
3241
3242 * xml-support.c (xml_fetch_content_from_file): Update.
3243 * ui-file.c (stdio_file::open): Update.
3244 * tracefile-tfile.c (tfile_start): Update.
3245 * remote.c (remote_file_put, remote_file_get): Update.
3246 * nat/linux-procfs.c (linux_proc_get_int)
3247 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3248 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3249 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3250 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3251 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3252 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3253 * linux-nat.c (linux_proc_pending_signals): Update.
3254 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3255 (file_closer): Remove.
3256 * compile/compile.c (compile_to_object): Update.
3257 * common/filestuff.h (struct gdb_file_deleter): New.
3258 (gdb_file_up): New typedef.
3259 (gdb_fopen_cloexec): Change return type.
3260 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3261 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3262 (dump_binary_file, restore_binary_file): Update.
3263 * auto-load.c (auto_load_objfile_script_1): Update.
3264
3265 2017-08-03 Tom Tromey <tom@tromey.com>
3266
3267 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3268 (info_static_tracepoint_markers_command): Likewise.
3269 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3270 * skip.c (skip_info): Use ui_out_emit_table.
3271 * progspace.c (print_program_space): Use ui_out_emit_table.
3272 * osdata.c (info_osdata): Use ui_out_emit_table.
3273 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3274 ui_out_emit_table.
3275 * linux-thread-db.c (info_auto_load_libthread_db): Use
3276 ui_out_emit_table.
3277 * inferior.c (print_inferior): Use ui_out_emit_table.
3278 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3279 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3280 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3281 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3282 * ui-out.h (class ui_out_emit_table): New.
3283
3284 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3285
3286 * mips-tdep.c (mips_fpu_type_str): New function.
3287 (mips_dump_tdep): Call it.
3288
3289 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3290
3291 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3292 `->mips_fpu_type'.
3293
3294 2017-07-31 Xavier Roirand <roirand@adacore.com>
3295
3296 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3297
3298 2017-07-27 Xavier Roirand <roirand@adacore.com>
3299
3300 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3301
3302 2017-07-26 Yao Qi <yao.qi@linaro.org>
3303
3304 * cli/cli-cmds.c (maintenancechecklist): New variable.
3305 * gdbcmd.h (maintenancechecklist): Declare it.
3306 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3307 Call i386_linux_read_description with different masks.
3308 * maint.c (maintenance_check_command): New function.
3309 (_initialize_maint_cmds): Call add_prefix_cmd.
3310 * target-descriptions.c (tdesc_reg): override operator != and ==.
3311 (tdesc_type): Likewise.
3312 (tdesc_feature): Likewise.
3313 (target_desc): Likewise.
3314 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3315 (maintenance_check_xml_descriptions): New function.
3316 (_initialize_target_descriptions) Add command "xml-descriptions".
3317 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3318
3319 2017-07-26 Yao Qi <yao.qi@linaro.org>
3320
3321 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3322 Include features/i386/32bit-*.c.
3323 (i386_linux_read_description): Generate target description if it
3324 doesn't exist.
3325 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3326 functions.
3327 * features/i386/32bit-linux.c: Re-generated.
3328 * features/i386/32bit-sse.c: Likewise.
3329 * target-descriptions.c (print_c_feature::visit): Print code to
3330 set register number if needed.
3331 (print_c_feature) <m_next_regnum>: New field.
3332
3333 2017-07-26 Yao Qi <yao.qi@linaro.org>
3334
3335 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3336 (FEATURE_XMLFILES): New.
3337 (FEATURE_CFILES): New.
3338 New rules.
3339 (clean-cfiles): Remove generated c files.
3340 * features/i386/32bit-avx.c: Generated.
3341 * features/i386/32bit-avx512.c: Generated.
3342 * features/i386/32bit-core.c: Generated.
3343 * features/i386/32bit-linux.c: Generated.
3344 * features/i386/32bit-mpx.c: Generated.
3345 * features/i386/32bit-pkeys.c: Generated.
3346 * features/i386/32bit-sse.c: Generated.
3347 * target-descriptions.c: Include algorithm.
3348 (tdesc_element_visitor): Add method visit_end.
3349 (print_c_tdesc): Implement visit_end.
3350 (print_c_tdesc:: m_filename_after_features): Move it to
3351 protected.
3352 (print_c_feature): New class.
3353 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3354 name starts with "i386/32bit-".
3355
3356 2017-07-26 Yao Qi <yao.qi@linaro.org>
3357
3358 * target-descriptions.c (tdesc_element_visitor): New class.
3359 (tdesc_element): New class.
3360 (tdesc_reg): Inherit from tdesc_element.
3361 (tdesc_reg::accept): New function.
3362 (tdesc_type): Inherit from tdesc_element.
3363 (tdesc_type::accept): New function.
3364 (tdesc_feature): Inherit from tdesc_element.
3365 (tdesc_feature::accept): New function.
3366 (target_desc): Inherit from tdesc_element.
3367 (target_desc::target_desc): New.
3368 (target_desc::~target_desc): New.
3369 (target_desc::accept): New.
3370 (allocate_target_description): Use new.
3371 (free_target_description): Use delete.
3372 (print_c_tdesc): New class.
3373 (maint_print_c_tdesc_cmd): Adjust.
3374
3375 * features/aarch64.c: Re-generated.
3376 * features/arc-arcompact.c: Re-generated.
3377 * features/arc-v2.c: Re-generated.
3378 * features/arm/arm-with-iwmmxt.c: Re-generated.
3379 * features/arm/arm-with-m.c: Re-generated.
3380 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3381 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3382 * features/arm/arm-with-neon.c: Re-generated.
3383 * features/arm/arm-with-vfpv2.c: Re-generated.
3384 * features/arm/arm-with-vfpv3.c: Re-generated.
3385 * features/i386/amd64-avx-avx512.c: Re-generated.
3386 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3387 * features/i386/amd64-avx.c: Re-generated.
3388 * features/i386/amd64-avx-linux.c: Re-generated.
3389 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3390 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3391 * features/i386/amd64-avx-mpx.c: Re-generated.
3392 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3393 * features/i386/amd64.c: Re-generated.
3394 * features/i386/amd64-linux.c: Re-generated.
3395 * features/i386/amd64-mpx.c: Re-generated.
3396 * features/i386/amd64-mpx-linux.c: Re-generated.
3397 * features/i386/i386-avx-avx512.c: Re-generated.
3398 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3399 * features/i386/i386-avx.c: Re-generated.
3400 * features/i386/i386-avx-linux.c: Re-generated.
3401 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3402 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3403 * features/i386/i386-avx-mpx.c: Re-generated.
3404 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3405 * features/i386/i386.c: Re-generated.
3406 * features/i386/i386-linux.c: Re-generated.
3407 * features/i386/i386-mmx.c: Re-generated.
3408 * features/i386/i386-mmx-linux.c: Re-generated.
3409 * features/i386/i386-mpx.c: Re-generated.
3410 * features/i386/i386-mpx-linux.c: Re-generated.
3411 * features/i386/x32-avx-avx512.c: Re-generated.
3412 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3413 * features/i386/x32-avx.c: Re-generated.
3414 * features/i386/x32-avx-linux.c: Re-generated.
3415 * features/i386/x32.c: Re-generated.
3416 * features/i386/x32-linux.c: Re-generated.
3417 * features/microblaze.c: Re-generated.
3418 * features/microblaze-with-stack-protect.c: Re-generated.
3419 * features/mips64-dsp-linux.c: Re-generated.
3420 * features/mips64-linux.c: Re-generated.
3421 * features/mips-dsp-linux.c: Re-generated.
3422 * features/mips-linux.c: Re-generated.
3423 * features/nds32.c: Re-generated.
3424 * features/nios2.c: Re-generated.
3425 * features/nios2-linux.c: Re-generated.
3426 * features/rs6000/powerpc-32.c: Re-generated.
3427 * features/rs6000/powerpc-32l.c: Re-generated.
3428 * features/rs6000/powerpc-403.c: Re-generated.
3429 * features/rs6000/powerpc-403gc.c : Re-generated.
3430 * features/rs6000/powerpc-405.c: Re-generated.
3431 * features/rs6000/powerpc-505.c: Re-generated.
3432 * features/rs6000/powerpc-601.c: Re-generated.
3433 * features/rs6000/powerpc-602.c: Re-generated.
3434 * features/rs6000/powerpc-603.c: Re-generated.
3435 * features/rs6000/powerpc-604.c: Re-generated.
3436 * features/rs6000/powerpc-64.c: Re-generated.
3437 * features/rs6000/powerpc-64l.c: Re-generated.
3438 * features/rs6000/powerpc-7400.c: Re-generated.
3439 * features/rs6000/powerpc-750.c: Re-generated.
3440 * features/rs6000/powerpc-860.c: Re-generated.
3441 * features/rs6000/powerpc-altivec32.c: Re-generated.
3442 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3443 * features/rs6000/powerpc-altivec64.c: Re-generated.
3444 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3445 * features/rs6000/powerpc-cell32l.c: Re-generated.
3446 * features/rs6000/powerpc-cell64l.c: Re-generated.
3447 * features/rs6000/powerpc-e500.c: Re-generated.
3448 * features/rs6000/powerpc-e500l.c: Re-generated.
3449 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3450 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3451 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3452 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3453 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3454 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3455 * features/rs6000/powerpc-vsx32.c: Re-generated.
3456 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3457 * features/rs6000/powerpc-vsx64.c: Re-generated.
3458 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3459 * features/rs6000/rs6000.c: Re-generated.
3460 * features/s390-linux32.c: Re-generated.
3461 * features/s390-linux32v1.c: Re-generated.
3462 * features/s390-linux32v2.c: Re-generated.
3463 * features/s390-linux64.c: Re-generated.
3464 * features/s390-linux64v1.c: Re-generated.
3465 * features/s390-linux64v2.c: Re-generated.
3466 * features/s390-te-linux64.c: Re-generated.
3467 * features/s390-tevx-linux64.c: Re-generated.
3468 * features/s390-vx-linux64.c: Re-generated.
3469 * features/s390x-linux64.c: Re-generated.
3470 * features/s390x-linux64v1.c: Re-generated.
3471 * features/s390x-linux64v2.c: Re-generated.
3472 * features/s390x-te-linux64.c: Re-generated.
3473 * features/s390x-tevx-linux64.c: Re-generated.
3474 * features/s390x-vx-linux64.c: Re-generated.
3475 * features/sparc/sparc32-solaris.c: Re-generated.
3476 * features/sparc/sparc64-solaris.c: Re-generated.
3477 * features/tic6x-c62x.c: Re-generated.
3478 * features/tic6x-c62x-linux.c: Re-generated.
3479 * features/tic6x-c64x.c: Re-generated.
3480 * features/tic6x-c64x-linux.c: Re-generated.
3481 * features/tic6x-c64xp.c: Re-generated.
3482 * features/tic6x-c64xp-linux.c: Re-generated.
3483
3484 2017-07-26 Yao Qi <yao.qi@linaro.org>
3485
3486 * i386-linux-tdep.c (i386_linux_read_description): New function.
3487 (i386_linux_core_read_description): Call
3488 i386_linux_read_description.
3489 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3490 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3491 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3492 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3493 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3494 * x86-linux-nat.c (x86_linux_read_description): Call
3495 i386_linux_read_description.
3496
3497 2017-07-26 Yao Qi <yao.qi@linaro.org>
3498
3499 * NEWS: Mention it.
3500 * features/Makefile (%.c: %.xml): Pass the xml file name to
3501 command "maint print c-tdesc".
3502 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3503 name from 'arg'.
3504
3505 2017-07-26 Yao Qi <yao.qi@linaro.org>
3506
3507 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3508 in-class initialization.
3509 (tdesc_create_feature): Call new instead of XCNEW.
3510 (free_target_description): Ue delete.
3511
3512 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3513
3514 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3515
3516 2017-07-25 Yao Qi <yao.qi@linaro.org>
3517
3518 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3519 constant.
3520 (amd64_x32_init_abi): Likewise.
3521 * amd64-tdep.h (amd64_init_abi): Update declaration.
3522 (amd64_x32_init_abi): Likewise.
3523
3524 2017-07-25 Yao Qi <yao.qi@linaro.org>
3525
3526 PR tdep/21717
3527 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3528 condition for FPSCR.
3529 (arm_linux_store_inferior_registers): Likewise.
3530
3531 2017-07-22 Tom Tromey <tom@tromey.com>
3532
3533 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3534 <syscalls_counts>: Now a std::vector.
3535 (get_catch_syscall_inferior_data): Use "new".
3536 (catch_syscall_inferior_data_cleanup): Use "delete".
3537 (insert_catch_syscall, remove_catch_syscall)
3538 (clear_syscall_counts): Update.
3539
3540 2017-07-22 Tom Tromey <tom@tromey.com>
3541
3542 * break-catch-syscall.c (syscall_catchpoint)
3543 <syscalls_to_be_caught>: Now a std::vector<int>
3544 (~syscall_catchpoint): Remove.
3545 (insert_catch_syscall, remove_catch_syscall)
3546 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3547 (print_mention_catch_syscall, print_recreate_catch_syscall):
3548 Update.
3549 (create_syscall_event_catchpoint): Change type of "filter"
3550 parameter.
3551 (catch_syscall_split_args): Return a std::vector.
3552 (catch_syscall_command_1, catching_syscall_number_1): Update.
3553
3554 2017-07-22 Tom Tromey <tom@tromey.com>
3555
3556 * break-catch-throw.c (struct exception_catchpoint)
3557 <exception_rx>: Now a std::string.
3558 (~exception_catchpoint): Remove.
3559 (print_one_detail_exception_catchpoint): Update.
3560 (handle_gnu_v3_exceptions): Change type of except_rx.
3561 (extract_exception_regexp): Return a std::string.
3562 (catch_exception_command_1): Update.
3563
3564 2017-07-22 Tom Tromey <tom@tromey.com>
3565
3566 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3567 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3568 std::vector.
3569 <catch_all>: Now a bool.
3570 (~signal_catchpoint): Remove.
3571 (signal_catchpoint_insert_location)
3572 (signal_catchpoint_remove_location)
3573 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3574 (signal_catchpoint_print_mention)
3575 (signal_catchpoint_print_recreate)
3576 (signal_catchpoint_explains_signal): Update.
3577 (create_signal_catchpoint): Change type of "filter" and
3578 "catch_all".
3579 (catch_signal_split_args): Return a std::vector. Change type of
3580 "catch_all".
3581 (catch_signal_command): Update.
3582
3583 2017-07-20 Pedro Alves <palves@redhat.com>
3584
3585 * ada-lang.c (ada_language_defn): Make extern.
3586 (_initialize_ada_language): Remove add_language call.
3587 * c-lang.c (c_language_defn, cplus_language_defn)
3588 (asm_language_defn, minimal_language_defn): Make extern.
3589 (_initialize_c_language): Delete.
3590 * completer.c (compare_cstrings): Delete, moved to utils.h.
3591 * d-lang.c (d_language_defn): Make extern.
3592 (_initialize_d_language): Remove add_language calls.
3593 * defs.h (enum language): Add comment.
3594 * f-lang.c (f_language_defn): Make extern.
3595 (_initialize_f_language): Remove add_language call.
3596 * go-lang.c (go_language_defn): Make extern.
3597 (_initialize_go_language): Remove add_language call.
3598 * language.c: Include <algorithm>.
3599 (languages): Redefine as const array.
3600 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3601 (set_language_command): Handle "local". Use for-range loop.
3602 (set_language): Remove loop.
3603 (language_enum): Rewrite.
3604 (language_def, language_str): Remove loops.
3605 (add_language): Delete.
3606 (add_set_language_command): New, based on add_languages.
3607 (skip_language_trampoline): Adjust.
3608 (local_language_defn): Delete.
3609 (language_gdbarch_post_init): Adjust.
3610 (_initialize_language): Remove add_language calls. Call
3611 add_set_language_command.
3612 * language.h (add_language): Delete.
3613 (auto_language_defn)
3614 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3615 (asm_language_defn, c_language_defn, cplus_language_defn)
3616 (d_language_defn, f_language_defn, go_language_defn)
3617 (m2_language_defn, objc_language_defn, opencl_language_defn)
3618 (pascal_language_defn, rust_language_defn): Declare.
3619 * m2-lang.c (m2_language_defn): Make extern.
3620 (_initialize_m2_language): Remove add_language call.
3621 * objc-lang.c (objc_language_defn): Make extern.
3622 (_initialize_objc_language): Remove add_language call.
3623 * opencl-lang.c (opencl_language_defn): Make extern.
3624 (_initialize_opencl_language): Remove add_language call.
3625 * p-lang.c (pascal_language_defn): Make extern.
3626 (_initialize_pascal_language): Delete.
3627 * rust-lang.c (rust_language_defn): Make extern.
3628 (_initialize_rust_language): Delete.
3629 * utils.h (compare_cstrings): New static inline function.
3630
3631 2017-07-20 Pedro Alves <palves@redhat.com>
3632
3633 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3634 (get_var_value): Constify parameters.
3635 (get_int_var_value): Change prototype.
3636 (to_fixed_range_type): Adjust.
3637 * ada-lang.h (get_int_var_value): Change prototype.
3638
3639 2017-07-20 Pedro Alves <palves@redhat.com>
3640
3641 * dwarf2read.c (dw2_lookup_symbol): Use
3642 SYMBOL_MATCHES_SEARCH_NAME.
3643 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3644
3645 2017-07-20 Pedro Alves <palves@redhat.com>
3646
3647 * block.c (block_iter_name_step, block_iter_name_first)
3648 (block_iter_name_next): Delete.
3649 (block_lookup_symbol_primary): Adjust to use
3650 dict_iter_match_first/dict_iter_match_next.
3651 * block.h (block_iter_name_first, block_iter_name_next): Delete
3652 declarations.
3653 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3654 dict_iter_match_first/dict_iter_match_next.
3655
3656 2017-07-20 Pedro Alves <palves@redhat.com>
3657
3658 * cp-support.c (cp_find_first_component_aux): Add missing case for
3659 end of string.
3660
3661 2017-07-18 David Blaikie <dblaikie@gmail.com>
3662
3663 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3664 of dwo_cu's dwo_file.
3665
3666 2017-07-18 Yao Qi <yao.qi@linaro.org>
3667
3668 * remote.c (store_registers_using_G): Remove one line comment.
3669
3670 2017-07-18 Yao Qi <yao.qi@linaro.org>
3671
3672 * regcache.c (regcache_cpy): Simplify it.
3673 (regcache::cpy_no_passthrough): Remove it.
3674 * regcache.h (cpy_no_passthrough): Remove it.
3675 (regcache_dup, regcache_cpy): Update comments.
3676
3677 2017-07-18 Pedro Alves <palves@redhat.com>
3678
3679 * remote-sim.c (sim_command_completer): Adjust to work with a
3680 completion_tracker instead of a VEC.
3681
3682 2017-07-17 Pedro Alves <palves@redhat.com>
3683
3684 * completer.c (complete_source_filenames): New function.
3685 (complete_address_and_linespec_locations): New function.
3686 (location_completer): Use complete_address_and_linespec_locations.
3687 (completion_tracker::build_completion_result): Honor the tracker's
3688 request to suppress append.
3689 * completer.h (completion_tracker::suppress_append_ws)
3690 (completion_tracker::set_suppress_append_ws): New methods.
3691 (completion_tracker::m_suppress_append_ws): New field.
3692 (complete_source_filenames): New declaration.
3693 * linespec.c (linespec_complete_what): New.
3694 (struct ls_parser) <complete_what, completion_word,
3695 completion_quote_char, completion_quote_end, completion_tracker>:
3696 New fields.
3697 (string_find_incomplete_keyword_at_end): New.
3698 (linespec_lexer_lex_string): Record quote char. If in completion
3699 mode, don't throw.
3700 (linespec_lexer_consume_token): Advance the completion word point.
3701 (linespec_lexer_peek_token): Save/restore completion info.
3702 (save_stream_and_consume_token): New.
3703 (set_completion_after_number): New.
3704 (linespec_parse_basic): Set what to complete next depending on
3705 token. Handle function and label completions specially.
3706 (parse_linespec): Disable objc shortcut in completion mode. Set
3707 what to complete next depending on token type. Skip keyword if in
3708 completion mode.
3709 (complete_linespec_component, linespec_complete): New.
3710 * linespec.h (linespec_complete): Declare.
3711
3712 2017-07-17 Pedro Alves <palves@redhat.com>
3713
3714 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3715 Handle 'operator<' / 'operator<<'.
3716
3717 2017-07-17 Pedro Alves <palves@redhat.com>
3718
3719 * completer.c (collect_explicit_location_matches): Handle
3720 MATCH_LABEL.
3721 (convert_explicit_location_to_linespec): New, factored out from
3722 ...
3723 (convert_explicit_location_to_sals): ... this.
3724 (complete_label): New.
3725 (linespec_complete_label, find_label_symbols_in_block): New.
3726 (find_label_symbols): Add completion_mode parameter and adjust to
3727 call find_label_symbols_in_block.
3728 * linespec.h (linespec_complete_label): Declare.
3729
3730 2017-07-17 Pedro Alves <palves@redhat.com>
3731
3732 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3733 complete_symbol_mode parameter.
3734 * cli/cli-cmds.c (complete_command): Get the completion result out
3735 of the handle_brkchars tracker if used a custom word point.
3736 * completer.c: Include "linespec.h".
3737 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3738 (advance_to_expression_complete_word_point): New.
3739 (completion_tracker::completes_to_completion_word): New.
3740 (complete_files_symbols): Pass down
3741 complete_symbol_mode::EXPRESSION.
3742 (explicit_options, probe_options): New.
3743 (collect_explicit_location_matches): Complete on the
3744 explictit_loc->foo instead of word. Use
3745 linespec_complete_function. Handle MATCH_LINE. Handle offering
3746 keyword and options completions.
3747 (backup_text_ptr): Delete.
3748 (skip_keyword): New.
3749 (complete_explicit_location): Remove 'word' parameter. Add
3750 language, quoted_arg_start and quoted_arg_end parameters.
3751 Rewrite, parsing left to right.
3752 (location_completer): Rewrite.
3753 (location_completer_handle_brkchars): New function.
3754 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3755 (enum complete_line_internal_reason): Adjust comments.
3756 (completion_tracker::discard_completions): New.
3757 (completer_handle_brkchars_func_for_completer): Handle
3758 location_completer.
3759 (gdb_custom_word_point_brkchars)
3760 (gdb_org_rl_basic_quote_characters): New.
3761 (gdb_completion_word_break_characters_throw)
3762 (completion_find_completion_word): Handle trackers that use a
3763 custom word point.
3764 (completion_tracker::advance_custom_word_point_by): New.
3765 (completion_tracker::build_completion_result): Don't rely on
3766 readline appending the quote char.
3767 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3768 use a custom word point.
3769 (gdb_rl_attempted_completion_function): Restore
3770 rl_basic_quote_characters.
3771 * completer.h (class completion_tracker): Extend intro comment.
3772 (completion_tracker::set_quote_char)
3773 (completion_tracker::quote_char)
3774 (completion_tracker::set_use_custom_word_point)
3775 (completion_tracker::use_custom_word_point)
3776 (completion_tracker::custom_word_point)
3777 (completion_tracker::set_custom_word_point)
3778 (completion_tracker::advance_custom_word_point_by)
3779 (completion_tracker::completes_to_completion_word)
3780 (completion_tracker::discard_completions): New methods.
3781 (completion_tracker::m_quote_char)
3782 (completion_tracker::m_use_custom_word_point)
3783 (completion_tracker::m_custom_word_point): New fields.
3784 (advance_to_expression_complete_word_point): Declare.
3785 * f-lang.c (f_collect_symbol_completion_matches): Add
3786 complete_symbol_mode parameter.
3787 * language.h (struct language_defn)
3788 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3789 parameter.
3790 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3791 (linespec_complete_function): New function.
3792 (linespec_lexer_lex_keyword): Adjust.
3793 * linespec.h (linespec_keywords, linespec_complete_function): New
3794 declarations.
3795 * location.c (find_end_quote): New function.
3796 (explicit_location_lex_one): Add explicit_completion_info
3797 parameter. Save quoting info. Don't throw if being called for
3798 completion. Don't handle Ada operators here.
3799 (is_cp_operator, skip_op_false_positives, first_of)
3800 (explicit_location_lex_one_function): New function.
3801 (string_to_explicit_location): Replace 'dont_throw' parameter with
3802 an explicit_completion_info pointer parameter. Handle it. Don't
3803 use explicit_location_lex_one to lex function names. Use
3804 explicit_location_lex_one_function instead.
3805 * location.h (struct explicit_completion_info): New.
3806 (string_to_explicit_location): Replace 'dont_throw' parameter with
3807 an explicit_completion_info pointer parameter.
3808 * symtab.c (default_collect_symbol_completion_matches_break_on):
3809 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3810 (default_collect_symbol_completion_matches)
3811 (collect_symbol_completion_matches): Add complete_symbol_mode
3812 parameter.
3813 (collect_symbol_completion_matches_type): Pass down
3814 complete_symbol_mode::EXPRESSION.
3815 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3816 parameter. Handle LINESPEC mode.
3817 * symtab.h (complete_symbol_mode): New.
3818 (default_collect_symbol_completion_matches_break_on)
3819 (default_collect_symbol_completion_matches)
3820 (collect_symbol_completion_matches)
3821 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3822 parameter.
3823
3824 2017-07-17 Pedro Alves <palves@redhat.com>
3825
3826 * utils.c (enum class strncmp_iw_mode): New.
3827 (strcmp_iw): Rename to ...
3828 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3829 parameters. Handle them.
3830 (strncmp_iw): New.
3831 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3832 * utils.h (strncmp_iw): Declare.
3833 (strcmp_iw): Move describing comments here.
3834
3835 2017-07-17 Pedro Alves <palves@redhat.com>
3836
3837 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3838 CP_OPERATOR_STR.
3839 * c-typeprint.c (is_type_conversion_operator): Use
3840 CP_OPERATOR_STR.
3841 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3842 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3843 CP_OPERATOR_LEN.
3844 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3845 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3846 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3847 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3848 CP_OPERATOR_STR.
3849 * location.c: Include "cp-support.h".
3850 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3851 CP_OPERATOR_STR.
3852 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3853 CP_OPERATOR_LEN.
3854
3855 2017-07-17 Pedro Alves <palves@redhat.com>
3856
3857 * cli/cli-cmds.c (complete_command): Use a completion tracker
3858 along with completion_find_completion_word for handle_brkchars
3859 phase.
3860 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3861 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3862 (struct gdb_rl_completion_word_info): New.
3863 (gdb_rl_find_completion_word): New.
3864 (completion_find_completion_word): New.
3865 * completer.h (completion_find_completion_word): Declare.
3866
3867 2017-07-17 Pedro Alves <palves@redhat.com>
3868
3869 * ada-lang.c (symbol_completion_match): Adjust comments.
3870 (symbol_completion_add): Replace vector parameter with
3871 completion_tracker parameter. Use it.
3872 (ada_make_symbol_completion_list): Rename to...
3873 (ada_collect_symbol_completion_matches): ... this. Add
3874 completion_tracker parameter and use it.
3875 (ada_language_defn): Adjust.
3876 * break-catch-syscall.c (catch_syscall_completer): Adjust
3877 prototype and work with completion_tracker instead of VEC.
3878 * breakpoint.c (condition_completer): Adjust prototype and work
3879 with completion_tracker instead of VEC.
3880 * c-lang.c (c_language_defn, cplus_language_defn)
3881 (asm_language_defn, minimal_language_defn): Adjust to renames.
3882 * cli/cli-cmds.c (complete_command): Rework using
3883 completion_tracker. Catch exceptions when completing.
3884 * cli/cli-decode.c (integer_unlimited_completer)
3885 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3886 with completion_tracker instead of VEC.
3887 * command.h (struct completion_tracker): Forward declare.
3888 (completer_ftype, completer_handle_brkchars_ftype): Change
3889 types.
3890 (complete_on_cmdlist, complete_on_enum): Adjust.
3891 * completer.c: Include <algorithm>.
3892 (struct gdb_completer_state): New.
3893 (current_completion): New global.
3894 (readline_line_completion_function): Delete.
3895 (noop_completer, filename_completer)
3896 (filename_completer_handle_brkchars, complete_files_symbols)
3897 (linespec_location_completer): Adjust to work with a
3898 completion_tracker instead of a VEC.
3899 (string_or_empty): New.
3900 (collect_explicit_location_matches): Adjust to work with a
3901 completion_tracker instead of a VEC.
3902 (explicit_location_completer): Rename to ...
3903 (complete_explicit_location): ... this and adjust to work with a
3904 completion_tracker instead of a VEC.
3905 (location_completer): Adjust to work with a completion_tracker
3906 instead of a VEC.
3907 (add_struct_fields): Adjust to work with a completion_list instead
3908 of VEC.
3909 (expression_completer): Rename to ...
3910 (complete_expression): ... this and adjust to work with a
3911 completion_tracker instead of a VEC. Use complete_files_symbols.
3912 (expression_completer): Reimplement on top of complete_expression.
3913 (symbol_completer): Adjust to work with a completion_tracker
3914 instead of a VEC.
3915 (enum complete_line_internal_reason): Add describing comments.
3916 (complete_line_internal_normal_command): Adjust to work with a
3917 completion_tracker instead of a VEC.
3918 (complete_line_internal): Rename to ...
3919 (complete_line_internal_1): ... this and adjust to work with a
3920 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3921 handle_brkchars phase.
3922 (new_completion_tracker): Delete.
3923 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3924 complete_line_internal_1.
3925 (free_completion_tracker): Delete.
3926 (INITIAL_COMPLETION_HTAB_SIZE): New.
3927 (completion_tracker::completion_tracker)
3928 (completion_tracker::~completion_tracker): New.
3929 (maybe_add_completion): Delete.
3930 (completion_tracker::maybe_add_completion)
3931 (completion_tracker::add_completion)
3932 (completion_tracker::add_completions): New.
3933 (throw_max_completions_reached_error): Delete.
3934 (complete_line): Adjust to work with a completion_tracker instead
3935 of a VEC. Don't create a completion_tracker_t or check for max
3936 completions here.
3937 (command_completer, command_completer_handle_brkchars)
3938 (signal_completer, reg_or_group_completer_1)
3939 (reg_or_group_completer, default_completer_handle_brkchars):
3940 Adjust to work with a completion_tracker.
3941 (gdb_completion_word_break_characters_throw): New.
3942 (gdb_completion_word_break_characters): Reimplement.
3943 (line_completion_function): Delete.
3944 (completion_tracker::recompute_lowest_common_denominator)
3945 (expand_preserving_ws)
3946 (completion_tracker::build_completion_result)
3947 (completion_result::completion_result)
3948 (completion_result::completion_result)
3949 (completion_result::~completion_result)
3950 (completion_result::completion_result)
3951 (completion_result::release_match_list, compare_cstrings)
3952 (completion_result::sort_match_list)
3953 (completion_result::reset_match_list)
3954 (gdb_rl_attempted_completion_function_throw)
3955 (gdb_rl_attempted_completion_function): New.
3956 * completer.h (completion_list, struct completion_result)
3957 (class completion_tracker): New.
3958 (complete_line): Add completion_tracker parameter.
3959 (readline_line_completion_function): Delete.
3960 (gdb_rl_attempted_completion_function): New.
3961 (noop_completer, filename_completer, expression_completer)
3962 (location_completer, symbol_completer, command_completer)
3963 (signal_completer, reg_or_group_completer): Update prototypes.
3964 (completion_tracker_t, new_completion_tracker)
3965 (make_cleanup_free_completion_tracker): Delete.
3966 (enum maybe_add_completion_enum): Delete.
3967 (maybe_add_completion): Delete.
3968 (throw_max_completions_reached_error): Delete.
3969 * corefile.c (complete_set_gnutarget): Adjust to work with a
3970 completion_tracker instead of a VEC.
3971 * cp-abi.c (cp_abi_completer): Adjust to work with a
3972 completion_tracker instead of a VEC.
3973 * d-lang.c (d_language_defn): Adjust.
3974 * disasm.c (disassembler_options_completer): Adjust to work with a
3975 completion_tracker instead of a VEC.
3976 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3977 (f_collect_symbol_completion_matches): ... this. Adjust to work
3978 with a completion_tracker instead of a VEC.
3979 (f_language_defn): Adjust.
3980 * go-lang.c (go_language_defn): Adjust.
3981 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3982 Adjust to work with a completion_tracker instead of a VEC.
3983 * infrun.c (handle_completer): Likewise.
3984 * interps.c (interpreter_completer): Likewise.
3985 * interps.h (interpreter_completer): Likewise.
3986 * language.c (unknown_language_defn, auto_language_defn)
3987 (local_language_defn): Adjust.
3988 * language.h (language_defn::la_make_symbol_completion_list):
3989 Rename to ...
3990 (language_defn::la_collect_symbol_completion_matches): ... this
3991 and adjust to work with a completion_tracker instead of a VEC.
3992 * m2-lang.c (m2_language_defn): Adjust.
3993 * objc-lang.c (objc_language_defn): Adjust.
3994 * opencl-lang.c (opencl_language_defn): Adjust.
3995 * p-lang.c (pascal_language_defn): Adjust.
3996 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3997 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3998 with a completion_tracker.
3999 * rust-lang.c (rust_language_defn): Adjust.
4000 * symtab.c (free_completion_list, do_free_completion_list)
4001 (return_val, completion_tracker): Delete.
4002 (completion_list_add_name, completion_list_add_symbol)
4003 (completion_list_add_msymbol, completion_list_objc_symbol)
4004 (completion_list_add_fields, add_symtab_completions): Add
4005 completion_tracker parameter and use it.
4006 (default_make_symbol_completion_list_break_on_1): Rename to...
4007 (default_collect_symbol_completion_matches_break_on): ... this.
4008 Add completion_tracker parameter and use it instead of allocating
4009 a completion tracker here.
4010 (default_make_symbol_completion_list_break_on): Delete old
4011 implementation.
4012 (default_make_symbol_completion_list): Delete.
4013 (default_collect_symbol_completion_matches): New.
4014 (make_symbol_completion_list): Delete.
4015 (collect_symbol_completion_matches): New.
4016 (make_symbol_completion_type): Rename to ...
4017 (collect_symbol_completion_matches_type): ... this. Add
4018 completion_tracker parameter and use it instead of VEC.
4019 (make_file_symbol_completion_list_1): Rename to...
4020 (collect_file_symbol_completion_matches): ... this. Add
4021 completion_tracker parameter and use it instead of VEC.
4022 (make_file_symbol_completion_list): Delete.
4023 (add_filename_to_list): Use completion_list instead of a VEC.
4024 (add_partial_filename_data::list): Now a completion_list.
4025 (make_source_files_completion_list): Work with a completion_list
4026 instead of a VEC.
4027 * symtab.h: Include "completer.h".
4028 (default_make_symbol_completion_list_break_on)
4029 (default_make_symbol_completion_list, make_symbol_completion_list)
4030 (make_symbol_completion_type, make_file_symbol_completion_list)
4031 (make_source_files_completion_list): Delete.
4032 (default_collect_symbol_completion_matches_break_on)
4033 (default_collect_symbol_completion_matches)
4034 (collect_symbol_completion_matches)
4035 (collect_symbol_completion_matches_type)
4036 (collect_file_symbol_completion_matches)
4037 (make_source_files_completion_list): New.
4038 * top.c (init_main): Don't install a rl_completion_entry_function
4039 hook. Install a rl_attempted_completion_function hook instead.
4040 * tui/tui-layout.c (layout_completer): Adjust to work with a
4041 completion_tracker.
4042 * tui/tui-regs.c (tui_reggroup_completer):
4043 * tui/tui-win.c (window_name_completer, focus_completer)
4044 (winheight_completer): Adjust to work with a completion_tracker.
4045 * value.c: Include "completer.h".
4046 (complete_internalvar): Adjust to work with a completion_tracker.
4047 * value.h (complete_internalvar): Likewise.
4048
4049 2017-07-17 Pedro Alves <palves@redhat.com>
4050
4051 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4052 renames.
4053 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4054 comments to completer_ftype's declaration.
4055 <completer_handle_brkchars>: Change type to
4056 completer_handle_brkchars_ftype.
4057 * command.h (completer_ftype): Add describing comment and give
4058 names to parameters.
4059 (completer_ftype_void): Rename to ...
4060 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4061 (set_cmd_completer_handle_brkchars): Adjust.
4062 * completer.c (filename_completer_handle_brkchars): New function.
4063 (complete_line_internal_normal_command): New function, factored
4064 out from ...
4065 (complete_line_internal): ... here.
4066 (command_completer_handle_brkchars)
4067 (default_completer_handle_brkchars)
4068 (completer_handle_brkchars_func_for_completer): New functions.
4069 * completer.h (set_gdb_completion_word_break_characters): Delete
4070 declaration.
4071 (completer_handle_brkchars_func_for_completer): New declaration.
4072 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4073 completer_handle_brkchars_func_for_completer.
4074
4075 2017-07-17 Pedro Alves <palves@redhat.com>
4076
4077 * completer.c (symbol_completer): New function, based on
4078 make_symbol_completion_list_fn.
4079 * completer.h (symbol_completer): New declaration.
4080 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4081 * python/py-cmd.c (completers): Adjust.
4082 * symtab.c (make_symbol_completion_list_fn): Delete.
4083 * symtab.h (make_symbol_completion_list_fn): Delete.
4084 * cli/cli-decode.c (add_cmd): Adjust.
4085
4086 2017-07-17 Pedro Alves <palves@redhat.com>
4087
4088 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4089 * dwarf2read.c: Include "filename-seen-cache.h".
4090 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4091 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4092 * filename-seen-cache.c: New file.
4093 * filename-seen-cache.h: New file.
4094 * symtab.c: Include "filename-seen-cache.h".
4095 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4096 (create_filename_seen_cache, clear_filename_seen_cache)
4097 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4098 to filename-seen-cache.h/filename-seen-cache.c.
4099 (output_source_filename, sources_info)
4100 (maybe_add_partial_symtab_filename)
4101 (make_source_files_completion_list): Adjust to use
4102 filename_seen_cache.
4103
4104 2017-07-17 Pedro Alves <palves@redhat.com>
4105
4106 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4107 fields.
4108 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4109 dwarf2_debug_sections*)): New.
4110 (dwarf2_per_objfile::dwarf2_per_objfile(const
4111 dwarf2_per_objfile&)): Declare as deleted.
4112 (dwarf2_per_objfile::operator=): Declare as deleted.
4113 (dwarf2_per_objfile::dwarf2_per_objfile)
4114 (dwarf2_per_objfile::~dwarf2_per_objfile)
4115 (dwarf2_per_objfile::free_cached_comp_units): New.
4116 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4117 ctor. Call dwarf2_per_objfile's ctor manually.
4118 (dwarf2_locate_sections): Deleted/refactored as ...
4119 (dwarf2_per_objfile::locate_sections): ... this new method.
4120 (free_cached_comp_units): Defer to
4121 dwarf2_per_objfile::free_cached_comp_units.
4122 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4123
4124 2017-07-14 Tom Tromey <tom@tromey.com>
4125
4126 PR rust/21764:
4127 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4128 parameter.
4129 <UNOP_SIZEOF>: Split into separate case.
4130 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4131
4132 2017-07-14 Tom Tromey <tom@tromey.com>
4133
4134 PR rust/21763:
4135 * symtab.c (symbol_matches_domain): Add language_rust to special
4136 case.
4137 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4138 treat LOC_TYPEDEF symbols as variables.
4139
4140 2017-07-14 Pedro Alves <palves@redhat.com>
4141
4142 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4143 symtabs matching all symtabs with SRCFILE as file name instead of
4144 only considering the first hit, with lookup_symtab.
4145
4146 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4147
4148 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4149 operator_name parameters.
4150 (gen_expr): Update function call.
4151
4152 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4153
4154 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4155 parameter.
4156 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4157 Likewise.
4158 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4159 parameter, use agent_expr::gdbarch instead, update function
4160 calls.
4161 (locexpr_tracepoint_var_ref): Likewise.
4162 (loclist_tracepoint_var_ref): Likewise.
4163 * ax-gdb.c (gen_trace_static_fields): Likewise.
4164 (gen_traced_pop): Likewise.
4165 (gen_frame_args_address): Likewise.
4166 (gen_frame_locals_address): Likewise.
4167 (gen_var_ref): Likewise.
4168 (gen_struct_ref_recursive): Likewise.
4169 (gen_static_field): Likewise.
4170 (gen_maybe_namespace_elt): Likewise.
4171 (gen_expr): Likewise.
4172 (gen_trace_for_var): Likewise.
4173 (gen_trace_for_expr): Likewise.
4174 (gen_trace_for_return_address): Likewise.
4175
4176 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4177
4178 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4179 parameter.
4180 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4181
4182 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4183
4184 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4185 from ax, update calls.
4186 (gen_usual_arithmetic): Likewise.
4187 (gen_integral_promotions): Likewise.
4188 (gen_bitfield_ref): Likewise.
4189 (gen_primitive_field): Likewise.
4190 (gen_struct_ref_recursive): Likewise.
4191 (gen_struct_ref): Likewise.
4192 (gen_maybe_namespace_elt): Likewise.
4193 (gen_struct_elt_for_reference): Likewise.
4194 (gen_namespace_elt): Likewise.
4195 (gen_aggregate_elt_ref): Likewise.
4196 (gen_expr): Get gdbarch from ax, update calls.
4197 (gen_expr_binop_rest): Likewise.
4198
4199 2017-07-13 Pedro Alves <palves@redhat.com>
4200
4201 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4202 as default tdesc.
4203 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4204 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4205 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4206 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4207 tdep.
4208 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4209 Get final tdesc from the tdep.
4210 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4211 default tdesc.
4212 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4213 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4214 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4215 Use it as default tdesc.
4216 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4217 down to amd_init_abi. No longer handle fallback tdesc here.
4218 * amd64-tdep.h (tdesc_x32): Declare.
4219 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4220 parameter.
4221 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4222 as default tdesc.
4223
4224 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4225
4226 * s390-linux-tdep.c (s390_process_record): Add support for
4227 instructions new in arch12.
4228
4229 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4230
4231 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4232 PT_GETFSBASE and PT_GETGSBASE.
4233 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4234 PT_SETGSBASE.
4235
4236 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4237
4238 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4239 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4240 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4241 those rules.
4242 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4243 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4244 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4245 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4246 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4247 * features/i386/amd64.xml: Add 64bit-segments.xml.
4248 * features/i386/amd64-avx-avx512.c: Regenerated.
4249 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4250 * features/i386/amd64-avx-mpx.c: Regenerated.
4251 * features/i386/amd64-avx.c: Regenerated.
4252 * features/i386/amd64-mpx.c: Regenerated.
4253 * features/i386/amd64.c: Regenerated.
4254 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4255 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4256 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4257 * regformats/i386/amd64-avx.dat: Regenerated.
4258 * regformats/i386/amd64-mpx.dat: Regenerated.
4259 * regformats/i386/amd64.dat: Regenerated.
4260
4261 2017-07-10 Yao Qi <yao.qi@linaro.org>
4262
4263 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4264 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4265
4266 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4267
4268 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4269 unsetenv.
4270 * gnulib/aclocal.m4: Regenerate.
4271 * gnulib/config.in: Regenerate.
4272 * gnulib/configure: Regenerate.
4273 * gnulib/import/Makefile.am: Regenerate.
4274 * gnulib/import/Makefile.in: Regenerate.
4275 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4276 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4277 * gnulib/import/m4/environ.m4: New file.
4278 * gnulib/import/m4/setenv.m4: New file.
4279 * gnulib/import/setenv.c: New file.
4280 * gnulib/import/unsetenv.c: New file.
4281
4282 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4283
4284 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4285 address when op is DW_OP_addr.
4286
4287 2017-07-09 Tom Tromey <tom@tromey.com>
4288
4289 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4290 check and apply to outer type.
4291
4292 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4293
4294 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4295 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4296 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4297 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4298
4299 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4300
4301 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4302
4303 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4304
4305 * corelow.c (get_core_siginfo): Remove.
4306 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4307 instead of get_core_siginfo.
4308 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4309 * gdbarch.h: Re-generate.
4310 * gdbarch.c: Re-generate.
4311 * linux-tdep.c (linux_core_xfer_siginfo): New.
4312 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4313
4314 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4315
4316 * corelow.c (thread_section_name): Move to ...
4317 * gdbcore.h (thread_section_name): ... here.
4318
4319 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4320
4321 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4322 (struct siginfo32): New.
4323 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4324 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4325 via ptrace(PT_LWPINFO).
4326
4327 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4328
4329 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4330 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4331 (fbsd_get_siginfo_type): New.
4332 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4333 (_initialize_fbsd_tdep): New.
4334
4335 2017-07-06 David Blaikie <dblaikie@gmail.com>
4336
4337 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4338 a singular dwo_unit*) to support multiple CUs in the same way that
4339 multiple TUs are supported.
4340 (create_cus_hash_table): Replace create_dwo_cu with a function for
4341 parsing multiple CUs from a DWO file.
4342 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4343 create_dwo_cu.
4344 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4345 htab_find, rather than comparing the signature to a singleton CU in
4346 the dwo_file.
4347
4348 2017-07-06 Pedro Alves <palves@redhat.com>
4349
4350 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4351
4352 2017-07-04 Pedro Alves <palves@redhat.com>
4353
4354 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4355 * gdbtypes.h (TYPE_STATIC): Delete.
4356 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4357 is_synchronized, is_native>: Delete.
4358 <dummy>: Bump.
4359 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4360 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4361 (TYPE_FN_FIELD_ABSTRACT): Delete.
4362
4363 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4364
4365 * buffer.h (buffer_finish): Fix spelling mistakes.
4366
4367 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4368
4369 * .dir-locals.el: Automatically switch to C-style comments in
4370 versions of Emacs that support the feature.
4371
4372 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4373 Pedro Alves <palves@redhat.com>
4374
4375 PR cli/21688
4376 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4377 (process_next_line): New variable 'inline_cmd'.
4378 Adjust 'if' clauses for "python", "compile" and "guile" to use
4379 'command_name_equals' and check for '!inline_cmd'.
4380
4381 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4382
4383 PR cli/21688
4384 * cli/cli-script.c (command_name_equals_not_inline): New function.
4385 (process_next_line): Adjust 'if' clauses for "python", "compile"
4386 and "guile" to use command_name_equals_not_inline.
4387
4388 2017-06-29 Pedro Alves <palves@redhat.com>
4389
4390 * completer.c (expression_completer): Call
4391 linespec_location_completer instead of location_completer.
4392
4393 2017-06-29 Pedro Alves <palves@redhat.com>
4394
4395 * completer.c (expression_completer): Remove code that recomputes
4396 'text' from 'word'.
4397
4398 2017-06-29 Yao Qi <yao.qi@linaro.org>
4399
4400 * regformats/regdat.sh: Generate code with
4401 "ifndef IN_PROCESS_AGENT".
4402
4403 2017-06-28 Pedro Alves <palves@redhat.com>
4404
4405 * command.h: Include "common/scoped_restore.h".
4406
4407 2017-06-28 Yao Qi <yao.qi@linaro.org>
4408
4409 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4410 instead of obstack_grow.
4411
4412 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4413
4414 PR gdb/21337
4415 * symfile.c (reread_symbols): Call objfiles_changed just before
4416 read_symbols.
4417
4418 2017-06-27 Pedro Alves <palves@redhat.com>
4419
4420 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4421 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4422 (completion_list_add_symbol, completion_list_add_msymbol):
4423 ... these new functions.
4424 (add_symtab_completions)
4425 (default_make_symbol_completion_list_break_on_1): Adjust.
4426
4427 2017-06-27 Pedro Alves <palves@redhat.com>
4428
4429 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4430 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4431 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4432 dtor.
4433 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4434 'storage_obstack' field an auto_obstack. In-class initialize all
4435 non-bitfield fields. Make minsyms_read bool.
4436 * symfile.c (read_symbols): Adjust.
4437
4438 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4439
4440 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4441 (gdbsim_store_register): Likewise.
4442
4443 2017-06-27 Pedro Alves <palves@redhat.com>
4444
4445 * c-exp.y (name_obstack): Now an auto_obstack.
4446 (yylex): Use auto_obstack::clear.
4447 (c_parse): Use auto_obstack::clear instead of reinitializing and
4448 freeing the obstack.
4449 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4450 * d-exp.y (name_obstack): Now an auto_obstack.
4451 (yylex): Use auto_obstack::clear.
4452 (d_parse): Use auto_obstack::clear instead of reinitializing and
4453 freeing the obstack.
4454 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4455 auto_obstack.
4456 * dwarf2read.c (create_addrmap_from_index)
4457 (dwarf2_build_psymtabs_hard)
4458 (update_enumeration_type_from_children): Likewise.
4459 * gdb_obstack.h (auto_obstack): New type.
4460 * go-exp.y (name_obstack): Now an auto_obstack.
4461 (build_packaged_name): Use auto_obstack::clear.
4462 (go_parse): Use auto_obstack::clear instead of reinitializing and
4463 freeing the obstack.
4464 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4465 auto_obstack.
4466 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4467 * rust-exp.y (work_obstack): Now an auto_obstack.
4468 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4469 reinitializing and freeing the obstack.
4470 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4471 (host_char_to_target): Use auto_obstack.
4472 * utils.h (make_cleanup_obstack_free): Delete declaration.
4473 * valprint.c (generic_emit_char, generic_printstr): Use
4474 auto_obstack.
4475
4476 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4477
4478 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4479 thread.
4480 (darwin_init_thread_list): Don't update dummy thread.
4481 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4482
4483 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4484
4485 * record-full.c (netorder16): Remove.
4486
4487 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4488
4489 * common/diagnostics.h: Define macros for GCC.
4490 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4491 * common/vec.h: Include diagnostics.h.
4492 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4493 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4494 warning.
4495
4496 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4497
4498 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4499 New macro.
4500 * ada-lex.l: Ignore deprecated register warnings.
4501
4502 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4503
4504 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4505 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4506
4507 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4508
4509 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4510 its own line.
4511
4512 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4513
4514 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4515
4516 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4517
4518 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4519 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4520 (xtensa_register_read_masked): Likewise.
4521
4522 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4523
4524 * common/environ.c (gdb_environ::unset): Update comment.
4525
4526 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4527
4528 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4529 registers.
4530
4531 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4532
4533 * record-full.c (record_full_exec_insn): Use byte_vector.
4534
4535 2017-06-22 Yao Qi <yao.qi@linaro.org>
4536
4537 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4538 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4539
4540 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4541
4542 * remote.c (cached_reg): Move from here...
4543 * regcache.h (cached_reg): ...to here.
4544 * python/py-unwind.c (struct reg_info): Remove.
4545 (cached_frame_info): Use cached_reg_t.
4546 (pyuw_prev_register): Likewise.
4547 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4548 (pyuw_dealloc_cache): Free all registers.
4549
4550 2017-06-22 Pedro Alves <palves@redhat.com>
4551 Simon Marchi <simon.marchi@ericsson.com>
4552
4553 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4554 warning.
4555 * common/diagnostics.h: New file.
4556
4557 2017-06-22 Pedro Alves <palves@redhat.com>
4558
4559 * common/agent.h: Add include guards.
4560
4561 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4562
4563 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4564 talk about addressable units instead of bytes.
4565
4566 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4567
4568 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4569 of '::const_iterator'.
4570
4571 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4572
4573 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4574 'unittests/environ-selftests.c'.
4575 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4576 * charset.c (find_charset_names): Declare object 'iconv_env'.
4577 Update code to use 'iconv_env' object. Remove call to
4578 'free_environ'.
4579 * common/environ.c: Include <utility>.
4580 (make_environ): Delete function.
4581 (free_environ): Delete function.
4582 (gdb_environ::clear): New function.
4583 (gdb_environ::operator=): New function.
4584 (gdb_environ::get): Likewise.
4585 (environ_vector): Delete function.
4586 (set_in_environ): Delete function.
4587 (gdb_environ::set): New function.
4588 (unset_in_environ): Delete function.
4589 (gdb_environ::unset): New function.
4590 (gdb_environ::envp): Likewise.
4591 * common/environ.h: Include <vector>.
4592 (struct gdb_environ): Delete; transform into...
4593 (class gdb_environ): ... this class.
4594 (free_environ): Delete prototype.
4595 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4596 environ_vector): Likewise.
4597 * infcmd.c (run_command_1): Update code to call
4598 'envp' from 'gdb_environ' class.
4599 (environment_info): Update code to call methods from 'gdb_environ'
4600 class.
4601 (unset_environment_command): Likewise.
4602 (path_info): Likewise.
4603 (path_command): Likewise.
4604 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4605 (inferior::inferior): Initialize 'environment' using the host's
4606 information.
4607 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4608 Include "environ.h".
4609 (class inferior) <environment>: Change type from 'struct
4610 gdb_environ' to 'gdb_environ'.
4611 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4612 methods from 'gdb_environ' class.
4613 * solib.c (solib_find_1): Likewise
4614 * unittests/environ-selftests.c: New file.
4615
4616 2017-06-20 Yao Qi <yao.qi@linaro.org>
4617
4618 * features/i386/i386-linux.xml: Exchange the order of including
4619 32bit-linux.xml and 32bit-sse.xml.
4620 * features/i386/i386-linux.c: Regenerated.
4621
4622 2017-06-20 Yao Qi <yao.qi@linaro.org>
4623
4624 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4625 Delete copy ctor and assignment operator.
4626 (tdesc_type): Likewise.
4627 (tdesc_feature): Likewise.
4628 (tdesc_free_reg): Remove.
4629 (tdesc_create_reg): Use new.
4630 (tdesc_free_type): Remove.
4631 (tdesc_create_vector): Use new.
4632 (tdesc_create_union): Likewise.
4633 (tdesc_create_flags): Likewise.
4634 (tdesc_create_enum): Likewise.
4635 (tdesc_free_feature): Delete.
4636 (free_target_description): Use delete.
4637
4638 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4639
4640 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4641 registers.
4642
4643 2017-06-19 Pedro Alves <palves@redhat.com>
4644
4645 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4646 after gdb::unlinker.
4647
4648 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4649
4650 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4651 gdb_environ to access an environment variable.
4652
4653 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4654
4655 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4656 gdb_byte*.
4657
4658 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4659
4660 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4661
4662 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4663
4664 * configure: Re-generate.
4665 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4666
4667 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4668
4669 * configure: Re-generate.
4670 * warning.m4: Pass -Werror to compiler when checking for
4671 supported warning flags.
4672
4673 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4674
4675 * Makefile.in (COMPILE.pre): Add "-x c++".
4676
4677 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4678 Pedro Alves <palves@redhat.com>
4679 Yao Qi <yao.qi@linaro.org>
4680
4681 * defs.h (RequireLongest): New.
4682 (extract_integer): Declare function template.
4683 (extract_signed_integer): Remove the declaration, but define it
4684 static inline.
4685 (extract_unsigned_integer): Likewise.
4686 (store_integer): Declare function template.
4687 (store_signed_integer): Remove the declaration, but define it
4688 static inline.
4689 (store_unsigned_integer): Likewise.
4690 * findvar.c (extract_integer): New function template.
4691 (extract_signed_integer): Remove.
4692 (extract_unsigned_integer): Remove.
4693 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4694 instantiations.
4695 (store_integer): New function template.
4696 (store_signed_integer): Remove.
4697 (store_unsigned_integer): Remove.
4698 (store_integer): Explicit instantiations.
4699 * regcache.c (regcache_raw_read_signed): Update.
4700 (regcache::raw_read): New function.
4701 (regcache::raw_read_signed): Remove.
4702 (regcache::raw_read_unsigned): Remove.
4703 (regcache_raw_read_unsigned): Update.
4704 (regcache_raw_write_unsigned): Update.
4705 (regcache::raw_write_signed): Remove.
4706 (regcache::raw_write): New function.
4707 (regcache_cooked_read_signed): Update.
4708 (regcache::raw_write_unsigned): Remove.
4709 (regcache::cooked_read_signed): Remove.
4710 (regcache_cooked_read_unsigned): Update.
4711 (regcache::cooked_read_unsigned): Remove.
4712 (regcache_cooked_write_signed): Update.
4713 (regcache_cooked_write_unsigned): Update.
4714 * regcache.h (regcache) <raw_read_signed>: Remove.
4715 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4716 <raw_read, raw_write>: New.
4717 <cooked_read_signed, cooked_write_signed>: Remove.
4718 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4719 <cooked_read, cooked_write>: New.
4720 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4721 (sh64_pseudo_register_write): Update.
4722
4723 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4724
4725 * arc-tdep.c (arc_disassembler_options): New variable.
4726 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4727 of default_print_insn.
4728 (arc_delayed_print_insn): Set info->section when needed,
4729 use default_print_insn to retrieve a disassembler.
4730
4731 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4732
4733 PR gdb/21574
4734 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4735 to mention $SHELL and startup-with-shell.
4736
4737 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4738
4739 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4740
4741 2017-06-14 Yao Qi <yao.qi@linaro.org>
4742
4743 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4744 default_print_insn instead of print_insn_aarch64.
4745 * arm-tdep.c (gdb_print_insn_arm): Call
4746 default_print_insn instead of print_insn_big_arm
4747 and print_insn_little_arm.
4748 * i386-tdep.c (i386_print_insn): Call default_print_insn
4749 instead of print_insn_i386.
4750 * ia64-tdep.c (ia64_print_insn): Call
4751 default_print_insn instead of print_insn_ia64.
4752 * mips-tdep.c (gdb_print_insn_mips): Call
4753 default_print_insn instead of print_insn_big_mips
4754 and print_insn_little_mips.
4755 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4756 instead of print_insn_spu.
4757
4758 2017-06-14 Pedro Alves <palves@redhat.com>
4759
4760 * ada-lang.c: Include "common/byte-vector.h".
4761 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4762 * charset.c (wchar_iterator::iterate): Resize the vector instead
4763 of reserving it.
4764 * common/byte-vector.h: Include "common/def-vector.h".
4765 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4766 * cli/cli-dump.c: Include "common/byte-vector.h".
4767 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4768 * common/byte-vector.h: New file.
4769 * common/def-vector.h: New file.
4770 * common/default-init-alloc.h: New file.
4771 * dwarf2loc.c: Include "common/byte-vector.h".
4772 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4773 instead of reserving it.
4774 * dwarf2read.c: Include "common/byte-vector.h".
4775 (data_buf::m_vec): Now a gdb::byte_vector.
4776 * gdb_regex.c: Include "common/def-vector.h".
4777 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4778 * mi/mi-main.c: Include "common/byte-vector.h".
4779 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4780 * printcmd.c: Include "common/byte-vector.h".
4781 (print_scalar_formatted): Use gdb::byte_vector.
4782 * valprint.c: Include "common/byte-vector.h".
4783 (maybe_negate_by_bytes, print_decimal_chars): Use
4784 gdb::byte_vector.
4785
4786 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4787
4788 * darwin-nat.c: Include "nat/fork-inferior.h".
4789
4790 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4791
4792 * configure.nat: Factor out Darwin bits that are not
4793 architecture-specific. Add fork-inferior.o.
4794
4795 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4796
4797 * configure.nat: Factor out AIX bits that are not
4798 architecture-specific. Add fork-inferior.o.
4799
4800 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4801
4802 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4803 (read_pieced_value, write_pieced_value): ...here. Reduce to
4804 wrappers that just call rw_pieced_value.
4805
4806 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4807
4808 * dwarf2loc.c (write_pieced_value): When writing the data for a
4809 memory piece, use write_memory_with_notification instead of
4810 write_memory.
4811
4812 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4813
4814 * valops.c (read_value_memory): Change embedded_offset to
4815 represent a bit offset instead of a byte offset.
4816 * value.h (read_value_memory): Adjust comment.
4817
4818 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4819
4820 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4821 dest_offset_bits and source_offset_bits.
4822 (write_pieced_value): Likewise.
4823
4824 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4825
4826 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4827 given by DW_OP_bit_piece.
4828 (write_pieced_value): Likewise.
4829
4830 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4831
4832 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4833 some other preparations to the places where sufficient information
4834 is available.
4835 (write_pieced_value): Likewise.
4836
4837 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4838
4839 * dwarf2loc.c (bits_to_bytes): New function.
4840 (read_pieced_value): Fix offset calculations for register pieces
4841 on big-endian targets.
4842 (write_pieced_value): Likewise.
4843
4844 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4845
4846 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4847 (write_pieced_value): Likewise.
4848
4849 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4850
4851 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4852 transfer the source value's least significant bits, instead of its
4853 lowest-addressed ones. Rename type_len to max_offset.
4854 (read_pieced_value): Mirror above changes to write_pieced_value as
4855 applicable.
4856
4857 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4858
4859 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4860 truncate full bytes from dest_offset_bits before using it as an
4861 offset into the buffer.
4862
4863 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4864
4865 * dwarf2loc.c (write_pieced_value): Include transfer size in
4866 byte-wise check.
4867
4868 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4869
4870 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4871 calculation of this_size.
4872
4873 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4874
4875 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4876 when targeting a bit-field.
4877 (write_pieced_value): Likewise.
4878
4879 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4880
4881 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4882 (allocate_piece_closure): Drop addr_size parameter.
4883 (dwarf2_evaluate_loc_desc_full): Adjust call to
4884 allocate_piece_closure.
4885
4886 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4887
4888 PR gdb/21226
4889 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4890 the LSB end, independent of endianness.
4891
4892 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4893
4894 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4895 size capping.
4896
4897 2017-06-13 Yao Qi <yao.qi@linaro.org>
4898
4899 * mips-linux-nat.c: Move include features/mips*-linux.c to
4900 mips-linux-tdep.c.
4901 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4902 to mips-linux-tdep.c.
4903 * mips-linux-tdep.c: Include features/mips*-linux.c
4904 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4905 functions.
4906 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4907 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4908 (tdesc_mips64_dsp_linux): Declare.
4909
4910 2017-06-12 Tom Tromey <tom@tromey.com>
4911
4912 * valprint.h (val_print_type_code_int): Remove.
4913 * valprint.c (generic_val_print_int): Always call
4914 val_print_scalar_formatted.
4915 (val_print_type_code_int): Remove.
4916 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4917 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4918 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4919 * ada-valprint.c (ada_val_print_num): Use
4920 val_print_scalar_formatted.
4921
4922 2017-06-12 Tom Tromey <tom@tromey.com>
4923
4924 * printcmd.c (print_scalar_formatted): Unify the two switches.
4925 Don't convert scalars to LONGEST.
4926
4927 2017-06-12 Tom Tromey <tom@tromey.com>
4928
4929 PR exp/16225:
4930 * valprint.h (print_decimal_chars): Update.
4931 * valprint.c (maybe_negate_by_bytes): New function.
4932 (print_decimal_chars): Add "is_signed" argument.
4933 * printcmd.c (print_scalar_formatted): Update.
4934
4935 2017-06-12 Tom Tromey <tom@tromey.com>
4936
4937 PR exp/16225:
4938 * valprint.h (print_binary_chars, print_hex_chars): Update.
4939 * valprint.c (val_print_type_code_int): Update.
4940 (print_binary_chars): Add "zero_pad" argument.
4941 (emit_octal_digit): New function.
4942 (print_octal_chars): Don't zero-pad.
4943 (print_decimal_chars): Likewise.
4944 (print_hex_chars): Add "zero_pad" argument.
4945 * sh64-tdep.c (sh64_do_fp_register): Update.
4946 * regcache.c (regcache::dump): Update.
4947 * printcmd.c (print_scalar_formatted): Update.
4948 * infcmd.c (default_print_one_register_info): Update.
4949
4950 2017-06-12 Pedro Alves <palves@redhat.com>
4951 Alan Hayward <alan.hayward@arm.com>
4952
4953 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4954 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4955 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4956 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4957 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4958
4959 2017-06-12 Pedro Alves <palves@redhat.com>
4960
4961 * dwarf2read.c (mapped_symtab::data): Now a vector of
4962 symtab_index_entry instead of vector of
4963 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4964 whether an element's name is NULL instead of checking whether the
4965 element itself is NULL.
4966 (find_slot): Change return type. Adjust.
4967 (hash_expand, , add_index_entry, uniquify_cu_indices)
4968 (write_hash_table): Adjust.
4969
4970 2017-06-12 Pedro Alves <palves@redhat.com>
4971
4972 * dwarf2read.c (recursively_count_psymbols): New function.
4973 (write_psymtabs_to_index): Call it to compute number of psyms and
4974 pass estimate size of psyms_seen to unordered_set's ctor.
4975
4976 2017-06-12 Pedro Alves <palves@redhat.com>
4977
4978 * dwarf2read.c (write_hash_table): Check if key already exists
4979 before emplacing.
4980
4981 2017-06-12 Pedro Alves <palves@redhat.com>
4982
4983 * dwarf2read.c (data_buf::append_space): Rename to...
4984 (data_buf::grow): ... this, and make private. Adjust all callers.
4985 (data_buf::append_uint): New method.
4986 (add_address_entry, write_one_signatured_type)
4987 (write_psymtabs_to_index): Use it.
4988
4989 2017-06-12 Pedro Alves <palves@redhat.com>
4990
4991 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4992 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4993 (data_buf::file_write): Call ::fwrite directly.
4994
4995 2017-06-12 Pedro Alves <palves@redhat.com>
4996
4997 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4998 std::vector::erase.
4999
5000 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5001
5002 Code cleanup: C++ify .gdb_index producer.
5003 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5004 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5005 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5006 (create_strtab, add_string): Remove.
5007 (file_write, data_buf): New.
5008 (struct symtab_index_entry): Use std::vector for cu_indices.
5009 (struct mapped_symtab): Use std::vector for data.
5010 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5011 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5012 Remove.
5013 (find_slot): Change return type. Update it to the new data structures.
5014 (hash_expand, add_index_entry): Update it to the new data structures.
5015 (offset_type_compare): Remove.
5016 (uniquify_cu_indices): Update it to the new data structures.
5017 (c_str_view, c_str_view_hasher, vector_hasher): New.
5018 (add_indices_to_cpool): Remove.
5019 (write_hash_table): Update it to the new data structures.
5020 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5021 (eq_psymtab_cu_index): Remove.
5022 (psym_index_map): New typedef.
5023 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5024 reference and std::unordered_map for cu_index_htab.
5025 (add_address_entry, add_address_entry_worker, write_address_map)
5026 (write_psymbols): Update it to the new data structures.
5027 (write_obstack): Remove.
5028 (struct signatured_type_index_data): Change types_list to a data_buf
5029 reference and psyms_seen to a std::unordered_set reference.
5030 (write_one_signatured_type, recursively_write_psymbols)
5031 (write_psymtabs_to_index): Update it to the new data structures.
5032
5033 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5034
5035 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5036 separate-debug-file commands.
5037 * symfile.h (separate_debug_file_debug): New global.
5038 * symfile.c (separate_debug_file_debug): New global.
5039 (separate_debug_file_exists, find_separate_debug_file): Add
5040 debug output.
5041 (_initialize_symfile): Add "set debug separate-debug-file"
5042 command.
5043 * build-id.c (build_id_to_debug_bfd,
5044 find_separate_debug_file_by_buildid): Add debug output.
5045
5046 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5047
5048 * gdbarch.sh (displaced_step_free_closure): Remove.
5049 * gdbarch.h, gdbarch.c: Re-generate.
5050 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5051 displaced_step_free_closure.
5052 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5053 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5054 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5055 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5056 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5057 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5058 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5059 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5060 * infrun.c (displaced_step_clear): Call xfree instead of
5061 gdbarch_displaced_step_free_closure.
5062
5063 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5064
5065 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5066 NULL".
5067
5068 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5069
5070 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5071 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5072 (mn10300_push_dummy_call): Likewise.
5073
5074 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5075
5076 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5077
5078 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5079
5080 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5081
5082 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5083
5084 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5085 able to start inferiors using a shell.
5086 (New remote packets): Announce new packet "QStartupWithShell".
5087 * remote.c: Add PACKET_QStartupWithShell.
5088 (extended_remote_create_inferior): Handle new
5089 PACKET_QStartupWithShell.
5090 (remote_protocol_features) <QStartupWithShell>: New entry for
5091 PACKET_QStartupWithShell.
5092 (_initialize_remote): Call "add_packet_config_cmd" for
5093 QStartupShell.
5094
5095 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5096 Pedro Alves <palves@redhat.com>
5097
5098 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5099 and "nat/fork-inferior.h".
5100 * common/common-inferior.h: New file, with contents from
5101 "gdb/inferior.h".
5102 * commom/common-utils.c: Include "common-utils.h".
5103 (stringify_argv): New function.
5104 * common/common-utils.h (stringify_argv): New prototype.
5105 * configure.nat: Add "fork-inferior.o" as a dependency for
5106 "*linux*", "fbsd*" and "nbsd*" hosts.
5107 * corefile.c (get_exec_file): Update comment.
5108 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5109 instead of "startup_inferior".
5110 (darwin_create_inferior): Call "add_thread_silent" after
5111 "fork_inferior".
5112 * fork-child.c: Cleanup unnecessary includes.
5113 (SHELL_FILE): Move to "common/common-fork-child.c".
5114 (environ): Likewise.
5115 (exec_wrapper): Initialize.
5116 (get_exec_wrapper): New function.
5117 (breakup_args): Move to "common/common-fork-child.c"; rename to
5118 "breakup_args_for_exec".
5119 (escape_bang_in_quoted_argument): Move to
5120 "common/common-fork-child.c".
5121 (saved_ui): New variable.
5122 (prefork_hook): New function.
5123 (postfork_hook): Likewise.
5124 (postfork_child_hook): Likewise.
5125 (gdb_startup_inferior): Likewise.
5126 (fork_inferior): Move to "common/common-fork-child.c". Update
5127 function to support gdbserver.
5128 (startup_inferior): Likewise.
5129 * gdbcore.h (get_exec_file): Remove declaration.
5130 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5131 instead of "startup_inferior". Call "add_thread_silent" after
5132 "fork_inferior".
5133 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5134 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5135 instead of "startup_inferior". Call "add_thread_silent" after
5136 "fork_inferior".
5137 * inferior.h: Include "common-inferior.h".
5138 (trace_start_error): Move to "common/common-utils.h".
5139 (trace_start_error_with_name): Likewise.
5140 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5141 (startup_inferior): Likewise.
5142 (gdb_startup_inferior): New prototype.
5143 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5144 * nat/fork-inferior.h: New file.
5145 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5146 instead of "startup_inferior". Call "add_thread_silent" after
5147 "fork_inferior".
5148 * target.h (target_terminal_init): Move prototype to
5149 "target/target.h".
5150 (target_terminal_inferior): Likewise.
5151 (target_terminal_ours): Likewise.
5152 * target/target.h (target_terminal_init): New prototype, moved
5153 from "target.h".
5154 (target_terminal_inferior): Likewise.
5155 (target_terminal_ours): Likewise.
5156 * utils.c (gdb_flush_out_err): New function.
5157
5158 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5159
5160 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5161 * common/common-gdbthread.h: New file, with parts from
5162 "gdb/gdbthread.h".
5163 * gdbthread.h: Include "common-gdbthread.h".
5164 (switch_to_thread): Moved to "common/common-gdbthread.h".
5165
5166 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5167
5168 * Makefile.in (SFILES): Add "common/job-control.c".
5169 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5170 (COMMON_OBS): Add "job-control.o".
5171 * common/job-control.c: New file, with contents from
5172 "gdb/inflow.c".
5173 * common/job-control.h: New file, with contents from "terminal.h".
5174 * fork-child.c: Include "job-control.h".
5175 * inflow.c: Include "job-control.h".
5176 (gdb_setpgid): Move to "common/common-inflow.c".
5177 (_initialize_inflow): Move setting of "job_control" to
5178 "handle_job_control".
5179 * terminal.h (job_control): Moved to "common/common-terminal.h".
5180 (gdb_setpgid): Likewise.
5181 * top.c: Include "job_control.h".
5182 * utils.c: Likewise.
5183 (job_control): Moved to "job-control.c".
5184
5185 2017-06-07 Pedro Alves <palves@redhat.com>
5186
5187 * Makefile.in (SFILES): Add gdb_regex.c.
5188 (COMMON_OBS): Add gdb_regex.o.
5189 * ada-lang.c (ada_add_standard_exceptions)
5190 (ada_add_exceptions_from_frame, name_matches_regex)
5191 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5192 parameter type to compiled_regex. Adjust.
5193 (ada_exceptions_list): Use compiled_regex.
5194 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5195 std::unique_ptr<compiled_regex>.
5196 (exception_catchpoint::~exception_catchpoint): Remove regfree
5197 call.
5198 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5199 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5200 * breakpoint.c (solib_catchpoint::compiled): Now a
5201 std::unique_ptr<compiled_regex>.
5202 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5203 (check_status_catch_solib): Adjust to use compiled_regex.
5204 (add_solib_catchpoint): Adjust to use compiled_regex.
5205 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5206 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5207 compiled_regex reference. Adjust to use it.
5208 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5209 declaration. Include "gdb_regex.h".
5210 (apropos_cmd): Change regex parameter to compiled_regex reference.
5211 * gdb_regex.c: New file.
5212 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5213 declarations.
5214 (class compiled_regex): New.
5215 * linux-tdep.c: Include "common/gdb_optional.h".
5216 (struct mapping_regexes): New, factored out from
5217 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5218 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5219 gdb::optional and remove cleanups. Adjust to compiled_regex.
5220 * probe.c: Include "common/gdb_optional.h".
5221 (collect_probes): Use compiled_regex and gdb::optional and remove
5222 cleanups.
5223 * skip.c: Include "common/gdb_optional.h".
5224 (skiplist_entry::compiled_function_regexp): Now a
5225 gdb::optional<compiled_regex>.
5226 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5227 (free_skiplist_entry): Remove regfree call.
5228 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5229 compiled_regex and gdb::optional.
5230 * symtab.c: Include "common/gdb_optional.h".
5231 (search_symbols): Use compiled_regex and gdb::optional.
5232 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5233 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5234 to gdb_regex.c.
5235
5236 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5237
5238 * regcache.c (regcache::save): Avoid buffer use.
5239 (regcache::dump): Likewise.
5240
5241 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5242
5243 * sh-tdep.c (sh_pseudo_register_read): Remove
5244 MAX_REGISTER_SIZE.
5245 (sh_pseudo_register_write): Likewise.
5246 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5247 (sh64_pseudo_register_write): Likewise
5248
5249 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5250
5251 * aarch64-tdep.c (aarch64_store_return_value): Use
5252 V_REGISTER_SIZE.
5253 (aarch64_pseudo_read_value): Likewise.
5254 (aarch64_pseudo_write): Likewise.
5255
5256 2017-06-06 Yao Qi <yao.qi@linaro.org>
5257
5258 * regformats/regdef.h (set_register_cache): Remove the
5259 declaration.
5260
5261 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5262
5263 * frame.c (frame_unwind_register_signed): Use
5264 frame_unwind_register_value.
5265
5266 2017-06-06 Pedro Alves <palves@redhat.com>
5267
5268 PR breakpoints/21553
5269 * breakpoint.c (create_breakpoints_sal_default)
5270 (init_breakpoint_sal, create_breakpoint_sal): Use
5271 gdb::unique_xmalloc_ptr for string parameters.
5272 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5273 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5274 (base_breakpoint_create_breakpoints_sal)
5275 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5276 (strace_marker_create_breakpoints_sal)
5277 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5278 string parameters.
5279 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5280 gdb::unique_xmalloc_ptr for string parameters.
5281 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5282 parameters.
5283
5284 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5285
5286 * alpha-tdep.c (alpha_register_to_value): Use
5287 get_frame_register_value.
5288 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5289
5290 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5291
5292 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5293 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5294 (ia64_value_to_register): Likewise.
5295 (ia64_extract_return_value): Likewise.
5296 (ia64_store_return_value): Likewise.
5297 (ia64_push_dummy_call): Likewise.
5298
5299 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5300
5301 GDB 8.0 released.
5302
5303 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5304
5305 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5306
5307 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5308
5309 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5310 parameter.
5311 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5312
5313 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5314
5315 * event-loop.c (poll_timers): Unallocate timer using delete
5316 instead of xfree.
5317
5318 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5319
5320 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5321 (struct breakpoint) <~breakpoint>: New.
5322 (struct watchpoint): Inherit from breakpoint.
5323 <~watchpoint>: New.
5324 <base>: Remove.
5325 (struct tracepoint): Inherit from breakpoint.
5326 <base>: Remove.
5327 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5328 (struct longjmp_breakpoint): Inherit from breakpoint.
5329 <~longjmp_breakpoint>: New.
5330 <base>: Remove.
5331 (new_breakpoint_from_type): Remove casts.
5332 (watchpoint_in_thread_scope): Remove reference to base field.
5333 (watchpoint_del_at_next_stop): Likewise.
5334 (update_watchpoint): Likewise.
5335 (watchpoint_check): Likewise.
5336 (bpstat_check_watchpoint): Likewise.
5337 (set_longjmp_breakpoint): Likewise.
5338 (struct fork_catchpoint): Inherit from breakpoint.
5339 <base>: Remove.
5340 (struct solib_catchpoint): Inherit from breakpoint.
5341 <~solib_catchpoint>: New.
5342 <base>: Remove.
5343 (dtor_catch_solib): Change to ...
5344 (solib_catchpoint::~solib_catchpoint): ... this.
5345 (breakpoint_hit_catch_solib): Remove reference to base field.
5346 (add_solib_catchpoint): Likewise.
5347 (create_fork_vfork_event_catchpoint): Likewise.
5348 (struct exec_catchpoint): Inherit from breakpoint.
5349 <~exec_catchpoint>: New.
5350 <base>: Remove.
5351 (dtor_catch_exec): Change to ...
5352 (exec_catchpoint::~exec_catchpoint): ... this.
5353 (dtor_watchpoint): Change to ...
5354 (watchpoint::~watchpoint): ... this.
5355 (watch_command_1): Remove reference to base field.
5356 (catch_exec_command_1): Likewise.
5357 (base_breakpoint_dtor): Change to ...
5358 (breakpoint::~breakpoint): ... this.
5359 (base_breakpoint_ops): Remove dtor field value.
5360 (longjmp_bkpt_dtor): Change to ...
5361 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5362 (strace_marker_create_breakpoints_sal): Remove reference to base
5363 field.
5364 (delete_breakpoint): Don't manually call breakpoint destructor.
5365 (create_tracepoint_from_upload): Remove reference to base field.
5366 (trace_pass_set_count): Likewise.
5367 (initialize_breakpoint_ops): Don't initialize
5368 momentary_breakpoint_ops, don't set dtors.
5369 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5370 <~ada_catchpoint>: New.
5371 <base>: Remove.
5372 (create_excep_cond_exprs): Remove reference to base field.
5373 (dtor_exception): Change to ...
5374 (ada_catchpoint::~ada_catchpoint): ... this.
5375 (dtor_catch_exception): Remove.
5376 (dtor_catch_exception_unhandled): Remove.
5377 (dtor_catch_assert): Remove.
5378 (create_ada_exception_catchpoint): Remove reference to base
5379 field.
5380 (initialize_ada_catchpoint_ops): Don't set dtors.
5381 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5382 breakpoint.
5383 <~signal_catchpoint>: New.
5384 <base>: Remove.
5385 (signal_catchpoint_dtor): Change to ...
5386 (signal_catchpoint::~signal_catchpoint): ... this.
5387 (create_signal_catchpoint): Remove reference to base field.
5388 (initialize_signal_catchpoint_ops): Don't set dtor.
5389 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5390 from breakpoint.
5391 <~syscall_catchpoint>: New.
5392 <base>: Remove.
5393 (dtor_catch_syscall): Change to ...
5394 (syscall_catchpoint::~syscall_catchpoint): ... this.
5395 (create_syscall_event_catchpoint): Remove reference to base
5396 field.
5397 (initialize_syscall_catchpoint_ops): Don't set dtor.
5398 * break-catch-throw.c (struct exception_catchpoint): Inherit
5399 from breakpoint.
5400 <~exception_catchpoint>: New.
5401 <base>: Remove.
5402 (dtor_exception_catchpoint): Change to ...
5403 (exception_catchpoint::~exception_catchpoint): ... this.
5404 (handle_gnu_v3_exceptions): Remove reference to base field.
5405 (initialize_throw_catchpoint_ops): Don't set dtor.
5406 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5407 field.
5408 * remote.c (remote_get_tracepoint_status): Likewise.
5409 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5410 * tracefile.c (tracefile_fetch_registers): Likewise.
5411 * tracepoint.c (actions_command): Likewise.
5412 (validate_actionline): Likewise.
5413 (tfind_1): Likewise.
5414 (get_traceframe_location): Likewise.
5415 (find_matching_tracepoint_location): Likewise.
5416 (parse_tracepoint_status): Likewise.
5417 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5418
5419 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5420
5421 * breakpoint.c (struct longjmp_breakpoint): New struct.
5422 (is_tracepoint_type): Change return type to bool.
5423 (is_longjmp_type): New function.
5424 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5425 (set_raw_breakpoint_without_location): Use
5426 new_breakpoint_from_type.
5427 (set_raw_breakpoint): Likewise.
5428
5429 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5430
5431 * breakpoint.c (new_breakpoint_from_type): New function.
5432 (create_breakpoint_sal): Use new_breakpoint_from_type and
5433 unique_ptr.
5434 (create_breakpoint): Likewise.
5435
5436 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5437
5438 * memattr.c (mem_info_command): Rename to ...
5439 (info_mem_command): ... this.
5440 (mem_enable_command): Rename to ...
5441 (enable_mem_command): ... this.
5442 (mem_disable_command): Rename to ...
5443 (disable_mem_command): ... this.
5444 (mem_delete_command): Rename to ...
5445 (delete_mem_command): ... this.
5446 (_initialize_mem): Adjust function names.
5447
5448 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5449
5450 * btrace.c (handle_pt_insn_events): New.
5451 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5452 STATUS. Split into this and ...
5453 (handle_pt_insn_event_flags): ... this.
5454
5455 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5456
5457 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5458 and struct pt_insn.resynced.
5459 * configure: Regenerated.
5460 * config.in: Regenerated.
5461
5462 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5463
5464 * btrace.c (ftrace_find_call_by_number): New function.
5465 (ftrace_new_function): Store objects, not pointers.
5466 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5467 ftrace_new_gap, ftrace_update_function,
5468 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5469 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5470 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5471 btrace_ends_with_single_insn, btrace_call_get): Account for
5472 btrace_thread_info::functions now storing objects.
5473 * btrace.h (struct btrace_thread_info): Add constructor.
5474 (struct btrace_thread_info) <functions>: Make std::vector.
5475 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5476 Initialize with default values.
5477 * record-btrace.c (record_btrace_frame_sniffer): Account for
5478 btrace_thread_info::functions now storing objects.
5479
5480 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5481
5482 * btrace.c: Remove typedef bfun_s.
5483 (ftrace_new_gap): Directly add gaps to the list of gaps.
5484 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5485 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5486 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5487 instead of gdb VEC.
5488
5489 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5490
5491 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5492 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5493 with btrace_thread_info::next_segment and
5494 btrace_thread_info::prev_segment.
5495 * btrace.h: Remove struct btrace_func_link.
5496 (struct btrace_function): Replace pair of function segment pointers
5497 with pair of indices.
5498 * python/py-record-btrace.c (btpy_call_prev_sibling,
5499 btpy_call_next_sibling): Replace references to
5500 btrace_thread_info::segment with btrace_thread_info::next_segment and
5501 btrace_thread_info::prev_segment.
5502 * record-btrace.c (record_btrace_frame_this_id): Use
5503 btrace_find_call_by_number.
5504
5505 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5506
5507 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5508 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5509 btrace_insn_next, btrace_insn_prev): Remove references to
5510 btrace_thread_info::flow.
5511 * btrace.h (struct btrace_function): Remove FLOW.
5512
5513 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5514
5515 * btrace.c (ftrace_find_call_by_number): New function.
5516 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5517 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5518 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5519 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5520 index.
5521 * btrace.h (struct btrace_function): Turn UP into an index.
5522 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5523 as an index.
5524 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5525 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5526 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5527
5528 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5529
5530 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5531 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5532 ftrace_update_function, ftrace_compute_global_level_offset,
5533 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5534 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5535 btrace_insn_end, btrace_is_empty): Remove references to
5536 btrace_thread_info::begin and btrace_thread_info::end.
5537 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5538 (struct btrace_thread_info) <functions>: Adjust comment.
5539 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5540 btrace_thread_info::begin.
5541
5542 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5543
5544 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5545 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5546 ftrace_update_function): Remove arguments that implicitly were always
5547 BTINFO->END.
5548 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5549 Don't pass BTINFO->END.
5550
5551 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5552
5553 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5554 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5555 btrace_find_insn_by_number): Replace function segment pointer with
5556 index.
5557 (btrace_insn_cmp): Simplify.
5558 * btrace.h: (struct btrace_insn_iterator) Rename index to
5559 insn_index. Replace function segment pointer with index into function
5560 segment vector.
5561 * record-btrace.c (record_btrace_call_history): Replace function
5562 segment pointer use with index.
5563 (record_btrace_frame_sniffer): Retrieve function call segment through
5564 vector.
5565 (record_btrace_set_replay): Remove defunc't safety check.
5566
5567 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5568
5569 * btrace.c (btrace_ends_with_single_insn): New function.
5570 (btrace_call_get, btrace_call_number, btrace_call_begin,
5571 btrace_call_end, btrace_call_next, btrace_call_prev,
5572 btrace_find_call_by_number): Use index into call segment vector
5573 instead of pointer.
5574 (btrace_call_cmp): Simplify.
5575 * btrace.h (struct btrace_call_iterator): Replace function call segment
5576 pointer with index into vector.
5577 * record-btrace.c (record_btrace_call_history): Use index instead of
5578 pointer.
5579
5580 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5581
5582 * btrace.c (btrace_insn_begin, btrace_insn_end,
5583 btrace_find_insn_by_number): Add btinfo to iterator.
5584 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5585
5586 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5587
5588 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5589 and save pointers directly.
5590 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5591 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5592 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5593 changed signature of functions.
5594 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5595 (btrace_fetch): Remove code that adds btrace_function pointers to
5596 vector of btrace_functions.
5597 (btrace_clear): Simplify freeing vector of btrace_functions.
5598
5599 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5600
5601 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5602 Replace VEC_* with std::vector functions.
5603 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5604 (struct btrace_thread_info)<functions>: Change type to std::vector.
5605
5606 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5607
5608 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5609 "Removed targets and native configurations" up. Merge duplicate
5610 "New commands" sub-sections. Add "New options" sub-sections.
5611
5612 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5613
5614 * defs.h (copy_integer_to_size): New declaration.
5615 * findvar.c (copy_integer_to_size): New function.
5616 (do_cint_test): New selftest function.
5617 (copy_integer_to_size_test): Likewise.
5618 (_initialize_findvar): Likewise.
5619 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5620 (mips_fbsd_collect_reg): Use raw_collect_integer.
5621 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5622 (mips64_fill_gregset): Use raw_collect_integer
5623 (mips64_fill_fpregset): Use raw_supply_integer.
5624 * regcache.c (regcache::raw_supply_integer): New function.
5625 (regcache::raw_collect_integer): Likewise.
5626 * regcache.h: (regcache::raw_supply_integer): New declaration.
5627 (regcache::raw_collect_integer): Likewise.
5628
5629 2017-05-24 Yao Qi <yao.qi@linaro.org>
5630
5631 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5632 (COMMON_OBS): Add gdbarch-selftests.o.
5633 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5634 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5635 * gdbarch-selftests.c: New file.
5636 * regcache.h (regcache) <~regcache>: Mark it virtual if
5637 GDB_SELF_TEST.
5638 <raw_write>: Likewise.
5639
5640 2017-05-24 Yao Qi <yao.qi@linaro.org>
5641
5642 * regcache.c (current_regcache): Change it to
5643 regcache::current_regcache.
5644 (regcache_observer_target_changed): Update.
5645 (regcache_thread_ptid_changed): Make it a regcache static
5646 method.
5647 (regcache_thread_ptid_changed): Update.
5648 (class regcache_access): New.
5649 (current_regcache_test): Update.
5650 (_initialize_regcache): Update.
5651 * regcache.h: Include forward_list.
5652 (regcache): Declare regcache_thread_ptid_changed and declare
5653 registers_changed_ptid as friend.
5654
5655 2017-05-24 Yao Qi <yao.qi@linaro.org>
5656
5657 * i387-tdep.c (i387_register_to_value): Use register_size
5658 instead of TYPE_LENGTH.
5659 * m68k-tdep.c (m68k_register_to_value): Likewise.
5660
5661 2017-05-24 Yao Qi <yao.qi@linaro.org>
5662
5663 * i387-tdep.c (i387_convert_register_p): Return false if type
5664 code isn't TYPE_CODE_FLT.
5665
5666 2017-05-24 Yao Qi <yao.qi@linaro.org>
5667
5668 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5669 length is 4.
5670 (alpha_register_to_value): Remove type length check.
5671 (alpha_value_to_register): Likewise.
5672
5673 2017-05-24 Yao Qi <yao.qi@linaro.org>
5674
5675 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5676 TYPE_CODE_FLT.
5677
5678 2017-05-24 Yao Qi <yao.qi@linaro.org>
5679
5680 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5681 TYPE_CODE_FLT or not.
5682
5683 2017-05-24 Yao Qi <yao.qi@linaro.org>
5684
5685 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5686 * avr-tdep.c (avr_gdbarch_init): Likewise.
5687 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5688 * cris-tdep.c (cris_gdbarch_init): Likewise.
5689 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5690 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5691 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5692 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5693 * mep-tdep.c (mep_gdbarch_init): Likewise.
5694 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5695 * mips-tdep.c (mips_gdbarch_init): Likewise.
5696 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5697 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5698 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5699 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5700 * v850-tdep.c (v850_gdbarch_init): Likewise.
5701
5702 2017-05-24 Yao Qi <yao.qi@linaro.org>
5703
5704 * selftest-arch.c (tests_with_arch): Call registers_changed
5705 and reinit_frame_cache.
5706 * selftest.c (run_self_tests): Likewise.
5707
5708 2017-05-24 Yao Qi <yao.qi@linaro.org>
5709
5710 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5711 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5712
5713 2017-05-24 Yao Qi <yao.qi@linaro.org>
5714
5715 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5716 set_gdbarch_print_insn.
5717
5718 2017-05-24 Yao Qi <yao.qi@linaro.org>
5719
5720 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5721 set_gdbarch_print_insn.
5722
5723 2017-05-24 Yao Qi <yao.qi@linaro.org>
5724
5725 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5726 set_gdbarch_print_insn.
5727 * arc-tdep.c (arc_gdbarch_init): Likewise.
5728 * arch-utils.c: include dis-asm.h.
5729 (default_print_insn): New function.
5730 * arch-utils.h (default_print_insn): Declare.
5731 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5732 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5733 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5734 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5735 * frv-tdep.c (frv_gdbarch_init): Likewise.
5736 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5737 * gdbarch.sh (print_insn): Use default_print_insn.
5738 * gdbarch.c: Regenerated.
5739 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5740 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5741 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5742 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5743 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5744 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5745 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5746 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5747 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5748 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5749 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5750 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5751 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5752 * mt-tdep.c (mt_gdbarch_init): Likewise.
5753 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5754 * nios2-tdep.c (nios2_print_insn): Remove.
5755 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5756 * rx-tdep.c (rx_gdbarch_init): Likewise.
5757 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5758 * score-tdep.c (score_print_insn): Remove.
5759 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5760 * sh-tdep.c (sh_gdbarch_init): Likewise.
5761 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5762 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5763 * tic6x-tdep.c (tic6x_print_insn): Remove.
5764 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5765 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5766 * v850-tdep.c (v850_gdbarch_init): Likewise.
5767 * vax-tdep.c (vax_gdbarch_init): Likewise.
5768 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5769 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5770
5771 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5772
5773 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5774 (MIPS_FP0_REGNUM): Remove.
5775 (MIPS_FSR_REGNUM): Remove.
5776 (mips_fbsd_supply_fpregs): Use mips_regnum.
5777 (mips_fbsd_supply_gregs): Likewise.
5778 (mips_fbsd_collect_fpregs): Likewise.
5779 (mips_fbsd_collect_gregs): Likewise.
5780
5781 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5782
5783 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5784 (getpfpregs_supplies): New function.
5785 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5786 getfpregs_supplies.
5787 (mips_fbsd_store_inferior_registers): Likewise.
5788
5789 2017-05-22 Pedro Alves <palves@redhat.com>
5790
5791 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5792 maintainer.
5793
5794 2017-05-22 Alan Hayward <alan.hayward@arm.com>
5795
5796 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5797 (store_register): Likewise.
5798 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5799 (get_decimal_float_return_value): Likewise.
5800 (do_ppc_sysv_return_value): Likewise.
5801 (ppc64_sysv_abi_push_integer): Likewise.
5802 (ppc64_sysv_abi_push_freg): Likewise.
5803 (ppc64_sysv_abi_return_value_base): Likewise.
5804 (ppc64_sysv_abi_return_value): Likewise.
5805 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5806 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5807 * rs6000-nat.c: Likewise.
5808 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5809 (rs6000_value_to_register): Likewise.
5810 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5811
5812 2017-05-21 Tom Tromey <tom@tromey.com>
5813
5814 PR rust/21466:
5815 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5816 arrays as "[T]", not "[T; ]".
5817
5818 2017-05-19 Tom Tromey <tom@tromey.com>
5819
5820 PR rust/21484:
5821 * rust-lang.c (exp_descriptor_rust): New function.
5822 (rust_language_defn): Use it.
5823 * p-lang.c (pascal_language_defn): Update.
5824 * opencl-lang.c (opencl_language_defn): Update.
5825 * objc-lang.c (objc_language_defn): Update.
5826 * m2-lang.c (m2_language_defn): Update.
5827 * language.h (struct language_defn)
5828 <la_watch_location_expression>: New member.
5829 * language.c (unknown_language_defn, auto_language_defn)
5830 (local_language_defn): Update.
5831 * go-lang.c (go_language_defn): Update.
5832 * f-lang.c (f_language_defn): Update.
5833 * d-lang.c (d_language_defn): Update.
5834 * c-lang.h (c_watch_location_expression): Declare.
5835 * c-lang.c (c_watch_location_expression): New function.
5836 (c_language_defn, cplus_language_defn, asm_language_defn)
5837 (minimal_language_defn): Use it.
5838 * breakpoint.c (watch_command_1): Call
5839 la_watch_location_expression.
5840 * ada-lang.c (ada_language_defn): Update.
5841
5842 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5843
5844 PR tui/21482
5845 * gdb_curses.h (NOMACROS): Define.
5846 (NCURSES_NOMACROS): Define.
5847
5848 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5849
5850 PR tui/21482
5851 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5852 arg to char *.
5853 * tui/tui-wingeneral.c (box_win): Likewise.
5854 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5855 (tui_show_source_line): Likewise.
5856 (tui_show_exec_info_content): Likewise.
5857
5858 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5859
5860 * sparc-tdep.c (sparc_structure_return_p)
5861 (sparc_arg_on_registers_p): New functions.
5862 (sparc32_store_arguments): Use them.
5863 * sparc64-tdep.c (sparc64_16_byte_align_p)
5864 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5865 Handle TYPE_CODE_ARRAY.
5866
5867 2017-05-17 Yao Qi <yao.qi@linaro.org>
5868
5869 * cli/cli-decode.c (add_alias_cmd): New function.
5870 * command.h (add_alias_cmd): Declare.
5871 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5872 instead call add_alias_cmd.
5873
5874 2017-05-17 Pedro Alves <palves@redhat.com>
5875
5876 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5877 (nat_makefile_frag): ... this. All references updated.
5878 * configure.ac: Likewise.
5879 * configure.nat: Likewise. Enhance comments.
5880 * configure: Regenerate.
5881
5882 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5883
5884 * procfs.c (procfs_create_inferior): Change prototype to match
5885 definition.
5886
5887 2017-05-13 Eli Zaretskii <eliz@gnu.org>
5888
5889 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5890 C++ compiler warning.
5891
5892 2017-05-12 Tom Tromey <tom@tromey.com>
5893
5894 PR rust/21483:
5895 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5896 recurse, just call value_struct_elt directly.
5897
5898 2017-05-12 Tom Tromey <tom@tromey.com>
5899
5900 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5901 OP_RUST_ARRAY>: Fix.
5902
5903 2017-05-12 Tom Tromey <tom@tromey.com>
5904
5905 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5906
5907 2017-05-09 Yao Qi <yao.qi@linaro.org>
5908
5909 * regcache.c: Include <forward_list>.
5910 (struct regcache_list): Remove.
5911 (current_regcache): Update.
5912 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5913 (regcache_thread_ptid_changed): Likewise.
5914 (registers_changed_ptid): Likewise.
5915 (current_regcache_size): Likewise.
5916
5917 2017-05-09 Yao Qi <yao.qi@linaro.org>
5918
5919 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5920 (current_regcache_size): New function.
5921 (current_regcache_test): New function.
5922 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5923
5924 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5925
5926 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5927 (print_gp_register_row): Use get_frame_register_value.
5928
5929 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5930
5931 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5932 (mips_supply_fpregset): Likewise.
5933 (mips64_supply_gregset): Likewise.
5934
5935 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5936
5937 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5938 regcache->raw_supply_zeroed.
5939
5940 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5941
5942 * configure.nat: Rearrange 'case' statements to match
5943 host before cpu.
5944
5945 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5946
5947 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5948 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5949 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5950 "@nat_extra_makefile_frag@".
5951 (Makefile): Remove dependency on "@frags@".
5952 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5953 (data-directory/Makefile): Likewise.
5954 * config/aarch64/linux.mh: Deleted; moved contents to
5955 "gdb/configure.nat".
5956 * config/alpha/alpha-linux.mh: Likewise.
5957 * config/alpha/nbsd.mh: Likewise.
5958 * config/arm/linux.mh: Likewise.
5959 * config/arm/nbsdelf.mh: Likewise.
5960 * config/i386/cygwin.mh: Likewise.
5961 * config/i386/cygwin64.mh: Likewise.
5962 * config/i386/darwin.mh: Likewise.
5963 * config/i386/fbsd.mh: Likewise.
5964 * config/i386/fbsd64.mh: Likewise.
5965 * config/i386/go32.mh: Likewise.
5966 * config/i386/i386gnu.mh: Likewise.
5967 * config/i386/i386sol2.mh: Likewise.
5968 * config/i386/linux.mh: Likewise.
5969 * config/i386/linux64.mh: Likewise.
5970 * config/i386/mingw.mh: Likewise.
5971 * config/i386/mingw64.mh: Likewise.
5972 * config/i386/nbsd64.mh: Likewise.
5973 * config/i386/nbsdelf.mh: Likewise.
5974 * config/i386/nto.mh: Likewise.
5975 * config/i386/obsd.mh: Likewise.
5976 * config/i386/obsd64.mh: Likewise.
5977 * config/i386/sol2-64.mh: Likewise.
5978 * config/ia64/linux.mh: Likewise.
5979 * config/m32r/linux.mh: Likewise.
5980 * config/m68k/linux.mh: Likewise.
5981 * config/m68k/nbsdelf.mh: Likewise.
5982 * config/m68k/obsd.mh: Likewise.
5983 * config/m88k/obsd.mh: Likewise.
5984 * config/mips/fbsd.mh: Likewise.
5985 * config/mips/linux.mh: Likewise.
5986 * config/mips/nbsd.mh: Likewise.
5987 * config/mips/obsd64.mh: Likewise.
5988 * config/pa/linux.mh: Likewise.
5989 * config/pa/nbsd.mh: Likewise.
5990 * config/pa/obsd.mh: Likewise.
5991 * config/powerpc/aix.mh: Likewise.
5992 * config/powerpc/fbsd.mh: Likewise.
5993 * config/powerpc/linux.mh: Likewise.
5994 * config/powerpc/nbsd.mh: Likewise.
5995 * config/powerpc/obsd.mh: Likewise.
5996 * config/powerpc/ppc64-linux.mh: Likewise.
5997 * config/powerpc/spu-linux.mh: Likewise.
5998 * config/s390/linux.mh: Likewise.
5999 * config/sh/nbsd.mh: Likewise.
6000 * config/sparc/fbsd.mh: Likewise.
6001 * config/sparc/linux.mh: Likewise.
6002 * config/sparc/linux64.mh: Likewise.
6003 * config/sparc/nbsd64.mh: Likewise.
6004 * config/sparc/nbsdelf.mh: Likewise.
6005 * config/sparc/obsd64.mh: Likewise.
6006 * config/sparc/sol2.mh: Likewise.
6007 * config/tilegx/linux.mh: Likewise.
6008 * config/vax/nbsdelf.mh: Likewise.
6009 * config/vax/obsd.mh: Likewise.
6010 * config/xtensa/linux.mh: Likewise.
6011 * config/i386/i386gnu.mn: New file, with excerpts from
6012 "config/i386/i386gnu.mh".
6013 * configure: Regenerate.
6014 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6015 *.mh files under "gdb/config".
6016 * configure.nat: New file, with contents from the
6017 "gdb/config/*/*.mh" files.
6018
6019 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6020
6021 * btrace.c (btrace_clear): Free insn vector.
6022
6023 2017-05-05 Pedro Alves <palves@redhat.com>
6024
6025 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6026 * configure: Regenerate.
6027
6028 2017-05-04 Pedro Alves <palves@redhat.com>
6029
6030 * Makefile.in (SFILES): Add progspace-and-thread.c.
6031 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6032 (COMMON_OBS): Add progspace-and-thread.o.
6033 * breakpoint.c: Include "progspace-and-thread.h".
6034 (update_inserted_breakpoint_locations)
6035 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6036 Use scoped_restore_current_pspace_and_thread.
6037 (create_std_terminate_master_breakpoint): Use
6038 scoped_restore_current_program_space.
6039 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6040 (print_breakpoint_location): Use
6041 scoped_restore_current_program_space.
6042 (bp_loc_is_permanent): Use
6043 scoped_restore_current_pspace_and_thread.
6044 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6045 (download_tracepoint_locations): Use
6046 scoped_restore_current_pspace_and_thread.
6047 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6048 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6049 (enum step_over_calls_kind): Moved from inferior.h.
6050 (class scoped_restore_current_thread): New class.
6051 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6052 declaration.
6053 (scoped_restore_current_thread): New class.
6054 * infcmd.c: Include "common/gdb_optional.h".
6055 (continue_1, proceed_after_attach): Use
6056 scoped_restore_current_thread.
6057 (notice_new_inferior): Use scoped_restore_current_thread.
6058 * inferior.c: Include "progspace-and-thread.h".
6059 (restore_inferior, save_current_inferior): Delete.
6060 (add_inferior_command, clone_inferior_command): Use
6061 scoped_restore_current_pspace_and_thread.
6062 * inferior.h (scoped_restore_current_inferior): New class.
6063 * infrun.c: Include "progspace-and-thread.h" and
6064 "common/gdb_optional.h".
6065 (follow_fork_inferior): Use
6066 scoped_restore_current_pspace_and_thread.
6067 (scoped_restore_exited_inferior): New class.
6068 (handle_vfork_child_exec_or_exit): Use
6069 scoped_restore_exited_inferior,
6070 scoped_restore_current_pspace_and_thread,
6071 scoped_restore_current_thread and scoped_restore.
6072 (fetch_inferior_event): Use scoped_restore_current_thread.
6073 * linespec.c (decode_line_full, decode_line_1): Use
6074 scoped_restore_current_program_space.
6075 * mi/mi-main.c: Include "progspace-and-thread.h".
6076 (exec_continue): Use scoped_restore_current_thread.
6077 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6078 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6079 * proc-service.c (ps_pglobal_lookup): Use
6080 scoped_restore_current_program_space.
6081 * progspace-and-thread.c: New file.
6082 * progspace-and-thread.h: New file.
6083 * progspace.c (release_program_space, clone_program_space): Use
6084 scoped_restore_current_program_space.
6085 (restore_program_space, save_current_program_space)
6086 (save_current_space_and_thread): Delete.
6087 (switch_to_program_space_and_thread): Moved to
6088 progspace-and-thread.c.
6089 * progspace.h (save_current_program_space)
6090 (save_current_space_and_thread): Delete declarations.
6091 (scoped_restore_current_program_space): New class.
6092 * remote.c (remote_btrace_maybe_reopen): Use
6093 scoped_restore_current_thread.
6094 * symtab.c: Include "progspace-and-thread.h".
6095 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6096 * thread.c (print_thread_info_1): Use
6097 scoped_restore_current_thread.
6098 (struct current_thread_cleanup): Delete.
6099 (do_restore_current_thread_cleanup)
6100 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6101 (scoped_restore_current_thread::~scoped_restore_current_thread):
6102 ... this new dtor.
6103 (make_cleanup_restore_current_thread): Rename/convert to ...
6104 (scoped_restore_current_thread::scoped_restore_current_thread):
6105 ... this new ctor.
6106 (thread_apply_all_command): Use scoped_restore_current_thread.
6107 (thread_apply_command): Use scoped_restore_current_thread.
6108 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6109 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6110
6111 2017-05-04 Pedro Alves <palves@redhat.com>
6112
6113 * thread.c (make_cleanup_restore_current_thread): Move
6114 find_thread_ptid call before the is_stopped call. Assert that the
6115 thread is found. Replace is_stopped call by checking the thread's
6116 state directly. Remove unnecessary NULL-thread check.
6117
6118 2017-05-04 Pedro Alves <palves@redhat.com>
6119
6120 * corelow.c (thread_section_name): New class.
6121 (get_core_register_section, get_core_siginfo): Use it.
6122
6123 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6124
6125 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6126 (get_core_register_section): Remove xfree of NULL pointer.
6127
6128 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6129
6130 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6131 * regcache.c (regcache::raw_supply_zeroed): New function.
6132 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6133
6134 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6135
6136 * gdbarch.sh: Remove commented out definition of
6137 TARGET_CHAR_BIT.
6138 * gdbarch.h: Re-generate.
6139
6140 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6141
6142 * configure: Regenerate.
6143
6144 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6145
6146 * solib-target.c (solib_target_relocate_section_addresses):
6147 Remove num_section_bases, num_bases, segment_bases variables.
6148
6149 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6150
6151 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6152
6153 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6154
6155 * solib-target.c: Include <vector>
6156 (struct lm_info_target) <~lm_info_target>: Remove.
6157 <segment_bases, section_bases>: Change type to
6158 std::vector<CORE_ADDR>.
6159 (library_list_start_segment, library_list_start_section,
6160 library_list_end_library,
6161 solib_target_relocate_section_addresses): Adjust.
6162
6163 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6164
6165 * gdbarch.sh (software_single_step): Change return type to
6166 std::vector<CORE_ADDR>.
6167 * gdbarch.c, gdbarch.h: Re-generate.
6168 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6169 Adjust.
6170 (arm_deal_with_atomic_sequence_raw): Adjust.
6171 (thumb_get_next_pcs_raw): Adjust.
6172 (arm_get_next_pcs_raw): Adjust.
6173 (arm_get_next_pcs): Adjust.
6174 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6175 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6176 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6177 (alpha_software_single_step): Adjust.
6178 * alpha-tdep.h (alpha_software_single_step): Adjust.
6179 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6180 * arm-tdep.c (arm_software_single_step): Adjust.
6181 (arm_breakpoint_kind_from_current_state): Adjust.
6182 * arm-tdep.h (arm_software_single_step): Adjust.
6183 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6184 * cris-tdep.c (cris_software_single_step): Adjust.
6185 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6186 (micromips_deal_with_atomic_sequence): Adjust.
6187 (deal_with_atomic_sequence): Adjust.
6188 (mips_software_single_step): Adjust.
6189 * mips-tdep.h (mips_software_single_step): Adjust.
6190 * moxie-tdep.c (moxie_software_single_step): Adjust.
6191 * nios2-tdep.c (nios2_software_single_step): Adjust.
6192 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6193 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6194 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6195 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6196 * sparc-tdep.c (sparc_software_single_step): Adjust.
6197 * spu-tdep.c (spu_software_single_step): Adjust.
6198 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6199
6200 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6201
6202 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6203 * gdbarch.h: Re-generate.
6204
6205 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6206
6207 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6208 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6209 * python/py-instruction.c, python/py-instruction.h: New file.
6210 * python/py-record.c: Add py-instruction.h include.
6211 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6212 gdb.RecordInstruction.
6213 * python/python-internal.h: Add gdbpy_initialize_instruction
6214 declaration.
6215 * python/python.c (do_start_initialization): Add
6216 gdbpy_initialize_instruction.
6217
6218 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6219
6220 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6221 Remove.
6222 (btrace_func_from_recpy_func): New function.
6223 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6224 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6225 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6226 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6227 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6228 Also, use new helper functions.
6229 (btpy_list_item): Use new helper functions.
6230 (recpy_bt_function_call_history): Use new type name.
6231 (btpy_call_getset): Remove.
6232 (gdbpy_initialize_btrace): Remove code to initialize
6233 gdb.BtraceFunctionCall.
6234 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6235 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6236 recpy_bt_func_prev, recpy_bt_func_next): New export.
6237 * python/py-record.c (recpy_func_type): New static object.
6238 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6239 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6240 recpy_func_next): New function.
6241 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6242 (recpy_func_getset): New static object.
6243 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6244 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6245
6246 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6247
6248 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6249 (btpy_object, btpy_insn_type, btpy_new): Remove.
6250 (btpy_list_object): Use gdb.RecordInstruction type instead of
6251 gdb.BtraceInstruction type.
6252 (btrace_insn_from_recpy_insn): New function.
6253 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6254 btpy_new.
6255 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6256 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6257 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6258 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6259 instead of btpy_object.
6260 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6261 btpy_insn_data, btpy_insn_decode): Rename to ...
6262 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6263 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6264 recpy_bt_insn_decode): This. Also, use new helper functions.
6265 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6266 recpy_insn_type.
6267 (btpy_insn_getset): Remove.
6268 (gdbpy_initialize_btrace): Remove code to initialize
6269 gdb.BtraceInstruction. Use recpy_element_object.
6270 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6271 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6272 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6273 * python/py-record.c (recpy_insn_type): New static object.
6274 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6275 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6276 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6277 New function.
6278 (recpy_insn_getset): New static object.
6279 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6280 * python/py-record.h (recpy_element_object): New typedef.
6281 (recpy_insn_type, recpy_insn_new): New export.
6282
6283 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6284
6285 * py-record-btrace.c (btpy_insn_new): Removed.
6286 (btpy_insn_or_gap_new): New function.
6287 (btpy_insn_error): Removed.
6288 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6289 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6290 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6291 btpy_insn_or_gap_new instead of btpy_insn_new.
6292 (btpy_insn_getset): Remove btpy_insn_error.
6293 * py-record.c (recpy_gap_type): New static object.
6294 (recpy_gap_object): New typedef.
6295 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6296 recpy_gap_reason_string): New function.
6297 (recpy_gap_getset): New static object.
6298 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6299 * py-record.h (recpy_gap_new): New export.
6300
6301 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6302
6303 * python/py-record.c (recpy_ptid): Remove.
6304 (recpy_record_getset): Remove recpy_ptid.
6305
6306 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6307
6308 * btrace.c (btrace_fetch): Set inferior_ptid.
6309 * python/py-record-btrace.c: Add "py-record.h" include.
6310 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6311 recpy_bt_end, recpy_bt_instruction_history,
6312 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6313 in gdb.Record object instead of current ptid.
6314 * python/py-record.c: Include new "py-record.h" file.
6315 (recpy_record_object): Moved to py-record.h.
6316 * python/py-record.h: New file.
6317
6318 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6319
6320 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6321 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6322 indentation.
6323
6324 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6325
6326 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6327 the past maintainers section.
6328
6329 2017-04-28 Yao Qi <yao.qi@linaro.org>
6330
6331 * infcmd.c (get_return_value): Use regcache ctor, and remove
6332 cleanup.
6333
6334 2017-04-28 Yao Qi <yao.qi@linaro.org>
6335 Pedro Alves <palves@redhat.com>
6336
6337 * regcache.c (regcache::regcache): New tag dispatch ctor.
6338 (do_cooked_read): Moved above.
6339 (regcache_dup): Use the tag dispatch ctor..
6340 * regcache.h (regcache): Declare ctor, delete copy ctor and
6341 assignment operator, remove friend regcache_dup.
6342
6343 2017-04-28 Yao Qi <yao.qi@linaro.org>
6344
6345 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6346 call method save instead of regcache_cpy.
6347 * regcache.h (struct regcache): Make regcache_dup a friend.
6348
6349 2017-04-28 Yao Qi <yao.qi@linaro.org>
6350
6351 * regcache.c (struct regcache): Move to regcache.h
6352 (regcache::arch): New method.
6353 (regcache_get_ptid): Update.
6354 (get_regcache_arch): Call arch method.
6355 (get_regcache_aspace): Call method aspace.
6356 (register_buffer): Change it to method.
6357 (regcache_save): Change it to regcache::save.
6358 (regcache_restore): Likewise.
6359 (regcache_cpy_no_passthrough): Remove the declaration.
6360 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6361 (regcache_cpy_no_passthrough): Change it to method
6362 cpy_no_passthrough.
6363 (regcache_register_status): Change it to method
6364 get_register_status.
6365 (regcache_invalidate): Change it to method invalidate.
6366 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6367 (regcache_raw_update): Change it to method raw_update.
6368 (regcache_raw_read): Likewise.
6369 (regcache_raw_read_signed): Likewise.
6370 (regcache_raw_read_unsigned): Likewise.
6371 (regcache_raw_write_signed): Likewise.
6372 (regcache_raw_write_unsigned): Likewise.
6373 (regcache_cooked_read): Likewise.
6374 (regcache_cooked_read_value): Likewise.
6375 (regcache_cooked_read_signed): Likewise.
6376 (regcache_cooked_read_unsigned): Likewise.
6377 (regcache_cooked_write_signed): Likewise.
6378 (regcache_cooked_write_unsigned): Likewise.
6379 (regcache_raw_set_cached_value): Likewise.
6380 (regcache_raw_write): Likewise.
6381 (regcache_cooked_write): Likewise.
6382 (regcache_xfer_part): Likewise.
6383 (regcache_raw_read_part): Likewise.
6384 (regcache_raw_write_part): Likewise.
6385 (regcache_cooked_read_part): Likewise.
6386 (regcache_cooked_write_part): Likewise.
6387 (regcache_raw_supply): Likewise.
6388 (regcache_raw_collect): Likewise.
6389 (regcache_transfer_regset): Likewise.
6390 (regcache_supply_regset): Likewise.
6391 (regcache_collect_regset): Likewise.
6392 (regcache_debug_print_register): Likewise.
6393 (enum regcache_dump_what): Move it to regcache.h.
6394 (regcache_dump): Change it to method dump.
6395 * regcache.h (enum regcache_dump_what): New.
6396 (class regcache): New.
6397 * target.c (target_fetch_registers): Call method
6398 debug_print_register.
6399 (target_store_registers): Likewise.
6400
6401 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6402
6403 * windows-nat.c (struct lm_info_windows): Initialize field.
6404 (windows_make_so): Allocate lm_info_windows with new.
6405 (windows_free_so): Free lm_info_windows with delete.
6406
6407 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6408
6409 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6410 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6411 cleanup.
6412 (darwin_free_so): Free lm_info_darwin with delete.
6413
6414 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6415
6416 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6417 <l_addr_p>: Change type to bool.
6418 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6419 (svr4_free_so): Free lm_info_svr4 with delete.
6420 (svr4_copy_library_list): Replace memcpy with call to copy
6421 constructor.
6422 (library_list_start_library, svr4_default_sos): Allocate
6423 lm_info_svr4 with new.
6424
6425 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6426
6427 * solib-target.c (struct lm_info_target): Add destructor,
6428 initialize fields.
6429 <name>: Change type to std::string.
6430 (library_list_start_library): Allocate lm_info_target with new.
6431 (solib_target_free_library_list): Free lm_info_target with
6432 delete.
6433 (solib_target_current_sos): Adapt to std::string.
6434 (solib_target_free_so): Free lm_info_target with delete.
6435
6436 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6437
6438 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6439 fields.
6440 (frv_current_sos): Allocate lm_info_frv with new.
6441 (frv_relocate_main_executable): Free lm_info_frv with delete,
6442 allocate with new.
6443 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6444
6445 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * solib-frv.c (struct lm_info_frv): Fix indentation.
6448
6449 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6450
6451 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6452 map field.
6453 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6454 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6455 and allocate with new.
6456 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6457
6458 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6459
6460 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6461 <filename, member_name>: Change type to std::string.
6462 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6463 (library_list_start_library): Allocate lm_info_aix with new.
6464 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6465 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6466 with copy constructor.
6467
6468 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6469
6470 * solist.h (struct lm_info): Remove.
6471 (struct lm_info_base): New class.
6472 (struct so_list) <lm_info>: Change type to lm_info_base *.
6473 * nto-tdep.c (struct lm_info): Remove.
6474 (lm_addr): Adjust.
6475 * solib-aix.c (struct lm_info): Rename to ...
6476 (struct lm_info_aix): ... this. Extend lm_info_base.
6477 (lm_info_p): Rename to ...
6478 (lm_info_aix_p): ... this, and adjust.
6479 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6480 solib_aix_parse_libraries, library_list_start_library,
6481 solib_aix_free_library_list, solib_aix_parse_libraries,
6482 solib_aix_get_library_list,
6483 solib_aix_relocate_section_addresses, solib_aix_free_so,
6484 solib_aix_get_section_offsets,
6485 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6486 Adjust.
6487 (struct solib_aix_inferior_data) <library_list>: Adjust.
6488 * solib-darwin.c (struct lm_info): Rename to ...
6489 (struct lm_info_darwin): ... this. Extend lm_info_base.
6490 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6491 * solib-dsbt.c (struct lm_info): Rename to ...
6492 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6493 (struct dsbt_info) <main_executable_lm_info): Adjust.
6494 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6495 dsbt_relocate_section_addresses): Adjust.
6496 * solib-frv.c (struct lm_info): Rename to ...
6497 (struct lm_info_frv): ... this. Extend lm_info_base.
6498 (main_executable_lm_info): Adjust.
6499 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6500 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6501 find_canonical_descriptor_in_load_object,
6502 frv_fdpic_find_canonical_descriptor): Adjust.
6503 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6504 to lm_info_svr4.
6505 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6506 svr4_clear_so, svr4_copy_library_list,
6507 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6508 svr4_current_sos, svr4_fetch_objfile_link_map,
6509 solist_update_incremental): Adjust.
6510 * solib-svr4.h (struct lm_info_svr4): Move here from
6511 solib-svr4.c.
6512 * solib-target.c (struct lm_info): Rename to ...
6513 (struct lm_info_target): ... this. Extend lm_info_base.
6514 (lm_info_p): Rename to ...
6515 (lm_info_target_p): ... this.
6516 (solib_target_parse_libraries, library_list_start_segment,
6517 library_list_start_section, library_list_start_library,
6518 library_list_end_library, solib_target_free_library_list,
6519 solib_target_current_sos, solib_target_free_so,
6520 solib_target_relocate_section_addresses): Adjust.
6521 * windows-nat.c (struct lm_info): Rename to ...
6522 (struct lm_info_windows): ... this. Extend lm_info_base.
6523 (windows_make_so, handle_load_dll, handle_unload_dll,
6524 windows_xfer_shared_libraries): Adjust.
6525
6526 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6527
6528 * solib-darwin.c (struct darwin_so_list): Remove.
6529 (darwin_current_sos): Allocate an so_list object instead of a
6530 darwin_so_list, separately allocate an lm_info object.
6531 (darwin_free_so): Free lm_info.
6532
6533 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6534
6535 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6536 with fprintf_filtered.
6537
6538 2017-04-28 Yao Qi <yao.qi@linaro.org>
6539
6540 * regcache.c (regcache::regcache): New function.
6541 (regcache::~regcache): New function.
6542 (regcache_xmalloc_1): Remove.
6543 (regcache_xmalloc): Call new regcache.
6544 (regcache_xfree): Call delete regcache.
6545 (get_thread_arch_aspace_regcache): Call new regcache.
6546
6547 2017-04-28 Yao Qi <yao.qi@linaro.org>
6548
6549 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6550 lwp instead of ptid_get_lwp.
6551
6552 2017-04-28 Yao Qi <yao.qi@linaro.org>
6553
6554 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6555 lwp_info instead of getting from inferior_ptid.
6556
6557 2017-04-27 Keith Seitz <keiths@redhat.com>
6558
6559 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6560 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6561 (CV_CONVERSION_BADNESS): Define.
6562 (rank_one_type): Remove overly restrictive rvalue reference
6563 rank checks.
6564 Add cv-qualifier checks and subranks for type equality.
6565 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6566 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6567 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6568
6569 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6570
6571 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6572 count when creating the object.
6573
6574 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6575 Ulrich Weigand <uweigand@de.ibm.com>
6576
6577 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6578 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6579 is used in AIX.
6580 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6581 (process_xcoff_symbol): Likewise.
6582 (scan_xcoff_symtab): Likewise.
6583
6584 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6585
6586 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6587 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6588 (ia64_access_reg): Use get_frame_register_unsigned.
6589 (ia64_access_rse_reg): Likewise.
6590 (ia64_libunwind_frame_prev_register): Likewise.
6591
6592 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6593
6594 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6595 * gdbarch.c: Regenerated.
6596 * gdbarch.h: Regenerated.
6597 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6598 visibility external.
6599 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6600 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6601 (enum cfa_how_kind): Move to ...
6602 (struct dwarf2_frame_state_reg_info): Likewise.
6603 (struct dwarf2_frame_state): Likewise.
6604 * dwarf2-frame.h: ... here.
6605 (dwarf2_frame_state_alloc_regs): New declaration.
6606 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6607 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6608
6609 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6610
6611 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6612 regcache_raw_read_unsigned.
6613 (xtensa_pseudo_register_write): Likewise.
6614
6615 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6616
6617 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6618 (nds32_pseudo_register_write): Likewise.
6619
6620 2017-04-25 Yao Qi <yao.qi@linaro.org>
6621
6622 * regcache.c (struct regcache) <readonly_p>: Change its type
6623 to bool.
6624 (regcache_xmalloc_1): Update parameter type and callers update.
6625
6626 2017-04-25 Yao Qi <yao.qi@linaro.org>
6627
6628 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6629 set_gdbarch_wchar_bit.
6630 * arm-tdep.c (arm_gdbarch_init): Likewise.
6631
6632 2017-04-25 Pedro Alves <palves@redhat.com>
6633
6634 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6635 (BothAreRelocatable, memcopy, memmove): Don't define.
6636 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6637 macros.
6638
6639 2017-04-25 Pedro Alves <palves@redhat.com>
6640
6641 * common/common-defs.h: Include "common/poison.h".
6642 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6643 and adjust.
6644 * common/poison.h: New file.
6645 * common/traits.h: Include <type_traits>.
6646 (Not, Or, Requires): New, moved from common/function-view.h.
6647
6648 2017-04-25 Pedro Alves <palves@redhat.com>
6649
6650 * breakpoint.h (struct breakpoint): In-class initialize all
6651 fields. Make boolean fields "bool".
6652 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6653 memset call and initializations no longer necessary.
6654
6655 2017-04-25 Pedro Alves <palves@redhat.com>
6656
6657 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6658 reference.
6659 (pt_btrace_insn): New function.
6660 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6661
6662 2017-04-25 Pedro Alves <palves@redhat.com>
6663
6664 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6665 "base" field and inherit from "bp_location" instead. Add
6666 non-default ctor.
6667 (allocate_location_exception): Use new non-default ctor.
6668 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6669 (init_bp_location): Convert to ...
6670 (bp_location::bp_location): ... this new ctor, and remove memset
6671 call.
6672 (base_breakpoint_allocate_location): Use the new non-default ctor.
6673 * breakpoint.h (bp_location): Now a class. Declare default and
6674 non-default ctors. In-class initialize all members.
6675 (init_bp_location): Remove declaration.
6676
6677 2017-04-25 Pedro Alves <palves@redhat.com>
6678
6679 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6680 assignment operator.
6681
6682 2017-04-24 Yao Qi <yao.qi@linaro.org>
6683
6684 * doublest.c (convert_doublest_to_floatformat): Call
6685 floatformat_totalsize_bytes.
6686
6687 2017-04-22 Tom Tromey <tom@tromey.com>
6688
6689 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6690 ui_out_emit_list.
6691 * stack.c (print_frame): Use ui_out_emit_list.
6692 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6693 ui_out_emit_list.
6694 * mi/mi-main.c (print_one_inferior)
6695 (mi_cmd_data_list_register_names)
6696 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6697 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6698 ui_out_emit_list.
6699 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6700 (mi_output_solib_attribs): Use ui_out_emit_list,
6701 ui_out_emit_tuple.
6702 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6703 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6704 (mi_cmd_stack_list_args, list_args_or_locals): Use
6705 ui_out_emit_list.
6706 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6707 * breakpoint.c (print_solib_event, output_thread_groups): Use
6708 ui_out_emit_list.
6709
6710 2017-04-22 Tom Tromey <tom@tromey.com>
6711
6712 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6713 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6714 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6715
6716 2017-04-22 Tom Tromey <tom@tromey.com>
6717
6718 * tracepoint.c (tvariables_info_1)
6719 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6720
6721 2017-04-22 Tom Tromey <tom@tromey.com>
6722
6723 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6724 annotate_arg_emitter.
6725 * breakpoint.c (print_mention_watchpoint)
6726 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6727 * annotate.h (struct annotate_arg_emitter): New.
6728
6729 2017-04-22 Tom Tromey <tom@tromey.com>
6730
6731 * record-btrace.c (record_btrace_insn_history)
6732 (record_btrace_insn_history_range, record_btrace_call_history)
6733 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6734 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6735 ui_out_emit_tuple.
6736 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6737 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6738 * skip.c (skip_info): Use ui_out_emit_tuple.
6739 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6740 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6741 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6742 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6743 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6744 ui_out_emit_tuple.
6745 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6746 (output_register, mi_cmd_data_read_memory)
6747 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6748 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6749 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6750 Use ui_out_emit_tuple.
6751 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6752 ui_out_emit_tuple.
6753 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6754 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6755 * linux-thread-db.c (info_auto_load_libthread_db): Use
6756 ui_out_emit_tuple.
6757 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6758 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6759 * disasm.c (do_mixed_source_and_assembly_deprecated)
6760 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6761 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6762 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6763 * breakpoint.c (print_one_breakpoint_location)
6764 (print_one_breakpoint): Use ui_out_emit_tuple.
6765 * auto-load.c (print_script, info_auto_load_cmd): Use
6766 ui_out_emit_tuple.
6767 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6768
6769 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6770
6771 * thread.c (print_thread_info_1): Remove dead code.
6772
6773 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6774
6775 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6776 GDB_SELF_TEST.
6777 * arm-tdep.c (selftests::arm_record_test): Likewise.
6778
6779 2017-04-21 Yao Qi <yao.qi@linaro.org>
6780
6781 * regcache.c (regcache_restore): Remove argument 2. Replace
6782 argument 3 with regcache. Get register status from
6783 src->register_status and get register contents from
6784 register_buffer (src, regnum).
6785 (regcache_cpy): Update.
6786
6787 2017-04-19 Pedro Alves <palves@redhat.com>
6788
6789 * gdbthread.h (thread): Add missing closing parenthesis in
6790 comment.
6791
6792 2017-04-19 Pedro Alves <palves@redhat.com>
6793
6794 * common/refcounted-object.h: New file.
6795 * gdbthread.h: Include "common/refcounted-object.h".
6796 (thread_info): Inherit from refcounted_object and add comments.
6797 (thread_info::incref, thread_info::decref)
6798 (thread_info::m_refcount): Delete.
6799 (thread_info::deletable): Use the refcounted_object::refcount()
6800 method.
6801 * inferior.c (current_inferior_): Add comment.
6802 (set_current_inferior): Increment/decrement refcounts.
6803 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6804 not-deletable instead of comparing with the current inferior.
6805 (initialize_inferiors): Increment the initial inferior's refcount.
6806 * inferior.h (struct inferior): Forward declare.
6807 Include "common/refcounted-object.h".
6808 (current_inferior, set_current_inferior): Move declaration to
6809 before struct inferior's definition, and fix comment.
6810 (inferior): Inherit from refcounted_object. Add comments.
6811 * thread.c (switch_to_thread_no_regs): Reference the thread's
6812 inferior pointer directly instead of doing a ptid lookup.
6813 (switch_to_no_thread): New function.
6814 (switch_to_thread(thread_info *)): New function, factored out
6815 from ...
6816 (switch_to_thread(ptid_t)): ... this.
6817 (restore_current_thread): Delete.
6818 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6819 fields, and add 'inf' field.
6820 (do_restore_current_thread_cleanup): Check whether old->inf is
6821 alive instead of looking up an inferior by ptid. Use
6822 switch_to_thread and switch_to_no_thread.
6823 (restore_current_thread_cleanup_dtor): Use old->inf directly
6824 instead of lookup up an inferior by id. Decref the inferior.
6825 Don't restore 'removable'.
6826 (make_cleanup_restore_current_thread): Same the inferior pointer
6827 in old, instead of the inferior number. Incref the inferior.
6828 Don't save/clear 'removable'.
6829
6830 2017-04-19 Pedro Alves <palves@redhat.com>
6831
6832 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6833 unittests/scoped_restore-selftests.c.
6834 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6835 * common/scoped_restore.h (scoped_restore_base): Make "class".
6836 (scoped_restore_base::release): New public method.
6837 (scoped_restore_base::scoped_restore_base): New protected ctor.
6838 (scoped_restore_base::m_saved_var): New protected field.
6839 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6840 scoped_restore_base base class instead of m_saved_var directly.
6841 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6842 (scoped_restore_tmpl::scoped_restore_tmpl(const
6843 scoped_restore_tmpl<T>&)): Likewise.
6844 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6845 method.
6846 (scoped_restore_tmpl::saved_var): New method.
6847 (scoped_restore_tmpl::m_saved_var): Delete.
6848 * inferior.h (inferior::detaching): Now a bool.
6849 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6850 cleanup.
6851 * unittests/scoped_restore-selftests.c: New file.
6852
6853 2017-04-19 Pedro Alves <palves@redhat.com>
6854
6855 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6856 Re-sort in alphabetic order.
6857
6858 2017-04-18 Pedro Alves <palves@redhat.com>
6859
6860 * xml-support.c (obstack_xml_printf): Delete.
6861 * xml-support.h (obstack_xml_printf): Delete.
6862
6863 2017-04-18 Pedro Alves <palves@redhat.com>
6864
6865 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6866 vdebug, verror, body_text, start_element, end_element, name,
6867 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6868 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6869 is_xinclude>: Make private and add m_ prefix.
6870 (gdb_xml_parser::body_text): New method, based on ...
6871 (gdb_xml_body_text): ... this. Adjust.
6872 (gdb_xml_parser::vdebug): New method, based on ...
6873 (gdb_xml_debug): ... this. Adjust.
6874 (gdb_xml_parser::verror): New method, based on ...
6875 (gdb_xml_error): ... this. Adjust.
6876 (gdb_xml_parser::start_element): New method, based on ...
6877 (gdb_xml_start_element): ... this. Adjust.
6878 (gdb_xml_start_element_wrapper): Defer to
6879 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6880 (gdb_xml_parser::end_element): New method, based on ...
6881 (gdb_xml_end_element_wrapper): ... this. Adjust.
6882 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6883 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6884 (gdb_xml_parser::use_dtd): New method, based on ...
6885 (gdb_xml_use_dtd): ... this. Adjust.
6886 (gdb_xml_parser::parse): New method, based on ...
6887 (gdb_xml_parse): ... this. Adjust.
6888 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6889 (xinclude_start_include): Adjust to call the parser's name method.
6890 (xml_xinclude_default, xml_xinclude_start_doctype)
6891 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6892 method.
6893 (xml_process_xincludes): Adjust to call parser methods.
6894 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6895 declarations.
6896
6897 2017-04-18 Pedro Alves <palves@redhat.com>
6898
6899 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6900 gdb::optional<std::string>.
6901 * xml-support.c: Include <string>.
6902 (scope_level::scope_level(scope_level &&))
6903 (scope_level::~scope_level): Delete.
6904 (scope_level::body): Now a std::string.
6905 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6906 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6907 parameter.
6908 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6909 (xinclude_parsing_data::output): Now a std::string reference.
6910 (xinclude_start_include): Adjust.
6911 (xml_xinclude_default): Adjust.
6912 (xml_process_xincludes): Add 'output' parameter, and return bool.
6913 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6914 and return bool.
6915 * xml-tdesc.c: Include <unordered_map> and <string>.
6916 (tdesc_xml_cache): Delete.
6917 (tdesc_xml_cache_s): Delete.
6918 (xml_cache): Now an std::unordered_map.
6919 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6920 (target_fetch_description_xml): Change return type to
6921 gdb::optional<std::string>, and adjust.
6922 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6923 (target_fetch_description_xml): Change return type to
6924 gdb::optional<std::string>.
6925
6926 2017-04-18 Pedro Alves <palves@redhat.com>
6927
6928 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6929 unittests/optional-selftests.c.
6930 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6931 * unittests/optional-selftests.c: New file.
6932 * unittests/optional/assignment/1.cc: New file.
6933 * unittests/optional/assignment/2.cc: New file.
6934 * unittests/optional/assignment/3.cc: New file.
6935 * unittests/optional/assignment/4.cc: New file.
6936 * unittests/optional/assignment/5.cc: New file.
6937 * unittests/optional/assignment/6.cc: New file.
6938 * unittests/optional/assignment/7.cc: New file.
6939 * unittests/optional/cons/copy.cc: New file.
6940 * unittests/optional/cons/default.cc: New file.
6941 * unittests/optional/cons/move.cc: New file.
6942 * unittests/optional/cons/value.cc: New file.
6943 * unittests/optional/in_place.cc: New file.
6944 * unittests/optional/observers/1.cc: New file.
6945 * unittests/optional/observers/2.cc: New file.
6946
6947 2017-04-18 Pedro Alves <palves@redhat.com>
6948
6949 * common/gdb_optional.h: Include common/traits.h.
6950 (in_place_t): New type.
6951 (in_place): New constexpr variable.
6952 (optional::optional): Remove member initialization of
6953 m_instantiated.
6954 (optional::optional(in_place_t...)): New constructor.
6955 (optional::~optional): Use reset.
6956 (optional::optional(const optional&)): New.
6957 (optional::optional(const optional&&)): New.
6958 (optional::optional(T &)): New.
6959 (optional::optional(T &&)): New.
6960 (operator::operator=(const optional &)): New.
6961 (operator::operator=(optional &&)): New.
6962 (operator::operator= (const T &))
6963 (operator::operator= (T &&))
6964 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6965 (operator::reset): New.
6966 (operator::m_instantiated):: Add in-class initializer.
6967 * common/traits.h: Include <type_traits>.
6968 (struct And): New types.
6969
6970 2017-04-18 Pedro Alves <palves@redhat.com>
6971
6972 * xml-support.c: Include <vector>.
6973 (scope_level::scope_level(const gdb_xml_element *))
6974 (scope_level::scope_level(scope_level&&)): New.
6975 (scope_level::~scope_level): New.
6976 (scope_level_s): Delete.
6977 (gdb_xml_parser::scopes): Now a std::vector.
6978 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6979 Use std::vector.
6980 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6981 scope cleanup code.
6982 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6983 of the scopes member. Use std::vector::emplace_back.
6984
6985 2017-04-18 Pedro Alves <palves@redhat.com>
6986
6987 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6988 a bool.
6989 (gdb_xml_end_element): Change type of first parameter.
6990 (gdb_xml_cleanup): Rename to ...
6991 (gdb_xml_parser::~gdb_xml_parser): ... this.
6992 (gdb_xml_create_parser_and_cleanup): Delete with ...
6993 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6994 to this new ctor.
6995 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6996 using gdb_xml_create_parser_and_cleanup.
6997 (xinclude_parsing_data): Add ctor/dtor.
6998 (xml_xinclude_cleanup): Delete.
6999 (xml_process_xincludes): Create a local xinclude_parsing_data
7000 instead of heap-allocating one. Create a local gdb_xml_parser
7001 instead of heap-allocating one with
7002 gdb_xml_create_parser_and_cleanup.
7003
7004 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7005
7006 PR threads/20743
7007 * fbsd-nat.c (resume_one_thread_cb): Remove.
7008 (resume_all_threads_cb): Remove.
7009 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7010 iterate_over_threads.
7011
7012 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7013
7014 * NEWS: Create a new section for the next release branch.
7015 Rename the section of the current branch, now that it has
7016 been cut.
7017
7018 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7019
7020 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7021 * version.in: Bump version to 8.0.50.DATE-git.
7022
7023 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7024
7025 PR gdb/21385
7026 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7027 independently of the host, and fix build breakage on Cygwin.
7028
7029 2017-04-13 Pedro Alves <palves@redhat.com>
7030
7031 * inferior.c (free_inferior): Convert to ...
7032 (inferior::~inferior): ... this dtor.
7033 (inferior::inferior): New ctor, factored out from ...
7034 (add_inferior_silent): ... here. Allocate the inferior with a new
7035 expression.
7036 (delete_inferior): Call delete instead of free_inferior.
7037 * inferior.h (gdb_environ, continuation): Forward declare.
7038 (inferior): Now a class. Add in-class initialization to all
7039 members. Make boolean fields bool, except 'detaching'.
7040 (inferior::inferior): New explicit ctor.
7041 (inferior::~inferior): New.
7042
7043 2017-04-13 Pedro Alves <palves@redhat.com>
7044
7045 * inferior.c (init_inferior_list): Delete.
7046 * inferior.h (init_inferior_list): Delete.
7047
7048 2017-04-13 Pedro Alves <palves@redhat.com>
7049
7050 PR threads/13217
7051 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7052 (top level): Call it twice, with different thread sets.
7053
7054 2017-04-13 Pedro Alves <palves@redhat.com>
7055
7056 * thread.c: Include <algorithm>.
7057 (thread_array_cleanup): Delete.
7058 (scoped_inc_dec_ref): New class.
7059 (live_threads_count): New function.
7060 (set_thread_refcount): Delete.
7061 (tp_array_compar_ascending): Now a bool.
7062 (tp_array_compar): Convert to a std::sort comparison function.
7063 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7064 and live_threads_count.
7065
7066 2017-04-13 Pedro Alves <palves@redhat.com>
7067
7068 * infrun.c (follow_fork_inferior): Also switch the current
7069 inferior.
7070
7071 2017-04-13 Pedro Alves <palves@redhat.com>
7072
7073 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7074 before calling create_internal_breakpoint.
7075
7076 2017-04-13 Pedro Alves <palves@redhat.com>
7077
7078 * fork-child.c (execv_argv): New class.
7079 (breakup_args): Refactored as ...
7080 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7081 Copy arguments to storage and replace separators with NULL
7082 terminators in place.
7083 (escape_bang_in_quoted_argument): Adjust to return bool.
7084 (execv_argv::execv_argv): New ctor.
7085 (execv_argv::init_for_shell): New method, factored out from
7086 fork_inferior. Don't strdup strings into the vector.
7087 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7088 Remove free_vector_argv call.
7089
7090 2017-04-13 Yao Qi <yao.qi@linaro.org>
7091
7092 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7093 tdep->rx_psw_type.
7094
7095 2017-04-13 Yao Qi <yao.qi@linaro.org>
7096
7097 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7098 * rx-tdep.c (rx_gdbarch_init): Likewise.
7099
7100 2017-04-13 Pedro Alves <palves@redhat.com>
7101
7102 * breakpoint.h (struct breakpoint): Reindent.
7103
7104 2017-04-13 Pedro Alves <palves@redhat.com>
7105
7106 * breakpoint.c (bp_location): Rename to ...
7107 (bp_locations): ... this. All references updated.
7108 (bp_location_count): Rename to ...
7109 (bp_locations_count): ... this. All references updated.
7110 (bp_location_placed_address_before_address_max): Rename to ...
7111 (bp_locations_placed_address_before_address_max): ... this. All
7112 references updated.
7113 (bp_location_shadow_len_after_address_max): Rename to ...
7114 (bp_locations_shadow_len_after_address_max): ... this. All
7115 references updated.
7116 (bp_location_compare_addrs): Rename to ...
7117 (bp_locations_compare_addrs): ... this. All references updated.
7118 (bp_location_compare):Rename to ...
7119 (bp_locations_compare): ... this. All references updated.
7120 (bp_location_target_extensions_update): Rename to ...
7121 (bp_locations_target_extensions_update): ... this. All references
7122 updated.
7123
7124 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7125
7126 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7127 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7128 'sgtty.h'.
7129 * common/gdb_termios.h: New file, with parts of "terminal.h".
7130 * inflow.c: Include "gdb_termios.h".
7131 * ser-unix.c: Include "gdb_termios.h".
7132 * terminal.h: Move terminal-related defines to
7133 "common/gdb_termios.h".
7134
7135 2017-04-12 Tom Tromey <tom@tromey.com>
7136
7137 * probe.c (parse_probes): Update.
7138 * location.h (delete_event_location): Don't declare.
7139 (event_location_deleter::operator()): Update.
7140 * location.c (event_location_deleter::operator()): Rename from
7141 delete_event_location.
7142 * linespec.h (linespec_result) <location>: Change type to
7143 event_location_up.
7144 * linespec.c (canonicalize_linespec, event_location_to_sals)
7145 (decode_objc): Update.
7146 (linespec_result): Don't call delete_event_location.
7147 * breakpoint.c (create_breakpoints_sal)
7148 (bkpt_probe_create_sals_from_location)
7149 (strace_marker_create_sals_from_location): Update.
7150
7151 2017-04-12 Tom Tromey <tom@tromey.com>
7152
7153 * linespec.h (struct linespec_result): Add constructor and
7154 destructor.
7155 (init_linespec_result, destroy_linespec_result)
7156 (make_cleanup_destroy_linespec_result): Don't declare.
7157 * linespec.c (init_linespec_result): Remove.
7158 (linespec_result::~linespec_result): Rename from
7159 destroy_linespec_result. Update.
7160 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7161 Remove.
7162 * breakpoint.c (create_breakpoint, break_range_command)
7163 (decode_location_default): Update.
7164 * ax-gdb.c (agent_command_1): Update.
7165
7166 2017-04-12 Tom Tromey <tom@tromey.com>
7167
7168 * remote.c (remote_download_tracepoint): Update.
7169 * python/py-breakpoint.c (bppy_get_location): Update.
7170 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7171 (gdbscm_breakpoint_location): Update.
7172 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7173 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7174 Change type to event_location_up.
7175 * breakpoint.c (create_overlay_event_breakpoint)
7176 (create_longjmp_master_breakpoint)
7177 (create_std_terminate_master_breakpoint)
7178 (create_exception_master_breakpoint)
7179 (breakpoint_event_location_empty_p, print_breakpoint_location)
7180 (print_one_breakpoint_location, create_thread_event_breakpoint)
7181 (init_breakpoint_sal, create_breakpoint)
7182 (print_recreate_ranged_breakpoint, break_range_command)
7183 (init_ada_exception_breakpoint, say_where): Update.
7184 (base_breakpoint_dtor): Don't call delete_event_location.
7185 (bkpt_print_recreate, tracepoint_print_recreate)
7186 (dprintf_print_recreate, update_static_tracepoint)
7187 (breakpoint_re_set_default): Update.
7188
7189 2017-04-12 Tom Tromey <tom@tromey.com>
7190
7191 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7192 type of "to_do". Update.
7193 (compute_stack_depth): Use std::vector.
7194
7195 2017-04-12 Tom Tromey <tom@tromey.com>
7196
7197 * printcmd.c (find_instruction_backward): Use std::vector.
7198
7199 2017-04-12 Tom Tromey <tom@tromey.com>
7200
7201 * symfile.c (objfilep): Remove typedef.
7202 (reread_symbols): Use a std::vector.
7203
7204 2017-04-12 Tom Tromey <tom@tromey.com>
7205
7206 * mi/mi-main.c (exec_direction_forward): Remove.
7207 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7208 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7209 scoped_restore.
7210 * guile/guile.c (guile_repl_command, guile_command)
7211 (gdbscm_execute_gdb_command): Use scoped_restore.
7212 * go-exp.y (go_parse): Use scoped_restore.
7213 * d-exp.y (d_parse): Use scoped_restore.
7214 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7215 * c-exp.y (c_parse): Use scoped_restore.
7216
7217 2017-04-12 Tom Tromey <tom@tromey.com>
7218
7219 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7220 (mi_parse): Update return type.
7221 (mi_parse_free): Remove.
7222 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7223 (mi_parse::~mi_parse): Rename from mi_parse_free.
7224 (mi_parse_cleanup): Remove.
7225 (mi_parse): Return a unique_ptr. Use new.
7226 * mi/mi-main.c (mi_execute_command): Update.
7227
7228 2017-04-12 Tom Tromey <tom@tromey.com>
7229
7230 * location.c (explicit_location_lex_one): Return a
7231 unique_xmalloc_ptr.
7232 (string_to_explicit_location): Update. Remove cleanups.
7233
7234 2017-04-12 Tom Tromey <tom@tromey.com>
7235
7236 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7237 (compare_value_and_voffset): Change type. Update.
7238 (compute_vtable_size): Change type of "offset_vec".
7239 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7240 (gnuv3_get_typeid): Remove extraneous declaration.
7241
7242 2017-04-12 Tom Tromey <tom@tromey.com>
7243
7244 * charset.h (wchar_iterator): Fix comment.
7245
7246 2017-04-12 Tom Tromey <tom@tromey.com>
7247
7248 * charset.c (iconv_wrapper): New class.
7249 (cleanup_iconv): Remove.
7250 (convert_between_encodings): Use it.
7251
7252 2017-04-12 Tom Tromey <tom@tromey.com>
7253
7254 * symfile.h (increment_reading_symtab): Update type.
7255 * symfile.c (decrement_reading_symtab): Remove.
7256 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7257 * psymtab.c (psymtab_to_symtab): Update.
7258 * dwarf2read.c (dw2_instantiate_symtab): Update.
7259
7260 2017-04-12 Tom Tromey <tom@tromey.com>
7261
7262 * jit.c (struct jit_reader): Declare separately. Add constructor
7263 and destructor. Change type of "handle".
7264 (loaded_jit_reader): Define separately.
7265 (jit_reader_load): Update. New "new".
7266 (jit_reader_unload_command): Use "delete".
7267 * gdb-dlfcn.h (struct dlclose_deleter): New.
7268 (gdb_dlhandle_up): New typedef.
7269 (gdb_dlopen, gdb_dlsym): Update types.
7270 (gdb_dlclose): Remove.
7271 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7272 (gdb_dlsym): Change type of "handle".
7273 (make_cleanup_dlclose): Remove.
7274 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7275 * compile/compile-c-support.c (load_libcc): Update.
7276
7277 2017-04-12 Tom Tromey <tom@tromey.com>
7278
7279 * symtab.h (find_pcs_for_symtab_line): Change return type.
7280 * symtab.c (find_pcs_for_symtab_line): Change return type.
7281 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7282 type of "vec". Update.
7283 (ltpy_get_pcs_for_line): Update.
7284 * linespec.c (decode_digits_ordinary): Update.
7285
7286 2017-04-12 Tom Tromey <tom@tromey.com>
7287
7288 * tracepoint.c (actions_command): Update.
7289 * python/python.c (python_command, python_interactive_command):
7290 Update.
7291 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7292 * guile/guile.c (guile_command): Update.
7293 * defs.h (read_command_lines, read_command_lines_1): Return
7294 command_line_up.
7295 (command_lines_deleter): New struct.
7296 (command_line_up): New typedef.
7297 * compile/compile.c (compile_code_command)
7298 (compile_print_command): Update.
7299 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7300 command_line_up.
7301 (make_cleanup_free_command_lines): Remove.
7302 * cli/cli-script.c (get_command_line, read_command_lines_1)
7303 (copy_command_lines): Return command_line_up.
7304 (while_command, if_command, read_command_lines, define_command)
7305 (document_command): Update.
7306 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7307 Remove.
7308 * breakpoint.h (breakpoint_set_commands): Change type of
7309 "commands".
7310 * breakpoint.c (breakpoint_set_commands): Change type of
7311 "commands". Update.
7312 (do_map_commands_command, update_dprintf_command_list)
7313 (create_tracepoint_from_upload): Update.
7314
7315 2017-04-12 Tom Tromey <tom@tromey.com>
7316
7317 * tracepoint.c (scope_info): Update.
7318 * spu-tdep.c (spu_catch_start): Update.
7319 * python/python.c (gdbpy_decode_line): Update.
7320 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7321 * python/py-breakpoint.c (bppy_init): Update.
7322 * probe.c (parse_probes): Update.
7323 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7324 * location.h (event_location_deleter): New struct.
7325 (event_location_up): New typedef.
7326 (new_linespec_location, new_address_location, new_probe_location)
7327 (new_explicit_location, copy_event_location)
7328 (string_to_event_location, string_to_event_location_basic)
7329 (string_to_explicit_location): Update return type.
7330 (make_cleanup_delete_event_location): Remove.
7331 * location.c (new_linespec_location, new_address_location)
7332 (new_probe_location, new_explicit_location, copy_event_location):
7333 Return event_location_up.
7334 (delete_event_location_cleanup)
7335 (make_cleanup_delete_event_location): Remove.
7336 (string_to_explicit_location, string_to_event_location_basic)
7337 (string_to_event_location): Return event_location_up.
7338 * linespec.c (canonicalize_linespec, event_location_to_sals)
7339 (decode_line_with_current_source)
7340 (decode_line_with_last_displayed, decode_objc): Update.
7341 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7342 * completer.c (location_completer): Update.
7343 * cli/cli-cmds.c (edit_command, list_command): Update.
7344 * breakpoint.c (create_overlay_event_breakpoint)
7345 (create_longjmp_master_breakpoint)
7346 (create_std_terminate_master_breakpoint)
7347 (create_exception_master_breakpoint)
7348 (create_thread_event_breakpoint): Update.
7349 (init_breakpoint_sal): Update. Remove some dead code.
7350 (create_breakpoint_sal): Change type of "location". Update.
7351 (create_breakpoints_sal, create_breakpoint, break_command_1)
7352 (dprintf_command, break_range_command, until_break_command)
7353 (init_ada_exception_breakpoint)
7354 (strace_marker_create_sals_from_location)
7355 (update_static_tracepoint, trace_command, ftrace_command)
7356 (strace_command, create_tracepoint_from_upload): Update.
7357 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7358 * ax-gdb.c (agent_command_1): Update.
7359
7360 2017-04-12 Pedro Alves <palves@redhat.com>
7361
7362 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7363 * configure.tgt: Handle i[34567]86-*-go32* and
7364 i[34567]86-*-msdosdjgpp*.
7365 * i386-tdep.c (i386_svr4_reg_to_regnum):
7366 Make extern.
7367 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7368 i386-go32-tdep.c.
7369 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7370 * i386-go32-tdep.c: New file.
7371 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7372 declarations.
7373
7374 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7375
7376 * aix-thread.c (pd_status2str): Change return type to const char *.
7377
7378 2017-04-12 Pedro Alves <palves@redhat.com>
7379
7380 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7381 calls to set_gdbarch_gnu_triplet_regexp.
7382
7383 2017-04-12 Pedro Alves <palves@redhat.com>
7384
7385 PR gdb/21323
7386 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7387 New enum value.
7388 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7389 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7390 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7391 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7392 * gdbarch.h, gdbarch.c: Regenerate.
7393 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7394 gdbarch_wchar_bit and gdbarch_wchar_signed.
7395 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7396 * arm-tdep.c (arm_gdbarch_init): Likewise.
7397 * avr-tdep.c (avr_gdbarch_init): Likewise.
7398 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7399 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7400 * i386-tdep.c (i386_go32_init_abi): Likewise.
7401 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7402 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7403 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7404 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7405 * sh-tdep.c (sh_gdbarch_init): Likewise.
7406 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7407 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7408 * windows-tdep.c (windows_init_abi): Likewise.
7409 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7410
7411 2017-04-12 Pedro Alves <palves@redhat.com>
7412
7413 PR c++/21323
7414 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7415 cplus_primitive_type_char32_t>: New enum values.
7416 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7417 and cplus_primitive_type_char32_t.
7418 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7419 32, use the archtecture's built-in type for char16_t and char32_t,
7420 respectively. Otherwise, fallback to init_integer_type as before,
7421 but make the type unsigned, and issue a complaint.
7422 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7423
7424 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7425
7426 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7427 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7428
7429 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7430
7431 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7432 'const char *'.
7433
7434 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7435
7436 * common/common-utils.c (free_vector_argv): New function.
7437 * common/common-utils.h: Include <vector>.
7438 (free_vector_argv): New prototype.
7439 * darwin-nat.c (darwin_create_inferior): Rewrite function
7440 prototype in order to constify "exec_file" and accept a
7441 "std::string" for "allargs".
7442 * fork-child.c: Include <vector>.
7443 (breakup_args): Rewrite function, using C++.
7444 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7445 and accept "std::string" for "allargs". Update the code to
7446 calculate "argv" based on "allargs". Update calls to "exec_fun"
7447 and "execvp".
7448 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7449 order to constify "exec_file" and accept a "std::string" for
7450 "allargs".
7451 * go32-nat.c (go32_create_inferior): Likewise.
7452 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7453 * infcmd.c (run_command_1): Constify "exec_file". Use
7454 "std::string" for inferior arguments.
7455 * inferior.h (fork_inferior): Update prototype.
7456 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7457 prototype in order to constify "exec_file" and accept a
7458 "std::string" for "allargs".
7459 * nto-procfs.c (procfs_create_inferior): Likewise.
7460 * procfs.c (procfs_create_inferior): Likewise.
7461 * remote-sim.c (gdbsim_create_inferior): Likewise.
7462 * remote.c (extended_remote_run): Update code to accept
7463 "std::string" as argument.
7464 (extended_remote_create_inferior): Rewrite function prototype in
7465 order to constify "exec_file" and accept a "std::string" for
7466 "allargs".
7467 * rs6000-nat.c (super_create_inferior): Likewise.
7468 (rs6000_create_inferior): Likewise.
7469 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7470 * windows-nat.c (windows_create_inferior): Likewise.
7471
7472 2017-04-11 Pedro Alves <palves@redhat.com>
7473
7474 * thread.c: Fix whitespace throughout.
7475
7476 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7477
7478 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7479
7480 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7481
7482 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7483
7484 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7485
7486 PR gdb/21364
7487 * osdata.c (info_osdata): Check if 'type' is an empty string
7488 instead of NULL.
7489
7490 2017-04-10 Pedro Alves <palves@redhat.com>
7491
7492 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7493 (ptid_to_global_thread_id, in_thread_list)
7494 (do_captured_list_thread_ids, set_resumed, set_running)
7495 (set_executing, set_stop_requested, finish_thread_state)
7496 (validate_registers_access, can_access_registers_ptid)
7497 (print_thread_info_1, switch_to_thread)
7498 (do_restore_current_thread_cleanup)
7499 (make_cleanup_restore_current_thread, thread_command)
7500 (thread_name_command): Use operator== instead of ptid_equal.
7501
7502 2017-04-10 Pedro Alves <palves@redhat.com>
7503
7504 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7505 (current_thread_cleanup_chain): Delete.
7506 (restore_current_thread_cleanup_dtor)
7507 (make_cleanup_restore_current_thread): Remove references to
7508 current_thread_cleanup_chain.
7509
7510 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7511
7512 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7513 REG_UNKNOWN.
7514
7515 2017-04-10 Yao Qi <yao.qi@linaro.org>
7516
7517 PR gdb/19942
7518 * gdbthread.h (thread_info::deletable): New method.
7519 (thread_info::incref): New method.
7520 (thread_info::decref): New method.
7521 (thread_info::refcount): Move it to private.
7522 * infrun.c (save_stop_context): Call inc_refcount.
7523 (release_stop_context_cleanup): Likewise.
7524 * thread.c (set_thread_exited): New function.
7525 (init_thread_list): Delete "tp" only it is deletable, otherwise
7526 call set_thread_exited.
7527 (delete_thread_1): Call set_thread_exited.
7528 (current_thread_cleanup) <inferior_pid>: Remove.
7529 <thread>: New field.
7530 (restore_current_thread_ptid_changed): Removed.
7531 (do_restore_current_thread_cleanup): Adjust.
7532 (restore_current_thread_cleanup_dtor): Don't call
7533 find_thread_ptid.
7534 (set_thread_refcount): Use dec_refcount.
7535 (make_cleanup_restore_current_thread): Adjust.
7536 (thread_apply_all_command): Call inc_refcount.
7537 (_initialize_thread): Don't call
7538 observer_attach_thread_ptid_changed.
7539
7540 2017-04-10 Yao Qi <yao.qi@linaro.org>
7541
7542 * thread.c (delete_thread_1): Hoist code on marking thread as
7543 exited.
7544
7545 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7546
7547 * windows-nat.c (windows_detach): Initialize ptid with
7548 minus_one_ptid.
7549
7550 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7551
7552 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7553
7554 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7555
7556 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7557 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7558 (bfin_pseudo_register_write): Likewise
7559
7560 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7561
7562 * common/ptid.h (struct ptid): Change to...
7563 (class ptid_t): ... this.
7564 <ptid_t>: New constructors.
7565 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7566 matches>: New methods.
7567 <make_null, make_minus_one>: New static methods.
7568 <pid>: Rename to...
7569 <m_pid>: ...this.
7570 <lwp>: Rename to...
7571 <m_lwp>: ...this.
7572 <tid>: Rename to...
7573 <m_tid>: ...this.
7574 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7575 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7576 as references, move comment to class ptid_t.
7577 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7578 ptid_t static methods.
7579 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7580 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7581 Take ptid arguments as references, implement using ptid_t methods.
7582 * unittests/ptid-selftests.c: New file.
7583 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7584 unittests/ptid-selftests.c.
7585 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7586
7587 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7588
7589 * python/python.c (python_run_simple_file): Cast mode literal to
7590 non-const char pointer as expected by PyFile_FromString.
7591
7592 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7593
7594 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7595 minus_one_ptid and null_ptid.
7596
7597 2017-04-05 Pedro Alves <palves@redhat.com>
7598
7599 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7600 * configure: Regenerate.
7601
7602 2017-04-05 Pedro Alves <palves@redhat.com>
7603
7604 * ada-exp.y (yyerror): Constify.
7605 * ada-lang.c (bound_name, get_selections)
7606 (ada_variant_discrim_type)
7607 (ada_variant_discrim_name, ada_value_struct_elt)
7608 (ada_lookup_struct_elt_type, is_unchecked_variant)
7609 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7610 (catch_ada_exception_command_split)
7611 (catch_ada_assert_command_split, catch_assert_command)
7612 (ada_op_name): Constify.
7613 * ada-lang.h (ada_yyerror, get_selections)
7614 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7615 * arc-tdep.c (arc_print_frame_cache): Constify.
7616 * arm-tdep.c (arm_skip_stub): Constify.
7617 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7618 (gen_aggregate_elt_ref): Constify.
7619 * bcache.c (print_bcache_statistics): Constify.
7620 * bcache.h (print_bcache_statistics): Constify.
7621 * break-catch-throw.c (catch_exception_command_1):
7622 * breakpoint.c (struct ep_type_description::description):
7623 Constify.
7624 (add_solib_catchpoint): Constify.
7625 (catch_fork_command_1): Add cast.
7626 (add_catch_command): Constify.
7627 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7628 Constify.
7629 * bsd-uthread.c (bsd_uthread_state): Constify.
7630 * buildsym.c (patch_subfile_names): Constify.
7631 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7632 Constify.
7633 * c-exp.y (yyerror): Constify.
7634 (token::oper): Constify.
7635 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7636 * c-varobj.c (cplus_describe_child): Constify.
7637 * charset.c (find_charset_names): Add cast.
7638 (find_charset_names): Constify array and add const_cast.
7639 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7640 (edit_command): Constify.
7641 * cli/cli-decode.c (lookup_cmd): Constify.
7642 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7643 Constify.
7644 (struct dump_context): Constify.
7645 (add_dump_command, restore_command): Constify.
7646 * cli/cli-script.c (get_command_line): Constify.
7647 * cli/cli-script.h (get_command_line): Constify.
7648 * cli/cli-utils.c (check_for_argument): Constify.
7649 * cli/cli-utils.h (check_for_argument): Constify.
7650 * coff-pe-read.c (struct read_pe_section_data): Constify.
7651 * command.h (lookup_cmd): Constify.
7652 * common/print-utils.c (decimal2str): Constify.
7653 * completer.c (gdb_print_filename): Constify.
7654 * corefile.c (set_gnutarget): Constify.
7655 * cp-name-parser.y (yyerror): Constify.
7656 * cp-valprint.c (cp_print_class_member): Constify.
7657 * cris-tdep.c (cris_register_name, crisv32_register_name):
7658 Constify.
7659 * d-exp.y (yyerror): Constify.
7660 (struct token::oper): Constify.
7661 * d-lang.h (d_yyerror): Constify.
7662 * dbxread.c (struct header_file_location::name): Constify.
7663 (add_old_header_file, add_new_header_file, last_function_name)
7664 (dbx_next_symbol_text, add_bincl_to_list)
7665 (find_corresponding_bincl_psymtab, set_namestring)
7666 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7667 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7668 * defs.h (command_line_input, print_address_symbolic)
7669 (deprecated_readline_begin_hook): Constify.
7670 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7671 Constify.
7672 * event-top.c (handle_line_of_input): Constify and add cast.
7673 * exceptions.c (catch_errors): Constify.
7674 * exceptions.h (catch_errors): Constify.
7675 * expprint.c (print_subexp_standard, op_string, op_name)
7676 (op_name_standard, dump_raw_expression, dump_raw_expression):
7677 * expression.h (op_name, op_string, dump_raw_expression):
7678 Constify.
7679 * f-exp.y (yyerror): Constify.
7680 (struct token::oper): Constify.
7681 (struct f77_boolean_val::name): Constify.
7682 * f-lang.c (f_word_break_characters): Constify.
7683 * f-lang.h (f_yyerror): Constify.
7684 * fork-child.c (fork_inferior): Add cast.
7685 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7686 (new_variant): Constify.
7687 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7688 * gdbarch.c: Regenerate.
7689 * gdbcore.h (set_gnutarget): Constify.
7690 * go-exp.y (yyerror): Constify.
7691 (token::oper): Constify.
7692 * go-lang.h (go_yyerror): Constify.
7693 * go32-nat.c (go32_sysinfo): Constify.
7694 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7695 * guile/scm-cmd.c (cmdscm_function): Constify.
7696 * guile/scm-param.c (pascm_param_value): Constify.
7697 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7698 (h8300sx_register_name): Constify.
7699 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7700 Constify.
7701 * ia64-tdep.c (ia64_register_names): Constify.
7702 * infcmd.c (construct_inferior_arguments): Constify.
7703 (path_command, attach_post_wait): Constify.
7704 * language.c (show_range_command, show_case_command)
7705 (unk_lang_error): Constify.
7706 * language.h (language_defn::la_error)
7707 (language_defn::la_name_of_this): Constify.
7708 * linespec.c (decode_line_2): Constify.
7709 * linux-thread-db.c (thread_db_err_str): Constify.
7710 * lm32-tdep.c (lm32_register_name): Constify.
7711 * m2-exp.y (yyerror): Constify.
7712 * m2-lang.h (m2_yyerror): Constify.
7713 * m32r-tdep.c (m32r_register_names): Constify and make static.
7714 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7715 * m88k-tdep.c (m88k_register_name): Constify.
7716 * macroexp.c (appendmem): Constify.
7717 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7718 (upgrade_type, parse_external, parse_partial_symbols)
7719 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7720 (new_symbol): Constify.
7721 * memattr.c (mem_info_command): Constify.
7722 * mep-tdep.c (register_name_from_keyword): Constify.
7723 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7724 Constify.
7725 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7726 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7727 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7728 cast.
7729 (mi_execute_async_cli_command): Constify.
7730 * mips-tdep.c (mips_register_name): Constify.
7731 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7732 (am33_register_name, am33_2_register_name)
7733 * moxie-tdep.c (moxie_register_names): Constify.
7734 * nat/linux-osdata.c (osdata_type): Constify fields.
7735 * nto-tdep.c (nto_parse_redirection): Constify.
7736 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7737 (lookup_child_selector): Constify.
7738 (objc_methcall::name): Constify.
7739 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7740 (lookup_struct_typedef): Constify.
7741 * objfiles.c (pc_in_section): Constify.
7742 * objfiles.h (pc_in_section): Constify.
7743 * p-exp.y (struct token::oper): Constify.
7744 (yyerror): Constify.
7745 * p-lang.h (pascal_yyerror): Constify.
7746 * parser-defs.h (op_name_standard): Constify.
7747 (op_print::string): Constify.
7748 (exp_descriptor::op_name): Constify.
7749 * printcmd.c (print_address_symbolic): Constify.
7750 * psymtab.c (print_partial_symbols): Constify.
7751 * python/py-breakpoint.c (stop_func): Constify.
7752 (bppy_get_expression): Constify.
7753 * python/py-cmd.c (cmdpy_completer::name): Constify.
7754 (cmdpy_function): Constify.
7755 * python/py-event.c (evpy_add_attribute)
7756 (gdbpy_initialize_event_generic): Constify.
7757 * python/py-event.h (evpy_add_attribute)
7758 (gdbpy_initialize_event_generic): Constify.
7759 * python/py-evts.c (add_new_registry): Constify.
7760 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7761 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7762 * python/py-inferior.c (get_buffer): Add cast.
7763 * python/py-param.c (parm_constant::name): Constify.
7764 * python/py-unwind.c (fprint_frame_id): Constify.
7765 * python/python.c (gdbpy_parameter_value): Constify.
7766 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7767 * remote.c (memory_packet_config::name): Constify.
7768 (show_packet_config_cmd, remote_write_bytes)
7769 (remote_buffer_add_string):
7770 * reverse.c (exec_reverse_once): Constify.
7771 * rs6000-tdep.c (variant::name, variant::description): Constify.
7772 * rust-exp.y (rustyyerror): Constify.
7773 * rust-lang.c (rust_op_name): Constify.
7774 * rust-lang.h (rustyyerror): Constify.
7775 * serial.h (serial_ops::name): Constify.
7776 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7777 (sh_sh3e_register_name, sh_sh2e_register_name)
7778 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7779 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7780 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7781 (sh_sh4al_dsp_register_name): Constify.
7782 * sh64-tdep.c (sh64_register_name): Constify.
7783 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7784 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7785 * stabsread.c (patch_block_stabs, read_type_number)
7786 (ref_map::stabs, ref_add, process_reference)
7787 (symbol_reference_defined, define_symbol, define_symbol)
7788 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7789 (read_one_struct_field, read_struct_fields, read_baseclasses)
7790 (read_tilde_fields, read_struct_type, read_array_type)
7791 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7792 (read_huge_number, read_range_type, read_args, common_block_start)
7793 (find_name_end): Constify.
7794 * stabsread.h (common_block_start, define_symbol)
7795 (process_one_symbol, symbol_reference_defined, ref_add):
7796 * symfile.c (get_section_index, add_symbol_file_command):
7797 * symfile.h (get_section_index): Constify.
7798 * target-descriptions.c (tdesc_type::name): Constify.
7799 (tdesc_free_type): Add cast.
7800 * target.c (find_default_run_target):
7801 (add_deprecated_target_alias, find_default_run_target)
7802 (target_announce_detach): Constify.
7803 (do_option): Constify.
7804 * target.h (add_deprecated_target_alias): Constify.
7805 * thread.c (print_thread_info_1): Constify.
7806 * top.c (deprecated_readline_begin_hook, command_line_input):
7807 Constify.
7808 (init_main): Add casts.
7809 * top.h (handle_line_of_input): Constify.
7810 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7811 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7812 (tfind_command): Rename to ...
7813 (tfind_command_1): ... this and constify.
7814 (tfind_command): New function.
7815 (tfind_end_command, tfind_start_command): Adjust.
7816 (encode_source_string): Constify.
7817 * tracepoint.h (encode_source_string): Constify.
7818 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7819 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7820 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7821 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7822 * tui/tui-win.c (parse_scrolling_args): Constify.
7823 * tui/tui-windata.c (tui_erase_data_content): Constify.
7824 * tui/tui-windata.h (tui_erase_data_content): Constify.
7825 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7826 * tui/tui.c (tui_enable): Add cast.
7827 * utils.c (defaulted_query): Constify.
7828 (init_page_info): Add cast.
7829 (puts_debug, subset_compare): Constify.
7830 * utils.h (subset_compare): Constify.
7831 * varobj.c (varobj_format_string): Constify.
7832 * varobj.h (varobj_format_string): Constify.
7833 * vax-tdep.c (vax_register_name): Constify.
7834 * windows-nat.c (windows_detach): Constify.
7835 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7836 * xml-support.c (gdb_xml_end_element): Constify.
7837 * xml-tdesc.c (tdesc_start_reg): Constify.
7838 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7839 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7840 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7841
7842 2017-04-05 Pedro Alves <palves@redhat.com>
7843
7844 * proc-api.c (struct trans): Constify.
7845 (procfs_note): Constify.
7846 * proc-events.c (struct trans, syscall_table):
7847 * proc-flags.c (struct trans): Constify.
7848 * proc-utils.h (procfs_note): Constify.
7849 * proc-why.c (struct trans): Constify.
7850 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7851 (procfs_detach): Constify.
7852 * sol-thread.c (struct string_map): Constify.
7853 (td_err_string, td_state_string): Constify.
7854
7855 2017-04-05 Pedro Alves <palves@redhat.com>
7856
7857 * proc-api.c (procfs_filename): Don't initialize
7858 procfs_filename.
7859 (prepare_to_trace): Assume procfs_filename is non-NULL.
7860 (_initialize_proc_api): Give procfs_filename a default value here.
7861
7862 2017-04-05 Pedro Alves <palves@redhat.com>
7863
7864 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7865 'cond_string' parameter.
7866 (extract_exception_regexp): Constify 'string' parameter.
7867 (catch_exception_command_1): Constify.
7868 * breakpoint.c (init_catchpoint)
7869 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7870 parameter.
7871 (ep_parse_optional_if_clause, catch_fork_command_1)
7872 (catch_exec_command_1): Constify.
7873 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7874 parameter.
7875 (ep_parse_optional_if_clause): Constify.
7876 * cli/cli-utils.c (remove_trailing_whitespace)
7877 (check_for_argument): Constify.
7878 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7879 non-const overload.
7880 (check_for_argument): Likewise.
7881
7882 2017-04-05 Pedro Alves <palves@redhat.com>
7883
7884 * event-top.c (command_line_handler): Add cast to execute_command
7885 call.
7886 * record-btrace.c (cmd_record_btrace_bts_start)
7887 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7888 (cmd_record_btrace_start): Add cast to execute_command call.
7889 * record-full.c (record_full_goto_insn):
7890 * record.c (record_start, record_stop): Add cast to
7891 execute_command_to_string calls.
7892 (cmd_record_start): Add cast to execute_command calls.
7893
7894 2017-04-05 Pedro Alves <palves@redhat.com>
7895
7896 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7897 static inline function.
7898 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7899 array and use gdb_PyArg_ParseTupleAndKeywords.
7900 * python/py-cmd.c (cmdpy_init): Likewise.
7901 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7902 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7903 (infpy_search_memory): Likewise.
7904 * python/py-objfile.c (objfpy_add_separate_debug_file)
7905 (gdbpy_lookup_objfile): Likewise.
7906 * python/py-symbol.c (gdbpy_lookup_symbol)
7907 (gdbpy_lookup_global_symbol): Likewise.
7908 * python/py-type.c (gdbpy_lookup_type): Likewise.
7909 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7910 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7911 Likewise.
7912
7913 2017-04-05 Pedro Alves <palves@redhat.com>
7914
7915 * python/python-internal.h (gdb_PyGetSetDef): New type.
7916 * python/py-block.c (block_object_getset)
7917 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7918 * python/py-event.c (event_object_getset)
7919 (finish_breakpoint_object_getset): Likewise.
7920 * python/py-inferior.c (inferior_object_getset): Likewise.
7921 * python/py-infthread.c (thread_object_getset): Likewise.
7922 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7923 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7924 * python/py-objfile.c (objfile_getset): Likewise.
7925 * python/py-progspace.c (pspace_getset): Likewise.
7926 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7927 Likewise.
7928 * python/py-record.c (recpy_record_getset): Likewise.
7929 * python/py-symbol.c (symbol_object_getset): Likewise.
7930 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7931 Likewise.
7932 * python/py-type.c (type_object_getset, field_object_getset):
7933 Likewise.
7934 * python/py-value.c (value_object_getset): Likewise.
7935
7936 2017-04-05 Pedro Alves <palves@redhat.com>
7937
7938 * python/python-internal.h (gdb_PyObject_CallMethod)
7939 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7940 New functions.
7941 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7942 (PySys_GetObject, PySys_SetPath): New macros.
7943
7944 2017-04-05 Pedro Alves <palves@redhat.com>
7945
7946 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7947 info_osdata_command.
7948 * osdata.c (info_osdata_command): Rename to ...
7949 (info_osdata): ... this. Constify 'type' parameter, and remove
7950 the 'from_tty' parameter. Accept NULL TYPE.
7951 (info_osdata_command): New function.
7952 * osdata.h (info_osdata_command): Remove declaration.
7953 (info_osdata): New declaration.
7954
7955 2017-04-05 Pedro Alves <palves@redhat.com>
7956
7957 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7958 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7959 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7960 parameter.
7961 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7962 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7963 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7964 parameter.
7965 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7966 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7967 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7968 (mi_cmd_file_list_exec_source_files)
7969 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7970 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7971 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7972 parameter.
7973 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7974 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7975 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7976 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7977 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7978 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7979 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7980 'command' parameter.
7981 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7982 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7983 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7984 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7985 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7986 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7987 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7988 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7989 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7990 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7991 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7992 parameter.
7993 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7994 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7995 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7996 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7997 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7998 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7999 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8000 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8001 (mi_cmd_data_list_changed_registers)
8002 (mi_cmd_data_write_register_values)
8003 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8004 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8005 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8006 (mi_cmd_list_features, mi_cmd_list_target_features)
8007 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8008 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8009 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8010 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8011 (mi_cmd_trace_frame_collected): Constify 'command'
8012 parameter.
8013 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8014 'command' parameter.
8015
8016 2017-04-05 Pedro Alves <palves@redhat.com>
8017
8018 * ada-lang.c (ada_completer_word_break_characters): Now a const
8019 array.
8020 (ada_get_gdb_completer_word_break_characters): Constify.
8021 * completer.c (gdb_completer_command_word_break_characters)
8022 (gdb_completer_file_name_break_characters)
8023 (gdb_completer_quote_characters): Now const arrays.
8024 (get_gdb_completer_quote_characters): Constify.
8025 (set_rl_completer_word_break_characters): New function.
8026 (set_gdb_completion_word_break_characters)
8027 (complete_line_internal): Use it.
8028 * completer.h (get_gdb_completer_quote_characters): Constify.
8029 (set_rl_completer_word_break_characters): Declare.
8030 * f-lang.c (f_word_break_characters): Constify.
8031 * language.c (default_word_break_characters): Constify.
8032 * language.h (language_defn::la_word_break_characters): Constify.
8033 (default_word_break_characters): Constify.
8034 * top.c (init_main): Use set_rl_completer_word_break_characters.
8035
8036 2017-04-05 Pedro Alves <palves@redhat.com>
8037
8038 * aix-thread.c (aix_thread_pid_to_str)
8039 (aix_thread_extra_thread_info): Constify.
8040 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8041 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8042 (bsd_uthread_pid_to_str): Constify.
8043 * corelow.c (core_pid_to_str): Constify.
8044 * darwin-nat.c (darwin_pid_to_str): Constify.
8045 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8046 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8047 Constify.
8048 * gnu-nat.c (gnu_pid_to_str): Constify.
8049 * go32-nat.c (go32_pid_to_str): Constify.
8050 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8051 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8052 * inferior.c (inferior_pid_to_str): Constify.
8053 * linux-nat.c (linux_nat_pid_to_str): Constify.
8054 * linux-tdep.c (linux_core_pid_to_str): Constify.
8055 * linux-thread-db.c (thread_db_pid_to_str)
8056 (thread_db_extra_thread_info): Constify.
8057 * nto-tdep.c (nto_extra_thread_info): Constify.
8058 * nto-tdep.h (nto_extra_thread_info): Constify.
8059 * obsd-nat.c (obsd_pid_to_str): Constify.
8060 * procfs.c (procfs_pid_to_str): Constify.
8061 * ravenscar-thread.c (ravenscar_extra_thread_info)
8062 (ravenscar_pid_to_str): Constify.
8063 * remote-sim.c (gdbsim_pid_to_str): Constify.
8064 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8065 Constify.
8066 * sol-thread.c (solaris_pid_to_str): Constify.
8067 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8068 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8069 * target.c (default_pid_to_str, target_pid_to_str)
8070 (normal_pid_to_str, default_pid_to_str): Constify.
8071 * target.h (target_ops::to_pid_to_str)
8072 (target_ops::to_extra_thread_info): Constify.
8073 (target_pid_to_str, normal_pid_to_str): Constify.
8074 * windows-nat.c (windows_pid_to_str): Constify.
8075 * gdbarch.sh (core_pid_to_str): Constify.
8076 * target-delegates.c: Regenerate.
8077 * gdbarch.h, gdbarch.c: Regenerate.
8078
8079 2017-04-05 Pedro Alves <palves@redhat.com>
8080
8081 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8082 the memory of the temporary warning_pre_print override.
8083 * utils.c (warning_pre_print): Constify.
8084 * utils.h (warning_pre_print): Constify.
8085
8086 2017-04-05 Pedro Alves <palves@redhat.com>
8087
8088 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8089 (shell_command): New function.
8090 (make_command): Use std::string.
8091 (init_cli_cmds): Register shell_command instead of shell_escape.
8092
8093 2017-04-05 Pedro Alves <palves@redhat.com>
8094
8095 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8096 * tracepoint.c (default_collect): Don't initialize.
8097
8098 2017-04-05 Pedro Alves <palves@redhat.com>
8099
8100 * macroexp.c (macro_buffer::shared): Now a bool.
8101 (init_buffer): Update.
8102 (init_shared_buffer): Constify 'addr' parameter.
8103 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8104 casts.
8105
8106 2017-04-05 Pedro Alves <palves@redhat.com>
8107
8108 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8109 * disasm.c (set_disassembler_options): Constify local.
8110 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8111
8112 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8113
8114 PR gdb/21352
8115 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8116 option.
8117
8118 2017-04-05 Yao Qi <yao.qi@linaro.org>
8119
8120 * frame.c (frame_unwind_register_unsigned): Call
8121 frame_unwind_register_value.
8122
8123 2017-04-05 Yao Qi <yao.qi@linaro.org>
8124
8125 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8126 Use gdb_test_multiple, and don't match anchor.
8127
8128 2017-04-05 Pedro Alves <palves@redhat.com>
8129
8130 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8131 (Write After Approval): Remove Simon Marchi.
8132
8133 2017-04-05 Pedro Alves <palves@redhat.com>
8134
8135 * common/gdb_optional.h (optional::optional): Make constexpr and
8136 initialize m_dummy.
8137
8138 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8139
8140 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8141 (amd64fbsd_jmp_buf_reg_offset): Remove.
8142 (amd64fbsd_supply_uthread): Remove function.
8143 (amd64fbsd_collect_uthread): Remove function.
8144 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8145 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8146 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8147 (fbsd-nat.c): Update comment.
8148 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8149 (i386fbsd_jmp_buf_reg_offset): Remove.
8150 (i386fbsd_supply_uthread): Remove function.
8151 (i386fbsd_collect_uthread): Remove function.
8152 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8153
8154 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8155
8156 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8157 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8158 * NEWS: Mention that support for FreeBSD/alpha was removed.
8159 * alpha-fbsd-tdep.c: Delete file.
8160 * config/alpha/fbsd.mh: Delete file.
8161 * configure.host: Delete alpha*-*-freebsd* and
8162 alpha*-*-kfreebsd*-gnu.
8163 * configure.tgt: Delete alpha*-*-freebsd* and
8164 alpha*-*-kfreebsd*-gnu.
8165
8166 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8167
8168 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8169 amd64bsd_store_inferior_registers): Use ptid from regcache.
8170
8171 2017-04-04 Pedro Alves <palves@redhat.com>
8172
8173 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8174 data fields, make them private and add "m_" prefixes.
8175 (lnp_state_machine::lnp_state_machine): New ctor.
8176 (record_line, check_line_address, handle_set_discriminator)
8177 (handle_set_address, handle_advance_pc, handle_special_opcode)
8178 (handle_advance_line, handle_set_file, handle_negate_stmt)
8179 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8180 (end_sequence, advance_line): New methods.
8181 (m_gdbarch, m_record_lines_p): New fields.
8182 (lnp_reader_state): Delete.
8183 (dwarf_record_line): Rename to ...
8184 (lnp_state_machine::record_line): ... adjust.
8185 (init_lnp_state_machine): Delete.
8186 (lnp_state_machine::lnp_state_machine): New.
8187 (check_line_address): Rename to ...
8188 (lnp_state_machine::check_line_address): This.
8189 (dwarf_decode_lines_1): Remove reference to "reader_state".
8190 Adjust lnp_state_machine having a non-default ctor. Use bool.
8191 State machine internal state manipulation moved to
8192 lnp_state_machine methods.
8193
8194 2017-04-04 Pedro Alves <palves@redhat.com>
8195
8196 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8197 unittests/offset-type-selftests.c.
8198 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8199 * common/offset-type.h: New file.
8200 * common/preprocessor.h: New file.
8201 * common/traits.h: New file.
8202 * common/valid-expr.h: New file.
8203 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8204 sect_offset and cu_offset strong typedefs throughout.
8205 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8206 typedefs throughout.
8207 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8208 sect_offset and cu_offset strong typedefs throughout.
8209 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8210 typedefs throughout.
8211 * gdbtypes.h: Include "common/offset-type.h".
8212 (cu_offset): Now an offset type (strong typedef) instead of a
8213 struct.
8214 (sect_offset): Likewise.
8215 (union call_site_parameter_u): Rename "param_offset" field to
8216 "param_cu_off".
8217 * unittests/offset-type-selftests.c: New file.
8218
8219 2017-04-04 Pedro Alves <palves@redhat.com>
8220
8221 * common/underlying.h: New file.
8222 * dwarf2read.c: Include "common/gdb_optional.h" and
8223 "common/underlying.h".
8224 (dir_index, file_name_index): New types.
8225 (file_entry): Use them.
8226 (file_entry::include): Use to_underlying.
8227 (line_header::add_file_name): Use dir_index.
8228 (read_formatted_entries): Use gdb::optional. Read form before
8229 writting to file_entry.
8230 (dwarf_decode_line_header): Use dir_index.
8231 (lnp_state_machine::current_file): Use to_underlying.
8232 (lnp_state_machine::file): Change type to file_name_index.
8233 (dwarf_record_line): Use to_underlying.
8234 (init_lnp_state_machine): Use file_name_index.
8235 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8236
8237 2017-04-04 Pedro Alves <palves@redhat.com>
8238
8239 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8240 operator bool, has_value and get methods.
8241
8242 2017-04-04 Pedro Alves <palves@redhat.com>
8243
8244 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8245 fields.
8246 (line_header): Initialize all data fields. Change type of
8247 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8248 Change type of include_dirs to std::vector<const char *>. Remove
8249 num_include_dirs, include_dirs_size. Change type of file_names to
8250 std::vector<file_entry>. Remove num_file_names, file_names_size.
8251 (line_header::line_header): New.
8252 (line_header::add_include_dir, line_header::add_file_name): New
8253 methods.
8254 (line_header::include_dir_at): Remove NULL check.
8255 (line_header::file_name_at): Add const overload.
8256 (line_header_up): New unique_ptr typedef.
8257 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8258 std::vector. Remove free_line_header call.
8259 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8260 free_line_header call.
8261 (free_cu_line_header): Delete.
8262 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8263 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8264 Adjust to use std::vector.
8265 (free_line_header): Delete.
8266 (free_line_header_voidp): Use delete.
8267 (add_include_dir): Replace with ...
8268 (line_header::add_include_dir): ... this method. Use std::vector.
8269 (add_file_name): Replace with ...
8270 (line_header::add_file_name): ... this method. Use std::vector.
8271 (add_include_dir_stub): Delete.
8272 (read_formatted_entries): Remove memset.
8273 (dwarf_decode_line_header): Return a line_header_up instead of a
8274 raw pointer. Remove cleanup handling. Pass lambdas to
8275 read_formatted_entries. Adjust to use line_header methods.
8276 (dwarf_decode_lines_1): Adjust to use line_header methods.
8277 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8278 use std::vector.
8279
8280 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8281
8282 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8283 instead of struct ptid.
8284
8285 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8286
8287 * frame.c (get_frame_register_bytes): Unwind using value.
8288 (put_frame_register_bytes): Likewise.
8289
8290 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8291
8292 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8293 aggregate-like.
8294
8295 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8296
8297 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8298
8299 2017-03-29 Yao Qi <yao.qi@linaro.org>
8300
8301 * gdbthread.h (struct thread_info): Declare constructor and
8302 destructor. Add some in-class member initializers.
8303 * thread.c (free_thread): Remove.
8304 (init_thread_list): Call delete instead of free_thread.
8305 (new_thread): Call thread_info constructor.
8306 (thread_info::thread_info): New function.
8307 (thread_info::~thread_info): New function.
8308 (delete_thread_1): Call delete instead of free_thread.
8309 (make_cleanup_restore_current_thread): Move tp and frame to
8310 inner block.
8311
8312 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8313
8314 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8315 (arc_skip_prologue): Likewise.
8316 (arc_make_frame_cache): Likewise.
8317 (arc_pv_get_operand): New function.
8318 (arc_is_in_prologue): Likewise.
8319 (arc_analyze_prologue): Likewise.
8320 (arc_print_frame_cache): Likewise.
8321 (MAX_PROLOGUE_LENGTH): New constant.
8322
8323 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8324
8325 * configure.tgt: Add arc-insn.o.
8326 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8327 (dump_arc_instruction_command): New function.
8328 (arc_fprintf_disasm): Likewise.
8329 (arc_disassemble_info): Likewise.
8330 (arc_insn_get_operand_value): Likewise.
8331 (arc_insn_get_operand_value_signed): Likewise.
8332 (arc_insn_get_memory_base_reg): Likewise.
8333 (arc_insn_get_memory_offset): Likewise.
8334 (arc_insn_get_branch_target): Likewise.
8335 (arc_insn_dump): Likewise.
8336 (arc_insn_get_linear_next_pc): Likewise.
8337 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8338 (arc_disassemble_info): Likewise.
8339 (arc_insn_get_branch_target): Likewise.
8340 (arc_insn_get_linear_next_pc): Likewise.
8341 * NEWS: Mention new "maint print arc arc-instruction".
8342
8343 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8344
8345 * arc-tdep (maintenance_print_arc_list): New variable.
8346 (maintenance_print_arc_command): New function.
8347
8348 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8349
8350 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8351 Add "limm" and "reserved".
8352 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8353 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8354 * arc-tdep.h (arc_regnum): Likewise.
8355
8356 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8357
8358 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8359 for THREADPTR register.
8360 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8361 register.
8362 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8363 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8364 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8365
8366 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8367
8368 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8369 registers above gdbarch_num_regs (gdbarch) as privileged in
8370 call0 ABI.
8371
8372 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8373
8374 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8375 for a single specified register or for all registers in
8376 a0_base..a0_base + C0_NREGS range.
8377 (supply_gregset_reg): Call regcache_raw_supply for a single
8378 specified register or for all registers in a0_base..a0_base +
8379 C0_NREGS range.
8380
8381 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8382
8383 * arch/xtensa.h (C0_NREGS): Add definition.
8384 * xtensa-tdep.c (C0_NREGS): Remove definition.
8385
8386 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8387
8388 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8389 Drop xtensa_default_isa initialization.
8390 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8391
8392 2017-03-27 Pedro Alves <palves@redhat.com>
8393
8394 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8395 (file_entry::include_dir): New method.
8396 (line_header::include_dir_at, line_header::file_name_at): New
8397 methods.
8398 (setup_type_unit_groups, setup_type_unit_groups)
8399 (psymtab_include_file_name): Simplify using the new methods.
8400 (lnp_state_machine) <the_line_header>: New field.
8401 <file>: Add comment.
8402 (lnp_state_machine::current_file): New method.
8403 (dwarf_record_line): Simplify using the new methods.
8404 (init_lnp_state_machine): Initialize the "the_line_header" field.
8405 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8406 Simplify using the new methods.
8407
8408 2017-03-27 Pedro Alves <palves@redhat.com>
8409
8410 * cp-name-parser.y (make_empty): Delete.
8411 (demangler_special, nested_name, ptr_operator, array_indicator)
8412 (direct_declarator, declarator_1): Use fill_comp instead of
8413 make_empty.
8414
8415 2017-03-27 Pedro Alves <palves@redhat.com>
8416
8417 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8418 to ATTRIBUTE_PRINTF.
8419 * solib-target.c (library_list_start_list): Print "string" not
8420 "version".
8421 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8422 gdb_xml_error call.
8423
8424 2017-03-27 Pedro Alves <palves@redhat.com>
8425
8426 * dwarf2read.c (struct file_and_directory): New.
8427 (dwarf2_get_dwz_file): Adjust to use std::string.
8428 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8429 (find_file_and_directory): Adjust to return a file_and_directory
8430 object.
8431 (read_file_scope): Adjust to use file_and_directory. Remove
8432 make_cleanup/do_cleanups calls.
8433 (open_and_init_dwp_file): Adjust to use std::string. Remove
8434 make_cleanup/do_cleanups calls.
8435 * python/python.c (do_start_initialization): Adjust to ldirname
8436 returning a std::string.
8437 * utils.c (ldirname): Now returns a std::string.
8438 * utils.h (ldirname): Change return type to std::string.
8439 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8440 returning a std::string.
8441 * xml-tdesc.c (file_read_description_xml): Likewise.
8442
8443 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8444
8445 * regcache.c (regcache_debug_print_register): New function.
8446 * regcache.h (regcache_debug_print_register): New declaration.
8447 * target.c (debug_print_register): Remove.
8448 (target_fetch_registers): Call regcache_debug_print_register.
8449 (target_store_registers): Likewise.
8450
8451 2017-03-24 Pádraig Brady <pbrady@fb.com>
8452
8453 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8454 reference beyond the 'lh->include_dirs' array before accessing to
8455 it.
8456 (psymtab_include_file_name): Likewise.
8457 (dwarf_decode_lines_1): Likewise.
8458 (dwarf_decode_lines): Likewise.
8459 (file_file_name): Likewise.
8460
8461 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8462
8463 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8464 inferior_ptid.
8465 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8466 ps_lsetfpregs): Likewise.
8467 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8468 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8469 ps_lsetfpregs): Likewise.
8470 * target.c (target_fetch_registers, target_store_registers):
8471 Remove asserts.
8472
8473 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8474
8475 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8476
8477 2017-03-23 Yao Qi <yao.qi@linaro.org>
8478
8479 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8480 (_initialize_aarch64_tdep): Register it.
8481 (aarch64_record_load_store): Handle PRFM instruction.
8482 (aarch64_process_record_test): New function.
8483
8484 2017-03-23 Yao Qi <yao.qi@linaro.org>
8485
8486 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8487 indentation.
8488
8489 2017-03-23 Yao Qi <yao.qi@linaro.org>
8490
8491 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8492
8493 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8494
8495 python/python.c (do_start_initialization): Fix memory leak.
8496
8497 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8498
8499 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8500 using get_ptrace_pid.
8501 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8502 inferior_ptid.
8503 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8504 inferior_ptid instead of pid.
8505
8506 2017-03-22 Yao Qi <yao.qi@linaro.org>
8507
8508 * aarch64-tdep.c: Wrap locally used classes in anonymous
8509 namespace.
8510 * arm-tdep.c: Likewise.
8511 * linespec.c: Likewise.
8512 * ui-out.c: Likewise.
8513
8514 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8515
8516 PR gdb/19637
8517 * python/lib/gdb/printer/bound_registers.py: Import sys.
8518
8519 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8520
8521 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8522 windows_thread_info parameter and use it instead of
8523 current_thread.
8524 (windows_fetch_inferior_registers): Don't set current_thread,
8525 pass the thread to do_windows_fetch_inferior_registers. Use
8526 ptid from regcache instead of inferior_ptid.
8527 (do_windows_store_inferior_registers): Add windows_thread_info
8528 parameter and use it instead of current_thread.
8529 (windows_store_inferior_registers): Don't set current_thread,
8530 pass the thread to do_windows_store_inferior_registers. Use
8531 ptid from regcache instead of inferior_ptid.
8532
8533 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8534
8535 * ser-mingw.c (ser_windows_raw): Remove reference to
8536 struct serial::current_timeout.
8537
8538 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8539
8540 PR tdep/20928
8541 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8542 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8543 (sparc64_fsr_type): Fix %fsr decoding.
8544
8545 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8546
8547 * python/py-record-btrace.c (btpy_insn_data): Change return type
8548 for Python 2.
8549
8550 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8551
8552 * spu-linux-nat.c (spu_fetch_inferior_registers,
8553 spu_store_inferior_registers): Use ptid from regcache, set and
8554 restore inferior_ptid.
8555 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8556 Likewise.
8557
8558 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8559
8560 * i386-linux-nat.c (fetch_register, store_register,
8561 i386_linux_fetch_inferior_registers,
8562 i386_linux_store_inferior_registers): Use ptid from regcache.
8563 * ia64-linux-nat.c (ia64_linux_fetch_register,
8564 ia64_linux_store_register): Likewise.
8565 * inf-ptrace.c (inf_ptrace_fetch_register,
8566 inf_ptrace_store_register): Likewise.
8567 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8568 m32r_linux_store_inferior_registers): Likewise.
8569 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8570 m68kbsd_store_inferior_registers): Likewise.
8571 * m68k-linux-nat.c (fetch_register, store_register,
8572 m68k_linux_fetch_inferior_registers,
8573 m68k_linux_store_inferior_registers): Likewise.
8574 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8575 m88kbsd_store_inferior_registers): Likewise.
8576 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8577 mips_fbsd_store_inferior_registers): Likewise.
8578 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8579 mips64_linux_regsets_store_registers): Likewise.
8580 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8581 mipsnbsd_store_inferior_registers): Likewise.
8582 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8583 mips64obsd_store_inferior_registers): Likewise.
8584 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8585 Likewise.
8586 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8587 ppcfbsd_store_inferior_registers): Likewise.
8588 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8589 ppc_linux_store_inferior_registers): Likewise.
8590 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8591 ppcnbsd_store_inferior_registers): Likewise.
8592 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8593 ppcobsd_store_registers): Likewise.
8594 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8595 Likewise.
8596 * ravenscar-thread.c (ravenscar_fetch_registers,
8597 ravenscar_store_registers, ravenscar_prepare_to_store):
8598 Likewise.
8599 * record-btrace.c (record_btrace_fetch_registers,
8600 record_btrace_store_registers, record_btrace_prepare_to_store):
8601 Likewise.
8602 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8603 Lookup inferior using ptid from regcache, instead of
8604 current_inferior.
8605 * remote.c (remote_fetch_registers, remote_store_registers): Use
8606 ptid from regcache.
8607 * rs6000-nat.c (fetch_register, store_register): Likewise.
8608 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8609 s390_linux_store_inferior_registers): Likewise.
8610 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8611 shnbsd_store_inferior_registers): Likewise.
8612 * sol-thread.c (sol_thread_fetch_registers,
8613 sol_thread_store_registers): Likewise.
8614 * sparc-nat.c (sparc_fetch_inferior_registers,
8615 sparc_store_inferior_registers): Likewise.
8616 * tilegx-linux-nat.c (fetch_inferior_registers,
8617 store_inferior_registers): Likewise.
8618 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8619 vaxbsd_store_inferior_registers): Likewise.
8620 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8621 store_xtregs): Likewise.
8622
8623 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8624
8625 PR gdb/14441
8626 * NEWS: Mention support for rvalue references in GDB and python.
8627 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8628 supports both lvalue and rvalue references.
8629
8630 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8631
8632 PR gdb/14441
8633 * gdbtypes.c (rank_one_type): Implement overloading
8634 resolution rules regarding rvalue references.
8635
8636 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8637
8638 PR gdb/14441
8639 * aarch64-tdep.c (aarch64_type_align)
8640 (aarch64_extract_return_value, aarch64_store_return_value): Change
8641 lvalue reference type checks to general reference type checks.
8642 * amd64-tdep.c (amd64_classify): Likewise.
8643 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8644 Likewise.
8645 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8646 (arm_store_return_value): Likewise.
8647 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8648 * c-typeprint.c (c_print_type): Likewise.
8649 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8650 (cplus_number_of_children, cplus_describe_child): Likewise.
8651 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8652 * completer.c (expression_completer): Likewise.
8653 * cp-support.c (make_symbol_overload_list_adl_namespace):
8654 Likewise.
8655 * darwin-nat-info.c (info_mach_region_command): Likewise.
8656 * dwarf2loc.c (entry_data_value_coerce_ref)
8657 (value_of_dwarf_reg_entry): Likewise.
8658 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8659 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8660 Likewise.
8661 * findvar.c (extract_typed_address, store_typed_address):
8662 Likewise.
8663 * gdbtypes.c (rank_one_type): Likewise.
8664 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8665 * infcall.c (value_arg_coerce): Likewise.
8666 * language.c (pointer_type): Likewise.
8667 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8668 Likewise.
8669 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8670 * mn10300-tdep.c (mn10300_type_align): Likewise.
8671 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8672 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8673 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8674 Likewise.
8675 * printcmd.c (print_formatted, x_command): Likewise.
8676 * python/py-type.c (typy_get_composite, typy_template_argument):
8677 Likewise.
8678 * python/py-value.c (valpy_referenced_value)
8679 (valpy_get_dynamic_type, value_has_field): Likewise.
8680 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8681 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8682 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8683 * spu-tdep.c (spu_scalar_value_p): Likewise.
8684 * symtab.c (lookup_symbol_aux): Likewise.
8685 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8686 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8687 Likewise.
8688 * valops.c (value_cast_pointers, value_cast)
8689 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8690 (value_struct_elt, value_struct_elt_bitpos)
8691 (value_find_oload_method_list, find_overload_match)
8692 (value_rtti_indirect_type): Likewise.
8693 * valprint.c (val_print_scalar_type_p, generic_val_print):
8694 Likewise.
8695 * value.c (value_actual_type, value_as_address, unpack_long)
8696 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8697 (coerce_ref): Likewise.
8698 * varobj.c (varobj_get_value_type): Likewise.
8699
8700 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8701
8702 PR gdb/14441
8703 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8704 table of constants.
8705 * python/lib/gdb/command/explore.py: Support exploring values
8706 of rvalue reference types.
8707 * python/lib/gdb/types.py: Implement get_basic_type() for
8708 rvalue reference types.
8709 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8710 constant.
8711 * python/py-value.c (valpy_getitem): Add an rvalue reference
8712 check.
8713 (valpy_reference_value): Add new parameter "refcode".
8714 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8715 New wrappers for valpy_reference_value().
8716 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8717 (gdbpy_invoke_xmethod): Likewise.
8718
8719 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8720
8721 PR gdb/14441
8722 * dwarf2read.c (process_die, read_type_die_1): Handle the
8723 DW_TAG_rvalue_reference_type DIE.
8724 (read_tag_reference_type): Add new parameter "refcode".
8725
8726 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8727
8728 PR gdb/14441
8729 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8730 (c_type_print_modifier, c_type_print_varspec_suffix)
8731 (c_type_print_base): Support printing rvalue reference types.
8732 * c-valprint.c (c_val_print, c_value_print): Support printing
8733 rvalue reference values.
8734
8735 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8736
8737 PR gdb/14441
8738 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8739 typename.
8740 * cp-support.c (replace_typedefs): Handle
8741 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8742 * python/py-type.c (typy_lookup_type): Likewise.
8743
8744 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8745
8746 PR gdb/14441
8747 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8748 * parse.c (insert_type): Change assert statement.
8749 (follow_types): Handle rvalue reference types.
8750 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8751 constant.
8752
8753 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8754
8755 PR gdb/14441
8756 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8757 value_ref() interface.
8758 * c-valprint.c (c_value_print): Likewise.
8759 * infcall.c (value_arg_coerce): Likewise.
8760 * python/py-value.c (valpy_reference_value): Likewise.
8761 * valops.c (value_cast, value_reinterpret_cast)
8762 (value_dynamic_cast, typecmp): Likewise.
8763 (value_ref): Parameterize by kind of return value reference type.
8764 * value.h (value_ref): Add new parameter "refcode".
8765
8766 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8767
8768 PR gdb/14441
8769 * dwarf2read.c (read_tag_reference_type): Use
8770 lookup_lvalue_reference_type() instead of lookup_reference_type().
8771 * eval.c (evaluate_subexp_standard): Likewise.
8772 * f-exp.y: Likewise.
8773 * gdbtypes.c (make_reference_type, lookup_reference_type):
8774 Generalize with rvalue reference types.
8775 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8776 convenience wrappers for lookup_reference_type().
8777 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8778 reference kind parameter.
8779 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8780 wrappers for lookup_reference_type().
8781 * guile/scm-type.c (gdbscm_type_reference): Use
8782 lookup_lvalue_reference_type() instead of lookup_reference_type().
8783 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8784 * parse.c (follow_types): Likewise.
8785 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8786 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8787 Likewise.
8788 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8789 (gdbpy_invoke_xmethod): Likewise.
8790 * stabsread.c: Provide extra argument to make_reference_type()
8791 call.
8792 * valops.c (value_ref, value_rtti_indirect_type): Use
8793 lookup_lvalue_reference_type() instead of lookup_reference_type().
8794
8795 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8796
8797 PR gdb/14441
8798 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8799 (TYPE_IS_REFERENCE): New macro.
8800 (struct type): Add rvalue_reference_type field.
8801 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8802
8803 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8804
8805 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8806 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8807 New function definition.
8808 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8809 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8810 New function declaration.
8811 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8812 * mi/mi-interp.h: New file.
8813 * solib.c (info_sharedlibrary_command): Replace for loop with
8814 ALL_SO_LIBS macro
8815 * solib.h (update_solib_list): New function declaration.
8816 (so_list_head): Move macro.
8817 * solist.h (ALL_SO_LIBS): New macro.
8818
8819 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8820
8821 * infcmd.c (post_create_inferior): Remove unused argument in
8822 call to solib_add.
8823 * remote.c (remote_start_remote): Likewise.
8824 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8825 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8826 (enable_break): Likewise.
8827 * solib.c (update_solib_list): Remove unused target argument
8828 and its documentation.
8829 (solib_add): Remove unused target argument. Remove unused
8830 argument in call to update_solib_list.
8831 (info_sharedlibrary_command): Remove unused argument in call
8832 to update_solib_list.
8833 (sharedlibrary_command): Remove unused argument in call to
8834 solib_add.
8835 (handle_solib_event): Likewise.
8836 (reload_shared_libraries): Likewise.
8837 * solib.h (solib_add): Remove unused target argument.
8838
8839 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8840
8841 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8842 (s390_displaced_step_fixup): Cover relative branches with the
8843 default fixup handling. This fixes lack of support for some
8844 relative branch instructions.
8845
8846 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8847
8848 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8849 ptid from regcache.
8850
8851 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8852
8853 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8854 i386_darwin_store_inferior_registers): Use ptid from regcache.
8855
8856 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8857
8858 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8859 i386bsd_store_inferior_registers): Use ptid from regcache.
8860
8861 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8862
8863 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8864 hppaobsd_store_registers): Use ptid from regcache.
8865
8866 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8867
8868 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8869 hppanbsd_store_registers): Use ptid from regcache.
8870
8871 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8872
8873 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8874 from regcache. Use get_ptrace_pid.
8875
8876 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8877
8878 * corelow.c (get_core_register_section): Use ptid from regcache,
8879 update doc.
8880
8881 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8882
8883 * bsd-uthread.c (bsd_uthread_fetch_registers,
8884 bsd_uthread_store_registers): Use ptid from regcache, set and
8885 restore inferior_ptid.
8886
8887 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8888
8889 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8890 fetch_fp_regs, store_register, store_regs, store_fp_register,
8891 store_fp_regs): Use ptid from regcache.
8892
8893 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8894
8895 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8896 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8897 store_vfp_regs): Use ptid from regcache.
8898
8899 2017-03-17 Pedro Alves <palves@redhat.com>
8900
8901 PR remote/21188
8902 * ser-base.c (ser_base_wait_for): Add comment.
8903 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8904 version.
8905 * ser-unix.c (hardwire_raw): Remove reference to
8906 scb->current_timeout.
8907 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8908 (hardwire_ops): Install ser_base_readchar instead of
8909 hardwire_readchar.
8910 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8911 Remove fields.
8912
8913 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
8914
8915 PR gdb/19637
8916 * python/lib/gdb/printer/bound_registers.py: Add support for
8917 Python 3.
8918
8919 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8920
8921 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8922 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8923 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8924 byte_offset to subobj_byte_offset. Fix the handling of
8925 DWARF_VALUE_STACK on big-endian targets when coming via an
8926 implicit pointer.
8927 (dwarf2_evaluate_loc_desc): Adjust call to
8928 dwarf2_evaluate_loc_desc_full.
8929 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8930 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8931
8932 2017-03-16 Yao Qi <yao.qi@linaro.org>
8933
8934 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8935 and REVSH instructions.
8936
8937 2017-03-16 Yao Qi <yao.qi@linaro.org>
8938
8939 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8940 (arm_record_test): Declare.
8941 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8942 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8943 align with the manual.
8944 (thumb_record_misc): Adjust the code order to align with the
8945 manual.
8946 (thumb2_record_decode_insn_handler): Fix instruction matching.
8947 (instruction_reader_thumb): New class.
8948 (arm_record_test): New function.
8949
8950 2017-03-16 Yao Qi <yao.qi@linaro.org>
8951
8952 * arm-tdep.c (abstract_memory_reader): New class.
8953 (instruction_reader): New class.
8954 (extract_arm_insn): Add argument 'reader'. Callers updated.
8955 (decode_insn): Likewise.
8956
8957 2017-03-16 Doug Evans <dje@google.com>
8958
8959 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8960 member. Change type of TYPE member to SCM. All uses updated.
8961 (lsscm_make_lazy_string_smob): Add assert.
8962 (lsscm_make_lazy_string): Flag bad length values.
8963 (lsscm_elt_type): New function.
8964 (gdbscm_lazy_string_to_value): Rewrite to use
8965 lsscm_safe_lazy_string_to_value.
8966 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8967 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8968 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8969 in incoming type.
8970 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8971 * guile/scm-type.c (tyscm_scm_to_type): New function.
8972
8973 2017-03-15 Doug Evans <dje@google.com>
8974
8975 PR python/17728, python/18439, python/18779
8976 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8977 member. Change type of TYPE member to PyObject *. All uses updated.
8978 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8979 (gdbpy_create_lazy_string_object): Flag bad length values.
8980 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8981 Handle typedefs in incoming type.
8982 (stpy_lazy_string_elt_type): New function.
8983 (gdbpy_extract_lazy_string): Call it.
8984 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8985 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8986 typedefs in incoming type.
8987
8988 2017-03-16 Doug Evans <dje@google.com>
8989
8990 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8991 * guile/scm-type.c (tyscm_scm_to_type): New function.
8992
8993 2017-03-16 Jiong Wang <jiong.wang@arm.com>
8994
8995 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8996 "ULONGEST" for "skip".
8997
8998 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8999
9000 PR gdb/21220
9001 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9002 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9003 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9004 over ptrace peek/poke until end of buffer or error.
9005
9006 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9007
9008 * parse.c (length_of_subexp): Make static.
9009 * parser-defs.h (length_of_subexp): Remove.
9010
9011 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9012
9013 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9014 as well.
9015
9016 2017-03-14 Pedro Alves <palves@redhat.com>
9017
9018 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9019 (main): Use std::unique_ptr. Remove calls to
9020 cp_demangled_name_parse_free.
9021
9022 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9023
9024 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9025 alphabsd_store_inferior_registers): Use regcache->ptid instead
9026 of inferior_ptid.
9027
9028 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9029
9030 * aix-thread.c (aix_thread_fetch_registers,
9031 aix_thread_store_registers): Use regcache->ptid instead of
9032 inferior_ptid.
9033
9034 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9035
9036 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9037 store_gregs_to_thread, fetch_fpregs_from_thread,
9038 store_fpregs_to_thread): Use regcache->ptid instead of
9039 inferior_ptid.
9040
9041 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9042
9043 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9044 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9045 instead of inferior_ptid.
9046
9047 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9048
9049 * target.c (target_fetch_registers, target_store_registers): Add
9050 assert.
9051
9052 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9053
9054 * regcache.h (regcache_get_ptid): New function.
9055 * regcache.c (regcache_get_ptid): New function.
9056
9057 2017-03-13 Mark Wielaard <mark@klomp.org>
9058
9059 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9060
9061 2017-03-10 Keith Seitz <keiths@redhat.com>
9062
9063 PR c++/8218
9064 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9065
9066 2017-03-08 Pedro Alves <palves@redhat.com>
9067
9068 PR gdb/18360
9069 * infrun.c (start_step_over, do_target_resume, resume)
9070 (restart_threads): Assert we're not resuming a thread that is
9071 meant to be stopped.
9072 (infrun_thread_stop_requested_callback): Delete.
9073 (infrun_thread_stop_requested): If the thread is internally
9074 stopped, queue a pending stop event and clear the thread's
9075 inline-frame state.
9076 (handle_stop_requested): New function.
9077 (handle_syscall_event, handle_inferior_event_1): Use
9078 handle_stop_requested.
9079 (handle_stop_requested): New function.
9080 (handle_signal_stop): Set the thread's stop_signal here instead of
9081 at caller.
9082 (finish_step_over): Clear step over info unconditionally.
9083 (handle_signal_stop): If the user had interrupted the event
9084 thread, consider the stop a random signal.
9085 (handle_signal_stop) <signal arrived while stepping over
9086 breakpoint>: Don't restart threads here.
9087 (stop_waiting): Don't clear step-over info here.
9088
9089 2017-03-08 Pedro Alves <palves@redhat.com>
9090
9091 PR 21206
9092 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9093 goes to argument 2, not 1.
9094
9095 2017-03-08 Pedro Alves <palves@redhat.com>
9096
9097 PR cli/21218
9098 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9099 display_gdb_prompt.
9100 (command_line_input): Add comment.
9101
9102 2017-03-08 Pedro Alves <palves@redhat.com>
9103
9104 PR tui/21216
9105 * tui/tui-file.c (tui_file::write): New.
9106 * tui/tui-file.h (tui_file): Override "write".
9107 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9108 factored out from ...
9109 (tui_puts): ... here.
9110 (tui_putc): Use them.
9111 (tui_write): New function.
9112 * tui/tui-io.h (tui_write): Declare.
9113
9114 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9115
9116 * Makefile.in (SFILES): Replace "environ.c" with
9117 "common/environ.c".
9118 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9119 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9120 to...
9121 * common/environ.c: ... here.
9122 * environ.h: Moved to...
9123 * common/environ.h: ... here.
9124
9125 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9126
9127 * gdbarch.sh (pstring_ptr): New static function.
9128 (gdbarch_disassembler_options): Use it.
9129 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9130 not valid_disassembler_option->name.
9131 * gdbarch.c: Regenerate.
9132
9133 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9134
9135 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9136
9137 2017-03-07 Pedro Alves <palves@redhat.com>
9138
9139 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9140
9141 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9142
9143 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9144 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9145 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9146 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9147
9148 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9149
9150 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9151
9152 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9153
9154 * remote.c (remote_add_target_side_commands): Use range-based
9155 for loop.
9156
9157 2017-03-03 Yao Qi <yao.qi@linaro.org>
9158
9159 PR gdb/21165
9160 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9161 value is lazy.
9162 * valprint.c (common_val_print): Likewise.
9163
9164 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9165
9166 * NEWS: Mention new set/show disassembler-options commands.
9167 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9168 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9169 (prospective_options): New static variable.
9170 (gdb_disassembler::gdb_disassembler): Initialize
9171 m_di.disassembler_options.
9172 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9173 (get_disassembler_options): New function.
9174 (set_disassembler_options): Likewise.
9175 (set_disassembler_options_sfunc): Likewise.
9176 (show_disassembler_options_sfunc): Likewise.
9177 (disassembler_options_completer): Likewise.
9178 (_initialize_disasm): Likewise.
9179 * disasm.h (get_disassembler_options): New prototype.
9180 (set_disassembler_options): Likewise.
9181 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9182 (gdbarch_verify_disassembler_options): Likewise.
9183 * gdbarch.c: Regenerate.
9184 * gdbarch.h: Likewise.
9185 * arm-tdep.c (num_disassembly_options): Delete.
9186 (set_disassembly_style): Likewise.
9187 (arm_disassembler_options): New static variable.
9188 (set_disassembly_style_sfunc): Convert short style name into long
9189 option name. Call set_disassembler_options.
9190 (show_disassembly_style_sfunc): New function.
9191 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9192 set_gdbarch_verify_disassembler_options.
9193 (_initialize_arm_tdep): Delete regnames variable and update callers.
9194 (arm_disassembler_options): Initialize.
9195 (disasm_options): New variable.
9196 (num_disassembly_options): Rename from this...
9197 (num_disassembly_styles): ...to this. Compute by scanning through
9198 disasm_options.
9199 (valid_disassembly_styles): Initialize using disasm_options.
9200 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9201 set_arm_regname_option.
9202 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9203 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9204 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9205 set_gdbarch_verify_disassembler_options.
9206 * s390-tdep.c (s390_disassembler_options): New static variable.
9207 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9208 set_gdbarch_verify_disassembler_options.
9209
9210 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9211
9212 * remote.c (remote_add_target_side_condition): Remove "struct"
9213 keyword from range-based for loop.
9214
9215 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9216
9217 * remote.c (remote_add_target_side_condition): Use range-based
9218 for loop. Update comment.
9219
9220 2017-02-27 Yao Qi <yao.qi@linaro.org>
9221
9222 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9223
9224 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9225
9226 * regcache.c (regcache_raw_update): New function.
9227 (regcache_raw_read): Move code to regcache_raw_update.
9228 * regcache.h (regcache_raw_update): New declaration.
9229 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9230
9231 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9232
9233 * dwarf2read.c (create_debug_type_hash_table): Initialize
9234 header.signature and header.type_offset_in_tu.
9235
9236 2017-02-24 Pedro Alves <palves@redhat.com>
9237
9238 * symtab.c (make_file_symbol_completion_list_1): Use
9239 add_symtab_completions.
9240
9241 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9242
9243 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9244
9245 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9246
9247 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9248 I386_MAX_REGISTER_SIZE.
9249 (i386_pseudo_register_write): Likewise.
9250 (i386_process_record): Likewise.
9251 * i387-tdep.c (i387_supply_xsave): Likewise.
9252 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9253 (store_register): Likewise.
9254
9255 2017-02-23 Pedro Alves <palves@redhat.com>
9256
9257 * ada-lang.c: Include "common/function-view.h".
9258 (ada_iterate_over_symbols): Adjust to use function_view as
9259 callback type.
9260 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9261 (ada_make_symbol_completion_list): Use a lambda.
9262 (ada_exc_search_name_matches): Delete.
9263 (name_matches_regex): New.
9264 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9265 * compile/compile-c-support.c: Include "common/function-view.h".
9266 (print_one_macro): Change prototype to accept a ui_file pointer.
9267 (write_macro_definitions): Use a lambda.
9268 * dwarf2read.c: Include "common/function-view.h".
9269 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9270 (dw2_expand_symtabs_matching): Adjust to use function_view as
9271 callback type.
9272 * language.h: Include "common/function-view.h".
9273 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9274 function_view as callback type.
9275 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9276 * linespec.c: Include "common/function-view.h".
9277 (collect_info::add_symbol): New method.
9278 (struct symbol_and_data_callback, iterate_inline_only, struct
9279 symbol_matcher_data, iterate_name_matcher): Delete.
9280 (iterate_over_all_matching_symtabs): Adjust to use function_view
9281 as callback type and lambdas.
9282 (iterate_over_file_blocks): Adjust to use function_view as
9283 callback type.
9284 (decode_compound_collector): Now a class with private fields.
9285 (decode_compound_collector::release_symbols): New method.
9286 (collect_one_symbol): Rename to...
9287 (decode_compound_collector::operator()): ... this and adjust.
9288 (lookup_prefix_sym): decode_compound_collector construction bits
9289 move to decode_compound_collector ctor. Pass the
9290 decode_compound_collector object directly as callback. Remove
9291 cleanups and use decode_compound_collector::release_symbols
9292 instead.
9293 (symtab_collector): Now a class with private fields.
9294 (symtab_collector::release_symtabs): New method.
9295 (add_symtabs_to_list): Rename to...
9296 (symtab_collector::operator()): ... this and adjust.
9297 (collect_symtabs_from_filename): symtab_collector construction
9298 bits move to symtab_collector ctor. Pass the symtab_collector
9299 object directly as callback. Remove cleanups and use
9300 symtab_collector::release_symtabs instead.
9301 (collect_symbols): Delete.
9302 (add_matching_symbols_to_info): Use lambdas.
9303 * macrocmd.c (print_macro_callback): Delete.
9304 (info_macro_command): Use a lambda.
9305 (info_macros_command): Pass print_macro_definition as callable
9306 directly.
9307 (print_one_macro): Remove 'ignore' parameter.
9308 (macro_list_command): Adjust.
9309 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9310 (macro_for_each_data::user_data): Delete field.
9311 (foreach_macro): Adjust to call the function_view.
9312 (macro_for_each): Adjust to use function_view as callback type.
9313 (foreach_macro_in_scope): Adjust to call the function_view.
9314 (macro_for_each_in_scope): Adjust to use function_view as callback
9315 type.
9316 * macrotab.h: Include "common/function-view.h".
9317 (macro_callback_fn): Declare a prototype instead of a pointer.
9318 Remove "user_data" parameter.
9319 (macro_for_each, macro_for_each_in_scope): Adjust to use
9320 function_view as callback type.
9321 * psymtab.c (partial_map_expand_apply)
9322 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9323 Adjust to use function_view as callback type and to return bool.
9324 (psym_expand_symtabs_matching): Adjust to use function_view as
9325 callback types.
9326 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9327 to use function_view as callback type and to return bool.
9328 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9329 callback types.
9330 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9331 as callback types.
9332 * symfile.h: Include "common/function-view.h".
9333 (expand_symtabs_file_matcher_ftype)
9334 (expand_symtabs_symbol_matcher_ftype)
9335 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9336 return bool.
9337 (quick_symbol_functions::map_symtabs_matching_filename)
9338 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9339 function_view as callback type and return bool.
9340 (expand_symtabs_matching): Adjust to use function_view as callback
9341 type.
9342 (maintenance_expand_name_matcher)
9343 (maintenance_expand_file_matcher): Delete.
9344 (maintenance_expand_symtabs): Use lambdas.
9345 * symtab.c (iterate_over_some_symtabs): Adjust to use
9346 function_view as callback types and return bool.
9347 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9348 of a cleanup.
9349 (lookup_symtab_callback): Delete.
9350 (lookup_symtab): Use a lambda.
9351 (iterate_over_symbols): Adjust to use function_view as callback
9352 type.
9353 (struct search_symbols_data, search_symbols_file_matches)
9354 (search_symbols_name_matches): Delete.
9355 (search_symbols): Use a pair of lambdas.
9356 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9357 (symtab_expansion_callback): Delete.
9358 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9359 * symtab.h: Include "common/function-view.h".
9360 (iterate_over_some_symtabs): Adjust to use function_view as
9361 callback type and return bool.
9362 (iterate_over_symtabs): Adjust to use function_view as callback
9363 type.
9364 (symbol_found_callback_ftype): Remove 'data' parameter and return
9365 bool.
9366 (iterate_over_symbols): Adjust to use function_view as callback
9367 type.
9368
9369 2017-02-23 Pedro Alves <palves@redhat.com>
9370
9371 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9372 (%.o) <unittests/%.c>: New pattern.
9373 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9374 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9375 * common/function-view.h: New file.
9376 * unittests/function-view-selftests.c: New file.
9377 * configure: Regenerate.
9378
9379 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9380
9381 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9382 inferior_ptid.
9383 * go32-nat.c (go32_thread_alive): Likewise.
9384
9385 2017-02-23 Yao Qi <yao.qi@linaro.org>
9386
9387 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9388 delete.
9389
9390 2017-02-23 Yao Qi <yao.qi@linaro.org>
9391
9392 * varobj.c (varobj_clear_saved_item): Use delete instead of
9393 xfree.
9394 (update_dynamic_varobj_children): Likewise.
9395
9396 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9397
9398 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9399
9400 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9401
9402 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9403 m_enum_value to 0 in default constructor.
9404
9405 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9406
9407 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9408 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9409 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9410 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9411 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9412 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9413 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9414 IS_STORE_CONDITIONAL_INSN.
9415
9416 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9417
9418 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9419
9420 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9421
9422 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9423
9424 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9425
9426 * dwarf2read.c (skip_one_die, read_attribute_value)
9427 (dwarf2_const_value_attr, dump_die_shallow)
9428 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9429 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9430
9431 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9432
9433 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9434 (dwarf_parse_macro_header): Accept DWARF version 5.
9435 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9436
9437 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9438
9439 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9440 DW_AT_GNU_*.
9441 * common/common-exceptions.h (enum errors): Likewise.
9442 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9443 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9444 (dwarf_expr_context::execute_stack_op): Likewise.
9445 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9446 Likewise.
9447 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9448 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9449 (show_entry_values_debug, call_site_to_target_addr)
9450 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9451 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9452 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9453 (value_of_dwarf_block_entry, indirect_pieced_value)
9454 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9455 (disassemble_dwarf_expression): Likewise.
9456 * dwarf2read.c (process_die, inherit_abstract_dies)
9457 (read_call_site_scope): Likewise.
9458 * gdbtypes.h (struct func_type, struct call_site_parameter)
9459 (struct call_site): Likewise.
9460 * stack.c (read_frame_arg): Likewise.
9461 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9462
9463 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9464
9465 * defs.h (read_unsigned_leb128): New declaration.
9466 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9467 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9468 (dwarf2_find_location_expression): Call also
9469 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9470 * dwarf2loc.h (dwarf2_version): New declaration.
9471 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9472 rnglists.
9473 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9474 .debug_rnglists.
9475 (struct dwop_section_names): Add loclists_dwo.
9476 (dwop_section_names): Add .debug_loclists.dwo.
9477 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9478 (struct dwarf2_per_cu_data): Add dwarf_version.
9479 (struct dwo_sections): Add loclists.
9480 (struct attr_abbrev): Add implicit_const.
9481 (read_indirect_line_string): New declaration.
9482 (read_unsigned_leb128): Delete declaration.
9483 (rcuh_kind): New definition.
9484 (read_and_check_comp_unit_head): Change parameter
9485 is_debug_types_section to section_kind.
9486 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9487 (read_comp_unit_head): Change parameter abfd to section, add parameter
9488 section_kind. Handle DWARF-5.
9489 (error_check_comp_unit_head): Accept also DWARF version 5.
9490 (read_and_check_comp_unit_head): Change parameter
9491 is_debug_types_section to section_kind.
9492 (read_and_check_type_unit_head): Delete function.
9493 (read_abbrev_offset): Handle DWARF-5.
9494 (create_debug_type_hash_table): Add parameter section_kind. Process
9495 only DW_UT_type. Use signature and type_offset_in_tu from struct
9496 comp_unit_head.
9497 (create_debug_types_hash_table): Update create_debug_type_hash_table
9498 caller.
9499 (create_all_type_units): Call create_debug_type_hash_table.
9500 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9501 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9502 caller.
9503 (skip_one_die): Handle DW_FORM_implicit_const.
9504 (dwarf2_rnglists_process): New function.
9505 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9506 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9507 (read_attribute_value): Handle DW_FORM_implicit_const,
9508 DW_FORM_line_strp.
9509 (read_attribute): Handle DW_FORM_implicit_const.
9510 (read_indirect_string_at_offset_from): New function from
9511 read_indirect_string_at_offset.
9512 (read_indirect_string_at_offset): Call
9513 read_indirect_string_at_offset_from.
9514 (read_indirect_line_string_at_offset): New function.
9515 (read_indirect_string): New function comment.
9516 (read_indirect_line_string): New function.
9517 (read_unsigned_leb128): Make it global.
9518 (dwarf2_string_attr): Handle DWARF-5.
9519 (add_include_dir_stub, read_formatted_entries): New functions.
9520 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9521 Handle DWARF-5.
9522 (per_cu_header_read_in): Update read_comp_unit_head caller.
9523 (dwarf2_version): New function.
9524 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9525 rnglists.
9526 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9527 fields.
9528
9529 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9530
9531 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9532
9533 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9534
9535 * dwarf2read.c (dwarf2_ranges_process): New function from
9536 dwarf2_ranges_read.
9537 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9538 dwarf2_ranges_process.
9539
9540 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9541
9542 * dwarf2read.c (create_debug_type_hash_table): New function from
9543 create_debug_types_hash_table.
9544 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9545 (create_all_type_units, open_and_init_dwo_file): Update
9546 create_debug_types_hash_table callers.
9547
9548 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9549
9550 PR gdb/16188
9551 * fork-child.c (trace_start_error): Fix thinko. va_end should
9552 refer to 'ap', not 'args'.
9553
9554 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9555 Pedro Alves <palves@redhat.com>
9556
9557 PR gdb/16188
9558 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9559 calls succeeded.
9560 * fork-child.c (trace_start_error): New function.
9561 (trace_start_error_with_name): Likewise.
9562 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9563 * inf-ptrace.c (inf_ptrace_me): Likewise.
9564 * inferior.h (trace_start_error): New prototype.
9565 (trace_start_error_with_name): Likewise.
9566
9567 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9568
9569 PR gdb/21164
9570 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9571 NULL before using it.
9572 * symmisc.c (maintenance_print_symbols): Likewise.
9573 (maintenance_print_msymbols): Likewise.
9574
9575 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9576
9577 * NEWS: Add record Python bindings entry.
9578
9579 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9580
9581 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9582 py-record-full.o.
9583 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9584 * python/py-record-btrace.c, python/py-record-btrace.h,
9585 python/py-record-full.c, python/py-record-full.h: New file.
9586 * python/py-record.c: Add include for py-record-btrace.h and
9587 py-record-full.h.
9588 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9589 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9590 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9591 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9592 New definition.
9593 (gdbpy_initialize_btrace): New export.
9594 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9595
9596 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9597
9598 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9599 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9600 * python/py-record.c: New file.
9601 * python/python-internal.h (gdbpy_start_recording,
9602 gdbpy_current_recording, gdpy_stop_recording,
9603 gdbpy_initialize_record): New export.
9604 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9605 (python_GdbMethods): Add gdbpy_start_recording,
9606 gdbpy_current_recording and gdbpy_stop_recording.
9607
9608 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9609
9610 * record-btrace.c (record_btrace_record_method): New function.
9611 (init_record_btrace_ops): Initialize to_record_method.
9612 * record-full.c (record_full_record_method): New function.
9613 (init_record_full_ops, init_record_full_core_ops): Add
9614 record_full_record_method.
9615 * record.h (enum record_method): New enum.
9616 * target-debug.h (target_debug_print_enum_record_method: New define.
9617 * target-delegates.c: Regenerate.
9618 * target.c (target_record_method): New function.
9619 * target.h: Include record.h.
9620 (struct target_ops) <to_record_method>: New field.
9621 (target_record_method): New export.
9622
9623 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9624
9625 * record.h (record_start, record_stop): New export.
9626 * record.c (record_start, record_stop): New function.
9627
9628 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9629
9630 * btrace.c (btrace_fetch): Copy function call segments pointer
9631 into a vector.
9632 (btrace_clear): Clear the vector.
9633 (btrace_find_insn_by_number): Use binary search to find the correct
9634 function call segment.
9635 * btrace.h (brace_fun_p): New typedef.
9636 (struct btrace_thread_info) <functions>: New field.
9637
9638 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9639
9640 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9641 * btrace.c (btrace_decode_error): ... here. New function.
9642 * btrace.h (btrace_decode_error): New export.
9643
9644 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9645
9646 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9647 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9648 btrace_find_insn_by_number): Remove special case for gaps.
9649 * btrace.h (btrace_insn_get_error): New export.
9650 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9651 * record-btrace.c (btrace_insn_history): Print number for gaps.
9652 (record_btrace_info, record_btrace_goto): Handle gaps.
9653
9654 2017-02-14 Tom Tromey <tom@tromey.com>
9655
9656 PR python/13598:
9657 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9658 event.
9659 * python/py-evts.c (gdbpy_initialize_py_events): Add
9660 before_prompt registry.
9661 * python/py-events.h (events_object) <before_prompt>: New field.
9662
9663 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9664
9665 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9666
9667 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9668
9669 * symfile (_initialize_symfile): Add usage text to the load command's
9670 help text.
9671
9672 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9673
9674 * utils.c (defaulted_query): Don't query on secondary UIs.
9675
9676 2017-02-10 Tom Tromey <tom@tromey.com>
9677
9678 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9679
9680 2017-02-10 Tom Tromey <tom@tromey.com>
9681
9682 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9683 "cleanup" local.
9684 * python/py-type.c (typy_legacy_template_argument): Remove
9685 unnecessary "cleanup" local.
9686
9687 2017-02-10 Tom Tromey <tom@tromey.com>
9688
9689 * python/python.c (do_start_initialization): New function, from
9690 _initialize_python.
9691 (_initialize_python): Call do_start_initialization.
9692 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9693 goto.
9694
9695 2017-02-10 Tom Tromey <tom@tromey.com>
9696
9697 * python/py-prettyprint.c (pretty_print_one_value): Use
9698 gdbpy_ref.
9699
9700 2017-02-10 Tom Tromey <tom@tromey.com>
9701
9702 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9703 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9704 gdbpy_ref.
9705 * python/py-type.c (field_new): Use gdbpy_ref.
9706 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9707 gdbpy_ref.
9708 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9709 (py_free_pspace): Likewise.
9710 (pspace_to_pspace_object): Likewise.
9711 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9712 (py_free_objfile): Likewise.
9713 (objfile_to_objfile_object): Likewise.
9714 * python/py-inferior.c (delete_thread_object): Use
9715 gdbpy_ref.
9716 (infpy_read_memory): Likewise.
9717 (py_free_inferior): Likewise.
9718 * python/py-evtregistry.c (create_eventregistry_object): Use
9719 gdbpy_ref.
9720 * python/py-event.c (create_event_object): Use gdbpy_ref.
9721
9722 2017-02-10 Tom Tromey <tom@tromey.com>
9723
9724 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9725 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9726 used.
9727 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9728 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9729 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9730 python/py-framefilter.c, python/py-function.c,
9731 python/py-inferior.c, python/py-infevents.c,
9732 python/py-linetable.c, python/py-newobjfileevent.c,
9733 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9734 python/py-signalevent.c, python/py-stopevent.c,
9735 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9736 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9737 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9738 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9739
9740 2017-02-10 Tom Tromey <tom@tromey.com>
9741
9742 * ui-out.h (ui_out_emit_type): New class.
9743 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9744 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9745 and ui_out_emit_tuple.
9746 (enumerate_locals): Likewise.
9747 (py_mi_print_variables, py_print_locals, py_print_args): Use
9748 ui_out_emit_list.
9749 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9750 ui_out_emit_list.
9751 * common/gdb_optional.h: New file.
9752
9753 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9754
9755 * MAINTAINERS (Write After Approval): Update my e-mail address.
9756
9757 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9758
9759 PR gdb/21122
9760 * breakpoint.c (_initialize_breakpoint): Update the help description
9761 of the 'commands' command to indicate that it takes a list argument.
9762
9763 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9764
9765 * interps.c (current_interp_set_logging): Remove "return".
9766
9767 2017-02-09 Gary Benson <gbenson@redhat.com>
9768
9769 * symtab.c (add_symtab_completions): Prevent NULL pointer
9770 dereference.
9771
9772 2017-02-08 Pedro Alves <palves@redhat.com>
9773
9774 * interps.c (interp::interp): Remove reference to quiet_p.
9775 (interp_set): Make static. Remove dead "Switching to" output
9776 code.
9777 (interp_quiet_p, interp_set_quiet): Delete.
9778 (interpreter_exec_cmd): Don't set the interpreter quiet.
9779 * interps.h (interp_quiet_p): Make static.
9780 (class interp) <quiet_p>: Remove field
9781
9782 2017-02-08 Jerome Guitton <guitton@adacore.com>
9783
9784 * cli/cli-decode.c (find_command_name_length): Make it extern.
9785 * cli/cli-decode.h (find_command_name_length): Declare.
9786 * cli/cli-script.c (command_name_equals, line_first_arg):
9787 New functions.
9788 (process_next_line): Use cli-decode to parse command names.
9789 (build_command_line): Make args a constant pointer.
9790
9791 2017-02-08 Jerome Guitton <guitton@adacore.com>
9792
9793 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9794 Remove case-insensitive search.
9795
9796 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9797
9798 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9799 at the end of the line. Avoids an ARI warning.
9800
9801 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
9802
9803 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9804 rdseed instructions.
9805 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9806
9807 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9808
9809 PR tdep/20936
9810 Provide and use sparc32 and sparc64 target description XML files.
9811 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9812 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9813 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9814 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9815 * features/sparc/sparc32-solaris.xml: New file.
9816 * features/sparc/sparc64-solaris.xml: New file.
9817 * features/sparc/sparc32-solaris.c: Generated.
9818 * features/sparc/sparc64-solaris.c: Generated.
9819 * sparc-tdep.h: Account for differences in target descriptions.
9820 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9821 (sparc32_register_type): Use target provided registers.
9822 (validate_tdesc_registers): New function.
9823 (sparc32_gdbarch_init): Use tdesc_has_registers.
9824 Set pseudoregister functions.
9825 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9826 (sparc64_register_type): Use target provided registers.
9827 (sparc64_init_abi): Set pseudoregister functions.
9828
9829 2017-02-03 Tom Tromey <tom@tromey.com>
9830
9831 PR rust/21097:
9832 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9833 with a single member.
9834
9835 2017-02-03 Pedro Alves <palves@redhat.com>
9836
9837 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9838 (cli_interp_base::~cli_interp_base): New.
9839 (cli_interp): New struct.
9840 (as_cli_interp): Cast the interp itself to cli_interp.
9841 (cli_interpreter_pre_command_loop): Rename to ...
9842 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9843 parameter.
9844 (cli_interpreter_init): Rename to ...
9845 (cli_interp::init): ... this. Remove 'self' parameter. Use
9846 boolean. Make extern.
9847 (cli_interpreter_resume): Rename to ...
9848 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9849 extern.
9850 (cli_interpreter_suspend): Rename to ...
9851 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9852 extern.
9853 (cli_interpreter_exec): Rename to ...
9854 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9855 extern.
9856 (cli_interpreter_supports_command_editing): Rename to ...
9857 (cli_interp_base::supports_command_editing): ... this. Remove
9858 'interp' parameter. Make extern.
9859 (cli_ui_out): Rename to ...
9860 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9861 Make extern.
9862 (cli_set_logging): Rename to ...
9863 (cli_interp_base::set_logging): ... this. Remove 'interp'
9864 parameter. Make extern.
9865 (cli_interp_procs): Delete.
9866 (cli_interp_factory): Adjust to use "new".
9867 * cli/cli-interp.h: Include "interps.h".
9868 (struct cli_interp_base): New struct.
9869 * interps.c (struct interp): Delete. Fields moved to interps.h.
9870 (interp_new): Delete.
9871 (interp::interp, interp::~interp): New.
9872 (interp_set): Use bool, and return void. Assume the interpreter
9873 has suspend, init and resume methods, and that the all return
9874 void.
9875 (set_top_level_interpreter): interp_set returns void.
9876 (interp_ui_out): Adapt.
9877 (current_interp_set_logging): Adapt.
9878 (interp_data): Delete.
9879 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9880 (interp_exec): Adapt.
9881 (top_level_interpreter_data): Delete.
9882 * interps.h (interp_init_ftype, interp_resume_ftype)
9883 (interp_suspend_ftype, interp_exec_ftype)
9884 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9885 (class interp): New.
9886 (interp_new): Delete.
9887 (interp_set): Now returns void. Use bool.
9888 (interp_data, top_level_interpreter_data): Delete.
9889 * mi/mi-common.h: Include interps.h.
9890 (class mi_interp): Inherit from interp. Define a ctor. Declare
9891 init, resume, suspect, exec, interp_ui_out, set_logging and
9892 pre_command_loop methods.
9893 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9894 (mi_interpreter_init): Rename to ...
9895 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9896 bool, return void and make extern. Adjust.
9897 (mi_interpreter_resume): ... Rename to ...
9898 (mi_interp::resume): ... this. Remove the 'data' parameter,
9899 return void and make extern. Adjust.
9900 (mi_interpreter_suspend): ... Rename to ...
9901 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9902 return void and make extern. Adjust.
9903 (mi_interpreter_exec): ... Rename to ...
9904 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9905 extern. Adjust.
9906 (mi_interpreter_pre_command_loop): ... Rename to ...
9907 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9908 parameter and make extern.
9909 (mi_on_normal_stop_1): Adjust.
9910 (mi_ui_out): Rename to ...
9911 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9912 parameter and make extern. Adjust.
9913 (mi_set_logging): Rename to ...
9914 (mi_interp::set_logging): ... this. Remove the 'interp'
9915 parameter and make extern. Adjust.
9916 (mi_interp_procs): Delete.
9917 (mi_interp_factory): Adjust to use 'new'.
9918 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9919 (mi_print_exception, mi_execute_command, mi_load_progress):
9920 Adjust.
9921 * tui/tui-interp.c (tui_interp): New class.
9922 (as_tui_interp): Return a tui_interp pointer.
9923 (tui_on_normal_stop, tui_on_signal_received)
9924 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9925 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9926 to use interp::interp_ui_out.
9927 (tui_init): Rename to ...
9928 (tui_interp::init): ... this. Remove the 'self' parameter, use
9929 bool, return void and make extern. Adjust.
9930 (tui_resume): Rename to ...
9931 (tui_interp::resume): ... this. Remove the 'data' parameter,
9932 return void and make extern. Adjust.
9933 (tui_suspend): Rename to ...
9934 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9935 return void and make extern. Adjust.
9936 (tui_ui_out): Rename to ...
9937 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9938 parameter, and make extern. Adjust.
9939 (tui_exec): Rename to ...
9940 (tui_interp::exec): ... this. Remove the 'data' parameter and
9941 make extern.
9942 (tui_interp_procs): Delete.
9943 (tui_interp_factory): Use "new".
9944
9945 2017-02-02 Tom Tromey <tom@tromey.com>
9946
9947 * rust-exp.y (ends_raw_string, space_then_number)
9948 (rust_identifier_start_p): Return bool.
9949 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9950 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9951 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9952 (rust_chartype_p): Return bool.
9953 (val_print_struct, rust_print_struct_def, rust_print_type):
9954 Update.
9955 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9956 Return bool.
9957
9958 2017-02-02 Tom Tromey <tom@tromey.com>
9959
9960 * rust-lang.c: Reindent.
9961
9962 2017-02-02 Tom Tromey <tom@tromey.com>
9963
9964 * rust-lang.h (rust_crate_for_block): Update.
9965 * rust-lang.c (rust_crate_for_block): Return std::string.
9966 (rust_get_disr_info): Use std:;string, not
9967 gdb::unique_xmalloc_ptr.
9968 * rust-exp.y (crate_name): Update.
9969
9970 2017-02-02 Pedro Alves <palves@redhat.com>
9971
9972 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9973 field out of gdb_disassembler_test and make it static.
9974
9975 2017-02-02 Pedro Alves <palves@redhat.com>
9976
9977 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9978 mi1_interp and mi_interp fields.
9979
9980 2017-02-02 Pedro Alves <palves@redhat.com>
9981
9982 * cli/cli-interp.c (struct saved_output_files, saved_output):
9983 Moved from cli/cli-logging.c.
9984 (cli_set_logging): New function.
9985 (cli_interp_procs): Install cli_set_logging.
9986 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9987 Declare.
9988 * cli/cli-logging.c (struct saved_output_files, saved_output):
9989 Moved to cli/cli-interp.c.
9990 (pop_output_files): Don't save outputs here.
9991 (make_logging_output): New function.
9992 (handle_redirections): Don't build tee nor save previous outputs
9993 here.
9994 * interps.c (current_interp_set_logging): Change prototype.
9995 Assume there's always a set_logging_proc method installed.
9996 * interps.h (interp_set_logging_ftype): Change prototype.
9997 (current_interp_set_logging): Change prototype and adjust comment.
9998 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9999 use make_logging_output.
10000 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10001 2017-02-02 Pedro Alves <palves@redhat.com>
10002
10003 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10004 from ...
10005 (set_logging_overwrite): ... here.
10006 (logging_no_redirect_file): Delete.
10007 (set_logging_redirect): Don't handle redirection on the fly.
10008 Instead warn that "logging off" / "logging on" is necessary.
10009 (pop_output_files): Delete references to logging_no_redirect_file.
10010 (show_logging_command): Always speak in terms of what will happen
10011 once logging is reenabled.
10012
10013 2017-02-02 Pedro Alves <palves@redhat.com>
10014
10015 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10016
10017 2017-02-02 Pedro Alves <palves@redhat.com>
10018
10019 * disasm.c (gdb_pretty_print_insn): Rename to ...
10020 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10021 Remove gdbarch parameter. Adapt to clear the object's buffers
10022 instead of allocating new buffers, and to print using the object's
10023 gdb_disassembler instead of calling gdb_print_insn.
10024 (dump_insns): Use gdb_pretty_print_disassembler.
10025 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10026 (gdb_pretty_print_disassembler): New class.
10027 * record-btrace.c (btrace_insn_history): Use
10028 gdb_pretty_print_disassembler.
10029
10030 2017-02-02 Pedro Alves <palves@redhat.com>
10031
10032 * ada-lang.c (type_as_string): Use string_file.
10033 * ada-valprint.c (ada_print_floating): Use string_file.
10034 * ada-varobj.c (ada_varobj_scalar_image)
10035 (ada_varobj_get_value_image): Use string_file.
10036 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10037 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10038 * breakpoint.c (update_inserted_breakpoint_locations)
10039 (insert_breakpoint_locations, reattach_breakpoints)
10040 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10041 (print_it_watchpoint): Use string_file.
10042 (save_breakpoints): Use stdio_file.
10043 * c-exp.y (oper): Use string_file.
10044 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10045 tee_file.
10046 (pop_output_files): Use delete.
10047 (handle_redirections): Use stdio_file and tee_file.
10048 * cli/cli-setshow.c (do_show_command): Use string_file.
10049 * compile/compile-c-support.c (c_compute_program): Use
10050 string_file.
10051 * compile/compile-c-symbols.c (generate_vla_size): Take a
10052 'string_file &' instead of a 'ui_file *'.
10053 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10054 of a 'ui_file *'. Use string_file.
10055 (generate_c_for_variable_locations): Take a 'string_file &'
10056 instead of a 'ui_file *'.
10057 * compile/compile-internal.h (generate_c_for_for_one_variable):
10058 Take a 'string_file &' instead of a 'ui_file *'.
10059 * compile/compile-loc2c.c (push, pushf, unary, binary)
10060 (print_label, pushf_register_address, pushf_register)
10061 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10062 'ui_file *'. Adjust.
10063 * compile/compile.c (compile_to_object): Use string_file.
10064 * compile/compile.h (compile_dwarf_expr_to_c)
10065 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10066 'ui_file *'.
10067 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10068 (replace_typedefs_qualified_name): Use string_file and
10069 obstack_copy0.
10070 * disasm.c (gdb_pretty_print_insn): Use string_file.
10071 (gdb_disassembly): Adjust reference the null_stream global.
10072 (do_ui_file_delete): Delete.
10073 (gdb_insn_length): Use null_stream.
10074 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10075 * dwarf2loc.c (dwarf2_compile_property_to_c)
10076 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10077 'string_file &' instead of a 'ui_file *'.
10078 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10079 * dwarf2read.c (do_ui_file_peek_last): Delete.
10080 (dwarf2_compute_name): Use string_file.
10081 * event-top.c (gdb_setup_readline): Use stdio_file.
10082 * gdbarch.sh (verify_gdbarch): Use string_file.
10083 * gdbtypes.c (safe_parse_type): Use null_stream.
10084 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10085 string_file.
10086 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10087 'string_file *' instead of a 'ui_file *'.
10088 (gdbscm_arch_disassemble): Use string_file.
10089 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10090 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10091 inherits from ui_file.
10092 (ioscm_file_port_delete, ioscm_file_port_rewind)
10093 (ioscm_file_port_put): Delete.
10094 (ioscm_file_port_write): Rename to ...
10095 (ioscm_file_port::write): ... this. Remove file_port_magic
10096 checks.
10097 (ioscm_file_port_new): Delete.
10098 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10099 ui_file_up.
10100 * guile/scm-type.c (tyscm_type_name): Use string_file.
10101 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10102 Use string_file.
10103 * infcmd.c (print_return_value_1): Use string_file.
10104 * infrun.c (print_target_wait_results): Use string_file.
10105 * language.c (add_language): Use string_file.
10106 * location.c (explicit_to_string_internal): Use string_file.
10107 * main.c (captured_main_1): Use null_file.
10108 * maint.c (maintenance_print_architecture): Use stdio_file.
10109 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10110 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10111 event_channel>: Change type to mi_console_file pointer.
10112 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10113 (mi_console_file_delete): Delete.
10114 (struct mi_console_file): Delete.
10115 (mi_console_file_magic): Delete.
10116 (mi_console_file_new): Delete.
10117 (mi_console_file::mi_console_file): New.
10118 (mi_console_file_delete): Delete.
10119 (mi_console_file_fputs): Delete.
10120 (mi_console_file::write): New.
10121 (mi_console_raw_packet): Delete.
10122 (mi_console_file::flush): New.
10123 (mi_console_file_flush): Delete.
10124 (mi_console_set_raw): Rename to ...
10125 (mi_console_file::set_raw): ... this.
10126 * mi/mi-console.h (class mi_console_file): New class.
10127 (mi_console_file_new, mi_console_set_raw): Delete.
10128 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10129 (mi_set_logging): Use delete and tee_file. Adjust.
10130 * mi/mi-main.c (output_register): Use string_file.
10131 (mi_cmd_data_evaluate_expression): Use string_file.
10132 (mi_cmd_data_read_memory): Use string_file.
10133 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10134 * mi/mi-out.c (mi_ui_out::main_stream): New.
10135 (mi_ui_out::rewind): Use main_stream and
10136 string_file.
10137 (mi_ui_out::put): Use main_stream and string_file.
10138 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10139 Allocate a 'string_file' instead.
10140 (mi_out_new): Don't allocate a mem_fileopen stream here.
10141 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10142 (mi_ui_out::main_stream): Declare method.
10143 * printcmd.c (eval_command): Use string_file.
10144 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10145 * python/py-arch.c (archpy_disassemble): Use string_file.
10146 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10147 * python/py-frame.c (frapy_str): Use string_file.
10148 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10149 Use string_file.
10150 * python/py-type.c (typy_str): Use string_file.
10151 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10152 * python/py-value.c (valpy_str): Use string_file.
10153 * record-btrace.c (btrace_insn_history): Use string_file.
10154 * regcache.c (regcache_print): Use stdio_file.
10155 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10156 * remote.c (escape_buffer): Use string_file.
10157 * rust-lang.c (rust_get_disr_info): Use string_file.
10158 * serial.c (serial_open_ops_1): Use stdio_file.
10159 (do_serial_close): Use delete.
10160 * stack.c (print_frame_arg): Use string_file.
10161 (print_frame_args): Remove local mem_fileopen stream, not used.
10162 (print_frame): Use string_file.
10163 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10164 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10165 Take a 'string_file *' instead of a 'ui_file *'.
10166 * top.c (new_ui): Use stdio_file and stderr_file.
10167 (free_ui): Use delete.
10168 (execute_command_to_string): Use string_file.
10169 (quit_confirm): Use string_file.
10170 * tracepoint.c (collection_list::append_exp): Use string_file.
10171 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10172 * tui/tui-file.c: Don't include "ui-file.h".
10173 (enum streamtype, struct tui_stream): Delete.
10174 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10175 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10176 (tui_file::tui_file): New method.
10177 (tui_file_fputs): Delete.
10178 (tui_file_get_strbuf): Delete.
10179 (tui_file::puts): New method.
10180 (tui_file_adjust_strbuf): Delete.
10181 (tui_file_flush): Delete.
10182 (tui_file::flush): New method.
10183 * tui/tui-file.h: Tweak intro comment.
10184 Include ui-file.h.
10185 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10186 (tui_file_adjust_strbuf): Delete declarations.
10187 (class tui_file): New class.
10188 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10189 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10190 (tui_register_format): Use string_stream.
10191 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10192 (tui_get_function_from_frame): Use string_file.
10193 * typeprint.c (type_to_string): Use string_file.
10194 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10195 (null_stream): New global.
10196 (ui_file_delete): Delete.
10197 (ui_file::ui_file): New.
10198 (null_file_isatty): Delete.
10199 (ui_file::~ui_file): New.
10200 (null_file_rewind): Delete.
10201 (ui_file::printf): New.
10202 (null_file_put): Delete.
10203 (null_file_flush): Delete.
10204 (ui_file::putstr): New.
10205 (null_file_write): Delete.
10206 (ui_file::putstrn): New.
10207 (null_file_read): Delete.
10208 (ui_file::putc): New.
10209 (null_file_fputs): Delete.
10210 (null_file_write_async_safe): Delete.
10211 (ui_file::vprintf): New.
10212 (null_file_delete): Delete.
10213 (null_file::write): New.
10214 (null_file_fseek): Delete.
10215 (null_file::puts): New.
10216 (ui_file_data): Delete.
10217 (null_file::write_async_safe): New.
10218 (gdb_flush, ui_file_isatty): Adjust.
10219 (ui_file_put, ui_file_rewind): Delete.
10220 (ui_file_write): Adjust.
10221 (ui_file_write_for_put): Delete.
10222 (ui_file_write_async_safe, ui_file_read): Adjust.
10223 (ui_file_fseek): Delete.
10224 (fputs_unfiltered): Adjust.
10225 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10226 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10227 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10228 (set_ui_file_data): Delete.
10229 (string_file::~string_file, string_file::write)
10230 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10231 (do_ui_file_as_string, ui_file_as_string): Delete.
10232 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10233 (struct mem_file): Delete.
10234 (mem_file_new): Delete.
10235 (stdio_file::stdio_file): New.
10236 (mem_file_delete): Delete.
10237 (stdio_file::stdio_file): New.
10238 (mem_fileopen): Delete.
10239 (stdio_file::~stdio_file): New.
10240 (mem_file_rewind): Delete.
10241 (stdio_file::set_stream): New.
10242 (mem_file_put): Delete.
10243 (stdio_file::open): New.
10244 (mem_file_write): Delete.
10245 (stdio_file_magic, struct stdio_file): Delete.
10246 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10247 (stdio_file::flush): New.
10248 (stdio_file_read): Rename to ...
10249 (stdio_file::read): ... this. Adjust.
10250 (stdio_file_write): Rename to ...
10251 (stdio_file::write): ... this. Adjust.
10252 (stdio_file_write_async_safe): Rename to ...
10253 (stdio_file::write_async_safe) ... this. Adjust.
10254 (stdio_file_fputs): Rename to ...
10255 (stdio_file::puts) ... this. Adjust.
10256 (stdio_file_isatty): Delete.
10257 (stdio_file_fseek): Delete.
10258 (stdio_file::isatty): New.
10259 (stderr_file_write): Rename to ...
10260 (stderr_file::write) ... this. Adjust.
10261 (stderr_file_fputs): Rename to ...
10262 (stderr_file::puts) ... this. Adjust.
10263 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10264 (stderr_file::stderr_file): New.
10265 (tee_file_magic): Delete.
10266 (struct tee_file): Delete.
10267 (tee_file::tee_file): New.
10268 (tee_file_new): Delete.
10269 (tee_file::~tee_file): New.
10270 (tee_file_delete): Delete.
10271 (tee_file_flush): Rename to ...
10272 (tee_file::flush): ... this. Adjust.
10273 (tee_file_write): Rename to ...
10274 (tee_file::write): ... this. Adjust.
10275 (tee_file::write_async_safe): New.
10276 (tee_file_fputs): Rename to ...
10277 (tee_file::puts): ... this. Adjust.
10278 (tee_file_isatty): Rename to ...
10279 (tee_file::isatty): ... this. Adjust.
10280 * ui-file.h (struct obstack, struct ui_file): Don't
10281 forward-declare.
10282 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10283 (ui_file_write_ftype)
10284 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10285 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10286 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10287 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10288 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10289 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10290 (set_ui_file_fseek): Delete.
10291 (ui_file_data, ui_file_delete, ui_file_rewind)
10292 (struct ui_file): New.
10293 (ui_file_up): New.
10294 (class null_file): New.
10295 (null_stream): Declare.
10296 (ui_file_write_for_put, ui_file_put): Delete.
10297 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10298 Delete.
10299 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10300 (gdb_fopen, tee_file_new): Delete.
10301 (struct string_file): New.
10302 (struct stdio_file): New.
10303 (stdio_file_up): New.
10304 (struct stderr_file): New.
10305 (class tee_file): New.
10306 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10307 of a 'ui_file *'. Adjust.
10308 * ui-out.h (class ui_out) <field_stream>: Likewise.
10309 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10310 (null_stream): Delete.
10311 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10312 Adjust.
10313 * utils.h (struct ui_file): Delete forward declaration..
10314 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10315 (error_stream): Take a 'string_file &' instead of a
10316 'ui_file *'.
10317 * varobj.c (varobj_value_get_print_value): Use string_file.
10318 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10319 * gdbarch.c: Regenerate.
10320
10321 2017-02-02 Pedro Alves <palves@redhat.com>
10322
10323 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10324 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10325 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10326 Adjust to call gdb_print_insn instead of
10327 gdb_disassembler::print_insn.
10328 (dump_insns, do_mixed_source_and_assembly_deprecated)
10329 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10330 'gdbarch' parameter. Remove gdb_disassembler parameter.
10331 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10332 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10333 declaration.
10334 (gdb_pretty_print_insn): Re-add declaration.
10335 * record-btrace.c (btrace_insn_history): Don't allocate a
10336 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10337
10338 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10339
10340 * disasm.h (gdb_disassembly): Remove file_string parameter.
10341 * disasm.c (gdb_disassembly): Likewise.
10342 * cli/cli-cmds.c (print_disassembly): Adapt.
10343 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10344 * stack.c (do_gdb_disassembly): Likewise.
10345
10346 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10347
10348 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10349 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10350 targets. And if the implicit value is longer than needed, extract
10351 the first bytes instead of the "least significant" ones.
10352
10353 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10354
10355 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10356 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10357 (btrace_fetch): Assert can_access_registers_ptid.
10358 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10359 validate_registers_access.
10360
10361 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10362
10363 * gdbthread.h (can_access_registers_ptid): New.
10364 * thread.c (can_access_registers_ptid): New.
10365
10366 2017-02-01 Pedro Alves <palves@redhat.com>
10367
10368 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10369
10370 2017-01-31 Pedro Alves <palves@redhat.com>
10371
10372 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10373 Fix typos.
10374
10375 2017-01-31 Pedro Alves <palves@redhat.com>
10376
10377 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10378 not used.
10379
10380 2017-01-31 Pedro Alves <palves@redhat.com>
10381
10382 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10383
10384 2017-01-31 Pedro Alves <palves@redhat.com>
10385
10386 * common/scoped_restore.h
10387 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10388 change the value's parameter type to T2.
10389 (make_scoped_restore): Likewise.
10390
10391 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10392 Richard Henderson <rth@redhat.com>
10393
10394 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10395 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10396 GS_BASE for older kernels.
10397 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10398 GS_BASE for older kernels.
10399 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10400 and GS_BASE to the offset table.
10401 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10402 system register group.
10403 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10404 for older kernels.
10405 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10406 amd64 ABI.
10407 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10408 AMD64_GSBASE_REGNUM.
10409 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10410 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10411 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10412 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10413 i386/64bit-segments.xml in those rules.
10414 * features/i386/64bit-segments.xml: New file.
10415 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10416 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10417 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10418 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10419 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10420 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10421 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10422 * features/i386/amd64-avx-linux.c: Regenerated.
10423 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10424 * features/i386/amd64-avx-mpx.c: Regenerated.
10425 * features/i386/amd64-avx512-linux.c: Regenerated.
10426 * features/i386/amd64-linux.c: Regenerated.
10427 * features/i386/amd64-mpx-linux.c: Regenerated.
10428 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10429 * features/i386/i386-avx-mpx.c: Regenerated.
10430 * features/i386/x32-avx-linux.c: Regenerated.
10431 * features/i386/x32-avx512-linux.c: Regenerated.
10432 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10433 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10434 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10435 * regformats/i386/amd64-linux.dat: Regenerated.
10436 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10437 * regformats/i386/x32-avx-linux.dat: Regenerated.
10438 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10439 * regformats/i386/x32-linux.dat: Regenerated.
10440
10441 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10442
10443 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10444 Set to AMD64_NUM_REGS.
10445
10446 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10447
10448 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10449 that checks validity of a register number.
10450
10451 2017-01-27 Kees Cook <keescook@google.com>
10452
10453 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10454 fetch_fpregs if target has fpa registers.
10455 (arm_linux_store_inferior_registers): Call store_fpregs if target
10456 has fpa registers.
10457
10458 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10459
10460 * cris-tdep.c (cris_gdbarch_init): Remove check for
10461 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10462
10463 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10464
10465 * corelow.c (get_core_register_section): Check for regset
10466 existence before checking for REGSET_VARIABLE_SIZE.
10467
10468 2017-01-26 Yao Qi <yao.qi@linaro.org>
10469 Pedro Alves <palves@redhat.com>
10470
10471 PR gdb/20939
10472 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10473 call memory_error, save memaddr instead.
10474 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10475 negative, cal memory_error.
10476 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10477
10478 2017-01-26 Yao Qi <yao.qi@linaro.org>
10479
10480 * disasm-selftests.c (memory_error_test): New function.
10481 (_initialize_disasm_selftests): Register memory_error_test.
10482
10483 2017-01-26 Yao Qi <yao.qi@linaro.org>
10484
10485 * Makefile.in (SFILES): Add disasm-selftests.c and
10486 selftest-arch.c.
10487 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10488 * disasm-selftests.c: New file.
10489 * selftest-arch.c: New file.
10490 * selftest-arch.h: New file.
10491
10492 2017-01-26 Yao Qi <yao.qi@linaro.org>
10493
10494 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10495 to bfd_arch_mep. Don't return 0 if section is not
10496 found. Call print_insn_mep.
10497
10498 2017-01-26 Pedro Alves <palves@redhat.com>
10499 Yao Qi <yao.qi@linaro.org>
10500
10501 * arm-tdep.c: Include "disasm.h".
10502 (gdb_print_insn_arm): Update code to get gdbarch.
10503 * disasm.c (dis_asm_read_memory): Change it to
10504 gdb_disassembler::dis_asm_read_memory.
10505 (dis_asm_memory_error): Likewise.
10506 (dis_asm_print_address): Likewise.
10507 (gdb_pretty_print_insn): Change it to
10508 gdb_disassembler::pretty_print_insn.
10509 (dump_insns): Add one argument gdb_disassemlber. All
10510 callers updated.
10511 (do_mixed_source_and_assembly_deprecated): Likewise.
10512 (do_mixed_source_and_assembly): Likewise.
10513 (do_assembly_only): Likewise.
10514 (gdb_disassembler::gdb_disassembler): New.
10515 (gdb_disassembler::print_insn): New.
10516 * disasm.h (class gdb_disassembler): New.
10517 (gdb_pretty_print_insn): Remove declaration.
10518 (gdb_disassemble_info): Likewise.
10519 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10520 (gdbscm_disasm_read_memory_worker): Update.
10521 (gdbscm_disasm_read_memory): Update.
10522 (gdbscm_disasm_memory_error): Remove.
10523 (gdbscm_disasm_print_address): Remove.
10524 (gdbscm_disassembler::gdbscm_disassembler): New.
10525 (gdbscm_print_insn_from_port): Update.
10526 * mips-tdep.c: Include disasm.h.
10527 (gdb_print_insn_mips): Update code to get gdbarch.
10528 * record-btrace.c (btrace_insn_history): Update.
10529 * spu-tdep.c: Include disasm.h.
10530 (struct spu_dis_asm_data): Remove.
10531 (struct spu_dis_asm_info): New.
10532 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10533 SPU id.
10534 (gdb_print_insn_spu): Cast disassemble_info to
10535 spu_dis_asm_info.
10536
10537 2017-01-26 Yao Qi <yao.qi@linaro.org>
10538
10539 * disasm.c (do_ui_file_delete): Delete.
10540 (gdb_insn_length): Move code creating stream to ...
10541 * utils.c (null_stream): ... here. New function.
10542 * utils.h (null_stream): Declare.
10543
10544 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10545
10546 * python/py-inferior.c (find_thread_object): Return directly
10547 from the loop. Remove "found" variable.
10548
10549 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10550
10551 GDB 7.12.1 released.
10552
10553 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10554
10555 * python/py-function.c (fnpy_call): Reorder declarations to have
10556 the gdbpy_enter object declared first.
10557 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10558
10559 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10560
10561 PR python/21068
10562 * python/python-internal.h (PyMem_RawMalloc): Define for
10563 Python < 3.4.
10564 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10565 PyMem_RawMalloc instead of PyMem_Malloc.
10566
10567 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10568 Luis Machado <lgustavo@codesourcery.com>
10569
10570 * NEWS (New commands): Mention flash-erase.
10571 (New MI commands): Mention target-flash-erase.
10572 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10573 command.
10574 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10575 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10576 * target.c (flash_erase_command): New function.
10577 (initialize_targets): Add new flash-erase command.
10578 * target.h (flash_erase_command): New declaration.
10579
10580 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10581
10582 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10583 HAVE_SYS_PROCFS_H is defined.
10584
10585 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10586
10587 * remote.c (struct cached_reg): Change data into a pointer.
10588 * (stop_reply_dtr): Free data pointers before deleting vector.
10589 (process_stop_reply): Likewise.
10590 (remote_parse_stop_reply): Allocate space for data
10591
10592 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10593
10594 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10595 MAX_REGISTER_SIZE.
10596 (amd64_pseudo_register_read_value): Likewise.
10597 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10598 (store_register_using_P): Likewise.
10599 * regcache.c (regcache_xfer_part): Likewise.
10600
10601 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10602
10603 Split real and pseudo registers.
10604 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10605 (sparc32_pseudo_regnum): New enum.
10606 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10607 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10608 (SPARC32_CP0_REGISTERS): New macro.
10609 (sparc32_pseudo_register_name): New function.
10610 (sparc32_register_name): Use sparc32_pseudo_register_name.
10611 (sparc32_pseudo_register_type): New function.
10612 (sparc32_register_type): Use sparc32_pseudo_register_type.
10613 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10614 pseudo register numbers.
10615 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10616 (SPARC64_CP0_REGISTERS): New macro.
10617 (sparc64_pseudo_register_name): New function.
10618 (sparc64_register_name): Use sparc64_pseudo_register_name.
10619 (sparc64_pseudo_register_type): New function.
10620 (sparc64_register_type): Use sparc64_pseudo_register_type.
10621 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10622 pseudo register numbers.
10623 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10624 sparc64_store_arguments): Handle pseudo register numbers.
10625
10626 2017-01-13 Yao Qi <yao.qi@linaro.org>
10627
10628 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10629 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10630 output.
10631 (getpkt_or_notif_sane_1): Likewise.
10632
10633 2017-01-13 Yao Qi <yao.qi@linaro.org>
10634
10635 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10636 of CC. Pass "-x c++-header" instead of "-x c".
10637
10638 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10639
10640 * remote.c (remote_can_async_p): Update comment.
10641
10642 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10643
10644 * linux-nat.c (linux_nat_can_async_p): Update comment.
10645
10646 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10647
10648 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10649
10650 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10651
10652 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10653
10654 2017-01-10 Tom Tromey <tom@tromey.com>
10655
10656 * python/py-type.c (typy_legacy_template_argument): Update.
10657 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10658 ~demangle_parse_info): Declare new members.
10659 (cp_demangled_name_to_comp): Return unique_ptr.
10660 (cp_demangled_name_parse_free)
10661 (make_cleanup_cp_demangled_name_parse_free)
10662 (cp_new_demangle_parse_info): Remove.
10663 * cp-support.c (do_demangled_name_parse_free_cleanup)
10664 (make_cleanup_cp_demangled_name_parse_free): Remove.
10665 (inspect_type, cp_canonicalize_string_full)
10666 (cp_canonicalize_string): Update.
10667 (mangled_name_to_comp): Change return type.
10668 (cp_class_name_from_physname, method_name_from_physname)
10669 (cp_func_name, cp_remove_params): Update.
10670 * cp-name-parser.y (demangle_parse_info): New constructor, from
10671 cp_new_demangle_parse_info.
10672 (~demangle_parse_info): New destructor, from
10673 cp_demangled_name_parse_free.
10674 (cp_merge_demangle_parse_infos): Update.
10675 (cp_demangled_name_to_comp): Change return type.
10676
10677 2017-01-10 Tom Tromey <tom@tromey.com>
10678
10679 * top.c (prevent_dont_repeat): Change return type.
10680 * python/python.c (execute_gdb_command): Use std::string.
10681 Update.
10682 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10683 * command.h (prevent_dont_repeat): Change return type.
10684 * breakpoint.c (bpstat_do_actions_1): Update.
10685
10686 2017-01-10 Tom Tromey <tom@tromey.com>
10687
10688 * value.h (scoped_value_mark::~scoped_value_mark): Call
10689 free_to_mark.
10690 (scoped_value_mark::free_to_mark): New method.
10691 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10692 scoped_value_mark.
10693
10694 2017-01-10 Tom Tromey <tom@tromey.com>
10695
10696 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10697 (valpy_reference_value, valpy_const_value, valpy_get_address)
10698 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10699 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10700 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10701 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10702 scoped_value_mark.
10703 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10704 * value.h (scoped_value_mark): New class.
10705
10706 2017-01-10 Tom Tromey <tom@tromey.com>
10707
10708 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10709 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10710 * psymtab.c (discard_psymtabs_upto): Remove.
10711 (make_cleanup_discard_psymtabs): Remove.
10712 (struct psymtab_state): Remove.
10713
10714 2017-01-10 Tom Tromey <tom@tromey.com>
10715
10716 * record-full.c (record_full_save_cleanups): Remove.
10717 (record_full_save): Use gdb::unlinker.
10718 * gcore.c (do_bfd_delete_cleanup): Remove.
10719 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10720 cleanups.
10721 * dwarf2read.c (unlink_if_set): Remove.
10722 (write_psymtabs_to_index): Use gdb::unlinker.
10723 * common/gdb_unlinker.h: New file.
10724
10725 2017-01-10 Tom Tromey <tom@tromey.com>
10726
10727 * windows-tdep.c (windows_xfer_shared_library): Update.
10728 * windows-nat.c (windows_make_so): Update.
10729 * utils.h (make_cleanup_bfd_unref): Remove.
10730 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10731 * symfile.h (symfile_bfd_open)
10732 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10733 * symfile.c (read_symbols, symbol_file_add)
10734 (separate_debug_file_exists): Update.
10735 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10736 (generic_load, reread_symbols): Update.
10737 * symfile-mem.c (symbol_file_add_from_memory): Update.
10738 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10739 (spu_symbol_file_add_from_memory): Update.
10740 * solist.h (struct target_so_ops) <bfd_open>: Return
10741 gdb_bfd_ref_ptr.
10742 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10743 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10744 gdb_bfd_ref_ptr.
10745 (solib_map_sections, reload_shared_libraries_1): Update.
10746 * solib-svr4.c (enable_break): Update.
10747 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10748 * solib-frv.c (enable_break2): Update.
10749 * solib-dsbt.c (enable_break): Update.
10750 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10751 gdb_bfd_ref_ptr.
10752 (darwin_solib_get_all_image_info_addr_at_init): Update.
10753 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10754 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10755 * record-full.c (record_full_save): Update.
10756 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10757 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10758 * minidebug.c (find_separate_debug_file_in_section): Return
10759 gdb_bfd_ref_ptr.
10760 * machoread.c (macho_add_oso_symfile): Change abfd to
10761 gdb_bfd_ref_ptr.
10762 (macho_symfile_read_all_oso): Update.
10763 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10764 (macho_symfile_read): Update.
10765 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10766 (jit_bfd_try_read_symtab): Update.
10767 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10768 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10769 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10770 gdb_bfd_ref_ptr.
10771 (gdb_bfd_ref_policy): New struct.
10772 (gdb_bfd_ref_ptr): New typedef.
10773 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10774 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10775 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10776 gdb_bfd_ref_ptr.
10777 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10778 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10779 (gcore_command): Update.
10780 * exec.c (exec_file_attach): Update.
10781 * elfread.c (elf_symfile_read): Update.
10782 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10783 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10784 (open_and_init_dwo_file): Update.
10785 (open_dwp_file): Return gdb_bfd_ref_ptr.
10786 (open_and_init_dwp_file): Update.
10787 * corelow.c (core_open): Update.
10788 * compile/compile-object-load.c (compile_object_load): Update.
10789 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10790 * coffread.c (coff_symfile_read): Update.
10791 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10792 gdb_bfd_ref_ptr. Rename.
10793 (dump_bfd_file, restore_command): Update.
10794 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10795 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10796 (find_separate_debug_file_by_buildid): Update.
10797
10798 2017-01-10 Tom Tromey <tom@tromey.com>
10799
10800 * common/gdb_ref_ptr.h: New file.
10801 * python/py-ref.h (struct gdbpy_ref_policy): New.
10802 (gdbpy_ref): Now a typedef.
10803
10804 2017-01-10 Tom Tromey <tom@tromey.com>
10805
10806 * utils.h (make_cleanup_htab_delete): Don't declare.
10807 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10808 Remove.
10809 * linespec.c (decode_compound_collector): Add constructor,
10810 destructor.
10811 (lookup_prefix_sym): Remove cleanup.
10812 (symtab_collector): Add constructor, destructor.
10813 (collect_symtabs_from_filename): Remove cleanup.
10814 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10815 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10816 Use htab_up.
10817 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10818 * dwarf2read.c (dw2_expand_symtabs_matching)
10819 (dw2_map_symbol_filenames, dwarf_decode_macros)
10820 (write_psymtabs_to_index): Use htab_up.
10821 * dwarf2loc.c (func_verify_no_selftailcall)
10822 (call_site_find_chain_1, func_verify_no_selftailcall)
10823 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10824 std::vector, gdb::unique_xmalloc_ptr.
10825 (call_sitep): Remove typedef.
10826 (dwarf2_locexpr_baton_eval): Remove unused variable.
10827
10828 2017-01-10 Tom Tromey <tom@tromey.com>
10829
10830 * python/python-internal.h (make_cleanup_py_decref)
10831 (make_cleanup_py_xdecref): Don't declare.
10832 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10833 (py_xdecref, make_cleanup_py_xdecref): Remove.
10834
10835 2017-01-10 Tom Tromey <tom@tromey.com>
10836
10837 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10838 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10839
10840 2017-01-10 Tom Tromey <tom@tromey.com>
10841
10842 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10843
10844 2017-01-10 Tom Tromey <tom@tromey.com>
10845
10846 * python/py-utils.c (unicode_to_encoded_string)
10847 (python_string_to_target_string)
10848 (python_string_to_target_python_string)
10849 (python_string_to_host_string, gdbpy_obj_to_string)
10850 (get_addr_from_python): Use gdbpy_ref.
10851
10852 2017-01-10 Tom Tromey <tom@tromey.com>
10853
10854 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10855 gdbpy_ref.
10856
10857 2017-01-10 Tom Tromey <tom@tromey.com>
10858
10859 * python/python.c (eval_python_command, gdbpy_decode_line)
10860 (gdbpy_run_events, gdbpy_start_type_printers)
10861 (gdbpy_apply_type_printers): Use gdbpy_ref.
10862
10863 2017-01-10 Tom Tromey <tom@tromey.com>
10864
10865 * python/py-param.c (get_doc_string, compute_enum_values): Use
10866 gdbpy_ref.
10867
10868 2017-01-10 Tom Tromey <tom@tromey.com>
10869
10870 * python/py-inferior.c (find_thread_object, build_inferior_list):
10871 Use gdbpy_ref.
10872
10873 2017-01-10 Tom Tromey <tom@tromey.com>
10874
10875 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10876
10877 2017-01-10 Tom Tromey <tom@tromey.com>
10878
10879 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10880 gdbpy_ref.
10881
10882 2017-01-10 Tom Tromey <tom@tromey.com>
10883
10884 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10885 extra incref.
10886 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10887 Use gdbpy_ref.
10888
10889 2017-01-10 Tom Tromey <tom@tromey.com>
10890
10891 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10892 gdbpy_ref.
10893
10894 2017-01-10 Tom Tromey <tom@tromey.com>
10895
10896 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10897 decref results of PyArg_ParseTupleAndKeywords.
10898
10899 2017-01-10 Tom Tromey <tom@tromey.com>
10900
10901 * python/python.c (python_run_simple_file): Use
10902 unique_xmalloc_ptr, gdbpy_ref.
10903
10904 2017-01-10 Tom Tromey <tom@tromey.com>
10905
10906 * python/py-prettyprint.c (print_stack_unless_memory_error)
10907 (print_string_repr, print_children): Use gdbpy_ref.
10908 (dummy_python_frame): New class.
10909 (dummy_python_frame::dummy_python_frame): Rename from
10910 push_dummy_python_frame.
10911 (py_restore_tstate): Remove.
10912
10913 2017-01-10 Tom Tromey <tom@tromey.com>
10914
10915 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10916
10917 2017-01-10 Tom Tromey <tom@tromey.com>
10918
10919 * python/python.c (ensure_python_env, restore_python_env):
10920 Remove.
10921 * python/python-internal.h (ensure_python_env): Don't declare.
10922 * varobj.h (varobj_ensure_python_env): Don't declare.
10923 * varobj.c (varobj_ensure_python_env): Remove.
10924
10925 2017-01-10 Tom Tromey <tom@tromey.com>
10926
10927 * varobj.c (varobj_value_get_print_value): Use
10928 gdbpy_enter_varobj.
10929
10930 2017-01-10 Tom Tromey <tom@tromey.com>
10931
10932 * python/py-prettyprint.c (print_string_repr, print_children):
10933 Update.
10934 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10935 of "encoding".
10936 * varobj.c (varobj_value_get_print_value): Update.
10937 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10938
10939 2017-01-10 Tom Tromey <tom@tromey.com>
10940
10941 * varobj.c (varobj_get_display_hint)
10942 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10943 (varobj_set_visualizer, free_variable): Use
10944 gdbpy_enter_varobj.
10945
10946 2017-01-10 Tom Tromey <tom@tromey.com>
10947
10948 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10949 (do_finish_initialization): New function. Use gdbpy_ref.
10950 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10951 do_finish_initialization.
10952
10953 2017-01-10 Tom Tromey <tom@tromey.com>
10954
10955 * python/py-param.c (get_set_value, get_show_value): Use
10956 gdbpy_enter, gdbpy_ref.
10957
10958 2017-01-10 Tom Tromey <tom@tromey.com>
10959
10960 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10961
10962 2017-01-10 Tom Tromey <tom@tromey.com>
10963
10964 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10965
10966 2017-01-10 Tom Tromey <tom@tromey.com>
10967
10968 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10969 Use gdbpy_enter_varobj.
10970
10971 2017-01-10 Tom Tromey <tom@tromey.com>
10972
10973 * varobj.c (gdbpy_enter_varobj): New constructor.
10974 * python/python-internal.h (gdbpy_enter_varobj): New class.
10975 * python/py-varobj.c (py_varobj_get_iterator): Use
10976 gdbpy_enter_varobj.
10977
10978 2017-01-10 Tom Tromey <tom@tromey.com>
10979
10980 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10981 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10982 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10983 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10984 unique_xmalloc_ptr.
10985 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10986
10987 2017-01-10 Tom Tromey <tom@tromey.com>
10988
10989 * python/py-xmethods.c (invoke_match_method): Use
10990 gdbpy_ref.
10991
10992 2017-01-10 Tom Tromey <tom@tromey.com>
10993
10994 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10995 gdbpy_enter, gdbpy_ref.
10996
10997 2017-01-10 Tom Tromey <tom@tromey.com>
10998
10999 * python/python.c (python_interactive_command): Use gdbpy_enter.
11000
11001 2017-01-10 Tom Tromey <tom@tromey.com>
11002
11003 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11004 gdbpy_ref.
11005
11006 2017-01-10 Tom Tromey <tom@tromey.com>
11007
11008 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11009 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11010
11011 2017-01-10 Tom Tromey <tom@tromey.com>
11012
11013 * utils.h (htab_deleter): New struct.
11014 (htab_up): New typedef.
11015 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11016 gdbpy_enter, gdbpy_ref, htab_up.
11017
11018 2017-01-10 Tom Tromey <tom@tromey.com>
11019
11020 * python/py-unwind.c (pending_frame_invalidate): Remove.
11021 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11022
11023 2017-01-10 Tom Tromey <tom@tromey.com>
11024
11025 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11026 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11027
11028 2017-01-10 Tom Tromey <tom@tromey.com>
11029
11030 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11031
11032 2017-01-10 Tom Tromey <tom@tromey.com>
11033
11034 * python/python.c (gdbpy_eval_from_control_command)
11035 (gdbpy_source_script, gdbpy_run_events)
11036 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11037 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11038 gdbpy_enter.
11039
11040 2017-01-10 Tom Tromey <tom@tromey.com>
11041
11042 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11043
11044 2017-01-10 Tom Tromey <tom@tromey.com>
11045
11046 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11047
11048 2017-01-10 Tom Tromey <tom@tromey.com>
11049
11050 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11051 (python_on_inferior_call_pre, python_on_inferior_call_post)
11052 (python_on_memory_change, python_on_register_change)
11053 (python_inferior_exit, python_new_objfile, add_thread_object)
11054 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11055
11056 2017-01-10 Tom Tromey <tom@tromey.com>
11057
11058 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11059 (bpfinishpy_handle_exit): Use gdbpy_enter.
11060
11061 2017-01-10 Tom Tromey <tom@tromey.com>
11062
11063 * python/py-cmd.c (cmdpy_destroyer)
11064 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11065 gdbpy_enter.
11066
11067 2017-01-10 Tom Tromey <tom@tromey.com>
11068
11069 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11070 gdbpy_enter.
11071 (gdbpy_breakpoint_has_cond): Likewise.
11072
11073 2017-01-10 Tom Tromey <tom@tromey.com>
11074
11075 * python/python.c (gdbpy_enter): New constructor.
11076 (~gdbpy_enter): New destructor.
11077 (restore_python_env, ensure_python_env): Rewrite.
11078 * python/python-internal.h (gdbpy_enter): New class.
11079
11080 2017-01-10 Tom Tromey <tom@tromey.com>
11081
11082 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11083
11084 2017-01-10 Tom Tromey <tom@tromey.com>
11085
11086 * python/py-value.c (value_has_field, get_field_flag)
11087 (get_field_type, valpy_getitem, convert_value_from_python): Use
11088 gdbpy_ref.
11089
11090 2017-01-10 Tom Tromey <tom@tromey.com>
11091
11092 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11093 gdbpy_ref.
11094
11095 2017-01-10 Tom Tromey <tom@tromey.com>
11096
11097 * python/py-prettyprint.c (search_pp_list)
11098 (find_pretty_printer_from_objfiles)
11099 (find_pretty_printer_from_progspace)
11100 (find_pretty_printer_from_gdb, find_pretty_printer)
11101 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11102 gdbpy_ref.
11103
11104 2017-01-10 Tom Tromey <tom@tromey.com>
11105
11106 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11107
11108 2017-01-10 Tom Tromey <tom@tromey.com>
11109
11110 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11111 (ltpy_get_all_source_lines): Use gdbpy_ref.
11112
11113 2017-01-10 Tom Tromey <tom@tromey.com>
11114
11115 * python/py-framefilter.c (extract_sym, extract_value)
11116 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11117 gdbpy_ref.
11118
11119 2017-01-10 Tom Tromey <tom@tromey.com>
11120
11121 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11122
11123 2017-01-10 Tom Tromey <tom@tromey.com>
11124
11125 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11126
11127 2017-01-10 Tom Tromey <tom@tromey.com>
11128
11129 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11130 gdbpy_ref.
11131
11132 2017-01-10 Tom Tromey <tom@tromey.com>
11133
11134 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11135
11136 2017-01-10 Tom Tromey <tom@tromey.com>
11137
11138 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11139 (typy_range): Use gdbpy_ref.
11140
11141 2017-01-10 Tom Tromey <tom@tromey.com>
11142
11143 * python/py-threadevent.c (create_thread_event_object): Use
11144 gdbpy_ref.
11145 * python/py-stopevent.c (create_stop_event_object): Simplify.
11146 (emit_stop_event): Use gdbpy_ref.
11147 * python/py-signalevent.c (create_signal_event_object): Use
11148 gdbpy_ref.
11149 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11150 (emit_new_objfile_event, create_clear_objfiles_event_object)
11151 (emit_clear_objfiles_event): Use gdbpy_ref.
11152 * python/py-infevents.c (create_inferior_call_event_object)
11153 (create_register_changed_event_object)
11154 (create_memory_changed_event_object, emit_inferior_call_event)
11155 (emit_memory_changed_event, emit_register_changed_event): Use
11156 gdbpy_ref.
11157 * python/py-exitedevent.c (create_exited_event_object)
11158 (emit_exited_event): Use gdbpy_ref.
11159 * python/py-event.h (evpy_emit_event): Remove
11160 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11161 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11162 * python/py-continueevent.c (emit_continue_event): Use
11163 gdbpy_ref.
11164 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11165 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11166 gdbpy_ref.
11167 * python/py-bpevent.c (create_breakpoint_event_object): Use
11168 gdbpy_ref.
11169
11170 2017-01-10 Tom Tromey <tom@tromey.com>
11171
11172 * python/py-ref.h: New file.
11173
11174 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11175
11176 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11177 void.
11178 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11179 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11180 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11181 * ui-out.c (ui_out::redirect): Likewise.
11182 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11183 * cli/cli-logging.c (set_logging_redirect): Update call site of
11184 ui_out::redirect.
11185 (handle_redirections): Likewise.
11186 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11187 * top.c (execute_command_to_string): Likewise.
11188 * utils.c (do_ui_out_redirect_pop): Likewise.
11189
11190 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11191
11192 * stack.c (_initialize_stack): Update "frame" command help message.
11193
11194 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11195
11196 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11197
11198 2017-01-06 Yao Qi <yao.qi@linaro.org>
11199
11200 * x86-linux-nat.h: Include gdb_proc_service.h.
11201
11202 2017-01-06 Yao Qi <yao.qi@linaro.org>
11203
11204 * ser-base.h: Include serial.h.
11205
11206 2017-01-06 Yao Qi <yao.qi@linaro.org>
11207
11208 * ppc-linux-tdep.h: Include ppc-tdep.h.
11209
11210 2017-01-06 Yao Qi <yao.qi@linaro.org>
11211
11212 * nat/amd64-linux-siginfo.h: Include signal.h.
11213
11214 2017-01-06 Yao Qi <yao.qi@linaro.org>
11215
11216 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11217
11218 2017-01-06 Yao Qi <yao.qi@linaro.org>
11219
11220 * mi/mi-parse.h: Include mi-cmds.h.
11221
11222 2017-01-06 Yao Qi <yao.qi@linaro.org>
11223
11224 * inf-loop.c: Don't include "target.h".
11225 * inf-loop.h: Include it here.
11226
11227 2017-01-06 Yao Qi <yao.qi@linaro.org>
11228
11229 * dfp.h: Include "dboulest.h" and "expression.h".
11230
11231 2017-01-06 Yao Qi <yao.qi@linaro.org>
11232
11233 * ax-gdb.h: Include "ax.h".
11234
11235 2017-01-06 Yao Qi <yao.qi@linaro.org>
11236
11237 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11238 with nat/gdb_ptrace.h.
11239
11240 2017-01-05 Yao Qi <yao.qi@linaro.org>
11241
11242 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11243 new line.
11244 (mips64_fbsd_sigframe_init): Likewise.
11245
11246 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11247
11248 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11249 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11250
11251 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11252
11253 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11254 * NEWS: Mention new FreeBSD/mips native configuration.
11255 * config/mips/fbsd.mh: New file.
11256 * configure.host: Add mips*-*-freebsd*.
11257 * mips-fbsd-nat.c: New file.
11258
11259 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11260
11261 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11262 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11263 * NEWS: Mention new FreeBSD/mips target.
11264 * configure.tgt: Add mips*-*-freebsd*.
11265 * mips-fbsd-tdep.c: New file.
11266 * mips-fbsd-tdep.h: New file.
11267
11268 2017-01-04 Yao Qi <yao.qi@linaro.org>
11269
11270 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11271 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11272
11273 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11274
11275 Update copyright year range in all GDB files.
11276
11277 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11278
11279 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11280
11281 For older changes see ChangeLog-2016.
11282 \f
11283 Local Variables:
11284 mode: change-log
11285 left-margin: 8
11286 fill-column: 74
11287 version-control: never
11288 coding: utf-8
11289 End: