Import "glob" and "getcwd" modules from gnulib
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * gnulib/aclocal.m4: Regenerate.
4 * gnulib/config.in: Regenerate.
5 * gnulib/configure: Regenerate.
6 * gnulib/import/Makefile.am: Regenerate.
7 * gnulib/import/Makefile.in: Regenerate.
8 * gnulib/import/assure.h: New file.
9 * gnulib/import/at-func.c: Likewise
10 * gnulib/import/chdir-long.c: New file.
11 * gnulib/import/chdir-long.h: New file.
12 * gnulib/import/cloexec.c: New file.
13 * gnulib/import/cloexec.h: New file.
14 * gnulib/import/close.c: New file.
15 * gnulib/import/closedir.c: New file.
16 * gnulib/import/dirent-private.h: New file.
17 * gnulib/import/dup-safer.c: New file.
18 * gnulib/import/dup.c: New file.
19 * gnulib/import/dup2.c: New file.
20 * gnulib/import/error.c: New file.
21 * gnulib/import/error.h: New file.
22 * gnulib/import/exitfail.c: New file.
23 * gnulib/import/exitfail.h: New file.
24 * gnulib/import/fchdir.c: New file.
25 * gnulib/import/fcntl.c: New file.
26 * gnulib/import/fcntl.in.h: New file.
27 * gnulib/import/fd-hook.c: New file.
28 * gnulib/import/fd-hook.h: New file.
29 * gnulib/import/fd-safer.c: New file.
30 * gnulib/import/fdopendir.c: New file.
31 * gnulib/import/filename.h: New file.
32 * gnulib/import/filenamecat-lgpl.c: New file.
33 * gnulib/import/filenamecat.h: New file.
34 * gnulib/import/fstat.c: New file.
35 * gnulib/import/fstatat.c: New file.
36 * gnulib/import/getcwd-lgpl.c: New file.
37 * gnulib/import/getcwd.c: New file.
38 * gnulib/import/getdtablesize.c: New file.
39 * gnulib/import/getlogin_r.c: New file.
40 * gnulib/import/getprogname.c: New file.
41 * gnulib/import/getprogname.h: New file.
42 * gnulib/import/gettext.h: New file.
43 * gnulib/import/glob-libc.h: New file.
44 * gnulib/import/glob.c: New file.
45 * gnulib/import/glob.in.h: New file.
46 * gnulib/import/intprops.h: New file.
47 * gnulib/import/m4/chdir-long.m4: New file.
48 * gnulib/import/m4/close.m4: New file.
49 * gnulib/import/m4/closedir.m4: New file.
50 * gnulib/import/m4/d-ino.m4: New file.
51 * gnulib/import/m4/d-type.m4: New file.
52 * gnulib/import/m4/dup.m4: New file.
53 * gnulib/import/m4/dup2.m4: New file.
54 * gnulib/import/m4/error.m4: New file.
55 * gnulib/import/m4/fchdir.m4: New file.
56 * gnulib/import/m4/fcntl.m4: New file.
57 * gnulib/import/m4/fcntl_h.m4: New file.
58 * gnulib/import/m4/fdopendir.m4: New file.
59 * gnulib/import/m4/filenamecat.m4: New file.
60 * gnulib/import/m4/fstat.m4: New file.
61 * gnulib/import/m4/fstatat.m4: New file.
62 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
63 * gnulib/import/m4/getcwd-path-max.m4: New file.
64 * gnulib/import/m4/getcwd.m4: New file.
65 * gnulib/import/m4/getdtablesize.m4: New file.
66 * gnulib/import/m4/getlogin_r.m4: New file.
67 * gnulib/import/m4/getprogname.m4: New file.
68 * gnulib/import/m4/glob.m4: New file.
69 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
70 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
71 * gnulib/import/m4/mempcpy.m4: New file.
72 * gnulib/import/m4/memrchr.m4: New file.
73 * gnulib/import/m4/mode_t.m4: New file.
74 * gnulib/import/m4/msvc-inval.m4: New file.
75 * gnulib/import/m4/msvc-nothrow.m4: New file.
76 * gnulib/import/m4/open.m4: New file.
77 * gnulib/import/m4/openat.m4: New file.
78 * gnulib/import/m4/opendir.m4: New file.
79 * gnulib/import/m4/readdir.m4: New file.
80 * gnulib/import/m4/realloc.m4: New file.
81 * gnulib/import/m4/rewinddir.m4: New file.
82 * gnulib/import/m4/save-cwd.m4: New file.
83 * gnulib/import/m4/strdup.m4: New file.
84 * gnulib/import/m4/strerror.m4: New file.
85 * gnulib/import/m4/unistd-safer.m4: New file.
86 * gnulib/import/mempcpy.c: New file.
87 * gnulib/import/memrchr.c: New file.
88 * gnulib/import/msvc-inval.c: New file.
89 * gnulib/import/msvc-inval.h: New file.
90 * gnulib/import/msvc-nothrow.c: New file.
91 * gnulib/import/msvc-nothrow.h: New file.
92 * gnulib/import/open.c: New file.
93 * gnulib/import/openat-die.c: New file.
94 * gnulib/import/openat-priv.h: New file.
95 * gnulib/import/openat-proc.c: New file.
96 * gnulib/import/openat.c: New file.
97 * gnulib/import/openat.h: New file.
98 * gnulib/import/opendir.c: New file.
99 * gnulib/import/pipe-safer.c: New file.
100 * gnulib/import/readdir.c: New file.
101 * gnulib/import/realloc.c: New file.
102 * gnulib/import/rewinddir.c: New file.
103 * gnulib/import/save-cwd.c: New file.
104 * gnulib/import/save-cwd.h: New file.
105 * gnulib/import/strdup.c: New file.
106 * gnulib/import/strerror-override.c: New file.
107 * gnulib/import/strerror-override.h: New file.
108 * gnulib/import/strerror.c: New file.
109 * gnulib/import/unistd--.h: New file.
110 * gnulib/import/unistd-safer.h: New file.
111 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
112 "getcwd" and "glob".
113 * ser-tcp.c: Undefine "close" before redefining it.
114
115 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
116
117 * guile/scm-value.c (gdbscm_value_address): Initialize address,
118 get rid of res_val.
119
120 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
121
122 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
123 <sol2,sparc>: Likewise.
124 <sol2-64,i386>: Likewise.
125
126 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
127 -Wdeprecated-declarations on *-*-solaris*.
128 * configure: Regenerate.
129
130 * procfs.c: Include "nat/inferior.h".
131 (procfs_info_proc): Fix typo.
132
133 2017-09-21 Kevin Buettner <kevinb@redhat.com>
134
135 * remote.c (vector): Include.
136 (struct private_thread_info): Add field, thread_handle.
137 (free_private_thread_info): Deallocate storage associated with
138 thread handle.
139 (get_private_info_thread): Initialize `thread_handle' field.
140 (struct thread_item): Add field, thread_handle.
141 (clear_threads_listing_context): Deallocate storage associated
142 with thread handle.
143 (start_thread): Add support for "handle" attribute.
144 (thread_attributes): Add "handle".
145 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
146 field.
147 (remote_update_thread_list): Update thread_handle.
148 (remote_thread_handle_to_thread_info): New function.
149 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
150
151 2017-09-21 Kevin Buettner <kevinb@redhat.com>
152
153 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
154 function.
155 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
156 * python/python-internal.h (thread_object_type): Declare.
157
158 2017-09-21 Kevin Buettner <kevinb@redhat.com>
159
160 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
161 (target_thread_handle_to_thread_info): Declare.
162 * target.c (target_thread_handle_to_thread_info): New function.
163 * target-delegates.c: Regenerate.
164 * gdbthread.h (find_thread_by_handle): Declare.
165 * thread.c (find_thread_by_handle): New function.
166 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
167 function.
168 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
169
170 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
171
172 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
173
174 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
175
176 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
177
178 2017-09-21 Yao Qi <yao.qi@linaro.org>
179
180 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
181 to gdb_target_obs.
182
183 2017-09-20 Tom Tromey <tom@tromey.com>
184
185 * breakpoint.c (struct counted_command_line): Remove.
186 (breakpoint_commands): Update.
187 (alloc_counted_command_line, incref_counted_command_line)
188 (decref_counted_command_line, do_cleanup_counted_command_line)
189 (make_cleanup_decref_counted_command_line): Remove.
190 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
191 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
192 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
193 (save_breakpoints): Update.
194 * breakpoint.h (counted_command_line): Now a typedef to
195 shared_ptr.
196 (struct breakpoint) <commands>: Now a counted_command_line.
197 (struct bpstats) <command>: Likewise.
198
199 2017-09-20 Tom Tromey <tom@tromey.com>
200
201 * breakpoint.c (struct commands_info, do_map_commands_command):
202 Remove.
203 (commands_command_1): Update.
204 (iterate_over_related_breakpoints): Take a function_view.
205 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
206 (delete_command): Update.
207 (map_breakpoint_numbers): Take a function_view.
208 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
209 (disable_command): Update.
210 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
211 (enable_command): Update.
212 (struct disp_data, do_enable_breakpoint_disp)
213 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
214 (do_map_enable_delete_breakpoint): Remove.
215 (enable_once_command, enable_count_command, enable_delete_command)
216 (delete_trace_variable_command): Update.
217
218 2017-09-20 Tom Tromey <tom@tromey.com>
219
220 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
221 (bpstat_clear): Use delete.
222 (bpstats): New constructors.
223 (bpstat_copy, bpstat_stop_status): Use new.
224 (dprintf_after_condition_true): Update.
225 * breakpoint.h (bpstats::bpstats): Add constructors.
226 (bpstats::~bpstats): Add destructor.
227
228 2017-09-20 Pedro Alves <palves@redhat.com>
229
230 * eval.c (make_params): Delete, refactored as ...
231 (class fake_method): ... this new type's ctor.
232 (fake_method::~fake_method): New.
233 (evaluate_subexp_standard): Use 'fake_method'.
234
235 2017-09-20 Tom Tromey <tom@tromey.com>
236
237 * windows-nat.c (get_windows_debug_event, windows_wait)
238 (do_initial_windows_stuff, windows_attach): Update.
239 * utils.c (vwarning, internal_vproblem): Update.
240 (ui_unregister_input_event_handler_cleanup)
241 (prepare_to_handle_input): Remove.
242 (class scoped_input_handler): New.
243 (defaulted_query, prompt_for_continue): Update.
244 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
245 Update.
246 * top.c (undo_terminal_modifications_before_exit): Update.
247 * target/target.h (target_terminal_init, target_terminal_inferior)
248 (target_terminal_ours): Don't declare.
249 (class target_terminal): New.
250 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
251 (target_terminal_ours_for_output)
252 (make_cleanup_restore_target_terminal): Don't declare.
253 (target_terminal_info): Remove.
254 * target.c (enum terminal_state, terminal_state): Remove.
255 (target_terminal::terminal_state): Define.
256 (target_terminal::init): Rename from target_terminal_init.
257 (target_terminal::inferior): Rename from
258 target_terminal_inferior.
259 (target_terminal::ours): Rename from target_terminal_ours.
260 (target_terminal::ours_for_output): Rename from
261 target_terminal_ours_for_output.
262 (target_terminal::info): New method.
263 (cleanup_restore_target_terminal)
264 (make_cleanup_restore_target_terminal): Remove.
265 * solib.c (handle_solib_event): Update.
266 * remote.c (remote_serial_quit_handler): Update.
267 (remote_terminal_inferior, remote_wait_as): Update.
268 * record-full.c (record_full_wait_1): Update.
269 * nto-procfs.c (procfs_create_inferior): Update.
270 * nat/fork-inferior.c (startup_inferior): Update.
271 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
272 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
273 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
274 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
275 (mi_breakpoint_created, mi_breakpoint_deleted)
276 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
277 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
278 (mi_user_selected_context_changed, report_initial_inferior):
279 Update.
280 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
281 (linux_nat_terminal_inferior): Update.
282 * infrun.c (follow_fork_inferior)
283 (handle_vfork_child_exec_or_exit, do_target_resume)
284 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
285 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
286 Update.
287 * inflow.c (child_terminal_init, info_terminal_command): Update.
288 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
289 (attach_command): Update.
290 * infcall.c (call_thread_fsm_should_stop): Update.
291 * gnu-nat.c (gnu_attach): Update.
292 * extension.c (struct active_ext_lang_state)
293 (restore_active_ext_lang): Update.
294 * exceptions.c (print_flush): Update.
295 * event-top.c (async_enable_stdin, default_quit_handler): Update.
296 (struct quit_handler_cleanup_data, restore_quit_handler)
297 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
298 Remove.
299 * cp-support.c (gdb_demangle): Update.
300 * breakpoint.c (update_inserted_breakpoint_locations)
301 (insert_breakpoint_locations, handle_jit_event)
302 (disable_breakpoints_in_unloaded_shlib): Update.
303 * annotate.c (annotate_breakpoints_invalid)
304 (annotate_frames_invalid): Update.
305
306 2017-09-20 Tom Tromey <tom@tromey.com>
307
308 * main.c (catch_command_errors): Rename from
309 catch_command_errors_const.
310 (captured_main_1): Update.
311
312 2017-09-20 Pedro Alves <palves@redhat.com>
313
314 * cli/cli-cmds.c (list_command): Use print_sal_location.
315 (print_sal_location): New function.
316 (ambiguous_line_spec): Use print_sal_location.
317 * linespec.c (symbol_to_sal): Record the symbol in the sal.
318 * symtab.c (find_function_start_sal): Likewise.
319 * symtab.h (symtab_and_line::symbol): New field.
320
321 2017-09-20 Pedro Alves <palves@redhat.com>
322
323 * linespec.c (minsym_found): Handle non-text minsyms.
324 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
325
326 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
327
328 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
329 backslash.
330
331 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
332
333 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
334 vmovups instead vmovaps.
335 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
336
337 2017-09-19 John Baldwin <jhb@FreeBSD.org>
338
339 * NEWS (Changes since GDB 8.0): Add starti.
340 * infcmd.c (enum run_break): New.
341 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
342 case.
343 (run_command): Use enum run_how.
344 (start_command): Likewise.
345 (starti_command): New function.
346 (RUN_ARGS_HELP): New macro.
347 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
348 commands. Add starti command.
349
350 2017-09-19 Yao Qi <yao.qi@linaro.org>
351
352 * Makefile.in (monitor.o): Remove the rule.
353
354 2017-09-19 Yao Qi <yao.qi@linaro.org>
355
356 * annotate.h (struct annotate_arg_emitter): Use
357 DISABLE_COPY_AND_ASSIGN.
358 * common/refcounted-object.h (refcounted_object): Likewise.
359 * completer.h (struct completion_result): Likewise.
360 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
361 * filename-seen-cache.h (filename_seen_cache): Likewise.
362 * gdbcore.h (thread_section_name): Likewise.
363 * gdb_regex.h (compiled_regex): Likewise.
364 * gdbthread.h (scoped_restore_current_thread): Likewise.
365 * inferior.h (scoped_restore_current_inferior): Likewise.
366 * jit.c (jit_reader): Likewise.
367 * linespec.h (struct linespec_result): Likewise.
368 * mi/mi-parse.h (struct mi_parse): Likewise.
369 * nat/fork-inferior.c (execv_argv): Likewise.
370 * progspace.h (scoped_restore_current_program_space): Likewise.
371 * python/python-internal.h (class gdbpy_enter): Likewise.
372 * regcache.h (regcache): Likewise.
373 * target-descriptions.c (struct tdesc_reg): Likewise.
374 (struct tdesc_type): Likewise.
375 (struct tdesc_feature): Likewise.
376 * ui-out.h (ui_out_emit_type): Likewise.
377
378 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
379
380 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
381 label abort_expression.
382
383 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
384
385 * common/buffer.c (buffer_xml_printf): Adjust.
386 * common/xml-utils.c (xml_escape_text): Change return type to
387 std::string, update code accordingly.
388 * common/xml-utils.h (xml_escape_text): Change return type to
389 std::string.
390 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
391 * windows-tdep.c (windows_xfer_shared_library): Adjust.
392 * unittests/xml-utils-selftests.c (test_xml_escape_text):
393 Adjust.
394
395 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
396
397 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
398 (SUBDIR_UNITTESTS_OBS): Add new object file.
399 * unittests/xml-utils-selftests.c: New file.
400
401 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
402
403 * common/selftest.h (selftest): New struct/interface.
404 (register_test): Add name parameter, add new overload.
405 (run_tests): Add filter parameter.
406 (for_each_selftest_ftype): New typedef.
407 (for_each_selftest): New declaration.
408 * common/selftest.c (tests): Change type to
409 map<string, unique_ptr<selftest>>.
410 (simple_selftest): New struct.
411 (register_test): New function.
412 (register_test): Add name parameter and use it.
413 (run_tests): Add filter parameter and use it. Add prints.
414 Adjust to vector -> map change.
415 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
416 registering selftests.
417 * arm-tdep.c (_initialize_arm_tdep): Likewise.
418 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
419 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
420 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
421 * findvar.c (_initialize_findvar): Likewise.
422 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
423 * maint.c (maintenance_selftest): Update call to run_tests.
424 (maintenance_info_selftests): New function.
425 (_initialize_maint_cmds): Register "maintenance info selftests"
426 command. Update "maintenance selftest" doc.
427 * regcache.c (_initialize_regcache): Add names when registering
428 selftests.
429 * rust-exp.y (_initialize_rust_exp): Likewise.
430 * selftest-arch.c (gdbarch_selftest): New struct.
431 (gdbarch_tests): Remove.
432 (register_test_foreach_arch): Add name parameter. Call
433 register_test.
434 (tests_with_arch): Remove, move most content to
435 gdbarch_selftest::operator().
436 (_initialize_selftests_foreach_arch): Remove.
437 * selftest-arch.h (register_test_foreach_arch): Add name
438 parameter.
439 (run_tests_with_arch): New declaration.
440 * utils-selftests.c (_initialize_utils_selftests): Add names
441 when registering selftests.
442 * utils.c (_initialize_utils): Likewise.
443 * unittests/array-view-selftests.c
444 (_initialize_array_view_selftests): Likewise.
445 * unittests/environ-selftests.c (_initialize_environ_selftests):
446 Likewise.
447 * unittests/function-view-selftests.c
448 (_initialize_function_view_selftests): Likewise.
449 * unittests/offset-type-selftests.c
450 (_initialize_offset_type_selftests): Likewise.
451 * unittests/optional-selftests.c
452 (_initialize_optional_selftests): Likewise.
453 * unittests/scoped_restore-selftests.c
454 (_initialize_scoped_restore_selftests): Likewise.
455 * NEWS: Document "maintenance selftest" and "maint info
456 selftests".
457
458 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
459
460 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
461 scoped_restore.
462
463 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
464
465 * mi/mi-main.c (mi_load_progress): Make uiout variable
466 a unique_ptr.
467
468 2017-09-15 Pedro Alves <palves@redhat.com>
469
470 * compile/compile-c-types.c (convert_enum, convert_int)
471 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
472
473 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
474
475 * dwarf2read.c (copy_string): Remove.
476 (parse_macro_definition): Replace copy_string with savestring.
477
478 2017-09-15 Yao Qi <yao.qi@linaro.org>
479
480 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
481 gdb_target_obs.
482 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
483 Likewise.
484 (i[34567]86-*-linux*): Likewise.
485
486 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
487
488 * dwarf2expr.h (dwarf_stack_value): Add constructor.
489 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
490 <stack>: Change type to std::vector.
491 <stack_len, stack_allocated>: Remove.
492 <grow_stack>: Remove.
493 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
494 (dwarf_expr_context::~dwarf_expr_context): Remove.
495 (dwarf_expr_context::grow_stack): Remove.
496 (dwarf_expr_context::push): Adjust.
497 (dwarf_expr_context::pop): Adjust.
498 (dwarf_expr_context::fetch): Adjust.
499 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
500 (dwarf_expr_context::stack_empty_p): Adjust.
501 (dwarf_expr_context::execute_stack_op): Adjust.
502
503 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
504
505 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
506 return type to bool.
507 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
508
509 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
510
511 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
512 Change type to bool.
513 (dwarf_stack_value) <in_stack_memory>: Likewise.
514 (dwarf_expr_context) <push_address>: Change parameter type to
515 bool.
516 <fetch_in_stack_memory>: Change return type to bool.
517 <push>: Change parameter type to bool.
518 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
519 to bool.
520 (dwarf_expr_context::push_address): Likewise.
521 (dwarf_expr_context::fetch_in_stack_memory): Change return type
522 to bool.
523 (dwarf_expr_context::execute_stack_op): Adjust.
524 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
525
526 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
527
528 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
529 (struct dwarf_expr_context) <n_pieces>: Remove.
530 <pieces>: Change type to std::vector.
531 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
532 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
533 pieces.
534 (dwarf_expr_context::add_piece): Adjust.
535 * dwarf2loc.c (struct piece_closure): Initialize fields.
536 <n_pieces>: Remove.
537 <pieces>: Change type to std::vector.
538 (allocate_piece_closure): Adjust, change parameter to
539 std::vector rvalue and std::move it to piece_closure.
540 (rw_pieced_value): Adjust.
541 (check_pieced_synthetic_pointer): Adjust.
542 (indirect_synthetic_pointer): Adjust.
543 (coerce_pieced_ref): Adjust.
544 (free_pieced_value_closure): Adjust. Use delete to free
545 piece_closure.
546 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
547 to allocate_piece_closure.
548 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
549
550 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
551
552 * probe.h (probe_ops_cp): Remove typedef.
553 (DEF_VEC_P (probe_ops_cp)): Remove.
554 (all_probe_ops): Change type to std::vector.
555 * probe.c (info_probes_for_ops): Adjust to vector change.
556 (probe_linespec_to_ops): Likewise.
557 (all_probe_ops): Change type to std::vector.
558 (_initialize_probe): Adjust to vector change.
559 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
560 * elfread.c (elf_get_probes): Likewise.
561 * stap-probe.c (_initialize_stap_probe): Likewise.
562
563 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
564
565 * probe.h (struct bound_probe): Define constructors.
566 * probe.c (bound_probe_s): Remove typedef.
567 (DEF_VEC_O (bound_probe_s)): Remove VEC.
568 (collect_probes): Change return type to std::vector, remove
569 cleanup.
570 (compare_probes): Return bool, change parameter type. Change
571 semantic to "less than".
572 (gen_ui_out_table_header_info): Change parameter to std::vector
573 and update.
574 (exists_probe_with_pops): Likewise.
575 (info_probes_for_ops): Update to std::vector change.
576 (enable_probes_command): Likewise.
577 (disable_probes_command): Likewise.
578
579 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
580
581 * probe.h (struct probe_ops) <get_probes>: Change parameter from
582 vec to std::vector.
583 * probe.c (parse_probes_in_pspace): Update.
584 (find_probes_in_objfile): Update.
585 (find_probe_by_pc): Update.
586 (collect_probes): Update.
587 (probe_any_get_probes): Update.
588 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
589 return type to reference to std::vector.
590 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
591 std::vector and update.
592 (dtrace_process_dof): Likewise.
593 (dtrace_get_probes): Likewise.
594 * elfread.c (elf_get_probes): Change return type to std::vector,
595 store an std::vector in bfd_data.
596 (probe_key_free): Update to std::vector.
597 * stap-probe.c (handle_stap_probe): Change parameter to
598 std::vector and update.
599 (stap_get_probes): Likewise.
600 * symfile-debug.c (debug_sym_get_probes): Change return type to
601 std::vector and update.
602
603 2017-09-11 Tom Tromey <tom@tromey.com>
604
605 * breakpoint.c (program_breakpoint_here_p): Update.
606 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
607 from make_show_memory_breakpoints_cleanup. Return a
608 scoped_restore_tmpl<int>.
609 (restore_show_memory_breakpoints): Remove.
610 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
611 * mem-break.c (memory_validate_breakpoint): Update.
612 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
613 (ia64_memory_remove_breakpoint): Update.
614 (ia64_breakpoint_from_pc): Update.
615 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
616 from make_show_memory_breakpoints_cleanup.
617
618 2017-09-11 Tom Tromey <tom@tromey.com>
619
620 * d-namespace.c (d_lookup_symbol): Use std::string.
621 (find_symbol_in_baseclass): Likewise.
622
623 2017-09-11 Tom Tromey <tom@tromey.com>
624
625 * ctf.c (ctf_start): Use std::string.
626
627 2017-09-11 Tom Tromey <tom@tromey.com>
628
629 * ada-lang.c (is_known_support_routine): Update.
630 (ada_unhandled_exception_name_addr_from_raise): Update.
631 * guile/scm-frame.c (gdbscm_frame_name): Update.
632 * python/py-frame.c (frapy_name): Update.
633 (frapy_function): Update.
634 * stack.h (find_frame_funname): Update.
635 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
636 (print_frame): Update.
637
638 2017-09-11 Tom Tromey <tom@tromey.com>
639
640 * findcmd.c (put_bits): Take a gdb::byte_vector.
641 (parse_find_args): Return gdb::byte_vector. "args" now const.
642 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
643 cleanups.
644 (find_command): Update.
645
646 2017-09-11 Tom Tromey <tom@tromey.com>
647
648 * cli/cli-script.c (class scoped_restore_hook_in): New.
649 (clear_hook_in_cleanup): Remove.
650 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
651 scoped_restore_hook_in.
652
653 2017-09-11 Tom Tromey <tom@tromey.com>
654
655 * cli/cli-script.c (restore_interp): Remove.
656 (read_command_lines): Use scoped_restore_interp.
657 * interps.c (scoped_restore_interp::set_temp): Rename from
658 interp_set_temp.
659 * interps.h (class scoped_restore_interp): New.
660 (interp_set_temp): Remove.
661
662 2017-09-11 Tom Tromey <tom@tromey.com>
663
664 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
665 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
666 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
667 scoped_restore.
668 (mi_cmd_break_insert_1): Update.
669 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
670 scoped_restore.
671
672 2017-09-11 Tom Tromey <tom@tromey.com>
673
674 * demangle.c (demangle_command): Update.
675 * breakpoint.c (disable_command): Update.
676 (enable_command): Update.
677 (find_location_by_number): Make "number" const. Use
678 get_number_trailer.
679 * cli/cli-utils.c (extract_arg): Return std::string.
680 * probe.c (parse_probe_linespec): Update. Change types.
681 (collect_probes): Take string arguments.
682 (parse_probe_linespec): Likewise.
683 (info_probes_for_ops): Update.
684 (enable_probes_command): Update.
685 (disable_probes_command): Update.
686 * break-catch-sig.c (catch_signal_split_args): Update.
687 * mi/mi-parse.c (mi_parse): Update.
688
689 2017-09-11 Tom Tromey <tom@tromey.com>
690
691 * language.h (language_enum): Make argument const.
692 * language.c (language_enum): Make argument const.
693
694 2017-09-11 Tom Tromey <tom@tromey.com>
695
696 * common/common-utils.h (skip_to_space): Remove macro, redeclare
697 as function.
698 (skip_to_space): Rename from skip_to_space_const.
699 * common/common-utils.c (skip_to_space): New function.
700 (skip_to_space): Rename from skip_to_space_const.
701 * cli/cli-utils.h (get_number): Rename from get_number_const.
702 (extract_arg): Rename from extract_arg_const.
703 * cli/cli-utils.c (get_number): Rename from get_number_const.
704 (extract_arg): Rename from extract_arg_const.
705 (number_or_range_parser::get_number): Use ::get_number.
706 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
707 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
708 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
709 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
710 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
711 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
712 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
713 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
714
715 2017-09-11 Tom Tromey <tom@tromey.com>
716
717 * python/python.c (do_start_initialization): Use
718 py-event-types.def to initialize types.
719 Define all object type structures.
720 * python/python-internal.h: Don't declare event initialization
721 functions.
722 * python/py-threadevent.c (thread_event_object_type): Don't
723 define.
724 * python/py-stopevent.c (stop_event_object_type): Don't define.
725 * python/py-signalevent.c (signal_event_object_type): Don't
726 declare or define.
727 * python/py-newobjfileevent.c (new_objfile_event_object_type)
728 (clear_objfiles_event_object_type): Don't declare or define.
729 * python/py-infevents.c (inferior_call_pre_event_object_type)
730 (inferior_call_post_event_object_type)
731 (register_changed_event_object_type)
732 (memory_changed_event_object_type): Don't declare or define.
733 * python/py-inferior.c (new_thread_event_object_type)
734 (new_inferior_event_object_type)
735 (inferior_deleted_event_object_type): Don't declare or define.
736 * python/py-exitedevent.c (exited_event_object_type): Don't
737 declare or define.
738 * python/py-evts.c (gdbpy_initialize_py_events): Use
739 py-all-events.def.
740 * python/py-events.h (thread_event_object_type): Don't declare.
741 (events_object): Use py-all-events.def.
742 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
743 py-event-types.def.
744 * python/py-event-types.def: New file.
745 * python/py-continueevent.c (create_continue_event_object): Don't
746 declare or define.
747 * python/py-bpevent.c (breakpoint_event_object_type): Don't
748 declare or define.
749 * python/py-all-events.def: New file.
750
751 2017-09-11 Tom Tromey <tom@tromey.com>
752
753 * python/py-threadevent.c (create_thread_event_object): Return
754 gdbpy_ref.
755 * python/py-stopevent.h (create_stop_event_object)
756 (create_breakpoint_event_object, create_signal_event_object):
757 Update.
758 * python/py-stopevent.c (create_stop_event_object): Return
759 gdbpy_ref.
760 (emit_stop_event): Update.
761 * python/py-signalevent.c (create_signal_event_object): Return
762 gdbpy_ref.
763 * python/py-infevents.c (create_inferior_call_event_object):
764 Update.
765 * python/py-event.h (create_event_object)
766 (create_thread_event_object): Update.
767 * python/py-event.c (create_event_object): Return gdbpy_ref.
768 * python/py-continueevent.c: Return gdbpy_ref.
769 * python/py-bpevent.c (create_breakpoint_event_object): Return
770 gdbpy_ref.
771
772 2017-09-11 Tom Tromey <tom@tromey.com>
773
774 PR python/15622:
775 * NEWS: Add entry.
776 * python/python.c (do_start_initialization): Initialize new event
777 types.
778 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
779 (gdbpy_initialize_inferior_deleted_event)
780 (gdbpy_initialize_new_thread_event): Declare.
781 * python/py-threadevent.c (create_thread_event_object): Add option
782 "thread" parameter.
783 * python/py-inferior.c (new_thread_event_object_type)
784 (new_inferior_event_object_type)
785 (inferior_deleted_event_object_type): Declare.
786 (python_new_inferior, python_inferior_deleted): New functions.
787 (add_thread_object): Emit new_thread event.
788 (gdbpy_initialize_inferior): Attach new functions to corresponding
789 observers.
790 (new_thread, new_inferior, inferior_deleted): Define new event
791 types.
792 * python/py-evts.c (gdbpy_initialize_py_events): Add new
793 registries.
794 * python/py-events.h (events_object) <new_inferior,
795 inferior_deleted, new_thread>: New fields.
796 * python/py-event.h (create_thread_event_breakpoint): Add optional
797 "thread" parameter.
798
799 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
800
801 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
802 check current_ui instead.
803 (internal_vproblem): Likewise.
804
805 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
806
807 * thread.c (print_thread_info_1): Remove unnecessary calls to
808 uiout->is_mi_like_p.
809
810 2017-09-09 Tom Tromey <tom@tromey.com>
811
812 * namespace.h (add_using_directive): Update.
813 * namespace.c (add_using_directive): Change type of excludes to
814 std::vector.
815 * dwarf2read.c (read_import_statement): Use std::vector.
816 (read_namespace): Update.
817 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
818
819 2017-09-09 Tom Tromey <tom@tromey.com>
820
821 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
822
823 2017-09-09 Tom Tromey <tom@tromey.com>
824
825 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
826
827 2017-09-09 Tom Tromey <tom@tromey.com>
828
829 * stack.c (func_command): Use gdb::def_vector.
830
831 2017-09-09 Tom Tromey <tom@tromey.com>
832
833 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
834 ui_out_emit_list, ui_out_emit_tuple.
835 (mi_cmd_var_update): Likewise.
836
837 2017-09-09 Tom Tromey <tom@tromey.com>
838
839 * mi/mi-interp.c (mi_user_selected_context_changed): Use
840 ui_out_redirect_pop.
841 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
842 ui_out_redirect_pop.
843 * utils.c (do_ui_out_redirect_pop)
844 (make_cleanup_ui_out_redirect_pop): Remove.
845 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
846 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
847 * ui-out.h (ui_out_redirect_pop): New class.
848
849 2017-09-09 Tom Tromey <tom@tromey.com>
850
851 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
852 (list_available_thread_groups, mi_cmd_list_thread_groups)
853 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
854 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
855 Likewise.
856
857 2017-09-09 Tom Tromey <tom@tromey.com>
858
859 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
860 ui_out_emit_tuple.
861
862 2017-09-09 Tom Tromey <tom@tromey.com>
863
864 * target.c (flash_erase_command): Use ui_out_emit_tuple.
865 * stack.c (print_frame): Use ui_out_emit_tuple.
866 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
867 (info_spu_mailbox_command, info_spu_dma_command)
868 (info_spu_proxydma_command): Likewise.
869 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
870 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
871 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
872 ui_out_emit_tuple.
873 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
874
875 2017-09-09 Tom Tromey <tom@tromey.com>
876
877 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
878 (class ui_out_emit_table): Update comment.
879 * ui-out.c (do_cleanup_table_end)
880 (make_cleanup_ui_out_table_begin_end): Remove.
881 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
882 (info_spu_dma_cmdlist): Likewise.
883 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
884 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
885 ui_out_emit_table.
886
887 2017-09-09 Tom Tromey <tom@tromey.com>
888
889 * thread.c (print_thread_info_1): Use ui_out_emit_table,
890 ui_out_emit_list, gdb::optional.
891
892 2017-09-09 John Baldwin <jhb@FreeBSD.org>
893
894 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
895 prototype.
896 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
897 prototype.
898 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
899 prototype.
900 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
901 * ada-exp.y: Remove _initialize_ada_exp prototype.
902 * ada-lang.c: Remove _initialize_ada_language prototype.
903 * ada-tasks.c: Remove _initialize_tasks prototype.
904 * addrmap.c: Remove _initialize_addrmap prototype.
905 * agent.c: Remove _initialize_agent prototype.
906 * aix-thread.c: Remove _initialize_aix_thread prototype.
907 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
908 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
909 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
910 prototype.
911 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
912 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
913 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
914 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
915 prototype.
916 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
917 prototype.
918 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
919 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
920 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
921 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
922 prototype.
923 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
924 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
925 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
926 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
927 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
928 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
929 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
930 prototype.
931 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
932 prototype.
933 * annotate.c: Remove _initialize_annotate prototype.
934 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
935 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
936 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
937 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
938 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
939 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
940 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
941 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
942 prototype.
943 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
944 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
945 * auto-load.c: Remove _initialize_auto_load prototype.
946 * auxv.c: Remove _initialize_auxv prototype.
947 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
948 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
949 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
950 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
951 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
952 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
953 prototype.
954 * break-catch-throw.c: Remove _initialize_break_catch_throw
955 prototype.
956 * breakpoint.c: Remove _initialize_breakpoint prototype.
957 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
958 * btrace.c: Remove _initialize_btrace prototype.
959 * charset.c: Remove _initialize_charset prototype.
960 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
961 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
962 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
963 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
964 * cli/cli-script.c: Remove _initialize_cli_script prototype.
965 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
966 * coffread.c: Remove _initialize_coffread prototype.
967 * compile/compile.c: Remove _initialize_compile prototype.
968 * complaints.c: Remove _initialize_complaints prototype.
969 * completer.c: Remove _initialize_completer prototype.
970 * copying.awk: Remove _initialize_copying prototype.
971 * copying.c: Regenerate.
972 * core-regset.c: Remove _initialize_core_regset prototype.
973 * corefile.c: Remove _initialize_core prototype.
974 * corelow.c: Remove _initialize_corelow prototype.
975 * cp-abi.c: Remove _initialize_cp_abi prototype.
976 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
977 * cp-support.c: Remove _initialize_cp_support prototype.
978 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
979 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
980 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
981 * ctf.c: Remove _initialize_ctf prototype.
982 * d-lang.c: Remove _initialize_d_language prototype.
983 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
984 prototype.
985 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
986 * dbxread.c: Remove _initialize_dbxread prototype.
987 * dcache.c: Remove _initialize_dcache prototype.
988 * demangle.c: Remove _initialize_demangler prototype.
989 * disasm-selftests.c: Remove _initialize_disasm_selftests
990 prototype.
991 * disasm.c: Remove _initialize_disasm prototype.
992 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
993 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
994 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
995 prototype.
996 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
997 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
998 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
999 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1000 * elfread.c: Remove _initialize_elfread prototype.
1001 * exec.c: Remove _initialize_exec prototype.
1002 * extension.c: Remove _initialize_extension prototype.
1003 * f-lang.c: Remove _initialize_f_language prototype.
1004 * f-valprint.c: Remove _initialize_f_valprint prototype.
1005 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1006 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1007 * filesystem.c: Remove _initialize_filesystem prototype.
1008 * findcmd.c: Remove _initialize_mem_search prototype.
1009 * fork-child.c: Remove _initialize_fork_child prototype.
1010 * frame-base.c: Remove _initialize_frame_base prototype.
1011 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1012 * frame.c: Remove _initialize_frame prototype.
1013 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1014 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1015 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1016 * gcore.c: Remove _initialize_gcore prototype.
1017 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1018 * gdbarch.c: Regenerate.
1019 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1020 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1021 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1022 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1023 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1024 * go-lang.c: Remove _initialize_go_language prototype.
1025 * go32-nat.c: Remove _initialize_go32_nat prototype.
1026 * guile/guile.c: Remove _initialize_guile prototype.
1027 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1028 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1029 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1030 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1031 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1032 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1033 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1034 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1035 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1036 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1037 prototype.
1038 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1039 prototype.
1040 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1041 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1042 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1043 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1044 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1045 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1046 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1047 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1048 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1049 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1050 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1051 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1052 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1053 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1054 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1055 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1056 prototype.
1057 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1058 prototype.
1059 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1060 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1061 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1062 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1063 * infcall.c: Remove _initialize_infcall prototype.
1064 * infcmd.c: Remove _initialize_infcmd prototype.
1065 * inferior.c: Remove _initialize_inferiors prototype.
1066 * inflow.c: Remove _initialize_inflow prototype.
1067 * infrun.c: Remove _initialize_infrun prototype.
1068 * interps.c: Remove _initialize_interpreter prototype.
1069 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1070 * jit.c: Remove _initialize_jit prototype.
1071 * language.c: Remove _initialize_language prototype.
1072 * linux-fork.c: Remove _initialize_linux_fork prototype.
1073 * linux-nat.c: Remove _initialize_linux_nat prototype.
1074 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1075 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1076 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1077 * m2-lang.c: Remove _initialize_m2_language prototype.
1078 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1079 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1080 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1081 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1082 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1083 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1084 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1085 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1086 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1087 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1088 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1089 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1090 * machoread.c: Remove _initialize_machoread prototype.
1091 * macrocmd.c: Remove _initialize_macrocmd prototype.
1092 * macroscope.c: Remove _initialize_macroscope prototype.
1093 * maint.c: Remove _initialize_maint_cmds prototype.
1094 * mdebugread.c: Remove _initialize_mdebugread prototype.
1095 * memattr.c: Remove _initialize_mem prototype.
1096 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1097 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1098 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1099 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1100 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1101 * microblaze-linux-tdep.c: Remove
1102 _initialize_microblaze_linux_tdep prototype.
1103 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1104 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1105 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1106 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1107 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1108 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1109 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1110 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1111 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1112 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1113 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1114 prototype.
1115 * mipsread.c: Remove _initialize_mipsread prototype.
1116 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1117 prototype.
1118 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1119 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1120 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1121 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1122 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1123 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1124 prototype.
1125 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1126 * nto-procfs.c: Remove _initialize_procfs prototype.
1127 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1128 * objc-lang.c: Remove _initialize_objc_language prototype.
1129 * objfiles.c: Remove _initialize_objfiles prototype.
1130 * observer.c: Remove observer_test_first_notification_function,
1131 observer_test_second_notification_function,
1132 observer_test_third_notification_function, and
1133 _initialize_observer prototypes.
1134 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1135 * osabi.c: Remove _initialize_gdb_osabi prototype.
1136 * osdata.c: Remove _initialize_osdata prototype.
1137 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1138 * parse.c: Remove _initialize_parse prototype.
1139 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1140 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1141 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1142 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1143 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1144 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1145 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1146 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1147 * printcmd.c: Remove _initialize_printcmd prototype.
1148 * probe.c: Remove _initialize_probe prototype.
1149 * proc-api.c: Remove _initialize_proc_api prototype.
1150 * proc-events.c: Remove _initialize_proc_events prototype.
1151 * proc-service.c: Remove _initialize_proc_service prototype.
1152 * procfs.c: Remove _initialize_procfs prototype.
1153 * psymtab.c: Remove _initialize_psymtab prototype.
1154 * python/python.c: Remove _initialize_python prototype.
1155 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1156 * record-btrace.c: Remove _initialize_record_btrace prototype.
1157 * record-full.c: Remove _initialize_record_full prototype.
1158 * record.c: Remove _initialize_record prototype.
1159 * regcache.c: Remove _initialize_regcache prototype.
1160 * reggroups.c: Remove _initialize_reggroup prototype.
1161 * remote-notif.c: Remove _initialize_notif prototype.
1162 * remote-sim.c: Remove _initialize_remote_sim prototype.
1163 * remote.c: Remove _initialize_remote prototype.
1164 * reverse.c: Remove _initialize_reverse prototype.
1165 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1166 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1167 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1168 prototype.
1169 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1170 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1171 * rust-exp.y: Remove _initialize_rust_exp prototype.
1172 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1173 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1174 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1175 * score-tdep.c: Remove _initialize_score_tdep prototype.
1176 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1177 prototype.
1178 * ser-go32.c: Remove _initialize_ser_dos prototype.
1179 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1180 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1181 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1182 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1183 * serial.c: Remove _initialize_serial prototype.
1184 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1185 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1186 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1187 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1188 * skip.c: Remove _initialize_step_skip prototype.
1189 * sol-thread.c: Remove _initialize_sol_thread prototype.
1190 * solib-aix.c: Remove _initialize_solib_aix prototype.
1191 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1192 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1193 * solib-frv.c: Remove _initialize_frv_solib prototype.
1194 * solib-spu.c: Remove _initialize_spu_solib prototype.
1195 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1196 * solib-target.c: Remove _initialize_solib_target prototype.
1197 * solib.c: Remove _initialize_solib prototype.
1198 * source.c: Remove _initialize_source prototype.
1199 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1200 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1201 prototype.
1202 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1203 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1204 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1205 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1206 prototype.
1207 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1208 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1209 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1210 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1211 prototype.
1212 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1213 prototype.
1214 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1215 prototype.
1216 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1217 prototype.
1218 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1219 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1220 prototype.
1221 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1222 prototype.
1223 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1224 prototype.
1225 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1226 prototype.
1227 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1228 prototype.
1229 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1230 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1231 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1232 * stabsread.c: Remove _initialize_stabsread prototype.
1233 * stack.c: Remove _initialize_stack prototype.
1234 * stap-probe.c: Remove _initialize_stap_probe prototype.
1235 * std-regs.c: Remove _initialize_frame_reg prototype.
1236 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1237 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1238 * symfile.c: Remove _initialize_symfile prototype.
1239 * symmisc.c: Remove _initialize_symmisc prototype.
1240 * symtab.c: Remove _initialize_symtab prototype.
1241 * target-dcache.c: Remove _initialize_target_dcache prototype.
1242 * target-descriptions.c: Remove _initialize_target_descriptions
1243 prototype.
1244 * thread.c: Remove _initialize_thread prototype.
1245 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1246 prototype.
1247 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1248 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1249 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1250 prototype.
1251 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1252 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1253 * tracefile.c: Remove _initialize_tracefile prototype.
1254 * tracepoint.c: Remove _initialize_tracepoint prototype.
1255 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1256 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1257 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1258 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1259 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1260 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1261 * tui/tui.c: Remove _initialize_tui prototype.
1262 * typeprint.c: Remove _initialize_typeprint prototype.
1263 * user-regs.c: Remove _initialize_user_regs prototype.
1264 * utils.c: Remove _initialize_utils prototype.
1265 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1266 * valarith.c: Remove _initialize_valarith prototype.
1267 * valops.c: Remove _initialize_valops prototype.
1268 * valprint.c: Remove _initialize_valprint prototype.
1269 * value.c: Remove _initialize_values prototype.
1270 * varobj.c: Remove _initialize_varobj prototype.
1271 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1272 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1273 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1274 * windows-nat.c: Remove _initialize_windows_nat,
1275 _initialize_check_for_gdb_ini, and _initialize_loadable
1276 prototypes.
1277 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1278 * xcoffread.c: Remove _initialize_xcoffread prototype.
1279 * xml-support.c: Remove _initialize_xml_support prototype.
1280 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1281 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1282 prototype.
1283 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1284 prototype.
1285 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1286
1287 2017-09-08 Keith Seitz <keiths@redhat.com>
1288
1289 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1290 field.
1291
1292 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1293
1294 * f-valprint.c (f_val_print): Remove check for one byte
1295 sized integers. Remove printing of character type.
1296
1297 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1298 Christoph Weinmann <christoph.t.weinmann@intel.com>
1299 Bernhard Heckel <bernhard.heckel@intel.com>
1300
1301 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1302 to maintain proper indentation when printing pointers/refs.
1303
1304 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1305
1306 GDB 8.0.1 released.
1307
1308 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1309
1310 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1311
1312 2017-09-05 Tom Tromey <tom@tromey.com>
1313
1314 * parse.c (funcall_chain): Now a std::vector.
1315 (start_arglist, end_arglist): Simplify.
1316 (free_funcalls): Remove.
1317 (parse_exp_in_context_1): Remove cleanup.
1318
1319 2017-09-05 Tom Tromey <tom@tromey.com>
1320
1321 * go-exp.y (go_parse): Don't create a cleanup.
1322
1323 2017-09-05 Tom Tromey <tom@tromey.com>
1324
1325 * d-exp.y (PrimaryExpression): Use std::string.
1326 (d_parse): Don't create a cleanup.
1327
1328 2017-09-05 Tom Tromey <tom@tromey.com>
1329
1330 * utils.c (do_clear_parser_state): Remove.
1331 (make_cleanup_clear_parser_state): Remove.
1332 * p-exp.y (pascal_parse): Use scoped_restore.
1333 * m2-exp.y (m2_parse): Use scoped_restore.
1334 * f-exp.y (f_parse): Use scoped_restore.
1335 * d-exp.y (d_parse): Use scoped_restore.
1336 * c-exp.y (c_parse): Use scoped_restore.
1337 * ada-exp.y (ada_parse): Use scoped_restore.
1338 * utils.h (make_cleanup_clear_parser_state): Remove.
1339
1340 2017-09-06 Keith Seitz <keiths@redhat.com>
1341
1342 * dwarf2read.c (dw2_linkage_name_attr): New function.
1343 (dw2_linkage_name): New function.
1344 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1345 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1346 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1347
1348 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1349
1350 * config/djgpp/djconfig.sh: Correct shell portability issue.
1351
1352 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1353
1354 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1355
1356 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1357
1358 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1359 * NEWS: Mention new FreeBSD/mips native configuration.
1360 * configure.host: Add aarch64*-*-freebsd*.
1361 * configure.nat: Likewise.
1362 * aarch64-fbsd-nat.c: New file.
1363
1364 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1365
1366 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1367 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1368 * NEWS: Mention new FreeBSD/aarch64 target.
1369 * configure.tgt: Add aarch64*-*-freebsd*.
1370 * aarch64-fbsd-tdep.c: New file.
1371 * aarch64-fbsd-tdep.h: New file.
1372
1373 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1374
1375 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1376
1377 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1378
1379 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1380 of TLS symbols.
1381
1382 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1383
1384 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1385 call.
1386
1387 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1388
1389 * infrun.c (follow_exec): Call add_thread after
1390 target_find_description.
1391
1392 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1393
1394 * infrun.c (handle_inferior_event_1): When exec'ing, read
1395 stop_pc after follow_exec.
1396
1397 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1398
1399 * remote.c (process_g_packet): Update error message.
1400
1401 2017-09-05 Yao Qi <yao.qi@linaro.org>
1402
1403 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1404 targets.
1405
1406 2017-09-05 Pedro Alves <palves@redhat.com>
1407
1408 * eval.c (eval_call, evaluate_funcall): New functions, factored
1409 out from ...
1410 (evaluate_subexp_standard): ... this.
1411
1412 2017-09-05 Yao Qi <yao.qi@linaro.org>
1413
1414 * amd64-tdep.c (amd64_target_description): Create target
1415 descriptions.
1416 (_initialize_amd64_tdep): Don't call functions
1417 initialize_tdesc_amd64_*. Add self tests.
1418 * arch/amd64.c (amd64_create_target_description): Add parameter
1419 is_linux. Call set_tdesc_osabi if is_linux is true.
1420 * arch/amd64.h (amd64_create_target_description): Update the
1421 declaration.
1422 * arch/i386.c (i386_create_target_description): Add parameter
1423 is_linux. Call set_tdesc_osabi if is_linux is true.
1424 * arch/i386.h (i386_create_target_description): Update
1425 declaration.
1426 * configure.tgt: Add i386.o to gdb_target_obs.
1427 * features/Makefile (XMLTOC): Remove i386/*.xml.
1428 * features/i386/amd64-avx-avx512.c: Remove.
1429 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1430 * features/i386/amd64-avx-mpx.c: Remove.
1431 * features/i386/amd64-avx.c: Remove.
1432 * features/i386/amd64-mpx.c: Remove.
1433 * features/i386/amd64.c: Remove.
1434 * features/i386/i386-avx-avx512.c: Remove.
1435 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1436 * features/i386/i386-avx-mpx.c: Remove.
1437 * features/i386/i386-avx.c: Remove.
1438 * features/i386/i386-mmx.c: Remove.
1439 * features/i386/i386-mpx.c: Remove.
1440 * features/i386/i386.c: Remove.
1441 * i386-tdep.c: Don't include features/i386/i386*.c., include
1442 target-descriptions.h and arch/i386.h.
1443 (i386_target_description): Create target descriptions.
1444 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1445 functions. Do self tests.
1446
1447 2017-09-05 Yao Qi <yao.qi@linaro.org>
1448
1449 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1450 * features/i386/amd64-avx-avx512-linux.c: Removed.
1451 * features/i386/amd64-avx-linux.c: Removed.
1452 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1453 * features/i386/amd64-avx-mpx-linux.c: Removed.
1454 * features/i386/amd64-linux.c: Removed.
1455 * features/i386/amd64-mpx-linux.c: Removed.
1456 * features/i386/x32-avx-avx512-linux.c: Removed.
1457 * features/i386/x32-avx-linux.c: Removed.
1458 * features/i386/x32-linux.c: Removed.
1459
1460 2017-09-05 Yao Qi <yao.qi@linaro.org>
1461
1462 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1463 features/i386/*.c.
1464 (amd64_linux_read_description): Call
1465 amd64_create_target_description.
1466 * arch/amd64.c: New file.
1467 * arch/amd64.h: New file.
1468 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1469 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1470
1471 2017-09-05 Yao Qi <yao.qi@linaro.org>
1472
1473 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1474 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1475 (amd64_linux_read_description): Create target descriptions.
1476 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1477 functions. Add unit tests.
1478 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1479 x32-core.xml.
1480 * features/i386/64bit-avx.c: Generated.
1481 * features/i386/64bit-avx512.c: Generated.
1482 * features/i386/64bit-core.c: Generated.
1483 * features/i386/64bit-linux.c: Generated.
1484 * features/i386/64bit-mpx.c: Generated.
1485 * features/i386/64bit-pkeys.c: Generated.
1486 * features/i386/64bit-segments.c: Generated.
1487 * features/i386/64bit-sse.c: Generated.
1488 * features/i386/x32-core.c: Generated.
1489 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1490 c files for amd64-linux and x32-linux.
1491
1492 2017-09-05 Yao Qi <yao.qi@linaro.org>
1493
1494 * amd64-linux-tdep.c (amd64_linux_read_description): New
1495 function.
1496 (amd64_linux_core_read_description): Call
1497 amd64_linux_read_description.
1498 (amd64_linux_init_abi): Likewise.
1499 (amd64_x32_linux_init_abi): Likewise.
1500 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1501 * x86-linux-nat.c (x86_linux_read_description): Call
1502 amd64_linux_read_description.
1503
1504 2017-09-05 Yao Qi <yao.qi@linaro.org>
1505
1506 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1507 comments.
1508
1509 2017-09-05 Yao Qi <yao.qi@linaro.org>
1510
1511 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1512 * features/i386/i386-avx-avx512-linux.c: Remove.
1513 * features/i386/i386-avx-linux.c: Remove.
1514 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1515 * features/i386/i386-avx-mpx-linux.c: Remove.
1516 * features/i386/i386-linux.c: Remove.
1517 * features/i386/i386-mmx-linux.c: Remove.
1518 * features/i386/i386-mpx-linux.c: Remove.
1519
1520 2017-09-05 Yao Qi <yao.qi@linaro.org>
1521
1522 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1523 (SFILES): Add arch/i386.c.
1524 (HFILES_NO_SRCDIR): Add arch/i386.h.
1525 * arch/i386.c: New file.
1526 * arch/i386.h: New file.
1527 * arch/tdesc.h (allocate_target_description): Declare.
1528 (set_tdesc_architecture): Declare.
1529 (set_tdesc_osabi): Declare.
1530 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1531 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1532 include arch/i386.h.
1533 (i386_linux_read_description): Remove code and call
1534 i386_create_target_description.
1535 (set_tdesc_architecture): New function.
1536 (set_tdesc_osabi): New function.
1537 * target-descriptions.h (allocate_target_description): Remove.
1538
1539 2017-09-05 Yao Qi <yao.qi@linaro.org>
1540
1541 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1542 * target-descriptions.c (tdesc_create_feature): Likewise, and
1543 adjust code.
1544 * features/i386/32bit-avx.c: Re-generated.
1545 * features/i386/32bit-avx512.c: Re-generated.
1546 * features/i386/32bit-core.c: Re-generated.
1547 * features/i386/32bit-linux.c: Re-generated.
1548 * features/i386/32bit-mpx.c: Re-generated.
1549 * features/i386/32bit-pkeys.c: Re-generated.
1550 * features/i386/32bit-sse.c: Re-generated.
1551
1552 2017-09-05 Yao Qi <yao.qi@linaro.org>
1553
1554 * regformats/regdef.h (struct reg): Override operator == and !=.
1555
1556 2017-09-05 Yao Qi <yao.qi@linaro.org>
1557
1558 * arch/tdesc.h: New file.
1559 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1560 * target-descriptions.c: Update comments.
1561 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1562 declarations.
1563 * features/i386/32bit-avx.c: Re-generated.
1564 * features/i386/32bit-avx512.c: Re-generated.
1565 * features/i386/32bit-core.c: Re-generated.
1566 * features/i386/32bit-linux.c: Re-generated.
1567 * features/i386/32bit-mpx.c: Re-generated.
1568 * features/i386/32bit-pkeys.c: Re-generated.
1569 * features/i386/32bit-sse.c: Re-generated.
1570
1571 2017-09-05 Yao Qi <yao.qi@linaro.org>
1572
1573 * regformats/regdat.sh: Update generated code.
1574
1575 2017-09-05 Yao Qi <yao.qi@linaro.org>
1576
1577 * regformats/regdat.sh: Adjust code order.
1578
1579 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1580
1581 * expprint.c (dump_subexp_body_standard): Use constant format
1582 string in fprintf_filtered call.
1583
1584 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1585
1586 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1587 NetBSD/i386.
1588 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1589
1590 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1591
1592 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1593
1594 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1595
1596 * bsd-kvm.o: Define _KMEMUSER.
1597 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1598 * configure: Regenerate.
1599
1600 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1601
1602 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1603 * i386-fbsd-nat.c: Likewise.
1604
1605 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1606
1607 * unittests/array-view-selftests.c: Add include of <array>.
1608
1609 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1610
1611 * spu-tdep.c (flush_ea_cache): Add missing argument to
1612 call_function_by_hand.
1613
1614 2017-09-04 Pedro Alves <palves@redhat.com>
1615
1616 * NEWS (Safer support for debugging with no debug info): New.
1617
1618 2017-09-04 Pedro Alves <palves@redhat.com>
1619
1620 * c-exp.y (function_method, function_method_void): Add current
1621 instance flags to TYPE_INSTANCE.
1622 * dwarf2read.c (check_modifier): New.
1623 (compute_delayed_physnames): Assert that only C++ adds delayed
1624 physnames. Mark fn_fields as const/volatile depending on
1625 physname.
1626 * eval.c (make_params): New type_instance_flags parameter. Use
1627 it as the new type's instance flags.
1628 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1629 flags element and pass it to make_params.
1630 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1631 instance flags element.
1632 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1633 * gdbtypes.h: Include "enum-flags.h".
1634 (type_instance_flags): New enum-flags type.
1635 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1636 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1637 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1638 (follow_type_instance_flags): New function.
1639 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1640 * parser-defs.h (follow_type_instance_flags): Declare.
1641 * valops.c (value_struct_elt_for_reference): const/volatile must
1642 match too.
1643
1644 2017-09-04 Pedro Alves <palves@redhat.com>
1645
1646 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1647 function/method scopes; lookup the nested name as a function local
1648 static variable.
1649
1650 2017-09-04 Pedro Alves <palves@redhat.com>
1651
1652 (%type <voidval>): Add function_method.
1653 * c-exp.y (exp): New production for calls with no arguments.
1654 (function_method, function_method_void_or_typelist): New
1655 productions.
1656 (exp): New production for "method()::static_var".
1657 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1658 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1659 Handle OP_FUNC_STATIC_VAR.
1660 * parse.c (operator_length_standard):
1661 Handle OP_FUNC_STATIC_VAR.
1662
1663 2017-09-04 Pedro Alves <palves@redhat.com>
1664
1665 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1666 handling.
1667 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1668 Ditto.
1669 * parse.c (operator_length_standard, operator_check_standard):
1670 Ditto.
1671 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1672
1673 2017-09-04 Pedro Alves <palves@redhat.com>
1674
1675 * ax-gdb.c: Include "typeprint.h".
1676 (gen_expr_for_cast): New function.
1677 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1678 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1679 type is unknown.
1680 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1681 nodebug_data_symbol.
1682 * eval.c: Include "typeprint.h".
1683 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1684 Error out if symbol has unknown type.
1685 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1686 evaluate_subexp_for_cast.
1687 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1688 OP_VAR_MSYM_VALUE.
1689 (evaluate_subexp_for_cast): New function.
1690 * gdbtypes.c (init_nodebug_var_type): New function.
1691 (objfile_type): Use it to initialize types of variables with no
1692 debug info.
1693 * typeprint.c (error_unknown_type): New.
1694 * typeprint.h (error_unknown_type): New declaration.
1695 * compile/compile-c-types.c (convert_type_basic): Handle
1696 TYPE_CODE_ERROR; warn and fallback to int for variables with
1697 unknown type.
1698
1699 2017-09-04 Pedro Alves <palves@redhat.com>
1700
1701 * eval.c (evaluate_var_value): New function, factored out from ...
1702 (evaluate_subexp_standard): ... here.
1703
1704 2017-09-04 Pedro Alves <palves@redhat.com>
1705
1706 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1707 Remove useless assignments to 'op'.
1708
1709 2017-09-04 Pedro Alves <palves@redhat.com>
1710
1711 * eval.c (eval_skip_value): New function.
1712 (evaluate_subexp_standard): Use it.
1713
1714 2017-09-04 Pedro Alves <palves@redhat.com>
1715
1716 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1717 function name from symbol/minsym and pass it to
1718 error_call_unknown_return_type.
1719
1720 2017-09-04 Pedro Alves <palves@redhat.com>
1721
1722 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1723 * ax-gdb.c (gen_msym_var_ref): New function.
1724 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1725 * eval.c (evaluate_var_msym_value): New function.
1726 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1727 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1728 to call_function_by_hand.
1729 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1730 Handle OP_VAR_MSYM_VALUE.
1731 (union exp_element) <msymbol>: New field.
1732 * minsyms.h (struct type): Forward declare.
1733 (find_minsym_type_and_address): Declare.
1734 * parse.c (write_exp_elt_msym): New function.
1735 (write_exp_msymbol): Delete, refactored as ...
1736 (find_minsym_type_and_address): ... this new function.
1737 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1738 (operator_length_standard, operator_check_standard): Handle
1739 OP_VAR_MSYM_VALUE.
1740 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1741
1742 2017-09-04 Pedro Alves <palves@redhat.com>
1743
1744 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1745 TYPE_GNU_IFUNC specially here. Throw error if return type is
1746 unknown.
1747 * ada-typeprint.c (print_func_type): Handle functions with unknown
1748 return type.
1749 * c-typeprint.c (c_type_print_base): Handle functions and methods
1750 with unknown return type.
1751 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1752 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1753 * compile/compile-c-types.c: Include "objfiles.h".
1754 (convert_func): For functions with unknown return type, warn and
1755 default to int.
1756 * compile/compile-object-run.c (compile_object_run): Adjust call
1757 to call_function_by_hand_dummy.
1758 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1759 call_function_by_hand.
1760 * eval.c (evaluate_subexp_standard): Adjust calls to
1761 call_function_by_hand. Handle functions and methods with unknown
1762 return type. Pass expect_type to call_function_by_hand.
1763 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1764 return type.
1765 * gcore.c (call_target_sbrk): Adjust call to
1766 call_function_by_hand.
1767 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1768 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1769 an integer address type instead of nodebug.
1770 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1771 call_function_by_hand.
1772 * infcall.c (error_call_unknown_return_type): New function.
1773 (call_function_by_hand): New "default_return_type" parameter.
1774 Pass it down.
1775 (call_function_by_hand_dummy): New "default_return_type"
1776 parameter. Use it instead of defaulting to int. If there's no
1777 default and the return type is unknown, throw an error. If
1778 there's a default return type, and the called function has no
1779 debug info, then assume the function is prototyped.
1780 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1781 New "default_return_type" parameter.
1782 (error_call_unknown_return_type): New declaration.
1783 * linux-fork.c (call_lseek): Cast return type of lseek.
1784 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1785 call_function_by_hand.
1786 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1787 calls to call_function_by_hand.
1788 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1789 return type.
1790 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1791 (value_nsstring, print_object_command): Adjust calls to
1792 call_function_by_hand.
1793 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1794 functions with unknown return type.
1795 (pascal_type_print_func_varspec_suffix): New function.
1796 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1797 TYPE_CODE_METHOD>: Use it.
1798 * python/py-value.c (valpy_call): Adjust call to
1799 call_function_by_hand.
1800 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1801 call_function_by_hand.
1802 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1803 call_function_by_hand.
1804 * valops.c (value_allocate_space_in_inferior): Adjust call to
1805 call_function_by_hand.
1806 * typeprint.c (type_print_unknown_return_type): New function.
1807 * typeprint.h (type_print_unknown_return_type): New declaration.
1808
1809 2017-09-04 Pedro Alves <palves@redhat.com>
1810
1811 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1812 types with more than one parameter as prototyped.
1813
1814 2017-09-04 Pedro Alves <palves@redhat.com>
1815
1816 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1817 (disassemble_command): Use gdb_disassembly_flags instead of bare
1818 int.
1819 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1820 (dump_insns, do_mixed_source_and_assembly_deprecated)
1821 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1822 Use gdb_disassembly_flags instead of bare int.
1823 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1824 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1825 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1826 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1827 (enum gdb_disassembly_flag): ... values of this new enumeration.
1828 (gdb_disassembly_flags): Define.
1829 (gdb_disassembly)
1830 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1831 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1832 gdb_disassembly_flags instead of bare int.
1833 * record-btrace.c (btrace_insn_history)
1834 (record_btrace_insn_history, record_btrace_insn_history_range)
1835 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1836 instead of bare int.
1837 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1838 Use gdb_disassembly_flags instead of bare int.
1839 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1840 Define.
1841 * target-delegates.c: Regenerate.
1842 * target.c (target_insn_history, target_insn_history_from)
1843 (target_insn_history_range): Use gdb_disassembly_flags instead of
1844 bare int.
1845 * target.h: Include "disasm.h".
1846 (struct target_ops) <to_insn_history, to_insn_history_from,
1847 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1848 int.
1849 (target_insn_history, target_insn_history_from)
1850 (target_insn_history_range): Use gdb_disassembly_flags instead of
1851 bare int.
1852
1853 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1854
1855 * cli/cli-script.c (build_command_line): For if/while commands,
1856 check whether args is empty.
1857
1858 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1859
1860 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1861 (enum command_control_type): Likewise.
1862 (struct command_line): Likewise.
1863 (free_command_lines): Likewise.
1864 (struct command_lines_deleter): Likewise.
1865 (command_line_up): Likewise.
1866 (read_command_lines): Likewise.
1867 (read_command_lines_1): Likewise.
1868 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1869 (enum command_control_type): Likewise.
1870 (struct command_line): Likewise.
1871 (free_command_lines): Likewise.
1872 (struct command_lines_deleter): Likewise.
1873 (command_line_up): Likewise.
1874 (read_command_lines): Likewise.
1875 (read_command_lines_1): Likewise.
1876 * breakpoint.h: Include cli/cli-script.h.
1877 * extension-priv.h: Likewise.
1878 * gdbcmd.h: Likewise.
1879
1880 2017-09-04 Pedro Alves <palves@redhat.com>
1881
1882 * ada-lang.c (is_known_support_routine): Move sal declaration to
1883 where it is initialized.
1884 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1885 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1886 (clear_command, update_static_tracepoint): Remove init_sal
1887 references. Move declarations closer to initializations.
1888 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1889 initializations.
1890 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1891 references. Move sal declarations closer to initializations.
1892 * frame.c (find_frame_sal): Return a symtab_and_line via function
1893 return instead of output parameter. Remove init_sal references.
1894 * frame.h (find_frame_sal): Return a symtab_and_line via function
1895 return instead of output parameter.
1896 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1897 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1898 instead of memset.
1899 (gdbscm_find_pc_line): Remove init_sal reference.
1900 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1901 references. Move declarations closer to initializations.
1902 * infcmd.c (set_step_frame): Update. Move declarations closer to
1903 initializations.
1904 (finish_backward): Remove init_sal references. Move declarations
1905 closer to initializations.
1906 * infrun.c (process_event_stop_test, handle_step_into_function)
1907 (insert_hp_step_resume_breakpoint_at_frame)
1908 (insert_step_resume_breakpoint_at_caller): Likewise.
1909 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1910 (symbol_to_sal): Likewise.
1911 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1912 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1913 to its initialization.
1914 * reverse.c (save_bookmark_command): Use new/delete. Remove
1915 init_sal references. Move declarations closer to initializations.
1916 * source.c (get_current_source_symtab_and_line): Remove brace
1917 initialization.
1918 (set_current_source_symtab_and_line): Now takes the sal by const
1919 reference. Remove brace initialization.
1920 (line_info): Remove init_sal reference.
1921 * source.h (set_current_source_symtab_and_line): Now takes a
1922 symtab_and_line via const reference.
1923 * stack.c (set_current_sal_from_frame): Adjust.
1924 (print_frame_info): Adjust.
1925 (get_last_displayed_sal): Return the sal via function return
1926 instead of via output parameter. Simplify.
1927 (frame_info): Adjust.
1928 * stack.h (get_last_displayed_sal): Return the sal via function
1929 return instead of via output parameter.
1930 * symtab.c (init_sal): Delete.
1931 (find_pc_sect_line): Remove init_sal references. Move
1932 declarations closer to initializations.
1933 (find_function_start_sal): Remove init_sal references. Move
1934 declarations closer to initializations.
1935 * symtab.h (struct symtab_and_line): In-class initialize all
1936 fields.
1937 * tracepoint.c (set_traceframe_context)
1938 (print_one_static_tracepoint_marker): Remove init_sal references.
1939 Move declarations closer to initializations.
1940 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1941 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
1942 declarations closer to initializations.
1943 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1944 init_sal references. Adjust.
1945
1946 2017-09-04 Pedro Alves <palves@redhat.com>
1947
1948 * ax-gdb.c (agent_command_1): Use range-for.
1949 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1950 * breakpoint.c: Include "common/array-view.h".
1951 (init_breakpoint_sal, create_breakpoint_sal): Change sals
1952 parameter from struct symtabs_and_lines to
1953 array_view<symtab_and_line>. Adjust. Use range-for. Update.
1954 (breakpoint_sals_to_pc): Change sals parameter from struct
1955 symtabs_and_lines to std::vector reference.
1956 (check_fast_tracepoint_sals): Change sals parameter from struct
1957 symtabs_and_lines to std::array_view. Use range-for.
1958 (decode_static_tracepoint_spec): Return a std::vector instead of
1959 symtabs_and_lines. Update.
1960 (create_breakpoint): Update.
1961 (break_range_command, until_break_command, clear_command): Update.
1962 (base_breakpoint_decode_location, bkpt_decode_location)
1963 (bkpt_probe_create_sals_from_location)
1964 (bkpt_probe_decode_location, tracepoint_decode_location)
1965 (tracepoint_probe_decode_location)
1966 (strace_marker_create_sals_from_location): Return a std::vector
1967 instead of symtabs_and_lines.
1968 (strace_marker_create_breakpoints_sal): Update.
1969 (strace_marker_decode_location): Return a std::vector instead of
1970 symtabs_and_lines. Update.
1971 (update_breakpoint_locations): Change struct symtabs_and_lines
1972 parameters to gdb::array_view. Adjust.
1973 (location_to_sals): Return a std::vector instead of
1974 symtabs_and_lines. Update.
1975 (breakpoint_re_set_default): Use std::vector instead of struct
1976 symtabs_and_lines.
1977 (decode_location_default): Return a std::vector instead of
1978 symtabs_and_lines. Update.
1979 * breakpoint.h: Include "common/array-view.h".
1980 (struct breakpoint_ops) <decode_location>: Now returns a
1981 std::vector instead of returning a symtabs_and_lines via output
1982 parameter.
1983 (update_breakpoint_locations): Change sals parameters to use
1984 gdb::array_view.
1985 * cli/cli-cmds.c (edit_command, list_command): Update to use
1986 std::vector and gdb::array_view.
1987 (ambiguous_line_spec): Adjust to use gdb::array_view and
1988 range-for.
1989 (compare_symtabs): Rename to ...
1990 (cmp_symtabs): ... this. Change parameters to symtab_and_line
1991 const reference and adjust.
1992 (filter_sals): Rewrite using std::vector and standard algorithms.
1993 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1994 (jump_command): Update to use std::vector.
1995 * linespec.c (struct linespec_state) <canonical_names>: Update
1996 comment.
1997 (add_sal_to_sals_basic): Delete.
1998 (add_sal_to_sals, filter_results, convert_results_to_lsals)
1999 (decode_line_2, create_sals_line_offset)
2000 (convert_address_location_to_sals, convert_linespec_to_sals)
2001 (convert_explicit_location_to_sals, parse_linespec)
2002 (event_location_to_sals, decode_line_full, decode_line_1)
2003 (decode_line_with_current_source)
2004 (decode_line_with_last_displayed, decode_objc)
2005 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2006 (linespec_result::~linespec_result): Adjust to use std::vector
2007 instead of symtabs_and_lines.
2008 * linespec.h (linespec_sals::sals): Now a std::vector.
2009 (struct linespec_result): Use std::vector, bool, and in-class
2010 initialization.
2011 (decode_line_1, decode_line_with_current_source)
2012 (decode_line_with_last_displayed): Return std::vector.
2013 * macrocmd.c (info_macros_command): Use std::vector.
2014 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2015 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2016 std::vector.
2017 * probe.h (parse_probes): Return a std::vector.
2018 * python/python.c (gdbpy_decode_line): Use std::vector and
2019 gdb::array_view.
2020 * source.c (select_source_symtab, line_info): Use std::vector.
2021 * stack.c (func_command): Use std::vector.
2022 * symtab.h (struct symtabs_and_lines): Delete.
2023 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2024
2025 2017-09-04 Pedro Alves <palves@redhat.com>
2026
2027 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2028 unittests/array-view-selftests.c.
2029 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2030 * common/array-view.h: New file.
2031 * unittests/array-view-selftests.c: New file.
2032
2033 2017-09-04 Pedro Alves <palves@redhat.com>
2034
2035 * cli/cli-cmds.c (edit_command): Pass message to
2036 ambiguous_line_spec.
2037 (list_command): Pass message to ambiguous_line_spec. Say
2038 "first"/"last" instead of "start" and "end" to be consistent with
2039 the manual.
2040 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2041 them to print formatted message.
2042
2043 2017-09-04 Pedro Alves <palves@redhat.com>
2044
2045 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2046 ftrace_update_insns by reference instead of pointer.
2047
2048 2017-09-04 Yao Qi <yao.qi@linaro.org>
2049
2050 * i386-go32-tdep.c: Include x86-xstate.h.
2051 (i386_go32_init_abi): Call i386_target_description.
2052 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2053 if xcr0 is X86_XSTATE_X87_MASK.
2054 * i386-tdep.h (tdesc_i386): Remove the declaration.
2055 (tdesc_i386_mmx): Likewise.
2056
2057 2017-09-04 Yao Qi <yao.qi@linaro.org>
2058
2059 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2060 X86_XSTATE_SSE_MASK instead of 0.
2061
2062 2017-09-04 Yao Qi <yao.qi@linaro.org>
2063
2064 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2065 i386_target_description.
2066 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2067 i386_target_description.
2068 * i386-tdep.c (i386_gdbarch_init): Likewise.
2069
2070 2017-09-04 Yao Qi <yao.qi@linaro.org>
2071
2072 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2073 (x86_darwin_init_abi_64): Call amd64_target_description.
2074 * amd64-dicos-tdep.c: Likewise.
2075 * amd64-fbsd-nat.c: Likewise.
2076 * amd64-fbsd-tdep.c: Likewise.
2077 * amd64-nbsd-tdep.c: Likewise.
2078 * amd64-obsd-tdep.c: Likewise.
2079 * amd64-sol2-tdep.c: Likewise.
2080 * amd64-windows-tdep.c: Likewise.
2081 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2082
2083 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2084
2085 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2086 (btrace_function) <insn>: Change type to use std::vector.
2087 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2088 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2089 ftrace_update_insns, ftrace_compute_global_level_offset,
2090 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2091 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2092 change to std::vector.
2093 (ftrace_update_insns): Adjust to change to std::vector, change
2094 type of INSN parameter.
2095 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2096 * record-btrace.c (btrace_call_history_insn_range,
2097 btrace_compute_src_line_range,
2098 record_btrace_frame_prev_register): Adjust to change to
2099 std::vector.
2100 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2101 to change to std::vector.
2102
2103 2017-09-03 Tom Tromey <tom@tromey.com>
2104
2105 * corefile.c (reopen_exec_file): Use std::string.
2106
2107 2017-09-03 Tom Tromey <tom@tromey.com>
2108
2109 * compile/compile.c (compile_register_name_mangled): Return
2110 std::string.
2111 * compile/compile-loc2c.c (pushf_register_address): Update.
2112 (pushf_register): Update.
2113 * compile/compile-c-types.c (convert_array): Update.
2114 * compile/compile-c-symbols.c (generate_vla_size): Update.
2115 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2116 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2117 (convert_one_symbol): Update.
2118 (generate_c_for_for_one_variable): Update.
2119 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2120 std::string.
2121 (generate_register_struct): Update.
2122 * compile/compile-internal.h (c_get_range_decl_name): Return a
2123 std::string.
2124 (compile_register_name_mangled): Return std::string.
2125
2126 2017-09-03 Tom Tromey <tom@tromey.com>
2127
2128 * utils.c (perror_string): Return a std::string.
2129 (throw_perror_with_name, perror_warning_with_name): Update.
2130
2131 2017-09-03 Tom Tromey <tom@tromey.com>
2132
2133 * demangle.c (demangle_command): Use std::string,
2134 unique_xmalloc_ptr.
2135
2136 2017-09-03 Tom Tromey <tom@tromey.com>
2137
2138 * cli/cli-setshow.c (do_set_command): Use std::string.
2139
2140 2017-09-03 Tom Tromey <tom@tromey.com>
2141
2142 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2143
2144 2017-09-03 Tom Tromey <tom@tromey.com>
2145
2146 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2147
2148 2017-09-03 Tom Tromey <tom@tromey.com>
2149
2150 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2151 gdb::unique_xmalloc_ptr.
2152
2153 2017-09-03 Tom Tromey <tom@tromey.com>
2154
2155 * thread.c (print_thread_info_1): Use string_printf.
2156 (thread_apply_command, thread_apply_all_command): Use
2157 std::string.
2158
2159 2017-09-03 Tom Tromey <tom@tromey.com>
2160
2161 * valprint.c (val_print_string): Update.
2162 * gdbcore.h (memory_error_message): Return std::string.
2163 * corefile.c (memory_error_message): Return std::string.
2164 (memory_error): Update.
2165 * breakpoint.c (insert_bp_location): Update.
2166
2167 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2168
2169 * target/waitstatus.h (target_waitstatus_to_string): Change
2170 return type to std::string.
2171 * target/waitstatus.c (target_waitstatus_to_string): Return
2172 std::string.
2173 * target.h (target_waitstatus_to_string): Remove declaration.
2174 * infrun.c (resume, clear_proceed_status_thread,
2175 print_target_wait_results, do_target_wait, save_waitstatus,
2176 stop_all_threads): Adjust.
2177 * record-btrace.c (record_btrace_wait): Adjust.
2178 * target-debug.h
2179 (target_debug_print_struct_target_waitstatus_p): Adjust.
2180
2181 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2182
2183 PR gdb/22046
2184 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2185 detection.
2186
2187 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2188
2189 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2190 for setting/unsetting environment variables on the remote target.
2191 (New remote packets): Add entries for QEnvironmentHexEncoded,
2192 QEnvironmentUnset and QEnvironmentReset.
2193 * common/environ.c (gdb_environ::operator=): Extend method to
2194 handle m_user_set_env_list and m_user_unset_env_list.
2195 (gdb_environ::clear): Likewise.
2196 (match_var_in_string): Change type of first parameter from 'char
2197 *' to 'const char *'.
2198 (gdb_environ::set): Extend method to handle
2199 m_user_set_env_list and m_user_unset_env_list.
2200 (gdb_environ::unset): Likewise.
2201 (gdb_environ::clear_user_set_env): New method.
2202 (gdb_environ::user_set_envp): Likewise.
2203 (gdb_environ::user_unset_envp): Likewise.
2204 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2205 m_user_unset_env_list on move constructor/assignment.
2206 (unset): Add new default parameter 'update_unset_list = true'.
2207 (clear_user_set_env): New method.
2208 (user_set_envp): Likewise.
2209 (user_unset_envp): Likewise.
2210 (m_user_set_env_list): New std::set.
2211 (m_user_unset_env_list): Likewise.
2212 * common/rsp-low.c (hex2str): New function.
2213 (bin2hex): New overload for bin2hex function.
2214 * common/rsp-low.c (hex2str): New prototype.
2215 (str2hex): New overload prototype.
2216 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2217 QEnvironmentUnset and QEnvironmentReset.
2218 (remote_protocol_features): Add QEnvironmentHexEncoded,
2219 QEnvironmentUnset and QEnvironmentReset packets.
2220 (send_environment_packet): New function.
2221 (extended_remote_environment_support): Likewise.
2222 (extended_remote_create_inferior): Call
2223 extended_remote_environment_support.
2224 (_initialize_remote): Add QEnvironmentHexEncoded,
2225 QEnvironmentUnset and QEnvironmentReset packet configs.
2226 * unittests/environ-selftests.c (gdb_selftest_env_var):
2227 New variable.
2228 (test_vector_initialization): New function.
2229 (test_init_from_host_environ): Likewise.
2230 (test_reinit_from_host_environ): Likewise.
2231 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2232 Likewise.
2233 (test_unset_set_empty_vector): Likewise.
2234 (test_vector_clear): Likewise.
2235 (test_std_move): Likewise.
2236 (test_move_constructor):
2237 (test_self_move): Likewise.
2238 (test_set_unset_reset): Likewise.
2239 (run_tests): Rewrite in terms of the functions above.
2240
2241 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2242
2243 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2244 (adi_available): Use a temp variable of type CORE_ADDR as argument
2245 3 when calling target_auxv_search.
2246 (adi_normalize_address): Use masks and xor operators to calculate
2247 normalized address.
2248 (adi_read_versions, adi_write_versions, adi_print_versions)
2249 (do_examine, do_assign): Use paddress.
2250
2251 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2252
2253 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2254 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2255 out of loop and add supply of FIR.
2256 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2257 add collect of FIR.
2258
2259 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2260
2261 PR gdb/21827
2262 * cli/cli-script.c (define_command): Don't convert command name
2263 to lower case.
2264
2265 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2266
2267 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2268 Update all callers accordingly. Remove all code blocks handling
2269 the case where DISPP is not NULL.
2270
2271 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2272
2273 PR symtab/22003
2274 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2275 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2276 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2277
2278 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2279
2280 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2281 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2282 (read_comp_units_from_section): New parameter abbrev_section, use
2283 read_and_check_comp_unit_head, allocate signatured_type if needed.
2284 (create_all_comp_units): Update read_comp_units_from_section caller.
2285
2286 2017-08-23 Pedro Alves <palves@redhat.com>
2287
2288 PR remote/21852
2289 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2290 to null_ptid and switch to thread without reading the registers
2291 after adding the inferior.
2292
2293 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2294
2295 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2296 compile-gcc.
2297 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2298 (compile_to_object): Implement compile_gcc.
2299 (_initialize_compile): Install "set compile-gcc". Initialize
2300 compile_gcc.
2301
2302 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2303
2304 * compile/compile.c (compile_to_object): Conditionally call
2305 set_verbose. Conditionally call compile or compile_v0.
2306
2307 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2308
2309 * sparc64-tdep.h: (adi_normalize_address): New export.
2310 * sparc-nat.h: (open_adi_tag_fd): New export.
2311 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2312 * sparc64-linux-tdep.c:
2313 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2314 (sparc64_linux_handle_segmentation_fault): New function.
2315 (sparc64_linux_init_abi): Register
2316 sparc64_linux_handle_segmentation_fault
2317 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2318 (sparc64_addr_bits_remove): New function.
2319 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2320 (MAX_PROC_NAME_SIZE): New macro.
2321 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2322 (sparc64adilist): New variable.
2323 (adi_proc_list): New variable.
2324 (find_adi_info): New function.
2325 (add_adi_info): New function.
2326 (get_adi_info_proc): New function.
2327 (get_adi_info): New function.
2328 (info_adi_command): New function.
2329 (read_maps_entry): New function.
2330 (adi_available): New function.
2331 (adi_normalize_address): New function.
2332 (adi_align_address): New function.
2333 (adi_convert_byte_count): New function.
2334 (adi_tag_fd): New function.
2335 (adi_is_addr_mapped): New function.
2336 (adi_read_versions): New function.
2337 (adi_write_versions): New function.
2338 (adi_print_versions): New function.
2339 (do_examine): New function.
2340 (do_assign): New function.
2341 (adi_examine_command): New function.
2342 (adi_assign_command): New function.
2343 (_initialize_sparc64_adi_tdep): New function.
2344
2345 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2346
2347 * breakpoint.c (breakpoints_info): Rename to ...
2348 (info_breakpoints_command): ... this.
2349 (watchpoints_info): Rename to ...
2350 (info_watchpoints_command): ... this.
2351 (tracepoints_info): Rename to ...
2352 (info_tracepoints_command): ... this.
2353 (_initialize_breakpoint): Adjust.
2354 * dcache.c (dcache_info): Rename to ...
2355 (info_display_command): ... this.
2356 (_initialize_dcache): Adjust.
2357 * frame.h (args_info): Rename to ...
2358 (info_args_command): ... this.
2359 (locals_info): Rename to ...
2360 (info_locals_command): ... this.
2361 * infcmd.c (nofp_registers_info): Rename to ...
2362 (info_registers_command): ... this.
2363 (float_info): Rename to ...
2364 (info_float_command): ... this.
2365 (program_info): Rename to ...
2366 (info_program_command): ... this.
2367 (all_registers_info): Rename to ...
2368 (info_all_registers_command): ... this.
2369 (vector_info): Rename to ...
2370 (info_vector_command): ... this.
2371 (float_info): Rename to ...
2372 (info_float_command): ... this.
2373 (_initialize_infcmd): Adjust.
2374 * inferior.h (term_info): Rename to ...
2375 (info_terminal_command): ... this.
2376 * inflow.c (term_info): Rename to ...
2377 (info_terminal_command): ... this.
2378 (_initialize_inflow): Adjust.
2379 * infrun.c (signals_info): Rename to ...
2380 (info_signals_command): ... this.
2381 (_initialize_infrun): Adjust.
2382 * objc-lang.c (classes_info): Rename to ...
2383 (info_classes_command): ... this.
2384 (selectors_info): Rename to ...
2385 (info_selectors_command): ... this.
2386 (_initialize_objc_language): Adjust.
2387 * printcmd.c (sym_info): Rename to ...
2388 (info_symbol_command): ... this.
2389 (address_info): Rename to ...
2390 (info_address_command): ... this.
2391 (display_info): Rename to ...
2392 (info_display_command): ... this.
2393 (_initialize_printcmd): Adjust.
2394 * reverse.c (bookmarks_info): Rename to ...
2395 (info_breakpoints_command): ... this.
2396 (_initialize_reverse): Adjust.
2397 * ser-go32.c (dos_info): Rename to ...
2398 (info_serial_command): ... this.
2399 (_initialize_ser_dos): Adjust.
2400 * skip.c (skip_info): Rename to ...
2401 (info_skip_command): ... this.
2402 (_initialize_step_skip): Adjust.
2403 * source.c (line_info): Rename to ...
2404 (info_line_command): ... this.
2405 (source_info): Rename to ...
2406 (info_source_command)
2407 * stack.c (frame_info): Rename to ...
2408 (info_frame_command): ... this.
2409 (locals_info): Rename to ...
2410 (info_locals_command): ... this.
2411 (args_info): Rename to ...
2412 (info_args_command): ... this.
2413 (_initialize_stack): Adjust.
2414 * symtab.c (sources_info): Rename to ...
2415 (info_sources_command): ... this.
2416 (variables_info): Rename to ...
2417 (info_variables_command): ... this.
2418 (functions_info): Rename to ...
2419 (info_functions_command): ... this.
2420 (types_info): Rename to ...
2421 (info_types_command): ... this.
2422 (_initialize_symtab): Adjust.
2423 * target.c (target_info): Rename to ...
2424 (info_target_command): ... this.
2425 (initialize_targets): Adjust.
2426 * tracepoint.c (tvariables_info): Rename to ...
2427 (info_tvariables_command): ... this.
2428 (scope_info): Rename to ...
2429 (info_scope_command): ... this.
2430 (trace_dump_actions): Adjust.
2431 (_initialize_tracepoint): Adjust.
2432
2433 2017-08-22 Tom Tromey <tom@tromey.com>
2434
2435 * breakpoint.h (install_breakpoint): Update.
2436 * breakpoint.c (add_solib_catchpoint): Update.
2437 (install_breakpoint): Change argument to a std::unique_ptr.
2438 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2439 (create_breakpoint_sal, create_breakpoint): Update.
2440 (watch_command_1, catch_exec_command_1)
2441 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2442 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2443 Return the breakpoint.
2444 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2445 (new_single_step_breakpoint): Update.
2446 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2447 std::unique_ptr.
2448 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2449 std::unique_ptr.
2450 * break-catch-sig.c (create_signal_catchpoint): Use
2451 std::unique_ptr.
2452 * ada-lang.c (create_ada_exception_catchpoint): Use
2453 std::unique_ptr.
2454
2455 2017-08-22 Tom Tromey <tom@tromey.com>
2456
2457 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2458
2459 2017-08-22 Tom Tromey <tom@tromey.com>
2460
2461 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2462 (lookup_partial_symbol): Update.
2463
2464 2017-08-22 Tom Tromey <tom@tromey.com>
2465
2466 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2467 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2468 (find_and_open_source, symtab_to_fullname): Update.
2469 * psymtab.c (psymtab_to_fullname): Update.
2470
2471 2017-08-22 Tom Tromey <tom@tromey.com>
2472
2473 * exec.c (exec_file_attach): Update.
2474 * linux-thread-db.c (try_thread_db_load): Update.
2475 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2476 * utils.c (gdb_realpath): Change return type.
2477 (gdb_realpath_keepfile): Update.
2478 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2479 (_initialize_utils): Register the new self test.
2480 * source.c (openp): Update.
2481 (find_and_open_source): Update.
2482 * nto-tdep.c (nto_find_and_open_solib): Update.
2483 * main.c (set_gdb_data_directory): Update.
2484 (captured_main_1): Update.
2485 * dwarf2read.c (dwarf2_get_dwz_file): Update
2486 (dw2_map_symbol_filenames): Update.
2487 * auto-load.c (auto_load_safe_path_vec_update): Update.
2488 (filename_is_in_auto_load_safe_path_vec): Change type of
2489 "filename_realp".
2490 (auto_load_objfile_script): Update.
2491 (file_is_auto_load_safe): Update. Use std::string.
2492 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2493
2494 2017-08-22 Tom Tromey <tom@tromey.com>
2495
2496 * utils.c (gdb_realpath_keepfile): Return a
2497 gdb::unique_xmalloc_ptr.
2498 * exec.c (exec_file_attach): Update.
2499 * utils.h (gdb_realpath_keepfile): Return a
2500 gdb::unique_xmalloc_ptr.
2501
2502 2017-08-22 Tom Tromey <tom@tromey.com>
2503
2504 * compile/compile.c (compile_file_command): Use
2505 gdb::unique_xmalloc_ptr, std::string.
2506 * utils.c (gdb_abspath): Change return type.
2507 * source.c (openp): Update.
2508 * objfiles.c (allocate_objfile): Update.
2509 * main.c (set_gdb_data_directory): Update.
2510 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2511
2512 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2513
2514 * cli-cmds.c (list_commands): List actual code around more than
2515 one location.
2516
2517 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2518
2519 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2520
2521 2017-08-21 Pedro Alves <palves@redhat.com>
2522
2523 PR gdb/19487
2524 * c-exp.y (variable production): Handle function aliases.
2525 * minsyms.c (msymbol_is_text): New function.
2526 * minsyms.h (msymbol_is_text): Declare.
2527 * symtab.c (find_function_alias_target): New function.
2528 * symtab.h (find_function_alias_target): Declare.
2529
2530 2017-08-21 Pedro Alves <palves@redhat.com>
2531
2532 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2533 typedefs.
2534 * typeprint.c (whatis_exp): If handling "whatis", and expression
2535 is OP_TYPE, strip one typedef level. Otherwise don't strip
2536 typedefs here.
2537 * valops.c (value_cast): Save "to" type before resolving
2538 stubs/typedefs. Use that type as resulting value's type.
2539
2540 2017-08-18 Tom Tromey <tom@tromey.com>
2541 Pedro Alves <palves@redhat.com>
2542
2543 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2544 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2545 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2546 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2547 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2548 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2549 (linux_get_siginfo_data): Add "thread" argument. Use
2550 scoped_restore.
2551 * linux-nat.c (linux_child_follow_fork)
2552 (check_stopped_by_watchpoint): Use scoped_restore.
2553 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2554 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2555 (restore_inferior_ptid, save_inferior_ptid): Remove.
2556 * btrace.c (btrace_fetch): Use scoped_restore.
2557 * bsd-uthread.c (bsd_uthread_fetch_registers)
2558 (bsd_uthread_store_registers): Use scoped_restore.
2559 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2560 scoped_restore.
2561 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2562 (aix_thread_xfer_partial): Use scoped_restore.
2563 * inferior.h (save_inferior_ptid): Remove.
2564
2565 2017-08-18 Yao Qi <yao.qi@linaro.org>
2566
2567 PR tdep/21818
2568 * arm-tdep.c (gdb_print_insn_arm): Mark
2569 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2570
2571 2017-08-18 Yao Qi <yao.qi@linaro.org>
2572
2573 * NEWS: Mention GDBserver's new option "--selftest".
2574 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2575 * selftest.c: Move it to common/selftest.c.
2576 * selftest.h: Move it to common/selftest.h.
2577 * selftest-arch.c (reset): New function.
2578 (tests_with_arch): Call reset.
2579
2580 2017-08-18 Yao Qi <yao.qi@linaro.org>
2581
2582 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2583 instead of exception_fprintf and printf_filtered.
2584
2585 2017-08-18 Yao Qi <yao.qi@linaro.org>
2586
2587 * selftest.c (register_self_test): Rename it to
2588 selftests::register_test.
2589 (run_self_tests): selftest::run_tests.
2590 * selftest.h: Update declarations.
2591 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2592 selftests::register_test_foreach_arch.
2593 * selftest-arch.h: Update declaration.
2594 * aarch64-tdep.c: Update.
2595 * arm-tdep.c: Likewise.
2596 * disasm-selftests.c: Likewise.
2597 * dwarf2loc.c: Likewise.
2598 * dwarf2-frame.c: Likewise.
2599 * findvar.c: Likewise.
2600 * gdbarch-selftests.c: Likewise.
2601 * maint.c (maintenance_selftest): Likewise.
2602 * regcache.c: Likewise.
2603 * rust-exp.y: Likewise.
2604 * selftest-arch.c: Likewise.
2605 * unittests/environ-selftests.c: Likewise.
2606 * unittests/function-view-selftests.c: Likewise.
2607 * unittests/offset-type-selftests.c: Likewise.
2608 * unittests/optional-selftests.c: Likewise.
2609 * unittests/scoped_restore-selftests.c: Likewise.
2610 * utils-selftests.c: Likewise.
2611
2612 2017-08-17 Pedro Alves <palves@redhat.com>
2613
2614 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2615 local.
2616
2617 2017-08-17 Pedro Alves <palves@redhat.com>
2618
2619 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2620 field.
2621 (reset_die_in_process): Delete, replaced by ...
2622 (process_die_scope): ... this new class. Make it responsible for
2623 freeing cu->line_header too.
2624 (process_die): Use process_die_scope.
2625 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2626 cu->line_header_die_owner. Don't release the line header if it's
2627 owned by the CU.
2628 (setup_type_unit_groups): Make the CU/DIE own the line header.
2629 Don't release the line header here.
2630
2631 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2632
2633 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2634
2635 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2636
2637 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2638 Single-Key mode
2639
2640 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2641
2642 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2643 mode command list.
2644
2645 2017-08-15 Stafford Horne <shorne@gmail.com>
2646
2647 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2648
2649 2017-08-15 Stafford Horne <shorne@gmail.com>
2650
2651 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2652
2653 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2654
2655 PR gdb/21954
2656 * infcmd.c (unset_environment_command): Use the 'clear' method on
2657 the environment instead of resetting it.
2658
2659 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2660
2661 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2662 platforms.
2663
2664 2017-08-14 Tom Tromey <tom@tromey.com>
2665
2666 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2667 (print_binary_chars): Likewise.
2668 (BITS_IN_BYTES): Remove.
2669
2670 2017-08-14 Tom Tromey <tom@tromey.com>
2671
2672 PR gdb/21675
2673 * valprint.c (LOW_ZERO): Change value to 034.
2674 (print_octal_chars): Add static_asserts for octal constants.
2675 * printcmd.c (print_scalar_formatted): Add 'd' case.
2676
2677 2017-08-11 Tom Tromey <tom@tromey.com>
2678
2679 * symfile.c (add_symbol_file_command): Use std::vector.
2680
2681 2017-08-14 Tom Tromey <tom@tromey.com>
2682
2683 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2684 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2685 std::move.
2686 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2687
2688 2017-08-11 Pedro Alves <palves@redhat.com>
2689
2690 * infrun.c (process_event_stop_test): Adjust
2691 function_name_is_marked_for_skip call.
2692 * skip.c: Include <list>.
2693 (skiplist_entry): Make it a class with private fields, and
2694 getters/setters.
2695 (skiplist_entry_chain): Delete.
2696 (skiplist_entries): New.
2697 (skiplist_entry_count): Delete.
2698 (highest_skiplist_entry_num): New.
2699 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2700 (add_skiplist_entry): Delete.
2701 (skiplist_entry::skiplist_entry): New.
2702 (skiplist_entry::add_entry): New.
2703 (skip_file_command, skip_function): Adjust.
2704 (compile_skip_regexp): Delete.
2705 (skip_command): Don't compile regexp here. Adjust to use
2706 skiplist_entry::add_entry.
2707 (skip_info): Adjust to use range-for and getters.
2708 (skip_enable_command, skip_disable_command): Adjust to use
2709 range-for and setters.
2710 (skip_delete_command): Adjust to use std::list.
2711 (add_skiplist_entry): Delete.
2712 (skip_file_p): Delete, refactored as ...
2713 (skiplist_entry::do_skip_file_p): ... this new method.
2714 (skip_gfile_p): Delete, refactored as ...
2715 (skiplist_entry::do_gskip_file_p): ... this new method.
2716 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2717 (skiplist_entry::skip_function_p): ... this new method.
2718 (function_name_is_marked_for_skip): Now returns bool, and takes
2719 the function sal by const reference. Adjust to use range-for and
2720 skiplist_entry methods.
2721 (_initialize_step_skip): Remove references to
2722 skiplist_entry_chain, skiplist_entry_count.
2723 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2724 takes the function sal by const reference.
2725
2726 2017-08-11 Yao Qi <yao.qi@linaro.org>
2727
2728 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2729 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2730 (dwarf2_frame_cache):
2731 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2732 RETURN_MASK_ALL and set *this_case to NULL.
2733 * frame-unwind.h: Update comments.
2734
2735 2017-08-11 Yao Qi <yao.qi@linaro.org>
2736
2737 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2738 (dwarf2_frame_state_copy_regs): Remove.
2739 (dwarf2_frame_state_free_regs): Remove.
2740 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2741 (dwarf2_restore_rule): Call method .alloc_regs instead of
2742 dwarf2_frame_state_alloc_regs.
2743 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2744 constructor. Call std::move.
2745 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2746 (dwarf2_frame_cache): Likewise.
2747
2748 [GDB_SELF_TEST]: Include selftest.h and
2749 selftest-arch.h.
2750 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2751 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2752 execute_cfa_program_test.
2753
2754 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2755 copy ctor, assignment operator, move assignment.
2756 <alloc_regs>: New method.
2757 <swap>: New method.
2758 (struct dwarf2_frame_state): Delete dtor.
2759 (dwarf2_frame_state_alloc_regs): Remove declaration.
2760 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2761 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2762
2763 2017-08-11 Yao Qi <yao.qi@linaro.org>
2764
2765 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2766 (dwarf2_frame_state::dwarf2_frame_state): New.
2767 (dwarf2_frame_state::~dwarf2_frame_state): New.
2768 (dwarf2_fetch_cfa_info): Update.
2769 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2770 rather than a pointer. Update code.
2771 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2772 dtor.
2773 <data_align, code_align, retaddr_column>: Change them to const.
2774 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2775 to bool.
2776
2777 2017-08-11 Yao Qi <yao.qi@linaro.org>
2778
2779 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2780 <loc.exp>: New field.
2781 * dwarf2-frame.c (execute_cfa_program): Update.
2782 (dwarf2_frame_prev_register): Update.
2783
2784 2017-08-10 Pedro Alves <palves@redhat.com>
2785
2786 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2787
2788 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2789
2790 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2791 (fbsd_pending_children): Use std::list.
2792 (fbsd_remember_child): Likewise.
2793 (fbsd_is_child_pending): Likewise.
2794 (fbsd_pending_vfork_done): Use std::forward_list.
2795 (fbsd_add_vfork_done): Likewise.
2796 (fbsd_is_vfork_done_pending): Likewise.
2797 (fbsd_next_vfork_done): Likewise.
2798
2799 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2800
2801 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2802 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2803 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2804 for `mapfilename'.
2805 (fbsd_xfer_partial): Use gdb::byte_vector.
2806 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2807
2808 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2809
2810 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2811 "filestuff.h".
2812 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2813
2814 2017-08-09 Tom Tromey <tom@tromey.com>
2815
2816 * skip.c (skiplist_entry): New constructor.
2817 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2818 (skiplist_entry::file_is_glob): Now bool.
2819 (skiplist_entry::file, skiplist_entry::function): Now
2820 std::string.
2821 (make_skip_entry): Return a unique_ptr. Use new.
2822 (free_skiplist_entry, free_skiplist_entry_cleanup)
2823 (make_free_skiplist_entry_cleanup): Remove.
2824 (skip_command, skip_disable_command, add_skiplist_entry)
2825 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2826 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2827 (function_name_is_marked_for_skip): Update.
2828 (skip_delete_command): Update. Use delete.
2829
2830 2017-08-09 Jiong Wang <jiong.wang@arm.com>
2831
2832 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2833 (aarch64_linux_core_read_description): New function.
2834 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2835
2836 2017-08-09 Pedro Alves <palves@redhat.com>
2837
2838 * cp-name-parser.y (cp_comp_to_string): Return a
2839 gdb::unique_xmalloc_ptr<char>.
2840 * cp-support.c (replace_typedefs_qualified_name)
2841 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2842 (cp_canonicalize_string_full): Use op= instead of explicit
2843 convertion.
2844 (cp_class_name_from_physname, method_name_from_physname)
2845 (cp_func_name, cp_remove_params): Adjust to use
2846 gdb::unique_xmalloc_ptr<char>.
2847 * cp-support.h (cp_comp_to_string): Return a
2848 gdb::unique_xmalloc_ptr<char>.
2849 * python/py-type.c (typy_lookup_type): Adjust to use
2850 gdb::unique_xmalloc_ptr<char>.
2851
2852 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2853
2854 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2855
2856 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2857 Yao Qi <yao.qi@linaro.org>
2858
2859 * cp-support.c (cp_canonicalize_string_full): Use
2860 gdb::unique_xmalloc_ptr<char>.
2861 (cp_canonicalize_string): Likewise.
2862
2863 2017-08-09 Yao Qi <yao.qi@linaro.org>
2864
2865 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2866 * regformats/i386/amd64-avx-avx512.dat: Remove.
2867 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2868 * regformats/i386/amd64-avx-mpx.dat:Remove.
2869 * regformats/i386/amd64-avx.dat: Remove.
2870 * regformats/i386/amd64-mpx.dat: Remove.
2871 * regformats/i386/i386-avx-avx512.dat: Remove.
2872 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2873 * regformats/i386/i386-avx-mpx.dat: Remove.
2874 * regformats/i386/i386-mmx.dat: Remove.
2875 * regformats/i386/i386-mpx.dat: Remove.
2876
2877 2017-08-09 Yao Qi <yao.qi@linaro.org>
2878
2879 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2880 * amd64-tdep.c: Don't include features/i386/x32*.c.
2881 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2882 functions.
2883 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2884 and i386/x32-avx-avx512.
2885 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2886 and i386/x32.xml.
2887 * features/i386/x32-avx-avx512.c: Removed.
2888 * features/i386/x32-avx-avx512.xml: Removed.
2889 * features/i386/x32-avx.c: Removed.
2890 * features/i386/x32-avx.xml: Removed.
2891 * features/i386/x32.c: Removed.
2892 * features/i386/x32.xml: Removed.
2893 * regformats/i386/x32-avx-avx512.dat: Removed.
2894 * regformats/i386/x32-avx.dat: Removed.
2895 * regformats/i386/x32.dat: Removed.
2896
2897 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2898
2899 PR breakpoints/21886
2900 * mem-break.c (default_memory_insert_breakpoint): Use
2901 `->placed_address' rather than `->reqstd_address' for the
2902 breakpoint location.
2903
2904 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2905
2906 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2907 assertions.
2908
2909 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2910
2911 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2912 a union of `tdep_info', `tdesc_data' and `id'.
2913 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2914 rather than `info.tdep_info'.
2915 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2916 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2917 * i386-tdep.c (i386_gdbarch_init): Likewise.
2918 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2919 * mips-tdep.c (mips_gdbarch_init): Likewise.
2920 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2921 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2922 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2923 `info.tdep_info'.
2924 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2925 `info.tdep_info'.
2926 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2927 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2928 `info.tdep_info'.
2929 * spu-tdep.c (spu_gdbarch_init): Likewise.
2930 * gdbarch.h: Regenerate.
2931
2932 2017-08-07 Leszek Swirski <leszeks@google.com>
2933
2934 PR symtab/20899
2935 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2936
2937 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2940 (gdbsim_open): Rename gdb_argv args object to argv.
2941
2942 2017-08-05 Tom Tromey <tom@tromey.com>
2943
2944 * compile/compile-object-load.c (compile_object_load): Use
2945 gdb::unique_xmalloc_ptr.
2946 * cli/cli-dump.c (scan_filename): Rename from
2947 scan_filename_with_cleanup. Change return type.
2948 (scan_expression): Rename from scan_expression_with_cleanup.
2949 Change return type.
2950 (dump_memory_to_file, dump_value_to_file, restore_command):
2951 Use gdb::unique_xmalloc_ptr. Update.
2952 * cli/cli-cmds.c (find_and_open_script): Use
2953 gdb::unique_xmalloc_ptr.
2954 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2955 * symmisc.c (maintenance_print_symbols)
2956 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2957 * symfile.c (symfile_bfd_open, generic_load)
2958 (add_symbol_file_command, remove_symbol_file_command): Use
2959 gdb::unique_xmalloc_ptr.
2960 * source.c (openp): Use gdb::unique_xmalloc_ptr.
2961 * psymtab.c (maintenance_print_psymbols): Use
2962 gdb::unique_xmalloc_ptr.
2963 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2964 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2965 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2966 (reload_shared_libraries_1): Likewise.
2967
2968 2017-08-05 Tom Tromey <tom@tromey.com>
2969
2970 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2971 (rust_op_vector, rust_set_vector): New typedefs.
2972 (current_parser): New global.
2973 (work_obstack): Change to pointer type. Update all users.
2974 (rust_ast, pstate): Remove globals.
2975 (struct rust_parser): New.
2976 (%union) <params, field_inits>: Change type.
2977 (start, tuple_expr, unit_expr, struct_expr_list, literal)
2978 (field_expr, expr_list, maybe_expr_list, type_list): Update.
2979 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2980 (convert_params_to_types, convert_params_to_expression): Change
2981 type of "params".
2982 (ast_string): Change type of "fields".
2983 (rust_parse): Make a rust_parser. Remove cleanups.
2984 (rust_lex_tests): Make and install an auto_obstack.
2985
2986 2017-08-04 Yao Qi <yao.qi@linaro.org>
2987
2988 * configure.srv (ipa_x32_linux_regobj): New.
2989 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2990 instead of X86_TDESC_AVX512.
2991 (initialize_low_tracepoint): Call
2992 init_registers_x32_avx_avx512_linux.
2993
2994 2017-08-04 Yao Qi <yao.qi@linaro.org>
2995
2996 * utils.h (gdb_argv): Add namespace std for nullptr_t.
2997
2998 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
2999
3000 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3001
3002 2017-08-03 Tom Tromey <tom@tromey.com>
3003
3004 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3005 Remove.
3006 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3007
3008 2017-08-03 Tom Tromey <tom@tromey.com>
3009
3010 * python/py-param.c (compute_enum_values): Use gdb_argv.
3011
3012 2017-08-03 Tom Tromey <tom@tromey.com>
3013
3014 * utils.h (struct gdb_argv_deleter): New.
3015 (gdb_argv): New class.
3016 * utils.c (gdb_argv::reset): New method.
3017 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3018 * tracefile.c (tsave_command): Use gdb_argv.
3019 * top.c (new_ui_command): Use gdb_argv.
3020 * symmisc.c (maintenance_print_symbols)
3021 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3022 * symfile.c (symbol_file_command, generic_load)
3023 (remove_symbol_file_command): Use gdb_argv.
3024 * stack.c (backtrace_command): Use gdb_argv.
3025 * source.c (add_path, show_substitute_path_command)
3026 (unset_substitute_path_command, set_substitute_path_command):
3027 Use gdb_argv.
3028 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3029 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3030 * remote.c (extended_remote_run, remote_put_command)
3031 (remote_get_command, remote_delete_command): Use gdb_argv.
3032 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3033 (gdbsim_open): Use gdb_argv.
3034 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3035 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3036 * procfs.c (procfs_info_proc): Use gdb_argv.
3037 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3038 * infrun.c (handle_command): Use gdb_argv.
3039 * inferior.c (add_inferior_command, clone_inferior_command):
3040 Use gdb_argv.
3041 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3042 * exec.c (exec_file_command): Use gdb_argv.
3043 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3044 * compile/compile.c (build_argc_argv): Use gdb_argv.
3045
3046 2017-08-03 Tom Tromey <tom@tromey.com>
3047
3048 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3049
3050 2017-08-03 Tom Tromey <tom@tromey.com>
3051
3052 * python/python.c (compute_python_string): Return std::string.
3053 (gdbpy_eval_from_control_command): Update.
3054 (do_start_initialization): Use std::string.
3055 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3056 xstrprintf.
3057 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3058 xstrprintf.
3059
3060 2017-08-03 Tom Tromey <tom@tromey.com>
3061
3062 * top.h (do_restore_instream_cleanup): Remove.
3063 * top.c (do_restore_instream_cleanup): Remove.
3064 (read_command_file): Use scoped_restore.
3065 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3066
3067 2017-08-03 Tom Tromey <tom@tromey.com>
3068
3069 * cli/cli-script.c (execute_user_command)
3070 (execute_control_command): Use scoped_restore.
3071
3072 2017-08-03 Tom Tromey <tom@tromey.com>
3073
3074 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3075 (execute_user_command): Remove user_call_depth; use
3076 user_args_stack's size instead.
3077
3078 2017-08-03 Tom Tromey <tom@tromey.com>
3079
3080 * top.h (in_user_command): Remove.
3081 * top.c (in_user_command): Remove.
3082 * cli/cli-script.c (do_restore_user_call_depth)
3083 (execute_user_command): Update.
3084
3085 2017-08-03 Tom Tromey <tom@tromey.com>
3086
3087 * valops.c (search_struct_method): Use gdb::byte_vector.
3088 * valarith.c (value_concat): Use std::vector.
3089 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3090 (simple_search_memory): Likewise.
3091 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3092 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3093 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3094 * elfread.c (elf_rel_plt_read): Use std::string.
3095 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3096 * cli/cli-dump.c (restore_section_callback): Use
3097 gdb::byte_vector.
3098
3099 2017-08-03 Tom Tromey <tom@tromey.com>
3100
3101 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3102
3103 2017-08-03 Tom Tromey <tom@tromey.com>
3104
3105 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3106 (tui_register_format): Use scoped_restore.
3107
3108 2017-08-03 Tom Tromey <tom@tromey.com>
3109
3110 * reverse.c (exec_direction_default): Remove.
3111 (exec_reverse_once): Use scoped_restore.
3112 * remote.c (restore_remote_timeout): Remove.
3113 (remote_flash_erase, remote_flash_write, remote_flash_done)
3114 (readchar, remote_serial_write): Use scoped_restore.
3115 * cli/cli-script.c (struct source_cleanup_lines_args)
3116 (source_cleanup_lines): Remove.
3117 (script_from_file): Use scoped_restore.
3118 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3119 (source_command): Use scoped_restore.
3120
3121 2017-08-03 Tom Tromey <tom@tromey.com>
3122
3123 * utils.h (make_cleanup_free_so): Remove.
3124 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3125 * solist.h (struct so_deleter): New.
3126 (so_list_up): New typedef.
3127 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3128
3129 2017-08-03 Tom Tromey <tom@tromey.com>
3130
3131 * utils.h (make_cleanup_restore_current_language): Remove.
3132 * utils.c (do_restore_current_language)
3133 (make_cleanup_restore_current_language): Remove.
3134 * parse.c (parse_exp_in_context_1)
3135 (parse_expression_with_language): Use
3136 scoped_restore_current_language.
3137 * mi/mi-main.c (mi_cmd_execute): Use
3138 scoped_restore_current_language.
3139 * language.h (scoped_restore_current_language): New class.
3140
3141 2017-08-03 Tom Tromey <tom@tromey.com>
3142
3143 * compile/compile.c (cleanup_unlink_file): Remove.
3144 (compile_to_object): Use gdb::unlinker.
3145 (eval_compile_command): Likewise.
3146
3147 2017-08-03 Tom Tromey <tom@tromey.com>
3148
3149 * utils.h (make_cleanup_fclose): Remove.
3150 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3151
3152 2017-08-03 Tom Tromey <tom@tromey.com>
3153
3154 * top.c (open_terminal_stream): Return gdb_file_up.
3155 (new_ui_command): Update.
3156
3157 2017-08-03 Tom Tromey <tom@tromey.com>
3158
3159 * source.c (print_source_lines_base, forward_search_command)
3160 (reverse_search_command): Use gdb_file_up.
3161
3162 2017-08-03 Tom Tromey <tom@tromey.com>
3163
3164 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3165
3166 2017-08-03 Tom Tromey <tom@tromey.com>
3167
3168 * cli/cli-cmds.c (find_and_open_script): Change return type.
3169 Remove "streamp" and "full_path" parameters.
3170 (source_script_with_search): Update.
3171 * auto-load.c (source_script_file): Update.
3172 * cli/cli-cmds.h (find_and_open_script): Change type.
3173 (open_script): New struct.
3174
3175 2017-08-03 Tom Tromey <tom@tromey.com>
3176
3177 * xml-support.c (xml_fetch_content_from_file): Update.
3178 * ui-file.c (stdio_file::open): Update.
3179 * tracefile-tfile.c (tfile_start): Update.
3180 * remote.c (remote_file_put, remote_file_get): Update.
3181 * nat/linux-procfs.c (linux_proc_get_int)
3182 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3183 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3184 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3185 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3186 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3187 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3188 * linux-nat.c (linux_proc_pending_signals): Update.
3189 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3190 (file_closer): Remove.
3191 * compile/compile.c (compile_to_object): Update.
3192 * common/filestuff.h (struct gdb_file_deleter): New.
3193 (gdb_file_up): New typedef.
3194 (gdb_fopen_cloexec): Change return type.
3195 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3196 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3197 (dump_binary_file, restore_binary_file): Update.
3198 * auto-load.c (auto_load_objfile_script_1): Update.
3199
3200 2017-08-03 Tom Tromey <tom@tromey.com>
3201
3202 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3203 (info_static_tracepoint_markers_command): Likewise.
3204 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3205 * skip.c (skip_info): Use ui_out_emit_table.
3206 * progspace.c (print_program_space): Use ui_out_emit_table.
3207 * osdata.c (info_osdata): Use ui_out_emit_table.
3208 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3209 ui_out_emit_table.
3210 * linux-thread-db.c (info_auto_load_libthread_db): Use
3211 ui_out_emit_table.
3212 * inferior.c (print_inferior): Use ui_out_emit_table.
3213 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3214 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3215 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3216 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3217 * ui-out.h (class ui_out_emit_table): New.
3218
3219 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3220
3221 * mips-tdep.c (mips_fpu_type_str): New function.
3222 (mips_dump_tdep): Call it.
3223
3224 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3225
3226 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3227 `->mips_fpu_type'.
3228
3229 2017-07-31 Xavier Roirand <roirand@adacore.com>
3230
3231 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3232
3233 2017-07-27 Xavier Roirand <roirand@adacore.com>
3234
3235 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3236
3237 2017-07-26 Yao Qi <yao.qi@linaro.org>
3238
3239 * cli/cli-cmds.c (maintenancechecklist): New variable.
3240 * gdbcmd.h (maintenancechecklist): Declare it.
3241 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3242 Call i386_linux_read_description with different masks.
3243 * maint.c (maintenance_check_command): New function.
3244 (_initialize_maint_cmds): Call add_prefix_cmd.
3245 * target-descriptions.c (tdesc_reg): override operator != and ==.
3246 (tdesc_type): Likewise.
3247 (tdesc_feature): Likewise.
3248 (target_desc): Likewise.
3249 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3250 (maintenance_check_xml_descriptions): New function.
3251 (_initialize_target_descriptions) Add command "xml-descriptions".
3252 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3253
3254 2017-07-26 Yao Qi <yao.qi@linaro.org>
3255
3256 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3257 Include features/i386/32bit-*.c.
3258 (i386_linux_read_description): Generate target description if it
3259 doesn't exist.
3260 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3261 functions.
3262 * features/i386/32bit-linux.c: Re-generated.
3263 * features/i386/32bit-sse.c: Likewise.
3264 * target-descriptions.c (print_c_feature::visit): Print code to
3265 set register number if needed.
3266 (print_c_feature) <m_next_regnum>: New field.
3267
3268 2017-07-26 Yao Qi <yao.qi@linaro.org>
3269
3270 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3271 (FEATURE_XMLFILES): New.
3272 (FEATURE_CFILES): New.
3273 New rules.
3274 (clean-cfiles): Remove generated c files.
3275 * features/i386/32bit-avx.c: Generated.
3276 * features/i386/32bit-avx512.c: Generated.
3277 * features/i386/32bit-core.c: Generated.
3278 * features/i386/32bit-linux.c: Generated.
3279 * features/i386/32bit-mpx.c: Generated.
3280 * features/i386/32bit-pkeys.c: Generated.
3281 * features/i386/32bit-sse.c: Generated.
3282 * target-descriptions.c: Include algorithm.
3283 (tdesc_element_visitor): Add method visit_end.
3284 (print_c_tdesc): Implement visit_end.
3285 (print_c_tdesc:: m_filename_after_features): Move it to
3286 protected.
3287 (print_c_feature): New class.
3288 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3289 name starts with "i386/32bit-".
3290
3291 2017-07-26 Yao Qi <yao.qi@linaro.org>
3292
3293 * target-descriptions.c (tdesc_element_visitor): New class.
3294 (tdesc_element): New class.
3295 (tdesc_reg): Inherit from tdesc_element.
3296 (tdesc_reg::accept): New function.
3297 (tdesc_type): Inherit from tdesc_element.
3298 (tdesc_type::accept): New function.
3299 (tdesc_feature): Inherit from tdesc_element.
3300 (tdesc_feature::accept): New function.
3301 (target_desc): Inherit from tdesc_element.
3302 (target_desc::target_desc): New.
3303 (target_desc::~target_desc): New.
3304 (target_desc::accept): New.
3305 (allocate_target_description): Use new.
3306 (free_target_description): Use delete.
3307 (print_c_tdesc): New class.
3308 (maint_print_c_tdesc_cmd): Adjust.
3309
3310 * features/aarch64.c: Re-generated.
3311 * features/arc-arcompact.c: Re-generated.
3312 * features/arc-v2.c: Re-generated.
3313 * features/arm/arm-with-iwmmxt.c: Re-generated.
3314 * features/arm/arm-with-m.c: Re-generated.
3315 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3316 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3317 * features/arm/arm-with-neon.c: Re-generated.
3318 * features/arm/arm-with-vfpv2.c: Re-generated.
3319 * features/arm/arm-with-vfpv3.c: Re-generated.
3320 * features/i386/amd64-avx-avx512.c: Re-generated.
3321 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3322 * features/i386/amd64-avx.c: Re-generated.
3323 * features/i386/amd64-avx-linux.c: Re-generated.
3324 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3325 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3326 * features/i386/amd64-avx-mpx.c: Re-generated.
3327 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3328 * features/i386/amd64.c: Re-generated.
3329 * features/i386/amd64-linux.c: Re-generated.
3330 * features/i386/amd64-mpx.c: Re-generated.
3331 * features/i386/amd64-mpx-linux.c: Re-generated.
3332 * features/i386/i386-avx-avx512.c: Re-generated.
3333 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3334 * features/i386/i386-avx.c: Re-generated.
3335 * features/i386/i386-avx-linux.c: Re-generated.
3336 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3337 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3338 * features/i386/i386-avx-mpx.c: Re-generated.
3339 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3340 * features/i386/i386.c: Re-generated.
3341 * features/i386/i386-linux.c: Re-generated.
3342 * features/i386/i386-mmx.c: Re-generated.
3343 * features/i386/i386-mmx-linux.c: Re-generated.
3344 * features/i386/i386-mpx.c: Re-generated.
3345 * features/i386/i386-mpx-linux.c: Re-generated.
3346 * features/i386/x32-avx-avx512.c: Re-generated.
3347 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3348 * features/i386/x32-avx.c: Re-generated.
3349 * features/i386/x32-avx-linux.c: Re-generated.
3350 * features/i386/x32.c: Re-generated.
3351 * features/i386/x32-linux.c: Re-generated.
3352 * features/microblaze.c: Re-generated.
3353 * features/microblaze-with-stack-protect.c: Re-generated.
3354 * features/mips64-dsp-linux.c: Re-generated.
3355 * features/mips64-linux.c: Re-generated.
3356 * features/mips-dsp-linux.c: Re-generated.
3357 * features/mips-linux.c: Re-generated.
3358 * features/nds32.c: Re-generated.
3359 * features/nios2.c: Re-generated.
3360 * features/nios2-linux.c: Re-generated.
3361 * features/rs6000/powerpc-32.c: Re-generated.
3362 * features/rs6000/powerpc-32l.c: Re-generated.
3363 * features/rs6000/powerpc-403.c: Re-generated.
3364 * features/rs6000/powerpc-403gc.c : Re-generated.
3365 * features/rs6000/powerpc-405.c: Re-generated.
3366 * features/rs6000/powerpc-505.c: Re-generated.
3367 * features/rs6000/powerpc-601.c: Re-generated.
3368 * features/rs6000/powerpc-602.c: Re-generated.
3369 * features/rs6000/powerpc-603.c: Re-generated.
3370 * features/rs6000/powerpc-604.c: Re-generated.
3371 * features/rs6000/powerpc-64.c: Re-generated.
3372 * features/rs6000/powerpc-64l.c: Re-generated.
3373 * features/rs6000/powerpc-7400.c: Re-generated.
3374 * features/rs6000/powerpc-750.c: Re-generated.
3375 * features/rs6000/powerpc-860.c: Re-generated.
3376 * features/rs6000/powerpc-altivec32.c: Re-generated.
3377 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3378 * features/rs6000/powerpc-altivec64.c: Re-generated.
3379 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3380 * features/rs6000/powerpc-cell32l.c: Re-generated.
3381 * features/rs6000/powerpc-cell64l.c: Re-generated.
3382 * features/rs6000/powerpc-e500.c: Re-generated.
3383 * features/rs6000/powerpc-e500l.c: Re-generated.
3384 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3385 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3386 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3387 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3388 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3389 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3390 * features/rs6000/powerpc-vsx32.c: Re-generated.
3391 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3392 * features/rs6000/powerpc-vsx64.c: Re-generated.
3393 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3394 * features/rs6000/rs6000.c: Re-generated.
3395 * features/s390-linux32.c: Re-generated.
3396 * features/s390-linux32v1.c: Re-generated.
3397 * features/s390-linux32v2.c: Re-generated.
3398 * features/s390-linux64.c: Re-generated.
3399 * features/s390-linux64v1.c: Re-generated.
3400 * features/s390-linux64v2.c: Re-generated.
3401 * features/s390-te-linux64.c: Re-generated.
3402 * features/s390-tevx-linux64.c: Re-generated.
3403 * features/s390-vx-linux64.c: Re-generated.
3404 * features/s390x-linux64.c: Re-generated.
3405 * features/s390x-linux64v1.c: Re-generated.
3406 * features/s390x-linux64v2.c: Re-generated.
3407 * features/s390x-te-linux64.c: Re-generated.
3408 * features/s390x-tevx-linux64.c: Re-generated.
3409 * features/s390x-vx-linux64.c: Re-generated.
3410 * features/sparc/sparc32-solaris.c: Re-generated.
3411 * features/sparc/sparc64-solaris.c: Re-generated.
3412 * features/tic6x-c62x.c: Re-generated.
3413 * features/tic6x-c62x-linux.c: Re-generated.
3414 * features/tic6x-c64x.c: Re-generated.
3415 * features/tic6x-c64x-linux.c: Re-generated.
3416 * features/tic6x-c64xp.c: Re-generated.
3417 * features/tic6x-c64xp-linux.c: Re-generated.
3418
3419 2017-07-26 Yao Qi <yao.qi@linaro.org>
3420
3421 * i386-linux-tdep.c (i386_linux_read_description): New function.
3422 (i386_linux_core_read_description): Call
3423 i386_linux_read_description.
3424 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3425 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3426 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3427 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3428 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3429 * x86-linux-nat.c (x86_linux_read_description): Call
3430 i386_linux_read_description.
3431
3432 2017-07-26 Yao Qi <yao.qi@linaro.org>
3433
3434 * NEWS: Mention it.
3435 * features/Makefile (%.c: %.xml): Pass the xml file name to
3436 command "maint print c-tdesc".
3437 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3438 name from 'arg'.
3439
3440 2017-07-26 Yao Qi <yao.qi@linaro.org>
3441
3442 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3443 in-class initialization.
3444 (tdesc_create_feature): Call new instead of XCNEW.
3445 (free_target_description): Ue delete.
3446
3447 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3448
3449 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3450
3451 2017-07-25 Yao Qi <yao.qi@linaro.org>
3452
3453 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3454 constant.
3455 (amd64_x32_init_abi): Likewise.
3456 * amd64-tdep.h (amd64_init_abi): Update declaration.
3457 (amd64_x32_init_abi): Likewise.
3458
3459 2017-07-25 Yao Qi <yao.qi@linaro.org>
3460
3461 PR tdep/21717
3462 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3463 condition for FPSCR.
3464 (arm_linux_store_inferior_registers): Likewise.
3465
3466 2017-07-22 Tom Tromey <tom@tromey.com>
3467
3468 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3469 <syscalls_counts>: Now a std::vector.
3470 (get_catch_syscall_inferior_data): Use "new".
3471 (catch_syscall_inferior_data_cleanup): Use "delete".
3472 (insert_catch_syscall, remove_catch_syscall)
3473 (clear_syscall_counts): Update.
3474
3475 2017-07-22 Tom Tromey <tom@tromey.com>
3476
3477 * break-catch-syscall.c (syscall_catchpoint)
3478 <syscalls_to_be_caught>: Now a std::vector<int>
3479 (~syscall_catchpoint): Remove.
3480 (insert_catch_syscall, remove_catch_syscall)
3481 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3482 (print_mention_catch_syscall, print_recreate_catch_syscall):
3483 Update.
3484 (create_syscall_event_catchpoint): Change type of "filter"
3485 parameter.
3486 (catch_syscall_split_args): Return a std::vector.
3487 (catch_syscall_command_1, catching_syscall_number_1): Update.
3488
3489 2017-07-22 Tom Tromey <tom@tromey.com>
3490
3491 * break-catch-throw.c (struct exception_catchpoint)
3492 <exception_rx>: Now a std::string.
3493 (~exception_catchpoint): Remove.
3494 (print_one_detail_exception_catchpoint): Update.
3495 (handle_gnu_v3_exceptions): Change type of except_rx.
3496 (extract_exception_regexp): Return a std::string.
3497 (catch_exception_command_1): Update.
3498
3499 2017-07-22 Tom Tromey <tom@tromey.com>
3500
3501 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3502 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3503 std::vector.
3504 <catch_all>: Now a bool.
3505 (~signal_catchpoint): Remove.
3506 (signal_catchpoint_insert_location)
3507 (signal_catchpoint_remove_location)
3508 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3509 (signal_catchpoint_print_mention)
3510 (signal_catchpoint_print_recreate)
3511 (signal_catchpoint_explains_signal): Update.
3512 (create_signal_catchpoint): Change type of "filter" and
3513 "catch_all".
3514 (catch_signal_split_args): Return a std::vector. Change type of
3515 "catch_all".
3516 (catch_signal_command): Update.
3517
3518 2017-07-20 Pedro Alves <palves@redhat.com>
3519
3520 * ada-lang.c (ada_language_defn): Make extern.
3521 (_initialize_ada_language): Remove add_language call.
3522 * c-lang.c (c_language_defn, cplus_language_defn)
3523 (asm_language_defn, minimal_language_defn): Make extern.
3524 (_initialize_c_language): Delete.
3525 * completer.c (compare_cstrings): Delete, moved to utils.h.
3526 * d-lang.c (d_language_defn): Make extern.
3527 (_initialize_d_language): Remove add_language calls.
3528 * defs.h (enum language): Add comment.
3529 * f-lang.c (f_language_defn): Make extern.
3530 (_initialize_f_language): Remove add_language call.
3531 * go-lang.c (go_language_defn): Make extern.
3532 (_initialize_go_language): Remove add_language call.
3533 * language.c: Include <algorithm>.
3534 (languages): Redefine as const array.
3535 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3536 (set_language_command): Handle "local". Use for-range loop.
3537 (set_language): Remove loop.
3538 (language_enum): Rewrite.
3539 (language_def, language_str): Remove loops.
3540 (add_language): Delete.
3541 (add_set_language_command): New, based on add_languages.
3542 (skip_language_trampoline): Adjust.
3543 (local_language_defn): Delete.
3544 (language_gdbarch_post_init): Adjust.
3545 (_initialize_language): Remove add_language calls. Call
3546 add_set_language_command.
3547 * language.h (add_language): Delete.
3548 (auto_language_defn)
3549 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3550 (asm_language_defn, c_language_defn, cplus_language_defn)
3551 (d_language_defn, f_language_defn, go_language_defn)
3552 (m2_language_defn, objc_language_defn, opencl_language_defn)
3553 (pascal_language_defn, rust_language_defn): Declare.
3554 * m2-lang.c (m2_language_defn): Make extern.
3555 (_initialize_m2_language): Remove add_language call.
3556 * objc-lang.c (objc_language_defn): Make extern.
3557 (_initialize_objc_language): Remove add_language call.
3558 * opencl-lang.c (opencl_language_defn): Make extern.
3559 (_initialize_opencl_language): Remove add_language call.
3560 * p-lang.c (pascal_language_defn): Make extern.
3561 (_initialize_pascal_language): Delete.
3562 * rust-lang.c (rust_language_defn): Make extern.
3563 (_initialize_rust_language): Delete.
3564 * utils.h (compare_cstrings): New static inline function.
3565
3566 2017-07-20 Pedro Alves <palves@redhat.com>
3567
3568 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3569 (get_var_value): Constify parameters.
3570 (get_int_var_value): Change prototype.
3571 (to_fixed_range_type): Adjust.
3572 * ada-lang.h (get_int_var_value): Change prototype.
3573
3574 2017-07-20 Pedro Alves <palves@redhat.com>
3575
3576 * dwarf2read.c (dw2_lookup_symbol): Use
3577 SYMBOL_MATCHES_SEARCH_NAME.
3578 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3579
3580 2017-07-20 Pedro Alves <palves@redhat.com>
3581
3582 * block.c (block_iter_name_step, block_iter_name_first)
3583 (block_iter_name_next): Delete.
3584 (block_lookup_symbol_primary): Adjust to use
3585 dict_iter_match_first/dict_iter_match_next.
3586 * block.h (block_iter_name_first, block_iter_name_next): Delete
3587 declarations.
3588 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3589 dict_iter_match_first/dict_iter_match_next.
3590
3591 2017-07-20 Pedro Alves <palves@redhat.com>
3592
3593 * cp-support.c (cp_find_first_component_aux): Add missing case for
3594 end of string.
3595
3596 2017-07-18 David Blaikie <dblaikie@gmail.com>
3597
3598 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3599 of dwo_cu's dwo_file.
3600
3601 2017-07-18 Yao Qi <yao.qi@linaro.org>
3602
3603 * remote.c (store_registers_using_G): Remove one line comment.
3604
3605 2017-07-18 Yao Qi <yao.qi@linaro.org>
3606
3607 * regcache.c (regcache_cpy): Simplify it.
3608 (regcache::cpy_no_passthrough): Remove it.
3609 * regcache.h (cpy_no_passthrough): Remove it.
3610 (regcache_dup, regcache_cpy): Update comments.
3611
3612 2017-07-18 Pedro Alves <palves@redhat.com>
3613
3614 * remote-sim.c (sim_command_completer): Adjust to work with a
3615 completion_tracker instead of a VEC.
3616
3617 2017-07-17 Pedro Alves <palves@redhat.com>
3618
3619 * completer.c (complete_source_filenames): New function.
3620 (complete_address_and_linespec_locations): New function.
3621 (location_completer): Use complete_address_and_linespec_locations.
3622 (completion_tracker::build_completion_result): Honor the tracker's
3623 request to suppress append.
3624 * completer.h (completion_tracker::suppress_append_ws)
3625 (completion_tracker::set_suppress_append_ws): New methods.
3626 (completion_tracker::m_suppress_append_ws): New field.
3627 (complete_source_filenames): New declaration.
3628 * linespec.c (linespec_complete_what): New.
3629 (struct ls_parser) <complete_what, completion_word,
3630 completion_quote_char, completion_quote_end, completion_tracker>:
3631 New fields.
3632 (string_find_incomplete_keyword_at_end): New.
3633 (linespec_lexer_lex_string): Record quote char. If in completion
3634 mode, don't throw.
3635 (linespec_lexer_consume_token): Advance the completion word point.
3636 (linespec_lexer_peek_token): Save/restore completion info.
3637 (save_stream_and_consume_token): New.
3638 (set_completion_after_number): New.
3639 (linespec_parse_basic): Set what to complete next depending on
3640 token. Handle function and label completions specially.
3641 (parse_linespec): Disable objc shortcut in completion mode. Set
3642 what to complete next depending on token type. Skip keyword if in
3643 completion mode.
3644 (complete_linespec_component, linespec_complete): New.
3645 * linespec.h (linespec_complete): Declare.
3646
3647 2017-07-17 Pedro Alves <palves@redhat.com>
3648
3649 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3650 Handle 'operator<' / 'operator<<'.
3651
3652 2017-07-17 Pedro Alves <palves@redhat.com>
3653
3654 * completer.c (collect_explicit_location_matches): Handle
3655 MATCH_LABEL.
3656 (convert_explicit_location_to_linespec): New, factored out from
3657 ...
3658 (convert_explicit_location_to_sals): ... this.
3659 (complete_label): New.
3660 (linespec_complete_label, find_label_symbols_in_block): New.
3661 (find_label_symbols): Add completion_mode parameter and adjust to
3662 call find_label_symbols_in_block.
3663 * linespec.h (linespec_complete_label): Declare.
3664
3665 2017-07-17 Pedro Alves <palves@redhat.com>
3666
3667 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3668 complete_symbol_mode parameter.
3669 * cli/cli-cmds.c (complete_command): Get the completion result out
3670 of the handle_brkchars tracker if used a custom word point.
3671 * completer.c: Include "linespec.h".
3672 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3673 (advance_to_expression_complete_word_point): New.
3674 (completion_tracker::completes_to_completion_word): New.
3675 (complete_files_symbols): Pass down
3676 complete_symbol_mode::EXPRESSION.
3677 (explicit_options, probe_options): New.
3678 (collect_explicit_location_matches): Complete on the
3679 explictit_loc->foo instead of word. Use
3680 linespec_complete_function. Handle MATCH_LINE. Handle offering
3681 keyword and options completions.
3682 (backup_text_ptr): Delete.
3683 (skip_keyword): New.
3684 (complete_explicit_location): Remove 'word' parameter. Add
3685 language, quoted_arg_start and quoted_arg_end parameters.
3686 Rewrite, parsing left to right.
3687 (location_completer): Rewrite.
3688 (location_completer_handle_brkchars): New function.
3689 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3690 (enum complete_line_internal_reason): Adjust comments.
3691 (completion_tracker::discard_completions): New.
3692 (completer_handle_brkchars_func_for_completer): Handle
3693 location_completer.
3694 (gdb_custom_word_point_brkchars)
3695 (gdb_org_rl_basic_quote_characters): New.
3696 (gdb_completion_word_break_characters_throw)
3697 (completion_find_completion_word): Handle trackers that use a
3698 custom word point.
3699 (completion_tracker::advance_custom_word_point_by): New.
3700 (completion_tracker::build_completion_result): Don't rely on
3701 readline appending the quote char.
3702 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3703 use a custom word point.
3704 (gdb_rl_attempted_completion_function): Restore
3705 rl_basic_quote_characters.
3706 * completer.h (class completion_tracker): Extend intro comment.
3707 (completion_tracker::set_quote_char)
3708 (completion_tracker::quote_char)
3709 (completion_tracker::set_use_custom_word_point)
3710 (completion_tracker::use_custom_word_point)
3711 (completion_tracker::custom_word_point)
3712 (completion_tracker::set_custom_word_point)
3713 (completion_tracker::advance_custom_word_point_by)
3714 (completion_tracker::completes_to_completion_word)
3715 (completion_tracker::discard_completions): New methods.
3716 (completion_tracker::m_quote_char)
3717 (completion_tracker::m_use_custom_word_point)
3718 (completion_tracker::m_custom_word_point): New fields.
3719 (advance_to_expression_complete_word_point): Declare.
3720 * f-lang.c (f_collect_symbol_completion_matches): Add
3721 complete_symbol_mode parameter.
3722 * language.h (struct language_defn)
3723 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3724 parameter.
3725 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3726 (linespec_complete_function): New function.
3727 (linespec_lexer_lex_keyword): Adjust.
3728 * linespec.h (linespec_keywords, linespec_complete_function): New
3729 declarations.
3730 * location.c (find_end_quote): New function.
3731 (explicit_location_lex_one): Add explicit_completion_info
3732 parameter. Save quoting info. Don't throw if being called for
3733 completion. Don't handle Ada operators here.
3734 (is_cp_operator, skip_op_false_positives, first_of)
3735 (explicit_location_lex_one_function): New function.
3736 (string_to_explicit_location): Replace 'dont_throw' parameter with
3737 an explicit_completion_info pointer parameter. Handle it. Don't
3738 use explicit_location_lex_one to lex function names. Use
3739 explicit_location_lex_one_function instead.
3740 * location.h (struct explicit_completion_info): New.
3741 (string_to_explicit_location): Replace 'dont_throw' parameter with
3742 an explicit_completion_info pointer parameter.
3743 * symtab.c (default_collect_symbol_completion_matches_break_on):
3744 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3745 (default_collect_symbol_completion_matches)
3746 (collect_symbol_completion_matches): Add complete_symbol_mode
3747 parameter.
3748 (collect_symbol_completion_matches_type): Pass down
3749 complete_symbol_mode::EXPRESSION.
3750 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3751 parameter. Handle LINESPEC mode.
3752 * symtab.h (complete_symbol_mode): New.
3753 (default_collect_symbol_completion_matches_break_on)
3754 (default_collect_symbol_completion_matches)
3755 (collect_symbol_completion_matches)
3756 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3757 parameter.
3758
3759 2017-07-17 Pedro Alves <palves@redhat.com>
3760
3761 * utils.c (enum class strncmp_iw_mode): New.
3762 (strcmp_iw): Rename to ...
3763 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3764 parameters. Handle them.
3765 (strncmp_iw): New.
3766 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3767 * utils.h (strncmp_iw): Declare.
3768 (strcmp_iw): Move describing comments here.
3769
3770 2017-07-17 Pedro Alves <palves@redhat.com>
3771
3772 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3773 CP_OPERATOR_STR.
3774 * c-typeprint.c (is_type_conversion_operator): Use
3775 CP_OPERATOR_STR.
3776 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3777 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3778 CP_OPERATOR_LEN.
3779 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3780 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3781 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3782 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3783 CP_OPERATOR_STR.
3784 * location.c: Include "cp-support.h".
3785 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3786 CP_OPERATOR_STR.
3787 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3788 CP_OPERATOR_LEN.
3789
3790 2017-07-17 Pedro Alves <palves@redhat.com>
3791
3792 * cli/cli-cmds.c (complete_command): Use a completion tracker
3793 along with completion_find_completion_word for handle_brkchars
3794 phase.
3795 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3796 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3797 (struct gdb_rl_completion_word_info): New.
3798 (gdb_rl_find_completion_word): New.
3799 (completion_find_completion_word): New.
3800 * completer.h (completion_find_completion_word): Declare.
3801
3802 2017-07-17 Pedro Alves <palves@redhat.com>
3803
3804 * ada-lang.c (symbol_completion_match): Adjust comments.
3805 (symbol_completion_add): Replace vector parameter with
3806 completion_tracker parameter. Use it.
3807 (ada_make_symbol_completion_list): Rename to...
3808 (ada_collect_symbol_completion_matches): ... this. Add
3809 completion_tracker parameter and use it.
3810 (ada_language_defn): Adjust.
3811 * break-catch-syscall.c (catch_syscall_completer): Adjust
3812 prototype and work with completion_tracker instead of VEC.
3813 * breakpoint.c (condition_completer): Adjust prototype and work
3814 with completion_tracker instead of VEC.
3815 * c-lang.c (c_language_defn, cplus_language_defn)
3816 (asm_language_defn, minimal_language_defn): Adjust to renames.
3817 * cli/cli-cmds.c (complete_command): Rework using
3818 completion_tracker. Catch exceptions when completing.
3819 * cli/cli-decode.c (integer_unlimited_completer)
3820 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3821 with completion_tracker instead of VEC.
3822 * command.h (struct completion_tracker): Forward declare.
3823 (completer_ftype, completer_handle_brkchars_ftype): Change
3824 types.
3825 (complete_on_cmdlist, complete_on_enum): Adjust.
3826 * completer.c: Include <algorithm>.
3827 (struct gdb_completer_state): New.
3828 (current_completion): New global.
3829 (readline_line_completion_function): Delete.
3830 (noop_completer, filename_completer)
3831 (filename_completer_handle_brkchars, complete_files_symbols)
3832 (linespec_location_completer): Adjust to work with a
3833 completion_tracker instead of a VEC.
3834 (string_or_empty): New.
3835 (collect_explicit_location_matches): Adjust to work with a
3836 completion_tracker instead of a VEC.
3837 (explicit_location_completer): Rename to ...
3838 (complete_explicit_location): ... this and adjust to work with a
3839 completion_tracker instead of a VEC.
3840 (location_completer): Adjust to work with a completion_tracker
3841 instead of a VEC.
3842 (add_struct_fields): Adjust to work with a completion_list instead
3843 of VEC.
3844 (expression_completer): Rename to ...
3845 (complete_expression): ... this and adjust to work with a
3846 completion_tracker instead of a VEC. Use complete_files_symbols.
3847 (expression_completer): Reimplement on top of complete_expression.
3848 (symbol_completer): Adjust to work with a completion_tracker
3849 instead of a VEC.
3850 (enum complete_line_internal_reason): Add describing comments.
3851 (complete_line_internal_normal_command): Adjust to work with a
3852 completion_tracker instead of a VEC.
3853 (complete_line_internal): Rename to ...
3854 (complete_line_internal_1): ... this and adjust to work with a
3855 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3856 handle_brkchars phase.
3857 (new_completion_tracker): Delete.
3858 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3859 complete_line_internal_1.
3860 (free_completion_tracker): Delete.
3861 (INITIAL_COMPLETION_HTAB_SIZE): New.
3862 (completion_tracker::completion_tracker)
3863 (completion_tracker::~completion_tracker): New.
3864 (maybe_add_completion): Delete.
3865 (completion_tracker::maybe_add_completion)
3866 (completion_tracker::add_completion)
3867 (completion_tracker::add_completions): New.
3868 (throw_max_completions_reached_error): Delete.
3869 (complete_line): Adjust to work with a completion_tracker instead
3870 of a VEC. Don't create a completion_tracker_t or check for max
3871 completions here.
3872 (command_completer, command_completer_handle_brkchars)
3873 (signal_completer, reg_or_group_completer_1)
3874 (reg_or_group_completer, default_completer_handle_brkchars):
3875 Adjust to work with a completion_tracker.
3876 (gdb_completion_word_break_characters_throw): New.
3877 (gdb_completion_word_break_characters): Reimplement.
3878 (line_completion_function): Delete.
3879 (completion_tracker::recompute_lowest_common_denominator)
3880 (expand_preserving_ws)
3881 (completion_tracker::build_completion_result)
3882 (completion_result::completion_result)
3883 (completion_result::completion_result)
3884 (completion_result::~completion_result)
3885 (completion_result::completion_result)
3886 (completion_result::release_match_list, compare_cstrings)
3887 (completion_result::sort_match_list)
3888 (completion_result::reset_match_list)
3889 (gdb_rl_attempted_completion_function_throw)
3890 (gdb_rl_attempted_completion_function): New.
3891 * completer.h (completion_list, struct completion_result)
3892 (class completion_tracker): New.
3893 (complete_line): Add completion_tracker parameter.
3894 (readline_line_completion_function): Delete.
3895 (gdb_rl_attempted_completion_function): New.
3896 (noop_completer, filename_completer, expression_completer)
3897 (location_completer, symbol_completer, command_completer)
3898 (signal_completer, reg_or_group_completer): Update prototypes.
3899 (completion_tracker_t, new_completion_tracker)
3900 (make_cleanup_free_completion_tracker): Delete.
3901 (enum maybe_add_completion_enum): Delete.
3902 (maybe_add_completion): Delete.
3903 (throw_max_completions_reached_error): Delete.
3904 * corefile.c (complete_set_gnutarget): Adjust to work with a
3905 completion_tracker instead of a VEC.
3906 * cp-abi.c (cp_abi_completer): Adjust to work with a
3907 completion_tracker instead of a VEC.
3908 * d-lang.c (d_language_defn): Adjust.
3909 * disasm.c (disassembler_options_completer): Adjust to work with a
3910 completion_tracker instead of a VEC.
3911 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3912 (f_collect_symbol_completion_matches): ... this. Adjust to work
3913 with a completion_tracker instead of a VEC.
3914 (f_language_defn): Adjust.
3915 * go-lang.c (go_language_defn): Adjust.
3916 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3917 Adjust to work with a completion_tracker instead of a VEC.
3918 * infrun.c (handle_completer): Likewise.
3919 * interps.c (interpreter_completer): Likewise.
3920 * interps.h (interpreter_completer): Likewise.
3921 * language.c (unknown_language_defn, auto_language_defn)
3922 (local_language_defn): Adjust.
3923 * language.h (language_defn::la_make_symbol_completion_list):
3924 Rename to ...
3925 (language_defn::la_collect_symbol_completion_matches): ... this
3926 and adjust to work with a completion_tracker instead of a VEC.
3927 * m2-lang.c (m2_language_defn): Adjust.
3928 * objc-lang.c (objc_language_defn): Adjust.
3929 * opencl-lang.c (opencl_language_defn): Adjust.
3930 * p-lang.c (pascal_language_defn): Adjust.
3931 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3932 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3933 with a completion_tracker.
3934 * rust-lang.c (rust_language_defn): Adjust.
3935 * symtab.c (free_completion_list, do_free_completion_list)
3936 (return_val, completion_tracker): Delete.
3937 (completion_list_add_name, completion_list_add_symbol)
3938 (completion_list_add_msymbol, completion_list_objc_symbol)
3939 (completion_list_add_fields, add_symtab_completions): Add
3940 completion_tracker parameter and use it.
3941 (default_make_symbol_completion_list_break_on_1): Rename to...
3942 (default_collect_symbol_completion_matches_break_on): ... this.
3943 Add completion_tracker parameter and use it instead of allocating
3944 a completion tracker here.
3945 (default_make_symbol_completion_list_break_on): Delete old
3946 implementation.
3947 (default_make_symbol_completion_list): Delete.
3948 (default_collect_symbol_completion_matches): New.
3949 (make_symbol_completion_list): Delete.
3950 (collect_symbol_completion_matches): New.
3951 (make_symbol_completion_type): Rename to ...
3952 (collect_symbol_completion_matches_type): ... this. Add
3953 completion_tracker parameter and use it instead of VEC.
3954 (make_file_symbol_completion_list_1): Rename to...
3955 (collect_file_symbol_completion_matches): ... this. Add
3956 completion_tracker parameter and use it instead of VEC.
3957 (make_file_symbol_completion_list): Delete.
3958 (add_filename_to_list): Use completion_list instead of a VEC.
3959 (add_partial_filename_data::list): Now a completion_list.
3960 (make_source_files_completion_list): Work with a completion_list
3961 instead of a VEC.
3962 * symtab.h: Include "completer.h".
3963 (default_make_symbol_completion_list_break_on)
3964 (default_make_symbol_completion_list, make_symbol_completion_list)
3965 (make_symbol_completion_type, make_file_symbol_completion_list)
3966 (make_source_files_completion_list): Delete.
3967 (default_collect_symbol_completion_matches_break_on)
3968 (default_collect_symbol_completion_matches)
3969 (collect_symbol_completion_matches)
3970 (collect_symbol_completion_matches_type)
3971 (collect_file_symbol_completion_matches)
3972 (make_source_files_completion_list): New.
3973 * top.c (init_main): Don't install a rl_completion_entry_function
3974 hook. Install a rl_attempted_completion_function hook instead.
3975 * tui/tui-layout.c (layout_completer): Adjust to work with a
3976 completion_tracker.
3977 * tui/tui-regs.c (tui_reggroup_completer):
3978 * tui/tui-win.c (window_name_completer, focus_completer)
3979 (winheight_completer): Adjust to work with a completion_tracker.
3980 * value.c: Include "completer.h".
3981 (complete_internalvar): Adjust to work with a completion_tracker.
3982 * value.h (complete_internalvar): Likewise.
3983
3984 2017-07-17 Pedro Alves <palves@redhat.com>
3985
3986 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3987 renames.
3988 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3989 comments to completer_ftype's declaration.
3990 <completer_handle_brkchars>: Change type to
3991 completer_handle_brkchars_ftype.
3992 * command.h (completer_ftype): Add describing comment and give
3993 names to parameters.
3994 (completer_ftype_void): Rename to ...
3995 (completer_handle_brkchars_ftype) ... this. Add describing comment.
3996 (set_cmd_completer_handle_brkchars): Adjust.
3997 * completer.c (filename_completer_handle_brkchars): New function.
3998 (complete_line_internal_normal_command): New function, factored
3999 out from ...
4000 (complete_line_internal): ... here.
4001 (command_completer_handle_brkchars)
4002 (default_completer_handle_brkchars)
4003 (completer_handle_brkchars_func_for_completer): New functions.
4004 * completer.h (set_gdb_completion_word_break_characters): Delete
4005 declaration.
4006 (completer_handle_brkchars_func_for_completer): New declaration.
4007 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4008 completer_handle_brkchars_func_for_completer.
4009
4010 2017-07-17 Pedro Alves <palves@redhat.com>
4011
4012 * completer.c (symbol_completer): New function, based on
4013 make_symbol_completion_list_fn.
4014 * completer.h (symbol_completer): New declaration.
4015 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4016 * python/py-cmd.c (completers): Adjust.
4017 * symtab.c (make_symbol_completion_list_fn): Delete.
4018 * symtab.h (make_symbol_completion_list_fn): Delete.
4019 * cli/cli-decode.c (add_cmd): Adjust.
4020
4021 2017-07-17 Pedro Alves <palves@redhat.com>
4022
4023 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4024 * dwarf2read.c: Include "filename-seen-cache.h".
4025 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4026 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4027 * filename-seen-cache.c: New file.
4028 * filename-seen-cache.h: New file.
4029 * symtab.c: Include "filename-seen-cache.h".
4030 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4031 (create_filename_seen_cache, clear_filename_seen_cache)
4032 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4033 to filename-seen-cache.h/filename-seen-cache.c.
4034 (output_source_filename, sources_info)
4035 (maybe_add_partial_symtab_filename)
4036 (make_source_files_completion_list): Adjust to use
4037 filename_seen_cache.
4038
4039 2017-07-17 Pedro Alves <palves@redhat.com>
4040
4041 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4042 fields.
4043 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4044 dwarf2_debug_sections*)): New.
4045 (dwarf2_per_objfile::dwarf2_per_objfile(const
4046 dwarf2_per_objfile&)): Declare as deleted.
4047 (dwarf2_per_objfile::operator=): Declare as deleted.
4048 (dwarf2_per_objfile::dwarf2_per_objfile)
4049 (dwarf2_per_objfile::~dwarf2_per_objfile)
4050 (dwarf2_per_objfile::free_cached_comp_units): New.
4051 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4052 ctor. Call dwarf2_per_objfile's ctor manually.
4053 (dwarf2_locate_sections): Deleted/refactored as ...
4054 (dwarf2_per_objfile::locate_sections): ... this new method.
4055 (free_cached_comp_units): Defer to
4056 dwarf2_per_objfile::free_cached_comp_units.
4057 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4058
4059 2017-07-14 Tom Tromey <tom@tromey.com>
4060
4061 PR rust/21764:
4062 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4063 parameter.
4064 <UNOP_SIZEOF>: Split into separate case.
4065 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4066
4067 2017-07-14 Tom Tromey <tom@tromey.com>
4068
4069 PR rust/21763:
4070 * symtab.c (symbol_matches_domain): Add language_rust to special
4071 case.
4072 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4073 treat LOC_TYPEDEF symbols as variables.
4074
4075 2017-07-14 Pedro Alves <palves@redhat.com>
4076
4077 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4078 symtabs matching all symtabs with SRCFILE as file name instead of
4079 only considering the first hit, with lookup_symtab.
4080
4081 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4082
4083 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4084 operator_name parameters.
4085 (gen_expr): Update function call.
4086
4087 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4088
4089 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4090 parameter.
4091 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4092 Likewise.
4093 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4094 parameter, use agent_expr::gdbarch instead, update function
4095 calls.
4096 (locexpr_tracepoint_var_ref): Likewise.
4097 (loclist_tracepoint_var_ref): Likewise.
4098 * ax-gdb.c (gen_trace_static_fields): Likewise.
4099 (gen_traced_pop): Likewise.
4100 (gen_frame_args_address): Likewise.
4101 (gen_frame_locals_address): Likewise.
4102 (gen_var_ref): Likewise.
4103 (gen_struct_ref_recursive): Likewise.
4104 (gen_static_field): Likewise.
4105 (gen_maybe_namespace_elt): Likewise.
4106 (gen_expr): Likewise.
4107 (gen_trace_for_var): Likewise.
4108 (gen_trace_for_expr): Likewise.
4109 (gen_trace_for_return_address): Likewise.
4110
4111 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4112
4113 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4114 parameter.
4115 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4116
4117 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4118
4119 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4120 from ax, update calls.
4121 (gen_usual_arithmetic): Likewise.
4122 (gen_integral_promotions): Likewise.
4123 (gen_bitfield_ref): Likewise.
4124 (gen_primitive_field): Likewise.
4125 (gen_struct_ref_recursive): Likewise.
4126 (gen_struct_ref): Likewise.
4127 (gen_maybe_namespace_elt): Likewise.
4128 (gen_struct_elt_for_reference): Likewise.
4129 (gen_namespace_elt): Likewise.
4130 (gen_aggregate_elt_ref): Likewise.
4131 (gen_expr): Get gdbarch from ax, update calls.
4132 (gen_expr_binop_rest): Likewise.
4133
4134 2017-07-13 Pedro Alves <palves@redhat.com>
4135
4136 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4137 as default tdesc.
4138 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4139 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4140 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4141 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4142 tdep.
4143 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4144 Get final tdesc from the tdep.
4145 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4146 default tdesc.
4147 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4148 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4149 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4150 Use it as default tdesc.
4151 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4152 down to amd_init_abi. No longer handle fallback tdesc here.
4153 * amd64-tdep.h (tdesc_x32): Declare.
4154 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4155 parameter.
4156 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4157 as default tdesc.
4158
4159 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4160
4161 * s390-linux-tdep.c (s390_process_record): Add support for
4162 instructions new in arch12.
4163
4164 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4165
4166 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4167 PT_GETFSBASE and PT_GETGSBASE.
4168 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4169 PT_SETGSBASE.
4170
4171 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4172
4173 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4174 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4175 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4176 those rules.
4177 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4178 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4179 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4180 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4181 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4182 * features/i386/amd64.xml: Add 64bit-segments.xml.
4183 * features/i386/amd64-avx-avx512.c: Regenerated.
4184 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4185 * features/i386/amd64-avx-mpx.c: Regenerated.
4186 * features/i386/amd64-avx.c: Regenerated.
4187 * features/i386/amd64-mpx.c: Regenerated.
4188 * features/i386/amd64.c: Regenerated.
4189 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4190 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4191 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4192 * regformats/i386/amd64-avx.dat: Regenerated.
4193 * regformats/i386/amd64-mpx.dat: Regenerated.
4194 * regformats/i386/amd64.dat: Regenerated.
4195
4196 2017-07-10 Yao Qi <yao.qi@linaro.org>
4197
4198 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4199 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4200
4201 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4202
4203 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4204 unsetenv.
4205 * gnulib/aclocal.m4: Regenerate.
4206 * gnulib/config.in: Regenerate.
4207 * gnulib/configure: Regenerate.
4208 * gnulib/import/Makefile.am: Regenerate.
4209 * gnulib/import/Makefile.in: Regenerate.
4210 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4211 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4212 * gnulib/import/m4/environ.m4: New file.
4213 * gnulib/import/m4/setenv.m4: New file.
4214 * gnulib/import/setenv.c: New file.
4215 * gnulib/import/unsetenv.c: New file.
4216
4217 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4218
4219 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4220 address when op is DW_OP_addr.
4221
4222 2017-07-09 Tom Tromey <tom@tromey.com>
4223
4224 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4225 check and apply to outer type.
4226
4227 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4228
4229 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4230 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4231 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4232 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4233
4234 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4235
4236 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4237
4238 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4239
4240 * corelow.c (get_core_siginfo): Remove.
4241 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4242 instead of get_core_siginfo.
4243 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4244 * gdbarch.h: Re-generate.
4245 * gdbarch.c: Re-generate.
4246 * linux-tdep.c (linux_core_xfer_siginfo): New.
4247 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4248
4249 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4250
4251 * corelow.c (thread_section_name): Move to ...
4252 * gdbcore.h (thread_section_name): ... here.
4253
4254 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4255
4256 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4257 (struct siginfo32): New.
4258 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4259 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4260 via ptrace(PT_LWPINFO).
4261
4262 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4263
4264 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4265 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4266 (fbsd_get_siginfo_type): New.
4267 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4268 (_initialize_fbsd_tdep): New.
4269
4270 2017-07-06 David Blaikie <dblaikie@gmail.com>
4271
4272 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4273 a singular dwo_unit*) to support multiple CUs in the same way that
4274 multiple TUs are supported.
4275 (create_cus_hash_table): Replace create_dwo_cu with a function for
4276 parsing multiple CUs from a DWO file.
4277 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4278 create_dwo_cu.
4279 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4280 htab_find, rather than comparing the signature to a singleton CU in
4281 the dwo_file.
4282
4283 2017-07-06 Pedro Alves <palves@redhat.com>
4284
4285 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4286
4287 2017-07-04 Pedro Alves <palves@redhat.com>
4288
4289 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4290 * gdbtypes.h (TYPE_STATIC): Delete.
4291 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4292 is_synchronized, is_native>: Delete.
4293 <dummy>: Bump.
4294 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4295 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4296 (TYPE_FN_FIELD_ABSTRACT): Delete.
4297
4298 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4299
4300 * buffer.h (buffer_finish): Fix spelling mistakes.
4301
4302 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4303
4304 * .dir-locals.el: Automatically switch to C-style comments in
4305 versions of Emacs that support the feature.
4306
4307 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4308 Pedro Alves <palves@redhat.com>
4309
4310 PR cli/21688
4311 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4312 (process_next_line): New variable 'inline_cmd'.
4313 Adjust 'if' clauses for "python", "compile" and "guile" to use
4314 'command_name_equals' and check for '!inline_cmd'.
4315
4316 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4317
4318 PR cli/21688
4319 * cli/cli-script.c (command_name_equals_not_inline): New function.
4320 (process_next_line): Adjust 'if' clauses for "python", "compile"
4321 and "guile" to use command_name_equals_not_inline.
4322
4323 2017-06-29 Pedro Alves <palves@redhat.com>
4324
4325 * completer.c (expression_completer): Call
4326 linespec_location_completer instead of location_completer.
4327
4328 2017-06-29 Pedro Alves <palves@redhat.com>
4329
4330 * completer.c (expression_completer): Remove code that recomputes
4331 'text' from 'word'.
4332
4333 2017-06-29 Yao Qi <yao.qi@linaro.org>
4334
4335 * regformats/regdat.sh: Generate code with
4336 "ifndef IN_PROCESS_AGENT".
4337
4338 2017-06-28 Pedro Alves <palves@redhat.com>
4339
4340 * command.h: Include "common/scoped_restore.h".
4341
4342 2017-06-28 Yao Qi <yao.qi@linaro.org>
4343
4344 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4345 instead of obstack_grow.
4346
4347 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4348
4349 PR gdb/21337
4350 * symfile.c (reread_symbols): Call objfiles_changed just before
4351 read_symbols.
4352
4353 2017-06-27 Pedro Alves <palves@redhat.com>
4354
4355 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4356 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4357 (completion_list_add_symbol, completion_list_add_msymbol):
4358 ... these new functions.
4359 (add_symtab_completions)
4360 (default_make_symbol_completion_list_break_on_1): Adjust.
4361
4362 2017-06-27 Pedro Alves <palves@redhat.com>
4363
4364 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4365 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4366 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4367 dtor.
4368 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4369 'storage_obstack' field an auto_obstack. In-class initialize all
4370 non-bitfield fields. Make minsyms_read bool.
4371 * symfile.c (read_symbols): Adjust.
4372
4373 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4374
4375 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4376 (gdbsim_store_register): Likewise.
4377
4378 2017-06-27 Pedro Alves <palves@redhat.com>
4379
4380 * c-exp.y (name_obstack): Now an auto_obstack.
4381 (yylex): Use auto_obstack::clear.
4382 (c_parse): Use auto_obstack::clear instead of reinitializing and
4383 freeing the obstack.
4384 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4385 * d-exp.y (name_obstack): Now an auto_obstack.
4386 (yylex): Use auto_obstack::clear.
4387 (d_parse): Use auto_obstack::clear instead of reinitializing and
4388 freeing the obstack.
4389 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4390 auto_obstack.
4391 * dwarf2read.c (create_addrmap_from_index)
4392 (dwarf2_build_psymtabs_hard)
4393 (update_enumeration_type_from_children): Likewise.
4394 * gdb_obstack.h (auto_obstack): New type.
4395 * go-exp.y (name_obstack): Now an auto_obstack.
4396 (build_packaged_name): Use auto_obstack::clear.
4397 (go_parse): Use auto_obstack::clear instead of reinitializing and
4398 freeing the obstack.
4399 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4400 auto_obstack.
4401 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4402 * rust-exp.y (work_obstack): Now an auto_obstack.
4403 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4404 reinitializing and freeing the obstack.
4405 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4406 (host_char_to_target): Use auto_obstack.
4407 * utils.h (make_cleanup_obstack_free): Delete declaration.
4408 * valprint.c (generic_emit_char, generic_printstr): Use
4409 auto_obstack.
4410
4411 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4412
4413 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4414 thread.
4415 (darwin_init_thread_list): Don't update dummy thread.
4416 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4417
4418 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4419
4420 * record-full.c (netorder16): Remove.
4421
4422 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4423
4424 * common/diagnostics.h: Define macros for GCC.
4425 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4426 * common/vec.h: Include diagnostics.h.
4427 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4428 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4429 warning.
4430
4431 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4432
4433 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4434 New macro.
4435 * ada-lex.l: Ignore deprecated register warnings.
4436
4437 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4438
4439 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4440 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4441
4442 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4443
4444 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4445 its own line.
4446
4447 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4448
4449 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4450
4451 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4452
4453 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4454 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4455 (xtensa_register_read_masked): Likewise.
4456
4457 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4458
4459 * common/environ.c (gdb_environ::unset): Update comment.
4460
4461 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4462
4463 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4464 registers.
4465
4466 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4467
4468 * record-full.c (record_full_exec_insn): Use byte_vector.
4469
4470 2017-06-22 Yao Qi <yao.qi@linaro.org>
4471
4472 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4473 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4474
4475 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4476
4477 * remote.c (cached_reg): Move from here...
4478 * regcache.h (cached_reg): ...to here.
4479 * python/py-unwind.c (struct reg_info): Remove.
4480 (cached_frame_info): Use cached_reg_t.
4481 (pyuw_prev_register): Likewise.
4482 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4483 (pyuw_dealloc_cache): Free all registers.
4484
4485 2017-06-22 Pedro Alves <palves@redhat.com>
4486 Simon Marchi <simon.marchi@ericsson.com>
4487
4488 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4489 warning.
4490 * common/diagnostics.h: New file.
4491
4492 2017-06-22 Pedro Alves <palves@redhat.com>
4493
4494 * common/agent.h: Add include guards.
4495
4496 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4497
4498 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4499 talk about addressable units instead of bytes.
4500
4501 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4502
4503 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4504 of '::const_iterator'.
4505
4506 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4507
4508 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4509 'unittests/environ-selftests.c'.
4510 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4511 * charset.c (find_charset_names): Declare object 'iconv_env'.
4512 Update code to use 'iconv_env' object. Remove call to
4513 'free_environ'.
4514 * common/environ.c: Include <utility>.
4515 (make_environ): Delete function.
4516 (free_environ): Delete function.
4517 (gdb_environ::clear): New function.
4518 (gdb_environ::operator=): New function.
4519 (gdb_environ::get): Likewise.
4520 (environ_vector): Delete function.
4521 (set_in_environ): Delete function.
4522 (gdb_environ::set): New function.
4523 (unset_in_environ): Delete function.
4524 (gdb_environ::unset): New function.
4525 (gdb_environ::envp): Likewise.
4526 * common/environ.h: Include <vector>.
4527 (struct gdb_environ): Delete; transform into...
4528 (class gdb_environ): ... this class.
4529 (free_environ): Delete prototype.
4530 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4531 environ_vector): Likewise.
4532 * infcmd.c (run_command_1): Update code to call
4533 'envp' from 'gdb_environ' class.
4534 (environment_info): Update code to call methods from 'gdb_environ'
4535 class.
4536 (unset_environment_command): Likewise.
4537 (path_info): Likewise.
4538 (path_command): Likewise.
4539 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4540 (inferior::inferior): Initialize 'environment' using the host's
4541 information.
4542 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4543 Include "environ.h".
4544 (class inferior) <environment>: Change type from 'struct
4545 gdb_environ' to 'gdb_environ'.
4546 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4547 methods from 'gdb_environ' class.
4548 * solib.c (solib_find_1): Likewise
4549 * unittests/environ-selftests.c: New file.
4550
4551 2017-06-20 Yao Qi <yao.qi@linaro.org>
4552
4553 * features/i386/i386-linux.xml: Exchange the order of including
4554 32bit-linux.xml and 32bit-sse.xml.
4555 * features/i386/i386-linux.c: Regenerated.
4556
4557 2017-06-20 Yao Qi <yao.qi@linaro.org>
4558
4559 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4560 Delete copy ctor and assignment operator.
4561 (tdesc_type): Likewise.
4562 (tdesc_feature): Likewise.
4563 (tdesc_free_reg): Remove.
4564 (tdesc_create_reg): Use new.
4565 (tdesc_free_type): Remove.
4566 (tdesc_create_vector): Use new.
4567 (tdesc_create_union): Likewise.
4568 (tdesc_create_flags): Likewise.
4569 (tdesc_create_enum): Likewise.
4570 (tdesc_free_feature): Delete.
4571 (free_target_description): Use delete.
4572
4573 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4574
4575 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4576 registers.
4577
4578 2017-06-19 Pedro Alves <palves@redhat.com>
4579
4580 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4581 after gdb::unlinker.
4582
4583 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4584
4585 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4586 gdb_environ to access an environment variable.
4587
4588 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4589
4590 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4591 gdb_byte*.
4592
4593 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4594
4595 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4596
4597 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4598
4599 * configure: Re-generate.
4600 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4601
4602 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4603
4604 * configure: Re-generate.
4605 * warning.m4: Pass -Werror to compiler when checking for
4606 supported warning flags.
4607
4608 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4609
4610 * Makefile.in (COMPILE.pre): Add "-x c++".
4611
4612 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4613 Pedro Alves <palves@redhat.com>
4614 Yao Qi <yao.qi@linaro.org>
4615
4616 * defs.h (RequireLongest): New.
4617 (extract_integer): Declare function template.
4618 (extract_signed_integer): Remove the declaration, but define it
4619 static inline.
4620 (extract_unsigned_integer): Likewise.
4621 (store_integer): Declare function template.
4622 (store_signed_integer): Remove the declaration, but define it
4623 static inline.
4624 (store_unsigned_integer): Likewise.
4625 * findvar.c (extract_integer): New function template.
4626 (extract_signed_integer): Remove.
4627 (extract_unsigned_integer): Remove.
4628 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4629 instantiations.
4630 (store_integer): New function template.
4631 (store_signed_integer): Remove.
4632 (store_unsigned_integer): Remove.
4633 (store_integer): Explicit instantiations.
4634 * regcache.c (regcache_raw_read_signed): Update.
4635 (regcache::raw_read): New function.
4636 (regcache::raw_read_signed): Remove.
4637 (regcache::raw_read_unsigned): Remove.
4638 (regcache_raw_read_unsigned): Update.
4639 (regcache_raw_write_unsigned): Update.
4640 (regcache::raw_write_signed): Remove.
4641 (regcache::raw_write): New function.
4642 (regcache_cooked_read_signed): Update.
4643 (regcache::raw_write_unsigned): Remove.
4644 (regcache::cooked_read_signed): Remove.
4645 (regcache_cooked_read_unsigned): Update.
4646 (regcache::cooked_read_unsigned): Remove.
4647 (regcache_cooked_write_signed): Update.
4648 (regcache_cooked_write_unsigned): Update.
4649 * regcache.h (regcache) <raw_read_signed>: Remove.
4650 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4651 <raw_read, raw_write>: New.
4652 <cooked_read_signed, cooked_write_signed>: Remove.
4653 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4654 <cooked_read, cooked_write>: New.
4655 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4656 (sh64_pseudo_register_write): Update.
4657
4658 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4659
4660 * arc-tdep.c (arc_disassembler_options): New variable.
4661 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4662 of default_print_insn.
4663 (arc_delayed_print_insn): Set info->section when needed,
4664 use default_print_insn to retrieve a disassembler.
4665
4666 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4667
4668 PR gdb/21574
4669 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4670 to mention $SHELL and startup-with-shell.
4671
4672 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4673
4674 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4675
4676 2017-06-14 Yao Qi <yao.qi@linaro.org>
4677
4678 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4679 default_print_insn instead of print_insn_aarch64.
4680 * arm-tdep.c (gdb_print_insn_arm): Call
4681 default_print_insn instead of print_insn_big_arm
4682 and print_insn_little_arm.
4683 * i386-tdep.c (i386_print_insn): Call default_print_insn
4684 instead of print_insn_i386.
4685 * ia64-tdep.c (ia64_print_insn): Call
4686 default_print_insn instead of print_insn_ia64.
4687 * mips-tdep.c (gdb_print_insn_mips): Call
4688 default_print_insn instead of print_insn_big_mips
4689 and print_insn_little_mips.
4690 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4691 instead of print_insn_spu.
4692
4693 2017-06-14 Pedro Alves <palves@redhat.com>
4694
4695 * ada-lang.c: Include "common/byte-vector.h".
4696 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4697 * charset.c (wchar_iterator::iterate): Resize the vector instead
4698 of reserving it.
4699 * common/byte-vector.h: Include "common/def-vector.h".
4700 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4701 * cli/cli-dump.c: Include "common/byte-vector.h".
4702 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4703 * common/byte-vector.h: New file.
4704 * common/def-vector.h: New file.
4705 * common/default-init-alloc.h: New file.
4706 * dwarf2loc.c: Include "common/byte-vector.h".
4707 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4708 instead of reserving it.
4709 * dwarf2read.c: Include "common/byte-vector.h".
4710 (data_buf::m_vec): Now a gdb::byte_vector.
4711 * gdb_regex.c: Include "common/def-vector.h".
4712 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4713 * mi/mi-main.c: Include "common/byte-vector.h".
4714 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4715 * printcmd.c: Include "common/byte-vector.h".
4716 (print_scalar_formatted): Use gdb::byte_vector.
4717 * valprint.c: Include "common/byte-vector.h".
4718 (maybe_negate_by_bytes, print_decimal_chars): Use
4719 gdb::byte_vector.
4720
4721 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4722
4723 * darwin-nat.c: Include "nat/fork-inferior.h".
4724
4725 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4726
4727 * configure.nat: Factor out Darwin bits that are not
4728 architecture-specific. Add fork-inferior.o.
4729
4730 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4731
4732 * configure.nat: Factor out AIX bits that are not
4733 architecture-specific. Add fork-inferior.o.
4734
4735 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4736
4737 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4738 (read_pieced_value, write_pieced_value): ...here. Reduce to
4739 wrappers that just call rw_pieced_value.
4740
4741 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4742
4743 * dwarf2loc.c (write_pieced_value): When writing the data for a
4744 memory piece, use write_memory_with_notification instead of
4745 write_memory.
4746
4747 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4748
4749 * valops.c (read_value_memory): Change embedded_offset to
4750 represent a bit offset instead of a byte offset.
4751 * value.h (read_value_memory): Adjust comment.
4752
4753 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4754
4755 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4756 dest_offset_bits and source_offset_bits.
4757 (write_pieced_value): Likewise.
4758
4759 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4760
4761 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4762 given by DW_OP_bit_piece.
4763 (write_pieced_value): Likewise.
4764
4765 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4766
4767 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4768 some other preparations to the places where sufficient information
4769 is available.
4770 (write_pieced_value): Likewise.
4771
4772 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4773
4774 * dwarf2loc.c (bits_to_bytes): New function.
4775 (read_pieced_value): Fix offset calculations for register pieces
4776 on big-endian targets.
4777 (write_pieced_value): Likewise.
4778
4779 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4780
4781 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4782 (write_pieced_value): Likewise.
4783
4784 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4785
4786 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4787 transfer the source value's least significant bits, instead of its
4788 lowest-addressed ones. Rename type_len to max_offset.
4789 (read_pieced_value): Mirror above changes to write_pieced_value as
4790 applicable.
4791
4792 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4793
4794 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4795 truncate full bytes from dest_offset_bits before using it as an
4796 offset into the buffer.
4797
4798 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4799
4800 * dwarf2loc.c (write_pieced_value): Include transfer size in
4801 byte-wise check.
4802
4803 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4804
4805 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4806 calculation of this_size.
4807
4808 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4809
4810 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4811 when targeting a bit-field.
4812 (write_pieced_value): Likewise.
4813
4814 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4815
4816 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4817 (allocate_piece_closure): Drop addr_size parameter.
4818 (dwarf2_evaluate_loc_desc_full): Adjust call to
4819 allocate_piece_closure.
4820
4821 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4822
4823 PR gdb/21226
4824 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4825 the LSB end, independent of endianness.
4826
4827 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4828
4829 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4830 size capping.
4831
4832 2017-06-13 Yao Qi <yao.qi@linaro.org>
4833
4834 * mips-linux-nat.c: Move include features/mips*-linux.c to
4835 mips-linux-tdep.c.
4836 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4837 to mips-linux-tdep.c.
4838 * mips-linux-tdep.c: Include features/mips*-linux.c
4839 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4840 functions.
4841 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4842 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4843 (tdesc_mips64_dsp_linux): Declare.
4844
4845 2017-06-12 Tom Tromey <tom@tromey.com>
4846
4847 * valprint.h (val_print_type_code_int): Remove.
4848 * valprint.c (generic_val_print_int): Always call
4849 val_print_scalar_formatted.
4850 (val_print_type_code_int): Remove.
4851 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4852 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4853 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4854 * ada-valprint.c (ada_val_print_num): Use
4855 val_print_scalar_formatted.
4856
4857 2017-06-12 Tom Tromey <tom@tromey.com>
4858
4859 * printcmd.c (print_scalar_formatted): Unify the two switches.
4860 Don't convert scalars to LONGEST.
4861
4862 2017-06-12 Tom Tromey <tom@tromey.com>
4863
4864 PR exp/16225:
4865 * valprint.h (print_decimal_chars): Update.
4866 * valprint.c (maybe_negate_by_bytes): New function.
4867 (print_decimal_chars): Add "is_signed" argument.
4868 * printcmd.c (print_scalar_formatted): Update.
4869
4870 2017-06-12 Tom Tromey <tom@tromey.com>
4871
4872 PR exp/16225:
4873 * valprint.h (print_binary_chars, print_hex_chars): Update.
4874 * valprint.c (val_print_type_code_int): Update.
4875 (print_binary_chars): Add "zero_pad" argument.
4876 (emit_octal_digit): New function.
4877 (print_octal_chars): Don't zero-pad.
4878 (print_decimal_chars): Likewise.
4879 (print_hex_chars): Add "zero_pad" argument.
4880 * sh64-tdep.c (sh64_do_fp_register): Update.
4881 * regcache.c (regcache::dump): Update.
4882 * printcmd.c (print_scalar_formatted): Update.
4883 * infcmd.c (default_print_one_register_info): Update.
4884
4885 2017-06-12 Pedro Alves <palves@redhat.com>
4886 Alan Hayward <alan.hayward@arm.com>
4887
4888 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4889 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4890 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4891 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4892 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4893
4894 2017-06-12 Pedro Alves <palves@redhat.com>
4895
4896 * dwarf2read.c (mapped_symtab::data): Now a vector of
4897 symtab_index_entry instead of vector of
4898 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4899 whether an element's name is NULL instead of checking whether the
4900 element itself is NULL.
4901 (find_slot): Change return type. Adjust.
4902 (hash_expand, , add_index_entry, uniquify_cu_indices)
4903 (write_hash_table): Adjust.
4904
4905 2017-06-12 Pedro Alves <palves@redhat.com>
4906
4907 * dwarf2read.c (recursively_count_psymbols): New function.
4908 (write_psymtabs_to_index): Call it to compute number of psyms and
4909 pass estimate size of psyms_seen to unordered_set's ctor.
4910
4911 2017-06-12 Pedro Alves <palves@redhat.com>
4912
4913 * dwarf2read.c (write_hash_table): Check if key already exists
4914 before emplacing.
4915
4916 2017-06-12 Pedro Alves <palves@redhat.com>
4917
4918 * dwarf2read.c (data_buf::append_space): Rename to...
4919 (data_buf::grow): ... this, and make private. Adjust all callers.
4920 (data_buf::append_uint): New method.
4921 (add_address_entry, write_one_signatured_type)
4922 (write_psymtabs_to_index): Use it.
4923
4924 2017-06-12 Pedro Alves <palves@redhat.com>
4925
4926 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4927 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4928 (data_buf::file_write): Call ::fwrite directly.
4929
4930 2017-06-12 Pedro Alves <palves@redhat.com>
4931
4932 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4933 std::vector::erase.
4934
4935 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4936
4937 Code cleanup: C++ify .gdb_index producer.
4938 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4939 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4940 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4941 (create_strtab, add_string): Remove.
4942 (file_write, data_buf): New.
4943 (struct symtab_index_entry): Use std::vector for cu_indices.
4944 (struct mapped_symtab): Use std::vector for data.
4945 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4946 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4947 Remove.
4948 (find_slot): Change return type. Update it to the new data structures.
4949 (hash_expand, add_index_entry): Update it to the new data structures.
4950 (offset_type_compare): Remove.
4951 (uniquify_cu_indices): Update it to the new data structures.
4952 (c_str_view, c_str_view_hasher, vector_hasher): New.
4953 (add_indices_to_cpool): Remove.
4954 (write_hash_table): Update it to the new data structures.
4955 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4956 (eq_psymtab_cu_index): Remove.
4957 (psym_index_map): New typedef.
4958 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4959 reference and std::unordered_map for cu_index_htab.
4960 (add_address_entry, add_address_entry_worker, write_address_map)
4961 (write_psymbols): Update it to the new data structures.
4962 (write_obstack): Remove.
4963 (struct signatured_type_index_data): Change types_list to a data_buf
4964 reference and psyms_seen to a std::unordered_set reference.
4965 (write_one_signatured_type, recursively_write_psymbols)
4966 (write_psymtabs_to_index): Update it to the new data structures.
4967
4968 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
4969
4970 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4971 separate-debug-file commands.
4972 * symfile.h (separate_debug_file_debug): New global.
4973 * symfile.c (separate_debug_file_debug): New global.
4974 (separate_debug_file_exists, find_separate_debug_file): Add
4975 debug output.
4976 (_initialize_symfile): Add "set debug separate-debug-file"
4977 command.
4978 * build-id.c (build_id_to_debug_bfd,
4979 find_separate_debug_file_by_buildid): Add debug output.
4980
4981 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4982
4983 * gdbarch.sh (displaced_step_free_closure): Remove.
4984 * gdbarch.h, gdbarch.c: Re-generate.
4985 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4986 displaced_step_free_closure.
4987 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4988 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4989 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4990 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4991 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4992 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4993 * arch-utils.h (simple_displaced_step_free_closure): Remove.
4994 * arch-utils.c (simple_displaced_step_free_closure): Remove.
4995 * infrun.c (displaced_step_clear): Call xfree instead of
4996 gdbarch_displaced_step_free_closure.
4997
4998 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
4999
5000 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5001 NULL".
5002
5003 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5004
5005 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5006 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5007 (mn10300_push_dummy_call): Likewise.
5008
5009 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5010
5011 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5012
5013 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5014
5015 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5016
5017 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5018
5019 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5020 able to start inferiors using a shell.
5021 (New remote packets): Announce new packet "QStartupWithShell".
5022 * remote.c: Add PACKET_QStartupWithShell.
5023 (extended_remote_create_inferior): Handle new
5024 PACKET_QStartupWithShell.
5025 (remote_protocol_features) <QStartupWithShell>: New entry for
5026 PACKET_QStartupWithShell.
5027 (_initialize_remote): Call "add_packet_config_cmd" for
5028 QStartupShell.
5029
5030 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5031 Pedro Alves <palves@redhat.com>
5032
5033 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5034 and "nat/fork-inferior.h".
5035 * common/common-inferior.h: New file, with contents from
5036 "gdb/inferior.h".
5037 * commom/common-utils.c: Include "common-utils.h".
5038 (stringify_argv): New function.
5039 * common/common-utils.h (stringify_argv): New prototype.
5040 * configure.nat: Add "fork-inferior.o" as a dependency for
5041 "*linux*", "fbsd*" and "nbsd*" hosts.
5042 * corefile.c (get_exec_file): Update comment.
5043 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5044 instead of "startup_inferior".
5045 (darwin_create_inferior): Call "add_thread_silent" after
5046 "fork_inferior".
5047 * fork-child.c: Cleanup unnecessary includes.
5048 (SHELL_FILE): Move to "common/common-fork-child.c".
5049 (environ): Likewise.
5050 (exec_wrapper): Initialize.
5051 (get_exec_wrapper): New function.
5052 (breakup_args): Move to "common/common-fork-child.c"; rename to
5053 "breakup_args_for_exec".
5054 (escape_bang_in_quoted_argument): Move to
5055 "common/common-fork-child.c".
5056 (saved_ui): New variable.
5057 (prefork_hook): New function.
5058 (postfork_hook): Likewise.
5059 (postfork_child_hook): Likewise.
5060 (gdb_startup_inferior): Likewise.
5061 (fork_inferior): Move to "common/common-fork-child.c". Update
5062 function to support gdbserver.
5063 (startup_inferior): Likewise.
5064 * gdbcore.h (get_exec_file): Remove declaration.
5065 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5066 instead of "startup_inferior". Call "add_thread_silent" after
5067 "fork_inferior".
5068 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5069 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5070 instead of "startup_inferior". Call "add_thread_silent" after
5071 "fork_inferior".
5072 * inferior.h: Include "common-inferior.h".
5073 (trace_start_error): Move to "common/common-utils.h".
5074 (trace_start_error_with_name): Likewise.
5075 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5076 (startup_inferior): Likewise.
5077 (gdb_startup_inferior): New prototype.
5078 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5079 * nat/fork-inferior.h: New file.
5080 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5081 instead of "startup_inferior". Call "add_thread_silent" after
5082 "fork_inferior".
5083 * target.h (target_terminal_init): Move prototype to
5084 "target/target.h".
5085 (target_terminal_inferior): Likewise.
5086 (target_terminal_ours): Likewise.
5087 * target/target.h (target_terminal_init): New prototype, moved
5088 from "target.h".
5089 (target_terminal_inferior): Likewise.
5090 (target_terminal_ours): Likewise.
5091 * utils.c (gdb_flush_out_err): New function.
5092
5093 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5094
5095 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5096 * common/common-gdbthread.h: New file, with parts from
5097 "gdb/gdbthread.h".
5098 * gdbthread.h: Include "common-gdbthread.h".
5099 (switch_to_thread): Moved to "common/common-gdbthread.h".
5100
5101 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5102
5103 * Makefile.in (SFILES): Add "common/job-control.c".
5104 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5105 (COMMON_OBS): Add "job-control.o".
5106 * common/job-control.c: New file, with contents from
5107 "gdb/inflow.c".
5108 * common/job-control.h: New file, with contents from "terminal.h".
5109 * fork-child.c: Include "job-control.h".
5110 * inflow.c: Include "job-control.h".
5111 (gdb_setpgid): Move to "common/common-inflow.c".
5112 (_initialize_inflow): Move setting of "job_control" to
5113 "handle_job_control".
5114 * terminal.h (job_control): Moved to "common/common-terminal.h".
5115 (gdb_setpgid): Likewise.
5116 * top.c: Include "job_control.h".
5117 * utils.c: Likewise.
5118 (job_control): Moved to "job-control.c".
5119
5120 2017-06-07 Pedro Alves <palves@redhat.com>
5121
5122 * Makefile.in (SFILES): Add gdb_regex.c.
5123 (COMMON_OBS): Add gdb_regex.o.
5124 * ada-lang.c (ada_add_standard_exceptions)
5125 (ada_add_exceptions_from_frame, name_matches_regex)
5126 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5127 parameter type to compiled_regex. Adjust.
5128 (ada_exceptions_list): Use compiled_regex.
5129 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5130 std::unique_ptr<compiled_regex>.
5131 (exception_catchpoint::~exception_catchpoint): Remove regfree
5132 call.
5133 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5134 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5135 * breakpoint.c (solib_catchpoint::compiled): Now a
5136 std::unique_ptr<compiled_regex>.
5137 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5138 (check_status_catch_solib): Adjust to use compiled_regex.
5139 (add_solib_catchpoint): Adjust to use compiled_regex.
5140 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5141 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5142 compiled_regex reference. Adjust to use it.
5143 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5144 declaration. Include "gdb_regex.h".
5145 (apropos_cmd): Change regex parameter to compiled_regex reference.
5146 * gdb_regex.c: New file.
5147 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5148 declarations.
5149 (class compiled_regex): New.
5150 * linux-tdep.c: Include "common/gdb_optional.h".
5151 (struct mapping_regexes): New, factored out from
5152 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5153 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5154 gdb::optional and remove cleanups. Adjust to compiled_regex.
5155 * probe.c: Include "common/gdb_optional.h".
5156 (collect_probes): Use compiled_regex and gdb::optional and remove
5157 cleanups.
5158 * skip.c: Include "common/gdb_optional.h".
5159 (skiplist_entry::compiled_function_regexp): Now a
5160 gdb::optional<compiled_regex>.
5161 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5162 (free_skiplist_entry): Remove regfree call.
5163 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5164 compiled_regex and gdb::optional.
5165 * symtab.c: Include "common/gdb_optional.h".
5166 (search_symbols): Use compiled_regex and gdb::optional.
5167 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5168 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5169 to gdb_regex.c.
5170
5171 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5172
5173 * regcache.c (regcache::save): Avoid buffer use.
5174 (regcache::dump): Likewise.
5175
5176 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5177
5178 * sh-tdep.c (sh_pseudo_register_read): Remove
5179 MAX_REGISTER_SIZE.
5180 (sh_pseudo_register_write): Likewise.
5181 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5182 (sh64_pseudo_register_write): Likewise
5183
5184 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5185
5186 * aarch64-tdep.c (aarch64_store_return_value): Use
5187 V_REGISTER_SIZE.
5188 (aarch64_pseudo_read_value): Likewise.
5189 (aarch64_pseudo_write): Likewise.
5190
5191 2017-06-06 Yao Qi <yao.qi@linaro.org>
5192
5193 * regformats/regdef.h (set_register_cache): Remove the
5194 declaration.
5195
5196 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5197
5198 * frame.c (frame_unwind_register_signed): Use
5199 frame_unwind_register_value.
5200
5201 2017-06-06 Pedro Alves <palves@redhat.com>
5202
5203 PR breakpoints/21553
5204 * breakpoint.c (create_breakpoints_sal_default)
5205 (init_breakpoint_sal, create_breakpoint_sal): Use
5206 gdb::unique_xmalloc_ptr for string parameters.
5207 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5208 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5209 (base_breakpoint_create_breakpoints_sal)
5210 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5211 (strace_marker_create_breakpoints_sal)
5212 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5213 string parameters.
5214 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5215 gdb::unique_xmalloc_ptr for string parameters.
5216 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5217 parameters.
5218
5219 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5220
5221 * alpha-tdep.c (alpha_register_to_value): Use
5222 get_frame_register_value.
5223 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5224
5225 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5226
5227 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5228 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5229 (ia64_value_to_register): Likewise.
5230 (ia64_extract_return_value): Likewise.
5231 (ia64_store_return_value): Likewise.
5232 (ia64_push_dummy_call): Likewise.
5233
5234 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5235
5236 GDB 8.0 released.
5237
5238 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5239
5240 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5241
5242 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5243
5244 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5245 parameter.
5246 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5247
5248 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5249
5250 * event-loop.c (poll_timers): Unallocate timer using delete
5251 instead of xfree.
5252
5253 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5254
5255 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5256 (struct breakpoint) <~breakpoint>: New.
5257 (struct watchpoint): Inherit from breakpoint.
5258 <~watchpoint>: New.
5259 <base>: Remove.
5260 (struct tracepoint): Inherit from breakpoint.
5261 <base>: Remove.
5262 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5263 (struct longjmp_breakpoint): Inherit from breakpoint.
5264 <~longjmp_breakpoint>: New.
5265 <base>: Remove.
5266 (new_breakpoint_from_type): Remove casts.
5267 (watchpoint_in_thread_scope): Remove reference to base field.
5268 (watchpoint_del_at_next_stop): Likewise.
5269 (update_watchpoint): Likewise.
5270 (watchpoint_check): Likewise.
5271 (bpstat_check_watchpoint): Likewise.
5272 (set_longjmp_breakpoint): Likewise.
5273 (struct fork_catchpoint): Inherit from breakpoint.
5274 <base>: Remove.
5275 (struct solib_catchpoint): Inherit from breakpoint.
5276 <~solib_catchpoint>: New.
5277 <base>: Remove.
5278 (dtor_catch_solib): Change to ...
5279 (solib_catchpoint::~solib_catchpoint): ... this.
5280 (breakpoint_hit_catch_solib): Remove reference to base field.
5281 (add_solib_catchpoint): Likewise.
5282 (create_fork_vfork_event_catchpoint): Likewise.
5283 (struct exec_catchpoint): Inherit from breakpoint.
5284 <~exec_catchpoint>: New.
5285 <base>: Remove.
5286 (dtor_catch_exec): Change to ...
5287 (exec_catchpoint::~exec_catchpoint): ... this.
5288 (dtor_watchpoint): Change to ...
5289 (watchpoint::~watchpoint): ... this.
5290 (watch_command_1): Remove reference to base field.
5291 (catch_exec_command_1): Likewise.
5292 (base_breakpoint_dtor): Change to ...
5293 (breakpoint::~breakpoint): ... this.
5294 (base_breakpoint_ops): Remove dtor field value.
5295 (longjmp_bkpt_dtor): Change to ...
5296 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5297 (strace_marker_create_breakpoints_sal): Remove reference to base
5298 field.
5299 (delete_breakpoint): Don't manually call breakpoint destructor.
5300 (create_tracepoint_from_upload): Remove reference to base field.
5301 (trace_pass_set_count): Likewise.
5302 (initialize_breakpoint_ops): Don't initialize
5303 momentary_breakpoint_ops, don't set dtors.
5304 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5305 <~ada_catchpoint>: New.
5306 <base>: Remove.
5307 (create_excep_cond_exprs): Remove reference to base field.
5308 (dtor_exception): Change to ...
5309 (ada_catchpoint::~ada_catchpoint): ... this.
5310 (dtor_catch_exception): Remove.
5311 (dtor_catch_exception_unhandled): Remove.
5312 (dtor_catch_assert): Remove.
5313 (create_ada_exception_catchpoint): Remove reference to base
5314 field.
5315 (initialize_ada_catchpoint_ops): Don't set dtors.
5316 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5317 breakpoint.
5318 <~signal_catchpoint>: New.
5319 <base>: Remove.
5320 (signal_catchpoint_dtor): Change to ...
5321 (signal_catchpoint::~signal_catchpoint): ... this.
5322 (create_signal_catchpoint): Remove reference to base field.
5323 (initialize_signal_catchpoint_ops): Don't set dtor.
5324 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5325 from breakpoint.
5326 <~syscall_catchpoint>: New.
5327 <base>: Remove.
5328 (dtor_catch_syscall): Change to ...
5329 (syscall_catchpoint::~syscall_catchpoint): ... this.
5330 (create_syscall_event_catchpoint): Remove reference to base
5331 field.
5332 (initialize_syscall_catchpoint_ops): Don't set dtor.
5333 * break-catch-throw.c (struct exception_catchpoint): Inherit
5334 from breakpoint.
5335 <~exception_catchpoint>: New.
5336 <base>: Remove.
5337 (dtor_exception_catchpoint): Change to ...
5338 (exception_catchpoint::~exception_catchpoint): ... this.
5339 (handle_gnu_v3_exceptions): Remove reference to base field.
5340 (initialize_throw_catchpoint_ops): Don't set dtor.
5341 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5342 field.
5343 * remote.c (remote_get_tracepoint_status): Likewise.
5344 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5345 * tracefile.c (tracefile_fetch_registers): Likewise.
5346 * tracepoint.c (actions_command): Likewise.
5347 (validate_actionline): Likewise.
5348 (tfind_1): Likewise.
5349 (get_traceframe_location): Likewise.
5350 (find_matching_tracepoint_location): Likewise.
5351 (parse_tracepoint_status): Likewise.
5352 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5353
5354 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5355
5356 * breakpoint.c (struct longjmp_breakpoint): New struct.
5357 (is_tracepoint_type): Change return type to bool.
5358 (is_longjmp_type): New function.
5359 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5360 (set_raw_breakpoint_without_location): Use
5361 new_breakpoint_from_type.
5362 (set_raw_breakpoint): Likewise.
5363
5364 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5365
5366 * breakpoint.c (new_breakpoint_from_type): New function.
5367 (create_breakpoint_sal): Use new_breakpoint_from_type and
5368 unique_ptr.
5369 (create_breakpoint): Likewise.
5370
5371 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5372
5373 * memattr.c (mem_info_command): Rename to ...
5374 (info_mem_command): ... this.
5375 (mem_enable_command): Rename to ...
5376 (enable_mem_command): ... this.
5377 (mem_disable_command): Rename to ...
5378 (disable_mem_command): ... this.
5379 (mem_delete_command): Rename to ...
5380 (delete_mem_command): ... this.
5381 (_initialize_mem): Adjust function names.
5382
5383 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5384
5385 * btrace.c (handle_pt_insn_events): New.
5386 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5387 STATUS. Split into this and ...
5388 (handle_pt_insn_event_flags): ... this.
5389
5390 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5391
5392 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5393 and struct pt_insn.resynced.
5394 * configure: Regenerated.
5395 * config.in: Regenerated.
5396
5397 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5398
5399 * btrace.c (ftrace_find_call_by_number): New function.
5400 (ftrace_new_function): Store objects, not pointers.
5401 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5402 ftrace_new_gap, ftrace_update_function,
5403 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5404 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5405 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5406 btrace_ends_with_single_insn, btrace_call_get): Account for
5407 btrace_thread_info::functions now storing objects.
5408 * btrace.h (struct btrace_thread_info): Add constructor.
5409 (struct btrace_thread_info) <functions>: Make std::vector.
5410 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5411 Initialize with default values.
5412 * record-btrace.c (record_btrace_frame_sniffer): Account for
5413 btrace_thread_info::functions now storing objects.
5414
5415 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5416
5417 * btrace.c: Remove typedef bfun_s.
5418 (ftrace_new_gap): Directly add gaps to the list of gaps.
5419 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5420 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5421 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5422 instead of gdb VEC.
5423
5424 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5425
5426 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5427 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5428 with btrace_thread_info::next_segment and
5429 btrace_thread_info::prev_segment.
5430 * btrace.h: Remove struct btrace_func_link.
5431 (struct btrace_function): Replace pair of function segment pointers
5432 with pair of indices.
5433 * python/py-record-btrace.c (btpy_call_prev_sibling,
5434 btpy_call_next_sibling): Replace references to
5435 btrace_thread_info::segment with btrace_thread_info::next_segment and
5436 btrace_thread_info::prev_segment.
5437 * record-btrace.c (record_btrace_frame_this_id): Use
5438 btrace_find_call_by_number.
5439
5440 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5441
5442 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5443 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5444 btrace_insn_next, btrace_insn_prev): Remove references to
5445 btrace_thread_info::flow.
5446 * btrace.h (struct btrace_function): Remove FLOW.
5447
5448 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5449
5450 * btrace.c (ftrace_find_call_by_number): New function.
5451 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5452 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5453 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5454 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5455 index.
5456 * btrace.h (struct btrace_function): Turn UP into an index.
5457 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5458 as an index.
5459 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5460 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5461 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5462
5463 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5464
5465 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5466 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5467 ftrace_update_function, ftrace_compute_global_level_offset,
5468 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5469 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5470 btrace_insn_end, btrace_is_empty): Remove references to
5471 btrace_thread_info::begin and btrace_thread_info::end.
5472 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5473 (struct btrace_thread_info) <functions>: Adjust comment.
5474 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5475 btrace_thread_info::begin.
5476
5477 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5478
5479 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5480 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5481 ftrace_update_function): Remove arguments that implicitly were always
5482 BTINFO->END.
5483 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5484 Don't pass BTINFO->END.
5485
5486 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5487
5488 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5489 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5490 btrace_find_insn_by_number): Replace function segment pointer with
5491 index.
5492 (btrace_insn_cmp): Simplify.
5493 * btrace.h: (struct btrace_insn_iterator) Rename index to
5494 insn_index. Replace function segment pointer with index into function
5495 segment vector.
5496 * record-btrace.c (record_btrace_call_history): Replace function
5497 segment pointer use with index.
5498 (record_btrace_frame_sniffer): Retrieve function call segment through
5499 vector.
5500 (record_btrace_set_replay): Remove defunc't safety check.
5501
5502 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5503
5504 * btrace.c (btrace_ends_with_single_insn): New function.
5505 (btrace_call_get, btrace_call_number, btrace_call_begin,
5506 btrace_call_end, btrace_call_next, btrace_call_prev,
5507 btrace_find_call_by_number): Use index into call segment vector
5508 instead of pointer.
5509 (btrace_call_cmp): Simplify.
5510 * btrace.h (struct btrace_call_iterator): Replace function call segment
5511 pointer with index into vector.
5512 * record-btrace.c (record_btrace_call_history): Use index instead of
5513 pointer.
5514
5515 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5516
5517 * btrace.c (btrace_insn_begin, btrace_insn_end,
5518 btrace_find_insn_by_number): Add btinfo to iterator.
5519 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5520
5521 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5522
5523 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5524 and save pointers directly.
5525 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5526 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5527 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5528 changed signature of functions.
5529 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5530 (btrace_fetch): Remove code that adds btrace_function pointers to
5531 vector of btrace_functions.
5532 (btrace_clear): Simplify freeing vector of btrace_functions.
5533
5534 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5535
5536 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5537 Replace VEC_* with std::vector functions.
5538 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5539 (struct btrace_thread_info)<functions>: Change type to std::vector.
5540
5541 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5542
5543 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5544 "Removed targets and native configurations" up. Merge duplicate
5545 "New commands" sub-sections. Add "New options" sub-sections.
5546
5547 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5548
5549 * defs.h (copy_integer_to_size): New declaration.
5550 * findvar.c (copy_integer_to_size): New function.
5551 (do_cint_test): New selftest function.
5552 (copy_integer_to_size_test): Likewise.
5553 (_initialize_findvar): Likewise.
5554 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5555 (mips_fbsd_collect_reg): Use raw_collect_integer.
5556 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5557 (mips64_fill_gregset): Use raw_collect_integer
5558 (mips64_fill_fpregset): Use raw_supply_integer.
5559 * regcache.c (regcache::raw_supply_integer): New function.
5560 (regcache::raw_collect_integer): Likewise.
5561 * regcache.h: (regcache::raw_supply_integer): New declaration.
5562 (regcache::raw_collect_integer): Likewise.
5563
5564 2017-05-24 Yao Qi <yao.qi@linaro.org>
5565
5566 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5567 (COMMON_OBS): Add gdbarch-selftests.o.
5568 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5569 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5570 * gdbarch-selftests.c: New file.
5571 * regcache.h (regcache) <~regcache>: Mark it virtual if
5572 GDB_SELF_TEST.
5573 <raw_write>: Likewise.
5574
5575 2017-05-24 Yao Qi <yao.qi@linaro.org>
5576
5577 * regcache.c (current_regcache): Change it to
5578 regcache::current_regcache.
5579 (regcache_observer_target_changed): Update.
5580 (regcache_thread_ptid_changed): Make it a regcache static
5581 method.
5582 (regcache_thread_ptid_changed): Update.
5583 (class regcache_access): New.
5584 (current_regcache_test): Update.
5585 (_initialize_regcache): Update.
5586 * regcache.h: Include forward_list.
5587 (regcache): Declare regcache_thread_ptid_changed and declare
5588 registers_changed_ptid as friend.
5589
5590 2017-05-24 Yao Qi <yao.qi@linaro.org>
5591
5592 * i387-tdep.c (i387_register_to_value): Use register_size
5593 instead of TYPE_LENGTH.
5594 * m68k-tdep.c (m68k_register_to_value): Likewise.
5595
5596 2017-05-24 Yao Qi <yao.qi@linaro.org>
5597
5598 * i387-tdep.c (i387_convert_register_p): Return false if type
5599 code isn't TYPE_CODE_FLT.
5600
5601 2017-05-24 Yao Qi <yao.qi@linaro.org>
5602
5603 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5604 length is 4.
5605 (alpha_register_to_value): Remove type length check.
5606 (alpha_value_to_register): Likewise.
5607
5608 2017-05-24 Yao Qi <yao.qi@linaro.org>
5609
5610 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5611 TYPE_CODE_FLT.
5612
5613 2017-05-24 Yao Qi <yao.qi@linaro.org>
5614
5615 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5616 TYPE_CODE_FLT or not.
5617
5618 2017-05-24 Yao Qi <yao.qi@linaro.org>
5619
5620 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5621 * avr-tdep.c (avr_gdbarch_init): Likewise.
5622 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5623 * cris-tdep.c (cris_gdbarch_init): Likewise.
5624 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5625 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5626 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5627 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5628 * mep-tdep.c (mep_gdbarch_init): Likewise.
5629 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5630 * mips-tdep.c (mips_gdbarch_init): Likewise.
5631 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5632 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5633 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5634 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5635 * v850-tdep.c (v850_gdbarch_init): Likewise.
5636
5637 2017-05-24 Yao Qi <yao.qi@linaro.org>
5638
5639 * selftest-arch.c (tests_with_arch): Call registers_changed
5640 and reinit_frame_cache.
5641 * selftest.c (run_self_tests): Likewise.
5642
5643 2017-05-24 Yao Qi <yao.qi@linaro.org>
5644
5645 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5646 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5647
5648 2017-05-24 Yao Qi <yao.qi@linaro.org>
5649
5650 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5651 set_gdbarch_print_insn.
5652
5653 2017-05-24 Yao Qi <yao.qi@linaro.org>
5654
5655 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5656 set_gdbarch_print_insn.
5657
5658 2017-05-24 Yao Qi <yao.qi@linaro.org>
5659
5660 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5661 set_gdbarch_print_insn.
5662 * arc-tdep.c (arc_gdbarch_init): Likewise.
5663 * arch-utils.c: include dis-asm.h.
5664 (default_print_insn): New function.
5665 * arch-utils.h (default_print_insn): Declare.
5666 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5667 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5668 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5669 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5670 * frv-tdep.c (frv_gdbarch_init): Likewise.
5671 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5672 * gdbarch.sh (print_insn): Use default_print_insn.
5673 * gdbarch.c: Regenerated.
5674 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5675 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5676 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5677 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5678 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5679 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5680 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5681 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5682 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5683 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5684 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5685 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5686 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5687 * mt-tdep.c (mt_gdbarch_init): Likewise.
5688 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5689 * nios2-tdep.c (nios2_print_insn): Remove.
5690 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5691 * rx-tdep.c (rx_gdbarch_init): Likewise.
5692 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5693 * score-tdep.c (score_print_insn): Remove.
5694 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5695 * sh-tdep.c (sh_gdbarch_init): Likewise.
5696 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5697 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5698 * tic6x-tdep.c (tic6x_print_insn): Remove.
5699 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5700 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5701 * v850-tdep.c (v850_gdbarch_init): Likewise.
5702 * vax-tdep.c (vax_gdbarch_init): Likewise.
5703 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5704 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5705
5706 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5707
5708 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5709 (MIPS_FP0_REGNUM): Remove.
5710 (MIPS_FSR_REGNUM): Remove.
5711 (mips_fbsd_supply_fpregs): Use mips_regnum.
5712 (mips_fbsd_supply_gregs): Likewise.
5713 (mips_fbsd_collect_fpregs): Likewise.
5714 (mips_fbsd_collect_gregs): Likewise.
5715
5716 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5717
5718 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5719 (getpfpregs_supplies): New function.
5720 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5721 getfpregs_supplies.
5722 (mips_fbsd_store_inferior_registers): Likewise.
5723
5724 2017-05-22 Pedro Alves <palves@redhat.com>
5725
5726 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5727 maintainer.
5728
5729 2017-05-22 Alan Hayward <alan.hayward@arm.com>
5730
5731 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5732 (store_register): Likewise.
5733 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5734 (get_decimal_float_return_value): Likewise.
5735 (do_ppc_sysv_return_value): Likewise.
5736 (ppc64_sysv_abi_push_integer): Likewise.
5737 (ppc64_sysv_abi_push_freg): Likewise.
5738 (ppc64_sysv_abi_return_value_base): Likewise.
5739 (ppc64_sysv_abi_return_value): Likewise.
5740 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5741 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5742 * rs6000-nat.c: Likewise.
5743 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5744 (rs6000_value_to_register): Likewise.
5745 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5746
5747 2017-05-21 Tom Tromey <tom@tromey.com>
5748
5749 PR rust/21466:
5750 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5751 arrays as "[T]", not "[T; ]".
5752
5753 2017-05-19 Tom Tromey <tom@tromey.com>
5754
5755 PR rust/21484:
5756 * rust-lang.c (exp_descriptor_rust): New function.
5757 (rust_language_defn): Use it.
5758 * p-lang.c (pascal_language_defn): Update.
5759 * opencl-lang.c (opencl_language_defn): Update.
5760 * objc-lang.c (objc_language_defn): Update.
5761 * m2-lang.c (m2_language_defn): Update.
5762 * language.h (struct language_defn)
5763 <la_watch_location_expression>: New member.
5764 * language.c (unknown_language_defn, auto_language_defn)
5765 (local_language_defn): Update.
5766 * go-lang.c (go_language_defn): Update.
5767 * f-lang.c (f_language_defn): Update.
5768 * d-lang.c (d_language_defn): Update.
5769 * c-lang.h (c_watch_location_expression): Declare.
5770 * c-lang.c (c_watch_location_expression): New function.
5771 (c_language_defn, cplus_language_defn, asm_language_defn)
5772 (minimal_language_defn): Use it.
5773 * breakpoint.c (watch_command_1): Call
5774 la_watch_location_expression.
5775 * ada-lang.c (ada_language_defn): Update.
5776
5777 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5778
5779 PR tui/21482
5780 * gdb_curses.h (NOMACROS): Define.
5781 (NCURSES_NOMACROS): Define.
5782
5783 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5784
5785 PR tui/21482
5786 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5787 arg to char *.
5788 * tui/tui-wingeneral.c (box_win): Likewise.
5789 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5790 (tui_show_source_line): Likewise.
5791 (tui_show_exec_info_content): Likewise.
5792
5793 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5794
5795 * sparc-tdep.c (sparc_structure_return_p)
5796 (sparc_arg_on_registers_p): New functions.
5797 (sparc32_store_arguments): Use them.
5798 * sparc64-tdep.c (sparc64_16_byte_align_p)
5799 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5800 Handle TYPE_CODE_ARRAY.
5801
5802 2017-05-17 Yao Qi <yao.qi@linaro.org>
5803
5804 * cli/cli-decode.c (add_alias_cmd): New function.
5805 * command.h (add_alias_cmd): Declare.
5806 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5807 instead call add_alias_cmd.
5808
5809 2017-05-17 Pedro Alves <palves@redhat.com>
5810
5811 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5812 (nat_makefile_frag): ... this. All references updated.
5813 * configure.ac: Likewise.
5814 * configure.nat: Likewise. Enhance comments.
5815 * configure: Regenerate.
5816
5817 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5818
5819 * procfs.c (procfs_create_inferior): Change prototype to match
5820 definition.
5821
5822 2017-05-13 Eli Zaretskii <eliz@gnu.org>
5823
5824 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5825 C++ compiler warning.
5826
5827 2017-05-12 Tom Tromey <tom@tromey.com>
5828
5829 PR rust/21483:
5830 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5831 recurse, just call value_struct_elt directly.
5832
5833 2017-05-12 Tom Tromey <tom@tromey.com>
5834
5835 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5836 OP_RUST_ARRAY>: Fix.
5837
5838 2017-05-12 Tom Tromey <tom@tromey.com>
5839
5840 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5841
5842 2017-05-09 Yao Qi <yao.qi@linaro.org>
5843
5844 * regcache.c: Include <forward_list>.
5845 (struct regcache_list): Remove.
5846 (current_regcache): Update.
5847 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5848 (regcache_thread_ptid_changed): Likewise.
5849 (registers_changed_ptid): Likewise.
5850 (current_regcache_size): Likewise.
5851
5852 2017-05-09 Yao Qi <yao.qi@linaro.org>
5853
5854 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5855 (current_regcache_size): New function.
5856 (current_regcache_test): New function.
5857 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5858
5859 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5860
5861 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5862 (print_gp_register_row): Use get_frame_register_value.
5863
5864 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5865
5866 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5867 (mips_supply_fpregset): Likewise.
5868 (mips64_supply_gregset): Likewise.
5869
5870 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5871
5872 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5873 regcache->raw_supply_zeroed.
5874
5875 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5876
5877 * configure.nat: Rearrange 'case' statements to match
5878 host before cpu.
5879
5880 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5881
5882 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5883 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5884 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5885 "@nat_extra_makefile_frag@".
5886 (Makefile): Remove dependency on "@frags@".
5887 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5888 (data-directory/Makefile): Likewise.
5889 * config/aarch64/linux.mh: Deleted; moved contents to
5890 "gdb/configure.nat".
5891 * config/alpha/alpha-linux.mh: Likewise.
5892 * config/alpha/nbsd.mh: Likewise.
5893 * config/arm/linux.mh: Likewise.
5894 * config/arm/nbsdelf.mh: Likewise.
5895 * config/i386/cygwin.mh: Likewise.
5896 * config/i386/cygwin64.mh: Likewise.
5897 * config/i386/darwin.mh: Likewise.
5898 * config/i386/fbsd.mh: Likewise.
5899 * config/i386/fbsd64.mh: Likewise.
5900 * config/i386/go32.mh: Likewise.
5901 * config/i386/i386gnu.mh: Likewise.
5902 * config/i386/i386sol2.mh: Likewise.
5903 * config/i386/linux.mh: Likewise.
5904 * config/i386/linux64.mh: Likewise.
5905 * config/i386/mingw.mh: Likewise.
5906 * config/i386/mingw64.mh: Likewise.
5907 * config/i386/nbsd64.mh: Likewise.
5908 * config/i386/nbsdelf.mh: Likewise.
5909 * config/i386/nto.mh: Likewise.
5910 * config/i386/obsd.mh: Likewise.
5911 * config/i386/obsd64.mh: Likewise.
5912 * config/i386/sol2-64.mh: Likewise.
5913 * config/ia64/linux.mh: Likewise.
5914 * config/m32r/linux.mh: Likewise.
5915 * config/m68k/linux.mh: Likewise.
5916 * config/m68k/nbsdelf.mh: Likewise.
5917 * config/m68k/obsd.mh: Likewise.
5918 * config/m88k/obsd.mh: Likewise.
5919 * config/mips/fbsd.mh: Likewise.
5920 * config/mips/linux.mh: Likewise.
5921 * config/mips/nbsd.mh: Likewise.
5922 * config/mips/obsd64.mh: Likewise.
5923 * config/pa/linux.mh: Likewise.
5924 * config/pa/nbsd.mh: Likewise.
5925 * config/pa/obsd.mh: Likewise.
5926 * config/powerpc/aix.mh: Likewise.
5927 * config/powerpc/fbsd.mh: Likewise.
5928 * config/powerpc/linux.mh: Likewise.
5929 * config/powerpc/nbsd.mh: Likewise.
5930 * config/powerpc/obsd.mh: Likewise.
5931 * config/powerpc/ppc64-linux.mh: Likewise.
5932 * config/powerpc/spu-linux.mh: Likewise.
5933 * config/s390/linux.mh: Likewise.
5934 * config/sh/nbsd.mh: Likewise.
5935 * config/sparc/fbsd.mh: Likewise.
5936 * config/sparc/linux.mh: Likewise.
5937 * config/sparc/linux64.mh: Likewise.
5938 * config/sparc/nbsd64.mh: Likewise.
5939 * config/sparc/nbsdelf.mh: Likewise.
5940 * config/sparc/obsd64.mh: Likewise.
5941 * config/sparc/sol2.mh: Likewise.
5942 * config/tilegx/linux.mh: Likewise.
5943 * config/vax/nbsdelf.mh: Likewise.
5944 * config/vax/obsd.mh: Likewise.
5945 * config/xtensa/linux.mh: Likewise.
5946 * config/i386/i386gnu.mn: New file, with excerpts from
5947 "config/i386/i386gnu.mh".
5948 * configure: Regenerate.
5949 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5950 *.mh files under "gdb/config".
5951 * configure.nat: New file, with contents from the
5952 "gdb/config/*/*.mh" files.
5953
5954 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
5955
5956 * btrace.c (btrace_clear): Free insn vector.
5957
5958 2017-05-05 Pedro Alves <palves@redhat.com>
5959
5960 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5961 * configure: Regenerate.
5962
5963 2017-05-04 Pedro Alves <palves@redhat.com>
5964
5965 * Makefile.in (SFILES): Add progspace-and-thread.c.
5966 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5967 (COMMON_OBS): Add progspace-and-thread.o.
5968 * breakpoint.c: Include "progspace-and-thread.h".
5969 (update_inserted_breakpoint_locations)
5970 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5971 Use scoped_restore_current_pspace_and_thread.
5972 (create_std_terminate_master_breakpoint): Use
5973 scoped_restore_current_program_space.
5974 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5975 (print_breakpoint_location): Use
5976 scoped_restore_current_program_space.
5977 (bp_loc_is_permanent): Use
5978 scoped_restore_current_pspace_and_thread.
5979 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5980 (download_tracepoint_locations): Use
5981 scoped_restore_current_pspace_and_thread.
5982 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5983 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5984 (enum step_over_calls_kind): Moved from inferior.h.
5985 (class scoped_restore_current_thread): New class.
5986 * gdbthread.h (make_cleanup_restore_current_thread): Delete
5987 declaration.
5988 (scoped_restore_current_thread): New class.
5989 * infcmd.c: Include "common/gdb_optional.h".
5990 (continue_1, proceed_after_attach): Use
5991 scoped_restore_current_thread.
5992 (notice_new_inferior): Use scoped_restore_current_thread.
5993 * inferior.c: Include "progspace-and-thread.h".
5994 (restore_inferior, save_current_inferior): Delete.
5995 (add_inferior_command, clone_inferior_command): Use
5996 scoped_restore_current_pspace_and_thread.
5997 * inferior.h (scoped_restore_current_inferior): New class.
5998 * infrun.c: Include "progspace-and-thread.h" and
5999 "common/gdb_optional.h".
6000 (follow_fork_inferior): Use
6001 scoped_restore_current_pspace_and_thread.
6002 (scoped_restore_exited_inferior): New class.
6003 (handle_vfork_child_exec_or_exit): Use
6004 scoped_restore_exited_inferior,
6005 scoped_restore_current_pspace_and_thread,
6006 scoped_restore_current_thread and scoped_restore.
6007 (fetch_inferior_event): Use scoped_restore_current_thread.
6008 * linespec.c (decode_line_full, decode_line_1): Use
6009 scoped_restore_current_program_space.
6010 * mi/mi-main.c: Include "progspace-and-thread.h".
6011 (exec_continue): Use scoped_restore_current_thread.
6012 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6013 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6014 * proc-service.c (ps_pglobal_lookup): Use
6015 scoped_restore_current_program_space.
6016 * progspace-and-thread.c: New file.
6017 * progspace-and-thread.h: New file.
6018 * progspace.c (release_program_space, clone_program_space): Use
6019 scoped_restore_current_program_space.
6020 (restore_program_space, save_current_program_space)
6021 (save_current_space_and_thread): Delete.
6022 (switch_to_program_space_and_thread): Moved to
6023 progspace-and-thread.c.
6024 * progspace.h (save_current_program_space)
6025 (save_current_space_and_thread): Delete declarations.
6026 (scoped_restore_current_program_space): New class.
6027 * remote.c (remote_btrace_maybe_reopen): Use
6028 scoped_restore_current_thread.
6029 * symtab.c: Include "progspace-and-thread.h".
6030 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6031 * thread.c (print_thread_info_1): Use
6032 scoped_restore_current_thread.
6033 (struct current_thread_cleanup): Delete.
6034 (do_restore_current_thread_cleanup)
6035 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6036 (scoped_restore_current_thread::~scoped_restore_current_thread):
6037 ... this new dtor.
6038 (make_cleanup_restore_current_thread): Rename/convert to ...
6039 (scoped_restore_current_thread::scoped_restore_current_thread):
6040 ... this new ctor.
6041 (thread_apply_all_command): Use scoped_restore_current_thread.
6042 (thread_apply_command): Use scoped_restore_current_thread.
6043 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6044 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6045
6046 2017-05-04 Pedro Alves <palves@redhat.com>
6047
6048 * thread.c (make_cleanup_restore_current_thread): Move
6049 find_thread_ptid call before the is_stopped call. Assert that the
6050 thread is found. Replace is_stopped call by checking the thread's
6051 state directly. Remove unnecessary NULL-thread check.
6052
6053 2017-05-04 Pedro Alves <palves@redhat.com>
6054
6055 * corelow.c (thread_section_name): New class.
6056 (get_core_register_section, get_core_siginfo): Use it.
6057
6058 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6059
6060 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6061 (get_core_register_section): Remove xfree of NULL pointer.
6062
6063 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6064
6065 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6066 * regcache.c (regcache::raw_supply_zeroed): New function.
6067 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6068
6069 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6070
6071 * gdbarch.sh: Remove commented out definition of
6072 TARGET_CHAR_BIT.
6073 * gdbarch.h: Re-generate.
6074
6075 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6076
6077 * configure: Regenerate.
6078
6079 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6080
6081 * solib-target.c (solib_target_relocate_section_addresses):
6082 Remove num_section_bases, num_bases, segment_bases variables.
6083
6084 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6085
6086 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6087
6088 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6089
6090 * solib-target.c: Include <vector>
6091 (struct lm_info_target) <~lm_info_target>: Remove.
6092 <segment_bases, section_bases>: Change type to
6093 std::vector<CORE_ADDR>.
6094 (library_list_start_segment, library_list_start_section,
6095 library_list_end_library,
6096 solib_target_relocate_section_addresses): Adjust.
6097
6098 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6099
6100 * gdbarch.sh (software_single_step): Change return type to
6101 std::vector<CORE_ADDR>.
6102 * gdbarch.c, gdbarch.h: Re-generate.
6103 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6104 Adjust.
6105 (arm_deal_with_atomic_sequence_raw): Adjust.
6106 (thumb_get_next_pcs_raw): Adjust.
6107 (arm_get_next_pcs_raw): Adjust.
6108 (arm_get_next_pcs): Adjust.
6109 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6110 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6111 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6112 (alpha_software_single_step): Adjust.
6113 * alpha-tdep.h (alpha_software_single_step): Adjust.
6114 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6115 * arm-tdep.c (arm_software_single_step): Adjust.
6116 (arm_breakpoint_kind_from_current_state): Adjust.
6117 * arm-tdep.h (arm_software_single_step): Adjust.
6118 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6119 * cris-tdep.c (cris_software_single_step): Adjust.
6120 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6121 (micromips_deal_with_atomic_sequence): Adjust.
6122 (deal_with_atomic_sequence): Adjust.
6123 (mips_software_single_step): Adjust.
6124 * mips-tdep.h (mips_software_single_step): Adjust.
6125 * moxie-tdep.c (moxie_software_single_step): Adjust.
6126 * nios2-tdep.c (nios2_software_single_step): Adjust.
6127 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6128 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6129 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6130 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6131 * sparc-tdep.c (sparc_software_single_step): Adjust.
6132 * spu-tdep.c (spu_software_single_step): Adjust.
6133 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6134
6135 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6136
6137 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6138 * gdbarch.h: Re-generate.
6139
6140 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6141
6142 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6143 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6144 * python/py-instruction.c, python/py-instruction.h: New file.
6145 * python/py-record.c: Add py-instruction.h include.
6146 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6147 gdb.RecordInstruction.
6148 * python/python-internal.h: Add gdbpy_initialize_instruction
6149 declaration.
6150 * python/python.c (do_start_initialization): Add
6151 gdbpy_initialize_instruction.
6152
6153 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6154
6155 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6156 Remove.
6157 (btrace_func_from_recpy_func): New function.
6158 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6159 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6160 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6161 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6162 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6163 Also, use new helper functions.
6164 (btpy_list_item): Use new helper functions.
6165 (recpy_bt_function_call_history): Use new type name.
6166 (btpy_call_getset): Remove.
6167 (gdbpy_initialize_btrace): Remove code to initialize
6168 gdb.BtraceFunctionCall.
6169 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6170 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6171 recpy_bt_func_prev, recpy_bt_func_next): New export.
6172 * python/py-record.c (recpy_func_type): New static object.
6173 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6174 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6175 recpy_func_next): New function.
6176 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6177 (recpy_func_getset): New static object.
6178 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6179 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6180
6181 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6182
6183 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6184 (btpy_object, btpy_insn_type, btpy_new): Remove.
6185 (btpy_list_object): Use gdb.RecordInstruction type instead of
6186 gdb.BtraceInstruction type.
6187 (btrace_insn_from_recpy_insn): New function.
6188 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6189 btpy_new.
6190 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6191 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6192 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6193 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6194 instead of btpy_object.
6195 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6196 btpy_insn_data, btpy_insn_decode): Rename to ...
6197 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6198 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6199 recpy_bt_insn_decode): This. Also, use new helper functions.
6200 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6201 recpy_insn_type.
6202 (btpy_insn_getset): Remove.
6203 (gdbpy_initialize_btrace): Remove code to initialize
6204 gdb.BtraceInstruction. Use recpy_element_object.
6205 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6206 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6207 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6208 * python/py-record.c (recpy_insn_type): New static object.
6209 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6210 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6211 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6212 New function.
6213 (recpy_insn_getset): New static object.
6214 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6215 * python/py-record.h (recpy_element_object): New typedef.
6216 (recpy_insn_type, recpy_insn_new): New export.
6217
6218 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6219
6220 * py-record-btrace.c (btpy_insn_new): Removed.
6221 (btpy_insn_or_gap_new): New function.
6222 (btpy_insn_error): Removed.
6223 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6224 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6225 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6226 btpy_insn_or_gap_new instead of btpy_insn_new.
6227 (btpy_insn_getset): Remove btpy_insn_error.
6228 * py-record.c (recpy_gap_type): New static object.
6229 (recpy_gap_object): New typedef.
6230 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6231 recpy_gap_reason_string): New function.
6232 (recpy_gap_getset): New static object.
6233 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6234 * py-record.h (recpy_gap_new): New export.
6235
6236 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6237
6238 * python/py-record.c (recpy_ptid): Remove.
6239 (recpy_record_getset): Remove recpy_ptid.
6240
6241 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6242
6243 * btrace.c (btrace_fetch): Set inferior_ptid.
6244 * python/py-record-btrace.c: Add "py-record.h" include.
6245 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6246 recpy_bt_end, recpy_bt_instruction_history,
6247 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6248 in gdb.Record object instead of current ptid.
6249 * python/py-record.c: Include new "py-record.h" file.
6250 (recpy_record_object): Moved to py-record.h.
6251 * python/py-record.h: New file.
6252
6253 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6254
6255 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6256 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6257 indentation.
6258
6259 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6260
6261 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6262 the past maintainers section.
6263
6264 2017-04-28 Yao Qi <yao.qi@linaro.org>
6265
6266 * infcmd.c (get_return_value): Use regcache ctor, and remove
6267 cleanup.
6268
6269 2017-04-28 Yao Qi <yao.qi@linaro.org>
6270 Pedro Alves <palves@redhat.com>
6271
6272 * regcache.c (regcache::regcache): New tag dispatch ctor.
6273 (do_cooked_read): Moved above.
6274 (regcache_dup): Use the tag dispatch ctor..
6275 * regcache.h (regcache): Declare ctor, delete copy ctor and
6276 assignment operator, remove friend regcache_dup.
6277
6278 2017-04-28 Yao Qi <yao.qi@linaro.org>
6279
6280 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6281 call method save instead of regcache_cpy.
6282 * regcache.h (struct regcache): Make regcache_dup a friend.
6283
6284 2017-04-28 Yao Qi <yao.qi@linaro.org>
6285
6286 * regcache.c (struct regcache): Move to regcache.h
6287 (regcache::arch): New method.
6288 (regcache_get_ptid): Update.
6289 (get_regcache_arch): Call arch method.
6290 (get_regcache_aspace): Call method aspace.
6291 (register_buffer): Change it to method.
6292 (regcache_save): Change it to regcache::save.
6293 (regcache_restore): Likewise.
6294 (regcache_cpy_no_passthrough): Remove the declaration.
6295 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6296 (regcache_cpy_no_passthrough): Change it to method
6297 cpy_no_passthrough.
6298 (regcache_register_status): Change it to method
6299 get_register_status.
6300 (regcache_invalidate): Change it to method invalidate.
6301 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6302 (regcache_raw_update): Change it to method raw_update.
6303 (regcache_raw_read): Likewise.
6304 (regcache_raw_read_signed): Likewise.
6305 (regcache_raw_read_unsigned): Likewise.
6306 (regcache_raw_write_signed): Likewise.
6307 (regcache_raw_write_unsigned): Likewise.
6308 (regcache_cooked_read): Likewise.
6309 (regcache_cooked_read_value): Likewise.
6310 (regcache_cooked_read_signed): Likewise.
6311 (regcache_cooked_read_unsigned): Likewise.
6312 (regcache_cooked_write_signed): Likewise.
6313 (regcache_cooked_write_unsigned): Likewise.
6314 (regcache_raw_set_cached_value): Likewise.
6315 (regcache_raw_write): Likewise.
6316 (regcache_cooked_write): Likewise.
6317 (regcache_xfer_part): Likewise.
6318 (regcache_raw_read_part): Likewise.
6319 (regcache_raw_write_part): Likewise.
6320 (regcache_cooked_read_part): Likewise.
6321 (regcache_cooked_write_part): Likewise.
6322 (regcache_raw_supply): Likewise.
6323 (regcache_raw_collect): Likewise.
6324 (regcache_transfer_regset): Likewise.
6325 (regcache_supply_regset): Likewise.
6326 (regcache_collect_regset): Likewise.
6327 (regcache_debug_print_register): Likewise.
6328 (enum regcache_dump_what): Move it to regcache.h.
6329 (regcache_dump): Change it to method dump.
6330 * regcache.h (enum regcache_dump_what): New.
6331 (class regcache): New.
6332 * target.c (target_fetch_registers): Call method
6333 debug_print_register.
6334 (target_store_registers): Likewise.
6335
6336 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6337
6338 * windows-nat.c (struct lm_info_windows): Initialize field.
6339 (windows_make_so): Allocate lm_info_windows with new.
6340 (windows_free_so): Free lm_info_windows with delete.
6341
6342 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6343
6344 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6345 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6346 cleanup.
6347 (darwin_free_so): Free lm_info_darwin with delete.
6348
6349 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6350
6351 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6352 <l_addr_p>: Change type to bool.
6353 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6354 (svr4_free_so): Free lm_info_svr4 with delete.
6355 (svr4_copy_library_list): Replace memcpy with call to copy
6356 constructor.
6357 (library_list_start_library, svr4_default_sos): Allocate
6358 lm_info_svr4 with new.
6359
6360 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6361
6362 * solib-target.c (struct lm_info_target): Add destructor,
6363 initialize fields.
6364 <name>: Change type to std::string.
6365 (library_list_start_library): Allocate lm_info_target with new.
6366 (solib_target_free_library_list): Free lm_info_target with
6367 delete.
6368 (solib_target_current_sos): Adapt to std::string.
6369 (solib_target_free_so): Free lm_info_target with delete.
6370
6371 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6372
6373 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6374 fields.
6375 (frv_current_sos): Allocate lm_info_frv with new.
6376 (frv_relocate_main_executable): Free lm_info_frv with delete,
6377 allocate with new.
6378 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6379
6380 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6381
6382 * solib-frv.c (struct lm_info_frv): Fix indentation.
6383
6384 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6385
6386 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6387 map field.
6388 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6389 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6390 and allocate with new.
6391 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6392
6393 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6394
6395 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6396 <filename, member_name>: Change type to std::string.
6397 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6398 (library_list_start_library): Allocate lm_info_aix with new.
6399 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6400 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6401 with copy constructor.
6402
6403 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * solist.h (struct lm_info): Remove.
6406 (struct lm_info_base): New class.
6407 (struct so_list) <lm_info>: Change type to lm_info_base *.
6408 * nto-tdep.c (struct lm_info): Remove.
6409 (lm_addr): Adjust.
6410 * solib-aix.c (struct lm_info): Rename to ...
6411 (struct lm_info_aix): ... this. Extend lm_info_base.
6412 (lm_info_p): Rename to ...
6413 (lm_info_aix_p): ... this, and adjust.
6414 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6415 solib_aix_parse_libraries, library_list_start_library,
6416 solib_aix_free_library_list, solib_aix_parse_libraries,
6417 solib_aix_get_library_list,
6418 solib_aix_relocate_section_addresses, solib_aix_free_so,
6419 solib_aix_get_section_offsets,
6420 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6421 Adjust.
6422 (struct solib_aix_inferior_data) <library_list>: Adjust.
6423 * solib-darwin.c (struct lm_info): Rename to ...
6424 (struct lm_info_darwin): ... this. Extend lm_info_base.
6425 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6426 * solib-dsbt.c (struct lm_info): Rename to ...
6427 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6428 (struct dsbt_info) <main_executable_lm_info): Adjust.
6429 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6430 dsbt_relocate_section_addresses): Adjust.
6431 * solib-frv.c (struct lm_info): Rename to ...
6432 (struct lm_info_frv): ... this. Extend lm_info_base.
6433 (main_executable_lm_info): Adjust.
6434 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6435 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6436 find_canonical_descriptor_in_load_object,
6437 frv_fdpic_find_canonical_descriptor): Adjust.
6438 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6439 to lm_info_svr4.
6440 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6441 svr4_clear_so, svr4_copy_library_list,
6442 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6443 svr4_current_sos, svr4_fetch_objfile_link_map,
6444 solist_update_incremental): Adjust.
6445 * solib-svr4.h (struct lm_info_svr4): Move here from
6446 solib-svr4.c.
6447 * solib-target.c (struct lm_info): Rename to ...
6448 (struct lm_info_target): ... this. Extend lm_info_base.
6449 (lm_info_p): Rename to ...
6450 (lm_info_target_p): ... this.
6451 (solib_target_parse_libraries, library_list_start_segment,
6452 library_list_start_section, library_list_start_library,
6453 library_list_end_library, solib_target_free_library_list,
6454 solib_target_current_sos, solib_target_free_so,
6455 solib_target_relocate_section_addresses): Adjust.
6456 * windows-nat.c (struct lm_info): Rename to ...
6457 (struct lm_info_windows): ... this. Extend lm_info_base.
6458 (windows_make_so, handle_load_dll, handle_unload_dll,
6459 windows_xfer_shared_libraries): Adjust.
6460
6461 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6462
6463 * solib-darwin.c (struct darwin_so_list): Remove.
6464 (darwin_current_sos): Allocate an so_list object instead of a
6465 darwin_so_list, separately allocate an lm_info object.
6466 (darwin_free_so): Free lm_info.
6467
6468 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6469
6470 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6471 with fprintf_filtered.
6472
6473 2017-04-28 Yao Qi <yao.qi@linaro.org>
6474
6475 * regcache.c (regcache::regcache): New function.
6476 (regcache::~regcache): New function.
6477 (regcache_xmalloc_1): Remove.
6478 (regcache_xmalloc): Call new regcache.
6479 (regcache_xfree): Call delete regcache.
6480 (get_thread_arch_aspace_regcache): Call new regcache.
6481
6482 2017-04-28 Yao Qi <yao.qi@linaro.org>
6483
6484 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6485 lwp instead of ptid_get_lwp.
6486
6487 2017-04-28 Yao Qi <yao.qi@linaro.org>
6488
6489 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6490 lwp_info instead of getting from inferior_ptid.
6491
6492 2017-04-27 Keith Seitz <keiths@redhat.com>
6493
6494 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6495 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6496 (CV_CONVERSION_BADNESS): Define.
6497 (rank_one_type): Remove overly restrictive rvalue reference
6498 rank checks.
6499 Add cv-qualifier checks and subranks for type equality.
6500 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6501 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6502 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6503
6504 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6505
6506 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6507 count when creating the object.
6508
6509 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6510 Ulrich Weigand <uweigand@de.ibm.com>
6511
6512 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6513 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6514 is used in AIX.
6515 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6516 (process_xcoff_symbol): Likewise.
6517 (scan_xcoff_symtab): Likewise.
6518
6519 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6520
6521 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6522 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6523 (ia64_access_reg): Use get_frame_register_unsigned.
6524 (ia64_access_rse_reg): Likewise.
6525 (ia64_libunwind_frame_prev_register): Likewise.
6526
6527 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6528
6529 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6530 * gdbarch.c: Regenerated.
6531 * gdbarch.h: Regenerated.
6532 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6533 visibility external.
6534 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6535 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6536 (enum cfa_how_kind): Move to ...
6537 (struct dwarf2_frame_state_reg_info): Likewise.
6538 (struct dwarf2_frame_state): Likewise.
6539 * dwarf2-frame.h: ... here.
6540 (dwarf2_frame_state_alloc_regs): New declaration.
6541 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6542 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6543
6544 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6545
6546 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6547 regcache_raw_read_unsigned.
6548 (xtensa_pseudo_register_write): Likewise.
6549
6550 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6551
6552 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6553 (nds32_pseudo_register_write): Likewise.
6554
6555 2017-04-25 Yao Qi <yao.qi@linaro.org>
6556
6557 * regcache.c (struct regcache) <readonly_p>: Change its type
6558 to bool.
6559 (regcache_xmalloc_1): Update parameter type and callers update.
6560
6561 2017-04-25 Yao Qi <yao.qi@linaro.org>
6562
6563 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6564 set_gdbarch_wchar_bit.
6565 * arm-tdep.c (arm_gdbarch_init): Likewise.
6566
6567 2017-04-25 Pedro Alves <palves@redhat.com>
6568
6569 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6570 (BothAreRelocatable, memcopy, memmove): Don't define.
6571 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6572 macros.
6573
6574 2017-04-25 Pedro Alves <palves@redhat.com>
6575
6576 * common/common-defs.h: Include "common/poison.h".
6577 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6578 and adjust.
6579 * common/poison.h: New file.
6580 * common/traits.h: Include <type_traits>.
6581 (Not, Or, Requires): New, moved from common/function-view.h.
6582
6583 2017-04-25 Pedro Alves <palves@redhat.com>
6584
6585 * breakpoint.h (struct breakpoint): In-class initialize all
6586 fields. Make boolean fields "bool".
6587 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6588 memset call and initializations no longer necessary.
6589
6590 2017-04-25 Pedro Alves <palves@redhat.com>
6591
6592 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6593 reference.
6594 (pt_btrace_insn): New function.
6595 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6596
6597 2017-04-25 Pedro Alves <palves@redhat.com>
6598
6599 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6600 "base" field and inherit from "bp_location" instead. Add
6601 non-default ctor.
6602 (allocate_location_exception): Use new non-default ctor.
6603 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6604 (init_bp_location): Convert to ...
6605 (bp_location::bp_location): ... this new ctor, and remove memset
6606 call.
6607 (base_breakpoint_allocate_location): Use the new non-default ctor.
6608 * breakpoint.h (bp_location): Now a class. Declare default and
6609 non-default ctors. In-class initialize all members.
6610 (init_bp_location): Remove declaration.
6611
6612 2017-04-25 Pedro Alves <palves@redhat.com>
6613
6614 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6615 assignment operator.
6616
6617 2017-04-24 Yao Qi <yao.qi@linaro.org>
6618
6619 * doublest.c (convert_doublest_to_floatformat): Call
6620 floatformat_totalsize_bytes.
6621
6622 2017-04-22 Tom Tromey <tom@tromey.com>
6623
6624 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6625 ui_out_emit_list.
6626 * stack.c (print_frame): Use ui_out_emit_list.
6627 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6628 ui_out_emit_list.
6629 * mi/mi-main.c (print_one_inferior)
6630 (mi_cmd_data_list_register_names)
6631 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6632 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6633 ui_out_emit_list.
6634 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6635 (mi_output_solib_attribs): Use ui_out_emit_list,
6636 ui_out_emit_tuple.
6637 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6638 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6639 (mi_cmd_stack_list_args, list_args_or_locals): Use
6640 ui_out_emit_list.
6641 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6642 * breakpoint.c (print_solib_event, output_thread_groups): Use
6643 ui_out_emit_list.
6644
6645 2017-04-22 Tom Tromey <tom@tromey.com>
6646
6647 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6648 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6649 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6650
6651 2017-04-22 Tom Tromey <tom@tromey.com>
6652
6653 * tracepoint.c (tvariables_info_1)
6654 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6655
6656 2017-04-22 Tom Tromey <tom@tromey.com>
6657
6658 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6659 annotate_arg_emitter.
6660 * breakpoint.c (print_mention_watchpoint)
6661 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6662 * annotate.h (struct annotate_arg_emitter): New.
6663
6664 2017-04-22 Tom Tromey <tom@tromey.com>
6665
6666 * record-btrace.c (record_btrace_insn_history)
6667 (record_btrace_insn_history_range, record_btrace_call_history)
6668 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6669 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6670 ui_out_emit_tuple.
6671 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6672 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6673 * skip.c (skip_info): Use ui_out_emit_tuple.
6674 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6675 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6676 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6677 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6678 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6679 ui_out_emit_tuple.
6680 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6681 (output_register, mi_cmd_data_read_memory)
6682 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6683 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6684 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6685 Use ui_out_emit_tuple.
6686 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6687 ui_out_emit_tuple.
6688 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6689 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6690 * linux-thread-db.c (info_auto_load_libthread_db): Use
6691 ui_out_emit_tuple.
6692 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6693 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6694 * disasm.c (do_mixed_source_and_assembly_deprecated)
6695 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6696 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6697 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6698 * breakpoint.c (print_one_breakpoint_location)
6699 (print_one_breakpoint): Use ui_out_emit_tuple.
6700 * auto-load.c (print_script, info_auto_load_cmd): Use
6701 ui_out_emit_tuple.
6702 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6703
6704 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6705
6706 * thread.c (print_thread_info_1): Remove dead code.
6707
6708 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6709
6710 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6711 GDB_SELF_TEST.
6712 * arm-tdep.c (selftests::arm_record_test): Likewise.
6713
6714 2017-04-21 Yao Qi <yao.qi@linaro.org>
6715
6716 * regcache.c (regcache_restore): Remove argument 2. Replace
6717 argument 3 with regcache. Get register status from
6718 src->register_status and get register contents from
6719 register_buffer (src, regnum).
6720 (regcache_cpy): Update.
6721
6722 2017-04-19 Pedro Alves <palves@redhat.com>
6723
6724 * gdbthread.h (thread): Add missing closing parenthesis in
6725 comment.
6726
6727 2017-04-19 Pedro Alves <palves@redhat.com>
6728
6729 * common/refcounted-object.h: New file.
6730 * gdbthread.h: Include "common/refcounted-object.h".
6731 (thread_info): Inherit from refcounted_object and add comments.
6732 (thread_info::incref, thread_info::decref)
6733 (thread_info::m_refcount): Delete.
6734 (thread_info::deletable): Use the refcounted_object::refcount()
6735 method.
6736 * inferior.c (current_inferior_): Add comment.
6737 (set_current_inferior): Increment/decrement refcounts.
6738 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6739 not-deletable instead of comparing with the current inferior.
6740 (initialize_inferiors): Increment the initial inferior's refcount.
6741 * inferior.h (struct inferior): Forward declare.
6742 Include "common/refcounted-object.h".
6743 (current_inferior, set_current_inferior): Move declaration to
6744 before struct inferior's definition, and fix comment.
6745 (inferior): Inherit from refcounted_object. Add comments.
6746 * thread.c (switch_to_thread_no_regs): Reference the thread's
6747 inferior pointer directly instead of doing a ptid lookup.
6748 (switch_to_no_thread): New function.
6749 (switch_to_thread(thread_info *)): New function, factored out
6750 from ...
6751 (switch_to_thread(ptid_t)): ... this.
6752 (restore_current_thread): Delete.
6753 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6754 fields, and add 'inf' field.
6755 (do_restore_current_thread_cleanup): Check whether old->inf is
6756 alive instead of looking up an inferior by ptid. Use
6757 switch_to_thread and switch_to_no_thread.
6758 (restore_current_thread_cleanup_dtor): Use old->inf directly
6759 instead of lookup up an inferior by id. Decref the inferior.
6760 Don't restore 'removable'.
6761 (make_cleanup_restore_current_thread): Same the inferior pointer
6762 in old, instead of the inferior number. Incref the inferior.
6763 Don't save/clear 'removable'.
6764
6765 2017-04-19 Pedro Alves <palves@redhat.com>
6766
6767 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6768 unittests/scoped_restore-selftests.c.
6769 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6770 * common/scoped_restore.h (scoped_restore_base): Make "class".
6771 (scoped_restore_base::release): New public method.
6772 (scoped_restore_base::scoped_restore_base): New protected ctor.
6773 (scoped_restore_base::m_saved_var): New protected field.
6774 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6775 scoped_restore_base base class instead of m_saved_var directly.
6776 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6777 (scoped_restore_tmpl::scoped_restore_tmpl(const
6778 scoped_restore_tmpl<T>&)): Likewise.
6779 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6780 method.
6781 (scoped_restore_tmpl::saved_var): New method.
6782 (scoped_restore_tmpl::m_saved_var): Delete.
6783 * inferior.h (inferior::detaching): Now a bool.
6784 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6785 cleanup.
6786 * unittests/scoped_restore-selftests.c: New file.
6787
6788 2017-04-19 Pedro Alves <palves@redhat.com>
6789
6790 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6791 Re-sort in alphabetic order.
6792
6793 2017-04-18 Pedro Alves <palves@redhat.com>
6794
6795 * xml-support.c (obstack_xml_printf): Delete.
6796 * xml-support.h (obstack_xml_printf): Delete.
6797
6798 2017-04-18 Pedro Alves <palves@redhat.com>
6799
6800 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6801 vdebug, verror, body_text, start_element, end_element, name,
6802 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6803 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6804 is_xinclude>: Make private and add m_ prefix.
6805 (gdb_xml_parser::body_text): New method, based on ...
6806 (gdb_xml_body_text): ... this. Adjust.
6807 (gdb_xml_parser::vdebug): New method, based on ...
6808 (gdb_xml_debug): ... this. Adjust.
6809 (gdb_xml_parser::verror): New method, based on ...
6810 (gdb_xml_error): ... this. Adjust.
6811 (gdb_xml_parser::start_element): New method, based on ...
6812 (gdb_xml_start_element): ... this. Adjust.
6813 (gdb_xml_start_element_wrapper): Defer to
6814 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6815 (gdb_xml_parser::end_element): New method, based on ...
6816 (gdb_xml_end_element_wrapper): ... this. Adjust.
6817 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6818 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6819 (gdb_xml_parser::use_dtd): New method, based on ...
6820 (gdb_xml_use_dtd): ... this. Adjust.
6821 (gdb_xml_parser::parse): New method, based on ...
6822 (gdb_xml_parse): ... this. Adjust.
6823 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6824 (xinclude_start_include): Adjust to call the parser's name method.
6825 (xml_xinclude_default, xml_xinclude_start_doctype)
6826 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6827 method.
6828 (xml_process_xincludes): Adjust to call parser methods.
6829 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6830 declarations.
6831
6832 2017-04-18 Pedro Alves <palves@redhat.com>
6833
6834 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6835 gdb::optional<std::string>.
6836 * xml-support.c: Include <string>.
6837 (scope_level::scope_level(scope_level &&))
6838 (scope_level::~scope_level): Delete.
6839 (scope_level::body): Now a std::string.
6840 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6841 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6842 parameter.
6843 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6844 (xinclude_parsing_data::output): Now a std::string reference.
6845 (xinclude_start_include): Adjust.
6846 (xml_xinclude_default): Adjust.
6847 (xml_process_xincludes): Add 'output' parameter, and return bool.
6848 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6849 and return bool.
6850 * xml-tdesc.c: Include <unordered_map> and <string>.
6851 (tdesc_xml_cache): Delete.
6852 (tdesc_xml_cache_s): Delete.
6853 (xml_cache): Now an std::unordered_map.
6854 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6855 (target_fetch_description_xml): Change return type to
6856 gdb::optional<std::string>, and adjust.
6857 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6858 (target_fetch_description_xml): Change return type to
6859 gdb::optional<std::string>.
6860
6861 2017-04-18 Pedro Alves <palves@redhat.com>
6862
6863 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6864 unittests/optional-selftests.c.
6865 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6866 * unittests/optional-selftests.c: New file.
6867 * unittests/optional/assignment/1.cc: New file.
6868 * unittests/optional/assignment/2.cc: New file.
6869 * unittests/optional/assignment/3.cc: New file.
6870 * unittests/optional/assignment/4.cc: New file.
6871 * unittests/optional/assignment/5.cc: New file.
6872 * unittests/optional/assignment/6.cc: New file.
6873 * unittests/optional/assignment/7.cc: New file.
6874 * unittests/optional/cons/copy.cc: New file.
6875 * unittests/optional/cons/default.cc: New file.
6876 * unittests/optional/cons/move.cc: New file.
6877 * unittests/optional/cons/value.cc: New file.
6878 * unittests/optional/in_place.cc: New file.
6879 * unittests/optional/observers/1.cc: New file.
6880 * unittests/optional/observers/2.cc: New file.
6881
6882 2017-04-18 Pedro Alves <palves@redhat.com>
6883
6884 * common/gdb_optional.h: Include common/traits.h.
6885 (in_place_t): New type.
6886 (in_place): New constexpr variable.
6887 (optional::optional): Remove member initialization of
6888 m_instantiated.
6889 (optional::optional(in_place_t...)): New constructor.
6890 (optional::~optional): Use reset.
6891 (optional::optional(const optional&)): New.
6892 (optional::optional(const optional&&)): New.
6893 (optional::optional(T &)): New.
6894 (optional::optional(T &&)): New.
6895 (operator::operator=(const optional &)): New.
6896 (operator::operator=(optional &&)): New.
6897 (operator::operator= (const T &))
6898 (operator::operator= (T &&))
6899 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6900 (operator::reset): New.
6901 (operator::m_instantiated):: Add in-class initializer.
6902 * common/traits.h: Include <type_traits>.
6903 (struct And): New types.
6904
6905 2017-04-18 Pedro Alves <palves@redhat.com>
6906
6907 * xml-support.c: Include <vector>.
6908 (scope_level::scope_level(const gdb_xml_element *))
6909 (scope_level::scope_level(scope_level&&)): New.
6910 (scope_level::~scope_level): New.
6911 (scope_level_s): Delete.
6912 (gdb_xml_parser::scopes): Now a std::vector.
6913 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6914 Use std::vector.
6915 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6916 scope cleanup code.
6917 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6918 of the scopes member. Use std::vector::emplace_back.
6919
6920 2017-04-18 Pedro Alves <palves@redhat.com>
6921
6922 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6923 a bool.
6924 (gdb_xml_end_element): Change type of first parameter.
6925 (gdb_xml_cleanup): Rename to ...
6926 (gdb_xml_parser::~gdb_xml_parser): ... this.
6927 (gdb_xml_create_parser_and_cleanup): Delete with ...
6928 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6929 to this new ctor.
6930 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6931 using gdb_xml_create_parser_and_cleanup.
6932 (xinclude_parsing_data): Add ctor/dtor.
6933 (xml_xinclude_cleanup): Delete.
6934 (xml_process_xincludes): Create a local xinclude_parsing_data
6935 instead of heap-allocating one. Create a local gdb_xml_parser
6936 instead of heap-allocating one with
6937 gdb_xml_create_parser_and_cleanup.
6938
6939 2017-04-18 John Baldwin <jhb@FreeBSD.org>
6940
6941 PR threads/20743
6942 * fbsd-nat.c (resume_one_thread_cb): Remove.
6943 (resume_all_threads_cb): Remove.
6944 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6945 iterate_over_threads.
6946
6947 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6948
6949 * NEWS: Create a new section for the next release branch.
6950 Rename the section of the current branch, now that it has
6951 been cut.
6952
6953 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6954
6955 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6956 * version.in: Bump version to 8.0.50.DATE-git.
6957
6958 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
6959
6960 PR gdb/21385
6961 * windows-nat.c (windows_create_inferior): Declare 'allargs'
6962 independently of the host, and fix build breakage on Cygwin.
6963
6964 2017-04-13 Pedro Alves <palves@redhat.com>
6965
6966 * inferior.c (free_inferior): Convert to ...
6967 (inferior::~inferior): ... this dtor.
6968 (inferior::inferior): New ctor, factored out from ...
6969 (add_inferior_silent): ... here. Allocate the inferior with a new
6970 expression.
6971 (delete_inferior): Call delete instead of free_inferior.
6972 * inferior.h (gdb_environ, continuation): Forward declare.
6973 (inferior): Now a class. Add in-class initialization to all
6974 members. Make boolean fields bool, except 'detaching'.
6975 (inferior::inferior): New explicit ctor.
6976 (inferior::~inferior): New.
6977
6978 2017-04-13 Pedro Alves <palves@redhat.com>
6979
6980 * inferior.c (init_inferior_list): Delete.
6981 * inferior.h (init_inferior_list): Delete.
6982
6983 2017-04-13 Pedro Alves <palves@redhat.com>
6984
6985 PR threads/13217
6986 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6987 (top level): Call it twice, with different thread sets.
6988
6989 2017-04-13 Pedro Alves <palves@redhat.com>
6990
6991 * thread.c: Include <algorithm>.
6992 (thread_array_cleanup): Delete.
6993 (scoped_inc_dec_ref): New class.
6994 (live_threads_count): New function.
6995 (set_thread_refcount): Delete.
6996 (tp_array_compar_ascending): Now a bool.
6997 (tp_array_compar): Convert to a std::sort comparison function.
6998 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6999 and live_threads_count.
7000
7001 2017-04-13 Pedro Alves <palves@redhat.com>
7002
7003 * infrun.c (follow_fork_inferior): Also switch the current
7004 inferior.
7005
7006 2017-04-13 Pedro Alves <palves@redhat.com>
7007
7008 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7009 before calling create_internal_breakpoint.
7010
7011 2017-04-13 Pedro Alves <palves@redhat.com>
7012
7013 * fork-child.c (execv_argv): New class.
7014 (breakup_args): Refactored as ...
7015 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7016 Copy arguments to storage and replace separators with NULL
7017 terminators in place.
7018 (escape_bang_in_quoted_argument): Adjust to return bool.
7019 (execv_argv::execv_argv): New ctor.
7020 (execv_argv::init_for_shell): New method, factored out from
7021 fork_inferior. Don't strdup strings into the vector.
7022 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7023 Remove free_vector_argv call.
7024
7025 2017-04-13 Yao Qi <yao.qi@linaro.org>
7026
7027 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7028 tdep->rx_psw_type.
7029
7030 2017-04-13 Yao Qi <yao.qi@linaro.org>
7031
7032 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7033 * rx-tdep.c (rx_gdbarch_init): Likewise.
7034
7035 2017-04-13 Pedro Alves <palves@redhat.com>
7036
7037 * breakpoint.h (struct breakpoint): Reindent.
7038
7039 2017-04-13 Pedro Alves <palves@redhat.com>
7040
7041 * breakpoint.c (bp_location): Rename to ...
7042 (bp_locations): ... this. All references updated.
7043 (bp_location_count): Rename to ...
7044 (bp_locations_count): ... this. All references updated.
7045 (bp_location_placed_address_before_address_max): Rename to ...
7046 (bp_locations_placed_address_before_address_max): ... this. All
7047 references updated.
7048 (bp_location_shadow_len_after_address_max): Rename to ...
7049 (bp_locations_shadow_len_after_address_max): ... this. All
7050 references updated.
7051 (bp_location_compare_addrs): Rename to ...
7052 (bp_locations_compare_addrs): ... this. All references updated.
7053 (bp_location_compare):Rename to ...
7054 (bp_locations_compare): ... this. All references updated.
7055 (bp_location_target_extensions_update): Rename to ...
7056 (bp_locations_target_extensions_update): ... this. All references
7057 updated.
7058
7059 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7060
7061 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7062 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7063 'sgtty.h'.
7064 * common/gdb_termios.h: New file, with parts of "terminal.h".
7065 * inflow.c: Include "gdb_termios.h".
7066 * ser-unix.c: Include "gdb_termios.h".
7067 * terminal.h: Move terminal-related defines to
7068 "common/gdb_termios.h".
7069
7070 2017-04-12 Tom Tromey <tom@tromey.com>
7071
7072 * probe.c (parse_probes): Update.
7073 * location.h (delete_event_location): Don't declare.
7074 (event_location_deleter::operator()): Update.
7075 * location.c (event_location_deleter::operator()): Rename from
7076 delete_event_location.
7077 * linespec.h (linespec_result) <location>: Change type to
7078 event_location_up.
7079 * linespec.c (canonicalize_linespec, event_location_to_sals)
7080 (decode_objc): Update.
7081 (linespec_result): Don't call delete_event_location.
7082 * breakpoint.c (create_breakpoints_sal)
7083 (bkpt_probe_create_sals_from_location)
7084 (strace_marker_create_sals_from_location): Update.
7085
7086 2017-04-12 Tom Tromey <tom@tromey.com>
7087
7088 * linespec.h (struct linespec_result): Add constructor and
7089 destructor.
7090 (init_linespec_result, destroy_linespec_result)
7091 (make_cleanup_destroy_linespec_result): Don't declare.
7092 * linespec.c (init_linespec_result): Remove.
7093 (linespec_result::~linespec_result): Rename from
7094 destroy_linespec_result. Update.
7095 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7096 Remove.
7097 * breakpoint.c (create_breakpoint, break_range_command)
7098 (decode_location_default): Update.
7099 * ax-gdb.c (agent_command_1): Update.
7100
7101 2017-04-12 Tom Tromey <tom@tromey.com>
7102
7103 * remote.c (remote_download_tracepoint): Update.
7104 * python/py-breakpoint.c (bppy_get_location): Update.
7105 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7106 (gdbscm_breakpoint_location): Update.
7107 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7108 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7109 Change type to event_location_up.
7110 * breakpoint.c (create_overlay_event_breakpoint)
7111 (create_longjmp_master_breakpoint)
7112 (create_std_terminate_master_breakpoint)
7113 (create_exception_master_breakpoint)
7114 (breakpoint_event_location_empty_p, print_breakpoint_location)
7115 (print_one_breakpoint_location, create_thread_event_breakpoint)
7116 (init_breakpoint_sal, create_breakpoint)
7117 (print_recreate_ranged_breakpoint, break_range_command)
7118 (init_ada_exception_breakpoint, say_where): Update.
7119 (base_breakpoint_dtor): Don't call delete_event_location.
7120 (bkpt_print_recreate, tracepoint_print_recreate)
7121 (dprintf_print_recreate, update_static_tracepoint)
7122 (breakpoint_re_set_default): Update.
7123
7124 2017-04-12 Tom Tromey <tom@tromey.com>
7125
7126 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7127 type of "to_do". Update.
7128 (compute_stack_depth): Use std::vector.
7129
7130 2017-04-12 Tom Tromey <tom@tromey.com>
7131
7132 * printcmd.c (find_instruction_backward): Use std::vector.
7133
7134 2017-04-12 Tom Tromey <tom@tromey.com>
7135
7136 * symfile.c (objfilep): Remove typedef.
7137 (reread_symbols): Use a std::vector.
7138
7139 2017-04-12 Tom Tromey <tom@tromey.com>
7140
7141 * mi/mi-main.c (exec_direction_forward): Remove.
7142 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7143 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7144 scoped_restore.
7145 * guile/guile.c (guile_repl_command, guile_command)
7146 (gdbscm_execute_gdb_command): Use scoped_restore.
7147 * go-exp.y (go_parse): Use scoped_restore.
7148 * d-exp.y (d_parse): Use scoped_restore.
7149 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7150 * c-exp.y (c_parse): Use scoped_restore.
7151
7152 2017-04-12 Tom Tromey <tom@tromey.com>
7153
7154 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7155 (mi_parse): Update return type.
7156 (mi_parse_free): Remove.
7157 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7158 (mi_parse::~mi_parse): Rename from mi_parse_free.
7159 (mi_parse_cleanup): Remove.
7160 (mi_parse): Return a unique_ptr. Use new.
7161 * mi/mi-main.c (mi_execute_command): Update.
7162
7163 2017-04-12 Tom Tromey <tom@tromey.com>
7164
7165 * location.c (explicit_location_lex_one): Return a
7166 unique_xmalloc_ptr.
7167 (string_to_explicit_location): Update. Remove cleanups.
7168
7169 2017-04-12 Tom Tromey <tom@tromey.com>
7170
7171 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7172 (compare_value_and_voffset): Change type. Update.
7173 (compute_vtable_size): Change type of "offset_vec".
7174 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7175 (gnuv3_get_typeid): Remove extraneous declaration.
7176
7177 2017-04-12 Tom Tromey <tom@tromey.com>
7178
7179 * charset.h (wchar_iterator): Fix comment.
7180
7181 2017-04-12 Tom Tromey <tom@tromey.com>
7182
7183 * charset.c (iconv_wrapper): New class.
7184 (cleanup_iconv): Remove.
7185 (convert_between_encodings): Use it.
7186
7187 2017-04-12 Tom Tromey <tom@tromey.com>
7188
7189 * symfile.h (increment_reading_symtab): Update type.
7190 * symfile.c (decrement_reading_symtab): Remove.
7191 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7192 * psymtab.c (psymtab_to_symtab): Update.
7193 * dwarf2read.c (dw2_instantiate_symtab): Update.
7194
7195 2017-04-12 Tom Tromey <tom@tromey.com>
7196
7197 * jit.c (struct jit_reader): Declare separately. Add constructor
7198 and destructor. Change type of "handle".
7199 (loaded_jit_reader): Define separately.
7200 (jit_reader_load): Update. New "new".
7201 (jit_reader_unload_command): Use "delete".
7202 * gdb-dlfcn.h (struct dlclose_deleter): New.
7203 (gdb_dlhandle_up): New typedef.
7204 (gdb_dlopen, gdb_dlsym): Update types.
7205 (gdb_dlclose): Remove.
7206 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7207 (gdb_dlsym): Change type of "handle".
7208 (make_cleanup_dlclose): Remove.
7209 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7210 * compile/compile-c-support.c (load_libcc): Update.
7211
7212 2017-04-12 Tom Tromey <tom@tromey.com>
7213
7214 * symtab.h (find_pcs_for_symtab_line): Change return type.
7215 * symtab.c (find_pcs_for_symtab_line): Change return type.
7216 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7217 type of "vec". Update.
7218 (ltpy_get_pcs_for_line): Update.
7219 * linespec.c (decode_digits_ordinary): Update.
7220
7221 2017-04-12 Tom Tromey <tom@tromey.com>
7222
7223 * tracepoint.c (actions_command): Update.
7224 * python/python.c (python_command, python_interactive_command):
7225 Update.
7226 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7227 * guile/guile.c (guile_command): Update.
7228 * defs.h (read_command_lines, read_command_lines_1): Return
7229 command_line_up.
7230 (command_lines_deleter): New struct.
7231 (command_line_up): New typedef.
7232 * compile/compile.c (compile_code_command)
7233 (compile_print_command): Update.
7234 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7235 command_line_up.
7236 (make_cleanup_free_command_lines): Remove.
7237 * cli/cli-script.c (get_command_line, read_command_lines_1)
7238 (copy_command_lines): Return command_line_up.
7239 (while_command, if_command, read_command_lines, define_command)
7240 (document_command): Update.
7241 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7242 Remove.
7243 * breakpoint.h (breakpoint_set_commands): Change type of
7244 "commands".
7245 * breakpoint.c (breakpoint_set_commands): Change type of
7246 "commands". Update.
7247 (do_map_commands_command, update_dprintf_command_list)
7248 (create_tracepoint_from_upload): Update.
7249
7250 2017-04-12 Tom Tromey <tom@tromey.com>
7251
7252 * tracepoint.c (scope_info): Update.
7253 * spu-tdep.c (spu_catch_start): Update.
7254 * python/python.c (gdbpy_decode_line): Update.
7255 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7256 * python/py-breakpoint.c (bppy_init): Update.
7257 * probe.c (parse_probes): Update.
7258 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7259 * location.h (event_location_deleter): New struct.
7260 (event_location_up): New typedef.
7261 (new_linespec_location, new_address_location, new_probe_location)
7262 (new_explicit_location, copy_event_location)
7263 (string_to_event_location, string_to_event_location_basic)
7264 (string_to_explicit_location): Update return type.
7265 (make_cleanup_delete_event_location): Remove.
7266 * location.c (new_linespec_location, new_address_location)
7267 (new_probe_location, new_explicit_location, copy_event_location):
7268 Return event_location_up.
7269 (delete_event_location_cleanup)
7270 (make_cleanup_delete_event_location): Remove.
7271 (string_to_explicit_location, string_to_event_location_basic)
7272 (string_to_event_location): Return event_location_up.
7273 * linespec.c (canonicalize_linespec, event_location_to_sals)
7274 (decode_line_with_current_source)
7275 (decode_line_with_last_displayed, decode_objc): Update.
7276 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7277 * completer.c (location_completer): Update.
7278 * cli/cli-cmds.c (edit_command, list_command): Update.
7279 * breakpoint.c (create_overlay_event_breakpoint)
7280 (create_longjmp_master_breakpoint)
7281 (create_std_terminate_master_breakpoint)
7282 (create_exception_master_breakpoint)
7283 (create_thread_event_breakpoint): Update.
7284 (init_breakpoint_sal): Update. Remove some dead code.
7285 (create_breakpoint_sal): Change type of "location". Update.
7286 (create_breakpoints_sal, create_breakpoint, break_command_1)
7287 (dprintf_command, break_range_command, until_break_command)
7288 (init_ada_exception_breakpoint)
7289 (strace_marker_create_sals_from_location)
7290 (update_static_tracepoint, trace_command, ftrace_command)
7291 (strace_command, create_tracepoint_from_upload): Update.
7292 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7293 * ax-gdb.c (agent_command_1): Update.
7294
7295 2017-04-12 Pedro Alves <palves@redhat.com>
7296
7297 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7298 * configure.tgt: Handle i[34567]86-*-go32* and
7299 i[34567]86-*-msdosdjgpp*.
7300 * i386-tdep.c (i386_svr4_reg_to_regnum):
7301 Make extern.
7302 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7303 i386-go32-tdep.c.
7304 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7305 * i386-go32-tdep.c: New file.
7306 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7307 declarations.
7308
7309 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7310
7311 * aix-thread.c (pd_status2str): Change return type to const char *.
7312
7313 2017-04-12 Pedro Alves <palves@redhat.com>
7314
7315 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7316 calls to set_gdbarch_gnu_triplet_regexp.
7317
7318 2017-04-12 Pedro Alves <palves@redhat.com>
7319
7320 PR gdb/21323
7321 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7322 New enum value.
7323 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7324 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7325 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7326 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7327 * gdbarch.h, gdbarch.c: Regenerate.
7328 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7329 gdbarch_wchar_bit and gdbarch_wchar_signed.
7330 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7331 * arm-tdep.c (arm_gdbarch_init): Likewise.
7332 * avr-tdep.c (avr_gdbarch_init): Likewise.
7333 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7334 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7335 * i386-tdep.c (i386_go32_init_abi): Likewise.
7336 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7337 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7338 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7339 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7340 * sh-tdep.c (sh_gdbarch_init): Likewise.
7341 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7342 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7343 * windows-tdep.c (windows_init_abi): Likewise.
7344 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7345
7346 2017-04-12 Pedro Alves <palves@redhat.com>
7347
7348 PR c++/21323
7349 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7350 cplus_primitive_type_char32_t>: New enum values.
7351 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7352 and cplus_primitive_type_char32_t.
7353 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7354 32, use the archtecture's built-in type for char16_t and char32_t,
7355 respectively. Otherwise, fallback to init_integer_type as before,
7356 but make the type unsigned, and issue a complaint.
7357 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7358
7359 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7360
7361 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7362 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7363
7364 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7365
7366 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7367 'const char *'.
7368
7369 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7370
7371 * common/common-utils.c (free_vector_argv): New function.
7372 * common/common-utils.h: Include <vector>.
7373 (free_vector_argv): New prototype.
7374 * darwin-nat.c (darwin_create_inferior): Rewrite function
7375 prototype in order to constify "exec_file" and accept a
7376 "std::string" for "allargs".
7377 * fork-child.c: Include <vector>.
7378 (breakup_args): Rewrite function, using C++.
7379 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7380 and accept "std::string" for "allargs". Update the code to
7381 calculate "argv" based on "allargs". Update calls to "exec_fun"
7382 and "execvp".
7383 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7384 order to constify "exec_file" and accept a "std::string" for
7385 "allargs".
7386 * go32-nat.c (go32_create_inferior): Likewise.
7387 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7388 * infcmd.c (run_command_1): Constify "exec_file". Use
7389 "std::string" for inferior arguments.
7390 * inferior.h (fork_inferior): Update prototype.
7391 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7392 prototype in order to constify "exec_file" and accept a
7393 "std::string" for "allargs".
7394 * nto-procfs.c (procfs_create_inferior): Likewise.
7395 * procfs.c (procfs_create_inferior): Likewise.
7396 * remote-sim.c (gdbsim_create_inferior): Likewise.
7397 * remote.c (extended_remote_run): Update code to accept
7398 "std::string" as argument.
7399 (extended_remote_create_inferior): Rewrite function prototype in
7400 order to constify "exec_file" and accept a "std::string" for
7401 "allargs".
7402 * rs6000-nat.c (super_create_inferior): Likewise.
7403 (rs6000_create_inferior): Likewise.
7404 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7405 * windows-nat.c (windows_create_inferior): Likewise.
7406
7407 2017-04-11 Pedro Alves <palves@redhat.com>
7408
7409 * thread.c: Fix whitespace throughout.
7410
7411 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7412
7413 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7414
7415 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7416
7417 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7418
7419 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7420
7421 PR gdb/21364
7422 * osdata.c (info_osdata): Check if 'type' is an empty string
7423 instead of NULL.
7424
7425 2017-04-10 Pedro Alves <palves@redhat.com>
7426
7427 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7428 (ptid_to_global_thread_id, in_thread_list)
7429 (do_captured_list_thread_ids, set_resumed, set_running)
7430 (set_executing, set_stop_requested, finish_thread_state)
7431 (validate_registers_access, can_access_registers_ptid)
7432 (print_thread_info_1, switch_to_thread)
7433 (do_restore_current_thread_cleanup)
7434 (make_cleanup_restore_current_thread, thread_command)
7435 (thread_name_command): Use operator== instead of ptid_equal.
7436
7437 2017-04-10 Pedro Alves <palves@redhat.com>
7438
7439 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7440 (current_thread_cleanup_chain): Delete.
7441 (restore_current_thread_cleanup_dtor)
7442 (make_cleanup_restore_current_thread): Remove references to
7443 current_thread_cleanup_chain.
7444
7445 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7446
7447 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7448 REG_UNKNOWN.
7449
7450 2017-04-10 Yao Qi <yao.qi@linaro.org>
7451
7452 PR gdb/19942
7453 * gdbthread.h (thread_info::deletable): New method.
7454 (thread_info::incref): New method.
7455 (thread_info::decref): New method.
7456 (thread_info::refcount): Move it to private.
7457 * infrun.c (save_stop_context): Call inc_refcount.
7458 (release_stop_context_cleanup): Likewise.
7459 * thread.c (set_thread_exited): New function.
7460 (init_thread_list): Delete "tp" only it is deletable, otherwise
7461 call set_thread_exited.
7462 (delete_thread_1): Call set_thread_exited.
7463 (current_thread_cleanup) <inferior_pid>: Remove.
7464 <thread>: New field.
7465 (restore_current_thread_ptid_changed): Removed.
7466 (do_restore_current_thread_cleanup): Adjust.
7467 (restore_current_thread_cleanup_dtor): Don't call
7468 find_thread_ptid.
7469 (set_thread_refcount): Use dec_refcount.
7470 (make_cleanup_restore_current_thread): Adjust.
7471 (thread_apply_all_command): Call inc_refcount.
7472 (_initialize_thread): Don't call
7473 observer_attach_thread_ptid_changed.
7474
7475 2017-04-10 Yao Qi <yao.qi@linaro.org>
7476
7477 * thread.c (delete_thread_1): Hoist code on marking thread as
7478 exited.
7479
7480 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7481
7482 * windows-nat.c (windows_detach): Initialize ptid with
7483 minus_one_ptid.
7484
7485 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7486
7487 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7488
7489 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7490
7491 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7492 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7493 (bfin_pseudo_register_write): Likewise
7494
7495 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7496
7497 * common/ptid.h (struct ptid): Change to...
7498 (class ptid_t): ... this.
7499 <ptid_t>: New constructors.
7500 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7501 matches>: New methods.
7502 <make_null, make_minus_one>: New static methods.
7503 <pid>: Rename to...
7504 <m_pid>: ...this.
7505 <lwp>: Rename to...
7506 <m_lwp>: ...this.
7507 <tid>: Rename to...
7508 <m_tid>: ...this.
7509 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7510 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7511 as references, move comment to class ptid_t.
7512 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7513 ptid_t static methods.
7514 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7515 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7516 Take ptid arguments as references, implement using ptid_t methods.
7517 * unittests/ptid-selftests.c: New file.
7518 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7519 unittests/ptid-selftests.c.
7520 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7521
7522 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7523
7524 * python/python.c (python_run_simple_file): Cast mode literal to
7525 non-const char pointer as expected by PyFile_FromString.
7526
7527 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7528
7529 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7530 minus_one_ptid and null_ptid.
7531
7532 2017-04-05 Pedro Alves <palves@redhat.com>
7533
7534 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7535 * configure: Regenerate.
7536
7537 2017-04-05 Pedro Alves <palves@redhat.com>
7538
7539 * ada-exp.y (yyerror): Constify.
7540 * ada-lang.c (bound_name, get_selections)
7541 (ada_variant_discrim_type)
7542 (ada_variant_discrim_name, ada_value_struct_elt)
7543 (ada_lookup_struct_elt_type, is_unchecked_variant)
7544 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7545 (catch_ada_exception_command_split)
7546 (catch_ada_assert_command_split, catch_assert_command)
7547 (ada_op_name): Constify.
7548 * ada-lang.h (ada_yyerror, get_selections)
7549 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7550 * arc-tdep.c (arc_print_frame_cache): Constify.
7551 * arm-tdep.c (arm_skip_stub): Constify.
7552 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7553 (gen_aggregate_elt_ref): Constify.
7554 * bcache.c (print_bcache_statistics): Constify.
7555 * bcache.h (print_bcache_statistics): Constify.
7556 * break-catch-throw.c (catch_exception_command_1):
7557 * breakpoint.c (struct ep_type_description::description):
7558 Constify.
7559 (add_solib_catchpoint): Constify.
7560 (catch_fork_command_1): Add cast.
7561 (add_catch_command): Constify.
7562 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7563 Constify.
7564 * bsd-uthread.c (bsd_uthread_state): Constify.
7565 * buildsym.c (patch_subfile_names): Constify.
7566 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7567 Constify.
7568 * c-exp.y (yyerror): Constify.
7569 (token::oper): Constify.
7570 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7571 * c-varobj.c (cplus_describe_child): Constify.
7572 * charset.c (find_charset_names): Add cast.
7573 (find_charset_names): Constify array and add const_cast.
7574 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7575 (edit_command): Constify.
7576 * cli/cli-decode.c (lookup_cmd): Constify.
7577 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7578 Constify.
7579 (struct dump_context): Constify.
7580 (add_dump_command, restore_command): Constify.
7581 * cli/cli-script.c (get_command_line): Constify.
7582 * cli/cli-script.h (get_command_line): Constify.
7583 * cli/cli-utils.c (check_for_argument): Constify.
7584 * cli/cli-utils.h (check_for_argument): Constify.
7585 * coff-pe-read.c (struct read_pe_section_data): Constify.
7586 * command.h (lookup_cmd): Constify.
7587 * common/print-utils.c (decimal2str): Constify.
7588 * completer.c (gdb_print_filename): Constify.
7589 * corefile.c (set_gnutarget): Constify.
7590 * cp-name-parser.y (yyerror): Constify.
7591 * cp-valprint.c (cp_print_class_member): Constify.
7592 * cris-tdep.c (cris_register_name, crisv32_register_name):
7593 Constify.
7594 * d-exp.y (yyerror): Constify.
7595 (struct token::oper): Constify.
7596 * d-lang.h (d_yyerror): Constify.
7597 * dbxread.c (struct header_file_location::name): Constify.
7598 (add_old_header_file, add_new_header_file, last_function_name)
7599 (dbx_next_symbol_text, add_bincl_to_list)
7600 (find_corresponding_bincl_psymtab, set_namestring)
7601 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7602 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7603 * defs.h (command_line_input, print_address_symbolic)
7604 (deprecated_readline_begin_hook): Constify.
7605 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7606 Constify.
7607 * event-top.c (handle_line_of_input): Constify and add cast.
7608 * exceptions.c (catch_errors): Constify.
7609 * exceptions.h (catch_errors): Constify.
7610 * expprint.c (print_subexp_standard, op_string, op_name)
7611 (op_name_standard, dump_raw_expression, dump_raw_expression):
7612 * expression.h (op_name, op_string, dump_raw_expression):
7613 Constify.
7614 * f-exp.y (yyerror): Constify.
7615 (struct token::oper): Constify.
7616 (struct f77_boolean_val::name): Constify.
7617 * f-lang.c (f_word_break_characters): Constify.
7618 * f-lang.h (f_yyerror): Constify.
7619 * fork-child.c (fork_inferior): Add cast.
7620 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7621 (new_variant): Constify.
7622 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7623 * gdbarch.c: Regenerate.
7624 * gdbcore.h (set_gnutarget): Constify.
7625 * go-exp.y (yyerror): Constify.
7626 (token::oper): Constify.
7627 * go-lang.h (go_yyerror): Constify.
7628 * go32-nat.c (go32_sysinfo): Constify.
7629 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7630 * guile/scm-cmd.c (cmdscm_function): Constify.
7631 * guile/scm-param.c (pascm_param_value): Constify.
7632 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7633 (h8300sx_register_name): Constify.
7634 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7635 Constify.
7636 * ia64-tdep.c (ia64_register_names): Constify.
7637 * infcmd.c (construct_inferior_arguments): Constify.
7638 (path_command, attach_post_wait): Constify.
7639 * language.c (show_range_command, show_case_command)
7640 (unk_lang_error): Constify.
7641 * language.h (language_defn::la_error)
7642 (language_defn::la_name_of_this): Constify.
7643 * linespec.c (decode_line_2): Constify.
7644 * linux-thread-db.c (thread_db_err_str): Constify.
7645 * lm32-tdep.c (lm32_register_name): Constify.
7646 * m2-exp.y (yyerror): Constify.
7647 * m2-lang.h (m2_yyerror): Constify.
7648 * m32r-tdep.c (m32r_register_names): Constify and make static.
7649 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7650 * m88k-tdep.c (m88k_register_name): Constify.
7651 * macroexp.c (appendmem): Constify.
7652 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7653 (upgrade_type, parse_external, parse_partial_symbols)
7654 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7655 (new_symbol): Constify.
7656 * memattr.c (mem_info_command): Constify.
7657 * mep-tdep.c (register_name_from_keyword): Constify.
7658 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7659 Constify.
7660 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7661 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7662 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7663 cast.
7664 (mi_execute_async_cli_command): Constify.
7665 * mips-tdep.c (mips_register_name): Constify.
7666 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7667 (am33_register_name, am33_2_register_name)
7668 * moxie-tdep.c (moxie_register_names): Constify.
7669 * nat/linux-osdata.c (osdata_type): Constify fields.
7670 * nto-tdep.c (nto_parse_redirection): Constify.
7671 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7672 (lookup_child_selector): Constify.
7673 (objc_methcall::name): Constify.
7674 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7675 (lookup_struct_typedef): Constify.
7676 * objfiles.c (pc_in_section): Constify.
7677 * objfiles.h (pc_in_section): Constify.
7678 * p-exp.y (struct token::oper): Constify.
7679 (yyerror): Constify.
7680 * p-lang.h (pascal_yyerror): Constify.
7681 * parser-defs.h (op_name_standard): Constify.
7682 (op_print::string): Constify.
7683 (exp_descriptor::op_name): Constify.
7684 * printcmd.c (print_address_symbolic): Constify.
7685 * psymtab.c (print_partial_symbols): Constify.
7686 * python/py-breakpoint.c (stop_func): Constify.
7687 (bppy_get_expression): Constify.
7688 * python/py-cmd.c (cmdpy_completer::name): Constify.
7689 (cmdpy_function): Constify.
7690 * python/py-event.c (evpy_add_attribute)
7691 (gdbpy_initialize_event_generic): Constify.
7692 * python/py-event.h (evpy_add_attribute)
7693 (gdbpy_initialize_event_generic): Constify.
7694 * python/py-evts.c (add_new_registry): Constify.
7695 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7696 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7697 * python/py-inferior.c (get_buffer): Add cast.
7698 * python/py-param.c (parm_constant::name): Constify.
7699 * python/py-unwind.c (fprint_frame_id): Constify.
7700 * python/python.c (gdbpy_parameter_value): Constify.
7701 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7702 * remote.c (memory_packet_config::name): Constify.
7703 (show_packet_config_cmd, remote_write_bytes)
7704 (remote_buffer_add_string):
7705 * reverse.c (exec_reverse_once): Constify.
7706 * rs6000-tdep.c (variant::name, variant::description): Constify.
7707 * rust-exp.y (rustyyerror): Constify.
7708 * rust-lang.c (rust_op_name): Constify.
7709 * rust-lang.h (rustyyerror): Constify.
7710 * serial.h (serial_ops::name): Constify.
7711 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7712 (sh_sh3e_register_name, sh_sh2e_register_name)
7713 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7714 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7715 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7716 (sh_sh4al_dsp_register_name): Constify.
7717 * sh64-tdep.c (sh64_register_name): Constify.
7718 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7719 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7720 * stabsread.c (patch_block_stabs, read_type_number)
7721 (ref_map::stabs, ref_add, process_reference)
7722 (symbol_reference_defined, define_symbol, define_symbol)
7723 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7724 (read_one_struct_field, read_struct_fields, read_baseclasses)
7725 (read_tilde_fields, read_struct_type, read_array_type)
7726 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7727 (read_huge_number, read_range_type, read_args, common_block_start)
7728 (find_name_end): Constify.
7729 * stabsread.h (common_block_start, define_symbol)
7730 (process_one_symbol, symbol_reference_defined, ref_add):
7731 * symfile.c (get_section_index, add_symbol_file_command):
7732 * symfile.h (get_section_index): Constify.
7733 * target-descriptions.c (tdesc_type::name): Constify.
7734 (tdesc_free_type): Add cast.
7735 * target.c (find_default_run_target):
7736 (add_deprecated_target_alias, find_default_run_target)
7737 (target_announce_detach): Constify.
7738 (do_option): Constify.
7739 * target.h (add_deprecated_target_alias): Constify.
7740 * thread.c (print_thread_info_1): Constify.
7741 * top.c (deprecated_readline_begin_hook, command_line_input):
7742 Constify.
7743 (init_main): Add casts.
7744 * top.h (handle_line_of_input): Constify.
7745 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7746 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7747 (tfind_command): Rename to ...
7748 (tfind_command_1): ... this and constify.
7749 (tfind_command): New function.
7750 (tfind_end_command, tfind_start_command): Adjust.
7751 (encode_source_string): Constify.
7752 * tracepoint.h (encode_source_string): Constify.
7753 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7754 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7755 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7756 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7757 * tui/tui-win.c (parse_scrolling_args): Constify.
7758 * tui/tui-windata.c (tui_erase_data_content): Constify.
7759 * tui/tui-windata.h (tui_erase_data_content): Constify.
7760 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7761 * tui/tui.c (tui_enable): Add cast.
7762 * utils.c (defaulted_query): Constify.
7763 (init_page_info): Add cast.
7764 (puts_debug, subset_compare): Constify.
7765 * utils.h (subset_compare): Constify.
7766 * varobj.c (varobj_format_string): Constify.
7767 * varobj.h (varobj_format_string): Constify.
7768 * vax-tdep.c (vax_register_name): Constify.
7769 * windows-nat.c (windows_detach): Constify.
7770 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7771 * xml-support.c (gdb_xml_end_element): Constify.
7772 * xml-tdesc.c (tdesc_start_reg): Constify.
7773 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7774 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7775 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7776
7777 2017-04-05 Pedro Alves <palves@redhat.com>
7778
7779 * proc-api.c (struct trans): Constify.
7780 (procfs_note): Constify.
7781 * proc-events.c (struct trans, syscall_table):
7782 * proc-flags.c (struct trans): Constify.
7783 * proc-utils.h (procfs_note): Constify.
7784 * proc-why.c (struct trans): Constify.
7785 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7786 (procfs_detach): Constify.
7787 * sol-thread.c (struct string_map): Constify.
7788 (td_err_string, td_state_string): Constify.
7789
7790 2017-04-05 Pedro Alves <palves@redhat.com>
7791
7792 * proc-api.c (procfs_filename): Don't initialize
7793 procfs_filename.
7794 (prepare_to_trace): Assume procfs_filename is non-NULL.
7795 (_initialize_proc_api): Give procfs_filename a default value here.
7796
7797 2017-04-05 Pedro Alves <palves@redhat.com>
7798
7799 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7800 'cond_string' parameter.
7801 (extract_exception_regexp): Constify 'string' parameter.
7802 (catch_exception_command_1): Constify.
7803 * breakpoint.c (init_catchpoint)
7804 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7805 parameter.
7806 (ep_parse_optional_if_clause, catch_fork_command_1)
7807 (catch_exec_command_1): Constify.
7808 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7809 parameter.
7810 (ep_parse_optional_if_clause): Constify.
7811 * cli/cli-utils.c (remove_trailing_whitespace)
7812 (check_for_argument): Constify.
7813 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7814 non-const overload.
7815 (check_for_argument): Likewise.
7816
7817 2017-04-05 Pedro Alves <palves@redhat.com>
7818
7819 * event-top.c (command_line_handler): Add cast to execute_command
7820 call.
7821 * record-btrace.c (cmd_record_btrace_bts_start)
7822 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7823 (cmd_record_btrace_start): Add cast to execute_command call.
7824 * record-full.c (record_full_goto_insn):
7825 * record.c (record_start, record_stop): Add cast to
7826 execute_command_to_string calls.
7827 (cmd_record_start): Add cast to execute_command calls.
7828
7829 2017-04-05 Pedro Alves <palves@redhat.com>
7830
7831 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7832 static inline function.
7833 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7834 array and use gdb_PyArg_ParseTupleAndKeywords.
7835 * python/py-cmd.c (cmdpy_init): Likewise.
7836 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7837 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7838 (infpy_search_memory): Likewise.
7839 * python/py-objfile.c (objfpy_add_separate_debug_file)
7840 (gdbpy_lookup_objfile): Likewise.
7841 * python/py-symbol.c (gdbpy_lookup_symbol)
7842 (gdbpy_lookup_global_symbol): Likewise.
7843 * python/py-type.c (gdbpy_lookup_type): Likewise.
7844 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7845 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7846 Likewise.
7847
7848 2017-04-05 Pedro Alves <palves@redhat.com>
7849
7850 * python/python-internal.h (gdb_PyGetSetDef): New type.
7851 * python/py-block.c (block_object_getset)
7852 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7853 * python/py-event.c (event_object_getset)
7854 (finish_breakpoint_object_getset): Likewise.
7855 * python/py-inferior.c (inferior_object_getset): Likewise.
7856 * python/py-infthread.c (thread_object_getset): Likewise.
7857 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7858 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7859 * python/py-objfile.c (objfile_getset): Likewise.
7860 * python/py-progspace.c (pspace_getset): Likewise.
7861 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7862 Likewise.
7863 * python/py-record.c (recpy_record_getset): Likewise.
7864 * python/py-symbol.c (symbol_object_getset): Likewise.
7865 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7866 Likewise.
7867 * python/py-type.c (type_object_getset, field_object_getset):
7868 Likewise.
7869 * python/py-value.c (value_object_getset): Likewise.
7870
7871 2017-04-05 Pedro Alves <palves@redhat.com>
7872
7873 * python/python-internal.h (gdb_PyObject_CallMethod)
7874 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7875 New functions.
7876 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7877 (PySys_GetObject, PySys_SetPath): New macros.
7878
7879 2017-04-05 Pedro Alves <palves@redhat.com>
7880
7881 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7882 info_osdata_command.
7883 * osdata.c (info_osdata_command): Rename to ...
7884 (info_osdata): ... this. Constify 'type' parameter, and remove
7885 the 'from_tty' parameter. Accept NULL TYPE.
7886 (info_osdata_command): New function.
7887 * osdata.h (info_osdata_command): Remove declaration.
7888 (info_osdata): New declaration.
7889
7890 2017-04-05 Pedro Alves <palves@redhat.com>
7891
7892 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7893 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7894 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7895 parameter.
7896 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7897 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7898 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7899 parameter.
7900 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7901 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7902 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7903 (mi_cmd_file_list_exec_source_files)
7904 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7905 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7906 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7907 parameter.
7908 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7909 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7910 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7911 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7912 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7913 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7914 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7915 'command' parameter.
7916 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7917 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7918 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7919 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7920 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7921 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7922 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7923 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7924 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7925 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7926 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7927 parameter.
7928 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7929 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7930 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7931 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7932 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7933 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7934 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7935 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7936 (mi_cmd_data_list_changed_registers)
7937 (mi_cmd_data_write_register_values)
7938 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7939 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7940 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7941 (mi_cmd_list_features, mi_cmd_list_target_features)
7942 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7943 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7944 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7945 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7946 (mi_cmd_trace_frame_collected): Constify 'command'
7947 parameter.
7948 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7949 'command' parameter.
7950
7951 2017-04-05 Pedro Alves <palves@redhat.com>
7952
7953 * ada-lang.c (ada_completer_word_break_characters): Now a const
7954 array.
7955 (ada_get_gdb_completer_word_break_characters): Constify.
7956 * completer.c (gdb_completer_command_word_break_characters)
7957 (gdb_completer_file_name_break_characters)
7958 (gdb_completer_quote_characters): Now const arrays.
7959 (get_gdb_completer_quote_characters): Constify.
7960 (set_rl_completer_word_break_characters): New function.
7961 (set_gdb_completion_word_break_characters)
7962 (complete_line_internal): Use it.
7963 * completer.h (get_gdb_completer_quote_characters): Constify.
7964 (set_rl_completer_word_break_characters): Declare.
7965 * f-lang.c (f_word_break_characters): Constify.
7966 * language.c (default_word_break_characters): Constify.
7967 * language.h (language_defn::la_word_break_characters): Constify.
7968 (default_word_break_characters): Constify.
7969 * top.c (init_main): Use set_rl_completer_word_break_characters.
7970
7971 2017-04-05 Pedro Alves <palves@redhat.com>
7972
7973 * aix-thread.c (aix_thread_pid_to_str)
7974 (aix_thread_extra_thread_info): Constify.
7975 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7976 * bsd-uthread.c (bsd_uthread_extra_thread_info)
7977 (bsd_uthread_pid_to_str): Constify.
7978 * corelow.c (core_pid_to_str): Constify.
7979 * darwin-nat.c (darwin_pid_to_str): Constify.
7980 * fbsd-nat.c (fbsd_pid_to_str): Constify.
7981 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7982 Constify.
7983 * gnu-nat.c (gnu_pid_to_str): Constify.
7984 * go32-nat.c (go32_pid_to_str): Constify.
7985 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7986 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7987 * inferior.c (inferior_pid_to_str): Constify.
7988 * linux-nat.c (linux_nat_pid_to_str): Constify.
7989 * linux-tdep.c (linux_core_pid_to_str): Constify.
7990 * linux-thread-db.c (thread_db_pid_to_str)
7991 (thread_db_extra_thread_info): Constify.
7992 * nto-tdep.c (nto_extra_thread_info): Constify.
7993 * nto-tdep.h (nto_extra_thread_info): Constify.
7994 * obsd-nat.c (obsd_pid_to_str): Constify.
7995 * procfs.c (procfs_pid_to_str): Constify.
7996 * ravenscar-thread.c (ravenscar_extra_thread_info)
7997 (ravenscar_pid_to_str): Constify.
7998 * remote-sim.c (gdbsim_pid_to_str): Constify.
7999 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8000 Constify.
8001 * sol-thread.c (solaris_pid_to_str): Constify.
8002 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8003 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8004 * target.c (default_pid_to_str, target_pid_to_str)
8005 (normal_pid_to_str, default_pid_to_str): Constify.
8006 * target.h (target_ops::to_pid_to_str)
8007 (target_ops::to_extra_thread_info): Constify.
8008 (target_pid_to_str, normal_pid_to_str): Constify.
8009 * windows-nat.c (windows_pid_to_str): Constify.
8010 * gdbarch.sh (core_pid_to_str): Constify.
8011 * target-delegates.c: Regenerate.
8012 * gdbarch.h, gdbarch.c: Regenerate.
8013
8014 2017-04-05 Pedro Alves <palves@redhat.com>
8015
8016 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8017 the memory of the temporary warning_pre_print override.
8018 * utils.c (warning_pre_print): Constify.
8019 * utils.h (warning_pre_print): Constify.
8020
8021 2017-04-05 Pedro Alves <palves@redhat.com>
8022
8023 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8024 (shell_command): New function.
8025 (make_command): Use std::string.
8026 (init_cli_cmds): Register shell_command instead of shell_escape.
8027
8028 2017-04-05 Pedro Alves <palves@redhat.com>
8029
8030 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8031 * tracepoint.c (default_collect): Don't initialize.
8032
8033 2017-04-05 Pedro Alves <palves@redhat.com>
8034
8035 * macroexp.c (macro_buffer::shared): Now a bool.
8036 (init_buffer): Update.
8037 (init_shared_buffer): Constify 'addr' parameter.
8038 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8039 casts.
8040
8041 2017-04-05 Pedro Alves <palves@redhat.com>
8042
8043 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8044 * disasm.c (set_disassembler_options): Constify local.
8045 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8046
8047 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8048
8049 PR gdb/21352
8050 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8051 option.
8052
8053 2017-04-05 Yao Qi <yao.qi@linaro.org>
8054
8055 * frame.c (frame_unwind_register_unsigned): Call
8056 frame_unwind_register_value.
8057
8058 2017-04-05 Yao Qi <yao.qi@linaro.org>
8059
8060 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8061 Use gdb_test_multiple, and don't match anchor.
8062
8063 2017-04-05 Pedro Alves <palves@redhat.com>
8064
8065 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8066 (Write After Approval): Remove Simon Marchi.
8067
8068 2017-04-05 Pedro Alves <palves@redhat.com>
8069
8070 * common/gdb_optional.h (optional::optional): Make constexpr and
8071 initialize m_dummy.
8072
8073 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8074
8075 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8076 (amd64fbsd_jmp_buf_reg_offset): Remove.
8077 (amd64fbsd_supply_uthread): Remove function.
8078 (amd64fbsd_collect_uthread): Remove function.
8079 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8080 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8081 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8082 (fbsd-nat.c): Update comment.
8083 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8084 (i386fbsd_jmp_buf_reg_offset): Remove.
8085 (i386fbsd_supply_uthread): Remove function.
8086 (i386fbsd_collect_uthread): Remove function.
8087 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8088
8089 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8090
8091 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8092 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8093 * NEWS: Mention that support for FreeBSD/alpha was removed.
8094 * alpha-fbsd-tdep.c: Delete file.
8095 * config/alpha/fbsd.mh: Delete file.
8096 * configure.host: Delete alpha*-*-freebsd* and
8097 alpha*-*-kfreebsd*-gnu.
8098 * configure.tgt: Delete alpha*-*-freebsd* and
8099 alpha*-*-kfreebsd*-gnu.
8100
8101 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8102
8103 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8104 amd64bsd_store_inferior_registers): Use ptid from regcache.
8105
8106 2017-04-04 Pedro Alves <palves@redhat.com>
8107
8108 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8109 data fields, make them private and add "m_" prefixes.
8110 (lnp_state_machine::lnp_state_machine): New ctor.
8111 (record_line, check_line_address, handle_set_discriminator)
8112 (handle_set_address, handle_advance_pc, handle_special_opcode)
8113 (handle_advance_line, handle_set_file, handle_negate_stmt)
8114 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8115 (end_sequence, advance_line): New methods.
8116 (m_gdbarch, m_record_lines_p): New fields.
8117 (lnp_reader_state): Delete.
8118 (dwarf_record_line): Rename to ...
8119 (lnp_state_machine::record_line): ... adjust.
8120 (init_lnp_state_machine): Delete.
8121 (lnp_state_machine::lnp_state_machine): New.
8122 (check_line_address): Rename to ...
8123 (lnp_state_machine::check_line_address): This.
8124 (dwarf_decode_lines_1): Remove reference to "reader_state".
8125 Adjust lnp_state_machine having a non-default ctor. Use bool.
8126 State machine internal state manipulation moved to
8127 lnp_state_machine methods.
8128
8129 2017-04-04 Pedro Alves <palves@redhat.com>
8130
8131 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8132 unittests/offset-type-selftests.c.
8133 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8134 * common/offset-type.h: New file.
8135 * common/preprocessor.h: New file.
8136 * common/traits.h: New file.
8137 * common/valid-expr.h: New file.
8138 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8139 sect_offset and cu_offset strong typedefs throughout.
8140 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8141 typedefs throughout.
8142 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8143 sect_offset and cu_offset strong typedefs throughout.
8144 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8145 typedefs throughout.
8146 * gdbtypes.h: Include "common/offset-type.h".
8147 (cu_offset): Now an offset type (strong typedef) instead of a
8148 struct.
8149 (sect_offset): Likewise.
8150 (union call_site_parameter_u): Rename "param_offset" field to
8151 "param_cu_off".
8152 * unittests/offset-type-selftests.c: New file.
8153
8154 2017-04-04 Pedro Alves <palves@redhat.com>
8155
8156 * common/underlying.h: New file.
8157 * dwarf2read.c: Include "common/gdb_optional.h" and
8158 "common/underlying.h".
8159 (dir_index, file_name_index): New types.
8160 (file_entry): Use them.
8161 (file_entry::include): Use to_underlying.
8162 (line_header::add_file_name): Use dir_index.
8163 (read_formatted_entries): Use gdb::optional. Read form before
8164 writting to file_entry.
8165 (dwarf_decode_line_header): Use dir_index.
8166 (lnp_state_machine::current_file): Use to_underlying.
8167 (lnp_state_machine::file): Change type to file_name_index.
8168 (dwarf_record_line): Use to_underlying.
8169 (init_lnp_state_machine): Use file_name_index.
8170 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8171
8172 2017-04-04 Pedro Alves <palves@redhat.com>
8173
8174 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8175 operator bool, has_value and get methods.
8176
8177 2017-04-04 Pedro Alves <palves@redhat.com>
8178
8179 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8180 fields.
8181 (line_header): Initialize all data fields. Change type of
8182 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8183 Change type of include_dirs to std::vector<const char *>. Remove
8184 num_include_dirs, include_dirs_size. Change type of file_names to
8185 std::vector<file_entry>. Remove num_file_names, file_names_size.
8186 (line_header::line_header): New.
8187 (line_header::add_include_dir, line_header::add_file_name): New
8188 methods.
8189 (line_header::include_dir_at): Remove NULL check.
8190 (line_header::file_name_at): Add const overload.
8191 (line_header_up): New unique_ptr typedef.
8192 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8193 std::vector. Remove free_line_header call.
8194 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8195 free_line_header call.
8196 (free_cu_line_header): Delete.
8197 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8198 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8199 Adjust to use std::vector.
8200 (free_line_header): Delete.
8201 (free_line_header_voidp): Use delete.
8202 (add_include_dir): Replace with ...
8203 (line_header::add_include_dir): ... this method. Use std::vector.
8204 (add_file_name): Replace with ...
8205 (line_header::add_file_name): ... this method. Use std::vector.
8206 (add_include_dir_stub): Delete.
8207 (read_formatted_entries): Remove memset.
8208 (dwarf_decode_line_header): Return a line_header_up instead of a
8209 raw pointer. Remove cleanup handling. Pass lambdas to
8210 read_formatted_entries. Adjust to use line_header methods.
8211 (dwarf_decode_lines_1): Adjust to use line_header methods.
8212 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8213 use std::vector.
8214
8215 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8216
8217 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8218 instead of struct ptid.
8219
8220 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8221
8222 * frame.c (get_frame_register_bytes): Unwind using value.
8223 (put_frame_register_bytes): Likewise.
8224
8225 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8226
8227 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8228 aggregate-like.
8229
8230 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8231
8232 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8233
8234 2017-03-29 Yao Qi <yao.qi@linaro.org>
8235
8236 * gdbthread.h (struct thread_info): Declare constructor and
8237 destructor. Add some in-class member initializers.
8238 * thread.c (free_thread): Remove.
8239 (init_thread_list): Call delete instead of free_thread.
8240 (new_thread): Call thread_info constructor.
8241 (thread_info::thread_info): New function.
8242 (thread_info::~thread_info): New function.
8243 (delete_thread_1): Call delete instead of free_thread.
8244 (make_cleanup_restore_current_thread): Move tp and frame to
8245 inner block.
8246
8247 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8248
8249 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8250 (arc_skip_prologue): Likewise.
8251 (arc_make_frame_cache): Likewise.
8252 (arc_pv_get_operand): New function.
8253 (arc_is_in_prologue): Likewise.
8254 (arc_analyze_prologue): Likewise.
8255 (arc_print_frame_cache): Likewise.
8256 (MAX_PROLOGUE_LENGTH): New constant.
8257
8258 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8259
8260 * configure.tgt: Add arc-insn.o.
8261 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8262 (dump_arc_instruction_command): New function.
8263 (arc_fprintf_disasm): Likewise.
8264 (arc_disassemble_info): Likewise.
8265 (arc_insn_get_operand_value): Likewise.
8266 (arc_insn_get_operand_value_signed): Likewise.
8267 (arc_insn_get_memory_base_reg): Likewise.
8268 (arc_insn_get_memory_offset): Likewise.
8269 (arc_insn_get_branch_target): Likewise.
8270 (arc_insn_dump): Likewise.
8271 (arc_insn_get_linear_next_pc): Likewise.
8272 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8273 (arc_disassemble_info): Likewise.
8274 (arc_insn_get_branch_target): Likewise.
8275 (arc_insn_get_linear_next_pc): Likewise.
8276 * NEWS: Mention new "maint print arc arc-instruction".
8277
8278 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8279
8280 * arc-tdep (maintenance_print_arc_list): New variable.
8281 (maintenance_print_arc_command): New function.
8282
8283 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8284
8285 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8286 Add "limm" and "reserved".
8287 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8288 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8289 * arc-tdep.h (arc_regnum): Likewise.
8290
8291 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8292
8293 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8294 for THREADPTR register.
8295 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8296 register.
8297 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8298 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8299 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8300
8301 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8302
8303 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8304 registers above gdbarch_num_regs (gdbarch) as privileged in
8305 call0 ABI.
8306
8307 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8308
8309 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8310 for a single specified register or for all registers in
8311 a0_base..a0_base + C0_NREGS range.
8312 (supply_gregset_reg): Call regcache_raw_supply for a single
8313 specified register or for all registers in a0_base..a0_base +
8314 C0_NREGS range.
8315
8316 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8317
8318 * arch/xtensa.h (C0_NREGS): Add definition.
8319 * xtensa-tdep.c (C0_NREGS): Remove definition.
8320
8321 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8322
8323 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8324 Drop xtensa_default_isa initialization.
8325 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8326
8327 2017-03-27 Pedro Alves <palves@redhat.com>
8328
8329 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8330 (file_entry::include_dir): New method.
8331 (line_header::include_dir_at, line_header::file_name_at): New
8332 methods.
8333 (setup_type_unit_groups, setup_type_unit_groups)
8334 (psymtab_include_file_name): Simplify using the new methods.
8335 (lnp_state_machine) <the_line_header>: New field.
8336 <file>: Add comment.
8337 (lnp_state_machine::current_file): New method.
8338 (dwarf_record_line): Simplify using the new methods.
8339 (init_lnp_state_machine): Initialize the "the_line_header" field.
8340 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8341 Simplify using the new methods.
8342
8343 2017-03-27 Pedro Alves <palves@redhat.com>
8344
8345 * cp-name-parser.y (make_empty): Delete.
8346 (demangler_special, nested_name, ptr_operator, array_indicator)
8347 (direct_declarator, declarator_1): Use fill_comp instead of
8348 make_empty.
8349
8350 2017-03-27 Pedro Alves <palves@redhat.com>
8351
8352 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8353 to ATTRIBUTE_PRINTF.
8354 * solib-target.c (library_list_start_list): Print "string" not
8355 "version".
8356 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8357 gdb_xml_error call.
8358
8359 2017-03-27 Pedro Alves <palves@redhat.com>
8360
8361 * dwarf2read.c (struct file_and_directory): New.
8362 (dwarf2_get_dwz_file): Adjust to use std::string.
8363 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8364 (find_file_and_directory): Adjust to return a file_and_directory
8365 object.
8366 (read_file_scope): Adjust to use file_and_directory. Remove
8367 make_cleanup/do_cleanups calls.
8368 (open_and_init_dwp_file): Adjust to use std::string. Remove
8369 make_cleanup/do_cleanups calls.
8370 * python/python.c (do_start_initialization): Adjust to ldirname
8371 returning a std::string.
8372 * utils.c (ldirname): Now returns a std::string.
8373 * utils.h (ldirname): Change return type to std::string.
8374 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8375 returning a std::string.
8376 * xml-tdesc.c (file_read_description_xml): Likewise.
8377
8378 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8379
8380 * regcache.c (regcache_debug_print_register): New function.
8381 * regcache.h (regcache_debug_print_register): New declaration.
8382 * target.c (debug_print_register): Remove.
8383 (target_fetch_registers): Call regcache_debug_print_register.
8384 (target_store_registers): Likewise.
8385
8386 2017-03-24 Pádraig Brady <pbrady@fb.com>
8387
8388 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8389 reference beyond the 'lh->include_dirs' array before accessing to
8390 it.
8391 (psymtab_include_file_name): Likewise.
8392 (dwarf_decode_lines_1): Likewise.
8393 (dwarf_decode_lines): Likewise.
8394 (file_file_name): Likewise.
8395
8396 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8397
8398 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8399 inferior_ptid.
8400 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8401 ps_lsetfpregs): Likewise.
8402 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8403 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8404 ps_lsetfpregs): Likewise.
8405 * target.c (target_fetch_registers, target_store_registers):
8406 Remove asserts.
8407
8408 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8409
8410 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8411
8412 2017-03-23 Yao Qi <yao.qi@linaro.org>
8413
8414 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8415 (_initialize_aarch64_tdep): Register it.
8416 (aarch64_record_load_store): Handle PRFM instruction.
8417 (aarch64_process_record_test): New function.
8418
8419 2017-03-23 Yao Qi <yao.qi@linaro.org>
8420
8421 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8422 indentation.
8423
8424 2017-03-23 Yao Qi <yao.qi@linaro.org>
8425
8426 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8427
8428 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8429
8430 python/python.c (do_start_initialization): Fix memory leak.
8431
8432 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8433
8434 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8435 using get_ptrace_pid.
8436 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8437 inferior_ptid.
8438 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8439 inferior_ptid instead of pid.
8440
8441 2017-03-22 Yao Qi <yao.qi@linaro.org>
8442
8443 * aarch64-tdep.c: Wrap locally used classes in anonymous
8444 namespace.
8445 * arm-tdep.c: Likewise.
8446 * linespec.c: Likewise.
8447 * ui-out.c: Likewise.
8448
8449 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8450
8451 PR gdb/19637
8452 * python/lib/gdb/printer/bound_registers.py: Import sys.
8453
8454 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8455
8456 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8457 windows_thread_info parameter and use it instead of
8458 current_thread.
8459 (windows_fetch_inferior_registers): Don't set current_thread,
8460 pass the thread to do_windows_fetch_inferior_registers. Use
8461 ptid from regcache instead of inferior_ptid.
8462 (do_windows_store_inferior_registers): Add windows_thread_info
8463 parameter and use it instead of current_thread.
8464 (windows_store_inferior_registers): Don't set current_thread,
8465 pass the thread to do_windows_store_inferior_registers. Use
8466 ptid from regcache instead of inferior_ptid.
8467
8468 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8469
8470 * ser-mingw.c (ser_windows_raw): Remove reference to
8471 struct serial::current_timeout.
8472
8473 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8474
8475 PR tdep/20928
8476 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8477 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8478 (sparc64_fsr_type): Fix %fsr decoding.
8479
8480 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8481
8482 * python/py-record-btrace.c (btpy_insn_data): Change return type
8483 for Python 2.
8484
8485 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8486
8487 * spu-linux-nat.c (spu_fetch_inferior_registers,
8488 spu_store_inferior_registers): Use ptid from regcache, set and
8489 restore inferior_ptid.
8490 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8491 Likewise.
8492
8493 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8494
8495 * i386-linux-nat.c (fetch_register, store_register,
8496 i386_linux_fetch_inferior_registers,
8497 i386_linux_store_inferior_registers): Use ptid from regcache.
8498 * ia64-linux-nat.c (ia64_linux_fetch_register,
8499 ia64_linux_store_register): Likewise.
8500 * inf-ptrace.c (inf_ptrace_fetch_register,
8501 inf_ptrace_store_register): Likewise.
8502 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8503 m32r_linux_store_inferior_registers): Likewise.
8504 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8505 m68kbsd_store_inferior_registers): Likewise.
8506 * m68k-linux-nat.c (fetch_register, store_register,
8507 m68k_linux_fetch_inferior_registers,
8508 m68k_linux_store_inferior_registers): Likewise.
8509 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8510 m88kbsd_store_inferior_registers): Likewise.
8511 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8512 mips_fbsd_store_inferior_registers): Likewise.
8513 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8514 mips64_linux_regsets_store_registers): Likewise.
8515 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8516 mipsnbsd_store_inferior_registers): Likewise.
8517 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8518 mips64obsd_store_inferior_registers): Likewise.
8519 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8520 Likewise.
8521 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8522 ppcfbsd_store_inferior_registers): Likewise.
8523 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8524 ppc_linux_store_inferior_registers): Likewise.
8525 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8526 ppcnbsd_store_inferior_registers): Likewise.
8527 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8528 ppcobsd_store_registers): Likewise.
8529 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8530 Likewise.
8531 * ravenscar-thread.c (ravenscar_fetch_registers,
8532 ravenscar_store_registers, ravenscar_prepare_to_store):
8533 Likewise.
8534 * record-btrace.c (record_btrace_fetch_registers,
8535 record_btrace_store_registers, record_btrace_prepare_to_store):
8536 Likewise.
8537 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8538 Lookup inferior using ptid from regcache, instead of
8539 current_inferior.
8540 * remote.c (remote_fetch_registers, remote_store_registers): Use
8541 ptid from regcache.
8542 * rs6000-nat.c (fetch_register, store_register): Likewise.
8543 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8544 s390_linux_store_inferior_registers): Likewise.
8545 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8546 shnbsd_store_inferior_registers): Likewise.
8547 * sol-thread.c (sol_thread_fetch_registers,
8548 sol_thread_store_registers): Likewise.
8549 * sparc-nat.c (sparc_fetch_inferior_registers,
8550 sparc_store_inferior_registers): Likewise.
8551 * tilegx-linux-nat.c (fetch_inferior_registers,
8552 store_inferior_registers): Likewise.
8553 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8554 vaxbsd_store_inferior_registers): Likewise.
8555 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8556 store_xtregs): Likewise.
8557
8558 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8559
8560 PR gdb/14441
8561 * NEWS: Mention support for rvalue references in GDB and python.
8562 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8563 supports both lvalue and rvalue references.
8564
8565 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8566
8567 PR gdb/14441
8568 * gdbtypes.c (rank_one_type): Implement overloading
8569 resolution rules regarding rvalue references.
8570
8571 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8572
8573 PR gdb/14441
8574 * aarch64-tdep.c (aarch64_type_align)
8575 (aarch64_extract_return_value, aarch64_store_return_value): Change
8576 lvalue reference type checks to general reference type checks.
8577 * amd64-tdep.c (amd64_classify): Likewise.
8578 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8579 Likewise.
8580 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8581 (arm_store_return_value): Likewise.
8582 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8583 * c-typeprint.c (c_print_type): Likewise.
8584 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8585 (cplus_number_of_children, cplus_describe_child): Likewise.
8586 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8587 * completer.c (expression_completer): Likewise.
8588 * cp-support.c (make_symbol_overload_list_adl_namespace):
8589 Likewise.
8590 * darwin-nat-info.c (info_mach_region_command): Likewise.
8591 * dwarf2loc.c (entry_data_value_coerce_ref)
8592 (value_of_dwarf_reg_entry): Likewise.
8593 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8594 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8595 Likewise.
8596 * findvar.c (extract_typed_address, store_typed_address):
8597 Likewise.
8598 * gdbtypes.c (rank_one_type): Likewise.
8599 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8600 * infcall.c (value_arg_coerce): Likewise.
8601 * language.c (pointer_type): Likewise.
8602 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8603 Likewise.
8604 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8605 * mn10300-tdep.c (mn10300_type_align): Likewise.
8606 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8607 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8608 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8609 Likewise.
8610 * printcmd.c (print_formatted, x_command): Likewise.
8611 * python/py-type.c (typy_get_composite, typy_template_argument):
8612 Likewise.
8613 * python/py-value.c (valpy_referenced_value)
8614 (valpy_get_dynamic_type, value_has_field): Likewise.
8615 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8616 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8617 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8618 * spu-tdep.c (spu_scalar_value_p): Likewise.
8619 * symtab.c (lookup_symbol_aux): Likewise.
8620 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8621 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8622 Likewise.
8623 * valops.c (value_cast_pointers, value_cast)
8624 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8625 (value_struct_elt, value_struct_elt_bitpos)
8626 (value_find_oload_method_list, find_overload_match)
8627 (value_rtti_indirect_type): Likewise.
8628 * valprint.c (val_print_scalar_type_p, generic_val_print):
8629 Likewise.
8630 * value.c (value_actual_type, value_as_address, unpack_long)
8631 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8632 (coerce_ref): Likewise.
8633 * varobj.c (varobj_get_value_type): Likewise.
8634
8635 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8636
8637 PR gdb/14441
8638 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8639 table of constants.
8640 * python/lib/gdb/command/explore.py: Support exploring values
8641 of rvalue reference types.
8642 * python/lib/gdb/types.py: Implement get_basic_type() for
8643 rvalue reference types.
8644 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8645 constant.
8646 * python/py-value.c (valpy_getitem): Add an rvalue reference
8647 check.
8648 (valpy_reference_value): Add new parameter "refcode".
8649 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8650 New wrappers for valpy_reference_value().
8651 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8652 (gdbpy_invoke_xmethod): Likewise.
8653
8654 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8655
8656 PR gdb/14441
8657 * dwarf2read.c (process_die, read_type_die_1): Handle the
8658 DW_TAG_rvalue_reference_type DIE.
8659 (read_tag_reference_type): Add new parameter "refcode".
8660
8661 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8662
8663 PR gdb/14441
8664 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8665 (c_type_print_modifier, c_type_print_varspec_suffix)
8666 (c_type_print_base): Support printing rvalue reference types.
8667 * c-valprint.c (c_val_print, c_value_print): Support printing
8668 rvalue reference values.
8669
8670 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8671
8672 PR gdb/14441
8673 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8674 typename.
8675 * cp-support.c (replace_typedefs): Handle
8676 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8677 * python/py-type.c (typy_lookup_type): Likewise.
8678
8679 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8680
8681 PR gdb/14441
8682 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8683 * parse.c (insert_type): Change assert statement.
8684 (follow_types): Handle rvalue reference types.
8685 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8686 constant.
8687
8688 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8689
8690 PR gdb/14441
8691 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8692 value_ref() interface.
8693 * c-valprint.c (c_value_print): Likewise.
8694 * infcall.c (value_arg_coerce): Likewise.
8695 * python/py-value.c (valpy_reference_value): Likewise.
8696 * valops.c (value_cast, value_reinterpret_cast)
8697 (value_dynamic_cast, typecmp): Likewise.
8698 (value_ref): Parameterize by kind of return value reference type.
8699 * value.h (value_ref): Add new parameter "refcode".
8700
8701 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8702
8703 PR gdb/14441
8704 * dwarf2read.c (read_tag_reference_type): Use
8705 lookup_lvalue_reference_type() instead of lookup_reference_type().
8706 * eval.c (evaluate_subexp_standard): Likewise.
8707 * f-exp.y: Likewise.
8708 * gdbtypes.c (make_reference_type, lookup_reference_type):
8709 Generalize with rvalue reference types.
8710 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8711 convenience wrappers for lookup_reference_type().
8712 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8713 reference kind parameter.
8714 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8715 wrappers for lookup_reference_type().
8716 * guile/scm-type.c (gdbscm_type_reference): Use
8717 lookup_lvalue_reference_type() instead of lookup_reference_type().
8718 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8719 * parse.c (follow_types): Likewise.
8720 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8721 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8722 Likewise.
8723 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8724 (gdbpy_invoke_xmethod): Likewise.
8725 * stabsread.c: Provide extra argument to make_reference_type()
8726 call.
8727 * valops.c (value_ref, value_rtti_indirect_type): Use
8728 lookup_lvalue_reference_type() instead of lookup_reference_type().
8729
8730 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8731
8732 PR gdb/14441
8733 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8734 (TYPE_IS_REFERENCE): New macro.
8735 (struct type): Add rvalue_reference_type field.
8736 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8737
8738 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8739
8740 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8741 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8742 New function definition.
8743 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8744 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8745 New function declaration.
8746 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8747 * mi/mi-interp.h: New file.
8748 * solib.c (info_sharedlibrary_command): Replace for loop with
8749 ALL_SO_LIBS macro
8750 * solib.h (update_solib_list): New function declaration.
8751 (so_list_head): Move macro.
8752 * solist.h (ALL_SO_LIBS): New macro.
8753
8754 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8755
8756 * infcmd.c (post_create_inferior): Remove unused argument in
8757 call to solib_add.
8758 * remote.c (remote_start_remote): Likewise.
8759 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8760 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8761 (enable_break): Likewise.
8762 * solib.c (update_solib_list): Remove unused target argument
8763 and its documentation.
8764 (solib_add): Remove unused target argument. Remove unused
8765 argument in call to update_solib_list.
8766 (info_sharedlibrary_command): Remove unused argument in call
8767 to update_solib_list.
8768 (sharedlibrary_command): Remove unused argument in call to
8769 solib_add.
8770 (handle_solib_event): Likewise.
8771 (reload_shared_libraries): Likewise.
8772 * solib.h (solib_add): Remove unused target argument.
8773
8774 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8775
8776 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8777 (s390_displaced_step_fixup): Cover relative branches with the
8778 default fixup handling. This fixes lack of support for some
8779 relative branch instructions.
8780
8781 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8782
8783 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8784 ptid from regcache.
8785
8786 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8787
8788 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8789 i386_darwin_store_inferior_registers): Use ptid from regcache.
8790
8791 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8792
8793 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8794 i386bsd_store_inferior_registers): Use ptid from regcache.
8795
8796 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8797
8798 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8799 hppaobsd_store_registers): Use ptid from regcache.
8800
8801 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8802
8803 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8804 hppanbsd_store_registers): Use ptid from regcache.
8805
8806 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8807
8808 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8809 from regcache. Use get_ptrace_pid.
8810
8811 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8812
8813 * corelow.c (get_core_register_section): Use ptid from regcache,
8814 update doc.
8815
8816 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8817
8818 * bsd-uthread.c (bsd_uthread_fetch_registers,
8819 bsd_uthread_store_registers): Use ptid from regcache, set and
8820 restore inferior_ptid.
8821
8822 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8823
8824 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8825 fetch_fp_regs, store_register, store_regs, store_fp_register,
8826 store_fp_regs): Use ptid from regcache.
8827
8828 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8829
8830 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8831 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8832 store_vfp_regs): Use ptid from regcache.
8833
8834 2017-03-17 Pedro Alves <palves@redhat.com>
8835
8836 PR remote/21188
8837 * ser-base.c (ser_base_wait_for): Add comment.
8838 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8839 version.
8840 * ser-unix.c (hardwire_raw): Remove reference to
8841 scb->current_timeout.
8842 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8843 (hardwire_ops): Install ser_base_readchar instead of
8844 hardwire_readchar.
8845 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8846 Remove fields.
8847
8848 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
8849
8850 PR gdb/19637
8851 * python/lib/gdb/printer/bound_registers.py: Add support for
8852 Python 3.
8853
8854 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8855
8856 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8857 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8858 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8859 byte_offset to subobj_byte_offset. Fix the handling of
8860 DWARF_VALUE_STACK on big-endian targets when coming via an
8861 implicit pointer.
8862 (dwarf2_evaluate_loc_desc): Adjust call to
8863 dwarf2_evaluate_loc_desc_full.
8864 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8865 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8866
8867 2017-03-16 Yao Qi <yao.qi@linaro.org>
8868
8869 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8870 and REVSH instructions.
8871
8872 2017-03-16 Yao Qi <yao.qi@linaro.org>
8873
8874 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8875 (arm_record_test): Declare.
8876 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8877 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8878 align with the manual.
8879 (thumb_record_misc): Adjust the code order to align with the
8880 manual.
8881 (thumb2_record_decode_insn_handler): Fix instruction matching.
8882 (instruction_reader_thumb): New class.
8883 (arm_record_test): New function.
8884
8885 2017-03-16 Yao Qi <yao.qi@linaro.org>
8886
8887 * arm-tdep.c (abstract_memory_reader): New class.
8888 (instruction_reader): New class.
8889 (extract_arm_insn): Add argument 'reader'. Callers updated.
8890 (decode_insn): Likewise.
8891
8892 2017-03-16 Doug Evans <dje@google.com>
8893
8894 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8895 member. Change type of TYPE member to SCM. All uses updated.
8896 (lsscm_make_lazy_string_smob): Add assert.
8897 (lsscm_make_lazy_string): Flag bad length values.
8898 (lsscm_elt_type): New function.
8899 (gdbscm_lazy_string_to_value): Rewrite to use
8900 lsscm_safe_lazy_string_to_value.
8901 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8902 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8903 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8904 in incoming type.
8905 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8906 * guile/scm-type.c (tyscm_scm_to_type): New function.
8907
8908 2017-03-15 Doug Evans <dje@google.com>
8909
8910 PR python/17728, python/18439, python/18779
8911 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8912 member. Change type of TYPE member to PyObject *. All uses updated.
8913 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8914 (gdbpy_create_lazy_string_object): Flag bad length values.
8915 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8916 Handle typedefs in incoming type.
8917 (stpy_lazy_string_elt_type): New function.
8918 (gdbpy_extract_lazy_string): Call it.
8919 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8920 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8921 typedefs in incoming type.
8922
8923 2017-03-16 Doug Evans <dje@google.com>
8924
8925 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8926 * guile/scm-type.c (tyscm_scm_to_type): New function.
8927
8928 2017-03-16 Jiong Wang <jiong.wang@arm.com>
8929
8930 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8931 "ULONGEST" for "skip".
8932
8933 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8934
8935 PR gdb/21220
8936 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8937 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8938 (inf_ptrace_peek_poke): ...here. New function. Now also loop
8939 over ptrace peek/poke until end of buffer or error.
8940
8941 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
8942
8943 * parse.c (length_of_subexp): Make static.
8944 * parser-defs.h (length_of_subexp): Remove.
8945
8946 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8947
8948 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8949 as well.
8950
8951 2017-03-14 Pedro Alves <palves@redhat.com>
8952
8953 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8954 (main): Use std::unique_ptr. Remove calls to
8955 cp_demangled_name_parse_free.
8956
8957 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8958
8959 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8960 alphabsd_store_inferior_registers): Use regcache->ptid instead
8961 of inferior_ptid.
8962
8963 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8964
8965 * aix-thread.c (aix_thread_fetch_registers,
8966 aix_thread_store_registers): Use regcache->ptid instead of
8967 inferior_ptid.
8968
8969 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8970
8971 * aarch64-linux-nat.c (fetch_gregs_from_thread,
8972 store_gregs_to_thread, fetch_fpregs_from_thread,
8973 store_fpregs_to_thread): Use regcache->ptid instead of
8974 inferior_ptid.
8975
8976 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8977
8978 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8979 amd64_linux_fetch_inferior_registers): Use regcache->ptid
8980 instead of inferior_ptid.
8981
8982 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8983
8984 * target.c (target_fetch_registers, target_store_registers): Add
8985 assert.
8986
8987 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8988
8989 * regcache.h (regcache_get_ptid): New function.
8990 * regcache.c (regcache_get_ptid): New function.
8991
8992 2017-03-13 Mark Wielaard <mark@klomp.org>
8993
8994 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8995
8996 2017-03-10 Keith Seitz <keiths@redhat.com>
8997
8998 PR c++/8218
8999 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9000
9001 2017-03-08 Pedro Alves <palves@redhat.com>
9002
9003 PR gdb/18360
9004 * infrun.c (start_step_over, do_target_resume, resume)
9005 (restart_threads): Assert we're not resuming a thread that is
9006 meant to be stopped.
9007 (infrun_thread_stop_requested_callback): Delete.
9008 (infrun_thread_stop_requested): If the thread is internally
9009 stopped, queue a pending stop event and clear the thread's
9010 inline-frame state.
9011 (handle_stop_requested): New function.
9012 (handle_syscall_event, handle_inferior_event_1): Use
9013 handle_stop_requested.
9014 (handle_stop_requested): New function.
9015 (handle_signal_stop): Set the thread's stop_signal here instead of
9016 at caller.
9017 (finish_step_over): Clear step over info unconditionally.
9018 (handle_signal_stop): If the user had interrupted the event
9019 thread, consider the stop a random signal.
9020 (handle_signal_stop) <signal arrived while stepping over
9021 breakpoint>: Don't restart threads here.
9022 (stop_waiting): Don't clear step-over info here.
9023
9024 2017-03-08 Pedro Alves <palves@redhat.com>
9025
9026 PR 21206
9027 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9028 goes to argument 2, not 1.
9029
9030 2017-03-08 Pedro Alves <palves@redhat.com>
9031
9032 PR cli/21218
9033 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9034 display_gdb_prompt.
9035 (command_line_input): Add comment.
9036
9037 2017-03-08 Pedro Alves <palves@redhat.com>
9038
9039 PR tui/21216
9040 * tui/tui-file.c (tui_file::write): New.
9041 * tui/tui-file.h (tui_file): Override "write".
9042 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9043 factored out from ...
9044 (tui_puts): ... here.
9045 (tui_putc): Use them.
9046 (tui_write): New function.
9047 * tui/tui-io.h (tui_write): Declare.
9048
9049 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9050
9051 * Makefile.in (SFILES): Replace "environ.c" with
9052 "common/environ.c".
9053 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9054 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9055 to...
9056 * common/environ.c: ... here.
9057 * environ.h: Moved to...
9058 * common/environ.h: ... here.
9059
9060 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9061
9062 * gdbarch.sh (pstring_ptr): New static function.
9063 (gdbarch_disassembler_options): Use it.
9064 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9065 not valid_disassembler_option->name.
9066 * gdbarch.c: Regenerate.
9067
9068 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9069
9070 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9071
9072 2017-03-07 Pedro Alves <palves@redhat.com>
9073
9074 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9075
9076 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9077
9078 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9079 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9080 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9081 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9082
9083 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9084
9085 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9086
9087 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9088
9089 * remote.c (remote_add_target_side_commands): Use range-based
9090 for loop.
9091
9092 2017-03-03 Yao Qi <yao.qi@linaro.org>
9093
9094 PR gdb/21165
9095 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9096 value is lazy.
9097 * valprint.c (common_val_print): Likewise.
9098
9099 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9100
9101 * NEWS: Mention new set/show disassembler-options commands.
9102 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9103 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9104 (prospective_options): New static variable.
9105 (gdb_disassembler::gdb_disassembler): Initialize
9106 m_di.disassembler_options.
9107 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9108 (get_disassembler_options): New function.
9109 (set_disassembler_options): Likewise.
9110 (set_disassembler_options_sfunc): Likewise.
9111 (show_disassembler_options_sfunc): Likewise.
9112 (disassembler_options_completer): Likewise.
9113 (_initialize_disasm): Likewise.
9114 * disasm.h (get_disassembler_options): New prototype.
9115 (set_disassembler_options): Likewise.
9116 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9117 (gdbarch_verify_disassembler_options): Likewise.
9118 * gdbarch.c: Regenerate.
9119 * gdbarch.h: Likewise.
9120 * arm-tdep.c (num_disassembly_options): Delete.
9121 (set_disassembly_style): Likewise.
9122 (arm_disassembler_options): New static variable.
9123 (set_disassembly_style_sfunc): Convert short style name into long
9124 option name. Call set_disassembler_options.
9125 (show_disassembly_style_sfunc): New function.
9126 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9127 set_gdbarch_verify_disassembler_options.
9128 (_initialize_arm_tdep): Delete regnames variable and update callers.
9129 (arm_disassembler_options): Initialize.
9130 (disasm_options): New variable.
9131 (num_disassembly_options): Rename from this...
9132 (num_disassembly_styles): ...to this. Compute by scanning through
9133 disasm_options.
9134 (valid_disassembly_styles): Initialize using disasm_options.
9135 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9136 set_arm_regname_option.
9137 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9138 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9139 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9140 set_gdbarch_verify_disassembler_options.
9141 * s390-tdep.c (s390_disassembler_options): New static variable.
9142 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9143 set_gdbarch_verify_disassembler_options.
9144
9145 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9146
9147 * remote.c (remote_add_target_side_condition): Remove "struct"
9148 keyword from range-based for loop.
9149
9150 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9151
9152 * remote.c (remote_add_target_side_condition): Use range-based
9153 for loop. Update comment.
9154
9155 2017-02-27 Yao Qi <yao.qi@linaro.org>
9156
9157 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9158
9159 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9160
9161 * regcache.c (regcache_raw_update): New function.
9162 (regcache_raw_read): Move code to regcache_raw_update.
9163 * regcache.h (regcache_raw_update): New declaration.
9164 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9165
9166 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9167
9168 * dwarf2read.c (create_debug_type_hash_table): Initialize
9169 header.signature and header.type_offset_in_tu.
9170
9171 2017-02-24 Pedro Alves <palves@redhat.com>
9172
9173 * symtab.c (make_file_symbol_completion_list_1): Use
9174 add_symtab_completions.
9175
9176 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9177
9178 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9179
9180 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9181
9182 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9183 I386_MAX_REGISTER_SIZE.
9184 (i386_pseudo_register_write): Likewise.
9185 (i386_process_record): Likewise.
9186 * i387-tdep.c (i387_supply_xsave): Likewise.
9187 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9188 (store_register): Likewise.
9189
9190 2017-02-23 Pedro Alves <palves@redhat.com>
9191
9192 * ada-lang.c: Include "common/function-view.h".
9193 (ada_iterate_over_symbols): Adjust to use function_view as
9194 callback type.
9195 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9196 (ada_make_symbol_completion_list): Use a lambda.
9197 (ada_exc_search_name_matches): Delete.
9198 (name_matches_regex): New.
9199 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9200 * compile/compile-c-support.c: Include "common/function-view.h".
9201 (print_one_macro): Change prototype to accept a ui_file pointer.
9202 (write_macro_definitions): Use a lambda.
9203 * dwarf2read.c: Include "common/function-view.h".
9204 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9205 (dw2_expand_symtabs_matching): Adjust to use function_view as
9206 callback type.
9207 * language.h: Include "common/function-view.h".
9208 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9209 function_view as callback type.
9210 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9211 * linespec.c: Include "common/function-view.h".
9212 (collect_info::add_symbol): New method.
9213 (struct symbol_and_data_callback, iterate_inline_only, struct
9214 symbol_matcher_data, iterate_name_matcher): Delete.
9215 (iterate_over_all_matching_symtabs): Adjust to use function_view
9216 as callback type and lambdas.
9217 (iterate_over_file_blocks): Adjust to use function_view as
9218 callback type.
9219 (decode_compound_collector): Now a class with private fields.
9220 (decode_compound_collector::release_symbols): New method.
9221 (collect_one_symbol): Rename to...
9222 (decode_compound_collector::operator()): ... this and adjust.
9223 (lookup_prefix_sym): decode_compound_collector construction bits
9224 move to decode_compound_collector ctor. Pass the
9225 decode_compound_collector object directly as callback. Remove
9226 cleanups and use decode_compound_collector::release_symbols
9227 instead.
9228 (symtab_collector): Now a class with private fields.
9229 (symtab_collector::release_symtabs): New method.
9230 (add_symtabs_to_list): Rename to...
9231 (symtab_collector::operator()): ... this and adjust.
9232 (collect_symtabs_from_filename): symtab_collector construction
9233 bits move to symtab_collector ctor. Pass the symtab_collector
9234 object directly as callback. Remove cleanups and use
9235 symtab_collector::release_symtabs instead.
9236 (collect_symbols): Delete.
9237 (add_matching_symbols_to_info): Use lambdas.
9238 * macrocmd.c (print_macro_callback): Delete.
9239 (info_macro_command): Use a lambda.
9240 (info_macros_command): Pass print_macro_definition as callable
9241 directly.
9242 (print_one_macro): Remove 'ignore' parameter.
9243 (macro_list_command): Adjust.
9244 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9245 (macro_for_each_data::user_data): Delete field.
9246 (foreach_macro): Adjust to call the function_view.
9247 (macro_for_each): Adjust to use function_view as callback type.
9248 (foreach_macro_in_scope): Adjust to call the function_view.
9249 (macro_for_each_in_scope): Adjust to use function_view as callback
9250 type.
9251 * macrotab.h: Include "common/function-view.h".
9252 (macro_callback_fn): Declare a prototype instead of a pointer.
9253 Remove "user_data" parameter.
9254 (macro_for_each, macro_for_each_in_scope): Adjust to use
9255 function_view as callback type.
9256 * psymtab.c (partial_map_expand_apply)
9257 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9258 Adjust to use function_view as callback type and to return bool.
9259 (psym_expand_symtabs_matching): Adjust to use function_view as
9260 callback types.
9261 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9262 to use function_view as callback type and to return bool.
9263 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9264 callback types.
9265 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9266 as callback types.
9267 * symfile.h: Include "common/function-view.h".
9268 (expand_symtabs_file_matcher_ftype)
9269 (expand_symtabs_symbol_matcher_ftype)
9270 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9271 return bool.
9272 (quick_symbol_functions::map_symtabs_matching_filename)
9273 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9274 function_view as callback type and return bool.
9275 (expand_symtabs_matching): Adjust to use function_view as callback
9276 type.
9277 (maintenance_expand_name_matcher)
9278 (maintenance_expand_file_matcher): Delete.
9279 (maintenance_expand_symtabs): Use lambdas.
9280 * symtab.c (iterate_over_some_symtabs): Adjust to use
9281 function_view as callback types and return bool.
9282 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9283 of a cleanup.
9284 (lookup_symtab_callback): Delete.
9285 (lookup_symtab): Use a lambda.
9286 (iterate_over_symbols): Adjust to use function_view as callback
9287 type.
9288 (struct search_symbols_data, search_symbols_file_matches)
9289 (search_symbols_name_matches): Delete.
9290 (search_symbols): Use a pair of lambdas.
9291 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9292 (symtab_expansion_callback): Delete.
9293 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9294 * symtab.h: Include "common/function-view.h".
9295 (iterate_over_some_symtabs): Adjust to use function_view as
9296 callback type and return bool.
9297 (iterate_over_symtabs): Adjust to use function_view as callback
9298 type.
9299 (symbol_found_callback_ftype): Remove 'data' parameter and return
9300 bool.
9301 (iterate_over_symbols): Adjust to use function_view as callback
9302 type.
9303
9304 2017-02-23 Pedro Alves <palves@redhat.com>
9305
9306 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9307 (%.o) <unittests/%.c>: New pattern.
9308 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9309 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9310 * common/function-view.h: New file.
9311 * unittests/function-view-selftests.c: New file.
9312 * configure: Regenerate.
9313
9314 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9315
9316 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9317 inferior_ptid.
9318 * go32-nat.c (go32_thread_alive): Likewise.
9319
9320 2017-02-23 Yao Qi <yao.qi@linaro.org>
9321
9322 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9323 delete.
9324
9325 2017-02-23 Yao Qi <yao.qi@linaro.org>
9326
9327 * varobj.c (varobj_clear_saved_item): Use delete instead of
9328 xfree.
9329 (update_dynamic_varobj_children): Likewise.
9330
9331 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9332
9333 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9334
9335 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9336
9337 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9338 m_enum_value to 0 in default constructor.
9339
9340 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9341
9342 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9343 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9344 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9345 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9346 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9347 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9348 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9349 IS_STORE_CONDITIONAL_INSN.
9350
9351 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9352
9353 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9354
9355 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9356
9357 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9358
9359 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9360
9361 * dwarf2read.c (skip_one_die, read_attribute_value)
9362 (dwarf2_const_value_attr, dump_die_shallow)
9363 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9364 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9365
9366 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9367
9368 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9369 (dwarf_parse_macro_header): Accept DWARF version 5.
9370 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9371
9372 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9373
9374 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9375 DW_AT_GNU_*.
9376 * common/common-exceptions.h (enum errors): Likewise.
9377 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9378 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9379 (dwarf_expr_context::execute_stack_op): Likewise.
9380 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9381 Likewise.
9382 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9383 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9384 (show_entry_values_debug, call_site_to_target_addr)
9385 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9386 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9387 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9388 (value_of_dwarf_block_entry, indirect_pieced_value)
9389 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9390 (disassemble_dwarf_expression): Likewise.
9391 * dwarf2read.c (process_die, inherit_abstract_dies)
9392 (read_call_site_scope): Likewise.
9393 * gdbtypes.h (struct func_type, struct call_site_parameter)
9394 (struct call_site): Likewise.
9395 * stack.c (read_frame_arg): Likewise.
9396 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9397
9398 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9399
9400 * defs.h (read_unsigned_leb128): New declaration.
9401 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9402 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9403 (dwarf2_find_location_expression): Call also
9404 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9405 * dwarf2loc.h (dwarf2_version): New declaration.
9406 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9407 rnglists.
9408 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9409 .debug_rnglists.
9410 (struct dwop_section_names): Add loclists_dwo.
9411 (dwop_section_names): Add .debug_loclists.dwo.
9412 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9413 (struct dwarf2_per_cu_data): Add dwarf_version.
9414 (struct dwo_sections): Add loclists.
9415 (struct attr_abbrev): Add implicit_const.
9416 (read_indirect_line_string): New declaration.
9417 (read_unsigned_leb128): Delete declaration.
9418 (rcuh_kind): New definition.
9419 (read_and_check_comp_unit_head): Change parameter
9420 is_debug_types_section to section_kind.
9421 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9422 (read_comp_unit_head): Change parameter abfd to section, add parameter
9423 section_kind. Handle DWARF-5.
9424 (error_check_comp_unit_head): Accept also DWARF version 5.
9425 (read_and_check_comp_unit_head): Change parameter
9426 is_debug_types_section to section_kind.
9427 (read_and_check_type_unit_head): Delete function.
9428 (read_abbrev_offset): Handle DWARF-5.
9429 (create_debug_type_hash_table): Add parameter section_kind. Process
9430 only DW_UT_type. Use signature and type_offset_in_tu from struct
9431 comp_unit_head.
9432 (create_debug_types_hash_table): Update create_debug_type_hash_table
9433 caller.
9434 (create_all_type_units): Call create_debug_type_hash_table.
9435 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9436 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9437 caller.
9438 (skip_one_die): Handle DW_FORM_implicit_const.
9439 (dwarf2_rnglists_process): New function.
9440 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9441 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9442 (read_attribute_value): Handle DW_FORM_implicit_const,
9443 DW_FORM_line_strp.
9444 (read_attribute): Handle DW_FORM_implicit_const.
9445 (read_indirect_string_at_offset_from): New function from
9446 read_indirect_string_at_offset.
9447 (read_indirect_string_at_offset): Call
9448 read_indirect_string_at_offset_from.
9449 (read_indirect_line_string_at_offset): New function.
9450 (read_indirect_string): New function comment.
9451 (read_indirect_line_string): New function.
9452 (read_unsigned_leb128): Make it global.
9453 (dwarf2_string_attr): Handle DWARF-5.
9454 (add_include_dir_stub, read_formatted_entries): New functions.
9455 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9456 Handle DWARF-5.
9457 (per_cu_header_read_in): Update read_comp_unit_head caller.
9458 (dwarf2_version): New function.
9459 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9460 rnglists.
9461 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9462 fields.
9463
9464 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9465
9466 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9467
9468 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9469
9470 * dwarf2read.c (dwarf2_ranges_process): New function from
9471 dwarf2_ranges_read.
9472 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9473 dwarf2_ranges_process.
9474
9475 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9476
9477 * dwarf2read.c (create_debug_type_hash_table): New function from
9478 create_debug_types_hash_table.
9479 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9480 (create_all_type_units, open_and_init_dwo_file): Update
9481 create_debug_types_hash_table callers.
9482
9483 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9484
9485 PR gdb/16188
9486 * fork-child.c (trace_start_error): Fix thinko. va_end should
9487 refer to 'ap', not 'args'.
9488
9489 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9490 Pedro Alves <palves@redhat.com>
9491
9492 PR gdb/16188
9493 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9494 calls succeeded.
9495 * fork-child.c (trace_start_error): New function.
9496 (trace_start_error_with_name): Likewise.
9497 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9498 * inf-ptrace.c (inf_ptrace_me): Likewise.
9499 * inferior.h (trace_start_error): New prototype.
9500 (trace_start_error_with_name): Likewise.
9501
9502 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9503
9504 PR gdb/21164
9505 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9506 NULL before using it.
9507 * symmisc.c (maintenance_print_symbols): Likewise.
9508 (maintenance_print_msymbols): Likewise.
9509
9510 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9511
9512 * NEWS: Add record Python bindings entry.
9513
9514 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9515
9516 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9517 py-record-full.o.
9518 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9519 * python/py-record-btrace.c, python/py-record-btrace.h,
9520 python/py-record-full.c, python/py-record-full.h: New file.
9521 * python/py-record.c: Add include for py-record-btrace.h and
9522 py-record-full.h.
9523 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9524 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9525 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9526 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9527 New definition.
9528 (gdbpy_initialize_btrace): New export.
9529 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9530
9531 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9532
9533 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9534 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9535 * python/py-record.c: New file.
9536 * python/python-internal.h (gdbpy_start_recording,
9537 gdbpy_current_recording, gdpy_stop_recording,
9538 gdbpy_initialize_record): New export.
9539 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9540 (python_GdbMethods): Add gdbpy_start_recording,
9541 gdbpy_current_recording and gdbpy_stop_recording.
9542
9543 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9544
9545 * record-btrace.c (record_btrace_record_method): New function.
9546 (init_record_btrace_ops): Initialize to_record_method.
9547 * record-full.c (record_full_record_method): New function.
9548 (init_record_full_ops, init_record_full_core_ops): Add
9549 record_full_record_method.
9550 * record.h (enum record_method): New enum.
9551 * target-debug.h (target_debug_print_enum_record_method: New define.
9552 * target-delegates.c: Regenerate.
9553 * target.c (target_record_method): New function.
9554 * target.h: Include record.h.
9555 (struct target_ops) <to_record_method>: New field.
9556 (target_record_method): New export.
9557
9558 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9559
9560 * record.h (record_start, record_stop): New export.
9561 * record.c (record_start, record_stop): New function.
9562
9563 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9564
9565 * btrace.c (btrace_fetch): Copy function call segments pointer
9566 into a vector.
9567 (btrace_clear): Clear the vector.
9568 (btrace_find_insn_by_number): Use binary search to find the correct
9569 function call segment.
9570 * btrace.h (brace_fun_p): New typedef.
9571 (struct btrace_thread_info) <functions>: New field.
9572
9573 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9574
9575 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9576 * btrace.c (btrace_decode_error): ... here. New function.
9577 * btrace.h (btrace_decode_error): New export.
9578
9579 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9580
9581 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9582 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9583 btrace_find_insn_by_number): Remove special case for gaps.
9584 * btrace.h (btrace_insn_get_error): New export.
9585 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9586 * record-btrace.c (btrace_insn_history): Print number for gaps.
9587 (record_btrace_info, record_btrace_goto): Handle gaps.
9588
9589 2017-02-14 Tom Tromey <tom@tromey.com>
9590
9591 PR python/13598:
9592 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9593 event.
9594 * python/py-evts.c (gdbpy_initialize_py_events): Add
9595 before_prompt registry.
9596 * python/py-events.h (events_object) <before_prompt>: New field.
9597
9598 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9599
9600 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9601
9602 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9603
9604 * symfile (_initialize_symfile): Add usage text to the load command's
9605 help text.
9606
9607 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9608
9609 * utils.c (defaulted_query): Don't query on secondary UIs.
9610
9611 2017-02-10 Tom Tromey <tom@tromey.com>
9612
9613 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9614
9615 2017-02-10 Tom Tromey <tom@tromey.com>
9616
9617 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9618 "cleanup" local.
9619 * python/py-type.c (typy_legacy_template_argument): Remove
9620 unnecessary "cleanup" local.
9621
9622 2017-02-10 Tom Tromey <tom@tromey.com>
9623
9624 * python/python.c (do_start_initialization): New function, from
9625 _initialize_python.
9626 (_initialize_python): Call do_start_initialization.
9627 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9628 goto.
9629
9630 2017-02-10 Tom Tromey <tom@tromey.com>
9631
9632 * python/py-prettyprint.c (pretty_print_one_value): Use
9633 gdbpy_ref.
9634
9635 2017-02-10 Tom Tromey <tom@tromey.com>
9636
9637 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9638 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9639 gdbpy_ref.
9640 * python/py-type.c (field_new): Use gdbpy_ref.
9641 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9642 gdbpy_ref.
9643 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9644 (py_free_pspace): Likewise.
9645 (pspace_to_pspace_object): Likewise.
9646 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9647 (py_free_objfile): Likewise.
9648 (objfile_to_objfile_object): Likewise.
9649 * python/py-inferior.c (delete_thread_object): Use
9650 gdbpy_ref.
9651 (infpy_read_memory): Likewise.
9652 (py_free_inferior): Likewise.
9653 * python/py-evtregistry.c (create_eventregistry_object): Use
9654 gdbpy_ref.
9655 * python/py-event.c (create_event_object): Use gdbpy_ref.
9656
9657 2017-02-10 Tom Tromey <tom@tromey.com>
9658
9659 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9660 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9661 used.
9662 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9663 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9664 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9665 python/py-framefilter.c, python/py-function.c,
9666 python/py-inferior.c, python/py-infevents.c,
9667 python/py-linetable.c, python/py-newobjfileevent.c,
9668 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9669 python/py-signalevent.c, python/py-stopevent.c,
9670 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9671 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9672 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9673 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9674
9675 2017-02-10 Tom Tromey <tom@tromey.com>
9676
9677 * ui-out.h (ui_out_emit_type): New class.
9678 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9679 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9680 and ui_out_emit_tuple.
9681 (enumerate_locals): Likewise.
9682 (py_mi_print_variables, py_print_locals, py_print_args): Use
9683 ui_out_emit_list.
9684 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9685 ui_out_emit_list.
9686 * common/gdb_optional.h: New file.
9687
9688 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9689
9690 * MAINTAINERS (Write After Approval): Update my e-mail address.
9691
9692 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9693
9694 PR gdb/21122
9695 * breakpoint.c (_initialize_breakpoint): Update the help description
9696 of the 'commands' command to indicate that it takes a list argument.
9697
9698 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9699
9700 * interps.c (current_interp_set_logging): Remove "return".
9701
9702 2017-02-09 Gary Benson <gbenson@redhat.com>
9703
9704 * symtab.c (add_symtab_completions): Prevent NULL pointer
9705 dereference.
9706
9707 2017-02-08 Pedro Alves <palves@redhat.com>
9708
9709 * interps.c (interp::interp): Remove reference to quiet_p.
9710 (interp_set): Make static. Remove dead "Switching to" output
9711 code.
9712 (interp_quiet_p, interp_set_quiet): Delete.
9713 (interpreter_exec_cmd): Don't set the interpreter quiet.
9714 * interps.h (interp_quiet_p): Make static.
9715 (class interp) <quiet_p>: Remove field
9716
9717 2017-02-08 Jerome Guitton <guitton@adacore.com>
9718
9719 * cli/cli-decode.c (find_command_name_length): Make it extern.
9720 * cli/cli-decode.h (find_command_name_length): Declare.
9721 * cli/cli-script.c (command_name_equals, line_first_arg):
9722 New functions.
9723 (process_next_line): Use cli-decode to parse command names.
9724 (build_command_line): Make args a constant pointer.
9725
9726 2017-02-08 Jerome Guitton <guitton@adacore.com>
9727
9728 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9729 Remove case-insensitive search.
9730
9731 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9732
9733 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9734 at the end of the line. Avoids an ARI warning.
9735
9736 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
9737
9738 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9739 rdseed instructions.
9740 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9741
9742 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9743
9744 PR tdep/20936
9745 Provide and use sparc32 and sparc64 target description XML files.
9746 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9747 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9748 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9749 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9750 * features/sparc/sparc32-solaris.xml: New file.
9751 * features/sparc/sparc64-solaris.xml: New file.
9752 * features/sparc/sparc32-solaris.c: Generated.
9753 * features/sparc/sparc64-solaris.c: Generated.
9754 * sparc-tdep.h: Account for differences in target descriptions.
9755 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9756 (sparc32_register_type): Use target provided registers.
9757 (validate_tdesc_registers): New function.
9758 (sparc32_gdbarch_init): Use tdesc_has_registers.
9759 Set pseudoregister functions.
9760 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9761 (sparc64_register_type): Use target provided registers.
9762 (sparc64_init_abi): Set pseudoregister functions.
9763
9764 2017-02-03 Tom Tromey <tom@tromey.com>
9765
9766 PR rust/21097:
9767 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9768 with a single member.
9769
9770 2017-02-03 Pedro Alves <palves@redhat.com>
9771
9772 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9773 (cli_interp_base::~cli_interp_base): New.
9774 (cli_interp): New struct.
9775 (as_cli_interp): Cast the interp itself to cli_interp.
9776 (cli_interpreter_pre_command_loop): Rename to ...
9777 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9778 parameter.
9779 (cli_interpreter_init): Rename to ...
9780 (cli_interp::init): ... this. Remove 'self' parameter. Use
9781 boolean. Make extern.
9782 (cli_interpreter_resume): Rename to ...
9783 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9784 extern.
9785 (cli_interpreter_suspend): Rename to ...
9786 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9787 extern.
9788 (cli_interpreter_exec): Rename to ...
9789 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9790 extern.
9791 (cli_interpreter_supports_command_editing): Rename to ...
9792 (cli_interp_base::supports_command_editing): ... this. Remove
9793 'interp' parameter. Make extern.
9794 (cli_ui_out): Rename to ...
9795 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9796 Make extern.
9797 (cli_set_logging): Rename to ...
9798 (cli_interp_base::set_logging): ... this. Remove 'interp'
9799 parameter. Make extern.
9800 (cli_interp_procs): Delete.
9801 (cli_interp_factory): Adjust to use "new".
9802 * cli/cli-interp.h: Include "interps.h".
9803 (struct cli_interp_base): New struct.
9804 * interps.c (struct interp): Delete. Fields moved to interps.h.
9805 (interp_new): Delete.
9806 (interp::interp, interp::~interp): New.
9807 (interp_set): Use bool, and return void. Assume the interpreter
9808 has suspend, init and resume methods, and that the all return
9809 void.
9810 (set_top_level_interpreter): interp_set returns void.
9811 (interp_ui_out): Adapt.
9812 (current_interp_set_logging): Adapt.
9813 (interp_data): Delete.
9814 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9815 (interp_exec): Adapt.
9816 (top_level_interpreter_data): Delete.
9817 * interps.h (interp_init_ftype, interp_resume_ftype)
9818 (interp_suspend_ftype, interp_exec_ftype)
9819 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9820 (class interp): New.
9821 (interp_new): Delete.
9822 (interp_set): Now returns void. Use bool.
9823 (interp_data, top_level_interpreter_data): Delete.
9824 * mi/mi-common.h: Include interps.h.
9825 (class mi_interp): Inherit from interp. Define a ctor. Declare
9826 init, resume, suspect, exec, interp_ui_out, set_logging and
9827 pre_command_loop methods.
9828 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9829 (mi_interpreter_init): Rename to ...
9830 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9831 bool, return void and make extern. Adjust.
9832 (mi_interpreter_resume): ... Rename to ...
9833 (mi_interp::resume): ... this. Remove the 'data' parameter,
9834 return void and make extern. Adjust.
9835 (mi_interpreter_suspend): ... Rename to ...
9836 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9837 return void and make extern. Adjust.
9838 (mi_interpreter_exec): ... Rename to ...
9839 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9840 extern. Adjust.
9841 (mi_interpreter_pre_command_loop): ... Rename to ...
9842 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9843 parameter and make extern.
9844 (mi_on_normal_stop_1): Adjust.
9845 (mi_ui_out): Rename to ...
9846 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9847 parameter and make extern. Adjust.
9848 (mi_set_logging): Rename to ...
9849 (mi_interp::set_logging): ... this. Remove the 'interp'
9850 parameter and make extern. Adjust.
9851 (mi_interp_procs): Delete.
9852 (mi_interp_factory): Adjust to use 'new'.
9853 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9854 (mi_print_exception, mi_execute_command, mi_load_progress):
9855 Adjust.
9856 * tui/tui-interp.c (tui_interp): New class.
9857 (as_tui_interp): Return a tui_interp pointer.
9858 (tui_on_normal_stop, tui_on_signal_received)
9859 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9860 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9861 to use interp::interp_ui_out.
9862 (tui_init): Rename to ...
9863 (tui_interp::init): ... this. Remove the 'self' parameter, use
9864 bool, return void and make extern. Adjust.
9865 (tui_resume): Rename to ...
9866 (tui_interp::resume): ... this. Remove the 'data' parameter,
9867 return void and make extern. Adjust.
9868 (tui_suspend): Rename to ...
9869 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9870 return void and make extern. Adjust.
9871 (tui_ui_out): Rename to ...
9872 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9873 parameter, and make extern. Adjust.
9874 (tui_exec): Rename to ...
9875 (tui_interp::exec): ... this. Remove the 'data' parameter and
9876 make extern.
9877 (tui_interp_procs): Delete.
9878 (tui_interp_factory): Use "new".
9879
9880 2017-02-02 Tom Tromey <tom@tromey.com>
9881
9882 * rust-exp.y (ends_raw_string, space_then_number)
9883 (rust_identifier_start_p): Return bool.
9884 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9885 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9886 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9887 (rust_chartype_p): Return bool.
9888 (val_print_struct, rust_print_struct_def, rust_print_type):
9889 Update.
9890 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9891 Return bool.
9892
9893 2017-02-02 Tom Tromey <tom@tromey.com>
9894
9895 * rust-lang.c: Reindent.
9896
9897 2017-02-02 Tom Tromey <tom@tromey.com>
9898
9899 * rust-lang.h (rust_crate_for_block): Update.
9900 * rust-lang.c (rust_crate_for_block): Return std::string.
9901 (rust_get_disr_info): Use std:;string, not
9902 gdb::unique_xmalloc_ptr.
9903 * rust-exp.y (crate_name): Update.
9904
9905 2017-02-02 Pedro Alves <palves@redhat.com>
9906
9907 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9908 field out of gdb_disassembler_test and make it static.
9909
9910 2017-02-02 Pedro Alves <palves@redhat.com>
9911
9912 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9913 mi1_interp and mi_interp fields.
9914
9915 2017-02-02 Pedro Alves <palves@redhat.com>
9916
9917 * cli/cli-interp.c (struct saved_output_files, saved_output):
9918 Moved from cli/cli-logging.c.
9919 (cli_set_logging): New function.
9920 (cli_interp_procs): Install cli_set_logging.
9921 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9922 Declare.
9923 * cli/cli-logging.c (struct saved_output_files, saved_output):
9924 Moved to cli/cli-interp.c.
9925 (pop_output_files): Don't save outputs here.
9926 (make_logging_output): New function.
9927 (handle_redirections): Don't build tee nor save previous outputs
9928 here.
9929 * interps.c (current_interp_set_logging): Change prototype.
9930 Assume there's always a set_logging_proc method installed.
9931 * interps.h (interp_set_logging_ftype): Change prototype.
9932 (current_interp_set_logging): Change prototype and adjust comment.
9933 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9934 use make_logging_output.
9935 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9936 2017-02-02 Pedro Alves <palves@redhat.com>
9937
9938 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9939 from ...
9940 (set_logging_overwrite): ... here.
9941 (logging_no_redirect_file): Delete.
9942 (set_logging_redirect): Don't handle redirection on the fly.
9943 Instead warn that "logging off" / "logging on" is necessary.
9944 (pop_output_files): Delete references to logging_no_redirect_file.
9945 (show_logging_command): Always speak in terms of what will happen
9946 once logging is reenabled.
9947
9948 2017-02-02 Pedro Alves <palves@redhat.com>
9949
9950 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9951
9952 2017-02-02 Pedro Alves <palves@redhat.com>
9953
9954 * disasm.c (gdb_pretty_print_insn): Rename to ...
9955 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9956 Remove gdbarch parameter. Adapt to clear the object's buffers
9957 instead of allocating new buffers, and to print using the object's
9958 gdb_disassembler instead of calling gdb_print_insn.
9959 (dump_insns): Use gdb_pretty_print_disassembler.
9960 * disasm.h (gdb_pretty_print_insn): Delete declaration.
9961 (gdb_pretty_print_disassembler): New class.
9962 * record-btrace.c (btrace_insn_history): Use
9963 gdb_pretty_print_disassembler.
9964
9965 2017-02-02 Pedro Alves <palves@redhat.com>
9966
9967 * ada-lang.c (type_as_string): Use string_file.
9968 * ada-valprint.c (ada_print_floating): Use string_file.
9969 * ada-varobj.c (ada_varobj_scalar_image)
9970 (ada_varobj_get_value_image): Use string_file.
9971 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9972 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9973 * breakpoint.c (update_inserted_breakpoint_locations)
9974 (insert_breakpoint_locations, reattach_breakpoints)
9975 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9976 (print_it_watchpoint): Use string_file.
9977 (save_breakpoints): Use stdio_file.
9978 * c-exp.y (oper): Use string_file.
9979 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9980 tee_file.
9981 (pop_output_files): Use delete.
9982 (handle_redirections): Use stdio_file and tee_file.
9983 * cli/cli-setshow.c (do_show_command): Use string_file.
9984 * compile/compile-c-support.c (c_compute_program): Use
9985 string_file.
9986 * compile/compile-c-symbols.c (generate_vla_size): Take a
9987 'string_file &' instead of a 'ui_file *'.
9988 (generate_c_for_for_one_variable): Take a 'string_file &' instead
9989 of a 'ui_file *'. Use string_file.
9990 (generate_c_for_variable_locations): Take a 'string_file &'
9991 instead of a 'ui_file *'.
9992 * compile/compile-internal.h (generate_c_for_for_one_variable):
9993 Take a 'string_file &' instead of a 'ui_file *'.
9994 * compile/compile-loc2c.c (push, pushf, unary, binary)
9995 (print_label, pushf_register_address, pushf_register)
9996 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9997 'ui_file *'. Adjust.
9998 * compile/compile.c (compile_to_object): Use string_file.
9999 * compile/compile.h (compile_dwarf_expr_to_c)
10000 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10001 'ui_file *'.
10002 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10003 (replace_typedefs_qualified_name): Use string_file and
10004 obstack_copy0.
10005 * disasm.c (gdb_pretty_print_insn): Use string_file.
10006 (gdb_disassembly): Adjust reference the null_stream global.
10007 (do_ui_file_delete): Delete.
10008 (gdb_insn_length): Use null_stream.
10009 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10010 * dwarf2loc.c (dwarf2_compile_property_to_c)
10011 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10012 'string_file &' instead of a 'ui_file *'.
10013 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10014 * dwarf2read.c (do_ui_file_peek_last): Delete.
10015 (dwarf2_compute_name): Use string_file.
10016 * event-top.c (gdb_setup_readline): Use stdio_file.
10017 * gdbarch.sh (verify_gdbarch): Use string_file.
10018 * gdbtypes.c (safe_parse_type): Use null_stream.
10019 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10020 string_file.
10021 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10022 'string_file *' instead of a 'ui_file *'.
10023 (gdbscm_arch_disassemble): Use string_file.
10024 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10025 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10026 inherits from ui_file.
10027 (ioscm_file_port_delete, ioscm_file_port_rewind)
10028 (ioscm_file_port_put): Delete.
10029 (ioscm_file_port_write): Rename to ...
10030 (ioscm_file_port::write): ... this. Remove file_port_magic
10031 checks.
10032 (ioscm_file_port_new): Delete.
10033 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10034 ui_file_up.
10035 * guile/scm-type.c (tyscm_type_name): Use string_file.
10036 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10037 Use string_file.
10038 * infcmd.c (print_return_value_1): Use string_file.
10039 * infrun.c (print_target_wait_results): Use string_file.
10040 * language.c (add_language): Use string_file.
10041 * location.c (explicit_to_string_internal): Use string_file.
10042 * main.c (captured_main_1): Use null_file.
10043 * maint.c (maintenance_print_architecture): Use stdio_file.
10044 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10045 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10046 event_channel>: Change type to mi_console_file pointer.
10047 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10048 (mi_console_file_delete): Delete.
10049 (struct mi_console_file): Delete.
10050 (mi_console_file_magic): Delete.
10051 (mi_console_file_new): Delete.
10052 (mi_console_file::mi_console_file): New.
10053 (mi_console_file_delete): Delete.
10054 (mi_console_file_fputs): Delete.
10055 (mi_console_file::write): New.
10056 (mi_console_raw_packet): Delete.
10057 (mi_console_file::flush): New.
10058 (mi_console_file_flush): Delete.
10059 (mi_console_set_raw): Rename to ...
10060 (mi_console_file::set_raw): ... this.
10061 * mi/mi-console.h (class mi_console_file): New class.
10062 (mi_console_file_new, mi_console_set_raw): Delete.
10063 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10064 (mi_set_logging): Use delete and tee_file. Adjust.
10065 * mi/mi-main.c (output_register): Use string_file.
10066 (mi_cmd_data_evaluate_expression): Use string_file.
10067 (mi_cmd_data_read_memory): Use string_file.
10068 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10069 * mi/mi-out.c (mi_ui_out::main_stream): New.
10070 (mi_ui_out::rewind): Use main_stream and
10071 string_file.
10072 (mi_ui_out::put): Use main_stream and string_file.
10073 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10074 Allocate a 'string_file' instead.
10075 (mi_out_new): Don't allocate a mem_fileopen stream here.
10076 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10077 (mi_ui_out::main_stream): Declare method.
10078 * printcmd.c (eval_command): Use string_file.
10079 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10080 * python/py-arch.c (archpy_disassemble): Use string_file.
10081 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10082 * python/py-frame.c (frapy_str): Use string_file.
10083 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10084 Use string_file.
10085 * python/py-type.c (typy_str): Use string_file.
10086 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10087 * python/py-value.c (valpy_str): Use string_file.
10088 * record-btrace.c (btrace_insn_history): Use string_file.
10089 * regcache.c (regcache_print): Use stdio_file.
10090 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10091 * remote.c (escape_buffer): Use string_file.
10092 * rust-lang.c (rust_get_disr_info): Use string_file.
10093 * serial.c (serial_open_ops_1): Use stdio_file.
10094 (do_serial_close): Use delete.
10095 * stack.c (print_frame_arg): Use string_file.
10096 (print_frame_args): Remove local mem_fileopen stream, not used.
10097 (print_frame): Use string_file.
10098 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10099 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10100 Take a 'string_file *' instead of a 'ui_file *'.
10101 * top.c (new_ui): Use stdio_file and stderr_file.
10102 (free_ui): Use delete.
10103 (execute_command_to_string): Use string_file.
10104 (quit_confirm): Use string_file.
10105 * tracepoint.c (collection_list::append_exp): Use string_file.
10106 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10107 * tui/tui-file.c: Don't include "ui-file.h".
10108 (enum streamtype, struct tui_stream): Delete.
10109 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10110 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10111 (tui_file::tui_file): New method.
10112 (tui_file_fputs): Delete.
10113 (tui_file_get_strbuf): Delete.
10114 (tui_file::puts): New method.
10115 (tui_file_adjust_strbuf): Delete.
10116 (tui_file_flush): Delete.
10117 (tui_file::flush): New method.
10118 * tui/tui-file.h: Tweak intro comment.
10119 Include ui-file.h.
10120 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10121 (tui_file_adjust_strbuf): Delete declarations.
10122 (class tui_file): New class.
10123 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10124 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10125 (tui_register_format): Use string_stream.
10126 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10127 (tui_get_function_from_frame): Use string_file.
10128 * typeprint.c (type_to_string): Use string_file.
10129 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10130 (null_stream): New global.
10131 (ui_file_delete): Delete.
10132 (ui_file::ui_file): New.
10133 (null_file_isatty): Delete.
10134 (ui_file::~ui_file): New.
10135 (null_file_rewind): Delete.
10136 (ui_file::printf): New.
10137 (null_file_put): Delete.
10138 (null_file_flush): Delete.
10139 (ui_file::putstr): New.
10140 (null_file_write): Delete.
10141 (ui_file::putstrn): New.
10142 (null_file_read): Delete.
10143 (ui_file::putc): New.
10144 (null_file_fputs): Delete.
10145 (null_file_write_async_safe): Delete.
10146 (ui_file::vprintf): New.
10147 (null_file_delete): Delete.
10148 (null_file::write): New.
10149 (null_file_fseek): Delete.
10150 (null_file::puts): New.
10151 (ui_file_data): Delete.
10152 (null_file::write_async_safe): New.
10153 (gdb_flush, ui_file_isatty): Adjust.
10154 (ui_file_put, ui_file_rewind): Delete.
10155 (ui_file_write): Adjust.
10156 (ui_file_write_for_put): Delete.
10157 (ui_file_write_async_safe, ui_file_read): Adjust.
10158 (ui_file_fseek): Delete.
10159 (fputs_unfiltered): Adjust.
10160 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10161 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10162 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10163 (set_ui_file_data): Delete.
10164 (string_file::~string_file, string_file::write)
10165 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10166 (do_ui_file_as_string, ui_file_as_string): Delete.
10167 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10168 (struct mem_file): Delete.
10169 (mem_file_new): Delete.
10170 (stdio_file::stdio_file): New.
10171 (mem_file_delete): Delete.
10172 (stdio_file::stdio_file): New.
10173 (mem_fileopen): Delete.
10174 (stdio_file::~stdio_file): New.
10175 (mem_file_rewind): Delete.
10176 (stdio_file::set_stream): New.
10177 (mem_file_put): Delete.
10178 (stdio_file::open): New.
10179 (mem_file_write): Delete.
10180 (stdio_file_magic, struct stdio_file): Delete.
10181 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10182 (stdio_file::flush): New.
10183 (stdio_file_read): Rename to ...
10184 (stdio_file::read): ... this. Adjust.
10185 (stdio_file_write): Rename to ...
10186 (stdio_file::write): ... this. Adjust.
10187 (stdio_file_write_async_safe): Rename to ...
10188 (stdio_file::write_async_safe) ... this. Adjust.
10189 (stdio_file_fputs): Rename to ...
10190 (stdio_file::puts) ... this. Adjust.
10191 (stdio_file_isatty): Delete.
10192 (stdio_file_fseek): Delete.
10193 (stdio_file::isatty): New.
10194 (stderr_file_write): Rename to ...
10195 (stderr_file::write) ... this. Adjust.
10196 (stderr_file_fputs): Rename to ...
10197 (stderr_file::puts) ... this. Adjust.
10198 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10199 (stderr_file::stderr_file): New.
10200 (tee_file_magic): Delete.
10201 (struct tee_file): Delete.
10202 (tee_file::tee_file): New.
10203 (tee_file_new): Delete.
10204 (tee_file::~tee_file): New.
10205 (tee_file_delete): Delete.
10206 (tee_file_flush): Rename to ...
10207 (tee_file::flush): ... this. Adjust.
10208 (tee_file_write): Rename to ...
10209 (tee_file::write): ... this. Adjust.
10210 (tee_file::write_async_safe): New.
10211 (tee_file_fputs): Rename to ...
10212 (tee_file::puts): ... this. Adjust.
10213 (tee_file_isatty): Rename to ...
10214 (tee_file::isatty): ... this. Adjust.
10215 * ui-file.h (struct obstack, struct ui_file): Don't
10216 forward-declare.
10217 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10218 (ui_file_write_ftype)
10219 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10220 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10221 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10222 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10223 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10224 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10225 (set_ui_file_fseek): Delete.
10226 (ui_file_data, ui_file_delete, ui_file_rewind)
10227 (struct ui_file): New.
10228 (ui_file_up): New.
10229 (class null_file): New.
10230 (null_stream): Declare.
10231 (ui_file_write_for_put, ui_file_put): Delete.
10232 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10233 Delete.
10234 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10235 (gdb_fopen, tee_file_new): Delete.
10236 (struct string_file): New.
10237 (struct stdio_file): New.
10238 (stdio_file_up): New.
10239 (struct stderr_file): New.
10240 (class tee_file): New.
10241 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10242 of a 'ui_file *'. Adjust.
10243 * ui-out.h (class ui_out) <field_stream>: Likewise.
10244 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10245 (null_stream): Delete.
10246 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10247 Adjust.
10248 * utils.h (struct ui_file): Delete forward declaration..
10249 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10250 (error_stream): Take a 'string_file &' instead of a
10251 'ui_file *'.
10252 * varobj.c (varobj_value_get_print_value): Use string_file.
10253 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10254 * gdbarch.c: Regenerate.
10255
10256 2017-02-02 Pedro Alves <palves@redhat.com>
10257
10258 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10259 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10260 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10261 Adjust to call gdb_print_insn instead of
10262 gdb_disassembler::print_insn.
10263 (dump_insns, do_mixed_source_and_assembly_deprecated)
10264 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10265 'gdbarch' parameter. Remove gdb_disassembler parameter.
10266 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10267 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10268 declaration.
10269 (gdb_pretty_print_insn): Re-add declaration.
10270 * record-btrace.c (btrace_insn_history): Don't allocate a
10271 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10272
10273 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10274
10275 * disasm.h (gdb_disassembly): Remove file_string parameter.
10276 * disasm.c (gdb_disassembly): Likewise.
10277 * cli/cli-cmds.c (print_disassembly): Adapt.
10278 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10279 * stack.c (do_gdb_disassembly): Likewise.
10280
10281 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10282
10283 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10284 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10285 targets. And if the implicit value is longer than needed, extract
10286 the first bytes instead of the "least significant" ones.
10287
10288 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10289
10290 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10291 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10292 (btrace_fetch): Assert can_access_registers_ptid.
10293 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10294 validate_registers_access.
10295
10296 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10297
10298 * gdbthread.h (can_access_registers_ptid): New.
10299 * thread.c (can_access_registers_ptid): New.
10300
10301 2017-02-01 Pedro Alves <palves@redhat.com>
10302
10303 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10304
10305 2017-01-31 Pedro Alves <palves@redhat.com>
10306
10307 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10308 Fix typos.
10309
10310 2017-01-31 Pedro Alves <palves@redhat.com>
10311
10312 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10313 not used.
10314
10315 2017-01-31 Pedro Alves <palves@redhat.com>
10316
10317 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10318
10319 2017-01-31 Pedro Alves <palves@redhat.com>
10320
10321 * common/scoped_restore.h
10322 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10323 change the value's parameter type to T2.
10324 (make_scoped_restore): Likewise.
10325
10326 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10327 Richard Henderson <rth@redhat.com>
10328
10329 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10330 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10331 GS_BASE for older kernels.
10332 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10333 GS_BASE for older kernels.
10334 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10335 and GS_BASE to the offset table.
10336 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10337 system register group.
10338 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10339 for older kernels.
10340 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10341 amd64 ABI.
10342 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10343 AMD64_GSBASE_REGNUM.
10344 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10345 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10346 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10347 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10348 i386/64bit-segments.xml in those rules.
10349 * features/i386/64bit-segments.xml: New file.
10350 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10351 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10352 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10353 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10354 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10355 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10356 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10357 * features/i386/amd64-avx-linux.c: Regenerated.
10358 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10359 * features/i386/amd64-avx-mpx.c: Regenerated.
10360 * features/i386/amd64-avx512-linux.c: Regenerated.
10361 * features/i386/amd64-linux.c: Regenerated.
10362 * features/i386/amd64-mpx-linux.c: Regenerated.
10363 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10364 * features/i386/i386-avx-mpx.c: Regenerated.
10365 * features/i386/x32-avx-linux.c: Regenerated.
10366 * features/i386/x32-avx512-linux.c: Regenerated.
10367 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10368 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10369 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10370 * regformats/i386/amd64-linux.dat: Regenerated.
10371 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10372 * regformats/i386/x32-avx-linux.dat: Regenerated.
10373 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10374 * regformats/i386/x32-linux.dat: Regenerated.
10375
10376 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10377
10378 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10379 Set to AMD64_NUM_REGS.
10380
10381 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10382
10383 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10384 that checks validity of a register number.
10385
10386 2017-01-27 Kees Cook <keescook@google.com>
10387
10388 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10389 fetch_fpregs if target has fpa registers.
10390 (arm_linux_store_inferior_registers): Call store_fpregs if target
10391 has fpa registers.
10392
10393 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10394
10395 * cris-tdep.c (cris_gdbarch_init): Remove check for
10396 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10397
10398 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10399
10400 * corelow.c (get_core_register_section): Check for regset
10401 existence before checking for REGSET_VARIABLE_SIZE.
10402
10403 2017-01-26 Yao Qi <yao.qi@linaro.org>
10404 Pedro Alves <palves@redhat.com>
10405
10406 PR gdb/20939
10407 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10408 call memory_error, save memaddr instead.
10409 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10410 negative, cal memory_error.
10411 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10412
10413 2017-01-26 Yao Qi <yao.qi@linaro.org>
10414
10415 * disasm-selftests.c (memory_error_test): New function.
10416 (_initialize_disasm_selftests): Register memory_error_test.
10417
10418 2017-01-26 Yao Qi <yao.qi@linaro.org>
10419
10420 * Makefile.in (SFILES): Add disasm-selftests.c and
10421 selftest-arch.c.
10422 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10423 * disasm-selftests.c: New file.
10424 * selftest-arch.c: New file.
10425 * selftest-arch.h: New file.
10426
10427 2017-01-26 Yao Qi <yao.qi@linaro.org>
10428
10429 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10430 to bfd_arch_mep. Don't return 0 if section is not
10431 found. Call print_insn_mep.
10432
10433 2017-01-26 Pedro Alves <palves@redhat.com>
10434 Yao Qi <yao.qi@linaro.org>
10435
10436 * arm-tdep.c: Include "disasm.h".
10437 (gdb_print_insn_arm): Update code to get gdbarch.
10438 * disasm.c (dis_asm_read_memory): Change it to
10439 gdb_disassembler::dis_asm_read_memory.
10440 (dis_asm_memory_error): Likewise.
10441 (dis_asm_print_address): Likewise.
10442 (gdb_pretty_print_insn): Change it to
10443 gdb_disassembler::pretty_print_insn.
10444 (dump_insns): Add one argument gdb_disassemlber. All
10445 callers updated.
10446 (do_mixed_source_and_assembly_deprecated): Likewise.
10447 (do_mixed_source_and_assembly): Likewise.
10448 (do_assembly_only): Likewise.
10449 (gdb_disassembler::gdb_disassembler): New.
10450 (gdb_disassembler::print_insn): New.
10451 * disasm.h (class gdb_disassembler): New.
10452 (gdb_pretty_print_insn): Remove declaration.
10453 (gdb_disassemble_info): Likewise.
10454 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10455 (gdbscm_disasm_read_memory_worker): Update.
10456 (gdbscm_disasm_read_memory): Update.
10457 (gdbscm_disasm_memory_error): Remove.
10458 (gdbscm_disasm_print_address): Remove.
10459 (gdbscm_disassembler::gdbscm_disassembler): New.
10460 (gdbscm_print_insn_from_port): Update.
10461 * mips-tdep.c: Include disasm.h.
10462 (gdb_print_insn_mips): Update code to get gdbarch.
10463 * record-btrace.c (btrace_insn_history): Update.
10464 * spu-tdep.c: Include disasm.h.
10465 (struct spu_dis_asm_data): Remove.
10466 (struct spu_dis_asm_info): New.
10467 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10468 SPU id.
10469 (gdb_print_insn_spu): Cast disassemble_info to
10470 spu_dis_asm_info.
10471
10472 2017-01-26 Yao Qi <yao.qi@linaro.org>
10473
10474 * disasm.c (do_ui_file_delete): Delete.
10475 (gdb_insn_length): Move code creating stream to ...
10476 * utils.c (null_stream): ... here. New function.
10477 * utils.h (null_stream): Declare.
10478
10479 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10480
10481 * python/py-inferior.c (find_thread_object): Return directly
10482 from the loop. Remove "found" variable.
10483
10484 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10485
10486 GDB 7.12.1 released.
10487
10488 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10489
10490 * python/py-function.c (fnpy_call): Reorder declarations to have
10491 the gdbpy_enter object declared first.
10492 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10493
10494 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10495
10496 PR python/21068
10497 * python/python-internal.h (PyMem_RawMalloc): Define for
10498 Python < 3.4.
10499 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10500 PyMem_RawMalloc instead of PyMem_Malloc.
10501
10502 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10503 Luis Machado <lgustavo@codesourcery.com>
10504
10505 * NEWS (New commands): Mention flash-erase.
10506 (New MI commands): Mention target-flash-erase.
10507 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10508 command.
10509 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10510 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10511 * target.c (flash_erase_command): New function.
10512 (initialize_targets): Add new flash-erase command.
10513 * target.h (flash_erase_command): New declaration.
10514
10515 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10516
10517 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10518 HAVE_SYS_PROCFS_H is defined.
10519
10520 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10521
10522 * remote.c (struct cached_reg): Change data into a pointer.
10523 * (stop_reply_dtr): Free data pointers before deleting vector.
10524 (process_stop_reply): Likewise.
10525 (remote_parse_stop_reply): Allocate space for data
10526
10527 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10528
10529 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10530 MAX_REGISTER_SIZE.
10531 (amd64_pseudo_register_read_value): Likewise.
10532 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10533 (store_register_using_P): Likewise.
10534 * regcache.c (regcache_xfer_part): Likewise.
10535
10536 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10537
10538 Split real and pseudo registers.
10539 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10540 (sparc32_pseudo_regnum): New enum.
10541 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10542 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10543 (SPARC32_CP0_REGISTERS): New macro.
10544 (sparc32_pseudo_register_name): New function.
10545 (sparc32_register_name): Use sparc32_pseudo_register_name.
10546 (sparc32_pseudo_register_type): New function.
10547 (sparc32_register_type): Use sparc32_pseudo_register_type.
10548 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10549 pseudo register numbers.
10550 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10551 (SPARC64_CP0_REGISTERS): New macro.
10552 (sparc64_pseudo_register_name): New function.
10553 (sparc64_register_name): Use sparc64_pseudo_register_name.
10554 (sparc64_pseudo_register_type): New function.
10555 (sparc64_register_type): Use sparc64_pseudo_register_type.
10556 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10557 pseudo register numbers.
10558 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10559 sparc64_store_arguments): Handle pseudo register numbers.
10560
10561 2017-01-13 Yao Qi <yao.qi@linaro.org>
10562
10563 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10564 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10565 output.
10566 (getpkt_or_notif_sane_1): Likewise.
10567
10568 2017-01-13 Yao Qi <yao.qi@linaro.org>
10569
10570 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10571 of CC. Pass "-x c++-header" instead of "-x c".
10572
10573 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10574
10575 * remote.c (remote_can_async_p): Update comment.
10576
10577 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10578
10579 * linux-nat.c (linux_nat_can_async_p): Update comment.
10580
10581 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10582
10583 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10584
10585 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10586
10587 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10588
10589 2017-01-10 Tom Tromey <tom@tromey.com>
10590
10591 * python/py-type.c (typy_legacy_template_argument): Update.
10592 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10593 ~demangle_parse_info): Declare new members.
10594 (cp_demangled_name_to_comp): Return unique_ptr.
10595 (cp_demangled_name_parse_free)
10596 (make_cleanup_cp_demangled_name_parse_free)
10597 (cp_new_demangle_parse_info): Remove.
10598 * cp-support.c (do_demangled_name_parse_free_cleanup)
10599 (make_cleanup_cp_demangled_name_parse_free): Remove.
10600 (inspect_type, cp_canonicalize_string_full)
10601 (cp_canonicalize_string): Update.
10602 (mangled_name_to_comp): Change return type.
10603 (cp_class_name_from_physname, method_name_from_physname)
10604 (cp_func_name, cp_remove_params): Update.
10605 * cp-name-parser.y (demangle_parse_info): New constructor, from
10606 cp_new_demangle_parse_info.
10607 (~demangle_parse_info): New destructor, from
10608 cp_demangled_name_parse_free.
10609 (cp_merge_demangle_parse_infos): Update.
10610 (cp_demangled_name_to_comp): Change return type.
10611
10612 2017-01-10 Tom Tromey <tom@tromey.com>
10613
10614 * top.c (prevent_dont_repeat): Change return type.
10615 * python/python.c (execute_gdb_command): Use std::string.
10616 Update.
10617 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10618 * command.h (prevent_dont_repeat): Change return type.
10619 * breakpoint.c (bpstat_do_actions_1): Update.
10620
10621 2017-01-10 Tom Tromey <tom@tromey.com>
10622
10623 * value.h (scoped_value_mark::~scoped_value_mark): Call
10624 free_to_mark.
10625 (scoped_value_mark::free_to_mark): New method.
10626 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10627 scoped_value_mark.
10628
10629 2017-01-10 Tom Tromey <tom@tromey.com>
10630
10631 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10632 (valpy_reference_value, valpy_const_value, valpy_get_address)
10633 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10634 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10635 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10636 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10637 scoped_value_mark.
10638 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10639 * value.h (scoped_value_mark): New class.
10640
10641 2017-01-10 Tom Tromey <tom@tromey.com>
10642
10643 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10644 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10645 * psymtab.c (discard_psymtabs_upto): Remove.
10646 (make_cleanup_discard_psymtabs): Remove.
10647 (struct psymtab_state): Remove.
10648
10649 2017-01-10 Tom Tromey <tom@tromey.com>
10650
10651 * record-full.c (record_full_save_cleanups): Remove.
10652 (record_full_save): Use gdb::unlinker.
10653 * gcore.c (do_bfd_delete_cleanup): Remove.
10654 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10655 cleanups.
10656 * dwarf2read.c (unlink_if_set): Remove.
10657 (write_psymtabs_to_index): Use gdb::unlinker.
10658 * common/gdb_unlinker.h: New file.
10659
10660 2017-01-10 Tom Tromey <tom@tromey.com>
10661
10662 * windows-tdep.c (windows_xfer_shared_library): Update.
10663 * windows-nat.c (windows_make_so): Update.
10664 * utils.h (make_cleanup_bfd_unref): Remove.
10665 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10666 * symfile.h (symfile_bfd_open)
10667 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10668 * symfile.c (read_symbols, symbol_file_add)
10669 (separate_debug_file_exists): Update.
10670 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10671 (generic_load, reread_symbols): Update.
10672 * symfile-mem.c (symbol_file_add_from_memory): Update.
10673 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10674 (spu_symbol_file_add_from_memory): Update.
10675 * solist.h (struct target_so_ops) <bfd_open>: Return
10676 gdb_bfd_ref_ptr.
10677 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10678 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10679 gdb_bfd_ref_ptr.
10680 (solib_map_sections, reload_shared_libraries_1): Update.
10681 * solib-svr4.c (enable_break): Update.
10682 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10683 * solib-frv.c (enable_break2): Update.
10684 * solib-dsbt.c (enable_break): Update.
10685 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10686 gdb_bfd_ref_ptr.
10687 (darwin_solib_get_all_image_info_addr_at_init): Update.
10688 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10689 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10690 * record-full.c (record_full_save): Update.
10691 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10692 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10693 * minidebug.c (find_separate_debug_file_in_section): Return
10694 gdb_bfd_ref_ptr.
10695 * machoread.c (macho_add_oso_symfile): Change abfd to
10696 gdb_bfd_ref_ptr.
10697 (macho_symfile_read_all_oso): Update.
10698 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10699 (macho_symfile_read): Update.
10700 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10701 (jit_bfd_try_read_symtab): Update.
10702 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10703 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10704 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10705 gdb_bfd_ref_ptr.
10706 (gdb_bfd_ref_policy): New struct.
10707 (gdb_bfd_ref_ptr): New typedef.
10708 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10709 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10710 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10711 gdb_bfd_ref_ptr.
10712 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10713 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10714 (gcore_command): Update.
10715 * exec.c (exec_file_attach): Update.
10716 * elfread.c (elf_symfile_read): Update.
10717 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10718 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10719 (open_and_init_dwo_file): Update.
10720 (open_dwp_file): Return gdb_bfd_ref_ptr.
10721 (open_and_init_dwp_file): Update.
10722 * corelow.c (core_open): Update.
10723 * compile/compile-object-load.c (compile_object_load): Update.
10724 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10725 * coffread.c (coff_symfile_read): Update.
10726 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10727 gdb_bfd_ref_ptr. Rename.
10728 (dump_bfd_file, restore_command): Update.
10729 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10730 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10731 (find_separate_debug_file_by_buildid): Update.
10732
10733 2017-01-10 Tom Tromey <tom@tromey.com>
10734
10735 * common/gdb_ref_ptr.h: New file.
10736 * python/py-ref.h (struct gdbpy_ref_policy): New.
10737 (gdbpy_ref): Now a typedef.
10738
10739 2017-01-10 Tom Tromey <tom@tromey.com>
10740
10741 * utils.h (make_cleanup_htab_delete): Don't declare.
10742 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10743 Remove.
10744 * linespec.c (decode_compound_collector): Add constructor,
10745 destructor.
10746 (lookup_prefix_sym): Remove cleanup.
10747 (symtab_collector): Add constructor, destructor.
10748 (collect_symtabs_from_filename): Remove cleanup.
10749 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10750 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10751 Use htab_up.
10752 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10753 * dwarf2read.c (dw2_expand_symtabs_matching)
10754 (dw2_map_symbol_filenames, dwarf_decode_macros)
10755 (write_psymtabs_to_index): Use htab_up.
10756 * dwarf2loc.c (func_verify_no_selftailcall)
10757 (call_site_find_chain_1, func_verify_no_selftailcall)
10758 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10759 std::vector, gdb::unique_xmalloc_ptr.
10760 (call_sitep): Remove typedef.
10761 (dwarf2_locexpr_baton_eval): Remove unused variable.
10762
10763 2017-01-10 Tom Tromey <tom@tromey.com>
10764
10765 * python/python-internal.h (make_cleanup_py_decref)
10766 (make_cleanup_py_xdecref): Don't declare.
10767 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10768 (py_xdecref, make_cleanup_py_xdecref): Remove.
10769
10770 2017-01-10 Tom Tromey <tom@tromey.com>
10771
10772 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10773 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10774
10775 2017-01-10 Tom Tromey <tom@tromey.com>
10776
10777 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10778
10779 2017-01-10 Tom Tromey <tom@tromey.com>
10780
10781 * python/py-utils.c (unicode_to_encoded_string)
10782 (python_string_to_target_string)
10783 (python_string_to_target_python_string)
10784 (python_string_to_host_string, gdbpy_obj_to_string)
10785 (get_addr_from_python): Use gdbpy_ref.
10786
10787 2017-01-10 Tom Tromey <tom@tromey.com>
10788
10789 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10790 gdbpy_ref.
10791
10792 2017-01-10 Tom Tromey <tom@tromey.com>
10793
10794 * python/python.c (eval_python_command, gdbpy_decode_line)
10795 (gdbpy_run_events, gdbpy_start_type_printers)
10796 (gdbpy_apply_type_printers): Use gdbpy_ref.
10797
10798 2017-01-10 Tom Tromey <tom@tromey.com>
10799
10800 * python/py-param.c (get_doc_string, compute_enum_values): Use
10801 gdbpy_ref.
10802
10803 2017-01-10 Tom Tromey <tom@tromey.com>
10804
10805 * python/py-inferior.c (find_thread_object, build_inferior_list):
10806 Use gdbpy_ref.
10807
10808 2017-01-10 Tom Tromey <tom@tromey.com>
10809
10810 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10811
10812 2017-01-10 Tom Tromey <tom@tromey.com>
10813
10814 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10815 gdbpy_ref.
10816
10817 2017-01-10 Tom Tromey <tom@tromey.com>
10818
10819 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10820 extra incref.
10821 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10822 Use gdbpy_ref.
10823
10824 2017-01-10 Tom Tromey <tom@tromey.com>
10825
10826 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10827 gdbpy_ref.
10828
10829 2017-01-10 Tom Tromey <tom@tromey.com>
10830
10831 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10832 decref results of PyArg_ParseTupleAndKeywords.
10833
10834 2017-01-10 Tom Tromey <tom@tromey.com>
10835
10836 * python/python.c (python_run_simple_file): Use
10837 unique_xmalloc_ptr, gdbpy_ref.
10838
10839 2017-01-10 Tom Tromey <tom@tromey.com>
10840
10841 * python/py-prettyprint.c (print_stack_unless_memory_error)
10842 (print_string_repr, print_children): Use gdbpy_ref.
10843 (dummy_python_frame): New class.
10844 (dummy_python_frame::dummy_python_frame): Rename from
10845 push_dummy_python_frame.
10846 (py_restore_tstate): Remove.
10847
10848 2017-01-10 Tom Tromey <tom@tromey.com>
10849
10850 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10851
10852 2017-01-10 Tom Tromey <tom@tromey.com>
10853
10854 * python/python.c (ensure_python_env, restore_python_env):
10855 Remove.
10856 * python/python-internal.h (ensure_python_env): Don't declare.
10857 * varobj.h (varobj_ensure_python_env): Don't declare.
10858 * varobj.c (varobj_ensure_python_env): Remove.
10859
10860 2017-01-10 Tom Tromey <tom@tromey.com>
10861
10862 * varobj.c (varobj_value_get_print_value): Use
10863 gdbpy_enter_varobj.
10864
10865 2017-01-10 Tom Tromey <tom@tromey.com>
10866
10867 * python/py-prettyprint.c (print_string_repr, print_children):
10868 Update.
10869 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10870 of "encoding".
10871 * varobj.c (varobj_value_get_print_value): Update.
10872 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10873
10874 2017-01-10 Tom Tromey <tom@tromey.com>
10875
10876 * varobj.c (varobj_get_display_hint)
10877 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10878 (varobj_set_visualizer, free_variable): Use
10879 gdbpy_enter_varobj.
10880
10881 2017-01-10 Tom Tromey <tom@tromey.com>
10882
10883 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10884 (do_finish_initialization): New function. Use gdbpy_ref.
10885 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10886 do_finish_initialization.
10887
10888 2017-01-10 Tom Tromey <tom@tromey.com>
10889
10890 * python/py-param.c (get_set_value, get_show_value): Use
10891 gdbpy_enter, gdbpy_ref.
10892
10893 2017-01-10 Tom Tromey <tom@tromey.com>
10894
10895 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10896
10897 2017-01-10 Tom Tromey <tom@tromey.com>
10898
10899 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10900
10901 2017-01-10 Tom Tromey <tom@tromey.com>
10902
10903 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10904 Use gdbpy_enter_varobj.
10905
10906 2017-01-10 Tom Tromey <tom@tromey.com>
10907
10908 * varobj.c (gdbpy_enter_varobj): New constructor.
10909 * python/python-internal.h (gdbpy_enter_varobj): New class.
10910 * python/py-varobj.c (py_varobj_get_iterator): Use
10911 gdbpy_enter_varobj.
10912
10913 2017-01-10 Tom Tromey <tom@tromey.com>
10914
10915 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10916 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10917 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10918 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10919 unique_xmalloc_ptr.
10920 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10921
10922 2017-01-10 Tom Tromey <tom@tromey.com>
10923
10924 * python/py-xmethods.c (invoke_match_method): Use
10925 gdbpy_ref.
10926
10927 2017-01-10 Tom Tromey <tom@tromey.com>
10928
10929 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10930 gdbpy_enter, gdbpy_ref.
10931
10932 2017-01-10 Tom Tromey <tom@tromey.com>
10933
10934 * python/python.c (python_interactive_command): Use gdbpy_enter.
10935
10936 2017-01-10 Tom Tromey <tom@tromey.com>
10937
10938 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10939 gdbpy_ref.
10940
10941 2017-01-10 Tom Tromey <tom@tromey.com>
10942
10943 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10944 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10945
10946 2017-01-10 Tom Tromey <tom@tromey.com>
10947
10948 * utils.h (htab_deleter): New struct.
10949 (htab_up): New typedef.
10950 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10951 gdbpy_enter, gdbpy_ref, htab_up.
10952
10953 2017-01-10 Tom Tromey <tom@tromey.com>
10954
10955 * python/py-unwind.c (pending_frame_invalidate): Remove.
10956 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10957
10958 2017-01-10 Tom Tromey <tom@tromey.com>
10959
10960 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10961 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10962
10963 2017-01-10 Tom Tromey <tom@tromey.com>
10964
10965 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10966
10967 2017-01-10 Tom Tromey <tom@tromey.com>
10968
10969 * python/python.c (gdbpy_eval_from_control_command)
10970 (gdbpy_source_script, gdbpy_run_events)
10971 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10972 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10973 gdbpy_enter.
10974
10975 2017-01-10 Tom Tromey <tom@tromey.com>
10976
10977 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10978
10979 2017-01-10 Tom Tromey <tom@tromey.com>
10980
10981 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10982
10983 2017-01-10 Tom Tromey <tom@tromey.com>
10984
10985 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10986 (python_on_inferior_call_pre, python_on_inferior_call_post)
10987 (python_on_memory_change, python_on_register_change)
10988 (python_inferior_exit, python_new_objfile, add_thread_object)
10989 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10990
10991 2017-01-10 Tom Tromey <tom@tromey.com>
10992
10993 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10994 (bpfinishpy_handle_exit): Use gdbpy_enter.
10995
10996 2017-01-10 Tom Tromey <tom@tromey.com>
10997
10998 * python/py-cmd.c (cmdpy_destroyer)
10999 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11000 gdbpy_enter.
11001
11002 2017-01-10 Tom Tromey <tom@tromey.com>
11003
11004 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11005 gdbpy_enter.
11006 (gdbpy_breakpoint_has_cond): Likewise.
11007
11008 2017-01-10 Tom Tromey <tom@tromey.com>
11009
11010 * python/python.c (gdbpy_enter): New constructor.
11011 (~gdbpy_enter): New destructor.
11012 (restore_python_env, ensure_python_env): Rewrite.
11013 * python/python-internal.h (gdbpy_enter): New class.
11014
11015 2017-01-10 Tom Tromey <tom@tromey.com>
11016
11017 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11018
11019 2017-01-10 Tom Tromey <tom@tromey.com>
11020
11021 * python/py-value.c (value_has_field, get_field_flag)
11022 (get_field_type, valpy_getitem, convert_value_from_python): Use
11023 gdbpy_ref.
11024
11025 2017-01-10 Tom Tromey <tom@tromey.com>
11026
11027 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11028 gdbpy_ref.
11029
11030 2017-01-10 Tom Tromey <tom@tromey.com>
11031
11032 * python/py-prettyprint.c (search_pp_list)
11033 (find_pretty_printer_from_objfiles)
11034 (find_pretty_printer_from_progspace)
11035 (find_pretty_printer_from_gdb, find_pretty_printer)
11036 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11037 gdbpy_ref.
11038
11039 2017-01-10 Tom Tromey <tom@tromey.com>
11040
11041 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11042
11043 2017-01-10 Tom Tromey <tom@tromey.com>
11044
11045 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11046 (ltpy_get_all_source_lines): Use gdbpy_ref.
11047
11048 2017-01-10 Tom Tromey <tom@tromey.com>
11049
11050 * python/py-framefilter.c (extract_sym, extract_value)
11051 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11052 gdbpy_ref.
11053
11054 2017-01-10 Tom Tromey <tom@tromey.com>
11055
11056 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11057
11058 2017-01-10 Tom Tromey <tom@tromey.com>
11059
11060 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11061
11062 2017-01-10 Tom Tromey <tom@tromey.com>
11063
11064 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11065 gdbpy_ref.
11066
11067 2017-01-10 Tom Tromey <tom@tromey.com>
11068
11069 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11070
11071 2017-01-10 Tom Tromey <tom@tromey.com>
11072
11073 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11074 (typy_range): Use gdbpy_ref.
11075
11076 2017-01-10 Tom Tromey <tom@tromey.com>
11077
11078 * python/py-threadevent.c (create_thread_event_object): Use
11079 gdbpy_ref.
11080 * python/py-stopevent.c (create_stop_event_object): Simplify.
11081 (emit_stop_event): Use gdbpy_ref.
11082 * python/py-signalevent.c (create_signal_event_object): Use
11083 gdbpy_ref.
11084 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11085 (emit_new_objfile_event, create_clear_objfiles_event_object)
11086 (emit_clear_objfiles_event): Use gdbpy_ref.
11087 * python/py-infevents.c (create_inferior_call_event_object)
11088 (create_register_changed_event_object)
11089 (create_memory_changed_event_object, emit_inferior_call_event)
11090 (emit_memory_changed_event, emit_register_changed_event): Use
11091 gdbpy_ref.
11092 * python/py-exitedevent.c (create_exited_event_object)
11093 (emit_exited_event): Use gdbpy_ref.
11094 * python/py-event.h (evpy_emit_event): Remove
11095 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11096 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11097 * python/py-continueevent.c (emit_continue_event): Use
11098 gdbpy_ref.
11099 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11100 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11101 gdbpy_ref.
11102 * python/py-bpevent.c (create_breakpoint_event_object): Use
11103 gdbpy_ref.
11104
11105 2017-01-10 Tom Tromey <tom@tromey.com>
11106
11107 * python/py-ref.h: New file.
11108
11109 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11110
11111 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11112 void.
11113 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11114 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11115 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11116 * ui-out.c (ui_out::redirect): Likewise.
11117 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11118 * cli/cli-logging.c (set_logging_redirect): Update call site of
11119 ui_out::redirect.
11120 (handle_redirections): Likewise.
11121 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11122 * top.c (execute_command_to_string): Likewise.
11123 * utils.c (do_ui_out_redirect_pop): Likewise.
11124
11125 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11126
11127 * stack.c (_initialize_stack): Update "frame" command help message.
11128
11129 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11130
11131 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11132
11133 2017-01-06 Yao Qi <yao.qi@linaro.org>
11134
11135 * x86-linux-nat.h: Include gdb_proc_service.h.
11136
11137 2017-01-06 Yao Qi <yao.qi@linaro.org>
11138
11139 * ser-base.h: Include serial.h.
11140
11141 2017-01-06 Yao Qi <yao.qi@linaro.org>
11142
11143 * ppc-linux-tdep.h: Include ppc-tdep.h.
11144
11145 2017-01-06 Yao Qi <yao.qi@linaro.org>
11146
11147 * nat/amd64-linux-siginfo.h: Include signal.h.
11148
11149 2017-01-06 Yao Qi <yao.qi@linaro.org>
11150
11151 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11152
11153 2017-01-06 Yao Qi <yao.qi@linaro.org>
11154
11155 * mi/mi-parse.h: Include mi-cmds.h.
11156
11157 2017-01-06 Yao Qi <yao.qi@linaro.org>
11158
11159 * inf-loop.c: Don't include "target.h".
11160 * inf-loop.h: Include it here.
11161
11162 2017-01-06 Yao Qi <yao.qi@linaro.org>
11163
11164 * dfp.h: Include "dboulest.h" and "expression.h".
11165
11166 2017-01-06 Yao Qi <yao.qi@linaro.org>
11167
11168 * ax-gdb.h: Include "ax.h".
11169
11170 2017-01-06 Yao Qi <yao.qi@linaro.org>
11171
11172 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11173 with nat/gdb_ptrace.h.
11174
11175 2017-01-05 Yao Qi <yao.qi@linaro.org>
11176
11177 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11178 new line.
11179 (mips64_fbsd_sigframe_init): Likewise.
11180
11181 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11182
11183 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11184 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11185
11186 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11187
11188 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11189 * NEWS: Mention new FreeBSD/mips native configuration.
11190 * config/mips/fbsd.mh: New file.
11191 * configure.host: Add mips*-*-freebsd*.
11192 * mips-fbsd-nat.c: New file.
11193
11194 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11195
11196 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11197 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11198 * NEWS: Mention new FreeBSD/mips target.
11199 * configure.tgt: Add mips*-*-freebsd*.
11200 * mips-fbsd-tdep.c: New file.
11201 * mips-fbsd-tdep.h: New file.
11202
11203 2017-01-04 Yao Qi <yao.qi@linaro.org>
11204
11205 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11206 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11207
11208 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11209
11210 Update copyright year range in all GDB files.
11211
11212 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11213
11214 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11215
11216 For older changes see ChangeLog-2016.
11217 \f
11218 Local Variables:
11219 mode: change-log
11220 left-margin: 8
11221 fill-column: 74
11222 version-control: never
11223 coding: utf-8
11224 End:
This page took 0.34214 seconds and 4 git commands to generate.