x86: Guard against corrupted PLT
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
43573013
SDJ
12017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4 (cd_command): Likewise. Free "current_directory" before
5 assigning to it.
6 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
7 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
8 * top.c (gdb_dirbuf): Remove global declaration.
9 * top.h (gdb_dirbuf): Likewise.
10
6ec2e0f5
SDJ
112017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
12
13 * gnulib/aclocal.m4: Regenerate.
14 * gnulib/config.in: Regenerate.
15 * gnulib/configure: Regenerate.
16 * gnulib/import/Makefile.am: Regenerate.
17 * gnulib/import/Makefile.in: Regenerate.
18 * gnulib/import/assure.h: New file.
19 * gnulib/import/at-func.c: Likewise
20 * gnulib/import/chdir-long.c: New file.
21 * gnulib/import/chdir-long.h: New file.
22 * gnulib/import/cloexec.c: New file.
23 * gnulib/import/cloexec.h: New file.
24 * gnulib/import/close.c: New file.
25 * gnulib/import/closedir.c: New file.
26 * gnulib/import/dirent-private.h: New file.
27 * gnulib/import/dup-safer.c: New file.
28 * gnulib/import/dup.c: New file.
29 * gnulib/import/dup2.c: New file.
30 * gnulib/import/error.c: New file.
31 * gnulib/import/error.h: New file.
32 * gnulib/import/exitfail.c: New file.
33 * gnulib/import/exitfail.h: New file.
34 * gnulib/import/fchdir.c: New file.
35 * gnulib/import/fcntl.c: New file.
36 * gnulib/import/fcntl.in.h: New file.
37 * gnulib/import/fd-hook.c: New file.
38 * gnulib/import/fd-hook.h: New file.
39 * gnulib/import/fd-safer.c: New file.
40 * gnulib/import/fdopendir.c: New file.
41 * gnulib/import/filename.h: New file.
42 * gnulib/import/filenamecat-lgpl.c: New file.
43 * gnulib/import/filenamecat.h: New file.
44 * gnulib/import/fstat.c: New file.
45 * gnulib/import/fstatat.c: New file.
46 * gnulib/import/getcwd-lgpl.c: New file.
47 * gnulib/import/getcwd.c: New file.
48 * gnulib/import/getdtablesize.c: New file.
49 * gnulib/import/getlogin_r.c: New file.
50 * gnulib/import/getprogname.c: New file.
51 * gnulib/import/getprogname.h: New file.
52 * gnulib/import/gettext.h: New file.
53 * gnulib/import/glob-libc.h: New file.
54 * gnulib/import/glob.c: New file.
55 * gnulib/import/glob.in.h: New file.
56 * gnulib/import/intprops.h: New file.
57 * gnulib/import/m4/chdir-long.m4: New file.
58 * gnulib/import/m4/close.m4: New file.
59 * gnulib/import/m4/closedir.m4: New file.
60 * gnulib/import/m4/d-ino.m4: New file.
61 * gnulib/import/m4/d-type.m4: New file.
62 * gnulib/import/m4/dup.m4: New file.
63 * gnulib/import/m4/dup2.m4: New file.
64 * gnulib/import/m4/error.m4: New file.
65 * gnulib/import/m4/fchdir.m4: New file.
66 * gnulib/import/m4/fcntl.m4: New file.
67 * gnulib/import/m4/fcntl_h.m4: New file.
68 * gnulib/import/m4/fdopendir.m4: New file.
69 * gnulib/import/m4/filenamecat.m4: New file.
70 * gnulib/import/m4/fstat.m4: New file.
71 * gnulib/import/m4/fstatat.m4: New file.
72 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
73 * gnulib/import/m4/getcwd-path-max.m4: New file.
74 * gnulib/import/m4/getcwd.m4: New file.
75 * gnulib/import/m4/getdtablesize.m4: New file.
76 * gnulib/import/m4/getlogin_r.m4: New file.
77 * gnulib/import/m4/getprogname.m4: New file.
78 * gnulib/import/m4/glob.m4: New file.
79 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
80 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
81 * gnulib/import/m4/mempcpy.m4: New file.
82 * gnulib/import/m4/memrchr.m4: New file.
83 * gnulib/import/m4/mode_t.m4: New file.
84 * gnulib/import/m4/msvc-inval.m4: New file.
85 * gnulib/import/m4/msvc-nothrow.m4: New file.
86 * gnulib/import/m4/open.m4: New file.
87 * gnulib/import/m4/openat.m4: New file.
88 * gnulib/import/m4/opendir.m4: New file.
89 * gnulib/import/m4/readdir.m4: New file.
90 * gnulib/import/m4/realloc.m4: New file.
91 * gnulib/import/m4/rewinddir.m4: New file.
92 * gnulib/import/m4/save-cwd.m4: New file.
93 * gnulib/import/m4/strdup.m4: New file.
94 * gnulib/import/m4/strerror.m4: New file.
95 * gnulib/import/m4/unistd-safer.m4: New file.
96 * gnulib/import/mempcpy.c: New file.
97 * gnulib/import/memrchr.c: New file.
98 * gnulib/import/msvc-inval.c: New file.
99 * gnulib/import/msvc-inval.h: New file.
100 * gnulib/import/msvc-nothrow.c: New file.
101 * gnulib/import/msvc-nothrow.h: New file.
102 * gnulib/import/open.c: New file.
103 * gnulib/import/openat-die.c: New file.
104 * gnulib/import/openat-priv.h: New file.
105 * gnulib/import/openat-proc.c: New file.
106 * gnulib/import/openat.c: New file.
107 * gnulib/import/openat.h: New file.
108 * gnulib/import/opendir.c: New file.
109 * gnulib/import/pipe-safer.c: New file.
110 * gnulib/import/readdir.c: New file.
111 * gnulib/import/realloc.c: New file.
112 * gnulib/import/rewinddir.c: New file.
113 * gnulib/import/save-cwd.c: New file.
114 * gnulib/import/save-cwd.h: New file.
115 * gnulib/import/strdup.c: New file.
116 * gnulib/import/strerror-override.c: New file.
117 * gnulib/import/strerror-override.h: New file.
118 * gnulib/import/strerror.c: New file.
119 * gnulib/import/unistd--.h: New file.
120 * gnulib/import/unistd-safer.h: New file.
121 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
122 "getcwd" and "glob".
123 * ser-tcp.c: Undefine "close" before redefining it.
124
432ae719
SM
1252017-09-21 Simon Marchi <simon.marchi@ericsson.com>
126
127 * guile/scm-value.c (gdbscm_value_address): Initialize address,
128 get rid of res_val.
129
4fa7574e
RO
1302017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
131
132 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
133 <sol2,sparc>: Likewise.
134 <sol2-64,i386>: Likewise.
135
136 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
137 -Wdeprecated-declarations on *-*-solaris*.
138 * configure: Regenerate.
139
140 * procfs.c: Include "nat/inferior.h".
141 (procfs_info_proc): Fix typo.
142
f6327dcb
KB
1432017-09-21 Kevin Buettner <kevinb@redhat.com>
144
145 * remote.c (vector): Include.
146 (struct private_thread_info): Add field, thread_handle.
147 (free_private_thread_info): Deallocate storage associated with
148 thread handle.
149 (get_private_info_thread): Initialize `thread_handle' field.
150 (struct thread_item): Add field, thread_handle.
151 (clear_threads_listing_context): Deallocate storage associated
152 with thread handle.
153 (start_thread): Add support for "handle" attribute.
154 (thread_attributes): Add "handle".
155 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
156 field.
157 (remote_update_thread_list): Update thread_handle.
158 (remote_thread_handle_to_thread_info): New function.
159 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
160
fbbe5337
KB
1612017-09-21 Kevin Buettner <kevinb@redhat.com>
162
163 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
164 function.
165 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
166 * python/python-internal.h (thread_object_type): Declare.
167
e04ee09e
KB
1682017-09-21 Kevin Buettner <kevinb@redhat.com>
169
170 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
171 (target_thread_handle_to_thread_info): Declare.
172 * target.c (target_thread_handle_to_thread_info): New function.
173 * target-delegates.c: Regenerate.
174 * gdbthread.h (find_thread_by_handle): Declare.
175 * thread.c (find_thread_by_handle): New function.
176 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
177 function.
178 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
179
1e5b66ed
SM
1802017-09-21 Simon Marchi <simon.marchi@ericsson.com>
181
182 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
183
ebe48ba0
SM
1842017-09-21 Simon Marchi <simon.marchi@ericsson.com>
185
186 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
187
0a0bf5dc
YQ
1882017-09-21 Yao Qi <yao.qi@linaro.org>
189
190 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
191 to gdb_target_obs.
192
d1b0a7bf
TT
1932017-09-20 Tom Tromey <tom@tromey.com>
194
195 * breakpoint.c (struct counted_command_line): Remove.
196 (breakpoint_commands): Update.
197 (alloc_counted_command_line, incref_counted_command_line)
198 (decref_counted_command_line, do_cleanup_counted_command_line)
199 (make_cleanup_decref_counted_command_line): Remove.
200 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
201 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
202 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
203 (save_breakpoints): Update.
204 * breakpoint.h (counted_command_line): Now a typedef to
205 shared_ptr.
206 (struct breakpoint) <commands>: Now a counted_command_line.
207 (struct bpstats) <command>: Likewise.
208
48649e1b
TT
2092017-09-20 Tom Tromey <tom@tromey.com>
210
211 * breakpoint.c (struct commands_info, do_map_commands_command):
212 Remove.
213 (commands_command_1): Update.
214 (iterate_over_related_breakpoints): Take a function_view.
215 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
216 (delete_command): Update.
217 (map_breakpoint_numbers): Take a function_view.
218 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
219 (disable_command): Update.
220 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
221 (enable_command): Update.
222 (struct disp_data, do_enable_breakpoint_disp)
223 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
224 (do_map_enable_delete_breakpoint): Remove.
225 (enable_once_command, enable_count_command, enable_delete_command)
226 (delete_trace_variable_command): Update.
227
04afa70c
TT
2282017-09-20 Tom Tromey <tom@tromey.com>
229
230 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
231 (bpstat_clear): Use delete.
232 (bpstats): New constructors.
233 (bpstat_copy, bpstat_stop_status): Use new.
234 (dprintf_after_condition_true): Update.
235 * breakpoint.h (bpstats::bpstats): Add constructors.
236 (bpstats::~bpstats): Add destructor.
237
c83833f4
PA
2382017-09-20 Pedro Alves <palves@redhat.com>
239
240 * eval.c (make_params): Delete, refactored as ...
241 (class fake_method): ... this new type's ctor.
242 (fake_method::~fake_method): New.
243 (evaluate_subexp_standard): Use 'fake_method'.
244
223ffa71
TT
2452017-09-20 Tom Tromey <tom@tromey.com>
246
247 * windows-nat.c (get_windows_debug_event, windows_wait)
248 (do_initial_windows_stuff, windows_attach): Update.
249 * utils.c (vwarning, internal_vproblem): Update.
250 (ui_unregister_input_event_handler_cleanup)
251 (prepare_to_handle_input): Remove.
252 (class scoped_input_handler): New.
253 (defaulted_query, prompt_for_continue): Update.
254 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
255 Update.
256 * top.c (undo_terminal_modifications_before_exit): Update.
257 * target/target.h (target_terminal_init, target_terminal_inferior)
258 (target_terminal_ours): Don't declare.
259 (class target_terminal): New.
260 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
261 (target_terminal_ours_for_output)
262 (make_cleanup_restore_target_terminal): Don't declare.
263 (target_terminal_info): Remove.
264 * target.c (enum terminal_state, terminal_state): Remove.
265 (target_terminal::terminal_state): Define.
266 (target_terminal::init): Rename from target_terminal_init.
267 (target_terminal::inferior): Rename from
268 target_terminal_inferior.
269 (target_terminal::ours): Rename from target_terminal_ours.
270 (target_terminal::ours_for_output): Rename from
271 target_terminal_ours_for_output.
272 (target_terminal::info): New method.
273 (cleanup_restore_target_terminal)
274 (make_cleanup_restore_target_terminal): Remove.
275 * solib.c (handle_solib_event): Update.
276 * remote.c (remote_serial_quit_handler): Update.
277 (remote_terminal_inferior, remote_wait_as): Update.
278 * record-full.c (record_full_wait_1): Update.
279 * nto-procfs.c (procfs_create_inferior): Update.
280 * nat/fork-inferior.c (startup_inferior): Update.
281 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
282 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
283 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
284 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
285 (mi_breakpoint_created, mi_breakpoint_deleted)
286 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
287 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
288 (mi_user_selected_context_changed, report_initial_inferior):
289 Update.
290 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
291 (linux_nat_terminal_inferior): Update.
292 * infrun.c (follow_fork_inferior)
293 (handle_vfork_child_exec_or_exit, do_target_resume)
294 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
295 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
296 Update.
297 * inflow.c (child_terminal_init, info_terminal_command): Update.
298 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
299 (attach_command): Update.
300 * infcall.c (call_thread_fsm_should_stop): Update.
301 * gnu-nat.c (gnu_attach): Update.
302 * extension.c (struct active_ext_lang_state)
303 (restore_active_ext_lang): Update.
304 * exceptions.c (print_flush): Update.
305 * event-top.c (async_enable_stdin, default_quit_handler): Update.
306 (struct quit_handler_cleanup_data, restore_quit_handler)
307 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
308 Remove.
309 * cp-support.c (gdb_demangle): Update.
310 * breakpoint.c (update_inserted_breakpoint_locations)
311 (insert_breakpoint_locations, handle_jit_event)
312 (disable_breakpoints_in_unloaded_shlib): Update.
313 * annotate.c (annotate_breakpoints_invalid)
314 (annotate_frames_invalid): Update.
315
013af3fc
TT
3162017-09-20 Tom Tromey <tom@tromey.com>
317
318 * main.c (catch_command_errors): Rename from
319 catch_command_errors_const.
320 (captured_main_1): Update.
321
06871ae8
PA
3222017-09-20 Pedro Alves <palves@redhat.com>
323
324 * cli/cli-cmds.c (list_command): Use print_sal_location.
325 (print_sal_location): New function.
326 (ambiguous_line_spec): Use print_sal_location.
327 * linespec.c (symbol_to_sal): Record the symbol in the sal.
328 * symtab.c (find_function_start_sal): Likewise.
329 * symtab.h (symtab_and_line::symbol): New field.
330
e5f25bc5
PA
3312017-09-20 Pedro Alves <palves@redhat.com>
332
333 * linespec.c (minsym_found): Handle non-text minsyms.
334 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
335
1b7fa39e
WT
3362017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
337
338 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
339 backslash.
340
37dd0825
WT
3412017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
342
343 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
344 vmovups instead vmovaps.
345 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
346
4e5a4f58
JB
3472017-09-19 John Baldwin <jhb@FreeBSD.org>
348
349 * NEWS (Changes since GDB 8.0): Add starti.
350 * infcmd.c (enum run_break): New.
351 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
352 case.
353 (run_command): Use enum run_how.
354 (start_command): Likewise.
355 (starti_command): New function.
356 (RUN_ARGS_HELP): New macro.
357 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
358 commands. Add starti command.
359
aa70c9f1
YQ
3602017-09-19 Yao Qi <yao.qi@linaro.org>
361
362 * Makefile.in (monitor.o): Remove the rule.
363
d6541620
YQ
3642017-09-19 Yao Qi <yao.qi@linaro.org>
365
366 * annotate.h (struct annotate_arg_emitter): Use
367 DISABLE_COPY_AND_ASSIGN.
368 * common/refcounted-object.h (refcounted_object): Likewise.
369 * completer.h (struct completion_result): Likewise.
370 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
371 * filename-seen-cache.h (filename_seen_cache): Likewise.
372 * gdbcore.h (thread_section_name): Likewise.
373 * gdb_regex.h (compiled_regex): Likewise.
374 * gdbthread.h (scoped_restore_current_thread): Likewise.
375 * inferior.h (scoped_restore_current_inferior): Likewise.
376 * jit.c (jit_reader): Likewise.
377 * linespec.h (struct linespec_result): Likewise.
378 * mi/mi-parse.h (struct mi_parse): Likewise.
379 * nat/fork-inferior.c (execv_argv): Likewise.
380 * progspace.h (scoped_restore_current_program_space): Likewise.
381 * python/python-internal.h (class gdbpy_enter): Likewise.
382 * regcache.h (regcache): Likewise.
383 * target-descriptions.c (struct tdesc_reg): Likewise.
384 (struct tdesc_type): Likewise.
385 (struct tdesc_feature): Likewise.
386 * ui-out.h (ui_out_emit_type): Likewise.
387
0615127c
SM
3882017-09-18 Simon Marchi <simon.marchi@ericsson.com>
389
390 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
391 label abort_expression.
392
5e187554
SM
3932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
394
395 * common/buffer.c (buffer_xml_printf): Adjust.
396 * common/xml-utils.c (xml_escape_text): Change return type to
397 std::string, update code accordingly.
398 * common/xml-utils.h (xml_escape_text): Change return type to
399 std::string.
400 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
401 * windows-tdep.c (windows_xfer_shared_library): Adjust.
402 * unittests/xml-utils-selftests.c (test_xml_escape_text):
403 Adjust.
404
c3d7b541
SM
4052017-09-16 Simon Marchi <simon.marchi@ericsson.com>
406
407 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
408 (SUBDIR_UNITTESTS_OBS): Add new object file.
409 * unittests/xml-utils-selftests.c: New file.
410
1526853e
SM
4112017-09-16 Simon Marchi <simon.marchi@ericsson.com>
412
413 * common/selftest.h (selftest): New struct/interface.
414 (register_test): Add name parameter, add new overload.
415 (run_tests): Add filter parameter.
416 (for_each_selftest_ftype): New typedef.
417 (for_each_selftest): New declaration.
418 * common/selftest.c (tests): Change type to
419 map<string, unique_ptr<selftest>>.
420 (simple_selftest): New struct.
421 (register_test): New function.
422 (register_test): Add name parameter and use it.
423 (run_tests): Add filter parameter and use it. Add prints.
424 Adjust to vector -> map change.
425 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
426 registering selftests.
427 * arm-tdep.c (_initialize_arm_tdep): Likewise.
428 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
429 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
430 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
431 * findvar.c (_initialize_findvar): Likewise.
432 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
433 * maint.c (maintenance_selftest): Update call to run_tests.
434 (maintenance_info_selftests): New function.
435 (_initialize_maint_cmds): Register "maintenance info selftests"
436 command. Update "maintenance selftest" doc.
437 * regcache.c (_initialize_regcache): Add names when registering
438 selftests.
439 * rust-exp.y (_initialize_rust_exp): Likewise.
440 * selftest-arch.c (gdbarch_selftest): New struct.
441 (gdbarch_tests): Remove.
442 (register_test_foreach_arch): Add name parameter. Call
443 register_test.
444 (tests_with_arch): Remove, move most content to
445 gdbarch_selftest::operator().
446 (_initialize_selftests_foreach_arch): Remove.
447 * selftest-arch.h (register_test_foreach_arch): Add name
448 parameter.
449 (run_tests_with_arch): New declaration.
450 * utils-selftests.c (_initialize_utils_selftests): Add names
451 when registering selftests.
452 * utils.c (_initialize_utils): Likewise.
453 * unittests/array-view-selftests.c
454 (_initialize_array_view_selftests): Likewise.
455 * unittests/environ-selftests.c (_initialize_environ_selftests):
456 Likewise.
457 * unittests/function-view-selftests.c
458 (_initialize_function_view_selftests): Likewise.
459 * unittests/offset-type-selftests.c
460 (_initialize_offset_type_selftests): Likewise.
461 * unittests/optional-selftests.c
462 (_initialize_optional_selftests): Likewise.
463 * unittests/scoped_restore-selftests.c
464 (_initialize_scoped_restore_selftests): Likewise.
465 * NEWS: Document "maintenance selftest" and "maint info
466 selftests".
467
5846367a
SM
4682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
469
470 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
471 scoped_restore.
472
bd77e8ff
SM
4732017-09-16 Simon Marchi <simon.marchi@ericsson.com>
474
475 * mi/mi-main.c (mi_load_progress): Make uiout variable
476 a unique_ptr.
477
26a67918
PA
4782017-09-15 Pedro Alves <palves@redhat.com>
479
480 * compile/compile-c-types.c (convert_enum, convert_int)
481 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
482
3f8a7804
SM
4832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
484
485 * dwarf2read.c (copy_string): Remove.
486 (parse_macro_definition): Replace copy_string with savestring.
487
8d200706
YQ
4882017-09-15 Yao Qi <yao.qi@linaro.org>
489
490 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
491 gdb_target_obs.
492 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
493 Likewise.
494 (i[34567]86-*-linux*): Likewise.
495
d185219d
SM
4962017-09-14 Simon Marchi <simon.marchi@ericsson.com>
497
498 * dwarf2expr.h (dwarf_stack_value): Add constructor.
499 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
500 <stack>: Change type to std::vector.
501 <stack_len, stack_allocated>: Remove.
502 <grow_stack>: Remove.
503 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
504 (dwarf_expr_context::~dwarf_expr_context): Remove.
505 (dwarf_expr_context::grow_stack): Remove.
506 (dwarf_expr_context::push): Adjust.
507 (dwarf_expr_context::pop): Adjust.
508 (dwarf_expr_context::fetch): Adjust.
509 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
510 (dwarf_expr_context::stack_empty_p): Adjust.
511 (dwarf_expr_context::execute_stack_op): Adjust.
512
eccd80d6
SM
5132017-09-14 Simon Marchi <simon.marchi@ericsson.com>
514
515 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
516 return type to bool.
517 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
518
69009882
SM
5192017-09-14 Simon Marchi <simon.marchi@ericsson.com>
520
521 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
522 Change type to bool.
523 (dwarf_stack_value) <in_stack_memory>: Likewise.
524 (dwarf_expr_context) <push_address>: Change parameter type to
525 bool.
526 <fetch_in_stack_memory>: Change return type to bool.
527 <push>: Change parameter type to bool.
528 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
529 to bool.
530 (dwarf_expr_context::push_address): Likewise.
531 (dwarf_expr_context::fetch_in_stack_memory): Change return type
532 to bool.
533 (dwarf_expr_context::execute_stack_op): Adjust.
534 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
535
1e467161
SM
5362017-09-14 Simon Marchi <simon.marchi@ericsson.com>
537
538 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
539 (struct dwarf_expr_context) <n_pieces>: Remove.
540 <pieces>: Change type to std::vector.
541 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
542 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
543 pieces.
544 (dwarf_expr_context::add_piece): Adjust.
545 * dwarf2loc.c (struct piece_closure): Initialize fields.
546 <n_pieces>: Remove.
547 <pieces>: Change type to std::vector.
548 (allocate_piece_closure): Adjust, change parameter to
549 std::vector rvalue and std::move it to piece_closure.
550 (rw_pieced_value): Adjust.
551 (check_pieced_synthetic_pointer): Adjust.
552 (indirect_synthetic_pointer): Adjust.
553 (coerce_pieced_ref): Adjust.
554 (free_pieced_value_closure): Adjust. Use delete to free
555 piece_closure.
556 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
557 to allocate_piece_closure.
558 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
559
0782db84
SM
5602017-09-12 Simon Marchi <simon.marchi@ericsson.com>
561
562 * probe.h (probe_ops_cp): Remove typedef.
563 (DEF_VEC_P (probe_ops_cp)): Remove.
564 (all_probe_ops): Change type to std::vector.
565 * probe.c (info_probes_for_ops): Adjust to vector change.
566 (probe_linespec_to_ops): Likewise.
567 (all_probe_ops): Change type to std::vector.
568 (_initialize_probe): Adjust to vector change.
569 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
570 * elfread.c (elf_get_probes): Likewise.
571 * stap-probe.c (_initialize_stap_probe): Likewise.
572
1eac6bea
SM
5732017-09-12 Simon Marchi <simon.marchi@ericsson.com>
574
575 * probe.h (struct bound_probe): Define constructors.
576 * probe.c (bound_probe_s): Remove typedef.
577 (DEF_VEC_O (bound_probe_s)): Remove VEC.
578 (collect_probes): Change return type to std::vector, remove
579 cleanup.
580 (compare_probes): Return bool, change parameter type. Change
581 semantic to "less than".
582 (gen_ui_out_table_header_info): Change parameter to std::vector
583 and update.
584 (exists_probe_with_pops): Likewise.
585 (info_probes_for_ops): Update to std::vector change.
586 (enable_probes_command): Likewise.
587 (disable_probes_command): Likewise.
588
aaa63a31
SM
5892017-09-12 Simon Marchi <simon.marchi@ericsson.com>
590
591 * probe.h (struct probe_ops) <get_probes>: Change parameter from
592 vec to std::vector.
593 * probe.c (parse_probes_in_pspace): Update.
594 (find_probes_in_objfile): Update.
595 (find_probe_by_pc): Update.
596 (collect_probes): Update.
597 (probe_any_get_probes): Update.
598 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
599 return type to reference to std::vector.
600 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
601 std::vector and update.
602 (dtrace_process_dof): Likewise.
603 (dtrace_get_probes): Likewise.
604 * elfread.c (elf_get_probes): Change return type to std::vector,
605 store an std::vector in bfd_data.
606 (probe_key_free): Update to std::vector.
607 * stap-probe.c (handle_stap_probe): Change parameter to
608 std::vector and update.
609 (stap_get_probes): Likewise.
610 * symfile-debug.c (debug_sym_get_probes): Change return type to
611 std::vector and update.
612
cb85b21b
TT
6132017-09-11 Tom Tromey <tom@tromey.com>
614
615 * breakpoint.c (program_breakpoint_here_p): Update.
616 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
617 from make_show_memory_breakpoints_cleanup. Return a
618 scoped_restore_tmpl<int>.
619 (restore_show_memory_breakpoints): Remove.
620 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
621 * mem-break.c (memory_validate_breakpoint): Update.
622 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
623 (ia64_memory_remove_breakpoint): Update.
624 (ia64_breakpoint_from_pc): Update.
625 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
626 from make_show_memory_breakpoints_cleanup.
627
8fbc99ef
TT
6282017-09-11 Tom Tromey <tom@tromey.com>
629
630 * d-namespace.c (d_lookup_symbol): Use std::string.
631 (find_symbol_in_baseclass): Likewise.
632
50feb4bd
TT
6332017-09-11 Tom Tromey <tom@tromey.com>
634
635 * ctf.c (ctf_start): Use std::string.
636
c6dc63a1
TT
6372017-09-11 Tom Tromey <tom@tromey.com>
638
639 * ada-lang.c (is_known_support_routine): Update.
640 (ada_unhandled_exception_name_addr_from_raise): Update.
641 * guile/scm-frame.c (gdbscm_frame_name): Update.
642 * python/py-frame.c (frapy_name): Update.
643 (frapy_function): Update.
644 * stack.h (find_frame_funname): Update.
645 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
646 (print_frame): Update.
647
d6b9b80f
TT
6482017-09-11 Tom Tromey <tom@tromey.com>
649
650 * findcmd.c (put_bits): Take a gdb::byte_vector.
651 (parse_find_args): Return gdb::byte_vector. "args" now const.
652 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
653 cleanups.
654 (find_command): Update.
655
a9921622
TT
6562017-09-11 Tom Tromey <tom@tromey.com>
657
658 * cli/cli-script.c (class scoped_restore_hook_in): New.
659 (clear_hook_in_cleanup): Remove.
660 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
661 scoped_restore_hook_in.
662
be0d7abb
TT
6632017-09-11 Tom Tromey <tom@tromey.com>
664
665 * cli/cli-script.c (restore_interp): Remove.
666 (read_command_lines): Use scoped_restore_interp.
667 * interps.c (scoped_restore_interp::set_temp): Rename from
668 interp_set_temp.
669 * interps.h (class scoped_restore_interp): New.
670 (interp_set_temp): Remove.
671
00f675ff
TT
6722017-09-11 Tom Tromey <tom@tromey.com>
673
674 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
675 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
676 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
677 scoped_restore.
678 (mi_cmd_break_insert_1): Update.
679 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
680 scoped_restore.
681
cb791d59
TT
6822017-09-11 Tom Tromey <tom@tromey.com>
683
684 * demangle.c (demangle_command): Update.
685 * breakpoint.c (disable_command): Update.
686 (enable_command): Update.
687 (find_location_by_number): Make "number" const. Use
688 get_number_trailer.
689 * cli/cli-utils.c (extract_arg): Return std::string.
690 * probe.c (parse_probe_linespec): Update. Change types.
691 (collect_probes): Take string arguments.
692 (parse_probe_linespec): Likewise.
693 (info_probes_for_ops): Update.
694 (enable_probes_command): Update.
695 (disable_probes_command): Update.
696 * break-catch-sig.c (catch_signal_split_args): Update.
697 * mi/mi-parse.c (mi_parse): Update.
698
2039bd9f
TT
6992017-09-11 Tom Tromey <tom@tromey.com>
700
701 * language.h (language_enum): Make argument const.
702 * language.c (language_enum): Make argument const.
703
f1735a53
TT
7042017-09-11 Tom Tromey <tom@tromey.com>
705
706 * common/common-utils.h (skip_to_space): Remove macro, redeclare
707 as function.
708 (skip_to_space): Rename from skip_to_space_const.
709 * common/common-utils.c (skip_to_space): New function.
710 (skip_to_space): Rename from skip_to_space_const.
711 * cli/cli-utils.h (get_number): Rename from get_number_const.
712 (extract_arg): Rename from extract_arg_const.
713 * cli/cli-utils.c (get_number): Rename from get_number_const.
714 (extract_arg): Rename from extract_arg_const.
715 (number_or_range_parser::get_number): Use ::get_number.
716 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
717 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
718 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
719 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
720 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
721 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
722 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
723 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
724
7d221d74
TT
7252017-09-11 Tom Tromey <tom@tromey.com>
726
727 * python/python.c (do_start_initialization): Use
728 py-event-types.def to initialize types.
729 Define all object type structures.
730 * python/python-internal.h: Don't declare event initialization
731 functions.
732 * python/py-threadevent.c (thread_event_object_type): Don't
733 define.
734 * python/py-stopevent.c (stop_event_object_type): Don't define.
735 * python/py-signalevent.c (signal_event_object_type): Don't
736 declare or define.
737 * python/py-newobjfileevent.c (new_objfile_event_object_type)
738 (clear_objfiles_event_object_type): Don't declare or define.
739 * python/py-infevents.c (inferior_call_pre_event_object_type)
740 (inferior_call_post_event_object_type)
741 (register_changed_event_object_type)
742 (memory_changed_event_object_type): Don't declare or define.
743 * python/py-inferior.c (new_thread_event_object_type)
744 (new_inferior_event_object_type)
745 (inferior_deleted_event_object_type): Don't declare or define.
746 * python/py-exitedevent.c (exited_event_object_type): Don't
747 declare or define.
748 * python/py-evts.c (gdbpy_initialize_py_events): Use
749 py-all-events.def.
750 * python/py-events.h (thread_event_object_type): Don't declare.
751 (events_object): Use py-all-events.def.
752 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
753 py-event-types.def.
754 * python/py-event-types.def: New file.
755 * python/py-continueevent.c (create_continue_event_object): Don't
756 declare or define.
757 * python/py-bpevent.c (breakpoint_event_object_type): Don't
758 declare or define.
759 * python/py-all-events.def: New file.
760
35c61a1d
TT
7612017-09-11 Tom Tromey <tom@tromey.com>
762
763 * python/py-threadevent.c (create_thread_event_object): Return
764 gdbpy_ref.
765 * python/py-stopevent.h (create_stop_event_object)
766 (create_breakpoint_event_object, create_signal_event_object):
767 Update.
768 * python/py-stopevent.c (create_stop_event_object): Return
769 gdbpy_ref.
770 (emit_stop_event): Update.
771 * python/py-signalevent.c (create_signal_event_object): Return
772 gdbpy_ref.
773 * python/py-infevents.c (create_inferior_call_event_object):
774 Update.
775 * python/py-event.h (create_event_object)
776 (create_thread_event_object): Update.
777 * python/py-event.c (create_event_object): Return gdbpy_ref.
778 * python/py-continueevent.c: Return gdbpy_ref.
779 * python/py-bpevent.c (create_breakpoint_event_object): Return
780 gdbpy_ref.
781
7c96f8c1
TT
7822017-09-11 Tom Tromey <tom@tromey.com>
783
784 PR python/15622:
785 * NEWS: Add entry.
786 * python/python.c (do_start_initialization): Initialize new event
787 types.
788 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
789 (gdbpy_initialize_inferior_deleted_event)
790 (gdbpy_initialize_new_thread_event): Declare.
791 * python/py-threadevent.c (create_thread_event_object): Add option
792 "thread" parameter.
793 * python/py-inferior.c (new_thread_event_object_type)
794 (new_inferior_event_object_type)
795 (inferior_deleted_event_object_type): Declare.
796 (python_new_inferior, python_inferior_deleted): New functions.
797 (add_thread_object): Emit new_thread event.
798 (gdbpy_initialize_inferior): Attach new functions to corresponding
799 observers.
800 (new_thread, new_inferior, inferior_deleted): Define new event
801 types.
802 * python/py-evts.c (gdbpy_initialize_py_events): Add new
803 registries.
804 * python/py-events.h (events_object) <new_inferior,
805 inferior_deleted, new_thread>: New fields.
806 * python/py-event.h (create_thread_event_breakpoint): Add optional
807 "thread" parameter.
808
72542b8e
AB
8092017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
810
811 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
812 check current_ui instead.
813 (internal_vproblem): Likewise.
814
0d64823e
SM
8152017-09-09 Simon Marchi <simon.marchi@ericsson.com>
816
817 * thread.c (print_thread_info_1): Remove unnecessary calls to
818 uiout->is_mi_like_p.
819
eb1e02fd
TT
8202017-09-09 Tom Tromey <tom@tromey.com>
821
822 * namespace.h (add_using_directive): Update.
823 * namespace.c (add_using_directive): Change type of excludes to
824 std::vector.
825 * dwarf2read.c (read_import_statement): Use std::vector.
826 (read_namespace): Update.
827 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
828
0fc21fd8
TT
8292017-09-09 Tom Tromey <tom@tromey.com>
830
831 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
832
49663d05
TT
8332017-09-09 Tom Tromey <tom@tromey.com>
834
835 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
836
0b868b60
TT
8372017-09-09 Tom Tromey <tom@tromey.com>
838
839 * stack.c (func_command): Use gdb::def_vector.
840
c0470d48
TT
8412017-09-09 Tom Tromey <tom@tromey.com>
842
843 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
844 ui_out_emit_list, ui_out_emit_tuple.
845 (mi_cmd_var_update): Likewise.
846
ca5909c7
TT
8472017-09-09 Tom Tromey <tom@tromey.com>
848
849 * mi/mi-interp.c (mi_user_selected_context_changed): Use
850 ui_out_redirect_pop.
851 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
852 ui_out_redirect_pop.
853 * utils.c (do_ui_out_redirect_pop)
854 (make_cleanup_ui_out_redirect_pop): Remove.
855 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
856 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
857 * ui-out.h (ui_out_redirect_pop): New class.
858
e6a2252a
TT
8592017-09-09 Tom Tromey <tom@tromey.com>
860
861 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
862 (list_available_thread_groups, mi_cmd_list_thread_groups)
863 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
864 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
865 Likewise.
866
393702cd
TT
8672017-09-09 Tom Tromey <tom@tromey.com>
868
869 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
870 ui_out_emit_tuple.
871
76f9c9cf
TT
8722017-09-09 Tom Tromey <tom@tromey.com>
873
874 * target.c (flash_erase_command): Use ui_out_emit_tuple.
875 * stack.c (print_frame): Use ui_out_emit_tuple.
876 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
877 (info_spu_mailbox_command, info_spu_dma_command)
878 (info_spu_proxydma_command): Likewise.
879 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
880 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
881 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
882 ui_out_emit_tuple.
883 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
884
dc9fe180
TT
8852017-09-09 Tom Tromey <tom@tromey.com>
886
887 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
888 (class ui_out_emit_table): Update comment.
889 * ui-out.c (do_cleanup_table_end)
890 (make_cleanup_ui_out_table_begin_end): Remove.
891 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
892 (info_spu_dma_cmdlist): Likewise.
893 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
894 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
895 ui_out_emit_table.
896
f8cc3da6
TT
8972017-09-09 Tom Tromey <tom@tromey.com>
898
899 * thread.c (print_thread_info_1): Use ui_out_emit_table,
900 ui_out_emit_list, gdb::optional.
901
481695ed
JB
9022017-09-09 John Baldwin <jhb@FreeBSD.org>
903
904 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
905 prototype.
906 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
907 prototype.
908 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
909 prototype.
910 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
911 * ada-exp.y: Remove _initialize_ada_exp prototype.
912 * ada-lang.c: Remove _initialize_ada_language prototype.
913 * ada-tasks.c: Remove _initialize_tasks prototype.
914 * addrmap.c: Remove _initialize_addrmap prototype.
915 * agent.c: Remove _initialize_agent prototype.
916 * aix-thread.c: Remove _initialize_aix_thread prototype.
917 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
918 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
919 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
920 prototype.
921 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
922 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
923 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
924 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
925 prototype.
926 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
927 prototype.
928 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
929 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
930 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
931 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
932 prototype.
933 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
934 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
935 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
936 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
937 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
938 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
939 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
940 prototype.
941 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
942 prototype.
943 * annotate.c: Remove _initialize_annotate prototype.
944 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
945 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
946 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
947 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
948 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
949 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
950 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
951 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
952 prototype.
953 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
954 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
955 * auto-load.c: Remove _initialize_auto_load prototype.
956 * auxv.c: Remove _initialize_auxv prototype.
957 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
958 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
959 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
960 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
961 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
962 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
963 prototype.
964 * break-catch-throw.c: Remove _initialize_break_catch_throw
965 prototype.
966 * breakpoint.c: Remove _initialize_breakpoint prototype.
967 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
968 * btrace.c: Remove _initialize_btrace prototype.
969 * charset.c: Remove _initialize_charset prototype.
970 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
971 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
972 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
973 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
974 * cli/cli-script.c: Remove _initialize_cli_script prototype.
975 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
976 * coffread.c: Remove _initialize_coffread prototype.
977 * compile/compile.c: Remove _initialize_compile prototype.
978 * complaints.c: Remove _initialize_complaints prototype.
979 * completer.c: Remove _initialize_completer prototype.
980 * copying.awk: Remove _initialize_copying prototype.
981 * copying.c: Regenerate.
982 * core-regset.c: Remove _initialize_core_regset prototype.
983 * corefile.c: Remove _initialize_core prototype.
984 * corelow.c: Remove _initialize_corelow prototype.
985 * cp-abi.c: Remove _initialize_cp_abi prototype.
986 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
987 * cp-support.c: Remove _initialize_cp_support prototype.
988 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
989 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
990 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
991 * ctf.c: Remove _initialize_ctf prototype.
992 * d-lang.c: Remove _initialize_d_language prototype.
993 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
994 prototype.
995 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
996 * dbxread.c: Remove _initialize_dbxread prototype.
997 * dcache.c: Remove _initialize_dcache prototype.
998 * demangle.c: Remove _initialize_demangler prototype.
999 * disasm-selftests.c: Remove _initialize_disasm_selftests
1000 prototype.
1001 * disasm.c: Remove _initialize_disasm prototype.
1002 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1003 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1004 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1005 prototype.
1006 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1007 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1008 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1009 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1010 * elfread.c: Remove _initialize_elfread prototype.
1011 * exec.c: Remove _initialize_exec prototype.
1012 * extension.c: Remove _initialize_extension prototype.
1013 * f-lang.c: Remove _initialize_f_language prototype.
1014 * f-valprint.c: Remove _initialize_f_valprint prototype.
1015 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1016 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1017 * filesystem.c: Remove _initialize_filesystem prototype.
1018 * findcmd.c: Remove _initialize_mem_search prototype.
1019 * fork-child.c: Remove _initialize_fork_child prototype.
1020 * frame-base.c: Remove _initialize_frame_base prototype.
1021 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1022 * frame.c: Remove _initialize_frame prototype.
1023 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1024 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1025 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1026 * gcore.c: Remove _initialize_gcore prototype.
1027 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1028 * gdbarch.c: Regenerate.
1029 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1030 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1031 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1032 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1033 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1034 * go-lang.c: Remove _initialize_go_language prototype.
1035 * go32-nat.c: Remove _initialize_go32_nat prototype.
1036 * guile/guile.c: Remove _initialize_guile prototype.
1037 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1038 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1039 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1040 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1041 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1042 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1043 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1044 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1045 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1046 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1047 prototype.
1048 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1049 prototype.
1050 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1051 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1052 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1053 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1054 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1055 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1056 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1057 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1058 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1059 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1060 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1061 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1062 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1063 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1064 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1065 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1066 prototype.
1067 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1068 prototype.
1069 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1070 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1071 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1072 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1073 * infcall.c: Remove _initialize_infcall prototype.
1074 * infcmd.c: Remove _initialize_infcmd prototype.
1075 * inferior.c: Remove _initialize_inferiors prototype.
1076 * inflow.c: Remove _initialize_inflow prototype.
1077 * infrun.c: Remove _initialize_infrun prototype.
1078 * interps.c: Remove _initialize_interpreter prototype.
1079 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1080 * jit.c: Remove _initialize_jit prototype.
1081 * language.c: Remove _initialize_language prototype.
1082 * linux-fork.c: Remove _initialize_linux_fork prototype.
1083 * linux-nat.c: Remove _initialize_linux_nat prototype.
1084 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1085 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1086 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1087 * m2-lang.c: Remove _initialize_m2_language prototype.
1088 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1089 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1090 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1091 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1092 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1093 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1094 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1095 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1096 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1097 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1098 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1099 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1100 * machoread.c: Remove _initialize_machoread prototype.
1101 * macrocmd.c: Remove _initialize_macrocmd prototype.
1102 * macroscope.c: Remove _initialize_macroscope prototype.
1103 * maint.c: Remove _initialize_maint_cmds prototype.
1104 * mdebugread.c: Remove _initialize_mdebugread prototype.
1105 * memattr.c: Remove _initialize_mem prototype.
1106 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1107 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1108 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1109 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1110 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1111 * microblaze-linux-tdep.c: Remove
1112 _initialize_microblaze_linux_tdep prototype.
1113 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1114 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1115 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1116 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1117 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1118 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1119 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1120 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1121 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1122 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1123 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1124 prototype.
1125 * mipsread.c: Remove _initialize_mipsread prototype.
1126 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1127 prototype.
1128 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1129 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1130 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1131 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1132 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1133 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1134 prototype.
1135 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1136 * nto-procfs.c: Remove _initialize_procfs prototype.
1137 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1138 * objc-lang.c: Remove _initialize_objc_language prototype.
1139 * objfiles.c: Remove _initialize_objfiles prototype.
1140 * observer.c: Remove observer_test_first_notification_function,
1141 observer_test_second_notification_function,
1142 observer_test_third_notification_function, and
1143 _initialize_observer prototypes.
1144 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1145 * osabi.c: Remove _initialize_gdb_osabi prototype.
1146 * osdata.c: Remove _initialize_osdata prototype.
1147 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1148 * parse.c: Remove _initialize_parse prototype.
1149 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1150 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1151 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1152 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1153 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1154 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1155 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1156 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1157 * printcmd.c: Remove _initialize_printcmd prototype.
1158 * probe.c: Remove _initialize_probe prototype.
1159 * proc-api.c: Remove _initialize_proc_api prototype.
1160 * proc-events.c: Remove _initialize_proc_events prototype.
1161 * proc-service.c: Remove _initialize_proc_service prototype.
1162 * procfs.c: Remove _initialize_procfs prototype.
1163 * psymtab.c: Remove _initialize_psymtab prototype.
1164 * python/python.c: Remove _initialize_python prototype.
1165 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1166 * record-btrace.c: Remove _initialize_record_btrace prototype.
1167 * record-full.c: Remove _initialize_record_full prototype.
1168 * record.c: Remove _initialize_record prototype.
1169 * regcache.c: Remove _initialize_regcache prototype.
1170 * reggroups.c: Remove _initialize_reggroup prototype.
1171 * remote-notif.c: Remove _initialize_notif prototype.
1172 * remote-sim.c: Remove _initialize_remote_sim prototype.
1173 * remote.c: Remove _initialize_remote prototype.
1174 * reverse.c: Remove _initialize_reverse prototype.
1175 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1176 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1177 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1178 prototype.
1179 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1180 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1181 * rust-exp.y: Remove _initialize_rust_exp prototype.
1182 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1183 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1184 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1185 * score-tdep.c: Remove _initialize_score_tdep prototype.
1186 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1187 prototype.
1188 * ser-go32.c: Remove _initialize_ser_dos prototype.
1189 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1190 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1191 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1192 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1193 * serial.c: Remove _initialize_serial prototype.
1194 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1195 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1196 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1197 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1198 * skip.c: Remove _initialize_step_skip prototype.
1199 * sol-thread.c: Remove _initialize_sol_thread prototype.
1200 * solib-aix.c: Remove _initialize_solib_aix prototype.
1201 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1202 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1203 * solib-frv.c: Remove _initialize_frv_solib prototype.
1204 * solib-spu.c: Remove _initialize_spu_solib prototype.
1205 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1206 * solib-target.c: Remove _initialize_solib_target prototype.
1207 * solib.c: Remove _initialize_solib prototype.
1208 * source.c: Remove _initialize_source prototype.
1209 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1210 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1211 prototype.
1212 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1213 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1214 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1215 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1216 prototype.
1217 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1218 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1219 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1220 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1221 prototype.
1222 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1223 prototype.
1224 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1225 prototype.
1226 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1227 prototype.
1228 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1229 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1230 prototype.
1231 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1232 prototype.
1233 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1234 prototype.
1235 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1236 prototype.
1237 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1238 prototype.
1239 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1240 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1241 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1242 * stabsread.c: Remove _initialize_stabsread prototype.
1243 * stack.c: Remove _initialize_stack prototype.
1244 * stap-probe.c: Remove _initialize_stap_probe prototype.
1245 * std-regs.c: Remove _initialize_frame_reg prototype.
1246 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1247 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1248 * symfile.c: Remove _initialize_symfile prototype.
1249 * symmisc.c: Remove _initialize_symmisc prototype.
1250 * symtab.c: Remove _initialize_symtab prototype.
1251 * target-dcache.c: Remove _initialize_target_dcache prototype.
1252 * target-descriptions.c: Remove _initialize_target_descriptions
1253 prototype.
1254 * thread.c: Remove _initialize_thread prototype.
1255 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1256 prototype.
1257 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1258 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1259 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1260 prototype.
1261 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1262 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1263 * tracefile.c: Remove _initialize_tracefile prototype.
1264 * tracepoint.c: Remove _initialize_tracepoint prototype.
1265 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1266 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1267 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1268 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1269 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1270 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1271 * tui/tui.c: Remove _initialize_tui prototype.
1272 * typeprint.c: Remove _initialize_typeprint prototype.
1273 * user-regs.c: Remove _initialize_user_regs prototype.
1274 * utils.c: Remove _initialize_utils prototype.
1275 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1276 * valarith.c: Remove _initialize_valarith prototype.
1277 * valops.c: Remove _initialize_valops prototype.
1278 * valprint.c: Remove _initialize_valprint prototype.
1279 * value.c: Remove _initialize_values prototype.
1280 * varobj.c: Remove _initialize_varobj prototype.
1281 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1282 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1283 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1284 * windows-nat.c: Remove _initialize_windows_nat,
1285 _initialize_check_for_gdb_ini, and _initialize_loadable
1286 prototypes.
1287 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1288 * xcoffread.c: Remove _initialize_xcoffread prototype.
1289 * xml-support.c: Remove _initialize_xml_support prototype.
1290 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1291 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1292 prototype.
1293 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1294 prototype.
1295 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1296
a611b5cb
KS
12972017-09-08 Keith Seitz <keiths@redhat.com>
1298
1299 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1300 field.
1301
469412dd
CW
13022017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1303
1304 * f-valprint.c (f_val_print): Remove check for one byte
1305 sized integers. Remove printing of character type.
1306
a5ad232b
FP
13072017-09-08 Frank Penczek <frank.penczek@intel.com>
1308 Christoph Weinmann <christoph.t.weinmann@intel.com>
1309 Bernhard Heckel <bernhard.heckel@intel.com>
1310
1311 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1312 to maintain proper indentation when printing pointers/refs.
1313
e5014227
JB
13142017-09-07 Joel Brobecker <brobecker@adacore.com>
1315
1316 GDB 8.0.1 released.
1317
63c99141
JB
13182017-09-07 Joel Brobecker <brobecker@adacore.com>
1319
1320 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1321
69c1e056
TT
13222017-09-05 Tom Tromey <tom@tromey.com>
1323
1324 * parse.c (funcall_chain): Now a std::vector.
1325 (start_arglist, end_arglist): Simplify.
1326 (free_funcalls): Remove.
1327 (parse_exp_in_context_1): Remove cleanup.
1328
fef704bf
TT
13292017-09-05 Tom Tromey <tom@tromey.com>
1330
1331 * go-exp.y (go_parse): Don't create a cleanup.
1332
5613c585
TT
13332017-09-05 Tom Tromey <tom@tromey.com>
1334
1335 * d-exp.y (PrimaryExpression): Use std::string.
1336 (d_parse): Don't create a cleanup.
1337
eae49211
TT
13382017-09-05 Tom Tromey <tom@tromey.com>
1339
1340 * utils.c (do_clear_parser_state): Remove.
1341 (make_cleanup_clear_parser_state): Remove.
1342 * p-exp.y (pascal_parse): Use scoped_restore.
1343 * m2-exp.y (m2_parse): Use scoped_restore.
1344 * f-exp.y (f_parse): Use scoped_restore.
1345 * d-exp.y (d_parse): Use scoped_restore.
1346 * c-exp.y (c_parse): Use scoped_restore.
1347 * ada-exp.y (ada_parse): Use scoped_restore.
1348 * utils.h (make_cleanup_clear_parser_state): Remove.
1349
73b9be8b
KS
13502017-09-06 Keith Seitz <keiths@redhat.com>
1351
1352 * dwarf2read.c (dw2_linkage_name_attr): New function.
1353 (dw2_linkage_name): New function.
1354 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1355 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1356 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1357
a102602b
KR
13582017-09-06 Kamil Rytarowski <n54@gmx.com>
1359
1360 * config/djgpp/djconfig.sh: Correct shell portability issue.
1361
28ad437d
KR
13622017-09-06 Kamil Rytarowski <n54@gmx.com>
1363
1364 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1365
351787dd
JB
13662017-09-06 John Baldwin <jhb@FreeBSD.org>
1367
1368 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1369 * NEWS: Mention new FreeBSD/mips native configuration.
1370 * configure.host: Add aarch64*-*-freebsd*.
1371 * configure.nat: Likewise.
1372 * aarch64-fbsd-nat.c: New file.
1373
c0f84956
JB
13742017-09-06 John Baldwin <jhb@FreeBSD.org>
1375
1376 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1377 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1378 * NEWS: Mention new FreeBSD/aarch64 target.
1379 * configure.tgt: Add aarch64*-*-freebsd*.
1380 * aarch64-fbsd-tdep.c: New file.
1381 * aarch64-fbsd-tdep.h: New file.
1382
7610297a
KR
13832017-09-06 Kamil Rytarowski <n54@gmx.com>
1384
1385 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1386
fbd1b771
JK
13872017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1388
1389 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1390 of TLS symbols.
1391
5ca79eae
PW
13922017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1393
1394 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1395 call.
1396
bf93d7ba
SM
13972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1398
1399 * infrun.c (follow_exec): Call add_thread after
1400 target_find_description.
1401
1bb7c059
SM
14022017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1403
1404 * infrun.c (handle_inferior_event_1): When exec'ing, read
1405 stop_pc after follow_exec.
1406
fc809827
SM
14072017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1408
1409 * remote.c (process_g_packet): Update error message.
1410
d2fcdd85
YQ
14112017-09-05 Yao Qi <yao.qi@linaro.org>
1412
1413 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1414 targets.
1415
e69570ee
PA
14162017-09-05 Pedro Alves <palves@redhat.com>
1417
1418 * eval.c (eval_call, evaluate_funcall): New functions, factored
1419 out from ...
1420 (evaluate_subexp_standard): ... this.
1421
22916b07
YQ
14222017-09-05 Yao Qi <yao.qi@linaro.org>
1423
1424 * amd64-tdep.c (amd64_target_description): Create target
1425 descriptions.
1426 (_initialize_amd64_tdep): Don't call functions
1427 initialize_tdesc_amd64_*. Add self tests.
1428 * arch/amd64.c (amd64_create_target_description): Add parameter
1429 is_linux. Call set_tdesc_osabi if is_linux is true.
1430 * arch/amd64.h (amd64_create_target_description): Update the
1431 declaration.
1432 * arch/i386.c (i386_create_target_description): Add parameter
1433 is_linux. Call set_tdesc_osabi if is_linux is true.
1434 * arch/i386.h (i386_create_target_description): Update
1435 declaration.
1436 * configure.tgt: Add i386.o to gdb_target_obs.
1437 * features/Makefile (XMLTOC): Remove i386/*.xml.
1438 * features/i386/amd64-avx-avx512.c: Remove.
1439 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1440 * features/i386/amd64-avx-mpx.c: Remove.
1441 * features/i386/amd64-avx.c: Remove.
1442 * features/i386/amd64-mpx.c: Remove.
1443 * features/i386/amd64.c: Remove.
1444 * features/i386/i386-avx-avx512.c: Remove.
1445 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1446 * features/i386/i386-avx-mpx.c: Remove.
1447 * features/i386/i386-avx.c: Remove.
1448 * features/i386/i386-mmx.c: Remove.
1449 * features/i386/i386-mpx.c: Remove.
1450 * features/i386/i386.c: Remove.
1451 * i386-tdep.c: Don't include features/i386/i386*.c., include
1452 target-descriptions.h and arch/i386.h.
1453 (i386_target_description): Create target descriptions.
1454 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1455 functions. Do self tests.
1456
0854b7b1
YQ
14572017-09-05 Yao Qi <yao.qi@linaro.org>
1458
1459 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1460 * features/i386/amd64-avx-avx512-linux.c: Removed.
1461 * features/i386/amd64-avx-linux.c: Removed.
1462 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1463 * features/i386/amd64-avx-mpx-linux.c: Removed.
1464 * features/i386/amd64-linux.c: Removed.
1465 * features/i386/amd64-mpx-linux.c: Removed.
1466 * features/i386/x32-avx-avx512-linux.c: Removed.
1467 * features/i386/x32-avx-linux.c: Removed.
1468 * features/i386/x32-linux.c: Removed.
1469
b4570e4b
YQ
14702017-09-05 Yao Qi <yao.qi@linaro.org>
1471
1472 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1473 features/i386/*.c.
1474 (amd64_linux_read_description): Call
1475 amd64_create_target_description.
1476 * arch/amd64.c: New file.
1477 * arch/amd64.h: New file.
1478 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1479 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1480
6c73f67f
YQ
14812017-09-05 Yao Qi <yao.qi@linaro.org>
1482
1483 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1484 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1485 (amd64_linux_read_description): Create target descriptions.
1486 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1487 functions. Add unit tests.
1488 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1489 x32-core.xml.
1490 * features/i386/64bit-avx.c: Generated.
1491 * features/i386/64bit-avx512.c: Generated.
1492 * features/i386/64bit-core.c: Generated.
1493 * features/i386/64bit-linux.c: Generated.
1494 * features/i386/64bit-mpx.c: Generated.
1495 * features/i386/64bit-pkeys.c: Generated.
1496 * features/i386/64bit-segments.c: Generated.
1497 * features/i386/64bit-sse.c: Generated.
1498 * features/i386/x32-core.c: Generated.
1499 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1500 c files for amd64-linux and x32-linux.
1501
9d3d478b
YQ
15022017-09-05 Yao Qi <yao.qi@linaro.org>
1503
1504 * amd64-linux-tdep.c (amd64_linux_read_description): New
1505 function.
1506 (amd64_linux_core_read_description): Call
1507 amd64_linux_read_description.
1508 (amd64_linux_init_abi): Likewise.
1509 (amd64_x32_linux_init_abi): Likewise.
1510 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1511 * x86-linux-nat.c (x86_linux_read_description): Call
1512 amd64_linux_read_description.
1513
b9f1d50f
YQ
15142017-09-05 Yao Qi <yao.qi@linaro.org>
1515
1516 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1517 comments.
1518
188c9e6d
YQ
15192017-09-05 Yao Qi <yao.qi@linaro.org>
1520
1521 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1522 * features/i386/i386-avx-avx512-linux.c: Remove.
1523 * features/i386/i386-avx-linux.c: Remove.
1524 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1525 * features/i386/i386-avx-mpx-linux.c: Remove.
1526 * features/i386/i386-linux.c: Remove.
1527 * features/i386/i386-mmx-linux.c: Remove.
1528 * features/i386/i386-mpx-linux.c: Remove.
1529
5f035c07
YQ
15302017-09-05 Yao Qi <yao.qi@linaro.org>
1531
1532 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1533 (SFILES): Add arch/i386.c.
1534 (HFILES_NO_SRCDIR): Add arch/i386.h.
1535 * arch/i386.c: New file.
1536 * arch/i386.h: New file.
1537 * arch/tdesc.h (allocate_target_description): Declare.
1538 (set_tdesc_architecture): Declare.
1539 (set_tdesc_osabi): Declare.
1540 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1541 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1542 include arch/i386.h.
1543 (i386_linux_read_description): Remove code and call
1544 i386_create_target_description.
1545 (set_tdesc_architecture): New function.
1546 (set_tdesc_osabi): New function.
1547 * target-descriptions.h (allocate_target_description): Remove.
1548
0abe8a89
YQ
15492017-09-05 Yao Qi <yao.qi@linaro.org>
1550
1551 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1552 * target-descriptions.c (tdesc_create_feature): Likewise, and
1553 adjust code.
1554 * features/i386/32bit-avx.c: Re-generated.
1555 * features/i386/32bit-avx512.c: Re-generated.
1556 * features/i386/32bit-core.c: Re-generated.
1557 * features/i386/32bit-linux.c: Re-generated.
1558 * features/i386/32bit-mpx.c: Re-generated.
1559 * features/i386/32bit-pkeys.c: Re-generated.
1560 * features/i386/32bit-sse.c: Re-generated.
1561
0a188386
YQ
15622017-09-05 Yao Qi <yao.qi@linaro.org>
1563
1564 * regformats/regdef.h (struct reg): Override operator == and !=.
1565
f49ff000
YQ
15662017-09-05 Yao Qi <yao.qi@linaro.org>
1567
1568 * arch/tdesc.h: New file.
1569 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1570 * target-descriptions.c: Update comments.
1571 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1572 declarations.
1573 * features/i386/32bit-avx.c: Re-generated.
1574 * features/i386/32bit-avx512.c: Re-generated.
1575 * features/i386/32bit-core.c: Re-generated.
1576 * features/i386/32bit-linux.c: Re-generated.
1577 * features/i386/32bit-mpx.c: Re-generated.
1578 * features/i386/32bit-pkeys.c: Re-generated.
1579 * features/i386/32bit-sse.c: Re-generated.
1580
f7000548
YQ
15812017-09-05 Yao Qi <yao.qi@linaro.org>
1582
1583 * regformats/regdat.sh: Update generated code.
1584
c9a5e2a5
YQ
15852017-09-05 Yao Qi <yao.qi@linaro.org>
1586
1587 * regformats/regdat.sh: Adjust code order.
1588
d6b687ac
SM
15892017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1590
1591 * expprint.c (dump_subexp_body_standard): Use constant format
1592 string in fprintf_filtered call.
1593
a379bfd0
JB
15942017-09-04 John Baldwin <jhb@FreeBSD.org>
1595
1596 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1597 NetBSD/i386.
1598 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1599
f7efc967
JB
16002017-09-04 John Baldwin <jhb@FreeBSD.org>
1601
1602 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1603
c49fbc6c
JB
16042017-09-04 John Baldwin <jhb@FreeBSD.org>
1605
1606 * bsd-kvm.o: Define _KMEMUSER.
1607 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1608 * configure: Regenerate.
1609
26562e73
JB
16102017-09-04 John Baldwin <jhb@FreeBSD.org>
1611
1612 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1613 * i386-fbsd-nat.c: Likewise.
1614
31cf1487
JB
16152017-09-04 John Baldwin <jhb@FreeBSD.org>
1616
1617 * unittests/array-view-selftests.c: Add include of <array>.
1618
5b9f8a7c
JB
16192017-09-04 John Baldwin <jhb@FreeBSD.org>
1620
1621 * spu-tdep.c (flush_ea_cache): Add missing argument to
1622 call_function_by_hand.
1623
d69cf9b2
PA
16242017-09-04 Pedro Alves <palves@redhat.com>
1625
1626 * NEWS (Safer support for debugging with no debug info): New.
1627
3693fdb3
PA
16282017-09-04 Pedro Alves <palves@redhat.com>
1629
1630 * c-exp.y (function_method, function_method_void): Add current
1631 instance flags to TYPE_INSTANCE.
1632 * dwarf2read.c (check_modifier): New.
1633 (compute_delayed_physnames): Assert that only C++ adds delayed
1634 physnames. Mark fn_fields as const/volatile depending on
1635 physname.
1636 * eval.c (make_params): New type_instance_flags parameter. Use
1637 it as the new type's instance flags.
1638 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1639 flags element and pass it to make_params.
1640 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1641 instance flags element.
1642 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1643 * gdbtypes.h: Include "enum-flags.h".
1644 (type_instance_flags): New enum-flags type.
1645 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1646 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1647 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1648 (follow_type_instance_flags): New function.
1649 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1650 * parser-defs.h (follow_type_instance_flags): Declare.
1651 * valops.c (value_struct_elt_for_reference): const/volatile must
1652 match too.
1653
e68cb8e0
PA
16542017-09-04 Pedro Alves <palves@redhat.com>
1655
1656 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1657 function/method scopes; lookup the nested name as a function local
1658 static variable.
1659
858be34c
PA
16602017-09-04 Pedro Alves <palves@redhat.com>
1661
1662 (%type <voidval>): Add function_method.
1663 * c-exp.y (exp): New production for calls with no arguments.
1664 (function_method, function_method_void_or_typelist): New
1665 productions.
1666 (exp): New production for "method()::static_var".
1667 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1668 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1669 Handle OP_FUNC_STATIC_VAR.
1670 * parse.c (operator_length_standard):
1671 Handle OP_FUNC_STATIC_VAR.
1672
dd5901a6
PA
16732017-09-04 Pedro Alves <palves@redhat.com>
1674
1675 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1676 handling.
1677 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1678 Ditto.
1679 * parse.c (operator_length_standard, operator_check_standard):
1680 Ditto.
1681 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1682
46a4882b
PA
16832017-09-04 Pedro Alves <palves@redhat.com>
1684
1685 * ax-gdb.c: Include "typeprint.h".
1686 (gen_expr_for_cast): New function.
1687 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1688 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1689 type is unknown.
1690 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1691 nodebug_data_symbol.
1692 * eval.c: Include "typeprint.h".
1693 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1694 Error out if symbol has unknown type.
1695 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1696 evaluate_subexp_for_cast.
1697 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1698 OP_VAR_MSYM_VALUE.
1699 (evaluate_subexp_for_cast): New function.
1700 * gdbtypes.c (init_nodebug_var_type): New function.
1701 (objfile_type): Use it to initialize types of variables with no
1702 debug info.
1703 * typeprint.c (error_unknown_type): New.
1704 * typeprint.h (error_unknown_type): New declaration.
1705 * compile/compile-c-types.c (convert_type_basic): Handle
1706 TYPE_CODE_ERROR; warn and fallback to int for variables with
1707 unknown type.
1708
fe13dfec
PA
17092017-09-04 Pedro Alves <palves@redhat.com>
1710
1711 * eval.c (evaluate_var_value): New function, factored out from ...
1712 (evaluate_subexp_standard): ... here.
1713
d008ee21
PA
17142017-09-04 Pedro Alves <palves@redhat.com>
1715
1716 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1717 Remove useless assignments to 'op'.
1718
827d0c51
PA
17192017-09-04 Pedro Alves <palves@redhat.com>
1720
1721 * eval.c (eval_skip_value): New function.
1722 (evaluate_subexp_standard): Use it.
1723
2c5a2be1
PA
17242017-09-04 Pedro Alves <palves@redhat.com>
1725
1726 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1727 function name from symbol/minsym and pass it to
1728 error_call_unknown_return_type.
1729
74ea4be4
PA
17302017-09-04 Pedro Alves <palves@redhat.com>
1731
1732 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1733 * ax-gdb.c (gen_msym_var_ref): New function.
1734 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1735 * eval.c (evaluate_var_msym_value): New function.
1736 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1737 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1738 to call_function_by_hand.
1739 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1740 Handle OP_VAR_MSYM_VALUE.
1741 (union exp_element) <msymbol>: New field.
1742 * minsyms.h (struct type): Forward declare.
1743 (find_minsym_type_and_address): Declare.
1744 * parse.c (write_exp_elt_msym): New function.
1745 (write_exp_msymbol): Delete, refactored as ...
1746 (find_minsym_type_and_address): ... this new function.
1747 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1748 (operator_length_standard, operator_check_standard): Handle
1749 OP_VAR_MSYM_VALUE.
1750 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1751
7022349d
PA
17522017-09-04 Pedro Alves <palves@redhat.com>
1753
1754 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1755 TYPE_GNU_IFUNC specially here. Throw error if return type is
1756 unknown.
1757 * ada-typeprint.c (print_func_type): Handle functions with unknown
1758 return type.
1759 * c-typeprint.c (c_type_print_base): Handle functions and methods
1760 with unknown return type.
1761 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1762 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1763 * compile/compile-c-types.c: Include "objfiles.h".
1764 (convert_func): For functions with unknown return type, warn and
1765 default to int.
1766 * compile/compile-object-run.c (compile_object_run): Adjust call
1767 to call_function_by_hand_dummy.
1768 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1769 call_function_by_hand.
1770 * eval.c (evaluate_subexp_standard): Adjust calls to
1771 call_function_by_hand. Handle functions and methods with unknown
1772 return type. Pass expect_type to call_function_by_hand.
1773 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1774 return type.
1775 * gcore.c (call_target_sbrk): Adjust call to
1776 call_function_by_hand.
1777 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1778 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1779 an integer address type instead of nodebug.
1780 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1781 call_function_by_hand.
1782 * infcall.c (error_call_unknown_return_type): New function.
1783 (call_function_by_hand): New "default_return_type" parameter.
1784 Pass it down.
1785 (call_function_by_hand_dummy): New "default_return_type"
1786 parameter. Use it instead of defaulting to int. If there's no
1787 default and the return type is unknown, throw an error. If
1788 there's a default return type, and the called function has no
1789 debug info, then assume the function is prototyped.
1790 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1791 New "default_return_type" parameter.
1792 (error_call_unknown_return_type): New declaration.
1793 * linux-fork.c (call_lseek): Cast return type of lseek.
1794 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1795 call_function_by_hand.
1796 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1797 calls to call_function_by_hand.
1798 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1799 return type.
1800 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1801 (value_nsstring, print_object_command): Adjust calls to
1802 call_function_by_hand.
1803 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1804 functions with unknown return type.
1805 (pascal_type_print_func_varspec_suffix): New function.
1806 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1807 TYPE_CODE_METHOD>: Use it.
1808 * python/py-value.c (valpy_call): Adjust call to
1809 call_function_by_hand.
1810 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1811 call_function_by_hand.
1812 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1813 call_function_by_hand.
1814 * valops.c (value_allocate_space_in_inferior): Adjust call to
1815 call_function_by_hand.
1816 * typeprint.c (type_print_unknown_return_type): New function.
1817 * typeprint.h (type_print_unknown_return_type): New declaration.
1818
54990598
PA
18192017-09-04 Pedro Alves <palves@redhat.com>
1820
1821 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1822 types with more than one parameter as prototyped.
1823
9a24775b
PA
18242017-09-04 Pedro Alves <palves@redhat.com>
1825
1826 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1827 (disassemble_command): Use gdb_disassembly_flags instead of bare
1828 int.
1829 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1830 (dump_insns, do_mixed_source_and_assembly_deprecated)
1831 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1832 Use gdb_disassembly_flags instead of bare int.
1833 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1834 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1835 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1836 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1837 (enum gdb_disassembly_flag): ... values of this new enumeration.
1838 (gdb_disassembly_flags): Define.
1839 (gdb_disassembly)
1840 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1841 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1842 gdb_disassembly_flags instead of bare int.
1843 * record-btrace.c (btrace_insn_history)
1844 (record_btrace_insn_history, record_btrace_insn_history_range)
1845 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1846 instead of bare int.
1847 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1848 Use gdb_disassembly_flags instead of bare int.
1849 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1850 Define.
1851 * target-delegates.c: Regenerate.
1852 * target.c (target_insn_history, target_insn_history_from)
1853 (target_insn_history_range): Use gdb_disassembly_flags instead of
1854 bare int.
1855 * target.h: Include "disasm.h".
1856 (struct target_ops) <to_insn_history, to_insn_history_from,
1857 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1858 int.
1859 (target_insn_history, target_insn_history_from)
1860 (target_insn_history_range): Use gdb_disassembly_flags instead of
1861 bare int.
1862
80a65e9b
SM
18632017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1864
1865 * cli/cli-script.c (build_command_line): For if/while commands,
1866 check whether args is empty.
1867
6b66338c
SM
18682017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1869
1870 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1871 (enum command_control_type): Likewise.
1872 (struct command_line): Likewise.
1873 (free_command_lines): Likewise.
1874 (struct command_lines_deleter): Likewise.
1875 (command_line_up): Likewise.
1876 (read_command_lines): Likewise.
1877 (read_command_lines_1): Likewise.
1878 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1879 (enum command_control_type): Likewise.
1880 (struct command_line): Likewise.
1881 (free_command_lines): Likewise.
1882 (struct command_lines_deleter): Likewise.
1883 (command_line_up): Likewise.
1884 (read_command_lines): Likewise.
1885 (read_command_lines_1): Likewise.
1886 * breakpoint.h: Include cli/cli-script.h.
1887 * extension-priv.h: Likewise.
1888 * gdbcmd.h: Likewise.
1889
51abb421
PA
18902017-09-04 Pedro Alves <palves@redhat.com>
1891
1892 * ada-lang.c (is_known_support_routine): Move sal declaration to
1893 where it is initialized.
1894 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1895 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1896 (clear_command, update_static_tracepoint): Remove init_sal
1897 references. Move declarations closer to initializations.
1898 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1899 initializations.
1900 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1901 references. Move sal declarations closer to initializations.
1902 * frame.c (find_frame_sal): Return a symtab_and_line via function
1903 return instead of output parameter. Remove init_sal references.
1904 * frame.h (find_frame_sal): Return a symtab_and_line via function
1905 return instead of output parameter.
1906 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1907 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1908 instead of memset.
1909 (gdbscm_find_pc_line): Remove init_sal reference.
1910 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1911 references. Move declarations closer to initializations.
1912 * infcmd.c (set_step_frame): Update. Move declarations closer to
1913 initializations.
1914 (finish_backward): Remove init_sal references. Move declarations
1915 closer to initializations.
1916 * infrun.c (process_event_stop_test, handle_step_into_function)
1917 (insert_hp_step_resume_breakpoint_at_frame)
1918 (insert_step_resume_breakpoint_at_caller): Likewise.
1919 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1920 (symbol_to_sal): Likewise.
1921 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1922 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1923 to its initialization.
1924 * reverse.c (save_bookmark_command): Use new/delete. Remove
1925 init_sal references. Move declarations closer to initializations.
1926 * source.c (get_current_source_symtab_and_line): Remove brace
1927 initialization.
1928 (set_current_source_symtab_and_line): Now takes the sal by const
1929 reference. Remove brace initialization.
1930 (line_info): Remove init_sal reference.
1931 * source.h (set_current_source_symtab_and_line): Now takes a
1932 symtab_and_line via const reference.
1933 * stack.c (set_current_sal_from_frame): Adjust.
1934 (print_frame_info): Adjust.
1935 (get_last_displayed_sal): Return the sal via function return
1936 instead of via output parameter. Simplify.
1937 (frame_info): Adjust.
1938 * stack.h (get_last_displayed_sal): Return the sal via function
1939 return instead of via output parameter.
1940 * symtab.c (init_sal): Delete.
1941 (find_pc_sect_line): Remove init_sal references. Move
1942 declarations closer to initializations.
1943 (find_function_start_sal): Remove init_sal references. Move
1944 declarations closer to initializations.
1945 * symtab.h (struct symtab_and_line): In-class initialize all
1946 fields.
1947 * tracepoint.c (set_traceframe_context)
1948 (print_one_static_tracepoint_marker): Remove init_sal references.
1949 Move declarations closer to initializations.
1950 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1951 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
1952 declarations closer to initializations.
1953 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1954 init_sal references. Adjust.
1955
6c5b2ebe
PA
19562017-09-04 Pedro Alves <palves@redhat.com>
1957
1958 * ax-gdb.c (agent_command_1): Use range-for.
1959 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1960 * breakpoint.c: Include "common/array-view.h".
1961 (init_breakpoint_sal, create_breakpoint_sal): Change sals
1962 parameter from struct symtabs_and_lines to
1963 array_view<symtab_and_line>. Adjust. Use range-for. Update.
1964 (breakpoint_sals_to_pc): Change sals parameter from struct
1965 symtabs_and_lines to std::vector reference.
1966 (check_fast_tracepoint_sals): Change sals parameter from struct
1967 symtabs_and_lines to std::array_view. Use range-for.
1968 (decode_static_tracepoint_spec): Return a std::vector instead of
1969 symtabs_and_lines. Update.
1970 (create_breakpoint): Update.
1971 (break_range_command, until_break_command, clear_command): Update.
1972 (base_breakpoint_decode_location, bkpt_decode_location)
1973 (bkpt_probe_create_sals_from_location)
1974 (bkpt_probe_decode_location, tracepoint_decode_location)
1975 (tracepoint_probe_decode_location)
1976 (strace_marker_create_sals_from_location): Return a std::vector
1977 instead of symtabs_and_lines.
1978 (strace_marker_create_breakpoints_sal): Update.
1979 (strace_marker_decode_location): Return a std::vector instead of
1980 symtabs_and_lines. Update.
1981 (update_breakpoint_locations): Change struct symtabs_and_lines
1982 parameters to gdb::array_view. Adjust.
1983 (location_to_sals): Return a std::vector instead of
1984 symtabs_and_lines. Update.
1985 (breakpoint_re_set_default): Use std::vector instead of struct
1986 symtabs_and_lines.
1987 (decode_location_default): Return a std::vector instead of
1988 symtabs_and_lines. Update.
1989 * breakpoint.h: Include "common/array-view.h".
1990 (struct breakpoint_ops) <decode_location>: Now returns a
1991 std::vector instead of returning a symtabs_and_lines via output
1992 parameter.
1993 (update_breakpoint_locations): Change sals parameters to use
1994 gdb::array_view.
1995 * cli/cli-cmds.c (edit_command, list_command): Update to use
1996 std::vector and gdb::array_view.
1997 (ambiguous_line_spec): Adjust to use gdb::array_view and
1998 range-for.
1999 (compare_symtabs): Rename to ...
2000 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2001 const reference and adjust.
2002 (filter_sals): Rewrite using std::vector and standard algorithms.
2003 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2004 (jump_command): Update to use std::vector.
2005 * linespec.c (struct linespec_state) <canonical_names>: Update
2006 comment.
2007 (add_sal_to_sals_basic): Delete.
2008 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2009 (decode_line_2, create_sals_line_offset)
2010 (convert_address_location_to_sals, convert_linespec_to_sals)
2011 (convert_explicit_location_to_sals, parse_linespec)
2012 (event_location_to_sals, decode_line_full, decode_line_1)
2013 (decode_line_with_current_source)
2014 (decode_line_with_last_displayed, decode_objc)
2015 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2016 (linespec_result::~linespec_result): Adjust to use std::vector
2017 instead of symtabs_and_lines.
2018 * linespec.h (linespec_sals::sals): Now a std::vector.
2019 (struct linespec_result): Use std::vector, bool, and in-class
2020 initialization.
2021 (decode_line_1, decode_line_with_current_source)
2022 (decode_line_with_last_displayed): Return std::vector.
2023 * macrocmd.c (info_macros_command): Use std::vector.
2024 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2025 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2026 std::vector.
2027 * probe.h (parse_probes): Return a std::vector.
2028 * python/python.c (gdbpy_decode_line): Use std::vector and
2029 gdb::array_view.
2030 * source.c (select_source_symtab, line_info): Use std::vector.
2031 * stack.c (func_command): Use std::vector.
2032 * symtab.h (struct symtabs_and_lines): Delete.
2033 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2034
7c44b49c
PA
20352017-09-04 Pedro Alves <palves@redhat.com>
2036
2037 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2038 unittests/array-view-selftests.c.
2039 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2040 * common/array-view.h: New file.
2041 * unittests/array-view-selftests.c: New file.
2042
e439fa14
PA
20432017-09-04 Pedro Alves <palves@redhat.com>
2044
2045 * cli/cli-cmds.c (edit_command): Pass message to
2046 ambiguous_line_spec.
2047 (list_command): Pass message to ambiguous_line_spec. Say
2048 "first"/"last" instead of "start" and "end" to be consistent with
2049 the manual.
2050 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2051 them to print formatted message.
2052
7525b645
PA
20532017-09-04 Pedro Alves <palves@redhat.com>
2054
2055 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2056 ftrace_update_insns by reference instead of pointer.
2057
badc0020
YQ
20582017-09-04 Yao Qi <yao.qi@linaro.org>
2059
2060 * i386-go32-tdep.c: Include x86-xstate.h.
2061 (i386_go32_init_abi): Call i386_target_description.
2062 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2063 if xcr0 is X86_XSTATE_X87_MASK.
2064 * i386-tdep.h (tdesc_i386): Remove the declaration.
2065 (tdesc_i386_mmx): Likewise.
2066
d78bdb54
YQ
20672017-09-04 Yao Qi <yao.qi@linaro.org>
2068
2069 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2070 X86_XSTATE_SSE_MASK instead of 0.
2071
ca1fa5ee
YQ
20722017-09-04 Yao Qi <yao.qi@linaro.org>
2073
2074 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2075 i386_target_description.
2076 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2077 i386_target_description.
2078 * i386-tdep.c (i386_gdbarch_init): Likewise.
2079
2434b019
YQ
20802017-09-04 Yao Qi <yao.qi@linaro.org>
2081
2082 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2083 (x86_darwin_init_abi_64): Call amd64_target_description.
2084 * amd64-dicos-tdep.c: Likewise.
2085 * amd64-fbsd-nat.c: Likewise.
2086 * amd64-fbsd-tdep.c: Likewise.
2087 * amd64-nbsd-tdep.c: Likewise.
2088 * amd64-obsd-tdep.c: Likewise.
2089 * amd64-sol2-tdep.c: Likewise.
2090 * amd64-windows-tdep.c: Likewise.
2091 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2092
0860c437
SM
20932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2094
2095 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2096 (btrace_function) <insn>: Change type to use std::vector.
2097 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2098 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2099 ftrace_update_insns, ftrace_compute_global_level_offset,
2100 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2101 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2102 change to std::vector.
2103 (ftrace_update_insns): Adjust to change to std::vector, change
2104 type of INSN parameter.
2105 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2106 * record-btrace.c (btrace_call_history_insn_range,
2107 btrace_compute_src_line_range,
2108 record_btrace_frame_prev_register): Adjust to change to
2109 std::vector.
2110 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2111 to change to std::vector.
2112
0638b7f9
TT
21132017-09-03 Tom Tromey <tom@tromey.com>
2114
2115 * corefile.c (reopen_exec_file): Use std::string.
2116
8f84fb0e
TT
21172017-09-03 Tom Tromey <tom@tromey.com>
2118
2119 * compile/compile.c (compile_register_name_mangled): Return
2120 std::string.
2121 * compile/compile-loc2c.c (pushf_register_address): Update.
2122 (pushf_register): Update.
2123 * compile/compile-c-types.c (convert_array): Update.
2124 * compile/compile-c-symbols.c (generate_vla_size): Update.
2125 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2126 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2127 (convert_one_symbol): Update.
2128 (generate_c_for_for_one_variable): Update.
2129 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2130 std::string.
2131 (generate_register_struct): Update.
2132 * compile/compile-internal.h (c_get_range_decl_name): Return a
2133 std::string.
2134 (compile_register_name_mangled): Return std::string.
2135
18e9961f
TT
21362017-09-03 Tom Tromey <tom@tromey.com>
2137
2138 * utils.c (perror_string): Return a std::string.
2139 (throw_perror_with_name, perror_warning_with_name): Update.
2140
45343786
TT
21412017-09-03 Tom Tromey <tom@tromey.com>
2142
2143 * demangle.c (demangle_command): Use std::string,
2144 unique_xmalloc_ptr.
2145
b57af503
TT
21462017-09-03 Tom Tromey <tom@tromey.com>
2147
2148 * cli/cli-setshow.c (do_set_command): Use std::string.
2149
6eecf35f
TT
21502017-09-03 Tom Tromey <tom@tromey.com>
2151
2152 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2153
56496dd4
TT
21542017-09-03 Tom Tromey <tom@tromey.com>
2155
2156 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2157
e91a1fa7
TT
21582017-09-03 Tom Tromey <tom@tromey.com>
2159
2160 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2161 gdb::unique_xmalloc_ptr.
2162
7ffd83d7
TT
21632017-09-03 Tom Tromey <tom@tromey.com>
2164
2165 * thread.c (print_thread_info_1): Use string_printf.
2166 (thread_apply_command, thread_apply_all_command): Use
2167 std::string.
2168
1ccbe998
TT
21692017-09-03 Tom Tromey <tom@tromey.com>
2170
2171 * valprint.c (val_print_string): Update.
2172 * gdbcore.h (memory_error_message): Return std::string.
2173 * corefile.c (memory_error_message): Return std::string.
2174 (memory_error): Update.
2175 * breakpoint.c (insert_bp_location): Update.
2176
23fdd69e
SM
21772017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2178
2179 * target/waitstatus.h (target_waitstatus_to_string): Change
2180 return type to std::string.
2181 * target/waitstatus.c (target_waitstatus_to_string): Return
2182 std::string.
2183 * target.h (target_waitstatus_to_string): Remove declaration.
2184 * infrun.c (resume, clear_proceed_status_thread,
2185 print_target_wait_results, do_target_wait, save_waitstatus,
2186 stop_all_threads): Adjust.
2187 * record-btrace.c (record_btrace_wait): Adjust.
2188 * target-debug.h
2189 (target_debug_print_struct_target_waitstatus_p): Adjust.
2190
5c811d30
JK
21912017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2192
2193 PR gdb/22046
2194 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2195 detection.
2196
0a2dde4a
SDJ
21972017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2198
2199 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2200 for setting/unsetting environment variables on the remote target.
2201 (New remote packets): Add entries for QEnvironmentHexEncoded,
2202 QEnvironmentUnset and QEnvironmentReset.
2203 * common/environ.c (gdb_environ::operator=): Extend method to
2204 handle m_user_set_env_list and m_user_unset_env_list.
2205 (gdb_environ::clear): Likewise.
2206 (match_var_in_string): Change type of first parameter from 'char
2207 *' to 'const char *'.
2208 (gdb_environ::set): Extend method to handle
2209 m_user_set_env_list and m_user_unset_env_list.
2210 (gdb_environ::unset): Likewise.
2211 (gdb_environ::clear_user_set_env): New method.
2212 (gdb_environ::user_set_envp): Likewise.
2213 (gdb_environ::user_unset_envp): Likewise.
2214 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2215 m_user_unset_env_list on move constructor/assignment.
2216 (unset): Add new default parameter 'update_unset_list = true'.
2217 (clear_user_set_env): New method.
2218 (user_set_envp): Likewise.
2219 (user_unset_envp): Likewise.
2220 (m_user_set_env_list): New std::set.
2221 (m_user_unset_env_list): Likewise.
2222 * common/rsp-low.c (hex2str): New function.
2223 (bin2hex): New overload for bin2hex function.
2224 * common/rsp-low.c (hex2str): New prototype.
2225 (str2hex): New overload prototype.
2226 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2227 QEnvironmentUnset and QEnvironmentReset.
2228 (remote_protocol_features): Add QEnvironmentHexEncoded,
2229 QEnvironmentUnset and QEnvironmentReset packets.
2230 (send_environment_packet): New function.
2231 (extended_remote_environment_support): Likewise.
2232 (extended_remote_create_inferior): Call
2233 extended_remote_environment_support.
2234 (_initialize_remote): Add QEnvironmentHexEncoded,
2235 QEnvironmentUnset and QEnvironmentReset packet configs.
2236 * unittests/environ-selftests.c (gdb_selftest_env_var):
2237 New variable.
2238 (test_vector_initialization): New function.
2239 (test_init_from_host_environ): Likewise.
2240 (test_reinit_from_host_environ): Likewise.
2241 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2242 Likewise.
2243 (test_unset_set_empty_vector): Likewise.
2244 (test_vector_clear): Likewise.
2245 (test_std_move): Likewise.
2246 (test_move_constructor):
2247 (test_self_move): Likewise.
2248 (test_set_unset_reset): Likewise.
2249 (run_tests): Rewrite in terms of the functions above.
2250
654670a4
WP
22512017-08-31 Weimin Pan <weimin.pan@oracle.com>
2252
2253 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2254 (adi_available): Use a temp variable of type CORE_ADDR as argument
2255 3 when calling target_auxv_search.
2256 (adi_normalize_address): Use masks and xor operators to calculate
2257 normalized address.
2258 (adi_read_versions, adi_write_versions, adi_print_versions)
2259 (do_examine, do_assign): Use paddress.
2260
7755ddb7
JB
22612017-08-29 John Baldwin <jhb@FreeBSD.org>
2262
2263 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2264 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2265 out of loop and add supply of FIR.
2266 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2267 add collect of FIR.
2268
fd437cbc
SM
22692017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2270
3804a343 2271 PR gdb/21827
fd437cbc
SM
2272 * cli/cli-script.c (define_command): Don't convert command name
2273 to lower case.
2274
988f6b3d
JB
22752017-08-25 Joel Brobecker <brobecker@adacore.com>
2276
2277 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2278 Update all callers accordingly. Remove all code blocks handling
2279 the case where DISPP is not NULL.
2280
663c44ac
JK
22812017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2282
2283 PR symtab/22003
2284 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2285 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2286 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2287
f1902523
JK
22882017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2289
2290 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2291 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2292 (read_comp_units_from_section): New parameter abbrev_section, use
2293 read_and_check_comp_unit_head, allocate signatured_type if needed.
2294 (create_all_comp_units): Update read_comp_units_from_section caller.
2295
87215ad1
SDJ
22962017-08-23 Pedro Alves <palves@redhat.com>
2297
2298 PR remote/21852
2299 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2300 to null_ptid and switch to thread without reading the registers
2301 after adding the inferior.
2302
6e41ddec
JK
23032017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2304
2305 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2306 compile-gcc.
2307 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2308 (compile_to_object): Implement compile_gcc.
2309 (_initialize_compile): Install "set compile-gcc". Initialize
2310 compile_gcc.
2311
e68c32d5
JK
23122017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2313
2314 * compile/compile.c (compile_to_object): Conditionally call
2315 set_verbose. Conditionally call compile or compile_v0.
2316
58afddc6
WP
23172017-08-07 Weimin Pan <weimin.pan@oracle.com>
2318
2319 * sparc64-tdep.h: (adi_normalize_address): New export.
2320 * sparc-nat.h: (open_adi_tag_fd): New export.
2321 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2322 * sparc64-linux-tdep.c:
2323 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2324 (sparc64_linux_handle_segmentation_fault): New function.
2325 (sparc64_linux_init_abi): Register
2326 sparc64_linux_handle_segmentation_fault
2327 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2328 (sparc64_addr_bits_remove): New function.
2329 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2330 (MAX_PROC_NAME_SIZE): New macro.
2331 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2332 (sparc64adilist): New variable.
2333 (adi_proc_list): New variable.
2334 (find_adi_info): New function.
2335 (add_adi_info): New function.
2336 (get_adi_info_proc): New function.
2337 (get_adi_info): New function.
2338 (info_adi_command): New function.
2339 (read_maps_entry): New function.
2340 (adi_available): New function.
2341 (adi_normalize_address): New function.
2342 (adi_align_address): New function.
2343 (adi_convert_byte_count): New function.
2344 (adi_tag_fd): New function.
2345 (adi_is_addr_mapped): New function.
2346 (adi_read_versions): New function.
2347 (adi_write_versions): New function.
2348 (adi_print_versions): New function.
2349 (do_examine): New function.
2350 (do_assign): New function.
2351 (adi_examine_command): New function.
2352 (adi_assign_command): New function.
2353 (_initialize_sparc64_adi_tdep): New function.
2354
11db9430
SM
23552017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2356
2357 * breakpoint.c (breakpoints_info): Rename to ...
2358 (info_breakpoints_command): ... this.
2359 (watchpoints_info): Rename to ...
2360 (info_watchpoints_command): ... this.
2361 (tracepoints_info): Rename to ...
2362 (info_tracepoints_command): ... this.
2363 (_initialize_breakpoint): Adjust.
2364 * dcache.c (dcache_info): Rename to ...
2365 (info_display_command): ... this.
2366 (_initialize_dcache): Adjust.
2367 * frame.h (args_info): Rename to ...
2368 (info_args_command): ... this.
2369 (locals_info): Rename to ...
2370 (info_locals_command): ... this.
2371 * infcmd.c (nofp_registers_info): Rename to ...
2372 (info_registers_command): ... this.
2373 (float_info): Rename to ...
2374 (info_float_command): ... this.
2375 (program_info): Rename to ...
2376 (info_program_command): ... this.
2377 (all_registers_info): Rename to ...
2378 (info_all_registers_command): ... this.
2379 (vector_info): Rename to ...
2380 (info_vector_command): ... this.
2381 (float_info): Rename to ...
2382 (info_float_command): ... this.
2383 (_initialize_infcmd): Adjust.
2384 * inferior.h (term_info): Rename to ...
2385 (info_terminal_command): ... this.
2386 * inflow.c (term_info): Rename to ...
2387 (info_terminal_command): ... this.
2388 (_initialize_inflow): Adjust.
2389 * infrun.c (signals_info): Rename to ...
2390 (info_signals_command): ... this.
2391 (_initialize_infrun): Adjust.
2392 * objc-lang.c (classes_info): Rename to ...
2393 (info_classes_command): ... this.
2394 (selectors_info): Rename to ...
2395 (info_selectors_command): ... this.
2396 (_initialize_objc_language): Adjust.
2397 * printcmd.c (sym_info): Rename to ...
2398 (info_symbol_command): ... this.
2399 (address_info): Rename to ...
2400 (info_address_command): ... this.
2401 (display_info): Rename to ...
2402 (info_display_command): ... this.
2403 (_initialize_printcmd): Adjust.
2404 * reverse.c (bookmarks_info): Rename to ...
2405 (info_breakpoints_command): ... this.
2406 (_initialize_reverse): Adjust.
2407 * ser-go32.c (dos_info): Rename to ...
2408 (info_serial_command): ... this.
2409 (_initialize_ser_dos): Adjust.
2410 * skip.c (skip_info): Rename to ...
2411 (info_skip_command): ... this.
2412 (_initialize_step_skip): Adjust.
2413 * source.c (line_info): Rename to ...
2414 (info_line_command): ... this.
2415 (source_info): Rename to ...
2416 (info_source_command)
2417 * stack.c (frame_info): Rename to ...
2418 (info_frame_command): ... this.
2419 (locals_info): Rename to ...
2420 (info_locals_command): ... this.
2421 (args_info): Rename to ...
2422 (info_args_command): ... this.
2423 (_initialize_stack): Adjust.
2424 * symtab.c (sources_info): Rename to ...
2425 (info_sources_command): ... this.
2426 (variables_info): Rename to ...
2427 (info_variables_command): ... this.
2428 (functions_info): Rename to ...
2429 (info_functions_command): ... this.
2430 (types_info): Rename to ...
2431 (info_types_command): ... this.
2432 (_initialize_symtab): Adjust.
2433 * target.c (target_info): Rename to ...
2434 (info_target_command): ... this.
2435 (initialize_targets): Adjust.
2436 * tracepoint.c (tvariables_info): Rename to ...
2437 (info_tvariables_command): ... this.
2438 (scope_info): Rename to ...
2439 (info_scope_command): ... this.
2440 (trace_dump_actions): Adjust.
2441 (_initialize_tracepoint): Adjust.
2442
b270e6f9
TT
24432017-08-22 Tom Tromey <tom@tromey.com>
2444
2445 * breakpoint.h (install_breakpoint): Update.
2446 * breakpoint.c (add_solib_catchpoint): Update.
2447 (install_breakpoint): Change argument to a std::unique_ptr.
2448 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2449 (create_breakpoint_sal, create_breakpoint): Update.
2450 (watch_command_1, catch_exec_command_1)
2451 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2452 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2453 Return the breakpoint.
2454 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2455 (new_single_step_breakpoint): Update.
2456 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2457 std::unique_ptr.
2458 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2459 std::unique_ptr.
2460 * break-catch-sig.c (create_signal_catchpoint): Use
2461 std::unique_ptr.
2462 * ada-lang.c (create_ada_exception_catchpoint): Use
2463 std::unique_ptr.
2464
36bd8eaa
TT
24652017-08-22 Tom Tromey <tom@tromey.com>
2466
2467 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2468
56f37645
TT
24692017-08-22 Tom Tromey <tom@tromey.com>
2470
2471 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2472 (lookup_partial_symbol): Update.
2473
0b581c69
TT
24742017-08-22 Tom Tromey <tom@tromey.com>
2475
2476 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2477 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2478 (find_and_open_source, symtab_to_fullname): Update.
2479 * psymtab.c (psymtab_to_fullname): Update.
2480
14278e1f
TT
24812017-08-22 Tom Tromey <tom@tromey.com>
2482
2483 * exec.c (exec_file_attach): Update.
2484 * linux-thread-db.c (try_thread_db_load): Update.
2485 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2486 * utils.c (gdb_realpath): Change return type.
2487 (gdb_realpath_keepfile): Update.
2488 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2489 (_initialize_utils): Register the new self test.
2490 * source.c (openp): Update.
2491 (find_and_open_source): Update.
2492 * nto-tdep.c (nto_find_and_open_solib): Update.
2493 * main.c (set_gdb_data_directory): Update.
2494 (captured_main_1): Update.
2495 * dwarf2read.c (dwarf2_get_dwz_file): Update
2496 (dw2_map_symbol_filenames): Update.
2497 * auto-load.c (auto_load_safe_path_vec_update): Update.
2498 (filename_is_in_auto_load_safe_path_vec): Change type of
2499 "filename_realp".
2500 (auto_load_objfile_script): Update.
2501 (file_is_auto_load_safe): Update. Use std::string.
2502 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2503
4971c9a7
TT
25042017-08-22 Tom Tromey <tom@tromey.com>
2505
2506 * utils.c (gdb_realpath_keepfile): Return a
2507 gdb::unique_xmalloc_ptr.
2508 * exec.c (exec_file_attach): Update.
2509 * utils.h (gdb_realpath_keepfile): Return a
2510 gdb::unique_xmalloc_ptr.
2511
e3e41d58
TT
25122017-08-22 Tom Tromey <tom@tromey.com>
2513
2514 * compile/compile.c (compile_file_command): Use
2515 gdb::unique_xmalloc_ptr, std::string.
2516 * utils.c (gdb_abspath): Change return type.
2517 * source.c (openp): Update.
2518 * objfiles.c (allocate_objfile): Update.
2519 * main.c (set_gdb_data_directory): Update.
2520 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2521
0d999a6e
ZZ
25222017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2523
2524 * cli-cmds.c (list_commands): List actual code around more than
2525 one location.
2526
329d5e7e
JB
25272017-08-21 John Baldwin <jhb@FreeBSD.org>
2528
2529 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2530
bf223d3e
PA
25312017-08-21 Pedro Alves <palves@redhat.com>
2532
2533 PR gdb/19487
2534 * c-exp.y (variable production): Handle function aliases.
2535 * minsyms.c (msymbol_is_text): New function.
2536 * minsyms.h (msymbol_is_text): Declare.
2537 * symtab.c (find_function_alias_target): New function.
2538 * symtab.h (find_function_alias_target): Declare.
2539
c973d0aa
PA
25402017-08-21 Pedro Alves <palves@redhat.com>
2541
2542 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2543 typedefs.
2544 * typeprint.c (whatis_exp): If handling "whatis", and expression
2545 is OP_TYPE, strip one typedef level. Otherwise don't strip
2546 typedefs here.
2547 * valops.c (value_cast): Save "to" type before resolving
2548 stubs/typedefs. Use that type as resulting value's type.
2549
2989a365
TT
25502017-08-18 Tom Tromey <tom@tromey.com>
2551 Pedro Alves <palves@redhat.com>
2552
2553 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2554 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2555 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2556 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2557 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2558 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2559 (linux_get_siginfo_data): Add "thread" argument. Use
2560 scoped_restore.
2561 * linux-nat.c (linux_child_follow_fork)
2562 (check_stopped_by_watchpoint): Use scoped_restore.
2563 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2564 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2565 (restore_inferior_ptid, save_inferior_ptid): Remove.
2566 * btrace.c (btrace_fetch): Use scoped_restore.
2567 * bsd-uthread.c (bsd_uthread_fetch_registers)
2568 (bsd_uthread_store_registers): Use scoped_restore.
2569 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2570 scoped_restore.
2571 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2572 (aix_thread_xfer_partial): Use scoped_restore.
2573 * inferior.h (save_inferior_ptid): Remove.
2574
e60eb288
YQ
25752017-08-18 Yao Qi <yao.qi@linaro.org>
2576
2577 PR tdep/21818
2578 * arm-tdep.c (gdb_print_insn_arm): Mark
2579 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2580
6d580b63
YQ
25812017-08-18 Yao Qi <yao.qi@linaro.org>
2582
2583 * NEWS: Mention GDBserver's new option "--selftest".
2584 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2585 * selftest.c: Move it to common/selftest.c.
2586 * selftest.h: Move it to common/selftest.h.
2587 * selftest-arch.c (reset): New function.
2588 (tests_with_arch): Call reset.
2589
86dcbf50
YQ
25902017-08-18 Yao Qi <yao.qi@linaro.org>
2591
2592 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2593 instead of exception_fprintf and printf_filtered.
2594
7649770c
YQ
25952017-08-18 Yao Qi <yao.qi@linaro.org>
2596
2597 * selftest.c (register_self_test): Rename it to
2598 selftests::register_test.
2599 (run_self_tests): selftest::run_tests.
2600 * selftest.h: Update declarations.
2601 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2602 selftests::register_test_foreach_arch.
2603 * selftest-arch.h: Update declaration.
2604 * aarch64-tdep.c: Update.
2605 * arm-tdep.c: Likewise.
2606 * disasm-selftests.c: Likewise.
2607 * dwarf2loc.c: Likewise.
2608 * dwarf2-frame.c: Likewise.
2609 * findvar.c: Likewise.
2610 * gdbarch-selftests.c: Likewise.
2611 * maint.c (maintenance_selftest): Likewise.
2612 * regcache.c: Likewise.
2613 * rust-exp.y: Likewise.
2614 * selftest-arch.c: Likewise.
2615 * unittests/environ-selftests.c: Likewise.
2616 * unittests/function-view-selftests.c: Likewise.
2617 * unittests/offset-type-selftests.c: Likewise.
2618 * unittests/optional-selftests.c: Likewise.
2619 * unittests/scoped_restore-selftests.c: Likewise.
2620 * utils-selftests.c: Likewise.
2621
b0cba12e
PA
26222017-08-17 Pedro Alves <palves@redhat.com>
2623
2624 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2625 local.
2626
4c8aa72d
PA
26272017-08-17 Pedro Alves <palves@redhat.com>
2628
2629 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2630 field.
2631 (reset_die_in_process): Delete, replaced by ...
2632 (process_die_scope): ... this new class. Make it responsible for
2633 freeing cu->line_header too.
2634 (process_die): Use process_die_scope.
2635 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2636 cu->line_header_die_owner. Don't release the line header if it's
2637 owned by the CU.
2638 (setup_type_unit_groups): Make the CU/DIE own the line header.
2639 Don't release the line header here.
2640
ba713918
AL
26412017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2642
2643 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2644
44d0fb3a
RK
26452017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2646
2647 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2648 Single-Key mode
2649
a5afdb16
RK
26502017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2651
2652 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2653 mode command list.
2654
47613aeb
SH
26552017-08-15 Stafford Horne <shorne@gmail.com>
2656
2657 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2658
9c3cc999
SH
26592017-08-15 Stafford Horne <shorne@gmail.com>
2660
2661 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2662
206726fb
SDJ
26632017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2664
2665 PR gdb/21954
2666 * infcmd.c (unset_environment_command): Use the 'clear' method on
2667 the environment instead of resetting it.
2668
0335ac6d
JB
26692017-08-15 John Baldwin <jhb@FreeBSD.org>
2670
2671 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2672 platforms.
2673
d3abe1c8
TT
26742017-08-14 Tom Tromey <tom@tromey.com>
2675
2676 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2677 (print_binary_chars): Likewise.
2678 (BITS_IN_BYTES): Remove.
2679
d6382fff
TT
26802017-08-14 Tom Tromey <tom@tromey.com>
2681
2682 PR gdb/21675
2683 * valprint.c (LOW_ZERO): Change value to 034.
2684 (print_octal_chars): Add static_asserts for octal constants.
2685 * printcmd.c (print_scalar_formatted): Add 'd' case.
2686
f978cb06
TT
26872017-08-11 Tom Tromey <tom@tromey.com>
2688
2689 * symfile.c (add_symbol_file_command): Use std::vector.
2690
2f5404b3
TT
26912017-08-14 Tom Tromey <tom@tromey.com>
2692
2693 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2694 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2695 std::move.
2696 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2697
de7985c3
PA
26982017-08-11 Pedro Alves <palves@redhat.com>
2699
2700 * infrun.c (process_event_stop_test): Adjust
2701 function_name_is_marked_for_skip call.
2702 * skip.c: Include <list>.
2703 (skiplist_entry): Make it a class with private fields, and
2704 getters/setters.
2705 (skiplist_entry_chain): Delete.
2706 (skiplist_entries): New.
2707 (skiplist_entry_count): Delete.
2708 (highest_skiplist_entry_num): New.
2709 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2710 (add_skiplist_entry): Delete.
2711 (skiplist_entry::skiplist_entry): New.
2712 (skiplist_entry::add_entry): New.
2713 (skip_file_command, skip_function): Adjust.
2714 (compile_skip_regexp): Delete.
2715 (skip_command): Don't compile regexp here. Adjust to use
2716 skiplist_entry::add_entry.
2717 (skip_info): Adjust to use range-for and getters.
2718 (skip_enable_command, skip_disable_command): Adjust to use
2719 range-for and setters.
2720 (skip_delete_command): Adjust to use std::list.
2721 (add_skiplist_entry): Delete.
2722 (skip_file_p): Delete, refactored as ...
2723 (skiplist_entry::do_skip_file_p): ... this new method.
2724 (skip_gfile_p): Delete, refactored as ...
2725 (skiplist_entry::do_gskip_file_p): ... this new method.
2726 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2727 (skiplist_entry::skip_function_p): ... this new method.
2728 (function_name_is_marked_for_skip): Now returns bool, and takes
2729 the function sal by const reference. Adjust to use range-for and
2730 skiplist_entry methods.
2731 (_initialize_step_skip): Remove references to
2732 skiplist_entry_chain, skiplist_entry_count.
2733 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2734 takes the function sal by const reference.
2735
be7d3cd5
YQ
27362017-08-11 Yao Qi <yao.qi@linaro.org>
2737
2738 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2739 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2740 (dwarf2_frame_cache):
2741 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2742 RETURN_MASK_ALL and set *this_case to NULL.
2743 * frame-unwind.h: Update comments.
2744
1c90d9f0
YQ
27452017-08-11 Yao Qi <yao.qi@linaro.org>
2746
2747 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2748 (dwarf2_frame_state_copy_regs): Remove.
2749 (dwarf2_frame_state_free_regs): Remove.
2750 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2751 (dwarf2_restore_rule): Call method .alloc_regs instead of
2752 dwarf2_frame_state_alloc_regs.
2753 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2754 constructor. Call std::move.
2755 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2756 (dwarf2_frame_cache): Likewise.
2757
2758 [GDB_SELF_TEST]: Include selftest.h and
2759 selftest-arch.h.
2760 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2761 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2762 execute_cfa_program_test.
2763
2764 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2765 copy ctor, assignment operator, move assignment.
2766 <alloc_regs>: New method.
2767 <swap>: New method.
2768 (struct dwarf2_frame_state): Delete dtor.
2769 (dwarf2_frame_state_alloc_regs): Remove declaration.
2770 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2771 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2772
afe37d6b
YQ
27732017-08-11 Yao Qi <yao.qi@linaro.org>
2774
2775 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2776 (dwarf2_frame_state::dwarf2_frame_state): New.
2777 (dwarf2_frame_state::~dwarf2_frame_state): New.
2778 (dwarf2_fetch_cfa_info): Update.
2779 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2780 rather than a pointer. Update code.
2781 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2782 dtor.
2783 <data_align, code_align, retaddr_column>: Change them to const.
2784 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2785 to bool.
2786
b348037f
YQ
27872017-08-11 Yao Qi <yao.qi@linaro.org>
2788
2789 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2790 <loc.exp>: New field.
2791 * dwarf2-frame.c (execute_cfa_program): Update.
2792 (dwarf2_frame_prev_register): Update.
2793
e7c9de26
PA
27942017-08-10 Pedro Alves <palves@redhat.com>
2795
2796 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2797
e8c6b620
JB
27982017-08-09 John Baldwin <jhb@FreeBSD.org>
2799
2800 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2801 (fbsd_pending_children): Use std::list.
2802 (fbsd_remember_child): Likewise.
2803 (fbsd_is_child_pending): Likewise.
2804 (fbsd_pending_vfork_done): Use std::forward_list.
2805 (fbsd_add_vfork_done): Likewise.
2806 (fbsd_is_vfork_done_pending): Likewise.
2807 (fbsd_next_vfork_done): Likewise.
2808
e4a26669
JB
28092017-08-09 John Baldwin <jhb@FreeBSD.org>
2810
2811 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2812 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2813 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2814 for `mapfilename'.
2815 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 2816 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 2817
142311d3
JB
28182017-08-09 John Baldwin <jhb@FreeBSD.org>
2819
2820 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2821 "filestuff.h".
2822 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2823
42fa2e0e
TT
28242017-08-09 Tom Tromey <tom@tromey.com>
2825
2826 * skip.c (skiplist_entry): New constructor.
2827 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2828 (skiplist_entry::file_is_glob): Now bool.
2829 (skiplist_entry::file, skiplist_entry::function): Now
2830 std::string.
2831 (make_skip_entry): Return a unique_ptr. Use new.
2832 (free_skiplist_entry, free_skiplist_entry_cleanup)
2833 (make_free_skiplist_entry_cleanup): Remove.
2834 (skip_command, skip_disable_command, add_skiplist_entry)
2835 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2836 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2837 (function_name_is_marked_for_skip): Update.
2838 (skip_delete_command): Update. Use delete.
2839
cd3af38d
JW
28402017-08-09 Jiong Wang <jiong.wang@arm.com>
2841
2842 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2843 (aarch64_linux_core_read_description): New function.
2844 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2845
29592bde
PA
28462017-08-09 Pedro Alves <palves@redhat.com>
2847
2848 * cp-name-parser.y (cp_comp_to_string): Return a
2849 gdb::unique_xmalloc_ptr<char>.
2850 * cp-support.c (replace_typedefs_qualified_name)
2851 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2852 (cp_canonicalize_string_full): Use op= instead of explicit
2853 convertion.
2854 (cp_class_name_from_physname, method_name_from_physname)
2855 (cp_func_name, cp_remove_params): Adjust to use
2856 gdb::unique_xmalloc_ptr<char>.
2857 * cp-support.h (cp_comp_to_string): Return a
2858 gdb::unique_xmalloc_ptr<char>.
2859 * python/py-type.c (typy_lookup_type): Adjust to use
2860 gdb::unique_xmalloc_ptr<char>.
2861
b3340438
L
28622017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2863
2864 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2865
e88e8651
YQ
28662017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2867 Yao Qi <yao.qi@linaro.org>
2868
2869 * cp-support.c (cp_canonicalize_string_full): Use
2870 gdb::unique_xmalloc_ptr<char>.
2871 (cp_canonicalize_string): Likewise.
2872
f5a29eb0
YQ
28732017-08-09 Yao Qi <yao.qi@linaro.org>
2874
2875 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2876 * regformats/i386/amd64-avx-avx512.dat: Remove.
2877 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2878 * regformats/i386/amd64-avx-mpx.dat:Remove.
2879 * regformats/i386/amd64-avx.dat: Remove.
2880 * regformats/i386/amd64-mpx.dat: Remove.
2881 * regformats/i386/i386-avx-avx512.dat: Remove.
2882 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2883 * regformats/i386/i386-avx-mpx.dat: Remove.
2884 * regformats/i386/i386-mmx.dat: Remove.
2885 * regformats/i386/i386-mpx.dat: Remove.
2886
57757c2f
YQ
28872017-08-09 Yao Qi <yao.qi@linaro.org>
2888
2889 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2890 * amd64-tdep.c: Don't include features/i386/x32*.c.
2891 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2892 functions.
2893 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2894 and i386/x32-avx-avx512.
2895 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2896 and i386/x32.xml.
2897 * features/i386/x32-avx-avx512.c: Removed.
2898 * features/i386/x32-avx-avx512.xml: Removed.
2899 * features/i386/x32-avx.c: Removed.
2900 * features/i386/x32-avx.xml: Removed.
2901 * features/i386/x32.c: Removed.
2902 * features/i386/x32.xml: Removed.
2903 * regformats/i386/x32-avx-avx512.dat: Removed.
2904 * regformats/i386/x32-avx.dat: Removed.
2905 * regformats/i386/x32.dat: Removed.
2906
ba7b109b
MR
29072017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2908
2909 PR breakpoints/21886
2910 * mem-break.c (default_memory_insert_breakpoint): Use
2911 `->placed_address' rather than `->reqstd_address' for the
2912 breakpoint location.
2913
e347efc3
MR
29142017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2915
2916 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2917 assertions.
2918
0dba2a6c
MR
29192017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2920
2921 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2922 a union of `tdep_info', `tdesc_data' and `id'.
2923 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2924 rather than `info.tdep_info'.
2925 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2926 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2927 * i386-tdep.c (i386_gdbarch_init): Likewise.
2928 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2929 * mips-tdep.c (mips_gdbarch_init): Likewise.
2930 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2931 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2932 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2933 `info.tdep_info'.
2934 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2935 `info.tdep_info'.
2936 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2937 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2938 `info.tdep_info'.
2939 * spu-tdep.c (spu_gdbarch_init): Likewise.
2940 * gdbarch.h: Regenerate.
2941
16eb6b2d
LS
29422017-08-07 Leszek Swirski <leszeks@google.com>
2943
7b005726 2944 PR symtab/20899
16eb6b2d
LS
2945 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2946
74cbb09e
SM
29472017-08-07 Simon Marchi <simon.marchi@ericsson.com>
2948
2949 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2950 (gdbsim_open): Rename gdb_argv args object to argv.
2951
ee0c3293
TT
29522017-08-05 Tom Tromey <tom@tromey.com>
2953
2954 * compile/compile-object-load.c (compile_object_load): Use
2955 gdb::unique_xmalloc_ptr.
2956 * cli/cli-dump.c (scan_filename): Rename from
2957 scan_filename_with_cleanup. Change return type.
2958 (scan_expression): Rename from scan_expression_with_cleanup.
2959 Change return type.
2960 (dump_memory_to_file, dump_value_to_file, restore_command):
2961 Use gdb::unique_xmalloc_ptr. Update.
2962 * cli/cli-cmds.c (find_and_open_script): Use
2963 gdb::unique_xmalloc_ptr.
2964 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2965 * symmisc.c (maintenance_print_symbols)
2966 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2967 * symfile.c (symfile_bfd_open, generic_load)
2968 (add_symbol_file_command, remove_symbol_file_command): Use
2969 gdb::unique_xmalloc_ptr.
2970 * source.c (openp): Use gdb::unique_xmalloc_ptr.
2971 * psymtab.c (maintenance_print_psymbols): Use
2972 gdb::unique_xmalloc_ptr.
2973 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2974 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2975 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2976 (reload_shared_libraries_1): Likewise.
2977
3232fabd
TT
29782017-08-05 Tom Tromey <tom@tromey.com>
2979
2980 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2981 (rust_op_vector, rust_set_vector): New typedefs.
2982 (current_parser): New global.
2983 (work_obstack): Change to pointer type. Update all users.
2984 (rust_ast, pstate): Remove globals.
2985 (struct rust_parser): New.
2986 (%union) <params, field_inits>: Change type.
2987 (start, tuple_expr, unit_expr, struct_expr_list, literal)
2988 (field_expr, expr_list, maybe_expr_list, type_list): Update.
2989 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2990 (convert_params_to_types, convert_params_to_expression): Change
2991 type of "params".
2992 (ast_string): Change type of "fields".
2993 (rust_parse): Make a rust_parser. Remove cleanups.
2994 (rust_lex_tests): Make and install an auto_obstack.
2995
f02fd774
YQ
29962017-08-04 Yao Qi <yao.qi@linaro.org>
2997
2998 * configure.srv (ipa_x32_linux_regobj): New.
2999 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3000 instead of X86_TDESC_AVX512.
3001 (initialize_low_tracepoint): Call
3002 init_registers_x32_avx_avx512_linux.
3003
91975afd
YQ
30042017-08-04 Yao Qi <yao.qi@linaro.org>
3005
3006 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3007
2331fa3a
RK
30082017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3009
3010 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3011
744e4fe1
TT
30122017-08-03 Tom Tromey <tom@tromey.com>
3013
3014 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3015 Remove.
3016 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3017
1c034b67
TT
30182017-08-03 Tom Tromey <tom@tromey.com>
3019
3020 * python/py-param.c (compute_enum_values): Use gdb_argv.
3021
773a1edc
TT
30222017-08-03 Tom Tromey <tom@tromey.com>
3023
3024 * utils.h (struct gdb_argv_deleter): New.
3025 (gdb_argv): New class.
3026 * utils.c (gdb_argv::reset): New method.
3027 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3028 * tracefile.c (tsave_command): Use gdb_argv.
3029 * top.c (new_ui_command): Use gdb_argv.
3030 * symmisc.c (maintenance_print_symbols)
3031 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3032 * symfile.c (symbol_file_command, generic_load)
3033 (remove_symbol_file_command): Use gdb_argv.
3034 * stack.c (backtrace_command): Use gdb_argv.
3035 * source.c (add_path, show_substitute_path_command)
3036 (unset_substitute_path_command, set_substitute_path_command):
3037 Use gdb_argv.
3038 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3039 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3040 * remote.c (extended_remote_run, remote_put_command)
3041 (remote_get_command, remote_delete_command): Use gdb_argv.
3042 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3043 (gdbsim_open): Use gdb_argv.
3044 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3045 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3046 * procfs.c (procfs_info_proc): Use gdb_argv.
3047 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3048 * infrun.c (handle_command): Use gdb_argv.
3049 * inferior.c (add_inferior_command, clone_inferior_command):
3050 Use gdb_argv.
3051 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3052 * exec.c (exec_file_command): Use gdb_argv.
3053 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3054 * compile/compile.c (build_argc_argv): Use gdb_argv.
3055
0d50bde3
TT
30562017-08-03 Tom Tromey <tom@tromey.com>
3057
3058 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3059
7f968c89
TT
30602017-08-03 Tom Tromey <tom@tromey.com>
3061
3062 * python/python.c (compute_python_string): Return std::string.
3063 (gdbpy_eval_from_control_command): Update.
3064 (do_start_initialization): Use std::string.
3065 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3066 xstrprintf.
3067 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3068 xstrprintf.
3069
3c9ebddd
TT
30702017-08-03 Tom Tromey <tom@tromey.com>
3071
3072 * top.h (do_restore_instream_cleanup): Remove.
3073 * top.c (do_restore_instream_cleanup): Remove.
3074 (read_command_file): Use scoped_restore.
3075 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3076
b51b225e
TT
30772017-08-03 Tom Tromey <tom@tromey.com>
3078
3079 * cli/cli-script.c (execute_user_command)
3080 (execute_control_command): Use scoped_restore.
3081
ac991630
TT
30822017-08-03 Tom Tromey <tom@tromey.com>
3083
3084 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3085 (execute_user_command): Remove user_call_depth; use
3086 user_args_stack's size instead.
3087
898e0c8e
TT
30882017-08-03 Tom Tromey <tom@tromey.com>
3089
3090 * top.h (in_user_command): Remove.
3091 * top.c (in_user_command): Remove.
3092 * cli/cli-script.c (do_restore_user_call_depth)
3093 (execute_user_command): Update.
3094
26fcd5d7
TT
30952017-08-03 Tom Tromey <tom@tromey.com>
3096
3097 * valops.c (search_struct_method): Use gdb::byte_vector.
3098 * valarith.c (value_concat): Use std::vector.
3099 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3100 (simple_search_memory): Likewise.
3101 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3102 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3103 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3104 * elfread.c (elf_rel_plt_read): Use std::string.
3105 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3106 * cli/cli-dump.c (restore_section_callback): Use
3107 gdb::byte_vector.
3108
7c218e6c
TT
31092017-08-03 Tom Tromey <tom@tromey.com>
3110
3111 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3112
31b68d4a
TT
31132017-08-03 Tom Tromey <tom@tromey.com>
3114
3115 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3116 (tui_register_format): Use scoped_restore.
3117
2ec845e7
TT
31182017-08-03 Tom Tromey <tom@tromey.com>
3119
3120 * reverse.c (exec_direction_default): Remove.
3121 (exec_reverse_once): Use scoped_restore.
3122 * remote.c (restore_remote_timeout): Remove.
3123 (remote_flash_erase, remote_flash_write, remote_flash_done)
3124 (readchar, remote_serial_write): Use scoped_restore.
3125 * cli/cli-script.c (struct source_cleanup_lines_args)
3126 (source_cleanup_lines): Remove.
3127 (script_from_file): Use scoped_restore.
3128 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3129 (source_command): Use scoped_restore.
3130
b3bc8453
TT
31312017-08-03 Tom Tromey <tom@tromey.com>
3132
3133 * utils.h (make_cleanup_free_so): Remove.
3134 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3135 * solist.h (struct so_deleter): New.
3136 (so_list_up): New typedef.
3137 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3138
e3ad2841
TT
31392017-08-03 Tom Tromey <tom@tromey.com>
3140
3141 * utils.h (make_cleanup_restore_current_language): Remove.
3142 * utils.c (do_restore_current_language)
3143 (make_cleanup_restore_current_language): Remove.
3144 * parse.c (parse_exp_in_context_1)
3145 (parse_expression_with_language): Use
3146 scoped_restore_current_language.
3147 * mi/mi-main.c (mi_cmd_execute): Use
3148 scoped_restore_current_language.
3149 * language.h (scoped_restore_current_language): New class.
3150
b80cf838
TT
31512017-08-03 Tom Tromey <tom@tromey.com>
3152
3153 * compile/compile.c (cleanup_unlink_file): Remove.
3154 (compile_to_object): Use gdb::unlinker.
3155 (eval_compile_command): Likewise.
3156
fad0444a
TT
31572017-08-03 Tom Tromey <tom@tromey.com>
3158
3159 * utils.h (make_cleanup_fclose): Remove.
3160 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3161
6e7bc05c
TT
31622017-08-03 Tom Tromey <tom@tromey.com>
3163
3164 * top.c (open_terminal_stream): Return gdb_file_up.
3165 (new_ui_command): Update.
3166
4a45905b
TT
31672017-08-03 Tom Tromey <tom@tromey.com>
3168
3169 * source.c (print_source_lines_base, forward_search_command)
3170 (reverse_search_command): Use gdb_file_up.
3171
7cd06d6e
TT
31722017-08-03 Tom Tromey <tom@tromey.com>
3173
3174 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3175
ed166945
TT
31762017-08-03 Tom Tromey <tom@tromey.com>
3177
3178 * cli/cli-cmds.c (find_and_open_script): Change return type.
3179 Remove "streamp" and "full_path" parameters.
3180 (source_script_with_search): Update.
3181 * auto-load.c (source_script_file): Update.
3182 * cli/cli-cmds.h (find_and_open_script): Change type.
3183 (open_script): New struct.
3184
d419f42d
TT
31852017-08-03 Tom Tromey <tom@tromey.com>
3186
3187 * xml-support.c (xml_fetch_content_from_file): Update.
3188 * ui-file.c (stdio_file::open): Update.
3189 * tracefile-tfile.c (tfile_start): Update.
3190 * remote.c (remote_file_put, remote_file_get): Update.
3191 * nat/linux-procfs.c (linux_proc_get_int)
3192 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3193 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3194 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3195 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3196 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3197 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3198 * linux-nat.c (linux_proc_pending_signals): Update.
3199 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3200 (file_closer): Remove.
3201 * compile/compile.c (compile_to_object): Update.
3202 * common/filestuff.h (struct gdb_file_deleter): New.
3203 (gdb_file_up): New typedef.
3204 (gdb_fopen_cloexec): Change return type.
3205 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3206 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3207 (dump_binary_file, restore_binary_file): Update.
3208 * auto-load.c (auto_load_objfile_script_1): Update.
3209
4a2b031d
TT
32102017-08-03 Tom Tromey <tom@tromey.com>
3211
3212 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3213 (info_static_tracepoint_markers_command): Likewise.
3214 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3215 * skip.c (skip_info): Use ui_out_emit_table.
3216 * progspace.c (print_program_space): Use ui_out_emit_table.
3217 * osdata.c (info_osdata): Use ui_out_emit_table.
3218 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3219 ui_out_emit_table.
3220 * linux-thread-db.c (info_auto_load_libthread_db): Use
3221 ui_out_emit_table.
3222 * inferior.c (print_inferior): Use ui_out_emit_table.
3223 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3224 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3225 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3226 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3227 * ui-out.h (class ui_out_emit_table): New.
3228
a4f320fd
MR
32292017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3230
3231 * mips-tdep.c (mips_fpu_type_str): New function.
3232 (mips_dump_tdep): Call it.
3233
a2f1f308
MR
32342017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3235
3236 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3237 `->mips_fpu_type'.
3238
7e5ed83b
XR
32392017-07-31 Xavier Roirand <roirand@adacore.com>
3240
3241 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3242
4c9dc811
XR
32432017-07-27 Xavier Roirand <roirand@adacore.com>
3244
3245 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3246
27d41eac
YQ
32472017-07-26 Yao Qi <yao.qi@linaro.org>
3248
3249 * cli/cli-cmds.c (maintenancechecklist): New variable.
3250 * gdbcmd.h (maintenancechecklist): Declare it.
3251 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3252 Call i386_linux_read_description with different masks.
3253 * maint.c (maintenance_check_command): New function.
3254 (_initialize_maint_cmds): Call add_prefix_cmd.
3255 * target-descriptions.c (tdesc_reg): override operator != and ==.
3256 (tdesc_type): Likewise.
3257 (tdesc_feature): Likewise.
3258 (target_desc): Likewise.
3259 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3260 (maintenance_check_xml_descriptions): New function.
3261 (_initialize_target_descriptions) Add command "xml-descriptions".
3262 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3263
ea03d0d3
YQ
32642017-07-26 Yao Qi <yao.qi@linaro.org>
3265
3266 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3267 Include features/i386/32bit-*.c.
3268 (i386_linux_read_description): Generate target description if it
3269 doesn't exist.
3270 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3271 functions.
3272 * features/i386/32bit-linux.c: Re-generated.
3273 * features/i386/32bit-sse.c: Likewise.
3274 * target-descriptions.c (print_c_feature::visit): Print code to
3275 set register number if needed.
3276 (print_c_feature) <m_next_regnum>: New field.
3277
25aa13e5
YQ
32782017-07-26 Yao Qi <yao.qi@linaro.org>
3279
3280 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3281 (FEATURE_XMLFILES): New.
3282 (FEATURE_CFILES): New.
3283 New rules.
3284 (clean-cfiles): Remove generated c files.
3285 * features/i386/32bit-avx.c: Generated.
3286 * features/i386/32bit-avx512.c: Generated.
3287 * features/i386/32bit-core.c: Generated.
3288 * features/i386/32bit-linux.c: Generated.
3289 * features/i386/32bit-mpx.c: Generated.
3290 * features/i386/32bit-pkeys.c: Generated.
3291 * features/i386/32bit-sse.c: Generated.
3292 * target-descriptions.c: Include algorithm.
3293 (tdesc_element_visitor): Add method visit_end.
3294 (print_c_tdesc): Implement visit_end.
3295 (print_c_tdesc:: m_filename_after_features): Move it to
3296 protected.
3297 (print_c_feature): New class.
3298 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3299 name starts with "i386/32bit-".
3300
6eb1e6a8
YQ
33012017-07-26 Yao Qi <yao.qi@linaro.org>
3302
3303 * target-descriptions.c (tdesc_element_visitor): New class.
3304 (tdesc_element): New class.
3305 (tdesc_reg): Inherit from tdesc_element.
3306 (tdesc_reg::accept): New function.
3307 (tdesc_type): Inherit from tdesc_element.
3308 (tdesc_type::accept): New function.
3309 (tdesc_feature): Inherit from tdesc_element.
3310 (tdesc_feature::accept): New function.
3311 (target_desc): Inherit from tdesc_element.
3312 (target_desc::target_desc): New.
3313 (target_desc::~target_desc): New.
3314 (target_desc::accept): New.
3315 (allocate_target_description): Use new.
3316 (free_target_description): Use delete.
3317 (print_c_tdesc): New class.
3318 (maint_print_c_tdesc_cmd): Adjust.
3319
3320 * features/aarch64.c: Re-generated.
3321 * features/arc-arcompact.c: Re-generated.
3322 * features/arc-v2.c: Re-generated.
3323 * features/arm/arm-with-iwmmxt.c: Re-generated.
3324 * features/arm/arm-with-m.c: Re-generated.
3325 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3326 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3327 * features/arm/arm-with-neon.c: Re-generated.
3328 * features/arm/arm-with-vfpv2.c: Re-generated.
3329 * features/arm/arm-with-vfpv3.c: Re-generated.
3330 * features/i386/amd64-avx-avx512.c: Re-generated.
3331 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3332 * features/i386/amd64-avx.c: Re-generated.
3333 * features/i386/amd64-avx-linux.c: Re-generated.
3334 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3335 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3336 * features/i386/amd64-avx-mpx.c: Re-generated.
3337 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3338 * features/i386/amd64.c: Re-generated.
3339 * features/i386/amd64-linux.c: Re-generated.
3340 * features/i386/amd64-mpx.c: Re-generated.
3341 * features/i386/amd64-mpx-linux.c: Re-generated.
3342 * features/i386/i386-avx-avx512.c: Re-generated.
3343 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3344 * features/i386/i386-avx.c: Re-generated.
3345 * features/i386/i386-avx-linux.c: Re-generated.
3346 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3347 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3348 * features/i386/i386-avx-mpx.c: Re-generated.
3349 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3350 * features/i386/i386.c: Re-generated.
3351 * features/i386/i386-linux.c: Re-generated.
3352 * features/i386/i386-mmx.c: Re-generated.
3353 * features/i386/i386-mmx-linux.c: Re-generated.
3354 * features/i386/i386-mpx.c: Re-generated.
3355 * features/i386/i386-mpx-linux.c: Re-generated.
3356 * features/i386/x32-avx-avx512.c: Re-generated.
3357 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3358 * features/i386/x32-avx.c: Re-generated.
3359 * features/i386/x32-avx-linux.c: Re-generated.
3360 * features/i386/x32.c: Re-generated.
3361 * features/i386/x32-linux.c: Re-generated.
3362 * features/microblaze.c: Re-generated.
3363 * features/microblaze-with-stack-protect.c: Re-generated.
3364 * features/mips64-dsp-linux.c: Re-generated.
3365 * features/mips64-linux.c: Re-generated.
3366 * features/mips-dsp-linux.c: Re-generated.
3367 * features/mips-linux.c: Re-generated.
3368 * features/nds32.c: Re-generated.
3369 * features/nios2.c: Re-generated.
3370 * features/nios2-linux.c: Re-generated.
3371 * features/rs6000/powerpc-32.c: Re-generated.
3372 * features/rs6000/powerpc-32l.c: Re-generated.
3373 * features/rs6000/powerpc-403.c: Re-generated.
3374 * features/rs6000/powerpc-403gc.c : Re-generated.
3375 * features/rs6000/powerpc-405.c: Re-generated.
3376 * features/rs6000/powerpc-505.c: Re-generated.
3377 * features/rs6000/powerpc-601.c: Re-generated.
3378 * features/rs6000/powerpc-602.c: Re-generated.
3379 * features/rs6000/powerpc-603.c: Re-generated.
3380 * features/rs6000/powerpc-604.c: Re-generated.
3381 * features/rs6000/powerpc-64.c: Re-generated.
3382 * features/rs6000/powerpc-64l.c: Re-generated.
3383 * features/rs6000/powerpc-7400.c: Re-generated.
3384 * features/rs6000/powerpc-750.c: Re-generated.
3385 * features/rs6000/powerpc-860.c: Re-generated.
3386 * features/rs6000/powerpc-altivec32.c: Re-generated.
3387 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3388 * features/rs6000/powerpc-altivec64.c: Re-generated.
3389 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3390 * features/rs6000/powerpc-cell32l.c: Re-generated.
3391 * features/rs6000/powerpc-cell64l.c: Re-generated.
3392 * features/rs6000/powerpc-e500.c: Re-generated.
3393 * features/rs6000/powerpc-e500l.c: Re-generated.
3394 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3395 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3396 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3397 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3398 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3399 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3400 * features/rs6000/powerpc-vsx32.c: Re-generated.
3401 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3402 * features/rs6000/powerpc-vsx64.c: Re-generated.
3403 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3404 * features/rs6000/rs6000.c: Re-generated.
3405 * features/s390-linux32.c: Re-generated.
3406 * features/s390-linux32v1.c: Re-generated.
3407 * features/s390-linux32v2.c: Re-generated.
3408 * features/s390-linux64.c: Re-generated.
3409 * features/s390-linux64v1.c: Re-generated.
3410 * features/s390-linux64v2.c: Re-generated.
3411 * features/s390-te-linux64.c: Re-generated.
3412 * features/s390-tevx-linux64.c: Re-generated.
3413 * features/s390-vx-linux64.c: Re-generated.
3414 * features/s390x-linux64.c: Re-generated.
3415 * features/s390x-linux64v1.c: Re-generated.
3416 * features/s390x-linux64v2.c: Re-generated.
3417 * features/s390x-te-linux64.c: Re-generated.
3418 * features/s390x-tevx-linux64.c: Re-generated.
3419 * features/s390x-vx-linux64.c: Re-generated.
3420 * features/sparc/sparc32-solaris.c: Re-generated.
3421 * features/sparc/sparc64-solaris.c: Re-generated.
3422 * features/tic6x-c62x.c: Re-generated.
3423 * features/tic6x-c62x-linux.c: Re-generated.
3424 * features/tic6x-c64x.c: Re-generated.
3425 * features/tic6x-c64x-linux.c: Re-generated.
3426 * features/tic6x-c64xp.c: Re-generated.
3427 * features/tic6x-c64xp-linux.c: Re-generated.
3428
35b4818d
YQ
34292017-07-26 Yao Qi <yao.qi@linaro.org>
3430
3431 * i386-linux-tdep.c (i386_linux_read_description): New function.
3432 (i386_linux_core_read_description): Call
3433 i386_linux_read_description.
3434 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3435 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3436 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3437 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3438 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3439 * x86-linux-nat.c (x86_linux_read_description): Call
3440 i386_linux_read_description.
3441
8e2141c6
YQ
34422017-07-26 Yao Qi <yao.qi@linaro.org>
3443
3444 * NEWS: Mention it.
3445 * features/Makefile (%.c: %.xml): Pass the xml file name to
3446 command "maint print c-tdesc".
3447 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3448 name from 'arg'.
3449
b468ff4c
YQ
34502017-07-26 Yao Qi <yao.qi@linaro.org>
3451
3452 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3453 in-class initialization.
3454 (tdesc_create_feature): Call new instead of XCNEW.
3455 (free_target_description): Ue delete.
3456
b9c0e1b4
JB
34572017-07-25 John Baldwin <jhb@FreeBSD.org>
3458
3459 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3460
a04b5337
YQ
34612017-07-25 Yao Qi <yao.qi@linaro.org>
3462
3463 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3464 constant.
3465 (amd64_x32_init_abi): Likewise.
3466 * amd64-tdep.h (amd64_init_abi): Update declaration.
3467 (amd64_x32_init_abi): Likewise.
3468
02ad7fc2
YQ
34692017-07-25 Yao Qi <yao.qi@linaro.org>
3470
3471 PR tdep/21717
3472 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3473 condition for FPSCR.
3474 (arm_linux_store_inferior_registers): Likewise.
3475
b6f48cb0
TT
34762017-07-22 Tom Tromey <tom@tromey.com>
3477
3478 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3479 <syscalls_counts>: Now a std::vector.
3480 (get_catch_syscall_inferior_data): Use "new".
3481 (catch_syscall_inferior_data_cleanup): Use "delete".
3482 (insert_catch_syscall, remove_catch_syscall)
3483 (clear_syscall_counts): Update.
3484
e12c9b7a
TT
34852017-07-22 Tom Tromey <tom@tromey.com>
3486
3487 * break-catch-syscall.c (syscall_catchpoint)
3488 <syscalls_to_be_caught>: Now a std::vector<int>
3489 (~syscall_catchpoint): Remove.
3490 (insert_catch_syscall, remove_catch_syscall)
3491 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3492 (print_mention_catch_syscall, print_recreate_catch_syscall):
3493 Update.
3494 (create_syscall_event_catchpoint): Change type of "filter"
3495 parameter.
3496 (catch_syscall_split_args): Return a std::vector.
3497 (catch_syscall_command_1, catching_syscall_number_1): Update.
3498
4fa8aeac
TT
34992017-07-22 Tom Tromey <tom@tromey.com>
3500
3501 * break-catch-throw.c (struct exception_catchpoint)
3502 <exception_rx>: Now a std::string.
3503 (~exception_catchpoint): Remove.
3504 (print_one_detail_exception_catchpoint): Update.
3505 (handle_gnu_v3_exceptions): Change type of except_rx.
3506 (extract_exception_regexp): Return a std::string.
3507 (catch_exception_command_1): Update.
3508
f746a154
TT
35092017-07-22 Tom Tromey <tom@tromey.com>
3510
3511 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3512 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3513 std::vector.
3514 <catch_all>: Now a bool.
3515 (~signal_catchpoint): Remove.
3516 (signal_catchpoint_insert_location)
3517 (signal_catchpoint_remove_location)
3518 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3519 (signal_catchpoint_print_mention)
3520 (signal_catchpoint_print_recreate)
3521 (signal_catchpoint_explains_signal): Update.
3522 (create_signal_catchpoint): Change type of "filter" and
3523 "catch_all".
3524 (catch_signal_split_args): Return a std::vector. Change type of
3525 "catch_all".
3526 (catch_signal_command): Update.
3527
47e77640
PA
35282017-07-20 Pedro Alves <palves@redhat.com>
3529
3530 * ada-lang.c (ada_language_defn): Make extern.
3531 (_initialize_ada_language): Remove add_language call.
3532 * c-lang.c (c_language_defn, cplus_language_defn)
3533 (asm_language_defn, minimal_language_defn): Make extern.
3534 (_initialize_c_language): Delete.
3535 * completer.c (compare_cstrings): Delete, moved to utils.h.
3536 * d-lang.c (d_language_defn): Make extern.
3537 (_initialize_d_language): Remove add_language calls.
3538 * defs.h (enum language): Add comment.
3539 * f-lang.c (f_language_defn): Make extern.
3540 (_initialize_f_language): Remove add_language call.
3541 * go-lang.c (go_language_defn): Make extern.
3542 (_initialize_go_language): Remove add_language call.
3543 * language.c: Include <algorithm>.
3544 (languages): Redefine as const array.
3545 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3546 (set_language_command): Handle "local". Use for-range loop.
3547 (set_language): Remove loop.
3548 (language_enum): Rewrite.
3549 (language_def, language_str): Remove loops.
3550 (add_language): Delete.
3551 (add_set_language_command): New, based on add_languages.
3552 (skip_language_trampoline): Adjust.
3553 (local_language_defn): Delete.
3554 (language_gdbarch_post_init): Adjust.
3555 (_initialize_language): Remove add_language calls. Call
3556 add_set_language_command.
3557 * language.h (add_language): Delete.
3558 (auto_language_defn)
3559 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3560 (asm_language_defn, c_language_defn, cplus_language_defn)
3561 (d_language_defn, f_language_defn, go_language_defn)
3562 (m2_language_defn, objc_language_defn, opencl_language_defn)
3563 (pascal_language_defn, rust_language_defn): Declare.
3564 * m2-lang.c (m2_language_defn): Make extern.
3565 (_initialize_m2_language): Remove add_language call.
3566 * objc-lang.c (objc_language_defn): Make extern.
3567 (_initialize_objc_language): Remove add_language call.
3568 * opencl-lang.c (opencl_language_defn): Make extern.
3569 (_initialize_opencl_language): Remove add_language call.
3570 * p-lang.c (pascal_language_defn): Make extern.
3571 (_initialize_pascal_language): Delete.
3572 * rust-lang.c (rust_language_defn): Make extern.
3573 (_initialize_rust_language): Delete.
3574 * utils.h (compare_cstrings): New static inline function.
3575
edb0c9cb
PA
35762017-07-20 Pedro Alves <palves@redhat.com>
3577
3578 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3579 (get_var_value): Constify parameters.
3580 (get_int_var_value): Change prototype.
3581 (to_fixed_range_type): Adjust.
3582 * ada-lang.h (get_int_var_value): Change prototype.
3583
a778f165
PA
35842017-07-20 Pedro Alves <palves@redhat.com>
3585
3586 * dwarf2read.c (dw2_lookup_symbol): Use
3587 SYMBOL_MATCHES_SEARCH_NAME.
3588 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3589
42edd901
PA
35902017-07-20 Pedro Alves <palves@redhat.com>
3591
3592 * block.c (block_iter_name_step, block_iter_name_first)
3593 (block_iter_name_next): Delete.
3594 (block_lookup_symbol_primary): Adjust to use
3595 dict_iter_match_first/dict_iter_match_next.
3596 * block.h (block_iter_name_first, block_iter_name_next): Delete
3597 declarations.
3598 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3599 dict_iter_match_first/dict_iter_match_next.
3600
cf325299
PA
36012017-07-20 Pedro Alves <palves@redhat.com>
3602
3603 * cp-support.c (cp_find_first_component_aux): Add missing case for
3604 end of string.
3605
c5ed0576
DB
36062017-07-18 David Blaikie <dblaikie@gmail.com>
3607
3608 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3609 of dwo_cu's dwo_file.
3610
27841e76
YQ
36112017-07-18 Yao Qi <yao.qi@linaro.org>
3612
3613 * remote.c (store_registers_using_G): Remove one line comment.
3614
cfb7e58b
YQ
36152017-07-18 Yao Qi <yao.qi@linaro.org>
3616
3617 * regcache.c (regcache_cpy): Simplify it.
3618 (regcache::cpy_no_passthrough): Remove it.
3619 * regcache.h (cpy_no_passthrough): Remove it.
3620 (regcache_dup, regcache_cpy): Update comments.
3621
386535dd
PA
36222017-07-18 Pedro Alves <palves@redhat.com>
3623
3624 * remote-sim.c (sim_command_completer): Adjust to work with a
3625 completion_tracker instead of a VEC.
3626
c45ec17c
PA
36272017-07-17 Pedro Alves <palves@redhat.com>
3628
3629 * completer.c (complete_source_filenames): New function.
3630 (complete_address_and_linespec_locations): New function.
3631 (location_completer): Use complete_address_and_linespec_locations.
3632 (completion_tracker::build_completion_result): Honor the tracker's
3633 request to suppress append.
3634 * completer.h (completion_tracker::suppress_append_ws)
3635 (completion_tracker::set_suppress_append_ws): New methods.
3636 (completion_tracker::m_suppress_append_ws): New field.
3637 (complete_source_filenames): New declaration.
3638 * linespec.c (linespec_complete_what): New.
3639 (struct ls_parser) <complete_what, completion_word,
3640 completion_quote_char, completion_quote_end, completion_tracker>:
3641 New fields.
3642 (string_find_incomplete_keyword_at_end): New.
3643 (linespec_lexer_lex_string): Record quote char. If in completion
3644 mode, don't throw.
3645 (linespec_lexer_consume_token): Advance the completion word point.
3646 (linespec_lexer_peek_token): Save/restore completion info.
3647 (save_stream_and_consume_token): New.
3648 (set_completion_after_number): New.
3649 (linespec_parse_basic): Set what to complete next depending on
3650 token. Handle function and label completions specially.
3651 (parse_linespec): Disable objc shortcut in completion mode. Set
3652 what to complete next depending on token type. Skip keyword if in
3653 completion mode.
3654 (complete_linespec_component, linespec_complete): New.
3655 * linespec.h (linespec_complete): Declare.
3656
be966d42
PA
36572017-07-17 Pedro Alves <palves@redhat.com>
3658
3659 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3660 Handle 'operator<' / 'operator<<'.
3661
a2459270
PA
36622017-07-17 Pedro Alves <palves@redhat.com>
3663
3664 * completer.c (collect_explicit_location_matches): Handle
3665 MATCH_LABEL.
3666 (convert_explicit_location_to_linespec): New, factored out from
3667 ...
3668 (convert_explicit_location_to_sals): ... this.
3669 (complete_label): New.
3670 (linespec_complete_label, find_label_symbols_in_block): New.
3671 (find_label_symbols): Add completion_mode parameter and adjust to
3672 call find_label_symbols_in_block.
3673 * linespec.h (linespec_complete_label): Declare.
3674
c6756f62
PA
36752017-07-17 Pedro Alves <palves@redhat.com>
3676
3677 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3678 complete_symbol_mode parameter.
3679 * cli/cli-cmds.c (complete_command): Get the completion result out
3680 of the handle_brkchars tracker if used a custom word point.
3681 * completer.c: Include "linespec.h".
3682 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3683 (advance_to_expression_complete_word_point): New.
3684 (completion_tracker::completes_to_completion_word): New.
3685 (complete_files_symbols): Pass down
3686 complete_symbol_mode::EXPRESSION.
3687 (explicit_options, probe_options): New.
3688 (collect_explicit_location_matches): Complete on the
3689 explictit_loc->foo instead of word. Use
3690 linespec_complete_function. Handle MATCH_LINE. Handle offering
3691 keyword and options completions.
3692 (backup_text_ptr): Delete.
3693 (skip_keyword): New.
3694 (complete_explicit_location): Remove 'word' parameter. Add
3695 language, quoted_arg_start and quoted_arg_end parameters.
3696 Rewrite, parsing left to right.
3697 (location_completer): Rewrite.
3698 (location_completer_handle_brkchars): New function.
3699 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3700 (enum complete_line_internal_reason): Adjust comments.
3701 (completion_tracker::discard_completions): New.
3702 (completer_handle_brkchars_func_for_completer): Handle
3703 location_completer.
3704 (gdb_custom_word_point_brkchars)
3705 (gdb_org_rl_basic_quote_characters): New.
3706 (gdb_completion_word_break_characters_throw)
3707 (completion_find_completion_word): Handle trackers that use a
3708 custom word point.
3709 (completion_tracker::advance_custom_word_point_by): New.
3710 (completion_tracker::build_completion_result): Don't rely on
3711 readline appending the quote char.
3712 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3713 use a custom word point.
3714 (gdb_rl_attempted_completion_function): Restore
3715 rl_basic_quote_characters.
3716 * completer.h (class completion_tracker): Extend intro comment.
3717 (completion_tracker::set_quote_char)
3718 (completion_tracker::quote_char)
3719 (completion_tracker::set_use_custom_word_point)
3720 (completion_tracker::use_custom_word_point)
3721 (completion_tracker::custom_word_point)
3722 (completion_tracker::set_custom_word_point)
3723 (completion_tracker::advance_custom_word_point_by)
3724 (completion_tracker::completes_to_completion_word)
3725 (completion_tracker::discard_completions): New methods.
3726 (completion_tracker::m_quote_char)
3727 (completion_tracker::m_use_custom_word_point)
3728 (completion_tracker::m_custom_word_point): New fields.
3729 (advance_to_expression_complete_word_point): Declare.
3730 * f-lang.c (f_collect_symbol_completion_matches): Add
3731 complete_symbol_mode parameter.
3732 * language.h (struct language_defn)
3733 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3734 parameter.
3735 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3736 (linespec_complete_function): New function.
3737 (linespec_lexer_lex_keyword): Adjust.
3738 * linespec.h (linespec_keywords, linespec_complete_function): New
3739 declarations.
3740 * location.c (find_end_quote): New function.
3741 (explicit_location_lex_one): Add explicit_completion_info
3742 parameter. Save quoting info. Don't throw if being called for
3743 completion. Don't handle Ada operators here.
3744 (is_cp_operator, skip_op_false_positives, first_of)
3745 (explicit_location_lex_one_function): New function.
3746 (string_to_explicit_location): Replace 'dont_throw' parameter with
3747 an explicit_completion_info pointer parameter. Handle it. Don't
3748 use explicit_location_lex_one to lex function names. Use
3749 explicit_location_lex_one_function instead.
3750 * location.h (struct explicit_completion_info): New.
3751 (string_to_explicit_location): Replace 'dont_throw' parameter with
3752 an explicit_completion_info pointer parameter.
3753 * symtab.c (default_collect_symbol_completion_matches_break_on):
3754 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3755 (default_collect_symbol_completion_matches)
3756 (collect_symbol_completion_matches): Add complete_symbol_mode
3757 parameter.
3758 (collect_symbol_completion_matches_type): Pass down
3759 complete_symbol_mode::EXPRESSION.
3760 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3761 parameter. Handle LINESPEC mode.
3762 * symtab.h (complete_symbol_mode): New.
3763 (default_collect_symbol_completion_matches_break_on)
3764 (default_collect_symbol_completion_matches)
3765 (collect_symbol_completion_matches)
3766 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3767 parameter.
3768
1d550c82
PA
37692017-07-17 Pedro Alves <palves@redhat.com>
3770
3771 * utils.c (enum class strncmp_iw_mode): New.
3772 (strcmp_iw): Rename to ...
3773 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3774 parameters. Handle them.
3775 (strncmp_iw): New.
3776 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3777 * utils.h (strncmp_iw): Declare.
3778 (strcmp_iw): Move describing comments here.
3779
8090b426
PA
37802017-07-17 Pedro Alves <palves@redhat.com>
3781
3782 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3783 CP_OPERATOR_STR.
3784 * c-typeprint.c (is_type_conversion_operator): Use
3785 CP_OPERATOR_STR.
3786 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3787 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3788 CP_OPERATOR_LEN.
3789 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3790 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3791 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3792 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3793 CP_OPERATOR_STR.
3794 * location.c: Include "cp-support.h".
3795 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3796 CP_OPERATOR_STR.
3797 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3798 CP_OPERATOR_LEN.
3799
6a2c1b87
PA
38002017-07-17 Pedro Alves <palves@redhat.com>
3801
3802 * cli/cli-cmds.c (complete_command): Use a completion tracker
3803 along with completion_find_completion_word for handle_brkchars
3804 phase.
3805 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3806 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3807 (struct gdb_rl_completion_word_info): New.
3808 (gdb_rl_find_completion_word): New.
3809 (completion_find_completion_word): New.
3810 * completer.h (completion_find_completion_word): Declare.
3811
eb3ff9a5
PA
38122017-07-17 Pedro Alves <palves@redhat.com>
3813
3814 * ada-lang.c (symbol_completion_match): Adjust comments.
3815 (symbol_completion_add): Replace vector parameter with
3816 completion_tracker parameter. Use it.
3817 (ada_make_symbol_completion_list): Rename to...
3818 (ada_collect_symbol_completion_matches): ... this. Add
3819 completion_tracker parameter and use it.
3820 (ada_language_defn): Adjust.
3821 * break-catch-syscall.c (catch_syscall_completer): Adjust
3822 prototype and work with completion_tracker instead of VEC.
3823 * breakpoint.c (condition_completer): Adjust prototype and work
3824 with completion_tracker instead of VEC.
3825 * c-lang.c (c_language_defn, cplus_language_defn)
3826 (asm_language_defn, minimal_language_defn): Adjust to renames.
3827 * cli/cli-cmds.c (complete_command): Rework using
3828 completion_tracker. Catch exceptions when completing.
3829 * cli/cli-decode.c (integer_unlimited_completer)
3830 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3831 with completion_tracker instead of VEC.
3832 * command.h (struct completion_tracker): Forward declare.
3833 (completer_ftype, completer_handle_brkchars_ftype): Change
3834 types.
3835 (complete_on_cmdlist, complete_on_enum): Adjust.
3836 * completer.c: Include <algorithm>.
3837 (struct gdb_completer_state): New.
3838 (current_completion): New global.
3839 (readline_line_completion_function): Delete.
3840 (noop_completer, filename_completer)
3841 (filename_completer_handle_brkchars, complete_files_symbols)
3842 (linespec_location_completer): Adjust to work with a
3843 completion_tracker instead of a VEC.
3844 (string_or_empty): New.
3845 (collect_explicit_location_matches): Adjust to work with a
3846 completion_tracker instead of a VEC.
3847 (explicit_location_completer): Rename to ...
3848 (complete_explicit_location): ... this and adjust to work with a
3849 completion_tracker instead of a VEC.
3850 (location_completer): Adjust to work with a completion_tracker
3851 instead of a VEC.
3852 (add_struct_fields): Adjust to work with a completion_list instead
3853 of VEC.
3854 (expression_completer): Rename to ...
3855 (complete_expression): ... this and adjust to work with a
3856 completion_tracker instead of a VEC. Use complete_files_symbols.
3857 (expression_completer): Reimplement on top of complete_expression.
3858 (symbol_completer): Adjust to work with a completion_tracker
3859 instead of a VEC.
3860 (enum complete_line_internal_reason): Add describing comments.
3861 (complete_line_internal_normal_command): Adjust to work with a
3862 completion_tracker instead of a VEC.
3863 (complete_line_internal): Rename to ...
3864 (complete_line_internal_1): ... this and adjust to work with a
3865 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3866 handle_brkchars phase.
3867 (new_completion_tracker): Delete.
3868 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3869 complete_line_internal_1.
3870 (free_completion_tracker): Delete.
3871 (INITIAL_COMPLETION_HTAB_SIZE): New.
3872 (completion_tracker::completion_tracker)
3873 (completion_tracker::~completion_tracker): New.
3874 (maybe_add_completion): Delete.
3875 (completion_tracker::maybe_add_completion)
3876 (completion_tracker::add_completion)
3877 (completion_tracker::add_completions): New.
3878 (throw_max_completions_reached_error): Delete.
3879 (complete_line): Adjust to work with a completion_tracker instead
3880 of a VEC. Don't create a completion_tracker_t or check for max
3881 completions here.
3882 (command_completer, command_completer_handle_brkchars)
3883 (signal_completer, reg_or_group_completer_1)
3884 (reg_or_group_completer, default_completer_handle_brkchars):
3885 Adjust to work with a completion_tracker.
3886 (gdb_completion_word_break_characters_throw): New.
3887 (gdb_completion_word_break_characters): Reimplement.
3888 (line_completion_function): Delete.
3889 (completion_tracker::recompute_lowest_common_denominator)
3890 (expand_preserving_ws)
3891 (completion_tracker::build_completion_result)
3892 (completion_result::completion_result)
3893 (completion_result::completion_result)
3894 (completion_result::~completion_result)
3895 (completion_result::completion_result)
3896 (completion_result::release_match_list, compare_cstrings)
3897 (completion_result::sort_match_list)
3898 (completion_result::reset_match_list)
3899 (gdb_rl_attempted_completion_function_throw)
3900 (gdb_rl_attempted_completion_function): New.
3901 * completer.h (completion_list, struct completion_result)
3902 (class completion_tracker): New.
3903 (complete_line): Add completion_tracker parameter.
3904 (readline_line_completion_function): Delete.
3905 (gdb_rl_attempted_completion_function): New.
3906 (noop_completer, filename_completer, expression_completer)
3907 (location_completer, symbol_completer, command_completer)
3908 (signal_completer, reg_or_group_completer): Update prototypes.
3909 (completion_tracker_t, new_completion_tracker)
3910 (make_cleanup_free_completion_tracker): Delete.
3911 (enum maybe_add_completion_enum): Delete.
3912 (maybe_add_completion): Delete.
3913 (throw_max_completions_reached_error): Delete.
3914 * corefile.c (complete_set_gnutarget): Adjust to work with a
3915 completion_tracker instead of a VEC.
3916 * cp-abi.c (cp_abi_completer): Adjust to work with a
3917 completion_tracker instead of a VEC.
3918 * d-lang.c (d_language_defn): Adjust.
3919 * disasm.c (disassembler_options_completer): Adjust to work with a
3920 completion_tracker instead of a VEC.
3921 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3922 (f_collect_symbol_completion_matches): ... this. Adjust to work
3923 with a completion_tracker instead of a VEC.
3924 (f_language_defn): Adjust.
3925 * go-lang.c (go_language_defn): Adjust.
3926 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3927 Adjust to work with a completion_tracker instead of a VEC.
3928 * infrun.c (handle_completer): Likewise.
3929 * interps.c (interpreter_completer): Likewise.
3930 * interps.h (interpreter_completer): Likewise.
3931 * language.c (unknown_language_defn, auto_language_defn)
3932 (local_language_defn): Adjust.
3933 * language.h (language_defn::la_make_symbol_completion_list):
3934 Rename to ...
3935 (language_defn::la_collect_symbol_completion_matches): ... this
3936 and adjust to work with a completion_tracker instead of a VEC.
3937 * m2-lang.c (m2_language_defn): Adjust.
3938 * objc-lang.c (objc_language_defn): Adjust.
3939 * opencl-lang.c (opencl_language_defn): Adjust.
3940 * p-lang.c (pascal_language_defn): Adjust.
3941 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3942 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3943 with a completion_tracker.
3944 * rust-lang.c (rust_language_defn): Adjust.
3945 * symtab.c (free_completion_list, do_free_completion_list)
3946 (return_val, completion_tracker): Delete.
3947 (completion_list_add_name, completion_list_add_symbol)
3948 (completion_list_add_msymbol, completion_list_objc_symbol)
3949 (completion_list_add_fields, add_symtab_completions): Add
3950 completion_tracker parameter and use it.
3951 (default_make_symbol_completion_list_break_on_1): Rename to...
3952 (default_collect_symbol_completion_matches_break_on): ... this.
3953 Add completion_tracker parameter and use it instead of allocating
3954 a completion tracker here.
3955 (default_make_symbol_completion_list_break_on): Delete old
3956 implementation.
3957 (default_make_symbol_completion_list): Delete.
3958 (default_collect_symbol_completion_matches): New.
3959 (make_symbol_completion_list): Delete.
3960 (collect_symbol_completion_matches): New.
3961 (make_symbol_completion_type): Rename to ...
3962 (collect_symbol_completion_matches_type): ... this. Add
3963 completion_tracker parameter and use it instead of VEC.
3964 (make_file_symbol_completion_list_1): Rename to...
3965 (collect_file_symbol_completion_matches): ... this. Add
3966 completion_tracker parameter and use it instead of VEC.
3967 (make_file_symbol_completion_list): Delete.
3968 (add_filename_to_list): Use completion_list instead of a VEC.
3969 (add_partial_filename_data::list): Now a completion_list.
3970 (make_source_files_completion_list): Work with a completion_list
3971 instead of a VEC.
3972 * symtab.h: Include "completer.h".
3973 (default_make_symbol_completion_list_break_on)
3974 (default_make_symbol_completion_list, make_symbol_completion_list)
3975 (make_symbol_completion_type, make_file_symbol_completion_list)
3976 (make_source_files_completion_list): Delete.
3977 (default_collect_symbol_completion_matches_break_on)
3978 (default_collect_symbol_completion_matches)
3979 (collect_symbol_completion_matches)
3980 (collect_symbol_completion_matches_type)
3981 (collect_file_symbol_completion_matches)
3982 (make_source_files_completion_list): New.
3983 * top.c (init_main): Don't install a rl_completion_entry_function
3984 hook. Install a rl_attempted_completion_function hook instead.
3985 * tui/tui-layout.c (layout_completer): Adjust to work with a
3986 completion_tracker.
3987 * tui/tui-regs.c (tui_reggroup_completer):
3988 * tui/tui-win.c (window_name_completer, focus_completer)
3989 (winheight_completer): Adjust to work with a completion_tracker.
3990 * value.c: Include "completer.h".
3991 (complete_internalvar): Adjust to work with a completion_tracker.
3992 * value.h (complete_internalvar): Likewise.
3993
6e1dbf8c
PA
39942017-07-17 Pedro Alves <palves@redhat.com>
3995
3996 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3997 renames.
3998 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3999 comments to completer_ftype's declaration.
4000 <completer_handle_brkchars>: Change type to
4001 completer_handle_brkchars_ftype.
4002 * command.h (completer_ftype): Add describing comment and give
4003 names to parameters.
4004 (completer_ftype_void): Rename to ...
4005 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4006 (set_cmd_completer_handle_brkchars): Adjust.
4007 * completer.c (filename_completer_handle_brkchars): New function.
4008 (complete_line_internal_normal_command): New function, factored
4009 out from ...
4010 (complete_line_internal): ... here.
4011 (command_completer_handle_brkchars)
4012 (default_completer_handle_brkchars)
4013 (completer_handle_brkchars_func_for_completer): New functions.
4014 * completer.h (set_gdb_completion_word_break_characters): Delete
4015 declaration.
4016 (completer_handle_brkchars_func_for_completer): New declaration.
4017 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4018 completer_handle_brkchars_func_for_completer.
4019
78b13106
PA
40202017-07-17 Pedro Alves <palves@redhat.com>
4021
4022 * completer.c (symbol_completer): New function, based on
4023 make_symbol_completion_list_fn.
4024 * completer.h (symbol_completer): New declaration.
4025 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4026 * python/py-cmd.c (completers): Adjust.
4027 * symtab.c (make_symbol_completion_list_fn): Delete.
4028 * symtab.h (make_symbol_completion_list_fn): Delete.
4029 * cli/cli-decode.c (add_cmd): Adjust.
4030
bbf2f4df
PA
40312017-07-17 Pedro Alves <palves@redhat.com>
4032
4033 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4034 * dwarf2read.c: Include "filename-seen-cache.h".
4035 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4036 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4037 * filename-seen-cache.c: New file.
4038 * filename-seen-cache.h: New file.
4039 * symtab.c: Include "filename-seen-cache.h".
4040 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4041 (create_filename_seen_cache, clear_filename_seen_cache)
4042 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4043 to filename-seen-cache.h/filename-seen-cache.c.
4044 (output_source_filename, sources_info)
4045 (maybe_add_partial_symtab_filename)
4046 (make_source_files_completion_list): Adjust to use
4047 filename_seen_cache.
4048
330cdd98
PA
40492017-07-17 Pedro Alves <palves@redhat.com>
4050
4051 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4052 fields.
4053 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4054 dwarf2_debug_sections*)): New.
4055 (dwarf2_per_objfile::dwarf2_per_objfile(const
4056 dwarf2_per_objfile&)): Declare as deleted.
4057 (dwarf2_per_objfile::operator=): Declare as deleted.
4058 (dwarf2_per_objfile::dwarf2_per_objfile)
4059 (dwarf2_per_objfile::~dwarf2_per_objfile)
4060 (dwarf2_per_objfile::free_cached_comp_units): New.
4061 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4062 ctor. Call dwarf2_per_objfile's ctor manually.
4063 (dwarf2_locate_sections): Deleted/refactored as ...
4064 (dwarf2_per_objfile::locate_sections): ... this new method.
4065 (free_cached_comp_units): Defer to
4066 dwarf2_per_objfile::free_cached_comp_units.
4067 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4068
8880f2a9
TT
40692017-07-14 Tom Tromey <tom@tromey.com>
4070
4071 PR rust/21764:
4072 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4073 parameter.
4074 <UNOP_SIZEOF>: Split into separate case.
4075 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4076
65547233
TT
40772017-07-14 Tom Tromey <tom@tromey.com>
4078
4079 PR rust/21763:
4080 * symtab.c (symbol_matches_domain): Add language_rust to special
4081 case.
4082 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4083 treat LOC_TYPEDEF symbols as variables.
4084
8f14146e
PA
40852017-07-14 Pedro Alves <palves@redhat.com>
4086
4087 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4088 symtabs matching all symtabs with SRCFILE as file name instead of
4089 only considering the first hit, with lookup_symtab.
4090
2347965c
SM
40912017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4094 operator_name parameters.
4095 (gen_expr): Update function call.
4096
40f4af28
SM
40972017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4098
4099 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4100 parameter.
4101 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4102 Likewise.
4103 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4104 parameter, use agent_expr::gdbarch instead, update function
4105 calls.
4106 (locexpr_tracepoint_var_ref): Likewise.
4107 (loclist_tracepoint_var_ref): Likewise.
4108 * ax-gdb.c (gen_trace_static_fields): Likewise.
4109 (gen_traced_pop): Likewise.
4110 (gen_frame_args_address): Likewise.
4111 (gen_frame_locals_address): Likewise.
4112 (gen_var_ref): Likewise.
4113 (gen_struct_ref_recursive): Likewise.
4114 (gen_static_field): Likewise.
4115 (gen_maybe_namespace_elt): Likewise.
4116 (gen_expr): Likewise.
4117 (gen_trace_for_var): Likewise.
4118 (gen_trace_for_expr): Likewise.
4119 (gen_trace_for_return_address): Likewise.
4120
053f8057
SM
41212017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4122
4123 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4124 parameter.
4125 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4126
6661ad48
SM
41272017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4128
4129 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4130 from ax, update calls.
4131 (gen_usual_arithmetic): Likewise.
4132 (gen_integral_promotions): Likewise.
4133 (gen_bitfield_ref): Likewise.
4134 (gen_primitive_field): Likewise.
4135 (gen_struct_ref_recursive): Likewise.
4136 (gen_struct_ref): Likewise.
4137 (gen_maybe_namespace_elt): Likewise.
4138 (gen_struct_elt_for_reference): Likewise.
4139 (gen_namespace_elt): Likewise.
4140 (gen_aggregate_elt_ref): Likewise.
4141 (gen_expr): Get gdbarch from ax, update calls.
4142 (gen_expr_binop_rest): Likewise.
4143
c55a47e7
PA
41442017-07-13 Pedro Alves <palves@redhat.com>
4145
4146 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4147 as default tdesc.
4148 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4149 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4150 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4151 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4152 tdep.
4153 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4154 Get final tdesc from the tdep.
4155 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4156 default tdesc.
4157 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4158 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4159 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4160 Use it as default tdesc.
4161 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4162 down to amd_init_abi. No longer handle fallback tdesc here.
4163 * amd64-tdep.h (tdesc_x32): Declare.
4164 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4165 parameter.
4166 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4167 as default tdesc.
4168
55efceab
AA
41692017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4170
4171 * s390-linux-tdep.c (s390_process_record): Add support for
4172 instructions new in arch12.
4173
0aa37b65
JB
41742017-07-11 John Baldwin <jhb@FreeBSD.org>
4175
4176 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4177 PT_GETFSBASE and PT_GETGSBASE.
4178 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4179 PT_SETGSBASE.
4180
48aeef91
JB
41812017-07-11 John Baldwin <jhb@FreeBSD.org>
4182
4183 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4184 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4185 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4186 those rules.
4187 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4188 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4189 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4190 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4191 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4192 * features/i386/amd64.xml: Add 64bit-segments.xml.
4193 * features/i386/amd64-avx-avx512.c: Regenerated.
4194 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4195 * features/i386/amd64-avx-mpx.c: Regenerated.
4196 * features/i386/amd64-avx.c: Regenerated.
4197 * features/i386/amd64-mpx.c: Regenerated.
4198 * features/i386/amd64.c: Regenerated.
4199 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4200 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4201 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4202 * regformats/i386/amd64-avx.dat: Regenerated.
4203 * regformats/i386/amd64-mpx.dat: Regenerated.
4204 * regformats/i386/amd64.dat: Regenerated.
4205
77c501bc
YQ
42062017-07-10 Yao Qi <yao.qi@linaro.org>
4207
4208 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4209 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4210
6dc8d757
AK
42112017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4212
4213 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4214 unsetenv.
4215 * gnulib/aclocal.m4: Regenerate.
4216 * gnulib/config.in: Regenerate.
4217 * gnulib/configure: Regenerate.
4218 * gnulib/import/Makefile.am: Regenerate.
4219 * gnulib/import/Makefile.in: Regenerate.
4220 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4221 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4222 * gnulib/import/m4/environ.m4: New file.
4223 * gnulib/import/m4/setenv.m4: New file.
4224 * gnulib/import/setenv.c: New file.
4225 * gnulib/import/unsetenv.c: New file.
4226
266934d1
SM
42272017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4228
4229 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4230 address when op is DW_OP_addr.
4231
03278692
TT
42322017-07-09 Tom Tromey <tom@tromey.com>
4233
4234 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4235 check and apply to outer type.
4236
4b654465
JB
42372017-07-07 John Baldwin <jhb@FreeBSD.org>
4238
4239 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4240 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4241 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4242 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4243
2af9fc44
JB
42442017-07-07 John Baldwin <jhb@FreeBSD.org>
4245
4246 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4247
382b69bb
JB
42482017-07-07 John Baldwin <jhb@FreeBSD.org>
4249
4250 * corelow.c (get_core_siginfo): Remove.
4251 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4252 instead of get_core_siginfo.
4253 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4254 * gdbarch.h: Re-generate.
4255 * gdbarch.c: Re-generate.
4256 * linux-tdep.c (linux_core_xfer_siginfo): New.
4257 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4258
6e5eab33
JB
42592017-07-07 John Baldwin <jhb@FreeBSD.org>
4260
4261 * corelow.c (thread_section_name): Move to ...
4262 * gdbcore.h (thread_section_name): ... here.
4263
929edea9
JB
42642017-07-07 John Baldwin <jhb@FreeBSD.org>
4265
4266 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4267 (struct siginfo32): New.
4268 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4269 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4270 via ptrace(PT_LWPINFO).
4271
762c974a
JB
42722017-07-07 John Baldwin <jhb@FreeBSD.org>
4273
4274 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4275 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4276 (fbsd_get_siginfo_type): New.
4277 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4278 (_initialize_fbsd_tdep): New.
4279
33c5cd75
DB
42802017-07-06 David Blaikie <dblaikie@gmail.com>
4281
4282 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4283 a singular dwo_unit*) to support multiple CUs in the same way that
4284 multiple TUs are supported.
4285 (create_cus_hash_table): Replace create_dwo_cu with a function for
4286 parsing multiple CUs from a DWO file.
4287 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4288 create_dwo_cu.
4289 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4290 htab_find, rather than comparing the signature to a singleton CU in
4291 the dwo_file.
4292
8455d262
PA
42932017-07-06 Pedro Alves <palves@redhat.com>
4294
4295 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4296
4da3eb35
PA
42972017-07-04 Pedro Alves <palves@redhat.com>
4298
4299 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4300 * gdbtypes.h (TYPE_STATIC): Delete.
4301 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4302 is_synchronized, is_native>: Delete.
4303 <dummy>: Bump.
4304 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4305 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4306 (TYPE_FN_FIELD_ABSTRACT): Delete.
4307
5bfd255c
SM
43082017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4309
4310 * buffer.h (buffer_finish): Fix spelling mistakes.
4311
25c54127
EZ
43122017-07-01 Eli Zaretskii <eliz@gnu.org>
4313
4314 * .dir-locals.el: Automatically switch to C-style comments in
4315 versions of Emacs that support the feature.
4316
dc4bde35
SDJ
43172017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4318 Pedro Alves <palves@redhat.com>
4319
4320 PR cli/21688
4321 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4322 (process_next_line): New variable 'inline_cmd'.
4323 Adjust 'if' clauses for "python", "compile" and "guile" to use
4324 'command_name_equals' and check for '!inline_cmd'.
4325
51ed89aa
SDJ
43262017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4327
4328 PR cli/21688
4329 * cli/cli-script.c (command_name_equals_not_inline): New function.
4330 (process_next_line): Adjust 'if' clauses for "python", "compile"
4331 and "guile" to use command_name_equals_not_inline.
4332
eb17d413
PA
43332017-06-29 Pedro Alves <palves@redhat.com>
4334
4335 * completer.c (expression_completer): Call
4336 linespec_location_completer instead of location_completer.
4337
195bcdd5
PA
43382017-06-29 Pedro Alves <palves@redhat.com>
4339
4340 * completer.c (expression_completer): Remove code that recomputes
4341 'text' from 'word'.
4342
adc764e7
YQ
43432017-06-29 Yao Qi <yao.qi@linaro.org>
4344
4345 * regformats/regdat.sh: Generate code with
4346 "ifndef IN_PROCESS_AGENT".
4347
6e75794e
PA
43482017-06-28 Pedro Alves <palves@redhat.com>
4349
4350 * command.h: Include "common/scoped_restore.h".
4351
bc491f2e
YQ
43522017-06-28 Yao Qi <yao.qi@linaro.org>
4353
4354 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4355 instead of obstack_grow.
4356
41664b45
DG
43572017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4358
4359 PR gdb/21337
4360 * symfile.c (reread_symbols): Call objfiles_changed just before
4361 read_symbols.
4362
6da67eb1
PA
43632017-06-27 Pedro Alves <palves@redhat.com>
4364
4365 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4366 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4367 (completion_list_add_symbol, completion_list_add_msymbol):
4368 ... these new functions.
4369 (add_symtab_completions)
4370 (default_make_symbol_completion_list_break_on_1): Adjust.
4371
23732b1e
PA
43722017-06-27 Pedro Alves <palves@redhat.com>
4373
4374 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4375 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4376 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4377 dtor.
4378 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4379 'storage_obstack' field an auto_obstack. In-class initialize all
4380 non-bitfield fields. Make minsyms_read bool.
4381 * symfile.c (read_symbols): Adjust.
4382
a4d1e79a
AH
43832017-06-27 Alan Hayward <alan.hayward@arm.com>
4384
4385 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4386 (gdbsim_store_register): Likewise.
4387
8268c778
PA
43882017-06-27 Pedro Alves <palves@redhat.com>
4389
4390 * c-exp.y (name_obstack): Now an auto_obstack.
4391 (yylex): Use auto_obstack::clear.
4392 (c_parse): Use auto_obstack::clear instead of reinitializing and
4393 freeing the obstack.
4394 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4395 * d-exp.y (name_obstack): Now an auto_obstack.
4396 (yylex): Use auto_obstack::clear.
4397 (d_parse): Use auto_obstack::clear instead of reinitializing and
4398 freeing the obstack.
4399 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4400 auto_obstack.
4401 * dwarf2read.c (create_addrmap_from_index)
4402 (dwarf2_build_psymtabs_hard)
4403 (update_enumeration_type_from_children): Likewise.
4404 * gdb_obstack.h (auto_obstack): New type.
4405 * go-exp.y (name_obstack): Now an auto_obstack.
4406 (build_packaged_name): Use auto_obstack::clear.
4407 (go_parse): Use auto_obstack::clear instead of reinitializing and
4408 freeing the obstack.
4409 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4410 auto_obstack.
4411 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4412 * rust-exp.y (work_obstack): Now an auto_obstack.
4413 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4414 reinitializing and freeing the obstack.
4415 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4416 (host_char_to_target): Use auto_obstack.
4417 * utils.h (make_cleanup_obstack_free): Delete declaration.
4418 * valprint.c (generic_emit_char, generic_printstr): Use
4419 auto_obstack.
4420
db665f42
SM
44212017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4422
4423 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4424 thread.
4425 (darwin_init_thread_list): Don't update dummy thread.
4426 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4427
873c0814
SM
44282017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4429
4430 * record-full.c (netorder16): Remove.
4431
8b5a7a6e
SM
44322017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4433
4434 * common/diagnostics.h: Define macros for GCC.
4435 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4436 * common/vec.h: Include diagnostics.h.
4437 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4438 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4439 warning.
4440
d1435379
SM
44412017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4442
4443 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4444 New macro.
4445 * ada-lex.l: Ignore deprecated register warnings.
4446
cc75e0fd
SM
44472017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4448
4449 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4450 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4451
07809eaf
SM
44522017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4453
4454 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4455 its own line.
4456
f076f034
SM
44572017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4458
4459 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4460
0dd5cbc5
AH
44612017-06-23 Alan Hayward <alan.hayward@arm.com>
4462
4463 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4464 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4465 (xtensa_register_read_masked): Likewise.
4466
d4c6ce5b
SDJ
44672017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4468
4469 * common/environ.c (gdb_environ::unset): Update comment.
4470
16892a03
AH
44712017-06-22 Alan Hayward <alan.hayward@arm.com>
4472
4473 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4474 registers.
4475
d7dcbefc
AH
44762017-06-22 Alan Hayward <alan.hayward@arm.com>
4477
4478 * record-full.c (record_full_exec_insn): Use byte_vector.
4479
b30ff123
YQ
44802017-06-22 Yao Qi <yao.qi@linaro.org>
4481
4482 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4483 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4484
4fa847d7
AH
44852017-06-22 Alan Hayward <alan.hayward@arm.com>
4486
4487 * remote.c (cached_reg): Move from here...
4488 * regcache.h (cached_reg): ...to here.
4489 * python/py-unwind.c (struct reg_info): Remove.
4490 (cached_frame_info): Use cached_reg_t.
4491 (pyuw_prev_register): Likewise.
4492 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4493 (pyuw_dealloc_cache): Free all registers.
4494
f4906a9a
PA
44952017-06-22 Pedro Alves <palves@redhat.com>
4496 Simon Marchi <simon.marchi@ericsson.com>
4497
4498 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4499 warning.
4500 * common/diagnostics.h: New file.
4501
b45a1208
PA
45022017-06-22 Pedro Alves <palves@redhat.com>
4503
4504 * common/agent.h: Add include guards.
4505
e4da2c61
SM
45062017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4507
4508 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4509 talk about addressable units instead of bytes.
4510
96160d60
SDJ
45112017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4512
4513 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4514 of '::const_iterator'.
4515
9a6c7d9c
SDJ
45162017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4517
4518 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4519 'unittests/environ-selftests.c'.
4520 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4521 * charset.c (find_charset_names): Declare object 'iconv_env'.
4522 Update code to use 'iconv_env' object. Remove call to
4523 'free_environ'.
4524 * common/environ.c: Include <utility>.
4525 (make_environ): Delete function.
4526 (free_environ): Delete function.
4527 (gdb_environ::clear): New function.
4528 (gdb_environ::operator=): New function.
4529 (gdb_environ::get): Likewise.
4530 (environ_vector): Delete function.
4531 (set_in_environ): Delete function.
4532 (gdb_environ::set): New function.
4533 (unset_in_environ): Delete function.
4534 (gdb_environ::unset): New function.
4535 (gdb_environ::envp): Likewise.
4536 * common/environ.h: Include <vector>.
4537 (struct gdb_environ): Delete; transform into...
4538 (class gdb_environ): ... this class.
4539 (free_environ): Delete prototype.
4540 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4541 environ_vector): Likewise.
4542 * infcmd.c (run_command_1): Update code to call
4543 'envp' from 'gdb_environ' class.
4544 (environment_info): Update code to call methods from 'gdb_environ'
4545 class.
4546 (unset_environment_command): Likewise.
4547 (path_info): Likewise.
4548 (path_command): Likewise.
4549 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4550 (inferior::inferior): Initialize 'environment' using the host's
4551 information.
4552 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4553 Include "environ.h".
4554 (class inferior) <environment>: Change type from 'struct
4555 gdb_environ' to 'gdb_environ'.
4556 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4557 methods from 'gdb_environ' class.
4558 * solib.c (solib_find_1): Likewise
4559 * unittests/environ-selftests.c: New file.
4560
75c554cf
YQ
45612017-06-20 Yao Qi <yao.qi@linaro.org>
4562
4563 * features/i386/i386-linux.xml: Exchange the order of including
4564 32bit-linux.xml and 32bit-sse.xml.
4565 * features/i386/i386-linux.c: Regenerated.
4566
72ddacb7
YQ
45672017-06-20 Yao Qi <yao.qi@linaro.org>
4568
4569 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4570 Delete copy ctor and assignment operator.
4571 (tdesc_type): Likewise.
4572 (tdesc_feature): Likewise.
4573 (tdesc_free_reg): Remove.
4574 (tdesc_create_reg): Use new.
4575 (tdesc_free_type): Remove.
4576 (tdesc_create_vector): Use new.
4577 (tdesc_create_union): Likewise.
4578 (tdesc_create_flags): Likewise.
4579 (tdesc_create_enum): Likewise.
4580 (tdesc_free_feature): Delete.
4581 (free_target_description): Use delete.
4582
325c9fd4
JB
45832017-06-19 John Baldwin <jhb@FreeBSD.org>
4584
4585 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4586 registers.
4587
16b7a719
PA
45882017-06-19 Pedro Alves <palves@redhat.com>
4589
4590 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4591 after gdb::unlinker.
4592
1c8e01c9
SDJ
45932017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4594
4595 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4596 gdb_environ to access an environment variable.
4597
ffce45d2
TP
45982017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4599
4600 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4601 gdb_byte*.
4602
1d4fbac9
SM
46032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4604
4605 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4606
8465943a
SM
46072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4608
4609 * configure: Re-generate.
4610 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4611
3e019bdc
SM
46122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4613
4614 * configure: Re-generate.
4615 * warning.m4: Pass -Werror to compiler when checking for
4616 supported warning flags.
4617
cf0dd6f0
SM
46182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4619
4620 * Makefile.in (COMPILE.pre): Add "-x c++".
4621
6f98355c
YQ
46222017-06-16 Alan Hayward <alan.hayward@arm.com>
4623 Pedro Alves <palves@redhat.com>
4624 Yao Qi <yao.qi@linaro.org>
4625
4626 * defs.h (RequireLongest): New.
4627 (extract_integer): Declare function template.
4628 (extract_signed_integer): Remove the declaration, but define it
4629 static inline.
4630 (extract_unsigned_integer): Likewise.
4631 (store_integer): Declare function template.
4632 (store_signed_integer): Remove the declaration, but define it
4633 static inline.
4634 (store_unsigned_integer): Likewise.
4635 * findvar.c (extract_integer): New function template.
4636 (extract_signed_integer): Remove.
4637 (extract_unsigned_integer): Remove.
4638 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4639 instantiations.
4640 (store_integer): New function template.
4641 (store_signed_integer): Remove.
4642 (store_unsigned_integer): Remove.
4643 (store_integer): Explicit instantiations.
4644 * regcache.c (regcache_raw_read_signed): Update.
4645 (regcache::raw_read): New function.
4646 (regcache::raw_read_signed): Remove.
4647 (regcache::raw_read_unsigned): Remove.
4648 (regcache_raw_read_unsigned): Update.
4649 (regcache_raw_write_unsigned): Update.
4650 (regcache::raw_write_signed): Remove.
4651 (regcache::raw_write): New function.
4652 (regcache_cooked_read_signed): Update.
4653 (regcache::raw_write_unsigned): Remove.
4654 (regcache::cooked_read_signed): Remove.
4655 (regcache_cooked_read_unsigned): Update.
4656 (regcache::cooked_read_unsigned): Remove.
4657 (regcache_cooked_write_signed): Update.
4658 (regcache_cooked_write_unsigned): Update.
4659 * regcache.h (regcache) <raw_read_signed>: Remove.
4660 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4661 <raw_read, raw_write>: New.
4662 <cooked_read_signed, cooked_write_signed>: Remove.
4663 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4664 <cooked_read, cooked_write>: New.
4665 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4666 (sh64_pseudo_register_write): Update.
4667
a87dc45a
AK
46682017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4669
4670 * arc-tdep.c (arc_disassembler_options): New variable.
4671 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4672 of default_print_insn.
4673 (arc_delayed_print_insn): Set info->section when needed,
4674 use default_print_insn to retrieve a disassembler.
4675
45159d6a
SDJ
46762017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4677
4678 PR gdb/21574
4679 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4680 to mention $SHELL and startup-with-shell.
4681
b46c4cf0
MF
46822017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4683
4684 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4685
6394c606
YQ
46862017-06-14 Yao Qi <yao.qi@linaro.org>
4687
4688 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4689 default_print_insn instead of print_insn_aarch64.
4690 * arm-tdep.c (gdb_print_insn_arm): Call
4691 default_print_insn instead of print_insn_big_arm
4692 and print_insn_little_arm.
4693 * i386-tdep.c (i386_print_insn): Call default_print_insn
4694 instead of print_insn_i386.
4695 * ia64-tdep.c (ia64_print_insn): Call
4696 default_print_insn instead of print_insn_ia64.
4697 * mips-tdep.c (gdb_print_insn_mips): Call
4698 default_print_insn instead of print_insn_big_mips
4699 and print_insn_little_mips.
4700 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4701 instead of print_insn_spu.
4702
d5722aa2
PA
47032017-06-14 Pedro Alves <palves@redhat.com>
4704
4705 * ada-lang.c: Include "common/byte-vector.h".
4706 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4707 * charset.c (wchar_iterator::iterate): Resize the vector instead
4708 of reserving it.
4709 * common/byte-vector.h: Include "common/def-vector.h".
4710 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4711 * cli/cli-dump.c: Include "common/byte-vector.h".
4712 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4713 * common/byte-vector.h: New file.
4714 * common/def-vector.h: New file.
4715 * common/default-init-alloc.h: New file.
4716 * dwarf2loc.c: Include "common/byte-vector.h".
4717 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4718 instead of reserving it.
4719 * dwarf2read.c: Include "common/byte-vector.h".
4720 (data_buf::m_vec): Now a gdb::byte_vector.
4721 * gdb_regex.c: Include "common/def-vector.h".
4722 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4723 * mi/mi-main.c: Include "common/byte-vector.h".
4724 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4725 * printcmd.c: Include "common/byte-vector.h".
4726 (print_scalar_formatted): Use gdb::byte_vector.
4727 * valprint.c: Include "common/byte-vector.h".
4728 (maybe_negate_by_bytes, print_decimal_chars): Use
4729 gdb::byte_vector.
4730
01ec7a27
SM
47312017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4732
4733 * darwin-nat.c: Include "nat/fork-inferior.h".
4734
848d9074
SM
47352017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4736
4737 * configure.nat: Factor out Darwin bits that are not
4738 architecture-specific. Add fork-inferior.o.
4739
3b912944
SM
47402017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4741
4742 * configure.nat: Factor out AIX bits that are not
4743 architecture-specific. Add fork-inferior.o.
4744
55acdf22
AA
47452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4746
4747 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4748 (read_pieced_value, write_pieced_value): ...here. Reduce to
4749 wrappers that just call rw_pieced_value.
4750
f65e2044
AA
47512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4752
4753 * dwarf2loc.c (write_pieced_value): When writing the data for a
4754 memory piece, use write_memory_with_notification instead of
4755 write_memory.
4756
23f945bf
AA
47572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4758
4759 * valops.c (read_value_memory): Change embedded_offset to
4760 represent a bit offset instead of a byte offset.
4761 * value.h (read_value_memory): Adjust comment.
4762
f236533e
AA
47632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4764
4765 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4766 dest_offset_bits and source_offset_bits.
4767 (write_pieced_value): Likewise.
4768
65d84b76
AA
47692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4770
4771 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4772 given by DW_OP_bit_piece.
4773 (write_pieced_value): Likewise.
4774
242d31ab
AA
47752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4776
4777 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4778 some other preparations to the places where sufficient information
4779 is available.
4780 (write_pieced_value): Likewise.
4781
03c8af18
AA
47822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4783
4784 * dwarf2loc.c (bits_to_bytes): New function.
4785 (read_pieced_value): Fix offset calculations for register pieces
4786 on big-endian targets.
4787 (write_pieced_value): Likewise.
4788
840989c1
AA
47892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4790
4791 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4792 (write_pieced_value): Likewise.
4793
359b19bb
AA
47942017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4795
4796 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4797 transfer the source value's least significant bits, instead of its
4798 lowest-addressed ones. Rename type_len to max_offset.
4799 (read_pieced_value): Mirror above changes to write_pieced_value as
4800 applicable.
4801
07c9ca3b
AA
48022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4803
4804 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4805 truncate full bytes from dest_offset_bits before using it as an
4806 offset into the buffer.
4807
f1cc9874
AA
48082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4809
4810 * dwarf2loc.c (write_pieced_value): Include transfer size in
4811 byte-wise check.
4812
cdaac320
AA
48132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4814
4815 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4816 calculation of this_size.
4817
af547a96
AA
48182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4819
4820 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4821 when targeting a bit-field.
4822 (write_pieced_value): Likewise.
4823
ddd7882a
AA
48242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4825
4826 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4827 (allocate_piece_closure): Drop addr_size parameter.
4828 (dwarf2_evaluate_loc_desc_full): Adjust call to
4829 allocate_piece_closure.
4830
e9352324
AA
48312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4832
4833 PR gdb/21226
4834 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4835 the LSB end, independent of endianness.
4836
d5d1163e
AA
48372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4838
4839 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4840 size capping.
4841
032bb6ea
YQ
48422017-06-13 Yao Qi <yao.qi@linaro.org>
4843
4844 * mips-linux-nat.c: Move include features/mips*-linux.c to
4845 mips-linux-tdep.c.
4846 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4847 to mips-linux-tdep.c.
4848 * mips-linux-tdep.c: Include features/mips*-linux.c
4849 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4850 functions.
4851 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4852 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4853 (tdesc_mips64_dsp_linux): Declare.
4854
f12f6bad
TT
48552017-06-12 Tom Tromey <tom@tromey.com>
4856
4857 * valprint.h (val_print_type_code_int): Remove.
4858 * valprint.c (generic_val_print_int): Always call
4859 val_print_scalar_formatted.
4860 (val_print_type_code_int): Remove.
4861 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4862 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4863 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4864 * ada-valprint.c (ada_val_print_num): Use
4865 val_print_scalar_formatted.
4866
d9109c80
TT
48672017-06-12 Tom Tromey <tom@tromey.com>
4868
4869 * printcmd.c (print_scalar_formatted): Unify the two switches.
4870 Don't convert scalars to LONGEST.
4871
4ac0cb1c
TT
48722017-06-12 Tom Tromey <tom@tromey.com>
4873
4874 PR exp/16225:
4875 * valprint.h (print_decimal_chars): Update.
4876 * valprint.c (maybe_negate_by_bytes): New function.
4877 (print_decimal_chars): Add "is_signed" argument.
4878 * printcmd.c (print_scalar_formatted): Update.
4879
30a25466
TT
48802017-06-12 Tom Tromey <tom@tromey.com>
4881
4882 PR exp/16225:
4883 * valprint.h (print_binary_chars, print_hex_chars): Update.
4884 * valprint.c (val_print_type_code_int): Update.
4885 (print_binary_chars): Add "zero_pad" argument.
4886 (emit_octal_digit): New function.
4887 (print_octal_chars): Don't zero-pad.
4888 (print_decimal_chars): Likewise.
4889 (print_hex_chars): Add "zero_pad" argument.
4890 * sh64-tdep.c (sh64_do_fp_register): Update.
4891 * regcache.c (regcache::dump): Update.
4892 * printcmd.c (print_scalar_formatted): Update.
4893 * infcmd.c (default_print_one_register_info): Update.
4894
b3464d03
PA
48952017-06-12 Pedro Alves <palves@redhat.com>
4896 Alan Hayward <alan.hayward@arm.com>
4897
4898 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4899 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4900 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4901 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4902 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4903
4b76cda9
PA
49042017-06-12 Pedro Alves <palves@redhat.com>
4905
4906 * dwarf2read.c (mapped_symtab::data): Now a vector of
4907 symtab_index_entry instead of vector of
4908 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4909 whether an element's name is NULL instead of checking whether the
4910 element itself is NULL.
4911 (find_slot): Change return type. Adjust.
4912 (hash_expand, , add_index_entry, uniquify_cu_indices)
4913 (write_hash_table): Adjust.
4914
e8f8bcb3
PA
49152017-06-12 Pedro Alves <palves@redhat.com>
4916
4917 * dwarf2read.c (recursively_count_psymbols): New function.
4918 (write_psymtabs_to_index): Call it to compute number of psyms and
4919 pass estimate size of psyms_seen to unordered_set's ctor.
4920
70a1152b
PA
49212017-06-12 Pedro Alves <palves@redhat.com>
4922
4923 * dwarf2read.c (write_hash_table): Check if key already exists
4924 before emplacing.
4925
c2f134ac
PA
49262017-06-12 Pedro Alves <palves@redhat.com>
4927
4928 * dwarf2read.c (data_buf::append_space): Rename to...
4929 (data_buf::grow): ... this, and make private. Adjust all callers.
4930 (data_buf::append_uint): New method.
4931 (add_address_entry, write_one_signatured_type)
4932 (write_psymtabs_to_index): Use it.
4933
a81e6d4d
PA
49342017-06-12 Pedro Alves <palves@redhat.com>
4935
4936 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4937 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4938 (data_buf::file_write): Call ::fwrite directly.
4939
6fd931f2
PA
49402017-06-12 Pedro Alves <palves@redhat.com>
4941
4942 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4943 std::vector::erase.
4944
bc8f2430
JK
49452017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4946
4947 Code cleanup: C++ify .gdb_index producer.
4948 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4949 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4950 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4951 (create_strtab, add_string): Remove.
4952 (file_write, data_buf): New.
4953 (struct symtab_index_entry): Use std::vector for cu_indices.
4954 (struct mapped_symtab): Use std::vector for data.
4955 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4956 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4957 Remove.
4958 (find_slot): Change return type. Update it to the new data structures.
4959 (hash_expand, add_index_entry): Update it to the new data structures.
4960 (offset_type_compare): Remove.
4961 (uniquify_cu_indices): Update it to the new data structures.
4962 (c_str_view, c_str_view_hasher, vector_hasher): New.
4963 (add_indices_to_cpool): Remove.
4964 (write_hash_table): Update it to the new data structures.
4965 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4966 (eq_psymtab_cu_index): Remove.
4967 (psym_index_map): New typedef.
4968 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4969 reference and std::unordered_map for cu_index_htab.
4970 (add_address_entry, add_address_entry_worker, write_address_map)
4971 (write_psymbols): Update it to the new data structures.
4972 (write_obstack): Remove.
4973 (struct signatured_type_index_data): Change types_list to a data_buf
4974 reference and psyms_seen to a std::unordered_set reference.
4975 (write_one_signatured_type, recursively_write_psymbols)
4976 (write_psymtabs_to_index): Update it to the new data structures.
4977
c4dcb155
SM
49782017-06-11 Simon Marchi <simon.marchi@ericsson.com>
4979
4980 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4981 separate-debug-file commands.
4982 * symfile.h (separate_debug_file_debug): New global.
4983 * symfile.c (separate_debug_file_debug): New global.
4984 (separate_debug_file_exists, find_separate_debug_file): Add
4985 debug output.
4986 (_initialize_symfile): Add "set debug separate-debug-file"
4987 command.
4988 * build-id.c (build_id_to_debug_bfd,
4989 find_separate_debug_file_by_buildid): Add debug output.
4990
6d45d4b4
SM
49912017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4992
4993 * gdbarch.sh (displaced_step_free_closure): Remove.
4994 * gdbarch.h, gdbarch.c: Re-generate.
4995 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4996 displaced_step_free_closure.
4997 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4998 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4999 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5000 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5001 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5002 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5003 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5004 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5005 * infrun.c (displaced_step_clear): Call xfree instead of
5006 gdbarch_displaced_step_free_closure.
5007
2f91880f
SDJ
50082017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5009
5010 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5011 NULL".
5012
b8b6e72f
AH
50132017-06-08 Alan Hayward <alan.hayward@arm.com>
5014
5015 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5016 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5017 (mn10300_push_dummy_call): Likewise.
5018
5369082e
AH
50192017-06-08 Alan Hayward <alan.hayward@arm.com>
5020
5021 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5022
ff4ca5ac
AH
50232017-06-08 Alan Hayward <alan.hayward@arm.com>
5024
5025 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5026
aefd8b33
SDJ
50272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5028
5029 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5030 able to start inferiors using a shell.
5031 (New remote packets): Announce new packet "QStartupWithShell".
5032 * remote.c: Add PACKET_QStartupWithShell.
5033 (extended_remote_create_inferior): Handle new
5034 PACKET_QStartupWithShell.
5035 (remote_protocol_features) <QStartupWithShell>: New entry for
5036 PACKET_QStartupWithShell.
5037 (_initialize_remote): Call "add_packet_config_cmd" for
5038 QStartupShell.
5039
2090129c
SDJ
50402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5041 Pedro Alves <palves@redhat.com>
5042
5043 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5044 and "nat/fork-inferior.h".
5045 * common/common-inferior.h: New file, with contents from
5046 "gdb/inferior.h".
5047 * commom/common-utils.c: Include "common-utils.h".
5048 (stringify_argv): New function.
5049 * common/common-utils.h (stringify_argv): New prototype.
5050 * configure.nat: Add "fork-inferior.o" as a dependency for
5051 "*linux*", "fbsd*" and "nbsd*" hosts.
5052 * corefile.c (get_exec_file): Update comment.
5053 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5054 instead of "startup_inferior".
5055 (darwin_create_inferior): Call "add_thread_silent" after
5056 "fork_inferior".
5057 * fork-child.c: Cleanup unnecessary includes.
5058 (SHELL_FILE): Move to "common/common-fork-child.c".
5059 (environ): Likewise.
5060 (exec_wrapper): Initialize.
5061 (get_exec_wrapper): New function.
5062 (breakup_args): Move to "common/common-fork-child.c"; rename to
5063 "breakup_args_for_exec".
5064 (escape_bang_in_quoted_argument): Move to
5065 "common/common-fork-child.c".
5066 (saved_ui): New variable.
5067 (prefork_hook): New function.
5068 (postfork_hook): Likewise.
5069 (postfork_child_hook): Likewise.
5070 (gdb_startup_inferior): Likewise.
5071 (fork_inferior): Move to "common/common-fork-child.c". Update
5072 function to support gdbserver.
5073 (startup_inferior): Likewise.
5074 * gdbcore.h (get_exec_file): Remove declaration.
5075 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5076 instead of "startup_inferior". Call "add_thread_silent" after
5077 "fork_inferior".
5078 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5079 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5080 instead of "startup_inferior". Call "add_thread_silent" after
5081 "fork_inferior".
5082 * inferior.h: Include "common-inferior.h".
5083 (trace_start_error): Move to "common/common-utils.h".
5084 (trace_start_error_with_name): Likewise.
5085 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5086 (startup_inferior): Likewise.
5087 (gdb_startup_inferior): New prototype.
5088 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5089 * nat/fork-inferior.h: New file.
5090 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5091 instead of "startup_inferior". Call "add_thread_silent" after
5092 "fork_inferior".
5093 * target.h (target_terminal_init): Move prototype to
5094 "target/target.h".
5095 (target_terminal_inferior): Likewise.
5096 (target_terminal_ours): Likewise.
5097 * target/target.h (target_terminal_init): New prototype, moved
5098 from "target.h".
5099 (target_terminal_inferior): Likewise.
5100 (target_terminal_ours): Likewise.
5101 * utils.c (gdb_flush_out_err): New function.
5102
043a4934
SDJ
51032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5104
5105 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5106 * common/common-gdbthread.h: New file, with parts from
5107 "gdb/gdbthread.h".
5108 * gdbthread.h: Include "common-gdbthread.h".
5109 (switch_to_thread): Moved to "common/common-gdbthread.h".
5110
15652511
SDJ
51112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5112
5113 * Makefile.in (SFILES): Add "common/job-control.c".
5114 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5115 (COMMON_OBS): Add "job-control.o".
5116 * common/job-control.c: New file, with contents from
5117 "gdb/inflow.c".
5118 * common/job-control.h: New file, with contents from "terminal.h".
5119 * fork-child.c: Include "job-control.h".
5120 * inflow.c: Include "job-control.h".
5121 (gdb_setpgid): Move to "common/common-inflow.c".
5122 (_initialize_inflow): Move setting of "job_control" to
5123 "handle_job_control".
5124 * terminal.h (job_control): Moved to "common/common-terminal.h".
5125 (gdb_setpgid): Likewise.
5126 * top.c: Include "job_control.h".
5127 * utils.c: Likewise.
5128 (job_control): Moved to "job-control.c".
5129
2d7cc5c7
PA
51302017-06-07 Pedro Alves <palves@redhat.com>
5131
5132 * Makefile.in (SFILES): Add gdb_regex.c.
5133 (COMMON_OBS): Add gdb_regex.o.
5134 * ada-lang.c (ada_add_standard_exceptions)
5135 (ada_add_exceptions_from_frame, name_matches_regex)
5136 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5137 parameter type to compiled_regex. Adjust.
5138 (ada_exceptions_list): Use compiled_regex.
5139 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5140 std::unique_ptr<compiled_regex>.
5141 (exception_catchpoint::~exception_catchpoint): Remove regfree
5142 call.
5143 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5144 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5145 * breakpoint.c (solib_catchpoint::compiled): Now a
5146 std::unique_ptr<compiled_regex>.
5147 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5148 (check_status_catch_solib): Adjust to use compiled_regex.
5149 (add_solib_catchpoint): Adjust to use compiled_regex.
5150 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5151 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5152 compiled_regex reference. Adjust to use it.
5153 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5154 declaration. Include "gdb_regex.h".
5155 (apropos_cmd): Change regex parameter to compiled_regex reference.
5156 * gdb_regex.c: New file.
5157 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5158 declarations.
5159 (class compiled_regex): New.
5160 * linux-tdep.c: Include "common/gdb_optional.h".
5161 (struct mapping_regexes): New, factored out from
5162 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5163 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5164 gdb::optional and remove cleanups. Adjust to compiled_regex.
5165 * probe.c: Include "common/gdb_optional.h".
5166 (collect_probes): Use compiled_regex and gdb::optional and remove
5167 cleanups.
5168 * skip.c: Include "common/gdb_optional.h".
5169 (skiplist_entry::compiled_function_regexp): Now a
5170 gdb::optional<compiled_regex>.
5171 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5172 (free_skiplist_entry): Remove regfree call.
5173 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5174 compiled_regex and gdb::optional.
5175 * symtab.c: Include "common/gdb_optional.h".
5176 (search_symbols): Use compiled_regex and gdb::optional.
5177 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5178 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5179 to gdb_regex.c.
5180
50d6adef
AH
51812017-06-07 Alan Hayward <alan.hayward@arm.com>
5182
5183 * regcache.c (regcache::save): Avoid buffer use.
5184 (regcache::dump): Likewise.
5185
4a8a33c8
AH
51862017-06-07 Alan Hayward <alan.hayward@arm.com>
5187
5188 * sh-tdep.c (sh_pseudo_register_read): Remove
5189 MAX_REGISTER_SIZE.
5190 (sh_pseudo_register_write): Likewise.
5191 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5192 (sh64_pseudo_register_write): Likewise
5193
d1be909e
AH
51942017-06-07 Alan Hayward <alan.hayward@arm.com>
5195
5196 * aarch64-tdep.c (aarch64_store_return_value): Use
5197 V_REGISTER_SIZE.
5198 (aarch64_pseudo_read_value): Likewise.
5199 (aarch64_pseudo_write): Likewise.
5200
f4a65042
YQ
52012017-06-06 Yao Qi <yao.qi@linaro.org>
5202
5203 * regformats/regdef.h (set_register_cache): Remove the
5204 declaration.
5205
9f7fb0aa
AH
52062017-06-06 Alan Hayward <alan.hayward@arm.com>
5207
5208 * frame.c (frame_unwind_register_signed): Use
5209 frame_unwind_register_value.
5210
e1e01040
PA
52112017-06-06 Pedro Alves <palves@redhat.com>
5212
5213 PR breakpoints/21553
5214 * breakpoint.c (create_breakpoints_sal_default)
5215 (init_breakpoint_sal, create_breakpoint_sal): Use
5216 gdb::unique_xmalloc_ptr for string parameters.
5217 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5218 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5219 (base_breakpoint_create_breakpoints_sal)
5220 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5221 (strace_marker_create_breakpoints_sal)
5222 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5223 string parameters.
5224 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5225 gdb::unique_xmalloc_ptr for string parameters.
5226 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5227 parameters.
5228
fbe654c8
AH
52292017-06-06 Alan Hayward <alan.hayward@arm.com>
5230
5231 * alpha-tdep.c (alpha_register_to_value): Use
5232 get_frame_register_value.
5233 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5234
ae0d01d6
AH
52352017-06-06 Alan Hayward <alan.hayward@arm.com>
5236
5237 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5238 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5239 (ia64_value_to_register): Likewise.
5240 (ia64_extract_return_value): Likewise.
5241 (ia64_store_return_value): Likewise.
5242 (ia64_push_dummy_call): Likewise.
5243
49cf576c
JB
52442017-06-04 Joel Brobecker <brobecker@adacore.com>
5245
5246 GDB 8.0 released.
5247
26b6a6ab
SM
52482017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5249
5250 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5251
22827c51
SM
52522017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5253
5254 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5255 parameter.
5256 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5257
0e05cf3a
SM
52582017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5259
5260 * event-loop.c (poll_timers): Unallocate timer using delete
5261 instead of xfree.
5262
c1fc2657
SM
52632017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5264
5265 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5266 (struct breakpoint) <~breakpoint>: New.
5267 (struct watchpoint): Inherit from breakpoint.
5268 <~watchpoint>: New.
5269 <base>: Remove.
5270 (struct tracepoint): Inherit from breakpoint.
5271 <base>: Remove.
5272 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5273 (struct longjmp_breakpoint): Inherit from breakpoint.
5274 <~longjmp_breakpoint>: New.
5275 <base>: Remove.
5276 (new_breakpoint_from_type): Remove casts.
5277 (watchpoint_in_thread_scope): Remove reference to base field.
5278 (watchpoint_del_at_next_stop): Likewise.
5279 (update_watchpoint): Likewise.
5280 (watchpoint_check): Likewise.
5281 (bpstat_check_watchpoint): Likewise.
5282 (set_longjmp_breakpoint): Likewise.
5283 (struct fork_catchpoint): Inherit from breakpoint.
5284 <base>: Remove.
5285 (struct solib_catchpoint): Inherit from breakpoint.
5286 <~solib_catchpoint>: New.
5287 <base>: Remove.
5288 (dtor_catch_solib): Change to ...
5289 (solib_catchpoint::~solib_catchpoint): ... this.
5290 (breakpoint_hit_catch_solib): Remove reference to base field.
5291 (add_solib_catchpoint): Likewise.
5292 (create_fork_vfork_event_catchpoint): Likewise.
5293 (struct exec_catchpoint): Inherit from breakpoint.
5294 <~exec_catchpoint>: New.
5295 <base>: Remove.
5296 (dtor_catch_exec): Change to ...
5297 (exec_catchpoint::~exec_catchpoint): ... this.
5298 (dtor_watchpoint): Change to ...
5299 (watchpoint::~watchpoint): ... this.
5300 (watch_command_1): Remove reference to base field.
5301 (catch_exec_command_1): Likewise.
5302 (base_breakpoint_dtor): Change to ...
5303 (breakpoint::~breakpoint): ... this.
5304 (base_breakpoint_ops): Remove dtor field value.
5305 (longjmp_bkpt_dtor): Change to ...
5306 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5307 (strace_marker_create_breakpoints_sal): Remove reference to base
5308 field.
5309 (delete_breakpoint): Don't manually call breakpoint destructor.
5310 (create_tracepoint_from_upload): Remove reference to base field.
5311 (trace_pass_set_count): Likewise.
5312 (initialize_breakpoint_ops): Don't initialize
5313 momentary_breakpoint_ops, don't set dtors.
5314 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5315 <~ada_catchpoint>: New.
5316 <base>: Remove.
5317 (create_excep_cond_exprs): Remove reference to base field.
5318 (dtor_exception): Change to ...
5319 (ada_catchpoint::~ada_catchpoint): ... this.
5320 (dtor_catch_exception): Remove.
5321 (dtor_catch_exception_unhandled): Remove.
5322 (dtor_catch_assert): Remove.
5323 (create_ada_exception_catchpoint): Remove reference to base
5324 field.
5325 (initialize_ada_catchpoint_ops): Don't set dtors.
5326 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5327 breakpoint.
5328 <~signal_catchpoint>: New.
5329 <base>: Remove.
5330 (signal_catchpoint_dtor): Change to ...
5331 (signal_catchpoint::~signal_catchpoint): ... this.
5332 (create_signal_catchpoint): Remove reference to base field.
5333 (initialize_signal_catchpoint_ops): Don't set dtor.
5334 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5335 from breakpoint.
5336 <~syscall_catchpoint>: New.
5337 <base>: Remove.
5338 (dtor_catch_syscall): Change to ...
5339 (syscall_catchpoint::~syscall_catchpoint): ... this.
5340 (create_syscall_event_catchpoint): Remove reference to base
5341 field.
5342 (initialize_syscall_catchpoint_ops): Don't set dtor.
5343 * break-catch-throw.c (struct exception_catchpoint): Inherit
5344 from breakpoint.
5345 <~exception_catchpoint>: New.
5346 <base>: Remove.
5347 (dtor_exception_catchpoint): Change to ...
5348 (exception_catchpoint::~exception_catchpoint): ... this.
5349 (handle_gnu_v3_exceptions): Remove reference to base field.
5350 (initialize_throw_catchpoint_ops): Don't set dtor.
5351 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5352 field.
5353 * remote.c (remote_get_tracepoint_status): Likewise.
5354 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5355 * tracefile.c (tracefile_fetch_registers): Likewise.
5356 * tracepoint.c (actions_command): Likewise.
5357 (validate_actionline): Likewise.
5358 (tfind_1): Likewise.
5359 (get_traceframe_location): Likewise.
5360 (find_matching_tracepoint_location): Likewise.
5361 (parse_tracepoint_status): Likewise.
5362 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5363
3b0871f4
SM
53642017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5365
5366 * breakpoint.c (struct longjmp_breakpoint): New struct.
5367 (is_tracepoint_type): Change return type to bool.
5368 (is_longjmp_type): New function.
5369 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5370 (set_raw_breakpoint_without_location): Use
5371 new_breakpoint_from_type.
5372 (set_raw_breakpoint): Likewise.
5373
a5e364af
SM
53742017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5375
5376 * breakpoint.c (new_breakpoint_from_type): New function.
5377 (create_breakpoint_sal): Use new_breakpoint_from_type and
5378 unique_ptr.
5379 (create_breakpoint): Likewise.
5380
ae3b3f34
SM
53812017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5382
5383 * memattr.c (mem_info_command): Rename to ...
5384 (info_mem_command): ... this.
5385 (mem_enable_command): Rename to ...
5386 (enable_mem_command): ... this.
5387 (mem_disable_command): Rename to ...
5388 (disable_mem_command): ... this.
5389 (mem_delete_command): Rename to ...
5390 (delete_mem_command): ... this.
5391 (_initialize_mem): Adjust function names.
5392
13ace077
MM
53932017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5394
5395 * btrace.c (handle_pt_insn_events): New.
5396 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5397 STATUS. Split into this and ...
5398 (handle_pt_insn_event_flags): ... this.
5399
c56ccc05
MM
54002017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5401
5402 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5403 and struct pt_insn.resynced.
5404 * configure: Regenerated.
5405 * config.in: Regenerated.
5406
08c3f6d2
TW
54072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5408
5409 * btrace.c (ftrace_find_call_by_number): New function.
5410 (ftrace_new_function): Store objects, not pointers.
5411 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5412 ftrace_new_gap, ftrace_update_function,
5413 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5414 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5415 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5416 btrace_ends_with_single_insn, btrace_call_get): Account for
5417 btrace_thread_info::functions now storing objects.
5418 * btrace.h (struct btrace_thread_info): Add constructor.
5419 (struct btrace_thread_info) <functions>: Make std::vector.
5420 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5421 Initialize with default values.
5422 * record-btrace.c (record_btrace_frame_sniffer): Account for
5423 btrace_thread_info::functions now storing objects.
5424
8ffd39f2
TW
54252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5426
5427 * btrace.c: Remove typedef bfun_s.
5428 (ftrace_new_gap): Directly add gaps to the list of gaps.
5429 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5430 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5431 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5432 instead of gdb VEC.
5433
4aeb0dfc
TW
54342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5435
5436 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5437 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5438 with btrace_thread_info::next_segment and
5439 btrace_thread_info::prev_segment.
5440 * btrace.h: Remove struct btrace_func_link.
5441 (struct btrace_function): Replace pair of function segment pointers
5442 with pair of indices.
5443 * python/py-record-btrace.c (btpy_call_prev_sibling,
5444 btpy_call_next_sibling): Replace references to
5445 btrace_thread_info::segment with btrace_thread_info::next_segment and
5446 btrace_thread_info::prev_segment.
5447 * record-btrace.c (record_btrace_frame_this_id): Use
5448 btrace_find_call_by_number.
5449
eb8f2b9c
TW
54502017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5451
5452 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5453 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5454 btrace_insn_next, btrace_insn_prev): Remove references to
5455 btrace_thread_info::flow.
5456 * btrace.h (struct btrace_function): Remove FLOW.
5457
42bfe59e
TW
54582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5459
5460 * btrace.c (ftrace_find_call_by_number): New function.
5461 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5462 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5463 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5464 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5465 index.
5466 * btrace.h (struct btrace_function): Turn UP into an index.
5467 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5468 as an index.
5469 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5470 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5471 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5472
b54b03bd
TW
54732017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5474
5475 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5476 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5477 ftrace_update_function, ftrace_compute_global_level_offset,
5478 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5479 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5480 btrace_insn_end, btrace_is_empty): Remove references to
5481 btrace_thread_info::begin and btrace_thread_info::end.
5482 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5483 (struct btrace_thread_info) <functions>: Adjust comment.
5484 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5485 btrace_thread_info::begin.
5486
8286623c
TW
54872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5488
5489 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5490 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5491 ftrace_update_function): Remove arguments that implicitly were always
5492 BTINFO->END.
5493 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5494 Don't pass BTINFO->END.
5495
a0f1b963
TW
54962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5497
5498 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5499 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5500 btrace_find_insn_by_number): Replace function segment pointer with
5501 index.
5502 (btrace_insn_cmp): Simplify.
5503 * btrace.h: (struct btrace_insn_iterator) Rename index to
5504 insn_index. Replace function segment pointer with index into function
5505 segment vector.
5506 * record-btrace.c (record_btrace_call_history): Replace function
5507 segment pointer use with index.
5508 (record_btrace_frame_sniffer): Retrieve function call segment through
5509 vector.
5510 (record_btrace_set_replay): Remove defunc't safety check.
5511
f158f208
TW
55122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5513
5514 * btrace.c (btrace_ends_with_single_insn): New function.
5515 (btrace_call_get, btrace_call_number, btrace_call_begin,
5516 btrace_call_end, btrace_call_next, btrace_call_prev,
5517 btrace_find_call_by_number): Use index into call segment vector
5518 instead of pointer.
5519 (btrace_call_cmp): Simplify.
5520 * btrace.h (struct btrace_call_iterator): Replace function call segment
5521 pointer with index into vector.
5522 * record-btrace.c (record_btrace_call_history): Use index instead of
5523 pointer.
5524
521103fd
TW
55252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5526
5527 * btrace.c (btrace_insn_begin, btrace_insn_end,
5528 btrace_find_insn_by_number): Add btinfo to iterator.
5529 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5530
17b89b34
TW
55312017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5532
5533 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5534 and save pointers directly.
5535 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5536 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5537 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5538 changed signature of functions.
5539 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5540 (btrace_fetch): Remove code that adds btrace_function pointers to
5541 vector of btrace_functions.
5542 (btrace_clear): Simplify freeing vector of btrace_functions.
5543
2b51eddc
TW
55442017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5545
5546 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5547 Replace VEC_* with std::vector functions.
5548 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5549 (struct btrace_thread_info)<functions>: Change type to std::vector.
5550
db6be0d5
SM
55512017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5552
5553 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5554 "Removed targets and native configurations" up. Merge duplicate
5555 "New commands" sub-sections. Add "New options" sub-sections.
5556
b057297a
AH
55572017-05-26 Alan Hayward <alan.hayward@arm.com>
5558
5559 * defs.h (copy_integer_to_size): New declaration.
5560 * findvar.c (copy_integer_to_size): New function.
5561 (do_cint_test): New selftest function.
5562 (copy_integer_to_size_test): Likewise.
5563 (_initialize_findvar): Likewise.
5564 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5565 (mips_fbsd_collect_reg): Use raw_collect_integer.
5566 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5567 (mips64_fill_gregset): Use raw_collect_integer
5568 (mips64_fill_fpregset): Use raw_supply_integer.
5569 * regcache.c (regcache::raw_supply_integer): New function.
5570 (regcache::raw_collect_integer): Likewise.
5571 * regcache.h: (regcache::raw_supply_integer): New declaration.
5572 (regcache::raw_collect_integer): Likewise.
5573
b77b02a5
YQ
55742017-05-24 Yao Qi <yao.qi@linaro.org>
5575
5576 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5577 (COMMON_OBS): Add gdbarch-selftests.o.
5578 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5579 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5580 * gdbarch-selftests.c: New file.
5581 * regcache.h (regcache) <~regcache>: Mark it virtual if
5582 GDB_SELF_TEST.
5583 <raw_write>: Likewise.
5584
e521e87e
YQ
55852017-05-24 Yao Qi <yao.qi@linaro.org>
5586
5587 * regcache.c (current_regcache): Change it to
5588 regcache::current_regcache.
5589 (regcache_observer_target_changed): Update.
5590 (regcache_thread_ptid_changed): Make it a regcache static
5591 method.
5592 (regcache_thread_ptid_changed): Update.
5593 (class regcache_access): New.
5594 (current_regcache_test): Update.
5595 (_initialize_regcache): Update.
5596 * regcache.h: Include forward_list.
5597 (regcache): Declare regcache_thread_ptid_changed and declare
5598 registers_changed_ptid as friend.
5599
d8e07dda
YQ
56002017-05-24 Yao Qi <yao.qi@linaro.org>
5601
5602 * i387-tdep.c (i387_register_to_value): Use register_size
5603 instead of TYPE_LENGTH.
5604 * m68k-tdep.c (m68k_register_to_value): Likewise.
5605
8c8f9122
YQ
56062017-05-24 Yao Qi <yao.qi@linaro.org>
5607
5608 * i387-tdep.c (i387_convert_register_p): Return false if type
5609 code isn't TYPE_CODE_FLT.
5610
68fce50f
YQ
56112017-05-24 Yao Qi <yao.qi@linaro.org>
5612
5613 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5614 length is 4.
5615 (alpha_register_to_value): Remove type length check.
5616 (alpha_value_to_register): Likewise.
5617
88954b49
YQ
56182017-05-24 Yao Qi <yao.qi@linaro.org>
5619
5620 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5621 TYPE_CODE_FLT.
5622
e3ec9b69
YQ
56232017-05-24 Yao Qi <yao.qi@linaro.org>
5624
5625 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5626 TYPE_CODE_FLT or not.
5627
cdd238da
YQ
56282017-05-24 Yao Qi <yao.qi@linaro.org>
5629
5630 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5631 * avr-tdep.c (avr_gdbarch_init): Likewise.
5632 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5633 * cris-tdep.c (cris_gdbarch_init): Likewise.
5634 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5635 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5636 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5637 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5638 * mep-tdep.c (mep_gdbarch_init): Likewise.
5639 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5640 * mips-tdep.c (mips_gdbarch_init): Likewise.
5641 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5642 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5643 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5644 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5645 * v850-tdep.c (v850_gdbarch_init): Likewise.
5646
7a3929c4
YQ
56472017-05-24 Yao Qi <yao.qi@linaro.org>
5648
5649 * selftest-arch.c (tests_with_arch): Call registers_changed
5650 and reinit_frame_cache.
5651 * selftest.c (run_self_tests): Likewise.
5652
f4985dba
YQ
56532017-05-24 Yao Qi <yao.qi@linaro.org>
5654
5655 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5656 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5657
ab20fa4a
YQ
56582017-05-24 Yao Qi <yao.qi@linaro.org>
5659
5660 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5661 set_gdbarch_print_insn.
5662
f532ab94
YQ
56632017-05-24 Yao Qi <yao.qi@linaro.org>
5664
5665 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5666 set_gdbarch_print_insn.
5667
39503f82
YQ
56682017-05-24 Yao Qi <yao.qi@linaro.org>
5669
5670 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5671 set_gdbarch_print_insn.
5672 * arc-tdep.c (arc_gdbarch_init): Likewise.
5673 * arch-utils.c: include dis-asm.h.
5674 (default_print_insn): New function.
5675 * arch-utils.h (default_print_insn): Declare.
5676 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5677 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5678 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5679 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5680 * frv-tdep.c (frv_gdbarch_init): Likewise.
5681 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5682 * gdbarch.sh (print_insn): Use default_print_insn.
5683 * gdbarch.c: Regenerated.
5684 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5685 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5686 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5687 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5688 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5689 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5690 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5691 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5692 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5693 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5694 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5695 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5696 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5697 * mt-tdep.c (mt_gdbarch_init): Likewise.
5698 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5699 * nios2-tdep.c (nios2_print_insn): Remove.
5700 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5701 * rx-tdep.c (rx_gdbarch_init): Likewise.
5702 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5703 * score-tdep.c (score_print_insn): Remove.
5704 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5705 * sh-tdep.c (sh_gdbarch_init): Likewise.
5706 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5707 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5708 * tic6x-tdep.c (tic6x_print_insn): Remove.
5709 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5710 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5711 * v850-tdep.c (v850_gdbarch_init): Likewise.
5712 * vax-tdep.c (vax_gdbarch_init): Likewise.
5713 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5714 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5715
f7241d4f
JB
57162017-05-23 John Baldwin <jhb@FreeBSD.org>
5717
5718 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5719 (MIPS_FP0_REGNUM): Remove.
5720 (MIPS_FSR_REGNUM): Remove.
5721 (mips_fbsd_supply_fpregs): Use mips_regnum.
5722 (mips_fbsd_supply_gregs): Likewise.
5723 (mips_fbsd_collect_fpregs): Likewise.
5724 (mips_fbsd_collect_gregs): Likewise.
5725
d489d81d
JB
57262017-05-23 John Baldwin <jhb@FreeBSD.org>
5727
5728 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5729 (getpfpregs_supplies): New function.
5730 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5731 getfpregs_supplies.
5732 (mips_fbsd_store_inferior_registers): Likewise.
5733
e11b3cdc
PA
57342017-05-22 Pedro Alves <palves@redhat.com>
5735
5736 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5737 maintainer.
5738
0f068fb5
AH
57392017-05-22 Alan Hayward <alan.hayward@arm.com>
5740
5741 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5742 (store_register): Likewise.
5743 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5744 (get_decimal_float_return_value): Likewise.
5745 (do_ppc_sysv_return_value): Likewise.
5746 (ppc64_sysv_abi_push_integer): Likewise.
5747 (ppc64_sysv_abi_push_freg): Likewise.
5748 (ppc64_sysv_abi_return_value_base): Likewise.
5749 (ppc64_sysv_abi_return_value): Likewise.
5750 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5751 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5752 * rs6000-nat.c: Likewise.
5753 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5754 (rs6000_value_to_register): Likewise.
5755 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5756
e6cf65f2
TT
57572017-05-21 Tom Tromey <tom@tromey.com>
5758
5759 PR rust/21466:
5760 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5761 arrays as "[T]", not "[T; ]".
5762
43cc5389
TT
57632017-05-19 Tom Tromey <tom@tromey.com>
5764
5765 PR rust/21484:
5766 * rust-lang.c (exp_descriptor_rust): New function.
5767 (rust_language_defn): Use it.
5768 * p-lang.c (pascal_language_defn): Update.
5769 * opencl-lang.c (opencl_language_defn): Update.
5770 * objc-lang.c (objc_language_defn): Update.
5771 * m2-lang.c (m2_language_defn): Update.
5772 * language.h (struct language_defn)
5773 <la_watch_location_expression>: New member.
5774 * language.c (unknown_language_defn, auto_language_defn)
5775 (local_language_defn): Update.
5776 * go-lang.c (go_language_defn): Update.
5777 * f-lang.c (f_language_defn): Update.
5778 * d-lang.c (d_language_defn): Update.
5779 * c-lang.h (c_watch_location_expression): Declare.
5780 * c-lang.c (c_watch_location_expression): New function.
5781 (c_language_defn, cplus_language_defn, asm_language_defn)
5782 (minimal_language_defn): Use it.
5783 * breakpoint.c (watch_command_1): Call
5784 la_watch_location_expression.
5785 * ada-lang.c (ada_language_defn): Update.
5786
7a6e7fcc
RO
57872017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5788
6e7e1744
RO
5789 PR tui/21482
5790 * gdb_curses.h (NOMACROS): Define.
5791 (NCURSES_NOMACROS): Define.
5792
57932017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5794
5795 PR tui/21482
7a6e7fcc
RO
5796 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5797 arg to char *.
5798 * tui/tui-wingeneral.c (box_win): Likewise.
5799 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5800 (tui_show_source_line): Likewise.
5801 (tui_show_exec_info_content): Likewise.
5802
1933fd8e
VM
58032017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5804
5805 * sparc-tdep.c (sparc_structure_return_p)
5806 (sparc_arg_on_registers_p): New functions.
5807 (sparc32_store_arguments): Use them.
5808 * sparc64-tdep.c (sparc64_16_byte_align_p)
5809 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5810 Handle TYPE_CODE_ARRAY.
5811
21873064
YQ
58122017-05-17 Yao Qi <yao.qi@linaro.org>
5813
5814 * cli/cli-decode.c (add_alias_cmd): New function.
5815 * command.h (add_alias_cmd): Declare.
5816 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5817 instead call add_alias_cmd.
5818
2b351b19
PA
58192017-05-17 Pedro Alves <palves@redhat.com>
5820
5821 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5822 (nat_makefile_frag): ... this. All references updated.
5823 * configure.ac: Likewise.
5824 * configure.nat: Likewise. Enhance comments.
5825 * configure: Regenerate.
5826
5f2ad7a3
RO
58272017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5828
5829 * procfs.c (procfs_create_inferior): Change prototype to match
5830 definition.
5831
adf3dde5
EZ
58322017-05-13 Eli Zaretskii <eliz@gnu.org>
5833
5834 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5835 C++ compiler warning.
5836
6830f270
TT
58372017-05-12 Tom Tromey <tom@tromey.com>
5838
5839 PR rust/21483:
5840 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5841 recurse, just call value_struct_elt directly.
5842
68f2f2e3
TT
58432017-05-12 Tom Tromey <tom@tromey.com>
5844
5845 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5846 OP_RUST_ARRAY>: Fix.
5847
256afbc2
TT
58482017-05-12 Tom Tromey <tom@tromey.com>
5849
5850 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5851
94bb8dfe
YQ
58522017-05-09 Yao Qi <yao.qi@linaro.org>
5853
5854 * regcache.c: Include <forward_list>.
5855 (struct regcache_list): Remove.
5856 (current_regcache): Update.
5857 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5858 (regcache_thread_ptid_changed): Likewise.
5859 (registers_changed_ptid): Likewise.
5860 (current_regcache_size): Likewise.
5861
8248946c
YQ
58622017-05-09 Yao Qi <yao.qi@linaro.org>
5863
5864 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5865 (current_regcache_size): New function.
5866 (current_regcache_test): New function.
5867 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5868
313c5961
AH
58692017-05-08 Alan Hayward <alan.hayward@arm.com>
5870
5871 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5872 (print_gp_register_row): Use get_frame_register_value.
5873
27bfc1d1
AH
58742017-05-08 Alan Hayward <alan.hayward@arm.com>
5875
5876 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5877 (mips_supply_fpregset): Likewise.
5878 (mips64_supply_gregset): Likewise.
5879
146e6c5c
AH
58802017-05-08 Alan Hayward <alan.hayward@arm.com>
5881
5882 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5883 regcache->raw_supply_zeroed.
5884
e50f25ec
SDJ
58852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5886
5887 * configure.nat: Rearrange 'case' statements to match
5888 host before cpu.
5889
21ea5acd
SDJ
58902017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5891
5892 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5893 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5894 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5895 "@nat_extra_makefile_frag@".
5896 (Makefile): Remove dependency on "@frags@".
5897 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5898 (data-directory/Makefile): Likewise.
5899 * config/aarch64/linux.mh: Deleted; moved contents to
5900 "gdb/configure.nat".
5901 * config/alpha/alpha-linux.mh: Likewise.
5902 * config/alpha/nbsd.mh: Likewise.
5903 * config/arm/linux.mh: Likewise.
5904 * config/arm/nbsdelf.mh: Likewise.
5905 * config/i386/cygwin.mh: Likewise.
5906 * config/i386/cygwin64.mh: Likewise.
5907 * config/i386/darwin.mh: Likewise.
5908 * config/i386/fbsd.mh: Likewise.
5909 * config/i386/fbsd64.mh: Likewise.
5910 * config/i386/go32.mh: Likewise.
5911 * config/i386/i386gnu.mh: Likewise.
5912 * config/i386/i386sol2.mh: Likewise.
5913 * config/i386/linux.mh: Likewise.
5914 * config/i386/linux64.mh: Likewise.
5915 * config/i386/mingw.mh: Likewise.
5916 * config/i386/mingw64.mh: Likewise.
5917 * config/i386/nbsd64.mh: Likewise.
5918 * config/i386/nbsdelf.mh: Likewise.
5919 * config/i386/nto.mh: Likewise.
5920 * config/i386/obsd.mh: Likewise.
5921 * config/i386/obsd64.mh: Likewise.
5922 * config/i386/sol2-64.mh: Likewise.
5923 * config/ia64/linux.mh: Likewise.
5924 * config/m32r/linux.mh: Likewise.
5925 * config/m68k/linux.mh: Likewise.
5926 * config/m68k/nbsdelf.mh: Likewise.
5927 * config/m68k/obsd.mh: Likewise.
5928 * config/m88k/obsd.mh: Likewise.
5929 * config/mips/fbsd.mh: Likewise.
5930 * config/mips/linux.mh: Likewise.
5931 * config/mips/nbsd.mh: Likewise.
5932 * config/mips/obsd64.mh: Likewise.
5933 * config/pa/linux.mh: Likewise.
5934 * config/pa/nbsd.mh: Likewise.
5935 * config/pa/obsd.mh: Likewise.
5936 * config/powerpc/aix.mh: Likewise.
5937 * config/powerpc/fbsd.mh: Likewise.
5938 * config/powerpc/linux.mh: Likewise.
5939 * config/powerpc/nbsd.mh: Likewise.
5940 * config/powerpc/obsd.mh: Likewise.
5941 * config/powerpc/ppc64-linux.mh: Likewise.
5942 * config/powerpc/spu-linux.mh: Likewise.
5943 * config/s390/linux.mh: Likewise.
5944 * config/sh/nbsd.mh: Likewise.
5945 * config/sparc/fbsd.mh: Likewise.
5946 * config/sparc/linux.mh: Likewise.
5947 * config/sparc/linux64.mh: Likewise.
5948 * config/sparc/nbsd64.mh: Likewise.
5949 * config/sparc/nbsdelf.mh: Likewise.
5950 * config/sparc/obsd64.mh: Likewise.
5951 * config/sparc/sol2.mh: Likewise.
5952 * config/tilegx/linux.mh: Likewise.
5953 * config/vax/nbsdelf.mh: Likewise.
5954 * config/vax/obsd.mh: Likewise.
5955 * config/xtensa/linux.mh: Likewise.
5956 * config/i386/i386gnu.mn: New file, with excerpts from
5957 "config/i386/i386gnu.mh".
5958 * configure: Regenerate.
5959 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5960 *.mh files under "gdb/config".
5961 * configure.nat: New file, with contents from the
5962 "gdb/config/*/*.mh" files.
5963
7ed1acaf
TW
59642017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
5965
5966 * btrace.c (btrace_clear): Free insn vector.
5967
e13cb306
PA
59682017-05-05 Pedro Alves <palves@redhat.com>
5969
5970 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5971 * configure: Regenerate.
5972
5ed8105e
PA
59732017-05-04 Pedro Alves <palves@redhat.com>
5974
5975 * Makefile.in (SFILES): Add progspace-and-thread.c.
5976 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5977 (COMMON_OBS): Add progspace-and-thread.o.
5978 * breakpoint.c: Include "progspace-and-thread.h".
5979 (update_inserted_breakpoint_locations)
5980 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5981 Use scoped_restore_current_pspace_and_thread.
5982 (create_std_terminate_master_breakpoint): Use
5983 scoped_restore_current_program_space.
5984 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5985 (print_breakpoint_location): Use
5986 scoped_restore_current_program_space.
5987 (bp_loc_is_permanent): Use
5988 scoped_restore_current_pspace_and_thread.
5989 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5990 (download_tracepoint_locations): Use
5991 scoped_restore_current_pspace_and_thread.
5992 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5993 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5994 (enum step_over_calls_kind): Moved from inferior.h.
5995 (class scoped_restore_current_thread): New class.
5996 * gdbthread.h (make_cleanup_restore_current_thread): Delete
5997 declaration.
5998 (scoped_restore_current_thread): New class.
5999 * infcmd.c: Include "common/gdb_optional.h".
6000 (continue_1, proceed_after_attach): Use
6001 scoped_restore_current_thread.
6002 (notice_new_inferior): Use scoped_restore_current_thread.
6003 * inferior.c: Include "progspace-and-thread.h".
6004 (restore_inferior, save_current_inferior): Delete.
6005 (add_inferior_command, clone_inferior_command): Use
6006 scoped_restore_current_pspace_and_thread.
6007 * inferior.h (scoped_restore_current_inferior): New class.
6008 * infrun.c: Include "progspace-and-thread.h" and
6009 "common/gdb_optional.h".
6010 (follow_fork_inferior): Use
6011 scoped_restore_current_pspace_and_thread.
6012 (scoped_restore_exited_inferior): New class.
6013 (handle_vfork_child_exec_or_exit): Use
6014 scoped_restore_exited_inferior,
6015 scoped_restore_current_pspace_and_thread,
6016 scoped_restore_current_thread and scoped_restore.
6017 (fetch_inferior_event): Use scoped_restore_current_thread.
6018 * linespec.c (decode_line_full, decode_line_1): Use
6019 scoped_restore_current_program_space.
6020 * mi/mi-main.c: Include "progspace-and-thread.h".
6021 (exec_continue): Use scoped_restore_current_thread.
6022 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6023 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6024 * proc-service.c (ps_pglobal_lookup): Use
6025 scoped_restore_current_program_space.
6026 * progspace-and-thread.c: New file.
6027 * progspace-and-thread.h: New file.
6028 * progspace.c (release_program_space, clone_program_space): Use
6029 scoped_restore_current_program_space.
6030 (restore_program_space, save_current_program_space)
6031 (save_current_space_and_thread): Delete.
6032 (switch_to_program_space_and_thread): Moved to
6033 progspace-and-thread.c.
6034 * progspace.h (save_current_program_space)
6035 (save_current_space_and_thread): Delete declarations.
6036 (scoped_restore_current_program_space): New class.
6037 * remote.c (remote_btrace_maybe_reopen): Use
6038 scoped_restore_current_thread.
6039 * symtab.c: Include "progspace-and-thread.h".
6040 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6041 * thread.c (print_thread_info_1): Use
6042 scoped_restore_current_thread.
6043 (struct current_thread_cleanup): Delete.
6044 (do_restore_current_thread_cleanup)
6045 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6046 (scoped_restore_current_thread::~scoped_restore_current_thread):
6047 ... this new dtor.
6048 (make_cleanup_restore_current_thread): Rename/convert to ...
6049 (scoped_restore_current_thread::scoped_restore_current_thread):
6050 ... this new ctor.
6051 (thread_apply_all_command): Use scoped_restore_current_thread.
6052 (thread_apply_command): Use scoped_restore_current_thread.
6053 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6054 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6055
f6223dbb
PA
60562017-05-04 Pedro Alves <palves@redhat.com>
6057
6058 * thread.c (make_cleanup_restore_current_thread): Move
6059 find_thread_ptid call before the is_stopped call. Assert that the
6060 thread is found. Replace is_stopped call by checking the thread's
6061 state directly. Remove unnecessary NULL-thread check.
6062
3c3ae77e
PA
60632017-05-04 Pedro Alves <palves@redhat.com>
6064
6065 * corelow.c (thread_section_name): New class.
6066 (get_core_register_section, get_core_siginfo): Use it.
6067
45eba0ab
AA
60682017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6069
6070 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6071 (get_core_register_section): Remove xfree of NULL pointer.
6072
f81fdd35
AH
60732017-05-03 Alan Hayward <alan.hayward@arm.com>
6074
6075 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6076 * regcache.c (regcache::raw_supply_zeroed): New function.
6077 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6078
35837774
SM
60792017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6080
6081 * gdbarch.sh: Remove commented out definition of
6082 TARGET_CHAR_BIT.
6083 * gdbarch.h: Re-generate.
6084
c94fee56
SDJ
60852017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6086
6087 * configure: Regenerate.
6088
d17f7b36
SM
60892017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6090
6091 * solib-target.c (solib_target_relocate_section_addresses):
6092 Remove num_section_bases, num_bases, segment_bases variables.
6093
b560ebd6
SM
60942017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6095
6096 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6097
f2f46dfc
SM
60982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6099
6100 * solib-target.c: Include <vector>
6101 (struct lm_info_target) <~lm_info_target>: Remove.
6102 <segment_bases, section_bases>: Change type to
6103 std::vector<CORE_ADDR>.
6104 (library_list_start_segment, library_list_start_section,
6105 library_list_end_library,
6106 solib_target_relocate_section_addresses): Adjust.
6107
a0ff9e1a
SM
61082017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6109
6110 * gdbarch.sh (software_single_step): Change return type to
6111 std::vector<CORE_ADDR>.
6112 * gdbarch.c, gdbarch.h: Re-generate.
6113 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6114 Adjust.
6115 (arm_deal_with_atomic_sequence_raw): Adjust.
6116 (thumb_get_next_pcs_raw): Adjust.
6117 (arm_get_next_pcs_raw): Adjust.
6118 (arm_get_next_pcs): Adjust.
6119 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6120 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6121 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6122 (alpha_software_single_step): Adjust.
6123 * alpha-tdep.h (alpha_software_single_step): Adjust.
6124 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6125 * arm-tdep.c (arm_software_single_step): Adjust.
6126 (arm_breakpoint_kind_from_current_state): Adjust.
6127 * arm-tdep.h (arm_software_single_step): Adjust.
6128 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6129 * cris-tdep.c (cris_software_single_step): Adjust.
6130 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6131 (micromips_deal_with_atomic_sequence): Adjust.
6132 (deal_with_atomic_sequence): Adjust.
6133 (mips_software_single_step): Adjust.
6134 * mips-tdep.h (mips_software_single_step): Adjust.
6135 * moxie-tdep.c (moxie_software_single_step): Adjust.
6136 * nios2-tdep.c (nios2_software_single_step): Adjust.
6137 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6138 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6139 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6140 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6141 * sparc-tdep.c (sparc_software_single_step): Adjust.
6142 * spu-tdep.c (spu_software_single_step): Adjust.
6143 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6144
ea480a30
SM
61452017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6146
6147 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6148 * gdbarch.h: Re-generate.
6149
d050f7d7
TW
61502017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6151
6152 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6153 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6154 * python/py-instruction.c, python/py-instruction.h: New file.
6155 * python/py-record.c: Add py-instruction.h include.
6156 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6157 gdb.RecordInstruction.
6158 * python/python-internal.h: Add gdbpy_initialize_instruction
6159 declaration.
6160 * python/python.c (do_start_initialization): Add
6161 gdbpy_initialize_instruction.
6162
14f819c8
TW
61632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6164
6165 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6166 Remove.
6167 (btrace_func_from_recpy_func): New function.
6168 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6169 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6170 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6171 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6172 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6173 Also, use new helper functions.
6174 (btpy_list_item): Use new helper functions.
6175 (recpy_bt_function_call_history): Use new type name.
6176 (btpy_call_getset): Remove.
6177 (gdbpy_initialize_btrace): Remove code to initialize
6178 gdb.BtraceFunctionCall.
6179 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6180 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6181 recpy_bt_func_prev, recpy_bt_func_next): New export.
6182 * python/py-record.c (recpy_func_type): New static object.
6183 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6184 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6185 recpy_func_next): New function.
6186 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6187 (recpy_func_getset): New static object.
6188 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6189 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6190
0ed5da75
TW
61912017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6192
6193 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6194 (btpy_object, btpy_insn_type, btpy_new): Remove.
6195 (btpy_list_object): Use gdb.RecordInstruction type instead of
6196 gdb.BtraceInstruction type.
6197 (btrace_insn_from_recpy_insn): New function.
6198 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6199 btpy_new.
6200 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6201 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6202 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6203 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6204 instead of btpy_object.
6205 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6206 btpy_insn_data, btpy_insn_decode): Rename to ...
6207 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6208 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6209 recpy_bt_insn_decode): This. Also, use new helper functions.
6210 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6211 recpy_insn_type.
6212 (btpy_insn_getset): Remove.
6213 (gdbpy_initialize_btrace): Remove code to initialize
6214 gdb.BtraceInstruction. Use recpy_element_object.
6215 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6216 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6217 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6218 * python/py-record.c (recpy_insn_type): New static object.
6219 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6220 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6221 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6222 New function.
6223 (recpy_insn_getset): New static object.
6224 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6225 * python/py-record.h (recpy_element_object): New typedef.
6226 (recpy_insn_type, recpy_insn_new): New export.
6227
913aeadd
TW
62282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6229
6230 * py-record-btrace.c (btpy_insn_new): Removed.
6231 (btpy_insn_or_gap_new): New function.
6232 (btpy_insn_error): Removed.
6233 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6234 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6235 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6236 btpy_insn_or_gap_new instead of btpy_insn_new.
6237 (btpy_insn_getset): Remove btpy_insn_error.
6238 * py-record.c (recpy_gap_type): New static object.
6239 (recpy_gap_object): New typedef.
6240 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6241 recpy_gap_reason_string): New function.
6242 (recpy_gap_getset): New static object.
6243 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6244 * py-record.h (recpy_gap_new): New export.
6245
a3be24ad
TW
62462017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6247
6248 * python/py-record.c (recpy_ptid): Remove.
6249 (recpy_record_getset): Remove recpy_ptid.
6250
ae20e79a
TW
62512017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6252
6253 * btrace.c (btrace_fetch): Set inferior_ptid.
6254 * python/py-record-btrace.c: Add "py-record.h" include.
6255 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6256 recpy_bt_end, recpy_bt_instruction_history,
6257 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6258 in gdb.Record object instead of current ptid.
6259 * python/py-record.c: Include new "py-record.h" file.
6260 (recpy_record_object): Moved to py-record.h.
6261 * python/py-record.h: New file.
6262
8d0050ea
TW
62632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6264
6265 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6266 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6267 indentation.
6268
3f380b50
JB
62692017-05-01 Joel Brobecker <brobecker@adacore.com>
6270
6271 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6272 the past maintainers section.
6273
07495424
YQ
62742017-04-28 Yao Qi <yao.qi@linaro.org>
6275
6276 * infcmd.c (get_return_value): Use regcache ctor, and remove
6277 cleanup.
6278
deb1fa3e
YQ
62792017-04-28 Yao Qi <yao.qi@linaro.org>
6280 Pedro Alves <palves@redhat.com>
6281
6282 * regcache.c (regcache::regcache): New tag dispatch ctor.
6283 (do_cooked_read): Moved above.
6284 (regcache_dup): Use the tag dispatch ctor..
6285 * regcache.h (regcache): Declare ctor, delete copy ctor and
6286 assignment operator, remove friend regcache_dup.
6287
b421c83c
YQ
62882017-04-28 Yao Qi <yao.qi@linaro.org>
6289
6290 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6291 call method save instead of regcache_cpy.
6292 * regcache.h (struct regcache): Make regcache_dup a friend.
6293
ef79d9a3
YQ
62942017-04-28 Yao Qi <yao.qi@linaro.org>
6295
6296 * regcache.c (struct regcache): Move to regcache.h
6297 (regcache::arch): New method.
6298 (regcache_get_ptid): Update.
6299 (get_regcache_arch): Call arch method.
6300 (get_regcache_aspace): Call method aspace.
6301 (register_buffer): Change it to method.
6302 (regcache_save): Change it to regcache::save.
6303 (regcache_restore): Likewise.
6304 (regcache_cpy_no_passthrough): Remove the declaration.
6305 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6306 (regcache_cpy_no_passthrough): Change it to method
6307 cpy_no_passthrough.
6308 (regcache_register_status): Change it to method
6309 get_register_status.
6310 (regcache_invalidate): Change it to method invalidate.
6311 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6312 (regcache_raw_update): Change it to method raw_update.
6313 (regcache_raw_read): Likewise.
6314 (regcache_raw_read_signed): Likewise.
6315 (regcache_raw_read_unsigned): Likewise.
6316 (regcache_raw_write_signed): Likewise.
6317 (regcache_raw_write_unsigned): Likewise.
6318 (regcache_cooked_read): Likewise.
6319 (regcache_cooked_read_value): Likewise.
6320 (regcache_cooked_read_signed): Likewise.
6321 (regcache_cooked_read_unsigned): Likewise.
6322 (regcache_cooked_write_signed): Likewise.
6323 (regcache_cooked_write_unsigned): Likewise.
6324 (regcache_raw_set_cached_value): Likewise.
6325 (regcache_raw_write): Likewise.
6326 (regcache_cooked_write): Likewise.
6327 (regcache_xfer_part): Likewise.
6328 (regcache_raw_read_part): Likewise.
6329 (regcache_raw_write_part): Likewise.
6330 (regcache_cooked_read_part): Likewise.
6331 (regcache_cooked_write_part): Likewise.
6332 (regcache_raw_supply): Likewise.
6333 (regcache_raw_collect): Likewise.
6334 (regcache_transfer_regset): Likewise.
6335 (regcache_supply_regset): Likewise.
6336 (regcache_collect_regset): Likewise.
6337 (regcache_debug_print_register): Likewise.
6338 (enum regcache_dump_what): Move it to regcache.h.
6339 (regcache_dump): Change it to method dump.
6340 * regcache.h (enum regcache_dump_what): New.
6341 (class regcache): New.
6342 * target.c (target_fetch_registers): Call method
6343 debug_print_register.
6344 (target_store_registers): Likewise.
6345
f8fdb78e
SM
63462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6347
6348 * windows-nat.c (struct lm_info_windows): Initialize field.
6349 (windows_make_so): Allocate lm_info_windows with new.
6350 (windows_free_so): Free lm_info_windows with delete.
6351
9ccbfd7b
SM
63522017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6353
6354 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6355 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6356 cleanup.
6357 (darwin_free_so): Free lm_info_darwin with delete.
6358
76e75227
SM
63592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6360
6361 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6362 <l_addr_p>: Change type to bool.
6363 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6364 (svr4_free_so): Free lm_info_svr4 with delete.
6365 (svr4_copy_library_list): Replace memcpy with call to copy
6366 constructor.
6367 (library_list_start_library, svr4_default_sos): Allocate
6368 lm_info_svr4 with new.
6369
51046d9e
SM
63702017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6371
6372 * solib-target.c (struct lm_info_target): Add destructor,
6373 initialize fields.
6374 <name>: Change type to std::string.
6375 (library_list_start_library): Allocate lm_info_target with new.
6376 (solib_target_free_library_list): Free lm_info_target with
6377 delete.
6378 (solib_target_current_sos): Adapt to std::string.
6379 (solib_target_free_so): Free lm_info_target with delete.
6380
4023ae76
SM
63812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6382
6383 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6384 fields.
6385 (frv_current_sos): Allocate lm_info_frv with new.
6386 (frv_relocate_main_executable): Free lm_info_frv with delete,
6387 allocate with new.
6388 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6389
af43057b
SM
63902017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6391
6392 * solib-frv.c (struct lm_info_frv): Fix indentation.
6393
b0911207
SM
63942017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6395
6396 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6397 map field.
6398 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6399 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6400 and allocate with new.
6401 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6402
6c401f72
SM
64032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6406 <filename, member_name>: Change type to std::string.
6407 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6408 (library_list_start_library): Allocate lm_info_aix with new.
6409 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6410 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6411 with copy constructor.
6412
d0e449a1
SM
64132017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6414
6415 * solist.h (struct lm_info): Remove.
6416 (struct lm_info_base): New class.
6417 (struct so_list) <lm_info>: Change type to lm_info_base *.
6418 * nto-tdep.c (struct lm_info): Remove.
6419 (lm_addr): Adjust.
6420 * solib-aix.c (struct lm_info): Rename to ...
6421 (struct lm_info_aix): ... this. Extend lm_info_base.
6422 (lm_info_p): Rename to ...
6423 (lm_info_aix_p): ... this, and adjust.
6424 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6425 solib_aix_parse_libraries, library_list_start_library,
6426 solib_aix_free_library_list, solib_aix_parse_libraries,
6427 solib_aix_get_library_list,
6428 solib_aix_relocate_section_addresses, solib_aix_free_so,
6429 solib_aix_get_section_offsets,
6430 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6431 Adjust.
6432 (struct solib_aix_inferior_data) <library_list>: Adjust.
6433 * solib-darwin.c (struct lm_info): Rename to ...
6434 (struct lm_info_darwin): ... this. Extend lm_info_base.
6435 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6436 * solib-dsbt.c (struct lm_info): Rename to ...
6437 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6438 (struct dsbt_info) <main_executable_lm_info): Adjust.
6439 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6440 dsbt_relocate_section_addresses): Adjust.
6441 * solib-frv.c (struct lm_info): Rename to ...
6442 (struct lm_info_frv): ... this. Extend lm_info_base.
6443 (main_executable_lm_info): Adjust.
6444 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6445 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6446 find_canonical_descriptor_in_load_object,
6447 frv_fdpic_find_canonical_descriptor): Adjust.
6448 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6449 to lm_info_svr4.
6450 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6451 svr4_clear_so, svr4_copy_library_list,
6452 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6453 svr4_current_sos, svr4_fetch_objfile_link_map,
6454 solist_update_incremental): Adjust.
6455 * solib-svr4.h (struct lm_info_svr4): Move here from
6456 solib-svr4.c.
6457 * solib-target.c (struct lm_info): Rename to ...
6458 (struct lm_info_target): ... this. Extend lm_info_base.
6459 (lm_info_p): Rename to ...
6460 (lm_info_target_p): ... this.
6461 (solib_target_parse_libraries, library_list_start_segment,
6462 library_list_start_section, library_list_start_library,
6463 library_list_end_library, solib_target_free_library_list,
6464 solib_target_current_sos, solib_target_free_so,
6465 solib_target_relocate_section_addresses): Adjust.
6466 * windows-nat.c (struct lm_info): Rename to ...
6467 (struct lm_info_windows): ... this. Extend lm_info_base.
6468 (windows_make_so, handle_load_dll, handle_unload_dll,
6469 windows_xfer_shared_libraries): Adjust.
6470
434a4023
SM
64712017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6472
6473 * solib-darwin.c (struct darwin_so_list): Remove.
6474 (darwin_current_sos): Allocate an so_list object instead of a
6475 darwin_so_list, separately allocate an lm_info object.
6476 (darwin_free_so): Free lm_info.
6477
428544e8
JB
64782017-04-28 John Baldwin <jhb@FreeBSD.org>
6479
6480 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6481 with fprintf_filtered.
6482
4621115f
YQ
64832017-04-28 Yao Qi <yao.qi@linaro.org>
6484
6485 * regcache.c (regcache::regcache): New function.
6486 (regcache::~regcache): New function.
6487 (regcache_xmalloc_1): Remove.
6488 (regcache_xmalloc): Call new regcache.
6489 (regcache_xfree): Call delete regcache.
6490 (get_thread_arch_aspace_regcache): Call new regcache.
6491
339053c2
YQ
64922017-04-28 Yao Qi <yao.qi@linaro.org>
6493
6494 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6495 lwp instead of ptid_get_lwp.
6496
7974a605
YQ
64972017-04-28 Yao Qi <yao.qi@linaro.org>
6498
6499 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6500 lwp_info instead of getting from inferior_ptid.
6501
e15c3eb4
KS
65022017-04-27 Keith Seitz <keiths@redhat.com>
6503
6504 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6505 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6506 (CV_CONVERSION_BADNESS): Define.
6507 (rank_one_type): Remove overly restrictive rvalue reference
6508 rank checks.
6509 Add cv-qualifier checks and subranks for type equality.
6510 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6511 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6512 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6513
72bc1d24
SM
65142017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6515
6516 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6517 count when creating the object.
6518
55bcecda
UW
65192017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6520 Ulrich Weigand <uweigand@de.ibm.com>
6521
6522 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6523 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6524 is used in AIX.
6525 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6526 (process_xcoff_symbol): Likewise.
6527 (scan_xcoff_symtab): Likewise.
6528
5c99fcf8
AH
65292017-04-26 Alan Hayward <alan.hayward@arm.com>
6530
6531 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6532 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6533 (ia64_access_reg): Use get_frame_register_unsigned.
6534 (ia64_access_rse_reg): Likewise.
6535 (ia64_libunwind_frame_prev_register): Likewise.
6536
b41c5a85
JW
65372017-04-26 Jiong Wang <jiong.wang@arm.com>
6538
6539 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6540 * gdbarch.c: Regenerated.
6541 * gdbarch.h: Regenerated.
6542 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6543 visibility external.
6544 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6545 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6546 (enum cfa_how_kind): Move to ...
6547 (struct dwarf2_frame_state_reg_info): Likewise.
6548 (struct dwarf2_frame_state): Likewise.
6549 * dwarf2-frame.h: ... here.
6550 (dwarf2_frame_state_alloc_regs): New declaration.
6551 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6552 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6553
c185f580
AH
65542017-04-26 Alan Hayward <alan.hayward@arm.com>
6555
6556 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6557 regcache_raw_read_unsigned.
6558 (xtensa_pseudo_register_write): Likewise.
6559
19c45594
AH
65602017-04-26 Alan Hayward <alan.hayward@arm.com>
6561
6562 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6563 (nds32_pseudo_register_write): Likewise.
6564
4658f12e
YQ
65652017-04-25 Yao Qi <yao.qi@linaro.org>
6566
6567 * regcache.c (struct regcache) <readonly_p>: Change its type
6568 to bool.
6569 (regcache_xmalloc_1): Update parameter type and callers update.
6570
d581dda8
YQ
65712017-04-25 Yao Qi <yao.qi@linaro.org>
6572
6573 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6574 set_gdbarch_wchar_bit.
6575 * arm-tdep.c (arm_gdbarch_init): Likewise.
6576
debed3db
PA
65772017-04-25 Pedro Alves <palves@redhat.com>
6578
6579 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6580 (BothAreRelocatable, memcopy, memmove): Don't define.
6581 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6582 macros.
6583
b0b92aeb
PA
65842017-04-25 Pedro Alves <palves@redhat.com>
6585
6586 * common/common-defs.h: Include "common/poison.h".
6587 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6588 and adjust.
6589 * common/poison.h: New file.
6590 * common/traits.h: Include <type_traits>.
6591 (Not, Or, Requires): New, moved from common/function-view.h.
6592
16c4d54a
PA
65932017-04-25 Pedro Alves <palves@redhat.com>
6594
6595 * breakpoint.h (struct breakpoint): In-class initialize all
6596 fields. Make boolean fields "bool".
6597 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6598 memset call and initializations no longer necessary.
6599
b5c36682
PA
66002017-04-25 Pedro Alves <palves@redhat.com>
6601
6602 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6603 reference.
6604 (pt_btrace_insn): New function.
6605 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6606
5625a286
PA
66072017-04-25 Pedro Alves <palves@redhat.com>
6608
6609 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6610 "base" field and inherit from "bp_location" instead. Add
6611 non-default ctor.
6612 (allocate_location_exception): Use new non-default ctor.
6613 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6614 (init_bp_location): Convert to ...
6615 (bp_location::bp_location): ... this new ctor, and remove memset
6616 call.
6617 (base_breakpoint_allocate_location): Use the new non-default ctor.
6618 * breakpoint.h (bp_location): Now a class. Declare default and
6619 non-default ctors. In-class initialize all members.
6620 (init_bp_location): Remove declaration.
6621
23bcc18f
PA
66222017-04-25 Pedro Alves <palves@redhat.com>
6623
6624 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6625 assignment operator.
6626
e1ba3053
YQ
66272017-04-24 Yao Qi <yao.qi@linaro.org>
6628
6629 * doublest.c (convert_doublest_to_floatformat): Call
6630 floatformat_totalsize_bytes.
6631
10f489e5
TT
66322017-04-22 Tom Tromey <tom@tromey.com>
6633
6634 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6635 ui_out_emit_list.
6636 * stack.c (print_frame): Use ui_out_emit_list.
6637 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6638 ui_out_emit_list.
6639 * mi/mi-main.c (print_one_inferior)
6640 (mi_cmd_data_list_register_names)
6641 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6642 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6643 ui_out_emit_list.
6644 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6645 (mi_output_solib_attribs): Use ui_out_emit_list,
6646 ui_out_emit_tuple.
6647 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6648 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6649 (mi_cmd_stack_list_args, list_args_or_locals): Use
6650 ui_out_emit_list.
6651 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6652 * breakpoint.c (print_solib_event, output_thread_groups): Use
6653 ui_out_emit_list.
6654
0092b74d
TT
66552017-04-22 Tom Tromey <tom@tromey.com>
6656
6657 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6658 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6659 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6660
a14a62dd
TT
66612017-04-22 Tom Tromey <tom@tromey.com>
6662
6663 * tracepoint.c (tvariables_info_1)
6664 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6665
46b9c129
TT
66662017-04-22 Tom Tromey <tom@tromey.com>
6667
6668 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6669 annotate_arg_emitter.
6670 * breakpoint.c (print_mention_watchpoint)
6671 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6672 * annotate.h (struct annotate_arg_emitter): New.
6673
2e783024
TT
66742017-04-22 Tom Tromey <tom@tromey.com>
6675
6676 * record-btrace.c (record_btrace_insn_history)
6677 (record_btrace_insn_history_range, record_btrace_call_history)
6678 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6679 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6680 ui_out_emit_tuple.
6681 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6682 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6683 * skip.c (skip_info): Use ui_out_emit_tuple.
6684 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6685 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6686 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6687 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6688 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6689 ui_out_emit_tuple.
6690 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6691 (output_register, mi_cmd_data_read_memory)
6692 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6693 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6694 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6695 Use ui_out_emit_tuple.
6696 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6697 ui_out_emit_tuple.
6698 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6699 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6700 * linux-thread-db.c (info_auto_load_libthread_db): Use
6701 ui_out_emit_tuple.
6702 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6703 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6704 * disasm.c (do_mixed_source_and_assembly_deprecated)
6705 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6706 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6707 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6708 * breakpoint.c (print_one_breakpoint_location)
6709 (print_one_breakpoint): Use ui_out_emit_tuple.
6710 * auto-load.c (print_script, info_auto_load_cmd): Use
6711 ui_out_emit_tuple.
6712 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6713
9be21bb4
SM
67142017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6715
6716 * thread.c (print_thread_info_1): Remove dead code.
6717
0d4c07af
JK
67182017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6719
6720 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6721 GDB_SELF_TEST.
6722 * arm-tdep.c (selftests::arm_record_test): Likewise.
6723
4daf993d
YQ
67242017-04-21 Yao Qi <yao.qi@linaro.org>
6725
6726 * regcache.c (regcache_restore): Remove argument 2. Replace
6727 argument 3 with regcache. Get register status from
6728 src->register_status and get register contents from
6729 register_buffer (src, regnum).
6730 (regcache_cpy): Update.
6731
a6c21d4a
PA
67322017-04-19 Pedro Alves <palves@redhat.com>
6733
6734 * gdbthread.h (thread): Add missing closing parenthesis in
6735 comment.
6736
3a3fd0fd
PA
67372017-04-19 Pedro Alves <palves@redhat.com>
6738
6739 * common/refcounted-object.h: New file.
6740 * gdbthread.h: Include "common/refcounted-object.h".
6741 (thread_info): Inherit from refcounted_object and add comments.
6742 (thread_info::incref, thread_info::decref)
6743 (thread_info::m_refcount): Delete.
6744 (thread_info::deletable): Use the refcounted_object::refcount()
6745 method.
6746 * inferior.c (current_inferior_): Add comment.
6747 (set_current_inferior): Increment/decrement refcounts.
6748 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6749 not-deletable instead of comparing with the current inferior.
6750 (initialize_inferiors): Increment the initial inferior's refcount.
6751 * inferior.h (struct inferior): Forward declare.
6752 Include "common/refcounted-object.h".
6753 (current_inferior, set_current_inferior): Move declaration to
6754 before struct inferior's definition, and fix comment.
6755 (inferior): Inherit from refcounted_object. Add comments.
6756 * thread.c (switch_to_thread_no_regs): Reference the thread's
6757 inferior pointer directly instead of doing a ptid lookup.
6758 (switch_to_no_thread): New function.
6759 (switch_to_thread(thread_info *)): New function, factored out
6760 from ...
6761 (switch_to_thread(ptid_t)): ... this.
6762 (restore_current_thread): Delete.
6763 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6764 fields, and add 'inf' field.
6765 (do_restore_current_thread_cleanup): Check whether old->inf is
6766 alive instead of looking up an inferior by ptid. Use
6767 switch_to_thread and switch_to_no_thread.
6768 (restore_current_thread_cleanup_dtor): Use old->inf directly
6769 instead of lookup up an inferior by id. Decref the inferior.
6770 Don't restore 'removable'.
6771 (make_cleanup_restore_current_thread): Same the inferior pointer
6772 in old, instead of the inferior number. Incref the inferior.
6773 Don't save/clear 'removable'.
6774
9bcb1f16
PA
67752017-04-19 Pedro Alves <palves@redhat.com>
6776
6777 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6778 unittests/scoped_restore-selftests.c.
6779 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6780 * common/scoped_restore.h (scoped_restore_base): Make "class".
6781 (scoped_restore_base::release): New public method.
6782 (scoped_restore_base::scoped_restore_base): New protected ctor.
6783 (scoped_restore_base::m_saved_var): New protected field.
6784 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6785 scoped_restore_base base class instead of m_saved_var directly.
6786 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6787 (scoped_restore_tmpl::scoped_restore_tmpl(const
6788 scoped_restore_tmpl<T>&)): Likewise.
6789 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6790 method.
6791 (scoped_restore_tmpl::saved_var): New method.
6792 (scoped_restore_tmpl::m_saved_var): Delete.
6793 * inferior.h (inferior::detaching): Now a bool.
6794 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6795 cleanup.
6796 * unittests/scoped_restore-selftests.c: New file.
6797
26fcd539
PA
67982017-04-19 Pedro Alves <palves@redhat.com>
6799
6800 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6801 Re-sort in alphabetic order.
6802
fdd243b0
PA
68032017-04-18 Pedro Alves <palves@redhat.com>
6804
6805 * xml-support.c (obstack_xml_printf): Delete.
6806 * xml-support.h (obstack_xml_printf): Delete.
6807
4895cde2
PA
68082017-04-18 Pedro Alves <palves@redhat.com>
6809
6810 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6811 vdebug, verror, body_text, start_element, end_element, name,
6812 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6813 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6814 is_xinclude>: Make private and add m_ prefix.
6815 (gdb_xml_parser::body_text): New method, based on ...
6816 (gdb_xml_body_text): ... this. Adjust.
6817 (gdb_xml_parser::vdebug): New method, based on ...
6818 (gdb_xml_debug): ... this. Adjust.
6819 (gdb_xml_parser::verror): New method, based on ...
6820 (gdb_xml_error): ... this. Adjust.
6821 (gdb_xml_parser::start_element): New method, based on ...
6822 (gdb_xml_start_element): ... this. Adjust.
6823 (gdb_xml_start_element_wrapper): Defer to
6824 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6825 (gdb_xml_parser::end_element): New method, based on ...
6826 (gdb_xml_end_element_wrapper): ... this. Adjust.
6827 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6828 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6829 (gdb_xml_parser::use_dtd): New method, based on ...
6830 (gdb_xml_use_dtd): ... this. Adjust.
6831 (gdb_xml_parser::parse): New method, based on ...
6832 (gdb_xml_parse): ... this. Adjust.
6833 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6834 (xinclude_start_include): Adjust to call the parser's name method.
6835 (xml_xinclude_default, xml_xinclude_start_doctype)
6836 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6837 method.
6838 (xml_process_xincludes): Adjust to call parser methods.
6839 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6840 declarations.
6841
bd8a901f
PA
68422017-04-18 Pedro Alves <palves@redhat.com>
6843
6844 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6845 gdb::optional<std::string>.
6846 * xml-support.c: Include <string>.
6847 (scope_level::scope_level(scope_level &&))
6848 (scope_level::~scope_level): Delete.
6849 (scope_level::body): Now a std::string.
6850 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6851 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6852 parameter.
6853 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6854 (xinclude_parsing_data::output): Now a std::string reference.
6855 (xinclude_start_include): Adjust.
6856 (xml_xinclude_default): Adjust.
6857 (xml_process_xincludes): Add 'output' parameter, and return bool.
6858 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6859 and return bool.
6860 * xml-tdesc.c: Include <unordered_map> and <string>.
6861 (tdesc_xml_cache): Delete.
6862 (tdesc_xml_cache_s): Delete.
6863 (xml_cache): Now an std::unordered_map.
6864 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6865 (target_fetch_description_xml): Change return type to
6866 gdb::optional<std::string>, and adjust.
6867 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6868 (target_fetch_description_xml): Change return type to
6869 gdb::optional<std::string>.
6870
d35d1958
PA
68712017-04-18 Pedro Alves <palves@redhat.com>
6872
6873 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6874 unittests/optional-selftests.c.
6875 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6876 * unittests/optional-selftests.c: New file.
6877 * unittests/optional/assignment/1.cc: New file.
6878 * unittests/optional/assignment/2.cc: New file.
6879 * unittests/optional/assignment/3.cc: New file.
6880 * unittests/optional/assignment/4.cc: New file.
6881 * unittests/optional/assignment/5.cc: New file.
6882 * unittests/optional/assignment/6.cc: New file.
6883 * unittests/optional/assignment/7.cc: New file.
6884 * unittests/optional/cons/copy.cc: New file.
6885 * unittests/optional/cons/default.cc: New file.
6886 * unittests/optional/cons/move.cc: New file.
6887 * unittests/optional/cons/value.cc: New file.
6888 * unittests/optional/in_place.cc: New file.
6889 * unittests/optional/observers/1.cc: New file.
6890 * unittests/optional/observers/2.cc: New file.
6891
22796e97
PA
68922017-04-18 Pedro Alves <palves@redhat.com>
6893
6894 * common/gdb_optional.h: Include common/traits.h.
6895 (in_place_t): New type.
6896 (in_place): New constexpr variable.
6897 (optional::optional): Remove member initialization of
6898 m_instantiated.
6899 (optional::optional(in_place_t...)): New constructor.
6900 (optional::~optional): Use reset.
6901 (optional::optional(const optional&)): New.
6902 (optional::optional(const optional&&)): New.
6903 (optional::optional(T &)): New.
6904 (optional::optional(T &&)): New.
6905 (operator::operator=(const optional &)): New.
6906 (operator::operator=(optional &&)): New.
6907 (operator::operator= (const T &))
6908 (operator::operator= (T &&))
6909 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6910 (operator::reset): New.
6911 (operator::m_instantiated):: Add in-class initializer.
6912 * common/traits.h: Include <type_traits>.
6913 (struct And): New types.
6914
a7fc9b61
PA
69152017-04-18 Pedro Alves <palves@redhat.com>
6916
6917 * xml-support.c: Include <vector>.
6918 (scope_level::scope_level(const gdb_xml_element *))
6919 (scope_level::scope_level(scope_level&&)): New.
6920 (scope_level::~scope_level): New.
6921 (scope_level_s): Delete.
6922 (gdb_xml_parser::scopes): Now a std::vector.
6923 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6924 Use std::vector.
6925 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6926 scope cleanup code.
6927 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6928 of the scopes member. Use std::vector::emplace_back.
6929
010151c9
PA
69302017-04-18 Pedro Alves <palves@redhat.com>
6931
6932 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6933 a bool.
6934 (gdb_xml_end_element): Change type of first parameter.
6935 (gdb_xml_cleanup): Rename to ...
6936 (gdb_xml_parser::~gdb_xml_parser): ... this.
6937 (gdb_xml_create_parser_and_cleanup): Delete with ...
6938 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6939 to this new ctor.
6940 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6941 using gdb_xml_create_parser_and_cleanup.
6942 (xinclude_parsing_data): Add ctor/dtor.
6943 (xml_xinclude_cleanup): Delete.
6944 (xml_process_xincludes): Create a local xinclude_parsing_data
6945 instead of heap-allocating one. Create a local gdb_xml_parser
6946 instead of heap-allocating one with
6947 gdb_xml_create_parser_and_cleanup.
6948
d56060f0
JB
69492017-04-18 John Baldwin <jhb@FreeBSD.org>
6950
6951 PR threads/20743
6952 * fbsd-nat.c (resume_one_thread_cb): Remove.
6953 (resume_all_threads_cb): Remove.
6954 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6955 iterate_over_threads.
6956
305d16a9
JB
69572017-04-17 Joel Brobecker <brobecker@adacore.com>
6958
6959 * NEWS: Create a new section for the next release branch.
6960 Rename the section of the current branch, now that it has
6961 been cut.
6962
8bb57231
JB
69632017-04-17 Joel Brobecker <brobecker@adacore.com>
6964
6965 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6966 * version.in: Bump version to 8.0.50.DATE-git.
6967
096c92dd
SDJ
69682017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
6969
6970 PR gdb/21385
6971 * windows-nat.c (windows_create_inferior): Declare 'allargs'
6972 independently of the host, and fix build breakage on Cygwin.
6973
0550c955
PA
69742017-04-13 Pedro Alves <palves@redhat.com>
6975
6976 * inferior.c (free_inferior): Convert to ...
6977 (inferior::~inferior): ... this dtor.
6978 (inferior::inferior): New ctor, factored out from ...
6979 (add_inferior_silent): ... here. Allocate the inferior with a new
6980 expression.
6981 (delete_inferior): Call delete instead of free_inferior.
6982 * inferior.h (gdb_environ, continuation): Forward declare.
6983 (inferior): Now a class. Add in-class initialization to all
6984 members. Make boolean fields bool, except 'detaching'.
6985 (inferior::inferior): New explicit ctor.
6986 (inferior::~inferior): New.
6987
e3d60dfc
PA
69882017-04-13 Pedro Alves <palves@redhat.com>
6989
6990 * inferior.c (init_inferior_list): Delete.
6991 * inferior.h (init_inferior_list): Delete.
6992
5fd69d0a
PA
69932017-04-13 Pedro Alves <palves@redhat.com>
6994
6995 PR threads/13217
6996 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6997 (top level): Call it twice, with different thread sets.
6998
c6609450
PA
69992017-04-13 Pedro Alves <palves@redhat.com>
7000
7001 * thread.c: Include <algorithm>.
7002 (thread_array_cleanup): Delete.
7003 (scoped_inc_dec_ref): New class.
7004 (live_threads_count): New function.
7005 (set_thread_refcount): Delete.
7006 (tp_array_compar_ascending): Now a bool.
7007 (tp_array_compar): Convert to a std::sort comparison function.
7008 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7009 and live_threads_count.
7010
2a00d7ce
PA
70112017-04-13 Pedro Alves <palves@redhat.com>
7012
7013 * infrun.c (follow_fork_inferior): Also switch the current
7014 inferior.
7015
441d7c93
PA
70162017-04-13 Pedro Alves <palves@redhat.com>
7017
7018 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7019 before calling create_internal_breakpoint.
7020
808480f6
PA
70212017-04-13 Pedro Alves <palves@redhat.com>
7022
7023 * fork-child.c (execv_argv): New class.
7024 (breakup_args): Refactored as ...
7025 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7026 Copy arguments to storage and replace separators with NULL
7027 terminators in place.
7028 (escape_bang_in_quoted_argument): Adjust to return bool.
7029 (execv_argv::execv_argv): New ctor.
7030 (execv_argv::init_for_shell): New method, factored out from
7031 fork_inferior. Don't strdup strings into the vector.
7032 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7033 Remove free_vector_argv call.
7034
ad3d022a
YQ
70352017-04-13 Yao Qi <yao.qi@linaro.org>
7036
7037 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7038 tdep->rx_psw_type.
7039
e6ddc3bf
YQ
70402017-04-13 Yao Qi <yao.qi@linaro.org>
7041
7042 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7043 * rx-tdep.c (rx_gdbarch_init): Likewise.
7044
bfb8cf90
PA
70452017-04-13 Pedro Alves <palves@redhat.com>
7046
7047 * breakpoint.h (struct breakpoint): Reindent.
7048
f5336ca5
PA
70492017-04-13 Pedro Alves <palves@redhat.com>
7050
7051 * breakpoint.c (bp_location): Rename to ...
7052 (bp_locations): ... this. All references updated.
7053 (bp_location_count): Rename to ...
7054 (bp_locations_count): ... this. All references updated.
7055 (bp_location_placed_address_before_address_max): Rename to ...
7056 (bp_locations_placed_address_before_address_max): ... this. All
7057 references updated.
7058 (bp_location_shadow_len_after_address_max): Rename to ...
7059 (bp_locations_shadow_len_after_address_max): ... this. All
7060 references updated.
7061 (bp_location_compare_addrs): Rename to ...
7062 (bp_locations_compare_addrs): ... this. All references updated.
7063 (bp_location_compare):Rename to ...
7064 (bp_locations_compare): ... this. All references updated.
7065 (bp_location_target_extensions_update): Rename to ...
7066 (bp_locations_target_extensions_update): ... this. All references
7067 updated.
7068
be628ab8
SDJ
70692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7070
7071 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7072 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7073 'sgtty.h'.
7074 * common/gdb_termios.h: New file, with parts of "terminal.h".
7075 * inflow.c: Include "gdb_termios.h".
7076 * ser-unix.c: Include "gdb_termios.h".
7077 * terminal.h: Move terminal-related defines to
7078 "common/gdb_termios.h".
7079
8e9e35b1
TT
70802017-04-12 Tom Tromey <tom@tromey.com>
7081
7082 * probe.c (parse_probes): Update.
7083 * location.h (delete_event_location): Don't declare.
7084 (event_location_deleter::operator()): Update.
7085 * location.c (event_location_deleter::operator()): Rename from
7086 delete_event_location.
7087 * linespec.h (linespec_result) <location>: Change type to
7088 event_location_up.
7089 * linespec.c (canonicalize_linespec, event_location_to_sals)
7090 (decode_objc): Update.
7091 (linespec_result): Don't call delete_event_location.
7092 * breakpoint.c (create_breakpoints_sal)
7093 (bkpt_probe_create_sals_from_location)
7094 (strace_marker_create_sals_from_location): Update.
7095
16e802b9
TT
70962017-04-12 Tom Tromey <tom@tromey.com>
7097
7098 * linespec.h (struct linespec_result): Add constructor and
7099 destructor.
7100 (init_linespec_result, destroy_linespec_result)
7101 (make_cleanup_destroy_linespec_result): Don't declare.
7102 * linespec.c (init_linespec_result): Remove.
7103 (linespec_result::~linespec_result): Rename from
7104 destroy_linespec_result. Update.
7105 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7106 Remove.
7107 * breakpoint.c (create_breakpoint, break_range_command)
7108 (decode_location_default): Update.
7109 * ax-gdb.c (agent_command_1): Update.
7110
d28cd78a
TT
71112017-04-12 Tom Tromey <tom@tromey.com>
7112
7113 * remote.c (remote_download_tracepoint): Update.
7114 * python/py-breakpoint.c (bppy_get_location): Update.
7115 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7116 (gdbscm_breakpoint_location): Update.
7117 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7118 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7119 Change type to event_location_up.
7120 * breakpoint.c (create_overlay_event_breakpoint)
7121 (create_longjmp_master_breakpoint)
7122 (create_std_terminate_master_breakpoint)
7123 (create_exception_master_breakpoint)
7124 (breakpoint_event_location_empty_p, print_breakpoint_location)
7125 (print_one_breakpoint_location, create_thread_event_breakpoint)
7126 (init_breakpoint_sal, create_breakpoint)
7127 (print_recreate_ranged_breakpoint, break_range_command)
7128 (init_ada_exception_breakpoint, say_where): Update.
7129 (base_breakpoint_dtor): Don't call delete_event_location.
7130 (bkpt_print_recreate, tracepoint_print_recreate)
7131 (dprintf_print_recreate, update_static_tracepoint)
7132 (breakpoint_re_set_default): Update.
7133
711799d5
TT
71342017-04-12 Tom Tromey <tom@tromey.com>
7135
7136 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7137 type of "to_do". Update.
7138 (compute_stack_depth): Use std::vector.
7139
52d214d3
TT
71402017-04-12 Tom Tromey <tom@tromey.com>
7141
7142 * printcmd.c (find_instruction_backward): Use std::vector.
7143
4c404b8b
TT
71442017-04-12 Tom Tromey <tom@tromey.com>
7145
7146 * symfile.c (objfilep): Remove typedef.
7147 (reread_symbols): Use a std::vector.
7148
156d9eab
TT
71492017-04-12 Tom Tromey <tom@tromey.com>
7150
7151 * mi/mi-main.c (exec_direction_forward): Remove.
7152 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7153 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7154 scoped_restore.
7155 * guile/guile.c (guile_repl_command, guile_command)
7156 (gdbscm_execute_gdb_command): Use scoped_restore.
7157 * go-exp.y (go_parse): Use scoped_restore.
7158 * d-exp.y (d_parse): Use scoped_restore.
7159 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7160 * c-exp.y (c_parse): Use scoped_restore.
7161
4d89769a
TT
71622017-04-12 Tom Tromey <tom@tromey.com>
7163
7164 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7165 (mi_parse): Update return type.
7166 (mi_parse_free): Remove.
7167 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7168 (mi_parse::~mi_parse): Rename from mi_parse_free.
7169 (mi_parse_cleanup): Remove.
7170 (mi_parse): Return a unique_ptr. Use new.
7171 * mi/mi-main.c (mi_execute_command): Update.
7172
4b217cc7
TT
71732017-04-12 Tom Tromey <tom@tromey.com>
7174
7175 * location.c (explicit_location_lex_one): Return a
7176 unique_xmalloc_ptr.
7177 (string_to_explicit_location): Update. Remove cleanups.
7178
59d3651b
TT
71792017-04-12 Tom Tromey <tom@tromey.com>
7180
7181 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7182 (compare_value_and_voffset): Change type. Update.
7183 (compute_vtable_size): Change type of "offset_vec".
7184 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7185 (gnuv3_get_typeid): Remove extraneous declaration.
7186
b24b0d6c
TT
71872017-04-12 Tom Tromey <tom@tromey.com>
7188
7189 * charset.h (wchar_iterator): Fix comment.
7190
80a3b8c5
TT
71912017-04-12 Tom Tromey <tom@tromey.com>
7192
7193 * charset.c (iconv_wrapper): New class.
7194 (cleanup_iconv): Remove.
7195 (convert_between_encodings): Use it.
7196
c83dd867
TT
71972017-04-12 Tom Tromey <tom@tromey.com>
7198
7199 * symfile.h (increment_reading_symtab): Update type.
7200 * symfile.c (decrement_reading_symtab): Remove.
7201 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7202 * psymtab.c (psymtab_to_symtab): Update.
7203 * dwarf2read.c (dw2_instantiate_symtab): Update.
7204
0e8621a0
TT
72052017-04-12 Tom Tromey <tom@tromey.com>
7206
7207 * jit.c (struct jit_reader): Declare separately. Add constructor
7208 and destructor. Change type of "handle".
7209 (loaded_jit_reader): Define separately.
7210 (jit_reader_load): Update. New "new".
7211 (jit_reader_unload_command): Use "delete".
7212 * gdb-dlfcn.h (struct dlclose_deleter): New.
7213 (gdb_dlhandle_up): New typedef.
7214 (gdb_dlopen, gdb_dlsym): Update types.
7215 (gdb_dlclose): Remove.
7216 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7217 (gdb_dlsym): Change type of "handle".
7218 (make_cleanup_dlclose): Remove.
7219 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7220 * compile/compile-c-support.c (load_libcc): Update.
7221
67d89901
TT
72222017-04-12 Tom Tromey <tom@tromey.com>
7223
7224 * symtab.h (find_pcs_for_symtab_line): Change return type.
7225 * symtab.c (find_pcs_for_symtab_line): Change return type.
7226 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7227 type of "vec". Update.
7228 (ltpy_get_pcs_for_line): Update.
7229 * linespec.c (decode_digits_ordinary): Update.
7230
93921405
TT
72312017-04-12 Tom Tromey <tom@tromey.com>
7232
7233 * tracepoint.c (actions_command): Update.
7234 * python/python.c (python_command, python_interactive_command):
7235 Update.
7236 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7237 * guile/guile.c (guile_command): Update.
7238 * defs.h (read_command_lines, read_command_lines_1): Return
7239 command_line_up.
7240 (command_lines_deleter): New struct.
7241 (command_line_up): New typedef.
7242 * compile/compile.c (compile_code_command)
7243 (compile_print_command): Update.
7244 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7245 command_line_up.
7246 (make_cleanup_free_command_lines): Remove.
7247 * cli/cli-script.c (get_command_line, read_command_lines_1)
7248 (copy_command_lines): Return command_line_up.
7249 (while_command, if_command, read_command_lines, define_command)
7250 (document_command): Update.
7251 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7252 Remove.
7253 * breakpoint.h (breakpoint_set_commands): Change type of
7254 "commands".
7255 * breakpoint.c (breakpoint_set_commands): Change type of
7256 "commands". Update.
7257 (do_map_commands_command, update_dprintf_command_list)
7258 (create_tracepoint_from_upload): Update.
7259
ffc2605c
TT
72602017-04-12 Tom Tromey <tom@tromey.com>
7261
7262 * tracepoint.c (scope_info): Update.
7263 * spu-tdep.c (spu_catch_start): Update.
7264 * python/python.c (gdbpy_decode_line): Update.
7265 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7266 * python/py-breakpoint.c (bppy_init): Update.
7267 * probe.c (parse_probes): Update.
7268 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7269 * location.h (event_location_deleter): New struct.
7270 (event_location_up): New typedef.
7271 (new_linespec_location, new_address_location, new_probe_location)
7272 (new_explicit_location, copy_event_location)
7273 (string_to_event_location, string_to_event_location_basic)
7274 (string_to_explicit_location): Update return type.
7275 (make_cleanup_delete_event_location): Remove.
7276 * location.c (new_linespec_location, new_address_location)
7277 (new_probe_location, new_explicit_location, copy_event_location):
7278 Return event_location_up.
7279 (delete_event_location_cleanup)
7280 (make_cleanup_delete_event_location): Remove.
7281 (string_to_explicit_location, string_to_event_location_basic)
7282 (string_to_event_location): Return event_location_up.
7283 * linespec.c (canonicalize_linespec, event_location_to_sals)
7284 (decode_line_with_current_source)
7285 (decode_line_with_last_displayed, decode_objc): Update.
7286 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7287 * completer.c (location_completer): Update.
7288 * cli/cli-cmds.c (edit_command, list_command): Update.
7289 * breakpoint.c (create_overlay_event_breakpoint)
7290 (create_longjmp_master_breakpoint)
7291 (create_std_terminate_master_breakpoint)
7292 (create_exception_master_breakpoint)
7293 (create_thread_event_breakpoint): Update.
7294 (init_breakpoint_sal): Update. Remove some dead code.
7295 (create_breakpoint_sal): Change type of "location". Update.
7296 (create_breakpoints_sal, create_breakpoint, break_command_1)
7297 (dprintf_command, break_range_command, until_break_command)
7298 (init_ada_exception_breakpoint)
7299 (strace_marker_create_sals_from_location)
7300 (update_static_tracepoint, trace_command, ftrace_command)
7301 (strace_command, create_tracepoint_from_upload): Update.
7302 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7303 * ax-gdb.c (agent_command_1): Update.
7304
8f10c932
PA
73052017-04-12 Pedro Alves <palves@redhat.com>
7306
7307 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7308 * configure.tgt: Handle i[34567]86-*-go32* and
7309 i[34567]86-*-msdosdjgpp*.
7310 * i386-tdep.c (i386_svr4_reg_to_regnum):
7311 Make extern.
7312 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7313 i386-go32-tdep.c.
7314 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7315 * i386-go32-tdep.c: New file.
7316 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7317 declarations.
7318
0a31ccfb
SM
73192017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7320
7321 * aix-thread.c (pd_status2str): Change return type to const char *.
7322
e9bb3fbb
PA
73232017-04-12 Pedro Alves <palves@redhat.com>
7324
7325 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7326 calls to set_gdbarch_gnu_triplet_regexp.
7327
53375380
PA
73282017-04-12 Pedro Alves <palves@redhat.com>
7329
7330 PR gdb/21323
7331 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7332 New enum value.
7333 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7334 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7335 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7336 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7337 * gdbarch.h, gdbarch.c: Regenerate.
7338 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7339 gdbarch_wchar_bit and gdbarch_wchar_signed.
7340 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7341 * arm-tdep.c (arm_gdbarch_init): Likewise.
7342 * avr-tdep.c (avr_gdbarch_init): Likewise.
7343 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7344 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7345 * i386-tdep.c (i386_go32_init_abi): Likewise.
7346 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7347 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7348 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7349 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7350 * sh-tdep.c (sh_gdbarch_init): Likewise.
7351 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7352 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7353 * windows-tdep.c (windows_init_abi): Likewise.
7354 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7355
53e710ac
PA
73562017-04-12 Pedro Alves <palves@redhat.com>
7357
7358 PR c++/21323
7359 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7360 cplus_primitive_type_char32_t>: New enum values.
7361 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7362 and cplus_primitive_type_char32_t.
7363 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7364 32, use the archtecture's built-in type for char16_t and char32_t,
7365 respectively. Otherwise, fallback to init_integer_type as before,
7366 but make the type unsigned, and issue a complaint.
7367 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7368
ab0538b8
AH
73692017-04-12 Alan Hayward <alan.hayward@arm.com>
7370
5e0e0422 7371 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
7372 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7373
5430098f
SDJ
73742017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7375
7376 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7377 'const char *'.
7378
7c5ded6a
SDJ
73792017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7380
7381 * common/common-utils.c (free_vector_argv): New function.
7382 * common/common-utils.h: Include <vector>.
7383 (free_vector_argv): New prototype.
7384 * darwin-nat.c (darwin_create_inferior): Rewrite function
7385 prototype in order to constify "exec_file" and accept a
7386 "std::string" for "allargs".
7387 * fork-child.c: Include <vector>.
7388 (breakup_args): Rewrite function, using C++.
7389 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7390 and accept "std::string" for "allargs". Update the code to
7391 calculate "argv" based on "allargs". Update calls to "exec_fun"
7392 and "execvp".
7393 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7394 order to constify "exec_file" and accept a "std::string" for
7395 "allargs".
7396 * go32-nat.c (go32_create_inferior): Likewise.
7397 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7398 * infcmd.c (run_command_1): Constify "exec_file". Use
7399 "std::string" for inferior arguments.
7400 * inferior.h (fork_inferior): Update prototype.
7401 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7402 prototype in order to constify "exec_file" and accept a
7403 "std::string" for "allargs".
7404 * nto-procfs.c (procfs_create_inferior): Likewise.
7405 * procfs.c (procfs_create_inferior): Likewise.
7406 * remote-sim.c (gdbsim_create_inferior): Likewise.
7407 * remote.c (extended_remote_run): Update code to accept
7408 "std::string" as argument.
7409 (extended_remote_create_inferior): Rewrite function prototype in
7410 order to constify "exec_file" and accept a "std::string" for
7411 "allargs".
7412 * rs6000-nat.c (super_create_inferior): Likewise.
7413 (rs6000_create_inferior): Likewise.
7414 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7415 * windows-nat.c (windows_create_inferior): Likewise.
7416
ae0eee42
PA
74172017-04-11 Pedro Alves <palves@redhat.com>
7418
7419 * thread.c: Fix whitespace throughout.
7420
a6acac06
PR
74212017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7422
7423 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7424
64403bd1
AH
74252017-04-11 Alan Hayward <alan.hayward@arm.com>
7426
7427 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7428
a5bef50f
SDJ
74292017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7430
7431 PR gdb/21364
7432 * osdata.c (info_osdata): Check if 'type' is an empty string
7433 instead of NULL.
7434
9295a5a9
PA
74352017-04-10 Pedro Alves <palves@redhat.com>
7436
7437 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7438 (ptid_to_global_thread_id, in_thread_list)
7439 (do_captured_list_thread_ids, set_resumed, set_running)
7440 (set_executing, set_stop_requested, finish_thread_state)
7441 (validate_registers_access, can_access_registers_ptid)
7442 (print_thread_info_1, switch_to_thread)
7443 (do_restore_current_thread_cleanup)
7444 (make_cleanup_restore_current_thread, thread_command)
7445 (thread_name_command): Use operator== instead of ptid_equal.
7446
996812e3
PA
74472017-04-10 Pedro Alves <palves@redhat.com>
7448
7449 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7450 (current_thread_cleanup_chain): Delete.
7451 (restore_current_thread_cleanup_dtor)
7452 (make_cleanup_restore_current_thread): Remove references to
7453 current_thread_cleanup_chain.
7454
845b344f
AH
74552017-04-10 Alan Hayward <alan.hayward@arm.com>
7456
7457 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7458 REG_UNKNOWN.
7459
803bdfe4
YQ
74602017-04-10 Yao Qi <yao.qi@linaro.org>
7461
7462 PR gdb/19942
7463 * gdbthread.h (thread_info::deletable): New method.
7464 (thread_info::incref): New method.
7465 (thread_info::decref): New method.
7466 (thread_info::refcount): Move it to private.
7467 * infrun.c (save_stop_context): Call inc_refcount.
7468 (release_stop_context_cleanup): Likewise.
7469 * thread.c (set_thread_exited): New function.
7470 (init_thread_list): Delete "tp" only it is deletable, otherwise
7471 call set_thread_exited.
7472 (delete_thread_1): Call set_thread_exited.
7473 (current_thread_cleanup) <inferior_pid>: Remove.
7474 <thread>: New field.
7475 (restore_current_thread_ptid_changed): Removed.
7476 (do_restore_current_thread_cleanup): Adjust.
7477 (restore_current_thread_cleanup_dtor): Don't call
7478 find_thread_ptid.
7479 (set_thread_refcount): Use dec_refcount.
7480 (make_cleanup_restore_current_thread): Adjust.
7481 (thread_apply_all_command): Call inc_refcount.
7482 (_initialize_thread): Don't call
7483 observer_attach_thread_ptid_changed.
7484
8c25b497
YQ
74852017-04-10 Yao Qi <yao.qi@linaro.org>
7486
7487 * thread.c (delete_thread_1): Hoist code on marking thread as
7488 exited.
7489
8473b447
SM
74902017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7491
7492 * windows-nat.c (windows_detach): Initialize ptid with
7493 minus_one_ptid.
7494
6670ec13
SM
74952017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7496
7497 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7498
ba2f91bb
AH
74992017-04-07 Alan Hayward <alan.hayward@arm.com>
7500
7501 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7502 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7503 (bfin_pseudo_register_write): Likewise
7504
436252de
SM
75052017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7506
7507 * common/ptid.h (struct ptid): Change to...
7508 (class ptid_t): ... this.
7509 <ptid_t>: New constructors.
7510 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7511 matches>: New methods.
7512 <make_null, make_minus_one>: New static methods.
7513 <pid>: Rename to...
7514 <m_pid>: ...this.
7515 <lwp>: Rename to...
7516 <m_lwp>: ...this.
7517 <tid>: Rename to...
7518 <m_tid>: ...this.
7519 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7520 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7521 as references, move comment to class ptid_t.
7522 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7523 ptid_t static methods.
7524 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7525 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7526 Take ptid arguments as references, implement using ptid_t methods.
7527 * unittests/ptid-selftests.c: New file.
7528 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7529 unittests/ptid-selftests.c.
7530 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7531
0dedf377
TP
75322017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7533
7534 * python/python.c (python_run_simple_file): Cast mode literal to
7535 non-const char pointer as expected by PyFile_FromString.
7536
4e9868d4
SM
75372017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7538
7539 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7540 minus_one_ptid and null_ptid.
7541
9bf2a700
PA
75422017-04-05 Pedro Alves <palves@redhat.com>
7543
7544 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7545 * configure: Regenerate.
7546
a121b7c1
PA
75472017-04-05 Pedro Alves <palves@redhat.com>
7548
7549 * ada-exp.y (yyerror): Constify.
7550 * ada-lang.c (bound_name, get_selections)
7551 (ada_variant_discrim_type)
7552 (ada_variant_discrim_name, ada_value_struct_elt)
7553 (ada_lookup_struct_elt_type, is_unchecked_variant)
7554 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7555 (catch_ada_exception_command_split)
7556 (catch_ada_assert_command_split, catch_assert_command)
7557 (ada_op_name): Constify.
7558 * ada-lang.h (ada_yyerror, get_selections)
7559 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7560 * arc-tdep.c (arc_print_frame_cache): Constify.
7561 * arm-tdep.c (arm_skip_stub): Constify.
7562 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7563 (gen_aggregate_elt_ref): Constify.
7564 * bcache.c (print_bcache_statistics): Constify.
7565 * bcache.h (print_bcache_statistics): Constify.
7566 * break-catch-throw.c (catch_exception_command_1):
7567 * breakpoint.c (struct ep_type_description::description):
7568 Constify.
7569 (add_solib_catchpoint): Constify.
7570 (catch_fork_command_1): Add cast.
7571 (add_catch_command): Constify.
7572 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7573 Constify.
7574 * bsd-uthread.c (bsd_uthread_state): Constify.
7575 * buildsym.c (patch_subfile_names): Constify.
7576 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7577 Constify.
7578 * c-exp.y (yyerror): Constify.
7579 (token::oper): Constify.
7580 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7581 * c-varobj.c (cplus_describe_child): Constify.
7582 * charset.c (find_charset_names): Add cast.
7583 (find_charset_names): Constify array and add const_cast.
7584 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7585 (edit_command): Constify.
7586 * cli/cli-decode.c (lookup_cmd): Constify.
7587 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7588 Constify.
7589 (struct dump_context): Constify.
7590 (add_dump_command, restore_command): Constify.
7591 * cli/cli-script.c (get_command_line): Constify.
7592 * cli/cli-script.h (get_command_line): Constify.
7593 * cli/cli-utils.c (check_for_argument): Constify.
7594 * cli/cli-utils.h (check_for_argument): Constify.
7595 * coff-pe-read.c (struct read_pe_section_data): Constify.
7596 * command.h (lookup_cmd): Constify.
7597 * common/print-utils.c (decimal2str): Constify.
7598 * completer.c (gdb_print_filename): Constify.
7599 * corefile.c (set_gnutarget): Constify.
7600 * cp-name-parser.y (yyerror): Constify.
7601 * cp-valprint.c (cp_print_class_member): Constify.
7602 * cris-tdep.c (cris_register_name, crisv32_register_name):
7603 Constify.
7604 * d-exp.y (yyerror): Constify.
7605 (struct token::oper): Constify.
7606 * d-lang.h (d_yyerror): Constify.
7607 * dbxread.c (struct header_file_location::name): Constify.
7608 (add_old_header_file, add_new_header_file, last_function_name)
7609 (dbx_next_symbol_text, add_bincl_to_list)
7610 (find_corresponding_bincl_psymtab, set_namestring)
7611 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7612 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7613 * defs.h (command_line_input, print_address_symbolic)
7614 (deprecated_readline_begin_hook): Constify.
7615 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7616 Constify.
7617 * event-top.c (handle_line_of_input): Constify and add cast.
7618 * exceptions.c (catch_errors): Constify.
7619 * exceptions.h (catch_errors): Constify.
7620 * expprint.c (print_subexp_standard, op_string, op_name)
7621 (op_name_standard, dump_raw_expression, dump_raw_expression):
7622 * expression.h (op_name, op_string, dump_raw_expression):
7623 Constify.
7624 * f-exp.y (yyerror): Constify.
7625 (struct token::oper): Constify.
7626 (struct f77_boolean_val::name): Constify.
7627 * f-lang.c (f_word_break_characters): Constify.
7628 * f-lang.h (f_yyerror): Constify.
7629 * fork-child.c (fork_inferior): Add cast.
7630 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7631 (new_variant): Constify.
7632 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7633 * gdbarch.c: Regenerate.
7634 * gdbcore.h (set_gnutarget): Constify.
7635 * go-exp.y (yyerror): Constify.
7636 (token::oper): Constify.
7637 * go-lang.h (go_yyerror): Constify.
7638 * go32-nat.c (go32_sysinfo): Constify.
7639 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7640 * guile/scm-cmd.c (cmdscm_function): Constify.
7641 * guile/scm-param.c (pascm_param_value): Constify.
7642 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7643 (h8300sx_register_name): Constify.
7644 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7645 Constify.
7646 * ia64-tdep.c (ia64_register_names): Constify.
7647 * infcmd.c (construct_inferior_arguments): Constify.
7648 (path_command, attach_post_wait): Constify.
7649 * language.c (show_range_command, show_case_command)
7650 (unk_lang_error): Constify.
7651 * language.h (language_defn::la_error)
7652 (language_defn::la_name_of_this): Constify.
7653 * linespec.c (decode_line_2): Constify.
7654 * linux-thread-db.c (thread_db_err_str): Constify.
7655 * lm32-tdep.c (lm32_register_name): Constify.
7656 * m2-exp.y (yyerror): Constify.
7657 * m2-lang.h (m2_yyerror): Constify.
7658 * m32r-tdep.c (m32r_register_names): Constify and make static.
7659 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7660 * m88k-tdep.c (m88k_register_name): Constify.
7661 * macroexp.c (appendmem): Constify.
7662 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7663 (upgrade_type, parse_external, parse_partial_symbols)
7664 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7665 (new_symbol): Constify.
7666 * memattr.c (mem_info_command): Constify.
7667 * mep-tdep.c (register_name_from_keyword): Constify.
7668 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7669 Constify.
7670 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7671 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7672 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7673 cast.
7674 (mi_execute_async_cli_command): Constify.
7675 * mips-tdep.c (mips_register_name): Constify.
7676 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7677 (am33_register_name, am33_2_register_name)
7678 * moxie-tdep.c (moxie_register_names): Constify.
7679 * nat/linux-osdata.c (osdata_type): Constify fields.
7680 * nto-tdep.c (nto_parse_redirection): Constify.
7681 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7682 (lookup_child_selector): Constify.
7683 (objc_methcall::name): Constify.
7684 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7685 (lookup_struct_typedef): Constify.
7686 * objfiles.c (pc_in_section): Constify.
7687 * objfiles.h (pc_in_section): Constify.
7688 * p-exp.y (struct token::oper): Constify.
7689 (yyerror): Constify.
7690 * p-lang.h (pascal_yyerror): Constify.
7691 * parser-defs.h (op_name_standard): Constify.
7692 (op_print::string): Constify.
7693 (exp_descriptor::op_name): Constify.
7694 * printcmd.c (print_address_symbolic): Constify.
7695 * psymtab.c (print_partial_symbols): Constify.
7696 * python/py-breakpoint.c (stop_func): Constify.
7697 (bppy_get_expression): Constify.
7698 * python/py-cmd.c (cmdpy_completer::name): Constify.
7699 (cmdpy_function): Constify.
7700 * python/py-event.c (evpy_add_attribute)
7701 (gdbpy_initialize_event_generic): Constify.
7702 * python/py-event.h (evpy_add_attribute)
7703 (gdbpy_initialize_event_generic): Constify.
7704 * python/py-evts.c (add_new_registry): Constify.
7705 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7706 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7707 * python/py-inferior.c (get_buffer): Add cast.
7708 * python/py-param.c (parm_constant::name): Constify.
7709 * python/py-unwind.c (fprint_frame_id): Constify.
7710 * python/python.c (gdbpy_parameter_value): Constify.
7711 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7712 * remote.c (memory_packet_config::name): Constify.
7713 (show_packet_config_cmd, remote_write_bytes)
7714 (remote_buffer_add_string):
7715 * reverse.c (exec_reverse_once): Constify.
7716 * rs6000-tdep.c (variant::name, variant::description): Constify.
7717 * rust-exp.y (rustyyerror): Constify.
7718 * rust-lang.c (rust_op_name): Constify.
7719 * rust-lang.h (rustyyerror): Constify.
7720 * serial.h (serial_ops::name): Constify.
7721 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7722 (sh_sh3e_register_name, sh_sh2e_register_name)
7723 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7724 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7725 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7726 (sh_sh4al_dsp_register_name): Constify.
7727 * sh64-tdep.c (sh64_register_name): Constify.
7728 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7729 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7730 * stabsread.c (patch_block_stabs, read_type_number)
7731 (ref_map::stabs, ref_add, process_reference)
7732 (symbol_reference_defined, define_symbol, define_symbol)
7733 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7734 (read_one_struct_field, read_struct_fields, read_baseclasses)
7735 (read_tilde_fields, read_struct_type, read_array_type)
7736 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7737 (read_huge_number, read_range_type, read_args, common_block_start)
7738 (find_name_end): Constify.
7739 * stabsread.h (common_block_start, define_symbol)
7740 (process_one_symbol, symbol_reference_defined, ref_add):
7741 * symfile.c (get_section_index, add_symbol_file_command):
7742 * symfile.h (get_section_index): Constify.
7743 * target-descriptions.c (tdesc_type::name): Constify.
7744 (tdesc_free_type): Add cast.
7745 * target.c (find_default_run_target):
7746 (add_deprecated_target_alias, find_default_run_target)
7747 (target_announce_detach): Constify.
7748 (do_option): Constify.
7749 * target.h (add_deprecated_target_alias): Constify.
7750 * thread.c (print_thread_info_1): Constify.
7751 * top.c (deprecated_readline_begin_hook, command_line_input):
7752 Constify.
7753 (init_main): Add casts.
7754 * top.h (handle_line_of_input): Constify.
7755 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7756 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7757 (tfind_command): Rename to ...
7758 (tfind_command_1): ... this and constify.
7759 (tfind_command): New function.
7760 (tfind_end_command, tfind_start_command): Adjust.
7761 (encode_source_string): Constify.
7762 * tracepoint.h (encode_source_string): Constify.
7763 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7764 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7765 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7766 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7767 * tui/tui-win.c (parse_scrolling_args): Constify.
7768 * tui/tui-windata.c (tui_erase_data_content): Constify.
7769 * tui/tui-windata.h (tui_erase_data_content): Constify.
7770 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7771 * tui/tui.c (tui_enable): Add cast.
7772 * utils.c (defaulted_query): Constify.
7773 (init_page_info): Add cast.
7774 (puts_debug, subset_compare): Constify.
7775 * utils.h (subset_compare): Constify.
7776 * varobj.c (varobj_format_string): Constify.
7777 * varobj.h (varobj_format_string): Constify.
7778 * vax-tdep.c (vax_register_name): Constify.
7779 * windows-nat.c (windows_detach): Constify.
7780 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7781 * xml-support.c (gdb_xml_end_element): Constify.
7782 * xml-tdesc.c (tdesc_start_reg): Constify.
7783 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7784 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7785 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7786
995816ba
PA
77872017-04-05 Pedro Alves <palves@redhat.com>
7788
7789 * proc-api.c (struct trans): Constify.
7790 (procfs_note): Constify.
7791 * proc-events.c (struct trans, syscall_table):
7792 * proc-flags.c (struct trans): Constify.
7793 * proc-utils.h (procfs_note): Constify.
7794 * proc-why.c (struct trans): Constify.
7795 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7796 (procfs_detach): Constify.
7797 * sol-thread.c (struct string_map): Constify.
7798 (td_err_string, td_state_string): Constify.
7799
3e83a920
PA
78002017-04-05 Pedro Alves <palves@redhat.com>
7801
7802 * proc-api.c (procfs_filename): Don't initialize
7803 procfs_filename.
7804 (prepare_to_trace): Assume procfs_filename is non-NULL.
7805 (_initialize_proc_api): Give procfs_filename a default value here.
7806
63160a43
PA
78072017-04-05 Pedro Alves <palves@redhat.com>
7808
7809 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7810 'cond_string' parameter.
7811 (extract_exception_regexp): Constify 'string' parameter.
7812 (catch_exception_command_1): Constify.
7813 * breakpoint.c (init_catchpoint)
7814 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7815 parameter.
7816 (ep_parse_optional_if_clause, catch_fork_command_1)
7817 (catch_exec_command_1): Constify.
7818 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7819 parameter.
7820 (ep_parse_optional_if_clause): Constify.
7821 * cli/cli-utils.c (remove_trailing_whitespace)
7822 (check_for_argument): Constify.
7823 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7824 non-const overload.
7825 (check_for_argument): Likewise.
7826
9b2eba3d
PA
78272017-04-05 Pedro Alves <palves@redhat.com>
7828
7829 * event-top.c (command_line_handler): Add cast to execute_command
7830 call.
7831 * record-btrace.c (cmd_record_btrace_bts_start)
7832 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7833 (cmd_record_btrace_start): Add cast to execute_command call.
7834 * record-full.c (record_full_goto_insn):
7835 * record.c (record_start, record_stop): Add cast to
7836 execute_command_to_string calls.
7837 (cmd_record_start): Add cast to execute_command calls.
7838
2adadf51
PA
78392017-04-05 Pedro Alves <palves@redhat.com>
7840
7841 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7842 static inline function.
7843 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7844 array and use gdb_PyArg_ParseTupleAndKeywords.
7845 * python/py-cmd.c (cmdpy_init): Likewise.
7846 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7847 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7848 (infpy_search_memory): Likewise.
7849 * python/py-objfile.c (objfpy_add_separate_debug_file)
7850 (gdbpy_lookup_objfile): Likewise.
7851 * python/py-symbol.c (gdbpy_lookup_symbol)
7852 (gdbpy_lookup_global_symbol): Likewise.
7853 * python/py-type.c (gdbpy_lookup_type): Likewise.
7854 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7855 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7856 Likewise.
7857
0d1f4ceb
PA
78582017-04-05 Pedro Alves <palves@redhat.com>
7859
7860 * python/python-internal.h (gdb_PyGetSetDef): New type.
7861 * python/py-block.c (block_object_getset)
7862 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7863 * python/py-event.c (event_object_getset)
7864 (finish_breakpoint_object_getset): Likewise.
7865 * python/py-inferior.c (inferior_object_getset): Likewise.
7866 * python/py-infthread.c (thread_object_getset): Likewise.
7867 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7868 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7869 * python/py-objfile.c (objfile_getset): Likewise.
7870 * python/py-progspace.c (pspace_getset): Likewise.
7871 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7872 Likewise.
7873 * python/py-record.c (recpy_record_getset): Likewise.
7874 * python/py-symbol.c (symbol_object_getset): Likewise.
7875 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7876 Likewise.
7877 * python/py-type.c (type_object_getset, field_object_getset):
7878 Likewise.
7879 * python/py-value.c (value_object_getset): Likewise.
7880
4d759979
PA
78812017-04-05 Pedro Alves <palves@redhat.com>
7882
7883 * python/python-internal.h (gdb_PyObject_CallMethod)
7884 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7885 New functions.
7886 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7887 (PySys_GetObject, PySys_SetPath): New macros.
7888
fdf9e36f
PA
78892017-04-05 Pedro Alves <palves@redhat.com>
7890
7891 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7892 info_osdata_command.
7893 * osdata.c (info_osdata_command): Rename to ...
7894 (info_osdata): ... this. Constify 'type' parameter, and remove
7895 the 'from_tty' parameter. Accept NULL TYPE.
7896 (info_osdata_command): New function.
7897 * osdata.h (info_osdata_command): Remove declaration.
7898 (info_osdata): New declaration.
7899
9f33b8b7
PA
79002017-04-05 Pedro Alves <palves@redhat.com>
7901
7902 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7903 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7904 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7905 parameter.
7906 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7907 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7908 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7909 parameter.
7910 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7911 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7912 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7913 (mi_cmd_file_list_exec_source_files)
7914 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7915 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7916 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7917 parameter.
7918 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7919 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7920 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7921 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7922 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7923 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7924 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7925 'command' parameter.
7926 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7927 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7928 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7929 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7930 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7931 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7932 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7933 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7934 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7935 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7936 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7937 parameter.
7938 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7939 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7940 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7941 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7942 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7943 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7944 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7945 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7946 (mi_cmd_data_list_changed_registers)
7947 (mi_cmd_data_write_register_values)
7948 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7949 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7950 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7951 (mi_cmd_list_features, mi_cmd_list_target_features)
7952 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7953 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7954 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7955 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7956 (mi_cmd_trace_frame_collected): Constify 'command'
7957 parameter.
7958 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7959 'command' parameter.
7960
67cb5b2d
PA
79612017-04-05 Pedro Alves <palves@redhat.com>
7962
7963 * ada-lang.c (ada_completer_word_break_characters): Now a const
7964 array.
7965 (ada_get_gdb_completer_word_break_characters): Constify.
7966 * completer.c (gdb_completer_command_word_break_characters)
7967 (gdb_completer_file_name_break_characters)
7968 (gdb_completer_quote_characters): Now const arrays.
7969 (get_gdb_completer_quote_characters): Constify.
7970 (set_rl_completer_word_break_characters): New function.
7971 (set_gdb_completion_word_break_characters)
7972 (complete_line_internal): Use it.
7973 * completer.h (get_gdb_completer_quote_characters): Constify.
7974 (set_rl_completer_word_break_characters): Declare.
7975 * f-lang.c (f_word_break_characters): Constify.
7976 * language.c (default_word_break_characters): Constify.
7977 * language.h (language_defn::la_word_break_characters): Constify.
7978 (default_word_break_characters): Constify.
7979 * top.c (init_main): Use set_rl_completer_word_break_characters.
7980
7a114964
PA
79812017-04-05 Pedro Alves <palves@redhat.com>
7982
7983 * aix-thread.c (aix_thread_pid_to_str)
7984 (aix_thread_extra_thread_info): Constify.
7985 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7986 * bsd-uthread.c (bsd_uthread_extra_thread_info)
7987 (bsd_uthread_pid_to_str): Constify.
7988 * corelow.c (core_pid_to_str): Constify.
7989 * darwin-nat.c (darwin_pid_to_str): Constify.
7990 * fbsd-nat.c (fbsd_pid_to_str): Constify.
7991 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7992 Constify.
7993 * gnu-nat.c (gnu_pid_to_str): Constify.
7994 * go32-nat.c (go32_pid_to_str): Constify.
7995 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7996 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7997 * inferior.c (inferior_pid_to_str): Constify.
7998 * linux-nat.c (linux_nat_pid_to_str): Constify.
7999 * linux-tdep.c (linux_core_pid_to_str): Constify.
8000 * linux-thread-db.c (thread_db_pid_to_str)
8001 (thread_db_extra_thread_info): Constify.
8002 * nto-tdep.c (nto_extra_thread_info): Constify.
8003 * nto-tdep.h (nto_extra_thread_info): Constify.
8004 * obsd-nat.c (obsd_pid_to_str): Constify.
8005 * procfs.c (procfs_pid_to_str): Constify.
8006 * ravenscar-thread.c (ravenscar_extra_thread_info)
8007 (ravenscar_pid_to_str): Constify.
8008 * remote-sim.c (gdbsim_pid_to_str): Constify.
8009 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8010 Constify.
8011 * sol-thread.c (solaris_pid_to_str): Constify.
8012 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8013 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8014 * target.c (default_pid_to_str, target_pid_to_str)
8015 (normal_pid_to_str, default_pid_to_str): Constify.
8016 * target.h (target_ops::to_pid_to_str)
8017 (target_ops::to_extra_thread_info): Constify.
8018 (target_pid_to_str, normal_pid_to_str): Constify.
8019 * windows-nat.c (windows_pid_to_str): Constify.
8020 * gdbarch.sh (core_pid_to_str): Constify.
8021 * target-delegates.c: Regenerate.
8022 * gdbarch.h, gdbarch.c: Regenerate.
8023
69bbf465
PA
80242017-04-05 Pedro Alves <palves@redhat.com>
8025
8026 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8027 the memory of the temporary warning_pre_print override.
8028 * utils.c (warning_pre_print): Constify.
8029 * utils.h (warning_pre_print): Constify.
8030
be47f9e8
PA
80312017-04-05 Pedro Alves <palves@redhat.com>
8032
8033 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8034 (shell_command): New function.
8035 (make_command): Use std::string.
8036 (init_cli_cmds): Register shell_command instead of shell_escape.
8037
bde6261a
PA
80382017-04-05 Pedro Alves <palves@redhat.com>
8039
8040 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8041 * tracepoint.c (default_collect): Don't initialize.
8042
b38ef47f
PA
80432017-04-05 Pedro Alves <palves@redhat.com>
8044
8045 * macroexp.c (macro_buffer::shared): Now a bool.
8046 (init_buffer): Update.
8047 (init_shared_buffer): Constify 'addr' parameter.
8048 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8049 casts.
8050
f995bbe8
PA
80512017-04-05 Pedro Alves <palves@redhat.com>
8052
8053 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8054 * disasm.c (set_disassembler_options): Constify local.
8055 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8056
4a596fe2
SDJ
80572017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8058
8059 PR gdb/21352
8060 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8061 option.
8062
2cad08ea
YQ
80632017-04-05 Yao Qi <yao.qi@linaro.org>
8064
8065 * frame.c (frame_unwind_register_unsigned): Call
8066 frame_unwind_register_value.
8067
55a98976
YQ
80682017-04-05 Yao Qi <yao.qi@linaro.org>
8069
8070 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8071 Use gdb_test_multiple, and don't match anchor.
8072
4ac40124
PA
80732017-04-05 Pedro Alves <palves@redhat.com>
8074
8075 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8076 (Write After Approval): Remove Simon Marchi.
8077
c053b654
PA
80782017-04-05 Pedro Alves <palves@redhat.com>
8079
8080 * common/gdb_optional.h (optional::optional): Make constexpr and
8081 initialize m_dummy.
8082
4c7bf4f9
JB
80832017-04-04 John Baldwin <jhb@FreeBSD.org>
8084
8085 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8086 (amd64fbsd_jmp_buf_reg_offset): Remove.
8087 (amd64fbsd_supply_uthread): Remove function.
8088 (amd64fbsd_collect_uthread): Remove function.
8089 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8090 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8091 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8092 (fbsd-nat.c): Update comment.
8093 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8094 (i386fbsd_jmp_buf_reg_offset): Remove.
8095 (i386fbsd_supply_uthread): Remove function.
8096 (i386fbsd_collect_uthread): Remove function.
8097 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8098
1e1a8bef
JB
80992017-04-04 John Baldwin <jhb@FreeBSD.org>
8100
8101 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8102 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8103 * NEWS: Mention that support for FreeBSD/alpha was removed.
8104 * alpha-fbsd-tdep.c: Delete file.
8105 * config/alpha/fbsd.mh: Delete file.
8106 * configure.host: Delete alpha*-*-freebsd* and
8107 alpha*-*-kfreebsd*-gnu.
8108 * configure.tgt: Delete alpha*-*-freebsd* and
8109 alpha*-*-kfreebsd*-gnu.
8110
49907934
JB
81112017-04-04 John Baldwin <jhb@FreeBSD.org>
8112
8113 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8114 amd64bsd_store_inferior_registers): Use ptid from regcache.
8115
6f77053d
PA
81162017-04-04 Pedro Alves <palves@redhat.com>
8117
8118 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8119 data fields, make them private and add "m_" prefixes.
8120 (lnp_state_machine::lnp_state_machine): New ctor.
8121 (record_line, check_line_address, handle_set_discriminator)
8122 (handle_set_address, handle_advance_pc, handle_special_opcode)
8123 (handle_advance_line, handle_set_file, handle_negate_stmt)
8124 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8125 (end_sequence, advance_line): New methods.
8126 (m_gdbarch, m_record_lines_p): New fields.
8127 (lnp_reader_state): Delete.
8128 (dwarf_record_line): Rename to ...
8129 (lnp_state_machine::record_line): ... adjust.
8130 (init_lnp_state_machine): Delete.
8131 (lnp_state_machine::lnp_state_machine): New.
8132 (check_line_address): Rename to ...
8133 (lnp_state_machine::check_line_address): This.
8134 (dwarf_decode_lines_1): Remove reference to "reader_state".
8135 Adjust lnp_state_machine having a non-default ctor. Use bool.
8136 State machine internal state manipulation moved to
8137 lnp_state_machine methods.
8138
9c541725
PA
81392017-04-04 Pedro Alves <palves@redhat.com>
8140
8141 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8142 unittests/offset-type-selftests.c.
8143 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8144 * common/offset-type.h: New file.
8145 * common/preprocessor.h: New file.
8146 * common/traits.h: New file.
8147 * common/valid-expr.h: New file.
8148 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8149 sect_offset and cu_offset strong typedefs throughout.
8150 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8151 typedefs throughout.
8152 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8153 sect_offset and cu_offset strong typedefs throughout.
8154 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8155 typedefs throughout.
8156 * gdbtypes.h: Include "common/offset-type.h".
8157 (cu_offset): Now an offset type (strong typedef) instead of a
8158 struct.
8159 (sect_offset): Likewise.
8160 (union call_site_parameter_u): Rename "param_offset" field to
8161 "param_cu_off".
8162 * unittests/offset-type-selftests.c: New file.
8163
ecfb656c
PA
81642017-04-04 Pedro Alves <palves@redhat.com>
8165
8166 * common/underlying.h: New file.
8167 * dwarf2read.c: Include "common/gdb_optional.h" and
8168 "common/underlying.h".
8169 (dir_index, file_name_index): New types.
8170 (file_entry): Use them.
8171 (file_entry::include): Use to_underlying.
8172 (line_header::add_file_name): Use dir_index.
8173 (read_formatted_entries): Use gdb::optional. Read form before
8174 writting to file_entry.
8175 (dwarf_decode_line_header): Use dir_index.
8176 (lnp_state_machine::current_file): Use to_underlying.
8177 (lnp_state_machine::file): Change type to file_name_index.
8178 (dwarf_record_line): Use to_underlying.
8179 (init_lnp_state_machine): Use file_name_index.
8180 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8181
d194f1fe
PA
81822017-04-04 Pedro Alves <palves@redhat.com>
8183
8184 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8185 operator bool, has_value and get methods.
8186
fff8551c
PA
81872017-04-04 Pedro Alves <palves@redhat.com>
8188
8189 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8190 fields.
8191 (line_header): Initialize all data fields. Change type of
8192 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8193 Change type of include_dirs to std::vector<const char *>. Remove
8194 num_include_dirs, include_dirs_size. Change type of file_names to
8195 std::vector<file_entry>. Remove num_file_names, file_names_size.
8196 (line_header::line_header): New.
8197 (line_header::add_include_dir, line_header::add_file_name): New
8198 methods.
8199 (line_header::include_dir_at): Remove NULL check.
8200 (line_header::file_name_at): Add const overload.
8201 (line_header_up): New unique_ptr typedef.
8202 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8203 std::vector. Remove free_line_header call.
8204 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8205 free_line_header call.
8206 (free_cu_line_header): Delete.
8207 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8208 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8209 Adjust to use std::vector.
8210 (free_line_header): Delete.
8211 (free_line_header_voidp): Use delete.
8212 (add_include_dir): Replace with ...
8213 (line_header::add_include_dir): ... this method. Use std::vector.
8214 (add_file_name): Replace with ...
8215 (line_header::add_file_name): ... this method. Use std::vector.
8216 (add_include_dir_stub): Delete.
8217 (read_formatted_entries): Remove memset.
8218 (dwarf_decode_line_header): Return a line_header_up instead of a
8219 raw pointer. Remove cleanup handling. Pass lambdas to
8220 read_formatted_entries. Adjust to use line_header methods.
8221 (dwarf_decode_lines_1): Adjust to use line_header methods.
8222 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8223 use std::vector.
8224
d62a8ae2
SM
82252017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8226
8227 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8228 instead of struct ptid.
8229
db3a1dc7
AH
82302017-05-04 Alan Hayward <alan.hayward@arm.com>
8231
8232 * frame.c (get_frame_register_bytes): Unwind using value.
8233 (put_frame_register_bytes): Likewise.
8234
b1b45502
IB
82352017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8236
8237 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8238 aggregate-like.
8239
ec13808e
JK
82402017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8241
8242 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8243
12316564
YQ
82442017-03-29 Yao Qi <yao.qi@linaro.org>
8245
8246 * gdbthread.h (struct thread_info): Declare constructor and
8247 destructor. Add some in-class member initializers.
8248 * thread.c (free_thread): Remove.
8249 (init_thread_list): Call delete instead of free_thread.
8250 (new_thread): Call thread_info constructor.
8251 (thread_info::thread_info): New function.
8252 (thread_info::~thread_info): New function.
8253 (delete_thread_1): Call delete instead of free_thread.
8254 (make_cleanup_restore_current_thread): Move tp and frame to
8255 inner block.
8256
fe5f7374
AK
82572017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8258
8259 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8260 (arc_skip_prologue): Likewise.
8261 (arc_make_frame_cache): Likewise.
8262 (arc_pv_get_operand): New function.
8263 (arc_is_in_prologue): Likewise.
8264 (arc_analyze_prologue): Likewise.
8265 (arc_print_frame_cache): Likewise.
8266 (MAX_PROLOGUE_LENGTH): New constant.
8267
eea78757
AK
82682017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8269
8270 * configure.tgt: Add arc-insn.o.
8271 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8272 (dump_arc_instruction_command): New function.
8273 (arc_fprintf_disasm): Likewise.
8274 (arc_disassemble_info): Likewise.
8275 (arc_insn_get_operand_value): Likewise.
8276 (arc_insn_get_operand_value_signed): Likewise.
8277 (arc_insn_get_memory_base_reg): Likewise.
8278 (arc_insn_get_memory_offset): Likewise.
8279 (arc_insn_get_branch_target): Likewise.
8280 (arc_insn_dump): Likewise.
8281 (arc_insn_get_linear_next_pc): Likewise.
8282 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8283 (arc_disassemble_info): Likewise.
8284 (arc_insn_get_branch_target): Likewise.
8285 (arc_insn_get_linear_next_pc): Likewise.
8286 * NEWS: Mention new "maint print arc arc-instruction".
8287
3be78afd
AK
82882017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8289
8290 * arc-tdep (maintenance_print_arc_list): New variable.
8291 (maintenance_print_arc_command): New function.
8292
296ec4fa
AK
82932017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8294
8295 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8296 Add "limm" and "reserved".
8297 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8298 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8299 * arc-tdep.h (arc_regnum): Likewise.
8300
f74f865e
MF
83012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8302
8303 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8304 for THREADPTR register.
8305 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8306 register.
8307 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8308 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8309 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8310
0d0bf81a
MF
83112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8312
8313 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8314 registers above gdbarch_num_regs (gdbarch) as privileged in
8315 call0 ABI.
8316
0ce4291e
MF
83172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8318
8319 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8320 for a single specified register or for all registers in
8321 a0_base..a0_base + C0_NREGS range.
8322 (supply_gregset_reg): Call regcache_raw_supply for a single
8323 specified register or for all registers in a0_base..a0_base +
8324 C0_NREGS range.
8325
c56054f9
MF
83262017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8327
8328 * arch/xtensa.h (C0_NREGS): Add definition.
8329 * xtensa-tdep.c (C0_NREGS): Remove definition.
8330
a4398628
MF
83312017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8332
8333 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8334 Drop xtensa_default_isa initialization.
8335 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8336
8c43009f
PA
83372017-03-27 Pedro Alves <palves@redhat.com>
8338
8339 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8340 (file_entry::include_dir): New method.
8341 (line_header::include_dir_at, line_header::file_name_at): New
8342 methods.
8343 (setup_type_unit_groups, setup_type_unit_groups)
8344 (psymtab_include_file_name): Simplify using the new methods.
8345 (lnp_state_machine) <the_line_header>: New field.
8346 <file>: Add comment.
8347 (lnp_state_machine::current_file): New method.
8348 (dwarf_record_line): Simplify using the new methods.
8349 (init_lnp_state_machine): Initialize the "the_line_header" field.
8350 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8351 Simplify using the new methods.
8352
a7e80b9e
PA
83532017-03-27 Pedro Alves <palves@redhat.com>
8354
8355 * cp-name-parser.y (make_empty): Delete.
8356 (demangler_special, nested_name, ptr_operator, array_indicator)
8357 (direct_declarator, declarator_1): Use fill_comp instead of
8358 make_empty.
8359
21047726
PA
83602017-03-27 Pedro Alves <palves@redhat.com>
8361
8362 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8363 to ATTRIBUTE_PRINTF.
8364 * solib-target.c (library_list_start_list): Print "string" not
8365 "version".
8366 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8367 gdb_xml_error call.
8368
d721ba37
PA
83692017-03-27 Pedro Alves <palves@redhat.com>
8370
8371 * dwarf2read.c (struct file_and_directory): New.
8372 (dwarf2_get_dwz_file): Adjust to use std::string.
8373 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8374 (find_file_and_directory): Adjust to return a file_and_directory
8375 object.
8376 (read_file_scope): Adjust to use file_and_directory. Remove
8377 make_cleanup/do_cleanups calls.
8378 (open_and_init_dwp_file): Adjust to use std::string. Remove
8379 make_cleanup/do_cleanups calls.
8380 * python/python.c (do_start_initialization): Adjust to ldirname
8381 returning a std::string.
8382 * utils.c (ldirname): Now returns a std::string.
8383 * utils.h (ldirname): Change return type to std::string.
8384 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8385 returning a std::string.
8386 * xml-tdesc.c (file_read_description_xml): Likewise.
8387
ed771251
AH
83882017-03-24 Alan Hayward <alan.hayward@arm.com>
8389
8390 * regcache.c (regcache_debug_print_register): New function.
8391 * regcache.h (regcache_debug_print_register): New declaration.
8392 * target.c (debug_print_register): Remove.
8393 (target_fetch_registers): Call regcache_debug_print_register.
8394 (target_store_registers): Likewise.
8395
568c1b9f
PB
83962017-03-24 Pádraig Brady <pbrady@fb.com>
8397
8398 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8399 reference beyond the 'lh->include_dirs' array before accessing to
8400 it.
8401 (psymtab_include_file_name): Likewise.
8402 (dwarf_decode_lines_1): Likewise.
8403 (dwarf_decode_lines): Likewise.
8404 (file_file_name): Likewise.
8405
3e00d44f
SM
84062017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8407
8408 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8409 inferior_ptid.
8410 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8411 ps_lsetfpregs): Likewise.
8412 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8413 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8414 ps_lsetfpregs): Likewise.
8415 * target.c (target_fetch_registers, target_store_registers):
8416 Remove asserts.
8417
077ae656
AH
84182017-03-23 Alan Hayward <alan.hayward@arm.com>
8419
8420 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8421
1e2b521d
YQ
84222017-03-23 Yao Qi <yao.qi@linaro.org>
8423
8424 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8425 (_initialize_aarch64_tdep): Register it.
8426 (aarch64_record_load_store): Handle PRFM instruction.
8427 (aarch64_process_record_test): New function.
8428
33877125
YQ
84292017-03-23 Yao Qi <yao.qi@linaro.org>
8430
8431 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8432 indentation.
8433
a0eef940
YQ
84342017-03-23 Yao Qi <yao.qi@linaro.org>
8435
8436 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8437
3f2a3564
PR
84382017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8439
8440 python/python.c (do_start_initialization): Fix memory leak.
8441
b67aeab0
SM
84422017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8443
8444 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8445 using get_ptrace_pid.
8446 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8447 inferior_ptid.
8448 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8449 inferior_ptid instead of pid.
8450
ffdbe864
YQ
84512017-03-22 Yao Qi <yao.qi@linaro.org>
8452
8453 * aarch64-tdep.c: Wrap locally used classes in anonymous
8454 namespace.
8455 * arm-tdep.c: Likewise.
8456 * linespec.c: Likewise.
8457 * ui-out.c: Likewise.
8458
9d736fbf
JG
84592017-03-22 Jonah Graham <jonah@kichwacoders.com>
8460
8461 PR gdb/19637
8462 * python/lib/gdb/printer/bound_registers.py: Import sys.
8463
3de88e9a
SM
84642017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8465
8466 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8467 windows_thread_info parameter and use it instead of
8468 current_thread.
8469 (windows_fetch_inferior_registers): Don't set current_thread,
8470 pass the thread to do_windows_fetch_inferior_registers. Use
8471 ptid from regcache instead of inferior_ptid.
8472 (do_windows_store_inferior_registers): Add windows_thread_info
8473 parameter and use it instead of current_thread.
8474 (windows_store_inferior_registers): Don't set current_thread,
8475 pass the thread to do_windows_store_inferior_registers. Use
8476 ptid from regcache instead of inferior_ptid.
8477
0e7b8f61
SM
84782017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8479
8480 * ser-mingw.c (ser_windows_raw): Remove reference to
8481 struct serial::current_timeout.
8482
5badf10a
IR
84832017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8484
8485 PR tdep/20928
8486 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8487 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8488 (sparc64_fsr_type): Fix %fsr decoding.
8489
cee59b3f
TW
84902017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8491
8492 * python/py-record-btrace.c (btpy_insn_data): Change return type
8493 for Python 2.
8494
639a9038
SM
84952017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8496
8497 * spu-linux-nat.c (spu_fetch_inferior_registers,
8498 spu_store_inferior_registers): Use ptid from regcache, set and
8499 restore inferior_ptid.
8500 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8501 Likewise.
8502
bcc0c096
SM
85032017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8504
8505 * i386-linux-nat.c (fetch_register, store_register,
8506 i386_linux_fetch_inferior_registers,
8507 i386_linux_store_inferior_registers): Use ptid from regcache.
8508 * ia64-linux-nat.c (ia64_linux_fetch_register,
8509 ia64_linux_store_register): Likewise.
8510 * inf-ptrace.c (inf_ptrace_fetch_register,
8511 inf_ptrace_store_register): Likewise.
8512 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8513 m32r_linux_store_inferior_registers): Likewise.
8514 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8515 m68kbsd_store_inferior_registers): Likewise.
8516 * m68k-linux-nat.c (fetch_register, store_register,
8517 m68k_linux_fetch_inferior_registers,
8518 m68k_linux_store_inferior_registers): Likewise.
8519 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8520 m88kbsd_store_inferior_registers): Likewise.
8521 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8522 mips_fbsd_store_inferior_registers): Likewise.
8523 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8524 mips64_linux_regsets_store_registers): Likewise.
8525 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8526 mipsnbsd_store_inferior_registers): Likewise.
8527 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8528 mips64obsd_store_inferior_registers): Likewise.
8529 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8530 Likewise.
8531 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8532 ppcfbsd_store_inferior_registers): Likewise.
8533 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8534 ppc_linux_store_inferior_registers): Likewise.
8535 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8536 ppcnbsd_store_inferior_registers): Likewise.
8537 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8538 ppcobsd_store_registers): Likewise.
8539 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8540 Likewise.
8541 * ravenscar-thread.c (ravenscar_fetch_registers,
8542 ravenscar_store_registers, ravenscar_prepare_to_store):
8543 Likewise.
8544 * record-btrace.c (record_btrace_fetch_registers,
8545 record_btrace_store_registers, record_btrace_prepare_to_store):
8546 Likewise.
8547 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8548 Lookup inferior using ptid from regcache, instead of
8549 current_inferior.
8550 * remote.c (remote_fetch_registers, remote_store_registers): Use
8551 ptid from regcache.
8552 * rs6000-nat.c (fetch_register, store_register): Likewise.
8553 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8554 s390_linux_store_inferior_registers): Likewise.
8555 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8556 shnbsd_store_inferior_registers): Likewise.
8557 * sol-thread.c (sol_thread_fetch_registers,
8558 sol_thread_store_registers): Likewise.
8559 * sparc-nat.c (sparc_fetch_inferior_registers,
8560 sparc_store_inferior_registers): Likewise.
8561 * tilegx-linux-nat.c (fetch_inferior_registers,
8562 store_inferior_registers): Likewise.
8563 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8564 vaxbsd_store_inferior_registers): Likewise.
8565 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8566 store_xtregs): Likewise.
8567
c0f55cc6
AV
85682017-03-20 Artemiy Volkov <artemiyv@acm.org>
8569
8570 PR gdb/14441
8571 * NEWS: Mention support for rvalue references in GDB and python.
8572 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8573 supports both lvalue and rvalue references.
8574
15c0a2a9
AV
85752017-03-20 Artemiy Volkov <artemiyv@acm.org>
8576
8577 PR gdb/14441
8578 * gdbtypes.c (rank_one_type): Implement overloading
8579 resolution rules regarding rvalue references.
8580
aa006118
AV
85812017-03-20 Artemiy Volkov <artemiyv@acm.org>
8582
8583 PR gdb/14441
8584 * aarch64-tdep.c (aarch64_type_align)
8585 (aarch64_extract_return_value, aarch64_store_return_value): Change
8586 lvalue reference type checks to general reference type checks.
8587 * amd64-tdep.c (amd64_classify): Likewise.
8588 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8589 Likewise.
8590 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8591 (arm_store_return_value): Likewise.
8592 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8593 * c-typeprint.c (c_print_type): Likewise.
8594 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8595 (cplus_number_of_children, cplus_describe_child): Likewise.
8596 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8597 * completer.c (expression_completer): Likewise.
8598 * cp-support.c (make_symbol_overload_list_adl_namespace):
8599 Likewise.
8600 * darwin-nat-info.c (info_mach_region_command): Likewise.
8601 * dwarf2loc.c (entry_data_value_coerce_ref)
8602 (value_of_dwarf_reg_entry): Likewise.
8603 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8604 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8605 Likewise.
8606 * findvar.c (extract_typed_address, store_typed_address):
8607 Likewise.
8608 * gdbtypes.c (rank_one_type): Likewise.
8609 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8610 * infcall.c (value_arg_coerce): Likewise.
8611 * language.c (pointer_type): Likewise.
8612 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8613 Likewise.
8614 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8615 * mn10300-tdep.c (mn10300_type_align): Likewise.
8616 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8617 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8618 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8619 Likewise.
8620 * printcmd.c (print_formatted, x_command): Likewise.
8621 * python/py-type.c (typy_get_composite, typy_template_argument):
8622 Likewise.
8623 * python/py-value.c (valpy_referenced_value)
8624 (valpy_get_dynamic_type, value_has_field): Likewise.
8625 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8626 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8627 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8628 * spu-tdep.c (spu_scalar_value_p): Likewise.
8629 * symtab.c (lookup_symbol_aux): Likewise.
8630 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8631 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8632 Likewise.
8633 * valops.c (value_cast_pointers, value_cast)
8634 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8635 (value_struct_elt, value_struct_elt_bitpos)
8636 (value_find_oload_method_list, find_overload_match)
8637 (value_rtti_indirect_type): Likewise.
8638 * valprint.c (val_print_scalar_type_p, generic_val_print):
8639 Likewise.
8640 * value.c (value_actual_type, value_as_address, unpack_long)
8641 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8642 (coerce_ref): Likewise.
8643 * varobj.c (varobj_get_value_type): Likewise.
8644
3fcf899d
AV
86452017-03-20 Artemiy Volkov <artemiyv@acm.org>
8646
8647 PR gdb/14441
8648 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8649 table of constants.
8650 * python/lib/gdb/command/explore.py: Support exploring values
8651 of rvalue reference types.
8652 * python/lib/gdb/types.py: Implement get_basic_type() for
8653 rvalue reference types.
8654 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8655 constant.
8656 * python/py-value.c (valpy_getitem): Add an rvalue reference
8657 check.
8658 (valpy_reference_value): Add new parameter "refcode".
8659 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8660 New wrappers for valpy_reference_value().
8661 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8662 (gdbpy_invoke_xmethod): Likewise.
8663
4297a3f0
AV
86642017-03-20 Artemiy Volkov <artemiyv@acm.org>
8665
8666 PR gdb/14441
8667 * dwarf2read.c (process_die, read_type_die_1): Handle the
8668 DW_TAG_rvalue_reference_type DIE.
8669 (read_tag_reference_type): Add new parameter "refcode".
8670
e1cb3213
AV
86712017-03-20 Artemiy Volkov <artemiyv@acm.org>
8672
8673 PR gdb/14441
8674 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8675 (c_type_print_modifier, c_type_print_varspec_suffix)
8676 (c_type_print_base): Support printing rvalue reference types.
8677 * c-valprint.c (c_val_print, c_value_print): Support printing
8678 rvalue reference values.
8679
e4347c89
AV
86802017-03-20 Artemiy Volkov <artemiyv@acm.org>
8681
8682 PR gdb/14441
8683 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8684 typename.
8685 * cp-support.c (replace_typedefs): Handle
8686 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8687 * python/py-type.c (typy_lookup_type): Likewise.
8688
53cc15f5
AV
86892017-03-20 Artemiy Volkov <artemiyv@acm.org>
8690
8691 PR gdb/14441
8692 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8693 * parse.c (insert_type): Change assert statement.
8694 (follow_types): Handle rvalue reference types.
8695 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8696 constant.
8697
a65cfae5
AV
86982017-03-20 Artemiy Volkov <artemiyv@acm.org>
8699
8700 PR gdb/14441
8701 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8702 value_ref() interface.
8703 * c-valprint.c (c_value_print): Likewise.
8704 * infcall.c (value_arg_coerce): Likewise.
8705 * python/py-value.c (valpy_reference_value): Likewise.
8706 * valops.c (value_cast, value_reinterpret_cast)
8707 (value_dynamic_cast, typecmp): Likewise.
8708 (value_ref): Parameterize by kind of return value reference type.
8709 * value.h (value_ref): Add new parameter "refcode".
8710
3b224330
AV
87112017-03-20 Artemiy Volkov <artemiyv@acm.org>
8712
8713 PR gdb/14441
8714 * dwarf2read.c (read_tag_reference_type): Use
8715 lookup_lvalue_reference_type() instead of lookup_reference_type().
8716 * eval.c (evaluate_subexp_standard): Likewise.
8717 * f-exp.y: Likewise.
8718 * gdbtypes.c (make_reference_type, lookup_reference_type):
8719 Generalize with rvalue reference types.
8720 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8721 convenience wrappers for lookup_reference_type().
8722 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8723 reference kind parameter.
8724 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8725 wrappers for lookup_reference_type().
8726 * guile/scm-type.c (gdbscm_type_reference): Use
8727 lookup_lvalue_reference_type() instead of lookup_reference_type().
8728 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8729 * parse.c (follow_types): Likewise.
8730 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8731 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8732 Likewise.
8733 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8734 (gdbpy_invoke_xmethod): Likewise.
8735 * stabsread.c: Provide extra argument to make_reference_type()
8736 call.
8737 * valops.c (value_ref, value_rtti_indirect_type): Use
8738 lookup_lvalue_reference_type() instead of lookup_reference_type().
8739
f9aeb8d4
AV
87402017-03-20 Artemiy Volkov <artemiyv@acm.org>
8741
8742 PR gdb/14441
8743 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8744 (TYPE_IS_REFERENCE): New macro.
8745 (struct type): Add rvalue_reference_type field.
8746 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8747
51457a05
MAL
87482017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8749
8750 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8751 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8752 New function definition.
8753 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8754 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8755 New function declaration.
8756 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8757 * mi/mi-interp.h: New file.
8758 * solib.c (info_sharedlibrary_command): Replace for loop with
8759 ALL_SO_LIBS macro
8760 * solib.h (update_solib_list): New function declaration.
8761 (so_list_head): Move macro.
8762 * solist.h (ALL_SO_LIBS): New macro.
8763
e696b3ad
MAL
87642017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8765
8766 * infcmd.c (post_create_inferior): Remove unused argument in
8767 call to solib_add.
8768 * remote.c (remote_start_remote): Likewise.
8769 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8770 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8771 (enable_break): Likewise.
8772 * solib.c (update_solib_list): Remove unused target argument
8773 and its documentation.
8774 (solib_add): Remove unused target argument. Remove unused
8775 argument in call to update_solib_list.
8776 (info_sharedlibrary_command): Remove unused argument in call
8777 to update_solib_list.
8778 (sharedlibrary_command): Remove unused argument in call to
8779 solib_add.
8780 (handle_solib_event): Likewise.
8781 (reload_shared_libraries): Likewise.
8782 * solib.h (solib_add): Remove unused target argument.
8783
dcb84eda
AA
87842017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8785
8786 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8787 (s390_displaced_step_fixup): Cover relative branches with the
8788 default fixup handling. This fixes lack of support for some
8789 relative branch instructions.
8790
d9cb6cdc
SM
87912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8792
8793 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8794 ptid from regcache.
8795
1afaf9f4
SM
87962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8797
8798 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8799 i386_darwin_store_inferior_registers): Use ptid from regcache.
8800
aac12e24
SM
88012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8802
8803 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8804 i386bsd_store_inferior_registers): Use ptid from regcache.
8805
bbe1eef1
SM
88062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8807
8808 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8809 hppaobsd_store_registers): Use ptid from regcache.
8810
10799020
SM
88112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8812
8813 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8814 hppanbsd_store_registers): Use ptid from regcache.
8815
00204cf7
SM
88162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8817
8818 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8819 from regcache. Use get_ptrace_pid.
8820
11a33714
SM
88212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8822
8823 * corelow.c (get_core_register_section): Use ptid from regcache,
8824 update doc.
8825
317cd492
SM
88262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8827
8828 * bsd-uthread.c (bsd_uthread_fetch_registers,
8829 bsd_uthread_store_registers): Use ptid from regcache, set and
8830 restore inferior_ptid.
8831
9ac8a7c2
SM
88322017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8833
8834 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8835 fetch_fp_regs, store_register, store_regs, store_fp_register,
8836 store_fp_regs): Use ptid from regcache.
8837
4ac4bb6a
SM
88382017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8839
8840 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8841 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8842 store_vfp_regs): Use ptid from regcache.
8843
9bcbdca8
PA
88442017-03-17 Pedro Alves <palves@redhat.com>
8845
8846 PR remote/21188
8847 * ser-base.c (ser_base_wait_for): Add comment.
8848 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8849 version.
8850 * ser-unix.c (hardwire_raw): Remove reference to
8851 scb->current_timeout.
8852 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8853 (hardwire_ops): Install ser_base_readchar instead of
8854 hardwire_readchar.
8855 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8856 Remove fields.
8857
7503099f
JG
88582017-03-17 Jonah Graham <jonah@kichwacoders.com>
8859
8860 PR gdb/19637
8861 * python/lib/gdb/printer/bound_registers.py: Add support for
8862 Python 3.
8863
7942e96e
AA
88642017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8865
8866 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8867 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8868 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8869 byte_offset to subobj_byte_offset. Fix the handling of
8870 DWARF_VALUE_STACK on big-endian targets when coming via an
8871 implicit pointer.
8872 (dwarf2_evaluate_loc_desc): Adjust call to
8873 dwarf2_evaluate_loc_desc_full.
8874 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8875 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8876
ba14f379
YQ
88772017-03-16 Yao Qi <yao.qi@linaro.org>
8878
8879 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8880 and REVSH instructions.
8881
b121eeb9
YQ
88822017-03-16 Yao Qi <yao.qi@linaro.org>
8883
8884 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8885 (arm_record_test): Declare.
8886 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8887 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8888 align with the manual.
8889 (thumb_record_misc): Adjust the code order to align with the
8890 manual.
8891 (thumb2_record_decode_insn_handler): Fix instruction matching.
8892 (instruction_reader_thumb): New class.
8893 (arm_record_test): New function.
8894
728a7913
YQ
88952017-03-16 Yao Qi <yao.qi@linaro.org>
8896
8897 * arm-tdep.c (abstract_memory_reader): New class.
8898 (instruction_reader): New class.
8899 (extract_arm_insn): Add argument 'reader'. Callers updated.
8900 (decode_insn): Likewise.
8901
34b43320
DE
89022017-03-16 Doug Evans <dje@google.com>
8903
a7c0469f
DE
8904 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8905 member. Change type of TYPE member to SCM. All uses updated.
8906 (lsscm_make_lazy_string_smob): Add assert.
8907 (lsscm_make_lazy_string): Flag bad length values.
8908 (lsscm_elt_type): New function.
8909 (gdbscm_lazy_string_to_value): Rewrite to use
8910 lsscm_safe_lazy_string_to_value.
8911 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8912 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8913 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8914 in incoming type.
8915 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8916 * guile/scm-type.c (tyscm_scm_to_type): New function.
8917
89182017-03-15 Doug Evans <dje@google.com>
8919
34b43320
DE
8920 PR python/17728, python/18439, python/18779
8921 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8922 member. Change type of TYPE member to PyObject *. All uses updated.
8923 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8924 (gdbpy_create_lazy_string_object): Flag bad length values.
8925 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8926 Handle typedefs in incoming type.
8927 (stpy_lazy_string_elt_type): New function.
8928 (gdbpy_extract_lazy_string): Call it.
8929 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8930 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8931 typedefs in incoming type.
8932
a3a5fecc
DE
89332017-03-16 Doug Evans <dje@google.com>
8934
8935 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8936 * guile/scm-type.c (tyscm_scm_to_type): New function.
8937
28f1c605
JW
89382017-03-16 Jiong Wang <jiong.wang@arm.com>
8939
8940 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8941 "ULONGEST" for "skip".
8942
87c336f6
AA
89432017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8944
8945 PR gdb/21220
8946 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8947 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8948 (inf_ptrace_peek_poke): ...here. New function. Now also loop
8949 over ptrace peek/poke until end of buffer or error.
8950
cf81cf60
SM
89512017-03-14 Simon Marchi <simon.marchi@ericsson.com>
8952
8953 * parse.c (length_of_subexp): Make static.
8954 * parser-defs.h (length_of_subexp): Remove.
8955
a379284a
AA
89562017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8957
8958 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8959 as well.
8960
8a6200ba
PA
89612017-03-14 Pedro Alves <palves@redhat.com>
8962
8963 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8964 (main): Use std::unique_ptr. Remove calls to
8965 cp_demangled_name_parse_free.
8966
f79ec206
SM
89672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8968
8969 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8970 alphabsd_store_inferior_registers): Use regcache->ptid instead
8971 of inferior_ptid.
8972
edb5fb00
SM
89732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8974
8975 * aix-thread.c (aix_thread_fetch_registers,
8976 aix_thread_store_registers): Use regcache->ptid instead of
8977 inferior_ptid.
8978
55119686
SM
89792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8980
8981 * aarch64-linux-nat.c (fetch_gregs_from_thread,
8982 store_gregs_to_thread, fetch_fpregs_from_thread,
8983 store_fpregs_to_thread): Use regcache->ptid instead of
8984 inferior_ptid.
8985
6a06fbb7
SM
89862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8987
8988 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8989 amd64_linux_fetch_inferior_registers): Use regcache->ptid
8990 instead of inferior_ptid.
8991
c6386875
SM
89922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8993
8994 * target.c (target_fetch_registers, target_store_registers): Add
8995 assert.
8996
ddaaf0fb
SM
89972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8998
8999 * regcache.h (regcache_get_ptid): New function.
9000 * regcache.c (regcache_get_ptid): New function.
9001
b9da89d1 90022017-03-13 Mark Wielaard <mark@klomp.org>
9003
9004 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9005
5f4d1085
KS
90062017-03-10 Keith Seitz <keiths@redhat.com>
9007
9008 PR c++/8218
9009 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9010
c65d6b55
PA
90112017-03-08 Pedro Alves <palves@redhat.com>
9012
9013 PR gdb/18360
9014 * infrun.c (start_step_over, do_target_resume, resume)
9015 (restart_threads): Assert we're not resuming a thread that is
9016 meant to be stopped.
9017 (infrun_thread_stop_requested_callback): Delete.
9018 (infrun_thread_stop_requested): If the thread is internally
9019 stopped, queue a pending stop event and clear the thread's
9020 inline-frame state.
9021 (handle_stop_requested): New function.
9022 (handle_syscall_event, handle_inferior_event_1): Use
9023 handle_stop_requested.
9024 (handle_stop_requested): New function.
9025 (handle_signal_stop): Set the thread's stop_signal here instead of
9026 at caller.
9027 (finish_step_over): Clear step over info unconditionally.
9028 (handle_signal_stop): If the user had interrupted the event
9029 thread, consider the stop a random signal.
9030 (handle_signal_stop) <signal arrived while stepping over
9031 breakpoint>: Don't restart threads here.
9032 (stop_waiting): Don't clear step-over info here.
9033
15c22686
PA
90342017-03-08 Pedro Alves <palves@redhat.com>
9035
9036 PR 21206
9037 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9038 goes to argument 2, not 1.
9039
6e5d74e7
PA
90402017-03-08 Pedro Alves <palves@redhat.com>
9041
9042 PR cli/21218
9043 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9044 display_gdb_prompt.
9045 (command_line_input): Add comment.
9046
9753a2f6
PA
90472017-03-08 Pedro Alves <palves@redhat.com>
9048
9049 PR tui/21216
9050 * tui/tui-file.c (tui_file::write): New.
9051 * tui/tui-file.h (tui_file): Override "write".
9052 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9053 factored out from ...
9054 (tui_puts): ... here.
9055 (tui_putc): Use them.
9056 (tui_write): New function.
9057 * tui/tui-io.h (tui_write): Declare.
9058
1672e0d9
SDJ
90592017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9060
9061 * Makefile.in (SFILES): Replace "environ.c" with
9062 "common/environ.c".
9063 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9064 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9065 to...
9066 * common/environ.c: ... here.
9067 * environ.h: Moved to...
9068 * common/environ.h: ... here.
9069
f7bb4e3a
PB
90702017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9071
9072 * gdbarch.sh (pstring_ptr): New static function.
9073 (gdbarch_disassembler_options): Use it.
9074 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9075 not valid_disassembler_option->name.
9076 * gdbarch.c: Regenerate.
9077
e45ced6c
PB
90782017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9079
9080 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9081
5f6fd321
PA
90822017-03-07 Pedro Alves <palves@redhat.com>
9083
9084 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9085
6dbb839a 90862017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9087
9088 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9089 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9090 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9091 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9092
d274ecf4
SM
90932017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9094
9095 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9096
df97be55
SM
90972017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9098
9099 * remote.c (remote_add_target_side_commands): Use range-based
9100 for loop.
9101
7d45f3df
YQ
91022017-03-03 Yao Qi <yao.qi@linaro.org>
9103
9104 PR gdb/21165
9105 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9106 value is lazy.
9107 * valprint.c (common_val_print): Likewise.
9108
65b48a81
PB
91092017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9110
9111 * NEWS: Mention new set/show disassembler-options commands.
9112 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9113 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9114 (prospective_options): New static variable.
9115 (gdb_disassembler::gdb_disassembler): Initialize
9116 m_di.disassembler_options.
9117 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9118 (get_disassembler_options): New function.
9119 (set_disassembler_options): Likewise.
9120 (set_disassembler_options_sfunc): Likewise.
9121 (show_disassembler_options_sfunc): Likewise.
9122 (disassembler_options_completer): Likewise.
9123 (_initialize_disasm): Likewise.
9124 * disasm.h (get_disassembler_options): New prototype.
9125 (set_disassembler_options): Likewise.
9126 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9127 (gdbarch_verify_disassembler_options): Likewise.
9128 * gdbarch.c: Regenerate.
9129 * gdbarch.h: Likewise.
9130 * arm-tdep.c (num_disassembly_options): Delete.
9131 (set_disassembly_style): Likewise.
9132 (arm_disassembler_options): New static variable.
9133 (set_disassembly_style_sfunc): Convert short style name into long
9134 option name. Call set_disassembler_options.
9135 (show_disassembly_style_sfunc): New function.
9136 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9137 set_gdbarch_verify_disassembler_options.
9138 (_initialize_arm_tdep): Delete regnames variable and update callers.
9139 (arm_disassembler_options): Initialize.
9140 (disasm_options): New variable.
9141 (num_disassembly_options): Rename from this...
9142 (num_disassembly_styles): ...to this. Compute by scanning through
9143 disasm_options.
9144 (valid_disassembly_styles): Initialize using disasm_options.
9145 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9146 set_arm_regname_option.
9147 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9148 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9149 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9150 set_gdbarch_verify_disassembler_options.
9151 * s390-tdep.c (s390_disassembler_options): New static variable.
9152 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9153 set_gdbarch_verify_disassembler_options.
9154
d538e36d
SM
91552017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9156
9157 * remote.c (remote_add_target_side_condition): Remove "struct"
9158 keyword from range-based for loop.
9159
83621223
SM
91602017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9161
9162 * remote.c (remote_add_target_side_condition): Use range-based
9163 for loop. Update comment.
9164
2123df0e
YQ
91652017-02-27 Yao Qi <yao.qi@linaro.org>
9166
9167 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9168
8e368124
AH
91692017-02-26 Alan Hayward <alan.hayward@arm.com>
9170
9171 * regcache.c (regcache_raw_update): New function.
9172 (regcache_raw_read): Move code to regcache_raw_update.
9173 * regcache.h (regcache_raw_update): New declaration.
9174 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9175
a49dd8dd
JK
91762017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9177
9178 * dwarf2read.c (create_debug_type_hash_table): Initialize
9179 header.signature and header.type_offset_in_tu.
9180
34e4bae9
PA
91812017-02-24 Pedro Alves <palves@redhat.com>
9182
9183 * symtab.c (make_file_symbol_completion_list_1): Use
9184 add_symtab_completions.
9185
b0e4b369
AH
91862017-02-24 Alan Hayward <alan.hayward@arm.com>
9187
9188 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9189
975c21ab
AH
91902017-02-24 Alan Hayward <alan.hayward@arm.com>
9191
9192 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9193 I386_MAX_REGISTER_SIZE.
9194 (i386_pseudo_register_write): Likewise.
9195 (i386_process_record): Likewise.
9196 * i387-tdep.c (i387_supply_xsave): Likewise.
9197 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9198 (store_register): Likewise.
9199
14bc53a8
PA
92002017-02-23 Pedro Alves <palves@redhat.com>
9201
9202 * ada-lang.c: Include "common/function-view.h".
9203 (ada_iterate_over_symbols): Adjust to use function_view as
9204 callback type.
9205 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9206 (ada_make_symbol_completion_list): Use a lambda.
9207 (ada_exc_search_name_matches): Delete.
9208 (name_matches_regex): New.
9209 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9210 * compile/compile-c-support.c: Include "common/function-view.h".
9211 (print_one_macro): Change prototype to accept a ui_file pointer.
9212 (write_macro_definitions): Use a lambda.
9213 * dwarf2read.c: Include "common/function-view.h".
9214 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9215 (dw2_expand_symtabs_matching): Adjust to use function_view as
9216 callback type.
9217 * language.h: Include "common/function-view.h".
9218 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9219 function_view as callback type.
9220 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9221 * linespec.c: Include "common/function-view.h".
9222 (collect_info::add_symbol): New method.
9223 (struct symbol_and_data_callback, iterate_inline_only, struct
9224 symbol_matcher_data, iterate_name_matcher): Delete.
9225 (iterate_over_all_matching_symtabs): Adjust to use function_view
9226 as callback type and lambdas.
9227 (iterate_over_file_blocks): Adjust to use function_view as
9228 callback type.
9229 (decode_compound_collector): Now a class with private fields.
9230 (decode_compound_collector::release_symbols): New method.
9231 (collect_one_symbol): Rename to...
9232 (decode_compound_collector::operator()): ... this and adjust.
9233 (lookup_prefix_sym): decode_compound_collector construction bits
9234 move to decode_compound_collector ctor. Pass the
9235 decode_compound_collector object directly as callback. Remove
9236 cleanups and use decode_compound_collector::release_symbols
9237 instead.
9238 (symtab_collector): Now a class with private fields.
9239 (symtab_collector::release_symtabs): New method.
9240 (add_symtabs_to_list): Rename to...
9241 (symtab_collector::operator()): ... this and adjust.
9242 (collect_symtabs_from_filename): symtab_collector construction
9243 bits move to symtab_collector ctor. Pass the symtab_collector
9244 object directly as callback. Remove cleanups and use
9245 symtab_collector::release_symtabs instead.
9246 (collect_symbols): Delete.
9247 (add_matching_symbols_to_info): Use lambdas.
9248 * macrocmd.c (print_macro_callback): Delete.
9249 (info_macro_command): Use a lambda.
9250 (info_macros_command): Pass print_macro_definition as callable
9251 directly.
9252 (print_one_macro): Remove 'ignore' parameter.
9253 (macro_list_command): Adjust.
9254 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9255 (macro_for_each_data::user_data): Delete field.
9256 (foreach_macro): Adjust to call the function_view.
9257 (macro_for_each): Adjust to use function_view as callback type.
9258 (foreach_macro_in_scope): Adjust to call the function_view.
9259 (macro_for_each_in_scope): Adjust to use function_view as callback
9260 type.
9261 * macrotab.h: Include "common/function-view.h".
9262 (macro_callback_fn): Declare a prototype instead of a pointer.
9263 Remove "user_data" parameter.
9264 (macro_for_each, macro_for_each_in_scope): Adjust to use
9265 function_view as callback type.
9266 * psymtab.c (partial_map_expand_apply)
9267 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9268 Adjust to use function_view as callback type and to return bool.
9269 (psym_expand_symtabs_matching): Adjust to use function_view as
9270 callback types.
9271 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9272 to use function_view as callback type and to return bool.
9273 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9274 callback types.
9275 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9276 as callback types.
9277 * symfile.h: Include "common/function-view.h".
9278 (expand_symtabs_file_matcher_ftype)
9279 (expand_symtabs_symbol_matcher_ftype)
9280 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9281 return bool.
9282 (quick_symbol_functions::map_symtabs_matching_filename)
9283 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9284 function_view as callback type and return bool.
9285 (expand_symtabs_matching): Adjust to use function_view as callback
9286 type.
9287 (maintenance_expand_name_matcher)
9288 (maintenance_expand_file_matcher): Delete.
9289 (maintenance_expand_symtabs): Use lambdas.
9290 * symtab.c (iterate_over_some_symtabs): Adjust to use
9291 function_view as callback types and return bool.
9292 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9293 of a cleanup.
9294 (lookup_symtab_callback): Delete.
9295 (lookup_symtab): Use a lambda.
9296 (iterate_over_symbols): Adjust to use function_view as callback
9297 type.
9298 (struct search_symbols_data, search_symbols_file_matches)
9299 (search_symbols_name_matches): Delete.
9300 (search_symbols): Use a pair of lambdas.
9301 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9302 (symtab_expansion_callback): Delete.
9303 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9304 * symtab.h: Include "common/function-view.h".
9305 (iterate_over_some_symtabs): Adjust to use function_view as
9306 callback type and return bool.
9307 (iterate_over_symtabs): Adjust to use function_view as callback
9308 type.
9309 (symbol_found_callback_ftype): Remove 'data' parameter and return
9310 bool.
9311 (iterate_over_symbols): Adjust to use function_view as callback
9312 type.
9313
07e253aa
PA
93142017-02-23 Pedro Alves <palves@redhat.com>
9315
9316 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9317 (%.o) <unittests/%.c>: New pattern.
9318 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9319 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9320 * common/function-view.h: New file.
9321 * unittests/function-view-selftests.c: New file.
9322 * configure: Regenerate.
9323
8eaf5320
SM
93242017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9325
9326 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9327 inferior_ptid.
9328 * go32-nat.c (go32_thread_alive): Likewise.
9329
38768751
YQ
93302017-02-23 Yao Qi <yao.qi@linaro.org>
9331
9332 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9333 delete.
9334
0a8beaba
YQ
93352017-02-23 Yao Qi <yao.qi@linaro.org>
9336
9337 * varobj.c (varobj_clear_saved_item): Use delete instead of
9338 xfree.
9339 (update_dynamic_varobj_children): Likewise.
9340
58fdfd2c
JK
93412017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9342
9343 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9344
1b90b139
SM
93452017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9346
9347 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9348 m_enum_value to 0 in default constructor.
9349
2039d74e
EBM
93502017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9351
9352 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9353 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9354 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9355 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9356 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9357 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9358 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9359 IS_STORE_CONDITIONAL_INSN.
9360
7814882a
JK
93612017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9362
9363 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9364
0ae60b63
JK
93652017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9366
9367 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9368
0224619f
JK
93692017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9370
9371 * dwarf2read.c (skip_one_die, read_attribute_value)
9372 (dwarf2_const_value_attr, dump_die_shallow)
9373 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9374 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9375
0af92d60
JK
93762017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9377
9378 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9379 (dwarf_parse_macro_header): Accept DWARF version 5.
9380 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9381
216f72a1
JK
93822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9383
9384 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9385 DW_AT_GNU_*.
9386 * common/common-exceptions.h (enum errors): Likewise.
9387 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9388 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9389 (dwarf_expr_context::execute_stack_op): Likewise.
9390 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9391 Likewise.
9392 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9393 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9394 (show_entry_values_debug, call_site_to_target_addr)
9395 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9396 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9397 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9398 (value_of_dwarf_block_entry, indirect_pieced_value)
9399 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9400 (disassemble_dwarf_expression): Likewise.
9401 * dwarf2read.c (process_die, inherit_abstract_dies)
9402 (read_call_site_scope): Likewise.
9403 * gdbtypes.h (struct func_type, struct call_site_parameter)
9404 (struct call_site): Likewise.
9405 * stack.c (read_frame_arg): Likewise.
9406 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9407
43988095
JK
94082017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9409
9410 * defs.h (read_unsigned_leb128): New declaration.
9411 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9412 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9413 (dwarf2_find_location_expression): Call also
9414 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9415 * dwarf2loc.h (dwarf2_version): New declaration.
9416 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9417 rnglists.
9418 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9419 .debug_rnglists.
9420 (struct dwop_section_names): Add loclists_dwo.
9421 (dwop_section_names): Add .debug_loclists.dwo.
9422 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9423 (struct dwarf2_per_cu_data): Add dwarf_version.
9424 (struct dwo_sections): Add loclists.
9425 (struct attr_abbrev): Add implicit_const.
9426 (read_indirect_line_string): New declaration.
9427 (read_unsigned_leb128): Delete declaration.
9428 (rcuh_kind): New definition.
9429 (read_and_check_comp_unit_head): Change parameter
9430 is_debug_types_section to section_kind.
9431 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9432 (read_comp_unit_head): Change parameter abfd to section, add parameter
9433 section_kind. Handle DWARF-5.
9434 (error_check_comp_unit_head): Accept also DWARF version 5.
9435 (read_and_check_comp_unit_head): Change parameter
9436 is_debug_types_section to section_kind.
9437 (read_and_check_type_unit_head): Delete function.
9438 (read_abbrev_offset): Handle DWARF-5.
9439 (create_debug_type_hash_table): Add parameter section_kind. Process
9440 only DW_UT_type. Use signature and type_offset_in_tu from struct
9441 comp_unit_head.
9442 (create_debug_types_hash_table): Update create_debug_type_hash_table
9443 caller.
9444 (create_all_type_units): Call create_debug_type_hash_table.
9445 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9446 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9447 caller.
9448 (skip_one_die): Handle DW_FORM_implicit_const.
9449 (dwarf2_rnglists_process): New function.
9450 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9451 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9452 (read_attribute_value): Handle DW_FORM_implicit_const,
9453 DW_FORM_line_strp.
9454 (read_attribute): Handle DW_FORM_implicit_const.
9455 (read_indirect_string_at_offset_from): New function from
9456 read_indirect_string_at_offset.
9457 (read_indirect_string_at_offset): Call
9458 read_indirect_string_at_offset_from.
9459 (read_indirect_line_string_at_offset): New function.
9460 (read_indirect_string): New function comment.
9461 (read_indirect_line_string): New function.
9462 (read_unsigned_leb128): Make it global.
9463 (dwarf2_string_attr): Handle DWARF-5.
9464 (add_include_dir_stub, read_formatted_entries): New functions.
9465 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9466 Handle DWARF-5.
9467 (per_cu_header_read_in): Update read_comp_unit_head caller.
9468 (dwarf2_version): New function.
9469 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9470 rnglists.
9471 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9472 fields.
9473
22d2f3ab
JK
94742017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9475
9476 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9477
5f46c5a5
JK
94782017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9479
9480 * dwarf2read.c (dwarf2_ranges_process): New function from
9481 dwarf2_ranges_read.
9482 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9483 dwarf2_ranges_process.
9484
78d4d2c5
JK
94852017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9486
9487 * dwarf2read.c (create_debug_type_hash_table): New function from
9488 create_debug_types_hash_table.
9489 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9490 (create_all_type_units, open_and_init_dwo_file): Update
9491 create_debug_types_hash_table callers.
9492
1b076f25
SDJ
94932017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9494
9495 PR gdb/16188
9496 * fork-child.c (trace_start_error): Fix thinko. va_end should
9497 refer to 'ap', not 'args'.
9498
0db8980c
SDJ
94992017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9500 Pedro Alves <palves@redhat.com>
9501
9502 PR gdb/16188
9503 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9504 calls succeeded.
9505 * fork-child.c (trace_start_error): New function.
9506 (trace_start_error_with_name): Likewise.
9507 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9508 * inf-ptrace.c (inf_ptrace_me): Likewise.
9509 * inferior.h (trace_start_error): New prototype.
9510 (trace_start_error_with_name): Likewise.
9511
99e8a4f9
SDJ
95122017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9513
9514 PR gdb/21164
9515 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9516 NULL before using it.
9517 * symmisc.c (maintenance_print_symbols): Likewise.
9518 (maintenance_print_msymbols): Likewise.
9519
4e746bb6
TW
95202017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9521
9522 * NEWS: Add record Python bindings entry.
9523
95242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9525
9526 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9527 py-record-full.o.
9528 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9529 * python/py-record-btrace.c, python/py-record-btrace.h,
9530 python/py-record-full.c, python/py-record-full.h: New file.
9531 * python/py-record.c: Add include for py-record-btrace.h and
9532 py-record-full.h.
9533 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9534 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9535 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9536 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9537 New definition.
9538 (gdbpy_initialize_btrace): New export.
9539 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9540
95412017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9542
9543 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9544 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9545 * python/py-record.c: New file.
9546 * python/python-internal.h (gdbpy_start_recording,
9547 gdbpy_current_recording, gdpy_stop_recording,
9548 gdbpy_initialize_record): New export.
9549 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9550 (python_GdbMethods): Add gdbpy_start_recording,
9551 gdbpy_current_recording and gdbpy_stop_recording.
9552
95532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9554
9555 * record-btrace.c (record_btrace_record_method): New function.
9556 (init_record_btrace_ops): Initialize to_record_method.
9557 * record-full.c (record_full_record_method): New function.
9558 (init_record_full_ops, init_record_full_core_ops): Add
9559 record_full_record_method.
9560 * record.h (enum record_method): New enum.
9561 * target-debug.h (target_debug_print_enum_record_method: New define.
9562 * target-delegates.c: Regenerate.
9563 * target.c (target_record_method): New function.
9564 * target.h: Include record.h.
9565 (struct target_ops) <to_record_method>: New field.
9566 (target_record_method): New export.
9567
95682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9569
9570 * record.h (record_start, record_stop): New export.
9571 * record.c (record_start, record_stop): New function.
9572
95732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9574
9575 * btrace.c (btrace_fetch): Copy function call segments pointer
9576 into a vector.
9577 (btrace_clear): Clear the vector.
9578 (btrace_find_insn_by_number): Use binary search to find the correct
9579 function call segment.
9580 * btrace.h (brace_fun_p): New typedef.
9581 (struct btrace_thread_info) <functions>: New field.
9582
95832017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9584
9585 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9586 * btrace.c (btrace_decode_error): ... here. New function.
9587 * btrace.h (btrace_decode_error): New export.
9588
95892017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9590
9591 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9592 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9593 btrace_find_insn_by_number): Remove special case for gaps.
9594 * btrace.h (btrace_insn_get_error): New export.
9595 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9596 * record-btrace.c (btrace_insn_history): Print number for gaps.
9597 (record_btrace_info, record_btrace_goto): Handle gaps.
9598
3f77c769
TT
95992017-02-14 Tom Tromey <tom@tromey.com>
9600
9601 PR python/13598:
9602 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9603 event.
9604 * python/py-evts.c (gdbpy_initialize_py_events): Add
9605 before_prompt registry.
9606 * python/py-events.h (events_object) <before_prompt>: New field.
9607
4c2c7ac6
MM
96082017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9609
9610 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9611
5cf30ebf
LM
96122017-02-13 Luis Machado <lgustavo@codesourcery.com>
9613
9614 * symfile (_initialize_symfile): Add usage text to the load command's
9615 help text.
9616
26a06916
SM
96172017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9618
9619 * utils.c (defaulted_query): Don't query on secondary UIs.
9620
0b145e37
TT
96212017-02-10 Tom Tromey <tom@tromey.com>
9622
9623 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9624
2d8365c4
TT
96252017-02-10 Tom Tromey <tom@tromey.com>
9626
9627 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9628 "cleanup" local.
9629 * python/py-type.c (typy_legacy_template_argument): Remove
9630 unnecessary "cleanup" local.
9631
2bb8f231
TT
96322017-02-10 Tom Tromey <tom@tromey.com>
9633
9634 * python/python.c (do_start_initialization): New function, from
9635 _initialize_python.
9636 (_initialize_python): Call do_start_initialization.
9637 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9638 goto.
9639
1bdfaf42
TT
96402017-02-10 Tom Tromey <tom@tromey.com>
9641
9642 * python/py-prettyprint.c (pretty_print_one_value): Use
9643 gdbpy_ref.
9644
88b6faea
TT
96452017-02-10 Tom Tromey <tom@tromey.com>
9646
9647 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9648 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9649 gdbpy_ref.
9650 * python/py-type.c (field_new): Use gdbpy_ref.
9651 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9652 gdbpy_ref.
9653 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9654 (py_free_pspace): Likewise.
9655 (pspace_to_pspace_object): Likewise.
9656 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9657 (py_free_objfile): Likewise.
9658 (objfile_to_objfile_object): Likewise.
9659 * python/py-inferior.c (delete_thread_object): Use
9660 gdbpy_ref.
9661 (infpy_read_memory): Likewise.
9662 (py_free_inferior): Likewise.
9663 * python/py-evtregistry.c (create_eventregistry_object): Use
9664 gdbpy_ref.
9665 * python/py-event.c (create_event_object): Use gdbpy_ref.
9666
7780f186
TT
96672017-02-10 Tom Tromey <tom@tromey.com>
9668
9669 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9670 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9671 used.
9672 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9673 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9674 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9675 python/py-framefilter.c, python/py-function.c,
9676 python/py-inferior.c, python/py-infevents.c,
9677 python/py-linetable.c, python/py-newobjfileevent.c,
9678 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9679 python/py-signalevent.c, python/py-stopevent.c,
9680 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9681 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9682 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9683 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9684
d4b0bb18
TT
96852017-02-10 Tom Tromey <tom@tromey.com>
9686
9687 * ui-out.h (ui_out_emit_type): New class.
9688 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9689 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9690 and ui_out_emit_tuple.
9691 (enumerate_locals): Likewise.
9692 (py_mi_print_variables, py_print_locals, py_print_args): Use
9693 ui_out_emit_list.
9694 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9695 ui_out_emit_list.
9696 * common/gdb_optional.h: New file.
9697
f67f945c
MG
96982017-02-10 Martin Galvan <martingalvan@sourceware.org>
9699
9700 * MAINTAINERS (Write After Approval): Update my e-mail address.
9701
18da0c51
MG
97022017-02-10 Martin Galvan <martingalvan@sourceware.org>
9703
9704 PR gdb/21122
9705 * breakpoint.c (_initialize_breakpoint): Update the help description
9706 of the 'commands' command to indicate that it takes a list argument.
9707
62c14536
SM
97082017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9709
9710 * interps.c (current_interp_set_logging): Remove "return".
9711
ff6fa247
GB
97122017-02-09 Gary Benson <gbenson@redhat.com>
9713
9714 * symtab.c (add_symtab_completions): Prevent NULL pointer
9715 dereference.
9716
a474bd8e
PA
97172017-02-08 Pedro Alves <palves@redhat.com>
9718
9719 * interps.c (interp::interp): Remove reference to quiet_p.
9720 (interp_set): Make static. Remove dead "Switching to" output
9721 code.
9722 (interp_quiet_p, interp_set_quiet): Delete.
9723 (interpreter_exec_cmd): Don't set the interpreter quiet.
9724 * interps.h (interp_quiet_p): Make static.
9725 (class interp) <quiet_p>: Remove field
9726
3d7b173c
JG
97272017-02-08 Jerome Guitton <guitton@adacore.com>
9728
604c4576
JG
9729 * cli/cli-decode.c (find_command_name_length): Make it extern.
9730 * cli/cli-decode.h (find_command_name_length): Declare.
9731 * cli/cli-script.c (command_name_equals, line_first_arg):
9732 New functions.
9733 (process_next_line): Use cli-decode to parse command names.
9734 (build_command_line): Make args a constant pointer.
9735
97362017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 9737
3d7b173c
JG
9738 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9739 Remove case-insensitive search.
9740
1291063d
JM
97412017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9742
9743 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9744 at the end of the line. Avoids an ARI warning.
9745
20b477a7
LM
97462017-02-06 Luis Machado <lgustavo@codesourcery.com>
9747
9748 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9749 rdseed instructions.
9750 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9751
3f7b46f2
IR
97522017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9753
9754 PR tdep/20936
9755 Provide and use sparc32 and sparc64 target description XML files.
9756 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9757 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9758 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9759 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9760 * features/sparc/sparc32-solaris.xml: New file.
9761 * features/sparc/sparc64-solaris.xml: New file.
9762 * features/sparc/sparc32-solaris.c: Generated.
9763 * features/sparc/sparc64-solaris.c: Generated.
9764 * sparc-tdep.h: Account for differences in target descriptions.
9765 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9766 (sparc32_register_type): Use target provided registers.
9767 (validate_tdesc_registers): New function.
9768 (sparc32_gdbarch_init): Use tdesc_has_registers.
9769 Set pseudoregister functions.
9770 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9771 (sparc64_register_type): Use target provided registers.
9772 (sparc64_init_abi): Set pseudoregister functions.
9773
f0fd41c1
TT
97742017-02-03 Tom Tromey <tom@tromey.com>
9775
9776 PR rust/21097:
9777 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9778 with a single member.
9779
d6f9b0fb
PA
97802017-02-03 Pedro Alves <palves@redhat.com>
9781
9782 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9783 (cli_interp_base::~cli_interp_base): New.
9784 (cli_interp): New struct.
9785 (as_cli_interp): Cast the interp itself to cli_interp.
9786 (cli_interpreter_pre_command_loop): Rename to ...
9787 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9788 parameter.
9789 (cli_interpreter_init): Rename to ...
9790 (cli_interp::init): ... this. Remove 'self' parameter. Use
9791 boolean. Make extern.
9792 (cli_interpreter_resume): Rename to ...
9793 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9794 extern.
9795 (cli_interpreter_suspend): Rename to ...
9796 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9797 extern.
9798 (cli_interpreter_exec): Rename to ...
9799 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9800 extern.
9801 (cli_interpreter_supports_command_editing): Rename to ...
9802 (cli_interp_base::supports_command_editing): ... this. Remove
9803 'interp' parameter. Make extern.
9804 (cli_ui_out): Rename to ...
9805 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9806 Make extern.
9807 (cli_set_logging): Rename to ...
9808 (cli_interp_base::set_logging): ... this. Remove 'interp'
9809 parameter. Make extern.
9810 (cli_interp_procs): Delete.
9811 (cli_interp_factory): Adjust to use "new".
9812 * cli/cli-interp.h: Include "interps.h".
9813 (struct cli_interp_base): New struct.
9814 * interps.c (struct interp): Delete. Fields moved to interps.h.
9815 (interp_new): Delete.
9816 (interp::interp, interp::~interp): New.
9817 (interp_set): Use bool, and return void. Assume the interpreter
9818 has suspend, init and resume methods, and that the all return
9819 void.
9820 (set_top_level_interpreter): interp_set returns void.
9821 (interp_ui_out): Adapt.
9822 (current_interp_set_logging): Adapt.
9823 (interp_data): Delete.
9824 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9825 (interp_exec): Adapt.
9826 (top_level_interpreter_data): Delete.
9827 * interps.h (interp_init_ftype, interp_resume_ftype)
9828 (interp_suspend_ftype, interp_exec_ftype)
9829 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9830 (class interp): New.
9831 (interp_new): Delete.
9832 (interp_set): Now returns void. Use bool.
9833 (interp_data, top_level_interpreter_data): Delete.
9834 * mi/mi-common.h: Include interps.h.
9835 (class mi_interp): Inherit from interp. Define a ctor. Declare
9836 init, resume, suspect, exec, interp_ui_out, set_logging and
9837 pre_command_loop methods.
9838 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9839 (mi_interpreter_init): Rename to ...
9840 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9841 bool, return void and make extern. Adjust.
9842 (mi_interpreter_resume): ... Rename to ...
9843 (mi_interp::resume): ... this. Remove the 'data' parameter,
9844 return void and make extern. Adjust.
9845 (mi_interpreter_suspend): ... Rename to ...
9846 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9847 return void and make extern. Adjust.
9848 (mi_interpreter_exec): ... Rename to ...
9849 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9850 extern. Adjust.
9851 (mi_interpreter_pre_command_loop): ... Rename to ...
9852 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9853 parameter and make extern.
9854 (mi_on_normal_stop_1): Adjust.
9855 (mi_ui_out): Rename to ...
9856 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9857 parameter and make extern. Adjust.
9858 (mi_set_logging): Rename to ...
9859 (mi_interp::set_logging): ... this. Remove the 'interp'
9860 parameter and make extern. Adjust.
9861 (mi_interp_procs): Delete.
9862 (mi_interp_factory): Adjust to use 'new'.
9863 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9864 (mi_print_exception, mi_execute_command, mi_load_progress):
9865 Adjust.
9866 * tui/tui-interp.c (tui_interp): New class.
9867 (as_tui_interp): Return a tui_interp pointer.
9868 (tui_on_normal_stop, tui_on_signal_received)
9869 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9870 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9871 to use interp::interp_ui_out.
9872 (tui_init): Rename to ...
9873 (tui_interp::init): ... this. Remove the 'self' parameter, use
9874 bool, return void and make extern. Adjust.
9875 (tui_resume): Rename to ...
9876 (tui_interp::resume): ... this. Remove the 'data' parameter,
9877 return void and make extern. Adjust.
9878 (tui_suspend): Rename to ...
9879 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9880 return void and make extern. Adjust.
9881 (tui_ui_out): Rename to ...
9882 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9883 parameter, and make extern. Adjust.
9884 (tui_exec): Rename to ...
9885 (tui_interp::exec): ... this. Remove the 'data' parameter and
9886 make extern.
9887 (tui_interp_procs): Delete.
9888 (tui_interp_factory): Use "new".
9889
65c40c95
TT
98902017-02-02 Tom Tromey <tom@tromey.com>
9891
9892 * rust-exp.y (ends_raw_string, space_then_number)
9893 (rust_identifier_start_p): Return bool.
9894 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9895 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9896 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9897 (rust_chartype_p): Return bool.
9898 (val_print_struct, rust_print_struct_def, rust_print_type):
9899 Update.
9900 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9901 Return bool.
9902
b50f188d
TT
99032017-02-02 Tom Tromey <tom@tromey.com>
9904
9905 * rust-lang.c: Reindent.
9906
03c85b11
TT
99072017-02-02 Tom Tromey <tom@tromey.com>
9908
9909 * rust-lang.h (rust_crate_for_block): Update.
9910 * rust-lang.c (rust_crate_for_block): Return std::string.
9911 (rust_get_disr_info): Use std:;string, not
9912 gdb::unique_xmalloc_ptr.
9913 * rust-exp.y (crate_name): Update.
9914
9b6da501
PA
99152017-02-02 Pedro Alves <palves@redhat.com>
9916
9917 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9918 field out of gdb_disassembler_test and make it static.
9919
ec4cb20b
PA
99202017-02-02 Pedro Alves <palves@redhat.com>
9921
9922 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9923 mi1_interp and mi_interp fields.
9924
5be5dbf0
PA
99252017-02-02 Pedro Alves <palves@redhat.com>
9926
616268b6
PA
9927 * cli/cli-interp.c (struct saved_output_files, saved_output):
9928 Moved from cli/cli-logging.c.
9929 (cli_set_logging): New function.
9930 (cli_interp_procs): Install cli_set_logging.
9931 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9932 Declare.
9933 * cli/cli-logging.c (struct saved_output_files, saved_output):
9934 Moved to cli/cli-interp.c.
9935 (pop_output_files): Don't save outputs here.
9936 (make_logging_output): New function.
9937 (handle_redirections): Don't build tee nor save previous outputs
9938 here.
9939 * interps.c (current_interp_set_logging): Change prototype.
9940 Assume there's always a set_logging_proc method installed.
9941 * interps.h (interp_set_logging_ftype): Change prototype.
9942 (current_interp_set_logging): Change prototype and adjust comment.
9943 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9944 use make_logging_output.
9945 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
99462017-02-02 Pedro Alves <palves@redhat.com>
9947
5be5dbf0
PA
9948 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9949 from ...
9950 (set_logging_overwrite): ... here.
9951 (logging_no_redirect_file): Delete.
9952 (set_logging_redirect): Don't handle redirection on the fly.
9953 Instead warn that "logging off" / "logging on" is necessary.
9954 (pop_output_files): Delete references to logging_no_redirect_file.
9955 (show_logging_command): Always speak in terms of what will happen
9956 once logging is reenabled.
9957
c99cc448
PA
99582017-02-02 Pedro Alves <palves@redhat.com>
9959
9960 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9961
8b172ce7
PA
99622017-02-02 Pedro Alves <palves@redhat.com>
9963
9964 * disasm.c (gdb_pretty_print_insn): Rename to ...
9965 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9966 Remove gdbarch parameter. Adapt to clear the object's buffers
9967 instead of allocating new buffers, and to print using the object's
9968 gdb_disassembler instead of calling gdb_print_insn.
9969 (dump_insns): Use gdb_pretty_print_disassembler.
9970 * disasm.h (gdb_pretty_print_insn): Delete declaration.
9971 (gdb_pretty_print_disassembler): New class.
9972 * record-btrace.c (btrace_insn_history): Use
9973 gdb_pretty_print_disassembler.
9974
d7e74731
PA
99752017-02-02 Pedro Alves <palves@redhat.com>
9976
9977 * ada-lang.c (type_as_string): Use string_file.
9978 * ada-valprint.c (ada_print_floating): Use string_file.
9979 * ada-varobj.c (ada_varobj_scalar_image)
9980 (ada_varobj_get_value_image): Use string_file.
9981 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9982 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9983 * breakpoint.c (update_inserted_breakpoint_locations)
9984 (insert_breakpoint_locations, reattach_breakpoints)
9985 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9986 (print_it_watchpoint): Use string_file.
9987 (save_breakpoints): Use stdio_file.
9988 * c-exp.y (oper): Use string_file.
9989 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9990 tee_file.
9991 (pop_output_files): Use delete.
9992 (handle_redirections): Use stdio_file and tee_file.
9993 * cli/cli-setshow.c (do_show_command): Use string_file.
9994 * compile/compile-c-support.c (c_compute_program): Use
9995 string_file.
9996 * compile/compile-c-symbols.c (generate_vla_size): Take a
9997 'string_file &' instead of a 'ui_file *'.
9998 (generate_c_for_for_one_variable): Take a 'string_file &' instead
9999 of a 'ui_file *'. Use string_file.
10000 (generate_c_for_variable_locations): Take a 'string_file &'
10001 instead of a 'ui_file *'.
10002 * compile/compile-internal.h (generate_c_for_for_one_variable):
10003 Take a 'string_file &' instead of a 'ui_file *'.
10004 * compile/compile-loc2c.c (push, pushf, unary, binary)
10005 (print_label, pushf_register_address, pushf_register)
10006 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10007 'ui_file *'. Adjust.
10008 * compile/compile.c (compile_to_object): Use string_file.
10009 * compile/compile.h (compile_dwarf_expr_to_c)
10010 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10011 'ui_file *'.
10012 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10013 (replace_typedefs_qualified_name): Use string_file and
10014 obstack_copy0.
10015 * disasm.c (gdb_pretty_print_insn): Use string_file.
10016 (gdb_disassembly): Adjust reference the null_stream global.
10017 (do_ui_file_delete): Delete.
10018 (gdb_insn_length): Use null_stream.
10019 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10020 * dwarf2loc.c (dwarf2_compile_property_to_c)
10021 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10022 'string_file &' instead of a 'ui_file *'.
10023 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10024 * dwarf2read.c (do_ui_file_peek_last): Delete.
10025 (dwarf2_compute_name): Use string_file.
10026 * event-top.c (gdb_setup_readline): Use stdio_file.
10027 * gdbarch.sh (verify_gdbarch): Use string_file.
10028 * gdbtypes.c (safe_parse_type): Use null_stream.
10029 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10030 string_file.
10031 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10032 'string_file *' instead of a 'ui_file *'.
10033 (gdbscm_arch_disassemble): Use string_file.
10034 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10035 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10036 inherits from ui_file.
10037 (ioscm_file_port_delete, ioscm_file_port_rewind)
10038 (ioscm_file_port_put): Delete.
10039 (ioscm_file_port_write): Rename to ...
10040 (ioscm_file_port::write): ... this. Remove file_port_magic
10041 checks.
10042 (ioscm_file_port_new): Delete.
10043 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10044 ui_file_up.
10045 * guile/scm-type.c (tyscm_type_name): Use string_file.
10046 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10047 Use string_file.
10048 * infcmd.c (print_return_value_1): Use string_file.
10049 * infrun.c (print_target_wait_results): Use string_file.
10050 * language.c (add_language): Use string_file.
10051 * location.c (explicit_to_string_internal): Use string_file.
10052 * main.c (captured_main_1): Use null_file.
10053 * maint.c (maintenance_print_architecture): Use stdio_file.
10054 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10055 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10056 event_channel>: Change type to mi_console_file pointer.
10057 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10058 (mi_console_file_delete): Delete.
10059 (struct mi_console_file): Delete.
10060 (mi_console_file_magic): Delete.
10061 (mi_console_file_new): Delete.
10062 (mi_console_file::mi_console_file): New.
10063 (mi_console_file_delete): Delete.
10064 (mi_console_file_fputs): Delete.
10065 (mi_console_file::write): New.
10066 (mi_console_raw_packet): Delete.
10067 (mi_console_file::flush): New.
10068 (mi_console_file_flush): Delete.
10069 (mi_console_set_raw): Rename to ...
10070 (mi_console_file::set_raw): ... this.
10071 * mi/mi-console.h (class mi_console_file): New class.
10072 (mi_console_file_new, mi_console_set_raw): Delete.
10073 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10074 (mi_set_logging): Use delete and tee_file. Adjust.
10075 * mi/mi-main.c (output_register): Use string_file.
10076 (mi_cmd_data_evaluate_expression): Use string_file.
10077 (mi_cmd_data_read_memory): Use string_file.
10078 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10079 * mi/mi-out.c (mi_ui_out::main_stream): New.
10080 (mi_ui_out::rewind): Use main_stream and
10081 string_file.
10082 (mi_ui_out::put): Use main_stream and string_file.
10083 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10084 Allocate a 'string_file' instead.
10085 (mi_out_new): Don't allocate a mem_fileopen stream here.
10086 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10087 (mi_ui_out::main_stream): Declare method.
10088 * printcmd.c (eval_command): Use string_file.
10089 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10090 * python/py-arch.c (archpy_disassemble): Use string_file.
10091 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10092 * python/py-frame.c (frapy_str): Use string_file.
10093 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10094 Use string_file.
10095 * python/py-type.c (typy_str): Use string_file.
10096 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10097 * python/py-value.c (valpy_str): Use string_file.
10098 * record-btrace.c (btrace_insn_history): Use string_file.
10099 * regcache.c (regcache_print): Use stdio_file.
10100 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10101 * remote.c (escape_buffer): Use string_file.
10102 * rust-lang.c (rust_get_disr_info): Use string_file.
10103 * serial.c (serial_open_ops_1): Use stdio_file.
10104 (do_serial_close): Use delete.
10105 * stack.c (print_frame_arg): Use string_file.
10106 (print_frame_args): Remove local mem_fileopen stream, not used.
10107 (print_frame): Use string_file.
10108 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10109 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10110 Take a 'string_file *' instead of a 'ui_file *'.
10111 * top.c (new_ui): Use stdio_file and stderr_file.
10112 (free_ui): Use delete.
10113 (execute_command_to_string): Use string_file.
10114 (quit_confirm): Use string_file.
10115 * tracepoint.c (collection_list::append_exp): Use string_file.
10116 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10117 * tui/tui-file.c: Don't include "ui-file.h".
10118 (enum streamtype, struct tui_stream): Delete.
10119 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10120 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10121 (tui_file::tui_file): New method.
10122 (tui_file_fputs): Delete.
10123 (tui_file_get_strbuf): Delete.
10124 (tui_file::puts): New method.
10125 (tui_file_adjust_strbuf): Delete.
10126 (tui_file_flush): Delete.
10127 (tui_file::flush): New method.
10128 * tui/tui-file.h: Tweak intro comment.
10129 Include ui-file.h.
10130 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10131 (tui_file_adjust_strbuf): Delete declarations.
10132 (class tui_file): New class.
10133 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10134 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10135 (tui_register_format): Use string_stream.
10136 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10137 (tui_get_function_from_frame): Use string_file.
10138 * typeprint.c (type_to_string): Use string_file.
10139 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10140 (null_stream): New global.
10141 (ui_file_delete): Delete.
10142 (ui_file::ui_file): New.
10143 (null_file_isatty): Delete.
10144 (ui_file::~ui_file): New.
10145 (null_file_rewind): Delete.
10146 (ui_file::printf): New.
10147 (null_file_put): Delete.
10148 (null_file_flush): Delete.
10149 (ui_file::putstr): New.
10150 (null_file_write): Delete.
10151 (ui_file::putstrn): New.
10152 (null_file_read): Delete.
10153 (ui_file::putc): New.
10154 (null_file_fputs): Delete.
10155 (null_file_write_async_safe): Delete.
10156 (ui_file::vprintf): New.
10157 (null_file_delete): Delete.
10158 (null_file::write): New.
10159 (null_file_fseek): Delete.
10160 (null_file::puts): New.
10161 (ui_file_data): Delete.
10162 (null_file::write_async_safe): New.
10163 (gdb_flush, ui_file_isatty): Adjust.
10164 (ui_file_put, ui_file_rewind): Delete.
10165 (ui_file_write): Adjust.
10166 (ui_file_write_for_put): Delete.
10167 (ui_file_write_async_safe, ui_file_read): Adjust.
10168 (ui_file_fseek): Delete.
10169 (fputs_unfiltered): Adjust.
10170 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10171 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10172 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10173 (set_ui_file_data): Delete.
10174 (string_file::~string_file, string_file::write)
10175 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10176 (do_ui_file_as_string, ui_file_as_string): Delete.
10177 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10178 (struct mem_file): Delete.
10179 (mem_file_new): Delete.
10180 (stdio_file::stdio_file): New.
10181 (mem_file_delete): Delete.
10182 (stdio_file::stdio_file): New.
10183 (mem_fileopen): Delete.
10184 (stdio_file::~stdio_file): New.
10185 (mem_file_rewind): Delete.
10186 (stdio_file::set_stream): New.
10187 (mem_file_put): Delete.
10188 (stdio_file::open): New.
10189 (mem_file_write): Delete.
10190 (stdio_file_magic, struct stdio_file): Delete.
10191 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10192 (stdio_file::flush): New.
10193 (stdio_file_read): Rename to ...
10194 (stdio_file::read): ... this. Adjust.
10195 (stdio_file_write): Rename to ...
10196 (stdio_file::write): ... this. Adjust.
10197 (stdio_file_write_async_safe): Rename to ...
10198 (stdio_file::write_async_safe) ... this. Adjust.
10199 (stdio_file_fputs): Rename to ...
10200 (stdio_file::puts) ... this. Adjust.
10201 (stdio_file_isatty): Delete.
10202 (stdio_file_fseek): Delete.
10203 (stdio_file::isatty): New.
10204 (stderr_file_write): Rename to ...
10205 (stderr_file::write) ... this. Adjust.
10206 (stderr_file_fputs): Rename to ...
10207 (stderr_file::puts) ... this. Adjust.
10208 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10209 (stderr_file::stderr_file): New.
10210 (tee_file_magic): Delete.
10211 (struct tee_file): Delete.
10212 (tee_file::tee_file): New.
10213 (tee_file_new): Delete.
10214 (tee_file::~tee_file): New.
10215 (tee_file_delete): Delete.
10216 (tee_file_flush): Rename to ...
10217 (tee_file::flush): ... this. Adjust.
10218 (tee_file_write): Rename to ...
10219 (tee_file::write): ... this. Adjust.
10220 (tee_file::write_async_safe): New.
10221 (tee_file_fputs): Rename to ...
10222 (tee_file::puts): ... this. Adjust.
10223 (tee_file_isatty): Rename to ...
10224 (tee_file::isatty): ... this. Adjust.
10225 * ui-file.h (struct obstack, struct ui_file): Don't
10226 forward-declare.
10227 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10228 (ui_file_write_ftype)
10229 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10230 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10231 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10232 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10233 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10234 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10235 (set_ui_file_fseek): Delete.
10236 (ui_file_data, ui_file_delete, ui_file_rewind)
10237 (struct ui_file): New.
10238 (ui_file_up): New.
10239 (class null_file): New.
10240 (null_stream): Declare.
10241 (ui_file_write_for_put, ui_file_put): Delete.
10242 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10243 Delete.
10244 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10245 (gdb_fopen, tee_file_new): Delete.
10246 (struct string_file): New.
10247 (struct stdio_file): New.
10248 (stdio_file_up): New.
10249 (struct stderr_file): New.
10250 (class tee_file): New.
10251 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10252 of a 'ui_file *'. Adjust.
10253 * ui-out.h (class ui_out) <field_stream>: Likewise.
10254 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10255 (null_stream): Delete.
10256 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10257 Adjust.
10258 * utils.h (struct ui_file): Delete forward declaration..
10259 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10260 (error_stream): Take a 'string_file &' instead of a
10261 'ui_file *'.
10262 * varobj.c (varobj_value_get_print_value): Use string_file.
10263 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10264 * gdbarch.c: Regenerate.
10265
187808b0
PA
102662017-02-02 Pedro Alves <palves@redhat.com>
10267
10268 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10269 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10270 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10271 Adjust to call gdb_print_insn instead of
10272 gdb_disassembler::print_insn.
10273 (dump_insns, do_mixed_source_and_assembly_deprecated)
10274 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10275 'gdbarch' parameter. Remove gdb_disassembler parameter.
10276 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10277 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10278 declaration.
10279 (gdb_pretty_print_insn): Re-add declaration.
10280 * record-btrace.c (btrace_insn_history): Don't allocate a
10281 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10282
7a8eb317
SM
102832017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10284
10285 * disasm.h (gdb_disassembly): Remove file_string parameter.
10286 * disasm.c (gdb_disassembly): Likewise.
10287 * cli/cli-cmds.c (print_disassembly): Adapt.
10288 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10289 * stack.c (do_gdb_disassembly): Likewise.
10290
7346ef59
AA
102912017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10292
10293 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10294 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10295 targets. And if the implicit value is longer than needed, extract
10296 the first bytes instead of the "least significant" ones.
10297
cd4007e4
MM
102982017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10299
10300 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10301 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10302 (btrace_fetch): Assert can_access_registers_ptid.
10303 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10304 validate_registers_access.
10305
cf77c34e
MM
103062017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10307
10308 * gdbthread.h (can_access_registers_ptid): New.
10309 * thread.c (can_access_registers_ptid): New.
10310
be85ce7d
PA
103112017-02-01 Pedro Alves <palves@redhat.com>
10312
10313 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10314
29b0b251
PA
103152017-01-31 Pedro Alves <palves@redhat.com>
10316
10317 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10318 Fix typos.
10319
289b5b24
PA
103202017-01-31 Pedro Alves <palves@redhat.com>
10321
10322 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10323 not used.
10324
b47413b4
PA
103252017-01-31 Pedro Alves <palves@redhat.com>
10326
10327 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10328
60adb36c
PA
103292017-01-31 Pedro Alves <palves@redhat.com>
10330
10331 * common/scoped_restore.h
10332 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10333 change the value's parameter type to T2.
10334 (make_scoped_restore): Likewise.
10335
2735833d
WT
103362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10337 Richard Henderson <rth@redhat.com>
10338
10339 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10340 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10341 GS_BASE for older kernels.
10342 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10343 GS_BASE for older kernels.
10344 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10345 and GS_BASE to the offset table.
10346 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10347 system register group.
10348 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10349 for older kernels.
10350 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10351 amd64 ABI.
10352 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10353 AMD64_GSBASE_REGNUM.
10354 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10355 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10356 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10357 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10358 i386/64bit-segments.xml in those rules.
10359 * features/i386/64bit-segments.xml: New file.
10360 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10361 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10362 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10363 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10364 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10365 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10366 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10367 * features/i386/amd64-avx-linux.c: Regenerated.
10368 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10369 * features/i386/amd64-avx-mpx.c: Regenerated.
10370 * features/i386/amd64-avx512-linux.c: Regenerated.
10371 * features/i386/amd64-linux.c: Regenerated.
10372 * features/i386/amd64-mpx-linux.c: Regenerated.
10373 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10374 * features/i386/i386-avx-mpx.c: Regenerated.
10375 * features/i386/x32-avx-linux.c: Regenerated.
10376 * features/i386/x32-avx512-linux.c: Regenerated.
10377 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10378 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10379 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10380 * regformats/i386/amd64-linux.dat: Regenerated.
10381 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10382 * regformats/i386/x32-avx-linux.dat: Regenerated.
10383 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10384 * regformats/i386/x32-linux.dat: Regenerated.
10385
8884e97e
WT
103862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10387
10388 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10389 Set to AMD64_NUM_REGS.
10390
7005d26a
WT
103912017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10392
10393 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10394 that checks validity of a register number.
10395
4bd2e1b2
KC
103962017-01-27 Kees Cook <keescook@google.com>
10397
10398 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10399 fetch_fpregs if target has fpa registers.
10400 (arm_linux_store_inferior_registers): Call store_fpregs if target
10401 has fpa registers.
10402
7cf1de6c
AA
104032017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10404
10405 * cris-tdep.c (cris_gdbarch_init): Remove check for
10406 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10407
874a1c8c
AT
104082017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10409
10410 * corelow.c (get_core_register_section): Check for regset
10411 existence before checking for REGSET_VARIABLE_SIZE.
10412
d8b49cf0
YQ
104132017-01-26 Yao Qi <yao.qi@linaro.org>
10414 Pedro Alves <palves@redhat.com>
10415
10416 PR gdb/20939
10417 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10418 call memory_error, save memaddr instead.
10419 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10420 negative, cal memory_error.
10421 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10422
658ca58c
YQ
104232017-01-26 Yao Qi <yao.qi@linaro.org>
10424
10425 * disasm-selftests.c (memory_error_test): New function.
10426 (_initialize_disasm_selftests): Register memory_error_test.
10427
79843d45
YQ
104282017-01-26 Yao Qi <yao.qi@linaro.org>
10429
10430 * Makefile.in (SFILES): Add disasm-selftests.c and
10431 selftest-arch.c.
10432 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10433 * disasm-selftests.c: New file.
10434 * selftest-arch.c: New file.
10435 * selftest-arch.h: New file.
10436
8cafda32
YQ
104372017-01-26 Yao Qi <yao.qi@linaro.org>
10438
10439 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10440 to bfd_arch_mep. Don't return 0 if section is not
10441 found. Call print_insn_mep.
10442
e47ad6c0
YQ
104432017-01-26 Pedro Alves <palves@redhat.com>
10444 Yao Qi <yao.qi@linaro.org>
10445
10446 * arm-tdep.c: Include "disasm.h".
10447 (gdb_print_insn_arm): Update code to get gdbarch.
10448 * disasm.c (dis_asm_read_memory): Change it to
10449 gdb_disassembler::dis_asm_read_memory.
10450 (dis_asm_memory_error): Likewise.
10451 (dis_asm_print_address): Likewise.
10452 (gdb_pretty_print_insn): Change it to
10453 gdb_disassembler::pretty_print_insn.
10454 (dump_insns): Add one argument gdb_disassemlber. All
10455 callers updated.
10456 (do_mixed_source_and_assembly_deprecated): Likewise.
10457 (do_mixed_source_and_assembly): Likewise.
10458 (do_assembly_only): Likewise.
10459 (gdb_disassembler::gdb_disassembler): New.
10460 (gdb_disassembler::print_insn): New.
10461 * disasm.h (class gdb_disassembler): New.
10462 (gdb_pretty_print_insn): Remove declaration.
10463 (gdb_disassemble_info): Likewise.
10464 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10465 (gdbscm_disasm_read_memory_worker): Update.
10466 (gdbscm_disasm_read_memory): Update.
10467 (gdbscm_disasm_memory_error): Remove.
10468 (gdbscm_disasm_print_address): Remove.
10469 (gdbscm_disassembler::gdbscm_disassembler): New.
10470 (gdbscm_print_insn_from_port): Update.
10471 * mips-tdep.c: Include disasm.h.
10472 (gdb_print_insn_mips): Update code to get gdbarch.
10473 * record-btrace.c (btrace_insn_history): Update.
10474 * spu-tdep.c: Include disasm.h.
10475 (struct spu_dis_asm_data): Remove.
10476 (struct spu_dis_asm_info): New.
10477 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10478 SPU id.
10479 (gdb_print_insn_spu): Cast disassemble_info to
10480 spu_dis_asm_info.
10481
80d75874
YQ
104822017-01-26 Yao Qi <yao.qi@linaro.org>
10483
10484 * disasm.c (do_ui_file_delete): Delete.
10485 (gdb_insn_length): Move code creating stream to ...
10486 * utils.c (null_stream): ... here. New function.
10487 * utils.h (null_stream): Declare.
10488
60685cd0
SM
104892017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10490
10491 * python/py-inferior.c (find_thread_object): Return directly
10492 from the loop. Remove "found" variable.
10493
eb1cdb62
JB
104942017-01-21 Joel Brobecker <brobecker@adacore.com>
10495
10496 GDB 7.12.1 released.
10497
b1ce6568
SM
104982017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10499
10500 * python/py-function.c (fnpy_call): Reorder declarations to have
10501 the gdbpy_enter object declared first.
10502 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10503
6f8b0407
SM
105042017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10505
fec93fb1 10506 PR python/21068
6f8b0407
SM
10507 * python/python-internal.h (PyMem_RawMalloc): Define for
10508 Python < 3.4.
10509 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10510 PyMem_RawMalloc instead of PyMem_Malloc.
10511
78cbbba8
LM
105122017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10513 Luis Machado <lgustavo@codesourcery.com>
10514
10515 * NEWS (New commands): Mention flash-erase.
10516 (New MI commands): Mention target-flash-erase.
10517 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10518 command.
10519 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10520 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10521 * target.c (flash_erase_command): New function.
10522 (initialize_targets): Add new flash-erase command.
10523 * target.h (flash_erase_command): New declaration.
10524
2132fe85
JB
105252017-01-20 Joel Brobecker <brobecker@adacore.com>
10526
10527 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10528 HAVE_SYS_PROCFS_H is defined.
10529
d1dff226
AH
105302017-01-18 Alan Hayward <alan.hayward@arm.com>
10531
10532 * remote.c (struct cached_reg): Change data into a pointer.
10533 * (stop_reply_dtr): Free data pointers before deleting vector.
10534 (process_stop_reply): Likewise.
10535 (remote_parse_stop_reply): Allocate space for data
10536
9890e433
AH
105372017-01-18 Alan Hayward <alan.hayward@arm.com>
10538
10539 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10540 MAX_REGISTER_SIZE.
10541 (amd64_pseudo_register_read_value): Likewise.
10542 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10543 (store_register_using_P): Likewise.
10544 * regcache.c (regcache_xfer_part): Likewise.
10545
7a36499a
IR
105462017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10547
10548 Split real and pseudo registers.
10549 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10550 (sparc32_pseudo_regnum): New enum.
10551 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10552 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10553 (SPARC32_CP0_REGISTERS): New macro.
10554 (sparc32_pseudo_register_name): New function.
10555 (sparc32_register_name): Use sparc32_pseudo_register_name.
10556 (sparc32_pseudo_register_type): New function.
10557 (sparc32_register_type): Use sparc32_pseudo_register_type.
10558 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10559 pseudo register numbers.
10560 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10561 (SPARC64_CP0_REGISTERS): New macro.
10562 (sparc64_pseudo_register_name): New function.
10563 (sparc64_register_name): Use sparc64_pseudo_register_name.
10564 (sparc64_pseudo_register_type): New function.
10565 (sparc64_register_type): Use sparc64_pseudo_register_type.
10566 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10567 pseudo register numbers.
10568 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10569 sparc64_store_arguments): Handle pseudo register numbers.
10570
6f8976bf
YQ
105712017-01-13 Yao Qi <yao.qi@linaro.org>
10572
10573 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10574 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10575 output.
10576 (getpkt_or_notif_sane_1): Likewise.
10577
e4241ace
YQ
105782017-01-13 Yao Qi <yao.qi@linaro.org>
10579
10580 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10581 of CC. Pass "-x c++-header" instead of "-x c".
10582
3015c064
SM
105832017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10584
10585 * remote.c (remote_can_async_p): Update comment.
10586
fde1b17d
SM
105872017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10588
10589 * linux-nat.c (linux_nat_can_async_p): Update comment.
10590
ca1ca08b
SM
105912017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10592
10593 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10594
4ad2da73
SM
105952017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10596
10597 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10598
c8b23b3f
TT
105992017-01-10 Tom Tromey <tom@tromey.com>
10600
10601 * python/py-type.c (typy_legacy_template_argument): Update.
10602 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10603 ~demangle_parse_info): Declare new members.
10604 (cp_demangled_name_to_comp): Return unique_ptr.
10605 (cp_demangled_name_parse_free)
10606 (make_cleanup_cp_demangled_name_parse_free)
10607 (cp_new_demangle_parse_info): Remove.
10608 * cp-support.c (do_demangled_name_parse_free_cleanup)
10609 (make_cleanup_cp_demangled_name_parse_free): Remove.
10610 (inspect_type, cp_canonicalize_string_full)
10611 (cp_canonicalize_string): Update.
10612 (mangled_name_to_comp): Change return type.
10613 (cp_class_name_from_physname, method_name_from_physname)
10614 (cp_func_name, cp_remove_params): Update.
10615 * cp-name-parser.y (demangle_parse_info): New constructor, from
10616 cp_new_demangle_parse_info.
10617 (~demangle_parse_info): New destructor, from
10618 cp_demangled_name_parse_free.
10619 (cp_merge_demangle_parse_infos): Update.
10620 (cp_demangled_name_to_comp): Change return type.
10621
1ac32117
TT
106222017-01-10 Tom Tromey <tom@tromey.com>
10623
10624 * top.c (prevent_dont_repeat): Change return type.
10625 * python/python.c (execute_gdb_command): Use std::string.
10626 Update.
10627 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10628 * command.h (prevent_dont_repeat): Change return type.
10629 * breakpoint.c (bpstat_do_actions_1): Update.
10630
0cf08227
TT
106312017-01-10 Tom Tromey <tom@tromey.com>
10632
10633 * value.h (scoped_value_mark::~scoped_value_mark): Call
10634 free_to_mark.
10635 (scoped_value_mark::free_to_mark): New method.
10636 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10637 scoped_value_mark.
10638
eb115069
TT
106392017-01-10 Tom Tromey <tom@tromey.com>
10640
10641 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10642 (valpy_reference_value, valpy_const_value, valpy_get_address)
10643 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10644 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10645 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10646 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10647 scoped_value_mark.
10648 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10649 * value.h (scoped_value_mark): New class.
10650
906768f9
TT
106512017-01-10 Tom Tromey <tom@tromey.com>
10652
10653 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10654 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10655 * psymtab.c (discard_psymtabs_upto): Remove.
10656 (make_cleanup_discard_psymtabs): Remove.
10657 (struct psymtab_state): Remove.
10658
bef155c3
TT
106592017-01-10 Tom Tromey <tom@tromey.com>
10660
10661 * record-full.c (record_full_save_cleanups): Remove.
10662 (record_full_save): Use gdb::unlinker.
10663 * gcore.c (do_bfd_delete_cleanup): Remove.
10664 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10665 cleanups.
10666 * dwarf2read.c (unlink_if_set): Remove.
10667 (write_psymtabs_to_index): Use gdb::unlinker.
10668 * common/gdb_unlinker.h: New file.
10669
192b62ce
TT
106702017-01-10 Tom Tromey <tom@tromey.com>
10671
10672 * windows-tdep.c (windows_xfer_shared_library): Update.
10673 * windows-nat.c (windows_make_so): Update.
10674 * utils.h (make_cleanup_bfd_unref): Remove.
10675 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10676 * symfile.h (symfile_bfd_open)
10677 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10678 * symfile.c (read_symbols, symbol_file_add)
10679 (separate_debug_file_exists): Update.
10680 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10681 (generic_load, reread_symbols): Update.
10682 * symfile-mem.c (symbol_file_add_from_memory): Update.
10683 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10684 (spu_symbol_file_add_from_memory): Update.
10685 * solist.h (struct target_so_ops) <bfd_open>: Return
10686 gdb_bfd_ref_ptr.
10687 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10688 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10689 gdb_bfd_ref_ptr.
10690 (solib_map_sections, reload_shared_libraries_1): Update.
10691 * solib-svr4.c (enable_break): Update.
10692 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10693 * solib-frv.c (enable_break2): Update.
10694 * solib-dsbt.c (enable_break): Update.
10695 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10696 gdb_bfd_ref_ptr.
10697 (darwin_solib_get_all_image_info_addr_at_init): Update.
10698 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10699 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10700 * record-full.c (record_full_save): Update.
10701 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10702 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10703 * minidebug.c (find_separate_debug_file_in_section): Return
10704 gdb_bfd_ref_ptr.
10705 * machoread.c (macho_add_oso_symfile): Change abfd to
10706 gdb_bfd_ref_ptr.
10707 (macho_symfile_read_all_oso): Update.
10708 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10709 (macho_symfile_read): Update.
10710 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10711 (jit_bfd_try_read_symtab): Update.
10712 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10713 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10714 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10715 gdb_bfd_ref_ptr.
10716 (gdb_bfd_ref_policy): New struct.
10717 (gdb_bfd_ref_ptr): New typedef.
10718 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10719 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10720 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10721 gdb_bfd_ref_ptr.
10722 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10723 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10724 (gcore_command): Update.
10725 * exec.c (exec_file_attach): Update.
10726 * elfread.c (elf_symfile_read): Update.
10727 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10728 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10729 (open_and_init_dwo_file): Update.
10730 (open_dwp_file): Return gdb_bfd_ref_ptr.
10731 (open_and_init_dwp_file): Update.
10732 * corelow.c (core_open): Update.
10733 * compile/compile-object-load.c (compile_object_load): Update.
10734 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10735 * coffread.c (coff_symfile_read): Update.
10736 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10737 gdb_bfd_ref_ptr. Rename.
10738 (dump_bfd_file, restore_command): Update.
10739 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10740 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10741 (find_separate_debug_file_by_buildid): Update.
10742
50315b21
TT
107432017-01-10 Tom Tromey <tom@tromey.com>
10744
10745 * common/gdb_ref_ptr.h: New file.
10746 * python/py-ref.h (struct gdbpy_ref_policy): New.
10747 (gdbpy_ref): Now a typedef.
10748
fc4007c9
TT
107492017-01-10 Tom Tromey <tom@tromey.com>
10750
10751 * utils.h (make_cleanup_htab_delete): Don't declare.
10752 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10753 Remove.
10754 * linespec.c (decode_compound_collector): Add constructor,
10755 destructor.
10756 (lookup_prefix_sym): Remove cleanup.
10757 (symtab_collector): Add constructor, destructor.
10758 (collect_symtabs_from_filename): Remove cleanup.
10759 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10760 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10761 Use htab_up.
10762 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10763 * dwarf2read.c (dw2_expand_symtabs_matching)
10764 (dw2_map_symbol_filenames, dwarf_decode_macros)
10765 (write_psymtabs_to_index): Use htab_up.
10766 * dwarf2loc.c (func_verify_no_selftailcall)
10767 (call_site_find_chain_1, func_verify_no_selftailcall)
10768 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10769 std::vector, gdb::unique_xmalloc_ptr.
10770 (call_sitep): Remove typedef.
10771 (dwarf2_locexpr_baton_eval): Remove unused variable.
10772
8dbcee67
TT
107732017-01-10 Tom Tromey <tom@tromey.com>
10774
10775 * python/python-internal.h (make_cleanup_py_decref)
10776 (make_cleanup_py_xdecref): Don't declare.
10777 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10778 (py_xdecref, make_cleanup_py_xdecref): Remove.
10779
13df46cc
TT
107802017-01-10 Tom Tromey <tom@tromey.com>
10781
10782 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10783 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10784
06fc9bf7
TT
107852017-01-10 Tom Tromey <tom@tromey.com>
10786
10787 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10788
830a4934
TT
107892017-01-10 Tom Tromey <tom@tromey.com>
10790
10791 * python/py-utils.c (unicode_to_encoded_string)
10792 (python_string_to_target_string)
10793 (python_string_to_target_python_string)
10794 (python_string_to_host_string, gdbpy_obj_to_string)
10795 (get_addr_from_python): Use gdbpy_ref.
10796
4586d543
TT
107972017-01-10 Tom Tromey <tom@tromey.com>
10798
10799 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10800 gdbpy_ref.
10801
59876f8f
TT
108022017-01-10 Tom Tromey <tom@tromey.com>
10803
10804 * python/python.c (eval_python_command, gdbpy_decode_line)
10805 (gdbpy_run_events, gdbpy_start_type_printers)
10806 (gdbpy_apply_type_printers): Use gdbpy_ref.
10807
97d83487
TT
108082017-01-10 Tom Tromey <tom@tromey.com>
10809
10810 * python/py-param.c (get_doc_string, compute_enum_values): Use
10811 gdbpy_ref.
10812
9205649a
TT
108132017-01-10 Tom Tromey <tom@tromey.com>
10814
10815 * python/py-inferior.c (find_thread_object, build_inferior_list):
10816 Use gdbpy_ref.
10817
74c49d45
TT
108182017-01-10 Tom Tromey <tom@tromey.com>
10819
10820 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10821
16361ffb
TT
108222017-01-10 Tom Tromey <tom@tromey.com>
10823
10824 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10825 gdbpy_ref.
10826
905f2cca
TT
108272017-01-10 Tom Tromey <tom@tromey.com>
10828
10829 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10830 extra incref.
10831 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10832 Use gdbpy_ref.
10833
64081434
TT
108342017-01-10 Tom Tromey <tom@tromey.com>
10835
10836 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10837 gdbpy_ref.
10838
59e9e831
TT
108392017-01-10 Tom Tromey <tom@tromey.com>
10840
10841 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10842 decref results of PyArg_ParseTupleAndKeywords.
10843
9de10f6d
TT
108442017-01-10 Tom Tromey <tom@tromey.com>
10845
10846 * python/python.c (python_run_simple_file): Use
10847 unique_xmalloc_ptr, gdbpy_ref.
10848
2bd5759d
TT
108492017-01-10 Tom Tromey <tom@tromey.com>
10850
10851 * python/py-prettyprint.c (print_stack_unless_memory_error)
10852 (print_string_repr, print_children): Use gdbpy_ref.
10853 (dummy_python_frame): New class.
10854 (dummy_python_frame::dummy_python_frame): Rename from
10855 push_dummy_python_frame.
10856 (py_restore_tstate): Remove.
10857
3b4e0e01
TT
108582017-01-10 Tom Tromey <tom@tromey.com>
10859
10860 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10861
17a22718
TT
108622017-01-10 Tom Tromey <tom@tromey.com>
10863
10864 * python/python.c (ensure_python_env, restore_python_env):
10865 Remove.
10866 * python/python-internal.h (ensure_python_env): Don't declare.
10867 * varobj.h (varobj_ensure_python_env): Don't declare.
10868 * varobj.c (varobj_ensure_python_env): Remove.
10869
68cdc557
TT
108702017-01-10 Tom Tromey <tom@tromey.com>
10871
10872 * varobj.c (varobj_value_get_print_value): Use
10873 gdbpy_enter_varobj.
10874
1eba6383
TT
108752017-01-10 Tom Tromey <tom@tromey.com>
10876
10877 * python/py-prettyprint.c (print_string_repr, print_children):
10878 Update.
10879 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10880 of "encoding".
10881 * varobj.c (varobj_value_get_print_value): Update.
10882 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10883
bde7b3e3
TT
108842017-01-10 Tom Tromey <tom@tromey.com>
10885
10886 * varobj.c (varobj_get_display_hint)
10887 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10888 (varobj_set_visualizer, free_variable): Use
10889 gdbpy_enter_varobj.
10890
a7785f8c
TT
108912017-01-10 Tom Tromey <tom@tromey.com>
10892
10893 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10894 (do_finish_initialization): New function. Use gdbpy_ref.
10895 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10896 do_finish_initialization.
10897
2865bfce
TT
108982017-01-10 Tom Tromey <tom@tromey.com>
10899
10900 * python/py-param.c (get_set_value, get_show_value): Use
10901 gdbpy_enter, gdbpy_ref.
10902
0e9dcc75
TT
109032017-01-10 Tom Tromey <tom@tromey.com>
10904
10905 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10906
12a5cedd
TT
109072017-01-10 Tom Tromey <tom@tromey.com>
10908
10909 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10910
788f2586
TT
109112017-01-10 Tom Tromey <tom@tromey.com>
10912
10913 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10914 Use gdbpy_enter_varobj.
10915
6cd67bea
TT
109162017-01-10 Tom Tromey <tom@tromey.com>
10917
10918 * varobj.c (gdbpy_enter_varobj): New constructor.
10919 * python/python-internal.h (gdbpy_enter_varobj): New class.
10920 * python/py-varobj.c (py_varobj_get_iterator): Use
10921 gdbpy_enter_varobj.
10922
14b122bf
TT
109232017-01-10 Tom Tromey <tom@tromey.com>
10924
10925 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10926 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10927 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10928 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10929 unique_xmalloc_ptr.
10930 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10931
bf1ca3b9
TT
109322017-01-10 Tom Tromey <tom@tromey.com>
10933
10934 * python/py-xmethods.c (invoke_match_method): Use
10935 gdbpy_ref.
10936
572a5524
TT
109372017-01-10 Tom Tromey <tom@tromey.com>
10938
10939 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10940 gdbpy_enter, gdbpy_ref.
10941
396a78b6
TT
109422017-01-10 Tom Tromey <tom@tromey.com>
10943
10944 * python/python.c (python_interactive_command): Use gdbpy_enter.
10945
a88b13c7
TT
109462017-01-10 Tom Tromey <tom@tromey.com>
10947
10948 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10949 gdbpy_ref.
10950
e9f0c363
TT
109512017-01-10 Tom Tromey <tom@tromey.com>
10952
10953 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10954 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10955
6349f452
TT
109562017-01-10 Tom Tromey <tom@tromey.com>
10957
10958 * utils.h (htab_deleter): New struct.
10959 (htab_up): New typedef.
10960 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10961 gdbpy_enter, gdbpy_ref, htab_up.
10962
c0171de6
TT
109632017-01-10 Tom Tromey <tom@tromey.com>
10964
10965 * python/py-unwind.c (pending_frame_invalidate): Remove.
10966 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10967
f18e226f
TT
109682017-01-10 Tom Tromey <tom@tromey.com>
10969
10970 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10971 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10972
c57af3f1
TT
109732017-01-10 Tom Tromey <tom@tromey.com>
10974
10975 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10976
60e600ec
TT
109772017-01-10 Tom Tromey <tom@tromey.com>
10978
10979 * python/python.c (gdbpy_eval_from_control_command)
10980 (gdbpy_source_script, gdbpy_run_events)
10981 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10982 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10983 gdbpy_enter.
10984
bf7da5b0
TT
109852017-01-10 Tom Tromey <tom@tromey.com>
10986
10987 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10988
2d38bced
TT
109892017-01-10 Tom Tromey <tom@tromey.com>
10990
10991 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10992
07bc7329
TT
109932017-01-10 Tom Tromey <tom@tromey.com>
10994
10995 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10996 (python_on_inferior_call_pre, python_on_inferior_call_post)
10997 (python_on_memory_change, python_on_register_change)
10998 (python_inferior_exit, python_new_objfile, add_thread_object)
10999 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11000
6e7c365e
TT
110012017-01-10 Tom Tromey <tom@tromey.com>
11002
11003 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11004 (bpfinishpy_handle_exit): Use gdbpy_enter.
11005
6ba0cd40
TT
110062017-01-10 Tom Tromey <tom@tromey.com>
11007
11008 * python/py-cmd.c (cmdpy_destroyer)
11009 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11010 gdbpy_enter.
11011
de2dc875
TT
110122017-01-10 Tom Tromey <tom@tromey.com>
11013
11014 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11015 gdbpy_enter.
11016 (gdbpy_breakpoint_has_cond): Likewise.
11017
4ecee2c4
TT
110182017-01-10 Tom Tromey <tom@tromey.com>
11019
11020 * python/python.c (gdbpy_enter): New constructor.
11021 (~gdbpy_enter): New destructor.
11022 (restore_python_env, ensure_python_env): Rewrite.
11023 * python/python-internal.h (gdbpy_enter): New class.
11024
37fce74f
TT
110252017-01-10 Tom Tromey <tom@tromey.com>
11026
11027 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11028
53a0cca3
TT
110292017-01-10 Tom Tromey <tom@tromey.com>
11030
11031 * python/py-value.c (value_has_field, get_field_flag)
11032 (get_field_type, valpy_getitem, convert_value_from_python): Use
11033 gdbpy_ref.
11034
ff3724f5
TT
110352017-01-10 Tom Tromey <tom@tromey.com>
11036
11037 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11038 gdbpy_ref.
11039
0700aea5
TT
110402017-01-10 Tom Tromey <tom@tromey.com>
11041
11042 * python/py-prettyprint.c (search_pp_list)
11043 (find_pretty_printer_from_objfiles)
11044 (find_pretty_printer_from_progspace)
11045 (find_pretty_printer_from_gdb, find_pretty_printer)
11046 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11047 gdbpy_ref.
11048
1bb44c9f
TT
110492017-01-10 Tom Tromey <tom@tromey.com>
11050
11051 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11052
87ce03fd
TT
110532017-01-10 Tom Tromey <tom@tromey.com>
11054
11055 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11056 (ltpy_get_all_source_lines): Use gdbpy_ref.
11057
ee0a3fb8
TT
110582017-01-10 Tom Tromey <tom@tromey.com>
11059
11060 * python/py-framefilter.c (extract_sym, extract_value)
11061 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11062 gdbpy_ref.
11063
bf2a52fa
TT
110642017-01-10 Tom Tromey <tom@tromey.com>
11065
11066 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11067
f59fe7f8
TT
110682017-01-10 Tom Tromey <tom@tromey.com>
11069
11070 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11071
80bd970a
TT
110722017-01-10 Tom Tromey <tom@tromey.com>
11073
11074 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11075 gdbpy_ref.
11076
d1b3de2e
TT
110772017-01-10 Tom Tromey <tom@tromey.com>
11078
11079 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11080
3bb43384
TT
110812017-01-10 Tom Tromey <tom@tromey.com>
11082
11083 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11084 (typy_range): Use gdbpy_ref.
11085
abf5651e
TT
110862017-01-10 Tom Tromey <tom@tromey.com>
11087
11088 * python/py-threadevent.c (create_thread_event_object): Use
11089 gdbpy_ref.
11090 * python/py-stopevent.c (create_stop_event_object): Simplify.
11091 (emit_stop_event): Use gdbpy_ref.
11092 * python/py-signalevent.c (create_signal_event_object): Use
11093 gdbpy_ref.
11094 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11095 (emit_new_objfile_event, create_clear_objfiles_event_object)
11096 (emit_clear_objfiles_event): Use gdbpy_ref.
11097 * python/py-infevents.c (create_inferior_call_event_object)
11098 (create_register_changed_event_object)
11099 (create_memory_changed_event_object, emit_inferior_call_event)
11100 (emit_memory_changed_event, emit_register_changed_event): Use
11101 gdbpy_ref.
11102 * python/py-exitedevent.c (create_exited_event_object)
11103 (emit_exited_event): Use gdbpy_ref.
11104 * python/py-event.h (evpy_emit_event): Remove
11105 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11106 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11107 * python/py-continueevent.c (emit_continue_event): Use
11108 gdbpy_ref.
11109 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11110 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11111 gdbpy_ref.
11112 * python/py-bpevent.c (create_breakpoint_event_object): Use
11113 gdbpy_ref.
11114
a68ff33e
TT
111152017-01-10 Tom Tromey <tom@tromey.com>
11116
11117 * python/py-ref.h: New file.
11118
7becfd03
SM
111192017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11120
11121 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11122 void.
11123 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11124 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11125 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11126 * ui-out.c (ui_out::redirect): Likewise.
11127 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11128 * cli/cli-logging.c (set_logging_redirect): Update call site of
11129 ui_out::redirect.
11130 (handle_redirections): Likewise.
11131 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11132 * top.c (execute_command_to_string): Likewise.
11133 * utils.c (do_ui_out_redirect_pop): Likewise.
11134
df294654
SM
111352017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11136
11137 * stack.c (_initialize_stack): Update "frame" command help message.
11138
f5e6296e
IB
111392017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11140
11141 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11142
0e2d6fa6
YQ
111432017-01-06 Yao Qi <yao.qi@linaro.org>
11144
11145 * x86-linux-nat.h: Include gdb_proc_service.h.
11146
44d6d3f9
YQ
111472017-01-06 Yao Qi <yao.qi@linaro.org>
11148
11149 * ser-base.h: Include serial.h.
11150
656731fe
YQ
111512017-01-06 Yao Qi <yao.qi@linaro.org>
11152
11153 * ppc-linux-tdep.h: Include ppc-tdep.h.
11154
1ca8f924
YQ
111552017-01-06 Yao Qi <yao.qi@linaro.org>
11156
11157 * nat/amd64-linux-siginfo.h: Include signal.h.
11158
bc3008c4
YQ
111592017-01-06 Yao Qi <yao.qi@linaro.org>
11160
11161 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11162
66c80d03
YQ
111632017-01-06 Yao Qi <yao.qi@linaro.org>
11164
11165 * mi/mi-parse.h: Include mi-cmds.h.
11166
051d2dda
YQ
111672017-01-06 Yao Qi <yao.qi@linaro.org>
11168
11169 * inf-loop.c: Don't include "target.h".
11170 * inf-loop.h: Include it here.
11171
8018d34f
YQ
111722017-01-06 Yao Qi <yao.qi@linaro.org>
11173
11174 * dfp.h: Include "dboulest.h" and "expression.h".
11175
c0b8369c
YQ
111762017-01-06 Yao Qi <yao.qi@linaro.org>
11177
11178 * ax-gdb.h: Include "ax.h".
11179
ad5cba2a
YQ
111802017-01-06 Yao Qi <yao.qi@linaro.org>
11181
11182 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11183 with nat/gdb_ptrace.h.
11184
1c33cd7f
YQ
111852017-01-05 Yao Qi <yao.qi@linaro.org>
11186
11187 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11188 new line.
11189 (mips64_fbsd_sigframe_init): Likewise.
11190
c988ac1d
JB
111912017-01-04 John Baldwin <jhb@FreeBSD.org>
11192
11193 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11194 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11195
b268007c
JB
111962017-01-04 John Baldwin <jhb@FreeBSD.org>
11197
11198 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11199 * NEWS: Mention new FreeBSD/mips native configuration.
11200 * config/mips/fbsd.mh: New file.
11201 * configure.host: Add mips*-*-freebsd*.
11202 * mips-fbsd-nat.c: New file.
11203
387360da
JB
112042017-01-04 John Baldwin <jhb@FreeBSD.org>
11205
11206 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11207 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11208 * NEWS: Mention new FreeBSD/mips target.
11209 * configure.tgt: Add mips*-*-freebsd*.
11210 * mips-fbsd-tdep.c: New file.
11211 * mips-fbsd-tdep.h: New file.
11212
2aaaf250
YQ
112132017-01-04 Yao Qi <yao.qi@linaro.org>
11214
11215 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11216 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11217
61baf725
JB
112182017-01-01 Joel Brobecker <brobecker@adacore.com>
11219
6dbb839a 11220 Update copyright year range in all GDB files.
61baf725 11221
c113e7ff 112222017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 11223
c113e7ff 11224 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 11225
c113e7ff 11226For older changes see ChangeLog-2016.
c906108c
SS
11227\f
11228Local Variables:
11229mode: change-log
11230left-margin: 8
11231fill-column: 74
11232version-control: never
57da7796 11233coding: utf-8
c906108c 11234End:
This page took 3.667408 seconds and 4 git commands to generate.