S390: Add guarded-storage register definitions and tdescs
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * features/s390-gs-linux64.xml: New file.
4 * features/s390-gs.xml: New file.
5 * features/s390-gsbc.xml: New file.
6 * features/s390x-gs-linux64.xml: New file.
7 * features/Makefile (WHICH): Add s390-gs-linux64 and
8 s390x-gs-linux64.
9 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
10 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
11 * features/s390-gs-linux64.c: New generated file.
12 * features/s390x-gs-linux64.c: New file.
13 * regformats/s390-gs-linux64.dat: New file.
14 * regformats/s390x-gs-linux64.dat: New file.
15
16 2017-09-23 Tom Tromey <tom@tromey.com>
17
18 * defs.h (make_cleanup_override_quit_handler): Don't declare.
19
20 2017-09-22 Tom Tromey <tom@tromey.com>
21
22 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
23 type to scoped_restore_tmpl.
24 <scoped_input_handler>: Initialize m_quit_handler directly.
25
26 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
27
28 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
29 (cd_command): Likewise. Free "current_directory" before
30 assigning to it.
31 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
32 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
33 * top.c (gdb_dirbuf): Remove global declaration.
34 * top.h (gdb_dirbuf): Likewise.
35
36 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
37
38 * gnulib/aclocal.m4: Regenerate.
39 * gnulib/config.in: Regenerate.
40 * gnulib/configure: Regenerate.
41 * gnulib/import/Makefile.am: Regenerate.
42 * gnulib/import/Makefile.in: Regenerate.
43 * gnulib/import/assure.h: New file.
44 * gnulib/import/at-func.c: Likewise
45 * gnulib/import/chdir-long.c: New file.
46 * gnulib/import/chdir-long.h: New file.
47 * gnulib/import/cloexec.c: New file.
48 * gnulib/import/cloexec.h: New file.
49 * gnulib/import/close.c: New file.
50 * gnulib/import/closedir.c: New file.
51 * gnulib/import/dirent-private.h: New file.
52 * gnulib/import/dup-safer.c: New file.
53 * gnulib/import/dup.c: New file.
54 * gnulib/import/dup2.c: New file.
55 * gnulib/import/error.c: New file.
56 * gnulib/import/error.h: New file.
57 * gnulib/import/exitfail.c: New file.
58 * gnulib/import/exitfail.h: New file.
59 * gnulib/import/fchdir.c: New file.
60 * gnulib/import/fcntl.c: New file.
61 * gnulib/import/fcntl.in.h: New file.
62 * gnulib/import/fd-hook.c: New file.
63 * gnulib/import/fd-hook.h: New file.
64 * gnulib/import/fd-safer.c: New file.
65 * gnulib/import/fdopendir.c: New file.
66 * gnulib/import/filename.h: New file.
67 * gnulib/import/filenamecat-lgpl.c: New file.
68 * gnulib/import/filenamecat.h: New file.
69 * gnulib/import/fstat.c: New file.
70 * gnulib/import/fstatat.c: New file.
71 * gnulib/import/getcwd-lgpl.c: New file.
72 * gnulib/import/getcwd.c: New file.
73 * gnulib/import/getdtablesize.c: New file.
74 * gnulib/import/getlogin_r.c: New file.
75 * gnulib/import/getprogname.c: New file.
76 * gnulib/import/getprogname.h: New file.
77 * gnulib/import/gettext.h: New file.
78 * gnulib/import/glob-libc.h: New file.
79 * gnulib/import/glob.c: New file.
80 * gnulib/import/glob.in.h: New file.
81 * gnulib/import/intprops.h: New file.
82 * gnulib/import/m4/chdir-long.m4: New file.
83 * gnulib/import/m4/close.m4: New file.
84 * gnulib/import/m4/closedir.m4: New file.
85 * gnulib/import/m4/d-ino.m4: New file.
86 * gnulib/import/m4/d-type.m4: New file.
87 * gnulib/import/m4/dup.m4: New file.
88 * gnulib/import/m4/dup2.m4: New file.
89 * gnulib/import/m4/error.m4: New file.
90 * gnulib/import/m4/fchdir.m4: New file.
91 * gnulib/import/m4/fcntl.m4: New file.
92 * gnulib/import/m4/fcntl_h.m4: New file.
93 * gnulib/import/m4/fdopendir.m4: New file.
94 * gnulib/import/m4/filenamecat.m4: New file.
95 * gnulib/import/m4/fstat.m4: New file.
96 * gnulib/import/m4/fstatat.m4: New file.
97 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
98 * gnulib/import/m4/getcwd-path-max.m4: New file.
99 * gnulib/import/m4/getcwd.m4: New file.
100 * gnulib/import/m4/getdtablesize.m4: New file.
101 * gnulib/import/m4/getlogin_r.m4: New file.
102 * gnulib/import/m4/getprogname.m4: New file.
103 * gnulib/import/m4/glob.m4: New file.
104 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
105 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
106 * gnulib/import/m4/mempcpy.m4: New file.
107 * gnulib/import/m4/memrchr.m4: New file.
108 * gnulib/import/m4/mode_t.m4: New file.
109 * gnulib/import/m4/msvc-inval.m4: New file.
110 * gnulib/import/m4/msvc-nothrow.m4: New file.
111 * gnulib/import/m4/open.m4: New file.
112 * gnulib/import/m4/openat.m4: New file.
113 * gnulib/import/m4/opendir.m4: New file.
114 * gnulib/import/m4/readdir.m4: New file.
115 * gnulib/import/m4/realloc.m4: New file.
116 * gnulib/import/m4/rewinddir.m4: New file.
117 * gnulib/import/m4/save-cwd.m4: New file.
118 * gnulib/import/m4/strdup.m4: New file.
119 * gnulib/import/m4/strerror.m4: New file.
120 * gnulib/import/m4/unistd-safer.m4: New file.
121 * gnulib/import/mempcpy.c: New file.
122 * gnulib/import/memrchr.c: New file.
123 * gnulib/import/msvc-inval.c: New file.
124 * gnulib/import/msvc-inval.h: New file.
125 * gnulib/import/msvc-nothrow.c: New file.
126 * gnulib/import/msvc-nothrow.h: New file.
127 * gnulib/import/open.c: New file.
128 * gnulib/import/openat-die.c: New file.
129 * gnulib/import/openat-priv.h: New file.
130 * gnulib/import/openat-proc.c: New file.
131 * gnulib/import/openat.c: New file.
132 * gnulib/import/openat.h: New file.
133 * gnulib/import/opendir.c: New file.
134 * gnulib/import/pipe-safer.c: New file.
135 * gnulib/import/readdir.c: New file.
136 * gnulib/import/realloc.c: New file.
137 * gnulib/import/rewinddir.c: New file.
138 * gnulib/import/save-cwd.c: New file.
139 * gnulib/import/save-cwd.h: New file.
140 * gnulib/import/strdup.c: New file.
141 * gnulib/import/strerror-override.c: New file.
142 * gnulib/import/strerror-override.h: New file.
143 * gnulib/import/strerror.c: New file.
144 * gnulib/import/unistd--.h: New file.
145 * gnulib/import/unistd-safer.h: New file.
146 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
147 "getcwd" and "glob".
148 * ser-tcp.c: Undefine "close" before redefining it.
149
150 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
151
152 * guile/scm-value.c (gdbscm_value_address): Initialize address,
153 get rid of res_val.
154
155 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
156
157 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
158 <sol2,sparc>: Likewise.
159 <sol2-64,i386>: Likewise.
160
161 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
162 -Wdeprecated-declarations on *-*-solaris*.
163 * configure: Regenerate.
164
165 * procfs.c: Include "nat/inferior.h".
166 (procfs_info_proc): Fix typo.
167
168 2017-09-21 Kevin Buettner <kevinb@redhat.com>
169
170 * remote.c (vector): Include.
171 (struct private_thread_info): Add field, thread_handle.
172 (free_private_thread_info): Deallocate storage associated with
173 thread handle.
174 (get_private_info_thread): Initialize `thread_handle' field.
175 (struct thread_item): Add field, thread_handle.
176 (clear_threads_listing_context): Deallocate storage associated
177 with thread handle.
178 (start_thread): Add support for "handle" attribute.
179 (thread_attributes): Add "handle".
180 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
181 field.
182 (remote_update_thread_list): Update thread_handle.
183 (remote_thread_handle_to_thread_info): New function.
184 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
185
186 2017-09-21 Kevin Buettner <kevinb@redhat.com>
187
188 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
189 function.
190 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
191 * python/python-internal.h (thread_object_type): Declare.
192
193 2017-09-21 Kevin Buettner <kevinb@redhat.com>
194
195 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
196 (target_thread_handle_to_thread_info): Declare.
197 * target.c (target_thread_handle_to_thread_info): New function.
198 * target-delegates.c: Regenerate.
199 * gdbthread.h (find_thread_by_handle): Declare.
200 * thread.c (find_thread_by_handle): New function.
201 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
202 function.
203 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
204
205 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
206
207 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
208
209 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
210
211 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
212
213 2017-09-21 Yao Qi <yao.qi@linaro.org>
214
215 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
216 to gdb_target_obs.
217
218 2017-09-20 Tom Tromey <tom@tromey.com>
219
220 * breakpoint.c (struct counted_command_line): Remove.
221 (breakpoint_commands): Update.
222 (alloc_counted_command_line, incref_counted_command_line)
223 (decref_counted_command_line, do_cleanup_counted_command_line)
224 (make_cleanup_decref_counted_command_line): Remove.
225 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
226 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
227 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
228 (save_breakpoints): Update.
229 * breakpoint.h (counted_command_line): Now a typedef to
230 shared_ptr.
231 (struct breakpoint) <commands>: Now a counted_command_line.
232 (struct bpstats) <command>: Likewise.
233
234 2017-09-20 Tom Tromey <tom@tromey.com>
235
236 * breakpoint.c (struct commands_info, do_map_commands_command):
237 Remove.
238 (commands_command_1): Update.
239 (iterate_over_related_breakpoints): Take a function_view.
240 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
241 (delete_command): Update.
242 (map_breakpoint_numbers): Take a function_view.
243 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
244 (disable_command): Update.
245 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
246 (enable_command): Update.
247 (struct disp_data, do_enable_breakpoint_disp)
248 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
249 (do_map_enable_delete_breakpoint): Remove.
250 (enable_once_command, enable_count_command, enable_delete_command)
251 (delete_trace_variable_command): Update.
252
253 2017-09-20 Tom Tromey <tom@tromey.com>
254
255 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
256 (bpstat_clear): Use delete.
257 (bpstats): New constructors.
258 (bpstat_copy, bpstat_stop_status): Use new.
259 (dprintf_after_condition_true): Update.
260 * breakpoint.h (bpstats::bpstats): Add constructors.
261 (bpstats::~bpstats): Add destructor.
262
263 2017-09-20 Pedro Alves <palves@redhat.com>
264
265 * eval.c (make_params): Delete, refactored as ...
266 (class fake_method): ... this new type's ctor.
267 (fake_method::~fake_method): New.
268 (evaluate_subexp_standard): Use 'fake_method'.
269
270 2017-09-20 Tom Tromey <tom@tromey.com>
271
272 * windows-nat.c (get_windows_debug_event, windows_wait)
273 (do_initial_windows_stuff, windows_attach): Update.
274 * utils.c (vwarning, internal_vproblem): Update.
275 (ui_unregister_input_event_handler_cleanup)
276 (prepare_to_handle_input): Remove.
277 (class scoped_input_handler): New.
278 (defaulted_query, prompt_for_continue): Update.
279 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
280 Update.
281 * top.c (undo_terminal_modifications_before_exit): Update.
282 * target/target.h (target_terminal_init, target_terminal_inferior)
283 (target_terminal_ours): Don't declare.
284 (class target_terminal): New.
285 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
286 (target_terminal_ours_for_output)
287 (make_cleanup_restore_target_terminal): Don't declare.
288 (target_terminal_info): Remove.
289 * target.c (enum terminal_state, terminal_state): Remove.
290 (target_terminal::terminal_state): Define.
291 (target_terminal::init): Rename from target_terminal_init.
292 (target_terminal::inferior): Rename from
293 target_terminal_inferior.
294 (target_terminal::ours): Rename from target_terminal_ours.
295 (target_terminal::ours_for_output): Rename from
296 target_terminal_ours_for_output.
297 (target_terminal::info): New method.
298 (cleanup_restore_target_terminal)
299 (make_cleanup_restore_target_terminal): Remove.
300 * solib.c (handle_solib_event): Update.
301 * remote.c (remote_serial_quit_handler): Update.
302 (remote_terminal_inferior, remote_wait_as): Update.
303 * record-full.c (record_full_wait_1): Update.
304 * nto-procfs.c (procfs_create_inferior): Update.
305 * nat/fork-inferior.c (startup_inferior): Update.
306 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
307 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
308 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
309 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
310 (mi_breakpoint_created, mi_breakpoint_deleted)
311 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
312 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
313 (mi_user_selected_context_changed, report_initial_inferior):
314 Update.
315 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
316 (linux_nat_terminal_inferior): Update.
317 * infrun.c (follow_fork_inferior)
318 (handle_vfork_child_exec_or_exit, do_target_resume)
319 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
320 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
321 Update.
322 * inflow.c (child_terminal_init, info_terminal_command): Update.
323 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
324 (attach_command): Update.
325 * infcall.c (call_thread_fsm_should_stop): Update.
326 * gnu-nat.c (gnu_attach): Update.
327 * extension.c (struct active_ext_lang_state)
328 (restore_active_ext_lang): Update.
329 * exceptions.c (print_flush): Update.
330 * event-top.c (async_enable_stdin, default_quit_handler): Update.
331 (struct quit_handler_cleanup_data, restore_quit_handler)
332 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
333 Remove.
334 * cp-support.c (gdb_demangle): Update.
335 * breakpoint.c (update_inserted_breakpoint_locations)
336 (insert_breakpoint_locations, handle_jit_event)
337 (disable_breakpoints_in_unloaded_shlib): Update.
338 * annotate.c (annotate_breakpoints_invalid)
339 (annotate_frames_invalid): Update.
340
341 2017-09-20 Tom Tromey <tom@tromey.com>
342
343 * main.c (catch_command_errors): Rename from
344 catch_command_errors_const.
345 (captured_main_1): Update.
346
347 2017-09-20 Pedro Alves <palves@redhat.com>
348
349 * cli/cli-cmds.c (list_command): Use print_sal_location.
350 (print_sal_location): New function.
351 (ambiguous_line_spec): Use print_sal_location.
352 * linespec.c (symbol_to_sal): Record the symbol in the sal.
353 * symtab.c (find_function_start_sal): Likewise.
354 * symtab.h (symtab_and_line::symbol): New field.
355
356 2017-09-20 Pedro Alves <palves@redhat.com>
357
358 * linespec.c (minsym_found): Handle non-text minsyms.
359 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
360
361 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
362
363 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
364 backslash.
365
366 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
367
368 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
369 vmovups instead vmovaps.
370 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
371
372 2017-09-19 John Baldwin <jhb@FreeBSD.org>
373
374 * NEWS (Changes since GDB 8.0): Add starti.
375 * infcmd.c (enum run_break): New.
376 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
377 case.
378 (run_command): Use enum run_how.
379 (start_command): Likewise.
380 (starti_command): New function.
381 (RUN_ARGS_HELP): New macro.
382 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
383 commands. Add starti command.
384
385 2017-09-19 Yao Qi <yao.qi@linaro.org>
386
387 * Makefile.in (monitor.o): Remove the rule.
388
389 2017-09-19 Yao Qi <yao.qi@linaro.org>
390
391 * annotate.h (struct annotate_arg_emitter): Use
392 DISABLE_COPY_AND_ASSIGN.
393 * common/refcounted-object.h (refcounted_object): Likewise.
394 * completer.h (struct completion_result): Likewise.
395 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
396 * filename-seen-cache.h (filename_seen_cache): Likewise.
397 * gdbcore.h (thread_section_name): Likewise.
398 * gdb_regex.h (compiled_regex): Likewise.
399 * gdbthread.h (scoped_restore_current_thread): Likewise.
400 * inferior.h (scoped_restore_current_inferior): Likewise.
401 * jit.c (jit_reader): Likewise.
402 * linespec.h (struct linespec_result): Likewise.
403 * mi/mi-parse.h (struct mi_parse): Likewise.
404 * nat/fork-inferior.c (execv_argv): Likewise.
405 * progspace.h (scoped_restore_current_program_space): Likewise.
406 * python/python-internal.h (class gdbpy_enter): Likewise.
407 * regcache.h (regcache): Likewise.
408 * target-descriptions.c (struct tdesc_reg): Likewise.
409 (struct tdesc_type): Likewise.
410 (struct tdesc_feature): Likewise.
411 * ui-out.h (ui_out_emit_type): Likewise.
412
413 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
414
415 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
416 label abort_expression.
417
418 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
419
420 * common/buffer.c (buffer_xml_printf): Adjust.
421 * common/xml-utils.c (xml_escape_text): Change return type to
422 std::string, update code accordingly.
423 * common/xml-utils.h (xml_escape_text): Change return type to
424 std::string.
425 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
426 * windows-tdep.c (windows_xfer_shared_library): Adjust.
427 * unittests/xml-utils-selftests.c (test_xml_escape_text):
428 Adjust.
429
430 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
431
432 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
433 (SUBDIR_UNITTESTS_OBS): Add new object file.
434 * unittests/xml-utils-selftests.c: New file.
435
436 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
437
438 * common/selftest.h (selftest): New struct/interface.
439 (register_test): Add name parameter, add new overload.
440 (run_tests): Add filter parameter.
441 (for_each_selftest_ftype): New typedef.
442 (for_each_selftest): New declaration.
443 * common/selftest.c (tests): Change type to
444 map<string, unique_ptr<selftest>>.
445 (simple_selftest): New struct.
446 (register_test): New function.
447 (register_test): Add name parameter and use it.
448 (run_tests): Add filter parameter and use it. Add prints.
449 Adjust to vector -> map change.
450 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
451 registering selftests.
452 * arm-tdep.c (_initialize_arm_tdep): Likewise.
453 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
454 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
455 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
456 * findvar.c (_initialize_findvar): Likewise.
457 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
458 * maint.c (maintenance_selftest): Update call to run_tests.
459 (maintenance_info_selftests): New function.
460 (_initialize_maint_cmds): Register "maintenance info selftests"
461 command. Update "maintenance selftest" doc.
462 * regcache.c (_initialize_regcache): Add names when registering
463 selftests.
464 * rust-exp.y (_initialize_rust_exp): Likewise.
465 * selftest-arch.c (gdbarch_selftest): New struct.
466 (gdbarch_tests): Remove.
467 (register_test_foreach_arch): Add name parameter. Call
468 register_test.
469 (tests_with_arch): Remove, move most content to
470 gdbarch_selftest::operator().
471 (_initialize_selftests_foreach_arch): Remove.
472 * selftest-arch.h (register_test_foreach_arch): Add name
473 parameter.
474 (run_tests_with_arch): New declaration.
475 * utils-selftests.c (_initialize_utils_selftests): Add names
476 when registering selftests.
477 * utils.c (_initialize_utils): Likewise.
478 * unittests/array-view-selftests.c
479 (_initialize_array_view_selftests): Likewise.
480 * unittests/environ-selftests.c (_initialize_environ_selftests):
481 Likewise.
482 * unittests/function-view-selftests.c
483 (_initialize_function_view_selftests): Likewise.
484 * unittests/offset-type-selftests.c
485 (_initialize_offset_type_selftests): Likewise.
486 * unittests/optional-selftests.c
487 (_initialize_optional_selftests): Likewise.
488 * unittests/scoped_restore-selftests.c
489 (_initialize_scoped_restore_selftests): Likewise.
490 * NEWS: Document "maintenance selftest" and "maint info
491 selftests".
492
493 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
494
495 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
496 scoped_restore.
497
498 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
499
500 * mi/mi-main.c (mi_load_progress): Make uiout variable
501 a unique_ptr.
502
503 2017-09-15 Pedro Alves <palves@redhat.com>
504
505 * compile/compile-c-types.c (convert_enum, convert_int)
506 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
507
508 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
509
510 * dwarf2read.c (copy_string): Remove.
511 (parse_macro_definition): Replace copy_string with savestring.
512
513 2017-09-15 Yao Qi <yao.qi@linaro.org>
514
515 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
516 gdb_target_obs.
517 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
518 Likewise.
519 (i[34567]86-*-linux*): Likewise.
520
521 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
522
523 * dwarf2expr.h (dwarf_stack_value): Add constructor.
524 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
525 <stack>: Change type to std::vector.
526 <stack_len, stack_allocated>: Remove.
527 <grow_stack>: Remove.
528 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
529 (dwarf_expr_context::~dwarf_expr_context): Remove.
530 (dwarf_expr_context::grow_stack): Remove.
531 (dwarf_expr_context::push): Adjust.
532 (dwarf_expr_context::pop): Adjust.
533 (dwarf_expr_context::fetch): Adjust.
534 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
535 (dwarf_expr_context::stack_empty_p): Adjust.
536 (dwarf_expr_context::execute_stack_op): Adjust.
537
538 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
539
540 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
541 return type to bool.
542 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
543
544 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
545
546 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
547 Change type to bool.
548 (dwarf_stack_value) <in_stack_memory>: Likewise.
549 (dwarf_expr_context) <push_address>: Change parameter type to
550 bool.
551 <fetch_in_stack_memory>: Change return type to bool.
552 <push>: Change parameter type to bool.
553 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
554 to bool.
555 (dwarf_expr_context::push_address): Likewise.
556 (dwarf_expr_context::fetch_in_stack_memory): Change return type
557 to bool.
558 (dwarf_expr_context::execute_stack_op): Adjust.
559 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
560
561 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
562
563 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
564 (struct dwarf_expr_context) <n_pieces>: Remove.
565 <pieces>: Change type to std::vector.
566 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
567 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
568 pieces.
569 (dwarf_expr_context::add_piece): Adjust.
570 * dwarf2loc.c (struct piece_closure): Initialize fields.
571 <n_pieces>: Remove.
572 <pieces>: Change type to std::vector.
573 (allocate_piece_closure): Adjust, change parameter to
574 std::vector rvalue and std::move it to piece_closure.
575 (rw_pieced_value): Adjust.
576 (check_pieced_synthetic_pointer): Adjust.
577 (indirect_synthetic_pointer): Adjust.
578 (coerce_pieced_ref): Adjust.
579 (free_pieced_value_closure): Adjust. Use delete to free
580 piece_closure.
581 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
582 to allocate_piece_closure.
583 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
584
585 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
586
587 * probe.h (probe_ops_cp): Remove typedef.
588 (DEF_VEC_P (probe_ops_cp)): Remove.
589 (all_probe_ops): Change type to std::vector.
590 * probe.c (info_probes_for_ops): Adjust to vector change.
591 (probe_linespec_to_ops): Likewise.
592 (all_probe_ops): Change type to std::vector.
593 (_initialize_probe): Adjust to vector change.
594 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
595 * elfread.c (elf_get_probes): Likewise.
596 * stap-probe.c (_initialize_stap_probe): Likewise.
597
598 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
599
600 * probe.h (struct bound_probe): Define constructors.
601 * probe.c (bound_probe_s): Remove typedef.
602 (DEF_VEC_O (bound_probe_s)): Remove VEC.
603 (collect_probes): Change return type to std::vector, remove
604 cleanup.
605 (compare_probes): Return bool, change parameter type. Change
606 semantic to "less than".
607 (gen_ui_out_table_header_info): Change parameter to std::vector
608 and update.
609 (exists_probe_with_pops): Likewise.
610 (info_probes_for_ops): Update to std::vector change.
611 (enable_probes_command): Likewise.
612 (disable_probes_command): Likewise.
613
614 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
615
616 * probe.h (struct probe_ops) <get_probes>: Change parameter from
617 vec to std::vector.
618 * probe.c (parse_probes_in_pspace): Update.
619 (find_probes_in_objfile): Update.
620 (find_probe_by_pc): Update.
621 (collect_probes): Update.
622 (probe_any_get_probes): Update.
623 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
624 return type to reference to std::vector.
625 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
626 std::vector and update.
627 (dtrace_process_dof): Likewise.
628 (dtrace_get_probes): Likewise.
629 * elfread.c (elf_get_probes): Change return type to std::vector,
630 store an std::vector in bfd_data.
631 (probe_key_free): Update to std::vector.
632 * stap-probe.c (handle_stap_probe): Change parameter to
633 std::vector and update.
634 (stap_get_probes): Likewise.
635 * symfile-debug.c (debug_sym_get_probes): Change return type to
636 std::vector and update.
637
638 2017-09-11 Tom Tromey <tom@tromey.com>
639
640 * breakpoint.c (program_breakpoint_here_p): Update.
641 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
642 from make_show_memory_breakpoints_cleanup. Return a
643 scoped_restore_tmpl<int>.
644 (restore_show_memory_breakpoints): Remove.
645 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
646 * mem-break.c (memory_validate_breakpoint): Update.
647 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
648 (ia64_memory_remove_breakpoint): Update.
649 (ia64_breakpoint_from_pc): Update.
650 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
651 from make_show_memory_breakpoints_cleanup.
652
653 2017-09-11 Tom Tromey <tom@tromey.com>
654
655 * d-namespace.c (d_lookup_symbol): Use std::string.
656 (find_symbol_in_baseclass): Likewise.
657
658 2017-09-11 Tom Tromey <tom@tromey.com>
659
660 * ctf.c (ctf_start): Use std::string.
661
662 2017-09-11 Tom Tromey <tom@tromey.com>
663
664 * ada-lang.c (is_known_support_routine): Update.
665 (ada_unhandled_exception_name_addr_from_raise): Update.
666 * guile/scm-frame.c (gdbscm_frame_name): Update.
667 * python/py-frame.c (frapy_name): Update.
668 (frapy_function): Update.
669 * stack.h (find_frame_funname): Update.
670 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
671 (print_frame): Update.
672
673 2017-09-11 Tom Tromey <tom@tromey.com>
674
675 * findcmd.c (put_bits): Take a gdb::byte_vector.
676 (parse_find_args): Return gdb::byte_vector. "args" now const.
677 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
678 cleanups.
679 (find_command): Update.
680
681 2017-09-11 Tom Tromey <tom@tromey.com>
682
683 * cli/cli-script.c (class scoped_restore_hook_in): New.
684 (clear_hook_in_cleanup): Remove.
685 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
686 scoped_restore_hook_in.
687
688 2017-09-11 Tom Tromey <tom@tromey.com>
689
690 * cli/cli-script.c (restore_interp): Remove.
691 (read_command_lines): Use scoped_restore_interp.
692 * interps.c (scoped_restore_interp::set_temp): Rename from
693 interp_set_temp.
694 * interps.h (class scoped_restore_interp): New.
695 (interp_set_temp): Remove.
696
697 2017-09-11 Tom Tromey <tom@tromey.com>
698
699 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
700 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
701 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
702 scoped_restore.
703 (mi_cmd_break_insert_1): Update.
704 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
705 scoped_restore.
706
707 2017-09-11 Tom Tromey <tom@tromey.com>
708
709 * demangle.c (demangle_command): Update.
710 * breakpoint.c (disable_command): Update.
711 (enable_command): Update.
712 (find_location_by_number): Make "number" const. Use
713 get_number_trailer.
714 * cli/cli-utils.c (extract_arg): Return std::string.
715 * probe.c (parse_probe_linespec): Update. Change types.
716 (collect_probes): Take string arguments.
717 (parse_probe_linespec): Likewise.
718 (info_probes_for_ops): Update.
719 (enable_probes_command): Update.
720 (disable_probes_command): Update.
721 * break-catch-sig.c (catch_signal_split_args): Update.
722 * mi/mi-parse.c (mi_parse): Update.
723
724 2017-09-11 Tom Tromey <tom@tromey.com>
725
726 * language.h (language_enum): Make argument const.
727 * language.c (language_enum): Make argument const.
728
729 2017-09-11 Tom Tromey <tom@tromey.com>
730
731 * common/common-utils.h (skip_to_space): Remove macro, redeclare
732 as function.
733 (skip_to_space): Rename from skip_to_space_const.
734 * common/common-utils.c (skip_to_space): New function.
735 (skip_to_space): Rename from skip_to_space_const.
736 * cli/cli-utils.h (get_number): Rename from get_number_const.
737 (extract_arg): Rename from extract_arg_const.
738 * cli/cli-utils.c (get_number): Rename from get_number_const.
739 (extract_arg): Rename from extract_arg_const.
740 (number_or_range_parser::get_number): Use ::get_number.
741 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
742 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
743 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
744 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
745 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
746 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
747 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
748 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
749
750 2017-09-11 Tom Tromey <tom@tromey.com>
751
752 * python/python.c (do_start_initialization): Use
753 py-event-types.def to initialize types.
754 Define all object type structures.
755 * python/python-internal.h: Don't declare event initialization
756 functions.
757 * python/py-threadevent.c (thread_event_object_type): Don't
758 define.
759 * python/py-stopevent.c (stop_event_object_type): Don't define.
760 * python/py-signalevent.c (signal_event_object_type): Don't
761 declare or define.
762 * python/py-newobjfileevent.c (new_objfile_event_object_type)
763 (clear_objfiles_event_object_type): Don't declare or define.
764 * python/py-infevents.c (inferior_call_pre_event_object_type)
765 (inferior_call_post_event_object_type)
766 (register_changed_event_object_type)
767 (memory_changed_event_object_type): Don't declare or define.
768 * python/py-inferior.c (new_thread_event_object_type)
769 (new_inferior_event_object_type)
770 (inferior_deleted_event_object_type): Don't declare or define.
771 * python/py-exitedevent.c (exited_event_object_type): Don't
772 declare or define.
773 * python/py-evts.c (gdbpy_initialize_py_events): Use
774 py-all-events.def.
775 * python/py-events.h (thread_event_object_type): Don't declare.
776 (events_object): Use py-all-events.def.
777 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
778 py-event-types.def.
779 * python/py-event-types.def: New file.
780 * python/py-continueevent.c (create_continue_event_object): Don't
781 declare or define.
782 * python/py-bpevent.c (breakpoint_event_object_type): Don't
783 declare or define.
784 * python/py-all-events.def: New file.
785
786 2017-09-11 Tom Tromey <tom@tromey.com>
787
788 * python/py-threadevent.c (create_thread_event_object): Return
789 gdbpy_ref.
790 * python/py-stopevent.h (create_stop_event_object)
791 (create_breakpoint_event_object, create_signal_event_object):
792 Update.
793 * python/py-stopevent.c (create_stop_event_object): Return
794 gdbpy_ref.
795 (emit_stop_event): Update.
796 * python/py-signalevent.c (create_signal_event_object): Return
797 gdbpy_ref.
798 * python/py-infevents.c (create_inferior_call_event_object):
799 Update.
800 * python/py-event.h (create_event_object)
801 (create_thread_event_object): Update.
802 * python/py-event.c (create_event_object): Return gdbpy_ref.
803 * python/py-continueevent.c: Return gdbpy_ref.
804 * python/py-bpevent.c (create_breakpoint_event_object): Return
805 gdbpy_ref.
806
807 2017-09-11 Tom Tromey <tom@tromey.com>
808
809 PR python/15622:
810 * NEWS: Add entry.
811 * python/python.c (do_start_initialization): Initialize new event
812 types.
813 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
814 (gdbpy_initialize_inferior_deleted_event)
815 (gdbpy_initialize_new_thread_event): Declare.
816 * python/py-threadevent.c (create_thread_event_object): Add option
817 "thread" parameter.
818 * python/py-inferior.c (new_thread_event_object_type)
819 (new_inferior_event_object_type)
820 (inferior_deleted_event_object_type): Declare.
821 (python_new_inferior, python_inferior_deleted): New functions.
822 (add_thread_object): Emit new_thread event.
823 (gdbpy_initialize_inferior): Attach new functions to corresponding
824 observers.
825 (new_thread, new_inferior, inferior_deleted): Define new event
826 types.
827 * python/py-evts.c (gdbpy_initialize_py_events): Add new
828 registries.
829 * python/py-events.h (events_object) <new_inferior,
830 inferior_deleted, new_thread>: New fields.
831 * python/py-event.h (create_thread_event_breakpoint): Add optional
832 "thread" parameter.
833
834 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
835
836 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
837 check current_ui instead.
838 (internal_vproblem): Likewise.
839
840 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
841
842 * thread.c (print_thread_info_1): Remove unnecessary calls to
843 uiout->is_mi_like_p.
844
845 2017-09-09 Tom Tromey <tom@tromey.com>
846
847 * namespace.h (add_using_directive): Update.
848 * namespace.c (add_using_directive): Change type of excludes to
849 std::vector.
850 * dwarf2read.c (read_import_statement): Use std::vector.
851 (read_namespace): Update.
852 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
853
854 2017-09-09 Tom Tromey <tom@tromey.com>
855
856 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
857
858 2017-09-09 Tom Tromey <tom@tromey.com>
859
860 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
861
862 2017-09-09 Tom Tromey <tom@tromey.com>
863
864 * stack.c (func_command): Use gdb::def_vector.
865
866 2017-09-09 Tom Tromey <tom@tromey.com>
867
868 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
869 ui_out_emit_list, ui_out_emit_tuple.
870 (mi_cmd_var_update): Likewise.
871
872 2017-09-09 Tom Tromey <tom@tromey.com>
873
874 * mi/mi-interp.c (mi_user_selected_context_changed): Use
875 ui_out_redirect_pop.
876 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
877 ui_out_redirect_pop.
878 * utils.c (do_ui_out_redirect_pop)
879 (make_cleanup_ui_out_redirect_pop): Remove.
880 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
881 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
882 * ui-out.h (ui_out_redirect_pop): New class.
883
884 2017-09-09 Tom Tromey <tom@tromey.com>
885
886 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
887 (list_available_thread_groups, mi_cmd_list_thread_groups)
888 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
889 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
890 Likewise.
891
892 2017-09-09 Tom Tromey <tom@tromey.com>
893
894 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
895 ui_out_emit_tuple.
896
897 2017-09-09 Tom Tromey <tom@tromey.com>
898
899 * target.c (flash_erase_command): Use ui_out_emit_tuple.
900 * stack.c (print_frame): Use ui_out_emit_tuple.
901 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
902 (info_spu_mailbox_command, info_spu_dma_command)
903 (info_spu_proxydma_command): Likewise.
904 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
905 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
906 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
907 ui_out_emit_tuple.
908 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
909
910 2017-09-09 Tom Tromey <tom@tromey.com>
911
912 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
913 (class ui_out_emit_table): Update comment.
914 * ui-out.c (do_cleanup_table_end)
915 (make_cleanup_ui_out_table_begin_end): Remove.
916 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
917 (info_spu_dma_cmdlist): Likewise.
918 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
919 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
920 ui_out_emit_table.
921
922 2017-09-09 Tom Tromey <tom@tromey.com>
923
924 * thread.c (print_thread_info_1): Use ui_out_emit_table,
925 ui_out_emit_list, gdb::optional.
926
927 2017-09-09 John Baldwin <jhb@FreeBSD.org>
928
929 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
930 prototype.
931 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
932 prototype.
933 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
934 prototype.
935 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
936 * ada-exp.y: Remove _initialize_ada_exp prototype.
937 * ada-lang.c: Remove _initialize_ada_language prototype.
938 * ada-tasks.c: Remove _initialize_tasks prototype.
939 * addrmap.c: Remove _initialize_addrmap prototype.
940 * agent.c: Remove _initialize_agent prototype.
941 * aix-thread.c: Remove _initialize_aix_thread prototype.
942 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
943 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
944 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
945 prototype.
946 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
947 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
948 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
949 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
950 prototype.
951 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
952 prototype.
953 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
954 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
955 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
956 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
957 prototype.
958 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
959 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
960 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
961 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
962 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
963 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
964 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
965 prototype.
966 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
967 prototype.
968 * annotate.c: Remove _initialize_annotate prototype.
969 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
970 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
971 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
972 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
973 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
974 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
975 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
976 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
977 prototype.
978 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
979 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
980 * auto-load.c: Remove _initialize_auto_load prototype.
981 * auxv.c: Remove _initialize_auxv prototype.
982 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
983 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
984 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
985 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
986 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
987 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
988 prototype.
989 * break-catch-throw.c: Remove _initialize_break_catch_throw
990 prototype.
991 * breakpoint.c: Remove _initialize_breakpoint prototype.
992 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
993 * btrace.c: Remove _initialize_btrace prototype.
994 * charset.c: Remove _initialize_charset prototype.
995 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
996 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
997 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
998 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
999 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1000 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1001 * coffread.c: Remove _initialize_coffread prototype.
1002 * compile/compile.c: Remove _initialize_compile prototype.
1003 * complaints.c: Remove _initialize_complaints prototype.
1004 * completer.c: Remove _initialize_completer prototype.
1005 * copying.awk: Remove _initialize_copying prototype.
1006 * copying.c: Regenerate.
1007 * core-regset.c: Remove _initialize_core_regset prototype.
1008 * corefile.c: Remove _initialize_core prototype.
1009 * corelow.c: Remove _initialize_corelow prototype.
1010 * cp-abi.c: Remove _initialize_cp_abi prototype.
1011 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1012 * cp-support.c: Remove _initialize_cp_support prototype.
1013 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1014 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1015 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1016 * ctf.c: Remove _initialize_ctf prototype.
1017 * d-lang.c: Remove _initialize_d_language prototype.
1018 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1019 prototype.
1020 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1021 * dbxread.c: Remove _initialize_dbxread prototype.
1022 * dcache.c: Remove _initialize_dcache prototype.
1023 * demangle.c: Remove _initialize_demangler prototype.
1024 * disasm-selftests.c: Remove _initialize_disasm_selftests
1025 prototype.
1026 * disasm.c: Remove _initialize_disasm prototype.
1027 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1028 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1029 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1030 prototype.
1031 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1032 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1033 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1034 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1035 * elfread.c: Remove _initialize_elfread prototype.
1036 * exec.c: Remove _initialize_exec prototype.
1037 * extension.c: Remove _initialize_extension prototype.
1038 * f-lang.c: Remove _initialize_f_language prototype.
1039 * f-valprint.c: Remove _initialize_f_valprint prototype.
1040 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1041 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1042 * filesystem.c: Remove _initialize_filesystem prototype.
1043 * findcmd.c: Remove _initialize_mem_search prototype.
1044 * fork-child.c: Remove _initialize_fork_child prototype.
1045 * frame-base.c: Remove _initialize_frame_base prototype.
1046 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1047 * frame.c: Remove _initialize_frame prototype.
1048 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1049 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1050 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1051 * gcore.c: Remove _initialize_gcore prototype.
1052 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1053 * gdbarch.c: Regenerate.
1054 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1055 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1056 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1057 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1058 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1059 * go-lang.c: Remove _initialize_go_language prototype.
1060 * go32-nat.c: Remove _initialize_go32_nat prototype.
1061 * guile/guile.c: Remove _initialize_guile prototype.
1062 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1063 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1064 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1065 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1066 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1067 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1068 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1069 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1070 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1071 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1072 prototype.
1073 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1074 prototype.
1075 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1076 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1077 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1078 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1079 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1080 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1081 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1082 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1083 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1084 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1085 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1086 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1087 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1088 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1089 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1090 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1091 prototype.
1092 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1093 prototype.
1094 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1095 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1096 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1097 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1098 * infcall.c: Remove _initialize_infcall prototype.
1099 * infcmd.c: Remove _initialize_infcmd prototype.
1100 * inferior.c: Remove _initialize_inferiors prototype.
1101 * inflow.c: Remove _initialize_inflow prototype.
1102 * infrun.c: Remove _initialize_infrun prototype.
1103 * interps.c: Remove _initialize_interpreter prototype.
1104 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1105 * jit.c: Remove _initialize_jit prototype.
1106 * language.c: Remove _initialize_language prototype.
1107 * linux-fork.c: Remove _initialize_linux_fork prototype.
1108 * linux-nat.c: Remove _initialize_linux_nat prototype.
1109 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1110 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1111 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1112 * m2-lang.c: Remove _initialize_m2_language prototype.
1113 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1114 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1115 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1116 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1117 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1118 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1119 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1120 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1121 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1122 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1123 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1124 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1125 * machoread.c: Remove _initialize_machoread prototype.
1126 * macrocmd.c: Remove _initialize_macrocmd prototype.
1127 * macroscope.c: Remove _initialize_macroscope prototype.
1128 * maint.c: Remove _initialize_maint_cmds prototype.
1129 * mdebugread.c: Remove _initialize_mdebugread prototype.
1130 * memattr.c: Remove _initialize_mem prototype.
1131 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1132 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1133 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1134 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1135 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1136 * microblaze-linux-tdep.c: Remove
1137 _initialize_microblaze_linux_tdep prototype.
1138 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1139 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1140 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1141 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1142 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1143 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1144 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1145 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1146 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1147 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1148 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1149 prototype.
1150 * mipsread.c: Remove _initialize_mipsread prototype.
1151 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1152 prototype.
1153 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1154 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1155 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1156 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1157 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1158 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1159 prototype.
1160 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1161 * nto-procfs.c: Remove _initialize_procfs prototype.
1162 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1163 * objc-lang.c: Remove _initialize_objc_language prototype.
1164 * objfiles.c: Remove _initialize_objfiles prototype.
1165 * observer.c: Remove observer_test_first_notification_function,
1166 observer_test_second_notification_function,
1167 observer_test_third_notification_function, and
1168 _initialize_observer prototypes.
1169 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1170 * osabi.c: Remove _initialize_gdb_osabi prototype.
1171 * osdata.c: Remove _initialize_osdata prototype.
1172 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1173 * parse.c: Remove _initialize_parse prototype.
1174 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1175 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1176 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1177 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1178 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1179 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1180 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1181 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1182 * printcmd.c: Remove _initialize_printcmd prototype.
1183 * probe.c: Remove _initialize_probe prototype.
1184 * proc-api.c: Remove _initialize_proc_api prototype.
1185 * proc-events.c: Remove _initialize_proc_events prototype.
1186 * proc-service.c: Remove _initialize_proc_service prototype.
1187 * procfs.c: Remove _initialize_procfs prototype.
1188 * psymtab.c: Remove _initialize_psymtab prototype.
1189 * python/python.c: Remove _initialize_python prototype.
1190 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1191 * record-btrace.c: Remove _initialize_record_btrace prototype.
1192 * record-full.c: Remove _initialize_record_full prototype.
1193 * record.c: Remove _initialize_record prototype.
1194 * regcache.c: Remove _initialize_regcache prototype.
1195 * reggroups.c: Remove _initialize_reggroup prototype.
1196 * remote-notif.c: Remove _initialize_notif prototype.
1197 * remote-sim.c: Remove _initialize_remote_sim prototype.
1198 * remote.c: Remove _initialize_remote prototype.
1199 * reverse.c: Remove _initialize_reverse prototype.
1200 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1201 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1202 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1203 prototype.
1204 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1205 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1206 * rust-exp.y: Remove _initialize_rust_exp prototype.
1207 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1208 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1209 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1210 * score-tdep.c: Remove _initialize_score_tdep prototype.
1211 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1212 prototype.
1213 * ser-go32.c: Remove _initialize_ser_dos prototype.
1214 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1215 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1216 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1217 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1218 * serial.c: Remove _initialize_serial prototype.
1219 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1220 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1221 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1222 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1223 * skip.c: Remove _initialize_step_skip prototype.
1224 * sol-thread.c: Remove _initialize_sol_thread prototype.
1225 * solib-aix.c: Remove _initialize_solib_aix prototype.
1226 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1227 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1228 * solib-frv.c: Remove _initialize_frv_solib prototype.
1229 * solib-spu.c: Remove _initialize_spu_solib prototype.
1230 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1231 * solib-target.c: Remove _initialize_solib_target prototype.
1232 * solib.c: Remove _initialize_solib prototype.
1233 * source.c: Remove _initialize_source prototype.
1234 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1235 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1236 prototype.
1237 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1238 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1239 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1240 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1241 prototype.
1242 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1243 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1244 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1245 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1246 prototype.
1247 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1248 prototype.
1249 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1250 prototype.
1251 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1252 prototype.
1253 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1254 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1255 prototype.
1256 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1257 prototype.
1258 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1259 prototype.
1260 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1261 prototype.
1262 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1263 prototype.
1264 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1265 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1266 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1267 * stabsread.c: Remove _initialize_stabsread prototype.
1268 * stack.c: Remove _initialize_stack prototype.
1269 * stap-probe.c: Remove _initialize_stap_probe prototype.
1270 * std-regs.c: Remove _initialize_frame_reg prototype.
1271 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1272 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1273 * symfile.c: Remove _initialize_symfile prototype.
1274 * symmisc.c: Remove _initialize_symmisc prototype.
1275 * symtab.c: Remove _initialize_symtab prototype.
1276 * target-dcache.c: Remove _initialize_target_dcache prototype.
1277 * target-descriptions.c: Remove _initialize_target_descriptions
1278 prototype.
1279 * thread.c: Remove _initialize_thread prototype.
1280 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1281 prototype.
1282 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1283 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1284 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1285 prototype.
1286 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1287 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1288 * tracefile.c: Remove _initialize_tracefile prototype.
1289 * tracepoint.c: Remove _initialize_tracepoint prototype.
1290 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1291 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1292 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1293 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1294 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1295 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1296 * tui/tui.c: Remove _initialize_tui prototype.
1297 * typeprint.c: Remove _initialize_typeprint prototype.
1298 * user-regs.c: Remove _initialize_user_regs prototype.
1299 * utils.c: Remove _initialize_utils prototype.
1300 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1301 * valarith.c: Remove _initialize_valarith prototype.
1302 * valops.c: Remove _initialize_valops prototype.
1303 * valprint.c: Remove _initialize_valprint prototype.
1304 * value.c: Remove _initialize_values prototype.
1305 * varobj.c: Remove _initialize_varobj prototype.
1306 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1307 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1308 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1309 * windows-nat.c: Remove _initialize_windows_nat,
1310 _initialize_check_for_gdb_ini, and _initialize_loadable
1311 prototypes.
1312 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1313 * xcoffread.c: Remove _initialize_xcoffread prototype.
1314 * xml-support.c: Remove _initialize_xml_support prototype.
1315 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1316 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1317 prototype.
1318 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1319 prototype.
1320 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1321
1322 2017-09-08 Keith Seitz <keiths@redhat.com>
1323
1324 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1325 field.
1326
1327 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1328
1329 * f-valprint.c (f_val_print): Remove check for one byte
1330 sized integers. Remove printing of character type.
1331
1332 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1333 Christoph Weinmann <christoph.t.weinmann@intel.com>
1334 Bernhard Heckel <bernhard.heckel@intel.com>
1335
1336 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1337 to maintain proper indentation when printing pointers/refs.
1338
1339 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1340
1341 GDB 8.0.1 released.
1342
1343 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1344
1345 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1346
1347 2017-09-05 Tom Tromey <tom@tromey.com>
1348
1349 * parse.c (funcall_chain): Now a std::vector.
1350 (start_arglist, end_arglist): Simplify.
1351 (free_funcalls): Remove.
1352 (parse_exp_in_context_1): Remove cleanup.
1353
1354 2017-09-05 Tom Tromey <tom@tromey.com>
1355
1356 * go-exp.y (go_parse): Don't create a cleanup.
1357
1358 2017-09-05 Tom Tromey <tom@tromey.com>
1359
1360 * d-exp.y (PrimaryExpression): Use std::string.
1361 (d_parse): Don't create a cleanup.
1362
1363 2017-09-05 Tom Tromey <tom@tromey.com>
1364
1365 * utils.c (do_clear_parser_state): Remove.
1366 (make_cleanup_clear_parser_state): Remove.
1367 * p-exp.y (pascal_parse): Use scoped_restore.
1368 * m2-exp.y (m2_parse): Use scoped_restore.
1369 * f-exp.y (f_parse): Use scoped_restore.
1370 * d-exp.y (d_parse): Use scoped_restore.
1371 * c-exp.y (c_parse): Use scoped_restore.
1372 * ada-exp.y (ada_parse): Use scoped_restore.
1373 * utils.h (make_cleanup_clear_parser_state): Remove.
1374
1375 2017-09-06 Keith Seitz <keiths@redhat.com>
1376
1377 * dwarf2read.c (dw2_linkage_name_attr): New function.
1378 (dw2_linkage_name): New function.
1379 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1380 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1381 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1382
1383 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1384
1385 * config/djgpp/djconfig.sh: Correct shell portability issue.
1386
1387 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1388
1389 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1390
1391 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1392
1393 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1394 * NEWS: Mention new FreeBSD/mips native configuration.
1395 * configure.host: Add aarch64*-*-freebsd*.
1396 * configure.nat: Likewise.
1397 * aarch64-fbsd-nat.c: New file.
1398
1399 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1400
1401 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1402 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1403 * NEWS: Mention new FreeBSD/aarch64 target.
1404 * configure.tgt: Add aarch64*-*-freebsd*.
1405 * aarch64-fbsd-tdep.c: New file.
1406 * aarch64-fbsd-tdep.h: New file.
1407
1408 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1409
1410 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1411
1412 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1413
1414 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1415 of TLS symbols.
1416
1417 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1418
1419 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1420 call.
1421
1422 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1423
1424 * infrun.c (follow_exec): Call add_thread after
1425 target_find_description.
1426
1427 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1428
1429 * infrun.c (handle_inferior_event_1): When exec'ing, read
1430 stop_pc after follow_exec.
1431
1432 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1433
1434 * remote.c (process_g_packet): Update error message.
1435
1436 2017-09-05 Yao Qi <yao.qi@linaro.org>
1437
1438 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1439 targets.
1440
1441 2017-09-05 Pedro Alves <palves@redhat.com>
1442
1443 * eval.c (eval_call, evaluate_funcall): New functions, factored
1444 out from ...
1445 (evaluate_subexp_standard): ... this.
1446
1447 2017-09-05 Yao Qi <yao.qi@linaro.org>
1448
1449 * amd64-tdep.c (amd64_target_description): Create target
1450 descriptions.
1451 (_initialize_amd64_tdep): Don't call functions
1452 initialize_tdesc_amd64_*. Add self tests.
1453 * arch/amd64.c (amd64_create_target_description): Add parameter
1454 is_linux. Call set_tdesc_osabi if is_linux is true.
1455 * arch/amd64.h (amd64_create_target_description): Update the
1456 declaration.
1457 * arch/i386.c (i386_create_target_description): Add parameter
1458 is_linux. Call set_tdesc_osabi if is_linux is true.
1459 * arch/i386.h (i386_create_target_description): Update
1460 declaration.
1461 * configure.tgt: Add i386.o to gdb_target_obs.
1462 * features/Makefile (XMLTOC): Remove i386/*.xml.
1463 * features/i386/amd64-avx-avx512.c: Remove.
1464 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1465 * features/i386/amd64-avx-mpx.c: Remove.
1466 * features/i386/amd64-avx.c: Remove.
1467 * features/i386/amd64-mpx.c: Remove.
1468 * features/i386/amd64.c: Remove.
1469 * features/i386/i386-avx-avx512.c: Remove.
1470 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1471 * features/i386/i386-avx-mpx.c: Remove.
1472 * features/i386/i386-avx.c: Remove.
1473 * features/i386/i386-mmx.c: Remove.
1474 * features/i386/i386-mpx.c: Remove.
1475 * features/i386/i386.c: Remove.
1476 * i386-tdep.c: Don't include features/i386/i386*.c., include
1477 target-descriptions.h and arch/i386.h.
1478 (i386_target_description): Create target descriptions.
1479 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1480 functions. Do self tests.
1481
1482 2017-09-05 Yao Qi <yao.qi@linaro.org>
1483
1484 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1485 * features/i386/amd64-avx-avx512-linux.c: Removed.
1486 * features/i386/amd64-avx-linux.c: Removed.
1487 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1488 * features/i386/amd64-avx-mpx-linux.c: Removed.
1489 * features/i386/amd64-linux.c: Removed.
1490 * features/i386/amd64-mpx-linux.c: Removed.
1491 * features/i386/x32-avx-avx512-linux.c: Removed.
1492 * features/i386/x32-avx-linux.c: Removed.
1493 * features/i386/x32-linux.c: Removed.
1494
1495 2017-09-05 Yao Qi <yao.qi@linaro.org>
1496
1497 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1498 features/i386/*.c.
1499 (amd64_linux_read_description): Call
1500 amd64_create_target_description.
1501 * arch/amd64.c: New file.
1502 * arch/amd64.h: New file.
1503 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1504 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1505
1506 2017-09-05 Yao Qi <yao.qi@linaro.org>
1507
1508 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1509 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1510 (amd64_linux_read_description): Create target descriptions.
1511 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1512 functions. Add unit tests.
1513 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1514 x32-core.xml.
1515 * features/i386/64bit-avx.c: Generated.
1516 * features/i386/64bit-avx512.c: Generated.
1517 * features/i386/64bit-core.c: Generated.
1518 * features/i386/64bit-linux.c: Generated.
1519 * features/i386/64bit-mpx.c: Generated.
1520 * features/i386/64bit-pkeys.c: Generated.
1521 * features/i386/64bit-segments.c: Generated.
1522 * features/i386/64bit-sse.c: Generated.
1523 * features/i386/x32-core.c: Generated.
1524 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1525 c files for amd64-linux and x32-linux.
1526
1527 2017-09-05 Yao Qi <yao.qi@linaro.org>
1528
1529 * amd64-linux-tdep.c (amd64_linux_read_description): New
1530 function.
1531 (amd64_linux_core_read_description): Call
1532 amd64_linux_read_description.
1533 (amd64_linux_init_abi): Likewise.
1534 (amd64_x32_linux_init_abi): Likewise.
1535 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1536 * x86-linux-nat.c (x86_linux_read_description): Call
1537 amd64_linux_read_description.
1538
1539 2017-09-05 Yao Qi <yao.qi@linaro.org>
1540
1541 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1542 comments.
1543
1544 2017-09-05 Yao Qi <yao.qi@linaro.org>
1545
1546 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1547 * features/i386/i386-avx-avx512-linux.c: Remove.
1548 * features/i386/i386-avx-linux.c: Remove.
1549 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1550 * features/i386/i386-avx-mpx-linux.c: Remove.
1551 * features/i386/i386-linux.c: Remove.
1552 * features/i386/i386-mmx-linux.c: Remove.
1553 * features/i386/i386-mpx-linux.c: Remove.
1554
1555 2017-09-05 Yao Qi <yao.qi@linaro.org>
1556
1557 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1558 (SFILES): Add arch/i386.c.
1559 (HFILES_NO_SRCDIR): Add arch/i386.h.
1560 * arch/i386.c: New file.
1561 * arch/i386.h: New file.
1562 * arch/tdesc.h (allocate_target_description): Declare.
1563 (set_tdesc_architecture): Declare.
1564 (set_tdesc_osabi): Declare.
1565 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1566 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1567 include arch/i386.h.
1568 (i386_linux_read_description): Remove code and call
1569 i386_create_target_description.
1570 (set_tdesc_architecture): New function.
1571 (set_tdesc_osabi): New function.
1572 * target-descriptions.h (allocate_target_description): Remove.
1573
1574 2017-09-05 Yao Qi <yao.qi@linaro.org>
1575
1576 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1577 * target-descriptions.c (tdesc_create_feature): Likewise, and
1578 adjust code.
1579 * features/i386/32bit-avx.c: Re-generated.
1580 * features/i386/32bit-avx512.c: Re-generated.
1581 * features/i386/32bit-core.c: Re-generated.
1582 * features/i386/32bit-linux.c: Re-generated.
1583 * features/i386/32bit-mpx.c: Re-generated.
1584 * features/i386/32bit-pkeys.c: Re-generated.
1585 * features/i386/32bit-sse.c: Re-generated.
1586
1587 2017-09-05 Yao Qi <yao.qi@linaro.org>
1588
1589 * regformats/regdef.h (struct reg): Override operator == and !=.
1590
1591 2017-09-05 Yao Qi <yao.qi@linaro.org>
1592
1593 * arch/tdesc.h: New file.
1594 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1595 * target-descriptions.c: Update comments.
1596 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1597 declarations.
1598 * features/i386/32bit-avx.c: Re-generated.
1599 * features/i386/32bit-avx512.c: Re-generated.
1600 * features/i386/32bit-core.c: Re-generated.
1601 * features/i386/32bit-linux.c: Re-generated.
1602 * features/i386/32bit-mpx.c: Re-generated.
1603 * features/i386/32bit-pkeys.c: Re-generated.
1604 * features/i386/32bit-sse.c: Re-generated.
1605
1606 2017-09-05 Yao Qi <yao.qi@linaro.org>
1607
1608 * regformats/regdat.sh: Update generated code.
1609
1610 2017-09-05 Yao Qi <yao.qi@linaro.org>
1611
1612 * regformats/regdat.sh: Adjust code order.
1613
1614 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1615
1616 * expprint.c (dump_subexp_body_standard): Use constant format
1617 string in fprintf_filtered call.
1618
1619 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1620
1621 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1622 NetBSD/i386.
1623 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1624
1625 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1626
1627 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1628
1629 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1630
1631 * bsd-kvm.o: Define _KMEMUSER.
1632 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1633 * configure: Regenerate.
1634
1635 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1636
1637 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1638 * i386-fbsd-nat.c: Likewise.
1639
1640 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1641
1642 * unittests/array-view-selftests.c: Add include of <array>.
1643
1644 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1645
1646 * spu-tdep.c (flush_ea_cache): Add missing argument to
1647 call_function_by_hand.
1648
1649 2017-09-04 Pedro Alves <palves@redhat.com>
1650
1651 * NEWS (Safer support for debugging with no debug info): New.
1652
1653 2017-09-04 Pedro Alves <palves@redhat.com>
1654
1655 * c-exp.y (function_method, function_method_void): Add current
1656 instance flags to TYPE_INSTANCE.
1657 * dwarf2read.c (check_modifier): New.
1658 (compute_delayed_physnames): Assert that only C++ adds delayed
1659 physnames. Mark fn_fields as const/volatile depending on
1660 physname.
1661 * eval.c (make_params): New type_instance_flags parameter. Use
1662 it as the new type's instance flags.
1663 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1664 flags element and pass it to make_params.
1665 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1666 instance flags element.
1667 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1668 * gdbtypes.h: Include "enum-flags.h".
1669 (type_instance_flags): New enum-flags type.
1670 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1671 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1672 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1673 (follow_type_instance_flags): New function.
1674 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1675 * parser-defs.h (follow_type_instance_flags): Declare.
1676 * valops.c (value_struct_elt_for_reference): const/volatile must
1677 match too.
1678
1679 2017-09-04 Pedro Alves <palves@redhat.com>
1680
1681 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1682 function/method scopes; lookup the nested name as a function local
1683 static variable.
1684
1685 2017-09-04 Pedro Alves <palves@redhat.com>
1686
1687 (%type <voidval>): Add function_method.
1688 * c-exp.y (exp): New production for calls with no arguments.
1689 (function_method, function_method_void_or_typelist): New
1690 productions.
1691 (exp): New production for "method()::static_var".
1692 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1693 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1694 Handle OP_FUNC_STATIC_VAR.
1695 * parse.c (operator_length_standard):
1696 Handle OP_FUNC_STATIC_VAR.
1697
1698 2017-09-04 Pedro Alves <palves@redhat.com>
1699
1700 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1701 handling.
1702 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1703 Ditto.
1704 * parse.c (operator_length_standard, operator_check_standard):
1705 Ditto.
1706 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1707
1708 2017-09-04 Pedro Alves <palves@redhat.com>
1709
1710 * ax-gdb.c: Include "typeprint.h".
1711 (gen_expr_for_cast): New function.
1712 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1713 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1714 type is unknown.
1715 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1716 nodebug_data_symbol.
1717 * eval.c: Include "typeprint.h".
1718 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1719 Error out if symbol has unknown type.
1720 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1721 evaluate_subexp_for_cast.
1722 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1723 OP_VAR_MSYM_VALUE.
1724 (evaluate_subexp_for_cast): New function.
1725 * gdbtypes.c (init_nodebug_var_type): New function.
1726 (objfile_type): Use it to initialize types of variables with no
1727 debug info.
1728 * typeprint.c (error_unknown_type): New.
1729 * typeprint.h (error_unknown_type): New declaration.
1730 * compile/compile-c-types.c (convert_type_basic): Handle
1731 TYPE_CODE_ERROR; warn and fallback to int for variables with
1732 unknown type.
1733
1734 2017-09-04 Pedro Alves <palves@redhat.com>
1735
1736 * eval.c (evaluate_var_value): New function, factored out from ...
1737 (evaluate_subexp_standard): ... here.
1738
1739 2017-09-04 Pedro Alves <palves@redhat.com>
1740
1741 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1742 Remove useless assignments to 'op'.
1743
1744 2017-09-04 Pedro Alves <palves@redhat.com>
1745
1746 * eval.c (eval_skip_value): New function.
1747 (evaluate_subexp_standard): Use it.
1748
1749 2017-09-04 Pedro Alves <palves@redhat.com>
1750
1751 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1752 function name from symbol/minsym and pass it to
1753 error_call_unknown_return_type.
1754
1755 2017-09-04 Pedro Alves <palves@redhat.com>
1756
1757 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1758 * ax-gdb.c (gen_msym_var_ref): New function.
1759 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1760 * eval.c (evaluate_var_msym_value): New function.
1761 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1762 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1763 to call_function_by_hand.
1764 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1765 Handle OP_VAR_MSYM_VALUE.
1766 (union exp_element) <msymbol>: New field.
1767 * minsyms.h (struct type): Forward declare.
1768 (find_minsym_type_and_address): Declare.
1769 * parse.c (write_exp_elt_msym): New function.
1770 (write_exp_msymbol): Delete, refactored as ...
1771 (find_minsym_type_and_address): ... this new function.
1772 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1773 (operator_length_standard, operator_check_standard): Handle
1774 OP_VAR_MSYM_VALUE.
1775 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1776
1777 2017-09-04 Pedro Alves <palves@redhat.com>
1778
1779 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1780 TYPE_GNU_IFUNC specially here. Throw error if return type is
1781 unknown.
1782 * ada-typeprint.c (print_func_type): Handle functions with unknown
1783 return type.
1784 * c-typeprint.c (c_type_print_base): Handle functions and methods
1785 with unknown return type.
1786 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1787 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1788 * compile/compile-c-types.c: Include "objfiles.h".
1789 (convert_func): For functions with unknown return type, warn and
1790 default to int.
1791 * compile/compile-object-run.c (compile_object_run): Adjust call
1792 to call_function_by_hand_dummy.
1793 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1794 call_function_by_hand.
1795 * eval.c (evaluate_subexp_standard): Adjust calls to
1796 call_function_by_hand. Handle functions and methods with unknown
1797 return type. Pass expect_type to call_function_by_hand.
1798 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1799 return type.
1800 * gcore.c (call_target_sbrk): Adjust call to
1801 call_function_by_hand.
1802 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1803 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1804 an integer address type instead of nodebug.
1805 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1806 call_function_by_hand.
1807 * infcall.c (error_call_unknown_return_type): New function.
1808 (call_function_by_hand): New "default_return_type" parameter.
1809 Pass it down.
1810 (call_function_by_hand_dummy): New "default_return_type"
1811 parameter. Use it instead of defaulting to int. If there's no
1812 default and the return type is unknown, throw an error. If
1813 there's a default return type, and the called function has no
1814 debug info, then assume the function is prototyped.
1815 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1816 New "default_return_type" parameter.
1817 (error_call_unknown_return_type): New declaration.
1818 * linux-fork.c (call_lseek): Cast return type of lseek.
1819 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1820 call_function_by_hand.
1821 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1822 calls to call_function_by_hand.
1823 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1824 return type.
1825 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1826 (value_nsstring, print_object_command): Adjust calls to
1827 call_function_by_hand.
1828 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1829 functions with unknown return type.
1830 (pascal_type_print_func_varspec_suffix): New function.
1831 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1832 TYPE_CODE_METHOD>: Use it.
1833 * python/py-value.c (valpy_call): Adjust call to
1834 call_function_by_hand.
1835 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1836 call_function_by_hand.
1837 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1838 call_function_by_hand.
1839 * valops.c (value_allocate_space_in_inferior): Adjust call to
1840 call_function_by_hand.
1841 * typeprint.c (type_print_unknown_return_type): New function.
1842 * typeprint.h (type_print_unknown_return_type): New declaration.
1843
1844 2017-09-04 Pedro Alves <palves@redhat.com>
1845
1846 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1847 types with more than one parameter as prototyped.
1848
1849 2017-09-04 Pedro Alves <palves@redhat.com>
1850
1851 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1852 (disassemble_command): Use gdb_disassembly_flags instead of bare
1853 int.
1854 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1855 (dump_insns, do_mixed_source_and_assembly_deprecated)
1856 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1857 Use gdb_disassembly_flags instead of bare int.
1858 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1859 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1860 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1861 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1862 (enum gdb_disassembly_flag): ... values of this new enumeration.
1863 (gdb_disassembly_flags): Define.
1864 (gdb_disassembly)
1865 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1866 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1867 gdb_disassembly_flags instead of bare int.
1868 * record-btrace.c (btrace_insn_history)
1869 (record_btrace_insn_history, record_btrace_insn_history_range)
1870 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1871 instead of bare int.
1872 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1873 Use gdb_disassembly_flags instead of bare int.
1874 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1875 Define.
1876 * target-delegates.c: Regenerate.
1877 * target.c (target_insn_history, target_insn_history_from)
1878 (target_insn_history_range): Use gdb_disassembly_flags instead of
1879 bare int.
1880 * target.h: Include "disasm.h".
1881 (struct target_ops) <to_insn_history, to_insn_history_from,
1882 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1883 int.
1884 (target_insn_history, target_insn_history_from)
1885 (target_insn_history_range): Use gdb_disassembly_flags instead of
1886 bare int.
1887
1888 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1889
1890 * cli/cli-script.c (build_command_line): For if/while commands,
1891 check whether args is empty.
1892
1893 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1896 (enum command_control_type): Likewise.
1897 (struct command_line): Likewise.
1898 (free_command_lines): Likewise.
1899 (struct command_lines_deleter): Likewise.
1900 (command_line_up): Likewise.
1901 (read_command_lines): Likewise.
1902 (read_command_lines_1): Likewise.
1903 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1904 (enum command_control_type): Likewise.
1905 (struct command_line): Likewise.
1906 (free_command_lines): Likewise.
1907 (struct command_lines_deleter): Likewise.
1908 (command_line_up): Likewise.
1909 (read_command_lines): Likewise.
1910 (read_command_lines_1): Likewise.
1911 * breakpoint.h: Include cli/cli-script.h.
1912 * extension-priv.h: Likewise.
1913 * gdbcmd.h: Likewise.
1914
1915 2017-09-04 Pedro Alves <palves@redhat.com>
1916
1917 * ada-lang.c (is_known_support_routine): Move sal declaration to
1918 where it is initialized.
1919 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1920 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1921 (clear_command, update_static_tracepoint): Remove init_sal
1922 references. Move declarations closer to initializations.
1923 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1924 initializations.
1925 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1926 references. Move sal declarations closer to initializations.
1927 * frame.c (find_frame_sal): Return a symtab_and_line via function
1928 return instead of output parameter. Remove init_sal references.
1929 * frame.h (find_frame_sal): Return a symtab_and_line via function
1930 return instead of output parameter.
1931 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1932 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1933 instead of memset.
1934 (gdbscm_find_pc_line): Remove init_sal reference.
1935 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1936 references. Move declarations closer to initializations.
1937 * infcmd.c (set_step_frame): Update. Move declarations closer to
1938 initializations.
1939 (finish_backward): Remove init_sal references. Move declarations
1940 closer to initializations.
1941 * infrun.c (process_event_stop_test, handle_step_into_function)
1942 (insert_hp_step_resume_breakpoint_at_frame)
1943 (insert_step_resume_breakpoint_at_caller): Likewise.
1944 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1945 (symbol_to_sal): Likewise.
1946 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1947 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1948 to its initialization.
1949 * reverse.c (save_bookmark_command): Use new/delete. Remove
1950 init_sal references. Move declarations closer to initializations.
1951 * source.c (get_current_source_symtab_and_line): Remove brace
1952 initialization.
1953 (set_current_source_symtab_and_line): Now takes the sal by const
1954 reference. Remove brace initialization.
1955 (line_info): Remove init_sal reference.
1956 * source.h (set_current_source_symtab_and_line): Now takes a
1957 symtab_and_line via const reference.
1958 * stack.c (set_current_sal_from_frame): Adjust.
1959 (print_frame_info): Adjust.
1960 (get_last_displayed_sal): Return the sal via function return
1961 instead of via output parameter. Simplify.
1962 (frame_info): Adjust.
1963 * stack.h (get_last_displayed_sal): Return the sal via function
1964 return instead of via output parameter.
1965 * symtab.c (init_sal): Delete.
1966 (find_pc_sect_line): Remove init_sal references. Move
1967 declarations closer to initializations.
1968 (find_function_start_sal): Remove init_sal references. Move
1969 declarations closer to initializations.
1970 * symtab.h (struct symtab_and_line): In-class initialize all
1971 fields.
1972 * tracepoint.c (set_traceframe_context)
1973 (print_one_static_tracepoint_marker): Remove init_sal references.
1974 Move declarations closer to initializations.
1975 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1976 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
1977 declarations closer to initializations.
1978 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1979 init_sal references. Adjust.
1980
1981 2017-09-04 Pedro Alves <palves@redhat.com>
1982
1983 * ax-gdb.c (agent_command_1): Use range-for.
1984 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1985 * breakpoint.c: Include "common/array-view.h".
1986 (init_breakpoint_sal, create_breakpoint_sal): Change sals
1987 parameter from struct symtabs_and_lines to
1988 array_view<symtab_and_line>. Adjust. Use range-for. Update.
1989 (breakpoint_sals_to_pc): Change sals parameter from struct
1990 symtabs_and_lines to std::vector reference.
1991 (check_fast_tracepoint_sals): Change sals parameter from struct
1992 symtabs_and_lines to std::array_view. Use range-for.
1993 (decode_static_tracepoint_spec): Return a std::vector instead of
1994 symtabs_and_lines. Update.
1995 (create_breakpoint): Update.
1996 (break_range_command, until_break_command, clear_command): Update.
1997 (base_breakpoint_decode_location, bkpt_decode_location)
1998 (bkpt_probe_create_sals_from_location)
1999 (bkpt_probe_decode_location, tracepoint_decode_location)
2000 (tracepoint_probe_decode_location)
2001 (strace_marker_create_sals_from_location): Return a std::vector
2002 instead of symtabs_and_lines.
2003 (strace_marker_create_breakpoints_sal): Update.
2004 (strace_marker_decode_location): Return a std::vector instead of
2005 symtabs_and_lines. Update.
2006 (update_breakpoint_locations): Change struct symtabs_and_lines
2007 parameters to gdb::array_view. Adjust.
2008 (location_to_sals): Return a std::vector instead of
2009 symtabs_and_lines. Update.
2010 (breakpoint_re_set_default): Use std::vector instead of struct
2011 symtabs_and_lines.
2012 (decode_location_default): Return a std::vector instead of
2013 symtabs_and_lines. Update.
2014 * breakpoint.h: Include "common/array-view.h".
2015 (struct breakpoint_ops) <decode_location>: Now returns a
2016 std::vector instead of returning a symtabs_and_lines via output
2017 parameter.
2018 (update_breakpoint_locations): Change sals parameters to use
2019 gdb::array_view.
2020 * cli/cli-cmds.c (edit_command, list_command): Update to use
2021 std::vector and gdb::array_view.
2022 (ambiguous_line_spec): Adjust to use gdb::array_view and
2023 range-for.
2024 (compare_symtabs): Rename to ...
2025 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2026 const reference and adjust.
2027 (filter_sals): Rewrite using std::vector and standard algorithms.
2028 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2029 (jump_command): Update to use std::vector.
2030 * linespec.c (struct linespec_state) <canonical_names>: Update
2031 comment.
2032 (add_sal_to_sals_basic): Delete.
2033 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2034 (decode_line_2, create_sals_line_offset)
2035 (convert_address_location_to_sals, convert_linespec_to_sals)
2036 (convert_explicit_location_to_sals, parse_linespec)
2037 (event_location_to_sals, decode_line_full, decode_line_1)
2038 (decode_line_with_current_source)
2039 (decode_line_with_last_displayed, decode_objc)
2040 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2041 (linespec_result::~linespec_result): Adjust to use std::vector
2042 instead of symtabs_and_lines.
2043 * linespec.h (linespec_sals::sals): Now a std::vector.
2044 (struct linespec_result): Use std::vector, bool, and in-class
2045 initialization.
2046 (decode_line_1, decode_line_with_current_source)
2047 (decode_line_with_last_displayed): Return std::vector.
2048 * macrocmd.c (info_macros_command): Use std::vector.
2049 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2050 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2051 std::vector.
2052 * probe.h (parse_probes): Return a std::vector.
2053 * python/python.c (gdbpy_decode_line): Use std::vector and
2054 gdb::array_view.
2055 * source.c (select_source_symtab, line_info): Use std::vector.
2056 * stack.c (func_command): Use std::vector.
2057 * symtab.h (struct symtabs_and_lines): Delete.
2058 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2059
2060 2017-09-04 Pedro Alves <palves@redhat.com>
2061
2062 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2063 unittests/array-view-selftests.c.
2064 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2065 * common/array-view.h: New file.
2066 * unittests/array-view-selftests.c: New file.
2067
2068 2017-09-04 Pedro Alves <palves@redhat.com>
2069
2070 * cli/cli-cmds.c (edit_command): Pass message to
2071 ambiguous_line_spec.
2072 (list_command): Pass message to ambiguous_line_spec. Say
2073 "first"/"last" instead of "start" and "end" to be consistent with
2074 the manual.
2075 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2076 them to print formatted message.
2077
2078 2017-09-04 Pedro Alves <palves@redhat.com>
2079
2080 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2081 ftrace_update_insns by reference instead of pointer.
2082
2083 2017-09-04 Yao Qi <yao.qi@linaro.org>
2084
2085 * i386-go32-tdep.c: Include x86-xstate.h.
2086 (i386_go32_init_abi): Call i386_target_description.
2087 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2088 if xcr0 is X86_XSTATE_X87_MASK.
2089 * i386-tdep.h (tdesc_i386): Remove the declaration.
2090 (tdesc_i386_mmx): Likewise.
2091
2092 2017-09-04 Yao Qi <yao.qi@linaro.org>
2093
2094 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2095 X86_XSTATE_SSE_MASK instead of 0.
2096
2097 2017-09-04 Yao Qi <yao.qi@linaro.org>
2098
2099 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2100 i386_target_description.
2101 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2102 i386_target_description.
2103 * i386-tdep.c (i386_gdbarch_init): Likewise.
2104
2105 2017-09-04 Yao Qi <yao.qi@linaro.org>
2106
2107 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2108 (x86_darwin_init_abi_64): Call amd64_target_description.
2109 * amd64-dicos-tdep.c: Likewise.
2110 * amd64-fbsd-nat.c: Likewise.
2111 * amd64-fbsd-tdep.c: Likewise.
2112 * amd64-nbsd-tdep.c: Likewise.
2113 * amd64-obsd-tdep.c: Likewise.
2114 * amd64-sol2-tdep.c: Likewise.
2115 * amd64-windows-tdep.c: Likewise.
2116 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2117
2118 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2119
2120 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2121 (btrace_function) <insn>: Change type to use std::vector.
2122 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2123 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2124 ftrace_update_insns, ftrace_compute_global_level_offset,
2125 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2126 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2127 change to std::vector.
2128 (ftrace_update_insns): Adjust to change to std::vector, change
2129 type of INSN parameter.
2130 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2131 * record-btrace.c (btrace_call_history_insn_range,
2132 btrace_compute_src_line_range,
2133 record_btrace_frame_prev_register): Adjust to change to
2134 std::vector.
2135 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2136 to change to std::vector.
2137
2138 2017-09-03 Tom Tromey <tom@tromey.com>
2139
2140 * corefile.c (reopen_exec_file): Use std::string.
2141
2142 2017-09-03 Tom Tromey <tom@tromey.com>
2143
2144 * compile/compile.c (compile_register_name_mangled): Return
2145 std::string.
2146 * compile/compile-loc2c.c (pushf_register_address): Update.
2147 (pushf_register): Update.
2148 * compile/compile-c-types.c (convert_array): Update.
2149 * compile/compile-c-symbols.c (generate_vla_size): Update.
2150 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2151 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2152 (convert_one_symbol): Update.
2153 (generate_c_for_for_one_variable): Update.
2154 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2155 std::string.
2156 (generate_register_struct): Update.
2157 * compile/compile-internal.h (c_get_range_decl_name): Return a
2158 std::string.
2159 (compile_register_name_mangled): Return std::string.
2160
2161 2017-09-03 Tom Tromey <tom@tromey.com>
2162
2163 * utils.c (perror_string): Return a std::string.
2164 (throw_perror_with_name, perror_warning_with_name): Update.
2165
2166 2017-09-03 Tom Tromey <tom@tromey.com>
2167
2168 * demangle.c (demangle_command): Use std::string,
2169 unique_xmalloc_ptr.
2170
2171 2017-09-03 Tom Tromey <tom@tromey.com>
2172
2173 * cli/cli-setshow.c (do_set_command): Use std::string.
2174
2175 2017-09-03 Tom Tromey <tom@tromey.com>
2176
2177 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2178
2179 2017-09-03 Tom Tromey <tom@tromey.com>
2180
2181 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2182
2183 2017-09-03 Tom Tromey <tom@tromey.com>
2184
2185 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2186 gdb::unique_xmalloc_ptr.
2187
2188 2017-09-03 Tom Tromey <tom@tromey.com>
2189
2190 * thread.c (print_thread_info_1): Use string_printf.
2191 (thread_apply_command, thread_apply_all_command): Use
2192 std::string.
2193
2194 2017-09-03 Tom Tromey <tom@tromey.com>
2195
2196 * valprint.c (val_print_string): Update.
2197 * gdbcore.h (memory_error_message): Return std::string.
2198 * corefile.c (memory_error_message): Return std::string.
2199 (memory_error): Update.
2200 * breakpoint.c (insert_bp_location): Update.
2201
2202 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2203
2204 * target/waitstatus.h (target_waitstatus_to_string): Change
2205 return type to std::string.
2206 * target/waitstatus.c (target_waitstatus_to_string): Return
2207 std::string.
2208 * target.h (target_waitstatus_to_string): Remove declaration.
2209 * infrun.c (resume, clear_proceed_status_thread,
2210 print_target_wait_results, do_target_wait, save_waitstatus,
2211 stop_all_threads): Adjust.
2212 * record-btrace.c (record_btrace_wait): Adjust.
2213 * target-debug.h
2214 (target_debug_print_struct_target_waitstatus_p): Adjust.
2215
2216 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2217
2218 PR gdb/22046
2219 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2220 detection.
2221
2222 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2223
2224 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2225 for setting/unsetting environment variables on the remote target.
2226 (New remote packets): Add entries for QEnvironmentHexEncoded,
2227 QEnvironmentUnset and QEnvironmentReset.
2228 * common/environ.c (gdb_environ::operator=): Extend method to
2229 handle m_user_set_env_list and m_user_unset_env_list.
2230 (gdb_environ::clear): Likewise.
2231 (match_var_in_string): Change type of first parameter from 'char
2232 *' to 'const char *'.
2233 (gdb_environ::set): Extend method to handle
2234 m_user_set_env_list and m_user_unset_env_list.
2235 (gdb_environ::unset): Likewise.
2236 (gdb_environ::clear_user_set_env): New method.
2237 (gdb_environ::user_set_envp): Likewise.
2238 (gdb_environ::user_unset_envp): Likewise.
2239 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2240 m_user_unset_env_list on move constructor/assignment.
2241 (unset): Add new default parameter 'update_unset_list = true'.
2242 (clear_user_set_env): New method.
2243 (user_set_envp): Likewise.
2244 (user_unset_envp): Likewise.
2245 (m_user_set_env_list): New std::set.
2246 (m_user_unset_env_list): Likewise.
2247 * common/rsp-low.c (hex2str): New function.
2248 (bin2hex): New overload for bin2hex function.
2249 * common/rsp-low.c (hex2str): New prototype.
2250 (str2hex): New overload prototype.
2251 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2252 QEnvironmentUnset and QEnvironmentReset.
2253 (remote_protocol_features): Add QEnvironmentHexEncoded,
2254 QEnvironmentUnset and QEnvironmentReset packets.
2255 (send_environment_packet): New function.
2256 (extended_remote_environment_support): Likewise.
2257 (extended_remote_create_inferior): Call
2258 extended_remote_environment_support.
2259 (_initialize_remote): Add QEnvironmentHexEncoded,
2260 QEnvironmentUnset and QEnvironmentReset packet configs.
2261 * unittests/environ-selftests.c (gdb_selftest_env_var):
2262 New variable.
2263 (test_vector_initialization): New function.
2264 (test_init_from_host_environ): Likewise.
2265 (test_reinit_from_host_environ): Likewise.
2266 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2267 Likewise.
2268 (test_unset_set_empty_vector): Likewise.
2269 (test_vector_clear): Likewise.
2270 (test_std_move): Likewise.
2271 (test_move_constructor):
2272 (test_self_move): Likewise.
2273 (test_set_unset_reset): Likewise.
2274 (run_tests): Rewrite in terms of the functions above.
2275
2276 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2277
2278 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2279 (adi_available): Use a temp variable of type CORE_ADDR as argument
2280 3 when calling target_auxv_search.
2281 (adi_normalize_address): Use masks and xor operators to calculate
2282 normalized address.
2283 (adi_read_versions, adi_write_versions, adi_print_versions)
2284 (do_examine, do_assign): Use paddress.
2285
2286 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2287
2288 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2289 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2290 out of loop and add supply of FIR.
2291 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2292 add collect of FIR.
2293
2294 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2295
2296 PR gdb/21827
2297 * cli/cli-script.c (define_command): Don't convert command name
2298 to lower case.
2299
2300 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2301
2302 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2303 Update all callers accordingly. Remove all code blocks handling
2304 the case where DISPP is not NULL.
2305
2306 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2307
2308 PR symtab/22003
2309 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2310 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2311 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2312
2313 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2314
2315 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2316 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2317 (read_comp_units_from_section): New parameter abbrev_section, use
2318 read_and_check_comp_unit_head, allocate signatured_type if needed.
2319 (create_all_comp_units): Update read_comp_units_from_section caller.
2320
2321 2017-08-23 Pedro Alves <palves@redhat.com>
2322
2323 PR remote/21852
2324 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2325 to null_ptid and switch to thread without reading the registers
2326 after adding the inferior.
2327
2328 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2329
2330 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2331 compile-gcc.
2332 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2333 (compile_to_object): Implement compile_gcc.
2334 (_initialize_compile): Install "set compile-gcc". Initialize
2335 compile_gcc.
2336
2337 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2338
2339 * compile/compile.c (compile_to_object): Conditionally call
2340 set_verbose. Conditionally call compile or compile_v0.
2341
2342 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2343
2344 * sparc64-tdep.h: (adi_normalize_address): New export.
2345 * sparc-nat.h: (open_adi_tag_fd): New export.
2346 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2347 * sparc64-linux-tdep.c:
2348 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2349 (sparc64_linux_handle_segmentation_fault): New function.
2350 (sparc64_linux_init_abi): Register
2351 sparc64_linux_handle_segmentation_fault
2352 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2353 (sparc64_addr_bits_remove): New function.
2354 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2355 (MAX_PROC_NAME_SIZE): New macro.
2356 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2357 (sparc64adilist): New variable.
2358 (adi_proc_list): New variable.
2359 (find_adi_info): New function.
2360 (add_adi_info): New function.
2361 (get_adi_info_proc): New function.
2362 (get_adi_info): New function.
2363 (info_adi_command): New function.
2364 (read_maps_entry): New function.
2365 (adi_available): New function.
2366 (adi_normalize_address): New function.
2367 (adi_align_address): New function.
2368 (adi_convert_byte_count): New function.
2369 (adi_tag_fd): New function.
2370 (adi_is_addr_mapped): New function.
2371 (adi_read_versions): New function.
2372 (adi_write_versions): New function.
2373 (adi_print_versions): New function.
2374 (do_examine): New function.
2375 (do_assign): New function.
2376 (adi_examine_command): New function.
2377 (adi_assign_command): New function.
2378 (_initialize_sparc64_adi_tdep): New function.
2379
2380 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2381
2382 * breakpoint.c (breakpoints_info): Rename to ...
2383 (info_breakpoints_command): ... this.
2384 (watchpoints_info): Rename to ...
2385 (info_watchpoints_command): ... this.
2386 (tracepoints_info): Rename to ...
2387 (info_tracepoints_command): ... this.
2388 (_initialize_breakpoint): Adjust.
2389 * dcache.c (dcache_info): Rename to ...
2390 (info_display_command): ... this.
2391 (_initialize_dcache): Adjust.
2392 * frame.h (args_info): Rename to ...
2393 (info_args_command): ... this.
2394 (locals_info): Rename to ...
2395 (info_locals_command): ... this.
2396 * infcmd.c (nofp_registers_info): Rename to ...
2397 (info_registers_command): ... this.
2398 (float_info): Rename to ...
2399 (info_float_command): ... this.
2400 (program_info): Rename to ...
2401 (info_program_command): ... this.
2402 (all_registers_info): Rename to ...
2403 (info_all_registers_command): ... this.
2404 (vector_info): Rename to ...
2405 (info_vector_command): ... this.
2406 (float_info): Rename to ...
2407 (info_float_command): ... this.
2408 (_initialize_infcmd): Adjust.
2409 * inferior.h (term_info): Rename to ...
2410 (info_terminal_command): ... this.
2411 * inflow.c (term_info): Rename to ...
2412 (info_terminal_command): ... this.
2413 (_initialize_inflow): Adjust.
2414 * infrun.c (signals_info): Rename to ...
2415 (info_signals_command): ... this.
2416 (_initialize_infrun): Adjust.
2417 * objc-lang.c (classes_info): Rename to ...
2418 (info_classes_command): ... this.
2419 (selectors_info): Rename to ...
2420 (info_selectors_command): ... this.
2421 (_initialize_objc_language): Adjust.
2422 * printcmd.c (sym_info): Rename to ...
2423 (info_symbol_command): ... this.
2424 (address_info): Rename to ...
2425 (info_address_command): ... this.
2426 (display_info): Rename to ...
2427 (info_display_command): ... this.
2428 (_initialize_printcmd): Adjust.
2429 * reverse.c (bookmarks_info): Rename to ...
2430 (info_breakpoints_command): ... this.
2431 (_initialize_reverse): Adjust.
2432 * ser-go32.c (dos_info): Rename to ...
2433 (info_serial_command): ... this.
2434 (_initialize_ser_dos): Adjust.
2435 * skip.c (skip_info): Rename to ...
2436 (info_skip_command): ... this.
2437 (_initialize_step_skip): Adjust.
2438 * source.c (line_info): Rename to ...
2439 (info_line_command): ... this.
2440 (source_info): Rename to ...
2441 (info_source_command)
2442 * stack.c (frame_info): Rename to ...
2443 (info_frame_command): ... this.
2444 (locals_info): Rename to ...
2445 (info_locals_command): ... this.
2446 (args_info): Rename to ...
2447 (info_args_command): ... this.
2448 (_initialize_stack): Adjust.
2449 * symtab.c (sources_info): Rename to ...
2450 (info_sources_command): ... this.
2451 (variables_info): Rename to ...
2452 (info_variables_command): ... this.
2453 (functions_info): Rename to ...
2454 (info_functions_command): ... this.
2455 (types_info): Rename to ...
2456 (info_types_command): ... this.
2457 (_initialize_symtab): Adjust.
2458 * target.c (target_info): Rename to ...
2459 (info_target_command): ... this.
2460 (initialize_targets): Adjust.
2461 * tracepoint.c (tvariables_info): Rename to ...
2462 (info_tvariables_command): ... this.
2463 (scope_info): Rename to ...
2464 (info_scope_command): ... this.
2465 (trace_dump_actions): Adjust.
2466 (_initialize_tracepoint): Adjust.
2467
2468 2017-08-22 Tom Tromey <tom@tromey.com>
2469
2470 * breakpoint.h (install_breakpoint): Update.
2471 * breakpoint.c (add_solib_catchpoint): Update.
2472 (install_breakpoint): Change argument to a std::unique_ptr.
2473 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2474 (create_breakpoint_sal, create_breakpoint): Update.
2475 (watch_command_1, catch_exec_command_1)
2476 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2477 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2478 Return the breakpoint.
2479 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2480 (new_single_step_breakpoint): Update.
2481 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2482 std::unique_ptr.
2483 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2484 std::unique_ptr.
2485 * break-catch-sig.c (create_signal_catchpoint): Use
2486 std::unique_ptr.
2487 * ada-lang.c (create_ada_exception_catchpoint): Use
2488 std::unique_ptr.
2489
2490 2017-08-22 Tom Tromey <tom@tromey.com>
2491
2492 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2493
2494 2017-08-22 Tom Tromey <tom@tromey.com>
2495
2496 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2497 (lookup_partial_symbol): Update.
2498
2499 2017-08-22 Tom Tromey <tom@tromey.com>
2500
2501 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2502 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2503 (find_and_open_source, symtab_to_fullname): Update.
2504 * psymtab.c (psymtab_to_fullname): Update.
2505
2506 2017-08-22 Tom Tromey <tom@tromey.com>
2507
2508 * exec.c (exec_file_attach): Update.
2509 * linux-thread-db.c (try_thread_db_load): Update.
2510 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2511 * utils.c (gdb_realpath): Change return type.
2512 (gdb_realpath_keepfile): Update.
2513 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2514 (_initialize_utils): Register the new self test.
2515 * source.c (openp): Update.
2516 (find_and_open_source): Update.
2517 * nto-tdep.c (nto_find_and_open_solib): Update.
2518 * main.c (set_gdb_data_directory): Update.
2519 (captured_main_1): Update.
2520 * dwarf2read.c (dwarf2_get_dwz_file): Update
2521 (dw2_map_symbol_filenames): Update.
2522 * auto-load.c (auto_load_safe_path_vec_update): Update.
2523 (filename_is_in_auto_load_safe_path_vec): Change type of
2524 "filename_realp".
2525 (auto_load_objfile_script): Update.
2526 (file_is_auto_load_safe): Update. Use std::string.
2527 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2528
2529 2017-08-22 Tom Tromey <tom@tromey.com>
2530
2531 * utils.c (gdb_realpath_keepfile): Return a
2532 gdb::unique_xmalloc_ptr.
2533 * exec.c (exec_file_attach): Update.
2534 * utils.h (gdb_realpath_keepfile): Return a
2535 gdb::unique_xmalloc_ptr.
2536
2537 2017-08-22 Tom Tromey <tom@tromey.com>
2538
2539 * compile/compile.c (compile_file_command): Use
2540 gdb::unique_xmalloc_ptr, std::string.
2541 * utils.c (gdb_abspath): Change return type.
2542 * source.c (openp): Update.
2543 * objfiles.c (allocate_objfile): Update.
2544 * main.c (set_gdb_data_directory): Update.
2545 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2546
2547 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2548
2549 * cli-cmds.c (list_commands): List actual code around more than
2550 one location.
2551
2552 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2553
2554 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2555
2556 2017-08-21 Pedro Alves <palves@redhat.com>
2557
2558 PR gdb/19487
2559 * c-exp.y (variable production): Handle function aliases.
2560 * minsyms.c (msymbol_is_text): New function.
2561 * minsyms.h (msymbol_is_text): Declare.
2562 * symtab.c (find_function_alias_target): New function.
2563 * symtab.h (find_function_alias_target): Declare.
2564
2565 2017-08-21 Pedro Alves <palves@redhat.com>
2566
2567 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2568 typedefs.
2569 * typeprint.c (whatis_exp): If handling "whatis", and expression
2570 is OP_TYPE, strip one typedef level. Otherwise don't strip
2571 typedefs here.
2572 * valops.c (value_cast): Save "to" type before resolving
2573 stubs/typedefs. Use that type as resulting value's type.
2574
2575 2017-08-18 Tom Tromey <tom@tromey.com>
2576 Pedro Alves <palves@redhat.com>
2577
2578 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2579 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2580 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2581 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2582 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2583 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2584 (linux_get_siginfo_data): Add "thread" argument. Use
2585 scoped_restore.
2586 * linux-nat.c (linux_child_follow_fork)
2587 (check_stopped_by_watchpoint): Use scoped_restore.
2588 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2589 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2590 (restore_inferior_ptid, save_inferior_ptid): Remove.
2591 * btrace.c (btrace_fetch): Use scoped_restore.
2592 * bsd-uthread.c (bsd_uthread_fetch_registers)
2593 (bsd_uthread_store_registers): Use scoped_restore.
2594 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2595 scoped_restore.
2596 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2597 (aix_thread_xfer_partial): Use scoped_restore.
2598 * inferior.h (save_inferior_ptid): Remove.
2599
2600 2017-08-18 Yao Qi <yao.qi@linaro.org>
2601
2602 PR tdep/21818
2603 * arm-tdep.c (gdb_print_insn_arm): Mark
2604 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2605
2606 2017-08-18 Yao Qi <yao.qi@linaro.org>
2607
2608 * NEWS: Mention GDBserver's new option "--selftest".
2609 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2610 * selftest.c: Move it to common/selftest.c.
2611 * selftest.h: Move it to common/selftest.h.
2612 * selftest-arch.c (reset): New function.
2613 (tests_with_arch): Call reset.
2614
2615 2017-08-18 Yao Qi <yao.qi@linaro.org>
2616
2617 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2618 instead of exception_fprintf and printf_filtered.
2619
2620 2017-08-18 Yao Qi <yao.qi@linaro.org>
2621
2622 * selftest.c (register_self_test): Rename it to
2623 selftests::register_test.
2624 (run_self_tests): selftest::run_tests.
2625 * selftest.h: Update declarations.
2626 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2627 selftests::register_test_foreach_arch.
2628 * selftest-arch.h: Update declaration.
2629 * aarch64-tdep.c: Update.
2630 * arm-tdep.c: Likewise.
2631 * disasm-selftests.c: Likewise.
2632 * dwarf2loc.c: Likewise.
2633 * dwarf2-frame.c: Likewise.
2634 * findvar.c: Likewise.
2635 * gdbarch-selftests.c: Likewise.
2636 * maint.c (maintenance_selftest): Likewise.
2637 * regcache.c: Likewise.
2638 * rust-exp.y: Likewise.
2639 * selftest-arch.c: Likewise.
2640 * unittests/environ-selftests.c: Likewise.
2641 * unittests/function-view-selftests.c: Likewise.
2642 * unittests/offset-type-selftests.c: Likewise.
2643 * unittests/optional-selftests.c: Likewise.
2644 * unittests/scoped_restore-selftests.c: Likewise.
2645 * utils-selftests.c: Likewise.
2646
2647 2017-08-17 Pedro Alves <palves@redhat.com>
2648
2649 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2650 local.
2651
2652 2017-08-17 Pedro Alves <palves@redhat.com>
2653
2654 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2655 field.
2656 (reset_die_in_process): Delete, replaced by ...
2657 (process_die_scope): ... this new class. Make it responsible for
2658 freeing cu->line_header too.
2659 (process_die): Use process_die_scope.
2660 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2661 cu->line_header_die_owner. Don't release the line header if it's
2662 owned by the CU.
2663 (setup_type_unit_groups): Make the CU/DIE own the line header.
2664 Don't release the line header here.
2665
2666 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2667
2668 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2669
2670 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2671
2672 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2673 Single-Key mode
2674
2675 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2676
2677 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2678 mode command list.
2679
2680 2017-08-15 Stafford Horne <shorne@gmail.com>
2681
2682 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2683
2684 2017-08-15 Stafford Horne <shorne@gmail.com>
2685
2686 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2687
2688 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2689
2690 PR gdb/21954
2691 * infcmd.c (unset_environment_command): Use the 'clear' method on
2692 the environment instead of resetting it.
2693
2694 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2695
2696 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2697 platforms.
2698
2699 2017-08-14 Tom Tromey <tom@tromey.com>
2700
2701 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2702 (print_binary_chars): Likewise.
2703 (BITS_IN_BYTES): Remove.
2704
2705 2017-08-14 Tom Tromey <tom@tromey.com>
2706
2707 PR gdb/21675
2708 * valprint.c (LOW_ZERO): Change value to 034.
2709 (print_octal_chars): Add static_asserts for octal constants.
2710 * printcmd.c (print_scalar_formatted): Add 'd' case.
2711
2712 2017-08-11 Tom Tromey <tom@tromey.com>
2713
2714 * symfile.c (add_symbol_file_command): Use std::vector.
2715
2716 2017-08-14 Tom Tromey <tom@tromey.com>
2717
2718 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2719 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2720 std::move.
2721 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2722
2723 2017-08-11 Pedro Alves <palves@redhat.com>
2724
2725 * infrun.c (process_event_stop_test): Adjust
2726 function_name_is_marked_for_skip call.
2727 * skip.c: Include <list>.
2728 (skiplist_entry): Make it a class with private fields, and
2729 getters/setters.
2730 (skiplist_entry_chain): Delete.
2731 (skiplist_entries): New.
2732 (skiplist_entry_count): Delete.
2733 (highest_skiplist_entry_num): New.
2734 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2735 (add_skiplist_entry): Delete.
2736 (skiplist_entry::skiplist_entry): New.
2737 (skiplist_entry::add_entry): New.
2738 (skip_file_command, skip_function): Adjust.
2739 (compile_skip_regexp): Delete.
2740 (skip_command): Don't compile regexp here. Adjust to use
2741 skiplist_entry::add_entry.
2742 (skip_info): Adjust to use range-for and getters.
2743 (skip_enable_command, skip_disable_command): Adjust to use
2744 range-for and setters.
2745 (skip_delete_command): Adjust to use std::list.
2746 (add_skiplist_entry): Delete.
2747 (skip_file_p): Delete, refactored as ...
2748 (skiplist_entry::do_skip_file_p): ... this new method.
2749 (skip_gfile_p): Delete, refactored as ...
2750 (skiplist_entry::do_gskip_file_p): ... this new method.
2751 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2752 (skiplist_entry::skip_function_p): ... this new method.
2753 (function_name_is_marked_for_skip): Now returns bool, and takes
2754 the function sal by const reference. Adjust to use range-for and
2755 skiplist_entry methods.
2756 (_initialize_step_skip): Remove references to
2757 skiplist_entry_chain, skiplist_entry_count.
2758 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2759 takes the function sal by const reference.
2760
2761 2017-08-11 Yao Qi <yao.qi@linaro.org>
2762
2763 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2764 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2765 (dwarf2_frame_cache):
2766 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2767 RETURN_MASK_ALL and set *this_case to NULL.
2768 * frame-unwind.h: Update comments.
2769
2770 2017-08-11 Yao Qi <yao.qi@linaro.org>
2771
2772 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2773 (dwarf2_frame_state_copy_regs): Remove.
2774 (dwarf2_frame_state_free_regs): Remove.
2775 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2776 (dwarf2_restore_rule): Call method .alloc_regs instead of
2777 dwarf2_frame_state_alloc_regs.
2778 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2779 constructor. Call std::move.
2780 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2781 (dwarf2_frame_cache): Likewise.
2782
2783 [GDB_SELF_TEST]: Include selftest.h and
2784 selftest-arch.h.
2785 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2786 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2787 execute_cfa_program_test.
2788
2789 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2790 copy ctor, assignment operator, move assignment.
2791 <alloc_regs>: New method.
2792 <swap>: New method.
2793 (struct dwarf2_frame_state): Delete dtor.
2794 (dwarf2_frame_state_alloc_regs): Remove declaration.
2795 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2796 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2797
2798 2017-08-11 Yao Qi <yao.qi@linaro.org>
2799
2800 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2801 (dwarf2_frame_state::dwarf2_frame_state): New.
2802 (dwarf2_frame_state::~dwarf2_frame_state): New.
2803 (dwarf2_fetch_cfa_info): Update.
2804 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2805 rather than a pointer. Update code.
2806 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2807 dtor.
2808 <data_align, code_align, retaddr_column>: Change them to const.
2809 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2810 to bool.
2811
2812 2017-08-11 Yao Qi <yao.qi@linaro.org>
2813
2814 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2815 <loc.exp>: New field.
2816 * dwarf2-frame.c (execute_cfa_program): Update.
2817 (dwarf2_frame_prev_register): Update.
2818
2819 2017-08-10 Pedro Alves <palves@redhat.com>
2820
2821 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2822
2823 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2824
2825 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2826 (fbsd_pending_children): Use std::list.
2827 (fbsd_remember_child): Likewise.
2828 (fbsd_is_child_pending): Likewise.
2829 (fbsd_pending_vfork_done): Use std::forward_list.
2830 (fbsd_add_vfork_done): Likewise.
2831 (fbsd_is_vfork_done_pending): Likewise.
2832 (fbsd_next_vfork_done): Likewise.
2833
2834 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2835
2836 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2837 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2838 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2839 for `mapfilename'.
2840 (fbsd_xfer_partial): Use gdb::byte_vector.
2841 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2842
2843 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2844
2845 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2846 "filestuff.h".
2847 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2848
2849 2017-08-09 Tom Tromey <tom@tromey.com>
2850
2851 * skip.c (skiplist_entry): New constructor.
2852 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2853 (skiplist_entry::file_is_glob): Now bool.
2854 (skiplist_entry::file, skiplist_entry::function): Now
2855 std::string.
2856 (make_skip_entry): Return a unique_ptr. Use new.
2857 (free_skiplist_entry, free_skiplist_entry_cleanup)
2858 (make_free_skiplist_entry_cleanup): Remove.
2859 (skip_command, skip_disable_command, add_skiplist_entry)
2860 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2861 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2862 (function_name_is_marked_for_skip): Update.
2863 (skip_delete_command): Update. Use delete.
2864
2865 2017-08-09 Jiong Wang <jiong.wang@arm.com>
2866
2867 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2868 (aarch64_linux_core_read_description): New function.
2869 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2870
2871 2017-08-09 Pedro Alves <palves@redhat.com>
2872
2873 * cp-name-parser.y (cp_comp_to_string): Return a
2874 gdb::unique_xmalloc_ptr<char>.
2875 * cp-support.c (replace_typedefs_qualified_name)
2876 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2877 (cp_canonicalize_string_full): Use op= instead of explicit
2878 convertion.
2879 (cp_class_name_from_physname, method_name_from_physname)
2880 (cp_func_name, cp_remove_params): Adjust to use
2881 gdb::unique_xmalloc_ptr<char>.
2882 * cp-support.h (cp_comp_to_string): Return a
2883 gdb::unique_xmalloc_ptr<char>.
2884 * python/py-type.c (typy_lookup_type): Adjust to use
2885 gdb::unique_xmalloc_ptr<char>.
2886
2887 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2888
2889 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2890
2891 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2892 Yao Qi <yao.qi@linaro.org>
2893
2894 * cp-support.c (cp_canonicalize_string_full): Use
2895 gdb::unique_xmalloc_ptr<char>.
2896 (cp_canonicalize_string): Likewise.
2897
2898 2017-08-09 Yao Qi <yao.qi@linaro.org>
2899
2900 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2901 * regformats/i386/amd64-avx-avx512.dat: Remove.
2902 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2903 * regformats/i386/amd64-avx-mpx.dat:Remove.
2904 * regformats/i386/amd64-avx.dat: Remove.
2905 * regformats/i386/amd64-mpx.dat: Remove.
2906 * regformats/i386/i386-avx-avx512.dat: Remove.
2907 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2908 * regformats/i386/i386-avx-mpx.dat: Remove.
2909 * regformats/i386/i386-mmx.dat: Remove.
2910 * regformats/i386/i386-mpx.dat: Remove.
2911
2912 2017-08-09 Yao Qi <yao.qi@linaro.org>
2913
2914 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2915 * amd64-tdep.c: Don't include features/i386/x32*.c.
2916 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2917 functions.
2918 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2919 and i386/x32-avx-avx512.
2920 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2921 and i386/x32.xml.
2922 * features/i386/x32-avx-avx512.c: Removed.
2923 * features/i386/x32-avx-avx512.xml: Removed.
2924 * features/i386/x32-avx.c: Removed.
2925 * features/i386/x32-avx.xml: Removed.
2926 * features/i386/x32.c: Removed.
2927 * features/i386/x32.xml: Removed.
2928 * regformats/i386/x32-avx-avx512.dat: Removed.
2929 * regformats/i386/x32-avx.dat: Removed.
2930 * regformats/i386/x32.dat: Removed.
2931
2932 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2933
2934 PR breakpoints/21886
2935 * mem-break.c (default_memory_insert_breakpoint): Use
2936 `->placed_address' rather than `->reqstd_address' for the
2937 breakpoint location.
2938
2939 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2940
2941 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2942 assertions.
2943
2944 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2945
2946 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2947 a union of `tdep_info', `tdesc_data' and `id'.
2948 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2949 rather than `info.tdep_info'.
2950 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2951 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2952 * i386-tdep.c (i386_gdbarch_init): Likewise.
2953 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2954 * mips-tdep.c (mips_gdbarch_init): Likewise.
2955 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2956 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2957 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2958 `info.tdep_info'.
2959 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2960 `info.tdep_info'.
2961 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2962 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2963 `info.tdep_info'.
2964 * spu-tdep.c (spu_gdbarch_init): Likewise.
2965 * gdbarch.h: Regenerate.
2966
2967 2017-08-07 Leszek Swirski <leszeks@google.com>
2968
2969 PR symtab/20899
2970 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2971
2972 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
2973
2974 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2975 (gdbsim_open): Rename gdb_argv args object to argv.
2976
2977 2017-08-05 Tom Tromey <tom@tromey.com>
2978
2979 * compile/compile-object-load.c (compile_object_load): Use
2980 gdb::unique_xmalloc_ptr.
2981 * cli/cli-dump.c (scan_filename): Rename from
2982 scan_filename_with_cleanup. Change return type.
2983 (scan_expression): Rename from scan_expression_with_cleanup.
2984 Change return type.
2985 (dump_memory_to_file, dump_value_to_file, restore_command):
2986 Use gdb::unique_xmalloc_ptr. Update.
2987 * cli/cli-cmds.c (find_and_open_script): Use
2988 gdb::unique_xmalloc_ptr.
2989 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2990 * symmisc.c (maintenance_print_symbols)
2991 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2992 * symfile.c (symfile_bfd_open, generic_load)
2993 (add_symbol_file_command, remove_symbol_file_command): Use
2994 gdb::unique_xmalloc_ptr.
2995 * source.c (openp): Use gdb::unique_xmalloc_ptr.
2996 * psymtab.c (maintenance_print_psymbols): Use
2997 gdb::unique_xmalloc_ptr.
2998 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2999 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3000 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3001 (reload_shared_libraries_1): Likewise.
3002
3003 2017-08-05 Tom Tromey <tom@tromey.com>
3004
3005 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3006 (rust_op_vector, rust_set_vector): New typedefs.
3007 (current_parser): New global.
3008 (work_obstack): Change to pointer type. Update all users.
3009 (rust_ast, pstate): Remove globals.
3010 (struct rust_parser): New.
3011 (%union) <params, field_inits>: Change type.
3012 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3013 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3014 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3015 (convert_params_to_types, convert_params_to_expression): Change
3016 type of "params".
3017 (ast_string): Change type of "fields".
3018 (rust_parse): Make a rust_parser. Remove cleanups.
3019 (rust_lex_tests): Make and install an auto_obstack.
3020
3021 2017-08-04 Yao Qi <yao.qi@linaro.org>
3022
3023 * configure.srv (ipa_x32_linux_regobj): New.
3024 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3025 instead of X86_TDESC_AVX512.
3026 (initialize_low_tracepoint): Call
3027 init_registers_x32_avx_avx512_linux.
3028
3029 2017-08-04 Yao Qi <yao.qi@linaro.org>
3030
3031 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3032
3033 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3034
3035 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3036
3037 2017-08-03 Tom Tromey <tom@tromey.com>
3038
3039 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3040 Remove.
3041 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3042
3043 2017-08-03 Tom Tromey <tom@tromey.com>
3044
3045 * python/py-param.c (compute_enum_values): Use gdb_argv.
3046
3047 2017-08-03 Tom Tromey <tom@tromey.com>
3048
3049 * utils.h (struct gdb_argv_deleter): New.
3050 (gdb_argv): New class.
3051 * utils.c (gdb_argv::reset): New method.
3052 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3053 * tracefile.c (tsave_command): Use gdb_argv.
3054 * top.c (new_ui_command): Use gdb_argv.
3055 * symmisc.c (maintenance_print_symbols)
3056 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3057 * symfile.c (symbol_file_command, generic_load)
3058 (remove_symbol_file_command): Use gdb_argv.
3059 * stack.c (backtrace_command): Use gdb_argv.
3060 * source.c (add_path, show_substitute_path_command)
3061 (unset_substitute_path_command, set_substitute_path_command):
3062 Use gdb_argv.
3063 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3064 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3065 * remote.c (extended_remote_run, remote_put_command)
3066 (remote_get_command, remote_delete_command): Use gdb_argv.
3067 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3068 (gdbsim_open): Use gdb_argv.
3069 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3070 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3071 * procfs.c (procfs_info_proc): Use gdb_argv.
3072 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3073 * infrun.c (handle_command): Use gdb_argv.
3074 * inferior.c (add_inferior_command, clone_inferior_command):
3075 Use gdb_argv.
3076 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3077 * exec.c (exec_file_command): Use gdb_argv.
3078 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3079 * compile/compile.c (build_argc_argv): Use gdb_argv.
3080
3081 2017-08-03 Tom Tromey <tom@tromey.com>
3082
3083 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3084
3085 2017-08-03 Tom Tromey <tom@tromey.com>
3086
3087 * python/python.c (compute_python_string): Return std::string.
3088 (gdbpy_eval_from_control_command): Update.
3089 (do_start_initialization): Use std::string.
3090 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3091 xstrprintf.
3092 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3093 xstrprintf.
3094
3095 2017-08-03 Tom Tromey <tom@tromey.com>
3096
3097 * top.h (do_restore_instream_cleanup): Remove.
3098 * top.c (do_restore_instream_cleanup): Remove.
3099 (read_command_file): Use scoped_restore.
3100 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3101
3102 2017-08-03 Tom Tromey <tom@tromey.com>
3103
3104 * cli/cli-script.c (execute_user_command)
3105 (execute_control_command): Use scoped_restore.
3106
3107 2017-08-03 Tom Tromey <tom@tromey.com>
3108
3109 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3110 (execute_user_command): Remove user_call_depth; use
3111 user_args_stack's size instead.
3112
3113 2017-08-03 Tom Tromey <tom@tromey.com>
3114
3115 * top.h (in_user_command): Remove.
3116 * top.c (in_user_command): Remove.
3117 * cli/cli-script.c (do_restore_user_call_depth)
3118 (execute_user_command): Update.
3119
3120 2017-08-03 Tom Tromey <tom@tromey.com>
3121
3122 * valops.c (search_struct_method): Use gdb::byte_vector.
3123 * valarith.c (value_concat): Use std::vector.
3124 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3125 (simple_search_memory): Likewise.
3126 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3127 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3128 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3129 * elfread.c (elf_rel_plt_read): Use std::string.
3130 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3131 * cli/cli-dump.c (restore_section_callback): Use
3132 gdb::byte_vector.
3133
3134 2017-08-03 Tom Tromey <tom@tromey.com>
3135
3136 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3137
3138 2017-08-03 Tom Tromey <tom@tromey.com>
3139
3140 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3141 (tui_register_format): Use scoped_restore.
3142
3143 2017-08-03 Tom Tromey <tom@tromey.com>
3144
3145 * reverse.c (exec_direction_default): Remove.
3146 (exec_reverse_once): Use scoped_restore.
3147 * remote.c (restore_remote_timeout): Remove.
3148 (remote_flash_erase, remote_flash_write, remote_flash_done)
3149 (readchar, remote_serial_write): Use scoped_restore.
3150 * cli/cli-script.c (struct source_cleanup_lines_args)
3151 (source_cleanup_lines): Remove.
3152 (script_from_file): Use scoped_restore.
3153 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3154 (source_command): Use scoped_restore.
3155
3156 2017-08-03 Tom Tromey <tom@tromey.com>
3157
3158 * utils.h (make_cleanup_free_so): Remove.
3159 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3160 * solist.h (struct so_deleter): New.
3161 (so_list_up): New typedef.
3162 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3163
3164 2017-08-03 Tom Tromey <tom@tromey.com>
3165
3166 * utils.h (make_cleanup_restore_current_language): Remove.
3167 * utils.c (do_restore_current_language)
3168 (make_cleanup_restore_current_language): Remove.
3169 * parse.c (parse_exp_in_context_1)
3170 (parse_expression_with_language): Use
3171 scoped_restore_current_language.
3172 * mi/mi-main.c (mi_cmd_execute): Use
3173 scoped_restore_current_language.
3174 * language.h (scoped_restore_current_language): New class.
3175
3176 2017-08-03 Tom Tromey <tom@tromey.com>
3177
3178 * compile/compile.c (cleanup_unlink_file): Remove.
3179 (compile_to_object): Use gdb::unlinker.
3180 (eval_compile_command): Likewise.
3181
3182 2017-08-03 Tom Tromey <tom@tromey.com>
3183
3184 * utils.h (make_cleanup_fclose): Remove.
3185 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3186
3187 2017-08-03 Tom Tromey <tom@tromey.com>
3188
3189 * top.c (open_terminal_stream): Return gdb_file_up.
3190 (new_ui_command): Update.
3191
3192 2017-08-03 Tom Tromey <tom@tromey.com>
3193
3194 * source.c (print_source_lines_base, forward_search_command)
3195 (reverse_search_command): Use gdb_file_up.
3196
3197 2017-08-03 Tom Tromey <tom@tromey.com>
3198
3199 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3200
3201 2017-08-03 Tom Tromey <tom@tromey.com>
3202
3203 * cli/cli-cmds.c (find_and_open_script): Change return type.
3204 Remove "streamp" and "full_path" parameters.
3205 (source_script_with_search): Update.
3206 * auto-load.c (source_script_file): Update.
3207 * cli/cli-cmds.h (find_and_open_script): Change type.
3208 (open_script): New struct.
3209
3210 2017-08-03 Tom Tromey <tom@tromey.com>
3211
3212 * xml-support.c (xml_fetch_content_from_file): Update.
3213 * ui-file.c (stdio_file::open): Update.
3214 * tracefile-tfile.c (tfile_start): Update.
3215 * remote.c (remote_file_put, remote_file_get): Update.
3216 * nat/linux-procfs.c (linux_proc_get_int)
3217 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3218 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3219 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3220 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3221 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3222 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3223 * linux-nat.c (linux_proc_pending_signals): Update.
3224 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3225 (file_closer): Remove.
3226 * compile/compile.c (compile_to_object): Update.
3227 * common/filestuff.h (struct gdb_file_deleter): New.
3228 (gdb_file_up): New typedef.
3229 (gdb_fopen_cloexec): Change return type.
3230 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3231 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3232 (dump_binary_file, restore_binary_file): Update.
3233 * auto-load.c (auto_load_objfile_script_1): Update.
3234
3235 2017-08-03 Tom Tromey <tom@tromey.com>
3236
3237 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3238 (info_static_tracepoint_markers_command): Likewise.
3239 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3240 * skip.c (skip_info): Use ui_out_emit_table.
3241 * progspace.c (print_program_space): Use ui_out_emit_table.
3242 * osdata.c (info_osdata): Use ui_out_emit_table.
3243 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3244 ui_out_emit_table.
3245 * linux-thread-db.c (info_auto_load_libthread_db): Use
3246 ui_out_emit_table.
3247 * inferior.c (print_inferior): Use ui_out_emit_table.
3248 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3249 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3250 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3251 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3252 * ui-out.h (class ui_out_emit_table): New.
3253
3254 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3255
3256 * mips-tdep.c (mips_fpu_type_str): New function.
3257 (mips_dump_tdep): Call it.
3258
3259 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3260
3261 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3262 `->mips_fpu_type'.
3263
3264 2017-07-31 Xavier Roirand <roirand@adacore.com>
3265
3266 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3267
3268 2017-07-27 Xavier Roirand <roirand@adacore.com>
3269
3270 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3271
3272 2017-07-26 Yao Qi <yao.qi@linaro.org>
3273
3274 * cli/cli-cmds.c (maintenancechecklist): New variable.
3275 * gdbcmd.h (maintenancechecklist): Declare it.
3276 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3277 Call i386_linux_read_description with different masks.
3278 * maint.c (maintenance_check_command): New function.
3279 (_initialize_maint_cmds): Call add_prefix_cmd.
3280 * target-descriptions.c (tdesc_reg): override operator != and ==.
3281 (tdesc_type): Likewise.
3282 (tdesc_feature): Likewise.
3283 (target_desc): Likewise.
3284 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3285 (maintenance_check_xml_descriptions): New function.
3286 (_initialize_target_descriptions) Add command "xml-descriptions".
3287 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3288
3289 2017-07-26 Yao Qi <yao.qi@linaro.org>
3290
3291 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3292 Include features/i386/32bit-*.c.
3293 (i386_linux_read_description): Generate target description if it
3294 doesn't exist.
3295 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3296 functions.
3297 * features/i386/32bit-linux.c: Re-generated.
3298 * features/i386/32bit-sse.c: Likewise.
3299 * target-descriptions.c (print_c_feature::visit): Print code to
3300 set register number if needed.
3301 (print_c_feature) <m_next_regnum>: New field.
3302
3303 2017-07-26 Yao Qi <yao.qi@linaro.org>
3304
3305 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3306 (FEATURE_XMLFILES): New.
3307 (FEATURE_CFILES): New.
3308 New rules.
3309 (clean-cfiles): Remove generated c files.
3310 * features/i386/32bit-avx.c: Generated.
3311 * features/i386/32bit-avx512.c: Generated.
3312 * features/i386/32bit-core.c: Generated.
3313 * features/i386/32bit-linux.c: Generated.
3314 * features/i386/32bit-mpx.c: Generated.
3315 * features/i386/32bit-pkeys.c: Generated.
3316 * features/i386/32bit-sse.c: Generated.
3317 * target-descriptions.c: Include algorithm.
3318 (tdesc_element_visitor): Add method visit_end.
3319 (print_c_tdesc): Implement visit_end.
3320 (print_c_tdesc:: m_filename_after_features): Move it to
3321 protected.
3322 (print_c_feature): New class.
3323 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3324 name starts with "i386/32bit-".
3325
3326 2017-07-26 Yao Qi <yao.qi@linaro.org>
3327
3328 * target-descriptions.c (tdesc_element_visitor): New class.
3329 (tdesc_element): New class.
3330 (tdesc_reg): Inherit from tdesc_element.
3331 (tdesc_reg::accept): New function.
3332 (tdesc_type): Inherit from tdesc_element.
3333 (tdesc_type::accept): New function.
3334 (tdesc_feature): Inherit from tdesc_element.
3335 (tdesc_feature::accept): New function.
3336 (target_desc): Inherit from tdesc_element.
3337 (target_desc::target_desc): New.
3338 (target_desc::~target_desc): New.
3339 (target_desc::accept): New.
3340 (allocate_target_description): Use new.
3341 (free_target_description): Use delete.
3342 (print_c_tdesc): New class.
3343 (maint_print_c_tdesc_cmd): Adjust.
3344
3345 * features/aarch64.c: Re-generated.
3346 * features/arc-arcompact.c: Re-generated.
3347 * features/arc-v2.c: Re-generated.
3348 * features/arm/arm-with-iwmmxt.c: Re-generated.
3349 * features/arm/arm-with-m.c: Re-generated.
3350 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3351 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3352 * features/arm/arm-with-neon.c: Re-generated.
3353 * features/arm/arm-with-vfpv2.c: Re-generated.
3354 * features/arm/arm-with-vfpv3.c: Re-generated.
3355 * features/i386/amd64-avx-avx512.c: Re-generated.
3356 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3357 * features/i386/amd64-avx.c: Re-generated.
3358 * features/i386/amd64-avx-linux.c: Re-generated.
3359 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3360 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3361 * features/i386/amd64-avx-mpx.c: Re-generated.
3362 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3363 * features/i386/amd64.c: Re-generated.
3364 * features/i386/amd64-linux.c: Re-generated.
3365 * features/i386/amd64-mpx.c: Re-generated.
3366 * features/i386/amd64-mpx-linux.c: Re-generated.
3367 * features/i386/i386-avx-avx512.c: Re-generated.
3368 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3369 * features/i386/i386-avx.c: Re-generated.
3370 * features/i386/i386-avx-linux.c: Re-generated.
3371 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3372 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3373 * features/i386/i386-avx-mpx.c: Re-generated.
3374 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3375 * features/i386/i386.c: Re-generated.
3376 * features/i386/i386-linux.c: Re-generated.
3377 * features/i386/i386-mmx.c: Re-generated.
3378 * features/i386/i386-mmx-linux.c: Re-generated.
3379 * features/i386/i386-mpx.c: Re-generated.
3380 * features/i386/i386-mpx-linux.c: Re-generated.
3381 * features/i386/x32-avx-avx512.c: Re-generated.
3382 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3383 * features/i386/x32-avx.c: Re-generated.
3384 * features/i386/x32-avx-linux.c: Re-generated.
3385 * features/i386/x32.c: Re-generated.
3386 * features/i386/x32-linux.c: Re-generated.
3387 * features/microblaze.c: Re-generated.
3388 * features/microblaze-with-stack-protect.c: Re-generated.
3389 * features/mips64-dsp-linux.c: Re-generated.
3390 * features/mips64-linux.c: Re-generated.
3391 * features/mips-dsp-linux.c: Re-generated.
3392 * features/mips-linux.c: Re-generated.
3393 * features/nds32.c: Re-generated.
3394 * features/nios2.c: Re-generated.
3395 * features/nios2-linux.c: Re-generated.
3396 * features/rs6000/powerpc-32.c: Re-generated.
3397 * features/rs6000/powerpc-32l.c: Re-generated.
3398 * features/rs6000/powerpc-403.c: Re-generated.
3399 * features/rs6000/powerpc-403gc.c : Re-generated.
3400 * features/rs6000/powerpc-405.c: Re-generated.
3401 * features/rs6000/powerpc-505.c: Re-generated.
3402 * features/rs6000/powerpc-601.c: Re-generated.
3403 * features/rs6000/powerpc-602.c: Re-generated.
3404 * features/rs6000/powerpc-603.c: Re-generated.
3405 * features/rs6000/powerpc-604.c: Re-generated.
3406 * features/rs6000/powerpc-64.c: Re-generated.
3407 * features/rs6000/powerpc-64l.c: Re-generated.
3408 * features/rs6000/powerpc-7400.c: Re-generated.
3409 * features/rs6000/powerpc-750.c: Re-generated.
3410 * features/rs6000/powerpc-860.c: Re-generated.
3411 * features/rs6000/powerpc-altivec32.c: Re-generated.
3412 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3413 * features/rs6000/powerpc-altivec64.c: Re-generated.
3414 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3415 * features/rs6000/powerpc-cell32l.c: Re-generated.
3416 * features/rs6000/powerpc-cell64l.c: Re-generated.
3417 * features/rs6000/powerpc-e500.c: Re-generated.
3418 * features/rs6000/powerpc-e500l.c: Re-generated.
3419 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3420 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3421 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3422 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3423 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3424 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3425 * features/rs6000/powerpc-vsx32.c: Re-generated.
3426 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3427 * features/rs6000/powerpc-vsx64.c: Re-generated.
3428 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3429 * features/rs6000/rs6000.c: Re-generated.
3430 * features/s390-linux32.c: Re-generated.
3431 * features/s390-linux32v1.c: Re-generated.
3432 * features/s390-linux32v2.c: Re-generated.
3433 * features/s390-linux64.c: Re-generated.
3434 * features/s390-linux64v1.c: Re-generated.
3435 * features/s390-linux64v2.c: Re-generated.
3436 * features/s390-te-linux64.c: Re-generated.
3437 * features/s390-tevx-linux64.c: Re-generated.
3438 * features/s390-vx-linux64.c: Re-generated.
3439 * features/s390x-linux64.c: Re-generated.
3440 * features/s390x-linux64v1.c: Re-generated.
3441 * features/s390x-linux64v2.c: Re-generated.
3442 * features/s390x-te-linux64.c: Re-generated.
3443 * features/s390x-tevx-linux64.c: Re-generated.
3444 * features/s390x-vx-linux64.c: Re-generated.
3445 * features/sparc/sparc32-solaris.c: Re-generated.
3446 * features/sparc/sparc64-solaris.c: Re-generated.
3447 * features/tic6x-c62x.c: Re-generated.
3448 * features/tic6x-c62x-linux.c: Re-generated.
3449 * features/tic6x-c64x.c: Re-generated.
3450 * features/tic6x-c64x-linux.c: Re-generated.
3451 * features/tic6x-c64xp.c: Re-generated.
3452 * features/tic6x-c64xp-linux.c: Re-generated.
3453
3454 2017-07-26 Yao Qi <yao.qi@linaro.org>
3455
3456 * i386-linux-tdep.c (i386_linux_read_description): New function.
3457 (i386_linux_core_read_description): Call
3458 i386_linux_read_description.
3459 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3460 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3461 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3462 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3463 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3464 * x86-linux-nat.c (x86_linux_read_description): Call
3465 i386_linux_read_description.
3466
3467 2017-07-26 Yao Qi <yao.qi@linaro.org>
3468
3469 * NEWS: Mention it.
3470 * features/Makefile (%.c: %.xml): Pass the xml file name to
3471 command "maint print c-tdesc".
3472 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3473 name from 'arg'.
3474
3475 2017-07-26 Yao Qi <yao.qi@linaro.org>
3476
3477 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3478 in-class initialization.
3479 (tdesc_create_feature): Call new instead of XCNEW.
3480 (free_target_description): Ue delete.
3481
3482 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3483
3484 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3485
3486 2017-07-25 Yao Qi <yao.qi@linaro.org>
3487
3488 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3489 constant.
3490 (amd64_x32_init_abi): Likewise.
3491 * amd64-tdep.h (amd64_init_abi): Update declaration.
3492 (amd64_x32_init_abi): Likewise.
3493
3494 2017-07-25 Yao Qi <yao.qi@linaro.org>
3495
3496 PR tdep/21717
3497 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3498 condition for FPSCR.
3499 (arm_linux_store_inferior_registers): Likewise.
3500
3501 2017-07-22 Tom Tromey <tom@tromey.com>
3502
3503 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3504 <syscalls_counts>: Now a std::vector.
3505 (get_catch_syscall_inferior_data): Use "new".
3506 (catch_syscall_inferior_data_cleanup): Use "delete".
3507 (insert_catch_syscall, remove_catch_syscall)
3508 (clear_syscall_counts): Update.
3509
3510 2017-07-22 Tom Tromey <tom@tromey.com>
3511
3512 * break-catch-syscall.c (syscall_catchpoint)
3513 <syscalls_to_be_caught>: Now a std::vector<int>
3514 (~syscall_catchpoint): Remove.
3515 (insert_catch_syscall, remove_catch_syscall)
3516 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3517 (print_mention_catch_syscall, print_recreate_catch_syscall):
3518 Update.
3519 (create_syscall_event_catchpoint): Change type of "filter"
3520 parameter.
3521 (catch_syscall_split_args): Return a std::vector.
3522 (catch_syscall_command_1, catching_syscall_number_1): Update.
3523
3524 2017-07-22 Tom Tromey <tom@tromey.com>
3525
3526 * break-catch-throw.c (struct exception_catchpoint)
3527 <exception_rx>: Now a std::string.
3528 (~exception_catchpoint): Remove.
3529 (print_one_detail_exception_catchpoint): Update.
3530 (handle_gnu_v3_exceptions): Change type of except_rx.
3531 (extract_exception_regexp): Return a std::string.
3532 (catch_exception_command_1): Update.
3533
3534 2017-07-22 Tom Tromey <tom@tromey.com>
3535
3536 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3537 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3538 std::vector.
3539 <catch_all>: Now a bool.
3540 (~signal_catchpoint): Remove.
3541 (signal_catchpoint_insert_location)
3542 (signal_catchpoint_remove_location)
3543 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3544 (signal_catchpoint_print_mention)
3545 (signal_catchpoint_print_recreate)
3546 (signal_catchpoint_explains_signal): Update.
3547 (create_signal_catchpoint): Change type of "filter" and
3548 "catch_all".
3549 (catch_signal_split_args): Return a std::vector. Change type of
3550 "catch_all".
3551 (catch_signal_command): Update.
3552
3553 2017-07-20 Pedro Alves <palves@redhat.com>
3554
3555 * ada-lang.c (ada_language_defn): Make extern.
3556 (_initialize_ada_language): Remove add_language call.
3557 * c-lang.c (c_language_defn, cplus_language_defn)
3558 (asm_language_defn, minimal_language_defn): Make extern.
3559 (_initialize_c_language): Delete.
3560 * completer.c (compare_cstrings): Delete, moved to utils.h.
3561 * d-lang.c (d_language_defn): Make extern.
3562 (_initialize_d_language): Remove add_language calls.
3563 * defs.h (enum language): Add comment.
3564 * f-lang.c (f_language_defn): Make extern.
3565 (_initialize_f_language): Remove add_language call.
3566 * go-lang.c (go_language_defn): Make extern.
3567 (_initialize_go_language): Remove add_language call.
3568 * language.c: Include <algorithm>.
3569 (languages): Redefine as const array.
3570 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3571 (set_language_command): Handle "local". Use for-range loop.
3572 (set_language): Remove loop.
3573 (language_enum): Rewrite.
3574 (language_def, language_str): Remove loops.
3575 (add_language): Delete.
3576 (add_set_language_command): New, based on add_languages.
3577 (skip_language_trampoline): Adjust.
3578 (local_language_defn): Delete.
3579 (language_gdbarch_post_init): Adjust.
3580 (_initialize_language): Remove add_language calls. Call
3581 add_set_language_command.
3582 * language.h (add_language): Delete.
3583 (auto_language_defn)
3584 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3585 (asm_language_defn, c_language_defn, cplus_language_defn)
3586 (d_language_defn, f_language_defn, go_language_defn)
3587 (m2_language_defn, objc_language_defn, opencl_language_defn)
3588 (pascal_language_defn, rust_language_defn): Declare.
3589 * m2-lang.c (m2_language_defn): Make extern.
3590 (_initialize_m2_language): Remove add_language call.
3591 * objc-lang.c (objc_language_defn): Make extern.
3592 (_initialize_objc_language): Remove add_language call.
3593 * opencl-lang.c (opencl_language_defn): Make extern.
3594 (_initialize_opencl_language): Remove add_language call.
3595 * p-lang.c (pascal_language_defn): Make extern.
3596 (_initialize_pascal_language): Delete.
3597 * rust-lang.c (rust_language_defn): Make extern.
3598 (_initialize_rust_language): Delete.
3599 * utils.h (compare_cstrings): New static inline function.
3600
3601 2017-07-20 Pedro Alves <palves@redhat.com>
3602
3603 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3604 (get_var_value): Constify parameters.
3605 (get_int_var_value): Change prototype.
3606 (to_fixed_range_type): Adjust.
3607 * ada-lang.h (get_int_var_value): Change prototype.
3608
3609 2017-07-20 Pedro Alves <palves@redhat.com>
3610
3611 * dwarf2read.c (dw2_lookup_symbol): Use
3612 SYMBOL_MATCHES_SEARCH_NAME.
3613 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3614
3615 2017-07-20 Pedro Alves <palves@redhat.com>
3616
3617 * block.c (block_iter_name_step, block_iter_name_first)
3618 (block_iter_name_next): Delete.
3619 (block_lookup_symbol_primary): Adjust to use
3620 dict_iter_match_first/dict_iter_match_next.
3621 * block.h (block_iter_name_first, block_iter_name_next): Delete
3622 declarations.
3623 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3624 dict_iter_match_first/dict_iter_match_next.
3625
3626 2017-07-20 Pedro Alves <palves@redhat.com>
3627
3628 * cp-support.c (cp_find_first_component_aux): Add missing case for
3629 end of string.
3630
3631 2017-07-18 David Blaikie <dblaikie@gmail.com>
3632
3633 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3634 of dwo_cu's dwo_file.
3635
3636 2017-07-18 Yao Qi <yao.qi@linaro.org>
3637
3638 * remote.c (store_registers_using_G): Remove one line comment.
3639
3640 2017-07-18 Yao Qi <yao.qi@linaro.org>
3641
3642 * regcache.c (regcache_cpy): Simplify it.
3643 (regcache::cpy_no_passthrough): Remove it.
3644 * regcache.h (cpy_no_passthrough): Remove it.
3645 (regcache_dup, regcache_cpy): Update comments.
3646
3647 2017-07-18 Pedro Alves <palves@redhat.com>
3648
3649 * remote-sim.c (sim_command_completer): Adjust to work with a
3650 completion_tracker instead of a VEC.
3651
3652 2017-07-17 Pedro Alves <palves@redhat.com>
3653
3654 * completer.c (complete_source_filenames): New function.
3655 (complete_address_and_linespec_locations): New function.
3656 (location_completer): Use complete_address_and_linespec_locations.
3657 (completion_tracker::build_completion_result): Honor the tracker's
3658 request to suppress append.
3659 * completer.h (completion_tracker::suppress_append_ws)
3660 (completion_tracker::set_suppress_append_ws): New methods.
3661 (completion_tracker::m_suppress_append_ws): New field.
3662 (complete_source_filenames): New declaration.
3663 * linespec.c (linespec_complete_what): New.
3664 (struct ls_parser) <complete_what, completion_word,
3665 completion_quote_char, completion_quote_end, completion_tracker>:
3666 New fields.
3667 (string_find_incomplete_keyword_at_end): New.
3668 (linespec_lexer_lex_string): Record quote char. If in completion
3669 mode, don't throw.
3670 (linespec_lexer_consume_token): Advance the completion word point.
3671 (linespec_lexer_peek_token): Save/restore completion info.
3672 (save_stream_and_consume_token): New.
3673 (set_completion_after_number): New.
3674 (linespec_parse_basic): Set what to complete next depending on
3675 token. Handle function and label completions specially.
3676 (parse_linespec): Disable objc shortcut in completion mode. Set
3677 what to complete next depending on token type. Skip keyword if in
3678 completion mode.
3679 (complete_linespec_component, linespec_complete): New.
3680 * linespec.h (linespec_complete): Declare.
3681
3682 2017-07-17 Pedro Alves <palves@redhat.com>
3683
3684 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3685 Handle 'operator<' / 'operator<<'.
3686
3687 2017-07-17 Pedro Alves <palves@redhat.com>
3688
3689 * completer.c (collect_explicit_location_matches): Handle
3690 MATCH_LABEL.
3691 (convert_explicit_location_to_linespec): New, factored out from
3692 ...
3693 (convert_explicit_location_to_sals): ... this.
3694 (complete_label): New.
3695 (linespec_complete_label, find_label_symbols_in_block): New.
3696 (find_label_symbols): Add completion_mode parameter and adjust to
3697 call find_label_symbols_in_block.
3698 * linespec.h (linespec_complete_label): Declare.
3699
3700 2017-07-17 Pedro Alves <palves@redhat.com>
3701
3702 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3703 complete_symbol_mode parameter.
3704 * cli/cli-cmds.c (complete_command): Get the completion result out
3705 of the handle_brkchars tracker if used a custom word point.
3706 * completer.c: Include "linespec.h".
3707 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3708 (advance_to_expression_complete_word_point): New.
3709 (completion_tracker::completes_to_completion_word): New.
3710 (complete_files_symbols): Pass down
3711 complete_symbol_mode::EXPRESSION.
3712 (explicit_options, probe_options): New.
3713 (collect_explicit_location_matches): Complete on the
3714 explictit_loc->foo instead of word. Use
3715 linespec_complete_function. Handle MATCH_LINE. Handle offering
3716 keyword and options completions.
3717 (backup_text_ptr): Delete.
3718 (skip_keyword): New.
3719 (complete_explicit_location): Remove 'word' parameter. Add
3720 language, quoted_arg_start and quoted_arg_end parameters.
3721 Rewrite, parsing left to right.
3722 (location_completer): Rewrite.
3723 (location_completer_handle_brkchars): New function.
3724 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3725 (enum complete_line_internal_reason): Adjust comments.
3726 (completion_tracker::discard_completions): New.
3727 (completer_handle_brkchars_func_for_completer): Handle
3728 location_completer.
3729 (gdb_custom_word_point_brkchars)
3730 (gdb_org_rl_basic_quote_characters): New.
3731 (gdb_completion_word_break_characters_throw)
3732 (completion_find_completion_word): Handle trackers that use a
3733 custom word point.
3734 (completion_tracker::advance_custom_word_point_by): New.
3735 (completion_tracker::build_completion_result): Don't rely on
3736 readline appending the quote char.
3737 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3738 use a custom word point.
3739 (gdb_rl_attempted_completion_function): Restore
3740 rl_basic_quote_characters.
3741 * completer.h (class completion_tracker): Extend intro comment.
3742 (completion_tracker::set_quote_char)
3743 (completion_tracker::quote_char)
3744 (completion_tracker::set_use_custom_word_point)
3745 (completion_tracker::use_custom_word_point)
3746 (completion_tracker::custom_word_point)
3747 (completion_tracker::set_custom_word_point)
3748 (completion_tracker::advance_custom_word_point_by)
3749 (completion_tracker::completes_to_completion_word)
3750 (completion_tracker::discard_completions): New methods.
3751 (completion_tracker::m_quote_char)
3752 (completion_tracker::m_use_custom_word_point)
3753 (completion_tracker::m_custom_word_point): New fields.
3754 (advance_to_expression_complete_word_point): Declare.
3755 * f-lang.c (f_collect_symbol_completion_matches): Add
3756 complete_symbol_mode parameter.
3757 * language.h (struct language_defn)
3758 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3759 parameter.
3760 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3761 (linespec_complete_function): New function.
3762 (linespec_lexer_lex_keyword): Adjust.
3763 * linespec.h (linespec_keywords, linespec_complete_function): New
3764 declarations.
3765 * location.c (find_end_quote): New function.
3766 (explicit_location_lex_one): Add explicit_completion_info
3767 parameter. Save quoting info. Don't throw if being called for
3768 completion. Don't handle Ada operators here.
3769 (is_cp_operator, skip_op_false_positives, first_of)
3770 (explicit_location_lex_one_function): New function.
3771 (string_to_explicit_location): Replace 'dont_throw' parameter with
3772 an explicit_completion_info pointer parameter. Handle it. Don't
3773 use explicit_location_lex_one to lex function names. Use
3774 explicit_location_lex_one_function instead.
3775 * location.h (struct explicit_completion_info): New.
3776 (string_to_explicit_location): Replace 'dont_throw' parameter with
3777 an explicit_completion_info pointer parameter.
3778 * symtab.c (default_collect_symbol_completion_matches_break_on):
3779 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3780 (default_collect_symbol_completion_matches)
3781 (collect_symbol_completion_matches): Add complete_symbol_mode
3782 parameter.
3783 (collect_symbol_completion_matches_type): Pass down
3784 complete_symbol_mode::EXPRESSION.
3785 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3786 parameter. Handle LINESPEC mode.
3787 * symtab.h (complete_symbol_mode): New.
3788 (default_collect_symbol_completion_matches_break_on)
3789 (default_collect_symbol_completion_matches)
3790 (collect_symbol_completion_matches)
3791 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3792 parameter.
3793
3794 2017-07-17 Pedro Alves <palves@redhat.com>
3795
3796 * utils.c (enum class strncmp_iw_mode): New.
3797 (strcmp_iw): Rename to ...
3798 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3799 parameters. Handle them.
3800 (strncmp_iw): New.
3801 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3802 * utils.h (strncmp_iw): Declare.
3803 (strcmp_iw): Move describing comments here.
3804
3805 2017-07-17 Pedro Alves <palves@redhat.com>
3806
3807 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3808 CP_OPERATOR_STR.
3809 * c-typeprint.c (is_type_conversion_operator): Use
3810 CP_OPERATOR_STR.
3811 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3812 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3813 CP_OPERATOR_LEN.
3814 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3815 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3816 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3817 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3818 CP_OPERATOR_STR.
3819 * location.c: Include "cp-support.h".
3820 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3821 CP_OPERATOR_STR.
3822 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3823 CP_OPERATOR_LEN.
3824
3825 2017-07-17 Pedro Alves <palves@redhat.com>
3826
3827 * cli/cli-cmds.c (complete_command): Use a completion tracker
3828 along with completion_find_completion_word for handle_brkchars
3829 phase.
3830 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3831 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3832 (struct gdb_rl_completion_word_info): New.
3833 (gdb_rl_find_completion_word): New.
3834 (completion_find_completion_word): New.
3835 * completer.h (completion_find_completion_word): Declare.
3836
3837 2017-07-17 Pedro Alves <palves@redhat.com>
3838
3839 * ada-lang.c (symbol_completion_match): Adjust comments.
3840 (symbol_completion_add): Replace vector parameter with
3841 completion_tracker parameter. Use it.
3842 (ada_make_symbol_completion_list): Rename to...
3843 (ada_collect_symbol_completion_matches): ... this. Add
3844 completion_tracker parameter and use it.
3845 (ada_language_defn): Adjust.
3846 * break-catch-syscall.c (catch_syscall_completer): Adjust
3847 prototype and work with completion_tracker instead of VEC.
3848 * breakpoint.c (condition_completer): Adjust prototype and work
3849 with completion_tracker instead of VEC.
3850 * c-lang.c (c_language_defn, cplus_language_defn)
3851 (asm_language_defn, minimal_language_defn): Adjust to renames.
3852 * cli/cli-cmds.c (complete_command): Rework using
3853 completion_tracker. Catch exceptions when completing.
3854 * cli/cli-decode.c (integer_unlimited_completer)
3855 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3856 with completion_tracker instead of VEC.
3857 * command.h (struct completion_tracker): Forward declare.
3858 (completer_ftype, completer_handle_brkchars_ftype): Change
3859 types.
3860 (complete_on_cmdlist, complete_on_enum): Adjust.
3861 * completer.c: Include <algorithm>.
3862 (struct gdb_completer_state): New.
3863 (current_completion): New global.
3864 (readline_line_completion_function): Delete.
3865 (noop_completer, filename_completer)
3866 (filename_completer_handle_brkchars, complete_files_symbols)
3867 (linespec_location_completer): Adjust to work with a
3868 completion_tracker instead of a VEC.
3869 (string_or_empty): New.
3870 (collect_explicit_location_matches): Adjust to work with a
3871 completion_tracker instead of a VEC.
3872 (explicit_location_completer): Rename to ...
3873 (complete_explicit_location): ... this and adjust to work with a
3874 completion_tracker instead of a VEC.
3875 (location_completer): Adjust to work with a completion_tracker
3876 instead of a VEC.
3877 (add_struct_fields): Adjust to work with a completion_list instead
3878 of VEC.
3879 (expression_completer): Rename to ...
3880 (complete_expression): ... this and adjust to work with a
3881 completion_tracker instead of a VEC. Use complete_files_symbols.
3882 (expression_completer): Reimplement on top of complete_expression.
3883 (symbol_completer): Adjust to work with a completion_tracker
3884 instead of a VEC.
3885 (enum complete_line_internal_reason): Add describing comments.
3886 (complete_line_internal_normal_command): Adjust to work with a
3887 completion_tracker instead of a VEC.
3888 (complete_line_internal): Rename to ...
3889 (complete_line_internal_1): ... this and adjust to work with a
3890 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3891 handle_brkchars phase.
3892 (new_completion_tracker): Delete.
3893 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3894 complete_line_internal_1.
3895 (free_completion_tracker): Delete.
3896 (INITIAL_COMPLETION_HTAB_SIZE): New.
3897 (completion_tracker::completion_tracker)
3898 (completion_tracker::~completion_tracker): New.
3899 (maybe_add_completion): Delete.
3900 (completion_tracker::maybe_add_completion)
3901 (completion_tracker::add_completion)
3902 (completion_tracker::add_completions): New.
3903 (throw_max_completions_reached_error): Delete.
3904 (complete_line): Adjust to work with a completion_tracker instead
3905 of a VEC. Don't create a completion_tracker_t or check for max
3906 completions here.
3907 (command_completer, command_completer_handle_brkchars)
3908 (signal_completer, reg_or_group_completer_1)
3909 (reg_or_group_completer, default_completer_handle_brkchars):
3910 Adjust to work with a completion_tracker.
3911 (gdb_completion_word_break_characters_throw): New.
3912 (gdb_completion_word_break_characters): Reimplement.
3913 (line_completion_function): Delete.
3914 (completion_tracker::recompute_lowest_common_denominator)
3915 (expand_preserving_ws)
3916 (completion_tracker::build_completion_result)
3917 (completion_result::completion_result)
3918 (completion_result::completion_result)
3919 (completion_result::~completion_result)
3920 (completion_result::completion_result)
3921 (completion_result::release_match_list, compare_cstrings)
3922 (completion_result::sort_match_list)
3923 (completion_result::reset_match_list)
3924 (gdb_rl_attempted_completion_function_throw)
3925 (gdb_rl_attempted_completion_function): New.
3926 * completer.h (completion_list, struct completion_result)
3927 (class completion_tracker): New.
3928 (complete_line): Add completion_tracker parameter.
3929 (readline_line_completion_function): Delete.
3930 (gdb_rl_attempted_completion_function): New.
3931 (noop_completer, filename_completer, expression_completer)
3932 (location_completer, symbol_completer, command_completer)
3933 (signal_completer, reg_or_group_completer): Update prototypes.
3934 (completion_tracker_t, new_completion_tracker)
3935 (make_cleanup_free_completion_tracker): Delete.
3936 (enum maybe_add_completion_enum): Delete.
3937 (maybe_add_completion): Delete.
3938 (throw_max_completions_reached_error): Delete.
3939 * corefile.c (complete_set_gnutarget): Adjust to work with a
3940 completion_tracker instead of a VEC.
3941 * cp-abi.c (cp_abi_completer): Adjust to work with a
3942 completion_tracker instead of a VEC.
3943 * d-lang.c (d_language_defn): Adjust.
3944 * disasm.c (disassembler_options_completer): Adjust to work with a
3945 completion_tracker instead of a VEC.
3946 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3947 (f_collect_symbol_completion_matches): ... this. Adjust to work
3948 with a completion_tracker instead of a VEC.
3949 (f_language_defn): Adjust.
3950 * go-lang.c (go_language_defn): Adjust.
3951 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3952 Adjust to work with a completion_tracker instead of a VEC.
3953 * infrun.c (handle_completer): Likewise.
3954 * interps.c (interpreter_completer): Likewise.
3955 * interps.h (interpreter_completer): Likewise.
3956 * language.c (unknown_language_defn, auto_language_defn)
3957 (local_language_defn): Adjust.
3958 * language.h (language_defn::la_make_symbol_completion_list):
3959 Rename to ...
3960 (language_defn::la_collect_symbol_completion_matches): ... this
3961 and adjust to work with a completion_tracker instead of a VEC.
3962 * m2-lang.c (m2_language_defn): Adjust.
3963 * objc-lang.c (objc_language_defn): Adjust.
3964 * opencl-lang.c (opencl_language_defn): Adjust.
3965 * p-lang.c (pascal_language_defn): Adjust.
3966 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3967 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3968 with a completion_tracker.
3969 * rust-lang.c (rust_language_defn): Adjust.
3970 * symtab.c (free_completion_list, do_free_completion_list)
3971 (return_val, completion_tracker): Delete.
3972 (completion_list_add_name, completion_list_add_symbol)
3973 (completion_list_add_msymbol, completion_list_objc_symbol)
3974 (completion_list_add_fields, add_symtab_completions): Add
3975 completion_tracker parameter and use it.
3976 (default_make_symbol_completion_list_break_on_1): Rename to...
3977 (default_collect_symbol_completion_matches_break_on): ... this.
3978 Add completion_tracker parameter and use it instead of allocating
3979 a completion tracker here.
3980 (default_make_symbol_completion_list_break_on): Delete old
3981 implementation.
3982 (default_make_symbol_completion_list): Delete.
3983 (default_collect_symbol_completion_matches): New.
3984 (make_symbol_completion_list): Delete.
3985 (collect_symbol_completion_matches): New.
3986 (make_symbol_completion_type): Rename to ...
3987 (collect_symbol_completion_matches_type): ... this. Add
3988 completion_tracker parameter and use it instead of VEC.
3989 (make_file_symbol_completion_list_1): Rename to...
3990 (collect_file_symbol_completion_matches): ... this. Add
3991 completion_tracker parameter and use it instead of VEC.
3992 (make_file_symbol_completion_list): Delete.
3993 (add_filename_to_list): Use completion_list instead of a VEC.
3994 (add_partial_filename_data::list): Now a completion_list.
3995 (make_source_files_completion_list): Work with a completion_list
3996 instead of a VEC.
3997 * symtab.h: Include "completer.h".
3998 (default_make_symbol_completion_list_break_on)
3999 (default_make_symbol_completion_list, make_symbol_completion_list)
4000 (make_symbol_completion_type, make_file_symbol_completion_list)
4001 (make_source_files_completion_list): Delete.
4002 (default_collect_symbol_completion_matches_break_on)
4003 (default_collect_symbol_completion_matches)
4004 (collect_symbol_completion_matches)
4005 (collect_symbol_completion_matches_type)
4006 (collect_file_symbol_completion_matches)
4007 (make_source_files_completion_list): New.
4008 * top.c (init_main): Don't install a rl_completion_entry_function
4009 hook. Install a rl_attempted_completion_function hook instead.
4010 * tui/tui-layout.c (layout_completer): Adjust to work with a
4011 completion_tracker.
4012 * tui/tui-regs.c (tui_reggroup_completer):
4013 * tui/tui-win.c (window_name_completer, focus_completer)
4014 (winheight_completer): Adjust to work with a completion_tracker.
4015 * value.c: Include "completer.h".
4016 (complete_internalvar): Adjust to work with a completion_tracker.
4017 * value.h (complete_internalvar): Likewise.
4018
4019 2017-07-17 Pedro Alves <palves@redhat.com>
4020
4021 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4022 renames.
4023 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4024 comments to completer_ftype's declaration.
4025 <completer_handle_brkchars>: Change type to
4026 completer_handle_brkchars_ftype.
4027 * command.h (completer_ftype): Add describing comment and give
4028 names to parameters.
4029 (completer_ftype_void): Rename to ...
4030 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4031 (set_cmd_completer_handle_brkchars): Adjust.
4032 * completer.c (filename_completer_handle_brkchars): New function.
4033 (complete_line_internal_normal_command): New function, factored
4034 out from ...
4035 (complete_line_internal): ... here.
4036 (command_completer_handle_brkchars)
4037 (default_completer_handle_brkchars)
4038 (completer_handle_brkchars_func_for_completer): New functions.
4039 * completer.h (set_gdb_completion_word_break_characters): Delete
4040 declaration.
4041 (completer_handle_brkchars_func_for_completer): New declaration.
4042 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4043 completer_handle_brkchars_func_for_completer.
4044
4045 2017-07-17 Pedro Alves <palves@redhat.com>
4046
4047 * completer.c (symbol_completer): New function, based on
4048 make_symbol_completion_list_fn.
4049 * completer.h (symbol_completer): New declaration.
4050 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4051 * python/py-cmd.c (completers): Adjust.
4052 * symtab.c (make_symbol_completion_list_fn): Delete.
4053 * symtab.h (make_symbol_completion_list_fn): Delete.
4054 * cli/cli-decode.c (add_cmd): Adjust.
4055
4056 2017-07-17 Pedro Alves <palves@redhat.com>
4057
4058 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4059 * dwarf2read.c: Include "filename-seen-cache.h".
4060 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4061 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4062 * filename-seen-cache.c: New file.
4063 * filename-seen-cache.h: New file.
4064 * symtab.c: Include "filename-seen-cache.h".
4065 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4066 (create_filename_seen_cache, clear_filename_seen_cache)
4067 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4068 to filename-seen-cache.h/filename-seen-cache.c.
4069 (output_source_filename, sources_info)
4070 (maybe_add_partial_symtab_filename)
4071 (make_source_files_completion_list): Adjust to use
4072 filename_seen_cache.
4073
4074 2017-07-17 Pedro Alves <palves@redhat.com>
4075
4076 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4077 fields.
4078 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4079 dwarf2_debug_sections*)): New.
4080 (dwarf2_per_objfile::dwarf2_per_objfile(const
4081 dwarf2_per_objfile&)): Declare as deleted.
4082 (dwarf2_per_objfile::operator=): Declare as deleted.
4083 (dwarf2_per_objfile::dwarf2_per_objfile)
4084 (dwarf2_per_objfile::~dwarf2_per_objfile)
4085 (dwarf2_per_objfile::free_cached_comp_units): New.
4086 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4087 ctor. Call dwarf2_per_objfile's ctor manually.
4088 (dwarf2_locate_sections): Deleted/refactored as ...
4089 (dwarf2_per_objfile::locate_sections): ... this new method.
4090 (free_cached_comp_units): Defer to
4091 dwarf2_per_objfile::free_cached_comp_units.
4092 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4093
4094 2017-07-14 Tom Tromey <tom@tromey.com>
4095
4096 PR rust/21764:
4097 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4098 parameter.
4099 <UNOP_SIZEOF>: Split into separate case.
4100 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4101
4102 2017-07-14 Tom Tromey <tom@tromey.com>
4103
4104 PR rust/21763:
4105 * symtab.c (symbol_matches_domain): Add language_rust to special
4106 case.
4107 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4108 treat LOC_TYPEDEF symbols as variables.
4109
4110 2017-07-14 Pedro Alves <palves@redhat.com>
4111
4112 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4113 symtabs matching all symtabs with SRCFILE as file name instead of
4114 only considering the first hit, with lookup_symtab.
4115
4116 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4117
4118 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4119 operator_name parameters.
4120 (gen_expr): Update function call.
4121
4122 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4123
4124 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4125 parameter.
4126 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4127 Likewise.
4128 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4129 parameter, use agent_expr::gdbarch instead, update function
4130 calls.
4131 (locexpr_tracepoint_var_ref): Likewise.
4132 (loclist_tracepoint_var_ref): Likewise.
4133 * ax-gdb.c (gen_trace_static_fields): Likewise.
4134 (gen_traced_pop): Likewise.
4135 (gen_frame_args_address): Likewise.
4136 (gen_frame_locals_address): Likewise.
4137 (gen_var_ref): Likewise.
4138 (gen_struct_ref_recursive): Likewise.
4139 (gen_static_field): Likewise.
4140 (gen_maybe_namespace_elt): Likewise.
4141 (gen_expr): Likewise.
4142 (gen_trace_for_var): Likewise.
4143 (gen_trace_for_expr): Likewise.
4144 (gen_trace_for_return_address): Likewise.
4145
4146 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4147
4148 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4149 parameter.
4150 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4151
4152 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4153
4154 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4155 from ax, update calls.
4156 (gen_usual_arithmetic): Likewise.
4157 (gen_integral_promotions): Likewise.
4158 (gen_bitfield_ref): Likewise.
4159 (gen_primitive_field): Likewise.
4160 (gen_struct_ref_recursive): Likewise.
4161 (gen_struct_ref): Likewise.
4162 (gen_maybe_namespace_elt): Likewise.
4163 (gen_struct_elt_for_reference): Likewise.
4164 (gen_namespace_elt): Likewise.
4165 (gen_aggregate_elt_ref): Likewise.
4166 (gen_expr): Get gdbarch from ax, update calls.
4167 (gen_expr_binop_rest): Likewise.
4168
4169 2017-07-13 Pedro Alves <palves@redhat.com>
4170
4171 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4172 as default tdesc.
4173 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4174 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4175 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4176 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4177 tdep.
4178 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4179 Get final tdesc from the tdep.
4180 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4181 default tdesc.
4182 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4183 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4184 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4185 Use it as default tdesc.
4186 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4187 down to amd_init_abi. No longer handle fallback tdesc here.
4188 * amd64-tdep.h (tdesc_x32): Declare.
4189 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4190 parameter.
4191 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4192 as default tdesc.
4193
4194 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4195
4196 * s390-linux-tdep.c (s390_process_record): Add support for
4197 instructions new in arch12.
4198
4199 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4200
4201 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4202 PT_GETFSBASE and PT_GETGSBASE.
4203 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4204 PT_SETGSBASE.
4205
4206 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4207
4208 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4209 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4210 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4211 those rules.
4212 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4213 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4214 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4215 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4216 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4217 * features/i386/amd64.xml: Add 64bit-segments.xml.
4218 * features/i386/amd64-avx-avx512.c: Regenerated.
4219 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4220 * features/i386/amd64-avx-mpx.c: Regenerated.
4221 * features/i386/amd64-avx.c: Regenerated.
4222 * features/i386/amd64-mpx.c: Regenerated.
4223 * features/i386/amd64.c: Regenerated.
4224 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4225 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4226 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4227 * regformats/i386/amd64-avx.dat: Regenerated.
4228 * regformats/i386/amd64-mpx.dat: Regenerated.
4229 * regformats/i386/amd64.dat: Regenerated.
4230
4231 2017-07-10 Yao Qi <yao.qi@linaro.org>
4232
4233 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4234 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4235
4236 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4237
4238 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4239 unsetenv.
4240 * gnulib/aclocal.m4: Regenerate.
4241 * gnulib/config.in: Regenerate.
4242 * gnulib/configure: Regenerate.
4243 * gnulib/import/Makefile.am: Regenerate.
4244 * gnulib/import/Makefile.in: Regenerate.
4245 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4246 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4247 * gnulib/import/m4/environ.m4: New file.
4248 * gnulib/import/m4/setenv.m4: New file.
4249 * gnulib/import/setenv.c: New file.
4250 * gnulib/import/unsetenv.c: New file.
4251
4252 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4253
4254 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4255 address when op is DW_OP_addr.
4256
4257 2017-07-09 Tom Tromey <tom@tromey.com>
4258
4259 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4260 check and apply to outer type.
4261
4262 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4263
4264 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4265 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4266 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4267 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4268
4269 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4270
4271 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4272
4273 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4274
4275 * corelow.c (get_core_siginfo): Remove.
4276 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4277 instead of get_core_siginfo.
4278 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4279 * gdbarch.h: Re-generate.
4280 * gdbarch.c: Re-generate.
4281 * linux-tdep.c (linux_core_xfer_siginfo): New.
4282 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4283
4284 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4285
4286 * corelow.c (thread_section_name): Move to ...
4287 * gdbcore.h (thread_section_name): ... here.
4288
4289 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4290
4291 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4292 (struct siginfo32): New.
4293 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4294 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4295 via ptrace(PT_LWPINFO).
4296
4297 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4298
4299 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4300 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4301 (fbsd_get_siginfo_type): New.
4302 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4303 (_initialize_fbsd_tdep): New.
4304
4305 2017-07-06 David Blaikie <dblaikie@gmail.com>
4306
4307 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4308 a singular dwo_unit*) to support multiple CUs in the same way that
4309 multiple TUs are supported.
4310 (create_cus_hash_table): Replace create_dwo_cu with a function for
4311 parsing multiple CUs from a DWO file.
4312 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4313 create_dwo_cu.
4314 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4315 htab_find, rather than comparing the signature to a singleton CU in
4316 the dwo_file.
4317
4318 2017-07-06 Pedro Alves <palves@redhat.com>
4319
4320 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4321
4322 2017-07-04 Pedro Alves <palves@redhat.com>
4323
4324 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4325 * gdbtypes.h (TYPE_STATIC): Delete.
4326 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4327 is_synchronized, is_native>: Delete.
4328 <dummy>: Bump.
4329 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4330 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4331 (TYPE_FN_FIELD_ABSTRACT): Delete.
4332
4333 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4334
4335 * buffer.h (buffer_finish): Fix spelling mistakes.
4336
4337 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4338
4339 * .dir-locals.el: Automatically switch to C-style comments in
4340 versions of Emacs that support the feature.
4341
4342 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4343 Pedro Alves <palves@redhat.com>
4344
4345 PR cli/21688
4346 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4347 (process_next_line): New variable 'inline_cmd'.
4348 Adjust 'if' clauses for "python", "compile" and "guile" to use
4349 'command_name_equals' and check for '!inline_cmd'.
4350
4351 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4352
4353 PR cli/21688
4354 * cli/cli-script.c (command_name_equals_not_inline): New function.
4355 (process_next_line): Adjust 'if' clauses for "python", "compile"
4356 and "guile" to use command_name_equals_not_inline.
4357
4358 2017-06-29 Pedro Alves <palves@redhat.com>
4359
4360 * completer.c (expression_completer): Call
4361 linespec_location_completer instead of location_completer.
4362
4363 2017-06-29 Pedro Alves <palves@redhat.com>
4364
4365 * completer.c (expression_completer): Remove code that recomputes
4366 'text' from 'word'.
4367
4368 2017-06-29 Yao Qi <yao.qi@linaro.org>
4369
4370 * regformats/regdat.sh: Generate code with
4371 "ifndef IN_PROCESS_AGENT".
4372
4373 2017-06-28 Pedro Alves <palves@redhat.com>
4374
4375 * command.h: Include "common/scoped_restore.h".
4376
4377 2017-06-28 Yao Qi <yao.qi@linaro.org>
4378
4379 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4380 instead of obstack_grow.
4381
4382 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4383
4384 PR gdb/21337
4385 * symfile.c (reread_symbols): Call objfiles_changed just before
4386 read_symbols.
4387
4388 2017-06-27 Pedro Alves <palves@redhat.com>
4389
4390 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4391 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4392 (completion_list_add_symbol, completion_list_add_msymbol):
4393 ... these new functions.
4394 (add_symtab_completions)
4395 (default_make_symbol_completion_list_break_on_1): Adjust.
4396
4397 2017-06-27 Pedro Alves <palves@redhat.com>
4398
4399 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4400 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4401 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4402 dtor.
4403 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4404 'storage_obstack' field an auto_obstack. In-class initialize all
4405 non-bitfield fields. Make minsyms_read bool.
4406 * symfile.c (read_symbols): Adjust.
4407
4408 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4409
4410 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4411 (gdbsim_store_register): Likewise.
4412
4413 2017-06-27 Pedro Alves <palves@redhat.com>
4414
4415 * c-exp.y (name_obstack): Now an auto_obstack.
4416 (yylex): Use auto_obstack::clear.
4417 (c_parse): Use auto_obstack::clear instead of reinitializing and
4418 freeing the obstack.
4419 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4420 * d-exp.y (name_obstack): Now an auto_obstack.
4421 (yylex): Use auto_obstack::clear.
4422 (d_parse): Use auto_obstack::clear instead of reinitializing and
4423 freeing the obstack.
4424 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4425 auto_obstack.
4426 * dwarf2read.c (create_addrmap_from_index)
4427 (dwarf2_build_psymtabs_hard)
4428 (update_enumeration_type_from_children): Likewise.
4429 * gdb_obstack.h (auto_obstack): New type.
4430 * go-exp.y (name_obstack): Now an auto_obstack.
4431 (build_packaged_name): Use auto_obstack::clear.
4432 (go_parse): Use auto_obstack::clear instead of reinitializing and
4433 freeing the obstack.
4434 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4435 auto_obstack.
4436 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4437 * rust-exp.y (work_obstack): Now an auto_obstack.
4438 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4439 reinitializing and freeing the obstack.
4440 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4441 (host_char_to_target): Use auto_obstack.
4442 * utils.h (make_cleanup_obstack_free): Delete declaration.
4443 * valprint.c (generic_emit_char, generic_printstr): Use
4444 auto_obstack.
4445
4446 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4447
4448 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4449 thread.
4450 (darwin_init_thread_list): Don't update dummy thread.
4451 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4452
4453 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4454
4455 * record-full.c (netorder16): Remove.
4456
4457 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4458
4459 * common/diagnostics.h: Define macros for GCC.
4460 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4461 * common/vec.h: Include diagnostics.h.
4462 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4463 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4464 warning.
4465
4466 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4467
4468 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4469 New macro.
4470 * ada-lex.l: Ignore deprecated register warnings.
4471
4472 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4473
4474 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4475 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4476
4477 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4478
4479 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4480 its own line.
4481
4482 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4483
4484 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4485
4486 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4487
4488 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4489 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4490 (xtensa_register_read_masked): Likewise.
4491
4492 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4493
4494 * common/environ.c (gdb_environ::unset): Update comment.
4495
4496 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4497
4498 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4499 registers.
4500
4501 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4502
4503 * record-full.c (record_full_exec_insn): Use byte_vector.
4504
4505 2017-06-22 Yao Qi <yao.qi@linaro.org>
4506
4507 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4508 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4509
4510 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4511
4512 * remote.c (cached_reg): Move from here...
4513 * regcache.h (cached_reg): ...to here.
4514 * python/py-unwind.c (struct reg_info): Remove.
4515 (cached_frame_info): Use cached_reg_t.
4516 (pyuw_prev_register): Likewise.
4517 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4518 (pyuw_dealloc_cache): Free all registers.
4519
4520 2017-06-22 Pedro Alves <palves@redhat.com>
4521 Simon Marchi <simon.marchi@ericsson.com>
4522
4523 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4524 warning.
4525 * common/diagnostics.h: New file.
4526
4527 2017-06-22 Pedro Alves <palves@redhat.com>
4528
4529 * common/agent.h: Add include guards.
4530
4531 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4532
4533 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4534 talk about addressable units instead of bytes.
4535
4536 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4537
4538 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4539 of '::const_iterator'.
4540
4541 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4542
4543 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4544 'unittests/environ-selftests.c'.
4545 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4546 * charset.c (find_charset_names): Declare object 'iconv_env'.
4547 Update code to use 'iconv_env' object. Remove call to
4548 'free_environ'.
4549 * common/environ.c: Include <utility>.
4550 (make_environ): Delete function.
4551 (free_environ): Delete function.
4552 (gdb_environ::clear): New function.
4553 (gdb_environ::operator=): New function.
4554 (gdb_environ::get): Likewise.
4555 (environ_vector): Delete function.
4556 (set_in_environ): Delete function.
4557 (gdb_environ::set): New function.
4558 (unset_in_environ): Delete function.
4559 (gdb_environ::unset): New function.
4560 (gdb_environ::envp): Likewise.
4561 * common/environ.h: Include <vector>.
4562 (struct gdb_environ): Delete; transform into...
4563 (class gdb_environ): ... this class.
4564 (free_environ): Delete prototype.
4565 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4566 environ_vector): Likewise.
4567 * infcmd.c (run_command_1): Update code to call
4568 'envp' from 'gdb_environ' class.
4569 (environment_info): Update code to call methods from 'gdb_environ'
4570 class.
4571 (unset_environment_command): Likewise.
4572 (path_info): Likewise.
4573 (path_command): Likewise.
4574 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4575 (inferior::inferior): Initialize 'environment' using the host's
4576 information.
4577 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4578 Include "environ.h".
4579 (class inferior) <environment>: Change type from 'struct
4580 gdb_environ' to 'gdb_environ'.
4581 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4582 methods from 'gdb_environ' class.
4583 * solib.c (solib_find_1): Likewise
4584 * unittests/environ-selftests.c: New file.
4585
4586 2017-06-20 Yao Qi <yao.qi@linaro.org>
4587
4588 * features/i386/i386-linux.xml: Exchange the order of including
4589 32bit-linux.xml and 32bit-sse.xml.
4590 * features/i386/i386-linux.c: Regenerated.
4591
4592 2017-06-20 Yao Qi <yao.qi@linaro.org>
4593
4594 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4595 Delete copy ctor and assignment operator.
4596 (tdesc_type): Likewise.
4597 (tdesc_feature): Likewise.
4598 (tdesc_free_reg): Remove.
4599 (tdesc_create_reg): Use new.
4600 (tdesc_free_type): Remove.
4601 (tdesc_create_vector): Use new.
4602 (tdesc_create_union): Likewise.
4603 (tdesc_create_flags): Likewise.
4604 (tdesc_create_enum): Likewise.
4605 (tdesc_free_feature): Delete.
4606 (free_target_description): Use delete.
4607
4608 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4609
4610 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4611 registers.
4612
4613 2017-06-19 Pedro Alves <palves@redhat.com>
4614
4615 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4616 after gdb::unlinker.
4617
4618 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4619
4620 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4621 gdb_environ to access an environment variable.
4622
4623 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4624
4625 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4626 gdb_byte*.
4627
4628 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4629
4630 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4631
4632 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4633
4634 * configure: Re-generate.
4635 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4636
4637 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4638
4639 * configure: Re-generate.
4640 * warning.m4: Pass -Werror to compiler when checking for
4641 supported warning flags.
4642
4643 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4644
4645 * Makefile.in (COMPILE.pre): Add "-x c++".
4646
4647 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4648 Pedro Alves <palves@redhat.com>
4649 Yao Qi <yao.qi@linaro.org>
4650
4651 * defs.h (RequireLongest): New.
4652 (extract_integer): Declare function template.
4653 (extract_signed_integer): Remove the declaration, but define it
4654 static inline.
4655 (extract_unsigned_integer): Likewise.
4656 (store_integer): Declare function template.
4657 (store_signed_integer): Remove the declaration, but define it
4658 static inline.
4659 (store_unsigned_integer): Likewise.
4660 * findvar.c (extract_integer): New function template.
4661 (extract_signed_integer): Remove.
4662 (extract_unsigned_integer): Remove.
4663 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4664 instantiations.
4665 (store_integer): New function template.
4666 (store_signed_integer): Remove.
4667 (store_unsigned_integer): Remove.
4668 (store_integer): Explicit instantiations.
4669 * regcache.c (regcache_raw_read_signed): Update.
4670 (regcache::raw_read): New function.
4671 (regcache::raw_read_signed): Remove.
4672 (regcache::raw_read_unsigned): Remove.
4673 (regcache_raw_read_unsigned): Update.
4674 (regcache_raw_write_unsigned): Update.
4675 (regcache::raw_write_signed): Remove.
4676 (regcache::raw_write): New function.
4677 (regcache_cooked_read_signed): Update.
4678 (regcache::raw_write_unsigned): Remove.
4679 (regcache::cooked_read_signed): Remove.
4680 (regcache_cooked_read_unsigned): Update.
4681 (regcache::cooked_read_unsigned): Remove.
4682 (regcache_cooked_write_signed): Update.
4683 (regcache_cooked_write_unsigned): Update.
4684 * regcache.h (regcache) <raw_read_signed>: Remove.
4685 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4686 <raw_read, raw_write>: New.
4687 <cooked_read_signed, cooked_write_signed>: Remove.
4688 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4689 <cooked_read, cooked_write>: New.
4690 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4691 (sh64_pseudo_register_write): Update.
4692
4693 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4694
4695 * arc-tdep.c (arc_disassembler_options): New variable.
4696 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4697 of default_print_insn.
4698 (arc_delayed_print_insn): Set info->section when needed,
4699 use default_print_insn to retrieve a disassembler.
4700
4701 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4702
4703 PR gdb/21574
4704 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4705 to mention $SHELL and startup-with-shell.
4706
4707 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4708
4709 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4710
4711 2017-06-14 Yao Qi <yao.qi@linaro.org>
4712
4713 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4714 default_print_insn instead of print_insn_aarch64.
4715 * arm-tdep.c (gdb_print_insn_arm): Call
4716 default_print_insn instead of print_insn_big_arm
4717 and print_insn_little_arm.
4718 * i386-tdep.c (i386_print_insn): Call default_print_insn
4719 instead of print_insn_i386.
4720 * ia64-tdep.c (ia64_print_insn): Call
4721 default_print_insn instead of print_insn_ia64.
4722 * mips-tdep.c (gdb_print_insn_mips): Call
4723 default_print_insn instead of print_insn_big_mips
4724 and print_insn_little_mips.
4725 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4726 instead of print_insn_spu.
4727
4728 2017-06-14 Pedro Alves <palves@redhat.com>
4729
4730 * ada-lang.c: Include "common/byte-vector.h".
4731 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4732 * charset.c (wchar_iterator::iterate): Resize the vector instead
4733 of reserving it.
4734 * common/byte-vector.h: Include "common/def-vector.h".
4735 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4736 * cli/cli-dump.c: Include "common/byte-vector.h".
4737 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4738 * common/byte-vector.h: New file.
4739 * common/def-vector.h: New file.
4740 * common/default-init-alloc.h: New file.
4741 * dwarf2loc.c: Include "common/byte-vector.h".
4742 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4743 instead of reserving it.
4744 * dwarf2read.c: Include "common/byte-vector.h".
4745 (data_buf::m_vec): Now a gdb::byte_vector.
4746 * gdb_regex.c: Include "common/def-vector.h".
4747 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4748 * mi/mi-main.c: Include "common/byte-vector.h".
4749 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4750 * printcmd.c: Include "common/byte-vector.h".
4751 (print_scalar_formatted): Use gdb::byte_vector.
4752 * valprint.c: Include "common/byte-vector.h".
4753 (maybe_negate_by_bytes, print_decimal_chars): Use
4754 gdb::byte_vector.
4755
4756 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4757
4758 * darwin-nat.c: Include "nat/fork-inferior.h".
4759
4760 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4761
4762 * configure.nat: Factor out Darwin bits that are not
4763 architecture-specific. Add fork-inferior.o.
4764
4765 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4766
4767 * configure.nat: Factor out AIX bits that are not
4768 architecture-specific. Add fork-inferior.o.
4769
4770 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4771
4772 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4773 (read_pieced_value, write_pieced_value): ...here. Reduce to
4774 wrappers that just call rw_pieced_value.
4775
4776 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4777
4778 * dwarf2loc.c (write_pieced_value): When writing the data for a
4779 memory piece, use write_memory_with_notification instead of
4780 write_memory.
4781
4782 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4783
4784 * valops.c (read_value_memory): Change embedded_offset to
4785 represent a bit offset instead of a byte offset.
4786 * value.h (read_value_memory): Adjust comment.
4787
4788 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4789
4790 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4791 dest_offset_bits and source_offset_bits.
4792 (write_pieced_value): Likewise.
4793
4794 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4795
4796 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4797 given by DW_OP_bit_piece.
4798 (write_pieced_value): Likewise.
4799
4800 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4801
4802 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4803 some other preparations to the places where sufficient information
4804 is available.
4805 (write_pieced_value): Likewise.
4806
4807 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4808
4809 * dwarf2loc.c (bits_to_bytes): New function.
4810 (read_pieced_value): Fix offset calculations for register pieces
4811 on big-endian targets.
4812 (write_pieced_value): Likewise.
4813
4814 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4815
4816 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4817 (write_pieced_value): Likewise.
4818
4819 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4820
4821 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4822 transfer the source value's least significant bits, instead of its
4823 lowest-addressed ones. Rename type_len to max_offset.
4824 (read_pieced_value): Mirror above changes to write_pieced_value as
4825 applicable.
4826
4827 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4828
4829 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4830 truncate full bytes from dest_offset_bits before using it as an
4831 offset into the buffer.
4832
4833 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4834
4835 * dwarf2loc.c (write_pieced_value): Include transfer size in
4836 byte-wise check.
4837
4838 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4839
4840 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4841 calculation of this_size.
4842
4843 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4844
4845 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4846 when targeting a bit-field.
4847 (write_pieced_value): Likewise.
4848
4849 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4850
4851 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4852 (allocate_piece_closure): Drop addr_size parameter.
4853 (dwarf2_evaluate_loc_desc_full): Adjust call to
4854 allocate_piece_closure.
4855
4856 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4857
4858 PR gdb/21226
4859 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4860 the LSB end, independent of endianness.
4861
4862 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4863
4864 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4865 size capping.
4866
4867 2017-06-13 Yao Qi <yao.qi@linaro.org>
4868
4869 * mips-linux-nat.c: Move include features/mips*-linux.c to
4870 mips-linux-tdep.c.
4871 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4872 to mips-linux-tdep.c.
4873 * mips-linux-tdep.c: Include features/mips*-linux.c
4874 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4875 functions.
4876 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4877 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4878 (tdesc_mips64_dsp_linux): Declare.
4879
4880 2017-06-12 Tom Tromey <tom@tromey.com>
4881
4882 * valprint.h (val_print_type_code_int): Remove.
4883 * valprint.c (generic_val_print_int): Always call
4884 val_print_scalar_formatted.
4885 (val_print_type_code_int): Remove.
4886 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4887 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4888 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4889 * ada-valprint.c (ada_val_print_num): Use
4890 val_print_scalar_formatted.
4891
4892 2017-06-12 Tom Tromey <tom@tromey.com>
4893
4894 * printcmd.c (print_scalar_formatted): Unify the two switches.
4895 Don't convert scalars to LONGEST.
4896
4897 2017-06-12 Tom Tromey <tom@tromey.com>
4898
4899 PR exp/16225:
4900 * valprint.h (print_decimal_chars): Update.
4901 * valprint.c (maybe_negate_by_bytes): New function.
4902 (print_decimal_chars): Add "is_signed" argument.
4903 * printcmd.c (print_scalar_formatted): Update.
4904
4905 2017-06-12 Tom Tromey <tom@tromey.com>
4906
4907 PR exp/16225:
4908 * valprint.h (print_binary_chars, print_hex_chars): Update.
4909 * valprint.c (val_print_type_code_int): Update.
4910 (print_binary_chars): Add "zero_pad" argument.
4911 (emit_octal_digit): New function.
4912 (print_octal_chars): Don't zero-pad.
4913 (print_decimal_chars): Likewise.
4914 (print_hex_chars): Add "zero_pad" argument.
4915 * sh64-tdep.c (sh64_do_fp_register): Update.
4916 * regcache.c (regcache::dump): Update.
4917 * printcmd.c (print_scalar_formatted): Update.
4918 * infcmd.c (default_print_one_register_info): Update.
4919
4920 2017-06-12 Pedro Alves <palves@redhat.com>
4921 Alan Hayward <alan.hayward@arm.com>
4922
4923 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4924 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4925 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4926 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4927 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4928
4929 2017-06-12 Pedro Alves <palves@redhat.com>
4930
4931 * dwarf2read.c (mapped_symtab::data): Now a vector of
4932 symtab_index_entry instead of vector of
4933 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4934 whether an element's name is NULL instead of checking whether the
4935 element itself is NULL.
4936 (find_slot): Change return type. Adjust.
4937 (hash_expand, , add_index_entry, uniquify_cu_indices)
4938 (write_hash_table): Adjust.
4939
4940 2017-06-12 Pedro Alves <palves@redhat.com>
4941
4942 * dwarf2read.c (recursively_count_psymbols): New function.
4943 (write_psymtabs_to_index): Call it to compute number of psyms and
4944 pass estimate size of psyms_seen to unordered_set's ctor.
4945
4946 2017-06-12 Pedro Alves <palves@redhat.com>
4947
4948 * dwarf2read.c (write_hash_table): Check if key already exists
4949 before emplacing.
4950
4951 2017-06-12 Pedro Alves <palves@redhat.com>
4952
4953 * dwarf2read.c (data_buf::append_space): Rename to...
4954 (data_buf::grow): ... this, and make private. Adjust all callers.
4955 (data_buf::append_uint): New method.
4956 (add_address_entry, write_one_signatured_type)
4957 (write_psymtabs_to_index): Use it.
4958
4959 2017-06-12 Pedro Alves <palves@redhat.com>
4960
4961 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4962 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4963 (data_buf::file_write): Call ::fwrite directly.
4964
4965 2017-06-12 Pedro Alves <palves@redhat.com>
4966
4967 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4968 std::vector::erase.
4969
4970 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4971
4972 Code cleanup: C++ify .gdb_index producer.
4973 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4974 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4975 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4976 (create_strtab, add_string): Remove.
4977 (file_write, data_buf): New.
4978 (struct symtab_index_entry): Use std::vector for cu_indices.
4979 (struct mapped_symtab): Use std::vector for data.
4980 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4981 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4982 Remove.
4983 (find_slot): Change return type. Update it to the new data structures.
4984 (hash_expand, add_index_entry): Update it to the new data structures.
4985 (offset_type_compare): Remove.
4986 (uniquify_cu_indices): Update it to the new data structures.
4987 (c_str_view, c_str_view_hasher, vector_hasher): New.
4988 (add_indices_to_cpool): Remove.
4989 (write_hash_table): Update it to the new data structures.
4990 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4991 (eq_psymtab_cu_index): Remove.
4992 (psym_index_map): New typedef.
4993 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4994 reference and std::unordered_map for cu_index_htab.
4995 (add_address_entry, add_address_entry_worker, write_address_map)
4996 (write_psymbols): Update it to the new data structures.
4997 (write_obstack): Remove.
4998 (struct signatured_type_index_data): Change types_list to a data_buf
4999 reference and psyms_seen to a std::unordered_set reference.
5000 (write_one_signatured_type, recursively_write_psymbols)
5001 (write_psymtabs_to_index): Update it to the new data structures.
5002
5003 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5004
5005 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5006 separate-debug-file commands.
5007 * symfile.h (separate_debug_file_debug): New global.
5008 * symfile.c (separate_debug_file_debug): New global.
5009 (separate_debug_file_exists, find_separate_debug_file): Add
5010 debug output.
5011 (_initialize_symfile): Add "set debug separate-debug-file"
5012 command.
5013 * build-id.c (build_id_to_debug_bfd,
5014 find_separate_debug_file_by_buildid): Add debug output.
5015
5016 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5017
5018 * gdbarch.sh (displaced_step_free_closure): Remove.
5019 * gdbarch.h, gdbarch.c: Re-generate.
5020 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5021 displaced_step_free_closure.
5022 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5023 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5024 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5025 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5026 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5027 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5028 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5029 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5030 * infrun.c (displaced_step_clear): Call xfree instead of
5031 gdbarch_displaced_step_free_closure.
5032
5033 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5034
5035 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5036 NULL".
5037
5038 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5039
5040 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5041 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5042 (mn10300_push_dummy_call): Likewise.
5043
5044 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5045
5046 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5047
5048 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5049
5050 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5051
5052 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5053
5054 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5055 able to start inferiors using a shell.
5056 (New remote packets): Announce new packet "QStartupWithShell".
5057 * remote.c: Add PACKET_QStartupWithShell.
5058 (extended_remote_create_inferior): Handle new
5059 PACKET_QStartupWithShell.
5060 (remote_protocol_features) <QStartupWithShell>: New entry for
5061 PACKET_QStartupWithShell.
5062 (_initialize_remote): Call "add_packet_config_cmd" for
5063 QStartupShell.
5064
5065 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5066 Pedro Alves <palves@redhat.com>
5067
5068 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5069 and "nat/fork-inferior.h".
5070 * common/common-inferior.h: New file, with contents from
5071 "gdb/inferior.h".
5072 * commom/common-utils.c: Include "common-utils.h".
5073 (stringify_argv): New function.
5074 * common/common-utils.h (stringify_argv): New prototype.
5075 * configure.nat: Add "fork-inferior.o" as a dependency for
5076 "*linux*", "fbsd*" and "nbsd*" hosts.
5077 * corefile.c (get_exec_file): Update comment.
5078 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5079 instead of "startup_inferior".
5080 (darwin_create_inferior): Call "add_thread_silent" after
5081 "fork_inferior".
5082 * fork-child.c: Cleanup unnecessary includes.
5083 (SHELL_FILE): Move to "common/common-fork-child.c".
5084 (environ): Likewise.
5085 (exec_wrapper): Initialize.
5086 (get_exec_wrapper): New function.
5087 (breakup_args): Move to "common/common-fork-child.c"; rename to
5088 "breakup_args_for_exec".
5089 (escape_bang_in_quoted_argument): Move to
5090 "common/common-fork-child.c".
5091 (saved_ui): New variable.
5092 (prefork_hook): New function.
5093 (postfork_hook): Likewise.
5094 (postfork_child_hook): Likewise.
5095 (gdb_startup_inferior): Likewise.
5096 (fork_inferior): Move to "common/common-fork-child.c". Update
5097 function to support gdbserver.
5098 (startup_inferior): Likewise.
5099 * gdbcore.h (get_exec_file): Remove declaration.
5100 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5101 instead of "startup_inferior". Call "add_thread_silent" after
5102 "fork_inferior".
5103 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5104 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5105 instead of "startup_inferior". Call "add_thread_silent" after
5106 "fork_inferior".
5107 * inferior.h: Include "common-inferior.h".
5108 (trace_start_error): Move to "common/common-utils.h".
5109 (trace_start_error_with_name): Likewise.
5110 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5111 (startup_inferior): Likewise.
5112 (gdb_startup_inferior): New prototype.
5113 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5114 * nat/fork-inferior.h: New file.
5115 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5116 instead of "startup_inferior". Call "add_thread_silent" after
5117 "fork_inferior".
5118 * target.h (target_terminal_init): Move prototype to
5119 "target/target.h".
5120 (target_terminal_inferior): Likewise.
5121 (target_terminal_ours): Likewise.
5122 * target/target.h (target_terminal_init): New prototype, moved
5123 from "target.h".
5124 (target_terminal_inferior): Likewise.
5125 (target_terminal_ours): Likewise.
5126 * utils.c (gdb_flush_out_err): New function.
5127
5128 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5129
5130 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5131 * common/common-gdbthread.h: New file, with parts from
5132 "gdb/gdbthread.h".
5133 * gdbthread.h: Include "common-gdbthread.h".
5134 (switch_to_thread): Moved to "common/common-gdbthread.h".
5135
5136 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5137
5138 * Makefile.in (SFILES): Add "common/job-control.c".
5139 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5140 (COMMON_OBS): Add "job-control.o".
5141 * common/job-control.c: New file, with contents from
5142 "gdb/inflow.c".
5143 * common/job-control.h: New file, with contents from "terminal.h".
5144 * fork-child.c: Include "job-control.h".
5145 * inflow.c: Include "job-control.h".
5146 (gdb_setpgid): Move to "common/common-inflow.c".
5147 (_initialize_inflow): Move setting of "job_control" to
5148 "handle_job_control".
5149 * terminal.h (job_control): Moved to "common/common-terminal.h".
5150 (gdb_setpgid): Likewise.
5151 * top.c: Include "job_control.h".
5152 * utils.c: Likewise.
5153 (job_control): Moved to "job-control.c".
5154
5155 2017-06-07 Pedro Alves <palves@redhat.com>
5156
5157 * Makefile.in (SFILES): Add gdb_regex.c.
5158 (COMMON_OBS): Add gdb_regex.o.
5159 * ada-lang.c (ada_add_standard_exceptions)
5160 (ada_add_exceptions_from_frame, name_matches_regex)
5161 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5162 parameter type to compiled_regex. Adjust.
5163 (ada_exceptions_list): Use compiled_regex.
5164 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5165 std::unique_ptr<compiled_regex>.
5166 (exception_catchpoint::~exception_catchpoint): Remove regfree
5167 call.
5168 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5169 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5170 * breakpoint.c (solib_catchpoint::compiled): Now a
5171 std::unique_ptr<compiled_regex>.
5172 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5173 (check_status_catch_solib): Adjust to use compiled_regex.
5174 (add_solib_catchpoint): Adjust to use compiled_regex.
5175 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5176 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5177 compiled_regex reference. Adjust to use it.
5178 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5179 declaration. Include "gdb_regex.h".
5180 (apropos_cmd): Change regex parameter to compiled_regex reference.
5181 * gdb_regex.c: New file.
5182 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5183 declarations.
5184 (class compiled_regex): New.
5185 * linux-tdep.c: Include "common/gdb_optional.h".
5186 (struct mapping_regexes): New, factored out from
5187 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5188 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5189 gdb::optional and remove cleanups. Adjust to compiled_regex.
5190 * probe.c: Include "common/gdb_optional.h".
5191 (collect_probes): Use compiled_regex and gdb::optional and remove
5192 cleanups.
5193 * skip.c: Include "common/gdb_optional.h".
5194 (skiplist_entry::compiled_function_regexp): Now a
5195 gdb::optional<compiled_regex>.
5196 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5197 (free_skiplist_entry): Remove regfree call.
5198 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5199 compiled_regex and gdb::optional.
5200 * symtab.c: Include "common/gdb_optional.h".
5201 (search_symbols): Use compiled_regex and gdb::optional.
5202 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5203 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5204 to gdb_regex.c.
5205
5206 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5207
5208 * regcache.c (regcache::save): Avoid buffer use.
5209 (regcache::dump): Likewise.
5210
5211 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5212
5213 * sh-tdep.c (sh_pseudo_register_read): Remove
5214 MAX_REGISTER_SIZE.
5215 (sh_pseudo_register_write): Likewise.
5216 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5217 (sh64_pseudo_register_write): Likewise
5218
5219 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5220
5221 * aarch64-tdep.c (aarch64_store_return_value): Use
5222 V_REGISTER_SIZE.
5223 (aarch64_pseudo_read_value): Likewise.
5224 (aarch64_pseudo_write): Likewise.
5225
5226 2017-06-06 Yao Qi <yao.qi@linaro.org>
5227
5228 * regformats/regdef.h (set_register_cache): Remove the
5229 declaration.
5230
5231 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5232
5233 * frame.c (frame_unwind_register_signed): Use
5234 frame_unwind_register_value.
5235
5236 2017-06-06 Pedro Alves <palves@redhat.com>
5237
5238 PR breakpoints/21553
5239 * breakpoint.c (create_breakpoints_sal_default)
5240 (init_breakpoint_sal, create_breakpoint_sal): Use
5241 gdb::unique_xmalloc_ptr for string parameters.
5242 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5243 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5244 (base_breakpoint_create_breakpoints_sal)
5245 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5246 (strace_marker_create_breakpoints_sal)
5247 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5248 string parameters.
5249 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5250 gdb::unique_xmalloc_ptr for string parameters.
5251 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5252 parameters.
5253
5254 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5255
5256 * alpha-tdep.c (alpha_register_to_value): Use
5257 get_frame_register_value.
5258 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5259
5260 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5261
5262 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5263 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5264 (ia64_value_to_register): Likewise.
5265 (ia64_extract_return_value): Likewise.
5266 (ia64_store_return_value): Likewise.
5267 (ia64_push_dummy_call): Likewise.
5268
5269 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5270
5271 GDB 8.0 released.
5272
5273 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5274
5275 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5276
5277 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5278
5279 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5280 parameter.
5281 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5282
5283 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5284
5285 * event-loop.c (poll_timers): Unallocate timer using delete
5286 instead of xfree.
5287
5288 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5289
5290 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5291 (struct breakpoint) <~breakpoint>: New.
5292 (struct watchpoint): Inherit from breakpoint.
5293 <~watchpoint>: New.
5294 <base>: Remove.
5295 (struct tracepoint): Inherit from breakpoint.
5296 <base>: Remove.
5297 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5298 (struct longjmp_breakpoint): Inherit from breakpoint.
5299 <~longjmp_breakpoint>: New.
5300 <base>: Remove.
5301 (new_breakpoint_from_type): Remove casts.
5302 (watchpoint_in_thread_scope): Remove reference to base field.
5303 (watchpoint_del_at_next_stop): Likewise.
5304 (update_watchpoint): Likewise.
5305 (watchpoint_check): Likewise.
5306 (bpstat_check_watchpoint): Likewise.
5307 (set_longjmp_breakpoint): Likewise.
5308 (struct fork_catchpoint): Inherit from breakpoint.
5309 <base>: Remove.
5310 (struct solib_catchpoint): Inherit from breakpoint.
5311 <~solib_catchpoint>: New.
5312 <base>: Remove.
5313 (dtor_catch_solib): Change to ...
5314 (solib_catchpoint::~solib_catchpoint): ... this.
5315 (breakpoint_hit_catch_solib): Remove reference to base field.
5316 (add_solib_catchpoint): Likewise.
5317 (create_fork_vfork_event_catchpoint): Likewise.
5318 (struct exec_catchpoint): Inherit from breakpoint.
5319 <~exec_catchpoint>: New.
5320 <base>: Remove.
5321 (dtor_catch_exec): Change to ...
5322 (exec_catchpoint::~exec_catchpoint): ... this.
5323 (dtor_watchpoint): Change to ...
5324 (watchpoint::~watchpoint): ... this.
5325 (watch_command_1): Remove reference to base field.
5326 (catch_exec_command_1): Likewise.
5327 (base_breakpoint_dtor): Change to ...
5328 (breakpoint::~breakpoint): ... this.
5329 (base_breakpoint_ops): Remove dtor field value.
5330 (longjmp_bkpt_dtor): Change to ...
5331 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5332 (strace_marker_create_breakpoints_sal): Remove reference to base
5333 field.
5334 (delete_breakpoint): Don't manually call breakpoint destructor.
5335 (create_tracepoint_from_upload): Remove reference to base field.
5336 (trace_pass_set_count): Likewise.
5337 (initialize_breakpoint_ops): Don't initialize
5338 momentary_breakpoint_ops, don't set dtors.
5339 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5340 <~ada_catchpoint>: New.
5341 <base>: Remove.
5342 (create_excep_cond_exprs): Remove reference to base field.
5343 (dtor_exception): Change to ...
5344 (ada_catchpoint::~ada_catchpoint): ... this.
5345 (dtor_catch_exception): Remove.
5346 (dtor_catch_exception_unhandled): Remove.
5347 (dtor_catch_assert): Remove.
5348 (create_ada_exception_catchpoint): Remove reference to base
5349 field.
5350 (initialize_ada_catchpoint_ops): Don't set dtors.
5351 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5352 breakpoint.
5353 <~signal_catchpoint>: New.
5354 <base>: Remove.
5355 (signal_catchpoint_dtor): Change to ...
5356 (signal_catchpoint::~signal_catchpoint): ... this.
5357 (create_signal_catchpoint): Remove reference to base field.
5358 (initialize_signal_catchpoint_ops): Don't set dtor.
5359 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5360 from breakpoint.
5361 <~syscall_catchpoint>: New.
5362 <base>: Remove.
5363 (dtor_catch_syscall): Change to ...
5364 (syscall_catchpoint::~syscall_catchpoint): ... this.
5365 (create_syscall_event_catchpoint): Remove reference to base
5366 field.
5367 (initialize_syscall_catchpoint_ops): Don't set dtor.
5368 * break-catch-throw.c (struct exception_catchpoint): Inherit
5369 from breakpoint.
5370 <~exception_catchpoint>: New.
5371 <base>: Remove.
5372 (dtor_exception_catchpoint): Change to ...
5373 (exception_catchpoint::~exception_catchpoint): ... this.
5374 (handle_gnu_v3_exceptions): Remove reference to base field.
5375 (initialize_throw_catchpoint_ops): Don't set dtor.
5376 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5377 field.
5378 * remote.c (remote_get_tracepoint_status): Likewise.
5379 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5380 * tracefile.c (tracefile_fetch_registers): Likewise.
5381 * tracepoint.c (actions_command): Likewise.
5382 (validate_actionline): Likewise.
5383 (tfind_1): Likewise.
5384 (get_traceframe_location): Likewise.
5385 (find_matching_tracepoint_location): Likewise.
5386 (parse_tracepoint_status): Likewise.
5387 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5388
5389 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5390
5391 * breakpoint.c (struct longjmp_breakpoint): New struct.
5392 (is_tracepoint_type): Change return type to bool.
5393 (is_longjmp_type): New function.
5394 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5395 (set_raw_breakpoint_without_location): Use
5396 new_breakpoint_from_type.
5397 (set_raw_breakpoint): Likewise.
5398
5399 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5400
5401 * breakpoint.c (new_breakpoint_from_type): New function.
5402 (create_breakpoint_sal): Use new_breakpoint_from_type and
5403 unique_ptr.
5404 (create_breakpoint): Likewise.
5405
5406 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5407
5408 * memattr.c (mem_info_command): Rename to ...
5409 (info_mem_command): ... this.
5410 (mem_enable_command): Rename to ...
5411 (enable_mem_command): ... this.
5412 (mem_disable_command): Rename to ...
5413 (disable_mem_command): ... this.
5414 (mem_delete_command): Rename to ...
5415 (delete_mem_command): ... this.
5416 (_initialize_mem): Adjust function names.
5417
5418 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5419
5420 * btrace.c (handle_pt_insn_events): New.
5421 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5422 STATUS. Split into this and ...
5423 (handle_pt_insn_event_flags): ... this.
5424
5425 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5426
5427 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5428 and struct pt_insn.resynced.
5429 * configure: Regenerated.
5430 * config.in: Regenerated.
5431
5432 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5433
5434 * btrace.c (ftrace_find_call_by_number): New function.
5435 (ftrace_new_function): Store objects, not pointers.
5436 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5437 ftrace_new_gap, ftrace_update_function,
5438 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5439 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5440 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5441 btrace_ends_with_single_insn, btrace_call_get): Account for
5442 btrace_thread_info::functions now storing objects.
5443 * btrace.h (struct btrace_thread_info): Add constructor.
5444 (struct btrace_thread_info) <functions>: Make std::vector.
5445 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5446 Initialize with default values.
5447 * record-btrace.c (record_btrace_frame_sniffer): Account for
5448 btrace_thread_info::functions now storing objects.
5449
5450 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5451
5452 * btrace.c: Remove typedef bfun_s.
5453 (ftrace_new_gap): Directly add gaps to the list of gaps.
5454 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5455 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5456 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5457 instead of gdb VEC.
5458
5459 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5460
5461 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5462 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5463 with btrace_thread_info::next_segment and
5464 btrace_thread_info::prev_segment.
5465 * btrace.h: Remove struct btrace_func_link.
5466 (struct btrace_function): Replace pair of function segment pointers
5467 with pair of indices.
5468 * python/py-record-btrace.c (btpy_call_prev_sibling,
5469 btpy_call_next_sibling): Replace references to
5470 btrace_thread_info::segment with btrace_thread_info::next_segment and
5471 btrace_thread_info::prev_segment.
5472 * record-btrace.c (record_btrace_frame_this_id): Use
5473 btrace_find_call_by_number.
5474
5475 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5476
5477 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5478 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5479 btrace_insn_next, btrace_insn_prev): Remove references to
5480 btrace_thread_info::flow.
5481 * btrace.h (struct btrace_function): Remove FLOW.
5482
5483 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5484
5485 * btrace.c (ftrace_find_call_by_number): New function.
5486 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5487 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5488 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5489 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5490 index.
5491 * btrace.h (struct btrace_function): Turn UP into an index.
5492 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5493 as an index.
5494 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5495 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5496 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5497
5498 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5499
5500 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5501 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5502 ftrace_update_function, ftrace_compute_global_level_offset,
5503 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5504 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5505 btrace_insn_end, btrace_is_empty): Remove references to
5506 btrace_thread_info::begin and btrace_thread_info::end.
5507 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5508 (struct btrace_thread_info) <functions>: Adjust comment.
5509 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5510 btrace_thread_info::begin.
5511
5512 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5513
5514 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5515 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5516 ftrace_update_function): Remove arguments that implicitly were always
5517 BTINFO->END.
5518 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5519 Don't pass BTINFO->END.
5520
5521 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5522
5523 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5524 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5525 btrace_find_insn_by_number): Replace function segment pointer with
5526 index.
5527 (btrace_insn_cmp): Simplify.
5528 * btrace.h: (struct btrace_insn_iterator) Rename index to
5529 insn_index. Replace function segment pointer with index into function
5530 segment vector.
5531 * record-btrace.c (record_btrace_call_history): Replace function
5532 segment pointer use with index.
5533 (record_btrace_frame_sniffer): Retrieve function call segment through
5534 vector.
5535 (record_btrace_set_replay): Remove defunc't safety check.
5536
5537 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5538
5539 * btrace.c (btrace_ends_with_single_insn): New function.
5540 (btrace_call_get, btrace_call_number, btrace_call_begin,
5541 btrace_call_end, btrace_call_next, btrace_call_prev,
5542 btrace_find_call_by_number): Use index into call segment vector
5543 instead of pointer.
5544 (btrace_call_cmp): Simplify.
5545 * btrace.h (struct btrace_call_iterator): Replace function call segment
5546 pointer with index into vector.
5547 * record-btrace.c (record_btrace_call_history): Use index instead of
5548 pointer.
5549
5550 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5551
5552 * btrace.c (btrace_insn_begin, btrace_insn_end,
5553 btrace_find_insn_by_number): Add btinfo to iterator.
5554 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5555
5556 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5557
5558 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5559 and save pointers directly.
5560 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5561 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5562 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5563 changed signature of functions.
5564 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5565 (btrace_fetch): Remove code that adds btrace_function pointers to
5566 vector of btrace_functions.
5567 (btrace_clear): Simplify freeing vector of btrace_functions.
5568
5569 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5570
5571 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5572 Replace VEC_* with std::vector functions.
5573 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5574 (struct btrace_thread_info)<functions>: Change type to std::vector.
5575
5576 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5577
5578 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5579 "Removed targets and native configurations" up. Merge duplicate
5580 "New commands" sub-sections. Add "New options" sub-sections.
5581
5582 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5583
5584 * defs.h (copy_integer_to_size): New declaration.
5585 * findvar.c (copy_integer_to_size): New function.
5586 (do_cint_test): New selftest function.
5587 (copy_integer_to_size_test): Likewise.
5588 (_initialize_findvar): Likewise.
5589 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5590 (mips_fbsd_collect_reg): Use raw_collect_integer.
5591 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5592 (mips64_fill_gregset): Use raw_collect_integer
5593 (mips64_fill_fpregset): Use raw_supply_integer.
5594 * regcache.c (regcache::raw_supply_integer): New function.
5595 (regcache::raw_collect_integer): Likewise.
5596 * regcache.h: (regcache::raw_supply_integer): New declaration.
5597 (regcache::raw_collect_integer): Likewise.
5598
5599 2017-05-24 Yao Qi <yao.qi@linaro.org>
5600
5601 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5602 (COMMON_OBS): Add gdbarch-selftests.o.
5603 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5604 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5605 * gdbarch-selftests.c: New file.
5606 * regcache.h (regcache) <~regcache>: Mark it virtual if
5607 GDB_SELF_TEST.
5608 <raw_write>: Likewise.
5609
5610 2017-05-24 Yao Qi <yao.qi@linaro.org>
5611
5612 * regcache.c (current_regcache): Change it to
5613 regcache::current_regcache.
5614 (regcache_observer_target_changed): Update.
5615 (regcache_thread_ptid_changed): Make it a regcache static
5616 method.
5617 (regcache_thread_ptid_changed): Update.
5618 (class regcache_access): New.
5619 (current_regcache_test): Update.
5620 (_initialize_regcache): Update.
5621 * regcache.h: Include forward_list.
5622 (regcache): Declare regcache_thread_ptid_changed and declare
5623 registers_changed_ptid as friend.
5624
5625 2017-05-24 Yao Qi <yao.qi@linaro.org>
5626
5627 * i387-tdep.c (i387_register_to_value): Use register_size
5628 instead of TYPE_LENGTH.
5629 * m68k-tdep.c (m68k_register_to_value): Likewise.
5630
5631 2017-05-24 Yao Qi <yao.qi@linaro.org>
5632
5633 * i387-tdep.c (i387_convert_register_p): Return false if type
5634 code isn't TYPE_CODE_FLT.
5635
5636 2017-05-24 Yao Qi <yao.qi@linaro.org>
5637
5638 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5639 length is 4.
5640 (alpha_register_to_value): Remove type length check.
5641 (alpha_value_to_register): Likewise.
5642
5643 2017-05-24 Yao Qi <yao.qi@linaro.org>
5644
5645 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5646 TYPE_CODE_FLT.
5647
5648 2017-05-24 Yao Qi <yao.qi@linaro.org>
5649
5650 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5651 TYPE_CODE_FLT or not.
5652
5653 2017-05-24 Yao Qi <yao.qi@linaro.org>
5654
5655 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5656 * avr-tdep.c (avr_gdbarch_init): Likewise.
5657 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5658 * cris-tdep.c (cris_gdbarch_init): Likewise.
5659 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5660 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5661 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5662 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5663 * mep-tdep.c (mep_gdbarch_init): Likewise.
5664 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5665 * mips-tdep.c (mips_gdbarch_init): Likewise.
5666 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5667 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5668 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5669 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5670 * v850-tdep.c (v850_gdbarch_init): Likewise.
5671
5672 2017-05-24 Yao Qi <yao.qi@linaro.org>
5673
5674 * selftest-arch.c (tests_with_arch): Call registers_changed
5675 and reinit_frame_cache.
5676 * selftest.c (run_self_tests): Likewise.
5677
5678 2017-05-24 Yao Qi <yao.qi@linaro.org>
5679
5680 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5681 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5682
5683 2017-05-24 Yao Qi <yao.qi@linaro.org>
5684
5685 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5686 set_gdbarch_print_insn.
5687
5688 2017-05-24 Yao Qi <yao.qi@linaro.org>
5689
5690 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5691 set_gdbarch_print_insn.
5692
5693 2017-05-24 Yao Qi <yao.qi@linaro.org>
5694
5695 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5696 set_gdbarch_print_insn.
5697 * arc-tdep.c (arc_gdbarch_init): Likewise.
5698 * arch-utils.c: include dis-asm.h.
5699 (default_print_insn): New function.
5700 * arch-utils.h (default_print_insn): Declare.
5701 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5702 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5703 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5704 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5705 * frv-tdep.c (frv_gdbarch_init): Likewise.
5706 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5707 * gdbarch.sh (print_insn): Use default_print_insn.
5708 * gdbarch.c: Regenerated.
5709 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5710 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5711 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5712 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5713 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5714 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5715 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5716 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5717 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5718 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5719 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5720 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5721 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5722 * mt-tdep.c (mt_gdbarch_init): Likewise.
5723 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5724 * nios2-tdep.c (nios2_print_insn): Remove.
5725 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5726 * rx-tdep.c (rx_gdbarch_init): Likewise.
5727 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5728 * score-tdep.c (score_print_insn): Remove.
5729 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5730 * sh-tdep.c (sh_gdbarch_init): Likewise.
5731 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5732 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5733 * tic6x-tdep.c (tic6x_print_insn): Remove.
5734 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5735 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5736 * v850-tdep.c (v850_gdbarch_init): Likewise.
5737 * vax-tdep.c (vax_gdbarch_init): Likewise.
5738 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5739 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5740
5741 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5742
5743 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5744 (MIPS_FP0_REGNUM): Remove.
5745 (MIPS_FSR_REGNUM): Remove.
5746 (mips_fbsd_supply_fpregs): Use mips_regnum.
5747 (mips_fbsd_supply_gregs): Likewise.
5748 (mips_fbsd_collect_fpregs): Likewise.
5749 (mips_fbsd_collect_gregs): Likewise.
5750
5751 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5752
5753 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5754 (getpfpregs_supplies): New function.
5755 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5756 getfpregs_supplies.
5757 (mips_fbsd_store_inferior_registers): Likewise.
5758
5759 2017-05-22 Pedro Alves <palves@redhat.com>
5760
5761 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5762 maintainer.
5763
5764 2017-05-22 Alan Hayward <alan.hayward@arm.com>
5765
5766 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5767 (store_register): Likewise.
5768 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5769 (get_decimal_float_return_value): Likewise.
5770 (do_ppc_sysv_return_value): Likewise.
5771 (ppc64_sysv_abi_push_integer): Likewise.
5772 (ppc64_sysv_abi_push_freg): Likewise.
5773 (ppc64_sysv_abi_return_value_base): Likewise.
5774 (ppc64_sysv_abi_return_value): Likewise.
5775 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5776 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5777 * rs6000-nat.c: Likewise.
5778 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5779 (rs6000_value_to_register): Likewise.
5780 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5781
5782 2017-05-21 Tom Tromey <tom@tromey.com>
5783
5784 PR rust/21466:
5785 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5786 arrays as "[T]", not "[T; ]".
5787
5788 2017-05-19 Tom Tromey <tom@tromey.com>
5789
5790 PR rust/21484:
5791 * rust-lang.c (exp_descriptor_rust): New function.
5792 (rust_language_defn): Use it.
5793 * p-lang.c (pascal_language_defn): Update.
5794 * opencl-lang.c (opencl_language_defn): Update.
5795 * objc-lang.c (objc_language_defn): Update.
5796 * m2-lang.c (m2_language_defn): Update.
5797 * language.h (struct language_defn)
5798 <la_watch_location_expression>: New member.
5799 * language.c (unknown_language_defn, auto_language_defn)
5800 (local_language_defn): Update.
5801 * go-lang.c (go_language_defn): Update.
5802 * f-lang.c (f_language_defn): Update.
5803 * d-lang.c (d_language_defn): Update.
5804 * c-lang.h (c_watch_location_expression): Declare.
5805 * c-lang.c (c_watch_location_expression): New function.
5806 (c_language_defn, cplus_language_defn, asm_language_defn)
5807 (minimal_language_defn): Use it.
5808 * breakpoint.c (watch_command_1): Call
5809 la_watch_location_expression.
5810 * ada-lang.c (ada_language_defn): Update.
5811
5812 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5813
5814 PR tui/21482
5815 * gdb_curses.h (NOMACROS): Define.
5816 (NCURSES_NOMACROS): Define.
5817
5818 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5819
5820 PR tui/21482
5821 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5822 arg to char *.
5823 * tui/tui-wingeneral.c (box_win): Likewise.
5824 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5825 (tui_show_source_line): Likewise.
5826 (tui_show_exec_info_content): Likewise.
5827
5828 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5829
5830 * sparc-tdep.c (sparc_structure_return_p)
5831 (sparc_arg_on_registers_p): New functions.
5832 (sparc32_store_arguments): Use them.
5833 * sparc64-tdep.c (sparc64_16_byte_align_p)
5834 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5835 Handle TYPE_CODE_ARRAY.
5836
5837 2017-05-17 Yao Qi <yao.qi@linaro.org>
5838
5839 * cli/cli-decode.c (add_alias_cmd): New function.
5840 * command.h (add_alias_cmd): Declare.
5841 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5842 instead call add_alias_cmd.
5843
5844 2017-05-17 Pedro Alves <palves@redhat.com>
5845
5846 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5847 (nat_makefile_frag): ... this. All references updated.
5848 * configure.ac: Likewise.
5849 * configure.nat: Likewise. Enhance comments.
5850 * configure: Regenerate.
5851
5852 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5853
5854 * procfs.c (procfs_create_inferior): Change prototype to match
5855 definition.
5856
5857 2017-05-13 Eli Zaretskii <eliz@gnu.org>
5858
5859 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5860 C++ compiler warning.
5861
5862 2017-05-12 Tom Tromey <tom@tromey.com>
5863
5864 PR rust/21483:
5865 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5866 recurse, just call value_struct_elt directly.
5867
5868 2017-05-12 Tom Tromey <tom@tromey.com>
5869
5870 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5871 OP_RUST_ARRAY>: Fix.
5872
5873 2017-05-12 Tom Tromey <tom@tromey.com>
5874
5875 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5876
5877 2017-05-09 Yao Qi <yao.qi@linaro.org>
5878
5879 * regcache.c: Include <forward_list>.
5880 (struct regcache_list): Remove.
5881 (current_regcache): Update.
5882 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5883 (regcache_thread_ptid_changed): Likewise.
5884 (registers_changed_ptid): Likewise.
5885 (current_regcache_size): Likewise.
5886
5887 2017-05-09 Yao Qi <yao.qi@linaro.org>
5888
5889 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5890 (current_regcache_size): New function.
5891 (current_regcache_test): New function.
5892 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5893
5894 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5895
5896 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5897 (print_gp_register_row): Use get_frame_register_value.
5898
5899 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5900
5901 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5902 (mips_supply_fpregset): Likewise.
5903 (mips64_supply_gregset): Likewise.
5904
5905 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5906
5907 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5908 regcache->raw_supply_zeroed.
5909
5910 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5911
5912 * configure.nat: Rearrange 'case' statements to match
5913 host before cpu.
5914
5915 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5916
5917 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5918 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5919 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5920 "@nat_extra_makefile_frag@".
5921 (Makefile): Remove dependency on "@frags@".
5922 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5923 (data-directory/Makefile): Likewise.
5924 * config/aarch64/linux.mh: Deleted; moved contents to
5925 "gdb/configure.nat".
5926 * config/alpha/alpha-linux.mh: Likewise.
5927 * config/alpha/nbsd.mh: Likewise.
5928 * config/arm/linux.mh: Likewise.
5929 * config/arm/nbsdelf.mh: Likewise.
5930 * config/i386/cygwin.mh: Likewise.
5931 * config/i386/cygwin64.mh: Likewise.
5932 * config/i386/darwin.mh: Likewise.
5933 * config/i386/fbsd.mh: Likewise.
5934 * config/i386/fbsd64.mh: Likewise.
5935 * config/i386/go32.mh: Likewise.
5936 * config/i386/i386gnu.mh: Likewise.
5937 * config/i386/i386sol2.mh: Likewise.
5938 * config/i386/linux.mh: Likewise.
5939 * config/i386/linux64.mh: Likewise.
5940 * config/i386/mingw.mh: Likewise.
5941 * config/i386/mingw64.mh: Likewise.
5942 * config/i386/nbsd64.mh: Likewise.
5943 * config/i386/nbsdelf.mh: Likewise.
5944 * config/i386/nto.mh: Likewise.
5945 * config/i386/obsd.mh: Likewise.
5946 * config/i386/obsd64.mh: Likewise.
5947 * config/i386/sol2-64.mh: Likewise.
5948 * config/ia64/linux.mh: Likewise.
5949 * config/m32r/linux.mh: Likewise.
5950 * config/m68k/linux.mh: Likewise.
5951 * config/m68k/nbsdelf.mh: Likewise.
5952 * config/m68k/obsd.mh: Likewise.
5953 * config/m88k/obsd.mh: Likewise.
5954 * config/mips/fbsd.mh: Likewise.
5955 * config/mips/linux.mh: Likewise.
5956 * config/mips/nbsd.mh: Likewise.
5957 * config/mips/obsd64.mh: Likewise.
5958 * config/pa/linux.mh: Likewise.
5959 * config/pa/nbsd.mh: Likewise.
5960 * config/pa/obsd.mh: Likewise.
5961 * config/powerpc/aix.mh: Likewise.
5962 * config/powerpc/fbsd.mh: Likewise.
5963 * config/powerpc/linux.mh: Likewise.
5964 * config/powerpc/nbsd.mh: Likewise.
5965 * config/powerpc/obsd.mh: Likewise.
5966 * config/powerpc/ppc64-linux.mh: Likewise.
5967 * config/powerpc/spu-linux.mh: Likewise.
5968 * config/s390/linux.mh: Likewise.
5969 * config/sh/nbsd.mh: Likewise.
5970 * config/sparc/fbsd.mh: Likewise.
5971 * config/sparc/linux.mh: Likewise.
5972 * config/sparc/linux64.mh: Likewise.
5973 * config/sparc/nbsd64.mh: Likewise.
5974 * config/sparc/nbsdelf.mh: Likewise.
5975 * config/sparc/obsd64.mh: Likewise.
5976 * config/sparc/sol2.mh: Likewise.
5977 * config/tilegx/linux.mh: Likewise.
5978 * config/vax/nbsdelf.mh: Likewise.
5979 * config/vax/obsd.mh: Likewise.
5980 * config/xtensa/linux.mh: Likewise.
5981 * config/i386/i386gnu.mn: New file, with excerpts from
5982 "config/i386/i386gnu.mh".
5983 * configure: Regenerate.
5984 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5985 *.mh files under "gdb/config".
5986 * configure.nat: New file, with contents from the
5987 "gdb/config/*/*.mh" files.
5988
5989 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
5990
5991 * btrace.c (btrace_clear): Free insn vector.
5992
5993 2017-05-05 Pedro Alves <palves@redhat.com>
5994
5995 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5996 * configure: Regenerate.
5997
5998 2017-05-04 Pedro Alves <palves@redhat.com>
5999
6000 * Makefile.in (SFILES): Add progspace-and-thread.c.
6001 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6002 (COMMON_OBS): Add progspace-and-thread.o.
6003 * breakpoint.c: Include "progspace-and-thread.h".
6004 (update_inserted_breakpoint_locations)
6005 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6006 Use scoped_restore_current_pspace_and_thread.
6007 (create_std_terminate_master_breakpoint): Use
6008 scoped_restore_current_program_space.
6009 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6010 (print_breakpoint_location): Use
6011 scoped_restore_current_program_space.
6012 (bp_loc_is_permanent): Use
6013 scoped_restore_current_pspace_and_thread.
6014 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6015 (download_tracepoint_locations): Use
6016 scoped_restore_current_pspace_and_thread.
6017 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6018 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6019 (enum step_over_calls_kind): Moved from inferior.h.
6020 (class scoped_restore_current_thread): New class.
6021 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6022 declaration.
6023 (scoped_restore_current_thread): New class.
6024 * infcmd.c: Include "common/gdb_optional.h".
6025 (continue_1, proceed_after_attach): Use
6026 scoped_restore_current_thread.
6027 (notice_new_inferior): Use scoped_restore_current_thread.
6028 * inferior.c: Include "progspace-and-thread.h".
6029 (restore_inferior, save_current_inferior): Delete.
6030 (add_inferior_command, clone_inferior_command): Use
6031 scoped_restore_current_pspace_and_thread.
6032 * inferior.h (scoped_restore_current_inferior): New class.
6033 * infrun.c: Include "progspace-and-thread.h" and
6034 "common/gdb_optional.h".
6035 (follow_fork_inferior): Use
6036 scoped_restore_current_pspace_and_thread.
6037 (scoped_restore_exited_inferior): New class.
6038 (handle_vfork_child_exec_or_exit): Use
6039 scoped_restore_exited_inferior,
6040 scoped_restore_current_pspace_and_thread,
6041 scoped_restore_current_thread and scoped_restore.
6042 (fetch_inferior_event): Use scoped_restore_current_thread.
6043 * linespec.c (decode_line_full, decode_line_1): Use
6044 scoped_restore_current_program_space.
6045 * mi/mi-main.c: Include "progspace-and-thread.h".
6046 (exec_continue): Use scoped_restore_current_thread.
6047 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6048 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6049 * proc-service.c (ps_pglobal_lookup): Use
6050 scoped_restore_current_program_space.
6051 * progspace-and-thread.c: New file.
6052 * progspace-and-thread.h: New file.
6053 * progspace.c (release_program_space, clone_program_space): Use
6054 scoped_restore_current_program_space.
6055 (restore_program_space, save_current_program_space)
6056 (save_current_space_and_thread): Delete.
6057 (switch_to_program_space_and_thread): Moved to
6058 progspace-and-thread.c.
6059 * progspace.h (save_current_program_space)
6060 (save_current_space_and_thread): Delete declarations.
6061 (scoped_restore_current_program_space): New class.
6062 * remote.c (remote_btrace_maybe_reopen): Use
6063 scoped_restore_current_thread.
6064 * symtab.c: Include "progspace-and-thread.h".
6065 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6066 * thread.c (print_thread_info_1): Use
6067 scoped_restore_current_thread.
6068 (struct current_thread_cleanup): Delete.
6069 (do_restore_current_thread_cleanup)
6070 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6071 (scoped_restore_current_thread::~scoped_restore_current_thread):
6072 ... this new dtor.
6073 (make_cleanup_restore_current_thread): Rename/convert to ...
6074 (scoped_restore_current_thread::scoped_restore_current_thread):
6075 ... this new ctor.
6076 (thread_apply_all_command): Use scoped_restore_current_thread.
6077 (thread_apply_command): Use scoped_restore_current_thread.
6078 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6079 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6080
6081 2017-05-04 Pedro Alves <palves@redhat.com>
6082
6083 * thread.c (make_cleanup_restore_current_thread): Move
6084 find_thread_ptid call before the is_stopped call. Assert that the
6085 thread is found. Replace is_stopped call by checking the thread's
6086 state directly. Remove unnecessary NULL-thread check.
6087
6088 2017-05-04 Pedro Alves <palves@redhat.com>
6089
6090 * corelow.c (thread_section_name): New class.
6091 (get_core_register_section, get_core_siginfo): Use it.
6092
6093 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6094
6095 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6096 (get_core_register_section): Remove xfree of NULL pointer.
6097
6098 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6099
6100 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6101 * regcache.c (regcache::raw_supply_zeroed): New function.
6102 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6103
6104 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6105
6106 * gdbarch.sh: Remove commented out definition of
6107 TARGET_CHAR_BIT.
6108 * gdbarch.h: Re-generate.
6109
6110 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6111
6112 * configure: Regenerate.
6113
6114 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6115
6116 * solib-target.c (solib_target_relocate_section_addresses):
6117 Remove num_section_bases, num_bases, segment_bases variables.
6118
6119 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6120
6121 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6122
6123 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6124
6125 * solib-target.c: Include <vector>
6126 (struct lm_info_target) <~lm_info_target>: Remove.
6127 <segment_bases, section_bases>: Change type to
6128 std::vector<CORE_ADDR>.
6129 (library_list_start_segment, library_list_start_section,
6130 library_list_end_library,
6131 solib_target_relocate_section_addresses): Adjust.
6132
6133 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6134
6135 * gdbarch.sh (software_single_step): Change return type to
6136 std::vector<CORE_ADDR>.
6137 * gdbarch.c, gdbarch.h: Re-generate.
6138 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6139 Adjust.
6140 (arm_deal_with_atomic_sequence_raw): Adjust.
6141 (thumb_get_next_pcs_raw): Adjust.
6142 (arm_get_next_pcs_raw): Adjust.
6143 (arm_get_next_pcs): Adjust.
6144 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6145 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6146 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6147 (alpha_software_single_step): Adjust.
6148 * alpha-tdep.h (alpha_software_single_step): Adjust.
6149 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6150 * arm-tdep.c (arm_software_single_step): Adjust.
6151 (arm_breakpoint_kind_from_current_state): Adjust.
6152 * arm-tdep.h (arm_software_single_step): Adjust.
6153 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6154 * cris-tdep.c (cris_software_single_step): Adjust.
6155 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6156 (micromips_deal_with_atomic_sequence): Adjust.
6157 (deal_with_atomic_sequence): Adjust.
6158 (mips_software_single_step): Adjust.
6159 * mips-tdep.h (mips_software_single_step): Adjust.
6160 * moxie-tdep.c (moxie_software_single_step): Adjust.
6161 * nios2-tdep.c (nios2_software_single_step): Adjust.
6162 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6163 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6164 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6165 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6166 * sparc-tdep.c (sparc_software_single_step): Adjust.
6167 * spu-tdep.c (spu_software_single_step): Adjust.
6168 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6169
6170 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6171
6172 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6173 * gdbarch.h: Re-generate.
6174
6175 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6176
6177 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6178 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6179 * python/py-instruction.c, python/py-instruction.h: New file.
6180 * python/py-record.c: Add py-instruction.h include.
6181 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6182 gdb.RecordInstruction.
6183 * python/python-internal.h: Add gdbpy_initialize_instruction
6184 declaration.
6185 * python/python.c (do_start_initialization): Add
6186 gdbpy_initialize_instruction.
6187
6188 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6189
6190 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6191 Remove.
6192 (btrace_func_from_recpy_func): New function.
6193 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6194 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6195 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6196 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6197 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6198 Also, use new helper functions.
6199 (btpy_list_item): Use new helper functions.
6200 (recpy_bt_function_call_history): Use new type name.
6201 (btpy_call_getset): Remove.
6202 (gdbpy_initialize_btrace): Remove code to initialize
6203 gdb.BtraceFunctionCall.
6204 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6205 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6206 recpy_bt_func_prev, recpy_bt_func_next): New export.
6207 * python/py-record.c (recpy_func_type): New static object.
6208 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6209 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6210 recpy_func_next): New function.
6211 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6212 (recpy_func_getset): New static object.
6213 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6214 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6215
6216 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6217
6218 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6219 (btpy_object, btpy_insn_type, btpy_new): Remove.
6220 (btpy_list_object): Use gdb.RecordInstruction type instead of
6221 gdb.BtraceInstruction type.
6222 (btrace_insn_from_recpy_insn): New function.
6223 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6224 btpy_new.
6225 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6226 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6227 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6228 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6229 instead of btpy_object.
6230 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6231 btpy_insn_data, btpy_insn_decode): Rename to ...
6232 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6233 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6234 recpy_bt_insn_decode): This. Also, use new helper functions.
6235 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6236 recpy_insn_type.
6237 (btpy_insn_getset): Remove.
6238 (gdbpy_initialize_btrace): Remove code to initialize
6239 gdb.BtraceInstruction. Use recpy_element_object.
6240 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6241 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6242 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6243 * python/py-record.c (recpy_insn_type): New static object.
6244 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6245 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6246 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6247 New function.
6248 (recpy_insn_getset): New static object.
6249 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6250 * python/py-record.h (recpy_element_object): New typedef.
6251 (recpy_insn_type, recpy_insn_new): New export.
6252
6253 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6254
6255 * py-record-btrace.c (btpy_insn_new): Removed.
6256 (btpy_insn_or_gap_new): New function.
6257 (btpy_insn_error): Removed.
6258 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6259 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6260 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6261 btpy_insn_or_gap_new instead of btpy_insn_new.
6262 (btpy_insn_getset): Remove btpy_insn_error.
6263 * py-record.c (recpy_gap_type): New static object.
6264 (recpy_gap_object): New typedef.
6265 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6266 recpy_gap_reason_string): New function.
6267 (recpy_gap_getset): New static object.
6268 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6269 * py-record.h (recpy_gap_new): New export.
6270
6271 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6272
6273 * python/py-record.c (recpy_ptid): Remove.
6274 (recpy_record_getset): Remove recpy_ptid.
6275
6276 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6277
6278 * btrace.c (btrace_fetch): Set inferior_ptid.
6279 * python/py-record-btrace.c: Add "py-record.h" include.
6280 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6281 recpy_bt_end, recpy_bt_instruction_history,
6282 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6283 in gdb.Record object instead of current ptid.
6284 * python/py-record.c: Include new "py-record.h" file.
6285 (recpy_record_object): Moved to py-record.h.
6286 * python/py-record.h: New file.
6287
6288 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6289
6290 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6291 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6292 indentation.
6293
6294 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6295
6296 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6297 the past maintainers section.
6298
6299 2017-04-28 Yao Qi <yao.qi@linaro.org>
6300
6301 * infcmd.c (get_return_value): Use regcache ctor, and remove
6302 cleanup.
6303
6304 2017-04-28 Yao Qi <yao.qi@linaro.org>
6305 Pedro Alves <palves@redhat.com>
6306
6307 * regcache.c (regcache::regcache): New tag dispatch ctor.
6308 (do_cooked_read): Moved above.
6309 (regcache_dup): Use the tag dispatch ctor..
6310 * regcache.h (regcache): Declare ctor, delete copy ctor and
6311 assignment operator, remove friend regcache_dup.
6312
6313 2017-04-28 Yao Qi <yao.qi@linaro.org>
6314
6315 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6316 call method save instead of regcache_cpy.
6317 * regcache.h (struct regcache): Make regcache_dup a friend.
6318
6319 2017-04-28 Yao Qi <yao.qi@linaro.org>
6320
6321 * regcache.c (struct regcache): Move to regcache.h
6322 (regcache::arch): New method.
6323 (regcache_get_ptid): Update.
6324 (get_regcache_arch): Call arch method.
6325 (get_regcache_aspace): Call method aspace.
6326 (register_buffer): Change it to method.
6327 (regcache_save): Change it to regcache::save.
6328 (regcache_restore): Likewise.
6329 (regcache_cpy_no_passthrough): Remove the declaration.
6330 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6331 (regcache_cpy_no_passthrough): Change it to method
6332 cpy_no_passthrough.
6333 (regcache_register_status): Change it to method
6334 get_register_status.
6335 (regcache_invalidate): Change it to method invalidate.
6336 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6337 (regcache_raw_update): Change it to method raw_update.
6338 (regcache_raw_read): Likewise.
6339 (regcache_raw_read_signed): Likewise.
6340 (regcache_raw_read_unsigned): Likewise.
6341 (regcache_raw_write_signed): Likewise.
6342 (regcache_raw_write_unsigned): Likewise.
6343 (regcache_cooked_read): Likewise.
6344 (regcache_cooked_read_value): Likewise.
6345 (regcache_cooked_read_signed): Likewise.
6346 (regcache_cooked_read_unsigned): Likewise.
6347 (regcache_cooked_write_signed): Likewise.
6348 (regcache_cooked_write_unsigned): Likewise.
6349 (regcache_raw_set_cached_value): Likewise.
6350 (regcache_raw_write): Likewise.
6351 (regcache_cooked_write): Likewise.
6352 (regcache_xfer_part): Likewise.
6353 (regcache_raw_read_part): Likewise.
6354 (regcache_raw_write_part): Likewise.
6355 (regcache_cooked_read_part): Likewise.
6356 (regcache_cooked_write_part): Likewise.
6357 (regcache_raw_supply): Likewise.
6358 (regcache_raw_collect): Likewise.
6359 (regcache_transfer_regset): Likewise.
6360 (regcache_supply_regset): Likewise.
6361 (regcache_collect_regset): Likewise.
6362 (regcache_debug_print_register): Likewise.
6363 (enum regcache_dump_what): Move it to regcache.h.
6364 (regcache_dump): Change it to method dump.
6365 * regcache.h (enum regcache_dump_what): New.
6366 (class regcache): New.
6367 * target.c (target_fetch_registers): Call method
6368 debug_print_register.
6369 (target_store_registers): Likewise.
6370
6371 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6372
6373 * windows-nat.c (struct lm_info_windows): Initialize field.
6374 (windows_make_so): Allocate lm_info_windows with new.
6375 (windows_free_so): Free lm_info_windows with delete.
6376
6377 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6378
6379 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6380 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6381 cleanup.
6382 (darwin_free_so): Free lm_info_darwin with delete.
6383
6384 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6385
6386 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6387 <l_addr_p>: Change type to bool.
6388 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6389 (svr4_free_so): Free lm_info_svr4 with delete.
6390 (svr4_copy_library_list): Replace memcpy with call to copy
6391 constructor.
6392 (library_list_start_library, svr4_default_sos): Allocate
6393 lm_info_svr4 with new.
6394
6395 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6396
6397 * solib-target.c (struct lm_info_target): Add destructor,
6398 initialize fields.
6399 <name>: Change type to std::string.
6400 (library_list_start_library): Allocate lm_info_target with new.
6401 (solib_target_free_library_list): Free lm_info_target with
6402 delete.
6403 (solib_target_current_sos): Adapt to std::string.
6404 (solib_target_free_so): Free lm_info_target with delete.
6405
6406 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6407
6408 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6409 fields.
6410 (frv_current_sos): Allocate lm_info_frv with new.
6411 (frv_relocate_main_executable): Free lm_info_frv with delete,
6412 allocate with new.
6413 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6414
6415 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6416
6417 * solib-frv.c (struct lm_info_frv): Fix indentation.
6418
6419 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6420
6421 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6422 map field.
6423 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6424 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6425 and allocate with new.
6426 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6427
6428 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6429
6430 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6431 <filename, member_name>: Change type to std::string.
6432 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6433 (library_list_start_library): Allocate lm_info_aix with new.
6434 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6435 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6436 with copy constructor.
6437
6438 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6439
6440 * solist.h (struct lm_info): Remove.
6441 (struct lm_info_base): New class.
6442 (struct so_list) <lm_info>: Change type to lm_info_base *.
6443 * nto-tdep.c (struct lm_info): Remove.
6444 (lm_addr): Adjust.
6445 * solib-aix.c (struct lm_info): Rename to ...
6446 (struct lm_info_aix): ... this. Extend lm_info_base.
6447 (lm_info_p): Rename to ...
6448 (lm_info_aix_p): ... this, and adjust.
6449 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6450 solib_aix_parse_libraries, library_list_start_library,
6451 solib_aix_free_library_list, solib_aix_parse_libraries,
6452 solib_aix_get_library_list,
6453 solib_aix_relocate_section_addresses, solib_aix_free_so,
6454 solib_aix_get_section_offsets,
6455 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6456 Adjust.
6457 (struct solib_aix_inferior_data) <library_list>: Adjust.
6458 * solib-darwin.c (struct lm_info): Rename to ...
6459 (struct lm_info_darwin): ... this. Extend lm_info_base.
6460 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6461 * solib-dsbt.c (struct lm_info): Rename to ...
6462 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6463 (struct dsbt_info) <main_executable_lm_info): Adjust.
6464 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6465 dsbt_relocate_section_addresses): Adjust.
6466 * solib-frv.c (struct lm_info): Rename to ...
6467 (struct lm_info_frv): ... this. Extend lm_info_base.
6468 (main_executable_lm_info): Adjust.
6469 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6470 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6471 find_canonical_descriptor_in_load_object,
6472 frv_fdpic_find_canonical_descriptor): Adjust.
6473 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6474 to lm_info_svr4.
6475 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6476 svr4_clear_so, svr4_copy_library_list,
6477 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6478 svr4_current_sos, svr4_fetch_objfile_link_map,
6479 solist_update_incremental): Adjust.
6480 * solib-svr4.h (struct lm_info_svr4): Move here from
6481 solib-svr4.c.
6482 * solib-target.c (struct lm_info): Rename to ...
6483 (struct lm_info_target): ... this. Extend lm_info_base.
6484 (lm_info_p): Rename to ...
6485 (lm_info_target_p): ... this.
6486 (solib_target_parse_libraries, library_list_start_segment,
6487 library_list_start_section, library_list_start_library,
6488 library_list_end_library, solib_target_free_library_list,
6489 solib_target_current_sos, solib_target_free_so,
6490 solib_target_relocate_section_addresses): Adjust.
6491 * windows-nat.c (struct lm_info): Rename to ...
6492 (struct lm_info_windows): ... this. Extend lm_info_base.
6493 (windows_make_so, handle_load_dll, handle_unload_dll,
6494 windows_xfer_shared_libraries): Adjust.
6495
6496 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6497
6498 * solib-darwin.c (struct darwin_so_list): Remove.
6499 (darwin_current_sos): Allocate an so_list object instead of a
6500 darwin_so_list, separately allocate an lm_info object.
6501 (darwin_free_so): Free lm_info.
6502
6503 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6504
6505 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6506 with fprintf_filtered.
6507
6508 2017-04-28 Yao Qi <yao.qi@linaro.org>
6509
6510 * regcache.c (regcache::regcache): New function.
6511 (regcache::~regcache): New function.
6512 (regcache_xmalloc_1): Remove.
6513 (regcache_xmalloc): Call new regcache.
6514 (regcache_xfree): Call delete regcache.
6515 (get_thread_arch_aspace_regcache): Call new regcache.
6516
6517 2017-04-28 Yao Qi <yao.qi@linaro.org>
6518
6519 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6520 lwp instead of ptid_get_lwp.
6521
6522 2017-04-28 Yao Qi <yao.qi@linaro.org>
6523
6524 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6525 lwp_info instead of getting from inferior_ptid.
6526
6527 2017-04-27 Keith Seitz <keiths@redhat.com>
6528
6529 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6530 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6531 (CV_CONVERSION_BADNESS): Define.
6532 (rank_one_type): Remove overly restrictive rvalue reference
6533 rank checks.
6534 Add cv-qualifier checks and subranks for type equality.
6535 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6536 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6537 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6538
6539 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6540
6541 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6542 count when creating the object.
6543
6544 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6545 Ulrich Weigand <uweigand@de.ibm.com>
6546
6547 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6548 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6549 is used in AIX.
6550 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6551 (process_xcoff_symbol): Likewise.
6552 (scan_xcoff_symtab): Likewise.
6553
6554 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6555
6556 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6557 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6558 (ia64_access_reg): Use get_frame_register_unsigned.
6559 (ia64_access_rse_reg): Likewise.
6560 (ia64_libunwind_frame_prev_register): Likewise.
6561
6562 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6563
6564 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6565 * gdbarch.c: Regenerated.
6566 * gdbarch.h: Regenerated.
6567 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6568 visibility external.
6569 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6570 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6571 (enum cfa_how_kind): Move to ...
6572 (struct dwarf2_frame_state_reg_info): Likewise.
6573 (struct dwarf2_frame_state): Likewise.
6574 * dwarf2-frame.h: ... here.
6575 (dwarf2_frame_state_alloc_regs): New declaration.
6576 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6577 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6578
6579 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6580
6581 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6582 regcache_raw_read_unsigned.
6583 (xtensa_pseudo_register_write): Likewise.
6584
6585 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6586
6587 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6588 (nds32_pseudo_register_write): Likewise.
6589
6590 2017-04-25 Yao Qi <yao.qi@linaro.org>
6591
6592 * regcache.c (struct regcache) <readonly_p>: Change its type
6593 to bool.
6594 (regcache_xmalloc_1): Update parameter type and callers update.
6595
6596 2017-04-25 Yao Qi <yao.qi@linaro.org>
6597
6598 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6599 set_gdbarch_wchar_bit.
6600 * arm-tdep.c (arm_gdbarch_init): Likewise.
6601
6602 2017-04-25 Pedro Alves <palves@redhat.com>
6603
6604 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6605 (BothAreRelocatable, memcopy, memmove): Don't define.
6606 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6607 macros.
6608
6609 2017-04-25 Pedro Alves <palves@redhat.com>
6610
6611 * common/common-defs.h: Include "common/poison.h".
6612 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6613 and adjust.
6614 * common/poison.h: New file.
6615 * common/traits.h: Include <type_traits>.
6616 (Not, Or, Requires): New, moved from common/function-view.h.
6617
6618 2017-04-25 Pedro Alves <palves@redhat.com>
6619
6620 * breakpoint.h (struct breakpoint): In-class initialize all
6621 fields. Make boolean fields "bool".
6622 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6623 memset call and initializations no longer necessary.
6624
6625 2017-04-25 Pedro Alves <palves@redhat.com>
6626
6627 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6628 reference.
6629 (pt_btrace_insn): New function.
6630 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6631
6632 2017-04-25 Pedro Alves <palves@redhat.com>
6633
6634 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6635 "base" field and inherit from "bp_location" instead. Add
6636 non-default ctor.
6637 (allocate_location_exception): Use new non-default ctor.
6638 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6639 (init_bp_location): Convert to ...
6640 (bp_location::bp_location): ... this new ctor, and remove memset
6641 call.
6642 (base_breakpoint_allocate_location): Use the new non-default ctor.
6643 * breakpoint.h (bp_location): Now a class. Declare default and
6644 non-default ctors. In-class initialize all members.
6645 (init_bp_location): Remove declaration.
6646
6647 2017-04-25 Pedro Alves <palves@redhat.com>
6648
6649 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6650 assignment operator.
6651
6652 2017-04-24 Yao Qi <yao.qi@linaro.org>
6653
6654 * doublest.c (convert_doublest_to_floatformat): Call
6655 floatformat_totalsize_bytes.
6656
6657 2017-04-22 Tom Tromey <tom@tromey.com>
6658
6659 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6660 ui_out_emit_list.
6661 * stack.c (print_frame): Use ui_out_emit_list.
6662 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6663 ui_out_emit_list.
6664 * mi/mi-main.c (print_one_inferior)
6665 (mi_cmd_data_list_register_names)
6666 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6667 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6668 ui_out_emit_list.
6669 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6670 (mi_output_solib_attribs): Use ui_out_emit_list,
6671 ui_out_emit_tuple.
6672 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6673 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6674 (mi_cmd_stack_list_args, list_args_or_locals): Use
6675 ui_out_emit_list.
6676 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6677 * breakpoint.c (print_solib_event, output_thread_groups): Use
6678 ui_out_emit_list.
6679
6680 2017-04-22 Tom Tromey <tom@tromey.com>
6681
6682 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6683 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6684 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6685
6686 2017-04-22 Tom Tromey <tom@tromey.com>
6687
6688 * tracepoint.c (tvariables_info_1)
6689 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6690
6691 2017-04-22 Tom Tromey <tom@tromey.com>
6692
6693 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6694 annotate_arg_emitter.
6695 * breakpoint.c (print_mention_watchpoint)
6696 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6697 * annotate.h (struct annotate_arg_emitter): New.
6698
6699 2017-04-22 Tom Tromey <tom@tromey.com>
6700
6701 * record-btrace.c (record_btrace_insn_history)
6702 (record_btrace_insn_history_range, record_btrace_call_history)
6703 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6704 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6705 ui_out_emit_tuple.
6706 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6707 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6708 * skip.c (skip_info): Use ui_out_emit_tuple.
6709 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6710 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6711 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6712 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6713 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6714 ui_out_emit_tuple.
6715 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6716 (output_register, mi_cmd_data_read_memory)
6717 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6718 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6719 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6720 Use ui_out_emit_tuple.
6721 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6722 ui_out_emit_tuple.
6723 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6724 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6725 * linux-thread-db.c (info_auto_load_libthread_db): Use
6726 ui_out_emit_tuple.
6727 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6728 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6729 * disasm.c (do_mixed_source_and_assembly_deprecated)
6730 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6731 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6732 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6733 * breakpoint.c (print_one_breakpoint_location)
6734 (print_one_breakpoint): Use ui_out_emit_tuple.
6735 * auto-load.c (print_script, info_auto_load_cmd): Use
6736 ui_out_emit_tuple.
6737 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6738
6739 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6740
6741 * thread.c (print_thread_info_1): Remove dead code.
6742
6743 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6744
6745 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6746 GDB_SELF_TEST.
6747 * arm-tdep.c (selftests::arm_record_test): Likewise.
6748
6749 2017-04-21 Yao Qi <yao.qi@linaro.org>
6750
6751 * regcache.c (regcache_restore): Remove argument 2. Replace
6752 argument 3 with regcache. Get register status from
6753 src->register_status and get register contents from
6754 register_buffer (src, regnum).
6755 (regcache_cpy): Update.
6756
6757 2017-04-19 Pedro Alves <palves@redhat.com>
6758
6759 * gdbthread.h (thread): Add missing closing parenthesis in
6760 comment.
6761
6762 2017-04-19 Pedro Alves <palves@redhat.com>
6763
6764 * common/refcounted-object.h: New file.
6765 * gdbthread.h: Include "common/refcounted-object.h".
6766 (thread_info): Inherit from refcounted_object and add comments.
6767 (thread_info::incref, thread_info::decref)
6768 (thread_info::m_refcount): Delete.
6769 (thread_info::deletable): Use the refcounted_object::refcount()
6770 method.
6771 * inferior.c (current_inferior_): Add comment.
6772 (set_current_inferior): Increment/decrement refcounts.
6773 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6774 not-deletable instead of comparing with the current inferior.
6775 (initialize_inferiors): Increment the initial inferior's refcount.
6776 * inferior.h (struct inferior): Forward declare.
6777 Include "common/refcounted-object.h".
6778 (current_inferior, set_current_inferior): Move declaration to
6779 before struct inferior's definition, and fix comment.
6780 (inferior): Inherit from refcounted_object. Add comments.
6781 * thread.c (switch_to_thread_no_regs): Reference the thread's
6782 inferior pointer directly instead of doing a ptid lookup.
6783 (switch_to_no_thread): New function.
6784 (switch_to_thread(thread_info *)): New function, factored out
6785 from ...
6786 (switch_to_thread(ptid_t)): ... this.
6787 (restore_current_thread): Delete.
6788 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6789 fields, and add 'inf' field.
6790 (do_restore_current_thread_cleanup): Check whether old->inf is
6791 alive instead of looking up an inferior by ptid. Use
6792 switch_to_thread and switch_to_no_thread.
6793 (restore_current_thread_cleanup_dtor): Use old->inf directly
6794 instead of lookup up an inferior by id. Decref the inferior.
6795 Don't restore 'removable'.
6796 (make_cleanup_restore_current_thread): Same the inferior pointer
6797 in old, instead of the inferior number. Incref the inferior.
6798 Don't save/clear 'removable'.
6799
6800 2017-04-19 Pedro Alves <palves@redhat.com>
6801
6802 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6803 unittests/scoped_restore-selftests.c.
6804 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6805 * common/scoped_restore.h (scoped_restore_base): Make "class".
6806 (scoped_restore_base::release): New public method.
6807 (scoped_restore_base::scoped_restore_base): New protected ctor.
6808 (scoped_restore_base::m_saved_var): New protected field.
6809 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6810 scoped_restore_base base class instead of m_saved_var directly.
6811 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6812 (scoped_restore_tmpl::scoped_restore_tmpl(const
6813 scoped_restore_tmpl<T>&)): Likewise.
6814 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6815 method.
6816 (scoped_restore_tmpl::saved_var): New method.
6817 (scoped_restore_tmpl::m_saved_var): Delete.
6818 * inferior.h (inferior::detaching): Now a bool.
6819 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6820 cleanup.
6821 * unittests/scoped_restore-selftests.c: New file.
6822
6823 2017-04-19 Pedro Alves <palves@redhat.com>
6824
6825 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6826 Re-sort in alphabetic order.
6827
6828 2017-04-18 Pedro Alves <palves@redhat.com>
6829
6830 * xml-support.c (obstack_xml_printf): Delete.
6831 * xml-support.h (obstack_xml_printf): Delete.
6832
6833 2017-04-18 Pedro Alves <palves@redhat.com>
6834
6835 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6836 vdebug, verror, body_text, start_element, end_element, name,
6837 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6838 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6839 is_xinclude>: Make private and add m_ prefix.
6840 (gdb_xml_parser::body_text): New method, based on ...
6841 (gdb_xml_body_text): ... this. Adjust.
6842 (gdb_xml_parser::vdebug): New method, based on ...
6843 (gdb_xml_debug): ... this. Adjust.
6844 (gdb_xml_parser::verror): New method, based on ...
6845 (gdb_xml_error): ... this. Adjust.
6846 (gdb_xml_parser::start_element): New method, based on ...
6847 (gdb_xml_start_element): ... this. Adjust.
6848 (gdb_xml_start_element_wrapper): Defer to
6849 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6850 (gdb_xml_parser::end_element): New method, based on ...
6851 (gdb_xml_end_element_wrapper): ... this. Adjust.
6852 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6853 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6854 (gdb_xml_parser::use_dtd): New method, based on ...
6855 (gdb_xml_use_dtd): ... this. Adjust.
6856 (gdb_xml_parser::parse): New method, based on ...
6857 (gdb_xml_parse): ... this. Adjust.
6858 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6859 (xinclude_start_include): Adjust to call the parser's name method.
6860 (xml_xinclude_default, xml_xinclude_start_doctype)
6861 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6862 method.
6863 (xml_process_xincludes): Adjust to call parser methods.
6864 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6865 declarations.
6866
6867 2017-04-18 Pedro Alves <palves@redhat.com>
6868
6869 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6870 gdb::optional<std::string>.
6871 * xml-support.c: Include <string>.
6872 (scope_level::scope_level(scope_level &&))
6873 (scope_level::~scope_level): Delete.
6874 (scope_level::body): Now a std::string.
6875 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6876 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6877 parameter.
6878 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6879 (xinclude_parsing_data::output): Now a std::string reference.
6880 (xinclude_start_include): Adjust.
6881 (xml_xinclude_default): Adjust.
6882 (xml_process_xincludes): Add 'output' parameter, and return bool.
6883 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6884 and return bool.
6885 * xml-tdesc.c: Include <unordered_map> and <string>.
6886 (tdesc_xml_cache): Delete.
6887 (tdesc_xml_cache_s): Delete.
6888 (xml_cache): Now an std::unordered_map.
6889 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6890 (target_fetch_description_xml): Change return type to
6891 gdb::optional<std::string>, and adjust.
6892 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6893 (target_fetch_description_xml): Change return type to
6894 gdb::optional<std::string>.
6895
6896 2017-04-18 Pedro Alves <palves@redhat.com>
6897
6898 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6899 unittests/optional-selftests.c.
6900 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6901 * unittests/optional-selftests.c: New file.
6902 * unittests/optional/assignment/1.cc: New file.
6903 * unittests/optional/assignment/2.cc: New file.
6904 * unittests/optional/assignment/3.cc: New file.
6905 * unittests/optional/assignment/4.cc: New file.
6906 * unittests/optional/assignment/5.cc: New file.
6907 * unittests/optional/assignment/6.cc: New file.
6908 * unittests/optional/assignment/7.cc: New file.
6909 * unittests/optional/cons/copy.cc: New file.
6910 * unittests/optional/cons/default.cc: New file.
6911 * unittests/optional/cons/move.cc: New file.
6912 * unittests/optional/cons/value.cc: New file.
6913 * unittests/optional/in_place.cc: New file.
6914 * unittests/optional/observers/1.cc: New file.
6915 * unittests/optional/observers/2.cc: New file.
6916
6917 2017-04-18 Pedro Alves <palves@redhat.com>
6918
6919 * common/gdb_optional.h: Include common/traits.h.
6920 (in_place_t): New type.
6921 (in_place): New constexpr variable.
6922 (optional::optional): Remove member initialization of
6923 m_instantiated.
6924 (optional::optional(in_place_t...)): New constructor.
6925 (optional::~optional): Use reset.
6926 (optional::optional(const optional&)): New.
6927 (optional::optional(const optional&&)): New.
6928 (optional::optional(T &)): New.
6929 (optional::optional(T &&)): New.
6930 (operator::operator=(const optional &)): New.
6931 (operator::operator=(optional &&)): New.
6932 (operator::operator= (const T &))
6933 (operator::operator= (T &&))
6934 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6935 (operator::reset): New.
6936 (operator::m_instantiated):: Add in-class initializer.
6937 * common/traits.h: Include <type_traits>.
6938 (struct And): New types.
6939
6940 2017-04-18 Pedro Alves <palves@redhat.com>
6941
6942 * xml-support.c: Include <vector>.
6943 (scope_level::scope_level(const gdb_xml_element *))
6944 (scope_level::scope_level(scope_level&&)): New.
6945 (scope_level::~scope_level): New.
6946 (scope_level_s): Delete.
6947 (gdb_xml_parser::scopes): Now a std::vector.
6948 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6949 Use std::vector.
6950 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6951 scope cleanup code.
6952 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6953 of the scopes member. Use std::vector::emplace_back.
6954
6955 2017-04-18 Pedro Alves <palves@redhat.com>
6956
6957 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6958 a bool.
6959 (gdb_xml_end_element): Change type of first parameter.
6960 (gdb_xml_cleanup): Rename to ...
6961 (gdb_xml_parser::~gdb_xml_parser): ... this.
6962 (gdb_xml_create_parser_and_cleanup): Delete with ...
6963 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6964 to this new ctor.
6965 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6966 using gdb_xml_create_parser_and_cleanup.
6967 (xinclude_parsing_data): Add ctor/dtor.
6968 (xml_xinclude_cleanup): Delete.
6969 (xml_process_xincludes): Create a local xinclude_parsing_data
6970 instead of heap-allocating one. Create a local gdb_xml_parser
6971 instead of heap-allocating one with
6972 gdb_xml_create_parser_and_cleanup.
6973
6974 2017-04-18 John Baldwin <jhb@FreeBSD.org>
6975
6976 PR threads/20743
6977 * fbsd-nat.c (resume_one_thread_cb): Remove.
6978 (resume_all_threads_cb): Remove.
6979 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6980 iterate_over_threads.
6981
6982 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6983
6984 * NEWS: Create a new section for the next release branch.
6985 Rename the section of the current branch, now that it has
6986 been cut.
6987
6988 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6989
6990 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6991 * version.in: Bump version to 8.0.50.DATE-git.
6992
6993 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
6994
6995 PR gdb/21385
6996 * windows-nat.c (windows_create_inferior): Declare 'allargs'
6997 independently of the host, and fix build breakage on Cygwin.
6998
6999 2017-04-13 Pedro Alves <palves@redhat.com>
7000
7001 * inferior.c (free_inferior): Convert to ...
7002 (inferior::~inferior): ... this dtor.
7003 (inferior::inferior): New ctor, factored out from ...
7004 (add_inferior_silent): ... here. Allocate the inferior with a new
7005 expression.
7006 (delete_inferior): Call delete instead of free_inferior.
7007 * inferior.h (gdb_environ, continuation): Forward declare.
7008 (inferior): Now a class. Add in-class initialization to all
7009 members. Make boolean fields bool, except 'detaching'.
7010 (inferior::inferior): New explicit ctor.
7011 (inferior::~inferior): New.
7012
7013 2017-04-13 Pedro Alves <palves@redhat.com>
7014
7015 * inferior.c (init_inferior_list): Delete.
7016 * inferior.h (init_inferior_list): Delete.
7017
7018 2017-04-13 Pedro Alves <palves@redhat.com>
7019
7020 PR threads/13217
7021 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7022 (top level): Call it twice, with different thread sets.
7023
7024 2017-04-13 Pedro Alves <palves@redhat.com>
7025
7026 * thread.c: Include <algorithm>.
7027 (thread_array_cleanup): Delete.
7028 (scoped_inc_dec_ref): New class.
7029 (live_threads_count): New function.
7030 (set_thread_refcount): Delete.
7031 (tp_array_compar_ascending): Now a bool.
7032 (tp_array_compar): Convert to a std::sort comparison function.
7033 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7034 and live_threads_count.
7035
7036 2017-04-13 Pedro Alves <palves@redhat.com>
7037
7038 * infrun.c (follow_fork_inferior): Also switch the current
7039 inferior.
7040
7041 2017-04-13 Pedro Alves <palves@redhat.com>
7042
7043 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7044 before calling create_internal_breakpoint.
7045
7046 2017-04-13 Pedro Alves <palves@redhat.com>
7047
7048 * fork-child.c (execv_argv): New class.
7049 (breakup_args): Refactored as ...
7050 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7051 Copy arguments to storage and replace separators with NULL
7052 terminators in place.
7053 (escape_bang_in_quoted_argument): Adjust to return bool.
7054 (execv_argv::execv_argv): New ctor.
7055 (execv_argv::init_for_shell): New method, factored out from
7056 fork_inferior. Don't strdup strings into the vector.
7057 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7058 Remove free_vector_argv call.
7059
7060 2017-04-13 Yao Qi <yao.qi@linaro.org>
7061
7062 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7063 tdep->rx_psw_type.
7064
7065 2017-04-13 Yao Qi <yao.qi@linaro.org>
7066
7067 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7068 * rx-tdep.c (rx_gdbarch_init): Likewise.
7069
7070 2017-04-13 Pedro Alves <palves@redhat.com>
7071
7072 * breakpoint.h (struct breakpoint): Reindent.
7073
7074 2017-04-13 Pedro Alves <palves@redhat.com>
7075
7076 * breakpoint.c (bp_location): Rename to ...
7077 (bp_locations): ... this. All references updated.
7078 (bp_location_count): Rename to ...
7079 (bp_locations_count): ... this. All references updated.
7080 (bp_location_placed_address_before_address_max): Rename to ...
7081 (bp_locations_placed_address_before_address_max): ... this. All
7082 references updated.
7083 (bp_location_shadow_len_after_address_max): Rename to ...
7084 (bp_locations_shadow_len_after_address_max): ... this. All
7085 references updated.
7086 (bp_location_compare_addrs): Rename to ...
7087 (bp_locations_compare_addrs): ... this. All references updated.
7088 (bp_location_compare):Rename to ...
7089 (bp_locations_compare): ... this. All references updated.
7090 (bp_location_target_extensions_update): Rename to ...
7091 (bp_locations_target_extensions_update): ... this. All references
7092 updated.
7093
7094 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7095
7096 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7097 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7098 'sgtty.h'.
7099 * common/gdb_termios.h: New file, with parts of "terminal.h".
7100 * inflow.c: Include "gdb_termios.h".
7101 * ser-unix.c: Include "gdb_termios.h".
7102 * terminal.h: Move terminal-related defines to
7103 "common/gdb_termios.h".
7104
7105 2017-04-12 Tom Tromey <tom@tromey.com>
7106
7107 * probe.c (parse_probes): Update.
7108 * location.h (delete_event_location): Don't declare.
7109 (event_location_deleter::operator()): Update.
7110 * location.c (event_location_deleter::operator()): Rename from
7111 delete_event_location.
7112 * linespec.h (linespec_result) <location>: Change type to
7113 event_location_up.
7114 * linespec.c (canonicalize_linespec, event_location_to_sals)
7115 (decode_objc): Update.
7116 (linespec_result): Don't call delete_event_location.
7117 * breakpoint.c (create_breakpoints_sal)
7118 (bkpt_probe_create_sals_from_location)
7119 (strace_marker_create_sals_from_location): Update.
7120
7121 2017-04-12 Tom Tromey <tom@tromey.com>
7122
7123 * linespec.h (struct linespec_result): Add constructor and
7124 destructor.
7125 (init_linespec_result, destroy_linespec_result)
7126 (make_cleanup_destroy_linespec_result): Don't declare.
7127 * linespec.c (init_linespec_result): Remove.
7128 (linespec_result::~linespec_result): Rename from
7129 destroy_linespec_result. Update.
7130 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7131 Remove.
7132 * breakpoint.c (create_breakpoint, break_range_command)
7133 (decode_location_default): Update.
7134 * ax-gdb.c (agent_command_1): Update.
7135
7136 2017-04-12 Tom Tromey <tom@tromey.com>
7137
7138 * remote.c (remote_download_tracepoint): Update.
7139 * python/py-breakpoint.c (bppy_get_location): Update.
7140 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7141 (gdbscm_breakpoint_location): Update.
7142 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7143 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7144 Change type to event_location_up.
7145 * breakpoint.c (create_overlay_event_breakpoint)
7146 (create_longjmp_master_breakpoint)
7147 (create_std_terminate_master_breakpoint)
7148 (create_exception_master_breakpoint)
7149 (breakpoint_event_location_empty_p, print_breakpoint_location)
7150 (print_one_breakpoint_location, create_thread_event_breakpoint)
7151 (init_breakpoint_sal, create_breakpoint)
7152 (print_recreate_ranged_breakpoint, break_range_command)
7153 (init_ada_exception_breakpoint, say_where): Update.
7154 (base_breakpoint_dtor): Don't call delete_event_location.
7155 (bkpt_print_recreate, tracepoint_print_recreate)
7156 (dprintf_print_recreate, update_static_tracepoint)
7157 (breakpoint_re_set_default): Update.
7158
7159 2017-04-12 Tom Tromey <tom@tromey.com>
7160
7161 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7162 type of "to_do". Update.
7163 (compute_stack_depth): Use std::vector.
7164
7165 2017-04-12 Tom Tromey <tom@tromey.com>
7166
7167 * printcmd.c (find_instruction_backward): Use std::vector.
7168
7169 2017-04-12 Tom Tromey <tom@tromey.com>
7170
7171 * symfile.c (objfilep): Remove typedef.
7172 (reread_symbols): Use a std::vector.
7173
7174 2017-04-12 Tom Tromey <tom@tromey.com>
7175
7176 * mi/mi-main.c (exec_direction_forward): Remove.
7177 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7178 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7179 scoped_restore.
7180 * guile/guile.c (guile_repl_command, guile_command)
7181 (gdbscm_execute_gdb_command): Use scoped_restore.
7182 * go-exp.y (go_parse): Use scoped_restore.
7183 * d-exp.y (d_parse): Use scoped_restore.
7184 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7185 * c-exp.y (c_parse): Use scoped_restore.
7186
7187 2017-04-12 Tom Tromey <tom@tromey.com>
7188
7189 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7190 (mi_parse): Update return type.
7191 (mi_parse_free): Remove.
7192 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7193 (mi_parse::~mi_parse): Rename from mi_parse_free.
7194 (mi_parse_cleanup): Remove.
7195 (mi_parse): Return a unique_ptr. Use new.
7196 * mi/mi-main.c (mi_execute_command): Update.
7197
7198 2017-04-12 Tom Tromey <tom@tromey.com>
7199
7200 * location.c (explicit_location_lex_one): Return a
7201 unique_xmalloc_ptr.
7202 (string_to_explicit_location): Update. Remove cleanups.
7203
7204 2017-04-12 Tom Tromey <tom@tromey.com>
7205
7206 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7207 (compare_value_and_voffset): Change type. Update.
7208 (compute_vtable_size): Change type of "offset_vec".
7209 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7210 (gnuv3_get_typeid): Remove extraneous declaration.
7211
7212 2017-04-12 Tom Tromey <tom@tromey.com>
7213
7214 * charset.h (wchar_iterator): Fix comment.
7215
7216 2017-04-12 Tom Tromey <tom@tromey.com>
7217
7218 * charset.c (iconv_wrapper): New class.
7219 (cleanup_iconv): Remove.
7220 (convert_between_encodings): Use it.
7221
7222 2017-04-12 Tom Tromey <tom@tromey.com>
7223
7224 * symfile.h (increment_reading_symtab): Update type.
7225 * symfile.c (decrement_reading_symtab): Remove.
7226 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7227 * psymtab.c (psymtab_to_symtab): Update.
7228 * dwarf2read.c (dw2_instantiate_symtab): Update.
7229
7230 2017-04-12 Tom Tromey <tom@tromey.com>
7231
7232 * jit.c (struct jit_reader): Declare separately. Add constructor
7233 and destructor. Change type of "handle".
7234 (loaded_jit_reader): Define separately.
7235 (jit_reader_load): Update. New "new".
7236 (jit_reader_unload_command): Use "delete".
7237 * gdb-dlfcn.h (struct dlclose_deleter): New.
7238 (gdb_dlhandle_up): New typedef.
7239 (gdb_dlopen, gdb_dlsym): Update types.
7240 (gdb_dlclose): Remove.
7241 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7242 (gdb_dlsym): Change type of "handle".
7243 (make_cleanup_dlclose): Remove.
7244 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7245 * compile/compile-c-support.c (load_libcc): Update.
7246
7247 2017-04-12 Tom Tromey <tom@tromey.com>
7248
7249 * symtab.h (find_pcs_for_symtab_line): Change return type.
7250 * symtab.c (find_pcs_for_symtab_line): Change return type.
7251 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7252 type of "vec". Update.
7253 (ltpy_get_pcs_for_line): Update.
7254 * linespec.c (decode_digits_ordinary): Update.
7255
7256 2017-04-12 Tom Tromey <tom@tromey.com>
7257
7258 * tracepoint.c (actions_command): Update.
7259 * python/python.c (python_command, python_interactive_command):
7260 Update.
7261 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7262 * guile/guile.c (guile_command): Update.
7263 * defs.h (read_command_lines, read_command_lines_1): Return
7264 command_line_up.
7265 (command_lines_deleter): New struct.
7266 (command_line_up): New typedef.
7267 * compile/compile.c (compile_code_command)
7268 (compile_print_command): Update.
7269 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7270 command_line_up.
7271 (make_cleanup_free_command_lines): Remove.
7272 * cli/cli-script.c (get_command_line, read_command_lines_1)
7273 (copy_command_lines): Return command_line_up.
7274 (while_command, if_command, read_command_lines, define_command)
7275 (document_command): Update.
7276 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7277 Remove.
7278 * breakpoint.h (breakpoint_set_commands): Change type of
7279 "commands".
7280 * breakpoint.c (breakpoint_set_commands): Change type of
7281 "commands". Update.
7282 (do_map_commands_command, update_dprintf_command_list)
7283 (create_tracepoint_from_upload): Update.
7284
7285 2017-04-12 Tom Tromey <tom@tromey.com>
7286
7287 * tracepoint.c (scope_info): Update.
7288 * spu-tdep.c (spu_catch_start): Update.
7289 * python/python.c (gdbpy_decode_line): Update.
7290 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7291 * python/py-breakpoint.c (bppy_init): Update.
7292 * probe.c (parse_probes): Update.
7293 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7294 * location.h (event_location_deleter): New struct.
7295 (event_location_up): New typedef.
7296 (new_linespec_location, new_address_location, new_probe_location)
7297 (new_explicit_location, copy_event_location)
7298 (string_to_event_location, string_to_event_location_basic)
7299 (string_to_explicit_location): Update return type.
7300 (make_cleanup_delete_event_location): Remove.
7301 * location.c (new_linespec_location, new_address_location)
7302 (new_probe_location, new_explicit_location, copy_event_location):
7303 Return event_location_up.
7304 (delete_event_location_cleanup)
7305 (make_cleanup_delete_event_location): Remove.
7306 (string_to_explicit_location, string_to_event_location_basic)
7307 (string_to_event_location): Return event_location_up.
7308 * linespec.c (canonicalize_linespec, event_location_to_sals)
7309 (decode_line_with_current_source)
7310 (decode_line_with_last_displayed, decode_objc): Update.
7311 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7312 * completer.c (location_completer): Update.
7313 * cli/cli-cmds.c (edit_command, list_command): Update.
7314 * breakpoint.c (create_overlay_event_breakpoint)
7315 (create_longjmp_master_breakpoint)
7316 (create_std_terminate_master_breakpoint)
7317 (create_exception_master_breakpoint)
7318 (create_thread_event_breakpoint): Update.
7319 (init_breakpoint_sal): Update. Remove some dead code.
7320 (create_breakpoint_sal): Change type of "location". Update.
7321 (create_breakpoints_sal, create_breakpoint, break_command_1)
7322 (dprintf_command, break_range_command, until_break_command)
7323 (init_ada_exception_breakpoint)
7324 (strace_marker_create_sals_from_location)
7325 (update_static_tracepoint, trace_command, ftrace_command)
7326 (strace_command, create_tracepoint_from_upload): Update.
7327 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7328 * ax-gdb.c (agent_command_1): Update.
7329
7330 2017-04-12 Pedro Alves <palves@redhat.com>
7331
7332 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7333 * configure.tgt: Handle i[34567]86-*-go32* and
7334 i[34567]86-*-msdosdjgpp*.
7335 * i386-tdep.c (i386_svr4_reg_to_regnum):
7336 Make extern.
7337 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7338 i386-go32-tdep.c.
7339 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7340 * i386-go32-tdep.c: New file.
7341 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7342 declarations.
7343
7344 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7345
7346 * aix-thread.c (pd_status2str): Change return type to const char *.
7347
7348 2017-04-12 Pedro Alves <palves@redhat.com>
7349
7350 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7351 calls to set_gdbarch_gnu_triplet_regexp.
7352
7353 2017-04-12 Pedro Alves <palves@redhat.com>
7354
7355 PR gdb/21323
7356 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7357 New enum value.
7358 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7359 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7360 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7361 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7362 * gdbarch.h, gdbarch.c: Regenerate.
7363 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7364 gdbarch_wchar_bit and gdbarch_wchar_signed.
7365 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7366 * arm-tdep.c (arm_gdbarch_init): Likewise.
7367 * avr-tdep.c (avr_gdbarch_init): Likewise.
7368 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7369 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7370 * i386-tdep.c (i386_go32_init_abi): Likewise.
7371 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7372 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7373 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7374 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7375 * sh-tdep.c (sh_gdbarch_init): Likewise.
7376 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7377 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7378 * windows-tdep.c (windows_init_abi): Likewise.
7379 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7380
7381 2017-04-12 Pedro Alves <palves@redhat.com>
7382
7383 PR c++/21323
7384 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7385 cplus_primitive_type_char32_t>: New enum values.
7386 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7387 and cplus_primitive_type_char32_t.
7388 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7389 32, use the archtecture's built-in type for char16_t and char32_t,
7390 respectively. Otherwise, fallback to init_integer_type as before,
7391 but make the type unsigned, and issue a complaint.
7392 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7393
7394 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7395
7396 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7397 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7398
7399 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7400
7401 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7402 'const char *'.
7403
7404 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7405
7406 * common/common-utils.c (free_vector_argv): New function.
7407 * common/common-utils.h: Include <vector>.
7408 (free_vector_argv): New prototype.
7409 * darwin-nat.c (darwin_create_inferior): Rewrite function
7410 prototype in order to constify "exec_file" and accept a
7411 "std::string" for "allargs".
7412 * fork-child.c: Include <vector>.
7413 (breakup_args): Rewrite function, using C++.
7414 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7415 and accept "std::string" for "allargs". Update the code to
7416 calculate "argv" based on "allargs". Update calls to "exec_fun"
7417 and "execvp".
7418 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7419 order to constify "exec_file" and accept a "std::string" for
7420 "allargs".
7421 * go32-nat.c (go32_create_inferior): Likewise.
7422 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7423 * infcmd.c (run_command_1): Constify "exec_file". Use
7424 "std::string" for inferior arguments.
7425 * inferior.h (fork_inferior): Update prototype.
7426 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7427 prototype in order to constify "exec_file" and accept a
7428 "std::string" for "allargs".
7429 * nto-procfs.c (procfs_create_inferior): Likewise.
7430 * procfs.c (procfs_create_inferior): Likewise.
7431 * remote-sim.c (gdbsim_create_inferior): Likewise.
7432 * remote.c (extended_remote_run): Update code to accept
7433 "std::string" as argument.
7434 (extended_remote_create_inferior): Rewrite function prototype in
7435 order to constify "exec_file" and accept a "std::string" for
7436 "allargs".
7437 * rs6000-nat.c (super_create_inferior): Likewise.
7438 (rs6000_create_inferior): Likewise.
7439 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7440 * windows-nat.c (windows_create_inferior): Likewise.
7441
7442 2017-04-11 Pedro Alves <palves@redhat.com>
7443
7444 * thread.c: Fix whitespace throughout.
7445
7446 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7447
7448 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7449
7450 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7451
7452 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7453
7454 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7455
7456 PR gdb/21364
7457 * osdata.c (info_osdata): Check if 'type' is an empty string
7458 instead of NULL.
7459
7460 2017-04-10 Pedro Alves <palves@redhat.com>
7461
7462 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7463 (ptid_to_global_thread_id, in_thread_list)
7464 (do_captured_list_thread_ids, set_resumed, set_running)
7465 (set_executing, set_stop_requested, finish_thread_state)
7466 (validate_registers_access, can_access_registers_ptid)
7467 (print_thread_info_1, switch_to_thread)
7468 (do_restore_current_thread_cleanup)
7469 (make_cleanup_restore_current_thread, thread_command)
7470 (thread_name_command): Use operator== instead of ptid_equal.
7471
7472 2017-04-10 Pedro Alves <palves@redhat.com>
7473
7474 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7475 (current_thread_cleanup_chain): Delete.
7476 (restore_current_thread_cleanup_dtor)
7477 (make_cleanup_restore_current_thread): Remove references to
7478 current_thread_cleanup_chain.
7479
7480 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7481
7482 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7483 REG_UNKNOWN.
7484
7485 2017-04-10 Yao Qi <yao.qi@linaro.org>
7486
7487 PR gdb/19942
7488 * gdbthread.h (thread_info::deletable): New method.
7489 (thread_info::incref): New method.
7490 (thread_info::decref): New method.
7491 (thread_info::refcount): Move it to private.
7492 * infrun.c (save_stop_context): Call inc_refcount.
7493 (release_stop_context_cleanup): Likewise.
7494 * thread.c (set_thread_exited): New function.
7495 (init_thread_list): Delete "tp" only it is deletable, otherwise
7496 call set_thread_exited.
7497 (delete_thread_1): Call set_thread_exited.
7498 (current_thread_cleanup) <inferior_pid>: Remove.
7499 <thread>: New field.
7500 (restore_current_thread_ptid_changed): Removed.
7501 (do_restore_current_thread_cleanup): Adjust.
7502 (restore_current_thread_cleanup_dtor): Don't call
7503 find_thread_ptid.
7504 (set_thread_refcount): Use dec_refcount.
7505 (make_cleanup_restore_current_thread): Adjust.
7506 (thread_apply_all_command): Call inc_refcount.
7507 (_initialize_thread): Don't call
7508 observer_attach_thread_ptid_changed.
7509
7510 2017-04-10 Yao Qi <yao.qi@linaro.org>
7511
7512 * thread.c (delete_thread_1): Hoist code on marking thread as
7513 exited.
7514
7515 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7516
7517 * windows-nat.c (windows_detach): Initialize ptid with
7518 minus_one_ptid.
7519
7520 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7521
7522 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7523
7524 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7525
7526 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7527 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7528 (bfin_pseudo_register_write): Likewise
7529
7530 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7531
7532 * common/ptid.h (struct ptid): Change to...
7533 (class ptid_t): ... this.
7534 <ptid_t>: New constructors.
7535 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7536 matches>: New methods.
7537 <make_null, make_minus_one>: New static methods.
7538 <pid>: Rename to...
7539 <m_pid>: ...this.
7540 <lwp>: Rename to...
7541 <m_lwp>: ...this.
7542 <tid>: Rename to...
7543 <m_tid>: ...this.
7544 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7545 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7546 as references, move comment to class ptid_t.
7547 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7548 ptid_t static methods.
7549 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7550 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7551 Take ptid arguments as references, implement using ptid_t methods.
7552 * unittests/ptid-selftests.c: New file.
7553 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7554 unittests/ptid-selftests.c.
7555 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7556
7557 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7558
7559 * python/python.c (python_run_simple_file): Cast mode literal to
7560 non-const char pointer as expected by PyFile_FromString.
7561
7562 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7563
7564 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7565 minus_one_ptid and null_ptid.
7566
7567 2017-04-05 Pedro Alves <palves@redhat.com>
7568
7569 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7570 * configure: Regenerate.
7571
7572 2017-04-05 Pedro Alves <palves@redhat.com>
7573
7574 * ada-exp.y (yyerror): Constify.
7575 * ada-lang.c (bound_name, get_selections)
7576 (ada_variant_discrim_type)
7577 (ada_variant_discrim_name, ada_value_struct_elt)
7578 (ada_lookup_struct_elt_type, is_unchecked_variant)
7579 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7580 (catch_ada_exception_command_split)
7581 (catch_ada_assert_command_split, catch_assert_command)
7582 (ada_op_name): Constify.
7583 * ada-lang.h (ada_yyerror, get_selections)
7584 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7585 * arc-tdep.c (arc_print_frame_cache): Constify.
7586 * arm-tdep.c (arm_skip_stub): Constify.
7587 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7588 (gen_aggregate_elt_ref): Constify.
7589 * bcache.c (print_bcache_statistics): Constify.
7590 * bcache.h (print_bcache_statistics): Constify.
7591 * break-catch-throw.c (catch_exception_command_1):
7592 * breakpoint.c (struct ep_type_description::description):
7593 Constify.
7594 (add_solib_catchpoint): Constify.
7595 (catch_fork_command_1): Add cast.
7596 (add_catch_command): Constify.
7597 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7598 Constify.
7599 * bsd-uthread.c (bsd_uthread_state): Constify.
7600 * buildsym.c (patch_subfile_names): Constify.
7601 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7602 Constify.
7603 * c-exp.y (yyerror): Constify.
7604 (token::oper): Constify.
7605 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7606 * c-varobj.c (cplus_describe_child): Constify.
7607 * charset.c (find_charset_names): Add cast.
7608 (find_charset_names): Constify array and add const_cast.
7609 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7610 (edit_command): Constify.
7611 * cli/cli-decode.c (lookup_cmd): Constify.
7612 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7613 Constify.
7614 (struct dump_context): Constify.
7615 (add_dump_command, restore_command): Constify.
7616 * cli/cli-script.c (get_command_line): Constify.
7617 * cli/cli-script.h (get_command_line): Constify.
7618 * cli/cli-utils.c (check_for_argument): Constify.
7619 * cli/cli-utils.h (check_for_argument): Constify.
7620 * coff-pe-read.c (struct read_pe_section_data): Constify.
7621 * command.h (lookup_cmd): Constify.
7622 * common/print-utils.c (decimal2str): Constify.
7623 * completer.c (gdb_print_filename): Constify.
7624 * corefile.c (set_gnutarget): Constify.
7625 * cp-name-parser.y (yyerror): Constify.
7626 * cp-valprint.c (cp_print_class_member): Constify.
7627 * cris-tdep.c (cris_register_name, crisv32_register_name):
7628 Constify.
7629 * d-exp.y (yyerror): Constify.
7630 (struct token::oper): Constify.
7631 * d-lang.h (d_yyerror): Constify.
7632 * dbxread.c (struct header_file_location::name): Constify.
7633 (add_old_header_file, add_new_header_file, last_function_name)
7634 (dbx_next_symbol_text, add_bincl_to_list)
7635 (find_corresponding_bincl_psymtab, set_namestring)
7636 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7637 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7638 * defs.h (command_line_input, print_address_symbolic)
7639 (deprecated_readline_begin_hook): Constify.
7640 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7641 Constify.
7642 * event-top.c (handle_line_of_input): Constify and add cast.
7643 * exceptions.c (catch_errors): Constify.
7644 * exceptions.h (catch_errors): Constify.
7645 * expprint.c (print_subexp_standard, op_string, op_name)
7646 (op_name_standard, dump_raw_expression, dump_raw_expression):
7647 * expression.h (op_name, op_string, dump_raw_expression):
7648 Constify.
7649 * f-exp.y (yyerror): Constify.
7650 (struct token::oper): Constify.
7651 (struct f77_boolean_val::name): Constify.
7652 * f-lang.c (f_word_break_characters): Constify.
7653 * f-lang.h (f_yyerror): Constify.
7654 * fork-child.c (fork_inferior): Add cast.
7655 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7656 (new_variant): Constify.
7657 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7658 * gdbarch.c: Regenerate.
7659 * gdbcore.h (set_gnutarget): Constify.
7660 * go-exp.y (yyerror): Constify.
7661 (token::oper): Constify.
7662 * go-lang.h (go_yyerror): Constify.
7663 * go32-nat.c (go32_sysinfo): Constify.
7664 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7665 * guile/scm-cmd.c (cmdscm_function): Constify.
7666 * guile/scm-param.c (pascm_param_value): Constify.
7667 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7668 (h8300sx_register_name): Constify.
7669 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7670 Constify.
7671 * ia64-tdep.c (ia64_register_names): Constify.
7672 * infcmd.c (construct_inferior_arguments): Constify.
7673 (path_command, attach_post_wait): Constify.
7674 * language.c (show_range_command, show_case_command)
7675 (unk_lang_error): Constify.
7676 * language.h (language_defn::la_error)
7677 (language_defn::la_name_of_this): Constify.
7678 * linespec.c (decode_line_2): Constify.
7679 * linux-thread-db.c (thread_db_err_str): Constify.
7680 * lm32-tdep.c (lm32_register_name): Constify.
7681 * m2-exp.y (yyerror): Constify.
7682 * m2-lang.h (m2_yyerror): Constify.
7683 * m32r-tdep.c (m32r_register_names): Constify and make static.
7684 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7685 * m88k-tdep.c (m88k_register_name): Constify.
7686 * macroexp.c (appendmem): Constify.
7687 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7688 (upgrade_type, parse_external, parse_partial_symbols)
7689 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7690 (new_symbol): Constify.
7691 * memattr.c (mem_info_command): Constify.
7692 * mep-tdep.c (register_name_from_keyword): Constify.
7693 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7694 Constify.
7695 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7696 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7697 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7698 cast.
7699 (mi_execute_async_cli_command): Constify.
7700 * mips-tdep.c (mips_register_name): Constify.
7701 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7702 (am33_register_name, am33_2_register_name)
7703 * moxie-tdep.c (moxie_register_names): Constify.
7704 * nat/linux-osdata.c (osdata_type): Constify fields.
7705 * nto-tdep.c (nto_parse_redirection): Constify.
7706 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7707 (lookup_child_selector): Constify.
7708 (objc_methcall::name): Constify.
7709 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7710 (lookup_struct_typedef): Constify.
7711 * objfiles.c (pc_in_section): Constify.
7712 * objfiles.h (pc_in_section): Constify.
7713 * p-exp.y (struct token::oper): Constify.
7714 (yyerror): Constify.
7715 * p-lang.h (pascal_yyerror): Constify.
7716 * parser-defs.h (op_name_standard): Constify.
7717 (op_print::string): Constify.
7718 (exp_descriptor::op_name): Constify.
7719 * printcmd.c (print_address_symbolic): Constify.
7720 * psymtab.c (print_partial_symbols): Constify.
7721 * python/py-breakpoint.c (stop_func): Constify.
7722 (bppy_get_expression): Constify.
7723 * python/py-cmd.c (cmdpy_completer::name): Constify.
7724 (cmdpy_function): Constify.
7725 * python/py-event.c (evpy_add_attribute)
7726 (gdbpy_initialize_event_generic): Constify.
7727 * python/py-event.h (evpy_add_attribute)
7728 (gdbpy_initialize_event_generic): Constify.
7729 * python/py-evts.c (add_new_registry): Constify.
7730 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7731 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7732 * python/py-inferior.c (get_buffer): Add cast.
7733 * python/py-param.c (parm_constant::name): Constify.
7734 * python/py-unwind.c (fprint_frame_id): Constify.
7735 * python/python.c (gdbpy_parameter_value): Constify.
7736 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7737 * remote.c (memory_packet_config::name): Constify.
7738 (show_packet_config_cmd, remote_write_bytes)
7739 (remote_buffer_add_string):
7740 * reverse.c (exec_reverse_once): Constify.
7741 * rs6000-tdep.c (variant::name, variant::description): Constify.
7742 * rust-exp.y (rustyyerror): Constify.
7743 * rust-lang.c (rust_op_name): Constify.
7744 * rust-lang.h (rustyyerror): Constify.
7745 * serial.h (serial_ops::name): Constify.
7746 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7747 (sh_sh3e_register_name, sh_sh2e_register_name)
7748 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7749 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7750 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7751 (sh_sh4al_dsp_register_name): Constify.
7752 * sh64-tdep.c (sh64_register_name): Constify.
7753 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7754 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7755 * stabsread.c (patch_block_stabs, read_type_number)
7756 (ref_map::stabs, ref_add, process_reference)
7757 (symbol_reference_defined, define_symbol, define_symbol)
7758 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7759 (read_one_struct_field, read_struct_fields, read_baseclasses)
7760 (read_tilde_fields, read_struct_type, read_array_type)
7761 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7762 (read_huge_number, read_range_type, read_args, common_block_start)
7763 (find_name_end): Constify.
7764 * stabsread.h (common_block_start, define_symbol)
7765 (process_one_symbol, symbol_reference_defined, ref_add):
7766 * symfile.c (get_section_index, add_symbol_file_command):
7767 * symfile.h (get_section_index): Constify.
7768 * target-descriptions.c (tdesc_type::name): Constify.
7769 (tdesc_free_type): Add cast.
7770 * target.c (find_default_run_target):
7771 (add_deprecated_target_alias, find_default_run_target)
7772 (target_announce_detach): Constify.
7773 (do_option): Constify.
7774 * target.h (add_deprecated_target_alias): Constify.
7775 * thread.c (print_thread_info_1): Constify.
7776 * top.c (deprecated_readline_begin_hook, command_line_input):
7777 Constify.
7778 (init_main): Add casts.
7779 * top.h (handle_line_of_input): Constify.
7780 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7781 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7782 (tfind_command): Rename to ...
7783 (tfind_command_1): ... this and constify.
7784 (tfind_command): New function.
7785 (tfind_end_command, tfind_start_command): Adjust.
7786 (encode_source_string): Constify.
7787 * tracepoint.h (encode_source_string): Constify.
7788 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7789 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7790 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7791 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7792 * tui/tui-win.c (parse_scrolling_args): Constify.
7793 * tui/tui-windata.c (tui_erase_data_content): Constify.
7794 * tui/tui-windata.h (tui_erase_data_content): Constify.
7795 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7796 * tui/tui.c (tui_enable): Add cast.
7797 * utils.c (defaulted_query): Constify.
7798 (init_page_info): Add cast.
7799 (puts_debug, subset_compare): Constify.
7800 * utils.h (subset_compare): Constify.
7801 * varobj.c (varobj_format_string): Constify.
7802 * varobj.h (varobj_format_string): Constify.
7803 * vax-tdep.c (vax_register_name): Constify.
7804 * windows-nat.c (windows_detach): Constify.
7805 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7806 * xml-support.c (gdb_xml_end_element): Constify.
7807 * xml-tdesc.c (tdesc_start_reg): Constify.
7808 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7809 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7810 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7811
7812 2017-04-05 Pedro Alves <palves@redhat.com>
7813
7814 * proc-api.c (struct trans): Constify.
7815 (procfs_note): Constify.
7816 * proc-events.c (struct trans, syscall_table):
7817 * proc-flags.c (struct trans): Constify.
7818 * proc-utils.h (procfs_note): Constify.
7819 * proc-why.c (struct trans): Constify.
7820 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7821 (procfs_detach): Constify.
7822 * sol-thread.c (struct string_map): Constify.
7823 (td_err_string, td_state_string): Constify.
7824
7825 2017-04-05 Pedro Alves <palves@redhat.com>
7826
7827 * proc-api.c (procfs_filename): Don't initialize
7828 procfs_filename.
7829 (prepare_to_trace): Assume procfs_filename is non-NULL.
7830 (_initialize_proc_api): Give procfs_filename a default value here.
7831
7832 2017-04-05 Pedro Alves <palves@redhat.com>
7833
7834 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7835 'cond_string' parameter.
7836 (extract_exception_regexp): Constify 'string' parameter.
7837 (catch_exception_command_1): Constify.
7838 * breakpoint.c (init_catchpoint)
7839 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7840 parameter.
7841 (ep_parse_optional_if_clause, catch_fork_command_1)
7842 (catch_exec_command_1): Constify.
7843 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7844 parameter.
7845 (ep_parse_optional_if_clause): Constify.
7846 * cli/cli-utils.c (remove_trailing_whitespace)
7847 (check_for_argument): Constify.
7848 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7849 non-const overload.
7850 (check_for_argument): Likewise.
7851
7852 2017-04-05 Pedro Alves <palves@redhat.com>
7853
7854 * event-top.c (command_line_handler): Add cast to execute_command
7855 call.
7856 * record-btrace.c (cmd_record_btrace_bts_start)
7857 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7858 (cmd_record_btrace_start): Add cast to execute_command call.
7859 * record-full.c (record_full_goto_insn):
7860 * record.c (record_start, record_stop): Add cast to
7861 execute_command_to_string calls.
7862 (cmd_record_start): Add cast to execute_command calls.
7863
7864 2017-04-05 Pedro Alves <palves@redhat.com>
7865
7866 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7867 static inline function.
7868 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7869 array and use gdb_PyArg_ParseTupleAndKeywords.
7870 * python/py-cmd.c (cmdpy_init): Likewise.
7871 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7872 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7873 (infpy_search_memory): Likewise.
7874 * python/py-objfile.c (objfpy_add_separate_debug_file)
7875 (gdbpy_lookup_objfile): Likewise.
7876 * python/py-symbol.c (gdbpy_lookup_symbol)
7877 (gdbpy_lookup_global_symbol): Likewise.
7878 * python/py-type.c (gdbpy_lookup_type): Likewise.
7879 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7880 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7881 Likewise.
7882
7883 2017-04-05 Pedro Alves <palves@redhat.com>
7884
7885 * python/python-internal.h (gdb_PyGetSetDef): New type.
7886 * python/py-block.c (block_object_getset)
7887 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7888 * python/py-event.c (event_object_getset)
7889 (finish_breakpoint_object_getset): Likewise.
7890 * python/py-inferior.c (inferior_object_getset): Likewise.
7891 * python/py-infthread.c (thread_object_getset): Likewise.
7892 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7893 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7894 * python/py-objfile.c (objfile_getset): Likewise.
7895 * python/py-progspace.c (pspace_getset): Likewise.
7896 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7897 Likewise.
7898 * python/py-record.c (recpy_record_getset): Likewise.
7899 * python/py-symbol.c (symbol_object_getset): Likewise.
7900 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7901 Likewise.
7902 * python/py-type.c (type_object_getset, field_object_getset):
7903 Likewise.
7904 * python/py-value.c (value_object_getset): Likewise.
7905
7906 2017-04-05 Pedro Alves <palves@redhat.com>
7907
7908 * python/python-internal.h (gdb_PyObject_CallMethod)
7909 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7910 New functions.
7911 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7912 (PySys_GetObject, PySys_SetPath): New macros.
7913
7914 2017-04-05 Pedro Alves <palves@redhat.com>
7915
7916 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7917 info_osdata_command.
7918 * osdata.c (info_osdata_command): Rename to ...
7919 (info_osdata): ... this. Constify 'type' parameter, and remove
7920 the 'from_tty' parameter. Accept NULL TYPE.
7921 (info_osdata_command): New function.
7922 * osdata.h (info_osdata_command): Remove declaration.
7923 (info_osdata): New declaration.
7924
7925 2017-04-05 Pedro Alves <palves@redhat.com>
7926
7927 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7928 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7929 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7930 parameter.
7931 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7932 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7933 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7934 parameter.
7935 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7936 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7937 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7938 (mi_cmd_file_list_exec_source_files)
7939 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7940 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7941 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7942 parameter.
7943 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7944 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7945 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7946 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7947 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7948 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7949 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7950 'command' parameter.
7951 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7952 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7953 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7954 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7955 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7956 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7957 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7958 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7959 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7960 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7961 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7962 parameter.
7963 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7964 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7965 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7966 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7967 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7968 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7969 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7970 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7971 (mi_cmd_data_list_changed_registers)
7972 (mi_cmd_data_write_register_values)
7973 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7974 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7975 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7976 (mi_cmd_list_features, mi_cmd_list_target_features)
7977 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7978 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7979 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7980 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7981 (mi_cmd_trace_frame_collected): Constify 'command'
7982 parameter.
7983 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7984 'command' parameter.
7985
7986 2017-04-05 Pedro Alves <palves@redhat.com>
7987
7988 * ada-lang.c (ada_completer_word_break_characters): Now a const
7989 array.
7990 (ada_get_gdb_completer_word_break_characters): Constify.
7991 * completer.c (gdb_completer_command_word_break_characters)
7992 (gdb_completer_file_name_break_characters)
7993 (gdb_completer_quote_characters): Now const arrays.
7994 (get_gdb_completer_quote_characters): Constify.
7995 (set_rl_completer_word_break_characters): New function.
7996 (set_gdb_completion_word_break_characters)
7997 (complete_line_internal): Use it.
7998 * completer.h (get_gdb_completer_quote_characters): Constify.
7999 (set_rl_completer_word_break_characters): Declare.
8000 * f-lang.c (f_word_break_characters): Constify.
8001 * language.c (default_word_break_characters): Constify.
8002 * language.h (language_defn::la_word_break_characters): Constify.
8003 (default_word_break_characters): Constify.
8004 * top.c (init_main): Use set_rl_completer_word_break_characters.
8005
8006 2017-04-05 Pedro Alves <palves@redhat.com>
8007
8008 * aix-thread.c (aix_thread_pid_to_str)
8009 (aix_thread_extra_thread_info): Constify.
8010 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8011 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8012 (bsd_uthread_pid_to_str): Constify.
8013 * corelow.c (core_pid_to_str): Constify.
8014 * darwin-nat.c (darwin_pid_to_str): Constify.
8015 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8016 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8017 Constify.
8018 * gnu-nat.c (gnu_pid_to_str): Constify.
8019 * go32-nat.c (go32_pid_to_str): Constify.
8020 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8021 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8022 * inferior.c (inferior_pid_to_str): Constify.
8023 * linux-nat.c (linux_nat_pid_to_str): Constify.
8024 * linux-tdep.c (linux_core_pid_to_str): Constify.
8025 * linux-thread-db.c (thread_db_pid_to_str)
8026 (thread_db_extra_thread_info): Constify.
8027 * nto-tdep.c (nto_extra_thread_info): Constify.
8028 * nto-tdep.h (nto_extra_thread_info): Constify.
8029 * obsd-nat.c (obsd_pid_to_str): Constify.
8030 * procfs.c (procfs_pid_to_str): Constify.
8031 * ravenscar-thread.c (ravenscar_extra_thread_info)
8032 (ravenscar_pid_to_str): Constify.
8033 * remote-sim.c (gdbsim_pid_to_str): Constify.
8034 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8035 Constify.
8036 * sol-thread.c (solaris_pid_to_str): Constify.
8037 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8038 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8039 * target.c (default_pid_to_str, target_pid_to_str)
8040 (normal_pid_to_str, default_pid_to_str): Constify.
8041 * target.h (target_ops::to_pid_to_str)
8042 (target_ops::to_extra_thread_info): Constify.
8043 (target_pid_to_str, normal_pid_to_str): Constify.
8044 * windows-nat.c (windows_pid_to_str): Constify.
8045 * gdbarch.sh (core_pid_to_str): Constify.
8046 * target-delegates.c: Regenerate.
8047 * gdbarch.h, gdbarch.c: Regenerate.
8048
8049 2017-04-05 Pedro Alves <palves@redhat.com>
8050
8051 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8052 the memory of the temporary warning_pre_print override.
8053 * utils.c (warning_pre_print): Constify.
8054 * utils.h (warning_pre_print): Constify.
8055
8056 2017-04-05 Pedro Alves <palves@redhat.com>
8057
8058 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8059 (shell_command): New function.
8060 (make_command): Use std::string.
8061 (init_cli_cmds): Register shell_command instead of shell_escape.
8062
8063 2017-04-05 Pedro Alves <palves@redhat.com>
8064
8065 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8066 * tracepoint.c (default_collect): Don't initialize.
8067
8068 2017-04-05 Pedro Alves <palves@redhat.com>
8069
8070 * macroexp.c (macro_buffer::shared): Now a bool.
8071 (init_buffer): Update.
8072 (init_shared_buffer): Constify 'addr' parameter.
8073 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8074 casts.
8075
8076 2017-04-05 Pedro Alves <palves@redhat.com>
8077
8078 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8079 * disasm.c (set_disassembler_options): Constify local.
8080 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8081
8082 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8083
8084 PR gdb/21352
8085 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8086 option.
8087
8088 2017-04-05 Yao Qi <yao.qi@linaro.org>
8089
8090 * frame.c (frame_unwind_register_unsigned): Call
8091 frame_unwind_register_value.
8092
8093 2017-04-05 Yao Qi <yao.qi@linaro.org>
8094
8095 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8096 Use gdb_test_multiple, and don't match anchor.
8097
8098 2017-04-05 Pedro Alves <palves@redhat.com>
8099
8100 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8101 (Write After Approval): Remove Simon Marchi.
8102
8103 2017-04-05 Pedro Alves <palves@redhat.com>
8104
8105 * common/gdb_optional.h (optional::optional): Make constexpr and
8106 initialize m_dummy.
8107
8108 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8109
8110 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8111 (amd64fbsd_jmp_buf_reg_offset): Remove.
8112 (amd64fbsd_supply_uthread): Remove function.
8113 (amd64fbsd_collect_uthread): Remove function.
8114 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8115 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8116 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8117 (fbsd-nat.c): Update comment.
8118 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8119 (i386fbsd_jmp_buf_reg_offset): Remove.
8120 (i386fbsd_supply_uthread): Remove function.
8121 (i386fbsd_collect_uthread): Remove function.
8122 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8123
8124 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8125
8126 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8127 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8128 * NEWS: Mention that support for FreeBSD/alpha was removed.
8129 * alpha-fbsd-tdep.c: Delete file.
8130 * config/alpha/fbsd.mh: Delete file.
8131 * configure.host: Delete alpha*-*-freebsd* and
8132 alpha*-*-kfreebsd*-gnu.
8133 * configure.tgt: Delete alpha*-*-freebsd* and
8134 alpha*-*-kfreebsd*-gnu.
8135
8136 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8137
8138 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8139 amd64bsd_store_inferior_registers): Use ptid from regcache.
8140
8141 2017-04-04 Pedro Alves <palves@redhat.com>
8142
8143 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8144 data fields, make them private and add "m_" prefixes.
8145 (lnp_state_machine::lnp_state_machine): New ctor.
8146 (record_line, check_line_address, handle_set_discriminator)
8147 (handle_set_address, handle_advance_pc, handle_special_opcode)
8148 (handle_advance_line, handle_set_file, handle_negate_stmt)
8149 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8150 (end_sequence, advance_line): New methods.
8151 (m_gdbarch, m_record_lines_p): New fields.
8152 (lnp_reader_state): Delete.
8153 (dwarf_record_line): Rename to ...
8154 (lnp_state_machine::record_line): ... adjust.
8155 (init_lnp_state_machine): Delete.
8156 (lnp_state_machine::lnp_state_machine): New.
8157 (check_line_address): Rename to ...
8158 (lnp_state_machine::check_line_address): This.
8159 (dwarf_decode_lines_1): Remove reference to "reader_state".
8160 Adjust lnp_state_machine having a non-default ctor. Use bool.
8161 State machine internal state manipulation moved to
8162 lnp_state_machine methods.
8163
8164 2017-04-04 Pedro Alves <palves@redhat.com>
8165
8166 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8167 unittests/offset-type-selftests.c.
8168 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8169 * common/offset-type.h: New file.
8170 * common/preprocessor.h: New file.
8171 * common/traits.h: New file.
8172 * common/valid-expr.h: New file.
8173 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8174 sect_offset and cu_offset strong typedefs throughout.
8175 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8176 typedefs throughout.
8177 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8178 sect_offset and cu_offset strong typedefs throughout.
8179 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8180 typedefs throughout.
8181 * gdbtypes.h: Include "common/offset-type.h".
8182 (cu_offset): Now an offset type (strong typedef) instead of a
8183 struct.
8184 (sect_offset): Likewise.
8185 (union call_site_parameter_u): Rename "param_offset" field to
8186 "param_cu_off".
8187 * unittests/offset-type-selftests.c: New file.
8188
8189 2017-04-04 Pedro Alves <palves@redhat.com>
8190
8191 * common/underlying.h: New file.
8192 * dwarf2read.c: Include "common/gdb_optional.h" and
8193 "common/underlying.h".
8194 (dir_index, file_name_index): New types.
8195 (file_entry): Use them.
8196 (file_entry::include): Use to_underlying.
8197 (line_header::add_file_name): Use dir_index.
8198 (read_formatted_entries): Use gdb::optional. Read form before
8199 writting to file_entry.
8200 (dwarf_decode_line_header): Use dir_index.
8201 (lnp_state_machine::current_file): Use to_underlying.
8202 (lnp_state_machine::file): Change type to file_name_index.
8203 (dwarf_record_line): Use to_underlying.
8204 (init_lnp_state_machine): Use file_name_index.
8205 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8206
8207 2017-04-04 Pedro Alves <palves@redhat.com>
8208
8209 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8210 operator bool, has_value and get methods.
8211
8212 2017-04-04 Pedro Alves <palves@redhat.com>
8213
8214 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8215 fields.
8216 (line_header): Initialize all data fields. Change type of
8217 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8218 Change type of include_dirs to std::vector<const char *>. Remove
8219 num_include_dirs, include_dirs_size. Change type of file_names to
8220 std::vector<file_entry>. Remove num_file_names, file_names_size.
8221 (line_header::line_header): New.
8222 (line_header::add_include_dir, line_header::add_file_name): New
8223 methods.
8224 (line_header::include_dir_at): Remove NULL check.
8225 (line_header::file_name_at): Add const overload.
8226 (line_header_up): New unique_ptr typedef.
8227 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8228 std::vector. Remove free_line_header call.
8229 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8230 free_line_header call.
8231 (free_cu_line_header): Delete.
8232 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8233 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8234 Adjust to use std::vector.
8235 (free_line_header): Delete.
8236 (free_line_header_voidp): Use delete.
8237 (add_include_dir): Replace with ...
8238 (line_header::add_include_dir): ... this method. Use std::vector.
8239 (add_file_name): Replace with ...
8240 (line_header::add_file_name): ... this method. Use std::vector.
8241 (add_include_dir_stub): Delete.
8242 (read_formatted_entries): Remove memset.
8243 (dwarf_decode_line_header): Return a line_header_up instead of a
8244 raw pointer. Remove cleanup handling. Pass lambdas to
8245 read_formatted_entries. Adjust to use line_header methods.
8246 (dwarf_decode_lines_1): Adjust to use line_header methods.
8247 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8248 use std::vector.
8249
8250 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8251
8252 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8253 instead of struct ptid.
8254
8255 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8256
8257 * frame.c (get_frame_register_bytes): Unwind using value.
8258 (put_frame_register_bytes): Likewise.
8259
8260 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8261
8262 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8263 aggregate-like.
8264
8265 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8266
8267 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8268
8269 2017-03-29 Yao Qi <yao.qi@linaro.org>
8270
8271 * gdbthread.h (struct thread_info): Declare constructor and
8272 destructor. Add some in-class member initializers.
8273 * thread.c (free_thread): Remove.
8274 (init_thread_list): Call delete instead of free_thread.
8275 (new_thread): Call thread_info constructor.
8276 (thread_info::thread_info): New function.
8277 (thread_info::~thread_info): New function.
8278 (delete_thread_1): Call delete instead of free_thread.
8279 (make_cleanup_restore_current_thread): Move tp and frame to
8280 inner block.
8281
8282 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8283
8284 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8285 (arc_skip_prologue): Likewise.
8286 (arc_make_frame_cache): Likewise.
8287 (arc_pv_get_operand): New function.
8288 (arc_is_in_prologue): Likewise.
8289 (arc_analyze_prologue): Likewise.
8290 (arc_print_frame_cache): Likewise.
8291 (MAX_PROLOGUE_LENGTH): New constant.
8292
8293 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8294
8295 * configure.tgt: Add arc-insn.o.
8296 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8297 (dump_arc_instruction_command): New function.
8298 (arc_fprintf_disasm): Likewise.
8299 (arc_disassemble_info): Likewise.
8300 (arc_insn_get_operand_value): Likewise.
8301 (arc_insn_get_operand_value_signed): Likewise.
8302 (arc_insn_get_memory_base_reg): Likewise.
8303 (arc_insn_get_memory_offset): Likewise.
8304 (arc_insn_get_branch_target): Likewise.
8305 (arc_insn_dump): Likewise.
8306 (arc_insn_get_linear_next_pc): Likewise.
8307 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8308 (arc_disassemble_info): Likewise.
8309 (arc_insn_get_branch_target): Likewise.
8310 (arc_insn_get_linear_next_pc): Likewise.
8311 * NEWS: Mention new "maint print arc arc-instruction".
8312
8313 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8314
8315 * arc-tdep (maintenance_print_arc_list): New variable.
8316 (maintenance_print_arc_command): New function.
8317
8318 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8319
8320 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8321 Add "limm" and "reserved".
8322 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8323 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8324 * arc-tdep.h (arc_regnum): Likewise.
8325
8326 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8327
8328 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8329 for THREADPTR register.
8330 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8331 register.
8332 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8333 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8334 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8335
8336 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8337
8338 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8339 registers above gdbarch_num_regs (gdbarch) as privileged in
8340 call0 ABI.
8341
8342 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8343
8344 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8345 for a single specified register or for all registers in
8346 a0_base..a0_base + C0_NREGS range.
8347 (supply_gregset_reg): Call regcache_raw_supply for a single
8348 specified register or for all registers in a0_base..a0_base +
8349 C0_NREGS range.
8350
8351 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8352
8353 * arch/xtensa.h (C0_NREGS): Add definition.
8354 * xtensa-tdep.c (C0_NREGS): Remove definition.
8355
8356 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8357
8358 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8359 Drop xtensa_default_isa initialization.
8360 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8361
8362 2017-03-27 Pedro Alves <palves@redhat.com>
8363
8364 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8365 (file_entry::include_dir): New method.
8366 (line_header::include_dir_at, line_header::file_name_at): New
8367 methods.
8368 (setup_type_unit_groups, setup_type_unit_groups)
8369 (psymtab_include_file_name): Simplify using the new methods.
8370 (lnp_state_machine) <the_line_header>: New field.
8371 <file>: Add comment.
8372 (lnp_state_machine::current_file): New method.
8373 (dwarf_record_line): Simplify using the new methods.
8374 (init_lnp_state_machine): Initialize the "the_line_header" field.
8375 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8376 Simplify using the new methods.
8377
8378 2017-03-27 Pedro Alves <palves@redhat.com>
8379
8380 * cp-name-parser.y (make_empty): Delete.
8381 (demangler_special, nested_name, ptr_operator, array_indicator)
8382 (direct_declarator, declarator_1): Use fill_comp instead of
8383 make_empty.
8384
8385 2017-03-27 Pedro Alves <palves@redhat.com>
8386
8387 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8388 to ATTRIBUTE_PRINTF.
8389 * solib-target.c (library_list_start_list): Print "string" not
8390 "version".
8391 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8392 gdb_xml_error call.
8393
8394 2017-03-27 Pedro Alves <palves@redhat.com>
8395
8396 * dwarf2read.c (struct file_and_directory): New.
8397 (dwarf2_get_dwz_file): Adjust to use std::string.
8398 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8399 (find_file_and_directory): Adjust to return a file_and_directory
8400 object.
8401 (read_file_scope): Adjust to use file_and_directory. Remove
8402 make_cleanup/do_cleanups calls.
8403 (open_and_init_dwp_file): Adjust to use std::string. Remove
8404 make_cleanup/do_cleanups calls.
8405 * python/python.c (do_start_initialization): Adjust to ldirname
8406 returning a std::string.
8407 * utils.c (ldirname): Now returns a std::string.
8408 * utils.h (ldirname): Change return type to std::string.
8409 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8410 returning a std::string.
8411 * xml-tdesc.c (file_read_description_xml): Likewise.
8412
8413 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8414
8415 * regcache.c (regcache_debug_print_register): New function.
8416 * regcache.h (regcache_debug_print_register): New declaration.
8417 * target.c (debug_print_register): Remove.
8418 (target_fetch_registers): Call regcache_debug_print_register.
8419 (target_store_registers): Likewise.
8420
8421 2017-03-24 Pádraig Brady <pbrady@fb.com>
8422
8423 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8424 reference beyond the 'lh->include_dirs' array before accessing to
8425 it.
8426 (psymtab_include_file_name): Likewise.
8427 (dwarf_decode_lines_1): Likewise.
8428 (dwarf_decode_lines): Likewise.
8429 (file_file_name): Likewise.
8430
8431 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8432
8433 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8434 inferior_ptid.
8435 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8436 ps_lsetfpregs): Likewise.
8437 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8438 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8439 ps_lsetfpregs): Likewise.
8440 * target.c (target_fetch_registers, target_store_registers):
8441 Remove asserts.
8442
8443 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8444
8445 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8446
8447 2017-03-23 Yao Qi <yao.qi@linaro.org>
8448
8449 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8450 (_initialize_aarch64_tdep): Register it.
8451 (aarch64_record_load_store): Handle PRFM instruction.
8452 (aarch64_process_record_test): New function.
8453
8454 2017-03-23 Yao Qi <yao.qi@linaro.org>
8455
8456 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8457 indentation.
8458
8459 2017-03-23 Yao Qi <yao.qi@linaro.org>
8460
8461 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8462
8463 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8464
8465 python/python.c (do_start_initialization): Fix memory leak.
8466
8467 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8468
8469 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8470 using get_ptrace_pid.
8471 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8472 inferior_ptid.
8473 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8474 inferior_ptid instead of pid.
8475
8476 2017-03-22 Yao Qi <yao.qi@linaro.org>
8477
8478 * aarch64-tdep.c: Wrap locally used classes in anonymous
8479 namespace.
8480 * arm-tdep.c: Likewise.
8481 * linespec.c: Likewise.
8482 * ui-out.c: Likewise.
8483
8484 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8485
8486 PR gdb/19637
8487 * python/lib/gdb/printer/bound_registers.py: Import sys.
8488
8489 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8490
8491 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8492 windows_thread_info parameter and use it instead of
8493 current_thread.
8494 (windows_fetch_inferior_registers): Don't set current_thread,
8495 pass the thread to do_windows_fetch_inferior_registers. Use
8496 ptid from regcache instead of inferior_ptid.
8497 (do_windows_store_inferior_registers): Add windows_thread_info
8498 parameter and use it instead of current_thread.
8499 (windows_store_inferior_registers): Don't set current_thread,
8500 pass the thread to do_windows_store_inferior_registers. Use
8501 ptid from regcache instead of inferior_ptid.
8502
8503 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8504
8505 * ser-mingw.c (ser_windows_raw): Remove reference to
8506 struct serial::current_timeout.
8507
8508 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8509
8510 PR tdep/20928
8511 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8512 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8513 (sparc64_fsr_type): Fix %fsr decoding.
8514
8515 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8516
8517 * python/py-record-btrace.c (btpy_insn_data): Change return type
8518 for Python 2.
8519
8520 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8521
8522 * spu-linux-nat.c (spu_fetch_inferior_registers,
8523 spu_store_inferior_registers): Use ptid from regcache, set and
8524 restore inferior_ptid.
8525 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8526 Likewise.
8527
8528 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8529
8530 * i386-linux-nat.c (fetch_register, store_register,
8531 i386_linux_fetch_inferior_registers,
8532 i386_linux_store_inferior_registers): Use ptid from regcache.
8533 * ia64-linux-nat.c (ia64_linux_fetch_register,
8534 ia64_linux_store_register): Likewise.
8535 * inf-ptrace.c (inf_ptrace_fetch_register,
8536 inf_ptrace_store_register): Likewise.
8537 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8538 m32r_linux_store_inferior_registers): Likewise.
8539 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8540 m68kbsd_store_inferior_registers): Likewise.
8541 * m68k-linux-nat.c (fetch_register, store_register,
8542 m68k_linux_fetch_inferior_registers,
8543 m68k_linux_store_inferior_registers): Likewise.
8544 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8545 m88kbsd_store_inferior_registers): Likewise.
8546 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8547 mips_fbsd_store_inferior_registers): Likewise.
8548 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8549 mips64_linux_regsets_store_registers): Likewise.
8550 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8551 mipsnbsd_store_inferior_registers): Likewise.
8552 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8553 mips64obsd_store_inferior_registers): Likewise.
8554 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8555 Likewise.
8556 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8557 ppcfbsd_store_inferior_registers): Likewise.
8558 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8559 ppc_linux_store_inferior_registers): Likewise.
8560 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8561 ppcnbsd_store_inferior_registers): Likewise.
8562 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8563 ppcobsd_store_registers): Likewise.
8564 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8565 Likewise.
8566 * ravenscar-thread.c (ravenscar_fetch_registers,
8567 ravenscar_store_registers, ravenscar_prepare_to_store):
8568 Likewise.
8569 * record-btrace.c (record_btrace_fetch_registers,
8570 record_btrace_store_registers, record_btrace_prepare_to_store):
8571 Likewise.
8572 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8573 Lookup inferior using ptid from regcache, instead of
8574 current_inferior.
8575 * remote.c (remote_fetch_registers, remote_store_registers): Use
8576 ptid from regcache.
8577 * rs6000-nat.c (fetch_register, store_register): Likewise.
8578 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8579 s390_linux_store_inferior_registers): Likewise.
8580 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8581 shnbsd_store_inferior_registers): Likewise.
8582 * sol-thread.c (sol_thread_fetch_registers,
8583 sol_thread_store_registers): Likewise.
8584 * sparc-nat.c (sparc_fetch_inferior_registers,
8585 sparc_store_inferior_registers): Likewise.
8586 * tilegx-linux-nat.c (fetch_inferior_registers,
8587 store_inferior_registers): Likewise.
8588 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8589 vaxbsd_store_inferior_registers): Likewise.
8590 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8591 store_xtregs): Likewise.
8592
8593 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8594
8595 PR gdb/14441
8596 * NEWS: Mention support for rvalue references in GDB and python.
8597 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8598 supports both lvalue and rvalue references.
8599
8600 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8601
8602 PR gdb/14441
8603 * gdbtypes.c (rank_one_type): Implement overloading
8604 resolution rules regarding rvalue references.
8605
8606 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8607
8608 PR gdb/14441
8609 * aarch64-tdep.c (aarch64_type_align)
8610 (aarch64_extract_return_value, aarch64_store_return_value): Change
8611 lvalue reference type checks to general reference type checks.
8612 * amd64-tdep.c (amd64_classify): Likewise.
8613 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8614 Likewise.
8615 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8616 (arm_store_return_value): Likewise.
8617 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8618 * c-typeprint.c (c_print_type): Likewise.
8619 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8620 (cplus_number_of_children, cplus_describe_child): Likewise.
8621 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8622 * completer.c (expression_completer): Likewise.
8623 * cp-support.c (make_symbol_overload_list_adl_namespace):
8624 Likewise.
8625 * darwin-nat-info.c (info_mach_region_command): Likewise.
8626 * dwarf2loc.c (entry_data_value_coerce_ref)
8627 (value_of_dwarf_reg_entry): Likewise.
8628 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8629 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8630 Likewise.
8631 * findvar.c (extract_typed_address, store_typed_address):
8632 Likewise.
8633 * gdbtypes.c (rank_one_type): Likewise.
8634 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8635 * infcall.c (value_arg_coerce): Likewise.
8636 * language.c (pointer_type): Likewise.
8637 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8638 Likewise.
8639 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8640 * mn10300-tdep.c (mn10300_type_align): Likewise.
8641 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8642 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8643 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8644 Likewise.
8645 * printcmd.c (print_formatted, x_command): Likewise.
8646 * python/py-type.c (typy_get_composite, typy_template_argument):
8647 Likewise.
8648 * python/py-value.c (valpy_referenced_value)
8649 (valpy_get_dynamic_type, value_has_field): Likewise.
8650 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8651 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8652 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8653 * spu-tdep.c (spu_scalar_value_p): Likewise.
8654 * symtab.c (lookup_symbol_aux): Likewise.
8655 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8656 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8657 Likewise.
8658 * valops.c (value_cast_pointers, value_cast)
8659 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8660 (value_struct_elt, value_struct_elt_bitpos)
8661 (value_find_oload_method_list, find_overload_match)
8662 (value_rtti_indirect_type): Likewise.
8663 * valprint.c (val_print_scalar_type_p, generic_val_print):
8664 Likewise.
8665 * value.c (value_actual_type, value_as_address, unpack_long)
8666 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8667 (coerce_ref): Likewise.
8668 * varobj.c (varobj_get_value_type): Likewise.
8669
8670 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8671
8672 PR gdb/14441
8673 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8674 table of constants.
8675 * python/lib/gdb/command/explore.py: Support exploring values
8676 of rvalue reference types.
8677 * python/lib/gdb/types.py: Implement get_basic_type() for
8678 rvalue reference types.
8679 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8680 constant.
8681 * python/py-value.c (valpy_getitem): Add an rvalue reference
8682 check.
8683 (valpy_reference_value): Add new parameter "refcode".
8684 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8685 New wrappers for valpy_reference_value().
8686 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8687 (gdbpy_invoke_xmethod): Likewise.
8688
8689 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8690
8691 PR gdb/14441
8692 * dwarf2read.c (process_die, read_type_die_1): Handle the
8693 DW_TAG_rvalue_reference_type DIE.
8694 (read_tag_reference_type): Add new parameter "refcode".
8695
8696 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8697
8698 PR gdb/14441
8699 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8700 (c_type_print_modifier, c_type_print_varspec_suffix)
8701 (c_type_print_base): Support printing rvalue reference types.
8702 * c-valprint.c (c_val_print, c_value_print): Support printing
8703 rvalue reference values.
8704
8705 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8706
8707 PR gdb/14441
8708 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8709 typename.
8710 * cp-support.c (replace_typedefs): Handle
8711 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8712 * python/py-type.c (typy_lookup_type): Likewise.
8713
8714 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8715
8716 PR gdb/14441
8717 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8718 * parse.c (insert_type): Change assert statement.
8719 (follow_types): Handle rvalue reference types.
8720 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8721 constant.
8722
8723 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8724
8725 PR gdb/14441
8726 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8727 value_ref() interface.
8728 * c-valprint.c (c_value_print): Likewise.
8729 * infcall.c (value_arg_coerce): Likewise.
8730 * python/py-value.c (valpy_reference_value): Likewise.
8731 * valops.c (value_cast, value_reinterpret_cast)
8732 (value_dynamic_cast, typecmp): Likewise.
8733 (value_ref): Parameterize by kind of return value reference type.
8734 * value.h (value_ref): Add new parameter "refcode".
8735
8736 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8737
8738 PR gdb/14441
8739 * dwarf2read.c (read_tag_reference_type): Use
8740 lookup_lvalue_reference_type() instead of lookup_reference_type().
8741 * eval.c (evaluate_subexp_standard): Likewise.
8742 * f-exp.y: Likewise.
8743 * gdbtypes.c (make_reference_type, lookup_reference_type):
8744 Generalize with rvalue reference types.
8745 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8746 convenience wrappers for lookup_reference_type().
8747 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8748 reference kind parameter.
8749 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8750 wrappers for lookup_reference_type().
8751 * guile/scm-type.c (gdbscm_type_reference): Use
8752 lookup_lvalue_reference_type() instead of lookup_reference_type().
8753 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8754 * parse.c (follow_types): Likewise.
8755 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8756 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8757 Likewise.
8758 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8759 (gdbpy_invoke_xmethod): Likewise.
8760 * stabsread.c: Provide extra argument to make_reference_type()
8761 call.
8762 * valops.c (value_ref, value_rtti_indirect_type): Use
8763 lookup_lvalue_reference_type() instead of lookup_reference_type().
8764
8765 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8766
8767 PR gdb/14441
8768 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8769 (TYPE_IS_REFERENCE): New macro.
8770 (struct type): Add rvalue_reference_type field.
8771 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8772
8773 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8774
8775 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8776 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8777 New function definition.
8778 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8779 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8780 New function declaration.
8781 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8782 * mi/mi-interp.h: New file.
8783 * solib.c (info_sharedlibrary_command): Replace for loop with
8784 ALL_SO_LIBS macro
8785 * solib.h (update_solib_list): New function declaration.
8786 (so_list_head): Move macro.
8787 * solist.h (ALL_SO_LIBS): New macro.
8788
8789 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8790
8791 * infcmd.c (post_create_inferior): Remove unused argument in
8792 call to solib_add.
8793 * remote.c (remote_start_remote): Likewise.
8794 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8795 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8796 (enable_break): Likewise.
8797 * solib.c (update_solib_list): Remove unused target argument
8798 and its documentation.
8799 (solib_add): Remove unused target argument. Remove unused
8800 argument in call to update_solib_list.
8801 (info_sharedlibrary_command): Remove unused argument in call
8802 to update_solib_list.
8803 (sharedlibrary_command): Remove unused argument in call to
8804 solib_add.
8805 (handle_solib_event): Likewise.
8806 (reload_shared_libraries): Likewise.
8807 * solib.h (solib_add): Remove unused target argument.
8808
8809 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8810
8811 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8812 (s390_displaced_step_fixup): Cover relative branches with the
8813 default fixup handling. This fixes lack of support for some
8814 relative branch instructions.
8815
8816 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8817
8818 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8819 ptid from regcache.
8820
8821 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8822
8823 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8824 i386_darwin_store_inferior_registers): Use ptid from regcache.
8825
8826 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8827
8828 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8829 i386bsd_store_inferior_registers): Use ptid from regcache.
8830
8831 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8832
8833 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8834 hppaobsd_store_registers): Use ptid from regcache.
8835
8836 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8837
8838 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8839 hppanbsd_store_registers): Use ptid from regcache.
8840
8841 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8842
8843 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8844 from regcache. Use get_ptrace_pid.
8845
8846 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8847
8848 * corelow.c (get_core_register_section): Use ptid from regcache,
8849 update doc.
8850
8851 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8852
8853 * bsd-uthread.c (bsd_uthread_fetch_registers,
8854 bsd_uthread_store_registers): Use ptid from regcache, set and
8855 restore inferior_ptid.
8856
8857 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8858
8859 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8860 fetch_fp_regs, store_register, store_regs, store_fp_register,
8861 store_fp_regs): Use ptid from regcache.
8862
8863 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8864
8865 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8866 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8867 store_vfp_regs): Use ptid from regcache.
8868
8869 2017-03-17 Pedro Alves <palves@redhat.com>
8870
8871 PR remote/21188
8872 * ser-base.c (ser_base_wait_for): Add comment.
8873 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8874 version.
8875 * ser-unix.c (hardwire_raw): Remove reference to
8876 scb->current_timeout.
8877 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8878 (hardwire_ops): Install ser_base_readchar instead of
8879 hardwire_readchar.
8880 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8881 Remove fields.
8882
8883 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
8884
8885 PR gdb/19637
8886 * python/lib/gdb/printer/bound_registers.py: Add support for
8887 Python 3.
8888
8889 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8890
8891 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8892 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8893 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8894 byte_offset to subobj_byte_offset. Fix the handling of
8895 DWARF_VALUE_STACK on big-endian targets when coming via an
8896 implicit pointer.
8897 (dwarf2_evaluate_loc_desc): Adjust call to
8898 dwarf2_evaluate_loc_desc_full.
8899 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8900 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8901
8902 2017-03-16 Yao Qi <yao.qi@linaro.org>
8903
8904 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8905 and REVSH instructions.
8906
8907 2017-03-16 Yao Qi <yao.qi@linaro.org>
8908
8909 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8910 (arm_record_test): Declare.
8911 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8912 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8913 align with the manual.
8914 (thumb_record_misc): Adjust the code order to align with the
8915 manual.
8916 (thumb2_record_decode_insn_handler): Fix instruction matching.
8917 (instruction_reader_thumb): New class.
8918 (arm_record_test): New function.
8919
8920 2017-03-16 Yao Qi <yao.qi@linaro.org>
8921
8922 * arm-tdep.c (abstract_memory_reader): New class.
8923 (instruction_reader): New class.
8924 (extract_arm_insn): Add argument 'reader'. Callers updated.
8925 (decode_insn): Likewise.
8926
8927 2017-03-16 Doug Evans <dje@google.com>
8928
8929 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8930 member. Change type of TYPE member to SCM. All uses updated.
8931 (lsscm_make_lazy_string_smob): Add assert.
8932 (lsscm_make_lazy_string): Flag bad length values.
8933 (lsscm_elt_type): New function.
8934 (gdbscm_lazy_string_to_value): Rewrite to use
8935 lsscm_safe_lazy_string_to_value.
8936 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8937 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8938 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8939 in incoming type.
8940 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8941 * guile/scm-type.c (tyscm_scm_to_type): New function.
8942
8943 2017-03-15 Doug Evans <dje@google.com>
8944
8945 PR python/17728, python/18439, python/18779
8946 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8947 member. Change type of TYPE member to PyObject *. All uses updated.
8948 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8949 (gdbpy_create_lazy_string_object): Flag bad length values.
8950 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8951 Handle typedefs in incoming type.
8952 (stpy_lazy_string_elt_type): New function.
8953 (gdbpy_extract_lazy_string): Call it.
8954 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8955 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8956 typedefs in incoming type.
8957
8958 2017-03-16 Doug Evans <dje@google.com>
8959
8960 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8961 * guile/scm-type.c (tyscm_scm_to_type): New function.
8962
8963 2017-03-16 Jiong Wang <jiong.wang@arm.com>
8964
8965 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8966 "ULONGEST" for "skip".
8967
8968 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8969
8970 PR gdb/21220
8971 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8972 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8973 (inf_ptrace_peek_poke): ...here. New function. Now also loop
8974 over ptrace peek/poke until end of buffer or error.
8975
8976 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
8977
8978 * parse.c (length_of_subexp): Make static.
8979 * parser-defs.h (length_of_subexp): Remove.
8980
8981 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8982
8983 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8984 as well.
8985
8986 2017-03-14 Pedro Alves <palves@redhat.com>
8987
8988 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8989 (main): Use std::unique_ptr. Remove calls to
8990 cp_demangled_name_parse_free.
8991
8992 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8993
8994 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8995 alphabsd_store_inferior_registers): Use regcache->ptid instead
8996 of inferior_ptid.
8997
8998 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8999
9000 * aix-thread.c (aix_thread_fetch_registers,
9001 aix_thread_store_registers): Use regcache->ptid instead of
9002 inferior_ptid.
9003
9004 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9005
9006 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9007 store_gregs_to_thread, fetch_fpregs_from_thread,
9008 store_fpregs_to_thread): Use regcache->ptid instead of
9009 inferior_ptid.
9010
9011 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9012
9013 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9014 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9015 instead of inferior_ptid.
9016
9017 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9018
9019 * target.c (target_fetch_registers, target_store_registers): Add
9020 assert.
9021
9022 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9023
9024 * regcache.h (regcache_get_ptid): New function.
9025 * regcache.c (regcache_get_ptid): New function.
9026
9027 2017-03-13 Mark Wielaard <mark@klomp.org>
9028
9029 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9030
9031 2017-03-10 Keith Seitz <keiths@redhat.com>
9032
9033 PR c++/8218
9034 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9035
9036 2017-03-08 Pedro Alves <palves@redhat.com>
9037
9038 PR gdb/18360
9039 * infrun.c (start_step_over, do_target_resume, resume)
9040 (restart_threads): Assert we're not resuming a thread that is
9041 meant to be stopped.
9042 (infrun_thread_stop_requested_callback): Delete.
9043 (infrun_thread_stop_requested): If the thread is internally
9044 stopped, queue a pending stop event and clear the thread's
9045 inline-frame state.
9046 (handle_stop_requested): New function.
9047 (handle_syscall_event, handle_inferior_event_1): Use
9048 handle_stop_requested.
9049 (handle_stop_requested): New function.
9050 (handle_signal_stop): Set the thread's stop_signal here instead of
9051 at caller.
9052 (finish_step_over): Clear step over info unconditionally.
9053 (handle_signal_stop): If the user had interrupted the event
9054 thread, consider the stop a random signal.
9055 (handle_signal_stop) <signal arrived while stepping over
9056 breakpoint>: Don't restart threads here.
9057 (stop_waiting): Don't clear step-over info here.
9058
9059 2017-03-08 Pedro Alves <palves@redhat.com>
9060
9061 PR 21206
9062 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9063 goes to argument 2, not 1.
9064
9065 2017-03-08 Pedro Alves <palves@redhat.com>
9066
9067 PR cli/21218
9068 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9069 display_gdb_prompt.
9070 (command_line_input): Add comment.
9071
9072 2017-03-08 Pedro Alves <palves@redhat.com>
9073
9074 PR tui/21216
9075 * tui/tui-file.c (tui_file::write): New.
9076 * tui/tui-file.h (tui_file): Override "write".
9077 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9078 factored out from ...
9079 (tui_puts): ... here.
9080 (tui_putc): Use them.
9081 (tui_write): New function.
9082 * tui/tui-io.h (tui_write): Declare.
9083
9084 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9085
9086 * Makefile.in (SFILES): Replace "environ.c" with
9087 "common/environ.c".
9088 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9089 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9090 to...
9091 * common/environ.c: ... here.
9092 * environ.h: Moved to...
9093 * common/environ.h: ... here.
9094
9095 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9096
9097 * gdbarch.sh (pstring_ptr): New static function.
9098 (gdbarch_disassembler_options): Use it.
9099 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9100 not valid_disassembler_option->name.
9101 * gdbarch.c: Regenerate.
9102
9103 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9104
9105 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9106
9107 2017-03-07 Pedro Alves <palves@redhat.com>
9108
9109 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9110
9111 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9112
9113 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9114 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9115 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9116 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9117
9118 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9119
9120 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9121
9122 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9123
9124 * remote.c (remote_add_target_side_commands): Use range-based
9125 for loop.
9126
9127 2017-03-03 Yao Qi <yao.qi@linaro.org>
9128
9129 PR gdb/21165
9130 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9131 value is lazy.
9132 * valprint.c (common_val_print): Likewise.
9133
9134 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9135
9136 * NEWS: Mention new set/show disassembler-options commands.
9137 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9138 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9139 (prospective_options): New static variable.
9140 (gdb_disassembler::gdb_disassembler): Initialize
9141 m_di.disassembler_options.
9142 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9143 (get_disassembler_options): New function.
9144 (set_disassembler_options): Likewise.
9145 (set_disassembler_options_sfunc): Likewise.
9146 (show_disassembler_options_sfunc): Likewise.
9147 (disassembler_options_completer): Likewise.
9148 (_initialize_disasm): Likewise.
9149 * disasm.h (get_disassembler_options): New prototype.
9150 (set_disassembler_options): Likewise.
9151 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9152 (gdbarch_verify_disassembler_options): Likewise.
9153 * gdbarch.c: Regenerate.
9154 * gdbarch.h: Likewise.
9155 * arm-tdep.c (num_disassembly_options): Delete.
9156 (set_disassembly_style): Likewise.
9157 (arm_disassembler_options): New static variable.
9158 (set_disassembly_style_sfunc): Convert short style name into long
9159 option name. Call set_disassembler_options.
9160 (show_disassembly_style_sfunc): New function.
9161 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9162 set_gdbarch_verify_disassembler_options.
9163 (_initialize_arm_tdep): Delete regnames variable and update callers.
9164 (arm_disassembler_options): Initialize.
9165 (disasm_options): New variable.
9166 (num_disassembly_options): Rename from this...
9167 (num_disassembly_styles): ...to this. Compute by scanning through
9168 disasm_options.
9169 (valid_disassembly_styles): Initialize using disasm_options.
9170 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9171 set_arm_regname_option.
9172 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9173 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9174 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9175 set_gdbarch_verify_disassembler_options.
9176 * s390-tdep.c (s390_disassembler_options): New static variable.
9177 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9178 set_gdbarch_verify_disassembler_options.
9179
9180 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9181
9182 * remote.c (remote_add_target_side_condition): Remove "struct"
9183 keyword from range-based for loop.
9184
9185 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9186
9187 * remote.c (remote_add_target_side_condition): Use range-based
9188 for loop. Update comment.
9189
9190 2017-02-27 Yao Qi <yao.qi@linaro.org>
9191
9192 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9193
9194 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9195
9196 * regcache.c (regcache_raw_update): New function.
9197 (regcache_raw_read): Move code to regcache_raw_update.
9198 * regcache.h (regcache_raw_update): New declaration.
9199 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9200
9201 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9202
9203 * dwarf2read.c (create_debug_type_hash_table): Initialize
9204 header.signature and header.type_offset_in_tu.
9205
9206 2017-02-24 Pedro Alves <palves@redhat.com>
9207
9208 * symtab.c (make_file_symbol_completion_list_1): Use
9209 add_symtab_completions.
9210
9211 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9212
9213 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9214
9215 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9216
9217 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9218 I386_MAX_REGISTER_SIZE.
9219 (i386_pseudo_register_write): Likewise.
9220 (i386_process_record): Likewise.
9221 * i387-tdep.c (i387_supply_xsave): Likewise.
9222 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9223 (store_register): Likewise.
9224
9225 2017-02-23 Pedro Alves <palves@redhat.com>
9226
9227 * ada-lang.c: Include "common/function-view.h".
9228 (ada_iterate_over_symbols): Adjust to use function_view as
9229 callback type.
9230 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9231 (ada_make_symbol_completion_list): Use a lambda.
9232 (ada_exc_search_name_matches): Delete.
9233 (name_matches_regex): New.
9234 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9235 * compile/compile-c-support.c: Include "common/function-view.h".
9236 (print_one_macro): Change prototype to accept a ui_file pointer.
9237 (write_macro_definitions): Use a lambda.
9238 * dwarf2read.c: Include "common/function-view.h".
9239 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9240 (dw2_expand_symtabs_matching): Adjust to use function_view as
9241 callback type.
9242 * language.h: Include "common/function-view.h".
9243 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9244 function_view as callback type.
9245 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9246 * linespec.c: Include "common/function-view.h".
9247 (collect_info::add_symbol): New method.
9248 (struct symbol_and_data_callback, iterate_inline_only, struct
9249 symbol_matcher_data, iterate_name_matcher): Delete.
9250 (iterate_over_all_matching_symtabs): Adjust to use function_view
9251 as callback type and lambdas.
9252 (iterate_over_file_blocks): Adjust to use function_view as
9253 callback type.
9254 (decode_compound_collector): Now a class with private fields.
9255 (decode_compound_collector::release_symbols): New method.
9256 (collect_one_symbol): Rename to...
9257 (decode_compound_collector::operator()): ... this and adjust.
9258 (lookup_prefix_sym): decode_compound_collector construction bits
9259 move to decode_compound_collector ctor. Pass the
9260 decode_compound_collector object directly as callback. Remove
9261 cleanups and use decode_compound_collector::release_symbols
9262 instead.
9263 (symtab_collector): Now a class with private fields.
9264 (symtab_collector::release_symtabs): New method.
9265 (add_symtabs_to_list): Rename to...
9266 (symtab_collector::operator()): ... this and adjust.
9267 (collect_symtabs_from_filename): symtab_collector construction
9268 bits move to symtab_collector ctor. Pass the symtab_collector
9269 object directly as callback. Remove cleanups and use
9270 symtab_collector::release_symtabs instead.
9271 (collect_symbols): Delete.
9272 (add_matching_symbols_to_info): Use lambdas.
9273 * macrocmd.c (print_macro_callback): Delete.
9274 (info_macro_command): Use a lambda.
9275 (info_macros_command): Pass print_macro_definition as callable
9276 directly.
9277 (print_one_macro): Remove 'ignore' parameter.
9278 (macro_list_command): Adjust.
9279 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9280 (macro_for_each_data::user_data): Delete field.
9281 (foreach_macro): Adjust to call the function_view.
9282 (macro_for_each): Adjust to use function_view as callback type.
9283 (foreach_macro_in_scope): Adjust to call the function_view.
9284 (macro_for_each_in_scope): Adjust to use function_view as callback
9285 type.
9286 * macrotab.h: Include "common/function-view.h".
9287 (macro_callback_fn): Declare a prototype instead of a pointer.
9288 Remove "user_data" parameter.
9289 (macro_for_each, macro_for_each_in_scope): Adjust to use
9290 function_view as callback type.
9291 * psymtab.c (partial_map_expand_apply)
9292 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9293 Adjust to use function_view as callback type and to return bool.
9294 (psym_expand_symtabs_matching): Adjust to use function_view as
9295 callback types.
9296 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9297 to use function_view as callback type and to return bool.
9298 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9299 callback types.
9300 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9301 as callback types.
9302 * symfile.h: Include "common/function-view.h".
9303 (expand_symtabs_file_matcher_ftype)
9304 (expand_symtabs_symbol_matcher_ftype)
9305 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9306 return bool.
9307 (quick_symbol_functions::map_symtabs_matching_filename)
9308 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9309 function_view as callback type and return bool.
9310 (expand_symtabs_matching): Adjust to use function_view as callback
9311 type.
9312 (maintenance_expand_name_matcher)
9313 (maintenance_expand_file_matcher): Delete.
9314 (maintenance_expand_symtabs): Use lambdas.
9315 * symtab.c (iterate_over_some_symtabs): Adjust to use
9316 function_view as callback types and return bool.
9317 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9318 of a cleanup.
9319 (lookup_symtab_callback): Delete.
9320 (lookup_symtab): Use a lambda.
9321 (iterate_over_symbols): Adjust to use function_view as callback
9322 type.
9323 (struct search_symbols_data, search_symbols_file_matches)
9324 (search_symbols_name_matches): Delete.
9325 (search_symbols): Use a pair of lambdas.
9326 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9327 (symtab_expansion_callback): Delete.
9328 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9329 * symtab.h: Include "common/function-view.h".
9330 (iterate_over_some_symtabs): Adjust to use function_view as
9331 callback type and return bool.
9332 (iterate_over_symtabs): Adjust to use function_view as callback
9333 type.
9334 (symbol_found_callback_ftype): Remove 'data' parameter and return
9335 bool.
9336 (iterate_over_symbols): Adjust to use function_view as callback
9337 type.
9338
9339 2017-02-23 Pedro Alves <palves@redhat.com>
9340
9341 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9342 (%.o) <unittests/%.c>: New pattern.
9343 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9344 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9345 * common/function-view.h: New file.
9346 * unittests/function-view-selftests.c: New file.
9347 * configure: Regenerate.
9348
9349 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9350
9351 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9352 inferior_ptid.
9353 * go32-nat.c (go32_thread_alive): Likewise.
9354
9355 2017-02-23 Yao Qi <yao.qi@linaro.org>
9356
9357 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9358 delete.
9359
9360 2017-02-23 Yao Qi <yao.qi@linaro.org>
9361
9362 * varobj.c (varobj_clear_saved_item): Use delete instead of
9363 xfree.
9364 (update_dynamic_varobj_children): Likewise.
9365
9366 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9367
9368 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9369
9370 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9371
9372 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9373 m_enum_value to 0 in default constructor.
9374
9375 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9376
9377 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9378 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9379 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9380 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9381 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9382 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9383 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9384 IS_STORE_CONDITIONAL_INSN.
9385
9386 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9387
9388 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9389
9390 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9391
9392 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9393
9394 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9395
9396 * dwarf2read.c (skip_one_die, read_attribute_value)
9397 (dwarf2_const_value_attr, dump_die_shallow)
9398 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9399 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9400
9401 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9402
9403 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9404 (dwarf_parse_macro_header): Accept DWARF version 5.
9405 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9406
9407 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9408
9409 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9410 DW_AT_GNU_*.
9411 * common/common-exceptions.h (enum errors): Likewise.
9412 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9413 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9414 (dwarf_expr_context::execute_stack_op): Likewise.
9415 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9416 Likewise.
9417 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9418 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9419 (show_entry_values_debug, call_site_to_target_addr)
9420 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9421 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9422 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9423 (value_of_dwarf_block_entry, indirect_pieced_value)
9424 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9425 (disassemble_dwarf_expression): Likewise.
9426 * dwarf2read.c (process_die, inherit_abstract_dies)
9427 (read_call_site_scope): Likewise.
9428 * gdbtypes.h (struct func_type, struct call_site_parameter)
9429 (struct call_site): Likewise.
9430 * stack.c (read_frame_arg): Likewise.
9431 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9432
9433 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9434
9435 * defs.h (read_unsigned_leb128): New declaration.
9436 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9437 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9438 (dwarf2_find_location_expression): Call also
9439 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9440 * dwarf2loc.h (dwarf2_version): New declaration.
9441 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9442 rnglists.
9443 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9444 .debug_rnglists.
9445 (struct dwop_section_names): Add loclists_dwo.
9446 (dwop_section_names): Add .debug_loclists.dwo.
9447 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9448 (struct dwarf2_per_cu_data): Add dwarf_version.
9449 (struct dwo_sections): Add loclists.
9450 (struct attr_abbrev): Add implicit_const.
9451 (read_indirect_line_string): New declaration.
9452 (read_unsigned_leb128): Delete declaration.
9453 (rcuh_kind): New definition.
9454 (read_and_check_comp_unit_head): Change parameter
9455 is_debug_types_section to section_kind.
9456 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9457 (read_comp_unit_head): Change parameter abfd to section, add parameter
9458 section_kind. Handle DWARF-5.
9459 (error_check_comp_unit_head): Accept also DWARF version 5.
9460 (read_and_check_comp_unit_head): Change parameter
9461 is_debug_types_section to section_kind.
9462 (read_and_check_type_unit_head): Delete function.
9463 (read_abbrev_offset): Handle DWARF-5.
9464 (create_debug_type_hash_table): Add parameter section_kind. Process
9465 only DW_UT_type. Use signature and type_offset_in_tu from struct
9466 comp_unit_head.
9467 (create_debug_types_hash_table): Update create_debug_type_hash_table
9468 caller.
9469 (create_all_type_units): Call create_debug_type_hash_table.
9470 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9471 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9472 caller.
9473 (skip_one_die): Handle DW_FORM_implicit_const.
9474 (dwarf2_rnglists_process): New function.
9475 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9476 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9477 (read_attribute_value): Handle DW_FORM_implicit_const,
9478 DW_FORM_line_strp.
9479 (read_attribute): Handle DW_FORM_implicit_const.
9480 (read_indirect_string_at_offset_from): New function from
9481 read_indirect_string_at_offset.
9482 (read_indirect_string_at_offset): Call
9483 read_indirect_string_at_offset_from.
9484 (read_indirect_line_string_at_offset): New function.
9485 (read_indirect_string): New function comment.
9486 (read_indirect_line_string): New function.
9487 (read_unsigned_leb128): Make it global.
9488 (dwarf2_string_attr): Handle DWARF-5.
9489 (add_include_dir_stub, read_formatted_entries): New functions.
9490 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9491 Handle DWARF-5.
9492 (per_cu_header_read_in): Update read_comp_unit_head caller.
9493 (dwarf2_version): New function.
9494 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9495 rnglists.
9496 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9497 fields.
9498
9499 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9500
9501 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9502
9503 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9504
9505 * dwarf2read.c (dwarf2_ranges_process): New function from
9506 dwarf2_ranges_read.
9507 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9508 dwarf2_ranges_process.
9509
9510 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9511
9512 * dwarf2read.c (create_debug_type_hash_table): New function from
9513 create_debug_types_hash_table.
9514 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9515 (create_all_type_units, open_and_init_dwo_file): Update
9516 create_debug_types_hash_table callers.
9517
9518 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9519
9520 PR gdb/16188
9521 * fork-child.c (trace_start_error): Fix thinko. va_end should
9522 refer to 'ap', not 'args'.
9523
9524 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9525 Pedro Alves <palves@redhat.com>
9526
9527 PR gdb/16188
9528 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9529 calls succeeded.
9530 * fork-child.c (trace_start_error): New function.
9531 (trace_start_error_with_name): Likewise.
9532 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9533 * inf-ptrace.c (inf_ptrace_me): Likewise.
9534 * inferior.h (trace_start_error): New prototype.
9535 (trace_start_error_with_name): Likewise.
9536
9537 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9538
9539 PR gdb/21164
9540 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9541 NULL before using it.
9542 * symmisc.c (maintenance_print_symbols): Likewise.
9543 (maintenance_print_msymbols): Likewise.
9544
9545 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9546
9547 * NEWS: Add record Python bindings entry.
9548
9549 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9550
9551 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9552 py-record-full.o.
9553 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9554 * python/py-record-btrace.c, python/py-record-btrace.h,
9555 python/py-record-full.c, python/py-record-full.h: New file.
9556 * python/py-record.c: Add include for py-record-btrace.h and
9557 py-record-full.h.
9558 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9559 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9560 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9561 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9562 New definition.
9563 (gdbpy_initialize_btrace): New export.
9564 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9565
9566 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9567
9568 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9569 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9570 * python/py-record.c: New file.
9571 * python/python-internal.h (gdbpy_start_recording,
9572 gdbpy_current_recording, gdpy_stop_recording,
9573 gdbpy_initialize_record): New export.
9574 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9575 (python_GdbMethods): Add gdbpy_start_recording,
9576 gdbpy_current_recording and gdbpy_stop_recording.
9577
9578 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9579
9580 * record-btrace.c (record_btrace_record_method): New function.
9581 (init_record_btrace_ops): Initialize to_record_method.
9582 * record-full.c (record_full_record_method): New function.
9583 (init_record_full_ops, init_record_full_core_ops): Add
9584 record_full_record_method.
9585 * record.h (enum record_method): New enum.
9586 * target-debug.h (target_debug_print_enum_record_method: New define.
9587 * target-delegates.c: Regenerate.
9588 * target.c (target_record_method): New function.
9589 * target.h: Include record.h.
9590 (struct target_ops) <to_record_method>: New field.
9591 (target_record_method): New export.
9592
9593 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9594
9595 * record.h (record_start, record_stop): New export.
9596 * record.c (record_start, record_stop): New function.
9597
9598 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9599
9600 * btrace.c (btrace_fetch): Copy function call segments pointer
9601 into a vector.
9602 (btrace_clear): Clear the vector.
9603 (btrace_find_insn_by_number): Use binary search to find the correct
9604 function call segment.
9605 * btrace.h (brace_fun_p): New typedef.
9606 (struct btrace_thread_info) <functions>: New field.
9607
9608 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9609
9610 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9611 * btrace.c (btrace_decode_error): ... here. New function.
9612 * btrace.h (btrace_decode_error): New export.
9613
9614 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9615
9616 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9617 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9618 btrace_find_insn_by_number): Remove special case for gaps.
9619 * btrace.h (btrace_insn_get_error): New export.
9620 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9621 * record-btrace.c (btrace_insn_history): Print number for gaps.
9622 (record_btrace_info, record_btrace_goto): Handle gaps.
9623
9624 2017-02-14 Tom Tromey <tom@tromey.com>
9625
9626 PR python/13598:
9627 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9628 event.
9629 * python/py-evts.c (gdbpy_initialize_py_events): Add
9630 before_prompt registry.
9631 * python/py-events.h (events_object) <before_prompt>: New field.
9632
9633 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9634
9635 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9636
9637 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9638
9639 * symfile (_initialize_symfile): Add usage text to the load command's
9640 help text.
9641
9642 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9643
9644 * utils.c (defaulted_query): Don't query on secondary UIs.
9645
9646 2017-02-10 Tom Tromey <tom@tromey.com>
9647
9648 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9649
9650 2017-02-10 Tom Tromey <tom@tromey.com>
9651
9652 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9653 "cleanup" local.
9654 * python/py-type.c (typy_legacy_template_argument): Remove
9655 unnecessary "cleanup" local.
9656
9657 2017-02-10 Tom Tromey <tom@tromey.com>
9658
9659 * python/python.c (do_start_initialization): New function, from
9660 _initialize_python.
9661 (_initialize_python): Call do_start_initialization.
9662 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9663 goto.
9664
9665 2017-02-10 Tom Tromey <tom@tromey.com>
9666
9667 * python/py-prettyprint.c (pretty_print_one_value): Use
9668 gdbpy_ref.
9669
9670 2017-02-10 Tom Tromey <tom@tromey.com>
9671
9672 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9673 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9674 gdbpy_ref.
9675 * python/py-type.c (field_new): Use gdbpy_ref.
9676 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9677 gdbpy_ref.
9678 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9679 (py_free_pspace): Likewise.
9680 (pspace_to_pspace_object): Likewise.
9681 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9682 (py_free_objfile): Likewise.
9683 (objfile_to_objfile_object): Likewise.
9684 * python/py-inferior.c (delete_thread_object): Use
9685 gdbpy_ref.
9686 (infpy_read_memory): Likewise.
9687 (py_free_inferior): Likewise.
9688 * python/py-evtregistry.c (create_eventregistry_object): Use
9689 gdbpy_ref.
9690 * python/py-event.c (create_event_object): Use gdbpy_ref.
9691
9692 2017-02-10 Tom Tromey <tom@tromey.com>
9693
9694 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9695 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9696 used.
9697 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9698 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9699 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9700 python/py-framefilter.c, python/py-function.c,
9701 python/py-inferior.c, python/py-infevents.c,
9702 python/py-linetable.c, python/py-newobjfileevent.c,
9703 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9704 python/py-signalevent.c, python/py-stopevent.c,
9705 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9706 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9707 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9708 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9709
9710 2017-02-10 Tom Tromey <tom@tromey.com>
9711
9712 * ui-out.h (ui_out_emit_type): New class.
9713 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9714 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9715 and ui_out_emit_tuple.
9716 (enumerate_locals): Likewise.
9717 (py_mi_print_variables, py_print_locals, py_print_args): Use
9718 ui_out_emit_list.
9719 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9720 ui_out_emit_list.
9721 * common/gdb_optional.h: New file.
9722
9723 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9724
9725 * MAINTAINERS (Write After Approval): Update my e-mail address.
9726
9727 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9728
9729 PR gdb/21122
9730 * breakpoint.c (_initialize_breakpoint): Update the help description
9731 of the 'commands' command to indicate that it takes a list argument.
9732
9733 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9734
9735 * interps.c (current_interp_set_logging): Remove "return".
9736
9737 2017-02-09 Gary Benson <gbenson@redhat.com>
9738
9739 * symtab.c (add_symtab_completions): Prevent NULL pointer
9740 dereference.
9741
9742 2017-02-08 Pedro Alves <palves@redhat.com>
9743
9744 * interps.c (interp::interp): Remove reference to quiet_p.
9745 (interp_set): Make static. Remove dead "Switching to" output
9746 code.
9747 (interp_quiet_p, interp_set_quiet): Delete.
9748 (interpreter_exec_cmd): Don't set the interpreter quiet.
9749 * interps.h (interp_quiet_p): Make static.
9750 (class interp) <quiet_p>: Remove field
9751
9752 2017-02-08 Jerome Guitton <guitton@adacore.com>
9753
9754 * cli/cli-decode.c (find_command_name_length): Make it extern.
9755 * cli/cli-decode.h (find_command_name_length): Declare.
9756 * cli/cli-script.c (command_name_equals, line_first_arg):
9757 New functions.
9758 (process_next_line): Use cli-decode to parse command names.
9759 (build_command_line): Make args a constant pointer.
9760
9761 2017-02-08 Jerome Guitton <guitton@adacore.com>
9762
9763 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9764 Remove case-insensitive search.
9765
9766 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9767
9768 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9769 at the end of the line. Avoids an ARI warning.
9770
9771 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
9772
9773 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9774 rdseed instructions.
9775 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9776
9777 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9778
9779 PR tdep/20936
9780 Provide and use sparc32 and sparc64 target description XML files.
9781 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9782 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9783 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9784 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9785 * features/sparc/sparc32-solaris.xml: New file.
9786 * features/sparc/sparc64-solaris.xml: New file.
9787 * features/sparc/sparc32-solaris.c: Generated.
9788 * features/sparc/sparc64-solaris.c: Generated.
9789 * sparc-tdep.h: Account for differences in target descriptions.
9790 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9791 (sparc32_register_type): Use target provided registers.
9792 (validate_tdesc_registers): New function.
9793 (sparc32_gdbarch_init): Use tdesc_has_registers.
9794 Set pseudoregister functions.
9795 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9796 (sparc64_register_type): Use target provided registers.
9797 (sparc64_init_abi): Set pseudoregister functions.
9798
9799 2017-02-03 Tom Tromey <tom@tromey.com>
9800
9801 PR rust/21097:
9802 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9803 with a single member.
9804
9805 2017-02-03 Pedro Alves <palves@redhat.com>
9806
9807 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9808 (cli_interp_base::~cli_interp_base): New.
9809 (cli_interp): New struct.
9810 (as_cli_interp): Cast the interp itself to cli_interp.
9811 (cli_interpreter_pre_command_loop): Rename to ...
9812 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9813 parameter.
9814 (cli_interpreter_init): Rename to ...
9815 (cli_interp::init): ... this. Remove 'self' parameter. Use
9816 boolean. Make extern.
9817 (cli_interpreter_resume): Rename to ...
9818 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9819 extern.
9820 (cli_interpreter_suspend): Rename to ...
9821 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9822 extern.
9823 (cli_interpreter_exec): Rename to ...
9824 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9825 extern.
9826 (cli_interpreter_supports_command_editing): Rename to ...
9827 (cli_interp_base::supports_command_editing): ... this. Remove
9828 'interp' parameter. Make extern.
9829 (cli_ui_out): Rename to ...
9830 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9831 Make extern.
9832 (cli_set_logging): Rename to ...
9833 (cli_interp_base::set_logging): ... this. Remove 'interp'
9834 parameter. Make extern.
9835 (cli_interp_procs): Delete.
9836 (cli_interp_factory): Adjust to use "new".
9837 * cli/cli-interp.h: Include "interps.h".
9838 (struct cli_interp_base): New struct.
9839 * interps.c (struct interp): Delete. Fields moved to interps.h.
9840 (interp_new): Delete.
9841 (interp::interp, interp::~interp): New.
9842 (interp_set): Use bool, and return void. Assume the interpreter
9843 has suspend, init and resume methods, and that the all return
9844 void.
9845 (set_top_level_interpreter): interp_set returns void.
9846 (interp_ui_out): Adapt.
9847 (current_interp_set_logging): Adapt.
9848 (interp_data): Delete.
9849 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9850 (interp_exec): Adapt.
9851 (top_level_interpreter_data): Delete.
9852 * interps.h (interp_init_ftype, interp_resume_ftype)
9853 (interp_suspend_ftype, interp_exec_ftype)
9854 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9855 (class interp): New.
9856 (interp_new): Delete.
9857 (interp_set): Now returns void. Use bool.
9858 (interp_data, top_level_interpreter_data): Delete.
9859 * mi/mi-common.h: Include interps.h.
9860 (class mi_interp): Inherit from interp. Define a ctor. Declare
9861 init, resume, suspect, exec, interp_ui_out, set_logging and
9862 pre_command_loop methods.
9863 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9864 (mi_interpreter_init): Rename to ...
9865 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9866 bool, return void and make extern. Adjust.
9867 (mi_interpreter_resume): ... Rename to ...
9868 (mi_interp::resume): ... this. Remove the 'data' parameter,
9869 return void and make extern. Adjust.
9870 (mi_interpreter_suspend): ... Rename to ...
9871 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9872 return void and make extern. Adjust.
9873 (mi_interpreter_exec): ... Rename to ...
9874 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9875 extern. Adjust.
9876 (mi_interpreter_pre_command_loop): ... Rename to ...
9877 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9878 parameter and make extern.
9879 (mi_on_normal_stop_1): Adjust.
9880 (mi_ui_out): Rename to ...
9881 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9882 parameter and make extern. Adjust.
9883 (mi_set_logging): Rename to ...
9884 (mi_interp::set_logging): ... this. Remove the 'interp'
9885 parameter and make extern. Adjust.
9886 (mi_interp_procs): Delete.
9887 (mi_interp_factory): Adjust to use 'new'.
9888 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9889 (mi_print_exception, mi_execute_command, mi_load_progress):
9890 Adjust.
9891 * tui/tui-interp.c (tui_interp): New class.
9892 (as_tui_interp): Return a tui_interp pointer.
9893 (tui_on_normal_stop, tui_on_signal_received)
9894 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9895 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9896 to use interp::interp_ui_out.
9897 (tui_init): Rename to ...
9898 (tui_interp::init): ... this. Remove the 'self' parameter, use
9899 bool, return void and make extern. Adjust.
9900 (tui_resume): Rename to ...
9901 (tui_interp::resume): ... this. Remove the 'data' parameter,
9902 return void and make extern. Adjust.
9903 (tui_suspend): Rename to ...
9904 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9905 return void and make extern. Adjust.
9906 (tui_ui_out): Rename to ...
9907 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9908 parameter, and make extern. Adjust.
9909 (tui_exec): Rename to ...
9910 (tui_interp::exec): ... this. Remove the 'data' parameter and
9911 make extern.
9912 (tui_interp_procs): Delete.
9913 (tui_interp_factory): Use "new".
9914
9915 2017-02-02 Tom Tromey <tom@tromey.com>
9916
9917 * rust-exp.y (ends_raw_string, space_then_number)
9918 (rust_identifier_start_p): Return bool.
9919 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9920 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9921 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9922 (rust_chartype_p): Return bool.
9923 (val_print_struct, rust_print_struct_def, rust_print_type):
9924 Update.
9925 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9926 Return bool.
9927
9928 2017-02-02 Tom Tromey <tom@tromey.com>
9929
9930 * rust-lang.c: Reindent.
9931
9932 2017-02-02 Tom Tromey <tom@tromey.com>
9933
9934 * rust-lang.h (rust_crate_for_block): Update.
9935 * rust-lang.c (rust_crate_for_block): Return std::string.
9936 (rust_get_disr_info): Use std:;string, not
9937 gdb::unique_xmalloc_ptr.
9938 * rust-exp.y (crate_name): Update.
9939
9940 2017-02-02 Pedro Alves <palves@redhat.com>
9941
9942 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9943 field out of gdb_disassembler_test and make it static.
9944
9945 2017-02-02 Pedro Alves <palves@redhat.com>
9946
9947 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9948 mi1_interp and mi_interp fields.
9949
9950 2017-02-02 Pedro Alves <palves@redhat.com>
9951
9952 * cli/cli-interp.c (struct saved_output_files, saved_output):
9953 Moved from cli/cli-logging.c.
9954 (cli_set_logging): New function.
9955 (cli_interp_procs): Install cli_set_logging.
9956 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9957 Declare.
9958 * cli/cli-logging.c (struct saved_output_files, saved_output):
9959 Moved to cli/cli-interp.c.
9960 (pop_output_files): Don't save outputs here.
9961 (make_logging_output): New function.
9962 (handle_redirections): Don't build tee nor save previous outputs
9963 here.
9964 * interps.c (current_interp_set_logging): Change prototype.
9965 Assume there's always a set_logging_proc method installed.
9966 * interps.h (interp_set_logging_ftype): Change prototype.
9967 (current_interp_set_logging): Change prototype and adjust comment.
9968 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9969 use make_logging_output.
9970 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9971 2017-02-02 Pedro Alves <palves@redhat.com>
9972
9973 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9974 from ...
9975 (set_logging_overwrite): ... here.
9976 (logging_no_redirect_file): Delete.
9977 (set_logging_redirect): Don't handle redirection on the fly.
9978 Instead warn that "logging off" / "logging on" is necessary.
9979 (pop_output_files): Delete references to logging_no_redirect_file.
9980 (show_logging_command): Always speak in terms of what will happen
9981 once logging is reenabled.
9982
9983 2017-02-02 Pedro Alves <palves@redhat.com>
9984
9985 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9986
9987 2017-02-02 Pedro Alves <palves@redhat.com>
9988
9989 * disasm.c (gdb_pretty_print_insn): Rename to ...
9990 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9991 Remove gdbarch parameter. Adapt to clear the object's buffers
9992 instead of allocating new buffers, and to print using the object's
9993 gdb_disassembler instead of calling gdb_print_insn.
9994 (dump_insns): Use gdb_pretty_print_disassembler.
9995 * disasm.h (gdb_pretty_print_insn): Delete declaration.
9996 (gdb_pretty_print_disassembler): New class.
9997 * record-btrace.c (btrace_insn_history): Use
9998 gdb_pretty_print_disassembler.
9999
10000 2017-02-02 Pedro Alves <palves@redhat.com>
10001
10002 * ada-lang.c (type_as_string): Use string_file.
10003 * ada-valprint.c (ada_print_floating): Use string_file.
10004 * ada-varobj.c (ada_varobj_scalar_image)
10005 (ada_varobj_get_value_image): Use string_file.
10006 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10007 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10008 * breakpoint.c (update_inserted_breakpoint_locations)
10009 (insert_breakpoint_locations, reattach_breakpoints)
10010 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10011 (print_it_watchpoint): Use string_file.
10012 (save_breakpoints): Use stdio_file.
10013 * c-exp.y (oper): Use string_file.
10014 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10015 tee_file.
10016 (pop_output_files): Use delete.
10017 (handle_redirections): Use stdio_file and tee_file.
10018 * cli/cli-setshow.c (do_show_command): Use string_file.
10019 * compile/compile-c-support.c (c_compute_program): Use
10020 string_file.
10021 * compile/compile-c-symbols.c (generate_vla_size): Take a
10022 'string_file &' instead of a 'ui_file *'.
10023 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10024 of a 'ui_file *'. Use string_file.
10025 (generate_c_for_variable_locations): Take a 'string_file &'
10026 instead of a 'ui_file *'.
10027 * compile/compile-internal.h (generate_c_for_for_one_variable):
10028 Take a 'string_file &' instead of a 'ui_file *'.
10029 * compile/compile-loc2c.c (push, pushf, unary, binary)
10030 (print_label, pushf_register_address, pushf_register)
10031 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10032 'ui_file *'. Adjust.
10033 * compile/compile.c (compile_to_object): Use string_file.
10034 * compile/compile.h (compile_dwarf_expr_to_c)
10035 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10036 'ui_file *'.
10037 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10038 (replace_typedefs_qualified_name): Use string_file and
10039 obstack_copy0.
10040 * disasm.c (gdb_pretty_print_insn): Use string_file.
10041 (gdb_disassembly): Adjust reference the null_stream global.
10042 (do_ui_file_delete): Delete.
10043 (gdb_insn_length): Use null_stream.
10044 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10045 * dwarf2loc.c (dwarf2_compile_property_to_c)
10046 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10047 'string_file &' instead of a 'ui_file *'.
10048 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10049 * dwarf2read.c (do_ui_file_peek_last): Delete.
10050 (dwarf2_compute_name): Use string_file.
10051 * event-top.c (gdb_setup_readline): Use stdio_file.
10052 * gdbarch.sh (verify_gdbarch): Use string_file.
10053 * gdbtypes.c (safe_parse_type): Use null_stream.
10054 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10055 string_file.
10056 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10057 'string_file *' instead of a 'ui_file *'.
10058 (gdbscm_arch_disassemble): Use string_file.
10059 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10060 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10061 inherits from ui_file.
10062 (ioscm_file_port_delete, ioscm_file_port_rewind)
10063 (ioscm_file_port_put): Delete.
10064 (ioscm_file_port_write): Rename to ...
10065 (ioscm_file_port::write): ... this. Remove file_port_magic
10066 checks.
10067 (ioscm_file_port_new): Delete.
10068 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10069 ui_file_up.
10070 * guile/scm-type.c (tyscm_type_name): Use string_file.
10071 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10072 Use string_file.
10073 * infcmd.c (print_return_value_1): Use string_file.
10074 * infrun.c (print_target_wait_results): Use string_file.
10075 * language.c (add_language): Use string_file.
10076 * location.c (explicit_to_string_internal): Use string_file.
10077 * main.c (captured_main_1): Use null_file.
10078 * maint.c (maintenance_print_architecture): Use stdio_file.
10079 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10080 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10081 event_channel>: Change type to mi_console_file pointer.
10082 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10083 (mi_console_file_delete): Delete.
10084 (struct mi_console_file): Delete.
10085 (mi_console_file_magic): Delete.
10086 (mi_console_file_new): Delete.
10087 (mi_console_file::mi_console_file): New.
10088 (mi_console_file_delete): Delete.
10089 (mi_console_file_fputs): Delete.
10090 (mi_console_file::write): New.
10091 (mi_console_raw_packet): Delete.
10092 (mi_console_file::flush): New.
10093 (mi_console_file_flush): Delete.
10094 (mi_console_set_raw): Rename to ...
10095 (mi_console_file::set_raw): ... this.
10096 * mi/mi-console.h (class mi_console_file): New class.
10097 (mi_console_file_new, mi_console_set_raw): Delete.
10098 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10099 (mi_set_logging): Use delete and tee_file. Adjust.
10100 * mi/mi-main.c (output_register): Use string_file.
10101 (mi_cmd_data_evaluate_expression): Use string_file.
10102 (mi_cmd_data_read_memory): Use string_file.
10103 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10104 * mi/mi-out.c (mi_ui_out::main_stream): New.
10105 (mi_ui_out::rewind): Use main_stream and
10106 string_file.
10107 (mi_ui_out::put): Use main_stream and string_file.
10108 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10109 Allocate a 'string_file' instead.
10110 (mi_out_new): Don't allocate a mem_fileopen stream here.
10111 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10112 (mi_ui_out::main_stream): Declare method.
10113 * printcmd.c (eval_command): Use string_file.
10114 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10115 * python/py-arch.c (archpy_disassemble): Use string_file.
10116 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10117 * python/py-frame.c (frapy_str): Use string_file.
10118 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10119 Use string_file.
10120 * python/py-type.c (typy_str): Use string_file.
10121 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10122 * python/py-value.c (valpy_str): Use string_file.
10123 * record-btrace.c (btrace_insn_history): Use string_file.
10124 * regcache.c (regcache_print): Use stdio_file.
10125 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10126 * remote.c (escape_buffer): Use string_file.
10127 * rust-lang.c (rust_get_disr_info): Use string_file.
10128 * serial.c (serial_open_ops_1): Use stdio_file.
10129 (do_serial_close): Use delete.
10130 * stack.c (print_frame_arg): Use string_file.
10131 (print_frame_args): Remove local mem_fileopen stream, not used.
10132 (print_frame): Use string_file.
10133 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10134 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10135 Take a 'string_file *' instead of a 'ui_file *'.
10136 * top.c (new_ui): Use stdio_file and stderr_file.
10137 (free_ui): Use delete.
10138 (execute_command_to_string): Use string_file.
10139 (quit_confirm): Use string_file.
10140 * tracepoint.c (collection_list::append_exp): Use string_file.
10141 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10142 * tui/tui-file.c: Don't include "ui-file.h".
10143 (enum streamtype, struct tui_stream): Delete.
10144 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10145 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10146 (tui_file::tui_file): New method.
10147 (tui_file_fputs): Delete.
10148 (tui_file_get_strbuf): Delete.
10149 (tui_file::puts): New method.
10150 (tui_file_adjust_strbuf): Delete.
10151 (tui_file_flush): Delete.
10152 (tui_file::flush): New method.
10153 * tui/tui-file.h: Tweak intro comment.
10154 Include ui-file.h.
10155 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10156 (tui_file_adjust_strbuf): Delete declarations.
10157 (class tui_file): New class.
10158 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10159 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10160 (tui_register_format): Use string_stream.
10161 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10162 (tui_get_function_from_frame): Use string_file.
10163 * typeprint.c (type_to_string): Use string_file.
10164 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10165 (null_stream): New global.
10166 (ui_file_delete): Delete.
10167 (ui_file::ui_file): New.
10168 (null_file_isatty): Delete.
10169 (ui_file::~ui_file): New.
10170 (null_file_rewind): Delete.
10171 (ui_file::printf): New.
10172 (null_file_put): Delete.
10173 (null_file_flush): Delete.
10174 (ui_file::putstr): New.
10175 (null_file_write): Delete.
10176 (ui_file::putstrn): New.
10177 (null_file_read): Delete.
10178 (ui_file::putc): New.
10179 (null_file_fputs): Delete.
10180 (null_file_write_async_safe): Delete.
10181 (ui_file::vprintf): New.
10182 (null_file_delete): Delete.
10183 (null_file::write): New.
10184 (null_file_fseek): Delete.
10185 (null_file::puts): New.
10186 (ui_file_data): Delete.
10187 (null_file::write_async_safe): New.
10188 (gdb_flush, ui_file_isatty): Adjust.
10189 (ui_file_put, ui_file_rewind): Delete.
10190 (ui_file_write): Adjust.
10191 (ui_file_write_for_put): Delete.
10192 (ui_file_write_async_safe, ui_file_read): Adjust.
10193 (ui_file_fseek): Delete.
10194 (fputs_unfiltered): Adjust.
10195 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10196 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10197 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10198 (set_ui_file_data): Delete.
10199 (string_file::~string_file, string_file::write)
10200 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10201 (do_ui_file_as_string, ui_file_as_string): Delete.
10202 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10203 (struct mem_file): Delete.
10204 (mem_file_new): Delete.
10205 (stdio_file::stdio_file): New.
10206 (mem_file_delete): Delete.
10207 (stdio_file::stdio_file): New.
10208 (mem_fileopen): Delete.
10209 (stdio_file::~stdio_file): New.
10210 (mem_file_rewind): Delete.
10211 (stdio_file::set_stream): New.
10212 (mem_file_put): Delete.
10213 (stdio_file::open): New.
10214 (mem_file_write): Delete.
10215 (stdio_file_magic, struct stdio_file): Delete.
10216 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10217 (stdio_file::flush): New.
10218 (stdio_file_read): Rename to ...
10219 (stdio_file::read): ... this. Adjust.
10220 (stdio_file_write): Rename to ...
10221 (stdio_file::write): ... this. Adjust.
10222 (stdio_file_write_async_safe): Rename to ...
10223 (stdio_file::write_async_safe) ... this. Adjust.
10224 (stdio_file_fputs): Rename to ...
10225 (stdio_file::puts) ... this. Adjust.
10226 (stdio_file_isatty): Delete.
10227 (stdio_file_fseek): Delete.
10228 (stdio_file::isatty): New.
10229 (stderr_file_write): Rename to ...
10230 (stderr_file::write) ... this. Adjust.
10231 (stderr_file_fputs): Rename to ...
10232 (stderr_file::puts) ... this. Adjust.
10233 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10234 (stderr_file::stderr_file): New.
10235 (tee_file_magic): Delete.
10236 (struct tee_file): Delete.
10237 (tee_file::tee_file): New.
10238 (tee_file_new): Delete.
10239 (tee_file::~tee_file): New.
10240 (tee_file_delete): Delete.
10241 (tee_file_flush): Rename to ...
10242 (tee_file::flush): ... this. Adjust.
10243 (tee_file_write): Rename to ...
10244 (tee_file::write): ... this. Adjust.
10245 (tee_file::write_async_safe): New.
10246 (tee_file_fputs): Rename to ...
10247 (tee_file::puts): ... this. Adjust.
10248 (tee_file_isatty): Rename to ...
10249 (tee_file::isatty): ... this. Adjust.
10250 * ui-file.h (struct obstack, struct ui_file): Don't
10251 forward-declare.
10252 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10253 (ui_file_write_ftype)
10254 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10255 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10256 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10257 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10258 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10259 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10260 (set_ui_file_fseek): Delete.
10261 (ui_file_data, ui_file_delete, ui_file_rewind)
10262 (struct ui_file): New.
10263 (ui_file_up): New.
10264 (class null_file): New.
10265 (null_stream): Declare.
10266 (ui_file_write_for_put, ui_file_put): Delete.
10267 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10268 Delete.
10269 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10270 (gdb_fopen, tee_file_new): Delete.
10271 (struct string_file): New.
10272 (struct stdio_file): New.
10273 (stdio_file_up): New.
10274 (struct stderr_file): New.
10275 (class tee_file): New.
10276 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10277 of a 'ui_file *'. Adjust.
10278 * ui-out.h (class ui_out) <field_stream>: Likewise.
10279 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10280 (null_stream): Delete.
10281 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10282 Adjust.
10283 * utils.h (struct ui_file): Delete forward declaration..
10284 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10285 (error_stream): Take a 'string_file &' instead of a
10286 'ui_file *'.
10287 * varobj.c (varobj_value_get_print_value): Use string_file.
10288 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10289 * gdbarch.c: Regenerate.
10290
10291 2017-02-02 Pedro Alves <palves@redhat.com>
10292
10293 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10294 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10295 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10296 Adjust to call gdb_print_insn instead of
10297 gdb_disassembler::print_insn.
10298 (dump_insns, do_mixed_source_and_assembly_deprecated)
10299 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10300 'gdbarch' parameter. Remove gdb_disassembler parameter.
10301 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10302 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10303 declaration.
10304 (gdb_pretty_print_insn): Re-add declaration.
10305 * record-btrace.c (btrace_insn_history): Don't allocate a
10306 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10307
10308 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10309
10310 * disasm.h (gdb_disassembly): Remove file_string parameter.
10311 * disasm.c (gdb_disassembly): Likewise.
10312 * cli/cli-cmds.c (print_disassembly): Adapt.
10313 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10314 * stack.c (do_gdb_disassembly): Likewise.
10315
10316 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10317
10318 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10319 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10320 targets. And if the implicit value is longer than needed, extract
10321 the first bytes instead of the "least significant" ones.
10322
10323 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10324
10325 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10326 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10327 (btrace_fetch): Assert can_access_registers_ptid.
10328 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10329 validate_registers_access.
10330
10331 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10332
10333 * gdbthread.h (can_access_registers_ptid): New.
10334 * thread.c (can_access_registers_ptid): New.
10335
10336 2017-02-01 Pedro Alves <palves@redhat.com>
10337
10338 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10339
10340 2017-01-31 Pedro Alves <palves@redhat.com>
10341
10342 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10343 Fix typos.
10344
10345 2017-01-31 Pedro Alves <palves@redhat.com>
10346
10347 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10348 not used.
10349
10350 2017-01-31 Pedro Alves <palves@redhat.com>
10351
10352 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10353
10354 2017-01-31 Pedro Alves <palves@redhat.com>
10355
10356 * common/scoped_restore.h
10357 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10358 change the value's parameter type to T2.
10359 (make_scoped_restore): Likewise.
10360
10361 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10362 Richard Henderson <rth@redhat.com>
10363
10364 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10365 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10366 GS_BASE for older kernels.
10367 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10368 GS_BASE for older kernels.
10369 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10370 and GS_BASE to the offset table.
10371 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10372 system register group.
10373 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10374 for older kernels.
10375 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10376 amd64 ABI.
10377 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10378 AMD64_GSBASE_REGNUM.
10379 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10380 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10381 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10382 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10383 i386/64bit-segments.xml in those rules.
10384 * features/i386/64bit-segments.xml: New file.
10385 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10386 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10387 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10388 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10389 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10390 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10391 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10392 * features/i386/amd64-avx-linux.c: Regenerated.
10393 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10394 * features/i386/amd64-avx-mpx.c: Regenerated.
10395 * features/i386/amd64-avx512-linux.c: Regenerated.
10396 * features/i386/amd64-linux.c: Regenerated.
10397 * features/i386/amd64-mpx-linux.c: Regenerated.
10398 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10399 * features/i386/i386-avx-mpx.c: Regenerated.
10400 * features/i386/x32-avx-linux.c: Regenerated.
10401 * features/i386/x32-avx512-linux.c: Regenerated.
10402 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10403 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10404 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10405 * regformats/i386/amd64-linux.dat: Regenerated.
10406 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10407 * regformats/i386/x32-avx-linux.dat: Regenerated.
10408 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10409 * regformats/i386/x32-linux.dat: Regenerated.
10410
10411 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10412
10413 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10414 Set to AMD64_NUM_REGS.
10415
10416 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10417
10418 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10419 that checks validity of a register number.
10420
10421 2017-01-27 Kees Cook <keescook@google.com>
10422
10423 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10424 fetch_fpregs if target has fpa registers.
10425 (arm_linux_store_inferior_registers): Call store_fpregs if target
10426 has fpa registers.
10427
10428 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10429
10430 * cris-tdep.c (cris_gdbarch_init): Remove check for
10431 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10432
10433 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10434
10435 * corelow.c (get_core_register_section): Check for regset
10436 existence before checking for REGSET_VARIABLE_SIZE.
10437
10438 2017-01-26 Yao Qi <yao.qi@linaro.org>
10439 Pedro Alves <palves@redhat.com>
10440
10441 PR gdb/20939
10442 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10443 call memory_error, save memaddr instead.
10444 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10445 negative, cal memory_error.
10446 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10447
10448 2017-01-26 Yao Qi <yao.qi@linaro.org>
10449
10450 * disasm-selftests.c (memory_error_test): New function.
10451 (_initialize_disasm_selftests): Register memory_error_test.
10452
10453 2017-01-26 Yao Qi <yao.qi@linaro.org>
10454
10455 * Makefile.in (SFILES): Add disasm-selftests.c and
10456 selftest-arch.c.
10457 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10458 * disasm-selftests.c: New file.
10459 * selftest-arch.c: New file.
10460 * selftest-arch.h: New file.
10461
10462 2017-01-26 Yao Qi <yao.qi@linaro.org>
10463
10464 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10465 to bfd_arch_mep. Don't return 0 if section is not
10466 found. Call print_insn_mep.
10467
10468 2017-01-26 Pedro Alves <palves@redhat.com>
10469 Yao Qi <yao.qi@linaro.org>
10470
10471 * arm-tdep.c: Include "disasm.h".
10472 (gdb_print_insn_arm): Update code to get gdbarch.
10473 * disasm.c (dis_asm_read_memory): Change it to
10474 gdb_disassembler::dis_asm_read_memory.
10475 (dis_asm_memory_error): Likewise.
10476 (dis_asm_print_address): Likewise.
10477 (gdb_pretty_print_insn): Change it to
10478 gdb_disassembler::pretty_print_insn.
10479 (dump_insns): Add one argument gdb_disassemlber. All
10480 callers updated.
10481 (do_mixed_source_and_assembly_deprecated): Likewise.
10482 (do_mixed_source_and_assembly): Likewise.
10483 (do_assembly_only): Likewise.
10484 (gdb_disassembler::gdb_disassembler): New.
10485 (gdb_disassembler::print_insn): New.
10486 * disasm.h (class gdb_disassembler): New.
10487 (gdb_pretty_print_insn): Remove declaration.
10488 (gdb_disassemble_info): Likewise.
10489 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10490 (gdbscm_disasm_read_memory_worker): Update.
10491 (gdbscm_disasm_read_memory): Update.
10492 (gdbscm_disasm_memory_error): Remove.
10493 (gdbscm_disasm_print_address): Remove.
10494 (gdbscm_disassembler::gdbscm_disassembler): New.
10495 (gdbscm_print_insn_from_port): Update.
10496 * mips-tdep.c: Include disasm.h.
10497 (gdb_print_insn_mips): Update code to get gdbarch.
10498 * record-btrace.c (btrace_insn_history): Update.
10499 * spu-tdep.c: Include disasm.h.
10500 (struct spu_dis_asm_data): Remove.
10501 (struct spu_dis_asm_info): New.
10502 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10503 SPU id.
10504 (gdb_print_insn_spu): Cast disassemble_info to
10505 spu_dis_asm_info.
10506
10507 2017-01-26 Yao Qi <yao.qi@linaro.org>
10508
10509 * disasm.c (do_ui_file_delete): Delete.
10510 (gdb_insn_length): Move code creating stream to ...
10511 * utils.c (null_stream): ... here. New function.
10512 * utils.h (null_stream): Declare.
10513
10514 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10515
10516 * python/py-inferior.c (find_thread_object): Return directly
10517 from the loop. Remove "found" variable.
10518
10519 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10520
10521 GDB 7.12.1 released.
10522
10523 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10524
10525 * python/py-function.c (fnpy_call): Reorder declarations to have
10526 the gdbpy_enter object declared first.
10527 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10528
10529 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10530
10531 PR python/21068
10532 * python/python-internal.h (PyMem_RawMalloc): Define for
10533 Python < 3.4.
10534 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10535 PyMem_RawMalloc instead of PyMem_Malloc.
10536
10537 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10538 Luis Machado <lgustavo@codesourcery.com>
10539
10540 * NEWS (New commands): Mention flash-erase.
10541 (New MI commands): Mention target-flash-erase.
10542 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10543 command.
10544 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10545 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10546 * target.c (flash_erase_command): New function.
10547 (initialize_targets): Add new flash-erase command.
10548 * target.h (flash_erase_command): New declaration.
10549
10550 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10551
10552 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10553 HAVE_SYS_PROCFS_H is defined.
10554
10555 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10556
10557 * remote.c (struct cached_reg): Change data into a pointer.
10558 * (stop_reply_dtr): Free data pointers before deleting vector.
10559 (process_stop_reply): Likewise.
10560 (remote_parse_stop_reply): Allocate space for data
10561
10562 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10563
10564 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10565 MAX_REGISTER_SIZE.
10566 (amd64_pseudo_register_read_value): Likewise.
10567 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10568 (store_register_using_P): Likewise.
10569 * regcache.c (regcache_xfer_part): Likewise.
10570
10571 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10572
10573 Split real and pseudo registers.
10574 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10575 (sparc32_pseudo_regnum): New enum.
10576 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10577 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10578 (SPARC32_CP0_REGISTERS): New macro.
10579 (sparc32_pseudo_register_name): New function.
10580 (sparc32_register_name): Use sparc32_pseudo_register_name.
10581 (sparc32_pseudo_register_type): New function.
10582 (sparc32_register_type): Use sparc32_pseudo_register_type.
10583 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10584 pseudo register numbers.
10585 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10586 (SPARC64_CP0_REGISTERS): New macro.
10587 (sparc64_pseudo_register_name): New function.
10588 (sparc64_register_name): Use sparc64_pseudo_register_name.
10589 (sparc64_pseudo_register_type): New function.
10590 (sparc64_register_type): Use sparc64_pseudo_register_type.
10591 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10592 pseudo register numbers.
10593 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10594 sparc64_store_arguments): Handle pseudo register numbers.
10595
10596 2017-01-13 Yao Qi <yao.qi@linaro.org>
10597
10598 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10599 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10600 output.
10601 (getpkt_or_notif_sane_1): Likewise.
10602
10603 2017-01-13 Yao Qi <yao.qi@linaro.org>
10604
10605 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10606 of CC. Pass "-x c++-header" instead of "-x c".
10607
10608 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10609
10610 * remote.c (remote_can_async_p): Update comment.
10611
10612 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10613
10614 * linux-nat.c (linux_nat_can_async_p): Update comment.
10615
10616 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10617
10618 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10619
10620 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10621
10622 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10623
10624 2017-01-10 Tom Tromey <tom@tromey.com>
10625
10626 * python/py-type.c (typy_legacy_template_argument): Update.
10627 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10628 ~demangle_parse_info): Declare new members.
10629 (cp_demangled_name_to_comp): Return unique_ptr.
10630 (cp_demangled_name_parse_free)
10631 (make_cleanup_cp_demangled_name_parse_free)
10632 (cp_new_demangle_parse_info): Remove.
10633 * cp-support.c (do_demangled_name_parse_free_cleanup)
10634 (make_cleanup_cp_demangled_name_parse_free): Remove.
10635 (inspect_type, cp_canonicalize_string_full)
10636 (cp_canonicalize_string): Update.
10637 (mangled_name_to_comp): Change return type.
10638 (cp_class_name_from_physname, method_name_from_physname)
10639 (cp_func_name, cp_remove_params): Update.
10640 * cp-name-parser.y (demangle_parse_info): New constructor, from
10641 cp_new_demangle_parse_info.
10642 (~demangle_parse_info): New destructor, from
10643 cp_demangled_name_parse_free.
10644 (cp_merge_demangle_parse_infos): Update.
10645 (cp_demangled_name_to_comp): Change return type.
10646
10647 2017-01-10 Tom Tromey <tom@tromey.com>
10648
10649 * top.c (prevent_dont_repeat): Change return type.
10650 * python/python.c (execute_gdb_command): Use std::string.
10651 Update.
10652 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10653 * command.h (prevent_dont_repeat): Change return type.
10654 * breakpoint.c (bpstat_do_actions_1): Update.
10655
10656 2017-01-10 Tom Tromey <tom@tromey.com>
10657
10658 * value.h (scoped_value_mark::~scoped_value_mark): Call
10659 free_to_mark.
10660 (scoped_value_mark::free_to_mark): New method.
10661 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10662 scoped_value_mark.
10663
10664 2017-01-10 Tom Tromey <tom@tromey.com>
10665
10666 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10667 (valpy_reference_value, valpy_const_value, valpy_get_address)
10668 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10669 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10670 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10671 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10672 scoped_value_mark.
10673 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10674 * value.h (scoped_value_mark): New class.
10675
10676 2017-01-10 Tom Tromey <tom@tromey.com>
10677
10678 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10679 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10680 * psymtab.c (discard_psymtabs_upto): Remove.
10681 (make_cleanup_discard_psymtabs): Remove.
10682 (struct psymtab_state): Remove.
10683
10684 2017-01-10 Tom Tromey <tom@tromey.com>
10685
10686 * record-full.c (record_full_save_cleanups): Remove.
10687 (record_full_save): Use gdb::unlinker.
10688 * gcore.c (do_bfd_delete_cleanup): Remove.
10689 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10690 cleanups.
10691 * dwarf2read.c (unlink_if_set): Remove.
10692 (write_psymtabs_to_index): Use gdb::unlinker.
10693 * common/gdb_unlinker.h: New file.
10694
10695 2017-01-10 Tom Tromey <tom@tromey.com>
10696
10697 * windows-tdep.c (windows_xfer_shared_library): Update.
10698 * windows-nat.c (windows_make_so): Update.
10699 * utils.h (make_cleanup_bfd_unref): Remove.
10700 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10701 * symfile.h (symfile_bfd_open)
10702 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10703 * symfile.c (read_symbols, symbol_file_add)
10704 (separate_debug_file_exists): Update.
10705 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10706 (generic_load, reread_symbols): Update.
10707 * symfile-mem.c (symbol_file_add_from_memory): Update.
10708 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10709 (spu_symbol_file_add_from_memory): Update.
10710 * solist.h (struct target_so_ops) <bfd_open>: Return
10711 gdb_bfd_ref_ptr.
10712 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10713 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10714 gdb_bfd_ref_ptr.
10715 (solib_map_sections, reload_shared_libraries_1): Update.
10716 * solib-svr4.c (enable_break): Update.
10717 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10718 * solib-frv.c (enable_break2): Update.
10719 * solib-dsbt.c (enable_break): Update.
10720 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10721 gdb_bfd_ref_ptr.
10722 (darwin_solib_get_all_image_info_addr_at_init): Update.
10723 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10724 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10725 * record-full.c (record_full_save): Update.
10726 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10727 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10728 * minidebug.c (find_separate_debug_file_in_section): Return
10729 gdb_bfd_ref_ptr.
10730 * machoread.c (macho_add_oso_symfile): Change abfd to
10731 gdb_bfd_ref_ptr.
10732 (macho_symfile_read_all_oso): Update.
10733 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10734 (macho_symfile_read): Update.
10735 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10736 (jit_bfd_try_read_symtab): Update.
10737 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10738 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10739 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10740 gdb_bfd_ref_ptr.
10741 (gdb_bfd_ref_policy): New struct.
10742 (gdb_bfd_ref_ptr): New typedef.
10743 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10744 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10745 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10746 gdb_bfd_ref_ptr.
10747 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10748 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10749 (gcore_command): Update.
10750 * exec.c (exec_file_attach): Update.
10751 * elfread.c (elf_symfile_read): Update.
10752 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10753 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10754 (open_and_init_dwo_file): Update.
10755 (open_dwp_file): Return gdb_bfd_ref_ptr.
10756 (open_and_init_dwp_file): Update.
10757 * corelow.c (core_open): Update.
10758 * compile/compile-object-load.c (compile_object_load): Update.
10759 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10760 * coffread.c (coff_symfile_read): Update.
10761 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10762 gdb_bfd_ref_ptr. Rename.
10763 (dump_bfd_file, restore_command): Update.
10764 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10765 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10766 (find_separate_debug_file_by_buildid): Update.
10767
10768 2017-01-10 Tom Tromey <tom@tromey.com>
10769
10770 * common/gdb_ref_ptr.h: New file.
10771 * python/py-ref.h (struct gdbpy_ref_policy): New.
10772 (gdbpy_ref): Now a typedef.
10773
10774 2017-01-10 Tom Tromey <tom@tromey.com>
10775
10776 * utils.h (make_cleanup_htab_delete): Don't declare.
10777 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10778 Remove.
10779 * linespec.c (decode_compound_collector): Add constructor,
10780 destructor.
10781 (lookup_prefix_sym): Remove cleanup.
10782 (symtab_collector): Add constructor, destructor.
10783 (collect_symtabs_from_filename): Remove cleanup.
10784 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10785 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10786 Use htab_up.
10787 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10788 * dwarf2read.c (dw2_expand_symtabs_matching)
10789 (dw2_map_symbol_filenames, dwarf_decode_macros)
10790 (write_psymtabs_to_index): Use htab_up.
10791 * dwarf2loc.c (func_verify_no_selftailcall)
10792 (call_site_find_chain_1, func_verify_no_selftailcall)
10793 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10794 std::vector, gdb::unique_xmalloc_ptr.
10795 (call_sitep): Remove typedef.
10796 (dwarf2_locexpr_baton_eval): Remove unused variable.
10797
10798 2017-01-10 Tom Tromey <tom@tromey.com>
10799
10800 * python/python-internal.h (make_cleanup_py_decref)
10801 (make_cleanup_py_xdecref): Don't declare.
10802 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10803 (py_xdecref, make_cleanup_py_xdecref): Remove.
10804
10805 2017-01-10 Tom Tromey <tom@tromey.com>
10806
10807 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10808 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10809
10810 2017-01-10 Tom Tromey <tom@tromey.com>
10811
10812 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10813
10814 2017-01-10 Tom Tromey <tom@tromey.com>
10815
10816 * python/py-utils.c (unicode_to_encoded_string)
10817 (python_string_to_target_string)
10818 (python_string_to_target_python_string)
10819 (python_string_to_host_string, gdbpy_obj_to_string)
10820 (get_addr_from_python): Use gdbpy_ref.
10821
10822 2017-01-10 Tom Tromey <tom@tromey.com>
10823
10824 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10825 gdbpy_ref.
10826
10827 2017-01-10 Tom Tromey <tom@tromey.com>
10828
10829 * python/python.c (eval_python_command, gdbpy_decode_line)
10830 (gdbpy_run_events, gdbpy_start_type_printers)
10831 (gdbpy_apply_type_printers): Use gdbpy_ref.
10832
10833 2017-01-10 Tom Tromey <tom@tromey.com>
10834
10835 * python/py-param.c (get_doc_string, compute_enum_values): Use
10836 gdbpy_ref.
10837
10838 2017-01-10 Tom Tromey <tom@tromey.com>
10839
10840 * python/py-inferior.c (find_thread_object, build_inferior_list):
10841 Use gdbpy_ref.
10842
10843 2017-01-10 Tom Tromey <tom@tromey.com>
10844
10845 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10846
10847 2017-01-10 Tom Tromey <tom@tromey.com>
10848
10849 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10850 gdbpy_ref.
10851
10852 2017-01-10 Tom Tromey <tom@tromey.com>
10853
10854 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10855 extra incref.
10856 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10857 Use gdbpy_ref.
10858
10859 2017-01-10 Tom Tromey <tom@tromey.com>
10860
10861 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10862 gdbpy_ref.
10863
10864 2017-01-10 Tom Tromey <tom@tromey.com>
10865
10866 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10867 decref results of PyArg_ParseTupleAndKeywords.
10868
10869 2017-01-10 Tom Tromey <tom@tromey.com>
10870
10871 * python/python.c (python_run_simple_file): Use
10872 unique_xmalloc_ptr, gdbpy_ref.
10873
10874 2017-01-10 Tom Tromey <tom@tromey.com>
10875
10876 * python/py-prettyprint.c (print_stack_unless_memory_error)
10877 (print_string_repr, print_children): Use gdbpy_ref.
10878 (dummy_python_frame): New class.
10879 (dummy_python_frame::dummy_python_frame): Rename from
10880 push_dummy_python_frame.
10881 (py_restore_tstate): Remove.
10882
10883 2017-01-10 Tom Tromey <tom@tromey.com>
10884
10885 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10886
10887 2017-01-10 Tom Tromey <tom@tromey.com>
10888
10889 * python/python.c (ensure_python_env, restore_python_env):
10890 Remove.
10891 * python/python-internal.h (ensure_python_env): Don't declare.
10892 * varobj.h (varobj_ensure_python_env): Don't declare.
10893 * varobj.c (varobj_ensure_python_env): Remove.
10894
10895 2017-01-10 Tom Tromey <tom@tromey.com>
10896
10897 * varobj.c (varobj_value_get_print_value): Use
10898 gdbpy_enter_varobj.
10899
10900 2017-01-10 Tom Tromey <tom@tromey.com>
10901
10902 * python/py-prettyprint.c (print_string_repr, print_children):
10903 Update.
10904 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10905 of "encoding".
10906 * varobj.c (varobj_value_get_print_value): Update.
10907 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10908
10909 2017-01-10 Tom Tromey <tom@tromey.com>
10910
10911 * varobj.c (varobj_get_display_hint)
10912 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10913 (varobj_set_visualizer, free_variable): Use
10914 gdbpy_enter_varobj.
10915
10916 2017-01-10 Tom Tromey <tom@tromey.com>
10917
10918 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10919 (do_finish_initialization): New function. Use gdbpy_ref.
10920 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10921 do_finish_initialization.
10922
10923 2017-01-10 Tom Tromey <tom@tromey.com>
10924
10925 * python/py-param.c (get_set_value, get_show_value): Use
10926 gdbpy_enter, gdbpy_ref.
10927
10928 2017-01-10 Tom Tromey <tom@tromey.com>
10929
10930 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10931
10932 2017-01-10 Tom Tromey <tom@tromey.com>
10933
10934 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10935
10936 2017-01-10 Tom Tromey <tom@tromey.com>
10937
10938 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10939 Use gdbpy_enter_varobj.
10940
10941 2017-01-10 Tom Tromey <tom@tromey.com>
10942
10943 * varobj.c (gdbpy_enter_varobj): New constructor.
10944 * python/python-internal.h (gdbpy_enter_varobj): New class.
10945 * python/py-varobj.c (py_varobj_get_iterator): Use
10946 gdbpy_enter_varobj.
10947
10948 2017-01-10 Tom Tromey <tom@tromey.com>
10949
10950 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10951 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10952 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10953 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10954 unique_xmalloc_ptr.
10955 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10956
10957 2017-01-10 Tom Tromey <tom@tromey.com>
10958
10959 * python/py-xmethods.c (invoke_match_method): Use
10960 gdbpy_ref.
10961
10962 2017-01-10 Tom Tromey <tom@tromey.com>
10963
10964 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10965 gdbpy_enter, gdbpy_ref.
10966
10967 2017-01-10 Tom Tromey <tom@tromey.com>
10968
10969 * python/python.c (python_interactive_command): Use gdbpy_enter.
10970
10971 2017-01-10 Tom Tromey <tom@tromey.com>
10972
10973 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10974 gdbpy_ref.
10975
10976 2017-01-10 Tom Tromey <tom@tromey.com>
10977
10978 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10979 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10980
10981 2017-01-10 Tom Tromey <tom@tromey.com>
10982
10983 * utils.h (htab_deleter): New struct.
10984 (htab_up): New typedef.
10985 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10986 gdbpy_enter, gdbpy_ref, htab_up.
10987
10988 2017-01-10 Tom Tromey <tom@tromey.com>
10989
10990 * python/py-unwind.c (pending_frame_invalidate): Remove.
10991 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10992
10993 2017-01-10 Tom Tromey <tom@tromey.com>
10994
10995 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10996 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10997
10998 2017-01-10 Tom Tromey <tom@tromey.com>
10999
11000 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11001
11002 2017-01-10 Tom Tromey <tom@tromey.com>
11003
11004 * python/python.c (gdbpy_eval_from_control_command)
11005 (gdbpy_source_script, gdbpy_run_events)
11006 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11007 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11008 gdbpy_enter.
11009
11010 2017-01-10 Tom Tromey <tom@tromey.com>
11011
11012 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11013
11014 2017-01-10 Tom Tromey <tom@tromey.com>
11015
11016 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11017
11018 2017-01-10 Tom Tromey <tom@tromey.com>
11019
11020 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11021 (python_on_inferior_call_pre, python_on_inferior_call_post)
11022 (python_on_memory_change, python_on_register_change)
11023 (python_inferior_exit, python_new_objfile, add_thread_object)
11024 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11025
11026 2017-01-10 Tom Tromey <tom@tromey.com>
11027
11028 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11029 (bpfinishpy_handle_exit): Use gdbpy_enter.
11030
11031 2017-01-10 Tom Tromey <tom@tromey.com>
11032
11033 * python/py-cmd.c (cmdpy_destroyer)
11034 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11035 gdbpy_enter.
11036
11037 2017-01-10 Tom Tromey <tom@tromey.com>
11038
11039 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11040 gdbpy_enter.
11041 (gdbpy_breakpoint_has_cond): Likewise.
11042
11043 2017-01-10 Tom Tromey <tom@tromey.com>
11044
11045 * python/python.c (gdbpy_enter): New constructor.
11046 (~gdbpy_enter): New destructor.
11047 (restore_python_env, ensure_python_env): Rewrite.
11048 * python/python-internal.h (gdbpy_enter): New class.
11049
11050 2017-01-10 Tom Tromey <tom@tromey.com>
11051
11052 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11053
11054 2017-01-10 Tom Tromey <tom@tromey.com>
11055
11056 * python/py-value.c (value_has_field, get_field_flag)
11057 (get_field_type, valpy_getitem, convert_value_from_python): Use
11058 gdbpy_ref.
11059
11060 2017-01-10 Tom Tromey <tom@tromey.com>
11061
11062 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11063 gdbpy_ref.
11064
11065 2017-01-10 Tom Tromey <tom@tromey.com>
11066
11067 * python/py-prettyprint.c (search_pp_list)
11068 (find_pretty_printer_from_objfiles)
11069 (find_pretty_printer_from_progspace)
11070 (find_pretty_printer_from_gdb, find_pretty_printer)
11071 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11072 gdbpy_ref.
11073
11074 2017-01-10 Tom Tromey <tom@tromey.com>
11075
11076 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11077
11078 2017-01-10 Tom Tromey <tom@tromey.com>
11079
11080 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11081 (ltpy_get_all_source_lines): Use gdbpy_ref.
11082
11083 2017-01-10 Tom Tromey <tom@tromey.com>
11084
11085 * python/py-framefilter.c (extract_sym, extract_value)
11086 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11087 gdbpy_ref.
11088
11089 2017-01-10 Tom Tromey <tom@tromey.com>
11090
11091 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11092
11093 2017-01-10 Tom Tromey <tom@tromey.com>
11094
11095 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11096
11097 2017-01-10 Tom Tromey <tom@tromey.com>
11098
11099 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11100 gdbpy_ref.
11101
11102 2017-01-10 Tom Tromey <tom@tromey.com>
11103
11104 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11105
11106 2017-01-10 Tom Tromey <tom@tromey.com>
11107
11108 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11109 (typy_range): Use gdbpy_ref.
11110
11111 2017-01-10 Tom Tromey <tom@tromey.com>
11112
11113 * python/py-threadevent.c (create_thread_event_object): Use
11114 gdbpy_ref.
11115 * python/py-stopevent.c (create_stop_event_object): Simplify.
11116 (emit_stop_event): Use gdbpy_ref.
11117 * python/py-signalevent.c (create_signal_event_object): Use
11118 gdbpy_ref.
11119 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11120 (emit_new_objfile_event, create_clear_objfiles_event_object)
11121 (emit_clear_objfiles_event): Use gdbpy_ref.
11122 * python/py-infevents.c (create_inferior_call_event_object)
11123 (create_register_changed_event_object)
11124 (create_memory_changed_event_object, emit_inferior_call_event)
11125 (emit_memory_changed_event, emit_register_changed_event): Use
11126 gdbpy_ref.
11127 * python/py-exitedevent.c (create_exited_event_object)
11128 (emit_exited_event): Use gdbpy_ref.
11129 * python/py-event.h (evpy_emit_event): Remove
11130 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11131 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11132 * python/py-continueevent.c (emit_continue_event): Use
11133 gdbpy_ref.
11134 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11135 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11136 gdbpy_ref.
11137 * python/py-bpevent.c (create_breakpoint_event_object): Use
11138 gdbpy_ref.
11139
11140 2017-01-10 Tom Tromey <tom@tromey.com>
11141
11142 * python/py-ref.h: New file.
11143
11144 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11145
11146 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11147 void.
11148 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11149 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11150 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11151 * ui-out.c (ui_out::redirect): Likewise.
11152 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11153 * cli/cli-logging.c (set_logging_redirect): Update call site of
11154 ui_out::redirect.
11155 (handle_redirections): Likewise.
11156 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11157 * top.c (execute_command_to_string): Likewise.
11158 * utils.c (do_ui_out_redirect_pop): Likewise.
11159
11160 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11161
11162 * stack.c (_initialize_stack): Update "frame" command help message.
11163
11164 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11165
11166 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11167
11168 2017-01-06 Yao Qi <yao.qi@linaro.org>
11169
11170 * x86-linux-nat.h: Include gdb_proc_service.h.
11171
11172 2017-01-06 Yao Qi <yao.qi@linaro.org>
11173
11174 * ser-base.h: Include serial.h.
11175
11176 2017-01-06 Yao Qi <yao.qi@linaro.org>
11177
11178 * ppc-linux-tdep.h: Include ppc-tdep.h.
11179
11180 2017-01-06 Yao Qi <yao.qi@linaro.org>
11181
11182 * nat/amd64-linux-siginfo.h: Include signal.h.
11183
11184 2017-01-06 Yao Qi <yao.qi@linaro.org>
11185
11186 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11187
11188 2017-01-06 Yao Qi <yao.qi@linaro.org>
11189
11190 * mi/mi-parse.h: Include mi-cmds.h.
11191
11192 2017-01-06 Yao Qi <yao.qi@linaro.org>
11193
11194 * inf-loop.c: Don't include "target.h".
11195 * inf-loop.h: Include it here.
11196
11197 2017-01-06 Yao Qi <yao.qi@linaro.org>
11198
11199 * dfp.h: Include "dboulest.h" and "expression.h".
11200
11201 2017-01-06 Yao Qi <yao.qi@linaro.org>
11202
11203 * ax-gdb.h: Include "ax.h".
11204
11205 2017-01-06 Yao Qi <yao.qi@linaro.org>
11206
11207 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11208 with nat/gdb_ptrace.h.
11209
11210 2017-01-05 Yao Qi <yao.qi@linaro.org>
11211
11212 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11213 new line.
11214 (mips64_fbsd_sigframe_init): Likewise.
11215
11216 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11217
11218 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11219 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11220
11221 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11222
11223 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11224 * NEWS: Mention new FreeBSD/mips native configuration.
11225 * config/mips/fbsd.mh: New file.
11226 * configure.host: Add mips*-*-freebsd*.
11227 * mips-fbsd-nat.c: New file.
11228
11229 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11230
11231 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11232 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11233 * NEWS: Mention new FreeBSD/mips target.
11234 * configure.tgt: Add mips*-*-freebsd*.
11235 * mips-fbsd-tdep.c: New file.
11236 * mips-fbsd-tdep.h: New file.
11237
11238 2017-01-04 Yao Qi <yao.qi@linaro.org>
11239
11240 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11241 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11242
11243 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11244
11245 Update copyright year range in all GDB files.
11246
11247 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11248
11249 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11250
11251 For older changes see ChangeLog-2016.
11252 \f
11253 Local Variables:
11254 mode: change-log
11255 left-margin: 8
11256 fill-column: 74
11257 version-control: never
11258 coding: utf-8
11259 End:
This page took 0.243682 seconds and 5 git commands to generate.