S390: Add guarded-storage register support to gdbserver
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
1b63490c
AA
12017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * s390-linux-nat.c (have_regset_gs): New static variable.
4 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5 control block and guarded-storage broadcast control regsets.
6 (s390_read_description): Detect whether the target has
7 guarded-storage support, return appropriate tdesc.
8 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
9 (features/s390x-gs-linux64.c): Likewise.
10 (struct gdbarch_tdep) <have_gs>: New field.
11 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
12 (s390_gsbc_regset): New variables.
13 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
14 and s390_gsbc_regset, if applicable.
15 (s390_core_read_description): Check whether core file was from a
16 target with guarded-storage support; include appropriate regsets.
17 (s390_gdbarch_init): Add registers for guarded-storage support.
18 (_initialize_s390_tdep): Initialize new target descriptions that
19 include registers for guarded-storage support.
20 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
21 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
22 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
23 (S390_NUM_REGS): Adjust macro definition.
24 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
25 (tdesc_s390x_gs_linux64): New declarations.
26
96235dc1
AA
272017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
28
29 * features/s390-gs-linux64.xml: New file.
30 * features/s390-gs.xml: New file.
31 * features/s390-gsbc.xml: New file.
32 * features/s390x-gs-linux64.xml: New file.
33 * features/Makefile (WHICH): Add s390-gs-linux64 and
34 s390x-gs-linux64.
35 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
36 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
37 * features/s390-gs-linux64.c: New generated file.
38 * features/s390x-gs-linux64.c: New file.
39 * regformats/s390-gs-linux64.dat: New file.
40 * regformats/s390x-gs-linux64.dat: New file.
41
b4a7c699
TT
422017-09-23 Tom Tromey <tom@tromey.com>
43
44 * defs.h (make_cleanup_override_quit_handler): Don't declare.
45
c2f97536
TT
462017-09-22 Tom Tromey <tom@tromey.com>
47
48 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
49 type to scoped_restore_tmpl.
50 <scoped_input_handler>: Initialize m_quit_handler directly.
51
43573013
SDJ
522017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
53
54 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
55 (cd_command): Likewise. Free "current_directory" before
56 assigning to it.
57 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
58 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
59 * top.c (gdb_dirbuf): Remove global declaration.
60 * top.h (gdb_dirbuf): Likewise.
61
6ec2e0f5
SDJ
622017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
63
64 * gnulib/aclocal.m4: Regenerate.
65 * gnulib/config.in: Regenerate.
66 * gnulib/configure: Regenerate.
67 * gnulib/import/Makefile.am: Regenerate.
68 * gnulib/import/Makefile.in: Regenerate.
69 * gnulib/import/assure.h: New file.
70 * gnulib/import/at-func.c: Likewise
71 * gnulib/import/chdir-long.c: New file.
72 * gnulib/import/chdir-long.h: New file.
73 * gnulib/import/cloexec.c: New file.
74 * gnulib/import/cloexec.h: New file.
75 * gnulib/import/close.c: New file.
76 * gnulib/import/closedir.c: New file.
77 * gnulib/import/dirent-private.h: New file.
78 * gnulib/import/dup-safer.c: New file.
79 * gnulib/import/dup.c: New file.
80 * gnulib/import/dup2.c: New file.
81 * gnulib/import/error.c: New file.
82 * gnulib/import/error.h: New file.
83 * gnulib/import/exitfail.c: New file.
84 * gnulib/import/exitfail.h: New file.
85 * gnulib/import/fchdir.c: New file.
86 * gnulib/import/fcntl.c: New file.
87 * gnulib/import/fcntl.in.h: New file.
88 * gnulib/import/fd-hook.c: New file.
89 * gnulib/import/fd-hook.h: New file.
90 * gnulib/import/fd-safer.c: New file.
91 * gnulib/import/fdopendir.c: New file.
92 * gnulib/import/filename.h: New file.
93 * gnulib/import/filenamecat-lgpl.c: New file.
94 * gnulib/import/filenamecat.h: New file.
95 * gnulib/import/fstat.c: New file.
96 * gnulib/import/fstatat.c: New file.
97 * gnulib/import/getcwd-lgpl.c: New file.
98 * gnulib/import/getcwd.c: New file.
99 * gnulib/import/getdtablesize.c: New file.
100 * gnulib/import/getlogin_r.c: New file.
101 * gnulib/import/getprogname.c: New file.
102 * gnulib/import/getprogname.h: New file.
103 * gnulib/import/gettext.h: New file.
104 * gnulib/import/glob-libc.h: New file.
105 * gnulib/import/glob.c: New file.
106 * gnulib/import/glob.in.h: New file.
107 * gnulib/import/intprops.h: New file.
108 * gnulib/import/m4/chdir-long.m4: New file.
109 * gnulib/import/m4/close.m4: New file.
110 * gnulib/import/m4/closedir.m4: New file.
111 * gnulib/import/m4/d-ino.m4: New file.
112 * gnulib/import/m4/d-type.m4: New file.
113 * gnulib/import/m4/dup.m4: New file.
114 * gnulib/import/m4/dup2.m4: New file.
115 * gnulib/import/m4/error.m4: New file.
116 * gnulib/import/m4/fchdir.m4: New file.
117 * gnulib/import/m4/fcntl.m4: New file.
118 * gnulib/import/m4/fcntl_h.m4: New file.
119 * gnulib/import/m4/fdopendir.m4: New file.
120 * gnulib/import/m4/filenamecat.m4: New file.
121 * gnulib/import/m4/fstat.m4: New file.
122 * gnulib/import/m4/fstatat.m4: New file.
123 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
124 * gnulib/import/m4/getcwd-path-max.m4: New file.
125 * gnulib/import/m4/getcwd.m4: New file.
126 * gnulib/import/m4/getdtablesize.m4: New file.
127 * gnulib/import/m4/getlogin_r.m4: New file.
128 * gnulib/import/m4/getprogname.m4: New file.
129 * gnulib/import/m4/glob.m4: New file.
130 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
131 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
132 * gnulib/import/m4/mempcpy.m4: New file.
133 * gnulib/import/m4/memrchr.m4: New file.
134 * gnulib/import/m4/mode_t.m4: New file.
135 * gnulib/import/m4/msvc-inval.m4: New file.
136 * gnulib/import/m4/msvc-nothrow.m4: New file.
137 * gnulib/import/m4/open.m4: New file.
138 * gnulib/import/m4/openat.m4: New file.
139 * gnulib/import/m4/opendir.m4: New file.
140 * gnulib/import/m4/readdir.m4: New file.
141 * gnulib/import/m4/realloc.m4: New file.
142 * gnulib/import/m4/rewinddir.m4: New file.
143 * gnulib/import/m4/save-cwd.m4: New file.
144 * gnulib/import/m4/strdup.m4: New file.
145 * gnulib/import/m4/strerror.m4: New file.
146 * gnulib/import/m4/unistd-safer.m4: New file.
147 * gnulib/import/mempcpy.c: New file.
148 * gnulib/import/memrchr.c: New file.
149 * gnulib/import/msvc-inval.c: New file.
150 * gnulib/import/msvc-inval.h: New file.
151 * gnulib/import/msvc-nothrow.c: New file.
152 * gnulib/import/msvc-nothrow.h: New file.
153 * gnulib/import/open.c: New file.
154 * gnulib/import/openat-die.c: New file.
155 * gnulib/import/openat-priv.h: New file.
156 * gnulib/import/openat-proc.c: New file.
157 * gnulib/import/openat.c: New file.
158 * gnulib/import/openat.h: New file.
159 * gnulib/import/opendir.c: New file.
160 * gnulib/import/pipe-safer.c: New file.
161 * gnulib/import/readdir.c: New file.
162 * gnulib/import/realloc.c: New file.
163 * gnulib/import/rewinddir.c: New file.
164 * gnulib/import/save-cwd.c: New file.
165 * gnulib/import/save-cwd.h: New file.
166 * gnulib/import/strdup.c: New file.
167 * gnulib/import/strerror-override.c: New file.
168 * gnulib/import/strerror-override.h: New file.
169 * gnulib/import/strerror.c: New file.
170 * gnulib/import/unistd--.h: New file.
171 * gnulib/import/unistd-safer.h: New file.
172 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
173 "getcwd" and "glob".
174 * ser-tcp.c: Undefine "close" before redefining it.
175
432ae719
SM
1762017-09-21 Simon Marchi <simon.marchi@ericsson.com>
177
178 * guile/scm-value.c (gdbscm_value_address): Initialize address,
179 get rid of res_val.
180
4fa7574e
RO
1812017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
182
183 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
184 <sol2,sparc>: Likewise.
185 <sol2-64,i386>: Likewise.
186
187 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
188 -Wdeprecated-declarations on *-*-solaris*.
189 * configure: Regenerate.
190
191 * procfs.c: Include "nat/inferior.h".
192 (procfs_info_proc): Fix typo.
193
f6327dcb
KB
1942017-09-21 Kevin Buettner <kevinb@redhat.com>
195
196 * remote.c (vector): Include.
197 (struct private_thread_info): Add field, thread_handle.
198 (free_private_thread_info): Deallocate storage associated with
199 thread handle.
200 (get_private_info_thread): Initialize `thread_handle' field.
201 (struct thread_item): Add field, thread_handle.
202 (clear_threads_listing_context): Deallocate storage associated
203 with thread handle.
204 (start_thread): Add support for "handle" attribute.
205 (thread_attributes): Add "handle".
206 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
207 field.
208 (remote_update_thread_list): Update thread_handle.
209 (remote_thread_handle_to_thread_info): New function.
210 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
211
fbbe5337
KB
2122017-09-21 Kevin Buettner <kevinb@redhat.com>
213
214 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
215 function.
216 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
217 * python/python-internal.h (thread_object_type): Declare.
218
e04ee09e
KB
2192017-09-21 Kevin Buettner <kevinb@redhat.com>
220
221 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
222 (target_thread_handle_to_thread_info): Declare.
223 * target.c (target_thread_handle_to_thread_info): New function.
224 * target-delegates.c: Regenerate.
225 * gdbthread.h (find_thread_by_handle): Declare.
226 * thread.c (find_thread_by_handle): New function.
227 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
228 function.
229 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
230
1e5b66ed
SM
2312017-09-21 Simon Marchi <simon.marchi@ericsson.com>
232
233 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
234
ebe48ba0
SM
2352017-09-21 Simon Marchi <simon.marchi@ericsson.com>
236
237 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
238
0a0bf5dc
YQ
2392017-09-21 Yao Qi <yao.qi@linaro.org>
240
241 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
242 to gdb_target_obs.
243
d1b0a7bf
TT
2442017-09-20 Tom Tromey <tom@tromey.com>
245
246 * breakpoint.c (struct counted_command_line): Remove.
247 (breakpoint_commands): Update.
248 (alloc_counted_command_line, incref_counted_command_line)
249 (decref_counted_command_line, do_cleanup_counted_command_line)
250 (make_cleanup_decref_counted_command_line): Remove.
251 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
252 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
253 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
254 (save_breakpoints): Update.
255 * breakpoint.h (counted_command_line): Now a typedef to
256 shared_ptr.
257 (struct breakpoint) <commands>: Now a counted_command_line.
258 (struct bpstats) <command>: Likewise.
259
48649e1b
TT
2602017-09-20 Tom Tromey <tom@tromey.com>
261
262 * breakpoint.c (struct commands_info, do_map_commands_command):
263 Remove.
264 (commands_command_1): Update.
265 (iterate_over_related_breakpoints): Take a function_view.
266 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
267 (delete_command): Update.
268 (map_breakpoint_numbers): Take a function_view.
269 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
270 (disable_command): Update.
271 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
272 (enable_command): Update.
273 (struct disp_data, do_enable_breakpoint_disp)
274 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
275 (do_map_enable_delete_breakpoint): Remove.
276 (enable_once_command, enable_count_command, enable_delete_command)
277 (delete_trace_variable_command): Update.
278
04afa70c
TT
2792017-09-20 Tom Tromey <tom@tromey.com>
280
281 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
282 (bpstat_clear): Use delete.
283 (bpstats): New constructors.
284 (bpstat_copy, bpstat_stop_status): Use new.
285 (dprintf_after_condition_true): Update.
286 * breakpoint.h (bpstats::bpstats): Add constructors.
287 (bpstats::~bpstats): Add destructor.
288
c83833f4
PA
2892017-09-20 Pedro Alves <palves@redhat.com>
290
291 * eval.c (make_params): Delete, refactored as ...
292 (class fake_method): ... this new type's ctor.
293 (fake_method::~fake_method): New.
294 (evaluate_subexp_standard): Use 'fake_method'.
295
223ffa71
TT
2962017-09-20 Tom Tromey <tom@tromey.com>
297
298 * windows-nat.c (get_windows_debug_event, windows_wait)
299 (do_initial_windows_stuff, windows_attach): Update.
300 * utils.c (vwarning, internal_vproblem): Update.
301 (ui_unregister_input_event_handler_cleanup)
302 (prepare_to_handle_input): Remove.
303 (class scoped_input_handler): New.
304 (defaulted_query, prompt_for_continue): Update.
305 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
306 Update.
307 * top.c (undo_terminal_modifications_before_exit): Update.
308 * target/target.h (target_terminal_init, target_terminal_inferior)
309 (target_terminal_ours): Don't declare.
310 (class target_terminal): New.
311 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
312 (target_terminal_ours_for_output)
313 (make_cleanup_restore_target_terminal): Don't declare.
314 (target_terminal_info): Remove.
315 * target.c (enum terminal_state, terminal_state): Remove.
316 (target_terminal::terminal_state): Define.
317 (target_terminal::init): Rename from target_terminal_init.
318 (target_terminal::inferior): Rename from
319 target_terminal_inferior.
320 (target_terminal::ours): Rename from target_terminal_ours.
321 (target_terminal::ours_for_output): Rename from
322 target_terminal_ours_for_output.
323 (target_terminal::info): New method.
324 (cleanup_restore_target_terminal)
325 (make_cleanup_restore_target_terminal): Remove.
326 * solib.c (handle_solib_event): Update.
327 * remote.c (remote_serial_quit_handler): Update.
328 (remote_terminal_inferior, remote_wait_as): Update.
329 * record-full.c (record_full_wait_1): Update.
330 * nto-procfs.c (procfs_create_inferior): Update.
331 * nat/fork-inferior.c (startup_inferior): Update.
332 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
333 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
334 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
335 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
336 (mi_breakpoint_created, mi_breakpoint_deleted)
337 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
338 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
339 (mi_user_selected_context_changed, report_initial_inferior):
340 Update.
341 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
342 (linux_nat_terminal_inferior): Update.
343 * infrun.c (follow_fork_inferior)
344 (handle_vfork_child_exec_or_exit, do_target_resume)
345 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
346 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
347 Update.
348 * inflow.c (child_terminal_init, info_terminal_command): Update.
349 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
350 (attach_command): Update.
351 * infcall.c (call_thread_fsm_should_stop): Update.
352 * gnu-nat.c (gnu_attach): Update.
353 * extension.c (struct active_ext_lang_state)
354 (restore_active_ext_lang): Update.
355 * exceptions.c (print_flush): Update.
356 * event-top.c (async_enable_stdin, default_quit_handler): Update.
357 (struct quit_handler_cleanup_data, restore_quit_handler)
358 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
359 Remove.
360 * cp-support.c (gdb_demangle): Update.
361 * breakpoint.c (update_inserted_breakpoint_locations)
362 (insert_breakpoint_locations, handle_jit_event)
363 (disable_breakpoints_in_unloaded_shlib): Update.
364 * annotate.c (annotate_breakpoints_invalid)
365 (annotate_frames_invalid): Update.
366
013af3fc
TT
3672017-09-20 Tom Tromey <tom@tromey.com>
368
369 * main.c (catch_command_errors): Rename from
370 catch_command_errors_const.
371 (captured_main_1): Update.
372
06871ae8
PA
3732017-09-20 Pedro Alves <palves@redhat.com>
374
375 * cli/cli-cmds.c (list_command): Use print_sal_location.
376 (print_sal_location): New function.
377 (ambiguous_line_spec): Use print_sal_location.
378 * linespec.c (symbol_to_sal): Record the symbol in the sal.
379 * symtab.c (find_function_start_sal): Likewise.
380 * symtab.h (symtab_and_line::symbol): New field.
381
e5f25bc5
PA
3822017-09-20 Pedro Alves <palves@redhat.com>
383
384 * linespec.c (minsym_found): Handle non-text minsyms.
385 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
386
1b7fa39e
WT
3872017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
388
389 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
390 backslash.
391
37dd0825
WT
3922017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
393
394 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
395 vmovups instead vmovaps.
396 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
397
4e5a4f58
JB
3982017-09-19 John Baldwin <jhb@FreeBSD.org>
399
400 * NEWS (Changes since GDB 8.0): Add starti.
401 * infcmd.c (enum run_break): New.
402 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
403 case.
404 (run_command): Use enum run_how.
405 (start_command): Likewise.
406 (starti_command): New function.
407 (RUN_ARGS_HELP): New macro.
408 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
409 commands. Add starti command.
410
aa70c9f1
YQ
4112017-09-19 Yao Qi <yao.qi@linaro.org>
412
413 * Makefile.in (monitor.o): Remove the rule.
414
d6541620
YQ
4152017-09-19 Yao Qi <yao.qi@linaro.org>
416
417 * annotate.h (struct annotate_arg_emitter): Use
418 DISABLE_COPY_AND_ASSIGN.
419 * common/refcounted-object.h (refcounted_object): Likewise.
420 * completer.h (struct completion_result): Likewise.
421 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
422 * filename-seen-cache.h (filename_seen_cache): Likewise.
423 * gdbcore.h (thread_section_name): Likewise.
424 * gdb_regex.h (compiled_regex): Likewise.
425 * gdbthread.h (scoped_restore_current_thread): Likewise.
426 * inferior.h (scoped_restore_current_inferior): Likewise.
427 * jit.c (jit_reader): Likewise.
428 * linespec.h (struct linespec_result): Likewise.
429 * mi/mi-parse.h (struct mi_parse): Likewise.
430 * nat/fork-inferior.c (execv_argv): Likewise.
431 * progspace.h (scoped_restore_current_program_space): Likewise.
432 * python/python-internal.h (class gdbpy_enter): Likewise.
433 * regcache.h (regcache): Likewise.
434 * target-descriptions.c (struct tdesc_reg): Likewise.
435 (struct tdesc_type): Likewise.
436 (struct tdesc_feature): Likewise.
437 * ui-out.h (ui_out_emit_type): Likewise.
438
0615127c
SM
4392017-09-18 Simon Marchi <simon.marchi@ericsson.com>
440
441 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
442 label abort_expression.
443
5e187554
SM
4442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
445
446 * common/buffer.c (buffer_xml_printf): Adjust.
447 * common/xml-utils.c (xml_escape_text): Change return type to
448 std::string, update code accordingly.
449 * common/xml-utils.h (xml_escape_text): Change return type to
450 std::string.
451 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
452 * windows-tdep.c (windows_xfer_shared_library): Adjust.
453 * unittests/xml-utils-selftests.c (test_xml_escape_text):
454 Adjust.
455
c3d7b541
SM
4562017-09-16 Simon Marchi <simon.marchi@ericsson.com>
457
458 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
459 (SUBDIR_UNITTESTS_OBS): Add new object file.
460 * unittests/xml-utils-selftests.c: New file.
461
1526853e
SM
4622017-09-16 Simon Marchi <simon.marchi@ericsson.com>
463
464 * common/selftest.h (selftest): New struct/interface.
465 (register_test): Add name parameter, add new overload.
466 (run_tests): Add filter parameter.
467 (for_each_selftest_ftype): New typedef.
468 (for_each_selftest): New declaration.
469 * common/selftest.c (tests): Change type to
470 map<string, unique_ptr<selftest>>.
471 (simple_selftest): New struct.
472 (register_test): New function.
473 (register_test): Add name parameter and use it.
474 (run_tests): Add filter parameter and use it. Add prints.
475 Adjust to vector -> map change.
476 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
477 registering selftests.
478 * arm-tdep.c (_initialize_arm_tdep): Likewise.
479 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
480 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
481 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
482 * findvar.c (_initialize_findvar): Likewise.
483 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
484 * maint.c (maintenance_selftest): Update call to run_tests.
485 (maintenance_info_selftests): New function.
486 (_initialize_maint_cmds): Register "maintenance info selftests"
487 command. Update "maintenance selftest" doc.
488 * regcache.c (_initialize_regcache): Add names when registering
489 selftests.
490 * rust-exp.y (_initialize_rust_exp): Likewise.
491 * selftest-arch.c (gdbarch_selftest): New struct.
492 (gdbarch_tests): Remove.
493 (register_test_foreach_arch): Add name parameter. Call
494 register_test.
495 (tests_with_arch): Remove, move most content to
496 gdbarch_selftest::operator().
497 (_initialize_selftests_foreach_arch): Remove.
498 * selftest-arch.h (register_test_foreach_arch): Add name
499 parameter.
500 (run_tests_with_arch): New declaration.
501 * utils-selftests.c (_initialize_utils_selftests): Add names
502 when registering selftests.
503 * utils.c (_initialize_utils): Likewise.
504 * unittests/array-view-selftests.c
505 (_initialize_array_view_selftests): Likewise.
506 * unittests/environ-selftests.c (_initialize_environ_selftests):
507 Likewise.
508 * unittests/function-view-selftests.c
509 (_initialize_function_view_selftests): Likewise.
510 * unittests/offset-type-selftests.c
511 (_initialize_offset_type_selftests): Likewise.
512 * unittests/optional-selftests.c
513 (_initialize_optional_selftests): Likewise.
514 * unittests/scoped_restore-selftests.c
515 (_initialize_scoped_restore_selftests): Likewise.
516 * NEWS: Document "maintenance selftest" and "maint info
517 selftests".
518
5846367a
SM
5192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
520
521 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
522 scoped_restore.
523
bd77e8ff
SM
5242017-09-16 Simon Marchi <simon.marchi@ericsson.com>
525
526 * mi/mi-main.c (mi_load_progress): Make uiout variable
527 a unique_ptr.
528
26a67918
PA
5292017-09-15 Pedro Alves <palves@redhat.com>
530
531 * compile/compile-c-types.c (convert_enum, convert_int)
532 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
533
3f8a7804
SM
5342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
535
536 * dwarf2read.c (copy_string): Remove.
537 (parse_macro_definition): Replace copy_string with savestring.
538
8d200706
YQ
5392017-09-15 Yao Qi <yao.qi@linaro.org>
540
541 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
542 gdb_target_obs.
543 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
544 Likewise.
545 (i[34567]86-*-linux*): Likewise.
546
d185219d
SM
5472017-09-14 Simon Marchi <simon.marchi@ericsson.com>
548
549 * dwarf2expr.h (dwarf_stack_value): Add constructor.
550 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
551 <stack>: Change type to std::vector.
552 <stack_len, stack_allocated>: Remove.
553 <grow_stack>: Remove.
554 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
555 (dwarf_expr_context::~dwarf_expr_context): Remove.
556 (dwarf_expr_context::grow_stack): Remove.
557 (dwarf_expr_context::push): Adjust.
558 (dwarf_expr_context::pop): Adjust.
559 (dwarf_expr_context::fetch): Adjust.
560 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
561 (dwarf_expr_context::stack_empty_p): Adjust.
562 (dwarf_expr_context::execute_stack_op): Adjust.
563
eccd80d6
SM
5642017-09-14 Simon Marchi <simon.marchi@ericsson.com>
565
566 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
567 return type to bool.
568 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
569
69009882
SM
5702017-09-14 Simon Marchi <simon.marchi@ericsson.com>
571
572 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
573 Change type to bool.
574 (dwarf_stack_value) <in_stack_memory>: Likewise.
575 (dwarf_expr_context) <push_address>: Change parameter type to
576 bool.
577 <fetch_in_stack_memory>: Change return type to bool.
578 <push>: Change parameter type to bool.
579 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
580 to bool.
581 (dwarf_expr_context::push_address): Likewise.
582 (dwarf_expr_context::fetch_in_stack_memory): Change return type
583 to bool.
584 (dwarf_expr_context::execute_stack_op): Adjust.
585 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
586
1e467161
SM
5872017-09-14 Simon Marchi <simon.marchi@ericsson.com>
588
589 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
590 (struct dwarf_expr_context) <n_pieces>: Remove.
591 <pieces>: Change type to std::vector.
592 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
593 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
594 pieces.
595 (dwarf_expr_context::add_piece): Adjust.
596 * dwarf2loc.c (struct piece_closure): Initialize fields.
597 <n_pieces>: Remove.
598 <pieces>: Change type to std::vector.
599 (allocate_piece_closure): Adjust, change parameter to
600 std::vector rvalue and std::move it to piece_closure.
601 (rw_pieced_value): Adjust.
602 (check_pieced_synthetic_pointer): Adjust.
603 (indirect_synthetic_pointer): Adjust.
604 (coerce_pieced_ref): Adjust.
605 (free_pieced_value_closure): Adjust. Use delete to free
606 piece_closure.
607 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
608 to allocate_piece_closure.
609 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
610
0782db84
SM
6112017-09-12 Simon Marchi <simon.marchi@ericsson.com>
612
613 * probe.h (probe_ops_cp): Remove typedef.
614 (DEF_VEC_P (probe_ops_cp)): Remove.
615 (all_probe_ops): Change type to std::vector.
616 * probe.c (info_probes_for_ops): Adjust to vector change.
617 (probe_linespec_to_ops): Likewise.
618 (all_probe_ops): Change type to std::vector.
619 (_initialize_probe): Adjust to vector change.
620 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
621 * elfread.c (elf_get_probes): Likewise.
622 * stap-probe.c (_initialize_stap_probe): Likewise.
623
1eac6bea
SM
6242017-09-12 Simon Marchi <simon.marchi@ericsson.com>
625
626 * probe.h (struct bound_probe): Define constructors.
627 * probe.c (bound_probe_s): Remove typedef.
628 (DEF_VEC_O (bound_probe_s)): Remove VEC.
629 (collect_probes): Change return type to std::vector, remove
630 cleanup.
631 (compare_probes): Return bool, change parameter type. Change
632 semantic to "less than".
633 (gen_ui_out_table_header_info): Change parameter to std::vector
634 and update.
635 (exists_probe_with_pops): Likewise.
636 (info_probes_for_ops): Update to std::vector change.
637 (enable_probes_command): Likewise.
638 (disable_probes_command): Likewise.
639
aaa63a31
SM
6402017-09-12 Simon Marchi <simon.marchi@ericsson.com>
641
642 * probe.h (struct probe_ops) <get_probes>: Change parameter from
643 vec to std::vector.
644 * probe.c (parse_probes_in_pspace): Update.
645 (find_probes_in_objfile): Update.
646 (find_probe_by_pc): Update.
647 (collect_probes): Update.
648 (probe_any_get_probes): Update.
649 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
650 return type to reference to std::vector.
651 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
652 std::vector and update.
653 (dtrace_process_dof): Likewise.
654 (dtrace_get_probes): Likewise.
655 * elfread.c (elf_get_probes): Change return type to std::vector,
656 store an std::vector in bfd_data.
657 (probe_key_free): Update to std::vector.
658 * stap-probe.c (handle_stap_probe): Change parameter to
659 std::vector and update.
660 (stap_get_probes): Likewise.
661 * symfile-debug.c (debug_sym_get_probes): Change return type to
662 std::vector and update.
663
cb85b21b
TT
6642017-09-11 Tom Tromey <tom@tromey.com>
665
666 * breakpoint.c (program_breakpoint_here_p): Update.
667 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
668 from make_show_memory_breakpoints_cleanup. Return a
669 scoped_restore_tmpl<int>.
670 (restore_show_memory_breakpoints): Remove.
671 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
672 * mem-break.c (memory_validate_breakpoint): Update.
673 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
674 (ia64_memory_remove_breakpoint): Update.
675 (ia64_breakpoint_from_pc): Update.
676 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
677 from make_show_memory_breakpoints_cleanup.
678
8fbc99ef
TT
6792017-09-11 Tom Tromey <tom@tromey.com>
680
681 * d-namespace.c (d_lookup_symbol): Use std::string.
682 (find_symbol_in_baseclass): Likewise.
683
50feb4bd
TT
6842017-09-11 Tom Tromey <tom@tromey.com>
685
686 * ctf.c (ctf_start): Use std::string.
687
c6dc63a1
TT
6882017-09-11 Tom Tromey <tom@tromey.com>
689
690 * ada-lang.c (is_known_support_routine): Update.
691 (ada_unhandled_exception_name_addr_from_raise): Update.
692 * guile/scm-frame.c (gdbscm_frame_name): Update.
693 * python/py-frame.c (frapy_name): Update.
694 (frapy_function): Update.
695 * stack.h (find_frame_funname): Update.
696 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
697 (print_frame): Update.
698
d6b9b80f
TT
6992017-09-11 Tom Tromey <tom@tromey.com>
700
701 * findcmd.c (put_bits): Take a gdb::byte_vector.
702 (parse_find_args): Return gdb::byte_vector. "args" now const.
703 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
704 cleanups.
705 (find_command): Update.
706
a9921622
TT
7072017-09-11 Tom Tromey <tom@tromey.com>
708
709 * cli/cli-script.c (class scoped_restore_hook_in): New.
710 (clear_hook_in_cleanup): Remove.
711 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
712 scoped_restore_hook_in.
713
be0d7abb
TT
7142017-09-11 Tom Tromey <tom@tromey.com>
715
716 * cli/cli-script.c (restore_interp): Remove.
717 (read_command_lines): Use scoped_restore_interp.
718 * interps.c (scoped_restore_interp::set_temp): Rename from
719 interp_set_temp.
720 * interps.h (class scoped_restore_interp): New.
721 (interp_set_temp): Remove.
722
00f675ff
TT
7232017-09-11 Tom Tromey <tom@tromey.com>
724
725 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
726 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
727 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
728 scoped_restore.
729 (mi_cmd_break_insert_1): Update.
730 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
731 scoped_restore.
732
cb791d59
TT
7332017-09-11 Tom Tromey <tom@tromey.com>
734
735 * demangle.c (demangle_command): Update.
736 * breakpoint.c (disable_command): Update.
737 (enable_command): Update.
738 (find_location_by_number): Make "number" const. Use
739 get_number_trailer.
740 * cli/cli-utils.c (extract_arg): Return std::string.
741 * probe.c (parse_probe_linespec): Update. Change types.
742 (collect_probes): Take string arguments.
743 (parse_probe_linespec): Likewise.
744 (info_probes_for_ops): Update.
745 (enable_probes_command): Update.
746 (disable_probes_command): Update.
747 * break-catch-sig.c (catch_signal_split_args): Update.
748 * mi/mi-parse.c (mi_parse): Update.
749
2039bd9f
TT
7502017-09-11 Tom Tromey <tom@tromey.com>
751
752 * language.h (language_enum): Make argument const.
753 * language.c (language_enum): Make argument const.
754
f1735a53
TT
7552017-09-11 Tom Tromey <tom@tromey.com>
756
757 * common/common-utils.h (skip_to_space): Remove macro, redeclare
758 as function.
759 (skip_to_space): Rename from skip_to_space_const.
760 * common/common-utils.c (skip_to_space): New function.
761 (skip_to_space): Rename from skip_to_space_const.
762 * cli/cli-utils.h (get_number): Rename from get_number_const.
763 (extract_arg): Rename from extract_arg_const.
764 * cli/cli-utils.c (get_number): Rename from get_number_const.
765 (extract_arg): Rename from extract_arg_const.
766 (number_or_range_parser::get_number): Use ::get_number.
767 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
768 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
769 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
770 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
771 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
772 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
773 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
774 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
775
7d221d74
TT
7762017-09-11 Tom Tromey <tom@tromey.com>
777
778 * python/python.c (do_start_initialization): Use
779 py-event-types.def to initialize types.
780 Define all object type structures.
781 * python/python-internal.h: Don't declare event initialization
782 functions.
783 * python/py-threadevent.c (thread_event_object_type): Don't
784 define.
785 * python/py-stopevent.c (stop_event_object_type): Don't define.
786 * python/py-signalevent.c (signal_event_object_type): Don't
787 declare or define.
788 * python/py-newobjfileevent.c (new_objfile_event_object_type)
789 (clear_objfiles_event_object_type): Don't declare or define.
790 * python/py-infevents.c (inferior_call_pre_event_object_type)
791 (inferior_call_post_event_object_type)
792 (register_changed_event_object_type)
793 (memory_changed_event_object_type): Don't declare or define.
794 * python/py-inferior.c (new_thread_event_object_type)
795 (new_inferior_event_object_type)
796 (inferior_deleted_event_object_type): Don't declare or define.
797 * python/py-exitedevent.c (exited_event_object_type): Don't
798 declare or define.
799 * python/py-evts.c (gdbpy_initialize_py_events): Use
800 py-all-events.def.
801 * python/py-events.h (thread_event_object_type): Don't declare.
802 (events_object): Use py-all-events.def.
803 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
804 py-event-types.def.
805 * python/py-event-types.def: New file.
806 * python/py-continueevent.c (create_continue_event_object): Don't
807 declare or define.
808 * python/py-bpevent.c (breakpoint_event_object_type): Don't
809 declare or define.
810 * python/py-all-events.def: New file.
811
35c61a1d
TT
8122017-09-11 Tom Tromey <tom@tromey.com>
813
814 * python/py-threadevent.c (create_thread_event_object): Return
815 gdbpy_ref.
816 * python/py-stopevent.h (create_stop_event_object)
817 (create_breakpoint_event_object, create_signal_event_object):
818 Update.
819 * python/py-stopevent.c (create_stop_event_object): Return
820 gdbpy_ref.
821 (emit_stop_event): Update.
822 * python/py-signalevent.c (create_signal_event_object): Return
823 gdbpy_ref.
824 * python/py-infevents.c (create_inferior_call_event_object):
825 Update.
826 * python/py-event.h (create_event_object)
827 (create_thread_event_object): Update.
828 * python/py-event.c (create_event_object): Return gdbpy_ref.
829 * python/py-continueevent.c: Return gdbpy_ref.
830 * python/py-bpevent.c (create_breakpoint_event_object): Return
831 gdbpy_ref.
832
7c96f8c1
TT
8332017-09-11 Tom Tromey <tom@tromey.com>
834
835 PR python/15622:
836 * NEWS: Add entry.
837 * python/python.c (do_start_initialization): Initialize new event
838 types.
839 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
840 (gdbpy_initialize_inferior_deleted_event)
841 (gdbpy_initialize_new_thread_event): Declare.
842 * python/py-threadevent.c (create_thread_event_object): Add option
843 "thread" parameter.
844 * python/py-inferior.c (new_thread_event_object_type)
845 (new_inferior_event_object_type)
846 (inferior_deleted_event_object_type): Declare.
847 (python_new_inferior, python_inferior_deleted): New functions.
848 (add_thread_object): Emit new_thread event.
849 (gdbpy_initialize_inferior): Attach new functions to corresponding
850 observers.
851 (new_thread, new_inferior, inferior_deleted): Define new event
852 types.
853 * python/py-evts.c (gdbpy_initialize_py_events): Add new
854 registries.
855 * python/py-events.h (events_object) <new_inferior,
856 inferior_deleted, new_thread>: New fields.
857 * python/py-event.h (create_thread_event_breakpoint): Add optional
858 "thread" parameter.
859
72542b8e
AB
8602017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
861
862 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
863 check current_ui instead.
864 (internal_vproblem): Likewise.
865
0d64823e
SM
8662017-09-09 Simon Marchi <simon.marchi@ericsson.com>
867
868 * thread.c (print_thread_info_1): Remove unnecessary calls to
869 uiout->is_mi_like_p.
870
eb1e02fd
TT
8712017-09-09 Tom Tromey <tom@tromey.com>
872
873 * namespace.h (add_using_directive): Update.
874 * namespace.c (add_using_directive): Change type of excludes to
875 std::vector.
876 * dwarf2read.c (read_import_statement): Use std::vector.
877 (read_namespace): Update.
878 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
879
0fc21fd8
TT
8802017-09-09 Tom Tromey <tom@tromey.com>
881
882 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
883
49663d05
TT
8842017-09-09 Tom Tromey <tom@tromey.com>
885
886 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
887
0b868b60
TT
8882017-09-09 Tom Tromey <tom@tromey.com>
889
890 * stack.c (func_command): Use gdb::def_vector.
891
c0470d48
TT
8922017-09-09 Tom Tromey <tom@tromey.com>
893
894 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
895 ui_out_emit_list, ui_out_emit_tuple.
896 (mi_cmd_var_update): Likewise.
897
ca5909c7
TT
8982017-09-09 Tom Tromey <tom@tromey.com>
899
900 * mi/mi-interp.c (mi_user_selected_context_changed): Use
901 ui_out_redirect_pop.
902 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
903 ui_out_redirect_pop.
904 * utils.c (do_ui_out_redirect_pop)
905 (make_cleanup_ui_out_redirect_pop): Remove.
906 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
907 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
908 * ui-out.h (ui_out_redirect_pop): New class.
909
e6a2252a
TT
9102017-09-09 Tom Tromey <tom@tromey.com>
911
912 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
913 (list_available_thread_groups, mi_cmd_list_thread_groups)
914 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
915 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
916 Likewise.
917
393702cd
TT
9182017-09-09 Tom Tromey <tom@tromey.com>
919
920 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
921 ui_out_emit_tuple.
922
76f9c9cf
TT
9232017-09-09 Tom Tromey <tom@tromey.com>
924
925 * target.c (flash_erase_command): Use ui_out_emit_tuple.
926 * stack.c (print_frame): Use ui_out_emit_tuple.
927 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
928 (info_spu_mailbox_command, info_spu_dma_command)
929 (info_spu_proxydma_command): Likewise.
930 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
931 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
932 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
933 ui_out_emit_tuple.
934 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
935
dc9fe180
TT
9362017-09-09 Tom Tromey <tom@tromey.com>
937
938 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
939 (class ui_out_emit_table): Update comment.
940 * ui-out.c (do_cleanup_table_end)
941 (make_cleanup_ui_out_table_begin_end): Remove.
942 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
943 (info_spu_dma_cmdlist): Likewise.
944 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
945 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
946 ui_out_emit_table.
947
f8cc3da6
TT
9482017-09-09 Tom Tromey <tom@tromey.com>
949
950 * thread.c (print_thread_info_1): Use ui_out_emit_table,
951 ui_out_emit_list, gdb::optional.
952
481695ed
JB
9532017-09-09 John Baldwin <jhb@FreeBSD.org>
954
955 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
956 prototype.
957 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
958 prototype.
959 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
960 prototype.
961 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
962 * ada-exp.y: Remove _initialize_ada_exp prototype.
963 * ada-lang.c: Remove _initialize_ada_language prototype.
964 * ada-tasks.c: Remove _initialize_tasks prototype.
965 * addrmap.c: Remove _initialize_addrmap prototype.
966 * agent.c: Remove _initialize_agent prototype.
967 * aix-thread.c: Remove _initialize_aix_thread prototype.
968 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
969 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
970 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
971 prototype.
972 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
973 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
974 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
975 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
976 prototype.
977 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
978 prototype.
979 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
980 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
981 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
982 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
983 prototype.
984 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
985 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
986 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
987 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
988 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
989 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
990 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
991 prototype.
992 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
993 prototype.
994 * annotate.c: Remove _initialize_annotate prototype.
995 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
996 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
997 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
998 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
999 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1000 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1001 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1002 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1003 prototype.
1004 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1005 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1006 * auto-load.c: Remove _initialize_auto_load prototype.
1007 * auxv.c: Remove _initialize_auxv prototype.
1008 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1009 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1010 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1011 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1012 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1013 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1014 prototype.
1015 * break-catch-throw.c: Remove _initialize_break_catch_throw
1016 prototype.
1017 * breakpoint.c: Remove _initialize_breakpoint prototype.
1018 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1019 * btrace.c: Remove _initialize_btrace prototype.
1020 * charset.c: Remove _initialize_charset prototype.
1021 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1022 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1023 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1024 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1025 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1026 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1027 * coffread.c: Remove _initialize_coffread prototype.
1028 * compile/compile.c: Remove _initialize_compile prototype.
1029 * complaints.c: Remove _initialize_complaints prototype.
1030 * completer.c: Remove _initialize_completer prototype.
1031 * copying.awk: Remove _initialize_copying prototype.
1032 * copying.c: Regenerate.
1033 * core-regset.c: Remove _initialize_core_regset prototype.
1034 * corefile.c: Remove _initialize_core prototype.
1035 * corelow.c: Remove _initialize_corelow prototype.
1036 * cp-abi.c: Remove _initialize_cp_abi prototype.
1037 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1038 * cp-support.c: Remove _initialize_cp_support prototype.
1039 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1040 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1041 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1042 * ctf.c: Remove _initialize_ctf prototype.
1043 * d-lang.c: Remove _initialize_d_language prototype.
1044 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1045 prototype.
1046 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1047 * dbxread.c: Remove _initialize_dbxread prototype.
1048 * dcache.c: Remove _initialize_dcache prototype.
1049 * demangle.c: Remove _initialize_demangler prototype.
1050 * disasm-selftests.c: Remove _initialize_disasm_selftests
1051 prototype.
1052 * disasm.c: Remove _initialize_disasm prototype.
1053 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1054 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1055 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1056 prototype.
1057 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1058 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1059 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1060 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1061 * elfread.c: Remove _initialize_elfread prototype.
1062 * exec.c: Remove _initialize_exec prototype.
1063 * extension.c: Remove _initialize_extension prototype.
1064 * f-lang.c: Remove _initialize_f_language prototype.
1065 * f-valprint.c: Remove _initialize_f_valprint prototype.
1066 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1067 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1068 * filesystem.c: Remove _initialize_filesystem prototype.
1069 * findcmd.c: Remove _initialize_mem_search prototype.
1070 * fork-child.c: Remove _initialize_fork_child prototype.
1071 * frame-base.c: Remove _initialize_frame_base prototype.
1072 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1073 * frame.c: Remove _initialize_frame prototype.
1074 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1075 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1076 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1077 * gcore.c: Remove _initialize_gcore prototype.
1078 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1079 * gdbarch.c: Regenerate.
1080 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1081 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1082 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1083 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1084 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1085 * go-lang.c: Remove _initialize_go_language prototype.
1086 * go32-nat.c: Remove _initialize_go32_nat prototype.
1087 * guile/guile.c: Remove _initialize_guile prototype.
1088 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1089 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1090 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1091 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1092 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1093 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1094 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1095 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1096 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1097 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1098 prototype.
1099 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1100 prototype.
1101 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1102 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1103 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1104 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1105 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1106 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1107 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1108 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1109 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1110 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1111 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1112 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1113 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1114 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1115 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1116 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1117 prototype.
1118 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1119 prototype.
1120 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1121 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1122 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1123 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1124 * infcall.c: Remove _initialize_infcall prototype.
1125 * infcmd.c: Remove _initialize_infcmd prototype.
1126 * inferior.c: Remove _initialize_inferiors prototype.
1127 * inflow.c: Remove _initialize_inflow prototype.
1128 * infrun.c: Remove _initialize_infrun prototype.
1129 * interps.c: Remove _initialize_interpreter prototype.
1130 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1131 * jit.c: Remove _initialize_jit prototype.
1132 * language.c: Remove _initialize_language prototype.
1133 * linux-fork.c: Remove _initialize_linux_fork prototype.
1134 * linux-nat.c: Remove _initialize_linux_nat prototype.
1135 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1136 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1137 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1138 * m2-lang.c: Remove _initialize_m2_language prototype.
1139 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1140 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1141 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1142 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1143 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1144 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1145 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1146 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1147 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1148 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1149 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1150 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1151 * machoread.c: Remove _initialize_machoread prototype.
1152 * macrocmd.c: Remove _initialize_macrocmd prototype.
1153 * macroscope.c: Remove _initialize_macroscope prototype.
1154 * maint.c: Remove _initialize_maint_cmds prototype.
1155 * mdebugread.c: Remove _initialize_mdebugread prototype.
1156 * memattr.c: Remove _initialize_mem prototype.
1157 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1158 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1159 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1160 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1161 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1162 * microblaze-linux-tdep.c: Remove
1163 _initialize_microblaze_linux_tdep prototype.
1164 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1165 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1166 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1167 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1168 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1169 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1170 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1171 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1172 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1173 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1174 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1175 prototype.
1176 * mipsread.c: Remove _initialize_mipsread prototype.
1177 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1178 prototype.
1179 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1180 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1181 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1182 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1183 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1184 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1185 prototype.
1186 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1187 * nto-procfs.c: Remove _initialize_procfs prototype.
1188 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1189 * objc-lang.c: Remove _initialize_objc_language prototype.
1190 * objfiles.c: Remove _initialize_objfiles prototype.
1191 * observer.c: Remove observer_test_first_notification_function,
1192 observer_test_second_notification_function,
1193 observer_test_third_notification_function, and
1194 _initialize_observer prototypes.
1195 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1196 * osabi.c: Remove _initialize_gdb_osabi prototype.
1197 * osdata.c: Remove _initialize_osdata prototype.
1198 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1199 * parse.c: Remove _initialize_parse prototype.
1200 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1201 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1202 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1203 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1204 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1205 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1206 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1207 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1208 * printcmd.c: Remove _initialize_printcmd prototype.
1209 * probe.c: Remove _initialize_probe prototype.
1210 * proc-api.c: Remove _initialize_proc_api prototype.
1211 * proc-events.c: Remove _initialize_proc_events prototype.
1212 * proc-service.c: Remove _initialize_proc_service prototype.
1213 * procfs.c: Remove _initialize_procfs prototype.
1214 * psymtab.c: Remove _initialize_psymtab prototype.
1215 * python/python.c: Remove _initialize_python prototype.
1216 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1217 * record-btrace.c: Remove _initialize_record_btrace prototype.
1218 * record-full.c: Remove _initialize_record_full prototype.
1219 * record.c: Remove _initialize_record prototype.
1220 * regcache.c: Remove _initialize_regcache prototype.
1221 * reggroups.c: Remove _initialize_reggroup prototype.
1222 * remote-notif.c: Remove _initialize_notif prototype.
1223 * remote-sim.c: Remove _initialize_remote_sim prototype.
1224 * remote.c: Remove _initialize_remote prototype.
1225 * reverse.c: Remove _initialize_reverse prototype.
1226 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1227 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1228 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1229 prototype.
1230 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1231 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1232 * rust-exp.y: Remove _initialize_rust_exp prototype.
1233 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1234 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1235 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1236 * score-tdep.c: Remove _initialize_score_tdep prototype.
1237 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1238 prototype.
1239 * ser-go32.c: Remove _initialize_ser_dos prototype.
1240 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1241 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1242 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1243 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1244 * serial.c: Remove _initialize_serial prototype.
1245 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1246 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1247 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1248 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1249 * skip.c: Remove _initialize_step_skip prototype.
1250 * sol-thread.c: Remove _initialize_sol_thread prototype.
1251 * solib-aix.c: Remove _initialize_solib_aix prototype.
1252 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1253 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1254 * solib-frv.c: Remove _initialize_frv_solib prototype.
1255 * solib-spu.c: Remove _initialize_spu_solib prototype.
1256 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1257 * solib-target.c: Remove _initialize_solib_target prototype.
1258 * solib.c: Remove _initialize_solib prototype.
1259 * source.c: Remove _initialize_source prototype.
1260 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1261 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1262 prototype.
1263 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1264 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1265 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1266 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1267 prototype.
1268 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1269 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1270 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1271 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1272 prototype.
1273 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1274 prototype.
1275 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1276 prototype.
1277 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1278 prototype.
1279 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1280 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1281 prototype.
1282 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1283 prototype.
1284 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1285 prototype.
1286 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1287 prototype.
1288 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1289 prototype.
1290 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1291 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1292 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1293 * stabsread.c: Remove _initialize_stabsread prototype.
1294 * stack.c: Remove _initialize_stack prototype.
1295 * stap-probe.c: Remove _initialize_stap_probe prototype.
1296 * std-regs.c: Remove _initialize_frame_reg prototype.
1297 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1298 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1299 * symfile.c: Remove _initialize_symfile prototype.
1300 * symmisc.c: Remove _initialize_symmisc prototype.
1301 * symtab.c: Remove _initialize_symtab prototype.
1302 * target-dcache.c: Remove _initialize_target_dcache prototype.
1303 * target-descriptions.c: Remove _initialize_target_descriptions
1304 prototype.
1305 * thread.c: Remove _initialize_thread prototype.
1306 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1307 prototype.
1308 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1309 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1310 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1311 prototype.
1312 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1313 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1314 * tracefile.c: Remove _initialize_tracefile prototype.
1315 * tracepoint.c: Remove _initialize_tracepoint prototype.
1316 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1317 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1318 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1319 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1320 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1321 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1322 * tui/tui.c: Remove _initialize_tui prototype.
1323 * typeprint.c: Remove _initialize_typeprint prototype.
1324 * user-regs.c: Remove _initialize_user_regs prototype.
1325 * utils.c: Remove _initialize_utils prototype.
1326 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1327 * valarith.c: Remove _initialize_valarith prototype.
1328 * valops.c: Remove _initialize_valops prototype.
1329 * valprint.c: Remove _initialize_valprint prototype.
1330 * value.c: Remove _initialize_values prototype.
1331 * varobj.c: Remove _initialize_varobj prototype.
1332 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1333 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1334 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1335 * windows-nat.c: Remove _initialize_windows_nat,
1336 _initialize_check_for_gdb_ini, and _initialize_loadable
1337 prototypes.
1338 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1339 * xcoffread.c: Remove _initialize_xcoffread prototype.
1340 * xml-support.c: Remove _initialize_xml_support prototype.
1341 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1342 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1343 prototype.
1344 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1345 prototype.
1346 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1347
a611b5cb
KS
13482017-09-08 Keith Seitz <keiths@redhat.com>
1349
1350 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1351 field.
1352
469412dd
CW
13532017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1354
1355 * f-valprint.c (f_val_print): Remove check for one byte
1356 sized integers. Remove printing of character type.
1357
a5ad232b
FP
13582017-09-08 Frank Penczek <frank.penczek@intel.com>
1359 Christoph Weinmann <christoph.t.weinmann@intel.com>
1360 Bernhard Heckel <bernhard.heckel@intel.com>
1361
1362 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1363 to maintain proper indentation when printing pointers/refs.
1364
e5014227
JB
13652017-09-07 Joel Brobecker <brobecker@adacore.com>
1366
1367 GDB 8.0.1 released.
1368
63c99141
JB
13692017-09-07 Joel Brobecker <brobecker@adacore.com>
1370
1371 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1372
69c1e056
TT
13732017-09-05 Tom Tromey <tom@tromey.com>
1374
1375 * parse.c (funcall_chain): Now a std::vector.
1376 (start_arglist, end_arglist): Simplify.
1377 (free_funcalls): Remove.
1378 (parse_exp_in_context_1): Remove cleanup.
1379
fef704bf
TT
13802017-09-05 Tom Tromey <tom@tromey.com>
1381
1382 * go-exp.y (go_parse): Don't create a cleanup.
1383
5613c585
TT
13842017-09-05 Tom Tromey <tom@tromey.com>
1385
1386 * d-exp.y (PrimaryExpression): Use std::string.
1387 (d_parse): Don't create a cleanup.
1388
eae49211
TT
13892017-09-05 Tom Tromey <tom@tromey.com>
1390
1391 * utils.c (do_clear_parser_state): Remove.
1392 (make_cleanup_clear_parser_state): Remove.
1393 * p-exp.y (pascal_parse): Use scoped_restore.
1394 * m2-exp.y (m2_parse): Use scoped_restore.
1395 * f-exp.y (f_parse): Use scoped_restore.
1396 * d-exp.y (d_parse): Use scoped_restore.
1397 * c-exp.y (c_parse): Use scoped_restore.
1398 * ada-exp.y (ada_parse): Use scoped_restore.
1399 * utils.h (make_cleanup_clear_parser_state): Remove.
1400
73b9be8b
KS
14012017-09-06 Keith Seitz <keiths@redhat.com>
1402
1403 * dwarf2read.c (dw2_linkage_name_attr): New function.
1404 (dw2_linkage_name): New function.
1405 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1406 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1407 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1408
a102602b
KR
14092017-09-06 Kamil Rytarowski <n54@gmx.com>
1410
1411 * config/djgpp/djconfig.sh: Correct shell portability issue.
1412
28ad437d
KR
14132017-09-06 Kamil Rytarowski <n54@gmx.com>
1414
1415 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1416
351787dd
JB
14172017-09-06 John Baldwin <jhb@FreeBSD.org>
1418
1419 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1420 * NEWS: Mention new FreeBSD/mips native configuration.
1421 * configure.host: Add aarch64*-*-freebsd*.
1422 * configure.nat: Likewise.
1423 * aarch64-fbsd-nat.c: New file.
1424
c0f84956
JB
14252017-09-06 John Baldwin <jhb@FreeBSD.org>
1426
1427 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1428 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1429 * NEWS: Mention new FreeBSD/aarch64 target.
1430 * configure.tgt: Add aarch64*-*-freebsd*.
1431 * aarch64-fbsd-tdep.c: New file.
1432 * aarch64-fbsd-tdep.h: New file.
1433
7610297a
KR
14342017-09-06 Kamil Rytarowski <n54@gmx.com>
1435
1436 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1437
fbd1b771
JK
14382017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1439
1440 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1441 of TLS symbols.
1442
5ca79eae
PW
14432017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1444
1445 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1446 call.
1447
bf93d7ba
SM
14482017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1449
1450 * infrun.c (follow_exec): Call add_thread after
1451 target_find_description.
1452
1bb7c059
SM
14532017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1454
1455 * infrun.c (handle_inferior_event_1): When exec'ing, read
1456 stop_pc after follow_exec.
1457
fc809827
SM
14582017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1459
1460 * remote.c (process_g_packet): Update error message.
1461
d2fcdd85
YQ
14622017-09-05 Yao Qi <yao.qi@linaro.org>
1463
1464 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1465 targets.
1466
e69570ee
PA
14672017-09-05 Pedro Alves <palves@redhat.com>
1468
1469 * eval.c (eval_call, evaluate_funcall): New functions, factored
1470 out from ...
1471 (evaluate_subexp_standard): ... this.
1472
22916b07
YQ
14732017-09-05 Yao Qi <yao.qi@linaro.org>
1474
1475 * amd64-tdep.c (amd64_target_description): Create target
1476 descriptions.
1477 (_initialize_amd64_tdep): Don't call functions
1478 initialize_tdesc_amd64_*. Add self tests.
1479 * arch/amd64.c (amd64_create_target_description): Add parameter
1480 is_linux. Call set_tdesc_osabi if is_linux is true.
1481 * arch/amd64.h (amd64_create_target_description): Update the
1482 declaration.
1483 * arch/i386.c (i386_create_target_description): Add parameter
1484 is_linux. Call set_tdesc_osabi if is_linux is true.
1485 * arch/i386.h (i386_create_target_description): Update
1486 declaration.
1487 * configure.tgt: Add i386.o to gdb_target_obs.
1488 * features/Makefile (XMLTOC): Remove i386/*.xml.
1489 * features/i386/amd64-avx-avx512.c: Remove.
1490 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1491 * features/i386/amd64-avx-mpx.c: Remove.
1492 * features/i386/amd64-avx.c: Remove.
1493 * features/i386/amd64-mpx.c: Remove.
1494 * features/i386/amd64.c: Remove.
1495 * features/i386/i386-avx-avx512.c: Remove.
1496 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1497 * features/i386/i386-avx-mpx.c: Remove.
1498 * features/i386/i386-avx.c: Remove.
1499 * features/i386/i386-mmx.c: Remove.
1500 * features/i386/i386-mpx.c: Remove.
1501 * features/i386/i386.c: Remove.
1502 * i386-tdep.c: Don't include features/i386/i386*.c., include
1503 target-descriptions.h and arch/i386.h.
1504 (i386_target_description): Create target descriptions.
1505 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1506 functions. Do self tests.
1507
0854b7b1
YQ
15082017-09-05 Yao Qi <yao.qi@linaro.org>
1509
1510 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1511 * features/i386/amd64-avx-avx512-linux.c: Removed.
1512 * features/i386/amd64-avx-linux.c: Removed.
1513 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1514 * features/i386/amd64-avx-mpx-linux.c: Removed.
1515 * features/i386/amd64-linux.c: Removed.
1516 * features/i386/amd64-mpx-linux.c: Removed.
1517 * features/i386/x32-avx-avx512-linux.c: Removed.
1518 * features/i386/x32-avx-linux.c: Removed.
1519 * features/i386/x32-linux.c: Removed.
1520
b4570e4b
YQ
15212017-09-05 Yao Qi <yao.qi@linaro.org>
1522
1523 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1524 features/i386/*.c.
1525 (amd64_linux_read_description): Call
1526 amd64_create_target_description.
1527 * arch/amd64.c: New file.
1528 * arch/amd64.h: New file.
1529 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1530 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1531
6c73f67f
YQ
15322017-09-05 Yao Qi <yao.qi@linaro.org>
1533
1534 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1535 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1536 (amd64_linux_read_description): Create target descriptions.
1537 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1538 functions. Add unit tests.
1539 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1540 x32-core.xml.
1541 * features/i386/64bit-avx.c: Generated.
1542 * features/i386/64bit-avx512.c: Generated.
1543 * features/i386/64bit-core.c: Generated.
1544 * features/i386/64bit-linux.c: Generated.
1545 * features/i386/64bit-mpx.c: Generated.
1546 * features/i386/64bit-pkeys.c: Generated.
1547 * features/i386/64bit-segments.c: Generated.
1548 * features/i386/64bit-sse.c: Generated.
1549 * features/i386/x32-core.c: Generated.
1550 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1551 c files for amd64-linux and x32-linux.
1552
9d3d478b
YQ
15532017-09-05 Yao Qi <yao.qi@linaro.org>
1554
1555 * amd64-linux-tdep.c (amd64_linux_read_description): New
1556 function.
1557 (amd64_linux_core_read_description): Call
1558 amd64_linux_read_description.
1559 (amd64_linux_init_abi): Likewise.
1560 (amd64_x32_linux_init_abi): Likewise.
1561 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1562 * x86-linux-nat.c (x86_linux_read_description): Call
1563 amd64_linux_read_description.
1564
b9f1d50f
YQ
15652017-09-05 Yao Qi <yao.qi@linaro.org>
1566
1567 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1568 comments.
1569
188c9e6d
YQ
15702017-09-05 Yao Qi <yao.qi@linaro.org>
1571
1572 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1573 * features/i386/i386-avx-avx512-linux.c: Remove.
1574 * features/i386/i386-avx-linux.c: Remove.
1575 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1576 * features/i386/i386-avx-mpx-linux.c: Remove.
1577 * features/i386/i386-linux.c: Remove.
1578 * features/i386/i386-mmx-linux.c: Remove.
1579 * features/i386/i386-mpx-linux.c: Remove.
1580
5f035c07
YQ
15812017-09-05 Yao Qi <yao.qi@linaro.org>
1582
1583 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1584 (SFILES): Add arch/i386.c.
1585 (HFILES_NO_SRCDIR): Add arch/i386.h.
1586 * arch/i386.c: New file.
1587 * arch/i386.h: New file.
1588 * arch/tdesc.h (allocate_target_description): Declare.
1589 (set_tdesc_architecture): Declare.
1590 (set_tdesc_osabi): Declare.
1591 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1592 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1593 include arch/i386.h.
1594 (i386_linux_read_description): Remove code and call
1595 i386_create_target_description.
1596 (set_tdesc_architecture): New function.
1597 (set_tdesc_osabi): New function.
1598 * target-descriptions.h (allocate_target_description): Remove.
1599
0abe8a89
YQ
16002017-09-05 Yao Qi <yao.qi@linaro.org>
1601
1602 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1603 * target-descriptions.c (tdesc_create_feature): Likewise, and
1604 adjust code.
1605 * features/i386/32bit-avx.c: Re-generated.
1606 * features/i386/32bit-avx512.c: Re-generated.
1607 * features/i386/32bit-core.c: Re-generated.
1608 * features/i386/32bit-linux.c: Re-generated.
1609 * features/i386/32bit-mpx.c: Re-generated.
1610 * features/i386/32bit-pkeys.c: Re-generated.
1611 * features/i386/32bit-sse.c: Re-generated.
1612
0a188386
YQ
16132017-09-05 Yao Qi <yao.qi@linaro.org>
1614
1615 * regformats/regdef.h (struct reg): Override operator == and !=.
1616
f49ff000
YQ
16172017-09-05 Yao Qi <yao.qi@linaro.org>
1618
1619 * arch/tdesc.h: New file.
1620 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1621 * target-descriptions.c: Update comments.
1622 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1623 declarations.
1624 * features/i386/32bit-avx.c: Re-generated.
1625 * features/i386/32bit-avx512.c: Re-generated.
1626 * features/i386/32bit-core.c: Re-generated.
1627 * features/i386/32bit-linux.c: Re-generated.
1628 * features/i386/32bit-mpx.c: Re-generated.
1629 * features/i386/32bit-pkeys.c: Re-generated.
1630 * features/i386/32bit-sse.c: Re-generated.
1631
f7000548
YQ
16322017-09-05 Yao Qi <yao.qi@linaro.org>
1633
1634 * regformats/regdat.sh: Update generated code.
1635
c9a5e2a5
YQ
16362017-09-05 Yao Qi <yao.qi@linaro.org>
1637
1638 * regformats/regdat.sh: Adjust code order.
1639
d6b687ac
SM
16402017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1641
1642 * expprint.c (dump_subexp_body_standard): Use constant format
1643 string in fprintf_filtered call.
1644
a379bfd0
JB
16452017-09-04 John Baldwin <jhb@FreeBSD.org>
1646
1647 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1648 NetBSD/i386.
1649 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1650
f7efc967
JB
16512017-09-04 John Baldwin <jhb@FreeBSD.org>
1652
1653 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1654
c49fbc6c
JB
16552017-09-04 John Baldwin <jhb@FreeBSD.org>
1656
1657 * bsd-kvm.o: Define _KMEMUSER.
1658 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1659 * configure: Regenerate.
1660
26562e73
JB
16612017-09-04 John Baldwin <jhb@FreeBSD.org>
1662
1663 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1664 * i386-fbsd-nat.c: Likewise.
1665
31cf1487
JB
16662017-09-04 John Baldwin <jhb@FreeBSD.org>
1667
1668 * unittests/array-view-selftests.c: Add include of <array>.
1669
5b9f8a7c
JB
16702017-09-04 John Baldwin <jhb@FreeBSD.org>
1671
1672 * spu-tdep.c (flush_ea_cache): Add missing argument to
1673 call_function_by_hand.
1674
d69cf9b2
PA
16752017-09-04 Pedro Alves <palves@redhat.com>
1676
1677 * NEWS (Safer support for debugging with no debug info): New.
1678
3693fdb3
PA
16792017-09-04 Pedro Alves <palves@redhat.com>
1680
1681 * c-exp.y (function_method, function_method_void): Add current
1682 instance flags to TYPE_INSTANCE.
1683 * dwarf2read.c (check_modifier): New.
1684 (compute_delayed_physnames): Assert that only C++ adds delayed
1685 physnames. Mark fn_fields as const/volatile depending on
1686 physname.
1687 * eval.c (make_params): New type_instance_flags parameter. Use
1688 it as the new type's instance flags.
1689 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1690 flags element and pass it to make_params.
1691 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1692 instance flags element.
1693 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1694 * gdbtypes.h: Include "enum-flags.h".
1695 (type_instance_flags): New enum-flags type.
1696 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1697 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1698 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1699 (follow_type_instance_flags): New function.
1700 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1701 * parser-defs.h (follow_type_instance_flags): Declare.
1702 * valops.c (value_struct_elt_for_reference): const/volatile must
1703 match too.
1704
e68cb8e0
PA
17052017-09-04 Pedro Alves <palves@redhat.com>
1706
1707 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1708 function/method scopes; lookup the nested name as a function local
1709 static variable.
1710
858be34c
PA
17112017-09-04 Pedro Alves <palves@redhat.com>
1712
1713 (%type <voidval>): Add function_method.
1714 * c-exp.y (exp): New production for calls with no arguments.
1715 (function_method, function_method_void_or_typelist): New
1716 productions.
1717 (exp): New production for "method()::static_var".
1718 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1719 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1720 Handle OP_FUNC_STATIC_VAR.
1721 * parse.c (operator_length_standard):
1722 Handle OP_FUNC_STATIC_VAR.
1723
dd5901a6
PA
17242017-09-04 Pedro Alves <palves@redhat.com>
1725
1726 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1727 handling.
1728 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1729 Ditto.
1730 * parse.c (operator_length_standard, operator_check_standard):
1731 Ditto.
1732 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1733
46a4882b
PA
17342017-09-04 Pedro Alves <palves@redhat.com>
1735
1736 * ax-gdb.c: Include "typeprint.h".
1737 (gen_expr_for_cast): New function.
1738 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1739 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1740 type is unknown.
1741 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1742 nodebug_data_symbol.
1743 * eval.c: Include "typeprint.h".
1744 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1745 Error out if symbol has unknown type.
1746 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1747 evaluate_subexp_for_cast.
1748 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1749 OP_VAR_MSYM_VALUE.
1750 (evaluate_subexp_for_cast): New function.
1751 * gdbtypes.c (init_nodebug_var_type): New function.
1752 (objfile_type): Use it to initialize types of variables with no
1753 debug info.
1754 * typeprint.c (error_unknown_type): New.
1755 * typeprint.h (error_unknown_type): New declaration.
1756 * compile/compile-c-types.c (convert_type_basic): Handle
1757 TYPE_CODE_ERROR; warn and fallback to int for variables with
1758 unknown type.
1759
fe13dfec
PA
17602017-09-04 Pedro Alves <palves@redhat.com>
1761
1762 * eval.c (evaluate_var_value): New function, factored out from ...
1763 (evaluate_subexp_standard): ... here.
1764
d008ee21
PA
17652017-09-04 Pedro Alves <palves@redhat.com>
1766
1767 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1768 Remove useless assignments to 'op'.
1769
827d0c51
PA
17702017-09-04 Pedro Alves <palves@redhat.com>
1771
1772 * eval.c (eval_skip_value): New function.
1773 (evaluate_subexp_standard): Use it.
1774
2c5a2be1
PA
17752017-09-04 Pedro Alves <palves@redhat.com>
1776
1777 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1778 function name from symbol/minsym and pass it to
1779 error_call_unknown_return_type.
1780
74ea4be4
PA
17812017-09-04 Pedro Alves <palves@redhat.com>
1782
1783 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1784 * ax-gdb.c (gen_msym_var_ref): New function.
1785 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1786 * eval.c (evaluate_var_msym_value): New function.
1787 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1788 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1789 to call_function_by_hand.
1790 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1791 Handle OP_VAR_MSYM_VALUE.
1792 (union exp_element) <msymbol>: New field.
1793 * minsyms.h (struct type): Forward declare.
1794 (find_minsym_type_and_address): Declare.
1795 * parse.c (write_exp_elt_msym): New function.
1796 (write_exp_msymbol): Delete, refactored as ...
1797 (find_minsym_type_and_address): ... this new function.
1798 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1799 (operator_length_standard, operator_check_standard): Handle
1800 OP_VAR_MSYM_VALUE.
1801 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1802
7022349d
PA
18032017-09-04 Pedro Alves <palves@redhat.com>
1804
1805 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1806 TYPE_GNU_IFUNC specially here. Throw error if return type is
1807 unknown.
1808 * ada-typeprint.c (print_func_type): Handle functions with unknown
1809 return type.
1810 * c-typeprint.c (c_type_print_base): Handle functions and methods
1811 with unknown return type.
1812 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1813 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1814 * compile/compile-c-types.c: Include "objfiles.h".
1815 (convert_func): For functions with unknown return type, warn and
1816 default to int.
1817 * compile/compile-object-run.c (compile_object_run): Adjust call
1818 to call_function_by_hand_dummy.
1819 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1820 call_function_by_hand.
1821 * eval.c (evaluate_subexp_standard): Adjust calls to
1822 call_function_by_hand. Handle functions and methods with unknown
1823 return type. Pass expect_type to call_function_by_hand.
1824 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1825 return type.
1826 * gcore.c (call_target_sbrk): Adjust call to
1827 call_function_by_hand.
1828 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1829 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1830 an integer address type instead of nodebug.
1831 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1832 call_function_by_hand.
1833 * infcall.c (error_call_unknown_return_type): New function.
1834 (call_function_by_hand): New "default_return_type" parameter.
1835 Pass it down.
1836 (call_function_by_hand_dummy): New "default_return_type"
1837 parameter. Use it instead of defaulting to int. If there's no
1838 default and the return type is unknown, throw an error. If
1839 there's a default return type, and the called function has no
1840 debug info, then assume the function is prototyped.
1841 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1842 New "default_return_type" parameter.
1843 (error_call_unknown_return_type): New declaration.
1844 * linux-fork.c (call_lseek): Cast return type of lseek.
1845 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1846 call_function_by_hand.
1847 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1848 calls to call_function_by_hand.
1849 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1850 return type.
1851 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1852 (value_nsstring, print_object_command): Adjust calls to
1853 call_function_by_hand.
1854 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1855 functions with unknown return type.
1856 (pascal_type_print_func_varspec_suffix): New function.
1857 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1858 TYPE_CODE_METHOD>: Use it.
1859 * python/py-value.c (valpy_call): Adjust call to
1860 call_function_by_hand.
1861 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1862 call_function_by_hand.
1863 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1864 call_function_by_hand.
1865 * valops.c (value_allocate_space_in_inferior): Adjust call to
1866 call_function_by_hand.
1867 * typeprint.c (type_print_unknown_return_type): New function.
1868 * typeprint.h (type_print_unknown_return_type): New declaration.
1869
54990598
PA
18702017-09-04 Pedro Alves <palves@redhat.com>
1871
1872 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1873 types with more than one parameter as prototyped.
1874
9a24775b
PA
18752017-09-04 Pedro Alves <palves@redhat.com>
1876
1877 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1878 (disassemble_command): Use gdb_disassembly_flags instead of bare
1879 int.
1880 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1881 (dump_insns, do_mixed_source_and_assembly_deprecated)
1882 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1883 Use gdb_disassembly_flags instead of bare int.
1884 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1885 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1886 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1887 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1888 (enum gdb_disassembly_flag): ... values of this new enumeration.
1889 (gdb_disassembly_flags): Define.
1890 (gdb_disassembly)
1891 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1892 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1893 gdb_disassembly_flags instead of bare int.
1894 * record-btrace.c (btrace_insn_history)
1895 (record_btrace_insn_history, record_btrace_insn_history_range)
1896 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1897 instead of bare int.
1898 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1899 Use gdb_disassembly_flags instead of bare int.
1900 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1901 Define.
1902 * target-delegates.c: Regenerate.
1903 * target.c (target_insn_history, target_insn_history_from)
1904 (target_insn_history_range): Use gdb_disassembly_flags instead of
1905 bare int.
1906 * target.h: Include "disasm.h".
1907 (struct target_ops) <to_insn_history, to_insn_history_from,
1908 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1909 int.
1910 (target_insn_history, target_insn_history_from)
1911 (target_insn_history_range): Use gdb_disassembly_flags instead of
1912 bare int.
1913
80a65e9b
SM
19142017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1915
1916 * cli/cli-script.c (build_command_line): For if/while commands,
1917 check whether args is empty.
1918
6b66338c
SM
19192017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1920
1921 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1922 (enum command_control_type): Likewise.
1923 (struct command_line): Likewise.
1924 (free_command_lines): Likewise.
1925 (struct command_lines_deleter): Likewise.
1926 (command_line_up): Likewise.
1927 (read_command_lines): Likewise.
1928 (read_command_lines_1): Likewise.
1929 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1930 (enum command_control_type): Likewise.
1931 (struct command_line): Likewise.
1932 (free_command_lines): Likewise.
1933 (struct command_lines_deleter): Likewise.
1934 (command_line_up): Likewise.
1935 (read_command_lines): Likewise.
1936 (read_command_lines_1): Likewise.
1937 * breakpoint.h: Include cli/cli-script.h.
1938 * extension-priv.h: Likewise.
1939 * gdbcmd.h: Likewise.
1940
51abb421
PA
19412017-09-04 Pedro Alves <palves@redhat.com>
1942
1943 * ada-lang.c (is_known_support_routine): Move sal declaration to
1944 where it is initialized.
1945 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1946 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1947 (clear_command, update_static_tracepoint): Remove init_sal
1948 references. Move declarations closer to initializations.
1949 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1950 initializations.
1951 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1952 references. Move sal declarations closer to initializations.
1953 * frame.c (find_frame_sal): Return a symtab_and_line via function
1954 return instead of output parameter. Remove init_sal references.
1955 * frame.h (find_frame_sal): Return a symtab_and_line via function
1956 return instead of output parameter.
1957 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1958 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1959 instead of memset.
1960 (gdbscm_find_pc_line): Remove init_sal reference.
1961 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1962 references. Move declarations closer to initializations.
1963 * infcmd.c (set_step_frame): Update. Move declarations closer to
1964 initializations.
1965 (finish_backward): Remove init_sal references. Move declarations
1966 closer to initializations.
1967 * infrun.c (process_event_stop_test, handle_step_into_function)
1968 (insert_hp_step_resume_breakpoint_at_frame)
1969 (insert_step_resume_breakpoint_at_caller): Likewise.
1970 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1971 (symbol_to_sal): Likewise.
1972 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1973 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1974 to its initialization.
1975 * reverse.c (save_bookmark_command): Use new/delete. Remove
1976 init_sal references. Move declarations closer to initializations.
1977 * source.c (get_current_source_symtab_and_line): Remove brace
1978 initialization.
1979 (set_current_source_symtab_and_line): Now takes the sal by const
1980 reference. Remove brace initialization.
1981 (line_info): Remove init_sal reference.
1982 * source.h (set_current_source_symtab_and_line): Now takes a
1983 symtab_and_line via const reference.
1984 * stack.c (set_current_sal_from_frame): Adjust.
1985 (print_frame_info): Adjust.
1986 (get_last_displayed_sal): Return the sal via function return
1987 instead of via output parameter. Simplify.
1988 (frame_info): Adjust.
1989 * stack.h (get_last_displayed_sal): Return the sal via function
1990 return instead of via output parameter.
1991 * symtab.c (init_sal): Delete.
1992 (find_pc_sect_line): Remove init_sal references. Move
1993 declarations closer to initializations.
1994 (find_function_start_sal): Remove init_sal references. Move
1995 declarations closer to initializations.
1996 * symtab.h (struct symtab_and_line): In-class initialize all
1997 fields.
1998 * tracepoint.c (set_traceframe_context)
1999 (print_one_static_tracepoint_marker): Remove init_sal references.
2000 Move declarations closer to initializations.
2001 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2002 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2003 declarations closer to initializations.
2004 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2005 init_sal references. Adjust.
2006
6c5b2ebe
PA
20072017-09-04 Pedro Alves <palves@redhat.com>
2008
2009 * ax-gdb.c (agent_command_1): Use range-for.
2010 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2011 * breakpoint.c: Include "common/array-view.h".
2012 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2013 parameter from struct symtabs_and_lines to
2014 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2015 (breakpoint_sals_to_pc): Change sals parameter from struct
2016 symtabs_and_lines to std::vector reference.
2017 (check_fast_tracepoint_sals): Change sals parameter from struct
2018 symtabs_and_lines to std::array_view. Use range-for.
2019 (decode_static_tracepoint_spec): Return a std::vector instead of
2020 symtabs_and_lines. Update.
2021 (create_breakpoint): Update.
2022 (break_range_command, until_break_command, clear_command): Update.
2023 (base_breakpoint_decode_location, bkpt_decode_location)
2024 (bkpt_probe_create_sals_from_location)
2025 (bkpt_probe_decode_location, tracepoint_decode_location)
2026 (tracepoint_probe_decode_location)
2027 (strace_marker_create_sals_from_location): Return a std::vector
2028 instead of symtabs_and_lines.
2029 (strace_marker_create_breakpoints_sal): Update.
2030 (strace_marker_decode_location): Return a std::vector instead of
2031 symtabs_and_lines. Update.
2032 (update_breakpoint_locations): Change struct symtabs_and_lines
2033 parameters to gdb::array_view. Adjust.
2034 (location_to_sals): Return a std::vector instead of
2035 symtabs_and_lines. Update.
2036 (breakpoint_re_set_default): Use std::vector instead of struct
2037 symtabs_and_lines.
2038 (decode_location_default): Return a std::vector instead of
2039 symtabs_and_lines. Update.
2040 * breakpoint.h: Include "common/array-view.h".
2041 (struct breakpoint_ops) <decode_location>: Now returns a
2042 std::vector instead of returning a symtabs_and_lines via output
2043 parameter.
2044 (update_breakpoint_locations): Change sals parameters to use
2045 gdb::array_view.
2046 * cli/cli-cmds.c (edit_command, list_command): Update to use
2047 std::vector and gdb::array_view.
2048 (ambiguous_line_spec): Adjust to use gdb::array_view and
2049 range-for.
2050 (compare_symtabs): Rename to ...
2051 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2052 const reference and adjust.
2053 (filter_sals): Rewrite using std::vector and standard algorithms.
2054 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2055 (jump_command): Update to use std::vector.
2056 * linespec.c (struct linespec_state) <canonical_names>: Update
2057 comment.
2058 (add_sal_to_sals_basic): Delete.
2059 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2060 (decode_line_2, create_sals_line_offset)
2061 (convert_address_location_to_sals, convert_linespec_to_sals)
2062 (convert_explicit_location_to_sals, parse_linespec)
2063 (event_location_to_sals, decode_line_full, decode_line_1)
2064 (decode_line_with_current_source)
2065 (decode_line_with_last_displayed, decode_objc)
2066 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2067 (linespec_result::~linespec_result): Adjust to use std::vector
2068 instead of symtabs_and_lines.
2069 * linespec.h (linespec_sals::sals): Now a std::vector.
2070 (struct linespec_result): Use std::vector, bool, and in-class
2071 initialization.
2072 (decode_line_1, decode_line_with_current_source)
2073 (decode_line_with_last_displayed): Return std::vector.
2074 * macrocmd.c (info_macros_command): Use std::vector.
2075 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2076 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2077 std::vector.
2078 * probe.h (parse_probes): Return a std::vector.
2079 * python/python.c (gdbpy_decode_line): Use std::vector and
2080 gdb::array_view.
2081 * source.c (select_source_symtab, line_info): Use std::vector.
2082 * stack.c (func_command): Use std::vector.
2083 * symtab.h (struct symtabs_and_lines): Delete.
2084 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2085
7c44b49c
PA
20862017-09-04 Pedro Alves <palves@redhat.com>
2087
2088 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2089 unittests/array-view-selftests.c.
2090 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2091 * common/array-view.h: New file.
2092 * unittests/array-view-selftests.c: New file.
2093
e439fa14
PA
20942017-09-04 Pedro Alves <palves@redhat.com>
2095
2096 * cli/cli-cmds.c (edit_command): Pass message to
2097 ambiguous_line_spec.
2098 (list_command): Pass message to ambiguous_line_spec. Say
2099 "first"/"last" instead of "start" and "end" to be consistent with
2100 the manual.
2101 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2102 them to print formatted message.
2103
7525b645
PA
21042017-09-04 Pedro Alves <palves@redhat.com>
2105
2106 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2107 ftrace_update_insns by reference instead of pointer.
2108
badc0020
YQ
21092017-09-04 Yao Qi <yao.qi@linaro.org>
2110
2111 * i386-go32-tdep.c: Include x86-xstate.h.
2112 (i386_go32_init_abi): Call i386_target_description.
2113 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2114 if xcr0 is X86_XSTATE_X87_MASK.
2115 * i386-tdep.h (tdesc_i386): Remove the declaration.
2116 (tdesc_i386_mmx): Likewise.
2117
d78bdb54
YQ
21182017-09-04 Yao Qi <yao.qi@linaro.org>
2119
2120 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2121 X86_XSTATE_SSE_MASK instead of 0.
2122
ca1fa5ee
YQ
21232017-09-04 Yao Qi <yao.qi@linaro.org>
2124
2125 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2126 i386_target_description.
2127 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2128 i386_target_description.
2129 * i386-tdep.c (i386_gdbarch_init): Likewise.
2130
2434b019
YQ
21312017-09-04 Yao Qi <yao.qi@linaro.org>
2132
2133 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2134 (x86_darwin_init_abi_64): Call amd64_target_description.
2135 * amd64-dicos-tdep.c: Likewise.
2136 * amd64-fbsd-nat.c: Likewise.
2137 * amd64-fbsd-tdep.c: Likewise.
2138 * amd64-nbsd-tdep.c: Likewise.
2139 * amd64-obsd-tdep.c: Likewise.
2140 * amd64-sol2-tdep.c: Likewise.
2141 * amd64-windows-tdep.c: Likewise.
2142 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2143
0860c437
SM
21442017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2145
2146 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2147 (btrace_function) <insn>: Change type to use std::vector.
2148 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2149 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2150 ftrace_update_insns, ftrace_compute_global_level_offset,
2151 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2152 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2153 change to std::vector.
2154 (ftrace_update_insns): Adjust to change to std::vector, change
2155 type of INSN parameter.
2156 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2157 * record-btrace.c (btrace_call_history_insn_range,
2158 btrace_compute_src_line_range,
2159 record_btrace_frame_prev_register): Adjust to change to
2160 std::vector.
2161 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2162 to change to std::vector.
2163
0638b7f9
TT
21642017-09-03 Tom Tromey <tom@tromey.com>
2165
2166 * corefile.c (reopen_exec_file): Use std::string.
2167
8f84fb0e
TT
21682017-09-03 Tom Tromey <tom@tromey.com>
2169
2170 * compile/compile.c (compile_register_name_mangled): Return
2171 std::string.
2172 * compile/compile-loc2c.c (pushf_register_address): Update.
2173 (pushf_register): Update.
2174 * compile/compile-c-types.c (convert_array): Update.
2175 * compile/compile-c-symbols.c (generate_vla_size): Update.
2176 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2177 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2178 (convert_one_symbol): Update.
2179 (generate_c_for_for_one_variable): Update.
2180 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2181 std::string.
2182 (generate_register_struct): Update.
2183 * compile/compile-internal.h (c_get_range_decl_name): Return a
2184 std::string.
2185 (compile_register_name_mangled): Return std::string.
2186
18e9961f
TT
21872017-09-03 Tom Tromey <tom@tromey.com>
2188
2189 * utils.c (perror_string): Return a std::string.
2190 (throw_perror_with_name, perror_warning_with_name): Update.
2191
45343786
TT
21922017-09-03 Tom Tromey <tom@tromey.com>
2193
2194 * demangle.c (demangle_command): Use std::string,
2195 unique_xmalloc_ptr.
2196
b57af503
TT
21972017-09-03 Tom Tromey <tom@tromey.com>
2198
2199 * cli/cli-setshow.c (do_set_command): Use std::string.
2200
6eecf35f
TT
22012017-09-03 Tom Tromey <tom@tromey.com>
2202
2203 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2204
56496dd4
TT
22052017-09-03 Tom Tromey <tom@tromey.com>
2206
2207 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2208
e91a1fa7
TT
22092017-09-03 Tom Tromey <tom@tromey.com>
2210
2211 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2212 gdb::unique_xmalloc_ptr.
2213
7ffd83d7
TT
22142017-09-03 Tom Tromey <tom@tromey.com>
2215
2216 * thread.c (print_thread_info_1): Use string_printf.
2217 (thread_apply_command, thread_apply_all_command): Use
2218 std::string.
2219
1ccbe998
TT
22202017-09-03 Tom Tromey <tom@tromey.com>
2221
2222 * valprint.c (val_print_string): Update.
2223 * gdbcore.h (memory_error_message): Return std::string.
2224 * corefile.c (memory_error_message): Return std::string.
2225 (memory_error): Update.
2226 * breakpoint.c (insert_bp_location): Update.
2227
23fdd69e
SM
22282017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2229
2230 * target/waitstatus.h (target_waitstatus_to_string): Change
2231 return type to std::string.
2232 * target/waitstatus.c (target_waitstatus_to_string): Return
2233 std::string.
2234 * target.h (target_waitstatus_to_string): Remove declaration.
2235 * infrun.c (resume, clear_proceed_status_thread,
2236 print_target_wait_results, do_target_wait, save_waitstatus,
2237 stop_all_threads): Adjust.
2238 * record-btrace.c (record_btrace_wait): Adjust.
2239 * target-debug.h
2240 (target_debug_print_struct_target_waitstatus_p): Adjust.
2241
5c811d30
JK
22422017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2243
2244 PR gdb/22046
2245 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2246 detection.
2247
0a2dde4a
SDJ
22482017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2249
2250 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2251 for setting/unsetting environment variables on the remote target.
2252 (New remote packets): Add entries for QEnvironmentHexEncoded,
2253 QEnvironmentUnset and QEnvironmentReset.
2254 * common/environ.c (gdb_environ::operator=): Extend method to
2255 handle m_user_set_env_list and m_user_unset_env_list.
2256 (gdb_environ::clear): Likewise.
2257 (match_var_in_string): Change type of first parameter from 'char
2258 *' to 'const char *'.
2259 (gdb_environ::set): Extend method to handle
2260 m_user_set_env_list and m_user_unset_env_list.
2261 (gdb_environ::unset): Likewise.
2262 (gdb_environ::clear_user_set_env): New method.
2263 (gdb_environ::user_set_envp): Likewise.
2264 (gdb_environ::user_unset_envp): Likewise.
2265 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2266 m_user_unset_env_list on move constructor/assignment.
2267 (unset): Add new default parameter 'update_unset_list = true'.
2268 (clear_user_set_env): New method.
2269 (user_set_envp): Likewise.
2270 (user_unset_envp): Likewise.
2271 (m_user_set_env_list): New std::set.
2272 (m_user_unset_env_list): Likewise.
2273 * common/rsp-low.c (hex2str): New function.
2274 (bin2hex): New overload for bin2hex function.
2275 * common/rsp-low.c (hex2str): New prototype.
2276 (str2hex): New overload prototype.
2277 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2278 QEnvironmentUnset and QEnvironmentReset.
2279 (remote_protocol_features): Add QEnvironmentHexEncoded,
2280 QEnvironmentUnset and QEnvironmentReset packets.
2281 (send_environment_packet): New function.
2282 (extended_remote_environment_support): Likewise.
2283 (extended_remote_create_inferior): Call
2284 extended_remote_environment_support.
2285 (_initialize_remote): Add QEnvironmentHexEncoded,
2286 QEnvironmentUnset and QEnvironmentReset packet configs.
2287 * unittests/environ-selftests.c (gdb_selftest_env_var):
2288 New variable.
2289 (test_vector_initialization): New function.
2290 (test_init_from_host_environ): Likewise.
2291 (test_reinit_from_host_environ): Likewise.
2292 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2293 Likewise.
2294 (test_unset_set_empty_vector): Likewise.
2295 (test_vector_clear): Likewise.
2296 (test_std_move): Likewise.
2297 (test_move_constructor):
2298 (test_self_move): Likewise.
2299 (test_set_unset_reset): Likewise.
2300 (run_tests): Rewrite in terms of the functions above.
2301
654670a4
WP
23022017-08-31 Weimin Pan <weimin.pan@oracle.com>
2303
2304 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2305 (adi_available): Use a temp variable of type CORE_ADDR as argument
2306 3 when calling target_auxv_search.
2307 (adi_normalize_address): Use masks and xor operators to calculate
2308 normalized address.
2309 (adi_read_versions, adi_write_versions, adi_print_versions)
2310 (do_examine, do_assign): Use paddress.
2311
7755ddb7
JB
23122017-08-29 John Baldwin <jhb@FreeBSD.org>
2313
2314 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2315 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2316 out of loop and add supply of FIR.
2317 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2318 add collect of FIR.
2319
fd437cbc
SM
23202017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2321
3804a343 2322 PR gdb/21827
fd437cbc
SM
2323 * cli/cli-script.c (define_command): Don't convert command name
2324 to lower case.
2325
988f6b3d
JB
23262017-08-25 Joel Brobecker <brobecker@adacore.com>
2327
2328 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2329 Update all callers accordingly. Remove all code blocks handling
2330 the case where DISPP is not NULL.
2331
663c44ac
JK
23322017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2333
2334 PR symtab/22003
2335 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2336 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2337 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2338
f1902523
JK
23392017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2340
2341 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2342 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2343 (read_comp_units_from_section): New parameter abbrev_section, use
2344 read_and_check_comp_unit_head, allocate signatured_type if needed.
2345 (create_all_comp_units): Update read_comp_units_from_section caller.
2346
87215ad1
SDJ
23472017-08-23 Pedro Alves <palves@redhat.com>
2348
2349 PR remote/21852
2350 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2351 to null_ptid and switch to thread without reading the registers
2352 after adding the inferior.
2353
6e41ddec
JK
23542017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2355
2356 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2357 compile-gcc.
2358 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2359 (compile_to_object): Implement compile_gcc.
2360 (_initialize_compile): Install "set compile-gcc". Initialize
2361 compile_gcc.
2362
e68c32d5
JK
23632017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2364
2365 * compile/compile.c (compile_to_object): Conditionally call
2366 set_verbose. Conditionally call compile or compile_v0.
2367
58afddc6
WP
23682017-08-07 Weimin Pan <weimin.pan@oracle.com>
2369
2370 * sparc64-tdep.h: (adi_normalize_address): New export.
2371 * sparc-nat.h: (open_adi_tag_fd): New export.
2372 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2373 * sparc64-linux-tdep.c:
2374 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2375 (sparc64_linux_handle_segmentation_fault): New function.
2376 (sparc64_linux_init_abi): Register
2377 sparc64_linux_handle_segmentation_fault
2378 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2379 (sparc64_addr_bits_remove): New function.
2380 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2381 (MAX_PROC_NAME_SIZE): New macro.
2382 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2383 (sparc64adilist): New variable.
2384 (adi_proc_list): New variable.
2385 (find_adi_info): New function.
2386 (add_adi_info): New function.
2387 (get_adi_info_proc): New function.
2388 (get_adi_info): New function.
2389 (info_adi_command): New function.
2390 (read_maps_entry): New function.
2391 (adi_available): New function.
2392 (adi_normalize_address): New function.
2393 (adi_align_address): New function.
2394 (adi_convert_byte_count): New function.
2395 (adi_tag_fd): New function.
2396 (adi_is_addr_mapped): New function.
2397 (adi_read_versions): New function.
2398 (adi_write_versions): New function.
2399 (adi_print_versions): New function.
2400 (do_examine): New function.
2401 (do_assign): New function.
2402 (adi_examine_command): New function.
2403 (adi_assign_command): New function.
2404 (_initialize_sparc64_adi_tdep): New function.
2405
11db9430
SM
24062017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * breakpoint.c (breakpoints_info): Rename to ...
2409 (info_breakpoints_command): ... this.
2410 (watchpoints_info): Rename to ...
2411 (info_watchpoints_command): ... this.
2412 (tracepoints_info): Rename to ...
2413 (info_tracepoints_command): ... this.
2414 (_initialize_breakpoint): Adjust.
2415 * dcache.c (dcache_info): Rename to ...
2416 (info_display_command): ... this.
2417 (_initialize_dcache): Adjust.
2418 * frame.h (args_info): Rename to ...
2419 (info_args_command): ... this.
2420 (locals_info): Rename to ...
2421 (info_locals_command): ... this.
2422 * infcmd.c (nofp_registers_info): Rename to ...
2423 (info_registers_command): ... this.
2424 (float_info): Rename to ...
2425 (info_float_command): ... this.
2426 (program_info): Rename to ...
2427 (info_program_command): ... this.
2428 (all_registers_info): Rename to ...
2429 (info_all_registers_command): ... this.
2430 (vector_info): Rename to ...
2431 (info_vector_command): ... this.
2432 (float_info): Rename to ...
2433 (info_float_command): ... this.
2434 (_initialize_infcmd): Adjust.
2435 * inferior.h (term_info): Rename to ...
2436 (info_terminal_command): ... this.
2437 * inflow.c (term_info): Rename to ...
2438 (info_terminal_command): ... this.
2439 (_initialize_inflow): Adjust.
2440 * infrun.c (signals_info): Rename to ...
2441 (info_signals_command): ... this.
2442 (_initialize_infrun): Adjust.
2443 * objc-lang.c (classes_info): Rename to ...
2444 (info_classes_command): ... this.
2445 (selectors_info): Rename to ...
2446 (info_selectors_command): ... this.
2447 (_initialize_objc_language): Adjust.
2448 * printcmd.c (sym_info): Rename to ...
2449 (info_symbol_command): ... this.
2450 (address_info): Rename to ...
2451 (info_address_command): ... this.
2452 (display_info): Rename to ...
2453 (info_display_command): ... this.
2454 (_initialize_printcmd): Adjust.
2455 * reverse.c (bookmarks_info): Rename to ...
2456 (info_breakpoints_command): ... this.
2457 (_initialize_reverse): Adjust.
2458 * ser-go32.c (dos_info): Rename to ...
2459 (info_serial_command): ... this.
2460 (_initialize_ser_dos): Adjust.
2461 * skip.c (skip_info): Rename to ...
2462 (info_skip_command): ... this.
2463 (_initialize_step_skip): Adjust.
2464 * source.c (line_info): Rename to ...
2465 (info_line_command): ... this.
2466 (source_info): Rename to ...
2467 (info_source_command)
2468 * stack.c (frame_info): Rename to ...
2469 (info_frame_command): ... this.
2470 (locals_info): Rename to ...
2471 (info_locals_command): ... this.
2472 (args_info): Rename to ...
2473 (info_args_command): ... this.
2474 (_initialize_stack): Adjust.
2475 * symtab.c (sources_info): Rename to ...
2476 (info_sources_command): ... this.
2477 (variables_info): Rename to ...
2478 (info_variables_command): ... this.
2479 (functions_info): Rename to ...
2480 (info_functions_command): ... this.
2481 (types_info): Rename to ...
2482 (info_types_command): ... this.
2483 (_initialize_symtab): Adjust.
2484 * target.c (target_info): Rename to ...
2485 (info_target_command): ... this.
2486 (initialize_targets): Adjust.
2487 * tracepoint.c (tvariables_info): Rename to ...
2488 (info_tvariables_command): ... this.
2489 (scope_info): Rename to ...
2490 (info_scope_command): ... this.
2491 (trace_dump_actions): Adjust.
2492 (_initialize_tracepoint): Adjust.
2493
b270e6f9
TT
24942017-08-22 Tom Tromey <tom@tromey.com>
2495
2496 * breakpoint.h (install_breakpoint): Update.
2497 * breakpoint.c (add_solib_catchpoint): Update.
2498 (install_breakpoint): Change argument to a std::unique_ptr.
2499 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2500 (create_breakpoint_sal, create_breakpoint): Update.
2501 (watch_command_1, catch_exec_command_1)
2502 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2503 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2504 Return the breakpoint.
2505 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2506 (new_single_step_breakpoint): Update.
2507 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2508 std::unique_ptr.
2509 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2510 std::unique_ptr.
2511 * break-catch-sig.c (create_signal_catchpoint): Use
2512 std::unique_ptr.
2513 * ada-lang.c (create_ada_exception_catchpoint): Use
2514 std::unique_ptr.
2515
36bd8eaa
TT
25162017-08-22 Tom Tromey <tom@tromey.com>
2517
2518 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2519
56f37645
TT
25202017-08-22 Tom Tromey <tom@tromey.com>
2521
2522 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2523 (lookup_partial_symbol): Update.
2524
0b581c69
TT
25252017-08-22 Tom Tromey <tom@tromey.com>
2526
2527 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2528 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2529 (find_and_open_source, symtab_to_fullname): Update.
2530 * psymtab.c (psymtab_to_fullname): Update.
2531
14278e1f
TT
25322017-08-22 Tom Tromey <tom@tromey.com>
2533
2534 * exec.c (exec_file_attach): Update.
2535 * linux-thread-db.c (try_thread_db_load): Update.
2536 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2537 * utils.c (gdb_realpath): Change return type.
2538 (gdb_realpath_keepfile): Update.
2539 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2540 (_initialize_utils): Register the new self test.
2541 * source.c (openp): Update.
2542 (find_and_open_source): Update.
2543 * nto-tdep.c (nto_find_and_open_solib): Update.
2544 * main.c (set_gdb_data_directory): Update.
2545 (captured_main_1): Update.
2546 * dwarf2read.c (dwarf2_get_dwz_file): Update
2547 (dw2_map_symbol_filenames): Update.
2548 * auto-load.c (auto_load_safe_path_vec_update): Update.
2549 (filename_is_in_auto_load_safe_path_vec): Change type of
2550 "filename_realp".
2551 (auto_load_objfile_script): Update.
2552 (file_is_auto_load_safe): Update. Use std::string.
2553 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2554
4971c9a7
TT
25552017-08-22 Tom Tromey <tom@tromey.com>
2556
2557 * utils.c (gdb_realpath_keepfile): Return a
2558 gdb::unique_xmalloc_ptr.
2559 * exec.c (exec_file_attach): Update.
2560 * utils.h (gdb_realpath_keepfile): Return a
2561 gdb::unique_xmalloc_ptr.
2562
e3e41d58
TT
25632017-08-22 Tom Tromey <tom@tromey.com>
2564
2565 * compile/compile.c (compile_file_command): Use
2566 gdb::unique_xmalloc_ptr, std::string.
2567 * utils.c (gdb_abspath): Change return type.
2568 * source.c (openp): Update.
2569 * objfiles.c (allocate_objfile): Update.
2570 * main.c (set_gdb_data_directory): Update.
2571 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2572
0d999a6e
ZZ
25732017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2574
2575 * cli-cmds.c (list_commands): List actual code around more than
2576 one location.
2577
329d5e7e
JB
25782017-08-21 John Baldwin <jhb@FreeBSD.org>
2579
2580 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2581
bf223d3e
PA
25822017-08-21 Pedro Alves <palves@redhat.com>
2583
2584 PR gdb/19487
2585 * c-exp.y (variable production): Handle function aliases.
2586 * minsyms.c (msymbol_is_text): New function.
2587 * minsyms.h (msymbol_is_text): Declare.
2588 * symtab.c (find_function_alias_target): New function.
2589 * symtab.h (find_function_alias_target): Declare.
2590
c973d0aa
PA
25912017-08-21 Pedro Alves <palves@redhat.com>
2592
2593 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2594 typedefs.
2595 * typeprint.c (whatis_exp): If handling "whatis", and expression
2596 is OP_TYPE, strip one typedef level. Otherwise don't strip
2597 typedefs here.
2598 * valops.c (value_cast): Save "to" type before resolving
2599 stubs/typedefs. Use that type as resulting value's type.
2600
2989a365
TT
26012017-08-18 Tom Tromey <tom@tromey.com>
2602 Pedro Alves <palves@redhat.com>
2603
2604 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2605 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2606 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2607 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2608 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2609 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2610 (linux_get_siginfo_data): Add "thread" argument. Use
2611 scoped_restore.
2612 * linux-nat.c (linux_child_follow_fork)
2613 (check_stopped_by_watchpoint): Use scoped_restore.
2614 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2615 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2616 (restore_inferior_ptid, save_inferior_ptid): Remove.
2617 * btrace.c (btrace_fetch): Use scoped_restore.
2618 * bsd-uthread.c (bsd_uthread_fetch_registers)
2619 (bsd_uthread_store_registers): Use scoped_restore.
2620 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2621 scoped_restore.
2622 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2623 (aix_thread_xfer_partial): Use scoped_restore.
2624 * inferior.h (save_inferior_ptid): Remove.
2625
e60eb288
YQ
26262017-08-18 Yao Qi <yao.qi@linaro.org>
2627
2628 PR tdep/21818
2629 * arm-tdep.c (gdb_print_insn_arm): Mark
2630 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2631
6d580b63
YQ
26322017-08-18 Yao Qi <yao.qi@linaro.org>
2633
2634 * NEWS: Mention GDBserver's new option "--selftest".
2635 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2636 * selftest.c: Move it to common/selftest.c.
2637 * selftest.h: Move it to common/selftest.h.
2638 * selftest-arch.c (reset): New function.
2639 (tests_with_arch): Call reset.
2640
86dcbf50
YQ
26412017-08-18 Yao Qi <yao.qi@linaro.org>
2642
2643 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2644 instead of exception_fprintf and printf_filtered.
2645
7649770c
YQ
26462017-08-18 Yao Qi <yao.qi@linaro.org>
2647
2648 * selftest.c (register_self_test): Rename it to
2649 selftests::register_test.
2650 (run_self_tests): selftest::run_tests.
2651 * selftest.h: Update declarations.
2652 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2653 selftests::register_test_foreach_arch.
2654 * selftest-arch.h: Update declaration.
2655 * aarch64-tdep.c: Update.
2656 * arm-tdep.c: Likewise.
2657 * disasm-selftests.c: Likewise.
2658 * dwarf2loc.c: Likewise.
2659 * dwarf2-frame.c: Likewise.
2660 * findvar.c: Likewise.
2661 * gdbarch-selftests.c: Likewise.
2662 * maint.c (maintenance_selftest): Likewise.
2663 * regcache.c: Likewise.
2664 * rust-exp.y: Likewise.
2665 * selftest-arch.c: Likewise.
2666 * unittests/environ-selftests.c: Likewise.
2667 * unittests/function-view-selftests.c: Likewise.
2668 * unittests/offset-type-selftests.c: Likewise.
2669 * unittests/optional-selftests.c: Likewise.
2670 * unittests/scoped_restore-selftests.c: Likewise.
2671 * utils-selftests.c: Likewise.
2672
b0cba12e
PA
26732017-08-17 Pedro Alves <palves@redhat.com>
2674
2675 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2676 local.
2677
4c8aa72d
PA
26782017-08-17 Pedro Alves <palves@redhat.com>
2679
2680 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2681 field.
2682 (reset_die_in_process): Delete, replaced by ...
2683 (process_die_scope): ... this new class. Make it responsible for
2684 freeing cu->line_header too.
2685 (process_die): Use process_die_scope.
2686 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2687 cu->line_header_die_owner. Don't release the line header if it's
2688 owned by the CU.
2689 (setup_type_unit_groups): Make the CU/DIE own the line header.
2690 Don't release the line header here.
2691
ba713918
AL
26922017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2693
2694 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2695
44d0fb3a
RK
26962017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2697
2698 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2699 Single-Key mode
2700
a5afdb16
RK
27012017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2702
2703 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2704 mode command list.
2705
47613aeb
SH
27062017-08-15 Stafford Horne <shorne@gmail.com>
2707
2708 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2709
9c3cc999
SH
27102017-08-15 Stafford Horne <shorne@gmail.com>
2711
2712 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2713
206726fb
SDJ
27142017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2715
2716 PR gdb/21954
2717 * infcmd.c (unset_environment_command): Use the 'clear' method on
2718 the environment instead of resetting it.
2719
0335ac6d
JB
27202017-08-15 John Baldwin <jhb@FreeBSD.org>
2721
2722 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2723 platforms.
2724
d3abe1c8
TT
27252017-08-14 Tom Tromey <tom@tromey.com>
2726
2727 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2728 (print_binary_chars): Likewise.
2729 (BITS_IN_BYTES): Remove.
2730
d6382fff
TT
27312017-08-14 Tom Tromey <tom@tromey.com>
2732
2733 PR gdb/21675
2734 * valprint.c (LOW_ZERO): Change value to 034.
2735 (print_octal_chars): Add static_asserts for octal constants.
2736 * printcmd.c (print_scalar_formatted): Add 'd' case.
2737
f978cb06
TT
27382017-08-11 Tom Tromey <tom@tromey.com>
2739
2740 * symfile.c (add_symbol_file_command): Use std::vector.
2741
2f5404b3
TT
27422017-08-14 Tom Tromey <tom@tromey.com>
2743
2744 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2745 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2746 std::move.
2747 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2748
de7985c3
PA
27492017-08-11 Pedro Alves <palves@redhat.com>
2750
2751 * infrun.c (process_event_stop_test): Adjust
2752 function_name_is_marked_for_skip call.
2753 * skip.c: Include <list>.
2754 (skiplist_entry): Make it a class with private fields, and
2755 getters/setters.
2756 (skiplist_entry_chain): Delete.
2757 (skiplist_entries): New.
2758 (skiplist_entry_count): Delete.
2759 (highest_skiplist_entry_num): New.
2760 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2761 (add_skiplist_entry): Delete.
2762 (skiplist_entry::skiplist_entry): New.
2763 (skiplist_entry::add_entry): New.
2764 (skip_file_command, skip_function): Adjust.
2765 (compile_skip_regexp): Delete.
2766 (skip_command): Don't compile regexp here. Adjust to use
2767 skiplist_entry::add_entry.
2768 (skip_info): Adjust to use range-for and getters.
2769 (skip_enable_command, skip_disable_command): Adjust to use
2770 range-for and setters.
2771 (skip_delete_command): Adjust to use std::list.
2772 (add_skiplist_entry): Delete.
2773 (skip_file_p): Delete, refactored as ...
2774 (skiplist_entry::do_skip_file_p): ... this new method.
2775 (skip_gfile_p): Delete, refactored as ...
2776 (skiplist_entry::do_gskip_file_p): ... this new method.
2777 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2778 (skiplist_entry::skip_function_p): ... this new method.
2779 (function_name_is_marked_for_skip): Now returns bool, and takes
2780 the function sal by const reference. Adjust to use range-for and
2781 skiplist_entry methods.
2782 (_initialize_step_skip): Remove references to
2783 skiplist_entry_chain, skiplist_entry_count.
2784 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2785 takes the function sal by const reference.
2786
be7d3cd5
YQ
27872017-08-11 Yao Qi <yao.qi@linaro.org>
2788
2789 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2790 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2791 (dwarf2_frame_cache):
2792 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2793 RETURN_MASK_ALL and set *this_case to NULL.
2794 * frame-unwind.h: Update comments.
2795
1c90d9f0
YQ
27962017-08-11 Yao Qi <yao.qi@linaro.org>
2797
2798 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2799 (dwarf2_frame_state_copy_regs): Remove.
2800 (dwarf2_frame_state_free_regs): Remove.
2801 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2802 (dwarf2_restore_rule): Call method .alloc_regs instead of
2803 dwarf2_frame_state_alloc_regs.
2804 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2805 constructor. Call std::move.
2806 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2807 (dwarf2_frame_cache): Likewise.
2808
2809 [GDB_SELF_TEST]: Include selftest.h and
2810 selftest-arch.h.
2811 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2812 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2813 execute_cfa_program_test.
2814
2815 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2816 copy ctor, assignment operator, move assignment.
2817 <alloc_regs>: New method.
2818 <swap>: New method.
2819 (struct dwarf2_frame_state): Delete dtor.
2820 (dwarf2_frame_state_alloc_regs): Remove declaration.
2821 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2822 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2823
afe37d6b
YQ
28242017-08-11 Yao Qi <yao.qi@linaro.org>
2825
2826 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2827 (dwarf2_frame_state::dwarf2_frame_state): New.
2828 (dwarf2_frame_state::~dwarf2_frame_state): New.
2829 (dwarf2_fetch_cfa_info): Update.
2830 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2831 rather than a pointer. Update code.
2832 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2833 dtor.
2834 <data_align, code_align, retaddr_column>: Change them to const.
2835 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2836 to bool.
2837
b348037f
YQ
28382017-08-11 Yao Qi <yao.qi@linaro.org>
2839
2840 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2841 <loc.exp>: New field.
2842 * dwarf2-frame.c (execute_cfa_program): Update.
2843 (dwarf2_frame_prev_register): Update.
2844
e7c9de26
PA
28452017-08-10 Pedro Alves <palves@redhat.com>
2846
2847 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2848
e8c6b620
JB
28492017-08-09 John Baldwin <jhb@FreeBSD.org>
2850
2851 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2852 (fbsd_pending_children): Use std::list.
2853 (fbsd_remember_child): Likewise.
2854 (fbsd_is_child_pending): Likewise.
2855 (fbsd_pending_vfork_done): Use std::forward_list.
2856 (fbsd_add_vfork_done): Likewise.
2857 (fbsd_is_vfork_done_pending): Likewise.
2858 (fbsd_next_vfork_done): Likewise.
2859
e4a26669
JB
28602017-08-09 John Baldwin <jhb@FreeBSD.org>
2861
2862 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2863 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2864 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2865 for `mapfilename'.
2866 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 2867 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 2868
142311d3
JB
28692017-08-09 John Baldwin <jhb@FreeBSD.org>
2870
2871 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2872 "filestuff.h".
2873 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2874
42fa2e0e
TT
28752017-08-09 Tom Tromey <tom@tromey.com>
2876
2877 * skip.c (skiplist_entry): New constructor.
2878 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2879 (skiplist_entry::file_is_glob): Now bool.
2880 (skiplist_entry::file, skiplist_entry::function): Now
2881 std::string.
2882 (make_skip_entry): Return a unique_ptr. Use new.
2883 (free_skiplist_entry, free_skiplist_entry_cleanup)
2884 (make_free_skiplist_entry_cleanup): Remove.
2885 (skip_command, skip_disable_command, add_skiplist_entry)
2886 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2887 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2888 (function_name_is_marked_for_skip): Update.
2889 (skip_delete_command): Update. Use delete.
2890
cd3af38d
JW
28912017-08-09 Jiong Wang <jiong.wang@arm.com>
2892
2893 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2894 (aarch64_linux_core_read_description): New function.
2895 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2896
29592bde
PA
28972017-08-09 Pedro Alves <palves@redhat.com>
2898
2899 * cp-name-parser.y (cp_comp_to_string): Return a
2900 gdb::unique_xmalloc_ptr<char>.
2901 * cp-support.c (replace_typedefs_qualified_name)
2902 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2903 (cp_canonicalize_string_full): Use op= instead of explicit
2904 convertion.
2905 (cp_class_name_from_physname, method_name_from_physname)
2906 (cp_func_name, cp_remove_params): Adjust to use
2907 gdb::unique_xmalloc_ptr<char>.
2908 * cp-support.h (cp_comp_to_string): Return a
2909 gdb::unique_xmalloc_ptr<char>.
2910 * python/py-type.c (typy_lookup_type): Adjust to use
2911 gdb::unique_xmalloc_ptr<char>.
2912
b3340438
L
29132017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2914
2915 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2916
e88e8651
YQ
29172017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2918 Yao Qi <yao.qi@linaro.org>
2919
2920 * cp-support.c (cp_canonicalize_string_full): Use
2921 gdb::unique_xmalloc_ptr<char>.
2922 (cp_canonicalize_string): Likewise.
2923
f5a29eb0
YQ
29242017-08-09 Yao Qi <yao.qi@linaro.org>
2925
2926 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2927 * regformats/i386/amd64-avx-avx512.dat: Remove.
2928 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2929 * regformats/i386/amd64-avx-mpx.dat:Remove.
2930 * regformats/i386/amd64-avx.dat: Remove.
2931 * regformats/i386/amd64-mpx.dat: Remove.
2932 * regformats/i386/i386-avx-avx512.dat: Remove.
2933 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2934 * regformats/i386/i386-avx-mpx.dat: Remove.
2935 * regformats/i386/i386-mmx.dat: Remove.
2936 * regformats/i386/i386-mpx.dat: Remove.
2937
57757c2f
YQ
29382017-08-09 Yao Qi <yao.qi@linaro.org>
2939
2940 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2941 * amd64-tdep.c: Don't include features/i386/x32*.c.
2942 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2943 functions.
2944 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2945 and i386/x32-avx-avx512.
2946 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2947 and i386/x32.xml.
2948 * features/i386/x32-avx-avx512.c: Removed.
2949 * features/i386/x32-avx-avx512.xml: Removed.
2950 * features/i386/x32-avx.c: Removed.
2951 * features/i386/x32-avx.xml: Removed.
2952 * features/i386/x32.c: Removed.
2953 * features/i386/x32.xml: Removed.
2954 * regformats/i386/x32-avx-avx512.dat: Removed.
2955 * regformats/i386/x32-avx.dat: Removed.
2956 * regformats/i386/x32.dat: Removed.
2957
ba7b109b
MR
29582017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2959
2960 PR breakpoints/21886
2961 * mem-break.c (default_memory_insert_breakpoint): Use
2962 `->placed_address' rather than `->reqstd_address' for the
2963 breakpoint location.
2964
e347efc3
MR
29652017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2966
2967 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2968 assertions.
2969
0dba2a6c
MR
29702017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2971
2972 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2973 a union of `tdep_info', `tdesc_data' and `id'.
2974 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2975 rather than `info.tdep_info'.
2976 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2977 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2978 * i386-tdep.c (i386_gdbarch_init): Likewise.
2979 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2980 * mips-tdep.c (mips_gdbarch_init): Likewise.
2981 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2982 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2983 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2984 `info.tdep_info'.
2985 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2986 `info.tdep_info'.
2987 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2988 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2989 `info.tdep_info'.
2990 * spu-tdep.c (spu_gdbarch_init): Likewise.
2991 * gdbarch.h: Regenerate.
2992
16eb6b2d
LS
29932017-08-07 Leszek Swirski <leszeks@google.com>
2994
7b005726 2995 PR symtab/20899
16eb6b2d
LS
2996 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2997
74cbb09e
SM
29982017-08-07 Simon Marchi <simon.marchi@ericsson.com>
2999
3000 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3001 (gdbsim_open): Rename gdb_argv args object to argv.
3002
ee0c3293
TT
30032017-08-05 Tom Tromey <tom@tromey.com>
3004
3005 * compile/compile-object-load.c (compile_object_load): Use
3006 gdb::unique_xmalloc_ptr.
3007 * cli/cli-dump.c (scan_filename): Rename from
3008 scan_filename_with_cleanup. Change return type.
3009 (scan_expression): Rename from scan_expression_with_cleanup.
3010 Change return type.
3011 (dump_memory_to_file, dump_value_to_file, restore_command):
3012 Use gdb::unique_xmalloc_ptr. Update.
3013 * cli/cli-cmds.c (find_and_open_script): Use
3014 gdb::unique_xmalloc_ptr.
3015 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3016 * symmisc.c (maintenance_print_symbols)
3017 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3018 * symfile.c (symfile_bfd_open, generic_load)
3019 (add_symbol_file_command, remove_symbol_file_command): Use
3020 gdb::unique_xmalloc_ptr.
3021 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3022 * psymtab.c (maintenance_print_psymbols): Use
3023 gdb::unique_xmalloc_ptr.
3024 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3025 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3026 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3027 (reload_shared_libraries_1): Likewise.
3028
3232fabd
TT
30292017-08-05 Tom Tromey <tom@tromey.com>
3030
3031 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3032 (rust_op_vector, rust_set_vector): New typedefs.
3033 (current_parser): New global.
3034 (work_obstack): Change to pointer type. Update all users.
3035 (rust_ast, pstate): Remove globals.
3036 (struct rust_parser): New.
3037 (%union) <params, field_inits>: Change type.
3038 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3039 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3040 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3041 (convert_params_to_types, convert_params_to_expression): Change
3042 type of "params".
3043 (ast_string): Change type of "fields".
3044 (rust_parse): Make a rust_parser. Remove cleanups.
3045 (rust_lex_tests): Make and install an auto_obstack.
3046
f02fd774
YQ
30472017-08-04 Yao Qi <yao.qi@linaro.org>
3048
3049 * configure.srv (ipa_x32_linux_regobj): New.
3050 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3051 instead of X86_TDESC_AVX512.
3052 (initialize_low_tracepoint): Call
3053 init_registers_x32_avx_avx512_linux.
3054
91975afd
YQ
30552017-08-04 Yao Qi <yao.qi@linaro.org>
3056
3057 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3058
2331fa3a
RK
30592017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3060
3061 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3062
744e4fe1
TT
30632017-08-03 Tom Tromey <tom@tromey.com>
3064
3065 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3066 Remove.
3067 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3068
1c034b67
TT
30692017-08-03 Tom Tromey <tom@tromey.com>
3070
3071 * python/py-param.c (compute_enum_values): Use gdb_argv.
3072
773a1edc
TT
30732017-08-03 Tom Tromey <tom@tromey.com>
3074
3075 * utils.h (struct gdb_argv_deleter): New.
3076 (gdb_argv): New class.
3077 * utils.c (gdb_argv::reset): New method.
3078 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3079 * tracefile.c (tsave_command): Use gdb_argv.
3080 * top.c (new_ui_command): Use gdb_argv.
3081 * symmisc.c (maintenance_print_symbols)
3082 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3083 * symfile.c (symbol_file_command, generic_load)
3084 (remove_symbol_file_command): Use gdb_argv.
3085 * stack.c (backtrace_command): Use gdb_argv.
3086 * source.c (add_path, show_substitute_path_command)
3087 (unset_substitute_path_command, set_substitute_path_command):
3088 Use gdb_argv.
3089 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3090 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3091 * remote.c (extended_remote_run, remote_put_command)
3092 (remote_get_command, remote_delete_command): Use gdb_argv.
3093 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3094 (gdbsim_open): Use gdb_argv.
3095 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3096 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3097 * procfs.c (procfs_info_proc): Use gdb_argv.
3098 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3099 * infrun.c (handle_command): Use gdb_argv.
3100 * inferior.c (add_inferior_command, clone_inferior_command):
3101 Use gdb_argv.
3102 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3103 * exec.c (exec_file_command): Use gdb_argv.
3104 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3105 * compile/compile.c (build_argc_argv): Use gdb_argv.
3106
0d50bde3
TT
31072017-08-03 Tom Tromey <tom@tromey.com>
3108
3109 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3110
7f968c89
TT
31112017-08-03 Tom Tromey <tom@tromey.com>
3112
3113 * python/python.c (compute_python_string): Return std::string.
3114 (gdbpy_eval_from_control_command): Update.
3115 (do_start_initialization): Use std::string.
3116 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3117 xstrprintf.
3118 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3119 xstrprintf.
3120
3c9ebddd
TT
31212017-08-03 Tom Tromey <tom@tromey.com>
3122
3123 * top.h (do_restore_instream_cleanup): Remove.
3124 * top.c (do_restore_instream_cleanup): Remove.
3125 (read_command_file): Use scoped_restore.
3126 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3127
b51b225e
TT
31282017-08-03 Tom Tromey <tom@tromey.com>
3129
3130 * cli/cli-script.c (execute_user_command)
3131 (execute_control_command): Use scoped_restore.
3132
ac991630
TT
31332017-08-03 Tom Tromey <tom@tromey.com>
3134
3135 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3136 (execute_user_command): Remove user_call_depth; use
3137 user_args_stack's size instead.
3138
898e0c8e
TT
31392017-08-03 Tom Tromey <tom@tromey.com>
3140
3141 * top.h (in_user_command): Remove.
3142 * top.c (in_user_command): Remove.
3143 * cli/cli-script.c (do_restore_user_call_depth)
3144 (execute_user_command): Update.
3145
26fcd5d7
TT
31462017-08-03 Tom Tromey <tom@tromey.com>
3147
3148 * valops.c (search_struct_method): Use gdb::byte_vector.
3149 * valarith.c (value_concat): Use std::vector.
3150 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3151 (simple_search_memory): Likewise.
3152 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3153 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3154 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3155 * elfread.c (elf_rel_plt_read): Use std::string.
3156 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3157 * cli/cli-dump.c (restore_section_callback): Use
3158 gdb::byte_vector.
3159
7c218e6c
TT
31602017-08-03 Tom Tromey <tom@tromey.com>
3161
3162 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3163
31b68d4a
TT
31642017-08-03 Tom Tromey <tom@tromey.com>
3165
3166 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3167 (tui_register_format): Use scoped_restore.
3168
2ec845e7
TT
31692017-08-03 Tom Tromey <tom@tromey.com>
3170
3171 * reverse.c (exec_direction_default): Remove.
3172 (exec_reverse_once): Use scoped_restore.
3173 * remote.c (restore_remote_timeout): Remove.
3174 (remote_flash_erase, remote_flash_write, remote_flash_done)
3175 (readchar, remote_serial_write): Use scoped_restore.
3176 * cli/cli-script.c (struct source_cleanup_lines_args)
3177 (source_cleanup_lines): Remove.
3178 (script_from_file): Use scoped_restore.
3179 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3180 (source_command): Use scoped_restore.
3181
b3bc8453
TT
31822017-08-03 Tom Tromey <tom@tromey.com>
3183
3184 * utils.h (make_cleanup_free_so): Remove.
3185 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3186 * solist.h (struct so_deleter): New.
3187 (so_list_up): New typedef.
3188 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3189
e3ad2841
TT
31902017-08-03 Tom Tromey <tom@tromey.com>
3191
3192 * utils.h (make_cleanup_restore_current_language): Remove.
3193 * utils.c (do_restore_current_language)
3194 (make_cleanup_restore_current_language): Remove.
3195 * parse.c (parse_exp_in_context_1)
3196 (parse_expression_with_language): Use
3197 scoped_restore_current_language.
3198 * mi/mi-main.c (mi_cmd_execute): Use
3199 scoped_restore_current_language.
3200 * language.h (scoped_restore_current_language): New class.
3201
b80cf838
TT
32022017-08-03 Tom Tromey <tom@tromey.com>
3203
3204 * compile/compile.c (cleanup_unlink_file): Remove.
3205 (compile_to_object): Use gdb::unlinker.
3206 (eval_compile_command): Likewise.
3207
fad0444a
TT
32082017-08-03 Tom Tromey <tom@tromey.com>
3209
3210 * utils.h (make_cleanup_fclose): Remove.
3211 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3212
6e7bc05c
TT
32132017-08-03 Tom Tromey <tom@tromey.com>
3214
3215 * top.c (open_terminal_stream): Return gdb_file_up.
3216 (new_ui_command): Update.
3217
4a45905b
TT
32182017-08-03 Tom Tromey <tom@tromey.com>
3219
3220 * source.c (print_source_lines_base, forward_search_command)
3221 (reverse_search_command): Use gdb_file_up.
3222
7cd06d6e
TT
32232017-08-03 Tom Tromey <tom@tromey.com>
3224
3225 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3226
ed166945
TT
32272017-08-03 Tom Tromey <tom@tromey.com>
3228
3229 * cli/cli-cmds.c (find_and_open_script): Change return type.
3230 Remove "streamp" and "full_path" parameters.
3231 (source_script_with_search): Update.
3232 * auto-load.c (source_script_file): Update.
3233 * cli/cli-cmds.h (find_and_open_script): Change type.
3234 (open_script): New struct.
3235
d419f42d
TT
32362017-08-03 Tom Tromey <tom@tromey.com>
3237
3238 * xml-support.c (xml_fetch_content_from_file): Update.
3239 * ui-file.c (stdio_file::open): Update.
3240 * tracefile-tfile.c (tfile_start): Update.
3241 * remote.c (remote_file_put, remote_file_get): Update.
3242 * nat/linux-procfs.c (linux_proc_get_int)
3243 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3244 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3245 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3246 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3247 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3248 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3249 * linux-nat.c (linux_proc_pending_signals): Update.
3250 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3251 (file_closer): Remove.
3252 * compile/compile.c (compile_to_object): Update.
3253 * common/filestuff.h (struct gdb_file_deleter): New.
3254 (gdb_file_up): New typedef.
3255 (gdb_fopen_cloexec): Change return type.
3256 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3257 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3258 (dump_binary_file, restore_binary_file): Update.
3259 * auto-load.c (auto_load_objfile_script_1): Update.
3260
4a2b031d
TT
32612017-08-03 Tom Tromey <tom@tromey.com>
3262
3263 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3264 (info_static_tracepoint_markers_command): Likewise.
3265 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3266 * skip.c (skip_info): Use ui_out_emit_table.
3267 * progspace.c (print_program_space): Use ui_out_emit_table.
3268 * osdata.c (info_osdata): Use ui_out_emit_table.
3269 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3270 ui_out_emit_table.
3271 * linux-thread-db.c (info_auto_load_libthread_db): Use
3272 ui_out_emit_table.
3273 * inferior.c (print_inferior): Use ui_out_emit_table.
3274 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3275 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3276 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3277 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3278 * ui-out.h (class ui_out_emit_table): New.
3279
a4f320fd
MR
32802017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3281
3282 * mips-tdep.c (mips_fpu_type_str): New function.
3283 (mips_dump_tdep): Call it.
3284
a2f1f308
MR
32852017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3286
3287 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3288 `->mips_fpu_type'.
3289
7e5ed83b
XR
32902017-07-31 Xavier Roirand <roirand@adacore.com>
3291
3292 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3293
4c9dc811
XR
32942017-07-27 Xavier Roirand <roirand@adacore.com>
3295
3296 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3297
27d41eac
YQ
32982017-07-26 Yao Qi <yao.qi@linaro.org>
3299
3300 * cli/cli-cmds.c (maintenancechecklist): New variable.
3301 * gdbcmd.h (maintenancechecklist): Declare it.
3302 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3303 Call i386_linux_read_description with different masks.
3304 * maint.c (maintenance_check_command): New function.
3305 (_initialize_maint_cmds): Call add_prefix_cmd.
3306 * target-descriptions.c (tdesc_reg): override operator != and ==.
3307 (tdesc_type): Likewise.
3308 (tdesc_feature): Likewise.
3309 (target_desc): Likewise.
3310 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3311 (maintenance_check_xml_descriptions): New function.
3312 (_initialize_target_descriptions) Add command "xml-descriptions".
3313 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3314
ea03d0d3
YQ
33152017-07-26 Yao Qi <yao.qi@linaro.org>
3316
3317 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3318 Include features/i386/32bit-*.c.
3319 (i386_linux_read_description): Generate target description if it
3320 doesn't exist.
3321 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3322 functions.
3323 * features/i386/32bit-linux.c: Re-generated.
3324 * features/i386/32bit-sse.c: Likewise.
3325 * target-descriptions.c (print_c_feature::visit): Print code to
3326 set register number if needed.
3327 (print_c_feature) <m_next_regnum>: New field.
3328
25aa13e5
YQ
33292017-07-26 Yao Qi <yao.qi@linaro.org>
3330
3331 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3332 (FEATURE_XMLFILES): New.
3333 (FEATURE_CFILES): New.
3334 New rules.
3335 (clean-cfiles): Remove generated c files.
3336 * features/i386/32bit-avx.c: Generated.
3337 * features/i386/32bit-avx512.c: Generated.
3338 * features/i386/32bit-core.c: Generated.
3339 * features/i386/32bit-linux.c: Generated.
3340 * features/i386/32bit-mpx.c: Generated.
3341 * features/i386/32bit-pkeys.c: Generated.
3342 * features/i386/32bit-sse.c: Generated.
3343 * target-descriptions.c: Include algorithm.
3344 (tdesc_element_visitor): Add method visit_end.
3345 (print_c_tdesc): Implement visit_end.
3346 (print_c_tdesc:: m_filename_after_features): Move it to
3347 protected.
3348 (print_c_feature): New class.
3349 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3350 name starts with "i386/32bit-".
3351
6eb1e6a8
YQ
33522017-07-26 Yao Qi <yao.qi@linaro.org>
3353
3354 * target-descriptions.c (tdesc_element_visitor): New class.
3355 (tdesc_element): New class.
3356 (tdesc_reg): Inherit from tdesc_element.
3357 (tdesc_reg::accept): New function.
3358 (tdesc_type): Inherit from tdesc_element.
3359 (tdesc_type::accept): New function.
3360 (tdesc_feature): Inherit from tdesc_element.
3361 (tdesc_feature::accept): New function.
3362 (target_desc): Inherit from tdesc_element.
3363 (target_desc::target_desc): New.
3364 (target_desc::~target_desc): New.
3365 (target_desc::accept): New.
3366 (allocate_target_description): Use new.
3367 (free_target_description): Use delete.
3368 (print_c_tdesc): New class.
3369 (maint_print_c_tdesc_cmd): Adjust.
3370
3371 * features/aarch64.c: Re-generated.
3372 * features/arc-arcompact.c: Re-generated.
3373 * features/arc-v2.c: Re-generated.
3374 * features/arm/arm-with-iwmmxt.c: Re-generated.
3375 * features/arm/arm-with-m.c: Re-generated.
3376 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3377 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3378 * features/arm/arm-with-neon.c: Re-generated.
3379 * features/arm/arm-with-vfpv2.c: Re-generated.
3380 * features/arm/arm-with-vfpv3.c: Re-generated.
3381 * features/i386/amd64-avx-avx512.c: Re-generated.
3382 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3383 * features/i386/amd64-avx.c: Re-generated.
3384 * features/i386/amd64-avx-linux.c: Re-generated.
3385 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3386 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3387 * features/i386/amd64-avx-mpx.c: Re-generated.
3388 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3389 * features/i386/amd64.c: Re-generated.
3390 * features/i386/amd64-linux.c: Re-generated.
3391 * features/i386/amd64-mpx.c: Re-generated.
3392 * features/i386/amd64-mpx-linux.c: Re-generated.
3393 * features/i386/i386-avx-avx512.c: Re-generated.
3394 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3395 * features/i386/i386-avx.c: Re-generated.
3396 * features/i386/i386-avx-linux.c: Re-generated.
3397 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3398 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3399 * features/i386/i386-avx-mpx.c: Re-generated.
3400 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3401 * features/i386/i386.c: Re-generated.
3402 * features/i386/i386-linux.c: Re-generated.
3403 * features/i386/i386-mmx.c: Re-generated.
3404 * features/i386/i386-mmx-linux.c: Re-generated.
3405 * features/i386/i386-mpx.c: Re-generated.
3406 * features/i386/i386-mpx-linux.c: Re-generated.
3407 * features/i386/x32-avx-avx512.c: Re-generated.
3408 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3409 * features/i386/x32-avx.c: Re-generated.
3410 * features/i386/x32-avx-linux.c: Re-generated.
3411 * features/i386/x32.c: Re-generated.
3412 * features/i386/x32-linux.c: Re-generated.
3413 * features/microblaze.c: Re-generated.
3414 * features/microblaze-with-stack-protect.c: Re-generated.
3415 * features/mips64-dsp-linux.c: Re-generated.
3416 * features/mips64-linux.c: Re-generated.
3417 * features/mips-dsp-linux.c: Re-generated.
3418 * features/mips-linux.c: Re-generated.
3419 * features/nds32.c: Re-generated.
3420 * features/nios2.c: Re-generated.
3421 * features/nios2-linux.c: Re-generated.
3422 * features/rs6000/powerpc-32.c: Re-generated.
3423 * features/rs6000/powerpc-32l.c: Re-generated.
3424 * features/rs6000/powerpc-403.c: Re-generated.
3425 * features/rs6000/powerpc-403gc.c : Re-generated.
3426 * features/rs6000/powerpc-405.c: Re-generated.
3427 * features/rs6000/powerpc-505.c: Re-generated.
3428 * features/rs6000/powerpc-601.c: Re-generated.
3429 * features/rs6000/powerpc-602.c: Re-generated.
3430 * features/rs6000/powerpc-603.c: Re-generated.
3431 * features/rs6000/powerpc-604.c: Re-generated.
3432 * features/rs6000/powerpc-64.c: Re-generated.
3433 * features/rs6000/powerpc-64l.c: Re-generated.
3434 * features/rs6000/powerpc-7400.c: Re-generated.
3435 * features/rs6000/powerpc-750.c: Re-generated.
3436 * features/rs6000/powerpc-860.c: Re-generated.
3437 * features/rs6000/powerpc-altivec32.c: Re-generated.
3438 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3439 * features/rs6000/powerpc-altivec64.c: Re-generated.
3440 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3441 * features/rs6000/powerpc-cell32l.c: Re-generated.
3442 * features/rs6000/powerpc-cell64l.c: Re-generated.
3443 * features/rs6000/powerpc-e500.c: Re-generated.
3444 * features/rs6000/powerpc-e500l.c: Re-generated.
3445 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3446 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3447 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3448 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3449 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3450 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3451 * features/rs6000/powerpc-vsx32.c: Re-generated.
3452 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3453 * features/rs6000/powerpc-vsx64.c: Re-generated.
3454 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3455 * features/rs6000/rs6000.c: Re-generated.
3456 * features/s390-linux32.c: Re-generated.
3457 * features/s390-linux32v1.c: Re-generated.
3458 * features/s390-linux32v2.c: Re-generated.
3459 * features/s390-linux64.c: Re-generated.
3460 * features/s390-linux64v1.c: Re-generated.
3461 * features/s390-linux64v2.c: Re-generated.
3462 * features/s390-te-linux64.c: Re-generated.
3463 * features/s390-tevx-linux64.c: Re-generated.
3464 * features/s390-vx-linux64.c: Re-generated.
3465 * features/s390x-linux64.c: Re-generated.
3466 * features/s390x-linux64v1.c: Re-generated.
3467 * features/s390x-linux64v2.c: Re-generated.
3468 * features/s390x-te-linux64.c: Re-generated.
3469 * features/s390x-tevx-linux64.c: Re-generated.
3470 * features/s390x-vx-linux64.c: Re-generated.
3471 * features/sparc/sparc32-solaris.c: Re-generated.
3472 * features/sparc/sparc64-solaris.c: Re-generated.
3473 * features/tic6x-c62x.c: Re-generated.
3474 * features/tic6x-c62x-linux.c: Re-generated.
3475 * features/tic6x-c64x.c: Re-generated.
3476 * features/tic6x-c64x-linux.c: Re-generated.
3477 * features/tic6x-c64xp.c: Re-generated.
3478 * features/tic6x-c64xp-linux.c: Re-generated.
3479
35b4818d
YQ
34802017-07-26 Yao Qi <yao.qi@linaro.org>
3481
3482 * i386-linux-tdep.c (i386_linux_read_description): New function.
3483 (i386_linux_core_read_description): Call
3484 i386_linux_read_description.
3485 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3486 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3487 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3488 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3489 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3490 * x86-linux-nat.c (x86_linux_read_description): Call
3491 i386_linux_read_description.
3492
8e2141c6
YQ
34932017-07-26 Yao Qi <yao.qi@linaro.org>
3494
3495 * NEWS: Mention it.
3496 * features/Makefile (%.c: %.xml): Pass the xml file name to
3497 command "maint print c-tdesc".
3498 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3499 name from 'arg'.
3500
b468ff4c
YQ
35012017-07-26 Yao Qi <yao.qi@linaro.org>
3502
3503 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3504 in-class initialization.
3505 (tdesc_create_feature): Call new instead of XCNEW.
3506 (free_target_description): Ue delete.
3507
b9c0e1b4
JB
35082017-07-25 John Baldwin <jhb@FreeBSD.org>
3509
3510 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3511
a04b5337
YQ
35122017-07-25 Yao Qi <yao.qi@linaro.org>
3513
3514 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3515 constant.
3516 (amd64_x32_init_abi): Likewise.
3517 * amd64-tdep.h (amd64_init_abi): Update declaration.
3518 (amd64_x32_init_abi): Likewise.
3519
02ad7fc2
YQ
35202017-07-25 Yao Qi <yao.qi@linaro.org>
3521
3522 PR tdep/21717
3523 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3524 condition for FPSCR.
3525 (arm_linux_store_inferior_registers): Likewise.
3526
b6f48cb0
TT
35272017-07-22 Tom Tromey <tom@tromey.com>
3528
3529 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3530 <syscalls_counts>: Now a std::vector.
3531 (get_catch_syscall_inferior_data): Use "new".
3532 (catch_syscall_inferior_data_cleanup): Use "delete".
3533 (insert_catch_syscall, remove_catch_syscall)
3534 (clear_syscall_counts): Update.
3535
e12c9b7a
TT
35362017-07-22 Tom Tromey <tom@tromey.com>
3537
3538 * break-catch-syscall.c (syscall_catchpoint)
3539 <syscalls_to_be_caught>: Now a std::vector<int>
3540 (~syscall_catchpoint): Remove.
3541 (insert_catch_syscall, remove_catch_syscall)
3542 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3543 (print_mention_catch_syscall, print_recreate_catch_syscall):
3544 Update.
3545 (create_syscall_event_catchpoint): Change type of "filter"
3546 parameter.
3547 (catch_syscall_split_args): Return a std::vector.
3548 (catch_syscall_command_1, catching_syscall_number_1): Update.
3549
4fa8aeac
TT
35502017-07-22 Tom Tromey <tom@tromey.com>
3551
3552 * break-catch-throw.c (struct exception_catchpoint)
3553 <exception_rx>: Now a std::string.
3554 (~exception_catchpoint): Remove.
3555 (print_one_detail_exception_catchpoint): Update.
3556 (handle_gnu_v3_exceptions): Change type of except_rx.
3557 (extract_exception_regexp): Return a std::string.
3558 (catch_exception_command_1): Update.
3559
f746a154
TT
35602017-07-22 Tom Tromey <tom@tromey.com>
3561
3562 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3563 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3564 std::vector.
3565 <catch_all>: Now a bool.
3566 (~signal_catchpoint): Remove.
3567 (signal_catchpoint_insert_location)
3568 (signal_catchpoint_remove_location)
3569 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3570 (signal_catchpoint_print_mention)
3571 (signal_catchpoint_print_recreate)
3572 (signal_catchpoint_explains_signal): Update.
3573 (create_signal_catchpoint): Change type of "filter" and
3574 "catch_all".
3575 (catch_signal_split_args): Return a std::vector. Change type of
3576 "catch_all".
3577 (catch_signal_command): Update.
3578
47e77640
PA
35792017-07-20 Pedro Alves <palves@redhat.com>
3580
3581 * ada-lang.c (ada_language_defn): Make extern.
3582 (_initialize_ada_language): Remove add_language call.
3583 * c-lang.c (c_language_defn, cplus_language_defn)
3584 (asm_language_defn, minimal_language_defn): Make extern.
3585 (_initialize_c_language): Delete.
3586 * completer.c (compare_cstrings): Delete, moved to utils.h.
3587 * d-lang.c (d_language_defn): Make extern.
3588 (_initialize_d_language): Remove add_language calls.
3589 * defs.h (enum language): Add comment.
3590 * f-lang.c (f_language_defn): Make extern.
3591 (_initialize_f_language): Remove add_language call.
3592 * go-lang.c (go_language_defn): Make extern.
3593 (_initialize_go_language): Remove add_language call.
3594 * language.c: Include <algorithm>.
3595 (languages): Redefine as const array.
3596 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3597 (set_language_command): Handle "local". Use for-range loop.
3598 (set_language): Remove loop.
3599 (language_enum): Rewrite.
3600 (language_def, language_str): Remove loops.
3601 (add_language): Delete.
3602 (add_set_language_command): New, based on add_languages.
3603 (skip_language_trampoline): Adjust.
3604 (local_language_defn): Delete.
3605 (language_gdbarch_post_init): Adjust.
3606 (_initialize_language): Remove add_language calls. Call
3607 add_set_language_command.
3608 * language.h (add_language): Delete.
3609 (auto_language_defn)
3610 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3611 (asm_language_defn, c_language_defn, cplus_language_defn)
3612 (d_language_defn, f_language_defn, go_language_defn)
3613 (m2_language_defn, objc_language_defn, opencl_language_defn)
3614 (pascal_language_defn, rust_language_defn): Declare.
3615 * m2-lang.c (m2_language_defn): Make extern.
3616 (_initialize_m2_language): Remove add_language call.
3617 * objc-lang.c (objc_language_defn): Make extern.
3618 (_initialize_objc_language): Remove add_language call.
3619 * opencl-lang.c (opencl_language_defn): Make extern.
3620 (_initialize_opencl_language): Remove add_language call.
3621 * p-lang.c (pascal_language_defn): Make extern.
3622 (_initialize_pascal_language): Delete.
3623 * rust-lang.c (rust_language_defn): Make extern.
3624 (_initialize_rust_language): Delete.
3625 * utils.h (compare_cstrings): New static inline function.
3626
edb0c9cb
PA
36272017-07-20 Pedro Alves <palves@redhat.com>
3628
3629 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3630 (get_var_value): Constify parameters.
3631 (get_int_var_value): Change prototype.
3632 (to_fixed_range_type): Adjust.
3633 * ada-lang.h (get_int_var_value): Change prototype.
3634
a778f165
PA
36352017-07-20 Pedro Alves <palves@redhat.com>
3636
3637 * dwarf2read.c (dw2_lookup_symbol): Use
3638 SYMBOL_MATCHES_SEARCH_NAME.
3639 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3640
42edd901
PA
36412017-07-20 Pedro Alves <palves@redhat.com>
3642
3643 * block.c (block_iter_name_step, block_iter_name_first)
3644 (block_iter_name_next): Delete.
3645 (block_lookup_symbol_primary): Adjust to use
3646 dict_iter_match_first/dict_iter_match_next.
3647 * block.h (block_iter_name_first, block_iter_name_next): Delete
3648 declarations.
3649 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3650 dict_iter_match_first/dict_iter_match_next.
3651
cf325299
PA
36522017-07-20 Pedro Alves <palves@redhat.com>
3653
3654 * cp-support.c (cp_find_first_component_aux): Add missing case for
3655 end of string.
3656
c5ed0576
DB
36572017-07-18 David Blaikie <dblaikie@gmail.com>
3658
3659 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3660 of dwo_cu's dwo_file.
3661
27841e76
YQ
36622017-07-18 Yao Qi <yao.qi@linaro.org>
3663
3664 * remote.c (store_registers_using_G): Remove one line comment.
3665
cfb7e58b
YQ
36662017-07-18 Yao Qi <yao.qi@linaro.org>
3667
3668 * regcache.c (regcache_cpy): Simplify it.
3669 (regcache::cpy_no_passthrough): Remove it.
3670 * regcache.h (cpy_no_passthrough): Remove it.
3671 (regcache_dup, regcache_cpy): Update comments.
3672
386535dd
PA
36732017-07-18 Pedro Alves <palves@redhat.com>
3674
3675 * remote-sim.c (sim_command_completer): Adjust to work with a
3676 completion_tracker instead of a VEC.
3677
c45ec17c
PA
36782017-07-17 Pedro Alves <palves@redhat.com>
3679
3680 * completer.c (complete_source_filenames): New function.
3681 (complete_address_and_linespec_locations): New function.
3682 (location_completer): Use complete_address_and_linespec_locations.
3683 (completion_tracker::build_completion_result): Honor the tracker's
3684 request to suppress append.
3685 * completer.h (completion_tracker::suppress_append_ws)
3686 (completion_tracker::set_suppress_append_ws): New methods.
3687 (completion_tracker::m_suppress_append_ws): New field.
3688 (complete_source_filenames): New declaration.
3689 * linespec.c (linespec_complete_what): New.
3690 (struct ls_parser) <complete_what, completion_word,
3691 completion_quote_char, completion_quote_end, completion_tracker>:
3692 New fields.
3693 (string_find_incomplete_keyword_at_end): New.
3694 (linespec_lexer_lex_string): Record quote char. If in completion
3695 mode, don't throw.
3696 (linespec_lexer_consume_token): Advance the completion word point.
3697 (linespec_lexer_peek_token): Save/restore completion info.
3698 (save_stream_and_consume_token): New.
3699 (set_completion_after_number): New.
3700 (linespec_parse_basic): Set what to complete next depending on
3701 token. Handle function and label completions specially.
3702 (parse_linespec): Disable objc shortcut in completion mode. Set
3703 what to complete next depending on token type. Skip keyword if in
3704 completion mode.
3705 (complete_linespec_component, linespec_complete): New.
3706 * linespec.h (linespec_complete): Declare.
3707
be966d42
PA
37082017-07-17 Pedro Alves <palves@redhat.com>
3709
3710 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3711 Handle 'operator<' / 'operator<<'.
3712
a2459270
PA
37132017-07-17 Pedro Alves <palves@redhat.com>
3714
3715 * completer.c (collect_explicit_location_matches): Handle
3716 MATCH_LABEL.
3717 (convert_explicit_location_to_linespec): New, factored out from
3718 ...
3719 (convert_explicit_location_to_sals): ... this.
3720 (complete_label): New.
3721 (linespec_complete_label, find_label_symbols_in_block): New.
3722 (find_label_symbols): Add completion_mode parameter and adjust to
3723 call find_label_symbols_in_block.
3724 * linespec.h (linespec_complete_label): Declare.
3725
c6756f62
PA
37262017-07-17 Pedro Alves <palves@redhat.com>
3727
3728 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3729 complete_symbol_mode parameter.
3730 * cli/cli-cmds.c (complete_command): Get the completion result out
3731 of the handle_brkchars tracker if used a custom word point.
3732 * completer.c: Include "linespec.h".
3733 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3734 (advance_to_expression_complete_word_point): New.
3735 (completion_tracker::completes_to_completion_word): New.
3736 (complete_files_symbols): Pass down
3737 complete_symbol_mode::EXPRESSION.
3738 (explicit_options, probe_options): New.
3739 (collect_explicit_location_matches): Complete on the
3740 explictit_loc->foo instead of word. Use
3741 linespec_complete_function. Handle MATCH_LINE. Handle offering
3742 keyword and options completions.
3743 (backup_text_ptr): Delete.
3744 (skip_keyword): New.
3745 (complete_explicit_location): Remove 'word' parameter. Add
3746 language, quoted_arg_start and quoted_arg_end parameters.
3747 Rewrite, parsing left to right.
3748 (location_completer): Rewrite.
3749 (location_completer_handle_brkchars): New function.
3750 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3751 (enum complete_line_internal_reason): Adjust comments.
3752 (completion_tracker::discard_completions): New.
3753 (completer_handle_brkchars_func_for_completer): Handle
3754 location_completer.
3755 (gdb_custom_word_point_brkchars)
3756 (gdb_org_rl_basic_quote_characters): New.
3757 (gdb_completion_word_break_characters_throw)
3758 (completion_find_completion_word): Handle trackers that use a
3759 custom word point.
3760 (completion_tracker::advance_custom_word_point_by): New.
3761 (completion_tracker::build_completion_result): Don't rely on
3762 readline appending the quote char.
3763 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3764 use a custom word point.
3765 (gdb_rl_attempted_completion_function): Restore
3766 rl_basic_quote_characters.
3767 * completer.h (class completion_tracker): Extend intro comment.
3768 (completion_tracker::set_quote_char)
3769 (completion_tracker::quote_char)
3770 (completion_tracker::set_use_custom_word_point)
3771 (completion_tracker::use_custom_word_point)
3772 (completion_tracker::custom_word_point)
3773 (completion_tracker::set_custom_word_point)
3774 (completion_tracker::advance_custom_word_point_by)
3775 (completion_tracker::completes_to_completion_word)
3776 (completion_tracker::discard_completions): New methods.
3777 (completion_tracker::m_quote_char)
3778 (completion_tracker::m_use_custom_word_point)
3779 (completion_tracker::m_custom_word_point): New fields.
3780 (advance_to_expression_complete_word_point): Declare.
3781 * f-lang.c (f_collect_symbol_completion_matches): Add
3782 complete_symbol_mode parameter.
3783 * language.h (struct language_defn)
3784 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3785 parameter.
3786 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3787 (linespec_complete_function): New function.
3788 (linespec_lexer_lex_keyword): Adjust.
3789 * linespec.h (linespec_keywords, linespec_complete_function): New
3790 declarations.
3791 * location.c (find_end_quote): New function.
3792 (explicit_location_lex_one): Add explicit_completion_info
3793 parameter. Save quoting info. Don't throw if being called for
3794 completion. Don't handle Ada operators here.
3795 (is_cp_operator, skip_op_false_positives, first_of)
3796 (explicit_location_lex_one_function): New function.
3797 (string_to_explicit_location): Replace 'dont_throw' parameter with
3798 an explicit_completion_info pointer parameter. Handle it. Don't
3799 use explicit_location_lex_one to lex function names. Use
3800 explicit_location_lex_one_function instead.
3801 * location.h (struct explicit_completion_info): New.
3802 (string_to_explicit_location): Replace 'dont_throw' parameter with
3803 an explicit_completion_info pointer parameter.
3804 * symtab.c (default_collect_symbol_completion_matches_break_on):
3805 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3806 (default_collect_symbol_completion_matches)
3807 (collect_symbol_completion_matches): Add complete_symbol_mode
3808 parameter.
3809 (collect_symbol_completion_matches_type): Pass down
3810 complete_symbol_mode::EXPRESSION.
3811 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3812 parameter. Handle LINESPEC mode.
3813 * symtab.h (complete_symbol_mode): New.
3814 (default_collect_symbol_completion_matches_break_on)
3815 (default_collect_symbol_completion_matches)
3816 (collect_symbol_completion_matches)
3817 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3818 parameter.
3819
1d550c82
PA
38202017-07-17 Pedro Alves <palves@redhat.com>
3821
3822 * utils.c (enum class strncmp_iw_mode): New.
3823 (strcmp_iw): Rename to ...
3824 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3825 parameters. Handle them.
3826 (strncmp_iw): New.
3827 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3828 * utils.h (strncmp_iw): Declare.
3829 (strcmp_iw): Move describing comments here.
3830
8090b426
PA
38312017-07-17 Pedro Alves <palves@redhat.com>
3832
3833 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3834 CP_OPERATOR_STR.
3835 * c-typeprint.c (is_type_conversion_operator): Use
3836 CP_OPERATOR_STR.
3837 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3838 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3839 CP_OPERATOR_LEN.
3840 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3841 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3842 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3843 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3844 CP_OPERATOR_STR.
3845 * location.c: Include "cp-support.h".
3846 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3847 CP_OPERATOR_STR.
3848 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3849 CP_OPERATOR_LEN.
3850
6a2c1b87
PA
38512017-07-17 Pedro Alves <palves@redhat.com>
3852
3853 * cli/cli-cmds.c (complete_command): Use a completion tracker
3854 along with completion_find_completion_word for handle_brkchars
3855 phase.
3856 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3857 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3858 (struct gdb_rl_completion_word_info): New.
3859 (gdb_rl_find_completion_word): New.
3860 (completion_find_completion_word): New.
3861 * completer.h (completion_find_completion_word): Declare.
3862
eb3ff9a5
PA
38632017-07-17 Pedro Alves <palves@redhat.com>
3864
3865 * ada-lang.c (symbol_completion_match): Adjust comments.
3866 (symbol_completion_add): Replace vector parameter with
3867 completion_tracker parameter. Use it.
3868 (ada_make_symbol_completion_list): Rename to...
3869 (ada_collect_symbol_completion_matches): ... this. Add
3870 completion_tracker parameter and use it.
3871 (ada_language_defn): Adjust.
3872 * break-catch-syscall.c (catch_syscall_completer): Adjust
3873 prototype and work with completion_tracker instead of VEC.
3874 * breakpoint.c (condition_completer): Adjust prototype and work
3875 with completion_tracker instead of VEC.
3876 * c-lang.c (c_language_defn, cplus_language_defn)
3877 (asm_language_defn, minimal_language_defn): Adjust to renames.
3878 * cli/cli-cmds.c (complete_command): Rework using
3879 completion_tracker. Catch exceptions when completing.
3880 * cli/cli-decode.c (integer_unlimited_completer)
3881 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3882 with completion_tracker instead of VEC.
3883 * command.h (struct completion_tracker): Forward declare.
3884 (completer_ftype, completer_handle_brkchars_ftype): Change
3885 types.
3886 (complete_on_cmdlist, complete_on_enum): Adjust.
3887 * completer.c: Include <algorithm>.
3888 (struct gdb_completer_state): New.
3889 (current_completion): New global.
3890 (readline_line_completion_function): Delete.
3891 (noop_completer, filename_completer)
3892 (filename_completer_handle_brkchars, complete_files_symbols)
3893 (linespec_location_completer): Adjust to work with a
3894 completion_tracker instead of a VEC.
3895 (string_or_empty): New.
3896 (collect_explicit_location_matches): Adjust to work with a
3897 completion_tracker instead of a VEC.
3898 (explicit_location_completer): Rename to ...
3899 (complete_explicit_location): ... this and adjust to work with a
3900 completion_tracker instead of a VEC.
3901 (location_completer): Adjust to work with a completion_tracker
3902 instead of a VEC.
3903 (add_struct_fields): Adjust to work with a completion_list instead
3904 of VEC.
3905 (expression_completer): Rename to ...
3906 (complete_expression): ... this and adjust to work with a
3907 completion_tracker instead of a VEC. Use complete_files_symbols.
3908 (expression_completer): Reimplement on top of complete_expression.
3909 (symbol_completer): Adjust to work with a completion_tracker
3910 instead of a VEC.
3911 (enum complete_line_internal_reason): Add describing comments.
3912 (complete_line_internal_normal_command): Adjust to work with a
3913 completion_tracker instead of a VEC.
3914 (complete_line_internal): Rename to ...
3915 (complete_line_internal_1): ... this and adjust to work with a
3916 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3917 handle_brkchars phase.
3918 (new_completion_tracker): Delete.
3919 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3920 complete_line_internal_1.
3921 (free_completion_tracker): Delete.
3922 (INITIAL_COMPLETION_HTAB_SIZE): New.
3923 (completion_tracker::completion_tracker)
3924 (completion_tracker::~completion_tracker): New.
3925 (maybe_add_completion): Delete.
3926 (completion_tracker::maybe_add_completion)
3927 (completion_tracker::add_completion)
3928 (completion_tracker::add_completions): New.
3929 (throw_max_completions_reached_error): Delete.
3930 (complete_line): Adjust to work with a completion_tracker instead
3931 of a VEC. Don't create a completion_tracker_t or check for max
3932 completions here.
3933 (command_completer, command_completer_handle_brkchars)
3934 (signal_completer, reg_or_group_completer_1)
3935 (reg_or_group_completer, default_completer_handle_brkchars):
3936 Adjust to work with a completion_tracker.
3937 (gdb_completion_word_break_characters_throw): New.
3938 (gdb_completion_word_break_characters): Reimplement.
3939 (line_completion_function): Delete.
3940 (completion_tracker::recompute_lowest_common_denominator)
3941 (expand_preserving_ws)
3942 (completion_tracker::build_completion_result)
3943 (completion_result::completion_result)
3944 (completion_result::completion_result)
3945 (completion_result::~completion_result)
3946 (completion_result::completion_result)
3947 (completion_result::release_match_list, compare_cstrings)
3948 (completion_result::sort_match_list)
3949 (completion_result::reset_match_list)
3950 (gdb_rl_attempted_completion_function_throw)
3951 (gdb_rl_attempted_completion_function): New.
3952 * completer.h (completion_list, struct completion_result)
3953 (class completion_tracker): New.
3954 (complete_line): Add completion_tracker parameter.
3955 (readline_line_completion_function): Delete.
3956 (gdb_rl_attempted_completion_function): New.
3957 (noop_completer, filename_completer, expression_completer)
3958 (location_completer, symbol_completer, command_completer)
3959 (signal_completer, reg_or_group_completer): Update prototypes.
3960 (completion_tracker_t, new_completion_tracker)
3961 (make_cleanup_free_completion_tracker): Delete.
3962 (enum maybe_add_completion_enum): Delete.
3963 (maybe_add_completion): Delete.
3964 (throw_max_completions_reached_error): Delete.
3965 * corefile.c (complete_set_gnutarget): Adjust to work with a
3966 completion_tracker instead of a VEC.
3967 * cp-abi.c (cp_abi_completer): Adjust to work with a
3968 completion_tracker instead of a VEC.
3969 * d-lang.c (d_language_defn): Adjust.
3970 * disasm.c (disassembler_options_completer): Adjust to work with a
3971 completion_tracker instead of a VEC.
3972 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3973 (f_collect_symbol_completion_matches): ... this. Adjust to work
3974 with a completion_tracker instead of a VEC.
3975 (f_language_defn): Adjust.
3976 * go-lang.c (go_language_defn): Adjust.
3977 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3978 Adjust to work with a completion_tracker instead of a VEC.
3979 * infrun.c (handle_completer): Likewise.
3980 * interps.c (interpreter_completer): Likewise.
3981 * interps.h (interpreter_completer): Likewise.
3982 * language.c (unknown_language_defn, auto_language_defn)
3983 (local_language_defn): Adjust.
3984 * language.h (language_defn::la_make_symbol_completion_list):
3985 Rename to ...
3986 (language_defn::la_collect_symbol_completion_matches): ... this
3987 and adjust to work with a completion_tracker instead of a VEC.
3988 * m2-lang.c (m2_language_defn): Adjust.
3989 * objc-lang.c (objc_language_defn): Adjust.
3990 * opencl-lang.c (opencl_language_defn): Adjust.
3991 * p-lang.c (pascal_language_defn): Adjust.
3992 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3993 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3994 with a completion_tracker.
3995 * rust-lang.c (rust_language_defn): Adjust.
3996 * symtab.c (free_completion_list, do_free_completion_list)
3997 (return_val, completion_tracker): Delete.
3998 (completion_list_add_name, completion_list_add_symbol)
3999 (completion_list_add_msymbol, completion_list_objc_symbol)
4000 (completion_list_add_fields, add_symtab_completions): Add
4001 completion_tracker parameter and use it.
4002 (default_make_symbol_completion_list_break_on_1): Rename to...
4003 (default_collect_symbol_completion_matches_break_on): ... this.
4004 Add completion_tracker parameter and use it instead of allocating
4005 a completion tracker here.
4006 (default_make_symbol_completion_list_break_on): Delete old
4007 implementation.
4008 (default_make_symbol_completion_list): Delete.
4009 (default_collect_symbol_completion_matches): New.
4010 (make_symbol_completion_list): Delete.
4011 (collect_symbol_completion_matches): New.
4012 (make_symbol_completion_type): Rename to ...
4013 (collect_symbol_completion_matches_type): ... this. Add
4014 completion_tracker parameter and use it instead of VEC.
4015 (make_file_symbol_completion_list_1): Rename to...
4016 (collect_file_symbol_completion_matches): ... this. Add
4017 completion_tracker parameter and use it instead of VEC.
4018 (make_file_symbol_completion_list): Delete.
4019 (add_filename_to_list): Use completion_list instead of a VEC.
4020 (add_partial_filename_data::list): Now a completion_list.
4021 (make_source_files_completion_list): Work with a completion_list
4022 instead of a VEC.
4023 * symtab.h: Include "completer.h".
4024 (default_make_symbol_completion_list_break_on)
4025 (default_make_symbol_completion_list, make_symbol_completion_list)
4026 (make_symbol_completion_type, make_file_symbol_completion_list)
4027 (make_source_files_completion_list): Delete.
4028 (default_collect_symbol_completion_matches_break_on)
4029 (default_collect_symbol_completion_matches)
4030 (collect_symbol_completion_matches)
4031 (collect_symbol_completion_matches_type)
4032 (collect_file_symbol_completion_matches)
4033 (make_source_files_completion_list): New.
4034 * top.c (init_main): Don't install a rl_completion_entry_function
4035 hook. Install a rl_attempted_completion_function hook instead.
4036 * tui/tui-layout.c (layout_completer): Adjust to work with a
4037 completion_tracker.
4038 * tui/tui-regs.c (tui_reggroup_completer):
4039 * tui/tui-win.c (window_name_completer, focus_completer)
4040 (winheight_completer): Adjust to work with a completion_tracker.
4041 * value.c: Include "completer.h".
4042 (complete_internalvar): Adjust to work with a completion_tracker.
4043 * value.h (complete_internalvar): Likewise.
4044
6e1dbf8c
PA
40452017-07-17 Pedro Alves <palves@redhat.com>
4046
4047 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4048 renames.
4049 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4050 comments to completer_ftype's declaration.
4051 <completer_handle_brkchars>: Change type to
4052 completer_handle_brkchars_ftype.
4053 * command.h (completer_ftype): Add describing comment and give
4054 names to parameters.
4055 (completer_ftype_void): Rename to ...
4056 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4057 (set_cmd_completer_handle_brkchars): Adjust.
4058 * completer.c (filename_completer_handle_brkchars): New function.
4059 (complete_line_internal_normal_command): New function, factored
4060 out from ...
4061 (complete_line_internal): ... here.
4062 (command_completer_handle_brkchars)
4063 (default_completer_handle_brkchars)
4064 (completer_handle_brkchars_func_for_completer): New functions.
4065 * completer.h (set_gdb_completion_word_break_characters): Delete
4066 declaration.
4067 (completer_handle_brkchars_func_for_completer): New declaration.
4068 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4069 completer_handle_brkchars_func_for_completer.
4070
78b13106
PA
40712017-07-17 Pedro Alves <palves@redhat.com>
4072
4073 * completer.c (symbol_completer): New function, based on
4074 make_symbol_completion_list_fn.
4075 * completer.h (symbol_completer): New declaration.
4076 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4077 * python/py-cmd.c (completers): Adjust.
4078 * symtab.c (make_symbol_completion_list_fn): Delete.
4079 * symtab.h (make_symbol_completion_list_fn): Delete.
4080 * cli/cli-decode.c (add_cmd): Adjust.
4081
bbf2f4df
PA
40822017-07-17 Pedro Alves <palves@redhat.com>
4083
4084 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4085 * dwarf2read.c: Include "filename-seen-cache.h".
4086 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4087 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4088 * filename-seen-cache.c: New file.
4089 * filename-seen-cache.h: New file.
4090 * symtab.c: Include "filename-seen-cache.h".
4091 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4092 (create_filename_seen_cache, clear_filename_seen_cache)
4093 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4094 to filename-seen-cache.h/filename-seen-cache.c.
4095 (output_source_filename, sources_info)
4096 (maybe_add_partial_symtab_filename)
4097 (make_source_files_completion_list): Adjust to use
4098 filename_seen_cache.
4099
330cdd98
PA
41002017-07-17 Pedro Alves <palves@redhat.com>
4101
4102 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4103 fields.
4104 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4105 dwarf2_debug_sections*)): New.
4106 (dwarf2_per_objfile::dwarf2_per_objfile(const
4107 dwarf2_per_objfile&)): Declare as deleted.
4108 (dwarf2_per_objfile::operator=): Declare as deleted.
4109 (dwarf2_per_objfile::dwarf2_per_objfile)
4110 (dwarf2_per_objfile::~dwarf2_per_objfile)
4111 (dwarf2_per_objfile::free_cached_comp_units): New.
4112 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4113 ctor. Call dwarf2_per_objfile's ctor manually.
4114 (dwarf2_locate_sections): Deleted/refactored as ...
4115 (dwarf2_per_objfile::locate_sections): ... this new method.
4116 (free_cached_comp_units): Defer to
4117 dwarf2_per_objfile::free_cached_comp_units.
4118 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4119
8880f2a9
TT
41202017-07-14 Tom Tromey <tom@tromey.com>
4121
4122 PR rust/21764:
4123 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4124 parameter.
4125 <UNOP_SIZEOF>: Split into separate case.
4126 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4127
65547233
TT
41282017-07-14 Tom Tromey <tom@tromey.com>
4129
4130 PR rust/21763:
4131 * symtab.c (symbol_matches_domain): Add language_rust to special
4132 case.
4133 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4134 treat LOC_TYPEDEF symbols as variables.
4135
8f14146e
PA
41362017-07-14 Pedro Alves <palves@redhat.com>
4137
4138 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4139 symtabs matching all symtabs with SRCFILE as file name instead of
4140 only considering the first hit, with lookup_symtab.
4141
2347965c
SM
41422017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4143
4144 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4145 operator_name parameters.
4146 (gen_expr): Update function call.
4147
40f4af28
SM
41482017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4149
4150 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4151 parameter.
4152 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4153 Likewise.
4154 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4155 parameter, use agent_expr::gdbarch instead, update function
4156 calls.
4157 (locexpr_tracepoint_var_ref): Likewise.
4158 (loclist_tracepoint_var_ref): Likewise.
4159 * ax-gdb.c (gen_trace_static_fields): Likewise.
4160 (gen_traced_pop): Likewise.
4161 (gen_frame_args_address): Likewise.
4162 (gen_frame_locals_address): Likewise.
4163 (gen_var_ref): Likewise.
4164 (gen_struct_ref_recursive): Likewise.
4165 (gen_static_field): Likewise.
4166 (gen_maybe_namespace_elt): Likewise.
4167 (gen_expr): Likewise.
4168 (gen_trace_for_var): Likewise.
4169 (gen_trace_for_expr): Likewise.
4170 (gen_trace_for_return_address): Likewise.
4171
053f8057
SM
41722017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4173
4174 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4175 parameter.
4176 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4177
6661ad48
SM
41782017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4179
4180 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4181 from ax, update calls.
4182 (gen_usual_arithmetic): Likewise.
4183 (gen_integral_promotions): Likewise.
4184 (gen_bitfield_ref): Likewise.
4185 (gen_primitive_field): Likewise.
4186 (gen_struct_ref_recursive): Likewise.
4187 (gen_struct_ref): Likewise.
4188 (gen_maybe_namespace_elt): Likewise.
4189 (gen_struct_elt_for_reference): Likewise.
4190 (gen_namespace_elt): Likewise.
4191 (gen_aggregate_elt_ref): Likewise.
4192 (gen_expr): Get gdbarch from ax, update calls.
4193 (gen_expr_binop_rest): Likewise.
4194
c55a47e7
PA
41952017-07-13 Pedro Alves <palves@redhat.com>
4196
4197 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4198 as default tdesc.
4199 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4200 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4201 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4202 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4203 tdep.
4204 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4205 Get final tdesc from the tdep.
4206 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4207 default tdesc.
4208 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4209 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4210 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4211 Use it as default tdesc.
4212 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4213 down to amd_init_abi. No longer handle fallback tdesc here.
4214 * amd64-tdep.h (tdesc_x32): Declare.
4215 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4216 parameter.
4217 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4218 as default tdesc.
4219
55efceab
AA
42202017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4221
4222 * s390-linux-tdep.c (s390_process_record): Add support for
4223 instructions new in arch12.
4224
0aa37b65
JB
42252017-07-11 John Baldwin <jhb@FreeBSD.org>
4226
4227 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4228 PT_GETFSBASE and PT_GETGSBASE.
4229 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4230 PT_SETGSBASE.
4231
48aeef91
JB
42322017-07-11 John Baldwin <jhb@FreeBSD.org>
4233
4234 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4235 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4236 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4237 those rules.
4238 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4239 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4240 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4241 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4242 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4243 * features/i386/amd64.xml: Add 64bit-segments.xml.
4244 * features/i386/amd64-avx-avx512.c: Regenerated.
4245 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4246 * features/i386/amd64-avx-mpx.c: Regenerated.
4247 * features/i386/amd64-avx.c: Regenerated.
4248 * features/i386/amd64-mpx.c: Regenerated.
4249 * features/i386/amd64.c: Regenerated.
4250 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4251 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4252 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4253 * regformats/i386/amd64-avx.dat: Regenerated.
4254 * regformats/i386/amd64-mpx.dat: Regenerated.
4255 * regformats/i386/amd64.dat: Regenerated.
4256
77c501bc
YQ
42572017-07-10 Yao Qi <yao.qi@linaro.org>
4258
4259 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4260 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4261
6dc8d757
AK
42622017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4263
4264 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4265 unsetenv.
4266 * gnulib/aclocal.m4: Regenerate.
4267 * gnulib/config.in: Regenerate.
4268 * gnulib/configure: Regenerate.
4269 * gnulib/import/Makefile.am: Regenerate.
4270 * gnulib/import/Makefile.in: Regenerate.
4271 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4272 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4273 * gnulib/import/m4/environ.m4: New file.
4274 * gnulib/import/m4/setenv.m4: New file.
4275 * gnulib/import/setenv.c: New file.
4276 * gnulib/import/unsetenv.c: New file.
4277
266934d1
SM
42782017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4279
4280 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4281 address when op is DW_OP_addr.
4282
03278692
TT
42832017-07-09 Tom Tromey <tom@tromey.com>
4284
4285 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4286 check and apply to outer type.
4287
4b654465
JB
42882017-07-07 John Baldwin <jhb@FreeBSD.org>
4289
4290 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4291 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4292 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4293 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4294
2af9fc44
JB
42952017-07-07 John Baldwin <jhb@FreeBSD.org>
4296
4297 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4298
382b69bb
JB
42992017-07-07 John Baldwin <jhb@FreeBSD.org>
4300
4301 * corelow.c (get_core_siginfo): Remove.
4302 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4303 instead of get_core_siginfo.
4304 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4305 * gdbarch.h: Re-generate.
4306 * gdbarch.c: Re-generate.
4307 * linux-tdep.c (linux_core_xfer_siginfo): New.
4308 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4309
6e5eab33
JB
43102017-07-07 John Baldwin <jhb@FreeBSD.org>
4311
4312 * corelow.c (thread_section_name): Move to ...
4313 * gdbcore.h (thread_section_name): ... here.
4314
929edea9
JB
43152017-07-07 John Baldwin <jhb@FreeBSD.org>
4316
4317 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4318 (struct siginfo32): New.
4319 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4320 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4321 via ptrace(PT_LWPINFO).
4322
762c974a
JB
43232017-07-07 John Baldwin <jhb@FreeBSD.org>
4324
4325 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4326 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4327 (fbsd_get_siginfo_type): New.
4328 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4329 (_initialize_fbsd_tdep): New.
4330
33c5cd75
DB
43312017-07-06 David Blaikie <dblaikie@gmail.com>
4332
4333 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4334 a singular dwo_unit*) to support multiple CUs in the same way that
4335 multiple TUs are supported.
4336 (create_cus_hash_table): Replace create_dwo_cu with a function for
4337 parsing multiple CUs from a DWO file.
4338 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4339 create_dwo_cu.
4340 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4341 htab_find, rather than comparing the signature to a singleton CU in
4342 the dwo_file.
4343
8455d262
PA
43442017-07-06 Pedro Alves <palves@redhat.com>
4345
4346 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4347
4da3eb35
PA
43482017-07-04 Pedro Alves <palves@redhat.com>
4349
4350 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4351 * gdbtypes.h (TYPE_STATIC): Delete.
4352 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4353 is_synchronized, is_native>: Delete.
4354 <dummy>: Bump.
4355 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4356 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4357 (TYPE_FN_FIELD_ABSTRACT): Delete.
4358
5bfd255c
SM
43592017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4360
4361 * buffer.h (buffer_finish): Fix spelling mistakes.
4362
25c54127
EZ
43632017-07-01 Eli Zaretskii <eliz@gnu.org>
4364
4365 * .dir-locals.el: Automatically switch to C-style comments in
4366 versions of Emacs that support the feature.
4367
dc4bde35
SDJ
43682017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4369 Pedro Alves <palves@redhat.com>
4370
4371 PR cli/21688
4372 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4373 (process_next_line): New variable 'inline_cmd'.
4374 Adjust 'if' clauses for "python", "compile" and "guile" to use
4375 'command_name_equals' and check for '!inline_cmd'.
4376
51ed89aa
SDJ
43772017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4378
4379 PR cli/21688
4380 * cli/cli-script.c (command_name_equals_not_inline): New function.
4381 (process_next_line): Adjust 'if' clauses for "python", "compile"
4382 and "guile" to use command_name_equals_not_inline.
4383
eb17d413
PA
43842017-06-29 Pedro Alves <palves@redhat.com>
4385
4386 * completer.c (expression_completer): Call
4387 linespec_location_completer instead of location_completer.
4388
195bcdd5
PA
43892017-06-29 Pedro Alves <palves@redhat.com>
4390
4391 * completer.c (expression_completer): Remove code that recomputes
4392 'text' from 'word'.
4393
adc764e7
YQ
43942017-06-29 Yao Qi <yao.qi@linaro.org>
4395
4396 * regformats/regdat.sh: Generate code with
4397 "ifndef IN_PROCESS_AGENT".
4398
6e75794e
PA
43992017-06-28 Pedro Alves <palves@redhat.com>
4400
4401 * command.h: Include "common/scoped_restore.h".
4402
bc491f2e
YQ
44032017-06-28 Yao Qi <yao.qi@linaro.org>
4404
4405 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4406 instead of obstack_grow.
4407
41664b45
DG
44082017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4409
4410 PR gdb/21337
4411 * symfile.c (reread_symbols): Call objfiles_changed just before
4412 read_symbols.
4413
6da67eb1
PA
44142017-06-27 Pedro Alves <palves@redhat.com>
4415
4416 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4417 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4418 (completion_list_add_symbol, completion_list_add_msymbol):
4419 ... these new functions.
4420 (add_symtab_completions)
4421 (default_make_symbol_completion_list_break_on_1): Adjust.
4422
23732b1e
PA
44232017-06-27 Pedro Alves <palves@redhat.com>
4424
4425 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4426 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4427 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4428 dtor.
4429 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4430 'storage_obstack' field an auto_obstack. In-class initialize all
4431 non-bitfield fields. Make minsyms_read bool.
4432 * symfile.c (read_symbols): Adjust.
4433
a4d1e79a
AH
44342017-06-27 Alan Hayward <alan.hayward@arm.com>
4435
4436 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4437 (gdbsim_store_register): Likewise.
4438
8268c778
PA
44392017-06-27 Pedro Alves <palves@redhat.com>
4440
4441 * c-exp.y (name_obstack): Now an auto_obstack.
4442 (yylex): Use auto_obstack::clear.
4443 (c_parse): Use auto_obstack::clear instead of reinitializing and
4444 freeing the obstack.
4445 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4446 * d-exp.y (name_obstack): Now an auto_obstack.
4447 (yylex): Use auto_obstack::clear.
4448 (d_parse): Use auto_obstack::clear instead of reinitializing and
4449 freeing the obstack.
4450 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4451 auto_obstack.
4452 * dwarf2read.c (create_addrmap_from_index)
4453 (dwarf2_build_psymtabs_hard)
4454 (update_enumeration_type_from_children): Likewise.
4455 * gdb_obstack.h (auto_obstack): New type.
4456 * go-exp.y (name_obstack): Now an auto_obstack.
4457 (build_packaged_name): Use auto_obstack::clear.
4458 (go_parse): Use auto_obstack::clear instead of reinitializing and
4459 freeing the obstack.
4460 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4461 auto_obstack.
4462 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4463 * rust-exp.y (work_obstack): Now an auto_obstack.
4464 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4465 reinitializing and freeing the obstack.
4466 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4467 (host_char_to_target): Use auto_obstack.
4468 * utils.h (make_cleanup_obstack_free): Delete declaration.
4469 * valprint.c (generic_emit_char, generic_printstr): Use
4470 auto_obstack.
4471
db665f42
SM
44722017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4473
4474 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4475 thread.
4476 (darwin_init_thread_list): Don't update dummy thread.
4477 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4478
873c0814
SM
44792017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4480
4481 * record-full.c (netorder16): Remove.
4482
8b5a7a6e
SM
44832017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4484
4485 * common/diagnostics.h: Define macros for GCC.
4486 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4487 * common/vec.h: Include diagnostics.h.
4488 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4489 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4490 warning.
4491
d1435379
SM
44922017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4493
4494 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4495 New macro.
4496 * ada-lex.l: Ignore deprecated register warnings.
4497
cc75e0fd
SM
44982017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4499
4500 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4501 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4502
07809eaf
SM
45032017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4504
4505 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4506 its own line.
4507
f076f034
SM
45082017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4509
4510 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4511
0dd5cbc5
AH
45122017-06-23 Alan Hayward <alan.hayward@arm.com>
4513
4514 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4515 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4516 (xtensa_register_read_masked): Likewise.
4517
d4c6ce5b
SDJ
45182017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4519
4520 * common/environ.c (gdb_environ::unset): Update comment.
4521
16892a03
AH
45222017-06-22 Alan Hayward <alan.hayward@arm.com>
4523
4524 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4525 registers.
4526
d7dcbefc
AH
45272017-06-22 Alan Hayward <alan.hayward@arm.com>
4528
4529 * record-full.c (record_full_exec_insn): Use byte_vector.
4530
b30ff123
YQ
45312017-06-22 Yao Qi <yao.qi@linaro.org>
4532
4533 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4534 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4535
4fa847d7
AH
45362017-06-22 Alan Hayward <alan.hayward@arm.com>
4537
4538 * remote.c (cached_reg): Move from here...
4539 * regcache.h (cached_reg): ...to here.
4540 * python/py-unwind.c (struct reg_info): Remove.
4541 (cached_frame_info): Use cached_reg_t.
4542 (pyuw_prev_register): Likewise.
4543 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4544 (pyuw_dealloc_cache): Free all registers.
4545
f4906a9a
PA
45462017-06-22 Pedro Alves <palves@redhat.com>
4547 Simon Marchi <simon.marchi@ericsson.com>
4548
4549 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4550 warning.
4551 * common/diagnostics.h: New file.
4552
b45a1208
PA
45532017-06-22 Pedro Alves <palves@redhat.com>
4554
4555 * common/agent.h: Add include guards.
4556
e4da2c61
SM
45572017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4558
4559 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4560 talk about addressable units instead of bytes.
4561
96160d60
SDJ
45622017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4563
4564 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4565 of '::const_iterator'.
4566
9a6c7d9c
SDJ
45672017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4568
4569 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4570 'unittests/environ-selftests.c'.
4571 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4572 * charset.c (find_charset_names): Declare object 'iconv_env'.
4573 Update code to use 'iconv_env' object. Remove call to
4574 'free_environ'.
4575 * common/environ.c: Include <utility>.
4576 (make_environ): Delete function.
4577 (free_environ): Delete function.
4578 (gdb_environ::clear): New function.
4579 (gdb_environ::operator=): New function.
4580 (gdb_environ::get): Likewise.
4581 (environ_vector): Delete function.
4582 (set_in_environ): Delete function.
4583 (gdb_environ::set): New function.
4584 (unset_in_environ): Delete function.
4585 (gdb_environ::unset): New function.
4586 (gdb_environ::envp): Likewise.
4587 * common/environ.h: Include <vector>.
4588 (struct gdb_environ): Delete; transform into...
4589 (class gdb_environ): ... this class.
4590 (free_environ): Delete prototype.
4591 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4592 environ_vector): Likewise.
4593 * infcmd.c (run_command_1): Update code to call
4594 'envp' from 'gdb_environ' class.
4595 (environment_info): Update code to call methods from 'gdb_environ'
4596 class.
4597 (unset_environment_command): Likewise.
4598 (path_info): Likewise.
4599 (path_command): Likewise.
4600 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4601 (inferior::inferior): Initialize 'environment' using the host's
4602 information.
4603 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4604 Include "environ.h".
4605 (class inferior) <environment>: Change type from 'struct
4606 gdb_environ' to 'gdb_environ'.
4607 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4608 methods from 'gdb_environ' class.
4609 * solib.c (solib_find_1): Likewise
4610 * unittests/environ-selftests.c: New file.
4611
75c554cf
YQ
46122017-06-20 Yao Qi <yao.qi@linaro.org>
4613
4614 * features/i386/i386-linux.xml: Exchange the order of including
4615 32bit-linux.xml and 32bit-sse.xml.
4616 * features/i386/i386-linux.c: Regenerated.
4617
72ddacb7
YQ
46182017-06-20 Yao Qi <yao.qi@linaro.org>
4619
4620 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4621 Delete copy ctor and assignment operator.
4622 (tdesc_type): Likewise.
4623 (tdesc_feature): Likewise.
4624 (tdesc_free_reg): Remove.
4625 (tdesc_create_reg): Use new.
4626 (tdesc_free_type): Remove.
4627 (tdesc_create_vector): Use new.
4628 (tdesc_create_union): Likewise.
4629 (tdesc_create_flags): Likewise.
4630 (tdesc_create_enum): Likewise.
4631 (tdesc_free_feature): Delete.
4632 (free_target_description): Use delete.
4633
325c9fd4
JB
46342017-06-19 John Baldwin <jhb@FreeBSD.org>
4635
4636 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4637 registers.
4638
16b7a719
PA
46392017-06-19 Pedro Alves <palves@redhat.com>
4640
4641 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4642 after gdb::unlinker.
4643
1c8e01c9
SDJ
46442017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4645
4646 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4647 gdb_environ to access an environment variable.
4648
ffce45d2
TP
46492017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4650
4651 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4652 gdb_byte*.
4653
1d4fbac9
SM
46542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4655
4656 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4657
8465943a
SM
46582017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4659
4660 * configure: Re-generate.
4661 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4662
3e019bdc
SM
46632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4664
4665 * configure: Re-generate.
4666 * warning.m4: Pass -Werror to compiler when checking for
4667 supported warning flags.
4668
cf0dd6f0
SM
46692017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4670
4671 * Makefile.in (COMPILE.pre): Add "-x c++".
4672
6f98355c
YQ
46732017-06-16 Alan Hayward <alan.hayward@arm.com>
4674 Pedro Alves <palves@redhat.com>
4675 Yao Qi <yao.qi@linaro.org>
4676
4677 * defs.h (RequireLongest): New.
4678 (extract_integer): Declare function template.
4679 (extract_signed_integer): Remove the declaration, but define it
4680 static inline.
4681 (extract_unsigned_integer): Likewise.
4682 (store_integer): Declare function template.
4683 (store_signed_integer): Remove the declaration, but define it
4684 static inline.
4685 (store_unsigned_integer): Likewise.
4686 * findvar.c (extract_integer): New function template.
4687 (extract_signed_integer): Remove.
4688 (extract_unsigned_integer): Remove.
4689 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4690 instantiations.
4691 (store_integer): New function template.
4692 (store_signed_integer): Remove.
4693 (store_unsigned_integer): Remove.
4694 (store_integer): Explicit instantiations.
4695 * regcache.c (regcache_raw_read_signed): Update.
4696 (regcache::raw_read): New function.
4697 (regcache::raw_read_signed): Remove.
4698 (regcache::raw_read_unsigned): Remove.
4699 (regcache_raw_read_unsigned): Update.
4700 (regcache_raw_write_unsigned): Update.
4701 (regcache::raw_write_signed): Remove.
4702 (regcache::raw_write): New function.
4703 (regcache_cooked_read_signed): Update.
4704 (regcache::raw_write_unsigned): Remove.
4705 (regcache::cooked_read_signed): Remove.
4706 (regcache_cooked_read_unsigned): Update.
4707 (regcache::cooked_read_unsigned): Remove.
4708 (regcache_cooked_write_signed): Update.
4709 (regcache_cooked_write_unsigned): Update.
4710 * regcache.h (regcache) <raw_read_signed>: Remove.
4711 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4712 <raw_read, raw_write>: New.
4713 <cooked_read_signed, cooked_write_signed>: Remove.
4714 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4715 <cooked_read, cooked_write>: New.
4716 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4717 (sh64_pseudo_register_write): Update.
4718
a87dc45a
AK
47192017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4720
4721 * arc-tdep.c (arc_disassembler_options): New variable.
4722 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4723 of default_print_insn.
4724 (arc_delayed_print_insn): Set info->section when needed,
4725 use default_print_insn to retrieve a disassembler.
4726
45159d6a
SDJ
47272017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4728
4729 PR gdb/21574
4730 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4731 to mention $SHELL and startup-with-shell.
4732
b46c4cf0
MF
47332017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4734
4735 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4736
6394c606
YQ
47372017-06-14 Yao Qi <yao.qi@linaro.org>
4738
4739 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4740 default_print_insn instead of print_insn_aarch64.
4741 * arm-tdep.c (gdb_print_insn_arm): Call
4742 default_print_insn instead of print_insn_big_arm
4743 and print_insn_little_arm.
4744 * i386-tdep.c (i386_print_insn): Call default_print_insn
4745 instead of print_insn_i386.
4746 * ia64-tdep.c (ia64_print_insn): Call
4747 default_print_insn instead of print_insn_ia64.
4748 * mips-tdep.c (gdb_print_insn_mips): Call
4749 default_print_insn instead of print_insn_big_mips
4750 and print_insn_little_mips.
4751 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4752 instead of print_insn_spu.
4753
d5722aa2
PA
47542017-06-14 Pedro Alves <palves@redhat.com>
4755
4756 * ada-lang.c: Include "common/byte-vector.h".
4757 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4758 * charset.c (wchar_iterator::iterate): Resize the vector instead
4759 of reserving it.
4760 * common/byte-vector.h: Include "common/def-vector.h".
4761 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4762 * cli/cli-dump.c: Include "common/byte-vector.h".
4763 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4764 * common/byte-vector.h: New file.
4765 * common/def-vector.h: New file.
4766 * common/default-init-alloc.h: New file.
4767 * dwarf2loc.c: Include "common/byte-vector.h".
4768 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4769 instead of reserving it.
4770 * dwarf2read.c: Include "common/byte-vector.h".
4771 (data_buf::m_vec): Now a gdb::byte_vector.
4772 * gdb_regex.c: Include "common/def-vector.h".
4773 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4774 * mi/mi-main.c: Include "common/byte-vector.h".
4775 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4776 * printcmd.c: Include "common/byte-vector.h".
4777 (print_scalar_formatted): Use gdb::byte_vector.
4778 * valprint.c: Include "common/byte-vector.h".
4779 (maybe_negate_by_bytes, print_decimal_chars): Use
4780 gdb::byte_vector.
4781
01ec7a27
SM
47822017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4783
4784 * darwin-nat.c: Include "nat/fork-inferior.h".
4785
848d9074
SM
47862017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4787
4788 * configure.nat: Factor out Darwin bits that are not
4789 architecture-specific. Add fork-inferior.o.
4790
3b912944
SM
47912017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4792
4793 * configure.nat: Factor out AIX bits that are not
4794 architecture-specific. Add fork-inferior.o.
4795
55acdf22
AA
47962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4797
4798 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4799 (read_pieced_value, write_pieced_value): ...here. Reduce to
4800 wrappers that just call rw_pieced_value.
4801
f65e2044
AA
48022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4803
4804 * dwarf2loc.c (write_pieced_value): When writing the data for a
4805 memory piece, use write_memory_with_notification instead of
4806 write_memory.
4807
23f945bf
AA
48082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4809
4810 * valops.c (read_value_memory): Change embedded_offset to
4811 represent a bit offset instead of a byte offset.
4812 * value.h (read_value_memory): Adjust comment.
4813
f236533e
AA
48142017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4815
4816 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4817 dest_offset_bits and source_offset_bits.
4818 (write_pieced_value): Likewise.
4819
65d84b76
AA
48202017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4821
4822 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4823 given by DW_OP_bit_piece.
4824 (write_pieced_value): Likewise.
4825
242d31ab
AA
48262017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4827
4828 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4829 some other preparations to the places where sufficient information
4830 is available.
4831 (write_pieced_value): Likewise.
4832
03c8af18
AA
48332017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4834
4835 * dwarf2loc.c (bits_to_bytes): New function.
4836 (read_pieced_value): Fix offset calculations for register pieces
4837 on big-endian targets.
4838 (write_pieced_value): Likewise.
4839
840989c1
AA
48402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4841
4842 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4843 (write_pieced_value): Likewise.
4844
359b19bb
AA
48452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4846
4847 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4848 transfer the source value's least significant bits, instead of its
4849 lowest-addressed ones. Rename type_len to max_offset.
4850 (read_pieced_value): Mirror above changes to write_pieced_value as
4851 applicable.
4852
07c9ca3b
AA
48532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4854
4855 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4856 truncate full bytes from dest_offset_bits before using it as an
4857 offset into the buffer.
4858
f1cc9874
AA
48592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4860
4861 * dwarf2loc.c (write_pieced_value): Include transfer size in
4862 byte-wise check.
4863
cdaac320
AA
48642017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4865
4866 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4867 calculation of this_size.
4868
af547a96
AA
48692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4870
4871 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4872 when targeting a bit-field.
4873 (write_pieced_value): Likewise.
4874
ddd7882a
AA
48752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4876
4877 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4878 (allocate_piece_closure): Drop addr_size parameter.
4879 (dwarf2_evaluate_loc_desc_full): Adjust call to
4880 allocate_piece_closure.
4881
e9352324
AA
48822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4883
4884 PR gdb/21226
4885 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4886 the LSB end, independent of endianness.
4887
d5d1163e
AA
48882017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4889
4890 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4891 size capping.
4892
032bb6ea
YQ
48932017-06-13 Yao Qi <yao.qi@linaro.org>
4894
4895 * mips-linux-nat.c: Move include features/mips*-linux.c to
4896 mips-linux-tdep.c.
4897 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4898 to mips-linux-tdep.c.
4899 * mips-linux-tdep.c: Include features/mips*-linux.c
4900 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4901 functions.
4902 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4903 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4904 (tdesc_mips64_dsp_linux): Declare.
4905
f12f6bad
TT
49062017-06-12 Tom Tromey <tom@tromey.com>
4907
4908 * valprint.h (val_print_type_code_int): Remove.
4909 * valprint.c (generic_val_print_int): Always call
4910 val_print_scalar_formatted.
4911 (val_print_type_code_int): Remove.
4912 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4913 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4914 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4915 * ada-valprint.c (ada_val_print_num): Use
4916 val_print_scalar_formatted.
4917
d9109c80
TT
49182017-06-12 Tom Tromey <tom@tromey.com>
4919
4920 * printcmd.c (print_scalar_formatted): Unify the two switches.
4921 Don't convert scalars to LONGEST.
4922
4ac0cb1c
TT
49232017-06-12 Tom Tromey <tom@tromey.com>
4924
4925 PR exp/16225:
4926 * valprint.h (print_decimal_chars): Update.
4927 * valprint.c (maybe_negate_by_bytes): New function.
4928 (print_decimal_chars): Add "is_signed" argument.
4929 * printcmd.c (print_scalar_formatted): Update.
4930
30a25466
TT
49312017-06-12 Tom Tromey <tom@tromey.com>
4932
4933 PR exp/16225:
4934 * valprint.h (print_binary_chars, print_hex_chars): Update.
4935 * valprint.c (val_print_type_code_int): Update.
4936 (print_binary_chars): Add "zero_pad" argument.
4937 (emit_octal_digit): New function.
4938 (print_octal_chars): Don't zero-pad.
4939 (print_decimal_chars): Likewise.
4940 (print_hex_chars): Add "zero_pad" argument.
4941 * sh64-tdep.c (sh64_do_fp_register): Update.
4942 * regcache.c (regcache::dump): Update.
4943 * printcmd.c (print_scalar_formatted): Update.
4944 * infcmd.c (default_print_one_register_info): Update.
4945
b3464d03
PA
49462017-06-12 Pedro Alves <palves@redhat.com>
4947 Alan Hayward <alan.hayward@arm.com>
4948
4949 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4950 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4951 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4952 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4953 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4954
4b76cda9
PA
49552017-06-12 Pedro Alves <palves@redhat.com>
4956
4957 * dwarf2read.c (mapped_symtab::data): Now a vector of
4958 symtab_index_entry instead of vector of
4959 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4960 whether an element's name is NULL instead of checking whether the
4961 element itself is NULL.
4962 (find_slot): Change return type. Adjust.
4963 (hash_expand, , add_index_entry, uniquify_cu_indices)
4964 (write_hash_table): Adjust.
4965
e8f8bcb3
PA
49662017-06-12 Pedro Alves <palves@redhat.com>
4967
4968 * dwarf2read.c (recursively_count_psymbols): New function.
4969 (write_psymtabs_to_index): Call it to compute number of psyms and
4970 pass estimate size of psyms_seen to unordered_set's ctor.
4971
70a1152b
PA
49722017-06-12 Pedro Alves <palves@redhat.com>
4973
4974 * dwarf2read.c (write_hash_table): Check if key already exists
4975 before emplacing.
4976
c2f134ac
PA
49772017-06-12 Pedro Alves <palves@redhat.com>
4978
4979 * dwarf2read.c (data_buf::append_space): Rename to...
4980 (data_buf::grow): ... this, and make private. Adjust all callers.
4981 (data_buf::append_uint): New method.
4982 (add_address_entry, write_one_signatured_type)
4983 (write_psymtabs_to_index): Use it.
4984
a81e6d4d
PA
49852017-06-12 Pedro Alves <palves@redhat.com>
4986
4987 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4988 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4989 (data_buf::file_write): Call ::fwrite directly.
4990
6fd931f2
PA
49912017-06-12 Pedro Alves <palves@redhat.com>
4992
4993 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4994 std::vector::erase.
4995
bc8f2430
JK
49962017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4997
4998 Code cleanup: C++ify .gdb_index producer.
4999 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5000 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5001 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5002 (create_strtab, add_string): Remove.
5003 (file_write, data_buf): New.
5004 (struct symtab_index_entry): Use std::vector for cu_indices.
5005 (struct mapped_symtab): Use std::vector for data.
5006 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5007 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5008 Remove.
5009 (find_slot): Change return type. Update it to the new data structures.
5010 (hash_expand, add_index_entry): Update it to the new data structures.
5011 (offset_type_compare): Remove.
5012 (uniquify_cu_indices): Update it to the new data structures.
5013 (c_str_view, c_str_view_hasher, vector_hasher): New.
5014 (add_indices_to_cpool): Remove.
5015 (write_hash_table): Update it to the new data structures.
5016 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5017 (eq_psymtab_cu_index): Remove.
5018 (psym_index_map): New typedef.
5019 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5020 reference and std::unordered_map for cu_index_htab.
5021 (add_address_entry, add_address_entry_worker, write_address_map)
5022 (write_psymbols): Update it to the new data structures.
5023 (write_obstack): Remove.
5024 (struct signatured_type_index_data): Change types_list to a data_buf
5025 reference and psyms_seen to a std::unordered_set reference.
5026 (write_one_signatured_type, recursively_write_psymbols)
5027 (write_psymtabs_to_index): Update it to the new data structures.
5028
c4dcb155
SM
50292017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5030
5031 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5032 separate-debug-file commands.
5033 * symfile.h (separate_debug_file_debug): New global.
5034 * symfile.c (separate_debug_file_debug): New global.
5035 (separate_debug_file_exists, find_separate_debug_file): Add
5036 debug output.
5037 (_initialize_symfile): Add "set debug separate-debug-file"
5038 command.
5039 * build-id.c (build_id_to_debug_bfd,
5040 find_separate_debug_file_by_buildid): Add debug output.
5041
6d45d4b4
SM
50422017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5043
5044 * gdbarch.sh (displaced_step_free_closure): Remove.
5045 * gdbarch.h, gdbarch.c: Re-generate.
5046 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5047 displaced_step_free_closure.
5048 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5049 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5050 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5051 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5052 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5053 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5054 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5055 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5056 * infrun.c (displaced_step_clear): Call xfree instead of
5057 gdbarch_displaced_step_free_closure.
5058
2f91880f
SDJ
50592017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5060
5061 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5062 NULL".
5063
b8b6e72f
AH
50642017-06-08 Alan Hayward <alan.hayward@arm.com>
5065
5066 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5067 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5068 (mn10300_push_dummy_call): Likewise.
5069
5369082e
AH
50702017-06-08 Alan Hayward <alan.hayward@arm.com>
5071
5072 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5073
ff4ca5ac
AH
50742017-06-08 Alan Hayward <alan.hayward@arm.com>
5075
5076 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5077
aefd8b33
SDJ
50782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5079
5080 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5081 able to start inferiors using a shell.
5082 (New remote packets): Announce new packet "QStartupWithShell".
5083 * remote.c: Add PACKET_QStartupWithShell.
5084 (extended_remote_create_inferior): Handle new
5085 PACKET_QStartupWithShell.
5086 (remote_protocol_features) <QStartupWithShell>: New entry for
5087 PACKET_QStartupWithShell.
5088 (_initialize_remote): Call "add_packet_config_cmd" for
5089 QStartupShell.
5090
2090129c
SDJ
50912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5092 Pedro Alves <palves@redhat.com>
5093
5094 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5095 and "nat/fork-inferior.h".
5096 * common/common-inferior.h: New file, with contents from
5097 "gdb/inferior.h".
5098 * commom/common-utils.c: Include "common-utils.h".
5099 (stringify_argv): New function.
5100 * common/common-utils.h (stringify_argv): New prototype.
5101 * configure.nat: Add "fork-inferior.o" as a dependency for
5102 "*linux*", "fbsd*" and "nbsd*" hosts.
5103 * corefile.c (get_exec_file): Update comment.
5104 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5105 instead of "startup_inferior".
5106 (darwin_create_inferior): Call "add_thread_silent" after
5107 "fork_inferior".
5108 * fork-child.c: Cleanup unnecessary includes.
5109 (SHELL_FILE): Move to "common/common-fork-child.c".
5110 (environ): Likewise.
5111 (exec_wrapper): Initialize.
5112 (get_exec_wrapper): New function.
5113 (breakup_args): Move to "common/common-fork-child.c"; rename to
5114 "breakup_args_for_exec".
5115 (escape_bang_in_quoted_argument): Move to
5116 "common/common-fork-child.c".
5117 (saved_ui): New variable.
5118 (prefork_hook): New function.
5119 (postfork_hook): Likewise.
5120 (postfork_child_hook): Likewise.
5121 (gdb_startup_inferior): Likewise.
5122 (fork_inferior): Move to "common/common-fork-child.c". Update
5123 function to support gdbserver.
5124 (startup_inferior): Likewise.
5125 * gdbcore.h (get_exec_file): Remove declaration.
5126 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5127 instead of "startup_inferior". Call "add_thread_silent" after
5128 "fork_inferior".
5129 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5130 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5131 instead of "startup_inferior". Call "add_thread_silent" after
5132 "fork_inferior".
5133 * inferior.h: Include "common-inferior.h".
5134 (trace_start_error): Move to "common/common-utils.h".
5135 (trace_start_error_with_name): Likewise.
5136 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5137 (startup_inferior): Likewise.
5138 (gdb_startup_inferior): New prototype.
5139 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5140 * nat/fork-inferior.h: New file.
5141 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5142 instead of "startup_inferior". Call "add_thread_silent" after
5143 "fork_inferior".
5144 * target.h (target_terminal_init): Move prototype to
5145 "target/target.h".
5146 (target_terminal_inferior): Likewise.
5147 (target_terminal_ours): Likewise.
5148 * target/target.h (target_terminal_init): New prototype, moved
5149 from "target.h".
5150 (target_terminal_inferior): Likewise.
5151 (target_terminal_ours): Likewise.
5152 * utils.c (gdb_flush_out_err): New function.
5153
043a4934
SDJ
51542017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5155
5156 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5157 * common/common-gdbthread.h: New file, with parts from
5158 "gdb/gdbthread.h".
5159 * gdbthread.h: Include "common-gdbthread.h".
5160 (switch_to_thread): Moved to "common/common-gdbthread.h".
5161
15652511
SDJ
51622017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5163
5164 * Makefile.in (SFILES): Add "common/job-control.c".
5165 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5166 (COMMON_OBS): Add "job-control.o".
5167 * common/job-control.c: New file, with contents from
5168 "gdb/inflow.c".
5169 * common/job-control.h: New file, with contents from "terminal.h".
5170 * fork-child.c: Include "job-control.h".
5171 * inflow.c: Include "job-control.h".
5172 (gdb_setpgid): Move to "common/common-inflow.c".
5173 (_initialize_inflow): Move setting of "job_control" to
5174 "handle_job_control".
5175 * terminal.h (job_control): Moved to "common/common-terminal.h".
5176 (gdb_setpgid): Likewise.
5177 * top.c: Include "job_control.h".
5178 * utils.c: Likewise.
5179 (job_control): Moved to "job-control.c".
5180
2d7cc5c7
PA
51812017-06-07 Pedro Alves <palves@redhat.com>
5182
5183 * Makefile.in (SFILES): Add gdb_regex.c.
5184 (COMMON_OBS): Add gdb_regex.o.
5185 * ada-lang.c (ada_add_standard_exceptions)
5186 (ada_add_exceptions_from_frame, name_matches_regex)
5187 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5188 parameter type to compiled_regex. Adjust.
5189 (ada_exceptions_list): Use compiled_regex.
5190 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5191 std::unique_ptr<compiled_regex>.
5192 (exception_catchpoint::~exception_catchpoint): Remove regfree
5193 call.
5194 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5195 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5196 * breakpoint.c (solib_catchpoint::compiled): Now a
5197 std::unique_ptr<compiled_regex>.
5198 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5199 (check_status_catch_solib): Adjust to use compiled_regex.
5200 (add_solib_catchpoint): Adjust to use compiled_regex.
5201 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5202 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5203 compiled_regex reference. Adjust to use it.
5204 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5205 declaration. Include "gdb_regex.h".
5206 (apropos_cmd): Change regex parameter to compiled_regex reference.
5207 * gdb_regex.c: New file.
5208 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5209 declarations.
5210 (class compiled_regex): New.
5211 * linux-tdep.c: Include "common/gdb_optional.h".
5212 (struct mapping_regexes): New, factored out from
5213 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5214 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5215 gdb::optional and remove cleanups. Adjust to compiled_regex.
5216 * probe.c: Include "common/gdb_optional.h".
5217 (collect_probes): Use compiled_regex and gdb::optional and remove
5218 cleanups.
5219 * skip.c: Include "common/gdb_optional.h".
5220 (skiplist_entry::compiled_function_regexp): Now a
5221 gdb::optional<compiled_regex>.
5222 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5223 (free_skiplist_entry): Remove regfree call.
5224 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5225 compiled_regex and gdb::optional.
5226 * symtab.c: Include "common/gdb_optional.h".
5227 (search_symbols): Use compiled_regex and gdb::optional.
5228 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5229 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5230 to gdb_regex.c.
5231
50d6adef
AH
52322017-06-07 Alan Hayward <alan.hayward@arm.com>
5233
5234 * regcache.c (regcache::save): Avoid buffer use.
5235 (regcache::dump): Likewise.
5236
4a8a33c8
AH
52372017-06-07 Alan Hayward <alan.hayward@arm.com>
5238
5239 * sh-tdep.c (sh_pseudo_register_read): Remove
5240 MAX_REGISTER_SIZE.
5241 (sh_pseudo_register_write): Likewise.
5242 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5243 (sh64_pseudo_register_write): Likewise
5244
d1be909e
AH
52452017-06-07 Alan Hayward <alan.hayward@arm.com>
5246
5247 * aarch64-tdep.c (aarch64_store_return_value): Use
5248 V_REGISTER_SIZE.
5249 (aarch64_pseudo_read_value): Likewise.
5250 (aarch64_pseudo_write): Likewise.
5251
f4a65042
YQ
52522017-06-06 Yao Qi <yao.qi@linaro.org>
5253
5254 * regformats/regdef.h (set_register_cache): Remove the
5255 declaration.
5256
9f7fb0aa
AH
52572017-06-06 Alan Hayward <alan.hayward@arm.com>
5258
5259 * frame.c (frame_unwind_register_signed): Use
5260 frame_unwind_register_value.
5261
e1e01040
PA
52622017-06-06 Pedro Alves <palves@redhat.com>
5263
5264 PR breakpoints/21553
5265 * breakpoint.c (create_breakpoints_sal_default)
5266 (init_breakpoint_sal, create_breakpoint_sal): Use
5267 gdb::unique_xmalloc_ptr for string parameters.
5268 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5269 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5270 (base_breakpoint_create_breakpoints_sal)
5271 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5272 (strace_marker_create_breakpoints_sal)
5273 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5274 string parameters.
5275 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5276 gdb::unique_xmalloc_ptr for string parameters.
5277 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5278 parameters.
5279
fbe654c8
AH
52802017-06-06 Alan Hayward <alan.hayward@arm.com>
5281
5282 * alpha-tdep.c (alpha_register_to_value): Use
5283 get_frame_register_value.
5284 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5285
ae0d01d6
AH
52862017-06-06 Alan Hayward <alan.hayward@arm.com>
5287
5288 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5289 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5290 (ia64_value_to_register): Likewise.
5291 (ia64_extract_return_value): Likewise.
5292 (ia64_store_return_value): Likewise.
5293 (ia64_push_dummy_call): Likewise.
5294
49cf576c
JB
52952017-06-04 Joel Brobecker <brobecker@adacore.com>
5296
5297 GDB 8.0 released.
5298
26b6a6ab
SM
52992017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5300
5301 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5302
22827c51
SM
53032017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5304
5305 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5306 parameter.
5307 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5308
0e05cf3a
SM
53092017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5310
5311 * event-loop.c (poll_timers): Unallocate timer using delete
5312 instead of xfree.
5313
c1fc2657
SM
53142017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5315
5316 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5317 (struct breakpoint) <~breakpoint>: New.
5318 (struct watchpoint): Inherit from breakpoint.
5319 <~watchpoint>: New.
5320 <base>: Remove.
5321 (struct tracepoint): Inherit from breakpoint.
5322 <base>: Remove.
5323 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5324 (struct longjmp_breakpoint): Inherit from breakpoint.
5325 <~longjmp_breakpoint>: New.
5326 <base>: Remove.
5327 (new_breakpoint_from_type): Remove casts.
5328 (watchpoint_in_thread_scope): Remove reference to base field.
5329 (watchpoint_del_at_next_stop): Likewise.
5330 (update_watchpoint): Likewise.
5331 (watchpoint_check): Likewise.
5332 (bpstat_check_watchpoint): Likewise.
5333 (set_longjmp_breakpoint): Likewise.
5334 (struct fork_catchpoint): Inherit from breakpoint.
5335 <base>: Remove.
5336 (struct solib_catchpoint): Inherit from breakpoint.
5337 <~solib_catchpoint>: New.
5338 <base>: Remove.
5339 (dtor_catch_solib): Change to ...
5340 (solib_catchpoint::~solib_catchpoint): ... this.
5341 (breakpoint_hit_catch_solib): Remove reference to base field.
5342 (add_solib_catchpoint): Likewise.
5343 (create_fork_vfork_event_catchpoint): Likewise.
5344 (struct exec_catchpoint): Inherit from breakpoint.
5345 <~exec_catchpoint>: New.
5346 <base>: Remove.
5347 (dtor_catch_exec): Change to ...
5348 (exec_catchpoint::~exec_catchpoint): ... this.
5349 (dtor_watchpoint): Change to ...
5350 (watchpoint::~watchpoint): ... this.
5351 (watch_command_1): Remove reference to base field.
5352 (catch_exec_command_1): Likewise.
5353 (base_breakpoint_dtor): Change to ...
5354 (breakpoint::~breakpoint): ... this.
5355 (base_breakpoint_ops): Remove dtor field value.
5356 (longjmp_bkpt_dtor): Change to ...
5357 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5358 (strace_marker_create_breakpoints_sal): Remove reference to base
5359 field.
5360 (delete_breakpoint): Don't manually call breakpoint destructor.
5361 (create_tracepoint_from_upload): Remove reference to base field.
5362 (trace_pass_set_count): Likewise.
5363 (initialize_breakpoint_ops): Don't initialize
5364 momentary_breakpoint_ops, don't set dtors.
5365 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5366 <~ada_catchpoint>: New.
5367 <base>: Remove.
5368 (create_excep_cond_exprs): Remove reference to base field.
5369 (dtor_exception): Change to ...
5370 (ada_catchpoint::~ada_catchpoint): ... this.
5371 (dtor_catch_exception): Remove.
5372 (dtor_catch_exception_unhandled): Remove.
5373 (dtor_catch_assert): Remove.
5374 (create_ada_exception_catchpoint): Remove reference to base
5375 field.
5376 (initialize_ada_catchpoint_ops): Don't set dtors.
5377 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5378 breakpoint.
5379 <~signal_catchpoint>: New.
5380 <base>: Remove.
5381 (signal_catchpoint_dtor): Change to ...
5382 (signal_catchpoint::~signal_catchpoint): ... this.
5383 (create_signal_catchpoint): Remove reference to base field.
5384 (initialize_signal_catchpoint_ops): Don't set dtor.
5385 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5386 from breakpoint.
5387 <~syscall_catchpoint>: New.
5388 <base>: Remove.
5389 (dtor_catch_syscall): Change to ...
5390 (syscall_catchpoint::~syscall_catchpoint): ... this.
5391 (create_syscall_event_catchpoint): Remove reference to base
5392 field.
5393 (initialize_syscall_catchpoint_ops): Don't set dtor.
5394 * break-catch-throw.c (struct exception_catchpoint): Inherit
5395 from breakpoint.
5396 <~exception_catchpoint>: New.
5397 <base>: Remove.
5398 (dtor_exception_catchpoint): Change to ...
5399 (exception_catchpoint::~exception_catchpoint): ... this.
5400 (handle_gnu_v3_exceptions): Remove reference to base field.
5401 (initialize_throw_catchpoint_ops): Don't set dtor.
5402 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5403 field.
5404 * remote.c (remote_get_tracepoint_status): Likewise.
5405 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5406 * tracefile.c (tracefile_fetch_registers): Likewise.
5407 * tracepoint.c (actions_command): Likewise.
5408 (validate_actionline): Likewise.
5409 (tfind_1): Likewise.
5410 (get_traceframe_location): Likewise.
5411 (find_matching_tracepoint_location): Likewise.
5412 (parse_tracepoint_status): Likewise.
5413 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5414
3b0871f4
SM
54152017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5416
5417 * breakpoint.c (struct longjmp_breakpoint): New struct.
5418 (is_tracepoint_type): Change return type to bool.
5419 (is_longjmp_type): New function.
5420 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5421 (set_raw_breakpoint_without_location): Use
5422 new_breakpoint_from_type.
5423 (set_raw_breakpoint): Likewise.
5424
a5e364af
SM
54252017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5426
5427 * breakpoint.c (new_breakpoint_from_type): New function.
5428 (create_breakpoint_sal): Use new_breakpoint_from_type and
5429 unique_ptr.
5430 (create_breakpoint): Likewise.
5431
ae3b3f34
SM
54322017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5433
5434 * memattr.c (mem_info_command): Rename to ...
5435 (info_mem_command): ... this.
5436 (mem_enable_command): Rename to ...
5437 (enable_mem_command): ... this.
5438 (mem_disable_command): Rename to ...
5439 (disable_mem_command): ... this.
5440 (mem_delete_command): Rename to ...
5441 (delete_mem_command): ... this.
5442 (_initialize_mem): Adjust function names.
5443
13ace077
MM
54442017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5445
5446 * btrace.c (handle_pt_insn_events): New.
5447 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5448 STATUS. Split into this and ...
5449 (handle_pt_insn_event_flags): ... this.
5450
c56ccc05
MM
54512017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5452
5453 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5454 and struct pt_insn.resynced.
5455 * configure: Regenerated.
5456 * config.in: Regenerated.
5457
08c3f6d2
TW
54582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5459
5460 * btrace.c (ftrace_find_call_by_number): New function.
5461 (ftrace_new_function): Store objects, not pointers.
5462 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5463 ftrace_new_gap, ftrace_update_function,
5464 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5465 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5466 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5467 btrace_ends_with_single_insn, btrace_call_get): Account for
5468 btrace_thread_info::functions now storing objects.
5469 * btrace.h (struct btrace_thread_info): Add constructor.
5470 (struct btrace_thread_info) <functions>: Make std::vector.
5471 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5472 Initialize with default values.
5473 * record-btrace.c (record_btrace_frame_sniffer): Account for
5474 btrace_thread_info::functions now storing objects.
5475
8ffd39f2
TW
54762017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5477
5478 * btrace.c: Remove typedef bfun_s.
5479 (ftrace_new_gap): Directly add gaps to the list of gaps.
5480 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5481 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5482 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5483 instead of gdb VEC.
5484
4aeb0dfc
TW
54852017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5486
5487 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5488 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5489 with btrace_thread_info::next_segment and
5490 btrace_thread_info::prev_segment.
5491 * btrace.h: Remove struct btrace_func_link.
5492 (struct btrace_function): Replace pair of function segment pointers
5493 with pair of indices.
5494 * python/py-record-btrace.c (btpy_call_prev_sibling,
5495 btpy_call_next_sibling): Replace references to
5496 btrace_thread_info::segment with btrace_thread_info::next_segment and
5497 btrace_thread_info::prev_segment.
5498 * record-btrace.c (record_btrace_frame_this_id): Use
5499 btrace_find_call_by_number.
5500
eb8f2b9c
TW
55012017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5502
5503 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5504 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5505 btrace_insn_next, btrace_insn_prev): Remove references to
5506 btrace_thread_info::flow.
5507 * btrace.h (struct btrace_function): Remove FLOW.
5508
42bfe59e
TW
55092017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5510
5511 * btrace.c (ftrace_find_call_by_number): New function.
5512 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5513 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5514 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5515 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5516 index.
5517 * btrace.h (struct btrace_function): Turn UP into an index.
5518 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5519 as an index.
5520 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5521 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5522 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5523
b54b03bd
TW
55242017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5525
5526 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5527 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5528 ftrace_update_function, ftrace_compute_global_level_offset,
5529 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5530 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5531 btrace_insn_end, btrace_is_empty): Remove references to
5532 btrace_thread_info::begin and btrace_thread_info::end.
5533 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5534 (struct btrace_thread_info) <functions>: Adjust comment.
5535 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5536 btrace_thread_info::begin.
5537
8286623c
TW
55382017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5539
5540 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5541 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5542 ftrace_update_function): Remove arguments that implicitly were always
5543 BTINFO->END.
5544 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5545 Don't pass BTINFO->END.
5546
a0f1b963
TW
55472017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5548
5549 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5550 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5551 btrace_find_insn_by_number): Replace function segment pointer with
5552 index.
5553 (btrace_insn_cmp): Simplify.
5554 * btrace.h: (struct btrace_insn_iterator) Rename index to
5555 insn_index. Replace function segment pointer with index into function
5556 segment vector.
5557 * record-btrace.c (record_btrace_call_history): Replace function
5558 segment pointer use with index.
5559 (record_btrace_frame_sniffer): Retrieve function call segment through
5560 vector.
5561 (record_btrace_set_replay): Remove defunc't safety check.
5562
f158f208
TW
55632017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5564
5565 * btrace.c (btrace_ends_with_single_insn): New function.
5566 (btrace_call_get, btrace_call_number, btrace_call_begin,
5567 btrace_call_end, btrace_call_next, btrace_call_prev,
5568 btrace_find_call_by_number): Use index into call segment vector
5569 instead of pointer.
5570 (btrace_call_cmp): Simplify.
5571 * btrace.h (struct btrace_call_iterator): Replace function call segment
5572 pointer with index into vector.
5573 * record-btrace.c (record_btrace_call_history): Use index instead of
5574 pointer.
5575
521103fd
TW
55762017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5577
5578 * btrace.c (btrace_insn_begin, btrace_insn_end,
5579 btrace_find_insn_by_number): Add btinfo to iterator.
5580 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5581
17b89b34
TW
55822017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5583
5584 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5585 and save pointers directly.
5586 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5587 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5588 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5589 changed signature of functions.
5590 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5591 (btrace_fetch): Remove code that adds btrace_function pointers to
5592 vector of btrace_functions.
5593 (btrace_clear): Simplify freeing vector of btrace_functions.
5594
2b51eddc
TW
55952017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5596
5597 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5598 Replace VEC_* with std::vector functions.
5599 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5600 (struct btrace_thread_info)<functions>: Change type to std::vector.
5601
db6be0d5
SM
56022017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5603
5604 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5605 "Removed targets and native configurations" up. Merge duplicate
5606 "New commands" sub-sections. Add "New options" sub-sections.
5607
b057297a
AH
56082017-05-26 Alan Hayward <alan.hayward@arm.com>
5609
5610 * defs.h (copy_integer_to_size): New declaration.
5611 * findvar.c (copy_integer_to_size): New function.
5612 (do_cint_test): New selftest function.
5613 (copy_integer_to_size_test): Likewise.
5614 (_initialize_findvar): Likewise.
5615 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5616 (mips_fbsd_collect_reg): Use raw_collect_integer.
5617 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5618 (mips64_fill_gregset): Use raw_collect_integer
5619 (mips64_fill_fpregset): Use raw_supply_integer.
5620 * regcache.c (regcache::raw_supply_integer): New function.
5621 (regcache::raw_collect_integer): Likewise.
5622 * regcache.h: (regcache::raw_supply_integer): New declaration.
5623 (regcache::raw_collect_integer): Likewise.
5624
b77b02a5
YQ
56252017-05-24 Yao Qi <yao.qi@linaro.org>
5626
5627 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5628 (COMMON_OBS): Add gdbarch-selftests.o.
5629 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5630 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5631 * gdbarch-selftests.c: New file.
5632 * regcache.h (regcache) <~regcache>: Mark it virtual if
5633 GDB_SELF_TEST.
5634 <raw_write>: Likewise.
5635
e521e87e
YQ
56362017-05-24 Yao Qi <yao.qi@linaro.org>
5637
5638 * regcache.c (current_regcache): Change it to
5639 regcache::current_regcache.
5640 (regcache_observer_target_changed): Update.
5641 (regcache_thread_ptid_changed): Make it a regcache static
5642 method.
5643 (regcache_thread_ptid_changed): Update.
5644 (class regcache_access): New.
5645 (current_regcache_test): Update.
5646 (_initialize_regcache): Update.
5647 * regcache.h: Include forward_list.
5648 (regcache): Declare regcache_thread_ptid_changed and declare
5649 registers_changed_ptid as friend.
5650
d8e07dda
YQ
56512017-05-24 Yao Qi <yao.qi@linaro.org>
5652
5653 * i387-tdep.c (i387_register_to_value): Use register_size
5654 instead of TYPE_LENGTH.
5655 * m68k-tdep.c (m68k_register_to_value): Likewise.
5656
8c8f9122
YQ
56572017-05-24 Yao Qi <yao.qi@linaro.org>
5658
5659 * i387-tdep.c (i387_convert_register_p): Return false if type
5660 code isn't TYPE_CODE_FLT.
5661
68fce50f
YQ
56622017-05-24 Yao Qi <yao.qi@linaro.org>
5663
5664 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5665 length is 4.
5666 (alpha_register_to_value): Remove type length check.
5667 (alpha_value_to_register): Likewise.
5668
88954b49
YQ
56692017-05-24 Yao Qi <yao.qi@linaro.org>
5670
5671 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5672 TYPE_CODE_FLT.
5673
e3ec9b69
YQ
56742017-05-24 Yao Qi <yao.qi@linaro.org>
5675
5676 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5677 TYPE_CODE_FLT or not.
5678
cdd238da
YQ
56792017-05-24 Yao Qi <yao.qi@linaro.org>
5680
5681 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5682 * avr-tdep.c (avr_gdbarch_init): Likewise.
5683 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5684 * cris-tdep.c (cris_gdbarch_init): Likewise.
5685 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5686 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5687 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5688 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5689 * mep-tdep.c (mep_gdbarch_init): Likewise.
5690 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5691 * mips-tdep.c (mips_gdbarch_init): Likewise.
5692 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5693 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5694 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5695 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5696 * v850-tdep.c (v850_gdbarch_init): Likewise.
5697
7a3929c4
YQ
56982017-05-24 Yao Qi <yao.qi@linaro.org>
5699
5700 * selftest-arch.c (tests_with_arch): Call registers_changed
5701 and reinit_frame_cache.
5702 * selftest.c (run_self_tests): Likewise.
5703
f4985dba
YQ
57042017-05-24 Yao Qi <yao.qi@linaro.org>
5705
5706 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5707 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5708
ab20fa4a
YQ
57092017-05-24 Yao Qi <yao.qi@linaro.org>
5710
5711 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5712 set_gdbarch_print_insn.
5713
f532ab94
YQ
57142017-05-24 Yao Qi <yao.qi@linaro.org>
5715
5716 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5717 set_gdbarch_print_insn.
5718
39503f82
YQ
57192017-05-24 Yao Qi <yao.qi@linaro.org>
5720
5721 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5722 set_gdbarch_print_insn.
5723 * arc-tdep.c (arc_gdbarch_init): Likewise.
5724 * arch-utils.c: include dis-asm.h.
5725 (default_print_insn): New function.
5726 * arch-utils.h (default_print_insn): Declare.
5727 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5728 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5729 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5730 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5731 * frv-tdep.c (frv_gdbarch_init): Likewise.
5732 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5733 * gdbarch.sh (print_insn): Use default_print_insn.
5734 * gdbarch.c: Regenerated.
5735 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5736 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5737 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5738 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5739 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5740 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5741 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5742 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5743 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5744 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5745 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5746 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5747 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5748 * mt-tdep.c (mt_gdbarch_init): Likewise.
5749 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5750 * nios2-tdep.c (nios2_print_insn): Remove.
5751 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5752 * rx-tdep.c (rx_gdbarch_init): Likewise.
5753 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5754 * score-tdep.c (score_print_insn): Remove.
5755 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5756 * sh-tdep.c (sh_gdbarch_init): Likewise.
5757 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5758 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5759 * tic6x-tdep.c (tic6x_print_insn): Remove.
5760 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5761 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5762 * v850-tdep.c (v850_gdbarch_init): Likewise.
5763 * vax-tdep.c (vax_gdbarch_init): Likewise.
5764 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5765 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5766
f7241d4f
JB
57672017-05-23 John Baldwin <jhb@FreeBSD.org>
5768
5769 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5770 (MIPS_FP0_REGNUM): Remove.
5771 (MIPS_FSR_REGNUM): Remove.
5772 (mips_fbsd_supply_fpregs): Use mips_regnum.
5773 (mips_fbsd_supply_gregs): Likewise.
5774 (mips_fbsd_collect_fpregs): Likewise.
5775 (mips_fbsd_collect_gregs): Likewise.
5776
d489d81d
JB
57772017-05-23 John Baldwin <jhb@FreeBSD.org>
5778
5779 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5780 (getpfpregs_supplies): New function.
5781 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5782 getfpregs_supplies.
5783 (mips_fbsd_store_inferior_registers): Likewise.
5784
e11b3cdc
PA
57852017-05-22 Pedro Alves <palves@redhat.com>
5786
5787 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5788 maintainer.
5789
0f068fb5
AH
57902017-05-22 Alan Hayward <alan.hayward@arm.com>
5791
5792 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5793 (store_register): Likewise.
5794 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5795 (get_decimal_float_return_value): Likewise.
5796 (do_ppc_sysv_return_value): Likewise.
5797 (ppc64_sysv_abi_push_integer): Likewise.
5798 (ppc64_sysv_abi_push_freg): Likewise.
5799 (ppc64_sysv_abi_return_value_base): Likewise.
5800 (ppc64_sysv_abi_return_value): Likewise.
5801 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5802 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5803 * rs6000-nat.c: Likewise.
5804 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5805 (rs6000_value_to_register): Likewise.
5806 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5807
e6cf65f2
TT
58082017-05-21 Tom Tromey <tom@tromey.com>
5809
5810 PR rust/21466:
5811 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5812 arrays as "[T]", not "[T; ]".
5813
43cc5389
TT
58142017-05-19 Tom Tromey <tom@tromey.com>
5815
5816 PR rust/21484:
5817 * rust-lang.c (exp_descriptor_rust): New function.
5818 (rust_language_defn): Use it.
5819 * p-lang.c (pascal_language_defn): Update.
5820 * opencl-lang.c (opencl_language_defn): Update.
5821 * objc-lang.c (objc_language_defn): Update.
5822 * m2-lang.c (m2_language_defn): Update.
5823 * language.h (struct language_defn)
5824 <la_watch_location_expression>: New member.
5825 * language.c (unknown_language_defn, auto_language_defn)
5826 (local_language_defn): Update.
5827 * go-lang.c (go_language_defn): Update.
5828 * f-lang.c (f_language_defn): Update.
5829 * d-lang.c (d_language_defn): Update.
5830 * c-lang.h (c_watch_location_expression): Declare.
5831 * c-lang.c (c_watch_location_expression): New function.
5832 (c_language_defn, cplus_language_defn, asm_language_defn)
5833 (minimal_language_defn): Use it.
5834 * breakpoint.c (watch_command_1): Call
5835 la_watch_location_expression.
5836 * ada-lang.c (ada_language_defn): Update.
5837
7a6e7fcc
RO
58382017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5839
6e7e1744
RO
5840 PR tui/21482
5841 * gdb_curses.h (NOMACROS): Define.
5842 (NCURSES_NOMACROS): Define.
5843
58442017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5845
5846 PR tui/21482
7a6e7fcc
RO
5847 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5848 arg to char *.
5849 * tui/tui-wingeneral.c (box_win): Likewise.
5850 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5851 (tui_show_source_line): Likewise.
5852 (tui_show_exec_info_content): Likewise.
5853
1933fd8e
VM
58542017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5855
5856 * sparc-tdep.c (sparc_structure_return_p)
5857 (sparc_arg_on_registers_p): New functions.
5858 (sparc32_store_arguments): Use them.
5859 * sparc64-tdep.c (sparc64_16_byte_align_p)
5860 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5861 Handle TYPE_CODE_ARRAY.
5862
21873064
YQ
58632017-05-17 Yao Qi <yao.qi@linaro.org>
5864
5865 * cli/cli-decode.c (add_alias_cmd): New function.
5866 * command.h (add_alias_cmd): Declare.
5867 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5868 instead call add_alias_cmd.
5869
2b351b19
PA
58702017-05-17 Pedro Alves <palves@redhat.com>
5871
5872 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5873 (nat_makefile_frag): ... this. All references updated.
5874 * configure.ac: Likewise.
5875 * configure.nat: Likewise. Enhance comments.
5876 * configure: Regenerate.
5877
5f2ad7a3
RO
58782017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5879
5880 * procfs.c (procfs_create_inferior): Change prototype to match
5881 definition.
5882
adf3dde5
EZ
58832017-05-13 Eli Zaretskii <eliz@gnu.org>
5884
5885 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5886 C++ compiler warning.
5887
6830f270
TT
58882017-05-12 Tom Tromey <tom@tromey.com>
5889
5890 PR rust/21483:
5891 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5892 recurse, just call value_struct_elt directly.
5893
68f2f2e3
TT
58942017-05-12 Tom Tromey <tom@tromey.com>
5895
5896 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5897 OP_RUST_ARRAY>: Fix.
5898
256afbc2
TT
58992017-05-12 Tom Tromey <tom@tromey.com>
5900
5901 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5902
94bb8dfe
YQ
59032017-05-09 Yao Qi <yao.qi@linaro.org>
5904
5905 * regcache.c: Include <forward_list>.
5906 (struct regcache_list): Remove.
5907 (current_regcache): Update.
5908 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5909 (regcache_thread_ptid_changed): Likewise.
5910 (registers_changed_ptid): Likewise.
5911 (current_regcache_size): Likewise.
5912
8248946c
YQ
59132017-05-09 Yao Qi <yao.qi@linaro.org>
5914
5915 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5916 (current_regcache_size): New function.
5917 (current_regcache_test): New function.
5918 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5919
313c5961
AH
59202017-05-08 Alan Hayward <alan.hayward@arm.com>
5921
5922 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5923 (print_gp_register_row): Use get_frame_register_value.
5924
27bfc1d1
AH
59252017-05-08 Alan Hayward <alan.hayward@arm.com>
5926
5927 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5928 (mips_supply_fpregset): Likewise.
5929 (mips64_supply_gregset): Likewise.
5930
146e6c5c
AH
59312017-05-08 Alan Hayward <alan.hayward@arm.com>
5932
5933 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5934 regcache->raw_supply_zeroed.
5935
e50f25ec
SDJ
59362017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5937
5938 * configure.nat: Rearrange 'case' statements to match
5939 host before cpu.
5940
21ea5acd
SDJ
59412017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5942
5943 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5944 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5945 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5946 "@nat_extra_makefile_frag@".
5947 (Makefile): Remove dependency on "@frags@".
5948 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5949 (data-directory/Makefile): Likewise.
5950 * config/aarch64/linux.mh: Deleted; moved contents to
5951 "gdb/configure.nat".
5952 * config/alpha/alpha-linux.mh: Likewise.
5953 * config/alpha/nbsd.mh: Likewise.
5954 * config/arm/linux.mh: Likewise.
5955 * config/arm/nbsdelf.mh: Likewise.
5956 * config/i386/cygwin.mh: Likewise.
5957 * config/i386/cygwin64.mh: Likewise.
5958 * config/i386/darwin.mh: Likewise.
5959 * config/i386/fbsd.mh: Likewise.
5960 * config/i386/fbsd64.mh: Likewise.
5961 * config/i386/go32.mh: Likewise.
5962 * config/i386/i386gnu.mh: Likewise.
5963 * config/i386/i386sol2.mh: Likewise.
5964 * config/i386/linux.mh: Likewise.
5965 * config/i386/linux64.mh: Likewise.
5966 * config/i386/mingw.mh: Likewise.
5967 * config/i386/mingw64.mh: Likewise.
5968 * config/i386/nbsd64.mh: Likewise.
5969 * config/i386/nbsdelf.mh: Likewise.
5970 * config/i386/nto.mh: Likewise.
5971 * config/i386/obsd.mh: Likewise.
5972 * config/i386/obsd64.mh: Likewise.
5973 * config/i386/sol2-64.mh: Likewise.
5974 * config/ia64/linux.mh: Likewise.
5975 * config/m32r/linux.mh: Likewise.
5976 * config/m68k/linux.mh: Likewise.
5977 * config/m68k/nbsdelf.mh: Likewise.
5978 * config/m68k/obsd.mh: Likewise.
5979 * config/m88k/obsd.mh: Likewise.
5980 * config/mips/fbsd.mh: Likewise.
5981 * config/mips/linux.mh: Likewise.
5982 * config/mips/nbsd.mh: Likewise.
5983 * config/mips/obsd64.mh: Likewise.
5984 * config/pa/linux.mh: Likewise.
5985 * config/pa/nbsd.mh: Likewise.
5986 * config/pa/obsd.mh: Likewise.
5987 * config/powerpc/aix.mh: Likewise.
5988 * config/powerpc/fbsd.mh: Likewise.
5989 * config/powerpc/linux.mh: Likewise.
5990 * config/powerpc/nbsd.mh: Likewise.
5991 * config/powerpc/obsd.mh: Likewise.
5992 * config/powerpc/ppc64-linux.mh: Likewise.
5993 * config/powerpc/spu-linux.mh: Likewise.
5994 * config/s390/linux.mh: Likewise.
5995 * config/sh/nbsd.mh: Likewise.
5996 * config/sparc/fbsd.mh: Likewise.
5997 * config/sparc/linux.mh: Likewise.
5998 * config/sparc/linux64.mh: Likewise.
5999 * config/sparc/nbsd64.mh: Likewise.
6000 * config/sparc/nbsdelf.mh: Likewise.
6001 * config/sparc/obsd64.mh: Likewise.
6002 * config/sparc/sol2.mh: Likewise.
6003 * config/tilegx/linux.mh: Likewise.
6004 * config/vax/nbsdelf.mh: Likewise.
6005 * config/vax/obsd.mh: Likewise.
6006 * config/xtensa/linux.mh: Likewise.
6007 * config/i386/i386gnu.mn: New file, with excerpts from
6008 "config/i386/i386gnu.mh".
6009 * configure: Regenerate.
6010 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6011 *.mh files under "gdb/config".
6012 * configure.nat: New file, with contents from the
6013 "gdb/config/*/*.mh" files.
6014
7ed1acaf
TW
60152017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6016
6017 * btrace.c (btrace_clear): Free insn vector.
6018
e13cb306
PA
60192017-05-05 Pedro Alves <palves@redhat.com>
6020
6021 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6022 * configure: Regenerate.
6023
5ed8105e
PA
60242017-05-04 Pedro Alves <palves@redhat.com>
6025
6026 * Makefile.in (SFILES): Add progspace-and-thread.c.
6027 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6028 (COMMON_OBS): Add progspace-and-thread.o.
6029 * breakpoint.c: Include "progspace-and-thread.h".
6030 (update_inserted_breakpoint_locations)
6031 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6032 Use scoped_restore_current_pspace_and_thread.
6033 (create_std_terminate_master_breakpoint): Use
6034 scoped_restore_current_program_space.
6035 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6036 (print_breakpoint_location): Use
6037 scoped_restore_current_program_space.
6038 (bp_loc_is_permanent): Use
6039 scoped_restore_current_pspace_and_thread.
6040 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6041 (download_tracepoint_locations): Use
6042 scoped_restore_current_pspace_and_thread.
6043 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6044 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6045 (enum step_over_calls_kind): Moved from inferior.h.
6046 (class scoped_restore_current_thread): New class.
6047 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6048 declaration.
6049 (scoped_restore_current_thread): New class.
6050 * infcmd.c: Include "common/gdb_optional.h".
6051 (continue_1, proceed_after_attach): Use
6052 scoped_restore_current_thread.
6053 (notice_new_inferior): Use scoped_restore_current_thread.
6054 * inferior.c: Include "progspace-and-thread.h".
6055 (restore_inferior, save_current_inferior): Delete.
6056 (add_inferior_command, clone_inferior_command): Use
6057 scoped_restore_current_pspace_and_thread.
6058 * inferior.h (scoped_restore_current_inferior): New class.
6059 * infrun.c: Include "progspace-and-thread.h" and
6060 "common/gdb_optional.h".
6061 (follow_fork_inferior): Use
6062 scoped_restore_current_pspace_and_thread.
6063 (scoped_restore_exited_inferior): New class.
6064 (handle_vfork_child_exec_or_exit): Use
6065 scoped_restore_exited_inferior,
6066 scoped_restore_current_pspace_and_thread,
6067 scoped_restore_current_thread and scoped_restore.
6068 (fetch_inferior_event): Use scoped_restore_current_thread.
6069 * linespec.c (decode_line_full, decode_line_1): Use
6070 scoped_restore_current_program_space.
6071 * mi/mi-main.c: Include "progspace-and-thread.h".
6072 (exec_continue): Use scoped_restore_current_thread.
6073 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6074 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6075 * proc-service.c (ps_pglobal_lookup): Use
6076 scoped_restore_current_program_space.
6077 * progspace-and-thread.c: New file.
6078 * progspace-and-thread.h: New file.
6079 * progspace.c (release_program_space, clone_program_space): Use
6080 scoped_restore_current_program_space.
6081 (restore_program_space, save_current_program_space)
6082 (save_current_space_and_thread): Delete.
6083 (switch_to_program_space_and_thread): Moved to
6084 progspace-and-thread.c.
6085 * progspace.h (save_current_program_space)
6086 (save_current_space_and_thread): Delete declarations.
6087 (scoped_restore_current_program_space): New class.
6088 * remote.c (remote_btrace_maybe_reopen): Use
6089 scoped_restore_current_thread.
6090 * symtab.c: Include "progspace-and-thread.h".
6091 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6092 * thread.c (print_thread_info_1): Use
6093 scoped_restore_current_thread.
6094 (struct current_thread_cleanup): Delete.
6095 (do_restore_current_thread_cleanup)
6096 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6097 (scoped_restore_current_thread::~scoped_restore_current_thread):
6098 ... this new dtor.
6099 (make_cleanup_restore_current_thread): Rename/convert to ...
6100 (scoped_restore_current_thread::scoped_restore_current_thread):
6101 ... this new ctor.
6102 (thread_apply_all_command): Use scoped_restore_current_thread.
6103 (thread_apply_command): Use scoped_restore_current_thread.
6104 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6105 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6106
f6223dbb
PA
61072017-05-04 Pedro Alves <palves@redhat.com>
6108
6109 * thread.c (make_cleanup_restore_current_thread): Move
6110 find_thread_ptid call before the is_stopped call. Assert that the
6111 thread is found. Replace is_stopped call by checking the thread's
6112 state directly. Remove unnecessary NULL-thread check.
6113
3c3ae77e
PA
61142017-05-04 Pedro Alves <palves@redhat.com>
6115
6116 * corelow.c (thread_section_name): New class.
6117 (get_core_register_section, get_core_siginfo): Use it.
6118
45eba0ab
AA
61192017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6120
6121 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6122 (get_core_register_section): Remove xfree of NULL pointer.
6123
f81fdd35
AH
61242017-05-03 Alan Hayward <alan.hayward@arm.com>
6125
6126 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6127 * regcache.c (regcache::raw_supply_zeroed): New function.
6128 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6129
35837774
SM
61302017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6131
6132 * gdbarch.sh: Remove commented out definition of
6133 TARGET_CHAR_BIT.
6134 * gdbarch.h: Re-generate.
6135
c94fee56
SDJ
61362017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6137
6138 * configure: Regenerate.
6139
d17f7b36
SM
61402017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6141
6142 * solib-target.c (solib_target_relocate_section_addresses):
6143 Remove num_section_bases, num_bases, segment_bases variables.
6144
b560ebd6
SM
61452017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6146
6147 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6148
f2f46dfc
SM
61492017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6150
6151 * solib-target.c: Include <vector>
6152 (struct lm_info_target) <~lm_info_target>: Remove.
6153 <segment_bases, section_bases>: Change type to
6154 std::vector<CORE_ADDR>.
6155 (library_list_start_segment, library_list_start_section,
6156 library_list_end_library,
6157 solib_target_relocate_section_addresses): Adjust.
6158
a0ff9e1a
SM
61592017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6160
6161 * gdbarch.sh (software_single_step): Change return type to
6162 std::vector<CORE_ADDR>.
6163 * gdbarch.c, gdbarch.h: Re-generate.
6164 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6165 Adjust.
6166 (arm_deal_with_atomic_sequence_raw): Adjust.
6167 (thumb_get_next_pcs_raw): Adjust.
6168 (arm_get_next_pcs_raw): Adjust.
6169 (arm_get_next_pcs): Adjust.
6170 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6171 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6172 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6173 (alpha_software_single_step): Adjust.
6174 * alpha-tdep.h (alpha_software_single_step): Adjust.
6175 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6176 * arm-tdep.c (arm_software_single_step): Adjust.
6177 (arm_breakpoint_kind_from_current_state): Adjust.
6178 * arm-tdep.h (arm_software_single_step): Adjust.
6179 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6180 * cris-tdep.c (cris_software_single_step): Adjust.
6181 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6182 (micromips_deal_with_atomic_sequence): Adjust.
6183 (deal_with_atomic_sequence): Adjust.
6184 (mips_software_single_step): Adjust.
6185 * mips-tdep.h (mips_software_single_step): Adjust.
6186 * moxie-tdep.c (moxie_software_single_step): Adjust.
6187 * nios2-tdep.c (nios2_software_single_step): Adjust.
6188 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6189 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6190 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6191 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6192 * sparc-tdep.c (sparc_software_single_step): Adjust.
6193 * spu-tdep.c (spu_software_single_step): Adjust.
6194 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6195
ea480a30
SM
61962017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6197
6198 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6199 * gdbarch.h: Re-generate.
6200
d050f7d7
TW
62012017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6202
6203 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6204 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6205 * python/py-instruction.c, python/py-instruction.h: New file.
6206 * python/py-record.c: Add py-instruction.h include.
6207 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6208 gdb.RecordInstruction.
6209 * python/python-internal.h: Add gdbpy_initialize_instruction
6210 declaration.
6211 * python/python.c (do_start_initialization): Add
6212 gdbpy_initialize_instruction.
6213
14f819c8
TW
62142017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6215
6216 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6217 Remove.
6218 (btrace_func_from_recpy_func): New function.
6219 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6220 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6221 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6222 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6223 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6224 Also, use new helper functions.
6225 (btpy_list_item): Use new helper functions.
6226 (recpy_bt_function_call_history): Use new type name.
6227 (btpy_call_getset): Remove.
6228 (gdbpy_initialize_btrace): Remove code to initialize
6229 gdb.BtraceFunctionCall.
6230 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6231 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6232 recpy_bt_func_prev, recpy_bt_func_next): New export.
6233 * python/py-record.c (recpy_func_type): New static object.
6234 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6235 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6236 recpy_func_next): New function.
6237 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6238 (recpy_func_getset): New static object.
6239 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6240 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6241
0ed5da75
TW
62422017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6243
6244 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6245 (btpy_object, btpy_insn_type, btpy_new): Remove.
6246 (btpy_list_object): Use gdb.RecordInstruction type instead of
6247 gdb.BtraceInstruction type.
6248 (btrace_insn_from_recpy_insn): New function.
6249 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6250 btpy_new.
6251 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6252 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6253 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6254 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6255 instead of btpy_object.
6256 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6257 btpy_insn_data, btpy_insn_decode): Rename to ...
6258 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6259 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6260 recpy_bt_insn_decode): This. Also, use new helper functions.
6261 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6262 recpy_insn_type.
6263 (btpy_insn_getset): Remove.
6264 (gdbpy_initialize_btrace): Remove code to initialize
6265 gdb.BtraceInstruction. Use recpy_element_object.
6266 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6267 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6268 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6269 * python/py-record.c (recpy_insn_type): New static object.
6270 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6271 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6272 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6273 New function.
6274 (recpy_insn_getset): New static object.
6275 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6276 * python/py-record.h (recpy_element_object): New typedef.
6277 (recpy_insn_type, recpy_insn_new): New export.
6278
913aeadd
TW
62792017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6280
6281 * py-record-btrace.c (btpy_insn_new): Removed.
6282 (btpy_insn_or_gap_new): New function.
6283 (btpy_insn_error): Removed.
6284 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6285 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6286 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6287 btpy_insn_or_gap_new instead of btpy_insn_new.
6288 (btpy_insn_getset): Remove btpy_insn_error.
6289 * py-record.c (recpy_gap_type): New static object.
6290 (recpy_gap_object): New typedef.
6291 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6292 recpy_gap_reason_string): New function.
6293 (recpy_gap_getset): New static object.
6294 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6295 * py-record.h (recpy_gap_new): New export.
6296
a3be24ad
TW
62972017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6298
6299 * python/py-record.c (recpy_ptid): Remove.
6300 (recpy_record_getset): Remove recpy_ptid.
6301
ae20e79a
TW
63022017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6303
6304 * btrace.c (btrace_fetch): Set inferior_ptid.
6305 * python/py-record-btrace.c: Add "py-record.h" include.
6306 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6307 recpy_bt_end, recpy_bt_instruction_history,
6308 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6309 in gdb.Record object instead of current ptid.
6310 * python/py-record.c: Include new "py-record.h" file.
6311 (recpy_record_object): Moved to py-record.h.
6312 * python/py-record.h: New file.
6313
8d0050ea
TW
63142017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6315
6316 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6317 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6318 indentation.
6319
3f380b50
JB
63202017-05-01 Joel Brobecker <brobecker@adacore.com>
6321
6322 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6323 the past maintainers section.
6324
07495424
YQ
63252017-04-28 Yao Qi <yao.qi@linaro.org>
6326
6327 * infcmd.c (get_return_value): Use regcache ctor, and remove
6328 cleanup.
6329
deb1fa3e
YQ
63302017-04-28 Yao Qi <yao.qi@linaro.org>
6331 Pedro Alves <palves@redhat.com>
6332
6333 * regcache.c (regcache::regcache): New tag dispatch ctor.
6334 (do_cooked_read): Moved above.
6335 (regcache_dup): Use the tag dispatch ctor..
6336 * regcache.h (regcache): Declare ctor, delete copy ctor and
6337 assignment operator, remove friend regcache_dup.
6338
b421c83c
YQ
63392017-04-28 Yao Qi <yao.qi@linaro.org>
6340
6341 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6342 call method save instead of regcache_cpy.
6343 * regcache.h (struct regcache): Make regcache_dup a friend.
6344
ef79d9a3
YQ
63452017-04-28 Yao Qi <yao.qi@linaro.org>
6346
6347 * regcache.c (struct regcache): Move to regcache.h
6348 (regcache::arch): New method.
6349 (regcache_get_ptid): Update.
6350 (get_regcache_arch): Call arch method.
6351 (get_regcache_aspace): Call method aspace.
6352 (register_buffer): Change it to method.
6353 (regcache_save): Change it to regcache::save.
6354 (regcache_restore): Likewise.
6355 (regcache_cpy_no_passthrough): Remove the declaration.
6356 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6357 (regcache_cpy_no_passthrough): Change it to method
6358 cpy_no_passthrough.
6359 (regcache_register_status): Change it to method
6360 get_register_status.
6361 (regcache_invalidate): Change it to method invalidate.
6362 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6363 (regcache_raw_update): Change it to method raw_update.
6364 (regcache_raw_read): Likewise.
6365 (regcache_raw_read_signed): Likewise.
6366 (regcache_raw_read_unsigned): Likewise.
6367 (regcache_raw_write_signed): Likewise.
6368 (regcache_raw_write_unsigned): Likewise.
6369 (regcache_cooked_read): Likewise.
6370 (regcache_cooked_read_value): Likewise.
6371 (regcache_cooked_read_signed): Likewise.
6372 (regcache_cooked_read_unsigned): Likewise.
6373 (regcache_cooked_write_signed): Likewise.
6374 (regcache_cooked_write_unsigned): Likewise.
6375 (regcache_raw_set_cached_value): Likewise.
6376 (regcache_raw_write): Likewise.
6377 (regcache_cooked_write): Likewise.
6378 (regcache_xfer_part): Likewise.
6379 (regcache_raw_read_part): Likewise.
6380 (regcache_raw_write_part): Likewise.
6381 (regcache_cooked_read_part): Likewise.
6382 (regcache_cooked_write_part): Likewise.
6383 (regcache_raw_supply): Likewise.
6384 (regcache_raw_collect): Likewise.
6385 (regcache_transfer_regset): Likewise.
6386 (regcache_supply_regset): Likewise.
6387 (regcache_collect_regset): Likewise.
6388 (regcache_debug_print_register): Likewise.
6389 (enum regcache_dump_what): Move it to regcache.h.
6390 (regcache_dump): Change it to method dump.
6391 * regcache.h (enum regcache_dump_what): New.
6392 (class regcache): New.
6393 * target.c (target_fetch_registers): Call method
6394 debug_print_register.
6395 (target_store_registers): Likewise.
6396
f8fdb78e
SM
63972017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6398
6399 * windows-nat.c (struct lm_info_windows): Initialize field.
6400 (windows_make_so): Allocate lm_info_windows with new.
6401 (windows_free_so): Free lm_info_windows with delete.
6402
9ccbfd7b
SM
64032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6406 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6407 cleanup.
6408 (darwin_free_so): Free lm_info_darwin with delete.
6409
76e75227
SM
64102017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6411
6412 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6413 <l_addr_p>: Change type to bool.
6414 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6415 (svr4_free_so): Free lm_info_svr4 with delete.
6416 (svr4_copy_library_list): Replace memcpy with call to copy
6417 constructor.
6418 (library_list_start_library, svr4_default_sos): Allocate
6419 lm_info_svr4 with new.
6420
51046d9e
SM
64212017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6422
6423 * solib-target.c (struct lm_info_target): Add destructor,
6424 initialize fields.
6425 <name>: Change type to std::string.
6426 (library_list_start_library): Allocate lm_info_target with new.
6427 (solib_target_free_library_list): Free lm_info_target with
6428 delete.
6429 (solib_target_current_sos): Adapt to std::string.
6430 (solib_target_free_so): Free lm_info_target with delete.
6431
4023ae76
SM
64322017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6433
6434 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6435 fields.
6436 (frv_current_sos): Allocate lm_info_frv with new.
6437 (frv_relocate_main_executable): Free lm_info_frv with delete,
6438 allocate with new.
6439 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6440
af43057b
SM
64412017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6442
6443 * solib-frv.c (struct lm_info_frv): Fix indentation.
6444
b0911207
SM
64452017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6448 map field.
6449 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6450 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6451 and allocate with new.
6452 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6453
6c401f72
SM
64542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6455
6456 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6457 <filename, member_name>: Change type to std::string.
6458 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6459 (library_list_start_library): Allocate lm_info_aix with new.
6460 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6461 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6462 with copy constructor.
6463
d0e449a1
SM
64642017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6465
6466 * solist.h (struct lm_info): Remove.
6467 (struct lm_info_base): New class.
6468 (struct so_list) <lm_info>: Change type to lm_info_base *.
6469 * nto-tdep.c (struct lm_info): Remove.
6470 (lm_addr): Adjust.
6471 * solib-aix.c (struct lm_info): Rename to ...
6472 (struct lm_info_aix): ... this. Extend lm_info_base.
6473 (lm_info_p): Rename to ...
6474 (lm_info_aix_p): ... this, and adjust.
6475 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6476 solib_aix_parse_libraries, library_list_start_library,
6477 solib_aix_free_library_list, solib_aix_parse_libraries,
6478 solib_aix_get_library_list,
6479 solib_aix_relocate_section_addresses, solib_aix_free_so,
6480 solib_aix_get_section_offsets,
6481 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6482 Adjust.
6483 (struct solib_aix_inferior_data) <library_list>: Adjust.
6484 * solib-darwin.c (struct lm_info): Rename to ...
6485 (struct lm_info_darwin): ... this. Extend lm_info_base.
6486 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6487 * solib-dsbt.c (struct lm_info): Rename to ...
6488 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6489 (struct dsbt_info) <main_executable_lm_info): Adjust.
6490 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6491 dsbt_relocate_section_addresses): Adjust.
6492 * solib-frv.c (struct lm_info): Rename to ...
6493 (struct lm_info_frv): ... this. Extend lm_info_base.
6494 (main_executable_lm_info): Adjust.
6495 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6496 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6497 find_canonical_descriptor_in_load_object,
6498 frv_fdpic_find_canonical_descriptor): Adjust.
6499 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6500 to lm_info_svr4.
6501 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6502 svr4_clear_so, svr4_copy_library_list,
6503 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6504 svr4_current_sos, svr4_fetch_objfile_link_map,
6505 solist_update_incremental): Adjust.
6506 * solib-svr4.h (struct lm_info_svr4): Move here from
6507 solib-svr4.c.
6508 * solib-target.c (struct lm_info): Rename to ...
6509 (struct lm_info_target): ... this. Extend lm_info_base.
6510 (lm_info_p): Rename to ...
6511 (lm_info_target_p): ... this.
6512 (solib_target_parse_libraries, library_list_start_segment,
6513 library_list_start_section, library_list_start_library,
6514 library_list_end_library, solib_target_free_library_list,
6515 solib_target_current_sos, solib_target_free_so,
6516 solib_target_relocate_section_addresses): Adjust.
6517 * windows-nat.c (struct lm_info): Rename to ...
6518 (struct lm_info_windows): ... this. Extend lm_info_base.
6519 (windows_make_so, handle_load_dll, handle_unload_dll,
6520 windows_xfer_shared_libraries): Adjust.
6521
434a4023
SM
65222017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6523
6524 * solib-darwin.c (struct darwin_so_list): Remove.
6525 (darwin_current_sos): Allocate an so_list object instead of a
6526 darwin_so_list, separately allocate an lm_info object.
6527 (darwin_free_so): Free lm_info.
6528
428544e8
JB
65292017-04-28 John Baldwin <jhb@FreeBSD.org>
6530
6531 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6532 with fprintf_filtered.
6533
4621115f
YQ
65342017-04-28 Yao Qi <yao.qi@linaro.org>
6535
6536 * regcache.c (regcache::regcache): New function.
6537 (regcache::~regcache): New function.
6538 (regcache_xmalloc_1): Remove.
6539 (regcache_xmalloc): Call new regcache.
6540 (regcache_xfree): Call delete regcache.
6541 (get_thread_arch_aspace_regcache): Call new regcache.
6542
339053c2
YQ
65432017-04-28 Yao Qi <yao.qi@linaro.org>
6544
6545 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6546 lwp instead of ptid_get_lwp.
6547
7974a605
YQ
65482017-04-28 Yao Qi <yao.qi@linaro.org>
6549
6550 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6551 lwp_info instead of getting from inferior_ptid.
6552
e15c3eb4
KS
65532017-04-27 Keith Seitz <keiths@redhat.com>
6554
6555 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6556 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6557 (CV_CONVERSION_BADNESS): Define.
6558 (rank_one_type): Remove overly restrictive rvalue reference
6559 rank checks.
6560 Add cv-qualifier checks and subranks for type equality.
6561 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6562 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6563 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6564
72bc1d24
SM
65652017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6566
6567 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6568 count when creating the object.
6569
55bcecda
UW
65702017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6571 Ulrich Weigand <uweigand@de.ibm.com>
6572
6573 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6574 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6575 is used in AIX.
6576 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6577 (process_xcoff_symbol): Likewise.
6578 (scan_xcoff_symtab): Likewise.
6579
5c99fcf8
AH
65802017-04-26 Alan Hayward <alan.hayward@arm.com>
6581
6582 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6583 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6584 (ia64_access_reg): Use get_frame_register_unsigned.
6585 (ia64_access_rse_reg): Likewise.
6586 (ia64_libunwind_frame_prev_register): Likewise.
6587
b41c5a85
JW
65882017-04-26 Jiong Wang <jiong.wang@arm.com>
6589
6590 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6591 * gdbarch.c: Regenerated.
6592 * gdbarch.h: Regenerated.
6593 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6594 visibility external.
6595 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6596 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6597 (enum cfa_how_kind): Move to ...
6598 (struct dwarf2_frame_state_reg_info): Likewise.
6599 (struct dwarf2_frame_state): Likewise.
6600 * dwarf2-frame.h: ... here.
6601 (dwarf2_frame_state_alloc_regs): New declaration.
6602 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6603 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6604
c185f580
AH
66052017-04-26 Alan Hayward <alan.hayward@arm.com>
6606
6607 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6608 regcache_raw_read_unsigned.
6609 (xtensa_pseudo_register_write): Likewise.
6610
19c45594
AH
66112017-04-26 Alan Hayward <alan.hayward@arm.com>
6612
6613 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6614 (nds32_pseudo_register_write): Likewise.
6615
4658f12e
YQ
66162017-04-25 Yao Qi <yao.qi@linaro.org>
6617
6618 * regcache.c (struct regcache) <readonly_p>: Change its type
6619 to bool.
6620 (regcache_xmalloc_1): Update parameter type and callers update.
6621
d581dda8
YQ
66222017-04-25 Yao Qi <yao.qi@linaro.org>
6623
6624 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6625 set_gdbarch_wchar_bit.
6626 * arm-tdep.c (arm_gdbarch_init): Likewise.
6627
debed3db
PA
66282017-04-25 Pedro Alves <palves@redhat.com>
6629
6630 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6631 (BothAreRelocatable, memcopy, memmove): Don't define.
6632 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6633 macros.
6634
b0b92aeb
PA
66352017-04-25 Pedro Alves <palves@redhat.com>
6636
6637 * common/common-defs.h: Include "common/poison.h".
6638 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6639 and adjust.
6640 * common/poison.h: New file.
6641 * common/traits.h: Include <type_traits>.
6642 (Not, Or, Requires): New, moved from common/function-view.h.
6643
16c4d54a
PA
66442017-04-25 Pedro Alves <palves@redhat.com>
6645
6646 * breakpoint.h (struct breakpoint): In-class initialize all
6647 fields. Make boolean fields "bool".
6648 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6649 memset call and initializations no longer necessary.
6650
b5c36682
PA
66512017-04-25 Pedro Alves <palves@redhat.com>
6652
6653 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6654 reference.
6655 (pt_btrace_insn): New function.
6656 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6657
5625a286
PA
66582017-04-25 Pedro Alves <palves@redhat.com>
6659
6660 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6661 "base" field and inherit from "bp_location" instead. Add
6662 non-default ctor.
6663 (allocate_location_exception): Use new non-default ctor.
6664 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6665 (init_bp_location): Convert to ...
6666 (bp_location::bp_location): ... this new ctor, and remove memset
6667 call.
6668 (base_breakpoint_allocate_location): Use the new non-default ctor.
6669 * breakpoint.h (bp_location): Now a class. Declare default and
6670 non-default ctors. In-class initialize all members.
6671 (init_bp_location): Remove declaration.
6672
23bcc18f
PA
66732017-04-25 Pedro Alves <palves@redhat.com>
6674
6675 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6676 assignment operator.
6677
e1ba3053
YQ
66782017-04-24 Yao Qi <yao.qi@linaro.org>
6679
6680 * doublest.c (convert_doublest_to_floatformat): Call
6681 floatformat_totalsize_bytes.
6682
10f489e5
TT
66832017-04-22 Tom Tromey <tom@tromey.com>
6684
6685 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6686 ui_out_emit_list.
6687 * stack.c (print_frame): Use ui_out_emit_list.
6688 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6689 ui_out_emit_list.
6690 * mi/mi-main.c (print_one_inferior)
6691 (mi_cmd_data_list_register_names)
6692 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6693 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6694 ui_out_emit_list.
6695 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6696 (mi_output_solib_attribs): Use ui_out_emit_list,
6697 ui_out_emit_tuple.
6698 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6699 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6700 (mi_cmd_stack_list_args, list_args_or_locals): Use
6701 ui_out_emit_list.
6702 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6703 * breakpoint.c (print_solib_event, output_thread_groups): Use
6704 ui_out_emit_list.
6705
0092b74d
TT
67062017-04-22 Tom Tromey <tom@tromey.com>
6707
6708 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6709 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6710 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6711
a14a62dd
TT
67122017-04-22 Tom Tromey <tom@tromey.com>
6713
6714 * tracepoint.c (tvariables_info_1)
6715 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6716
46b9c129
TT
67172017-04-22 Tom Tromey <tom@tromey.com>
6718
6719 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6720 annotate_arg_emitter.
6721 * breakpoint.c (print_mention_watchpoint)
6722 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6723 * annotate.h (struct annotate_arg_emitter): New.
6724
2e783024
TT
67252017-04-22 Tom Tromey <tom@tromey.com>
6726
6727 * record-btrace.c (record_btrace_insn_history)
6728 (record_btrace_insn_history_range, record_btrace_call_history)
6729 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6730 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6731 ui_out_emit_tuple.
6732 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6733 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6734 * skip.c (skip_info): Use ui_out_emit_tuple.
6735 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6736 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6737 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6738 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6739 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6740 ui_out_emit_tuple.
6741 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6742 (output_register, mi_cmd_data_read_memory)
6743 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6744 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6745 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6746 Use ui_out_emit_tuple.
6747 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6748 ui_out_emit_tuple.
6749 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6750 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6751 * linux-thread-db.c (info_auto_load_libthread_db): Use
6752 ui_out_emit_tuple.
6753 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6754 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6755 * disasm.c (do_mixed_source_and_assembly_deprecated)
6756 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6757 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6758 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6759 * breakpoint.c (print_one_breakpoint_location)
6760 (print_one_breakpoint): Use ui_out_emit_tuple.
6761 * auto-load.c (print_script, info_auto_load_cmd): Use
6762 ui_out_emit_tuple.
6763 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6764
9be21bb4
SM
67652017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6766
6767 * thread.c (print_thread_info_1): Remove dead code.
6768
0d4c07af
JK
67692017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6770
6771 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6772 GDB_SELF_TEST.
6773 * arm-tdep.c (selftests::arm_record_test): Likewise.
6774
4daf993d
YQ
67752017-04-21 Yao Qi <yao.qi@linaro.org>
6776
6777 * regcache.c (regcache_restore): Remove argument 2. Replace
6778 argument 3 with regcache. Get register status from
6779 src->register_status and get register contents from
6780 register_buffer (src, regnum).
6781 (regcache_cpy): Update.
6782
a6c21d4a
PA
67832017-04-19 Pedro Alves <palves@redhat.com>
6784
6785 * gdbthread.h (thread): Add missing closing parenthesis in
6786 comment.
6787
3a3fd0fd
PA
67882017-04-19 Pedro Alves <palves@redhat.com>
6789
6790 * common/refcounted-object.h: New file.
6791 * gdbthread.h: Include "common/refcounted-object.h".
6792 (thread_info): Inherit from refcounted_object and add comments.
6793 (thread_info::incref, thread_info::decref)
6794 (thread_info::m_refcount): Delete.
6795 (thread_info::deletable): Use the refcounted_object::refcount()
6796 method.
6797 * inferior.c (current_inferior_): Add comment.
6798 (set_current_inferior): Increment/decrement refcounts.
6799 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6800 not-deletable instead of comparing with the current inferior.
6801 (initialize_inferiors): Increment the initial inferior's refcount.
6802 * inferior.h (struct inferior): Forward declare.
6803 Include "common/refcounted-object.h".
6804 (current_inferior, set_current_inferior): Move declaration to
6805 before struct inferior's definition, and fix comment.
6806 (inferior): Inherit from refcounted_object. Add comments.
6807 * thread.c (switch_to_thread_no_regs): Reference the thread's
6808 inferior pointer directly instead of doing a ptid lookup.
6809 (switch_to_no_thread): New function.
6810 (switch_to_thread(thread_info *)): New function, factored out
6811 from ...
6812 (switch_to_thread(ptid_t)): ... this.
6813 (restore_current_thread): Delete.
6814 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6815 fields, and add 'inf' field.
6816 (do_restore_current_thread_cleanup): Check whether old->inf is
6817 alive instead of looking up an inferior by ptid. Use
6818 switch_to_thread and switch_to_no_thread.
6819 (restore_current_thread_cleanup_dtor): Use old->inf directly
6820 instead of lookup up an inferior by id. Decref the inferior.
6821 Don't restore 'removable'.
6822 (make_cleanup_restore_current_thread): Same the inferior pointer
6823 in old, instead of the inferior number. Incref the inferior.
6824 Don't save/clear 'removable'.
6825
9bcb1f16
PA
68262017-04-19 Pedro Alves <palves@redhat.com>
6827
6828 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6829 unittests/scoped_restore-selftests.c.
6830 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6831 * common/scoped_restore.h (scoped_restore_base): Make "class".
6832 (scoped_restore_base::release): New public method.
6833 (scoped_restore_base::scoped_restore_base): New protected ctor.
6834 (scoped_restore_base::m_saved_var): New protected field.
6835 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6836 scoped_restore_base base class instead of m_saved_var directly.
6837 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6838 (scoped_restore_tmpl::scoped_restore_tmpl(const
6839 scoped_restore_tmpl<T>&)): Likewise.
6840 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6841 method.
6842 (scoped_restore_tmpl::saved_var): New method.
6843 (scoped_restore_tmpl::m_saved_var): Delete.
6844 * inferior.h (inferior::detaching): Now a bool.
6845 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6846 cleanup.
6847 * unittests/scoped_restore-selftests.c: New file.
6848
26fcd539
PA
68492017-04-19 Pedro Alves <palves@redhat.com>
6850
6851 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6852 Re-sort in alphabetic order.
6853
fdd243b0
PA
68542017-04-18 Pedro Alves <palves@redhat.com>
6855
6856 * xml-support.c (obstack_xml_printf): Delete.
6857 * xml-support.h (obstack_xml_printf): Delete.
6858
4895cde2
PA
68592017-04-18 Pedro Alves <palves@redhat.com>
6860
6861 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6862 vdebug, verror, body_text, start_element, end_element, name,
6863 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6864 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6865 is_xinclude>: Make private and add m_ prefix.
6866 (gdb_xml_parser::body_text): New method, based on ...
6867 (gdb_xml_body_text): ... this. Adjust.
6868 (gdb_xml_parser::vdebug): New method, based on ...
6869 (gdb_xml_debug): ... this. Adjust.
6870 (gdb_xml_parser::verror): New method, based on ...
6871 (gdb_xml_error): ... this. Adjust.
6872 (gdb_xml_parser::start_element): New method, based on ...
6873 (gdb_xml_start_element): ... this. Adjust.
6874 (gdb_xml_start_element_wrapper): Defer to
6875 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6876 (gdb_xml_parser::end_element): New method, based on ...
6877 (gdb_xml_end_element_wrapper): ... this. Adjust.
6878 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6879 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6880 (gdb_xml_parser::use_dtd): New method, based on ...
6881 (gdb_xml_use_dtd): ... this. Adjust.
6882 (gdb_xml_parser::parse): New method, based on ...
6883 (gdb_xml_parse): ... this. Adjust.
6884 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6885 (xinclude_start_include): Adjust to call the parser's name method.
6886 (xml_xinclude_default, xml_xinclude_start_doctype)
6887 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6888 method.
6889 (xml_process_xincludes): Adjust to call parser methods.
6890 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6891 declarations.
6892
bd8a901f
PA
68932017-04-18 Pedro Alves <palves@redhat.com>
6894
6895 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6896 gdb::optional<std::string>.
6897 * xml-support.c: Include <string>.
6898 (scope_level::scope_level(scope_level &&))
6899 (scope_level::~scope_level): Delete.
6900 (scope_level::body): Now a std::string.
6901 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6902 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6903 parameter.
6904 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6905 (xinclude_parsing_data::output): Now a std::string reference.
6906 (xinclude_start_include): Adjust.
6907 (xml_xinclude_default): Adjust.
6908 (xml_process_xincludes): Add 'output' parameter, and return bool.
6909 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6910 and return bool.
6911 * xml-tdesc.c: Include <unordered_map> and <string>.
6912 (tdesc_xml_cache): Delete.
6913 (tdesc_xml_cache_s): Delete.
6914 (xml_cache): Now an std::unordered_map.
6915 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6916 (target_fetch_description_xml): Change return type to
6917 gdb::optional<std::string>, and adjust.
6918 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6919 (target_fetch_description_xml): Change return type to
6920 gdb::optional<std::string>.
6921
d35d1958
PA
69222017-04-18 Pedro Alves <palves@redhat.com>
6923
6924 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6925 unittests/optional-selftests.c.
6926 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6927 * unittests/optional-selftests.c: New file.
6928 * unittests/optional/assignment/1.cc: New file.
6929 * unittests/optional/assignment/2.cc: New file.
6930 * unittests/optional/assignment/3.cc: New file.
6931 * unittests/optional/assignment/4.cc: New file.
6932 * unittests/optional/assignment/5.cc: New file.
6933 * unittests/optional/assignment/6.cc: New file.
6934 * unittests/optional/assignment/7.cc: New file.
6935 * unittests/optional/cons/copy.cc: New file.
6936 * unittests/optional/cons/default.cc: New file.
6937 * unittests/optional/cons/move.cc: New file.
6938 * unittests/optional/cons/value.cc: New file.
6939 * unittests/optional/in_place.cc: New file.
6940 * unittests/optional/observers/1.cc: New file.
6941 * unittests/optional/observers/2.cc: New file.
6942
22796e97
PA
69432017-04-18 Pedro Alves <palves@redhat.com>
6944
6945 * common/gdb_optional.h: Include common/traits.h.
6946 (in_place_t): New type.
6947 (in_place): New constexpr variable.
6948 (optional::optional): Remove member initialization of
6949 m_instantiated.
6950 (optional::optional(in_place_t...)): New constructor.
6951 (optional::~optional): Use reset.
6952 (optional::optional(const optional&)): New.
6953 (optional::optional(const optional&&)): New.
6954 (optional::optional(T &)): New.
6955 (optional::optional(T &&)): New.
6956 (operator::operator=(const optional &)): New.
6957 (operator::operator=(optional &&)): New.
6958 (operator::operator= (const T &))
6959 (operator::operator= (T &&))
6960 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6961 (operator::reset): New.
6962 (operator::m_instantiated):: Add in-class initializer.
6963 * common/traits.h: Include <type_traits>.
6964 (struct And): New types.
6965
a7fc9b61
PA
69662017-04-18 Pedro Alves <palves@redhat.com>
6967
6968 * xml-support.c: Include <vector>.
6969 (scope_level::scope_level(const gdb_xml_element *))
6970 (scope_level::scope_level(scope_level&&)): New.
6971 (scope_level::~scope_level): New.
6972 (scope_level_s): Delete.
6973 (gdb_xml_parser::scopes): Now a std::vector.
6974 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6975 Use std::vector.
6976 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6977 scope cleanup code.
6978 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6979 of the scopes member. Use std::vector::emplace_back.
6980
010151c9
PA
69812017-04-18 Pedro Alves <palves@redhat.com>
6982
6983 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6984 a bool.
6985 (gdb_xml_end_element): Change type of first parameter.
6986 (gdb_xml_cleanup): Rename to ...
6987 (gdb_xml_parser::~gdb_xml_parser): ... this.
6988 (gdb_xml_create_parser_and_cleanup): Delete with ...
6989 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6990 to this new ctor.
6991 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6992 using gdb_xml_create_parser_and_cleanup.
6993 (xinclude_parsing_data): Add ctor/dtor.
6994 (xml_xinclude_cleanup): Delete.
6995 (xml_process_xincludes): Create a local xinclude_parsing_data
6996 instead of heap-allocating one. Create a local gdb_xml_parser
6997 instead of heap-allocating one with
6998 gdb_xml_create_parser_and_cleanup.
6999
d56060f0
JB
70002017-04-18 John Baldwin <jhb@FreeBSD.org>
7001
7002 PR threads/20743
7003 * fbsd-nat.c (resume_one_thread_cb): Remove.
7004 (resume_all_threads_cb): Remove.
7005 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7006 iterate_over_threads.
7007
305d16a9
JB
70082017-04-17 Joel Brobecker <brobecker@adacore.com>
7009
7010 * NEWS: Create a new section for the next release branch.
7011 Rename the section of the current branch, now that it has
7012 been cut.
7013
8bb57231
JB
70142017-04-17 Joel Brobecker <brobecker@adacore.com>
7015
7016 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7017 * version.in: Bump version to 8.0.50.DATE-git.
7018
096c92dd
SDJ
70192017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7020
7021 PR gdb/21385
7022 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7023 independently of the host, and fix build breakage on Cygwin.
7024
0550c955
PA
70252017-04-13 Pedro Alves <palves@redhat.com>
7026
7027 * inferior.c (free_inferior): Convert to ...
7028 (inferior::~inferior): ... this dtor.
7029 (inferior::inferior): New ctor, factored out from ...
7030 (add_inferior_silent): ... here. Allocate the inferior with a new
7031 expression.
7032 (delete_inferior): Call delete instead of free_inferior.
7033 * inferior.h (gdb_environ, continuation): Forward declare.
7034 (inferior): Now a class. Add in-class initialization to all
7035 members. Make boolean fields bool, except 'detaching'.
7036 (inferior::inferior): New explicit ctor.
7037 (inferior::~inferior): New.
7038
e3d60dfc
PA
70392017-04-13 Pedro Alves <palves@redhat.com>
7040
7041 * inferior.c (init_inferior_list): Delete.
7042 * inferior.h (init_inferior_list): Delete.
7043
5fd69d0a
PA
70442017-04-13 Pedro Alves <palves@redhat.com>
7045
7046 PR threads/13217
7047 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7048 (top level): Call it twice, with different thread sets.
7049
c6609450
PA
70502017-04-13 Pedro Alves <palves@redhat.com>
7051
7052 * thread.c: Include <algorithm>.
7053 (thread_array_cleanup): Delete.
7054 (scoped_inc_dec_ref): New class.
7055 (live_threads_count): New function.
7056 (set_thread_refcount): Delete.
7057 (tp_array_compar_ascending): Now a bool.
7058 (tp_array_compar): Convert to a std::sort comparison function.
7059 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7060 and live_threads_count.
7061
2a00d7ce
PA
70622017-04-13 Pedro Alves <palves@redhat.com>
7063
7064 * infrun.c (follow_fork_inferior): Also switch the current
7065 inferior.
7066
441d7c93
PA
70672017-04-13 Pedro Alves <palves@redhat.com>
7068
7069 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7070 before calling create_internal_breakpoint.
7071
808480f6
PA
70722017-04-13 Pedro Alves <palves@redhat.com>
7073
7074 * fork-child.c (execv_argv): New class.
7075 (breakup_args): Refactored as ...
7076 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7077 Copy arguments to storage and replace separators with NULL
7078 terminators in place.
7079 (escape_bang_in_quoted_argument): Adjust to return bool.
7080 (execv_argv::execv_argv): New ctor.
7081 (execv_argv::init_for_shell): New method, factored out from
7082 fork_inferior. Don't strdup strings into the vector.
7083 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7084 Remove free_vector_argv call.
7085
ad3d022a
YQ
70862017-04-13 Yao Qi <yao.qi@linaro.org>
7087
7088 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7089 tdep->rx_psw_type.
7090
e6ddc3bf
YQ
70912017-04-13 Yao Qi <yao.qi@linaro.org>
7092
7093 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7094 * rx-tdep.c (rx_gdbarch_init): Likewise.
7095
bfb8cf90
PA
70962017-04-13 Pedro Alves <palves@redhat.com>
7097
7098 * breakpoint.h (struct breakpoint): Reindent.
7099
f5336ca5
PA
71002017-04-13 Pedro Alves <palves@redhat.com>
7101
7102 * breakpoint.c (bp_location): Rename to ...
7103 (bp_locations): ... this. All references updated.
7104 (bp_location_count): Rename to ...
7105 (bp_locations_count): ... this. All references updated.
7106 (bp_location_placed_address_before_address_max): Rename to ...
7107 (bp_locations_placed_address_before_address_max): ... this. All
7108 references updated.
7109 (bp_location_shadow_len_after_address_max): Rename to ...
7110 (bp_locations_shadow_len_after_address_max): ... this. All
7111 references updated.
7112 (bp_location_compare_addrs): Rename to ...
7113 (bp_locations_compare_addrs): ... this. All references updated.
7114 (bp_location_compare):Rename to ...
7115 (bp_locations_compare): ... this. All references updated.
7116 (bp_location_target_extensions_update): Rename to ...
7117 (bp_locations_target_extensions_update): ... this. All references
7118 updated.
7119
be628ab8
SDJ
71202017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7121
7122 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7123 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7124 'sgtty.h'.
7125 * common/gdb_termios.h: New file, with parts of "terminal.h".
7126 * inflow.c: Include "gdb_termios.h".
7127 * ser-unix.c: Include "gdb_termios.h".
7128 * terminal.h: Move terminal-related defines to
7129 "common/gdb_termios.h".
7130
8e9e35b1
TT
71312017-04-12 Tom Tromey <tom@tromey.com>
7132
7133 * probe.c (parse_probes): Update.
7134 * location.h (delete_event_location): Don't declare.
7135 (event_location_deleter::operator()): Update.
7136 * location.c (event_location_deleter::operator()): Rename from
7137 delete_event_location.
7138 * linespec.h (linespec_result) <location>: Change type to
7139 event_location_up.
7140 * linespec.c (canonicalize_linespec, event_location_to_sals)
7141 (decode_objc): Update.
7142 (linespec_result): Don't call delete_event_location.
7143 * breakpoint.c (create_breakpoints_sal)
7144 (bkpt_probe_create_sals_from_location)
7145 (strace_marker_create_sals_from_location): Update.
7146
16e802b9
TT
71472017-04-12 Tom Tromey <tom@tromey.com>
7148
7149 * linespec.h (struct linespec_result): Add constructor and
7150 destructor.
7151 (init_linespec_result, destroy_linespec_result)
7152 (make_cleanup_destroy_linespec_result): Don't declare.
7153 * linespec.c (init_linespec_result): Remove.
7154 (linespec_result::~linespec_result): Rename from
7155 destroy_linespec_result. Update.
7156 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7157 Remove.
7158 * breakpoint.c (create_breakpoint, break_range_command)
7159 (decode_location_default): Update.
7160 * ax-gdb.c (agent_command_1): Update.
7161
d28cd78a
TT
71622017-04-12 Tom Tromey <tom@tromey.com>
7163
7164 * remote.c (remote_download_tracepoint): Update.
7165 * python/py-breakpoint.c (bppy_get_location): Update.
7166 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7167 (gdbscm_breakpoint_location): Update.
7168 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7169 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7170 Change type to event_location_up.
7171 * breakpoint.c (create_overlay_event_breakpoint)
7172 (create_longjmp_master_breakpoint)
7173 (create_std_terminate_master_breakpoint)
7174 (create_exception_master_breakpoint)
7175 (breakpoint_event_location_empty_p, print_breakpoint_location)
7176 (print_one_breakpoint_location, create_thread_event_breakpoint)
7177 (init_breakpoint_sal, create_breakpoint)
7178 (print_recreate_ranged_breakpoint, break_range_command)
7179 (init_ada_exception_breakpoint, say_where): Update.
7180 (base_breakpoint_dtor): Don't call delete_event_location.
7181 (bkpt_print_recreate, tracepoint_print_recreate)
7182 (dprintf_print_recreate, update_static_tracepoint)
7183 (breakpoint_re_set_default): Update.
7184
711799d5
TT
71852017-04-12 Tom Tromey <tom@tromey.com>
7186
7187 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7188 type of "to_do". Update.
7189 (compute_stack_depth): Use std::vector.
7190
52d214d3
TT
71912017-04-12 Tom Tromey <tom@tromey.com>
7192
7193 * printcmd.c (find_instruction_backward): Use std::vector.
7194
4c404b8b
TT
71952017-04-12 Tom Tromey <tom@tromey.com>
7196
7197 * symfile.c (objfilep): Remove typedef.
7198 (reread_symbols): Use a std::vector.
7199
156d9eab
TT
72002017-04-12 Tom Tromey <tom@tromey.com>
7201
7202 * mi/mi-main.c (exec_direction_forward): Remove.
7203 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7204 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7205 scoped_restore.
7206 * guile/guile.c (guile_repl_command, guile_command)
7207 (gdbscm_execute_gdb_command): Use scoped_restore.
7208 * go-exp.y (go_parse): Use scoped_restore.
7209 * d-exp.y (d_parse): Use scoped_restore.
7210 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7211 * c-exp.y (c_parse): Use scoped_restore.
7212
4d89769a
TT
72132017-04-12 Tom Tromey <tom@tromey.com>
7214
7215 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7216 (mi_parse): Update return type.
7217 (mi_parse_free): Remove.
7218 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7219 (mi_parse::~mi_parse): Rename from mi_parse_free.
7220 (mi_parse_cleanup): Remove.
7221 (mi_parse): Return a unique_ptr. Use new.
7222 * mi/mi-main.c (mi_execute_command): Update.
7223
4b217cc7
TT
72242017-04-12 Tom Tromey <tom@tromey.com>
7225
7226 * location.c (explicit_location_lex_one): Return a
7227 unique_xmalloc_ptr.
7228 (string_to_explicit_location): Update. Remove cleanups.
7229
59d3651b
TT
72302017-04-12 Tom Tromey <tom@tromey.com>
7231
7232 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7233 (compare_value_and_voffset): Change type. Update.
7234 (compute_vtable_size): Change type of "offset_vec".
7235 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7236 (gnuv3_get_typeid): Remove extraneous declaration.
7237
b24b0d6c
TT
72382017-04-12 Tom Tromey <tom@tromey.com>
7239
7240 * charset.h (wchar_iterator): Fix comment.
7241
80a3b8c5
TT
72422017-04-12 Tom Tromey <tom@tromey.com>
7243
7244 * charset.c (iconv_wrapper): New class.
7245 (cleanup_iconv): Remove.
7246 (convert_between_encodings): Use it.
7247
c83dd867
TT
72482017-04-12 Tom Tromey <tom@tromey.com>
7249
7250 * symfile.h (increment_reading_symtab): Update type.
7251 * symfile.c (decrement_reading_symtab): Remove.
7252 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7253 * psymtab.c (psymtab_to_symtab): Update.
7254 * dwarf2read.c (dw2_instantiate_symtab): Update.
7255
0e8621a0
TT
72562017-04-12 Tom Tromey <tom@tromey.com>
7257
7258 * jit.c (struct jit_reader): Declare separately. Add constructor
7259 and destructor. Change type of "handle".
7260 (loaded_jit_reader): Define separately.
7261 (jit_reader_load): Update. New "new".
7262 (jit_reader_unload_command): Use "delete".
7263 * gdb-dlfcn.h (struct dlclose_deleter): New.
7264 (gdb_dlhandle_up): New typedef.
7265 (gdb_dlopen, gdb_dlsym): Update types.
7266 (gdb_dlclose): Remove.
7267 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7268 (gdb_dlsym): Change type of "handle".
7269 (make_cleanup_dlclose): Remove.
7270 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7271 * compile/compile-c-support.c (load_libcc): Update.
7272
67d89901
TT
72732017-04-12 Tom Tromey <tom@tromey.com>
7274
7275 * symtab.h (find_pcs_for_symtab_line): Change return type.
7276 * symtab.c (find_pcs_for_symtab_line): Change return type.
7277 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7278 type of "vec". Update.
7279 (ltpy_get_pcs_for_line): Update.
7280 * linespec.c (decode_digits_ordinary): Update.
7281
93921405
TT
72822017-04-12 Tom Tromey <tom@tromey.com>
7283
7284 * tracepoint.c (actions_command): Update.
7285 * python/python.c (python_command, python_interactive_command):
7286 Update.
7287 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7288 * guile/guile.c (guile_command): Update.
7289 * defs.h (read_command_lines, read_command_lines_1): Return
7290 command_line_up.
7291 (command_lines_deleter): New struct.
7292 (command_line_up): New typedef.
7293 * compile/compile.c (compile_code_command)
7294 (compile_print_command): Update.
7295 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7296 command_line_up.
7297 (make_cleanup_free_command_lines): Remove.
7298 * cli/cli-script.c (get_command_line, read_command_lines_1)
7299 (copy_command_lines): Return command_line_up.
7300 (while_command, if_command, read_command_lines, define_command)
7301 (document_command): Update.
7302 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7303 Remove.
7304 * breakpoint.h (breakpoint_set_commands): Change type of
7305 "commands".
7306 * breakpoint.c (breakpoint_set_commands): Change type of
7307 "commands". Update.
7308 (do_map_commands_command, update_dprintf_command_list)
7309 (create_tracepoint_from_upload): Update.
7310
ffc2605c
TT
73112017-04-12 Tom Tromey <tom@tromey.com>
7312
7313 * tracepoint.c (scope_info): Update.
7314 * spu-tdep.c (spu_catch_start): Update.
7315 * python/python.c (gdbpy_decode_line): Update.
7316 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7317 * python/py-breakpoint.c (bppy_init): Update.
7318 * probe.c (parse_probes): Update.
7319 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7320 * location.h (event_location_deleter): New struct.
7321 (event_location_up): New typedef.
7322 (new_linespec_location, new_address_location, new_probe_location)
7323 (new_explicit_location, copy_event_location)
7324 (string_to_event_location, string_to_event_location_basic)
7325 (string_to_explicit_location): Update return type.
7326 (make_cleanup_delete_event_location): Remove.
7327 * location.c (new_linespec_location, new_address_location)
7328 (new_probe_location, new_explicit_location, copy_event_location):
7329 Return event_location_up.
7330 (delete_event_location_cleanup)
7331 (make_cleanup_delete_event_location): Remove.
7332 (string_to_explicit_location, string_to_event_location_basic)
7333 (string_to_event_location): Return event_location_up.
7334 * linespec.c (canonicalize_linespec, event_location_to_sals)
7335 (decode_line_with_current_source)
7336 (decode_line_with_last_displayed, decode_objc): Update.
7337 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7338 * completer.c (location_completer): Update.
7339 * cli/cli-cmds.c (edit_command, list_command): Update.
7340 * breakpoint.c (create_overlay_event_breakpoint)
7341 (create_longjmp_master_breakpoint)
7342 (create_std_terminate_master_breakpoint)
7343 (create_exception_master_breakpoint)
7344 (create_thread_event_breakpoint): Update.
7345 (init_breakpoint_sal): Update. Remove some dead code.
7346 (create_breakpoint_sal): Change type of "location". Update.
7347 (create_breakpoints_sal, create_breakpoint, break_command_1)
7348 (dprintf_command, break_range_command, until_break_command)
7349 (init_ada_exception_breakpoint)
7350 (strace_marker_create_sals_from_location)
7351 (update_static_tracepoint, trace_command, ftrace_command)
7352 (strace_command, create_tracepoint_from_upload): Update.
7353 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7354 * ax-gdb.c (agent_command_1): Update.
7355
8f10c932
PA
73562017-04-12 Pedro Alves <palves@redhat.com>
7357
7358 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7359 * configure.tgt: Handle i[34567]86-*-go32* and
7360 i[34567]86-*-msdosdjgpp*.
7361 * i386-tdep.c (i386_svr4_reg_to_regnum):
7362 Make extern.
7363 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7364 i386-go32-tdep.c.
7365 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7366 * i386-go32-tdep.c: New file.
7367 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7368 declarations.
7369
0a31ccfb
SM
73702017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7371
7372 * aix-thread.c (pd_status2str): Change return type to const char *.
7373
e9bb3fbb
PA
73742017-04-12 Pedro Alves <palves@redhat.com>
7375
7376 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7377 calls to set_gdbarch_gnu_triplet_regexp.
7378
53375380
PA
73792017-04-12 Pedro Alves <palves@redhat.com>
7380
7381 PR gdb/21323
7382 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7383 New enum value.
7384 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7385 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7386 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7387 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7388 * gdbarch.h, gdbarch.c: Regenerate.
7389 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7390 gdbarch_wchar_bit and gdbarch_wchar_signed.
7391 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7392 * arm-tdep.c (arm_gdbarch_init): Likewise.
7393 * avr-tdep.c (avr_gdbarch_init): Likewise.
7394 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7395 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7396 * i386-tdep.c (i386_go32_init_abi): Likewise.
7397 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7398 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7399 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7400 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7401 * sh-tdep.c (sh_gdbarch_init): Likewise.
7402 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7403 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7404 * windows-tdep.c (windows_init_abi): Likewise.
7405 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7406
53e710ac
PA
74072017-04-12 Pedro Alves <palves@redhat.com>
7408
7409 PR c++/21323
7410 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7411 cplus_primitive_type_char32_t>: New enum values.
7412 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7413 and cplus_primitive_type_char32_t.
7414 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7415 32, use the archtecture's built-in type for char16_t and char32_t,
7416 respectively. Otherwise, fallback to init_integer_type as before,
7417 but make the type unsigned, and issue a complaint.
7418 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7419
ab0538b8
AH
74202017-04-12 Alan Hayward <alan.hayward@arm.com>
7421
5e0e0422 7422 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
7423 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7424
5430098f
SDJ
74252017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7426
7427 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7428 'const char *'.
7429
7c5ded6a
SDJ
74302017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7431
7432 * common/common-utils.c (free_vector_argv): New function.
7433 * common/common-utils.h: Include <vector>.
7434 (free_vector_argv): New prototype.
7435 * darwin-nat.c (darwin_create_inferior): Rewrite function
7436 prototype in order to constify "exec_file" and accept a
7437 "std::string" for "allargs".
7438 * fork-child.c: Include <vector>.
7439 (breakup_args): Rewrite function, using C++.
7440 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7441 and accept "std::string" for "allargs". Update the code to
7442 calculate "argv" based on "allargs". Update calls to "exec_fun"
7443 and "execvp".
7444 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7445 order to constify "exec_file" and accept a "std::string" for
7446 "allargs".
7447 * go32-nat.c (go32_create_inferior): Likewise.
7448 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7449 * infcmd.c (run_command_1): Constify "exec_file". Use
7450 "std::string" for inferior arguments.
7451 * inferior.h (fork_inferior): Update prototype.
7452 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7453 prototype in order to constify "exec_file" and accept a
7454 "std::string" for "allargs".
7455 * nto-procfs.c (procfs_create_inferior): Likewise.
7456 * procfs.c (procfs_create_inferior): Likewise.
7457 * remote-sim.c (gdbsim_create_inferior): Likewise.
7458 * remote.c (extended_remote_run): Update code to accept
7459 "std::string" as argument.
7460 (extended_remote_create_inferior): Rewrite function prototype in
7461 order to constify "exec_file" and accept a "std::string" for
7462 "allargs".
7463 * rs6000-nat.c (super_create_inferior): Likewise.
7464 (rs6000_create_inferior): Likewise.
7465 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7466 * windows-nat.c (windows_create_inferior): Likewise.
7467
ae0eee42
PA
74682017-04-11 Pedro Alves <palves@redhat.com>
7469
7470 * thread.c: Fix whitespace throughout.
7471
a6acac06
PR
74722017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7473
7474 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7475
64403bd1
AH
74762017-04-11 Alan Hayward <alan.hayward@arm.com>
7477
7478 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7479
a5bef50f
SDJ
74802017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7481
7482 PR gdb/21364
7483 * osdata.c (info_osdata): Check if 'type' is an empty string
7484 instead of NULL.
7485
9295a5a9
PA
74862017-04-10 Pedro Alves <palves@redhat.com>
7487
7488 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7489 (ptid_to_global_thread_id, in_thread_list)
7490 (do_captured_list_thread_ids, set_resumed, set_running)
7491 (set_executing, set_stop_requested, finish_thread_state)
7492 (validate_registers_access, can_access_registers_ptid)
7493 (print_thread_info_1, switch_to_thread)
7494 (do_restore_current_thread_cleanup)
7495 (make_cleanup_restore_current_thread, thread_command)
7496 (thread_name_command): Use operator== instead of ptid_equal.
7497
996812e3
PA
74982017-04-10 Pedro Alves <palves@redhat.com>
7499
7500 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7501 (current_thread_cleanup_chain): Delete.
7502 (restore_current_thread_cleanup_dtor)
7503 (make_cleanup_restore_current_thread): Remove references to
7504 current_thread_cleanup_chain.
7505
845b344f
AH
75062017-04-10 Alan Hayward <alan.hayward@arm.com>
7507
7508 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7509 REG_UNKNOWN.
7510
803bdfe4
YQ
75112017-04-10 Yao Qi <yao.qi@linaro.org>
7512
7513 PR gdb/19942
7514 * gdbthread.h (thread_info::deletable): New method.
7515 (thread_info::incref): New method.
7516 (thread_info::decref): New method.
7517 (thread_info::refcount): Move it to private.
7518 * infrun.c (save_stop_context): Call inc_refcount.
7519 (release_stop_context_cleanup): Likewise.
7520 * thread.c (set_thread_exited): New function.
7521 (init_thread_list): Delete "tp" only it is deletable, otherwise
7522 call set_thread_exited.
7523 (delete_thread_1): Call set_thread_exited.
7524 (current_thread_cleanup) <inferior_pid>: Remove.
7525 <thread>: New field.
7526 (restore_current_thread_ptid_changed): Removed.
7527 (do_restore_current_thread_cleanup): Adjust.
7528 (restore_current_thread_cleanup_dtor): Don't call
7529 find_thread_ptid.
7530 (set_thread_refcount): Use dec_refcount.
7531 (make_cleanup_restore_current_thread): Adjust.
7532 (thread_apply_all_command): Call inc_refcount.
7533 (_initialize_thread): Don't call
7534 observer_attach_thread_ptid_changed.
7535
8c25b497
YQ
75362017-04-10 Yao Qi <yao.qi@linaro.org>
7537
7538 * thread.c (delete_thread_1): Hoist code on marking thread as
7539 exited.
7540
8473b447
SM
75412017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7542
7543 * windows-nat.c (windows_detach): Initialize ptid with
7544 minus_one_ptid.
7545
6670ec13
SM
75462017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7547
7548 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7549
ba2f91bb
AH
75502017-04-07 Alan Hayward <alan.hayward@arm.com>
7551
7552 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7553 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7554 (bfin_pseudo_register_write): Likewise
7555
436252de
SM
75562017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7557
7558 * common/ptid.h (struct ptid): Change to...
7559 (class ptid_t): ... this.
7560 <ptid_t>: New constructors.
7561 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7562 matches>: New methods.
7563 <make_null, make_minus_one>: New static methods.
7564 <pid>: Rename to...
7565 <m_pid>: ...this.
7566 <lwp>: Rename to...
7567 <m_lwp>: ...this.
7568 <tid>: Rename to...
7569 <m_tid>: ...this.
7570 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7571 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7572 as references, move comment to class ptid_t.
7573 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7574 ptid_t static methods.
7575 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7576 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7577 Take ptid arguments as references, implement using ptid_t methods.
7578 * unittests/ptid-selftests.c: New file.
7579 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7580 unittests/ptid-selftests.c.
7581 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7582
0dedf377
TP
75832017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7584
7585 * python/python.c (python_run_simple_file): Cast mode literal to
7586 non-const char pointer as expected by PyFile_FromString.
7587
4e9868d4
SM
75882017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7589
7590 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7591 minus_one_ptid and null_ptid.
7592
9bf2a700
PA
75932017-04-05 Pedro Alves <palves@redhat.com>
7594
7595 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7596 * configure: Regenerate.
7597
a121b7c1
PA
75982017-04-05 Pedro Alves <palves@redhat.com>
7599
7600 * ada-exp.y (yyerror): Constify.
7601 * ada-lang.c (bound_name, get_selections)
7602 (ada_variant_discrim_type)
7603 (ada_variant_discrim_name, ada_value_struct_elt)
7604 (ada_lookup_struct_elt_type, is_unchecked_variant)
7605 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7606 (catch_ada_exception_command_split)
7607 (catch_ada_assert_command_split, catch_assert_command)
7608 (ada_op_name): Constify.
7609 * ada-lang.h (ada_yyerror, get_selections)
7610 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7611 * arc-tdep.c (arc_print_frame_cache): Constify.
7612 * arm-tdep.c (arm_skip_stub): Constify.
7613 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7614 (gen_aggregate_elt_ref): Constify.
7615 * bcache.c (print_bcache_statistics): Constify.
7616 * bcache.h (print_bcache_statistics): Constify.
7617 * break-catch-throw.c (catch_exception_command_1):
7618 * breakpoint.c (struct ep_type_description::description):
7619 Constify.
7620 (add_solib_catchpoint): Constify.
7621 (catch_fork_command_1): Add cast.
7622 (add_catch_command): Constify.
7623 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7624 Constify.
7625 * bsd-uthread.c (bsd_uthread_state): Constify.
7626 * buildsym.c (patch_subfile_names): Constify.
7627 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7628 Constify.
7629 * c-exp.y (yyerror): Constify.
7630 (token::oper): Constify.
7631 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7632 * c-varobj.c (cplus_describe_child): Constify.
7633 * charset.c (find_charset_names): Add cast.
7634 (find_charset_names): Constify array and add const_cast.
7635 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7636 (edit_command): Constify.
7637 * cli/cli-decode.c (lookup_cmd): Constify.
7638 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7639 Constify.
7640 (struct dump_context): Constify.
7641 (add_dump_command, restore_command): Constify.
7642 * cli/cli-script.c (get_command_line): Constify.
7643 * cli/cli-script.h (get_command_line): Constify.
7644 * cli/cli-utils.c (check_for_argument): Constify.
7645 * cli/cli-utils.h (check_for_argument): Constify.
7646 * coff-pe-read.c (struct read_pe_section_data): Constify.
7647 * command.h (lookup_cmd): Constify.
7648 * common/print-utils.c (decimal2str): Constify.
7649 * completer.c (gdb_print_filename): Constify.
7650 * corefile.c (set_gnutarget): Constify.
7651 * cp-name-parser.y (yyerror): Constify.
7652 * cp-valprint.c (cp_print_class_member): Constify.
7653 * cris-tdep.c (cris_register_name, crisv32_register_name):
7654 Constify.
7655 * d-exp.y (yyerror): Constify.
7656 (struct token::oper): Constify.
7657 * d-lang.h (d_yyerror): Constify.
7658 * dbxread.c (struct header_file_location::name): Constify.
7659 (add_old_header_file, add_new_header_file, last_function_name)
7660 (dbx_next_symbol_text, add_bincl_to_list)
7661 (find_corresponding_bincl_psymtab, set_namestring)
7662 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7663 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7664 * defs.h (command_line_input, print_address_symbolic)
7665 (deprecated_readline_begin_hook): Constify.
7666 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7667 Constify.
7668 * event-top.c (handle_line_of_input): Constify and add cast.
7669 * exceptions.c (catch_errors): Constify.
7670 * exceptions.h (catch_errors): Constify.
7671 * expprint.c (print_subexp_standard, op_string, op_name)
7672 (op_name_standard, dump_raw_expression, dump_raw_expression):
7673 * expression.h (op_name, op_string, dump_raw_expression):
7674 Constify.
7675 * f-exp.y (yyerror): Constify.
7676 (struct token::oper): Constify.
7677 (struct f77_boolean_val::name): Constify.
7678 * f-lang.c (f_word_break_characters): Constify.
7679 * f-lang.h (f_yyerror): Constify.
7680 * fork-child.c (fork_inferior): Add cast.
7681 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7682 (new_variant): Constify.
7683 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7684 * gdbarch.c: Regenerate.
7685 * gdbcore.h (set_gnutarget): Constify.
7686 * go-exp.y (yyerror): Constify.
7687 (token::oper): Constify.
7688 * go-lang.h (go_yyerror): Constify.
7689 * go32-nat.c (go32_sysinfo): Constify.
7690 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7691 * guile/scm-cmd.c (cmdscm_function): Constify.
7692 * guile/scm-param.c (pascm_param_value): Constify.
7693 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7694 (h8300sx_register_name): Constify.
7695 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7696 Constify.
7697 * ia64-tdep.c (ia64_register_names): Constify.
7698 * infcmd.c (construct_inferior_arguments): Constify.
7699 (path_command, attach_post_wait): Constify.
7700 * language.c (show_range_command, show_case_command)
7701 (unk_lang_error): Constify.
7702 * language.h (language_defn::la_error)
7703 (language_defn::la_name_of_this): Constify.
7704 * linespec.c (decode_line_2): Constify.
7705 * linux-thread-db.c (thread_db_err_str): Constify.
7706 * lm32-tdep.c (lm32_register_name): Constify.
7707 * m2-exp.y (yyerror): Constify.
7708 * m2-lang.h (m2_yyerror): Constify.
7709 * m32r-tdep.c (m32r_register_names): Constify and make static.
7710 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7711 * m88k-tdep.c (m88k_register_name): Constify.
7712 * macroexp.c (appendmem): Constify.
7713 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7714 (upgrade_type, parse_external, parse_partial_symbols)
7715 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7716 (new_symbol): Constify.
7717 * memattr.c (mem_info_command): Constify.
7718 * mep-tdep.c (register_name_from_keyword): Constify.
7719 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7720 Constify.
7721 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7722 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7723 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7724 cast.
7725 (mi_execute_async_cli_command): Constify.
7726 * mips-tdep.c (mips_register_name): Constify.
7727 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7728 (am33_register_name, am33_2_register_name)
7729 * moxie-tdep.c (moxie_register_names): Constify.
7730 * nat/linux-osdata.c (osdata_type): Constify fields.
7731 * nto-tdep.c (nto_parse_redirection): Constify.
7732 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7733 (lookup_child_selector): Constify.
7734 (objc_methcall::name): Constify.
7735 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7736 (lookup_struct_typedef): Constify.
7737 * objfiles.c (pc_in_section): Constify.
7738 * objfiles.h (pc_in_section): Constify.
7739 * p-exp.y (struct token::oper): Constify.
7740 (yyerror): Constify.
7741 * p-lang.h (pascal_yyerror): Constify.
7742 * parser-defs.h (op_name_standard): Constify.
7743 (op_print::string): Constify.
7744 (exp_descriptor::op_name): Constify.
7745 * printcmd.c (print_address_symbolic): Constify.
7746 * psymtab.c (print_partial_symbols): Constify.
7747 * python/py-breakpoint.c (stop_func): Constify.
7748 (bppy_get_expression): Constify.
7749 * python/py-cmd.c (cmdpy_completer::name): Constify.
7750 (cmdpy_function): Constify.
7751 * python/py-event.c (evpy_add_attribute)
7752 (gdbpy_initialize_event_generic): Constify.
7753 * python/py-event.h (evpy_add_attribute)
7754 (gdbpy_initialize_event_generic): Constify.
7755 * python/py-evts.c (add_new_registry): Constify.
7756 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7757 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7758 * python/py-inferior.c (get_buffer): Add cast.
7759 * python/py-param.c (parm_constant::name): Constify.
7760 * python/py-unwind.c (fprint_frame_id): Constify.
7761 * python/python.c (gdbpy_parameter_value): Constify.
7762 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7763 * remote.c (memory_packet_config::name): Constify.
7764 (show_packet_config_cmd, remote_write_bytes)
7765 (remote_buffer_add_string):
7766 * reverse.c (exec_reverse_once): Constify.
7767 * rs6000-tdep.c (variant::name, variant::description): Constify.
7768 * rust-exp.y (rustyyerror): Constify.
7769 * rust-lang.c (rust_op_name): Constify.
7770 * rust-lang.h (rustyyerror): Constify.
7771 * serial.h (serial_ops::name): Constify.
7772 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7773 (sh_sh3e_register_name, sh_sh2e_register_name)
7774 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7775 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7776 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7777 (sh_sh4al_dsp_register_name): Constify.
7778 * sh64-tdep.c (sh64_register_name): Constify.
7779 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7780 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7781 * stabsread.c (patch_block_stabs, read_type_number)
7782 (ref_map::stabs, ref_add, process_reference)
7783 (symbol_reference_defined, define_symbol, define_symbol)
7784 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7785 (read_one_struct_field, read_struct_fields, read_baseclasses)
7786 (read_tilde_fields, read_struct_type, read_array_type)
7787 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7788 (read_huge_number, read_range_type, read_args, common_block_start)
7789 (find_name_end): Constify.
7790 * stabsread.h (common_block_start, define_symbol)
7791 (process_one_symbol, symbol_reference_defined, ref_add):
7792 * symfile.c (get_section_index, add_symbol_file_command):
7793 * symfile.h (get_section_index): Constify.
7794 * target-descriptions.c (tdesc_type::name): Constify.
7795 (tdesc_free_type): Add cast.
7796 * target.c (find_default_run_target):
7797 (add_deprecated_target_alias, find_default_run_target)
7798 (target_announce_detach): Constify.
7799 (do_option): Constify.
7800 * target.h (add_deprecated_target_alias): Constify.
7801 * thread.c (print_thread_info_1): Constify.
7802 * top.c (deprecated_readline_begin_hook, command_line_input):
7803 Constify.
7804 (init_main): Add casts.
7805 * top.h (handle_line_of_input): Constify.
7806 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7807 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7808 (tfind_command): Rename to ...
7809 (tfind_command_1): ... this and constify.
7810 (tfind_command): New function.
7811 (tfind_end_command, tfind_start_command): Adjust.
7812 (encode_source_string): Constify.
7813 * tracepoint.h (encode_source_string): Constify.
7814 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7815 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7816 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7817 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7818 * tui/tui-win.c (parse_scrolling_args): Constify.
7819 * tui/tui-windata.c (tui_erase_data_content): Constify.
7820 * tui/tui-windata.h (tui_erase_data_content): Constify.
7821 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7822 * tui/tui.c (tui_enable): Add cast.
7823 * utils.c (defaulted_query): Constify.
7824 (init_page_info): Add cast.
7825 (puts_debug, subset_compare): Constify.
7826 * utils.h (subset_compare): Constify.
7827 * varobj.c (varobj_format_string): Constify.
7828 * varobj.h (varobj_format_string): Constify.
7829 * vax-tdep.c (vax_register_name): Constify.
7830 * windows-nat.c (windows_detach): Constify.
7831 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7832 * xml-support.c (gdb_xml_end_element): Constify.
7833 * xml-tdesc.c (tdesc_start_reg): Constify.
7834 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7835 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7836 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7837
995816ba
PA
78382017-04-05 Pedro Alves <palves@redhat.com>
7839
7840 * proc-api.c (struct trans): Constify.
7841 (procfs_note): Constify.
7842 * proc-events.c (struct trans, syscall_table):
7843 * proc-flags.c (struct trans): Constify.
7844 * proc-utils.h (procfs_note): Constify.
7845 * proc-why.c (struct trans): Constify.
7846 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7847 (procfs_detach): Constify.
7848 * sol-thread.c (struct string_map): Constify.
7849 (td_err_string, td_state_string): Constify.
7850
3e83a920
PA
78512017-04-05 Pedro Alves <palves@redhat.com>
7852
7853 * proc-api.c (procfs_filename): Don't initialize
7854 procfs_filename.
7855 (prepare_to_trace): Assume procfs_filename is non-NULL.
7856 (_initialize_proc_api): Give procfs_filename a default value here.
7857
63160a43
PA
78582017-04-05 Pedro Alves <palves@redhat.com>
7859
7860 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7861 'cond_string' parameter.
7862 (extract_exception_regexp): Constify 'string' parameter.
7863 (catch_exception_command_1): Constify.
7864 * breakpoint.c (init_catchpoint)
7865 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7866 parameter.
7867 (ep_parse_optional_if_clause, catch_fork_command_1)
7868 (catch_exec_command_1): Constify.
7869 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7870 parameter.
7871 (ep_parse_optional_if_clause): Constify.
7872 * cli/cli-utils.c (remove_trailing_whitespace)
7873 (check_for_argument): Constify.
7874 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7875 non-const overload.
7876 (check_for_argument): Likewise.
7877
9b2eba3d
PA
78782017-04-05 Pedro Alves <palves@redhat.com>
7879
7880 * event-top.c (command_line_handler): Add cast to execute_command
7881 call.
7882 * record-btrace.c (cmd_record_btrace_bts_start)
7883 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7884 (cmd_record_btrace_start): Add cast to execute_command call.
7885 * record-full.c (record_full_goto_insn):
7886 * record.c (record_start, record_stop): Add cast to
7887 execute_command_to_string calls.
7888 (cmd_record_start): Add cast to execute_command calls.
7889
2adadf51
PA
78902017-04-05 Pedro Alves <palves@redhat.com>
7891
7892 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7893 static inline function.
7894 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7895 array and use gdb_PyArg_ParseTupleAndKeywords.
7896 * python/py-cmd.c (cmdpy_init): Likewise.
7897 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7898 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7899 (infpy_search_memory): Likewise.
7900 * python/py-objfile.c (objfpy_add_separate_debug_file)
7901 (gdbpy_lookup_objfile): Likewise.
7902 * python/py-symbol.c (gdbpy_lookup_symbol)
7903 (gdbpy_lookup_global_symbol): Likewise.
7904 * python/py-type.c (gdbpy_lookup_type): Likewise.
7905 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7906 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7907 Likewise.
7908
0d1f4ceb
PA
79092017-04-05 Pedro Alves <palves@redhat.com>
7910
7911 * python/python-internal.h (gdb_PyGetSetDef): New type.
7912 * python/py-block.c (block_object_getset)
7913 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7914 * python/py-event.c (event_object_getset)
7915 (finish_breakpoint_object_getset): Likewise.
7916 * python/py-inferior.c (inferior_object_getset): Likewise.
7917 * python/py-infthread.c (thread_object_getset): Likewise.
7918 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7919 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7920 * python/py-objfile.c (objfile_getset): Likewise.
7921 * python/py-progspace.c (pspace_getset): Likewise.
7922 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7923 Likewise.
7924 * python/py-record.c (recpy_record_getset): Likewise.
7925 * python/py-symbol.c (symbol_object_getset): Likewise.
7926 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7927 Likewise.
7928 * python/py-type.c (type_object_getset, field_object_getset):
7929 Likewise.
7930 * python/py-value.c (value_object_getset): Likewise.
7931
4d759979
PA
79322017-04-05 Pedro Alves <palves@redhat.com>
7933
7934 * python/python-internal.h (gdb_PyObject_CallMethod)
7935 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7936 New functions.
7937 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7938 (PySys_GetObject, PySys_SetPath): New macros.
7939
fdf9e36f
PA
79402017-04-05 Pedro Alves <palves@redhat.com>
7941
7942 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7943 info_osdata_command.
7944 * osdata.c (info_osdata_command): Rename to ...
7945 (info_osdata): ... this. Constify 'type' parameter, and remove
7946 the 'from_tty' parameter. Accept NULL TYPE.
7947 (info_osdata_command): New function.
7948 * osdata.h (info_osdata_command): Remove declaration.
7949 (info_osdata): New declaration.
7950
9f33b8b7
PA
79512017-04-05 Pedro Alves <palves@redhat.com>
7952
7953 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7954 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7955 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7956 parameter.
7957 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7958 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7959 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7960 parameter.
7961 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7962 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7963 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7964 (mi_cmd_file_list_exec_source_files)
7965 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7966 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7967 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7968 parameter.
7969 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7970 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7971 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7972 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7973 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7974 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7975 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7976 'command' parameter.
7977 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7978 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7979 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7980 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7981 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7982 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7983 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7984 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7985 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7986 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7987 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7988 parameter.
7989 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7990 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7991 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7992 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7993 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7994 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7995 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7996 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7997 (mi_cmd_data_list_changed_registers)
7998 (mi_cmd_data_write_register_values)
7999 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8000 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8001 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8002 (mi_cmd_list_features, mi_cmd_list_target_features)
8003 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8004 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8005 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8006 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8007 (mi_cmd_trace_frame_collected): Constify 'command'
8008 parameter.
8009 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8010 'command' parameter.
8011
67cb5b2d
PA
80122017-04-05 Pedro Alves <palves@redhat.com>
8013
8014 * ada-lang.c (ada_completer_word_break_characters): Now a const
8015 array.
8016 (ada_get_gdb_completer_word_break_characters): Constify.
8017 * completer.c (gdb_completer_command_word_break_characters)
8018 (gdb_completer_file_name_break_characters)
8019 (gdb_completer_quote_characters): Now const arrays.
8020 (get_gdb_completer_quote_characters): Constify.
8021 (set_rl_completer_word_break_characters): New function.
8022 (set_gdb_completion_word_break_characters)
8023 (complete_line_internal): Use it.
8024 * completer.h (get_gdb_completer_quote_characters): Constify.
8025 (set_rl_completer_word_break_characters): Declare.
8026 * f-lang.c (f_word_break_characters): Constify.
8027 * language.c (default_word_break_characters): Constify.
8028 * language.h (language_defn::la_word_break_characters): Constify.
8029 (default_word_break_characters): Constify.
8030 * top.c (init_main): Use set_rl_completer_word_break_characters.
8031
7a114964
PA
80322017-04-05 Pedro Alves <palves@redhat.com>
8033
8034 * aix-thread.c (aix_thread_pid_to_str)
8035 (aix_thread_extra_thread_info): Constify.
8036 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8037 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8038 (bsd_uthread_pid_to_str): Constify.
8039 * corelow.c (core_pid_to_str): Constify.
8040 * darwin-nat.c (darwin_pid_to_str): Constify.
8041 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8042 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8043 Constify.
8044 * gnu-nat.c (gnu_pid_to_str): Constify.
8045 * go32-nat.c (go32_pid_to_str): Constify.
8046 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8047 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8048 * inferior.c (inferior_pid_to_str): Constify.
8049 * linux-nat.c (linux_nat_pid_to_str): Constify.
8050 * linux-tdep.c (linux_core_pid_to_str): Constify.
8051 * linux-thread-db.c (thread_db_pid_to_str)
8052 (thread_db_extra_thread_info): Constify.
8053 * nto-tdep.c (nto_extra_thread_info): Constify.
8054 * nto-tdep.h (nto_extra_thread_info): Constify.
8055 * obsd-nat.c (obsd_pid_to_str): Constify.
8056 * procfs.c (procfs_pid_to_str): Constify.
8057 * ravenscar-thread.c (ravenscar_extra_thread_info)
8058 (ravenscar_pid_to_str): Constify.
8059 * remote-sim.c (gdbsim_pid_to_str): Constify.
8060 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8061 Constify.
8062 * sol-thread.c (solaris_pid_to_str): Constify.
8063 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8064 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8065 * target.c (default_pid_to_str, target_pid_to_str)
8066 (normal_pid_to_str, default_pid_to_str): Constify.
8067 * target.h (target_ops::to_pid_to_str)
8068 (target_ops::to_extra_thread_info): Constify.
8069 (target_pid_to_str, normal_pid_to_str): Constify.
8070 * windows-nat.c (windows_pid_to_str): Constify.
8071 * gdbarch.sh (core_pid_to_str): Constify.
8072 * target-delegates.c: Regenerate.
8073 * gdbarch.h, gdbarch.c: Regenerate.
8074
69bbf465
PA
80752017-04-05 Pedro Alves <palves@redhat.com>
8076
8077 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8078 the memory of the temporary warning_pre_print override.
8079 * utils.c (warning_pre_print): Constify.
8080 * utils.h (warning_pre_print): Constify.
8081
be47f9e8
PA
80822017-04-05 Pedro Alves <palves@redhat.com>
8083
8084 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8085 (shell_command): New function.
8086 (make_command): Use std::string.
8087 (init_cli_cmds): Register shell_command instead of shell_escape.
8088
bde6261a
PA
80892017-04-05 Pedro Alves <palves@redhat.com>
8090
8091 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8092 * tracepoint.c (default_collect): Don't initialize.
8093
b38ef47f
PA
80942017-04-05 Pedro Alves <palves@redhat.com>
8095
8096 * macroexp.c (macro_buffer::shared): Now a bool.
8097 (init_buffer): Update.
8098 (init_shared_buffer): Constify 'addr' parameter.
8099 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8100 casts.
8101
f995bbe8
PA
81022017-04-05 Pedro Alves <palves@redhat.com>
8103
8104 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8105 * disasm.c (set_disassembler_options): Constify local.
8106 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8107
4a596fe2
SDJ
81082017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8109
8110 PR gdb/21352
8111 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8112 option.
8113
2cad08ea
YQ
81142017-04-05 Yao Qi <yao.qi@linaro.org>
8115
8116 * frame.c (frame_unwind_register_unsigned): Call
8117 frame_unwind_register_value.
8118
55a98976
YQ
81192017-04-05 Yao Qi <yao.qi@linaro.org>
8120
8121 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8122 Use gdb_test_multiple, and don't match anchor.
8123
4ac40124
PA
81242017-04-05 Pedro Alves <palves@redhat.com>
8125
8126 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8127 (Write After Approval): Remove Simon Marchi.
8128
c053b654
PA
81292017-04-05 Pedro Alves <palves@redhat.com>
8130
8131 * common/gdb_optional.h (optional::optional): Make constexpr and
8132 initialize m_dummy.
8133
4c7bf4f9
JB
81342017-04-04 John Baldwin <jhb@FreeBSD.org>
8135
8136 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8137 (amd64fbsd_jmp_buf_reg_offset): Remove.
8138 (amd64fbsd_supply_uthread): Remove function.
8139 (amd64fbsd_collect_uthread): Remove function.
8140 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8141 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8142 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8143 (fbsd-nat.c): Update comment.
8144 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8145 (i386fbsd_jmp_buf_reg_offset): Remove.
8146 (i386fbsd_supply_uthread): Remove function.
8147 (i386fbsd_collect_uthread): Remove function.
8148 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8149
1e1a8bef
JB
81502017-04-04 John Baldwin <jhb@FreeBSD.org>
8151
8152 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8153 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8154 * NEWS: Mention that support for FreeBSD/alpha was removed.
8155 * alpha-fbsd-tdep.c: Delete file.
8156 * config/alpha/fbsd.mh: Delete file.
8157 * configure.host: Delete alpha*-*-freebsd* and
8158 alpha*-*-kfreebsd*-gnu.
8159 * configure.tgt: Delete alpha*-*-freebsd* and
8160 alpha*-*-kfreebsd*-gnu.
8161
49907934
JB
81622017-04-04 John Baldwin <jhb@FreeBSD.org>
8163
8164 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8165 amd64bsd_store_inferior_registers): Use ptid from regcache.
8166
6f77053d
PA
81672017-04-04 Pedro Alves <palves@redhat.com>
8168
8169 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8170 data fields, make them private and add "m_" prefixes.
8171 (lnp_state_machine::lnp_state_machine): New ctor.
8172 (record_line, check_line_address, handle_set_discriminator)
8173 (handle_set_address, handle_advance_pc, handle_special_opcode)
8174 (handle_advance_line, handle_set_file, handle_negate_stmt)
8175 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8176 (end_sequence, advance_line): New methods.
8177 (m_gdbarch, m_record_lines_p): New fields.
8178 (lnp_reader_state): Delete.
8179 (dwarf_record_line): Rename to ...
8180 (lnp_state_machine::record_line): ... adjust.
8181 (init_lnp_state_machine): Delete.
8182 (lnp_state_machine::lnp_state_machine): New.
8183 (check_line_address): Rename to ...
8184 (lnp_state_machine::check_line_address): This.
8185 (dwarf_decode_lines_1): Remove reference to "reader_state".
8186 Adjust lnp_state_machine having a non-default ctor. Use bool.
8187 State machine internal state manipulation moved to
8188 lnp_state_machine methods.
8189
9c541725
PA
81902017-04-04 Pedro Alves <palves@redhat.com>
8191
8192 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8193 unittests/offset-type-selftests.c.
8194 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8195 * common/offset-type.h: New file.
8196 * common/preprocessor.h: New file.
8197 * common/traits.h: New file.
8198 * common/valid-expr.h: New file.
8199 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8200 sect_offset and cu_offset strong typedefs throughout.
8201 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8202 typedefs throughout.
8203 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8204 sect_offset and cu_offset strong typedefs throughout.
8205 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8206 typedefs throughout.
8207 * gdbtypes.h: Include "common/offset-type.h".
8208 (cu_offset): Now an offset type (strong typedef) instead of a
8209 struct.
8210 (sect_offset): Likewise.
8211 (union call_site_parameter_u): Rename "param_offset" field to
8212 "param_cu_off".
8213 * unittests/offset-type-selftests.c: New file.
8214
ecfb656c
PA
82152017-04-04 Pedro Alves <palves@redhat.com>
8216
8217 * common/underlying.h: New file.
8218 * dwarf2read.c: Include "common/gdb_optional.h" and
8219 "common/underlying.h".
8220 (dir_index, file_name_index): New types.
8221 (file_entry): Use them.
8222 (file_entry::include): Use to_underlying.
8223 (line_header::add_file_name): Use dir_index.
8224 (read_formatted_entries): Use gdb::optional. Read form before
8225 writting to file_entry.
8226 (dwarf_decode_line_header): Use dir_index.
8227 (lnp_state_machine::current_file): Use to_underlying.
8228 (lnp_state_machine::file): Change type to file_name_index.
8229 (dwarf_record_line): Use to_underlying.
8230 (init_lnp_state_machine): Use file_name_index.
8231 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8232
d194f1fe
PA
82332017-04-04 Pedro Alves <palves@redhat.com>
8234
8235 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8236 operator bool, has_value and get methods.
8237
fff8551c
PA
82382017-04-04 Pedro Alves <palves@redhat.com>
8239
8240 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8241 fields.
8242 (line_header): Initialize all data fields. Change type of
8243 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8244 Change type of include_dirs to std::vector<const char *>. Remove
8245 num_include_dirs, include_dirs_size. Change type of file_names to
8246 std::vector<file_entry>. Remove num_file_names, file_names_size.
8247 (line_header::line_header): New.
8248 (line_header::add_include_dir, line_header::add_file_name): New
8249 methods.
8250 (line_header::include_dir_at): Remove NULL check.
8251 (line_header::file_name_at): Add const overload.
8252 (line_header_up): New unique_ptr typedef.
8253 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8254 std::vector. Remove free_line_header call.
8255 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8256 free_line_header call.
8257 (free_cu_line_header): Delete.
8258 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8259 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8260 Adjust to use std::vector.
8261 (free_line_header): Delete.
8262 (free_line_header_voidp): Use delete.
8263 (add_include_dir): Replace with ...
8264 (line_header::add_include_dir): ... this method. Use std::vector.
8265 (add_file_name): Replace with ...
8266 (line_header::add_file_name): ... this method. Use std::vector.
8267 (add_include_dir_stub): Delete.
8268 (read_formatted_entries): Remove memset.
8269 (dwarf_decode_line_header): Return a line_header_up instead of a
8270 raw pointer. Remove cleanup handling. Pass lambdas to
8271 read_formatted_entries. Adjust to use line_header methods.
8272 (dwarf_decode_lines_1): Adjust to use line_header methods.
8273 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8274 use std::vector.
8275
d62a8ae2
SM
82762017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8277
8278 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8279 instead of struct ptid.
8280
db3a1dc7
AH
82812017-05-04 Alan Hayward <alan.hayward@arm.com>
8282
8283 * frame.c (get_frame_register_bytes): Unwind using value.
8284 (put_frame_register_bytes): Likewise.
8285
b1b45502
IB
82862017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8287
8288 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8289 aggregate-like.
8290
ec13808e
JK
82912017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8292
8293 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8294
12316564
YQ
82952017-03-29 Yao Qi <yao.qi@linaro.org>
8296
8297 * gdbthread.h (struct thread_info): Declare constructor and
8298 destructor. Add some in-class member initializers.
8299 * thread.c (free_thread): Remove.
8300 (init_thread_list): Call delete instead of free_thread.
8301 (new_thread): Call thread_info constructor.
8302 (thread_info::thread_info): New function.
8303 (thread_info::~thread_info): New function.
8304 (delete_thread_1): Call delete instead of free_thread.
8305 (make_cleanup_restore_current_thread): Move tp and frame to
8306 inner block.
8307
fe5f7374
AK
83082017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8309
8310 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8311 (arc_skip_prologue): Likewise.
8312 (arc_make_frame_cache): Likewise.
8313 (arc_pv_get_operand): New function.
8314 (arc_is_in_prologue): Likewise.
8315 (arc_analyze_prologue): Likewise.
8316 (arc_print_frame_cache): Likewise.
8317 (MAX_PROLOGUE_LENGTH): New constant.
8318
eea78757
AK
83192017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8320
8321 * configure.tgt: Add arc-insn.o.
8322 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8323 (dump_arc_instruction_command): New function.
8324 (arc_fprintf_disasm): Likewise.
8325 (arc_disassemble_info): Likewise.
8326 (arc_insn_get_operand_value): Likewise.
8327 (arc_insn_get_operand_value_signed): Likewise.
8328 (arc_insn_get_memory_base_reg): Likewise.
8329 (arc_insn_get_memory_offset): Likewise.
8330 (arc_insn_get_branch_target): Likewise.
8331 (arc_insn_dump): Likewise.
8332 (arc_insn_get_linear_next_pc): Likewise.
8333 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8334 (arc_disassemble_info): Likewise.
8335 (arc_insn_get_branch_target): Likewise.
8336 (arc_insn_get_linear_next_pc): Likewise.
8337 * NEWS: Mention new "maint print arc arc-instruction".
8338
3be78afd
AK
83392017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8340
8341 * arc-tdep (maintenance_print_arc_list): New variable.
8342 (maintenance_print_arc_command): New function.
8343
296ec4fa
AK
83442017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8345
8346 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8347 Add "limm" and "reserved".
8348 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8349 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8350 * arc-tdep.h (arc_regnum): Likewise.
8351
f74f865e
MF
83522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8353
8354 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8355 for THREADPTR register.
8356 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8357 register.
8358 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8359 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8360 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8361
0d0bf81a
MF
83622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8363
8364 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8365 registers above gdbarch_num_regs (gdbarch) as privileged in
8366 call0 ABI.
8367
0ce4291e
MF
83682017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8369
8370 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8371 for a single specified register or for all registers in
8372 a0_base..a0_base + C0_NREGS range.
8373 (supply_gregset_reg): Call regcache_raw_supply for a single
8374 specified register or for all registers in a0_base..a0_base +
8375 C0_NREGS range.
8376
c56054f9
MF
83772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8378
8379 * arch/xtensa.h (C0_NREGS): Add definition.
8380 * xtensa-tdep.c (C0_NREGS): Remove definition.
8381
a4398628
MF
83822017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8383
8384 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8385 Drop xtensa_default_isa initialization.
8386 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8387
8c43009f
PA
83882017-03-27 Pedro Alves <palves@redhat.com>
8389
8390 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8391 (file_entry::include_dir): New method.
8392 (line_header::include_dir_at, line_header::file_name_at): New
8393 methods.
8394 (setup_type_unit_groups, setup_type_unit_groups)
8395 (psymtab_include_file_name): Simplify using the new methods.
8396 (lnp_state_machine) <the_line_header>: New field.
8397 <file>: Add comment.
8398 (lnp_state_machine::current_file): New method.
8399 (dwarf_record_line): Simplify using the new methods.
8400 (init_lnp_state_machine): Initialize the "the_line_header" field.
8401 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8402 Simplify using the new methods.
8403
a7e80b9e
PA
84042017-03-27 Pedro Alves <palves@redhat.com>
8405
8406 * cp-name-parser.y (make_empty): Delete.
8407 (demangler_special, nested_name, ptr_operator, array_indicator)
8408 (direct_declarator, declarator_1): Use fill_comp instead of
8409 make_empty.
8410
21047726
PA
84112017-03-27 Pedro Alves <palves@redhat.com>
8412
8413 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8414 to ATTRIBUTE_PRINTF.
8415 * solib-target.c (library_list_start_list): Print "string" not
8416 "version".
8417 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8418 gdb_xml_error call.
8419
d721ba37
PA
84202017-03-27 Pedro Alves <palves@redhat.com>
8421
8422 * dwarf2read.c (struct file_and_directory): New.
8423 (dwarf2_get_dwz_file): Adjust to use std::string.
8424 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8425 (find_file_and_directory): Adjust to return a file_and_directory
8426 object.
8427 (read_file_scope): Adjust to use file_and_directory. Remove
8428 make_cleanup/do_cleanups calls.
8429 (open_and_init_dwp_file): Adjust to use std::string. Remove
8430 make_cleanup/do_cleanups calls.
8431 * python/python.c (do_start_initialization): Adjust to ldirname
8432 returning a std::string.
8433 * utils.c (ldirname): Now returns a std::string.
8434 * utils.h (ldirname): Change return type to std::string.
8435 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8436 returning a std::string.
8437 * xml-tdesc.c (file_read_description_xml): Likewise.
8438
ed771251
AH
84392017-03-24 Alan Hayward <alan.hayward@arm.com>
8440
8441 * regcache.c (regcache_debug_print_register): New function.
8442 * regcache.h (regcache_debug_print_register): New declaration.
8443 * target.c (debug_print_register): Remove.
8444 (target_fetch_registers): Call regcache_debug_print_register.
8445 (target_store_registers): Likewise.
8446
568c1b9f
PB
84472017-03-24 Pádraig Brady <pbrady@fb.com>
8448
8449 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8450 reference beyond the 'lh->include_dirs' array before accessing to
8451 it.
8452 (psymtab_include_file_name): Likewise.
8453 (dwarf_decode_lines_1): Likewise.
8454 (dwarf_decode_lines): Likewise.
8455 (file_file_name): Likewise.
8456
3e00d44f
SM
84572017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8458
8459 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8460 inferior_ptid.
8461 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8462 ps_lsetfpregs): Likewise.
8463 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8464 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8465 ps_lsetfpregs): Likewise.
8466 * target.c (target_fetch_registers, target_store_registers):
8467 Remove asserts.
8468
077ae656
AH
84692017-03-23 Alan Hayward <alan.hayward@arm.com>
8470
8471 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8472
1e2b521d
YQ
84732017-03-23 Yao Qi <yao.qi@linaro.org>
8474
8475 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8476 (_initialize_aarch64_tdep): Register it.
8477 (aarch64_record_load_store): Handle PRFM instruction.
8478 (aarch64_process_record_test): New function.
8479
33877125
YQ
84802017-03-23 Yao Qi <yao.qi@linaro.org>
8481
8482 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8483 indentation.
8484
a0eef940
YQ
84852017-03-23 Yao Qi <yao.qi@linaro.org>
8486
8487 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8488
3f2a3564
PR
84892017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8490
8491 python/python.c (do_start_initialization): Fix memory leak.
8492
b67aeab0
SM
84932017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8494
8495 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8496 using get_ptrace_pid.
8497 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8498 inferior_ptid.
8499 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8500 inferior_ptid instead of pid.
8501
ffdbe864
YQ
85022017-03-22 Yao Qi <yao.qi@linaro.org>
8503
8504 * aarch64-tdep.c: Wrap locally used classes in anonymous
8505 namespace.
8506 * arm-tdep.c: Likewise.
8507 * linespec.c: Likewise.
8508 * ui-out.c: Likewise.
8509
9d736fbf
JG
85102017-03-22 Jonah Graham <jonah@kichwacoders.com>
8511
8512 PR gdb/19637
8513 * python/lib/gdb/printer/bound_registers.py: Import sys.
8514
3de88e9a
SM
85152017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8516
8517 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8518 windows_thread_info parameter and use it instead of
8519 current_thread.
8520 (windows_fetch_inferior_registers): Don't set current_thread,
8521 pass the thread to do_windows_fetch_inferior_registers. Use
8522 ptid from regcache instead of inferior_ptid.
8523 (do_windows_store_inferior_registers): Add windows_thread_info
8524 parameter and use it instead of current_thread.
8525 (windows_store_inferior_registers): Don't set current_thread,
8526 pass the thread to do_windows_store_inferior_registers. Use
8527 ptid from regcache instead of inferior_ptid.
8528
0e7b8f61
SM
85292017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8530
8531 * ser-mingw.c (ser_windows_raw): Remove reference to
8532 struct serial::current_timeout.
8533
5badf10a
IR
85342017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8535
8536 PR tdep/20928
8537 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8538 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8539 (sparc64_fsr_type): Fix %fsr decoding.
8540
cee59b3f
TW
85412017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8542
8543 * python/py-record-btrace.c (btpy_insn_data): Change return type
8544 for Python 2.
8545
639a9038
SM
85462017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8547
8548 * spu-linux-nat.c (spu_fetch_inferior_registers,
8549 spu_store_inferior_registers): Use ptid from regcache, set and
8550 restore inferior_ptid.
8551 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8552 Likewise.
8553
bcc0c096
SM
85542017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8555
8556 * i386-linux-nat.c (fetch_register, store_register,
8557 i386_linux_fetch_inferior_registers,
8558 i386_linux_store_inferior_registers): Use ptid from regcache.
8559 * ia64-linux-nat.c (ia64_linux_fetch_register,
8560 ia64_linux_store_register): Likewise.
8561 * inf-ptrace.c (inf_ptrace_fetch_register,
8562 inf_ptrace_store_register): Likewise.
8563 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8564 m32r_linux_store_inferior_registers): Likewise.
8565 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8566 m68kbsd_store_inferior_registers): Likewise.
8567 * m68k-linux-nat.c (fetch_register, store_register,
8568 m68k_linux_fetch_inferior_registers,
8569 m68k_linux_store_inferior_registers): Likewise.
8570 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8571 m88kbsd_store_inferior_registers): Likewise.
8572 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8573 mips_fbsd_store_inferior_registers): Likewise.
8574 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8575 mips64_linux_regsets_store_registers): Likewise.
8576 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8577 mipsnbsd_store_inferior_registers): Likewise.
8578 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8579 mips64obsd_store_inferior_registers): Likewise.
8580 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8581 Likewise.
8582 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8583 ppcfbsd_store_inferior_registers): Likewise.
8584 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8585 ppc_linux_store_inferior_registers): Likewise.
8586 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8587 ppcnbsd_store_inferior_registers): Likewise.
8588 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8589 ppcobsd_store_registers): Likewise.
8590 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8591 Likewise.
8592 * ravenscar-thread.c (ravenscar_fetch_registers,
8593 ravenscar_store_registers, ravenscar_prepare_to_store):
8594 Likewise.
8595 * record-btrace.c (record_btrace_fetch_registers,
8596 record_btrace_store_registers, record_btrace_prepare_to_store):
8597 Likewise.
8598 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8599 Lookup inferior using ptid from regcache, instead of
8600 current_inferior.
8601 * remote.c (remote_fetch_registers, remote_store_registers): Use
8602 ptid from regcache.
8603 * rs6000-nat.c (fetch_register, store_register): Likewise.
8604 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8605 s390_linux_store_inferior_registers): Likewise.
8606 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8607 shnbsd_store_inferior_registers): Likewise.
8608 * sol-thread.c (sol_thread_fetch_registers,
8609 sol_thread_store_registers): Likewise.
8610 * sparc-nat.c (sparc_fetch_inferior_registers,
8611 sparc_store_inferior_registers): Likewise.
8612 * tilegx-linux-nat.c (fetch_inferior_registers,
8613 store_inferior_registers): Likewise.
8614 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8615 vaxbsd_store_inferior_registers): Likewise.
8616 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8617 store_xtregs): Likewise.
8618
c0f55cc6
AV
86192017-03-20 Artemiy Volkov <artemiyv@acm.org>
8620
8621 PR gdb/14441
8622 * NEWS: Mention support for rvalue references in GDB and python.
8623 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8624 supports both lvalue and rvalue references.
8625
15c0a2a9
AV
86262017-03-20 Artemiy Volkov <artemiyv@acm.org>
8627
8628 PR gdb/14441
8629 * gdbtypes.c (rank_one_type): Implement overloading
8630 resolution rules regarding rvalue references.
8631
aa006118
AV
86322017-03-20 Artemiy Volkov <artemiyv@acm.org>
8633
8634 PR gdb/14441
8635 * aarch64-tdep.c (aarch64_type_align)
8636 (aarch64_extract_return_value, aarch64_store_return_value): Change
8637 lvalue reference type checks to general reference type checks.
8638 * amd64-tdep.c (amd64_classify): Likewise.
8639 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8640 Likewise.
8641 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8642 (arm_store_return_value): Likewise.
8643 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8644 * c-typeprint.c (c_print_type): Likewise.
8645 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8646 (cplus_number_of_children, cplus_describe_child): Likewise.
8647 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8648 * completer.c (expression_completer): Likewise.
8649 * cp-support.c (make_symbol_overload_list_adl_namespace):
8650 Likewise.
8651 * darwin-nat-info.c (info_mach_region_command): Likewise.
8652 * dwarf2loc.c (entry_data_value_coerce_ref)
8653 (value_of_dwarf_reg_entry): Likewise.
8654 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8655 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8656 Likewise.
8657 * findvar.c (extract_typed_address, store_typed_address):
8658 Likewise.
8659 * gdbtypes.c (rank_one_type): Likewise.
8660 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8661 * infcall.c (value_arg_coerce): Likewise.
8662 * language.c (pointer_type): Likewise.
8663 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8664 Likewise.
8665 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8666 * mn10300-tdep.c (mn10300_type_align): Likewise.
8667 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8668 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8669 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8670 Likewise.
8671 * printcmd.c (print_formatted, x_command): Likewise.
8672 * python/py-type.c (typy_get_composite, typy_template_argument):
8673 Likewise.
8674 * python/py-value.c (valpy_referenced_value)
8675 (valpy_get_dynamic_type, value_has_field): Likewise.
8676 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8677 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8678 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8679 * spu-tdep.c (spu_scalar_value_p): Likewise.
8680 * symtab.c (lookup_symbol_aux): Likewise.
8681 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8682 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8683 Likewise.
8684 * valops.c (value_cast_pointers, value_cast)
8685 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8686 (value_struct_elt, value_struct_elt_bitpos)
8687 (value_find_oload_method_list, find_overload_match)
8688 (value_rtti_indirect_type): Likewise.
8689 * valprint.c (val_print_scalar_type_p, generic_val_print):
8690 Likewise.
8691 * value.c (value_actual_type, value_as_address, unpack_long)
8692 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8693 (coerce_ref): Likewise.
8694 * varobj.c (varobj_get_value_type): Likewise.
8695
3fcf899d
AV
86962017-03-20 Artemiy Volkov <artemiyv@acm.org>
8697
8698 PR gdb/14441
8699 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8700 table of constants.
8701 * python/lib/gdb/command/explore.py: Support exploring values
8702 of rvalue reference types.
8703 * python/lib/gdb/types.py: Implement get_basic_type() for
8704 rvalue reference types.
8705 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8706 constant.
8707 * python/py-value.c (valpy_getitem): Add an rvalue reference
8708 check.
8709 (valpy_reference_value): Add new parameter "refcode".
8710 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8711 New wrappers for valpy_reference_value().
8712 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8713 (gdbpy_invoke_xmethod): Likewise.
8714
4297a3f0
AV
87152017-03-20 Artemiy Volkov <artemiyv@acm.org>
8716
8717 PR gdb/14441
8718 * dwarf2read.c (process_die, read_type_die_1): Handle the
8719 DW_TAG_rvalue_reference_type DIE.
8720 (read_tag_reference_type): Add new parameter "refcode".
8721
e1cb3213
AV
87222017-03-20 Artemiy Volkov <artemiyv@acm.org>
8723
8724 PR gdb/14441
8725 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8726 (c_type_print_modifier, c_type_print_varspec_suffix)
8727 (c_type_print_base): Support printing rvalue reference types.
8728 * c-valprint.c (c_val_print, c_value_print): Support printing
8729 rvalue reference values.
8730
e4347c89
AV
87312017-03-20 Artemiy Volkov <artemiyv@acm.org>
8732
8733 PR gdb/14441
8734 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8735 typename.
8736 * cp-support.c (replace_typedefs): Handle
8737 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8738 * python/py-type.c (typy_lookup_type): Likewise.
8739
53cc15f5
AV
87402017-03-20 Artemiy Volkov <artemiyv@acm.org>
8741
8742 PR gdb/14441
8743 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8744 * parse.c (insert_type): Change assert statement.
8745 (follow_types): Handle rvalue reference types.
8746 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8747 constant.
8748
a65cfae5
AV
87492017-03-20 Artemiy Volkov <artemiyv@acm.org>
8750
8751 PR gdb/14441
8752 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8753 value_ref() interface.
8754 * c-valprint.c (c_value_print): Likewise.
8755 * infcall.c (value_arg_coerce): Likewise.
8756 * python/py-value.c (valpy_reference_value): Likewise.
8757 * valops.c (value_cast, value_reinterpret_cast)
8758 (value_dynamic_cast, typecmp): Likewise.
8759 (value_ref): Parameterize by kind of return value reference type.
8760 * value.h (value_ref): Add new parameter "refcode".
8761
3b224330
AV
87622017-03-20 Artemiy Volkov <artemiyv@acm.org>
8763
8764 PR gdb/14441
8765 * dwarf2read.c (read_tag_reference_type): Use
8766 lookup_lvalue_reference_type() instead of lookup_reference_type().
8767 * eval.c (evaluate_subexp_standard): Likewise.
8768 * f-exp.y: Likewise.
8769 * gdbtypes.c (make_reference_type, lookup_reference_type):
8770 Generalize with rvalue reference types.
8771 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8772 convenience wrappers for lookup_reference_type().
8773 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8774 reference kind parameter.
8775 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8776 wrappers for lookup_reference_type().
8777 * guile/scm-type.c (gdbscm_type_reference): Use
8778 lookup_lvalue_reference_type() instead of lookup_reference_type().
8779 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8780 * parse.c (follow_types): Likewise.
8781 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8782 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8783 Likewise.
8784 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8785 (gdbpy_invoke_xmethod): Likewise.
8786 * stabsread.c: Provide extra argument to make_reference_type()
8787 call.
8788 * valops.c (value_ref, value_rtti_indirect_type): Use
8789 lookup_lvalue_reference_type() instead of lookup_reference_type().
8790
f9aeb8d4
AV
87912017-03-20 Artemiy Volkov <artemiyv@acm.org>
8792
8793 PR gdb/14441
8794 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8795 (TYPE_IS_REFERENCE): New macro.
8796 (struct type): Add rvalue_reference_type field.
8797 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8798
51457a05
MAL
87992017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8800
8801 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8802 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8803 New function definition.
8804 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8805 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8806 New function declaration.
8807 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8808 * mi/mi-interp.h: New file.
8809 * solib.c (info_sharedlibrary_command): Replace for loop with
8810 ALL_SO_LIBS macro
8811 * solib.h (update_solib_list): New function declaration.
8812 (so_list_head): Move macro.
8813 * solist.h (ALL_SO_LIBS): New macro.
8814
e696b3ad
MAL
88152017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8816
8817 * infcmd.c (post_create_inferior): Remove unused argument in
8818 call to solib_add.
8819 * remote.c (remote_start_remote): Likewise.
8820 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8821 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8822 (enable_break): Likewise.
8823 * solib.c (update_solib_list): Remove unused target argument
8824 and its documentation.
8825 (solib_add): Remove unused target argument. Remove unused
8826 argument in call to update_solib_list.
8827 (info_sharedlibrary_command): Remove unused argument in call
8828 to update_solib_list.
8829 (sharedlibrary_command): Remove unused argument in call to
8830 solib_add.
8831 (handle_solib_event): Likewise.
8832 (reload_shared_libraries): Likewise.
8833 * solib.h (solib_add): Remove unused target argument.
8834
dcb84eda
AA
88352017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8836
8837 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8838 (s390_displaced_step_fixup): Cover relative branches with the
8839 default fixup handling. This fixes lack of support for some
8840 relative branch instructions.
8841
d9cb6cdc
SM
88422017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8843
8844 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8845 ptid from regcache.
8846
1afaf9f4
SM
88472017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8848
8849 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8850 i386_darwin_store_inferior_registers): Use ptid from regcache.
8851
aac12e24
SM
88522017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8853
8854 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8855 i386bsd_store_inferior_registers): Use ptid from regcache.
8856
bbe1eef1
SM
88572017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8858
8859 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8860 hppaobsd_store_registers): Use ptid from regcache.
8861
10799020
SM
88622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8863
8864 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8865 hppanbsd_store_registers): Use ptid from regcache.
8866
00204cf7
SM
88672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8868
8869 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8870 from regcache. Use get_ptrace_pid.
8871
11a33714
SM
88722017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8873
8874 * corelow.c (get_core_register_section): Use ptid from regcache,
8875 update doc.
8876
317cd492
SM
88772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8878
8879 * bsd-uthread.c (bsd_uthread_fetch_registers,
8880 bsd_uthread_store_registers): Use ptid from regcache, set and
8881 restore inferior_ptid.
8882
9ac8a7c2
SM
88832017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8884
8885 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8886 fetch_fp_regs, store_register, store_regs, store_fp_register,
8887 store_fp_regs): Use ptid from regcache.
8888
4ac4bb6a
SM
88892017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8890
8891 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8892 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8893 store_vfp_regs): Use ptid from regcache.
8894
9bcbdca8
PA
88952017-03-17 Pedro Alves <palves@redhat.com>
8896
8897 PR remote/21188
8898 * ser-base.c (ser_base_wait_for): Add comment.
8899 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8900 version.
8901 * ser-unix.c (hardwire_raw): Remove reference to
8902 scb->current_timeout.
8903 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8904 (hardwire_ops): Install ser_base_readchar instead of
8905 hardwire_readchar.
8906 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8907 Remove fields.
8908
7503099f
JG
89092017-03-17 Jonah Graham <jonah@kichwacoders.com>
8910
8911 PR gdb/19637
8912 * python/lib/gdb/printer/bound_registers.py: Add support for
8913 Python 3.
8914
7942e96e
AA
89152017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8916
8917 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8918 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8919 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8920 byte_offset to subobj_byte_offset. Fix the handling of
8921 DWARF_VALUE_STACK on big-endian targets when coming via an
8922 implicit pointer.
8923 (dwarf2_evaluate_loc_desc): Adjust call to
8924 dwarf2_evaluate_loc_desc_full.
8925 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8926 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8927
ba14f379
YQ
89282017-03-16 Yao Qi <yao.qi@linaro.org>
8929
8930 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8931 and REVSH instructions.
8932
b121eeb9
YQ
89332017-03-16 Yao Qi <yao.qi@linaro.org>
8934
8935 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8936 (arm_record_test): Declare.
8937 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8938 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8939 align with the manual.
8940 (thumb_record_misc): Adjust the code order to align with the
8941 manual.
8942 (thumb2_record_decode_insn_handler): Fix instruction matching.
8943 (instruction_reader_thumb): New class.
8944 (arm_record_test): New function.
8945
728a7913
YQ
89462017-03-16 Yao Qi <yao.qi@linaro.org>
8947
8948 * arm-tdep.c (abstract_memory_reader): New class.
8949 (instruction_reader): New class.
8950 (extract_arm_insn): Add argument 'reader'. Callers updated.
8951 (decode_insn): Likewise.
8952
34b43320
DE
89532017-03-16 Doug Evans <dje@google.com>
8954
a7c0469f
DE
8955 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8956 member. Change type of TYPE member to SCM. All uses updated.
8957 (lsscm_make_lazy_string_smob): Add assert.
8958 (lsscm_make_lazy_string): Flag bad length values.
8959 (lsscm_elt_type): New function.
8960 (gdbscm_lazy_string_to_value): Rewrite to use
8961 lsscm_safe_lazy_string_to_value.
8962 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8963 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8964 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8965 in incoming type.
8966 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8967 * guile/scm-type.c (tyscm_scm_to_type): New function.
8968
89692017-03-15 Doug Evans <dje@google.com>
8970
34b43320
DE
8971 PR python/17728, python/18439, python/18779
8972 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8973 member. Change type of TYPE member to PyObject *. All uses updated.
8974 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8975 (gdbpy_create_lazy_string_object): Flag bad length values.
8976 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8977 Handle typedefs in incoming type.
8978 (stpy_lazy_string_elt_type): New function.
8979 (gdbpy_extract_lazy_string): Call it.
8980 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8981 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8982 typedefs in incoming type.
8983
a3a5fecc
DE
89842017-03-16 Doug Evans <dje@google.com>
8985
8986 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8987 * guile/scm-type.c (tyscm_scm_to_type): New function.
8988
28f1c605
JW
89892017-03-16 Jiong Wang <jiong.wang@arm.com>
8990
8991 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8992 "ULONGEST" for "skip".
8993
87c336f6
AA
89942017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8995
8996 PR gdb/21220
8997 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8998 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8999 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9000 over ptrace peek/poke until end of buffer or error.
9001
cf81cf60
SM
90022017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9003
9004 * parse.c (length_of_subexp): Make static.
9005 * parser-defs.h (length_of_subexp): Remove.
9006
a379284a
AA
90072017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9008
9009 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9010 as well.
9011
8a6200ba
PA
90122017-03-14 Pedro Alves <palves@redhat.com>
9013
9014 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9015 (main): Use std::unique_ptr. Remove calls to
9016 cp_demangled_name_parse_free.
9017
f79ec206
SM
90182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9019
9020 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9021 alphabsd_store_inferior_registers): Use regcache->ptid instead
9022 of inferior_ptid.
9023
edb5fb00
SM
90242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9025
9026 * aix-thread.c (aix_thread_fetch_registers,
9027 aix_thread_store_registers): Use regcache->ptid instead of
9028 inferior_ptid.
9029
55119686
SM
90302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9031
9032 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9033 store_gregs_to_thread, fetch_fpregs_from_thread,
9034 store_fpregs_to_thread): Use regcache->ptid instead of
9035 inferior_ptid.
9036
6a06fbb7
SM
90372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9038
9039 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9040 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9041 instead of inferior_ptid.
9042
c6386875
SM
90432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9044
9045 * target.c (target_fetch_registers, target_store_registers): Add
9046 assert.
9047
ddaaf0fb
SM
90482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9049
9050 * regcache.h (regcache_get_ptid): New function.
9051 * regcache.c (regcache_get_ptid): New function.
9052
b9da89d1 90532017-03-13 Mark Wielaard <mark@klomp.org>
9054
9055 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9056
5f4d1085
KS
90572017-03-10 Keith Seitz <keiths@redhat.com>
9058
9059 PR c++/8218
9060 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9061
c65d6b55
PA
90622017-03-08 Pedro Alves <palves@redhat.com>
9063
9064 PR gdb/18360
9065 * infrun.c (start_step_over, do_target_resume, resume)
9066 (restart_threads): Assert we're not resuming a thread that is
9067 meant to be stopped.
9068 (infrun_thread_stop_requested_callback): Delete.
9069 (infrun_thread_stop_requested): If the thread is internally
9070 stopped, queue a pending stop event and clear the thread's
9071 inline-frame state.
9072 (handle_stop_requested): New function.
9073 (handle_syscall_event, handle_inferior_event_1): Use
9074 handle_stop_requested.
9075 (handle_stop_requested): New function.
9076 (handle_signal_stop): Set the thread's stop_signal here instead of
9077 at caller.
9078 (finish_step_over): Clear step over info unconditionally.
9079 (handle_signal_stop): If the user had interrupted the event
9080 thread, consider the stop a random signal.
9081 (handle_signal_stop) <signal arrived while stepping over
9082 breakpoint>: Don't restart threads here.
9083 (stop_waiting): Don't clear step-over info here.
9084
15c22686
PA
90852017-03-08 Pedro Alves <palves@redhat.com>
9086
9087 PR 21206
9088 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9089 goes to argument 2, not 1.
9090
6e5d74e7
PA
90912017-03-08 Pedro Alves <palves@redhat.com>
9092
9093 PR cli/21218
9094 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9095 display_gdb_prompt.
9096 (command_line_input): Add comment.
9097
9753a2f6
PA
90982017-03-08 Pedro Alves <palves@redhat.com>
9099
9100 PR tui/21216
9101 * tui/tui-file.c (tui_file::write): New.
9102 * tui/tui-file.h (tui_file): Override "write".
9103 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9104 factored out from ...
9105 (tui_puts): ... here.
9106 (tui_putc): Use them.
9107 (tui_write): New function.
9108 * tui/tui-io.h (tui_write): Declare.
9109
1672e0d9
SDJ
91102017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9111
9112 * Makefile.in (SFILES): Replace "environ.c" with
9113 "common/environ.c".
9114 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9115 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9116 to...
9117 * common/environ.c: ... here.
9118 * environ.h: Moved to...
9119 * common/environ.h: ... here.
9120
f7bb4e3a
PB
91212017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9122
9123 * gdbarch.sh (pstring_ptr): New static function.
9124 (gdbarch_disassembler_options): Use it.
9125 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9126 not valid_disassembler_option->name.
9127 * gdbarch.c: Regenerate.
9128
e45ced6c
PB
91292017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9130
9131 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9132
5f6fd321
PA
91332017-03-07 Pedro Alves <palves@redhat.com>
9134
9135 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9136
6dbb839a 91372017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9138
9139 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9140 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9141 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9142 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9143
d274ecf4
SM
91442017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9145
9146 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9147
df97be55
SM
91482017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9149
9150 * remote.c (remote_add_target_side_commands): Use range-based
9151 for loop.
9152
7d45f3df
YQ
91532017-03-03 Yao Qi <yao.qi@linaro.org>
9154
9155 PR gdb/21165
9156 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9157 value is lazy.
9158 * valprint.c (common_val_print): Likewise.
9159
65b48a81
PB
91602017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9161
9162 * NEWS: Mention new set/show disassembler-options commands.
9163 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9164 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9165 (prospective_options): New static variable.
9166 (gdb_disassembler::gdb_disassembler): Initialize
9167 m_di.disassembler_options.
9168 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9169 (get_disassembler_options): New function.
9170 (set_disassembler_options): Likewise.
9171 (set_disassembler_options_sfunc): Likewise.
9172 (show_disassembler_options_sfunc): Likewise.
9173 (disassembler_options_completer): Likewise.
9174 (_initialize_disasm): Likewise.
9175 * disasm.h (get_disassembler_options): New prototype.
9176 (set_disassembler_options): Likewise.
9177 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9178 (gdbarch_verify_disassembler_options): Likewise.
9179 * gdbarch.c: Regenerate.
9180 * gdbarch.h: Likewise.
9181 * arm-tdep.c (num_disassembly_options): Delete.
9182 (set_disassembly_style): Likewise.
9183 (arm_disassembler_options): New static variable.
9184 (set_disassembly_style_sfunc): Convert short style name into long
9185 option name. Call set_disassembler_options.
9186 (show_disassembly_style_sfunc): New function.
9187 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9188 set_gdbarch_verify_disassembler_options.
9189 (_initialize_arm_tdep): Delete regnames variable and update callers.
9190 (arm_disassembler_options): Initialize.
9191 (disasm_options): New variable.
9192 (num_disassembly_options): Rename from this...
9193 (num_disassembly_styles): ...to this. Compute by scanning through
9194 disasm_options.
9195 (valid_disassembly_styles): Initialize using disasm_options.
9196 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9197 set_arm_regname_option.
9198 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9199 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9200 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9201 set_gdbarch_verify_disassembler_options.
9202 * s390-tdep.c (s390_disassembler_options): New static variable.
9203 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9204 set_gdbarch_verify_disassembler_options.
9205
d538e36d
SM
92062017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9207
9208 * remote.c (remote_add_target_side_condition): Remove "struct"
9209 keyword from range-based for loop.
9210
83621223
SM
92112017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9212
9213 * remote.c (remote_add_target_side_condition): Use range-based
9214 for loop. Update comment.
9215
2123df0e
YQ
92162017-02-27 Yao Qi <yao.qi@linaro.org>
9217
9218 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9219
8e368124
AH
92202017-02-26 Alan Hayward <alan.hayward@arm.com>
9221
9222 * regcache.c (regcache_raw_update): New function.
9223 (regcache_raw_read): Move code to regcache_raw_update.
9224 * regcache.h (regcache_raw_update): New declaration.
9225 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9226
a49dd8dd
JK
92272017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9228
9229 * dwarf2read.c (create_debug_type_hash_table): Initialize
9230 header.signature and header.type_offset_in_tu.
9231
34e4bae9
PA
92322017-02-24 Pedro Alves <palves@redhat.com>
9233
9234 * symtab.c (make_file_symbol_completion_list_1): Use
9235 add_symtab_completions.
9236
b0e4b369
AH
92372017-02-24 Alan Hayward <alan.hayward@arm.com>
9238
9239 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9240
975c21ab
AH
92412017-02-24 Alan Hayward <alan.hayward@arm.com>
9242
9243 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9244 I386_MAX_REGISTER_SIZE.
9245 (i386_pseudo_register_write): Likewise.
9246 (i386_process_record): Likewise.
9247 * i387-tdep.c (i387_supply_xsave): Likewise.
9248 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9249 (store_register): Likewise.
9250
14bc53a8
PA
92512017-02-23 Pedro Alves <palves@redhat.com>
9252
9253 * ada-lang.c: Include "common/function-view.h".
9254 (ada_iterate_over_symbols): Adjust to use function_view as
9255 callback type.
9256 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9257 (ada_make_symbol_completion_list): Use a lambda.
9258 (ada_exc_search_name_matches): Delete.
9259 (name_matches_regex): New.
9260 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9261 * compile/compile-c-support.c: Include "common/function-view.h".
9262 (print_one_macro): Change prototype to accept a ui_file pointer.
9263 (write_macro_definitions): Use a lambda.
9264 * dwarf2read.c: Include "common/function-view.h".
9265 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9266 (dw2_expand_symtabs_matching): Adjust to use function_view as
9267 callback type.
9268 * language.h: Include "common/function-view.h".
9269 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9270 function_view as callback type.
9271 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9272 * linespec.c: Include "common/function-view.h".
9273 (collect_info::add_symbol): New method.
9274 (struct symbol_and_data_callback, iterate_inline_only, struct
9275 symbol_matcher_data, iterate_name_matcher): Delete.
9276 (iterate_over_all_matching_symtabs): Adjust to use function_view
9277 as callback type and lambdas.
9278 (iterate_over_file_blocks): Adjust to use function_view as
9279 callback type.
9280 (decode_compound_collector): Now a class with private fields.
9281 (decode_compound_collector::release_symbols): New method.
9282 (collect_one_symbol): Rename to...
9283 (decode_compound_collector::operator()): ... this and adjust.
9284 (lookup_prefix_sym): decode_compound_collector construction bits
9285 move to decode_compound_collector ctor. Pass the
9286 decode_compound_collector object directly as callback. Remove
9287 cleanups and use decode_compound_collector::release_symbols
9288 instead.
9289 (symtab_collector): Now a class with private fields.
9290 (symtab_collector::release_symtabs): New method.
9291 (add_symtabs_to_list): Rename to...
9292 (symtab_collector::operator()): ... this and adjust.
9293 (collect_symtabs_from_filename): symtab_collector construction
9294 bits move to symtab_collector ctor. Pass the symtab_collector
9295 object directly as callback. Remove cleanups and use
9296 symtab_collector::release_symtabs instead.
9297 (collect_symbols): Delete.
9298 (add_matching_symbols_to_info): Use lambdas.
9299 * macrocmd.c (print_macro_callback): Delete.
9300 (info_macro_command): Use a lambda.
9301 (info_macros_command): Pass print_macro_definition as callable
9302 directly.
9303 (print_one_macro): Remove 'ignore' parameter.
9304 (macro_list_command): Adjust.
9305 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9306 (macro_for_each_data::user_data): Delete field.
9307 (foreach_macro): Adjust to call the function_view.
9308 (macro_for_each): Adjust to use function_view as callback type.
9309 (foreach_macro_in_scope): Adjust to call the function_view.
9310 (macro_for_each_in_scope): Adjust to use function_view as callback
9311 type.
9312 * macrotab.h: Include "common/function-view.h".
9313 (macro_callback_fn): Declare a prototype instead of a pointer.
9314 Remove "user_data" parameter.
9315 (macro_for_each, macro_for_each_in_scope): Adjust to use
9316 function_view as callback type.
9317 * psymtab.c (partial_map_expand_apply)
9318 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9319 Adjust to use function_view as callback type and to return bool.
9320 (psym_expand_symtabs_matching): Adjust to use function_view as
9321 callback types.
9322 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9323 to use function_view as callback type and to return bool.
9324 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9325 callback types.
9326 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9327 as callback types.
9328 * symfile.h: Include "common/function-view.h".
9329 (expand_symtabs_file_matcher_ftype)
9330 (expand_symtabs_symbol_matcher_ftype)
9331 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9332 return bool.
9333 (quick_symbol_functions::map_symtabs_matching_filename)
9334 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9335 function_view as callback type and return bool.
9336 (expand_symtabs_matching): Adjust to use function_view as callback
9337 type.
9338 (maintenance_expand_name_matcher)
9339 (maintenance_expand_file_matcher): Delete.
9340 (maintenance_expand_symtabs): Use lambdas.
9341 * symtab.c (iterate_over_some_symtabs): Adjust to use
9342 function_view as callback types and return bool.
9343 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9344 of a cleanup.
9345 (lookup_symtab_callback): Delete.
9346 (lookup_symtab): Use a lambda.
9347 (iterate_over_symbols): Adjust to use function_view as callback
9348 type.
9349 (struct search_symbols_data, search_symbols_file_matches)
9350 (search_symbols_name_matches): Delete.
9351 (search_symbols): Use a pair of lambdas.
9352 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9353 (symtab_expansion_callback): Delete.
9354 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9355 * symtab.h: Include "common/function-view.h".
9356 (iterate_over_some_symtabs): Adjust to use function_view as
9357 callback type and return bool.
9358 (iterate_over_symtabs): Adjust to use function_view as callback
9359 type.
9360 (symbol_found_callback_ftype): Remove 'data' parameter and return
9361 bool.
9362 (iterate_over_symbols): Adjust to use function_view as callback
9363 type.
9364
07e253aa
PA
93652017-02-23 Pedro Alves <palves@redhat.com>
9366
9367 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9368 (%.o) <unittests/%.c>: New pattern.
9369 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9370 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9371 * common/function-view.h: New file.
9372 * unittests/function-view-selftests.c: New file.
9373 * configure: Regenerate.
9374
8eaf5320
SM
93752017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9376
9377 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9378 inferior_ptid.
9379 * go32-nat.c (go32_thread_alive): Likewise.
9380
38768751
YQ
93812017-02-23 Yao Qi <yao.qi@linaro.org>
9382
9383 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9384 delete.
9385
0a8beaba
YQ
93862017-02-23 Yao Qi <yao.qi@linaro.org>
9387
9388 * varobj.c (varobj_clear_saved_item): Use delete instead of
9389 xfree.
9390 (update_dynamic_varobj_children): Likewise.
9391
58fdfd2c
JK
93922017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9393
9394 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9395
1b90b139
SM
93962017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9397
9398 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9399 m_enum_value to 0 in default constructor.
9400
2039d74e
EBM
94012017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9402
9403 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9404 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9405 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9406 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9407 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9408 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9409 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9410 IS_STORE_CONDITIONAL_INSN.
9411
7814882a
JK
94122017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9413
9414 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9415
0ae60b63
JK
94162017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9417
9418 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9419
0224619f
JK
94202017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9421
9422 * dwarf2read.c (skip_one_die, read_attribute_value)
9423 (dwarf2_const_value_attr, dump_die_shallow)
9424 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9425 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9426
0af92d60
JK
94272017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9428
9429 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9430 (dwarf_parse_macro_header): Accept DWARF version 5.
9431 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9432
216f72a1
JK
94332017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9434
9435 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9436 DW_AT_GNU_*.
9437 * common/common-exceptions.h (enum errors): Likewise.
9438 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9439 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9440 (dwarf_expr_context::execute_stack_op): Likewise.
9441 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9442 Likewise.
9443 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9444 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9445 (show_entry_values_debug, call_site_to_target_addr)
9446 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9447 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9448 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9449 (value_of_dwarf_block_entry, indirect_pieced_value)
9450 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9451 (disassemble_dwarf_expression): Likewise.
9452 * dwarf2read.c (process_die, inherit_abstract_dies)
9453 (read_call_site_scope): Likewise.
9454 * gdbtypes.h (struct func_type, struct call_site_parameter)
9455 (struct call_site): Likewise.
9456 * stack.c (read_frame_arg): Likewise.
9457 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9458
43988095
JK
94592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9460
9461 * defs.h (read_unsigned_leb128): New declaration.
9462 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9463 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9464 (dwarf2_find_location_expression): Call also
9465 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9466 * dwarf2loc.h (dwarf2_version): New declaration.
9467 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9468 rnglists.
9469 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9470 .debug_rnglists.
9471 (struct dwop_section_names): Add loclists_dwo.
9472 (dwop_section_names): Add .debug_loclists.dwo.
9473 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9474 (struct dwarf2_per_cu_data): Add dwarf_version.
9475 (struct dwo_sections): Add loclists.
9476 (struct attr_abbrev): Add implicit_const.
9477 (read_indirect_line_string): New declaration.
9478 (read_unsigned_leb128): Delete declaration.
9479 (rcuh_kind): New definition.
9480 (read_and_check_comp_unit_head): Change parameter
9481 is_debug_types_section to section_kind.
9482 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9483 (read_comp_unit_head): Change parameter abfd to section, add parameter
9484 section_kind. Handle DWARF-5.
9485 (error_check_comp_unit_head): Accept also DWARF version 5.
9486 (read_and_check_comp_unit_head): Change parameter
9487 is_debug_types_section to section_kind.
9488 (read_and_check_type_unit_head): Delete function.
9489 (read_abbrev_offset): Handle DWARF-5.
9490 (create_debug_type_hash_table): Add parameter section_kind. Process
9491 only DW_UT_type. Use signature and type_offset_in_tu from struct
9492 comp_unit_head.
9493 (create_debug_types_hash_table): Update create_debug_type_hash_table
9494 caller.
9495 (create_all_type_units): Call create_debug_type_hash_table.
9496 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9497 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9498 caller.
9499 (skip_one_die): Handle DW_FORM_implicit_const.
9500 (dwarf2_rnglists_process): New function.
9501 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9502 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9503 (read_attribute_value): Handle DW_FORM_implicit_const,
9504 DW_FORM_line_strp.
9505 (read_attribute): Handle DW_FORM_implicit_const.
9506 (read_indirect_string_at_offset_from): New function from
9507 read_indirect_string_at_offset.
9508 (read_indirect_string_at_offset): Call
9509 read_indirect_string_at_offset_from.
9510 (read_indirect_line_string_at_offset): New function.
9511 (read_indirect_string): New function comment.
9512 (read_indirect_line_string): New function.
9513 (read_unsigned_leb128): Make it global.
9514 (dwarf2_string_attr): Handle DWARF-5.
9515 (add_include_dir_stub, read_formatted_entries): New functions.
9516 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9517 Handle DWARF-5.
9518 (per_cu_header_read_in): Update read_comp_unit_head caller.
9519 (dwarf2_version): New function.
9520 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9521 rnglists.
9522 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9523 fields.
9524
22d2f3ab
JK
95252017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9526
9527 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9528
5f46c5a5
JK
95292017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9530
9531 * dwarf2read.c (dwarf2_ranges_process): New function from
9532 dwarf2_ranges_read.
9533 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9534 dwarf2_ranges_process.
9535
78d4d2c5
JK
95362017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9537
9538 * dwarf2read.c (create_debug_type_hash_table): New function from
9539 create_debug_types_hash_table.
9540 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9541 (create_all_type_units, open_and_init_dwo_file): Update
9542 create_debug_types_hash_table callers.
9543
1b076f25
SDJ
95442017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9545
9546 PR gdb/16188
9547 * fork-child.c (trace_start_error): Fix thinko. va_end should
9548 refer to 'ap', not 'args'.
9549
0db8980c
SDJ
95502017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9551 Pedro Alves <palves@redhat.com>
9552
9553 PR gdb/16188
9554 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9555 calls succeeded.
9556 * fork-child.c (trace_start_error): New function.
9557 (trace_start_error_with_name): Likewise.
9558 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9559 * inf-ptrace.c (inf_ptrace_me): Likewise.
9560 * inferior.h (trace_start_error): New prototype.
9561 (trace_start_error_with_name): Likewise.
9562
99e8a4f9
SDJ
95632017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9564
9565 PR gdb/21164
9566 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9567 NULL before using it.
9568 * symmisc.c (maintenance_print_symbols): Likewise.
9569 (maintenance_print_msymbols): Likewise.
9570
4e746bb6
TW
95712017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9572
9573 * NEWS: Add record Python bindings entry.
9574
95752017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9576
9577 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9578 py-record-full.o.
9579 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9580 * python/py-record-btrace.c, python/py-record-btrace.h,
9581 python/py-record-full.c, python/py-record-full.h: New file.
9582 * python/py-record.c: Add include for py-record-btrace.h and
9583 py-record-full.h.
9584 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9585 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9586 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9587 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9588 New definition.
9589 (gdbpy_initialize_btrace): New export.
9590 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9591
95922017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9593
9594 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9595 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9596 * python/py-record.c: New file.
9597 * python/python-internal.h (gdbpy_start_recording,
9598 gdbpy_current_recording, gdpy_stop_recording,
9599 gdbpy_initialize_record): New export.
9600 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9601 (python_GdbMethods): Add gdbpy_start_recording,
9602 gdbpy_current_recording and gdbpy_stop_recording.
9603
96042017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9605
9606 * record-btrace.c (record_btrace_record_method): New function.
9607 (init_record_btrace_ops): Initialize to_record_method.
9608 * record-full.c (record_full_record_method): New function.
9609 (init_record_full_ops, init_record_full_core_ops): Add
9610 record_full_record_method.
9611 * record.h (enum record_method): New enum.
9612 * target-debug.h (target_debug_print_enum_record_method: New define.
9613 * target-delegates.c: Regenerate.
9614 * target.c (target_record_method): New function.
9615 * target.h: Include record.h.
9616 (struct target_ops) <to_record_method>: New field.
9617 (target_record_method): New export.
9618
96192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9620
9621 * record.h (record_start, record_stop): New export.
9622 * record.c (record_start, record_stop): New function.
9623
96242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9625
9626 * btrace.c (btrace_fetch): Copy function call segments pointer
9627 into a vector.
9628 (btrace_clear): Clear the vector.
9629 (btrace_find_insn_by_number): Use binary search to find the correct
9630 function call segment.
9631 * btrace.h (brace_fun_p): New typedef.
9632 (struct btrace_thread_info) <functions>: New field.
9633
96342017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9635
9636 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9637 * btrace.c (btrace_decode_error): ... here. New function.
9638 * btrace.h (btrace_decode_error): New export.
9639
96402017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9641
9642 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9643 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9644 btrace_find_insn_by_number): Remove special case for gaps.
9645 * btrace.h (btrace_insn_get_error): New export.
9646 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9647 * record-btrace.c (btrace_insn_history): Print number for gaps.
9648 (record_btrace_info, record_btrace_goto): Handle gaps.
9649
3f77c769
TT
96502017-02-14 Tom Tromey <tom@tromey.com>
9651
9652 PR python/13598:
9653 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9654 event.
9655 * python/py-evts.c (gdbpy_initialize_py_events): Add
9656 before_prompt registry.
9657 * python/py-events.h (events_object) <before_prompt>: New field.
9658
4c2c7ac6
MM
96592017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9660
9661 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9662
5cf30ebf
LM
96632017-02-13 Luis Machado <lgustavo@codesourcery.com>
9664
9665 * symfile (_initialize_symfile): Add usage text to the load command's
9666 help text.
9667
26a06916
SM
96682017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9669
9670 * utils.c (defaulted_query): Don't query on secondary UIs.
9671
0b145e37
TT
96722017-02-10 Tom Tromey <tom@tromey.com>
9673
9674 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9675
2d8365c4
TT
96762017-02-10 Tom Tromey <tom@tromey.com>
9677
9678 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9679 "cleanup" local.
9680 * python/py-type.c (typy_legacy_template_argument): Remove
9681 unnecessary "cleanup" local.
9682
2bb8f231
TT
96832017-02-10 Tom Tromey <tom@tromey.com>
9684
9685 * python/python.c (do_start_initialization): New function, from
9686 _initialize_python.
9687 (_initialize_python): Call do_start_initialization.
9688 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9689 goto.
9690
1bdfaf42
TT
96912017-02-10 Tom Tromey <tom@tromey.com>
9692
9693 * python/py-prettyprint.c (pretty_print_one_value): Use
9694 gdbpy_ref.
9695
88b6faea
TT
96962017-02-10 Tom Tromey <tom@tromey.com>
9697
9698 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9699 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9700 gdbpy_ref.
9701 * python/py-type.c (field_new): Use gdbpy_ref.
9702 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9703 gdbpy_ref.
9704 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9705 (py_free_pspace): Likewise.
9706 (pspace_to_pspace_object): Likewise.
9707 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9708 (py_free_objfile): Likewise.
9709 (objfile_to_objfile_object): Likewise.
9710 * python/py-inferior.c (delete_thread_object): Use
9711 gdbpy_ref.
9712 (infpy_read_memory): Likewise.
9713 (py_free_inferior): Likewise.
9714 * python/py-evtregistry.c (create_eventregistry_object): Use
9715 gdbpy_ref.
9716 * python/py-event.c (create_event_object): Use gdbpy_ref.
9717
7780f186
TT
97182017-02-10 Tom Tromey <tom@tromey.com>
9719
9720 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9721 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9722 used.
9723 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9724 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9725 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9726 python/py-framefilter.c, python/py-function.c,
9727 python/py-inferior.c, python/py-infevents.c,
9728 python/py-linetable.c, python/py-newobjfileevent.c,
9729 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9730 python/py-signalevent.c, python/py-stopevent.c,
9731 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9732 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9733 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9734 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9735
d4b0bb18
TT
97362017-02-10 Tom Tromey <tom@tromey.com>
9737
9738 * ui-out.h (ui_out_emit_type): New class.
9739 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9740 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9741 and ui_out_emit_tuple.
9742 (enumerate_locals): Likewise.
9743 (py_mi_print_variables, py_print_locals, py_print_args): Use
9744 ui_out_emit_list.
9745 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9746 ui_out_emit_list.
9747 * common/gdb_optional.h: New file.
9748
f67f945c
MG
97492017-02-10 Martin Galvan <martingalvan@sourceware.org>
9750
9751 * MAINTAINERS (Write After Approval): Update my e-mail address.
9752
18da0c51
MG
97532017-02-10 Martin Galvan <martingalvan@sourceware.org>
9754
9755 PR gdb/21122
9756 * breakpoint.c (_initialize_breakpoint): Update the help description
9757 of the 'commands' command to indicate that it takes a list argument.
9758
62c14536
SM
97592017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9760
9761 * interps.c (current_interp_set_logging): Remove "return".
9762
ff6fa247
GB
97632017-02-09 Gary Benson <gbenson@redhat.com>
9764
9765 * symtab.c (add_symtab_completions): Prevent NULL pointer
9766 dereference.
9767
a474bd8e
PA
97682017-02-08 Pedro Alves <palves@redhat.com>
9769
9770 * interps.c (interp::interp): Remove reference to quiet_p.
9771 (interp_set): Make static. Remove dead "Switching to" output
9772 code.
9773 (interp_quiet_p, interp_set_quiet): Delete.
9774 (interpreter_exec_cmd): Don't set the interpreter quiet.
9775 * interps.h (interp_quiet_p): Make static.
9776 (class interp) <quiet_p>: Remove field
9777
3d7b173c
JG
97782017-02-08 Jerome Guitton <guitton@adacore.com>
9779
604c4576
JG
9780 * cli/cli-decode.c (find_command_name_length): Make it extern.
9781 * cli/cli-decode.h (find_command_name_length): Declare.
9782 * cli/cli-script.c (command_name_equals, line_first_arg):
9783 New functions.
9784 (process_next_line): Use cli-decode to parse command names.
9785 (build_command_line): Make args a constant pointer.
9786
97872017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 9788
3d7b173c
JG
9789 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9790 Remove case-insensitive search.
9791
1291063d
JM
97922017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9793
9794 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9795 at the end of the line. Avoids an ARI warning.
9796
20b477a7
LM
97972017-02-06 Luis Machado <lgustavo@codesourcery.com>
9798
9799 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9800 rdseed instructions.
9801 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9802
3f7b46f2
IR
98032017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9804
9805 PR tdep/20936
9806 Provide and use sparc32 and sparc64 target description XML files.
9807 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9808 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9809 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9810 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9811 * features/sparc/sparc32-solaris.xml: New file.
9812 * features/sparc/sparc64-solaris.xml: New file.
9813 * features/sparc/sparc32-solaris.c: Generated.
9814 * features/sparc/sparc64-solaris.c: Generated.
9815 * sparc-tdep.h: Account for differences in target descriptions.
9816 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9817 (sparc32_register_type): Use target provided registers.
9818 (validate_tdesc_registers): New function.
9819 (sparc32_gdbarch_init): Use tdesc_has_registers.
9820 Set pseudoregister functions.
9821 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9822 (sparc64_register_type): Use target provided registers.
9823 (sparc64_init_abi): Set pseudoregister functions.
9824
f0fd41c1
TT
98252017-02-03 Tom Tromey <tom@tromey.com>
9826
9827 PR rust/21097:
9828 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9829 with a single member.
9830
d6f9b0fb
PA
98312017-02-03 Pedro Alves <palves@redhat.com>
9832
9833 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9834 (cli_interp_base::~cli_interp_base): New.
9835 (cli_interp): New struct.
9836 (as_cli_interp): Cast the interp itself to cli_interp.
9837 (cli_interpreter_pre_command_loop): Rename to ...
9838 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9839 parameter.
9840 (cli_interpreter_init): Rename to ...
9841 (cli_interp::init): ... this. Remove 'self' parameter. Use
9842 boolean. Make extern.
9843 (cli_interpreter_resume): Rename to ...
9844 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9845 extern.
9846 (cli_interpreter_suspend): Rename to ...
9847 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9848 extern.
9849 (cli_interpreter_exec): Rename to ...
9850 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9851 extern.
9852 (cli_interpreter_supports_command_editing): Rename to ...
9853 (cli_interp_base::supports_command_editing): ... this. Remove
9854 'interp' parameter. Make extern.
9855 (cli_ui_out): Rename to ...
9856 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9857 Make extern.
9858 (cli_set_logging): Rename to ...
9859 (cli_interp_base::set_logging): ... this. Remove 'interp'
9860 parameter. Make extern.
9861 (cli_interp_procs): Delete.
9862 (cli_interp_factory): Adjust to use "new".
9863 * cli/cli-interp.h: Include "interps.h".
9864 (struct cli_interp_base): New struct.
9865 * interps.c (struct interp): Delete. Fields moved to interps.h.
9866 (interp_new): Delete.
9867 (interp::interp, interp::~interp): New.
9868 (interp_set): Use bool, and return void. Assume the interpreter
9869 has suspend, init and resume methods, and that the all return
9870 void.
9871 (set_top_level_interpreter): interp_set returns void.
9872 (interp_ui_out): Adapt.
9873 (current_interp_set_logging): Adapt.
9874 (interp_data): Delete.
9875 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9876 (interp_exec): Adapt.
9877 (top_level_interpreter_data): Delete.
9878 * interps.h (interp_init_ftype, interp_resume_ftype)
9879 (interp_suspend_ftype, interp_exec_ftype)
9880 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9881 (class interp): New.
9882 (interp_new): Delete.
9883 (interp_set): Now returns void. Use bool.
9884 (interp_data, top_level_interpreter_data): Delete.
9885 * mi/mi-common.h: Include interps.h.
9886 (class mi_interp): Inherit from interp. Define a ctor. Declare
9887 init, resume, suspect, exec, interp_ui_out, set_logging and
9888 pre_command_loop methods.
9889 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9890 (mi_interpreter_init): Rename to ...
9891 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9892 bool, return void and make extern. Adjust.
9893 (mi_interpreter_resume): ... Rename to ...
9894 (mi_interp::resume): ... this. Remove the 'data' parameter,
9895 return void and make extern. Adjust.
9896 (mi_interpreter_suspend): ... Rename to ...
9897 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9898 return void and make extern. Adjust.
9899 (mi_interpreter_exec): ... Rename to ...
9900 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9901 extern. Adjust.
9902 (mi_interpreter_pre_command_loop): ... Rename to ...
9903 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9904 parameter and make extern.
9905 (mi_on_normal_stop_1): Adjust.
9906 (mi_ui_out): Rename to ...
9907 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9908 parameter and make extern. Adjust.
9909 (mi_set_logging): Rename to ...
9910 (mi_interp::set_logging): ... this. Remove the 'interp'
9911 parameter and make extern. Adjust.
9912 (mi_interp_procs): Delete.
9913 (mi_interp_factory): Adjust to use 'new'.
9914 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9915 (mi_print_exception, mi_execute_command, mi_load_progress):
9916 Adjust.
9917 * tui/tui-interp.c (tui_interp): New class.
9918 (as_tui_interp): Return a tui_interp pointer.
9919 (tui_on_normal_stop, tui_on_signal_received)
9920 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9921 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9922 to use interp::interp_ui_out.
9923 (tui_init): Rename to ...
9924 (tui_interp::init): ... this. Remove the 'self' parameter, use
9925 bool, return void and make extern. Adjust.
9926 (tui_resume): Rename to ...
9927 (tui_interp::resume): ... this. Remove the 'data' parameter,
9928 return void and make extern. Adjust.
9929 (tui_suspend): Rename to ...
9930 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9931 return void and make extern. Adjust.
9932 (tui_ui_out): Rename to ...
9933 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9934 parameter, and make extern. Adjust.
9935 (tui_exec): Rename to ...
9936 (tui_interp::exec): ... this. Remove the 'data' parameter and
9937 make extern.
9938 (tui_interp_procs): Delete.
9939 (tui_interp_factory): Use "new".
9940
65c40c95
TT
99412017-02-02 Tom Tromey <tom@tromey.com>
9942
9943 * rust-exp.y (ends_raw_string, space_then_number)
9944 (rust_identifier_start_p): Return bool.
9945 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9946 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9947 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9948 (rust_chartype_p): Return bool.
9949 (val_print_struct, rust_print_struct_def, rust_print_type):
9950 Update.
9951 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9952 Return bool.
9953
b50f188d
TT
99542017-02-02 Tom Tromey <tom@tromey.com>
9955
9956 * rust-lang.c: Reindent.
9957
03c85b11
TT
99582017-02-02 Tom Tromey <tom@tromey.com>
9959
9960 * rust-lang.h (rust_crate_for_block): Update.
9961 * rust-lang.c (rust_crate_for_block): Return std::string.
9962 (rust_get_disr_info): Use std:;string, not
9963 gdb::unique_xmalloc_ptr.
9964 * rust-exp.y (crate_name): Update.
9965
9b6da501
PA
99662017-02-02 Pedro Alves <palves@redhat.com>
9967
9968 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9969 field out of gdb_disassembler_test and make it static.
9970
ec4cb20b
PA
99712017-02-02 Pedro Alves <palves@redhat.com>
9972
9973 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9974 mi1_interp and mi_interp fields.
9975
5be5dbf0
PA
99762017-02-02 Pedro Alves <palves@redhat.com>
9977
616268b6
PA
9978 * cli/cli-interp.c (struct saved_output_files, saved_output):
9979 Moved from cli/cli-logging.c.
9980 (cli_set_logging): New function.
9981 (cli_interp_procs): Install cli_set_logging.
9982 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9983 Declare.
9984 * cli/cli-logging.c (struct saved_output_files, saved_output):
9985 Moved to cli/cli-interp.c.
9986 (pop_output_files): Don't save outputs here.
9987 (make_logging_output): New function.
9988 (handle_redirections): Don't build tee nor save previous outputs
9989 here.
9990 * interps.c (current_interp_set_logging): Change prototype.
9991 Assume there's always a set_logging_proc method installed.
9992 * interps.h (interp_set_logging_ftype): Change prototype.
9993 (current_interp_set_logging): Change prototype and adjust comment.
9994 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9995 use make_logging_output.
9996 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
99972017-02-02 Pedro Alves <palves@redhat.com>
9998
5be5dbf0
PA
9999 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10000 from ...
10001 (set_logging_overwrite): ... here.
10002 (logging_no_redirect_file): Delete.
10003 (set_logging_redirect): Don't handle redirection on the fly.
10004 Instead warn that "logging off" / "logging on" is necessary.
10005 (pop_output_files): Delete references to logging_no_redirect_file.
10006 (show_logging_command): Always speak in terms of what will happen
10007 once logging is reenabled.
10008
c99cc448
PA
100092017-02-02 Pedro Alves <palves@redhat.com>
10010
10011 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10012
8b172ce7
PA
100132017-02-02 Pedro Alves <palves@redhat.com>
10014
10015 * disasm.c (gdb_pretty_print_insn): Rename to ...
10016 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10017 Remove gdbarch parameter. Adapt to clear the object's buffers
10018 instead of allocating new buffers, and to print using the object's
10019 gdb_disassembler instead of calling gdb_print_insn.
10020 (dump_insns): Use gdb_pretty_print_disassembler.
10021 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10022 (gdb_pretty_print_disassembler): New class.
10023 * record-btrace.c (btrace_insn_history): Use
10024 gdb_pretty_print_disassembler.
10025
d7e74731
PA
100262017-02-02 Pedro Alves <palves@redhat.com>
10027
10028 * ada-lang.c (type_as_string): Use string_file.
10029 * ada-valprint.c (ada_print_floating): Use string_file.
10030 * ada-varobj.c (ada_varobj_scalar_image)
10031 (ada_varobj_get_value_image): Use string_file.
10032 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10033 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10034 * breakpoint.c (update_inserted_breakpoint_locations)
10035 (insert_breakpoint_locations, reattach_breakpoints)
10036 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10037 (print_it_watchpoint): Use string_file.
10038 (save_breakpoints): Use stdio_file.
10039 * c-exp.y (oper): Use string_file.
10040 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10041 tee_file.
10042 (pop_output_files): Use delete.
10043 (handle_redirections): Use stdio_file and tee_file.
10044 * cli/cli-setshow.c (do_show_command): Use string_file.
10045 * compile/compile-c-support.c (c_compute_program): Use
10046 string_file.
10047 * compile/compile-c-symbols.c (generate_vla_size): Take a
10048 'string_file &' instead of a 'ui_file *'.
10049 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10050 of a 'ui_file *'. Use string_file.
10051 (generate_c_for_variable_locations): Take a 'string_file &'
10052 instead of a 'ui_file *'.
10053 * compile/compile-internal.h (generate_c_for_for_one_variable):
10054 Take a 'string_file &' instead of a 'ui_file *'.
10055 * compile/compile-loc2c.c (push, pushf, unary, binary)
10056 (print_label, pushf_register_address, pushf_register)
10057 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10058 'ui_file *'. Adjust.
10059 * compile/compile.c (compile_to_object): Use string_file.
10060 * compile/compile.h (compile_dwarf_expr_to_c)
10061 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10062 'ui_file *'.
10063 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10064 (replace_typedefs_qualified_name): Use string_file and
10065 obstack_copy0.
10066 * disasm.c (gdb_pretty_print_insn): Use string_file.
10067 (gdb_disassembly): Adjust reference the null_stream global.
10068 (do_ui_file_delete): Delete.
10069 (gdb_insn_length): Use null_stream.
10070 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10071 * dwarf2loc.c (dwarf2_compile_property_to_c)
10072 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10073 'string_file &' instead of a 'ui_file *'.
10074 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10075 * dwarf2read.c (do_ui_file_peek_last): Delete.
10076 (dwarf2_compute_name): Use string_file.
10077 * event-top.c (gdb_setup_readline): Use stdio_file.
10078 * gdbarch.sh (verify_gdbarch): Use string_file.
10079 * gdbtypes.c (safe_parse_type): Use null_stream.
10080 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10081 string_file.
10082 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10083 'string_file *' instead of a 'ui_file *'.
10084 (gdbscm_arch_disassemble): Use string_file.
10085 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10086 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10087 inherits from ui_file.
10088 (ioscm_file_port_delete, ioscm_file_port_rewind)
10089 (ioscm_file_port_put): Delete.
10090 (ioscm_file_port_write): Rename to ...
10091 (ioscm_file_port::write): ... this. Remove file_port_magic
10092 checks.
10093 (ioscm_file_port_new): Delete.
10094 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10095 ui_file_up.
10096 * guile/scm-type.c (tyscm_type_name): Use string_file.
10097 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10098 Use string_file.
10099 * infcmd.c (print_return_value_1): Use string_file.
10100 * infrun.c (print_target_wait_results): Use string_file.
10101 * language.c (add_language): Use string_file.
10102 * location.c (explicit_to_string_internal): Use string_file.
10103 * main.c (captured_main_1): Use null_file.
10104 * maint.c (maintenance_print_architecture): Use stdio_file.
10105 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10106 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10107 event_channel>: Change type to mi_console_file pointer.
10108 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10109 (mi_console_file_delete): Delete.
10110 (struct mi_console_file): Delete.
10111 (mi_console_file_magic): Delete.
10112 (mi_console_file_new): Delete.
10113 (mi_console_file::mi_console_file): New.
10114 (mi_console_file_delete): Delete.
10115 (mi_console_file_fputs): Delete.
10116 (mi_console_file::write): New.
10117 (mi_console_raw_packet): Delete.
10118 (mi_console_file::flush): New.
10119 (mi_console_file_flush): Delete.
10120 (mi_console_set_raw): Rename to ...
10121 (mi_console_file::set_raw): ... this.
10122 * mi/mi-console.h (class mi_console_file): New class.
10123 (mi_console_file_new, mi_console_set_raw): Delete.
10124 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10125 (mi_set_logging): Use delete and tee_file. Adjust.
10126 * mi/mi-main.c (output_register): Use string_file.
10127 (mi_cmd_data_evaluate_expression): Use string_file.
10128 (mi_cmd_data_read_memory): Use string_file.
10129 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10130 * mi/mi-out.c (mi_ui_out::main_stream): New.
10131 (mi_ui_out::rewind): Use main_stream and
10132 string_file.
10133 (mi_ui_out::put): Use main_stream and string_file.
10134 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10135 Allocate a 'string_file' instead.
10136 (mi_out_new): Don't allocate a mem_fileopen stream here.
10137 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10138 (mi_ui_out::main_stream): Declare method.
10139 * printcmd.c (eval_command): Use string_file.
10140 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10141 * python/py-arch.c (archpy_disassemble): Use string_file.
10142 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10143 * python/py-frame.c (frapy_str): Use string_file.
10144 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10145 Use string_file.
10146 * python/py-type.c (typy_str): Use string_file.
10147 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10148 * python/py-value.c (valpy_str): Use string_file.
10149 * record-btrace.c (btrace_insn_history): Use string_file.
10150 * regcache.c (regcache_print): Use stdio_file.
10151 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10152 * remote.c (escape_buffer): Use string_file.
10153 * rust-lang.c (rust_get_disr_info): Use string_file.
10154 * serial.c (serial_open_ops_1): Use stdio_file.
10155 (do_serial_close): Use delete.
10156 * stack.c (print_frame_arg): Use string_file.
10157 (print_frame_args): Remove local mem_fileopen stream, not used.
10158 (print_frame): Use string_file.
10159 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10160 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10161 Take a 'string_file *' instead of a 'ui_file *'.
10162 * top.c (new_ui): Use stdio_file and stderr_file.
10163 (free_ui): Use delete.
10164 (execute_command_to_string): Use string_file.
10165 (quit_confirm): Use string_file.
10166 * tracepoint.c (collection_list::append_exp): Use string_file.
10167 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10168 * tui/tui-file.c: Don't include "ui-file.h".
10169 (enum streamtype, struct tui_stream): Delete.
10170 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10171 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10172 (tui_file::tui_file): New method.
10173 (tui_file_fputs): Delete.
10174 (tui_file_get_strbuf): Delete.
10175 (tui_file::puts): New method.
10176 (tui_file_adjust_strbuf): Delete.
10177 (tui_file_flush): Delete.
10178 (tui_file::flush): New method.
10179 * tui/tui-file.h: Tweak intro comment.
10180 Include ui-file.h.
10181 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10182 (tui_file_adjust_strbuf): Delete declarations.
10183 (class tui_file): New class.
10184 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10185 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10186 (tui_register_format): Use string_stream.
10187 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10188 (tui_get_function_from_frame): Use string_file.
10189 * typeprint.c (type_to_string): Use string_file.
10190 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10191 (null_stream): New global.
10192 (ui_file_delete): Delete.
10193 (ui_file::ui_file): New.
10194 (null_file_isatty): Delete.
10195 (ui_file::~ui_file): New.
10196 (null_file_rewind): Delete.
10197 (ui_file::printf): New.
10198 (null_file_put): Delete.
10199 (null_file_flush): Delete.
10200 (ui_file::putstr): New.
10201 (null_file_write): Delete.
10202 (ui_file::putstrn): New.
10203 (null_file_read): Delete.
10204 (ui_file::putc): New.
10205 (null_file_fputs): Delete.
10206 (null_file_write_async_safe): Delete.
10207 (ui_file::vprintf): New.
10208 (null_file_delete): Delete.
10209 (null_file::write): New.
10210 (null_file_fseek): Delete.
10211 (null_file::puts): New.
10212 (ui_file_data): Delete.
10213 (null_file::write_async_safe): New.
10214 (gdb_flush, ui_file_isatty): Adjust.
10215 (ui_file_put, ui_file_rewind): Delete.
10216 (ui_file_write): Adjust.
10217 (ui_file_write_for_put): Delete.
10218 (ui_file_write_async_safe, ui_file_read): Adjust.
10219 (ui_file_fseek): Delete.
10220 (fputs_unfiltered): Adjust.
10221 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10222 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10223 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10224 (set_ui_file_data): Delete.
10225 (string_file::~string_file, string_file::write)
10226 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10227 (do_ui_file_as_string, ui_file_as_string): Delete.
10228 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10229 (struct mem_file): Delete.
10230 (mem_file_new): Delete.
10231 (stdio_file::stdio_file): New.
10232 (mem_file_delete): Delete.
10233 (stdio_file::stdio_file): New.
10234 (mem_fileopen): Delete.
10235 (stdio_file::~stdio_file): New.
10236 (mem_file_rewind): Delete.
10237 (stdio_file::set_stream): New.
10238 (mem_file_put): Delete.
10239 (stdio_file::open): New.
10240 (mem_file_write): Delete.
10241 (stdio_file_magic, struct stdio_file): Delete.
10242 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10243 (stdio_file::flush): New.
10244 (stdio_file_read): Rename to ...
10245 (stdio_file::read): ... this. Adjust.
10246 (stdio_file_write): Rename to ...
10247 (stdio_file::write): ... this. Adjust.
10248 (stdio_file_write_async_safe): Rename to ...
10249 (stdio_file::write_async_safe) ... this. Adjust.
10250 (stdio_file_fputs): Rename to ...
10251 (stdio_file::puts) ... this. Adjust.
10252 (stdio_file_isatty): Delete.
10253 (stdio_file_fseek): Delete.
10254 (stdio_file::isatty): New.
10255 (stderr_file_write): Rename to ...
10256 (stderr_file::write) ... this. Adjust.
10257 (stderr_file_fputs): Rename to ...
10258 (stderr_file::puts) ... this. Adjust.
10259 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10260 (stderr_file::stderr_file): New.
10261 (tee_file_magic): Delete.
10262 (struct tee_file): Delete.
10263 (tee_file::tee_file): New.
10264 (tee_file_new): Delete.
10265 (tee_file::~tee_file): New.
10266 (tee_file_delete): Delete.
10267 (tee_file_flush): Rename to ...
10268 (tee_file::flush): ... this. Adjust.
10269 (tee_file_write): Rename to ...
10270 (tee_file::write): ... this. Adjust.
10271 (tee_file::write_async_safe): New.
10272 (tee_file_fputs): Rename to ...
10273 (tee_file::puts): ... this. Adjust.
10274 (tee_file_isatty): Rename to ...
10275 (tee_file::isatty): ... this. Adjust.
10276 * ui-file.h (struct obstack, struct ui_file): Don't
10277 forward-declare.
10278 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10279 (ui_file_write_ftype)
10280 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10281 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10282 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10283 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10284 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10285 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10286 (set_ui_file_fseek): Delete.
10287 (ui_file_data, ui_file_delete, ui_file_rewind)
10288 (struct ui_file): New.
10289 (ui_file_up): New.
10290 (class null_file): New.
10291 (null_stream): Declare.
10292 (ui_file_write_for_put, ui_file_put): Delete.
10293 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10294 Delete.
10295 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10296 (gdb_fopen, tee_file_new): Delete.
10297 (struct string_file): New.
10298 (struct stdio_file): New.
10299 (stdio_file_up): New.
10300 (struct stderr_file): New.
10301 (class tee_file): New.
10302 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10303 of a 'ui_file *'. Adjust.
10304 * ui-out.h (class ui_out) <field_stream>: Likewise.
10305 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10306 (null_stream): Delete.
10307 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10308 Adjust.
10309 * utils.h (struct ui_file): Delete forward declaration..
10310 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10311 (error_stream): Take a 'string_file &' instead of a
10312 'ui_file *'.
10313 * varobj.c (varobj_value_get_print_value): Use string_file.
10314 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10315 * gdbarch.c: Regenerate.
10316
187808b0
PA
103172017-02-02 Pedro Alves <palves@redhat.com>
10318
10319 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10320 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10321 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10322 Adjust to call gdb_print_insn instead of
10323 gdb_disassembler::print_insn.
10324 (dump_insns, do_mixed_source_and_assembly_deprecated)
10325 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10326 'gdbarch' parameter. Remove gdb_disassembler parameter.
10327 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10328 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10329 declaration.
10330 (gdb_pretty_print_insn): Re-add declaration.
10331 * record-btrace.c (btrace_insn_history): Don't allocate a
10332 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10333
7a8eb317
SM
103342017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10335
10336 * disasm.h (gdb_disassembly): Remove file_string parameter.
10337 * disasm.c (gdb_disassembly): Likewise.
10338 * cli/cli-cmds.c (print_disassembly): Adapt.
10339 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10340 * stack.c (do_gdb_disassembly): Likewise.
10341
7346ef59
AA
103422017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10343
10344 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10345 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10346 targets. And if the implicit value is longer than needed, extract
10347 the first bytes instead of the "least significant" ones.
10348
cd4007e4
MM
103492017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10350
10351 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10352 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10353 (btrace_fetch): Assert can_access_registers_ptid.
10354 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10355 validate_registers_access.
10356
cf77c34e
MM
103572017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10358
10359 * gdbthread.h (can_access_registers_ptid): New.
10360 * thread.c (can_access_registers_ptid): New.
10361
be85ce7d
PA
103622017-02-01 Pedro Alves <palves@redhat.com>
10363
10364 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10365
29b0b251
PA
103662017-01-31 Pedro Alves <palves@redhat.com>
10367
10368 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10369 Fix typos.
10370
289b5b24
PA
103712017-01-31 Pedro Alves <palves@redhat.com>
10372
10373 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10374 not used.
10375
b47413b4
PA
103762017-01-31 Pedro Alves <palves@redhat.com>
10377
10378 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10379
60adb36c
PA
103802017-01-31 Pedro Alves <palves@redhat.com>
10381
10382 * common/scoped_restore.h
10383 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10384 change the value's parameter type to T2.
10385 (make_scoped_restore): Likewise.
10386
2735833d
WT
103872017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10388 Richard Henderson <rth@redhat.com>
10389
10390 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10391 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10392 GS_BASE for older kernels.
10393 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10394 GS_BASE for older kernels.
10395 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10396 and GS_BASE to the offset table.
10397 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10398 system register group.
10399 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10400 for older kernels.
10401 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10402 amd64 ABI.
10403 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10404 AMD64_GSBASE_REGNUM.
10405 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10406 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10407 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10408 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10409 i386/64bit-segments.xml in those rules.
10410 * features/i386/64bit-segments.xml: New file.
10411 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10412 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10413 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10414 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10415 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10416 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10417 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10418 * features/i386/amd64-avx-linux.c: Regenerated.
10419 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10420 * features/i386/amd64-avx-mpx.c: Regenerated.
10421 * features/i386/amd64-avx512-linux.c: Regenerated.
10422 * features/i386/amd64-linux.c: Regenerated.
10423 * features/i386/amd64-mpx-linux.c: Regenerated.
10424 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10425 * features/i386/i386-avx-mpx.c: Regenerated.
10426 * features/i386/x32-avx-linux.c: Regenerated.
10427 * features/i386/x32-avx512-linux.c: Regenerated.
10428 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10429 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10430 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10431 * regformats/i386/amd64-linux.dat: Regenerated.
10432 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10433 * regformats/i386/x32-avx-linux.dat: Regenerated.
10434 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10435 * regformats/i386/x32-linux.dat: Regenerated.
10436
8884e97e
WT
104372017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10438
10439 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10440 Set to AMD64_NUM_REGS.
10441
7005d26a
WT
104422017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10443
10444 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10445 that checks validity of a register number.
10446
4bd2e1b2
KC
104472017-01-27 Kees Cook <keescook@google.com>
10448
10449 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10450 fetch_fpregs if target has fpa registers.
10451 (arm_linux_store_inferior_registers): Call store_fpregs if target
10452 has fpa registers.
10453
7cf1de6c
AA
104542017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10455
10456 * cris-tdep.c (cris_gdbarch_init): Remove check for
10457 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10458
874a1c8c
AT
104592017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10460
10461 * corelow.c (get_core_register_section): Check for regset
10462 existence before checking for REGSET_VARIABLE_SIZE.
10463
d8b49cf0
YQ
104642017-01-26 Yao Qi <yao.qi@linaro.org>
10465 Pedro Alves <palves@redhat.com>
10466
10467 PR gdb/20939
10468 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10469 call memory_error, save memaddr instead.
10470 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10471 negative, cal memory_error.
10472 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10473
658ca58c
YQ
104742017-01-26 Yao Qi <yao.qi@linaro.org>
10475
10476 * disasm-selftests.c (memory_error_test): New function.
10477 (_initialize_disasm_selftests): Register memory_error_test.
10478
79843d45
YQ
104792017-01-26 Yao Qi <yao.qi@linaro.org>
10480
10481 * Makefile.in (SFILES): Add disasm-selftests.c and
10482 selftest-arch.c.
10483 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10484 * disasm-selftests.c: New file.
10485 * selftest-arch.c: New file.
10486 * selftest-arch.h: New file.
10487
8cafda32
YQ
104882017-01-26 Yao Qi <yao.qi@linaro.org>
10489
10490 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10491 to bfd_arch_mep. Don't return 0 if section is not
10492 found. Call print_insn_mep.
10493
e47ad6c0
YQ
104942017-01-26 Pedro Alves <palves@redhat.com>
10495 Yao Qi <yao.qi@linaro.org>
10496
10497 * arm-tdep.c: Include "disasm.h".
10498 (gdb_print_insn_arm): Update code to get gdbarch.
10499 * disasm.c (dis_asm_read_memory): Change it to
10500 gdb_disassembler::dis_asm_read_memory.
10501 (dis_asm_memory_error): Likewise.
10502 (dis_asm_print_address): Likewise.
10503 (gdb_pretty_print_insn): Change it to
10504 gdb_disassembler::pretty_print_insn.
10505 (dump_insns): Add one argument gdb_disassemlber. All
10506 callers updated.
10507 (do_mixed_source_and_assembly_deprecated): Likewise.
10508 (do_mixed_source_and_assembly): Likewise.
10509 (do_assembly_only): Likewise.
10510 (gdb_disassembler::gdb_disassembler): New.
10511 (gdb_disassembler::print_insn): New.
10512 * disasm.h (class gdb_disassembler): New.
10513 (gdb_pretty_print_insn): Remove declaration.
10514 (gdb_disassemble_info): Likewise.
10515 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10516 (gdbscm_disasm_read_memory_worker): Update.
10517 (gdbscm_disasm_read_memory): Update.
10518 (gdbscm_disasm_memory_error): Remove.
10519 (gdbscm_disasm_print_address): Remove.
10520 (gdbscm_disassembler::gdbscm_disassembler): New.
10521 (gdbscm_print_insn_from_port): Update.
10522 * mips-tdep.c: Include disasm.h.
10523 (gdb_print_insn_mips): Update code to get gdbarch.
10524 * record-btrace.c (btrace_insn_history): Update.
10525 * spu-tdep.c: Include disasm.h.
10526 (struct spu_dis_asm_data): Remove.
10527 (struct spu_dis_asm_info): New.
10528 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10529 SPU id.
10530 (gdb_print_insn_spu): Cast disassemble_info to
10531 spu_dis_asm_info.
10532
80d75874
YQ
105332017-01-26 Yao Qi <yao.qi@linaro.org>
10534
10535 * disasm.c (do_ui_file_delete): Delete.
10536 (gdb_insn_length): Move code creating stream to ...
10537 * utils.c (null_stream): ... here. New function.
10538 * utils.h (null_stream): Declare.
10539
60685cd0
SM
105402017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10541
10542 * python/py-inferior.c (find_thread_object): Return directly
10543 from the loop. Remove "found" variable.
10544
eb1cdb62
JB
105452017-01-21 Joel Brobecker <brobecker@adacore.com>
10546
10547 GDB 7.12.1 released.
10548
b1ce6568
SM
105492017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10550
10551 * python/py-function.c (fnpy_call): Reorder declarations to have
10552 the gdbpy_enter object declared first.
10553 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10554
6f8b0407
SM
105552017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10556
fec93fb1 10557 PR python/21068
6f8b0407
SM
10558 * python/python-internal.h (PyMem_RawMalloc): Define for
10559 Python < 3.4.
10560 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10561 PyMem_RawMalloc instead of PyMem_Malloc.
10562
78cbbba8
LM
105632017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10564 Luis Machado <lgustavo@codesourcery.com>
10565
10566 * NEWS (New commands): Mention flash-erase.
10567 (New MI commands): Mention target-flash-erase.
10568 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10569 command.
10570 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10571 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10572 * target.c (flash_erase_command): New function.
10573 (initialize_targets): Add new flash-erase command.
10574 * target.h (flash_erase_command): New declaration.
10575
2132fe85
JB
105762017-01-20 Joel Brobecker <brobecker@adacore.com>
10577
10578 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10579 HAVE_SYS_PROCFS_H is defined.
10580
d1dff226
AH
105812017-01-18 Alan Hayward <alan.hayward@arm.com>
10582
10583 * remote.c (struct cached_reg): Change data into a pointer.
10584 * (stop_reply_dtr): Free data pointers before deleting vector.
10585 (process_stop_reply): Likewise.
10586 (remote_parse_stop_reply): Allocate space for data
10587
9890e433
AH
105882017-01-18 Alan Hayward <alan.hayward@arm.com>
10589
10590 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10591 MAX_REGISTER_SIZE.
10592 (amd64_pseudo_register_read_value): Likewise.
10593 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10594 (store_register_using_P): Likewise.
10595 * regcache.c (regcache_xfer_part): Likewise.
10596
7a36499a
IR
105972017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10598
10599 Split real and pseudo registers.
10600 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10601 (sparc32_pseudo_regnum): New enum.
10602 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10603 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10604 (SPARC32_CP0_REGISTERS): New macro.
10605 (sparc32_pseudo_register_name): New function.
10606 (sparc32_register_name): Use sparc32_pseudo_register_name.
10607 (sparc32_pseudo_register_type): New function.
10608 (sparc32_register_type): Use sparc32_pseudo_register_type.
10609 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10610 pseudo register numbers.
10611 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10612 (SPARC64_CP0_REGISTERS): New macro.
10613 (sparc64_pseudo_register_name): New function.
10614 (sparc64_register_name): Use sparc64_pseudo_register_name.
10615 (sparc64_pseudo_register_type): New function.
10616 (sparc64_register_type): Use sparc64_pseudo_register_type.
10617 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10618 pseudo register numbers.
10619 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10620 sparc64_store_arguments): Handle pseudo register numbers.
10621
6f8976bf
YQ
106222017-01-13 Yao Qi <yao.qi@linaro.org>
10623
10624 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10625 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10626 output.
10627 (getpkt_or_notif_sane_1): Likewise.
10628
e4241ace
YQ
106292017-01-13 Yao Qi <yao.qi@linaro.org>
10630
10631 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10632 of CC. Pass "-x c++-header" instead of "-x c".
10633
3015c064
SM
106342017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10635
10636 * remote.c (remote_can_async_p): Update comment.
10637
fde1b17d
SM
106382017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10639
10640 * linux-nat.c (linux_nat_can_async_p): Update comment.
10641
ca1ca08b
SM
106422017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10643
10644 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10645
4ad2da73
SM
106462017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10647
10648 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10649
c8b23b3f
TT
106502017-01-10 Tom Tromey <tom@tromey.com>
10651
10652 * python/py-type.c (typy_legacy_template_argument): Update.
10653 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10654 ~demangle_parse_info): Declare new members.
10655 (cp_demangled_name_to_comp): Return unique_ptr.
10656 (cp_demangled_name_parse_free)
10657 (make_cleanup_cp_demangled_name_parse_free)
10658 (cp_new_demangle_parse_info): Remove.
10659 * cp-support.c (do_demangled_name_parse_free_cleanup)
10660 (make_cleanup_cp_demangled_name_parse_free): Remove.
10661 (inspect_type, cp_canonicalize_string_full)
10662 (cp_canonicalize_string): Update.
10663 (mangled_name_to_comp): Change return type.
10664 (cp_class_name_from_physname, method_name_from_physname)
10665 (cp_func_name, cp_remove_params): Update.
10666 * cp-name-parser.y (demangle_parse_info): New constructor, from
10667 cp_new_demangle_parse_info.
10668 (~demangle_parse_info): New destructor, from
10669 cp_demangled_name_parse_free.
10670 (cp_merge_demangle_parse_infos): Update.
10671 (cp_demangled_name_to_comp): Change return type.
10672
1ac32117
TT
106732017-01-10 Tom Tromey <tom@tromey.com>
10674
10675 * top.c (prevent_dont_repeat): Change return type.
10676 * python/python.c (execute_gdb_command): Use std::string.
10677 Update.
10678 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10679 * command.h (prevent_dont_repeat): Change return type.
10680 * breakpoint.c (bpstat_do_actions_1): Update.
10681
0cf08227
TT
106822017-01-10 Tom Tromey <tom@tromey.com>
10683
10684 * value.h (scoped_value_mark::~scoped_value_mark): Call
10685 free_to_mark.
10686 (scoped_value_mark::free_to_mark): New method.
10687 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10688 scoped_value_mark.
10689
eb115069
TT
106902017-01-10 Tom Tromey <tom@tromey.com>
10691
10692 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10693 (valpy_reference_value, valpy_const_value, valpy_get_address)
10694 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10695 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10696 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10697 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10698 scoped_value_mark.
10699 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10700 * value.h (scoped_value_mark): New class.
10701
906768f9
TT
107022017-01-10 Tom Tromey <tom@tromey.com>
10703
10704 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10705 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10706 * psymtab.c (discard_psymtabs_upto): Remove.
10707 (make_cleanup_discard_psymtabs): Remove.
10708 (struct psymtab_state): Remove.
10709
bef155c3
TT
107102017-01-10 Tom Tromey <tom@tromey.com>
10711
10712 * record-full.c (record_full_save_cleanups): Remove.
10713 (record_full_save): Use gdb::unlinker.
10714 * gcore.c (do_bfd_delete_cleanup): Remove.
10715 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10716 cleanups.
10717 * dwarf2read.c (unlink_if_set): Remove.
10718 (write_psymtabs_to_index): Use gdb::unlinker.
10719 * common/gdb_unlinker.h: New file.
10720
192b62ce
TT
107212017-01-10 Tom Tromey <tom@tromey.com>
10722
10723 * windows-tdep.c (windows_xfer_shared_library): Update.
10724 * windows-nat.c (windows_make_so): Update.
10725 * utils.h (make_cleanup_bfd_unref): Remove.
10726 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10727 * symfile.h (symfile_bfd_open)
10728 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10729 * symfile.c (read_symbols, symbol_file_add)
10730 (separate_debug_file_exists): Update.
10731 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10732 (generic_load, reread_symbols): Update.
10733 * symfile-mem.c (symbol_file_add_from_memory): Update.
10734 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10735 (spu_symbol_file_add_from_memory): Update.
10736 * solist.h (struct target_so_ops) <bfd_open>: Return
10737 gdb_bfd_ref_ptr.
10738 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10739 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10740 gdb_bfd_ref_ptr.
10741 (solib_map_sections, reload_shared_libraries_1): Update.
10742 * solib-svr4.c (enable_break): Update.
10743 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10744 * solib-frv.c (enable_break2): Update.
10745 * solib-dsbt.c (enable_break): Update.
10746 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10747 gdb_bfd_ref_ptr.
10748 (darwin_solib_get_all_image_info_addr_at_init): Update.
10749 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10750 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10751 * record-full.c (record_full_save): Update.
10752 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10753 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10754 * minidebug.c (find_separate_debug_file_in_section): Return
10755 gdb_bfd_ref_ptr.
10756 * machoread.c (macho_add_oso_symfile): Change abfd to
10757 gdb_bfd_ref_ptr.
10758 (macho_symfile_read_all_oso): Update.
10759 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10760 (macho_symfile_read): Update.
10761 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10762 (jit_bfd_try_read_symtab): Update.
10763 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10764 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10765 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10766 gdb_bfd_ref_ptr.
10767 (gdb_bfd_ref_policy): New struct.
10768 (gdb_bfd_ref_ptr): New typedef.
10769 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10770 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10771 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10772 gdb_bfd_ref_ptr.
10773 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10774 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10775 (gcore_command): Update.
10776 * exec.c (exec_file_attach): Update.
10777 * elfread.c (elf_symfile_read): Update.
10778 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10779 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10780 (open_and_init_dwo_file): Update.
10781 (open_dwp_file): Return gdb_bfd_ref_ptr.
10782 (open_and_init_dwp_file): Update.
10783 * corelow.c (core_open): Update.
10784 * compile/compile-object-load.c (compile_object_load): Update.
10785 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10786 * coffread.c (coff_symfile_read): Update.
10787 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10788 gdb_bfd_ref_ptr. Rename.
10789 (dump_bfd_file, restore_command): Update.
10790 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10791 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10792 (find_separate_debug_file_by_buildid): Update.
10793
50315b21
TT
107942017-01-10 Tom Tromey <tom@tromey.com>
10795
10796 * common/gdb_ref_ptr.h: New file.
10797 * python/py-ref.h (struct gdbpy_ref_policy): New.
10798 (gdbpy_ref): Now a typedef.
10799
fc4007c9
TT
108002017-01-10 Tom Tromey <tom@tromey.com>
10801
10802 * utils.h (make_cleanup_htab_delete): Don't declare.
10803 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10804 Remove.
10805 * linespec.c (decode_compound_collector): Add constructor,
10806 destructor.
10807 (lookup_prefix_sym): Remove cleanup.
10808 (symtab_collector): Add constructor, destructor.
10809 (collect_symtabs_from_filename): Remove cleanup.
10810 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10811 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10812 Use htab_up.
10813 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10814 * dwarf2read.c (dw2_expand_symtabs_matching)
10815 (dw2_map_symbol_filenames, dwarf_decode_macros)
10816 (write_psymtabs_to_index): Use htab_up.
10817 * dwarf2loc.c (func_verify_no_selftailcall)
10818 (call_site_find_chain_1, func_verify_no_selftailcall)
10819 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10820 std::vector, gdb::unique_xmalloc_ptr.
10821 (call_sitep): Remove typedef.
10822 (dwarf2_locexpr_baton_eval): Remove unused variable.
10823
8dbcee67
TT
108242017-01-10 Tom Tromey <tom@tromey.com>
10825
10826 * python/python-internal.h (make_cleanup_py_decref)
10827 (make_cleanup_py_xdecref): Don't declare.
10828 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10829 (py_xdecref, make_cleanup_py_xdecref): Remove.
10830
13df46cc
TT
108312017-01-10 Tom Tromey <tom@tromey.com>
10832
10833 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10834 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10835
06fc9bf7
TT
108362017-01-10 Tom Tromey <tom@tromey.com>
10837
10838 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10839
830a4934
TT
108402017-01-10 Tom Tromey <tom@tromey.com>
10841
10842 * python/py-utils.c (unicode_to_encoded_string)
10843 (python_string_to_target_string)
10844 (python_string_to_target_python_string)
10845 (python_string_to_host_string, gdbpy_obj_to_string)
10846 (get_addr_from_python): Use gdbpy_ref.
10847
4586d543
TT
108482017-01-10 Tom Tromey <tom@tromey.com>
10849
10850 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10851 gdbpy_ref.
10852
59876f8f
TT
108532017-01-10 Tom Tromey <tom@tromey.com>
10854
10855 * python/python.c (eval_python_command, gdbpy_decode_line)
10856 (gdbpy_run_events, gdbpy_start_type_printers)
10857 (gdbpy_apply_type_printers): Use gdbpy_ref.
10858
97d83487
TT
108592017-01-10 Tom Tromey <tom@tromey.com>
10860
10861 * python/py-param.c (get_doc_string, compute_enum_values): Use
10862 gdbpy_ref.
10863
9205649a
TT
108642017-01-10 Tom Tromey <tom@tromey.com>
10865
10866 * python/py-inferior.c (find_thread_object, build_inferior_list):
10867 Use gdbpy_ref.
10868
74c49d45
TT
108692017-01-10 Tom Tromey <tom@tromey.com>
10870
10871 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10872
16361ffb
TT
108732017-01-10 Tom Tromey <tom@tromey.com>
10874
10875 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10876 gdbpy_ref.
10877
905f2cca
TT
108782017-01-10 Tom Tromey <tom@tromey.com>
10879
10880 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10881 extra incref.
10882 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10883 Use gdbpy_ref.
10884
64081434
TT
108852017-01-10 Tom Tromey <tom@tromey.com>
10886
10887 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10888 gdbpy_ref.
10889
59e9e831
TT
108902017-01-10 Tom Tromey <tom@tromey.com>
10891
10892 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10893 decref results of PyArg_ParseTupleAndKeywords.
10894
9de10f6d
TT
108952017-01-10 Tom Tromey <tom@tromey.com>
10896
10897 * python/python.c (python_run_simple_file): Use
10898 unique_xmalloc_ptr, gdbpy_ref.
10899
2bd5759d
TT
109002017-01-10 Tom Tromey <tom@tromey.com>
10901
10902 * python/py-prettyprint.c (print_stack_unless_memory_error)
10903 (print_string_repr, print_children): Use gdbpy_ref.
10904 (dummy_python_frame): New class.
10905 (dummy_python_frame::dummy_python_frame): Rename from
10906 push_dummy_python_frame.
10907 (py_restore_tstate): Remove.
10908
3b4e0e01
TT
109092017-01-10 Tom Tromey <tom@tromey.com>
10910
10911 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10912
17a22718
TT
109132017-01-10 Tom Tromey <tom@tromey.com>
10914
10915 * python/python.c (ensure_python_env, restore_python_env):
10916 Remove.
10917 * python/python-internal.h (ensure_python_env): Don't declare.
10918 * varobj.h (varobj_ensure_python_env): Don't declare.
10919 * varobj.c (varobj_ensure_python_env): Remove.
10920
68cdc557
TT
109212017-01-10 Tom Tromey <tom@tromey.com>
10922
10923 * varobj.c (varobj_value_get_print_value): Use
10924 gdbpy_enter_varobj.
10925
1eba6383
TT
109262017-01-10 Tom Tromey <tom@tromey.com>
10927
10928 * python/py-prettyprint.c (print_string_repr, print_children):
10929 Update.
10930 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10931 of "encoding".
10932 * varobj.c (varobj_value_get_print_value): Update.
10933 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10934
bde7b3e3
TT
109352017-01-10 Tom Tromey <tom@tromey.com>
10936
10937 * varobj.c (varobj_get_display_hint)
10938 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10939 (varobj_set_visualizer, free_variable): Use
10940 gdbpy_enter_varobj.
10941
a7785f8c
TT
109422017-01-10 Tom Tromey <tom@tromey.com>
10943
10944 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10945 (do_finish_initialization): New function. Use gdbpy_ref.
10946 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10947 do_finish_initialization.
10948
2865bfce
TT
109492017-01-10 Tom Tromey <tom@tromey.com>
10950
10951 * python/py-param.c (get_set_value, get_show_value): Use
10952 gdbpy_enter, gdbpy_ref.
10953
0e9dcc75
TT
109542017-01-10 Tom Tromey <tom@tromey.com>
10955
10956 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10957
12a5cedd
TT
109582017-01-10 Tom Tromey <tom@tromey.com>
10959
10960 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10961
788f2586
TT
109622017-01-10 Tom Tromey <tom@tromey.com>
10963
10964 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10965 Use gdbpy_enter_varobj.
10966
6cd67bea
TT
109672017-01-10 Tom Tromey <tom@tromey.com>
10968
10969 * varobj.c (gdbpy_enter_varobj): New constructor.
10970 * python/python-internal.h (gdbpy_enter_varobj): New class.
10971 * python/py-varobj.c (py_varobj_get_iterator): Use
10972 gdbpy_enter_varobj.
10973
14b122bf
TT
109742017-01-10 Tom Tromey <tom@tromey.com>
10975
10976 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10977 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10978 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10979 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10980 unique_xmalloc_ptr.
10981 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10982
bf1ca3b9
TT
109832017-01-10 Tom Tromey <tom@tromey.com>
10984
10985 * python/py-xmethods.c (invoke_match_method): Use
10986 gdbpy_ref.
10987
572a5524
TT
109882017-01-10 Tom Tromey <tom@tromey.com>
10989
10990 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10991 gdbpy_enter, gdbpy_ref.
10992
396a78b6
TT
109932017-01-10 Tom Tromey <tom@tromey.com>
10994
10995 * python/python.c (python_interactive_command): Use gdbpy_enter.
10996
a88b13c7
TT
109972017-01-10 Tom Tromey <tom@tromey.com>
10998
10999 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11000 gdbpy_ref.
11001
e9f0c363
TT
110022017-01-10 Tom Tromey <tom@tromey.com>
11003
11004 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11005 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11006
6349f452
TT
110072017-01-10 Tom Tromey <tom@tromey.com>
11008
11009 * utils.h (htab_deleter): New struct.
11010 (htab_up): New typedef.
11011 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11012 gdbpy_enter, gdbpy_ref, htab_up.
11013
c0171de6
TT
110142017-01-10 Tom Tromey <tom@tromey.com>
11015
11016 * python/py-unwind.c (pending_frame_invalidate): Remove.
11017 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11018
f18e226f
TT
110192017-01-10 Tom Tromey <tom@tromey.com>
11020
11021 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11022 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11023
c57af3f1
TT
110242017-01-10 Tom Tromey <tom@tromey.com>
11025
11026 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11027
60e600ec
TT
110282017-01-10 Tom Tromey <tom@tromey.com>
11029
11030 * python/python.c (gdbpy_eval_from_control_command)
11031 (gdbpy_source_script, gdbpy_run_events)
11032 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11033 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11034 gdbpy_enter.
11035
bf7da5b0
TT
110362017-01-10 Tom Tromey <tom@tromey.com>
11037
11038 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11039
2d38bced
TT
110402017-01-10 Tom Tromey <tom@tromey.com>
11041
11042 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11043
07bc7329
TT
110442017-01-10 Tom Tromey <tom@tromey.com>
11045
11046 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11047 (python_on_inferior_call_pre, python_on_inferior_call_post)
11048 (python_on_memory_change, python_on_register_change)
11049 (python_inferior_exit, python_new_objfile, add_thread_object)
11050 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11051
6e7c365e
TT
110522017-01-10 Tom Tromey <tom@tromey.com>
11053
11054 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11055 (bpfinishpy_handle_exit): Use gdbpy_enter.
11056
6ba0cd40
TT
110572017-01-10 Tom Tromey <tom@tromey.com>
11058
11059 * python/py-cmd.c (cmdpy_destroyer)
11060 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11061 gdbpy_enter.
11062
de2dc875
TT
110632017-01-10 Tom Tromey <tom@tromey.com>
11064
11065 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11066 gdbpy_enter.
11067 (gdbpy_breakpoint_has_cond): Likewise.
11068
4ecee2c4
TT
110692017-01-10 Tom Tromey <tom@tromey.com>
11070
11071 * python/python.c (gdbpy_enter): New constructor.
11072 (~gdbpy_enter): New destructor.
11073 (restore_python_env, ensure_python_env): Rewrite.
11074 * python/python-internal.h (gdbpy_enter): New class.
11075
37fce74f
TT
110762017-01-10 Tom Tromey <tom@tromey.com>
11077
11078 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11079
53a0cca3
TT
110802017-01-10 Tom Tromey <tom@tromey.com>
11081
11082 * python/py-value.c (value_has_field, get_field_flag)
11083 (get_field_type, valpy_getitem, convert_value_from_python): Use
11084 gdbpy_ref.
11085
ff3724f5
TT
110862017-01-10 Tom Tromey <tom@tromey.com>
11087
11088 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11089 gdbpy_ref.
11090
0700aea5
TT
110912017-01-10 Tom Tromey <tom@tromey.com>
11092
11093 * python/py-prettyprint.c (search_pp_list)
11094 (find_pretty_printer_from_objfiles)
11095 (find_pretty_printer_from_progspace)
11096 (find_pretty_printer_from_gdb, find_pretty_printer)
11097 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11098 gdbpy_ref.
11099
1bb44c9f
TT
111002017-01-10 Tom Tromey <tom@tromey.com>
11101
11102 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11103
87ce03fd
TT
111042017-01-10 Tom Tromey <tom@tromey.com>
11105
11106 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11107 (ltpy_get_all_source_lines): Use gdbpy_ref.
11108
ee0a3fb8
TT
111092017-01-10 Tom Tromey <tom@tromey.com>
11110
11111 * python/py-framefilter.c (extract_sym, extract_value)
11112 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11113 gdbpy_ref.
11114
bf2a52fa
TT
111152017-01-10 Tom Tromey <tom@tromey.com>
11116
11117 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11118
f59fe7f8
TT
111192017-01-10 Tom Tromey <tom@tromey.com>
11120
11121 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11122
80bd970a
TT
111232017-01-10 Tom Tromey <tom@tromey.com>
11124
11125 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11126 gdbpy_ref.
11127
d1b3de2e
TT
111282017-01-10 Tom Tromey <tom@tromey.com>
11129
11130 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11131
3bb43384
TT
111322017-01-10 Tom Tromey <tom@tromey.com>
11133
11134 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11135 (typy_range): Use gdbpy_ref.
11136
abf5651e
TT
111372017-01-10 Tom Tromey <tom@tromey.com>
11138
11139 * python/py-threadevent.c (create_thread_event_object): Use
11140 gdbpy_ref.
11141 * python/py-stopevent.c (create_stop_event_object): Simplify.
11142 (emit_stop_event): Use gdbpy_ref.
11143 * python/py-signalevent.c (create_signal_event_object): Use
11144 gdbpy_ref.
11145 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11146 (emit_new_objfile_event, create_clear_objfiles_event_object)
11147 (emit_clear_objfiles_event): Use gdbpy_ref.
11148 * python/py-infevents.c (create_inferior_call_event_object)
11149 (create_register_changed_event_object)
11150 (create_memory_changed_event_object, emit_inferior_call_event)
11151 (emit_memory_changed_event, emit_register_changed_event): Use
11152 gdbpy_ref.
11153 * python/py-exitedevent.c (create_exited_event_object)
11154 (emit_exited_event): Use gdbpy_ref.
11155 * python/py-event.h (evpy_emit_event): Remove
11156 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11157 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11158 * python/py-continueevent.c (emit_continue_event): Use
11159 gdbpy_ref.
11160 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11161 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11162 gdbpy_ref.
11163 * python/py-bpevent.c (create_breakpoint_event_object): Use
11164 gdbpy_ref.
11165
a68ff33e
TT
111662017-01-10 Tom Tromey <tom@tromey.com>
11167
11168 * python/py-ref.h: New file.
11169
7becfd03
SM
111702017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11171
11172 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11173 void.
11174 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11175 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11176 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11177 * ui-out.c (ui_out::redirect): Likewise.
11178 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11179 * cli/cli-logging.c (set_logging_redirect): Update call site of
11180 ui_out::redirect.
11181 (handle_redirections): Likewise.
11182 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11183 * top.c (execute_command_to_string): Likewise.
11184 * utils.c (do_ui_out_redirect_pop): Likewise.
11185
df294654
SM
111862017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11187
11188 * stack.c (_initialize_stack): Update "frame" command help message.
11189
f5e6296e
IB
111902017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11191
11192 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11193
0e2d6fa6
YQ
111942017-01-06 Yao Qi <yao.qi@linaro.org>
11195
11196 * x86-linux-nat.h: Include gdb_proc_service.h.
11197
44d6d3f9
YQ
111982017-01-06 Yao Qi <yao.qi@linaro.org>
11199
11200 * ser-base.h: Include serial.h.
11201
656731fe
YQ
112022017-01-06 Yao Qi <yao.qi@linaro.org>
11203
11204 * ppc-linux-tdep.h: Include ppc-tdep.h.
11205
1ca8f924
YQ
112062017-01-06 Yao Qi <yao.qi@linaro.org>
11207
11208 * nat/amd64-linux-siginfo.h: Include signal.h.
11209
bc3008c4
YQ
112102017-01-06 Yao Qi <yao.qi@linaro.org>
11211
11212 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11213
66c80d03
YQ
112142017-01-06 Yao Qi <yao.qi@linaro.org>
11215
11216 * mi/mi-parse.h: Include mi-cmds.h.
11217
051d2dda
YQ
112182017-01-06 Yao Qi <yao.qi@linaro.org>
11219
11220 * inf-loop.c: Don't include "target.h".
11221 * inf-loop.h: Include it here.
11222
8018d34f
YQ
112232017-01-06 Yao Qi <yao.qi@linaro.org>
11224
11225 * dfp.h: Include "dboulest.h" and "expression.h".
11226
c0b8369c
YQ
112272017-01-06 Yao Qi <yao.qi@linaro.org>
11228
11229 * ax-gdb.h: Include "ax.h".
11230
ad5cba2a
YQ
112312017-01-06 Yao Qi <yao.qi@linaro.org>
11232
11233 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11234 with nat/gdb_ptrace.h.
11235
1c33cd7f
YQ
112362017-01-05 Yao Qi <yao.qi@linaro.org>
11237
11238 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11239 new line.
11240 (mips64_fbsd_sigframe_init): Likewise.
11241
c988ac1d
JB
112422017-01-04 John Baldwin <jhb@FreeBSD.org>
11243
11244 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11245 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11246
b268007c
JB
112472017-01-04 John Baldwin <jhb@FreeBSD.org>
11248
11249 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11250 * NEWS: Mention new FreeBSD/mips native configuration.
11251 * config/mips/fbsd.mh: New file.
11252 * configure.host: Add mips*-*-freebsd*.
11253 * mips-fbsd-nat.c: New file.
11254
387360da
JB
112552017-01-04 John Baldwin <jhb@FreeBSD.org>
11256
11257 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11258 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11259 * NEWS: Mention new FreeBSD/mips target.
11260 * configure.tgt: Add mips*-*-freebsd*.
11261 * mips-fbsd-tdep.c: New file.
11262 * mips-fbsd-tdep.h: New file.
11263
2aaaf250
YQ
112642017-01-04 Yao Qi <yao.qi@linaro.org>
11265
11266 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11267 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11268
61baf725
JB
112692017-01-01 Joel Brobecker <brobecker@adacore.com>
11270
6dbb839a 11271 Update copyright year range in all GDB files.
61baf725 11272
c113e7ff 112732017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 11274
c113e7ff 11275 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 11276
c113e7ff 11277For older changes see ChangeLog-2016.
c906108c
SS
11278\f
11279Local Variables:
11280mode: change-log
11281left-margin: 8
11282fill-column: 74
11283version-control: never
57da7796 11284coding: utf-8
c906108c 11285End:
This page took 2.666869 seconds and 4 git commands to generate.