Remove regcache_xmalloc
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-25 Tom Tromey <tom@tromey.com>
2
3 * regcache.h (regcache_xmalloc): Don't declare.
4 (regcache_raw_set_cached_value): Update comment.
5 * regcache.c (regcache_xmalloc): Remove.
6 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
7 * jit.c (jit_frame_sniffer): Use new.
8 * frame.c (frame_save_as_regcache): Use new.
9
10 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
11
12 * NEWS: Advertise support for guarded-storage registers on IBM z.
13
14 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
15
16 * s390-linux-nat.c (have_regset_gs): New static variable.
17 (s390_linux_fetch_inferior_registers): Handle guarded-storage
18 control block and guarded-storage broadcast control regsets.
19 (s390_read_description): Detect whether the target has
20 guarded-storage support, return appropriate tdesc.
21 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
22 (features/s390x-gs-linux64.c): Likewise.
23 (struct gdbarch_tdep) <have_gs>: New field.
24 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
25 (s390_gsbc_regset): New variables.
26 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
27 and s390_gsbc_regset, if applicable.
28 (s390_core_read_description): Check whether core file was from a
29 target with guarded-storage support; include appropriate regsets.
30 (s390_gdbarch_init): Add registers for guarded-storage support.
31 (_initialize_s390_tdep): Initialize new target descriptions that
32 include registers for guarded-storage support.
33 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
34 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
35 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
36 (S390_NUM_REGS): Adjust macro definition.
37 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
38 (tdesc_s390x_gs_linux64): New declarations.
39
40 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
41
42 * features/s390-gs-linux64.xml: New file.
43 * features/s390-gs.xml: New file.
44 * features/s390-gsbc.xml: New file.
45 * features/s390x-gs-linux64.xml: New file.
46 * features/Makefile (WHICH): Add s390-gs-linux64 and
47 s390x-gs-linux64.
48 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
49 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
50 * features/s390-gs-linux64.c: New generated file.
51 * features/s390x-gs-linux64.c: New file.
52 * regformats/s390-gs-linux64.dat: New file.
53 * regformats/s390x-gs-linux64.dat: New file.
54
55 2017-09-23 Tom Tromey <tom@tromey.com>
56
57 * defs.h (make_cleanup_override_quit_handler): Don't declare.
58
59 2017-09-22 Tom Tromey <tom@tromey.com>
60
61 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
62 type to scoped_restore_tmpl.
63 <scoped_input_handler>: Initialize m_quit_handler directly.
64
65 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
66
67 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
68 (cd_command): Likewise. Free "current_directory" before
69 assigning to it.
70 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
71 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
72 * top.c (gdb_dirbuf): Remove global declaration.
73 * top.h (gdb_dirbuf): Likewise.
74
75 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
76
77 * gnulib/aclocal.m4: Regenerate.
78 * gnulib/config.in: Regenerate.
79 * gnulib/configure: Regenerate.
80 * gnulib/import/Makefile.am: Regenerate.
81 * gnulib/import/Makefile.in: Regenerate.
82 * gnulib/import/assure.h: New file.
83 * gnulib/import/at-func.c: Likewise
84 * gnulib/import/chdir-long.c: New file.
85 * gnulib/import/chdir-long.h: New file.
86 * gnulib/import/cloexec.c: New file.
87 * gnulib/import/cloexec.h: New file.
88 * gnulib/import/close.c: New file.
89 * gnulib/import/closedir.c: New file.
90 * gnulib/import/dirent-private.h: New file.
91 * gnulib/import/dup-safer.c: New file.
92 * gnulib/import/dup.c: New file.
93 * gnulib/import/dup2.c: New file.
94 * gnulib/import/error.c: New file.
95 * gnulib/import/error.h: New file.
96 * gnulib/import/exitfail.c: New file.
97 * gnulib/import/exitfail.h: New file.
98 * gnulib/import/fchdir.c: New file.
99 * gnulib/import/fcntl.c: New file.
100 * gnulib/import/fcntl.in.h: New file.
101 * gnulib/import/fd-hook.c: New file.
102 * gnulib/import/fd-hook.h: New file.
103 * gnulib/import/fd-safer.c: New file.
104 * gnulib/import/fdopendir.c: New file.
105 * gnulib/import/filename.h: New file.
106 * gnulib/import/filenamecat-lgpl.c: New file.
107 * gnulib/import/filenamecat.h: New file.
108 * gnulib/import/fstat.c: New file.
109 * gnulib/import/fstatat.c: New file.
110 * gnulib/import/getcwd-lgpl.c: New file.
111 * gnulib/import/getcwd.c: New file.
112 * gnulib/import/getdtablesize.c: New file.
113 * gnulib/import/getlogin_r.c: New file.
114 * gnulib/import/getprogname.c: New file.
115 * gnulib/import/getprogname.h: New file.
116 * gnulib/import/gettext.h: New file.
117 * gnulib/import/glob-libc.h: New file.
118 * gnulib/import/glob.c: New file.
119 * gnulib/import/glob.in.h: New file.
120 * gnulib/import/intprops.h: New file.
121 * gnulib/import/m4/chdir-long.m4: New file.
122 * gnulib/import/m4/close.m4: New file.
123 * gnulib/import/m4/closedir.m4: New file.
124 * gnulib/import/m4/d-ino.m4: New file.
125 * gnulib/import/m4/d-type.m4: New file.
126 * gnulib/import/m4/dup.m4: New file.
127 * gnulib/import/m4/dup2.m4: New file.
128 * gnulib/import/m4/error.m4: New file.
129 * gnulib/import/m4/fchdir.m4: New file.
130 * gnulib/import/m4/fcntl.m4: New file.
131 * gnulib/import/m4/fcntl_h.m4: New file.
132 * gnulib/import/m4/fdopendir.m4: New file.
133 * gnulib/import/m4/filenamecat.m4: New file.
134 * gnulib/import/m4/fstat.m4: New file.
135 * gnulib/import/m4/fstatat.m4: New file.
136 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
137 * gnulib/import/m4/getcwd-path-max.m4: New file.
138 * gnulib/import/m4/getcwd.m4: New file.
139 * gnulib/import/m4/getdtablesize.m4: New file.
140 * gnulib/import/m4/getlogin_r.m4: New file.
141 * gnulib/import/m4/getprogname.m4: New file.
142 * gnulib/import/m4/glob.m4: New file.
143 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
144 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
145 * gnulib/import/m4/mempcpy.m4: New file.
146 * gnulib/import/m4/memrchr.m4: New file.
147 * gnulib/import/m4/mode_t.m4: New file.
148 * gnulib/import/m4/msvc-inval.m4: New file.
149 * gnulib/import/m4/msvc-nothrow.m4: New file.
150 * gnulib/import/m4/open.m4: New file.
151 * gnulib/import/m4/openat.m4: New file.
152 * gnulib/import/m4/opendir.m4: New file.
153 * gnulib/import/m4/readdir.m4: New file.
154 * gnulib/import/m4/realloc.m4: New file.
155 * gnulib/import/m4/rewinddir.m4: New file.
156 * gnulib/import/m4/save-cwd.m4: New file.
157 * gnulib/import/m4/strdup.m4: New file.
158 * gnulib/import/m4/strerror.m4: New file.
159 * gnulib/import/m4/unistd-safer.m4: New file.
160 * gnulib/import/mempcpy.c: New file.
161 * gnulib/import/memrchr.c: New file.
162 * gnulib/import/msvc-inval.c: New file.
163 * gnulib/import/msvc-inval.h: New file.
164 * gnulib/import/msvc-nothrow.c: New file.
165 * gnulib/import/msvc-nothrow.h: New file.
166 * gnulib/import/open.c: New file.
167 * gnulib/import/openat-die.c: New file.
168 * gnulib/import/openat-priv.h: New file.
169 * gnulib/import/openat-proc.c: New file.
170 * gnulib/import/openat.c: New file.
171 * gnulib/import/openat.h: New file.
172 * gnulib/import/opendir.c: New file.
173 * gnulib/import/pipe-safer.c: New file.
174 * gnulib/import/readdir.c: New file.
175 * gnulib/import/realloc.c: New file.
176 * gnulib/import/rewinddir.c: New file.
177 * gnulib/import/save-cwd.c: New file.
178 * gnulib/import/save-cwd.h: New file.
179 * gnulib/import/strdup.c: New file.
180 * gnulib/import/strerror-override.c: New file.
181 * gnulib/import/strerror-override.h: New file.
182 * gnulib/import/strerror.c: New file.
183 * gnulib/import/unistd--.h: New file.
184 * gnulib/import/unistd-safer.h: New file.
185 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
186 "getcwd" and "glob".
187 * ser-tcp.c: Undefine "close" before redefining it.
188
189 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
190
191 * guile/scm-value.c (gdbscm_value_address): Initialize address,
192 get rid of res_val.
193
194 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
195
196 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
197 <sol2,sparc>: Likewise.
198 <sol2-64,i386>: Likewise.
199
200 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
201 -Wdeprecated-declarations on *-*-solaris*.
202 * configure: Regenerate.
203
204 * procfs.c: Include "nat/inferior.h".
205 (procfs_info_proc): Fix typo.
206
207 2017-09-21 Kevin Buettner <kevinb@redhat.com>
208
209 * remote.c (vector): Include.
210 (struct private_thread_info): Add field, thread_handle.
211 (free_private_thread_info): Deallocate storage associated with
212 thread handle.
213 (get_private_info_thread): Initialize `thread_handle' field.
214 (struct thread_item): Add field, thread_handle.
215 (clear_threads_listing_context): Deallocate storage associated
216 with thread handle.
217 (start_thread): Add support for "handle" attribute.
218 (thread_attributes): Add "handle".
219 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
220 field.
221 (remote_update_thread_list): Update thread_handle.
222 (remote_thread_handle_to_thread_info): New function.
223 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
224
225 2017-09-21 Kevin Buettner <kevinb@redhat.com>
226
227 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
228 function.
229 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
230 * python/python-internal.h (thread_object_type): Declare.
231
232 2017-09-21 Kevin Buettner <kevinb@redhat.com>
233
234 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
235 (target_thread_handle_to_thread_info): Declare.
236 * target.c (target_thread_handle_to_thread_info): New function.
237 * target-delegates.c: Regenerate.
238 * gdbthread.h (find_thread_by_handle): Declare.
239 * thread.c (find_thread_by_handle): New function.
240 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
241 function.
242 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
243
244 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
245
246 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
247
248 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
249
250 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
251
252 2017-09-21 Yao Qi <yao.qi@linaro.org>
253
254 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
255 to gdb_target_obs.
256
257 2017-09-20 Tom Tromey <tom@tromey.com>
258
259 * breakpoint.c (struct counted_command_line): Remove.
260 (breakpoint_commands): Update.
261 (alloc_counted_command_line, incref_counted_command_line)
262 (decref_counted_command_line, do_cleanup_counted_command_line)
263 (make_cleanup_decref_counted_command_line): Remove.
264 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
265 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
266 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
267 (save_breakpoints): Update.
268 * breakpoint.h (counted_command_line): Now a typedef to
269 shared_ptr.
270 (struct breakpoint) <commands>: Now a counted_command_line.
271 (struct bpstats) <command>: Likewise.
272
273 2017-09-20 Tom Tromey <tom@tromey.com>
274
275 * breakpoint.c (struct commands_info, do_map_commands_command):
276 Remove.
277 (commands_command_1): Update.
278 (iterate_over_related_breakpoints): Take a function_view.
279 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
280 (delete_command): Update.
281 (map_breakpoint_numbers): Take a function_view.
282 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
283 (disable_command): Update.
284 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
285 (enable_command): Update.
286 (struct disp_data, do_enable_breakpoint_disp)
287 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
288 (do_map_enable_delete_breakpoint): Remove.
289 (enable_once_command, enable_count_command, enable_delete_command)
290 (delete_trace_variable_command): Update.
291
292 2017-09-20 Tom Tromey <tom@tromey.com>
293
294 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
295 (bpstat_clear): Use delete.
296 (bpstats): New constructors.
297 (bpstat_copy, bpstat_stop_status): Use new.
298 (dprintf_after_condition_true): Update.
299 * breakpoint.h (bpstats::bpstats): Add constructors.
300 (bpstats::~bpstats): Add destructor.
301
302 2017-09-20 Pedro Alves <palves@redhat.com>
303
304 * eval.c (make_params): Delete, refactored as ...
305 (class fake_method): ... this new type's ctor.
306 (fake_method::~fake_method): New.
307 (evaluate_subexp_standard): Use 'fake_method'.
308
309 2017-09-20 Tom Tromey <tom@tromey.com>
310
311 * windows-nat.c (get_windows_debug_event, windows_wait)
312 (do_initial_windows_stuff, windows_attach): Update.
313 * utils.c (vwarning, internal_vproblem): Update.
314 (ui_unregister_input_event_handler_cleanup)
315 (prepare_to_handle_input): Remove.
316 (class scoped_input_handler): New.
317 (defaulted_query, prompt_for_continue): Update.
318 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
319 Update.
320 * top.c (undo_terminal_modifications_before_exit): Update.
321 * target/target.h (target_terminal_init, target_terminal_inferior)
322 (target_terminal_ours): Don't declare.
323 (class target_terminal): New.
324 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
325 (target_terminal_ours_for_output)
326 (make_cleanup_restore_target_terminal): Don't declare.
327 (target_terminal_info): Remove.
328 * target.c (enum terminal_state, terminal_state): Remove.
329 (target_terminal::terminal_state): Define.
330 (target_terminal::init): Rename from target_terminal_init.
331 (target_terminal::inferior): Rename from
332 target_terminal_inferior.
333 (target_terminal::ours): Rename from target_terminal_ours.
334 (target_terminal::ours_for_output): Rename from
335 target_terminal_ours_for_output.
336 (target_terminal::info): New method.
337 (cleanup_restore_target_terminal)
338 (make_cleanup_restore_target_terminal): Remove.
339 * solib.c (handle_solib_event): Update.
340 * remote.c (remote_serial_quit_handler): Update.
341 (remote_terminal_inferior, remote_wait_as): Update.
342 * record-full.c (record_full_wait_1): Update.
343 * nto-procfs.c (procfs_create_inferior): Update.
344 * nat/fork-inferior.c (startup_inferior): Update.
345 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
346 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
347 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
348 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
349 (mi_breakpoint_created, mi_breakpoint_deleted)
350 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
351 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
352 (mi_user_selected_context_changed, report_initial_inferior):
353 Update.
354 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
355 (linux_nat_terminal_inferior): Update.
356 * infrun.c (follow_fork_inferior)
357 (handle_vfork_child_exec_or_exit, do_target_resume)
358 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
359 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
360 Update.
361 * inflow.c (child_terminal_init, info_terminal_command): Update.
362 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
363 (attach_command): Update.
364 * infcall.c (call_thread_fsm_should_stop): Update.
365 * gnu-nat.c (gnu_attach): Update.
366 * extension.c (struct active_ext_lang_state)
367 (restore_active_ext_lang): Update.
368 * exceptions.c (print_flush): Update.
369 * event-top.c (async_enable_stdin, default_quit_handler): Update.
370 (struct quit_handler_cleanup_data, restore_quit_handler)
371 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
372 Remove.
373 * cp-support.c (gdb_demangle): Update.
374 * breakpoint.c (update_inserted_breakpoint_locations)
375 (insert_breakpoint_locations, handle_jit_event)
376 (disable_breakpoints_in_unloaded_shlib): Update.
377 * annotate.c (annotate_breakpoints_invalid)
378 (annotate_frames_invalid): Update.
379
380 2017-09-20 Tom Tromey <tom@tromey.com>
381
382 * main.c (catch_command_errors): Rename from
383 catch_command_errors_const.
384 (captured_main_1): Update.
385
386 2017-09-20 Pedro Alves <palves@redhat.com>
387
388 * cli/cli-cmds.c (list_command): Use print_sal_location.
389 (print_sal_location): New function.
390 (ambiguous_line_spec): Use print_sal_location.
391 * linespec.c (symbol_to_sal): Record the symbol in the sal.
392 * symtab.c (find_function_start_sal): Likewise.
393 * symtab.h (symtab_and_line::symbol): New field.
394
395 2017-09-20 Pedro Alves <palves@redhat.com>
396
397 * linespec.c (minsym_found): Handle non-text minsyms.
398 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
399
400 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
401
402 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
403 backslash.
404
405 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
406
407 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
408 vmovups instead vmovaps.
409 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
410
411 2017-09-19 John Baldwin <jhb@FreeBSD.org>
412
413 * NEWS (Changes since GDB 8.0): Add starti.
414 * infcmd.c (enum run_break): New.
415 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
416 case.
417 (run_command): Use enum run_how.
418 (start_command): Likewise.
419 (starti_command): New function.
420 (RUN_ARGS_HELP): New macro.
421 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
422 commands. Add starti command.
423
424 2017-09-19 Yao Qi <yao.qi@linaro.org>
425
426 * Makefile.in (monitor.o): Remove the rule.
427
428 2017-09-19 Yao Qi <yao.qi@linaro.org>
429
430 * annotate.h (struct annotate_arg_emitter): Use
431 DISABLE_COPY_AND_ASSIGN.
432 * common/refcounted-object.h (refcounted_object): Likewise.
433 * completer.h (struct completion_result): Likewise.
434 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
435 * filename-seen-cache.h (filename_seen_cache): Likewise.
436 * gdbcore.h (thread_section_name): Likewise.
437 * gdb_regex.h (compiled_regex): Likewise.
438 * gdbthread.h (scoped_restore_current_thread): Likewise.
439 * inferior.h (scoped_restore_current_inferior): Likewise.
440 * jit.c (jit_reader): Likewise.
441 * linespec.h (struct linespec_result): Likewise.
442 * mi/mi-parse.h (struct mi_parse): Likewise.
443 * nat/fork-inferior.c (execv_argv): Likewise.
444 * progspace.h (scoped_restore_current_program_space): Likewise.
445 * python/python-internal.h (class gdbpy_enter): Likewise.
446 * regcache.h (regcache): Likewise.
447 * target-descriptions.c (struct tdesc_reg): Likewise.
448 (struct tdesc_type): Likewise.
449 (struct tdesc_feature): Likewise.
450 * ui-out.h (ui_out_emit_type): Likewise.
451
452 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
453
454 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
455 label abort_expression.
456
457 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
458
459 * common/buffer.c (buffer_xml_printf): Adjust.
460 * common/xml-utils.c (xml_escape_text): Change return type to
461 std::string, update code accordingly.
462 * common/xml-utils.h (xml_escape_text): Change return type to
463 std::string.
464 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
465 * windows-tdep.c (windows_xfer_shared_library): Adjust.
466 * unittests/xml-utils-selftests.c (test_xml_escape_text):
467 Adjust.
468
469 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
470
471 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
472 (SUBDIR_UNITTESTS_OBS): Add new object file.
473 * unittests/xml-utils-selftests.c: New file.
474
475 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
476
477 * common/selftest.h (selftest): New struct/interface.
478 (register_test): Add name parameter, add new overload.
479 (run_tests): Add filter parameter.
480 (for_each_selftest_ftype): New typedef.
481 (for_each_selftest): New declaration.
482 * common/selftest.c (tests): Change type to
483 map<string, unique_ptr<selftest>>.
484 (simple_selftest): New struct.
485 (register_test): New function.
486 (register_test): Add name parameter and use it.
487 (run_tests): Add filter parameter and use it. Add prints.
488 Adjust to vector -> map change.
489 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
490 registering selftests.
491 * arm-tdep.c (_initialize_arm_tdep): Likewise.
492 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
493 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
494 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
495 * findvar.c (_initialize_findvar): Likewise.
496 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
497 * maint.c (maintenance_selftest): Update call to run_tests.
498 (maintenance_info_selftests): New function.
499 (_initialize_maint_cmds): Register "maintenance info selftests"
500 command. Update "maintenance selftest" doc.
501 * regcache.c (_initialize_regcache): Add names when registering
502 selftests.
503 * rust-exp.y (_initialize_rust_exp): Likewise.
504 * selftest-arch.c (gdbarch_selftest): New struct.
505 (gdbarch_tests): Remove.
506 (register_test_foreach_arch): Add name parameter. Call
507 register_test.
508 (tests_with_arch): Remove, move most content to
509 gdbarch_selftest::operator().
510 (_initialize_selftests_foreach_arch): Remove.
511 * selftest-arch.h (register_test_foreach_arch): Add name
512 parameter.
513 (run_tests_with_arch): New declaration.
514 * utils-selftests.c (_initialize_utils_selftests): Add names
515 when registering selftests.
516 * utils.c (_initialize_utils): Likewise.
517 * unittests/array-view-selftests.c
518 (_initialize_array_view_selftests): Likewise.
519 * unittests/environ-selftests.c (_initialize_environ_selftests):
520 Likewise.
521 * unittests/function-view-selftests.c
522 (_initialize_function_view_selftests): Likewise.
523 * unittests/offset-type-selftests.c
524 (_initialize_offset_type_selftests): Likewise.
525 * unittests/optional-selftests.c
526 (_initialize_optional_selftests): Likewise.
527 * unittests/scoped_restore-selftests.c
528 (_initialize_scoped_restore_selftests): Likewise.
529 * NEWS: Document "maintenance selftest" and "maint info
530 selftests".
531
532 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
533
534 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
535 scoped_restore.
536
537 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
538
539 * mi/mi-main.c (mi_load_progress): Make uiout variable
540 a unique_ptr.
541
542 2017-09-15 Pedro Alves <palves@redhat.com>
543
544 * compile/compile-c-types.c (convert_enum, convert_int)
545 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
546
547 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
548
549 * dwarf2read.c (copy_string): Remove.
550 (parse_macro_definition): Replace copy_string with savestring.
551
552 2017-09-15 Yao Qi <yao.qi@linaro.org>
553
554 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
555 gdb_target_obs.
556 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
557 Likewise.
558 (i[34567]86-*-linux*): Likewise.
559
560 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
561
562 * dwarf2expr.h (dwarf_stack_value): Add constructor.
563 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
564 <stack>: Change type to std::vector.
565 <stack_len, stack_allocated>: Remove.
566 <grow_stack>: Remove.
567 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
568 (dwarf_expr_context::~dwarf_expr_context): Remove.
569 (dwarf_expr_context::grow_stack): Remove.
570 (dwarf_expr_context::push): Adjust.
571 (dwarf_expr_context::pop): Adjust.
572 (dwarf_expr_context::fetch): Adjust.
573 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
574 (dwarf_expr_context::stack_empty_p): Adjust.
575 (dwarf_expr_context::execute_stack_op): Adjust.
576
577 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
578
579 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
580 return type to bool.
581 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
582
583 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
584
585 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
586 Change type to bool.
587 (dwarf_stack_value) <in_stack_memory>: Likewise.
588 (dwarf_expr_context) <push_address>: Change parameter type to
589 bool.
590 <fetch_in_stack_memory>: Change return type to bool.
591 <push>: Change parameter type to bool.
592 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
593 to bool.
594 (dwarf_expr_context::push_address): Likewise.
595 (dwarf_expr_context::fetch_in_stack_memory): Change return type
596 to bool.
597 (dwarf_expr_context::execute_stack_op): Adjust.
598 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
599
600 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
601
602 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
603 (struct dwarf_expr_context) <n_pieces>: Remove.
604 <pieces>: Change type to std::vector.
605 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
606 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
607 pieces.
608 (dwarf_expr_context::add_piece): Adjust.
609 * dwarf2loc.c (struct piece_closure): Initialize fields.
610 <n_pieces>: Remove.
611 <pieces>: Change type to std::vector.
612 (allocate_piece_closure): Adjust, change parameter to
613 std::vector rvalue and std::move it to piece_closure.
614 (rw_pieced_value): Adjust.
615 (check_pieced_synthetic_pointer): Adjust.
616 (indirect_synthetic_pointer): Adjust.
617 (coerce_pieced_ref): Adjust.
618 (free_pieced_value_closure): Adjust. Use delete to free
619 piece_closure.
620 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
621 to allocate_piece_closure.
622 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
623
624 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
625
626 * probe.h (probe_ops_cp): Remove typedef.
627 (DEF_VEC_P (probe_ops_cp)): Remove.
628 (all_probe_ops): Change type to std::vector.
629 * probe.c (info_probes_for_ops): Adjust to vector change.
630 (probe_linespec_to_ops): Likewise.
631 (all_probe_ops): Change type to std::vector.
632 (_initialize_probe): Adjust to vector change.
633 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
634 * elfread.c (elf_get_probes): Likewise.
635 * stap-probe.c (_initialize_stap_probe): Likewise.
636
637 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
638
639 * probe.h (struct bound_probe): Define constructors.
640 * probe.c (bound_probe_s): Remove typedef.
641 (DEF_VEC_O (bound_probe_s)): Remove VEC.
642 (collect_probes): Change return type to std::vector, remove
643 cleanup.
644 (compare_probes): Return bool, change parameter type. Change
645 semantic to "less than".
646 (gen_ui_out_table_header_info): Change parameter to std::vector
647 and update.
648 (exists_probe_with_pops): Likewise.
649 (info_probes_for_ops): Update to std::vector change.
650 (enable_probes_command): Likewise.
651 (disable_probes_command): Likewise.
652
653 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
654
655 * probe.h (struct probe_ops) <get_probes>: Change parameter from
656 vec to std::vector.
657 * probe.c (parse_probes_in_pspace): Update.
658 (find_probes_in_objfile): Update.
659 (find_probe_by_pc): Update.
660 (collect_probes): Update.
661 (probe_any_get_probes): Update.
662 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
663 return type to reference to std::vector.
664 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
665 std::vector and update.
666 (dtrace_process_dof): Likewise.
667 (dtrace_get_probes): Likewise.
668 * elfread.c (elf_get_probes): Change return type to std::vector,
669 store an std::vector in bfd_data.
670 (probe_key_free): Update to std::vector.
671 * stap-probe.c (handle_stap_probe): Change parameter to
672 std::vector and update.
673 (stap_get_probes): Likewise.
674 * symfile-debug.c (debug_sym_get_probes): Change return type to
675 std::vector and update.
676
677 2017-09-11 Tom Tromey <tom@tromey.com>
678
679 * breakpoint.c (program_breakpoint_here_p): Update.
680 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
681 from make_show_memory_breakpoints_cleanup. Return a
682 scoped_restore_tmpl<int>.
683 (restore_show_memory_breakpoints): Remove.
684 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
685 * mem-break.c (memory_validate_breakpoint): Update.
686 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
687 (ia64_memory_remove_breakpoint): Update.
688 (ia64_breakpoint_from_pc): Update.
689 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
690 from make_show_memory_breakpoints_cleanup.
691
692 2017-09-11 Tom Tromey <tom@tromey.com>
693
694 * d-namespace.c (d_lookup_symbol): Use std::string.
695 (find_symbol_in_baseclass): Likewise.
696
697 2017-09-11 Tom Tromey <tom@tromey.com>
698
699 * ctf.c (ctf_start): Use std::string.
700
701 2017-09-11 Tom Tromey <tom@tromey.com>
702
703 * ada-lang.c (is_known_support_routine): Update.
704 (ada_unhandled_exception_name_addr_from_raise): Update.
705 * guile/scm-frame.c (gdbscm_frame_name): Update.
706 * python/py-frame.c (frapy_name): Update.
707 (frapy_function): Update.
708 * stack.h (find_frame_funname): Update.
709 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
710 (print_frame): Update.
711
712 2017-09-11 Tom Tromey <tom@tromey.com>
713
714 * findcmd.c (put_bits): Take a gdb::byte_vector.
715 (parse_find_args): Return gdb::byte_vector. "args" now const.
716 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
717 cleanups.
718 (find_command): Update.
719
720 2017-09-11 Tom Tromey <tom@tromey.com>
721
722 * cli/cli-script.c (class scoped_restore_hook_in): New.
723 (clear_hook_in_cleanup): Remove.
724 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
725 scoped_restore_hook_in.
726
727 2017-09-11 Tom Tromey <tom@tromey.com>
728
729 * cli/cli-script.c (restore_interp): Remove.
730 (read_command_lines): Use scoped_restore_interp.
731 * interps.c (scoped_restore_interp::set_temp): Rename from
732 interp_set_temp.
733 * interps.h (class scoped_restore_interp): New.
734 (interp_set_temp): Remove.
735
736 2017-09-11 Tom Tromey <tom@tromey.com>
737
738 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
739 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
740 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
741 scoped_restore.
742 (mi_cmd_break_insert_1): Update.
743 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
744 scoped_restore.
745
746 2017-09-11 Tom Tromey <tom@tromey.com>
747
748 * demangle.c (demangle_command): Update.
749 * breakpoint.c (disable_command): Update.
750 (enable_command): Update.
751 (find_location_by_number): Make "number" const. Use
752 get_number_trailer.
753 * cli/cli-utils.c (extract_arg): Return std::string.
754 * probe.c (parse_probe_linespec): Update. Change types.
755 (collect_probes): Take string arguments.
756 (parse_probe_linespec): Likewise.
757 (info_probes_for_ops): Update.
758 (enable_probes_command): Update.
759 (disable_probes_command): Update.
760 * break-catch-sig.c (catch_signal_split_args): Update.
761 * mi/mi-parse.c (mi_parse): Update.
762
763 2017-09-11 Tom Tromey <tom@tromey.com>
764
765 * language.h (language_enum): Make argument const.
766 * language.c (language_enum): Make argument const.
767
768 2017-09-11 Tom Tromey <tom@tromey.com>
769
770 * common/common-utils.h (skip_to_space): Remove macro, redeclare
771 as function.
772 (skip_to_space): Rename from skip_to_space_const.
773 * common/common-utils.c (skip_to_space): New function.
774 (skip_to_space): Rename from skip_to_space_const.
775 * cli/cli-utils.h (get_number): Rename from get_number_const.
776 (extract_arg): Rename from extract_arg_const.
777 * cli/cli-utils.c (get_number): Rename from get_number_const.
778 (extract_arg): Rename from extract_arg_const.
779 (number_or_range_parser::get_number): Use ::get_number.
780 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
781 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
782 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
783 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
784 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
785 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
786 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
787 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
788
789 2017-09-11 Tom Tromey <tom@tromey.com>
790
791 * python/python.c (do_start_initialization): Use
792 py-event-types.def to initialize types.
793 Define all object type structures.
794 * python/python-internal.h: Don't declare event initialization
795 functions.
796 * python/py-threadevent.c (thread_event_object_type): Don't
797 define.
798 * python/py-stopevent.c (stop_event_object_type): Don't define.
799 * python/py-signalevent.c (signal_event_object_type): Don't
800 declare or define.
801 * python/py-newobjfileevent.c (new_objfile_event_object_type)
802 (clear_objfiles_event_object_type): Don't declare or define.
803 * python/py-infevents.c (inferior_call_pre_event_object_type)
804 (inferior_call_post_event_object_type)
805 (register_changed_event_object_type)
806 (memory_changed_event_object_type): Don't declare or define.
807 * python/py-inferior.c (new_thread_event_object_type)
808 (new_inferior_event_object_type)
809 (inferior_deleted_event_object_type): Don't declare or define.
810 * python/py-exitedevent.c (exited_event_object_type): Don't
811 declare or define.
812 * python/py-evts.c (gdbpy_initialize_py_events): Use
813 py-all-events.def.
814 * python/py-events.h (thread_event_object_type): Don't declare.
815 (events_object): Use py-all-events.def.
816 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
817 py-event-types.def.
818 * python/py-event-types.def: New file.
819 * python/py-continueevent.c (create_continue_event_object): Don't
820 declare or define.
821 * python/py-bpevent.c (breakpoint_event_object_type): Don't
822 declare or define.
823 * python/py-all-events.def: New file.
824
825 2017-09-11 Tom Tromey <tom@tromey.com>
826
827 * python/py-threadevent.c (create_thread_event_object): Return
828 gdbpy_ref.
829 * python/py-stopevent.h (create_stop_event_object)
830 (create_breakpoint_event_object, create_signal_event_object):
831 Update.
832 * python/py-stopevent.c (create_stop_event_object): Return
833 gdbpy_ref.
834 (emit_stop_event): Update.
835 * python/py-signalevent.c (create_signal_event_object): Return
836 gdbpy_ref.
837 * python/py-infevents.c (create_inferior_call_event_object):
838 Update.
839 * python/py-event.h (create_event_object)
840 (create_thread_event_object): Update.
841 * python/py-event.c (create_event_object): Return gdbpy_ref.
842 * python/py-continueevent.c: Return gdbpy_ref.
843 * python/py-bpevent.c (create_breakpoint_event_object): Return
844 gdbpy_ref.
845
846 2017-09-11 Tom Tromey <tom@tromey.com>
847
848 PR python/15622:
849 * NEWS: Add entry.
850 * python/python.c (do_start_initialization): Initialize new event
851 types.
852 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
853 (gdbpy_initialize_inferior_deleted_event)
854 (gdbpy_initialize_new_thread_event): Declare.
855 * python/py-threadevent.c (create_thread_event_object): Add option
856 "thread" parameter.
857 * python/py-inferior.c (new_thread_event_object_type)
858 (new_inferior_event_object_type)
859 (inferior_deleted_event_object_type): Declare.
860 (python_new_inferior, python_inferior_deleted): New functions.
861 (add_thread_object): Emit new_thread event.
862 (gdbpy_initialize_inferior): Attach new functions to corresponding
863 observers.
864 (new_thread, new_inferior, inferior_deleted): Define new event
865 types.
866 * python/py-evts.c (gdbpy_initialize_py_events): Add new
867 registries.
868 * python/py-events.h (events_object) <new_inferior,
869 inferior_deleted, new_thread>: New fields.
870 * python/py-event.h (create_thread_event_breakpoint): Add optional
871 "thread" parameter.
872
873 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
874
875 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
876 check current_ui instead.
877 (internal_vproblem): Likewise.
878
879 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
880
881 * thread.c (print_thread_info_1): Remove unnecessary calls to
882 uiout->is_mi_like_p.
883
884 2017-09-09 Tom Tromey <tom@tromey.com>
885
886 * namespace.h (add_using_directive): Update.
887 * namespace.c (add_using_directive): Change type of excludes to
888 std::vector.
889 * dwarf2read.c (read_import_statement): Use std::vector.
890 (read_namespace): Update.
891 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
892
893 2017-09-09 Tom Tromey <tom@tromey.com>
894
895 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
896
897 2017-09-09 Tom Tromey <tom@tromey.com>
898
899 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
900
901 2017-09-09 Tom Tromey <tom@tromey.com>
902
903 * stack.c (func_command): Use gdb::def_vector.
904
905 2017-09-09 Tom Tromey <tom@tromey.com>
906
907 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
908 ui_out_emit_list, ui_out_emit_tuple.
909 (mi_cmd_var_update): Likewise.
910
911 2017-09-09 Tom Tromey <tom@tromey.com>
912
913 * mi/mi-interp.c (mi_user_selected_context_changed): Use
914 ui_out_redirect_pop.
915 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
916 ui_out_redirect_pop.
917 * utils.c (do_ui_out_redirect_pop)
918 (make_cleanup_ui_out_redirect_pop): Remove.
919 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
920 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
921 * ui-out.h (ui_out_redirect_pop): New class.
922
923 2017-09-09 Tom Tromey <tom@tromey.com>
924
925 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
926 (list_available_thread_groups, mi_cmd_list_thread_groups)
927 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
928 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
929 Likewise.
930
931 2017-09-09 Tom Tromey <tom@tromey.com>
932
933 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
934 ui_out_emit_tuple.
935
936 2017-09-09 Tom Tromey <tom@tromey.com>
937
938 * target.c (flash_erase_command): Use ui_out_emit_tuple.
939 * stack.c (print_frame): Use ui_out_emit_tuple.
940 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
941 (info_spu_mailbox_command, info_spu_dma_command)
942 (info_spu_proxydma_command): Likewise.
943 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
944 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
945 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
946 ui_out_emit_tuple.
947 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
948
949 2017-09-09 Tom Tromey <tom@tromey.com>
950
951 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
952 (class ui_out_emit_table): Update comment.
953 * ui-out.c (do_cleanup_table_end)
954 (make_cleanup_ui_out_table_begin_end): Remove.
955 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
956 (info_spu_dma_cmdlist): Likewise.
957 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
958 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
959 ui_out_emit_table.
960
961 2017-09-09 Tom Tromey <tom@tromey.com>
962
963 * thread.c (print_thread_info_1): Use ui_out_emit_table,
964 ui_out_emit_list, gdb::optional.
965
966 2017-09-09 John Baldwin <jhb@FreeBSD.org>
967
968 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
969 prototype.
970 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
971 prototype.
972 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
973 prototype.
974 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
975 * ada-exp.y: Remove _initialize_ada_exp prototype.
976 * ada-lang.c: Remove _initialize_ada_language prototype.
977 * ada-tasks.c: Remove _initialize_tasks prototype.
978 * addrmap.c: Remove _initialize_addrmap prototype.
979 * agent.c: Remove _initialize_agent prototype.
980 * aix-thread.c: Remove _initialize_aix_thread prototype.
981 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
982 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
983 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
984 prototype.
985 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
986 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
987 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
988 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
989 prototype.
990 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
991 prototype.
992 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
993 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
994 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
995 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
996 prototype.
997 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
998 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
999 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1000 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1001 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1002 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1003 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1004 prototype.
1005 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1006 prototype.
1007 * annotate.c: Remove _initialize_annotate prototype.
1008 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1009 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1010 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1011 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1012 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1013 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1014 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1015 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1016 prototype.
1017 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1018 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1019 * auto-load.c: Remove _initialize_auto_load prototype.
1020 * auxv.c: Remove _initialize_auxv prototype.
1021 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1022 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1023 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1024 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1025 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1026 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1027 prototype.
1028 * break-catch-throw.c: Remove _initialize_break_catch_throw
1029 prototype.
1030 * breakpoint.c: Remove _initialize_breakpoint prototype.
1031 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1032 * btrace.c: Remove _initialize_btrace prototype.
1033 * charset.c: Remove _initialize_charset prototype.
1034 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1035 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1036 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1037 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1038 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1039 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1040 * coffread.c: Remove _initialize_coffread prototype.
1041 * compile/compile.c: Remove _initialize_compile prototype.
1042 * complaints.c: Remove _initialize_complaints prototype.
1043 * completer.c: Remove _initialize_completer prototype.
1044 * copying.awk: Remove _initialize_copying prototype.
1045 * copying.c: Regenerate.
1046 * core-regset.c: Remove _initialize_core_regset prototype.
1047 * corefile.c: Remove _initialize_core prototype.
1048 * corelow.c: Remove _initialize_corelow prototype.
1049 * cp-abi.c: Remove _initialize_cp_abi prototype.
1050 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1051 * cp-support.c: Remove _initialize_cp_support prototype.
1052 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1053 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1054 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1055 * ctf.c: Remove _initialize_ctf prototype.
1056 * d-lang.c: Remove _initialize_d_language prototype.
1057 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1058 prototype.
1059 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1060 * dbxread.c: Remove _initialize_dbxread prototype.
1061 * dcache.c: Remove _initialize_dcache prototype.
1062 * demangle.c: Remove _initialize_demangler prototype.
1063 * disasm-selftests.c: Remove _initialize_disasm_selftests
1064 prototype.
1065 * disasm.c: Remove _initialize_disasm prototype.
1066 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1067 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1068 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1069 prototype.
1070 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1071 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1072 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1073 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1074 * elfread.c: Remove _initialize_elfread prototype.
1075 * exec.c: Remove _initialize_exec prototype.
1076 * extension.c: Remove _initialize_extension prototype.
1077 * f-lang.c: Remove _initialize_f_language prototype.
1078 * f-valprint.c: Remove _initialize_f_valprint prototype.
1079 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1080 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1081 * filesystem.c: Remove _initialize_filesystem prototype.
1082 * findcmd.c: Remove _initialize_mem_search prototype.
1083 * fork-child.c: Remove _initialize_fork_child prototype.
1084 * frame-base.c: Remove _initialize_frame_base prototype.
1085 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1086 * frame.c: Remove _initialize_frame prototype.
1087 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1088 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1089 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1090 * gcore.c: Remove _initialize_gcore prototype.
1091 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1092 * gdbarch.c: Regenerate.
1093 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1094 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1095 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1096 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1097 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1098 * go-lang.c: Remove _initialize_go_language prototype.
1099 * go32-nat.c: Remove _initialize_go32_nat prototype.
1100 * guile/guile.c: Remove _initialize_guile prototype.
1101 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1102 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1103 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1104 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1105 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1106 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1107 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1108 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1109 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1110 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1111 prototype.
1112 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1113 prototype.
1114 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1115 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1116 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1117 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1118 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1119 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1120 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1121 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1122 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1123 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1124 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1125 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1126 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1127 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1128 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1129 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1130 prototype.
1131 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1132 prototype.
1133 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1134 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1135 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1136 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1137 * infcall.c: Remove _initialize_infcall prototype.
1138 * infcmd.c: Remove _initialize_infcmd prototype.
1139 * inferior.c: Remove _initialize_inferiors prototype.
1140 * inflow.c: Remove _initialize_inflow prototype.
1141 * infrun.c: Remove _initialize_infrun prototype.
1142 * interps.c: Remove _initialize_interpreter prototype.
1143 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1144 * jit.c: Remove _initialize_jit prototype.
1145 * language.c: Remove _initialize_language prototype.
1146 * linux-fork.c: Remove _initialize_linux_fork prototype.
1147 * linux-nat.c: Remove _initialize_linux_nat prototype.
1148 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1149 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1150 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1151 * m2-lang.c: Remove _initialize_m2_language prototype.
1152 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1153 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1154 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1155 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1156 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1157 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1158 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1159 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1160 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1161 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1162 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1163 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1164 * machoread.c: Remove _initialize_machoread prototype.
1165 * macrocmd.c: Remove _initialize_macrocmd prototype.
1166 * macroscope.c: Remove _initialize_macroscope prototype.
1167 * maint.c: Remove _initialize_maint_cmds prototype.
1168 * mdebugread.c: Remove _initialize_mdebugread prototype.
1169 * memattr.c: Remove _initialize_mem prototype.
1170 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1171 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1172 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1173 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1174 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1175 * microblaze-linux-tdep.c: Remove
1176 _initialize_microblaze_linux_tdep prototype.
1177 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1178 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1179 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1180 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1181 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1182 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1183 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1184 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1185 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1186 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1187 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1188 prototype.
1189 * mipsread.c: Remove _initialize_mipsread prototype.
1190 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1191 prototype.
1192 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1193 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1194 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1195 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1196 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1197 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1198 prototype.
1199 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1200 * nto-procfs.c: Remove _initialize_procfs prototype.
1201 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1202 * objc-lang.c: Remove _initialize_objc_language prototype.
1203 * objfiles.c: Remove _initialize_objfiles prototype.
1204 * observer.c: Remove observer_test_first_notification_function,
1205 observer_test_second_notification_function,
1206 observer_test_third_notification_function, and
1207 _initialize_observer prototypes.
1208 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1209 * osabi.c: Remove _initialize_gdb_osabi prototype.
1210 * osdata.c: Remove _initialize_osdata prototype.
1211 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1212 * parse.c: Remove _initialize_parse prototype.
1213 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1214 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1215 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1216 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1217 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1218 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1219 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1220 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1221 * printcmd.c: Remove _initialize_printcmd prototype.
1222 * probe.c: Remove _initialize_probe prototype.
1223 * proc-api.c: Remove _initialize_proc_api prototype.
1224 * proc-events.c: Remove _initialize_proc_events prototype.
1225 * proc-service.c: Remove _initialize_proc_service prototype.
1226 * procfs.c: Remove _initialize_procfs prototype.
1227 * psymtab.c: Remove _initialize_psymtab prototype.
1228 * python/python.c: Remove _initialize_python prototype.
1229 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1230 * record-btrace.c: Remove _initialize_record_btrace prototype.
1231 * record-full.c: Remove _initialize_record_full prototype.
1232 * record.c: Remove _initialize_record prototype.
1233 * regcache.c: Remove _initialize_regcache prototype.
1234 * reggroups.c: Remove _initialize_reggroup prototype.
1235 * remote-notif.c: Remove _initialize_notif prototype.
1236 * remote-sim.c: Remove _initialize_remote_sim prototype.
1237 * remote.c: Remove _initialize_remote prototype.
1238 * reverse.c: Remove _initialize_reverse prototype.
1239 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1240 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1241 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1242 prototype.
1243 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1244 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1245 * rust-exp.y: Remove _initialize_rust_exp prototype.
1246 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1247 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1248 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1249 * score-tdep.c: Remove _initialize_score_tdep prototype.
1250 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1251 prototype.
1252 * ser-go32.c: Remove _initialize_ser_dos prototype.
1253 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1254 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1255 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1256 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1257 * serial.c: Remove _initialize_serial prototype.
1258 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1259 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1260 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1261 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1262 * skip.c: Remove _initialize_step_skip prototype.
1263 * sol-thread.c: Remove _initialize_sol_thread prototype.
1264 * solib-aix.c: Remove _initialize_solib_aix prototype.
1265 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1266 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1267 * solib-frv.c: Remove _initialize_frv_solib prototype.
1268 * solib-spu.c: Remove _initialize_spu_solib prototype.
1269 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1270 * solib-target.c: Remove _initialize_solib_target prototype.
1271 * solib.c: Remove _initialize_solib prototype.
1272 * source.c: Remove _initialize_source prototype.
1273 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1274 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1275 prototype.
1276 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1277 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1278 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1279 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1280 prototype.
1281 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1282 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1283 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1284 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1285 prototype.
1286 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1287 prototype.
1288 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1289 prototype.
1290 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1291 prototype.
1292 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1293 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1294 prototype.
1295 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1296 prototype.
1297 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1298 prototype.
1299 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1300 prototype.
1301 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1302 prototype.
1303 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1304 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1305 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1306 * stabsread.c: Remove _initialize_stabsread prototype.
1307 * stack.c: Remove _initialize_stack prototype.
1308 * stap-probe.c: Remove _initialize_stap_probe prototype.
1309 * std-regs.c: Remove _initialize_frame_reg prototype.
1310 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1311 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1312 * symfile.c: Remove _initialize_symfile prototype.
1313 * symmisc.c: Remove _initialize_symmisc prototype.
1314 * symtab.c: Remove _initialize_symtab prototype.
1315 * target-dcache.c: Remove _initialize_target_dcache prototype.
1316 * target-descriptions.c: Remove _initialize_target_descriptions
1317 prototype.
1318 * thread.c: Remove _initialize_thread prototype.
1319 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1320 prototype.
1321 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1322 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1323 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1324 prototype.
1325 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1326 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1327 * tracefile.c: Remove _initialize_tracefile prototype.
1328 * tracepoint.c: Remove _initialize_tracepoint prototype.
1329 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1330 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1331 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1332 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1333 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1334 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1335 * tui/tui.c: Remove _initialize_tui prototype.
1336 * typeprint.c: Remove _initialize_typeprint prototype.
1337 * user-regs.c: Remove _initialize_user_regs prototype.
1338 * utils.c: Remove _initialize_utils prototype.
1339 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1340 * valarith.c: Remove _initialize_valarith prototype.
1341 * valops.c: Remove _initialize_valops prototype.
1342 * valprint.c: Remove _initialize_valprint prototype.
1343 * value.c: Remove _initialize_values prototype.
1344 * varobj.c: Remove _initialize_varobj prototype.
1345 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1346 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1347 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1348 * windows-nat.c: Remove _initialize_windows_nat,
1349 _initialize_check_for_gdb_ini, and _initialize_loadable
1350 prototypes.
1351 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1352 * xcoffread.c: Remove _initialize_xcoffread prototype.
1353 * xml-support.c: Remove _initialize_xml_support prototype.
1354 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1355 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1356 prototype.
1357 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1358 prototype.
1359 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1360
1361 2017-09-08 Keith Seitz <keiths@redhat.com>
1362
1363 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1364 field.
1365
1366 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1367
1368 * f-valprint.c (f_val_print): Remove check for one byte
1369 sized integers. Remove printing of character type.
1370
1371 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1372 Christoph Weinmann <christoph.t.weinmann@intel.com>
1373 Bernhard Heckel <bernhard.heckel@intel.com>
1374
1375 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1376 to maintain proper indentation when printing pointers/refs.
1377
1378 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1379
1380 GDB 8.0.1 released.
1381
1382 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1383
1384 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1385
1386 2017-09-05 Tom Tromey <tom@tromey.com>
1387
1388 * parse.c (funcall_chain): Now a std::vector.
1389 (start_arglist, end_arglist): Simplify.
1390 (free_funcalls): Remove.
1391 (parse_exp_in_context_1): Remove cleanup.
1392
1393 2017-09-05 Tom Tromey <tom@tromey.com>
1394
1395 * go-exp.y (go_parse): Don't create a cleanup.
1396
1397 2017-09-05 Tom Tromey <tom@tromey.com>
1398
1399 * d-exp.y (PrimaryExpression): Use std::string.
1400 (d_parse): Don't create a cleanup.
1401
1402 2017-09-05 Tom Tromey <tom@tromey.com>
1403
1404 * utils.c (do_clear_parser_state): Remove.
1405 (make_cleanup_clear_parser_state): Remove.
1406 * p-exp.y (pascal_parse): Use scoped_restore.
1407 * m2-exp.y (m2_parse): Use scoped_restore.
1408 * f-exp.y (f_parse): Use scoped_restore.
1409 * d-exp.y (d_parse): Use scoped_restore.
1410 * c-exp.y (c_parse): Use scoped_restore.
1411 * ada-exp.y (ada_parse): Use scoped_restore.
1412 * utils.h (make_cleanup_clear_parser_state): Remove.
1413
1414 2017-09-06 Keith Seitz <keiths@redhat.com>
1415
1416 * dwarf2read.c (dw2_linkage_name_attr): New function.
1417 (dw2_linkage_name): New function.
1418 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1419 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1420 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1421
1422 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1423
1424 * config/djgpp/djconfig.sh: Correct shell portability issue.
1425
1426 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1427
1428 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1429
1430 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1431
1432 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1433 * NEWS: Mention new FreeBSD/mips native configuration.
1434 * configure.host: Add aarch64*-*-freebsd*.
1435 * configure.nat: Likewise.
1436 * aarch64-fbsd-nat.c: New file.
1437
1438 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1439
1440 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1441 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1442 * NEWS: Mention new FreeBSD/aarch64 target.
1443 * configure.tgt: Add aarch64*-*-freebsd*.
1444 * aarch64-fbsd-tdep.c: New file.
1445 * aarch64-fbsd-tdep.h: New file.
1446
1447 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1448
1449 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1450
1451 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1452
1453 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1454 of TLS symbols.
1455
1456 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1457
1458 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1459 call.
1460
1461 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1462
1463 * infrun.c (follow_exec): Call add_thread after
1464 target_find_description.
1465
1466 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1467
1468 * infrun.c (handle_inferior_event_1): When exec'ing, read
1469 stop_pc after follow_exec.
1470
1471 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1472
1473 * remote.c (process_g_packet): Update error message.
1474
1475 2017-09-05 Yao Qi <yao.qi@linaro.org>
1476
1477 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1478 targets.
1479
1480 2017-09-05 Pedro Alves <palves@redhat.com>
1481
1482 * eval.c (eval_call, evaluate_funcall): New functions, factored
1483 out from ...
1484 (evaluate_subexp_standard): ... this.
1485
1486 2017-09-05 Yao Qi <yao.qi@linaro.org>
1487
1488 * amd64-tdep.c (amd64_target_description): Create target
1489 descriptions.
1490 (_initialize_amd64_tdep): Don't call functions
1491 initialize_tdesc_amd64_*. Add self tests.
1492 * arch/amd64.c (amd64_create_target_description): Add parameter
1493 is_linux. Call set_tdesc_osabi if is_linux is true.
1494 * arch/amd64.h (amd64_create_target_description): Update the
1495 declaration.
1496 * arch/i386.c (i386_create_target_description): Add parameter
1497 is_linux. Call set_tdesc_osabi if is_linux is true.
1498 * arch/i386.h (i386_create_target_description): Update
1499 declaration.
1500 * configure.tgt: Add i386.o to gdb_target_obs.
1501 * features/Makefile (XMLTOC): Remove i386/*.xml.
1502 * features/i386/amd64-avx-avx512.c: Remove.
1503 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1504 * features/i386/amd64-avx-mpx.c: Remove.
1505 * features/i386/amd64-avx.c: Remove.
1506 * features/i386/amd64-mpx.c: Remove.
1507 * features/i386/amd64.c: Remove.
1508 * features/i386/i386-avx-avx512.c: Remove.
1509 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1510 * features/i386/i386-avx-mpx.c: Remove.
1511 * features/i386/i386-avx.c: Remove.
1512 * features/i386/i386-mmx.c: Remove.
1513 * features/i386/i386-mpx.c: Remove.
1514 * features/i386/i386.c: Remove.
1515 * i386-tdep.c: Don't include features/i386/i386*.c., include
1516 target-descriptions.h and arch/i386.h.
1517 (i386_target_description): Create target descriptions.
1518 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1519 functions. Do self tests.
1520
1521 2017-09-05 Yao Qi <yao.qi@linaro.org>
1522
1523 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1524 * features/i386/amd64-avx-avx512-linux.c: Removed.
1525 * features/i386/amd64-avx-linux.c: Removed.
1526 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1527 * features/i386/amd64-avx-mpx-linux.c: Removed.
1528 * features/i386/amd64-linux.c: Removed.
1529 * features/i386/amd64-mpx-linux.c: Removed.
1530 * features/i386/x32-avx-avx512-linux.c: Removed.
1531 * features/i386/x32-avx-linux.c: Removed.
1532 * features/i386/x32-linux.c: Removed.
1533
1534 2017-09-05 Yao Qi <yao.qi@linaro.org>
1535
1536 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1537 features/i386/*.c.
1538 (amd64_linux_read_description): Call
1539 amd64_create_target_description.
1540 * arch/amd64.c: New file.
1541 * arch/amd64.h: New file.
1542 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1543 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1544
1545 2017-09-05 Yao Qi <yao.qi@linaro.org>
1546
1547 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1548 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1549 (amd64_linux_read_description): Create target descriptions.
1550 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1551 functions. Add unit tests.
1552 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1553 x32-core.xml.
1554 * features/i386/64bit-avx.c: Generated.
1555 * features/i386/64bit-avx512.c: Generated.
1556 * features/i386/64bit-core.c: Generated.
1557 * features/i386/64bit-linux.c: Generated.
1558 * features/i386/64bit-mpx.c: Generated.
1559 * features/i386/64bit-pkeys.c: Generated.
1560 * features/i386/64bit-segments.c: Generated.
1561 * features/i386/64bit-sse.c: Generated.
1562 * features/i386/x32-core.c: Generated.
1563 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1564 c files for amd64-linux and x32-linux.
1565
1566 2017-09-05 Yao Qi <yao.qi@linaro.org>
1567
1568 * amd64-linux-tdep.c (amd64_linux_read_description): New
1569 function.
1570 (amd64_linux_core_read_description): Call
1571 amd64_linux_read_description.
1572 (amd64_linux_init_abi): Likewise.
1573 (amd64_x32_linux_init_abi): Likewise.
1574 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1575 * x86-linux-nat.c (x86_linux_read_description): Call
1576 amd64_linux_read_description.
1577
1578 2017-09-05 Yao Qi <yao.qi@linaro.org>
1579
1580 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1581 comments.
1582
1583 2017-09-05 Yao Qi <yao.qi@linaro.org>
1584
1585 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1586 * features/i386/i386-avx-avx512-linux.c: Remove.
1587 * features/i386/i386-avx-linux.c: Remove.
1588 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1589 * features/i386/i386-avx-mpx-linux.c: Remove.
1590 * features/i386/i386-linux.c: Remove.
1591 * features/i386/i386-mmx-linux.c: Remove.
1592 * features/i386/i386-mpx-linux.c: Remove.
1593
1594 2017-09-05 Yao Qi <yao.qi@linaro.org>
1595
1596 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1597 (SFILES): Add arch/i386.c.
1598 (HFILES_NO_SRCDIR): Add arch/i386.h.
1599 * arch/i386.c: New file.
1600 * arch/i386.h: New file.
1601 * arch/tdesc.h (allocate_target_description): Declare.
1602 (set_tdesc_architecture): Declare.
1603 (set_tdesc_osabi): Declare.
1604 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1605 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1606 include arch/i386.h.
1607 (i386_linux_read_description): Remove code and call
1608 i386_create_target_description.
1609 (set_tdesc_architecture): New function.
1610 (set_tdesc_osabi): New function.
1611 * target-descriptions.h (allocate_target_description): Remove.
1612
1613 2017-09-05 Yao Qi <yao.qi@linaro.org>
1614
1615 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1616 * target-descriptions.c (tdesc_create_feature): Likewise, and
1617 adjust code.
1618 * features/i386/32bit-avx.c: Re-generated.
1619 * features/i386/32bit-avx512.c: Re-generated.
1620 * features/i386/32bit-core.c: Re-generated.
1621 * features/i386/32bit-linux.c: Re-generated.
1622 * features/i386/32bit-mpx.c: Re-generated.
1623 * features/i386/32bit-pkeys.c: Re-generated.
1624 * features/i386/32bit-sse.c: Re-generated.
1625
1626 2017-09-05 Yao Qi <yao.qi@linaro.org>
1627
1628 * regformats/regdef.h (struct reg): Override operator == and !=.
1629
1630 2017-09-05 Yao Qi <yao.qi@linaro.org>
1631
1632 * arch/tdesc.h: New file.
1633 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1634 * target-descriptions.c: Update comments.
1635 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1636 declarations.
1637 * features/i386/32bit-avx.c: Re-generated.
1638 * features/i386/32bit-avx512.c: Re-generated.
1639 * features/i386/32bit-core.c: Re-generated.
1640 * features/i386/32bit-linux.c: Re-generated.
1641 * features/i386/32bit-mpx.c: Re-generated.
1642 * features/i386/32bit-pkeys.c: Re-generated.
1643 * features/i386/32bit-sse.c: Re-generated.
1644
1645 2017-09-05 Yao Qi <yao.qi@linaro.org>
1646
1647 * regformats/regdat.sh: Update generated code.
1648
1649 2017-09-05 Yao Qi <yao.qi@linaro.org>
1650
1651 * regformats/regdat.sh: Adjust code order.
1652
1653 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1654
1655 * expprint.c (dump_subexp_body_standard): Use constant format
1656 string in fprintf_filtered call.
1657
1658 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1659
1660 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1661 NetBSD/i386.
1662 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1663
1664 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1665
1666 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1667
1668 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1669
1670 * bsd-kvm.o: Define _KMEMUSER.
1671 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1672 * configure: Regenerate.
1673
1674 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1675
1676 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1677 * i386-fbsd-nat.c: Likewise.
1678
1679 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1680
1681 * unittests/array-view-selftests.c: Add include of <array>.
1682
1683 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1684
1685 * spu-tdep.c (flush_ea_cache): Add missing argument to
1686 call_function_by_hand.
1687
1688 2017-09-04 Pedro Alves <palves@redhat.com>
1689
1690 * NEWS (Safer support for debugging with no debug info): New.
1691
1692 2017-09-04 Pedro Alves <palves@redhat.com>
1693
1694 * c-exp.y (function_method, function_method_void): Add current
1695 instance flags to TYPE_INSTANCE.
1696 * dwarf2read.c (check_modifier): New.
1697 (compute_delayed_physnames): Assert that only C++ adds delayed
1698 physnames. Mark fn_fields as const/volatile depending on
1699 physname.
1700 * eval.c (make_params): New type_instance_flags parameter. Use
1701 it as the new type's instance flags.
1702 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1703 flags element and pass it to make_params.
1704 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1705 instance flags element.
1706 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1707 * gdbtypes.h: Include "enum-flags.h".
1708 (type_instance_flags): New enum-flags type.
1709 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1710 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1711 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1712 (follow_type_instance_flags): New function.
1713 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1714 * parser-defs.h (follow_type_instance_flags): Declare.
1715 * valops.c (value_struct_elt_for_reference): const/volatile must
1716 match too.
1717
1718 2017-09-04 Pedro Alves <palves@redhat.com>
1719
1720 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1721 function/method scopes; lookup the nested name as a function local
1722 static variable.
1723
1724 2017-09-04 Pedro Alves <palves@redhat.com>
1725
1726 (%type <voidval>): Add function_method.
1727 * c-exp.y (exp): New production for calls with no arguments.
1728 (function_method, function_method_void_or_typelist): New
1729 productions.
1730 (exp): New production for "method()::static_var".
1731 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1732 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1733 Handle OP_FUNC_STATIC_VAR.
1734 * parse.c (operator_length_standard):
1735 Handle OP_FUNC_STATIC_VAR.
1736
1737 2017-09-04 Pedro Alves <palves@redhat.com>
1738
1739 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1740 handling.
1741 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1742 Ditto.
1743 * parse.c (operator_length_standard, operator_check_standard):
1744 Ditto.
1745 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1746
1747 2017-09-04 Pedro Alves <palves@redhat.com>
1748
1749 * ax-gdb.c: Include "typeprint.h".
1750 (gen_expr_for_cast): New function.
1751 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1752 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1753 type is unknown.
1754 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1755 nodebug_data_symbol.
1756 * eval.c: Include "typeprint.h".
1757 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1758 Error out if symbol has unknown type.
1759 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1760 evaluate_subexp_for_cast.
1761 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1762 OP_VAR_MSYM_VALUE.
1763 (evaluate_subexp_for_cast): New function.
1764 * gdbtypes.c (init_nodebug_var_type): New function.
1765 (objfile_type): Use it to initialize types of variables with no
1766 debug info.
1767 * typeprint.c (error_unknown_type): New.
1768 * typeprint.h (error_unknown_type): New declaration.
1769 * compile/compile-c-types.c (convert_type_basic): Handle
1770 TYPE_CODE_ERROR; warn and fallback to int for variables with
1771 unknown type.
1772
1773 2017-09-04 Pedro Alves <palves@redhat.com>
1774
1775 * eval.c (evaluate_var_value): New function, factored out from ...
1776 (evaluate_subexp_standard): ... here.
1777
1778 2017-09-04 Pedro Alves <palves@redhat.com>
1779
1780 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1781 Remove useless assignments to 'op'.
1782
1783 2017-09-04 Pedro Alves <palves@redhat.com>
1784
1785 * eval.c (eval_skip_value): New function.
1786 (evaluate_subexp_standard): Use it.
1787
1788 2017-09-04 Pedro Alves <palves@redhat.com>
1789
1790 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1791 function name from symbol/minsym and pass it to
1792 error_call_unknown_return_type.
1793
1794 2017-09-04 Pedro Alves <palves@redhat.com>
1795
1796 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1797 * ax-gdb.c (gen_msym_var_ref): New function.
1798 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1799 * eval.c (evaluate_var_msym_value): New function.
1800 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1801 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1802 to call_function_by_hand.
1803 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1804 Handle OP_VAR_MSYM_VALUE.
1805 (union exp_element) <msymbol>: New field.
1806 * minsyms.h (struct type): Forward declare.
1807 (find_minsym_type_and_address): Declare.
1808 * parse.c (write_exp_elt_msym): New function.
1809 (write_exp_msymbol): Delete, refactored as ...
1810 (find_minsym_type_and_address): ... this new function.
1811 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1812 (operator_length_standard, operator_check_standard): Handle
1813 OP_VAR_MSYM_VALUE.
1814 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1815
1816 2017-09-04 Pedro Alves <palves@redhat.com>
1817
1818 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1819 TYPE_GNU_IFUNC specially here. Throw error if return type is
1820 unknown.
1821 * ada-typeprint.c (print_func_type): Handle functions with unknown
1822 return type.
1823 * c-typeprint.c (c_type_print_base): Handle functions and methods
1824 with unknown return type.
1825 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1826 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1827 * compile/compile-c-types.c: Include "objfiles.h".
1828 (convert_func): For functions with unknown return type, warn and
1829 default to int.
1830 * compile/compile-object-run.c (compile_object_run): Adjust call
1831 to call_function_by_hand_dummy.
1832 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1833 call_function_by_hand.
1834 * eval.c (evaluate_subexp_standard): Adjust calls to
1835 call_function_by_hand. Handle functions and methods with unknown
1836 return type. Pass expect_type to call_function_by_hand.
1837 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1838 return type.
1839 * gcore.c (call_target_sbrk): Adjust call to
1840 call_function_by_hand.
1841 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1842 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1843 an integer address type instead of nodebug.
1844 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1845 call_function_by_hand.
1846 * infcall.c (error_call_unknown_return_type): New function.
1847 (call_function_by_hand): New "default_return_type" parameter.
1848 Pass it down.
1849 (call_function_by_hand_dummy): New "default_return_type"
1850 parameter. Use it instead of defaulting to int. If there's no
1851 default and the return type is unknown, throw an error. If
1852 there's a default return type, and the called function has no
1853 debug info, then assume the function is prototyped.
1854 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1855 New "default_return_type" parameter.
1856 (error_call_unknown_return_type): New declaration.
1857 * linux-fork.c (call_lseek): Cast return type of lseek.
1858 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1859 call_function_by_hand.
1860 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1861 calls to call_function_by_hand.
1862 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1863 return type.
1864 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1865 (value_nsstring, print_object_command): Adjust calls to
1866 call_function_by_hand.
1867 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1868 functions with unknown return type.
1869 (pascal_type_print_func_varspec_suffix): New function.
1870 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1871 TYPE_CODE_METHOD>: Use it.
1872 * python/py-value.c (valpy_call): Adjust call to
1873 call_function_by_hand.
1874 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1875 call_function_by_hand.
1876 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1877 call_function_by_hand.
1878 * valops.c (value_allocate_space_in_inferior): Adjust call to
1879 call_function_by_hand.
1880 * typeprint.c (type_print_unknown_return_type): New function.
1881 * typeprint.h (type_print_unknown_return_type): New declaration.
1882
1883 2017-09-04 Pedro Alves <palves@redhat.com>
1884
1885 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1886 types with more than one parameter as prototyped.
1887
1888 2017-09-04 Pedro Alves <palves@redhat.com>
1889
1890 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1891 (disassemble_command): Use gdb_disassembly_flags instead of bare
1892 int.
1893 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1894 (dump_insns, do_mixed_source_and_assembly_deprecated)
1895 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1896 Use gdb_disassembly_flags instead of bare int.
1897 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1898 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1899 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1900 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1901 (enum gdb_disassembly_flag): ... values of this new enumeration.
1902 (gdb_disassembly_flags): Define.
1903 (gdb_disassembly)
1904 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1905 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1906 gdb_disassembly_flags instead of bare int.
1907 * record-btrace.c (btrace_insn_history)
1908 (record_btrace_insn_history, record_btrace_insn_history_range)
1909 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1910 instead of bare int.
1911 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1912 Use gdb_disassembly_flags instead of bare int.
1913 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1914 Define.
1915 * target-delegates.c: Regenerate.
1916 * target.c (target_insn_history, target_insn_history_from)
1917 (target_insn_history_range): Use gdb_disassembly_flags instead of
1918 bare int.
1919 * target.h: Include "disasm.h".
1920 (struct target_ops) <to_insn_history, to_insn_history_from,
1921 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1922 int.
1923 (target_insn_history, target_insn_history_from)
1924 (target_insn_history_range): Use gdb_disassembly_flags instead of
1925 bare int.
1926
1927 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1928
1929 * cli/cli-script.c (build_command_line): For if/while commands,
1930 check whether args is empty.
1931
1932 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1933
1934 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1935 (enum command_control_type): Likewise.
1936 (struct command_line): Likewise.
1937 (free_command_lines): Likewise.
1938 (struct command_lines_deleter): Likewise.
1939 (command_line_up): Likewise.
1940 (read_command_lines): Likewise.
1941 (read_command_lines_1): Likewise.
1942 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1943 (enum command_control_type): Likewise.
1944 (struct command_line): Likewise.
1945 (free_command_lines): Likewise.
1946 (struct command_lines_deleter): Likewise.
1947 (command_line_up): Likewise.
1948 (read_command_lines): Likewise.
1949 (read_command_lines_1): Likewise.
1950 * breakpoint.h: Include cli/cli-script.h.
1951 * extension-priv.h: Likewise.
1952 * gdbcmd.h: Likewise.
1953
1954 2017-09-04 Pedro Alves <palves@redhat.com>
1955
1956 * ada-lang.c (is_known_support_routine): Move sal declaration to
1957 where it is initialized.
1958 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1959 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1960 (clear_command, update_static_tracepoint): Remove init_sal
1961 references. Move declarations closer to initializations.
1962 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1963 initializations.
1964 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1965 references. Move sal declarations closer to initializations.
1966 * frame.c (find_frame_sal): Return a symtab_and_line via function
1967 return instead of output parameter. Remove init_sal references.
1968 * frame.h (find_frame_sal): Return a symtab_and_line via function
1969 return instead of output parameter.
1970 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1971 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1972 instead of memset.
1973 (gdbscm_find_pc_line): Remove init_sal reference.
1974 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1975 references. Move declarations closer to initializations.
1976 * infcmd.c (set_step_frame): Update. Move declarations closer to
1977 initializations.
1978 (finish_backward): Remove init_sal references. Move declarations
1979 closer to initializations.
1980 * infrun.c (process_event_stop_test, handle_step_into_function)
1981 (insert_hp_step_resume_breakpoint_at_frame)
1982 (insert_step_resume_breakpoint_at_caller): Likewise.
1983 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1984 (symbol_to_sal): Likewise.
1985 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1986 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1987 to its initialization.
1988 * reverse.c (save_bookmark_command): Use new/delete. Remove
1989 init_sal references. Move declarations closer to initializations.
1990 * source.c (get_current_source_symtab_and_line): Remove brace
1991 initialization.
1992 (set_current_source_symtab_and_line): Now takes the sal by const
1993 reference. Remove brace initialization.
1994 (line_info): Remove init_sal reference.
1995 * source.h (set_current_source_symtab_and_line): Now takes a
1996 symtab_and_line via const reference.
1997 * stack.c (set_current_sal_from_frame): Adjust.
1998 (print_frame_info): Adjust.
1999 (get_last_displayed_sal): Return the sal via function return
2000 instead of via output parameter. Simplify.
2001 (frame_info): Adjust.
2002 * stack.h (get_last_displayed_sal): Return the sal via function
2003 return instead of via output parameter.
2004 * symtab.c (init_sal): Delete.
2005 (find_pc_sect_line): Remove init_sal references. Move
2006 declarations closer to initializations.
2007 (find_function_start_sal): Remove init_sal references. Move
2008 declarations closer to initializations.
2009 * symtab.h (struct symtab_and_line): In-class initialize all
2010 fields.
2011 * tracepoint.c (set_traceframe_context)
2012 (print_one_static_tracepoint_marker): Remove init_sal references.
2013 Move declarations closer to initializations.
2014 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2015 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2016 declarations closer to initializations.
2017 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2018 init_sal references. Adjust.
2019
2020 2017-09-04 Pedro Alves <palves@redhat.com>
2021
2022 * ax-gdb.c (agent_command_1): Use range-for.
2023 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2024 * breakpoint.c: Include "common/array-view.h".
2025 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2026 parameter from struct symtabs_and_lines to
2027 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2028 (breakpoint_sals_to_pc): Change sals parameter from struct
2029 symtabs_and_lines to std::vector reference.
2030 (check_fast_tracepoint_sals): Change sals parameter from struct
2031 symtabs_and_lines to std::array_view. Use range-for.
2032 (decode_static_tracepoint_spec): Return a std::vector instead of
2033 symtabs_and_lines. Update.
2034 (create_breakpoint): Update.
2035 (break_range_command, until_break_command, clear_command): Update.
2036 (base_breakpoint_decode_location, bkpt_decode_location)
2037 (bkpt_probe_create_sals_from_location)
2038 (bkpt_probe_decode_location, tracepoint_decode_location)
2039 (tracepoint_probe_decode_location)
2040 (strace_marker_create_sals_from_location): Return a std::vector
2041 instead of symtabs_and_lines.
2042 (strace_marker_create_breakpoints_sal): Update.
2043 (strace_marker_decode_location): Return a std::vector instead of
2044 symtabs_and_lines. Update.
2045 (update_breakpoint_locations): Change struct symtabs_and_lines
2046 parameters to gdb::array_view. Adjust.
2047 (location_to_sals): Return a std::vector instead of
2048 symtabs_and_lines. Update.
2049 (breakpoint_re_set_default): Use std::vector instead of struct
2050 symtabs_and_lines.
2051 (decode_location_default): Return a std::vector instead of
2052 symtabs_and_lines. Update.
2053 * breakpoint.h: Include "common/array-view.h".
2054 (struct breakpoint_ops) <decode_location>: Now returns a
2055 std::vector instead of returning a symtabs_and_lines via output
2056 parameter.
2057 (update_breakpoint_locations): Change sals parameters to use
2058 gdb::array_view.
2059 * cli/cli-cmds.c (edit_command, list_command): Update to use
2060 std::vector and gdb::array_view.
2061 (ambiguous_line_spec): Adjust to use gdb::array_view and
2062 range-for.
2063 (compare_symtabs): Rename to ...
2064 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2065 const reference and adjust.
2066 (filter_sals): Rewrite using std::vector and standard algorithms.
2067 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2068 (jump_command): Update to use std::vector.
2069 * linespec.c (struct linespec_state) <canonical_names>: Update
2070 comment.
2071 (add_sal_to_sals_basic): Delete.
2072 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2073 (decode_line_2, create_sals_line_offset)
2074 (convert_address_location_to_sals, convert_linespec_to_sals)
2075 (convert_explicit_location_to_sals, parse_linespec)
2076 (event_location_to_sals, decode_line_full, decode_line_1)
2077 (decode_line_with_current_source)
2078 (decode_line_with_last_displayed, decode_objc)
2079 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2080 (linespec_result::~linespec_result): Adjust to use std::vector
2081 instead of symtabs_and_lines.
2082 * linespec.h (linespec_sals::sals): Now a std::vector.
2083 (struct linespec_result): Use std::vector, bool, and in-class
2084 initialization.
2085 (decode_line_1, decode_line_with_current_source)
2086 (decode_line_with_last_displayed): Return std::vector.
2087 * macrocmd.c (info_macros_command): Use std::vector.
2088 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2089 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2090 std::vector.
2091 * probe.h (parse_probes): Return a std::vector.
2092 * python/python.c (gdbpy_decode_line): Use std::vector and
2093 gdb::array_view.
2094 * source.c (select_source_symtab, line_info): Use std::vector.
2095 * stack.c (func_command): Use std::vector.
2096 * symtab.h (struct symtabs_and_lines): Delete.
2097 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2098
2099 2017-09-04 Pedro Alves <palves@redhat.com>
2100
2101 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2102 unittests/array-view-selftests.c.
2103 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2104 * common/array-view.h: New file.
2105 * unittests/array-view-selftests.c: New file.
2106
2107 2017-09-04 Pedro Alves <palves@redhat.com>
2108
2109 * cli/cli-cmds.c (edit_command): Pass message to
2110 ambiguous_line_spec.
2111 (list_command): Pass message to ambiguous_line_spec. Say
2112 "first"/"last" instead of "start" and "end" to be consistent with
2113 the manual.
2114 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2115 them to print formatted message.
2116
2117 2017-09-04 Pedro Alves <palves@redhat.com>
2118
2119 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2120 ftrace_update_insns by reference instead of pointer.
2121
2122 2017-09-04 Yao Qi <yao.qi@linaro.org>
2123
2124 * i386-go32-tdep.c: Include x86-xstate.h.
2125 (i386_go32_init_abi): Call i386_target_description.
2126 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2127 if xcr0 is X86_XSTATE_X87_MASK.
2128 * i386-tdep.h (tdesc_i386): Remove the declaration.
2129 (tdesc_i386_mmx): Likewise.
2130
2131 2017-09-04 Yao Qi <yao.qi@linaro.org>
2132
2133 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2134 X86_XSTATE_SSE_MASK instead of 0.
2135
2136 2017-09-04 Yao Qi <yao.qi@linaro.org>
2137
2138 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2139 i386_target_description.
2140 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2141 i386_target_description.
2142 * i386-tdep.c (i386_gdbarch_init): Likewise.
2143
2144 2017-09-04 Yao Qi <yao.qi@linaro.org>
2145
2146 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2147 (x86_darwin_init_abi_64): Call amd64_target_description.
2148 * amd64-dicos-tdep.c: Likewise.
2149 * amd64-fbsd-nat.c: Likewise.
2150 * amd64-fbsd-tdep.c: Likewise.
2151 * amd64-nbsd-tdep.c: Likewise.
2152 * amd64-obsd-tdep.c: Likewise.
2153 * amd64-sol2-tdep.c: Likewise.
2154 * amd64-windows-tdep.c: Likewise.
2155 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2156
2157 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2158
2159 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2160 (btrace_function) <insn>: Change type to use std::vector.
2161 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2162 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2163 ftrace_update_insns, ftrace_compute_global_level_offset,
2164 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2165 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2166 change to std::vector.
2167 (ftrace_update_insns): Adjust to change to std::vector, change
2168 type of INSN parameter.
2169 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2170 * record-btrace.c (btrace_call_history_insn_range,
2171 btrace_compute_src_line_range,
2172 record_btrace_frame_prev_register): Adjust to change to
2173 std::vector.
2174 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2175 to change to std::vector.
2176
2177 2017-09-03 Tom Tromey <tom@tromey.com>
2178
2179 * corefile.c (reopen_exec_file): Use std::string.
2180
2181 2017-09-03 Tom Tromey <tom@tromey.com>
2182
2183 * compile/compile.c (compile_register_name_mangled): Return
2184 std::string.
2185 * compile/compile-loc2c.c (pushf_register_address): Update.
2186 (pushf_register): Update.
2187 * compile/compile-c-types.c (convert_array): Update.
2188 * compile/compile-c-symbols.c (generate_vla_size): Update.
2189 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2190 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2191 (convert_one_symbol): Update.
2192 (generate_c_for_for_one_variable): Update.
2193 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2194 std::string.
2195 (generate_register_struct): Update.
2196 * compile/compile-internal.h (c_get_range_decl_name): Return a
2197 std::string.
2198 (compile_register_name_mangled): Return std::string.
2199
2200 2017-09-03 Tom Tromey <tom@tromey.com>
2201
2202 * utils.c (perror_string): Return a std::string.
2203 (throw_perror_with_name, perror_warning_with_name): Update.
2204
2205 2017-09-03 Tom Tromey <tom@tromey.com>
2206
2207 * demangle.c (demangle_command): Use std::string,
2208 unique_xmalloc_ptr.
2209
2210 2017-09-03 Tom Tromey <tom@tromey.com>
2211
2212 * cli/cli-setshow.c (do_set_command): Use std::string.
2213
2214 2017-09-03 Tom Tromey <tom@tromey.com>
2215
2216 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2217
2218 2017-09-03 Tom Tromey <tom@tromey.com>
2219
2220 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2221
2222 2017-09-03 Tom Tromey <tom@tromey.com>
2223
2224 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2225 gdb::unique_xmalloc_ptr.
2226
2227 2017-09-03 Tom Tromey <tom@tromey.com>
2228
2229 * thread.c (print_thread_info_1): Use string_printf.
2230 (thread_apply_command, thread_apply_all_command): Use
2231 std::string.
2232
2233 2017-09-03 Tom Tromey <tom@tromey.com>
2234
2235 * valprint.c (val_print_string): Update.
2236 * gdbcore.h (memory_error_message): Return std::string.
2237 * corefile.c (memory_error_message): Return std::string.
2238 (memory_error): Update.
2239 * breakpoint.c (insert_bp_location): Update.
2240
2241 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * target/waitstatus.h (target_waitstatus_to_string): Change
2244 return type to std::string.
2245 * target/waitstatus.c (target_waitstatus_to_string): Return
2246 std::string.
2247 * target.h (target_waitstatus_to_string): Remove declaration.
2248 * infrun.c (resume, clear_proceed_status_thread,
2249 print_target_wait_results, do_target_wait, save_waitstatus,
2250 stop_all_threads): Adjust.
2251 * record-btrace.c (record_btrace_wait): Adjust.
2252 * target-debug.h
2253 (target_debug_print_struct_target_waitstatus_p): Adjust.
2254
2255 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2256
2257 PR gdb/22046
2258 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2259 detection.
2260
2261 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2262
2263 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2264 for setting/unsetting environment variables on the remote target.
2265 (New remote packets): Add entries for QEnvironmentHexEncoded,
2266 QEnvironmentUnset and QEnvironmentReset.
2267 * common/environ.c (gdb_environ::operator=): Extend method to
2268 handle m_user_set_env_list and m_user_unset_env_list.
2269 (gdb_environ::clear): Likewise.
2270 (match_var_in_string): Change type of first parameter from 'char
2271 *' to 'const char *'.
2272 (gdb_environ::set): Extend method to handle
2273 m_user_set_env_list and m_user_unset_env_list.
2274 (gdb_environ::unset): Likewise.
2275 (gdb_environ::clear_user_set_env): New method.
2276 (gdb_environ::user_set_envp): Likewise.
2277 (gdb_environ::user_unset_envp): Likewise.
2278 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2279 m_user_unset_env_list on move constructor/assignment.
2280 (unset): Add new default parameter 'update_unset_list = true'.
2281 (clear_user_set_env): New method.
2282 (user_set_envp): Likewise.
2283 (user_unset_envp): Likewise.
2284 (m_user_set_env_list): New std::set.
2285 (m_user_unset_env_list): Likewise.
2286 * common/rsp-low.c (hex2str): New function.
2287 (bin2hex): New overload for bin2hex function.
2288 * common/rsp-low.c (hex2str): New prototype.
2289 (str2hex): New overload prototype.
2290 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2291 QEnvironmentUnset and QEnvironmentReset.
2292 (remote_protocol_features): Add QEnvironmentHexEncoded,
2293 QEnvironmentUnset and QEnvironmentReset packets.
2294 (send_environment_packet): New function.
2295 (extended_remote_environment_support): Likewise.
2296 (extended_remote_create_inferior): Call
2297 extended_remote_environment_support.
2298 (_initialize_remote): Add QEnvironmentHexEncoded,
2299 QEnvironmentUnset and QEnvironmentReset packet configs.
2300 * unittests/environ-selftests.c (gdb_selftest_env_var):
2301 New variable.
2302 (test_vector_initialization): New function.
2303 (test_init_from_host_environ): Likewise.
2304 (test_reinit_from_host_environ): Likewise.
2305 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2306 Likewise.
2307 (test_unset_set_empty_vector): Likewise.
2308 (test_vector_clear): Likewise.
2309 (test_std_move): Likewise.
2310 (test_move_constructor):
2311 (test_self_move): Likewise.
2312 (test_set_unset_reset): Likewise.
2313 (run_tests): Rewrite in terms of the functions above.
2314
2315 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2316
2317 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2318 (adi_available): Use a temp variable of type CORE_ADDR as argument
2319 3 when calling target_auxv_search.
2320 (adi_normalize_address): Use masks and xor operators to calculate
2321 normalized address.
2322 (adi_read_versions, adi_write_versions, adi_print_versions)
2323 (do_examine, do_assign): Use paddress.
2324
2325 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2326
2327 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2328 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2329 out of loop and add supply of FIR.
2330 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2331 add collect of FIR.
2332
2333 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2334
2335 PR gdb/21827
2336 * cli/cli-script.c (define_command): Don't convert command name
2337 to lower case.
2338
2339 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2340
2341 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2342 Update all callers accordingly. Remove all code blocks handling
2343 the case where DISPP is not NULL.
2344
2345 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2346
2347 PR symtab/22003
2348 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2349 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2350 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2351
2352 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2353
2354 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2355 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2356 (read_comp_units_from_section): New parameter abbrev_section, use
2357 read_and_check_comp_unit_head, allocate signatured_type if needed.
2358 (create_all_comp_units): Update read_comp_units_from_section caller.
2359
2360 2017-08-23 Pedro Alves <palves@redhat.com>
2361
2362 PR remote/21852
2363 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2364 to null_ptid and switch to thread without reading the registers
2365 after adding the inferior.
2366
2367 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2368
2369 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2370 compile-gcc.
2371 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2372 (compile_to_object): Implement compile_gcc.
2373 (_initialize_compile): Install "set compile-gcc". Initialize
2374 compile_gcc.
2375
2376 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2377
2378 * compile/compile.c (compile_to_object): Conditionally call
2379 set_verbose. Conditionally call compile or compile_v0.
2380
2381 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2382
2383 * sparc64-tdep.h: (adi_normalize_address): New export.
2384 * sparc-nat.h: (open_adi_tag_fd): New export.
2385 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2386 * sparc64-linux-tdep.c:
2387 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2388 (sparc64_linux_handle_segmentation_fault): New function.
2389 (sparc64_linux_init_abi): Register
2390 sparc64_linux_handle_segmentation_fault
2391 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2392 (sparc64_addr_bits_remove): New function.
2393 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2394 (MAX_PROC_NAME_SIZE): New macro.
2395 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2396 (sparc64adilist): New variable.
2397 (adi_proc_list): New variable.
2398 (find_adi_info): New function.
2399 (add_adi_info): New function.
2400 (get_adi_info_proc): New function.
2401 (get_adi_info): New function.
2402 (info_adi_command): New function.
2403 (read_maps_entry): New function.
2404 (adi_available): New function.
2405 (adi_normalize_address): New function.
2406 (adi_align_address): New function.
2407 (adi_convert_byte_count): New function.
2408 (adi_tag_fd): New function.
2409 (adi_is_addr_mapped): New function.
2410 (adi_read_versions): New function.
2411 (adi_write_versions): New function.
2412 (adi_print_versions): New function.
2413 (do_examine): New function.
2414 (do_assign): New function.
2415 (adi_examine_command): New function.
2416 (adi_assign_command): New function.
2417 (_initialize_sparc64_adi_tdep): New function.
2418
2419 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2420
2421 * breakpoint.c (breakpoints_info): Rename to ...
2422 (info_breakpoints_command): ... this.
2423 (watchpoints_info): Rename to ...
2424 (info_watchpoints_command): ... this.
2425 (tracepoints_info): Rename to ...
2426 (info_tracepoints_command): ... this.
2427 (_initialize_breakpoint): Adjust.
2428 * dcache.c (dcache_info): Rename to ...
2429 (info_display_command): ... this.
2430 (_initialize_dcache): Adjust.
2431 * frame.h (args_info): Rename to ...
2432 (info_args_command): ... this.
2433 (locals_info): Rename to ...
2434 (info_locals_command): ... this.
2435 * infcmd.c (nofp_registers_info): Rename to ...
2436 (info_registers_command): ... this.
2437 (float_info): Rename to ...
2438 (info_float_command): ... this.
2439 (program_info): Rename to ...
2440 (info_program_command): ... this.
2441 (all_registers_info): Rename to ...
2442 (info_all_registers_command): ... this.
2443 (vector_info): Rename to ...
2444 (info_vector_command): ... this.
2445 (float_info): Rename to ...
2446 (info_float_command): ... this.
2447 (_initialize_infcmd): Adjust.
2448 * inferior.h (term_info): Rename to ...
2449 (info_terminal_command): ... this.
2450 * inflow.c (term_info): Rename to ...
2451 (info_terminal_command): ... this.
2452 (_initialize_inflow): Adjust.
2453 * infrun.c (signals_info): Rename to ...
2454 (info_signals_command): ... this.
2455 (_initialize_infrun): Adjust.
2456 * objc-lang.c (classes_info): Rename to ...
2457 (info_classes_command): ... this.
2458 (selectors_info): Rename to ...
2459 (info_selectors_command): ... this.
2460 (_initialize_objc_language): Adjust.
2461 * printcmd.c (sym_info): Rename to ...
2462 (info_symbol_command): ... this.
2463 (address_info): Rename to ...
2464 (info_address_command): ... this.
2465 (display_info): Rename to ...
2466 (info_display_command): ... this.
2467 (_initialize_printcmd): Adjust.
2468 * reverse.c (bookmarks_info): Rename to ...
2469 (info_breakpoints_command): ... this.
2470 (_initialize_reverse): Adjust.
2471 * ser-go32.c (dos_info): Rename to ...
2472 (info_serial_command): ... this.
2473 (_initialize_ser_dos): Adjust.
2474 * skip.c (skip_info): Rename to ...
2475 (info_skip_command): ... this.
2476 (_initialize_step_skip): Adjust.
2477 * source.c (line_info): Rename to ...
2478 (info_line_command): ... this.
2479 (source_info): Rename to ...
2480 (info_source_command)
2481 * stack.c (frame_info): Rename to ...
2482 (info_frame_command): ... this.
2483 (locals_info): Rename to ...
2484 (info_locals_command): ... this.
2485 (args_info): Rename to ...
2486 (info_args_command): ... this.
2487 (_initialize_stack): Adjust.
2488 * symtab.c (sources_info): Rename to ...
2489 (info_sources_command): ... this.
2490 (variables_info): Rename to ...
2491 (info_variables_command): ... this.
2492 (functions_info): Rename to ...
2493 (info_functions_command): ... this.
2494 (types_info): Rename to ...
2495 (info_types_command): ... this.
2496 (_initialize_symtab): Adjust.
2497 * target.c (target_info): Rename to ...
2498 (info_target_command): ... this.
2499 (initialize_targets): Adjust.
2500 * tracepoint.c (tvariables_info): Rename to ...
2501 (info_tvariables_command): ... this.
2502 (scope_info): Rename to ...
2503 (info_scope_command): ... this.
2504 (trace_dump_actions): Adjust.
2505 (_initialize_tracepoint): Adjust.
2506
2507 2017-08-22 Tom Tromey <tom@tromey.com>
2508
2509 * breakpoint.h (install_breakpoint): Update.
2510 * breakpoint.c (add_solib_catchpoint): Update.
2511 (install_breakpoint): Change argument to a std::unique_ptr.
2512 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2513 (create_breakpoint_sal, create_breakpoint): Update.
2514 (watch_command_1, catch_exec_command_1)
2515 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2516 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2517 Return the breakpoint.
2518 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2519 (new_single_step_breakpoint): Update.
2520 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2521 std::unique_ptr.
2522 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2523 std::unique_ptr.
2524 * break-catch-sig.c (create_signal_catchpoint): Use
2525 std::unique_ptr.
2526 * ada-lang.c (create_ada_exception_catchpoint): Use
2527 std::unique_ptr.
2528
2529 2017-08-22 Tom Tromey <tom@tromey.com>
2530
2531 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2532
2533 2017-08-22 Tom Tromey <tom@tromey.com>
2534
2535 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2536 (lookup_partial_symbol): Update.
2537
2538 2017-08-22 Tom Tromey <tom@tromey.com>
2539
2540 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2541 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2542 (find_and_open_source, symtab_to_fullname): Update.
2543 * psymtab.c (psymtab_to_fullname): Update.
2544
2545 2017-08-22 Tom Tromey <tom@tromey.com>
2546
2547 * exec.c (exec_file_attach): Update.
2548 * linux-thread-db.c (try_thread_db_load): Update.
2549 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2550 * utils.c (gdb_realpath): Change return type.
2551 (gdb_realpath_keepfile): Update.
2552 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2553 (_initialize_utils): Register the new self test.
2554 * source.c (openp): Update.
2555 (find_and_open_source): Update.
2556 * nto-tdep.c (nto_find_and_open_solib): Update.
2557 * main.c (set_gdb_data_directory): Update.
2558 (captured_main_1): Update.
2559 * dwarf2read.c (dwarf2_get_dwz_file): Update
2560 (dw2_map_symbol_filenames): Update.
2561 * auto-load.c (auto_load_safe_path_vec_update): Update.
2562 (filename_is_in_auto_load_safe_path_vec): Change type of
2563 "filename_realp".
2564 (auto_load_objfile_script): Update.
2565 (file_is_auto_load_safe): Update. Use std::string.
2566 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2567
2568 2017-08-22 Tom Tromey <tom@tromey.com>
2569
2570 * utils.c (gdb_realpath_keepfile): Return a
2571 gdb::unique_xmalloc_ptr.
2572 * exec.c (exec_file_attach): Update.
2573 * utils.h (gdb_realpath_keepfile): Return a
2574 gdb::unique_xmalloc_ptr.
2575
2576 2017-08-22 Tom Tromey <tom@tromey.com>
2577
2578 * compile/compile.c (compile_file_command): Use
2579 gdb::unique_xmalloc_ptr, std::string.
2580 * utils.c (gdb_abspath): Change return type.
2581 * source.c (openp): Update.
2582 * objfiles.c (allocate_objfile): Update.
2583 * main.c (set_gdb_data_directory): Update.
2584 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2585
2586 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2587
2588 * cli-cmds.c (list_commands): List actual code around more than
2589 one location.
2590
2591 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2592
2593 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2594
2595 2017-08-21 Pedro Alves <palves@redhat.com>
2596
2597 PR gdb/19487
2598 * c-exp.y (variable production): Handle function aliases.
2599 * minsyms.c (msymbol_is_text): New function.
2600 * minsyms.h (msymbol_is_text): Declare.
2601 * symtab.c (find_function_alias_target): New function.
2602 * symtab.h (find_function_alias_target): Declare.
2603
2604 2017-08-21 Pedro Alves <palves@redhat.com>
2605
2606 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2607 typedefs.
2608 * typeprint.c (whatis_exp): If handling "whatis", and expression
2609 is OP_TYPE, strip one typedef level. Otherwise don't strip
2610 typedefs here.
2611 * valops.c (value_cast): Save "to" type before resolving
2612 stubs/typedefs. Use that type as resulting value's type.
2613
2614 2017-08-18 Tom Tromey <tom@tromey.com>
2615 Pedro Alves <palves@redhat.com>
2616
2617 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2618 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2619 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2620 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2621 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2622 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2623 (linux_get_siginfo_data): Add "thread" argument. Use
2624 scoped_restore.
2625 * linux-nat.c (linux_child_follow_fork)
2626 (check_stopped_by_watchpoint): Use scoped_restore.
2627 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2628 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2629 (restore_inferior_ptid, save_inferior_ptid): Remove.
2630 * btrace.c (btrace_fetch): Use scoped_restore.
2631 * bsd-uthread.c (bsd_uthread_fetch_registers)
2632 (bsd_uthread_store_registers): Use scoped_restore.
2633 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2634 scoped_restore.
2635 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2636 (aix_thread_xfer_partial): Use scoped_restore.
2637 * inferior.h (save_inferior_ptid): Remove.
2638
2639 2017-08-18 Yao Qi <yao.qi@linaro.org>
2640
2641 PR tdep/21818
2642 * arm-tdep.c (gdb_print_insn_arm): Mark
2643 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2644
2645 2017-08-18 Yao Qi <yao.qi@linaro.org>
2646
2647 * NEWS: Mention GDBserver's new option "--selftest".
2648 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2649 * selftest.c: Move it to common/selftest.c.
2650 * selftest.h: Move it to common/selftest.h.
2651 * selftest-arch.c (reset): New function.
2652 (tests_with_arch): Call reset.
2653
2654 2017-08-18 Yao Qi <yao.qi@linaro.org>
2655
2656 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2657 instead of exception_fprintf and printf_filtered.
2658
2659 2017-08-18 Yao Qi <yao.qi@linaro.org>
2660
2661 * selftest.c (register_self_test): Rename it to
2662 selftests::register_test.
2663 (run_self_tests): selftest::run_tests.
2664 * selftest.h: Update declarations.
2665 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2666 selftests::register_test_foreach_arch.
2667 * selftest-arch.h: Update declaration.
2668 * aarch64-tdep.c: Update.
2669 * arm-tdep.c: Likewise.
2670 * disasm-selftests.c: Likewise.
2671 * dwarf2loc.c: Likewise.
2672 * dwarf2-frame.c: Likewise.
2673 * findvar.c: Likewise.
2674 * gdbarch-selftests.c: Likewise.
2675 * maint.c (maintenance_selftest): Likewise.
2676 * regcache.c: Likewise.
2677 * rust-exp.y: Likewise.
2678 * selftest-arch.c: Likewise.
2679 * unittests/environ-selftests.c: Likewise.
2680 * unittests/function-view-selftests.c: Likewise.
2681 * unittests/offset-type-selftests.c: Likewise.
2682 * unittests/optional-selftests.c: Likewise.
2683 * unittests/scoped_restore-selftests.c: Likewise.
2684 * utils-selftests.c: Likewise.
2685
2686 2017-08-17 Pedro Alves <palves@redhat.com>
2687
2688 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2689 local.
2690
2691 2017-08-17 Pedro Alves <palves@redhat.com>
2692
2693 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2694 field.
2695 (reset_die_in_process): Delete, replaced by ...
2696 (process_die_scope): ... this new class. Make it responsible for
2697 freeing cu->line_header too.
2698 (process_die): Use process_die_scope.
2699 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2700 cu->line_header_die_owner. Don't release the line header if it's
2701 owned by the CU.
2702 (setup_type_unit_groups): Make the CU/DIE own the line header.
2703 Don't release the line header here.
2704
2705 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2706
2707 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2708
2709 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2710
2711 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2712 Single-Key mode
2713
2714 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2715
2716 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2717 mode command list.
2718
2719 2017-08-15 Stafford Horne <shorne@gmail.com>
2720
2721 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2722
2723 2017-08-15 Stafford Horne <shorne@gmail.com>
2724
2725 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2726
2727 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2728
2729 PR gdb/21954
2730 * infcmd.c (unset_environment_command): Use the 'clear' method on
2731 the environment instead of resetting it.
2732
2733 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2734
2735 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2736 platforms.
2737
2738 2017-08-14 Tom Tromey <tom@tromey.com>
2739
2740 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2741 (print_binary_chars): Likewise.
2742 (BITS_IN_BYTES): Remove.
2743
2744 2017-08-14 Tom Tromey <tom@tromey.com>
2745
2746 PR gdb/21675
2747 * valprint.c (LOW_ZERO): Change value to 034.
2748 (print_octal_chars): Add static_asserts for octal constants.
2749 * printcmd.c (print_scalar_formatted): Add 'd' case.
2750
2751 2017-08-11 Tom Tromey <tom@tromey.com>
2752
2753 * symfile.c (add_symbol_file_command): Use std::vector.
2754
2755 2017-08-14 Tom Tromey <tom@tromey.com>
2756
2757 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2758 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2759 std::move.
2760 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2761
2762 2017-08-11 Pedro Alves <palves@redhat.com>
2763
2764 * infrun.c (process_event_stop_test): Adjust
2765 function_name_is_marked_for_skip call.
2766 * skip.c: Include <list>.
2767 (skiplist_entry): Make it a class with private fields, and
2768 getters/setters.
2769 (skiplist_entry_chain): Delete.
2770 (skiplist_entries): New.
2771 (skiplist_entry_count): Delete.
2772 (highest_skiplist_entry_num): New.
2773 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2774 (add_skiplist_entry): Delete.
2775 (skiplist_entry::skiplist_entry): New.
2776 (skiplist_entry::add_entry): New.
2777 (skip_file_command, skip_function): Adjust.
2778 (compile_skip_regexp): Delete.
2779 (skip_command): Don't compile regexp here. Adjust to use
2780 skiplist_entry::add_entry.
2781 (skip_info): Adjust to use range-for and getters.
2782 (skip_enable_command, skip_disable_command): Adjust to use
2783 range-for and setters.
2784 (skip_delete_command): Adjust to use std::list.
2785 (add_skiplist_entry): Delete.
2786 (skip_file_p): Delete, refactored as ...
2787 (skiplist_entry::do_skip_file_p): ... this new method.
2788 (skip_gfile_p): Delete, refactored as ...
2789 (skiplist_entry::do_gskip_file_p): ... this new method.
2790 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2791 (skiplist_entry::skip_function_p): ... this new method.
2792 (function_name_is_marked_for_skip): Now returns bool, and takes
2793 the function sal by const reference. Adjust to use range-for and
2794 skiplist_entry methods.
2795 (_initialize_step_skip): Remove references to
2796 skiplist_entry_chain, skiplist_entry_count.
2797 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2798 takes the function sal by const reference.
2799
2800 2017-08-11 Yao Qi <yao.qi@linaro.org>
2801
2802 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2803 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2804 (dwarf2_frame_cache):
2805 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2806 RETURN_MASK_ALL and set *this_case to NULL.
2807 * frame-unwind.h: Update comments.
2808
2809 2017-08-11 Yao Qi <yao.qi@linaro.org>
2810
2811 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2812 (dwarf2_frame_state_copy_regs): Remove.
2813 (dwarf2_frame_state_free_regs): Remove.
2814 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2815 (dwarf2_restore_rule): Call method .alloc_regs instead of
2816 dwarf2_frame_state_alloc_regs.
2817 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2818 constructor. Call std::move.
2819 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2820 (dwarf2_frame_cache): Likewise.
2821
2822 [GDB_SELF_TEST]: Include selftest.h and
2823 selftest-arch.h.
2824 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2825 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2826 execute_cfa_program_test.
2827
2828 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2829 copy ctor, assignment operator, move assignment.
2830 <alloc_regs>: New method.
2831 <swap>: New method.
2832 (struct dwarf2_frame_state): Delete dtor.
2833 (dwarf2_frame_state_alloc_regs): Remove declaration.
2834 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2835 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2836
2837 2017-08-11 Yao Qi <yao.qi@linaro.org>
2838
2839 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2840 (dwarf2_frame_state::dwarf2_frame_state): New.
2841 (dwarf2_frame_state::~dwarf2_frame_state): New.
2842 (dwarf2_fetch_cfa_info): Update.
2843 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2844 rather than a pointer. Update code.
2845 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2846 dtor.
2847 <data_align, code_align, retaddr_column>: Change them to const.
2848 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2849 to bool.
2850
2851 2017-08-11 Yao Qi <yao.qi@linaro.org>
2852
2853 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2854 <loc.exp>: New field.
2855 * dwarf2-frame.c (execute_cfa_program): Update.
2856 (dwarf2_frame_prev_register): Update.
2857
2858 2017-08-10 Pedro Alves <palves@redhat.com>
2859
2860 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2861
2862 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2863
2864 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2865 (fbsd_pending_children): Use std::list.
2866 (fbsd_remember_child): Likewise.
2867 (fbsd_is_child_pending): Likewise.
2868 (fbsd_pending_vfork_done): Use std::forward_list.
2869 (fbsd_add_vfork_done): Likewise.
2870 (fbsd_is_vfork_done_pending): Likewise.
2871 (fbsd_next_vfork_done): Likewise.
2872
2873 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2874
2875 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2876 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2877 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2878 for `mapfilename'.
2879 (fbsd_xfer_partial): Use gdb::byte_vector.
2880 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2881
2882 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2883
2884 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2885 "filestuff.h".
2886 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2887
2888 2017-08-09 Tom Tromey <tom@tromey.com>
2889
2890 * skip.c (skiplist_entry): New constructor.
2891 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2892 (skiplist_entry::file_is_glob): Now bool.
2893 (skiplist_entry::file, skiplist_entry::function): Now
2894 std::string.
2895 (make_skip_entry): Return a unique_ptr. Use new.
2896 (free_skiplist_entry, free_skiplist_entry_cleanup)
2897 (make_free_skiplist_entry_cleanup): Remove.
2898 (skip_command, skip_disable_command, add_skiplist_entry)
2899 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2900 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2901 (function_name_is_marked_for_skip): Update.
2902 (skip_delete_command): Update. Use delete.
2903
2904 2017-08-09 Jiong Wang <jiong.wang@arm.com>
2905
2906 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2907 (aarch64_linux_core_read_description): New function.
2908 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2909
2910 2017-08-09 Pedro Alves <palves@redhat.com>
2911
2912 * cp-name-parser.y (cp_comp_to_string): Return a
2913 gdb::unique_xmalloc_ptr<char>.
2914 * cp-support.c (replace_typedefs_qualified_name)
2915 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2916 (cp_canonicalize_string_full): Use op= instead of explicit
2917 convertion.
2918 (cp_class_name_from_physname, method_name_from_physname)
2919 (cp_func_name, cp_remove_params): Adjust to use
2920 gdb::unique_xmalloc_ptr<char>.
2921 * cp-support.h (cp_comp_to_string): Return a
2922 gdb::unique_xmalloc_ptr<char>.
2923 * python/py-type.c (typy_lookup_type): Adjust to use
2924 gdb::unique_xmalloc_ptr<char>.
2925
2926 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2927
2928 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2929
2930 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2931 Yao Qi <yao.qi@linaro.org>
2932
2933 * cp-support.c (cp_canonicalize_string_full): Use
2934 gdb::unique_xmalloc_ptr<char>.
2935 (cp_canonicalize_string): Likewise.
2936
2937 2017-08-09 Yao Qi <yao.qi@linaro.org>
2938
2939 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2940 * regformats/i386/amd64-avx-avx512.dat: Remove.
2941 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2942 * regformats/i386/amd64-avx-mpx.dat:Remove.
2943 * regformats/i386/amd64-avx.dat: Remove.
2944 * regformats/i386/amd64-mpx.dat: Remove.
2945 * regformats/i386/i386-avx-avx512.dat: Remove.
2946 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2947 * regformats/i386/i386-avx-mpx.dat: Remove.
2948 * regformats/i386/i386-mmx.dat: Remove.
2949 * regformats/i386/i386-mpx.dat: Remove.
2950
2951 2017-08-09 Yao Qi <yao.qi@linaro.org>
2952
2953 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2954 * amd64-tdep.c: Don't include features/i386/x32*.c.
2955 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2956 functions.
2957 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2958 and i386/x32-avx-avx512.
2959 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2960 and i386/x32.xml.
2961 * features/i386/x32-avx-avx512.c: Removed.
2962 * features/i386/x32-avx-avx512.xml: Removed.
2963 * features/i386/x32-avx.c: Removed.
2964 * features/i386/x32-avx.xml: Removed.
2965 * features/i386/x32.c: Removed.
2966 * features/i386/x32.xml: Removed.
2967 * regformats/i386/x32-avx-avx512.dat: Removed.
2968 * regformats/i386/x32-avx.dat: Removed.
2969 * regformats/i386/x32.dat: Removed.
2970
2971 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2972
2973 PR breakpoints/21886
2974 * mem-break.c (default_memory_insert_breakpoint): Use
2975 `->placed_address' rather than `->reqstd_address' for the
2976 breakpoint location.
2977
2978 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2979
2980 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2981 assertions.
2982
2983 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2984
2985 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2986 a union of `tdep_info', `tdesc_data' and `id'.
2987 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2988 rather than `info.tdep_info'.
2989 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2990 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2991 * i386-tdep.c (i386_gdbarch_init): Likewise.
2992 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2993 * mips-tdep.c (mips_gdbarch_init): Likewise.
2994 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2995 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2996 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2997 `info.tdep_info'.
2998 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2999 `info.tdep_info'.
3000 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3001 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3002 `info.tdep_info'.
3003 * spu-tdep.c (spu_gdbarch_init): Likewise.
3004 * gdbarch.h: Regenerate.
3005
3006 2017-08-07 Leszek Swirski <leszeks@google.com>
3007
3008 PR symtab/20899
3009 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3010
3011 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3012
3013 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3014 (gdbsim_open): Rename gdb_argv args object to argv.
3015
3016 2017-08-05 Tom Tromey <tom@tromey.com>
3017
3018 * compile/compile-object-load.c (compile_object_load): Use
3019 gdb::unique_xmalloc_ptr.
3020 * cli/cli-dump.c (scan_filename): Rename from
3021 scan_filename_with_cleanup. Change return type.
3022 (scan_expression): Rename from scan_expression_with_cleanup.
3023 Change return type.
3024 (dump_memory_to_file, dump_value_to_file, restore_command):
3025 Use gdb::unique_xmalloc_ptr. Update.
3026 * cli/cli-cmds.c (find_and_open_script): Use
3027 gdb::unique_xmalloc_ptr.
3028 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3029 * symmisc.c (maintenance_print_symbols)
3030 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3031 * symfile.c (symfile_bfd_open, generic_load)
3032 (add_symbol_file_command, remove_symbol_file_command): Use
3033 gdb::unique_xmalloc_ptr.
3034 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3035 * psymtab.c (maintenance_print_psymbols): Use
3036 gdb::unique_xmalloc_ptr.
3037 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3038 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3039 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3040 (reload_shared_libraries_1): Likewise.
3041
3042 2017-08-05 Tom Tromey <tom@tromey.com>
3043
3044 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3045 (rust_op_vector, rust_set_vector): New typedefs.
3046 (current_parser): New global.
3047 (work_obstack): Change to pointer type. Update all users.
3048 (rust_ast, pstate): Remove globals.
3049 (struct rust_parser): New.
3050 (%union) <params, field_inits>: Change type.
3051 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3052 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3053 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3054 (convert_params_to_types, convert_params_to_expression): Change
3055 type of "params".
3056 (ast_string): Change type of "fields".
3057 (rust_parse): Make a rust_parser. Remove cleanups.
3058 (rust_lex_tests): Make and install an auto_obstack.
3059
3060 2017-08-04 Yao Qi <yao.qi@linaro.org>
3061
3062 * configure.srv (ipa_x32_linux_regobj): New.
3063 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3064 instead of X86_TDESC_AVX512.
3065 (initialize_low_tracepoint): Call
3066 init_registers_x32_avx_avx512_linux.
3067
3068 2017-08-04 Yao Qi <yao.qi@linaro.org>
3069
3070 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3071
3072 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3073
3074 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3075
3076 2017-08-03 Tom Tromey <tom@tromey.com>
3077
3078 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3079 Remove.
3080 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3081
3082 2017-08-03 Tom Tromey <tom@tromey.com>
3083
3084 * python/py-param.c (compute_enum_values): Use gdb_argv.
3085
3086 2017-08-03 Tom Tromey <tom@tromey.com>
3087
3088 * utils.h (struct gdb_argv_deleter): New.
3089 (gdb_argv): New class.
3090 * utils.c (gdb_argv::reset): New method.
3091 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3092 * tracefile.c (tsave_command): Use gdb_argv.
3093 * top.c (new_ui_command): Use gdb_argv.
3094 * symmisc.c (maintenance_print_symbols)
3095 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3096 * symfile.c (symbol_file_command, generic_load)
3097 (remove_symbol_file_command): Use gdb_argv.
3098 * stack.c (backtrace_command): Use gdb_argv.
3099 * source.c (add_path, show_substitute_path_command)
3100 (unset_substitute_path_command, set_substitute_path_command):
3101 Use gdb_argv.
3102 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3103 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3104 * remote.c (extended_remote_run, remote_put_command)
3105 (remote_get_command, remote_delete_command): Use gdb_argv.
3106 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3107 (gdbsim_open): Use gdb_argv.
3108 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3109 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3110 * procfs.c (procfs_info_proc): Use gdb_argv.
3111 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3112 * infrun.c (handle_command): Use gdb_argv.
3113 * inferior.c (add_inferior_command, clone_inferior_command):
3114 Use gdb_argv.
3115 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3116 * exec.c (exec_file_command): Use gdb_argv.
3117 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3118 * compile/compile.c (build_argc_argv): Use gdb_argv.
3119
3120 2017-08-03 Tom Tromey <tom@tromey.com>
3121
3122 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3123
3124 2017-08-03 Tom Tromey <tom@tromey.com>
3125
3126 * python/python.c (compute_python_string): Return std::string.
3127 (gdbpy_eval_from_control_command): Update.
3128 (do_start_initialization): Use std::string.
3129 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3130 xstrprintf.
3131 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3132 xstrprintf.
3133
3134 2017-08-03 Tom Tromey <tom@tromey.com>
3135
3136 * top.h (do_restore_instream_cleanup): Remove.
3137 * top.c (do_restore_instream_cleanup): Remove.
3138 (read_command_file): Use scoped_restore.
3139 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3140
3141 2017-08-03 Tom Tromey <tom@tromey.com>
3142
3143 * cli/cli-script.c (execute_user_command)
3144 (execute_control_command): Use scoped_restore.
3145
3146 2017-08-03 Tom Tromey <tom@tromey.com>
3147
3148 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3149 (execute_user_command): Remove user_call_depth; use
3150 user_args_stack's size instead.
3151
3152 2017-08-03 Tom Tromey <tom@tromey.com>
3153
3154 * top.h (in_user_command): Remove.
3155 * top.c (in_user_command): Remove.
3156 * cli/cli-script.c (do_restore_user_call_depth)
3157 (execute_user_command): Update.
3158
3159 2017-08-03 Tom Tromey <tom@tromey.com>
3160
3161 * valops.c (search_struct_method): Use gdb::byte_vector.
3162 * valarith.c (value_concat): Use std::vector.
3163 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3164 (simple_search_memory): Likewise.
3165 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3166 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3167 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3168 * elfread.c (elf_rel_plt_read): Use std::string.
3169 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3170 * cli/cli-dump.c (restore_section_callback): Use
3171 gdb::byte_vector.
3172
3173 2017-08-03 Tom Tromey <tom@tromey.com>
3174
3175 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3176
3177 2017-08-03 Tom Tromey <tom@tromey.com>
3178
3179 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3180 (tui_register_format): Use scoped_restore.
3181
3182 2017-08-03 Tom Tromey <tom@tromey.com>
3183
3184 * reverse.c (exec_direction_default): Remove.
3185 (exec_reverse_once): Use scoped_restore.
3186 * remote.c (restore_remote_timeout): Remove.
3187 (remote_flash_erase, remote_flash_write, remote_flash_done)
3188 (readchar, remote_serial_write): Use scoped_restore.
3189 * cli/cli-script.c (struct source_cleanup_lines_args)
3190 (source_cleanup_lines): Remove.
3191 (script_from_file): Use scoped_restore.
3192 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3193 (source_command): Use scoped_restore.
3194
3195 2017-08-03 Tom Tromey <tom@tromey.com>
3196
3197 * utils.h (make_cleanup_free_so): Remove.
3198 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3199 * solist.h (struct so_deleter): New.
3200 (so_list_up): New typedef.
3201 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3202
3203 2017-08-03 Tom Tromey <tom@tromey.com>
3204
3205 * utils.h (make_cleanup_restore_current_language): Remove.
3206 * utils.c (do_restore_current_language)
3207 (make_cleanup_restore_current_language): Remove.
3208 * parse.c (parse_exp_in_context_1)
3209 (parse_expression_with_language): Use
3210 scoped_restore_current_language.
3211 * mi/mi-main.c (mi_cmd_execute): Use
3212 scoped_restore_current_language.
3213 * language.h (scoped_restore_current_language): New class.
3214
3215 2017-08-03 Tom Tromey <tom@tromey.com>
3216
3217 * compile/compile.c (cleanup_unlink_file): Remove.
3218 (compile_to_object): Use gdb::unlinker.
3219 (eval_compile_command): Likewise.
3220
3221 2017-08-03 Tom Tromey <tom@tromey.com>
3222
3223 * utils.h (make_cleanup_fclose): Remove.
3224 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3225
3226 2017-08-03 Tom Tromey <tom@tromey.com>
3227
3228 * top.c (open_terminal_stream): Return gdb_file_up.
3229 (new_ui_command): Update.
3230
3231 2017-08-03 Tom Tromey <tom@tromey.com>
3232
3233 * source.c (print_source_lines_base, forward_search_command)
3234 (reverse_search_command): Use gdb_file_up.
3235
3236 2017-08-03 Tom Tromey <tom@tromey.com>
3237
3238 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3239
3240 2017-08-03 Tom Tromey <tom@tromey.com>
3241
3242 * cli/cli-cmds.c (find_and_open_script): Change return type.
3243 Remove "streamp" and "full_path" parameters.
3244 (source_script_with_search): Update.
3245 * auto-load.c (source_script_file): Update.
3246 * cli/cli-cmds.h (find_and_open_script): Change type.
3247 (open_script): New struct.
3248
3249 2017-08-03 Tom Tromey <tom@tromey.com>
3250
3251 * xml-support.c (xml_fetch_content_from_file): Update.
3252 * ui-file.c (stdio_file::open): Update.
3253 * tracefile-tfile.c (tfile_start): Update.
3254 * remote.c (remote_file_put, remote_file_get): Update.
3255 * nat/linux-procfs.c (linux_proc_get_int)
3256 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3257 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3258 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3259 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3260 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3261 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3262 * linux-nat.c (linux_proc_pending_signals): Update.
3263 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3264 (file_closer): Remove.
3265 * compile/compile.c (compile_to_object): Update.
3266 * common/filestuff.h (struct gdb_file_deleter): New.
3267 (gdb_file_up): New typedef.
3268 (gdb_fopen_cloexec): Change return type.
3269 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3270 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3271 (dump_binary_file, restore_binary_file): Update.
3272 * auto-load.c (auto_load_objfile_script_1): Update.
3273
3274 2017-08-03 Tom Tromey <tom@tromey.com>
3275
3276 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3277 (info_static_tracepoint_markers_command): Likewise.
3278 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3279 * skip.c (skip_info): Use ui_out_emit_table.
3280 * progspace.c (print_program_space): Use ui_out_emit_table.
3281 * osdata.c (info_osdata): Use ui_out_emit_table.
3282 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3283 ui_out_emit_table.
3284 * linux-thread-db.c (info_auto_load_libthread_db): Use
3285 ui_out_emit_table.
3286 * inferior.c (print_inferior): Use ui_out_emit_table.
3287 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3288 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3289 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3290 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3291 * ui-out.h (class ui_out_emit_table): New.
3292
3293 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3294
3295 * mips-tdep.c (mips_fpu_type_str): New function.
3296 (mips_dump_tdep): Call it.
3297
3298 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3299
3300 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3301 `->mips_fpu_type'.
3302
3303 2017-07-31 Xavier Roirand <roirand@adacore.com>
3304
3305 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3306
3307 2017-07-27 Xavier Roirand <roirand@adacore.com>
3308
3309 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3310
3311 2017-07-26 Yao Qi <yao.qi@linaro.org>
3312
3313 * cli/cli-cmds.c (maintenancechecklist): New variable.
3314 * gdbcmd.h (maintenancechecklist): Declare it.
3315 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3316 Call i386_linux_read_description with different masks.
3317 * maint.c (maintenance_check_command): New function.
3318 (_initialize_maint_cmds): Call add_prefix_cmd.
3319 * target-descriptions.c (tdesc_reg): override operator != and ==.
3320 (tdesc_type): Likewise.
3321 (tdesc_feature): Likewise.
3322 (target_desc): Likewise.
3323 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3324 (maintenance_check_xml_descriptions): New function.
3325 (_initialize_target_descriptions) Add command "xml-descriptions".
3326 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3327
3328 2017-07-26 Yao Qi <yao.qi@linaro.org>
3329
3330 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3331 Include features/i386/32bit-*.c.
3332 (i386_linux_read_description): Generate target description if it
3333 doesn't exist.
3334 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3335 functions.
3336 * features/i386/32bit-linux.c: Re-generated.
3337 * features/i386/32bit-sse.c: Likewise.
3338 * target-descriptions.c (print_c_feature::visit): Print code to
3339 set register number if needed.
3340 (print_c_feature) <m_next_regnum>: New field.
3341
3342 2017-07-26 Yao Qi <yao.qi@linaro.org>
3343
3344 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3345 (FEATURE_XMLFILES): New.
3346 (FEATURE_CFILES): New.
3347 New rules.
3348 (clean-cfiles): Remove generated c files.
3349 * features/i386/32bit-avx.c: Generated.
3350 * features/i386/32bit-avx512.c: Generated.
3351 * features/i386/32bit-core.c: Generated.
3352 * features/i386/32bit-linux.c: Generated.
3353 * features/i386/32bit-mpx.c: Generated.
3354 * features/i386/32bit-pkeys.c: Generated.
3355 * features/i386/32bit-sse.c: Generated.
3356 * target-descriptions.c: Include algorithm.
3357 (tdesc_element_visitor): Add method visit_end.
3358 (print_c_tdesc): Implement visit_end.
3359 (print_c_tdesc:: m_filename_after_features): Move it to
3360 protected.
3361 (print_c_feature): New class.
3362 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3363 name starts with "i386/32bit-".
3364
3365 2017-07-26 Yao Qi <yao.qi@linaro.org>
3366
3367 * target-descriptions.c (tdesc_element_visitor): New class.
3368 (tdesc_element): New class.
3369 (tdesc_reg): Inherit from tdesc_element.
3370 (tdesc_reg::accept): New function.
3371 (tdesc_type): Inherit from tdesc_element.
3372 (tdesc_type::accept): New function.
3373 (tdesc_feature): Inherit from tdesc_element.
3374 (tdesc_feature::accept): New function.
3375 (target_desc): Inherit from tdesc_element.
3376 (target_desc::target_desc): New.
3377 (target_desc::~target_desc): New.
3378 (target_desc::accept): New.
3379 (allocate_target_description): Use new.
3380 (free_target_description): Use delete.
3381 (print_c_tdesc): New class.
3382 (maint_print_c_tdesc_cmd): Adjust.
3383
3384 * features/aarch64.c: Re-generated.
3385 * features/arc-arcompact.c: Re-generated.
3386 * features/arc-v2.c: Re-generated.
3387 * features/arm/arm-with-iwmmxt.c: Re-generated.
3388 * features/arm/arm-with-m.c: Re-generated.
3389 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3390 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3391 * features/arm/arm-with-neon.c: Re-generated.
3392 * features/arm/arm-with-vfpv2.c: Re-generated.
3393 * features/arm/arm-with-vfpv3.c: Re-generated.
3394 * features/i386/amd64-avx-avx512.c: Re-generated.
3395 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3396 * features/i386/amd64-avx.c: Re-generated.
3397 * features/i386/amd64-avx-linux.c: Re-generated.
3398 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3399 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3400 * features/i386/amd64-avx-mpx.c: Re-generated.
3401 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3402 * features/i386/amd64.c: Re-generated.
3403 * features/i386/amd64-linux.c: Re-generated.
3404 * features/i386/amd64-mpx.c: Re-generated.
3405 * features/i386/amd64-mpx-linux.c: Re-generated.
3406 * features/i386/i386-avx-avx512.c: Re-generated.
3407 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3408 * features/i386/i386-avx.c: Re-generated.
3409 * features/i386/i386-avx-linux.c: Re-generated.
3410 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3411 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3412 * features/i386/i386-avx-mpx.c: Re-generated.
3413 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3414 * features/i386/i386.c: Re-generated.
3415 * features/i386/i386-linux.c: Re-generated.
3416 * features/i386/i386-mmx.c: Re-generated.
3417 * features/i386/i386-mmx-linux.c: Re-generated.
3418 * features/i386/i386-mpx.c: Re-generated.
3419 * features/i386/i386-mpx-linux.c: Re-generated.
3420 * features/i386/x32-avx-avx512.c: Re-generated.
3421 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3422 * features/i386/x32-avx.c: Re-generated.
3423 * features/i386/x32-avx-linux.c: Re-generated.
3424 * features/i386/x32.c: Re-generated.
3425 * features/i386/x32-linux.c: Re-generated.
3426 * features/microblaze.c: Re-generated.
3427 * features/microblaze-with-stack-protect.c: Re-generated.
3428 * features/mips64-dsp-linux.c: Re-generated.
3429 * features/mips64-linux.c: Re-generated.
3430 * features/mips-dsp-linux.c: Re-generated.
3431 * features/mips-linux.c: Re-generated.
3432 * features/nds32.c: Re-generated.
3433 * features/nios2.c: Re-generated.
3434 * features/nios2-linux.c: Re-generated.
3435 * features/rs6000/powerpc-32.c: Re-generated.
3436 * features/rs6000/powerpc-32l.c: Re-generated.
3437 * features/rs6000/powerpc-403.c: Re-generated.
3438 * features/rs6000/powerpc-403gc.c : Re-generated.
3439 * features/rs6000/powerpc-405.c: Re-generated.
3440 * features/rs6000/powerpc-505.c: Re-generated.
3441 * features/rs6000/powerpc-601.c: Re-generated.
3442 * features/rs6000/powerpc-602.c: Re-generated.
3443 * features/rs6000/powerpc-603.c: Re-generated.
3444 * features/rs6000/powerpc-604.c: Re-generated.
3445 * features/rs6000/powerpc-64.c: Re-generated.
3446 * features/rs6000/powerpc-64l.c: Re-generated.
3447 * features/rs6000/powerpc-7400.c: Re-generated.
3448 * features/rs6000/powerpc-750.c: Re-generated.
3449 * features/rs6000/powerpc-860.c: Re-generated.
3450 * features/rs6000/powerpc-altivec32.c: Re-generated.
3451 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3452 * features/rs6000/powerpc-altivec64.c: Re-generated.
3453 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3454 * features/rs6000/powerpc-cell32l.c: Re-generated.
3455 * features/rs6000/powerpc-cell64l.c: Re-generated.
3456 * features/rs6000/powerpc-e500.c: Re-generated.
3457 * features/rs6000/powerpc-e500l.c: Re-generated.
3458 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3459 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3460 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3461 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3462 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3463 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3464 * features/rs6000/powerpc-vsx32.c: Re-generated.
3465 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3466 * features/rs6000/powerpc-vsx64.c: Re-generated.
3467 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3468 * features/rs6000/rs6000.c: Re-generated.
3469 * features/s390-linux32.c: Re-generated.
3470 * features/s390-linux32v1.c: Re-generated.
3471 * features/s390-linux32v2.c: Re-generated.
3472 * features/s390-linux64.c: Re-generated.
3473 * features/s390-linux64v1.c: Re-generated.
3474 * features/s390-linux64v2.c: Re-generated.
3475 * features/s390-te-linux64.c: Re-generated.
3476 * features/s390-tevx-linux64.c: Re-generated.
3477 * features/s390-vx-linux64.c: Re-generated.
3478 * features/s390x-linux64.c: Re-generated.
3479 * features/s390x-linux64v1.c: Re-generated.
3480 * features/s390x-linux64v2.c: Re-generated.
3481 * features/s390x-te-linux64.c: Re-generated.
3482 * features/s390x-tevx-linux64.c: Re-generated.
3483 * features/s390x-vx-linux64.c: Re-generated.
3484 * features/sparc/sparc32-solaris.c: Re-generated.
3485 * features/sparc/sparc64-solaris.c: Re-generated.
3486 * features/tic6x-c62x.c: Re-generated.
3487 * features/tic6x-c62x-linux.c: Re-generated.
3488 * features/tic6x-c64x.c: Re-generated.
3489 * features/tic6x-c64x-linux.c: Re-generated.
3490 * features/tic6x-c64xp.c: Re-generated.
3491 * features/tic6x-c64xp-linux.c: Re-generated.
3492
3493 2017-07-26 Yao Qi <yao.qi@linaro.org>
3494
3495 * i386-linux-tdep.c (i386_linux_read_description): New function.
3496 (i386_linux_core_read_description): Call
3497 i386_linux_read_description.
3498 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3499 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3500 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3501 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3502 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3503 * x86-linux-nat.c (x86_linux_read_description): Call
3504 i386_linux_read_description.
3505
3506 2017-07-26 Yao Qi <yao.qi@linaro.org>
3507
3508 * NEWS: Mention it.
3509 * features/Makefile (%.c: %.xml): Pass the xml file name to
3510 command "maint print c-tdesc".
3511 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3512 name from 'arg'.
3513
3514 2017-07-26 Yao Qi <yao.qi@linaro.org>
3515
3516 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3517 in-class initialization.
3518 (tdesc_create_feature): Call new instead of XCNEW.
3519 (free_target_description): Ue delete.
3520
3521 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3522
3523 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3524
3525 2017-07-25 Yao Qi <yao.qi@linaro.org>
3526
3527 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3528 constant.
3529 (amd64_x32_init_abi): Likewise.
3530 * amd64-tdep.h (amd64_init_abi): Update declaration.
3531 (amd64_x32_init_abi): Likewise.
3532
3533 2017-07-25 Yao Qi <yao.qi@linaro.org>
3534
3535 PR tdep/21717
3536 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3537 condition for FPSCR.
3538 (arm_linux_store_inferior_registers): Likewise.
3539
3540 2017-07-22 Tom Tromey <tom@tromey.com>
3541
3542 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3543 <syscalls_counts>: Now a std::vector.
3544 (get_catch_syscall_inferior_data): Use "new".
3545 (catch_syscall_inferior_data_cleanup): Use "delete".
3546 (insert_catch_syscall, remove_catch_syscall)
3547 (clear_syscall_counts): Update.
3548
3549 2017-07-22 Tom Tromey <tom@tromey.com>
3550
3551 * break-catch-syscall.c (syscall_catchpoint)
3552 <syscalls_to_be_caught>: Now a std::vector<int>
3553 (~syscall_catchpoint): Remove.
3554 (insert_catch_syscall, remove_catch_syscall)
3555 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3556 (print_mention_catch_syscall, print_recreate_catch_syscall):
3557 Update.
3558 (create_syscall_event_catchpoint): Change type of "filter"
3559 parameter.
3560 (catch_syscall_split_args): Return a std::vector.
3561 (catch_syscall_command_1, catching_syscall_number_1): Update.
3562
3563 2017-07-22 Tom Tromey <tom@tromey.com>
3564
3565 * break-catch-throw.c (struct exception_catchpoint)
3566 <exception_rx>: Now a std::string.
3567 (~exception_catchpoint): Remove.
3568 (print_one_detail_exception_catchpoint): Update.
3569 (handle_gnu_v3_exceptions): Change type of except_rx.
3570 (extract_exception_regexp): Return a std::string.
3571 (catch_exception_command_1): Update.
3572
3573 2017-07-22 Tom Tromey <tom@tromey.com>
3574
3575 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3576 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3577 std::vector.
3578 <catch_all>: Now a bool.
3579 (~signal_catchpoint): Remove.
3580 (signal_catchpoint_insert_location)
3581 (signal_catchpoint_remove_location)
3582 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3583 (signal_catchpoint_print_mention)
3584 (signal_catchpoint_print_recreate)
3585 (signal_catchpoint_explains_signal): Update.
3586 (create_signal_catchpoint): Change type of "filter" and
3587 "catch_all".
3588 (catch_signal_split_args): Return a std::vector. Change type of
3589 "catch_all".
3590 (catch_signal_command): Update.
3591
3592 2017-07-20 Pedro Alves <palves@redhat.com>
3593
3594 * ada-lang.c (ada_language_defn): Make extern.
3595 (_initialize_ada_language): Remove add_language call.
3596 * c-lang.c (c_language_defn, cplus_language_defn)
3597 (asm_language_defn, minimal_language_defn): Make extern.
3598 (_initialize_c_language): Delete.
3599 * completer.c (compare_cstrings): Delete, moved to utils.h.
3600 * d-lang.c (d_language_defn): Make extern.
3601 (_initialize_d_language): Remove add_language calls.
3602 * defs.h (enum language): Add comment.
3603 * f-lang.c (f_language_defn): Make extern.
3604 (_initialize_f_language): Remove add_language call.
3605 * go-lang.c (go_language_defn): Make extern.
3606 (_initialize_go_language): Remove add_language call.
3607 * language.c: Include <algorithm>.
3608 (languages): Redefine as const array.
3609 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3610 (set_language_command): Handle "local". Use for-range loop.
3611 (set_language): Remove loop.
3612 (language_enum): Rewrite.
3613 (language_def, language_str): Remove loops.
3614 (add_language): Delete.
3615 (add_set_language_command): New, based on add_languages.
3616 (skip_language_trampoline): Adjust.
3617 (local_language_defn): Delete.
3618 (language_gdbarch_post_init): Adjust.
3619 (_initialize_language): Remove add_language calls. Call
3620 add_set_language_command.
3621 * language.h (add_language): Delete.
3622 (auto_language_defn)
3623 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3624 (asm_language_defn, c_language_defn, cplus_language_defn)
3625 (d_language_defn, f_language_defn, go_language_defn)
3626 (m2_language_defn, objc_language_defn, opencl_language_defn)
3627 (pascal_language_defn, rust_language_defn): Declare.
3628 * m2-lang.c (m2_language_defn): Make extern.
3629 (_initialize_m2_language): Remove add_language call.
3630 * objc-lang.c (objc_language_defn): Make extern.
3631 (_initialize_objc_language): Remove add_language call.
3632 * opencl-lang.c (opencl_language_defn): Make extern.
3633 (_initialize_opencl_language): Remove add_language call.
3634 * p-lang.c (pascal_language_defn): Make extern.
3635 (_initialize_pascal_language): Delete.
3636 * rust-lang.c (rust_language_defn): Make extern.
3637 (_initialize_rust_language): Delete.
3638 * utils.h (compare_cstrings): New static inline function.
3639
3640 2017-07-20 Pedro Alves <palves@redhat.com>
3641
3642 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3643 (get_var_value): Constify parameters.
3644 (get_int_var_value): Change prototype.
3645 (to_fixed_range_type): Adjust.
3646 * ada-lang.h (get_int_var_value): Change prototype.
3647
3648 2017-07-20 Pedro Alves <palves@redhat.com>
3649
3650 * dwarf2read.c (dw2_lookup_symbol): Use
3651 SYMBOL_MATCHES_SEARCH_NAME.
3652 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3653
3654 2017-07-20 Pedro Alves <palves@redhat.com>
3655
3656 * block.c (block_iter_name_step, block_iter_name_first)
3657 (block_iter_name_next): Delete.
3658 (block_lookup_symbol_primary): Adjust to use
3659 dict_iter_match_first/dict_iter_match_next.
3660 * block.h (block_iter_name_first, block_iter_name_next): Delete
3661 declarations.
3662 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3663 dict_iter_match_first/dict_iter_match_next.
3664
3665 2017-07-20 Pedro Alves <palves@redhat.com>
3666
3667 * cp-support.c (cp_find_first_component_aux): Add missing case for
3668 end of string.
3669
3670 2017-07-18 David Blaikie <dblaikie@gmail.com>
3671
3672 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3673 of dwo_cu's dwo_file.
3674
3675 2017-07-18 Yao Qi <yao.qi@linaro.org>
3676
3677 * remote.c (store_registers_using_G): Remove one line comment.
3678
3679 2017-07-18 Yao Qi <yao.qi@linaro.org>
3680
3681 * regcache.c (regcache_cpy): Simplify it.
3682 (regcache::cpy_no_passthrough): Remove it.
3683 * regcache.h (cpy_no_passthrough): Remove it.
3684 (regcache_dup, regcache_cpy): Update comments.
3685
3686 2017-07-18 Pedro Alves <palves@redhat.com>
3687
3688 * remote-sim.c (sim_command_completer): Adjust to work with a
3689 completion_tracker instead of a VEC.
3690
3691 2017-07-17 Pedro Alves <palves@redhat.com>
3692
3693 * completer.c (complete_source_filenames): New function.
3694 (complete_address_and_linespec_locations): New function.
3695 (location_completer): Use complete_address_and_linespec_locations.
3696 (completion_tracker::build_completion_result): Honor the tracker's
3697 request to suppress append.
3698 * completer.h (completion_tracker::suppress_append_ws)
3699 (completion_tracker::set_suppress_append_ws): New methods.
3700 (completion_tracker::m_suppress_append_ws): New field.
3701 (complete_source_filenames): New declaration.
3702 * linespec.c (linespec_complete_what): New.
3703 (struct ls_parser) <complete_what, completion_word,
3704 completion_quote_char, completion_quote_end, completion_tracker>:
3705 New fields.
3706 (string_find_incomplete_keyword_at_end): New.
3707 (linespec_lexer_lex_string): Record quote char. If in completion
3708 mode, don't throw.
3709 (linespec_lexer_consume_token): Advance the completion word point.
3710 (linespec_lexer_peek_token): Save/restore completion info.
3711 (save_stream_and_consume_token): New.
3712 (set_completion_after_number): New.
3713 (linespec_parse_basic): Set what to complete next depending on
3714 token. Handle function and label completions specially.
3715 (parse_linespec): Disable objc shortcut in completion mode. Set
3716 what to complete next depending on token type. Skip keyword if in
3717 completion mode.
3718 (complete_linespec_component, linespec_complete): New.
3719 * linespec.h (linespec_complete): Declare.
3720
3721 2017-07-17 Pedro Alves <palves@redhat.com>
3722
3723 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3724 Handle 'operator<' / 'operator<<'.
3725
3726 2017-07-17 Pedro Alves <palves@redhat.com>
3727
3728 * completer.c (collect_explicit_location_matches): Handle
3729 MATCH_LABEL.
3730 (convert_explicit_location_to_linespec): New, factored out from
3731 ...
3732 (convert_explicit_location_to_sals): ... this.
3733 (complete_label): New.
3734 (linespec_complete_label, find_label_symbols_in_block): New.
3735 (find_label_symbols): Add completion_mode parameter and adjust to
3736 call find_label_symbols_in_block.
3737 * linespec.h (linespec_complete_label): Declare.
3738
3739 2017-07-17 Pedro Alves <palves@redhat.com>
3740
3741 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3742 complete_symbol_mode parameter.
3743 * cli/cli-cmds.c (complete_command): Get the completion result out
3744 of the handle_brkchars tracker if used a custom word point.
3745 * completer.c: Include "linespec.h".
3746 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3747 (advance_to_expression_complete_word_point): New.
3748 (completion_tracker::completes_to_completion_word): New.
3749 (complete_files_symbols): Pass down
3750 complete_symbol_mode::EXPRESSION.
3751 (explicit_options, probe_options): New.
3752 (collect_explicit_location_matches): Complete on the
3753 explictit_loc->foo instead of word. Use
3754 linespec_complete_function. Handle MATCH_LINE. Handle offering
3755 keyword and options completions.
3756 (backup_text_ptr): Delete.
3757 (skip_keyword): New.
3758 (complete_explicit_location): Remove 'word' parameter. Add
3759 language, quoted_arg_start and quoted_arg_end parameters.
3760 Rewrite, parsing left to right.
3761 (location_completer): Rewrite.
3762 (location_completer_handle_brkchars): New function.
3763 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3764 (enum complete_line_internal_reason): Adjust comments.
3765 (completion_tracker::discard_completions): New.
3766 (completer_handle_brkchars_func_for_completer): Handle
3767 location_completer.
3768 (gdb_custom_word_point_brkchars)
3769 (gdb_org_rl_basic_quote_characters): New.
3770 (gdb_completion_word_break_characters_throw)
3771 (completion_find_completion_word): Handle trackers that use a
3772 custom word point.
3773 (completion_tracker::advance_custom_word_point_by): New.
3774 (completion_tracker::build_completion_result): Don't rely on
3775 readline appending the quote char.
3776 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3777 use a custom word point.
3778 (gdb_rl_attempted_completion_function): Restore
3779 rl_basic_quote_characters.
3780 * completer.h (class completion_tracker): Extend intro comment.
3781 (completion_tracker::set_quote_char)
3782 (completion_tracker::quote_char)
3783 (completion_tracker::set_use_custom_word_point)
3784 (completion_tracker::use_custom_word_point)
3785 (completion_tracker::custom_word_point)
3786 (completion_tracker::set_custom_word_point)
3787 (completion_tracker::advance_custom_word_point_by)
3788 (completion_tracker::completes_to_completion_word)
3789 (completion_tracker::discard_completions): New methods.
3790 (completion_tracker::m_quote_char)
3791 (completion_tracker::m_use_custom_word_point)
3792 (completion_tracker::m_custom_word_point): New fields.
3793 (advance_to_expression_complete_word_point): Declare.
3794 * f-lang.c (f_collect_symbol_completion_matches): Add
3795 complete_symbol_mode parameter.
3796 * language.h (struct language_defn)
3797 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3798 parameter.
3799 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3800 (linespec_complete_function): New function.
3801 (linespec_lexer_lex_keyword): Adjust.
3802 * linespec.h (linespec_keywords, linespec_complete_function): New
3803 declarations.
3804 * location.c (find_end_quote): New function.
3805 (explicit_location_lex_one): Add explicit_completion_info
3806 parameter. Save quoting info. Don't throw if being called for
3807 completion. Don't handle Ada operators here.
3808 (is_cp_operator, skip_op_false_positives, first_of)
3809 (explicit_location_lex_one_function): New function.
3810 (string_to_explicit_location): Replace 'dont_throw' parameter with
3811 an explicit_completion_info pointer parameter. Handle it. Don't
3812 use explicit_location_lex_one to lex function names. Use
3813 explicit_location_lex_one_function instead.
3814 * location.h (struct explicit_completion_info): New.
3815 (string_to_explicit_location): Replace 'dont_throw' parameter with
3816 an explicit_completion_info pointer parameter.
3817 * symtab.c (default_collect_symbol_completion_matches_break_on):
3818 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3819 (default_collect_symbol_completion_matches)
3820 (collect_symbol_completion_matches): Add complete_symbol_mode
3821 parameter.
3822 (collect_symbol_completion_matches_type): Pass down
3823 complete_symbol_mode::EXPRESSION.
3824 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3825 parameter. Handle LINESPEC mode.
3826 * symtab.h (complete_symbol_mode): New.
3827 (default_collect_symbol_completion_matches_break_on)
3828 (default_collect_symbol_completion_matches)
3829 (collect_symbol_completion_matches)
3830 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3831 parameter.
3832
3833 2017-07-17 Pedro Alves <palves@redhat.com>
3834
3835 * utils.c (enum class strncmp_iw_mode): New.
3836 (strcmp_iw): Rename to ...
3837 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3838 parameters. Handle them.
3839 (strncmp_iw): New.
3840 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3841 * utils.h (strncmp_iw): Declare.
3842 (strcmp_iw): Move describing comments here.
3843
3844 2017-07-17 Pedro Alves <palves@redhat.com>
3845
3846 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3847 CP_OPERATOR_STR.
3848 * c-typeprint.c (is_type_conversion_operator): Use
3849 CP_OPERATOR_STR.
3850 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3851 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3852 CP_OPERATOR_LEN.
3853 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3854 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3855 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3856 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3857 CP_OPERATOR_STR.
3858 * location.c: Include "cp-support.h".
3859 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3860 CP_OPERATOR_STR.
3861 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3862 CP_OPERATOR_LEN.
3863
3864 2017-07-17 Pedro Alves <palves@redhat.com>
3865
3866 * cli/cli-cmds.c (complete_command): Use a completion tracker
3867 along with completion_find_completion_word for handle_brkchars
3868 phase.
3869 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3870 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3871 (struct gdb_rl_completion_word_info): New.
3872 (gdb_rl_find_completion_word): New.
3873 (completion_find_completion_word): New.
3874 * completer.h (completion_find_completion_word): Declare.
3875
3876 2017-07-17 Pedro Alves <palves@redhat.com>
3877
3878 * ada-lang.c (symbol_completion_match): Adjust comments.
3879 (symbol_completion_add): Replace vector parameter with
3880 completion_tracker parameter. Use it.
3881 (ada_make_symbol_completion_list): Rename to...
3882 (ada_collect_symbol_completion_matches): ... this. Add
3883 completion_tracker parameter and use it.
3884 (ada_language_defn): Adjust.
3885 * break-catch-syscall.c (catch_syscall_completer): Adjust
3886 prototype and work with completion_tracker instead of VEC.
3887 * breakpoint.c (condition_completer): Adjust prototype and work
3888 with completion_tracker instead of VEC.
3889 * c-lang.c (c_language_defn, cplus_language_defn)
3890 (asm_language_defn, minimal_language_defn): Adjust to renames.
3891 * cli/cli-cmds.c (complete_command): Rework using
3892 completion_tracker. Catch exceptions when completing.
3893 * cli/cli-decode.c (integer_unlimited_completer)
3894 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3895 with completion_tracker instead of VEC.
3896 * command.h (struct completion_tracker): Forward declare.
3897 (completer_ftype, completer_handle_brkchars_ftype): Change
3898 types.
3899 (complete_on_cmdlist, complete_on_enum): Adjust.
3900 * completer.c: Include <algorithm>.
3901 (struct gdb_completer_state): New.
3902 (current_completion): New global.
3903 (readline_line_completion_function): Delete.
3904 (noop_completer, filename_completer)
3905 (filename_completer_handle_brkchars, complete_files_symbols)
3906 (linespec_location_completer): Adjust to work with a
3907 completion_tracker instead of a VEC.
3908 (string_or_empty): New.
3909 (collect_explicit_location_matches): Adjust to work with a
3910 completion_tracker instead of a VEC.
3911 (explicit_location_completer): Rename to ...
3912 (complete_explicit_location): ... this and adjust to work with a
3913 completion_tracker instead of a VEC.
3914 (location_completer): Adjust to work with a completion_tracker
3915 instead of a VEC.
3916 (add_struct_fields): Adjust to work with a completion_list instead
3917 of VEC.
3918 (expression_completer): Rename to ...
3919 (complete_expression): ... this and adjust to work with a
3920 completion_tracker instead of a VEC. Use complete_files_symbols.
3921 (expression_completer): Reimplement on top of complete_expression.
3922 (symbol_completer): Adjust to work with a completion_tracker
3923 instead of a VEC.
3924 (enum complete_line_internal_reason): Add describing comments.
3925 (complete_line_internal_normal_command): Adjust to work with a
3926 completion_tracker instead of a VEC.
3927 (complete_line_internal): Rename to ...
3928 (complete_line_internal_1): ... this and adjust to work with a
3929 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3930 handle_brkchars phase.
3931 (new_completion_tracker): Delete.
3932 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3933 complete_line_internal_1.
3934 (free_completion_tracker): Delete.
3935 (INITIAL_COMPLETION_HTAB_SIZE): New.
3936 (completion_tracker::completion_tracker)
3937 (completion_tracker::~completion_tracker): New.
3938 (maybe_add_completion): Delete.
3939 (completion_tracker::maybe_add_completion)
3940 (completion_tracker::add_completion)
3941 (completion_tracker::add_completions): New.
3942 (throw_max_completions_reached_error): Delete.
3943 (complete_line): Adjust to work with a completion_tracker instead
3944 of a VEC. Don't create a completion_tracker_t or check for max
3945 completions here.
3946 (command_completer, command_completer_handle_brkchars)
3947 (signal_completer, reg_or_group_completer_1)
3948 (reg_or_group_completer, default_completer_handle_brkchars):
3949 Adjust to work with a completion_tracker.
3950 (gdb_completion_word_break_characters_throw): New.
3951 (gdb_completion_word_break_characters): Reimplement.
3952 (line_completion_function): Delete.
3953 (completion_tracker::recompute_lowest_common_denominator)
3954 (expand_preserving_ws)
3955 (completion_tracker::build_completion_result)
3956 (completion_result::completion_result)
3957 (completion_result::completion_result)
3958 (completion_result::~completion_result)
3959 (completion_result::completion_result)
3960 (completion_result::release_match_list, compare_cstrings)
3961 (completion_result::sort_match_list)
3962 (completion_result::reset_match_list)
3963 (gdb_rl_attempted_completion_function_throw)
3964 (gdb_rl_attempted_completion_function): New.
3965 * completer.h (completion_list, struct completion_result)
3966 (class completion_tracker): New.
3967 (complete_line): Add completion_tracker parameter.
3968 (readline_line_completion_function): Delete.
3969 (gdb_rl_attempted_completion_function): New.
3970 (noop_completer, filename_completer, expression_completer)
3971 (location_completer, symbol_completer, command_completer)
3972 (signal_completer, reg_or_group_completer): Update prototypes.
3973 (completion_tracker_t, new_completion_tracker)
3974 (make_cleanup_free_completion_tracker): Delete.
3975 (enum maybe_add_completion_enum): Delete.
3976 (maybe_add_completion): Delete.
3977 (throw_max_completions_reached_error): Delete.
3978 * corefile.c (complete_set_gnutarget): Adjust to work with a
3979 completion_tracker instead of a VEC.
3980 * cp-abi.c (cp_abi_completer): Adjust to work with a
3981 completion_tracker instead of a VEC.
3982 * d-lang.c (d_language_defn): Adjust.
3983 * disasm.c (disassembler_options_completer): Adjust to work with a
3984 completion_tracker instead of a VEC.
3985 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3986 (f_collect_symbol_completion_matches): ... this. Adjust to work
3987 with a completion_tracker instead of a VEC.
3988 (f_language_defn): Adjust.
3989 * go-lang.c (go_language_defn): Adjust.
3990 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3991 Adjust to work with a completion_tracker instead of a VEC.
3992 * infrun.c (handle_completer): Likewise.
3993 * interps.c (interpreter_completer): Likewise.
3994 * interps.h (interpreter_completer): Likewise.
3995 * language.c (unknown_language_defn, auto_language_defn)
3996 (local_language_defn): Adjust.
3997 * language.h (language_defn::la_make_symbol_completion_list):
3998 Rename to ...
3999 (language_defn::la_collect_symbol_completion_matches): ... this
4000 and adjust to work with a completion_tracker instead of a VEC.
4001 * m2-lang.c (m2_language_defn): Adjust.
4002 * objc-lang.c (objc_language_defn): Adjust.
4003 * opencl-lang.c (opencl_language_defn): Adjust.
4004 * p-lang.c (pascal_language_defn): Adjust.
4005 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4006 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4007 with a completion_tracker.
4008 * rust-lang.c (rust_language_defn): Adjust.
4009 * symtab.c (free_completion_list, do_free_completion_list)
4010 (return_val, completion_tracker): Delete.
4011 (completion_list_add_name, completion_list_add_symbol)
4012 (completion_list_add_msymbol, completion_list_objc_symbol)
4013 (completion_list_add_fields, add_symtab_completions): Add
4014 completion_tracker parameter and use it.
4015 (default_make_symbol_completion_list_break_on_1): Rename to...
4016 (default_collect_symbol_completion_matches_break_on): ... this.
4017 Add completion_tracker parameter and use it instead of allocating
4018 a completion tracker here.
4019 (default_make_symbol_completion_list_break_on): Delete old
4020 implementation.
4021 (default_make_symbol_completion_list): Delete.
4022 (default_collect_symbol_completion_matches): New.
4023 (make_symbol_completion_list): Delete.
4024 (collect_symbol_completion_matches): New.
4025 (make_symbol_completion_type): Rename to ...
4026 (collect_symbol_completion_matches_type): ... this. Add
4027 completion_tracker parameter and use it instead of VEC.
4028 (make_file_symbol_completion_list_1): Rename to...
4029 (collect_file_symbol_completion_matches): ... this. Add
4030 completion_tracker parameter and use it instead of VEC.
4031 (make_file_symbol_completion_list): Delete.
4032 (add_filename_to_list): Use completion_list instead of a VEC.
4033 (add_partial_filename_data::list): Now a completion_list.
4034 (make_source_files_completion_list): Work with a completion_list
4035 instead of a VEC.
4036 * symtab.h: Include "completer.h".
4037 (default_make_symbol_completion_list_break_on)
4038 (default_make_symbol_completion_list, make_symbol_completion_list)
4039 (make_symbol_completion_type, make_file_symbol_completion_list)
4040 (make_source_files_completion_list): Delete.
4041 (default_collect_symbol_completion_matches_break_on)
4042 (default_collect_symbol_completion_matches)
4043 (collect_symbol_completion_matches)
4044 (collect_symbol_completion_matches_type)
4045 (collect_file_symbol_completion_matches)
4046 (make_source_files_completion_list): New.
4047 * top.c (init_main): Don't install a rl_completion_entry_function
4048 hook. Install a rl_attempted_completion_function hook instead.
4049 * tui/tui-layout.c (layout_completer): Adjust to work with a
4050 completion_tracker.
4051 * tui/tui-regs.c (tui_reggroup_completer):
4052 * tui/tui-win.c (window_name_completer, focus_completer)
4053 (winheight_completer): Adjust to work with a completion_tracker.
4054 * value.c: Include "completer.h".
4055 (complete_internalvar): Adjust to work with a completion_tracker.
4056 * value.h (complete_internalvar): Likewise.
4057
4058 2017-07-17 Pedro Alves <palves@redhat.com>
4059
4060 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4061 renames.
4062 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4063 comments to completer_ftype's declaration.
4064 <completer_handle_brkchars>: Change type to
4065 completer_handle_brkchars_ftype.
4066 * command.h (completer_ftype): Add describing comment and give
4067 names to parameters.
4068 (completer_ftype_void): Rename to ...
4069 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4070 (set_cmd_completer_handle_brkchars): Adjust.
4071 * completer.c (filename_completer_handle_brkchars): New function.
4072 (complete_line_internal_normal_command): New function, factored
4073 out from ...
4074 (complete_line_internal): ... here.
4075 (command_completer_handle_brkchars)
4076 (default_completer_handle_brkchars)
4077 (completer_handle_brkchars_func_for_completer): New functions.
4078 * completer.h (set_gdb_completion_word_break_characters): Delete
4079 declaration.
4080 (completer_handle_brkchars_func_for_completer): New declaration.
4081 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4082 completer_handle_brkchars_func_for_completer.
4083
4084 2017-07-17 Pedro Alves <palves@redhat.com>
4085
4086 * completer.c (symbol_completer): New function, based on
4087 make_symbol_completion_list_fn.
4088 * completer.h (symbol_completer): New declaration.
4089 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4090 * python/py-cmd.c (completers): Adjust.
4091 * symtab.c (make_symbol_completion_list_fn): Delete.
4092 * symtab.h (make_symbol_completion_list_fn): Delete.
4093 * cli/cli-decode.c (add_cmd): Adjust.
4094
4095 2017-07-17 Pedro Alves <palves@redhat.com>
4096
4097 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4098 * dwarf2read.c: Include "filename-seen-cache.h".
4099 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4100 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4101 * filename-seen-cache.c: New file.
4102 * filename-seen-cache.h: New file.
4103 * symtab.c: Include "filename-seen-cache.h".
4104 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4105 (create_filename_seen_cache, clear_filename_seen_cache)
4106 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4107 to filename-seen-cache.h/filename-seen-cache.c.
4108 (output_source_filename, sources_info)
4109 (maybe_add_partial_symtab_filename)
4110 (make_source_files_completion_list): Adjust to use
4111 filename_seen_cache.
4112
4113 2017-07-17 Pedro Alves <palves@redhat.com>
4114
4115 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4116 fields.
4117 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4118 dwarf2_debug_sections*)): New.
4119 (dwarf2_per_objfile::dwarf2_per_objfile(const
4120 dwarf2_per_objfile&)): Declare as deleted.
4121 (dwarf2_per_objfile::operator=): Declare as deleted.
4122 (dwarf2_per_objfile::dwarf2_per_objfile)
4123 (dwarf2_per_objfile::~dwarf2_per_objfile)
4124 (dwarf2_per_objfile::free_cached_comp_units): New.
4125 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4126 ctor. Call dwarf2_per_objfile's ctor manually.
4127 (dwarf2_locate_sections): Deleted/refactored as ...
4128 (dwarf2_per_objfile::locate_sections): ... this new method.
4129 (free_cached_comp_units): Defer to
4130 dwarf2_per_objfile::free_cached_comp_units.
4131 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4132
4133 2017-07-14 Tom Tromey <tom@tromey.com>
4134
4135 PR rust/21764:
4136 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4137 parameter.
4138 <UNOP_SIZEOF>: Split into separate case.
4139 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4140
4141 2017-07-14 Tom Tromey <tom@tromey.com>
4142
4143 PR rust/21763:
4144 * symtab.c (symbol_matches_domain): Add language_rust to special
4145 case.
4146 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4147 treat LOC_TYPEDEF symbols as variables.
4148
4149 2017-07-14 Pedro Alves <palves@redhat.com>
4150
4151 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4152 symtabs matching all symtabs with SRCFILE as file name instead of
4153 only considering the first hit, with lookup_symtab.
4154
4155 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4156
4157 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4158 operator_name parameters.
4159 (gen_expr): Update function call.
4160
4161 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4162
4163 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4164 parameter.
4165 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4166 Likewise.
4167 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4168 parameter, use agent_expr::gdbarch instead, update function
4169 calls.
4170 (locexpr_tracepoint_var_ref): Likewise.
4171 (loclist_tracepoint_var_ref): Likewise.
4172 * ax-gdb.c (gen_trace_static_fields): Likewise.
4173 (gen_traced_pop): Likewise.
4174 (gen_frame_args_address): Likewise.
4175 (gen_frame_locals_address): Likewise.
4176 (gen_var_ref): Likewise.
4177 (gen_struct_ref_recursive): Likewise.
4178 (gen_static_field): Likewise.
4179 (gen_maybe_namespace_elt): Likewise.
4180 (gen_expr): Likewise.
4181 (gen_trace_for_var): Likewise.
4182 (gen_trace_for_expr): Likewise.
4183 (gen_trace_for_return_address): Likewise.
4184
4185 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4186
4187 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4188 parameter.
4189 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4190
4191 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4192
4193 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4194 from ax, update calls.
4195 (gen_usual_arithmetic): Likewise.
4196 (gen_integral_promotions): Likewise.
4197 (gen_bitfield_ref): Likewise.
4198 (gen_primitive_field): Likewise.
4199 (gen_struct_ref_recursive): Likewise.
4200 (gen_struct_ref): Likewise.
4201 (gen_maybe_namespace_elt): Likewise.
4202 (gen_struct_elt_for_reference): Likewise.
4203 (gen_namespace_elt): Likewise.
4204 (gen_aggregate_elt_ref): Likewise.
4205 (gen_expr): Get gdbarch from ax, update calls.
4206 (gen_expr_binop_rest): Likewise.
4207
4208 2017-07-13 Pedro Alves <palves@redhat.com>
4209
4210 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4211 as default tdesc.
4212 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4213 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4214 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4215 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4216 tdep.
4217 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4218 Get final tdesc from the tdep.
4219 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4220 default tdesc.
4221 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4222 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4223 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4224 Use it as default tdesc.
4225 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4226 down to amd_init_abi. No longer handle fallback tdesc here.
4227 * amd64-tdep.h (tdesc_x32): Declare.
4228 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4229 parameter.
4230 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4231 as default tdesc.
4232
4233 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4234
4235 * s390-linux-tdep.c (s390_process_record): Add support for
4236 instructions new in arch12.
4237
4238 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4239
4240 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4241 PT_GETFSBASE and PT_GETGSBASE.
4242 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4243 PT_SETGSBASE.
4244
4245 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4246
4247 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4248 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4249 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4250 those rules.
4251 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4252 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4253 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4254 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4255 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4256 * features/i386/amd64.xml: Add 64bit-segments.xml.
4257 * features/i386/amd64-avx-avx512.c: Regenerated.
4258 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4259 * features/i386/amd64-avx-mpx.c: Regenerated.
4260 * features/i386/amd64-avx.c: Regenerated.
4261 * features/i386/amd64-mpx.c: Regenerated.
4262 * features/i386/amd64.c: Regenerated.
4263 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4264 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4265 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4266 * regformats/i386/amd64-avx.dat: Regenerated.
4267 * regformats/i386/amd64-mpx.dat: Regenerated.
4268 * regformats/i386/amd64.dat: Regenerated.
4269
4270 2017-07-10 Yao Qi <yao.qi@linaro.org>
4271
4272 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4273 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4274
4275 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4276
4277 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4278 unsetenv.
4279 * gnulib/aclocal.m4: Regenerate.
4280 * gnulib/config.in: Regenerate.
4281 * gnulib/configure: Regenerate.
4282 * gnulib/import/Makefile.am: Regenerate.
4283 * gnulib/import/Makefile.in: Regenerate.
4284 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4285 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4286 * gnulib/import/m4/environ.m4: New file.
4287 * gnulib/import/m4/setenv.m4: New file.
4288 * gnulib/import/setenv.c: New file.
4289 * gnulib/import/unsetenv.c: New file.
4290
4291 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4292
4293 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4294 address when op is DW_OP_addr.
4295
4296 2017-07-09 Tom Tromey <tom@tromey.com>
4297
4298 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4299 check and apply to outer type.
4300
4301 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4302
4303 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4304 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4305 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4306 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4307
4308 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4309
4310 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4311
4312 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4313
4314 * corelow.c (get_core_siginfo): Remove.
4315 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4316 instead of get_core_siginfo.
4317 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4318 * gdbarch.h: Re-generate.
4319 * gdbarch.c: Re-generate.
4320 * linux-tdep.c (linux_core_xfer_siginfo): New.
4321 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4322
4323 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4324
4325 * corelow.c (thread_section_name): Move to ...
4326 * gdbcore.h (thread_section_name): ... here.
4327
4328 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4329
4330 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4331 (struct siginfo32): New.
4332 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4333 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4334 via ptrace(PT_LWPINFO).
4335
4336 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4337
4338 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4339 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4340 (fbsd_get_siginfo_type): New.
4341 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4342 (_initialize_fbsd_tdep): New.
4343
4344 2017-07-06 David Blaikie <dblaikie@gmail.com>
4345
4346 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4347 a singular dwo_unit*) to support multiple CUs in the same way that
4348 multiple TUs are supported.
4349 (create_cus_hash_table): Replace create_dwo_cu with a function for
4350 parsing multiple CUs from a DWO file.
4351 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4352 create_dwo_cu.
4353 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4354 htab_find, rather than comparing the signature to a singleton CU in
4355 the dwo_file.
4356
4357 2017-07-06 Pedro Alves <palves@redhat.com>
4358
4359 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4360
4361 2017-07-04 Pedro Alves <palves@redhat.com>
4362
4363 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4364 * gdbtypes.h (TYPE_STATIC): Delete.
4365 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4366 is_synchronized, is_native>: Delete.
4367 <dummy>: Bump.
4368 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4369 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4370 (TYPE_FN_FIELD_ABSTRACT): Delete.
4371
4372 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4373
4374 * buffer.h (buffer_finish): Fix spelling mistakes.
4375
4376 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4377
4378 * .dir-locals.el: Automatically switch to C-style comments in
4379 versions of Emacs that support the feature.
4380
4381 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4382 Pedro Alves <palves@redhat.com>
4383
4384 PR cli/21688
4385 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4386 (process_next_line): New variable 'inline_cmd'.
4387 Adjust 'if' clauses for "python", "compile" and "guile" to use
4388 'command_name_equals' and check for '!inline_cmd'.
4389
4390 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4391
4392 PR cli/21688
4393 * cli/cli-script.c (command_name_equals_not_inline): New function.
4394 (process_next_line): Adjust 'if' clauses for "python", "compile"
4395 and "guile" to use command_name_equals_not_inline.
4396
4397 2017-06-29 Pedro Alves <palves@redhat.com>
4398
4399 * completer.c (expression_completer): Call
4400 linespec_location_completer instead of location_completer.
4401
4402 2017-06-29 Pedro Alves <palves@redhat.com>
4403
4404 * completer.c (expression_completer): Remove code that recomputes
4405 'text' from 'word'.
4406
4407 2017-06-29 Yao Qi <yao.qi@linaro.org>
4408
4409 * regformats/regdat.sh: Generate code with
4410 "ifndef IN_PROCESS_AGENT".
4411
4412 2017-06-28 Pedro Alves <palves@redhat.com>
4413
4414 * command.h: Include "common/scoped_restore.h".
4415
4416 2017-06-28 Yao Qi <yao.qi@linaro.org>
4417
4418 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4419 instead of obstack_grow.
4420
4421 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4422
4423 PR gdb/21337
4424 * symfile.c (reread_symbols): Call objfiles_changed just before
4425 read_symbols.
4426
4427 2017-06-27 Pedro Alves <palves@redhat.com>
4428
4429 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4430 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4431 (completion_list_add_symbol, completion_list_add_msymbol):
4432 ... these new functions.
4433 (add_symtab_completions)
4434 (default_make_symbol_completion_list_break_on_1): Adjust.
4435
4436 2017-06-27 Pedro Alves <palves@redhat.com>
4437
4438 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4439 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4440 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4441 dtor.
4442 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4443 'storage_obstack' field an auto_obstack. In-class initialize all
4444 non-bitfield fields. Make minsyms_read bool.
4445 * symfile.c (read_symbols): Adjust.
4446
4447 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4448
4449 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4450 (gdbsim_store_register): Likewise.
4451
4452 2017-06-27 Pedro Alves <palves@redhat.com>
4453
4454 * c-exp.y (name_obstack): Now an auto_obstack.
4455 (yylex): Use auto_obstack::clear.
4456 (c_parse): Use auto_obstack::clear instead of reinitializing and
4457 freeing the obstack.
4458 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4459 * d-exp.y (name_obstack): Now an auto_obstack.
4460 (yylex): Use auto_obstack::clear.
4461 (d_parse): Use auto_obstack::clear instead of reinitializing and
4462 freeing the obstack.
4463 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4464 auto_obstack.
4465 * dwarf2read.c (create_addrmap_from_index)
4466 (dwarf2_build_psymtabs_hard)
4467 (update_enumeration_type_from_children): Likewise.
4468 * gdb_obstack.h (auto_obstack): New type.
4469 * go-exp.y (name_obstack): Now an auto_obstack.
4470 (build_packaged_name): Use auto_obstack::clear.
4471 (go_parse): Use auto_obstack::clear instead of reinitializing and
4472 freeing the obstack.
4473 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4474 auto_obstack.
4475 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4476 * rust-exp.y (work_obstack): Now an auto_obstack.
4477 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4478 reinitializing and freeing the obstack.
4479 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4480 (host_char_to_target): Use auto_obstack.
4481 * utils.h (make_cleanup_obstack_free): Delete declaration.
4482 * valprint.c (generic_emit_char, generic_printstr): Use
4483 auto_obstack.
4484
4485 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4486
4487 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4488 thread.
4489 (darwin_init_thread_list): Don't update dummy thread.
4490 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4491
4492 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4493
4494 * record-full.c (netorder16): Remove.
4495
4496 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4497
4498 * common/diagnostics.h: Define macros for GCC.
4499 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4500 * common/vec.h: Include diagnostics.h.
4501 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4502 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4503 warning.
4504
4505 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4506
4507 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4508 New macro.
4509 * ada-lex.l: Ignore deprecated register warnings.
4510
4511 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4512
4513 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4514 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4515
4516 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4517
4518 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4519 its own line.
4520
4521 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4522
4523 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4524
4525 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4526
4527 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4528 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4529 (xtensa_register_read_masked): Likewise.
4530
4531 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4532
4533 * common/environ.c (gdb_environ::unset): Update comment.
4534
4535 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4536
4537 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4538 registers.
4539
4540 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4541
4542 * record-full.c (record_full_exec_insn): Use byte_vector.
4543
4544 2017-06-22 Yao Qi <yao.qi@linaro.org>
4545
4546 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4547 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4548
4549 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4550
4551 * remote.c (cached_reg): Move from here...
4552 * regcache.h (cached_reg): ...to here.
4553 * python/py-unwind.c (struct reg_info): Remove.
4554 (cached_frame_info): Use cached_reg_t.
4555 (pyuw_prev_register): Likewise.
4556 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4557 (pyuw_dealloc_cache): Free all registers.
4558
4559 2017-06-22 Pedro Alves <palves@redhat.com>
4560 Simon Marchi <simon.marchi@ericsson.com>
4561
4562 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4563 warning.
4564 * common/diagnostics.h: New file.
4565
4566 2017-06-22 Pedro Alves <palves@redhat.com>
4567
4568 * common/agent.h: Add include guards.
4569
4570 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4571
4572 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4573 talk about addressable units instead of bytes.
4574
4575 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4576
4577 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4578 of '::const_iterator'.
4579
4580 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4581
4582 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4583 'unittests/environ-selftests.c'.
4584 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4585 * charset.c (find_charset_names): Declare object 'iconv_env'.
4586 Update code to use 'iconv_env' object. Remove call to
4587 'free_environ'.
4588 * common/environ.c: Include <utility>.
4589 (make_environ): Delete function.
4590 (free_environ): Delete function.
4591 (gdb_environ::clear): New function.
4592 (gdb_environ::operator=): New function.
4593 (gdb_environ::get): Likewise.
4594 (environ_vector): Delete function.
4595 (set_in_environ): Delete function.
4596 (gdb_environ::set): New function.
4597 (unset_in_environ): Delete function.
4598 (gdb_environ::unset): New function.
4599 (gdb_environ::envp): Likewise.
4600 * common/environ.h: Include <vector>.
4601 (struct gdb_environ): Delete; transform into...
4602 (class gdb_environ): ... this class.
4603 (free_environ): Delete prototype.
4604 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4605 environ_vector): Likewise.
4606 * infcmd.c (run_command_1): Update code to call
4607 'envp' from 'gdb_environ' class.
4608 (environment_info): Update code to call methods from 'gdb_environ'
4609 class.
4610 (unset_environment_command): Likewise.
4611 (path_info): Likewise.
4612 (path_command): Likewise.
4613 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4614 (inferior::inferior): Initialize 'environment' using the host's
4615 information.
4616 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4617 Include "environ.h".
4618 (class inferior) <environment>: Change type from 'struct
4619 gdb_environ' to 'gdb_environ'.
4620 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4621 methods from 'gdb_environ' class.
4622 * solib.c (solib_find_1): Likewise
4623 * unittests/environ-selftests.c: New file.
4624
4625 2017-06-20 Yao Qi <yao.qi@linaro.org>
4626
4627 * features/i386/i386-linux.xml: Exchange the order of including
4628 32bit-linux.xml and 32bit-sse.xml.
4629 * features/i386/i386-linux.c: Regenerated.
4630
4631 2017-06-20 Yao Qi <yao.qi@linaro.org>
4632
4633 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4634 Delete copy ctor and assignment operator.
4635 (tdesc_type): Likewise.
4636 (tdesc_feature): Likewise.
4637 (tdesc_free_reg): Remove.
4638 (tdesc_create_reg): Use new.
4639 (tdesc_free_type): Remove.
4640 (tdesc_create_vector): Use new.
4641 (tdesc_create_union): Likewise.
4642 (tdesc_create_flags): Likewise.
4643 (tdesc_create_enum): Likewise.
4644 (tdesc_free_feature): Delete.
4645 (free_target_description): Use delete.
4646
4647 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4648
4649 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4650 registers.
4651
4652 2017-06-19 Pedro Alves <palves@redhat.com>
4653
4654 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4655 after gdb::unlinker.
4656
4657 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4658
4659 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4660 gdb_environ to access an environment variable.
4661
4662 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4663
4664 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4665 gdb_byte*.
4666
4667 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4668
4669 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4670
4671 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4672
4673 * configure: Re-generate.
4674 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4675
4676 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4677
4678 * configure: Re-generate.
4679 * warning.m4: Pass -Werror to compiler when checking for
4680 supported warning flags.
4681
4682 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4683
4684 * Makefile.in (COMPILE.pre): Add "-x c++".
4685
4686 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4687 Pedro Alves <palves@redhat.com>
4688 Yao Qi <yao.qi@linaro.org>
4689
4690 * defs.h (RequireLongest): New.
4691 (extract_integer): Declare function template.
4692 (extract_signed_integer): Remove the declaration, but define it
4693 static inline.
4694 (extract_unsigned_integer): Likewise.
4695 (store_integer): Declare function template.
4696 (store_signed_integer): Remove the declaration, but define it
4697 static inline.
4698 (store_unsigned_integer): Likewise.
4699 * findvar.c (extract_integer): New function template.
4700 (extract_signed_integer): Remove.
4701 (extract_unsigned_integer): Remove.
4702 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4703 instantiations.
4704 (store_integer): New function template.
4705 (store_signed_integer): Remove.
4706 (store_unsigned_integer): Remove.
4707 (store_integer): Explicit instantiations.
4708 * regcache.c (regcache_raw_read_signed): Update.
4709 (regcache::raw_read): New function.
4710 (regcache::raw_read_signed): Remove.
4711 (regcache::raw_read_unsigned): Remove.
4712 (regcache_raw_read_unsigned): Update.
4713 (regcache_raw_write_unsigned): Update.
4714 (regcache::raw_write_signed): Remove.
4715 (regcache::raw_write): New function.
4716 (regcache_cooked_read_signed): Update.
4717 (regcache::raw_write_unsigned): Remove.
4718 (regcache::cooked_read_signed): Remove.
4719 (regcache_cooked_read_unsigned): Update.
4720 (regcache::cooked_read_unsigned): Remove.
4721 (regcache_cooked_write_signed): Update.
4722 (regcache_cooked_write_unsigned): Update.
4723 * regcache.h (regcache) <raw_read_signed>: Remove.
4724 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4725 <raw_read, raw_write>: New.
4726 <cooked_read_signed, cooked_write_signed>: Remove.
4727 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4728 <cooked_read, cooked_write>: New.
4729 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4730 (sh64_pseudo_register_write): Update.
4731
4732 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4733
4734 * arc-tdep.c (arc_disassembler_options): New variable.
4735 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4736 of default_print_insn.
4737 (arc_delayed_print_insn): Set info->section when needed,
4738 use default_print_insn to retrieve a disassembler.
4739
4740 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4741
4742 PR gdb/21574
4743 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4744 to mention $SHELL and startup-with-shell.
4745
4746 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4747
4748 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4749
4750 2017-06-14 Yao Qi <yao.qi@linaro.org>
4751
4752 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4753 default_print_insn instead of print_insn_aarch64.
4754 * arm-tdep.c (gdb_print_insn_arm): Call
4755 default_print_insn instead of print_insn_big_arm
4756 and print_insn_little_arm.
4757 * i386-tdep.c (i386_print_insn): Call default_print_insn
4758 instead of print_insn_i386.
4759 * ia64-tdep.c (ia64_print_insn): Call
4760 default_print_insn instead of print_insn_ia64.
4761 * mips-tdep.c (gdb_print_insn_mips): Call
4762 default_print_insn instead of print_insn_big_mips
4763 and print_insn_little_mips.
4764 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4765 instead of print_insn_spu.
4766
4767 2017-06-14 Pedro Alves <palves@redhat.com>
4768
4769 * ada-lang.c: Include "common/byte-vector.h".
4770 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4771 * charset.c (wchar_iterator::iterate): Resize the vector instead
4772 of reserving it.
4773 * common/byte-vector.h: Include "common/def-vector.h".
4774 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4775 * cli/cli-dump.c: Include "common/byte-vector.h".
4776 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4777 * common/byte-vector.h: New file.
4778 * common/def-vector.h: New file.
4779 * common/default-init-alloc.h: New file.
4780 * dwarf2loc.c: Include "common/byte-vector.h".
4781 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4782 instead of reserving it.
4783 * dwarf2read.c: Include "common/byte-vector.h".
4784 (data_buf::m_vec): Now a gdb::byte_vector.
4785 * gdb_regex.c: Include "common/def-vector.h".
4786 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4787 * mi/mi-main.c: Include "common/byte-vector.h".
4788 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4789 * printcmd.c: Include "common/byte-vector.h".
4790 (print_scalar_formatted): Use gdb::byte_vector.
4791 * valprint.c: Include "common/byte-vector.h".
4792 (maybe_negate_by_bytes, print_decimal_chars): Use
4793 gdb::byte_vector.
4794
4795 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4796
4797 * darwin-nat.c: Include "nat/fork-inferior.h".
4798
4799 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4800
4801 * configure.nat: Factor out Darwin bits that are not
4802 architecture-specific. Add fork-inferior.o.
4803
4804 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4805
4806 * configure.nat: Factor out AIX bits that are not
4807 architecture-specific. Add fork-inferior.o.
4808
4809 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4810
4811 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4812 (read_pieced_value, write_pieced_value): ...here. Reduce to
4813 wrappers that just call rw_pieced_value.
4814
4815 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4816
4817 * dwarf2loc.c (write_pieced_value): When writing the data for a
4818 memory piece, use write_memory_with_notification instead of
4819 write_memory.
4820
4821 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4822
4823 * valops.c (read_value_memory): Change embedded_offset to
4824 represent a bit offset instead of a byte offset.
4825 * value.h (read_value_memory): Adjust comment.
4826
4827 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4828
4829 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4830 dest_offset_bits and source_offset_bits.
4831 (write_pieced_value): Likewise.
4832
4833 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4834
4835 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4836 given by DW_OP_bit_piece.
4837 (write_pieced_value): Likewise.
4838
4839 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4840
4841 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4842 some other preparations to the places where sufficient information
4843 is available.
4844 (write_pieced_value): Likewise.
4845
4846 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4847
4848 * dwarf2loc.c (bits_to_bytes): New function.
4849 (read_pieced_value): Fix offset calculations for register pieces
4850 on big-endian targets.
4851 (write_pieced_value): Likewise.
4852
4853 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4854
4855 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4856 (write_pieced_value): Likewise.
4857
4858 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4859
4860 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4861 transfer the source value's least significant bits, instead of its
4862 lowest-addressed ones. Rename type_len to max_offset.
4863 (read_pieced_value): Mirror above changes to write_pieced_value as
4864 applicable.
4865
4866 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4867
4868 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4869 truncate full bytes from dest_offset_bits before using it as an
4870 offset into the buffer.
4871
4872 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4873
4874 * dwarf2loc.c (write_pieced_value): Include transfer size in
4875 byte-wise check.
4876
4877 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4878
4879 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4880 calculation of this_size.
4881
4882 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4883
4884 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4885 when targeting a bit-field.
4886 (write_pieced_value): Likewise.
4887
4888 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4889
4890 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4891 (allocate_piece_closure): Drop addr_size parameter.
4892 (dwarf2_evaluate_loc_desc_full): Adjust call to
4893 allocate_piece_closure.
4894
4895 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4896
4897 PR gdb/21226
4898 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4899 the LSB end, independent of endianness.
4900
4901 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4902
4903 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4904 size capping.
4905
4906 2017-06-13 Yao Qi <yao.qi@linaro.org>
4907
4908 * mips-linux-nat.c: Move include features/mips*-linux.c to
4909 mips-linux-tdep.c.
4910 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4911 to mips-linux-tdep.c.
4912 * mips-linux-tdep.c: Include features/mips*-linux.c
4913 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4914 functions.
4915 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4916 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4917 (tdesc_mips64_dsp_linux): Declare.
4918
4919 2017-06-12 Tom Tromey <tom@tromey.com>
4920
4921 * valprint.h (val_print_type_code_int): Remove.
4922 * valprint.c (generic_val_print_int): Always call
4923 val_print_scalar_formatted.
4924 (val_print_type_code_int): Remove.
4925 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4926 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4927 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4928 * ada-valprint.c (ada_val_print_num): Use
4929 val_print_scalar_formatted.
4930
4931 2017-06-12 Tom Tromey <tom@tromey.com>
4932
4933 * printcmd.c (print_scalar_formatted): Unify the two switches.
4934 Don't convert scalars to LONGEST.
4935
4936 2017-06-12 Tom Tromey <tom@tromey.com>
4937
4938 PR exp/16225:
4939 * valprint.h (print_decimal_chars): Update.
4940 * valprint.c (maybe_negate_by_bytes): New function.
4941 (print_decimal_chars): Add "is_signed" argument.
4942 * printcmd.c (print_scalar_formatted): Update.
4943
4944 2017-06-12 Tom Tromey <tom@tromey.com>
4945
4946 PR exp/16225:
4947 * valprint.h (print_binary_chars, print_hex_chars): Update.
4948 * valprint.c (val_print_type_code_int): Update.
4949 (print_binary_chars): Add "zero_pad" argument.
4950 (emit_octal_digit): New function.
4951 (print_octal_chars): Don't zero-pad.
4952 (print_decimal_chars): Likewise.
4953 (print_hex_chars): Add "zero_pad" argument.
4954 * sh64-tdep.c (sh64_do_fp_register): Update.
4955 * regcache.c (regcache::dump): Update.
4956 * printcmd.c (print_scalar_formatted): Update.
4957 * infcmd.c (default_print_one_register_info): Update.
4958
4959 2017-06-12 Pedro Alves <palves@redhat.com>
4960 Alan Hayward <alan.hayward@arm.com>
4961
4962 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4963 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4964 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4965 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4966 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4967
4968 2017-06-12 Pedro Alves <palves@redhat.com>
4969
4970 * dwarf2read.c (mapped_symtab::data): Now a vector of
4971 symtab_index_entry instead of vector of
4972 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4973 whether an element's name is NULL instead of checking whether the
4974 element itself is NULL.
4975 (find_slot): Change return type. Adjust.
4976 (hash_expand, , add_index_entry, uniquify_cu_indices)
4977 (write_hash_table): Adjust.
4978
4979 2017-06-12 Pedro Alves <palves@redhat.com>
4980
4981 * dwarf2read.c (recursively_count_psymbols): New function.
4982 (write_psymtabs_to_index): Call it to compute number of psyms and
4983 pass estimate size of psyms_seen to unordered_set's ctor.
4984
4985 2017-06-12 Pedro Alves <palves@redhat.com>
4986
4987 * dwarf2read.c (write_hash_table): Check if key already exists
4988 before emplacing.
4989
4990 2017-06-12 Pedro Alves <palves@redhat.com>
4991
4992 * dwarf2read.c (data_buf::append_space): Rename to...
4993 (data_buf::grow): ... this, and make private. Adjust all callers.
4994 (data_buf::append_uint): New method.
4995 (add_address_entry, write_one_signatured_type)
4996 (write_psymtabs_to_index): Use it.
4997
4998 2017-06-12 Pedro Alves <palves@redhat.com>
4999
5000 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5001 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5002 (data_buf::file_write): Call ::fwrite directly.
5003
5004 2017-06-12 Pedro Alves <palves@redhat.com>
5005
5006 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5007 std::vector::erase.
5008
5009 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5010
5011 Code cleanup: C++ify .gdb_index producer.
5012 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5013 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5014 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5015 (create_strtab, add_string): Remove.
5016 (file_write, data_buf): New.
5017 (struct symtab_index_entry): Use std::vector for cu_indices.
5018 (struct mapped_symtab): Use std::vector for data.
5019 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5020 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5021 Remove.
5022 (find_slot): Change return type. Update it to the new data structures.
5023 (hash_expand, add_index_entry): Update it to the new data structures.
5024 (offset_type_compare): Remove.
5025 (uniquify_cu_indices): Update it to the new data structures.
5026 (c_str_view, c_str_view_hasher, vector_hasher): New.
5027 (add_indices_to_cpool): Remove.
5028 (write_hash_table): Update it to the new data structures.
5029 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5030 (eq_psymtab_cu_index): Remove.
5031 (psym_index_map): New typedef.
5032 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5033 reference and std::unordered_map for cu_index_htab.
5034 (add_address_entry, add_address_entry_worker, write_address_map)
5035 (write_psymbols): Update it to the new data structures.
5036 (write_obstack): Remove.
5037 (struct signatured_type_index_data): Change types_list to a data_buf
5038 reference and psyms_seen to a std::unordered_set reference.
5039 (write_one_signatured_type, recursively_write_psymbols)
5040 (write_psymtabs_to_index): Update it to the new data structures.
5041
5042 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5043
5044 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5045 separate-debug-file commands.
5046 * symfile.h (separate_debug_file_debug): New global.
5047 * symfile.c (separate_debug_file_debug): New global.
5048 (separate_debug_file_exists, find_separate_debug_file): Add
5049 debug output.
5050 (_initialize_symfile): Add "set debug separate-debug-file"
5051 command.
5052 * build-id.c (build_id_to_debug_bfd,
5053 find_separate_debug_file_by_buildid): Add debug output.
5054
5055 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5056
5057 * gdbarch.sh (displaced_step_free_closure): Remove.
5058 * gdbarch.h, gdbarch.c: Re-generate.
5059 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5060 displaced_step_free_closure.
5061 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5062 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5063 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5064 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5065 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5066 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5067 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5068 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5069 * infrun.c (displaced_step_clear): Call xfree instead of
5070 gdbarch_displaced_step_free_closure.
5071
5072 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5073
5074 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5075 NULL".
5076
5077 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5078
5079 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5080 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5081 (mn10300_push_dummy_call): Likewise.
5082
5083 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5084
5085 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5086
5087 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5088
5089 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5090
5091 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5092
5093 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5094 able to start inferiors using a shell.
5095 (New remote packets): Announce new packet "QStartupWithShell".
5096 * remote.c: Add PACKET_QStartupWithShell.
5097 (extended_remote_create_inferior): Handle new
5098 PACKET_QStartupWithShell.
5099 (remote_protocol_features) <QStartupWithShell>: New entry for
5100 PACKET_QStartupWithShell.
5101 (_initialize_remote): Call "add_packet_config_cmd" for
5102 QStartupShell.
5103
5104 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5105 Pedro Alves <palves@redhat.com>
5106
5107 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5108 and "nat/fork-inferior.h".
5109 * common/common-inferior.h: New file, with contents from
5110 "gdb/inferior.h".
5111 * commom/common-utils.c: Include "common-utils.h".
5112 (stringify_argv): New function.
5113 * common/common-utils.h (stringify_argv): New prototype.
5114 * configure.nat: Add "fork-inferior.o" as a dependency for
5115 "*linux*", "fbsd*" and "nbsd*" hosts.
5116 * corefile.c (get_exec_file): Update comment.
5117 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5118 instead of "startup_inferior".
5119 (darwin_create_inferior): Call "add_thread_silent" after
5120 "fork_inferior".
5121 * fork-child.c: Cleanup unnecessary includes.
5122 (SHELL_FILE): Move to "common/common-fork-child.c".
5123 (environ): Likewise.
5124 (exec_wrapper): Initialize.
5125 (get_exec_wrapper): New function.
5126 (breakup_args): Move to "common/common-fork-child.c"; rename to
5127 "breakup_args_for_exec".
5128 (escape_bang_in_quoted_argument): Move to
5129 "common/common-fork-child.c".
5130 (saved_ui): New variable.
5131 (prefork_hook): New function.
5132 (postfork_hook): Likewise.
5133 (postfork_child_hook): Likewise.
5134 (gdb_startup_inferior): Likewise.
5135 (fork_inferior): Move to "common/common-fork-child.c". Update
5136 function to support gdbserver.
5137 (startup_inferior): Likewise.
5138 * gdbcore.h (get_exec_file): Remove declaration.
5139 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5140 instead of "startup_inferior". Call "add_thread_silent" after
5141 "fork_inferior".
5142 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5143 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5144 instead of "startup_inferior". Call "add_thread_silent" after
5145 "fork_inferior".
5146 * inferior.h: Include "common-inferior.h".
5147 (trace_start_error): Move to "common/common-utils.h".
5148 (trace_start_error_with_name): Likewise.
5149 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5150 (startup_inferior): Likewise.
5151 (gdb_startup_inferior): New prototype.
5152 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5153 * nat/fork-inferior.h: New file.
5154 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5155 instead of "startup_inferior". Call "add_thread_silent" after
5156 "fork_inferior".
5157 * target.h (target_terminal_init): Move prototype to
5158 "target/target.h".
5159 (target_terminal_inferior): Likewise.
5160 (target_terminal_ours): Likewise.
5161 * target/target.h (target_terminal_init): New prototype, moved
5162 from "target.h".
5163 (target_terminal_inferior): Likewise.
5164 (target_terminal_ours): Likewise.
5165 * utils.c (gdb_flush_out_err): New function.
5166
5167 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5168
5169 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5170 * common/common-gdbthread.h: New file, with parts from
5171 "gdb/gdbthread.h".
5172 * gdbthread.h: Include "common-gdbthread.h".
5173 (switch_to_thread): Moved to "common/common-gdbthread.h".
5174
5175 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5176
5177 * Makefile.in (SFILES): Add "common/job-control.c".
5178 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5179 (COMMON_OBS): Add "job-control.o".
5180 * common/job-control.c: New file, with contents from
5181 "gdb/inflow.c".
5182 * common/job-control.h: New file, with contents from "terminal.h".
5183 * fork-child.c: Include "job-control.h".
5184 * inflow.c: Include "job-control.h".
5185 (gdb_setpgid): Move to "common/common-inflow.c".
5186 (_initialize_inflow): Move setting of "job_control" to
5187 "handle_job_control".
5188 * terminal.h (job_control): Moved to "common/common-terminal.h".
5189 (gdb_setpgid): Likewise.
5190 * top.c: Include "job_control.h".
5191 * utils.c: Likewise.
5192 (job_control): Moved to "job-control.c".
5193
5194 2017-06-07 Pedro Alves <palves@redhat.com>
5195
5196 * Makefile.in (SFILES): Add gdb_regex.c.
5197 (COMMON_OBS): Add gdb_regex.o.
5198 * ada-lang.c (ada_add_standard_exceptions)
5199 (ada_add_exceptions_from_frame, name_matches_regex)
5200 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5201 parameter type to compiled_regex. Adjust.
5202 (ada_exceptions_list): Use compiled_regex.
5203 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5204 std::unique_ptr<compiled_regex>.
5205 (exception_catchpoint::~exception_catchpoint): Remove regfree
5206 call.
5207 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5208 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5209 * breakpoint.c (solib_catchpoint::compiled): Now a
5210 std::unique_ptr<compiled_regex>.
5211 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5212 (check_status_catch_solib): Adjust to use compiled_regex.
5213 (add_solib_catchpoint): Adjust to use compiled_regex.
5214 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5215 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5216 compiled_regex reference. Adjust to use it.
5217 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5218 declaration. Include "gdb_regex.h".
5219 (apropos_cmd): Change regex parameter to compiled_regex reference.
5220 * gdb_regex.c: New file.
5221 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5222 declarations.
5223 (class compiled_regex): New.
5224 * linux-tdep.c: Include "common/gdb_optional.h".
5225 (struct mapping_regexes): New, factored out from
5226 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5227 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5228 gdb::optional and remove cleanups. Adjust to compiled_regex.
5229 * probe.c: Include "common/gdb_optional.h".
5230 (collect_probes): Use compiled_regex and gdb::optional and remove
5231 cleanups.
5232 * skip.c: Include "common/gdb_optional.h".
5233 (skiplist_entry::compiled_function_regexp): Now a
5234 gdb::optional<compiled_regex>.
5235 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5236 (free_skiplist_entry): Remove regfree call.
5237 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5238 compiled_regex and gdb::optional.
5239 * symtab.c: Include "common/gdb_optional.h".
5240 (search_symbols): Use compiled_regex and gdb::optional.
5241 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5242 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5243 to gdb_regex.c.
5244
5245 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5246
5247 * regcache.c (regcache::save): Avoid buffer use.
5248 (regcache::dump): Likewise.
5249
5250 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5251
5252 * sh-tdep.c (sh_pseudo_register_read): Remove
5253 MAX_REGISTER_SIZE.
5254 (sh_pseudo_register_write): Likewise.
5255 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5256 (sh64_pseudo_register_write): Likewise
5257
5258 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5259
5260 * aarch64-tdep.c (aarch64_store_return_value): Use
5261 V_REGISTER_SIZE.
5262 (aarch64_pseudo_read_value): Likewise.
5263 (aarch64_pseudo_write): Likewise.
5264
5265 2017-06-06 Yao Qi <yao.qi@linaro.org>
5266
5267 * regformats/regdef.h (set_register_cache): Remove the
5268 declaration.
5269
5270 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5271
5272 * frame.c (frame_unwind_register_signed): Use
5273 frame_unwind_register_value.
5274
5275 2017-06-06 Pedro Alves <palves@redhat.com>
5276
5277 PR breakpoints/21553
5278 * breakpoint.c (create_breakpoints_sal_default)
5279 (init_breakpoint_sal, create_breakpoint_sal): Use
5280 gdb::unique_xmalloc_ptr for string parameters.
5281 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5282 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5283 (base_breakpoint_create_breakpoints_sal)
5284 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5285 (strace_marker_create_breakpoints_sal)
5286 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5287 string parameters.
5288 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5289 gdb::unique_xmalloc_ptr for string parameters.
5290 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5291 parameters.
5292
5293 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5294
5295 * alpha-tdep.c (alpha_register_to_value): Use
5296 get_frame_register_value.
5297 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5298
5299 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5300
5301 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5302 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5303 (ia64_value_to_register): Likewise.
5304 (ia64_extract_return_value): Likewise.
5305 (ia64_store_return_value): Likewise.
5306 (ia64_push_dummy_call): Likewise.
5307
5308 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5309
5310 GDB 8.0 released.
5311
5312 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5313
5314 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5315
5316 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5317
5318 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5319 parameter.
5320 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5321
5322 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5323
5324 * event-loop.c (poll_timers): Unallocate timer using delete
5325 instead of xfree.
5326
5327 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5328
5329 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5330 (struct breakpoint) <~breakpoint>: New.
5331 (struct watchpoint): Inherit from breakpoint.
5332 <~watchpoint>: New.
5333 <base>: Remove.
5334 (struct tracepoint): Inherit from breakpoint.
5335 <base>: Remove.
5336 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5337 (struct longjmp_breakpoint): Inherit from breakpoint.
5338 <~longjmp_breakpoint>: New.
5339 <base>: Remove.
5340 (new_breakpoint_from_type): Remove casts.
5341 (watchpoint_in_thread_scope): Remove reference to base field.
5342 (watchpoint_del_at_next_stop): Likewise.
5343 (update_watchpoint): Likewise.
5344 (watchpoint_check): Likewise.
5345 (bpstat_check_watchpoint): Likewise.
5346 (set_longjmp_breakpoint): Likewise.
5347 (struct fork_catchpoint): Inherit from breakpoint.
5348 <base>: Remove.
5349 (struct solib_catchpoint): Inherit from breakpoint.
5350 <~solib_catchpoint>: New.
5351 <base>: Remove.
5352 (dtor_catch_solib): Change to ...
5353 (solib_catchpoint::~solib_catchpoint): ... this.
5354 (breakpoint_hit_catch_solib): Remove reference to base field.
5355 (add_solib_catchpoint): Likewise.
5356 (create_fork_vfork_event_catchpoint): Likewise.
5357 (struct exec_catchpoint): Inherit from breakpoint.
5358 <~exec_catchpoint>: New.
5359 <base>: Remove.
5360 (dtor_catch_exec): Change to ...
5361 (exec_catchpoint::~exec_catchpoint): ... this.
5362 (dtor_watchpoint): Change to ...
5363 (watchpoint::~watchpoint): ... this.
5364 (watch_command_1): Remove reference to base field.
5365 (catch_exec_command_1): Likewise.
5366 (base_breakpoint_dtor): Change to ...
5367 (breakpoint::~breakpoint): ... this.
5368 (base_breakpoint_ops): Remove dtor field value.
5369 (longjmp_bkpt_dtor): Change to ...
5370 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5371 (strace_marker_create_breakpoints_sal): Remove reference to base
5372 field.
5373 (delete_breakpoint): Don't manually call breakpoint destructor.
5374 (create_tracepoint_from_upload): Remove reference to base field.
5375 (trace_pass_set_count): Likewise.
5376 (initialize_breakpoint_ops): Don't initialize
5377 momentary_breakpoint_ops, don't set dtors.
5378 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5379 <~ada_catchpoint>: New.
5380 <base>: Remove.
5381 (create_excep_cond_exprs): Remove reference to base field.
5382 (dtor_exception): Change to ...
5383 (ada_catchpoint::~ada_catchpoint): ... this.
5384 (dtor_catch_exception): Remove.
5385 (dtor_catch_exception_unhandled): Remove.
5386 (dtor_catch_assert): Remove.
5387 (create_ada_exception_catchpoint): Remove reference to base
5388 field.
5389 (initialize_ada_catchpoint_ops): Don't set dtors.
5390 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5391 breakpoint.
5392 <~signal_catchpoint>: New.
5393 <base>: Remove.
5394 (signal_catchpoint_dtor): Change to ...
5395 (signal_catchpoint::~signal_catchpoint): ... this.
5396 (create_signal_catchpoint): Remove reference to base field.
5397 (initialize_signal_catchpoint_ops): Don't set dtor.
5398 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5399 from breakpoint.
5400 <~syscall_catchpoint>: New.
5401 <base>: Remove.
5402 (dtor_catch_syscall): Change to ...
5403 (syscall_catchpoint::~syscall_catchpoint): ... this.
5404 (create_syscall_event_catchpoint): Remove reference to base
5405 field.
5406 (initialize_syscall_catchpoint_ops): Don't set dtor.
5407 * break-catch-throw.c (struct exception_catchpoint): Inherit
5408 from breakpoint.
5409 <~exception_catchpoint>: New.
5410 <base>: Remove.
5411 (dtor_exception_catchpoint): Change to ...
5412 (exception_catchpoint::~exception_catchpoint): ... this.
5413 (handle_gnu_v3_exceptions): Remove reference to base field.
5414 (initialize_throw_catchpoint_ops): Don't set dtor.
5415 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5416 field.
5417 * remote.c (remote_get_tracepoint_status): Likewise.
5418 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5419 * tracefile.c (tracefile_fetch_registers): Likewise.
5420 * tracepoint.c (actions_command): Likewise.
5421 (validate_actionline): Likewise.
5422 (tfind_1): Likewise.
5423 (get_traceframe_location): Likewise.
5424 (find_matching_tracepoint_location): Likewise.
5425 (parse_tracepoint_status): Likewise.
5426 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5427
5428 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5429
5430 * breakpoint.c (struct longjmp_breakpoint): New struct.
5431 (is_tracepoint_type): Change return type to bool.
5432 (is_longjmp_type): New function.
5433 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5434 (set_raw_breakpoint_without_location): Use
5435 new_breakpoint_from_type.
5436 (set_raw_breakpoint): Likewise.
5437
5438 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5439
5440 * breakpoint.c (new_breakpoint_from_type): New function.
5441 (create_breakpoint_sal): Use new_breakpoint_from_type and
5442 unique_ptr.
5443 (create_breakpoint): Likewise.
5444
5445 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5446
5447 * memattr.c (mem_info_command): Rename to ...
5448 (info_mem_command): ... this.
5449 (mem_enable_command): Rename to ...
5450 (enable_mem_command): ... this.
5451 (mem_disable_command): Rename to ...
5452 (disable_mem_command): ... this.
5453 (mem_delete_command): Rename to ...
5454 (delete_mem_command): ... this.
5455 (_initialize_mem): Adjust function names.
5456
5457 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5458
5459 * btrace.c (handle_pt_insn_events): New.
5460 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5461 STATUS. Split into this and ...
5462 (handle_pt_insn_event_flags): ... this.
5463
5464 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5465
5466 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5467 and struct pt_insn.resynced.
5468 * configure: Regenerated.
5469 * config.in: Regenerated.
5470
5471 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5472
5473 * btrace.c (ftrace_find_call_by_number): New function.
5474 (ftrace_new_function): Store objects, not pointers.
5475 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5476 ftrace_new_gap, ftrace_update_function,
5477 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5478 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5479 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5480 btrace_ends_with_single_insn, btrace_call_get): Account for
5481 btrace_thread_info::functions now storing objects.
5482 * btrace.h (struct btrace_thread_info): Add constructor.
5483 (struct btrace_thread_info) <functions>: Make std::vector.
5484 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5485 Initialize with default values.
5486 * record-btrace.c (record_btrace_frame_sniffer): Account for
5487 btrace_thread_info::functions now storing objects.
5488
5489 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5490
5491 * btrace.c: Remove typedef bfun_s.
5492 (ftrace_new_gap): Directly add gaps to the list of gaps.
5493 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5494 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5495 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5496 instead of gdb VEC.
5497
5498 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5499
5500 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5501 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5502 with btrace_thread_info::next_segment and
5503 btrace_thread_info::prev_segment.
5504 * btrace.h: Remove struct btrace_func_link.
5505 (struct btrace_function): Replace pair of function segment pointers
5506 with pair of indices.
5507 * python/py-record-btrace.c (btpy_call_prev_sibling,
5508 btpy_call_next_sibling): Replace references to
5509 btrace_thread_info::segment with btrace_thread_info::next_segment and
5510 btrace_thread_info::prev_segment.
5511 * record-btrace.c (record_btrace_frame_this_id): Use
5512 btrace_find_call_by_number.
5513
5514 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5515
5516 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5517 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5518 btrace_insn_next, btrace_insn_prev): Remove references to
5519 btrace_thread_info::flow.
5520 * btrace.h (struct btrace_function): Remove FLOW.
5521
5522 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5523
5524 * btrace.c (ftrace_find_call_by_number): New function.
5525 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5526 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5527 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5528 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5529 index.
5530 * btrace.h (struct btrace_function): Turn UP into an index.
5531 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5532 as an index.
5533 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5534 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5535 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5536
5537 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5538
5539 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5540 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5541 ftrace_update_function, ftrace_compute_global_level_offset,
5542 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5543 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5544 btrace_insn_end, btrace_is_empty): Remove references to
5545 btrace_thread_info::begin and btrace_thread_info::end.
5546 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5547 (struct btrace_thread_info) <functions>: Adjust comment.
5548 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5549 btrace_thread_info::begin.
5550
5551 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5552
5553 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5554 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5555 ftrace_update_function): Remove arguments that implicitly were always
5556 BTINFO->END.
5557 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5558 Don't pass BTINFO->END.
5559
5560 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5561
5562 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5563 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5564 btrace_find_insn_by_number): Replace function segment pointer with
5565 index.
5566 (btrace_insn_cmp): Simplify.
5567 * btrace.h: (struct btrace_insn_iterator) Rename index to
5568 insn_index. Replace function segment pointer with index into function
5569 segment vector.
5570 * record-btrace.c (record_btrace_call_history): Replace function
5571 segment pointer use with index.
5572 (record_btrace_frame_sniffer): Retrieve function call segment through
5573 vector.
5574 (record_btrace_set_replay): Remove defunc't safety check.
5575
5576 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5577
5578 * btrace.c (btrace_ends_with_single_insn): New function.
5579 (btrace_call_get, btrace_call_number, btrace_call_begin,
5580 btrace_call_end, btrace_call_next, btrace_call_prev,
5581 btrace_find_call_by_number): Use index into call segment vector
5582 instead of pointer.
5583 (btrace_call_cmp): Simplify.
5584 * btrace.h (struct btrace_call_iterator): Replace function call segment
5585 pointer with index into vector.
5586 * record-btrace.c (record_btrace_call_history): Use index instead of
5587 pointer.
5588
5589 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5590
5591 * btrace.c (btrace_insn_begin, btrace_insn_end,
5592 btrace_find_insn_by_number): Add btinfo to iterator.
5593 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5594
5595 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5596
5597 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5598 and save pointers directly.
5599 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5600 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5601 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5602 changed signature of functions.
5603 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5604 (btrace_fetch): Remove code that adds btrace_function pointers to
5605 vector of btrace_functions.
5606 (btrace_clear): Simplify freeing vector of btrace_functions.
5607
5608 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5609
5610 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5611 Replace VEC_* with std::vector functions.
5612 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5613 (struct btrace_thread_info)<functions>: Change type to std::vector.
5614
5615 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5616
5617 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5618 "Removed targets and native configurations" up. Merge duplicate
5619 "New commands" sub-sections. Add "New options" sub-sections.
5620
5621 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5622
5623 * defs.h (copy_integer_to_size): New declaration.
5624 * findvar.c (copy_integer_to_size): New function.
5625 (do_cint_test): New selftest function.
5626 (copy_integer_to_size_test): Likewise.
5627 (_initialize_findvar): Likewise.
5628 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5629 (mips_fbsd_collect_reg): Use raw_collect_integer.
5630 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5631 (mips64_fill_gregset): Use raw_collect_integer
5632 (mips64_fill_fpregset): Use raw_supply_integer.
5633 * regcache.c (regcache::raw_supply_integer): New function.
5634 (regcache::raw_collect_integer): Likewise.
5635 * regcache.h: (regcache::raw_supply_integer): New declaration.
5636 (regcache::raw_collect_integer): Likewise.
5637
5638 2017-05-24 Yao Qi <yao.qi@linaro.org>
5639
5640 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5641 (COMMON_OBS): Add gdbarch-selftests.o.
5642 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5643 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5644 * gdbarch-selftests.c: New file.
5645 * regcache.h (regcache) <~regcache>: Mark it virtual if
5646 GDB_SELF_TEST.
5647 <raw_write>: Likewise.
5648
5649 2017-05-24 Yao Qi <yao.qi@linaro.org>
5650
5651 * regcache.c (current_regcache): Change it to
5652 regcache::current_regcache.
5653 (regcache_observer_target_changed): Update.
5654 (regcache_thread_ptid_changed): Make it a regcache static
5655 method.
5656 (regcache_thread_ptid_changed): Update.
5657 (class regcache_access): New.
5658 (current_regcache_test): Update.
5659 (_initialize_regcache): Update.
5660 * regcache.h: Include forward_list.
5661 (regcache): Declare regcache_thread_ptid_changed and declare
5662 registers_changed_ptid as friend.
5663
5664 2017-05-24 Yao Qi <yao.qi@linaro.org>
5665
5666 * i387-tdep.c (i387_register_to_value): Use register_size
5667 instead of TYPE_LENGTH.
5668 * m68k-tdep.c (m68k_register_to_value): Likewise.
5669
5670 2017-05-24 Yao Qi <yao.qi@linaro.org>
5671
5672 * i387-tdep.c (i387_convert_register_p): Return false if type
5673 code isn't TYPE_CODE_FLT.
5674
5675 2017-05-24 Yao Qi <yao.qi@linaro.org>
5676
5677 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5678 length is 4.
5679 (alpha_register_to_value): Remove type length check.
5680 (alpha_value_to_register): Likewise.
5681
5682 2017-05-24 Yao Qi <yao.qi@linaro.org>
5683
5684 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5685 TYPE_CODE_FLT.
5686
5687 2017-05-24 Yao Qi <yao.qi@linaro.org>
5688
5689 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5690 TYPE_CODE_FLT or not.
5691
5692 2017-05-24 Yao Qi <yao.qi@linaro.org>
5693
5694 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5695 * avr-tdep.c (avr_gdbarch_init): Likewise.
5696 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5697 * cris-tdep.c (cris_gdbarch_init): Likewise.
5698 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5699 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5700 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5701 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5702 * mep-tdep.c (mep_gdbarch_init): Likewise.
5703 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5704 * mips-tdep.c (mips_gdbarch_init): Likewise.
5705 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5706 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5707 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5708 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5709 * v850-tdep.c (v850_gdbarch_init): Likewise.
5710
5711 2017-05-24 Yao Qi <yao.qi@linaro.org>
5712
5713 * selftest-arch.c (tests_with_arch): Call registers_changed
5714 and reinit_frame_cache.
5715 * selftest.c (run_self_tests): Likewise.
5716
5717 2017-05-24 Yao Qi <yao.qi@linaro.org>
5718
5719 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5720 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5721
5722 2017-05-24 Yao Qi <yao.qi@linaro.org>
5723
5724 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5725 set_gdbarch_print_insn.
5726
5727 2017-05-24 Yao Qi <yao.qi@linaro.org>
5728
5729 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5730 set_gdbarch_print_insn.
5731
5732 2017-05-24 Yao Qi <yao.qi@linaro.org>
5733
5734 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5735 set_gdbarch_print_insn.
5736 * arc-tdep.c (arc_gdbarch_init): Likewise.
5737 * arch-utils.c: include dis-asm.h.
5738 (default_print_insn): New function.
5739 * arch-utils.h (default_print_insn): Declare.
5740 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5741 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5742 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5743 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5744 * frv-tdep.c (frv_gdbarch_init): Likewise.
5745 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5746 * gdbarch.sh (print_insn): Use default_print_insn.
5747 * gdbarch.c: Regenerated.
5748 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5749 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5750 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5751 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5752 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5753 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5754 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5755 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5756 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5757 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5758 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5759 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5760 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5761 * mt-tdep.c (mt_gdbarch_init): Likewise.
5762 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5763 * nios2-tdep.c (nios2_print_insn): Remove.
5764 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5765 * rx-tdep.c (rx_gdbarch_init): Likewise.
5766 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5767 * score-tdep.c (score_print_insn): Remove.
5768 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5769 * sh-tdep.c (sh_gdbarch_init): Likewise.
5770 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5771 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5772 * tic6x-tdep.c (tic6x_print_insn): Remove.
5773 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5774 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5775 * v850-tdep.c (v850_gdbarch_init): Likewise.
5776 * vax-tdep.c (vax_gdbarch_init): Likewise.
5777 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5778 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5779
5780 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5781
5782 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5783 (MIPS_FP0_REGNUM): Remove.
5784 (MIPS_FSR_REGNUM): Remove.
5785 (mips_fbsd_supply_fpregs): Use mips_regnum.
5786 (mips_fbsd_supply_gregs): Likewise.
5787 (mips_fbsd_collect_fpregs): Likewise.
5788 (mips_fbsd_collect_gregs): Likewise.
5789
5790 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5791
5792 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5793 (getpfpregs_supplies): New function.
5794 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5795 getfpregs_supplies.
5796 (mips_fbsd_store_inferior_registers): Likewise.
5797
5798 2017-05-22 Pedro Alves <palves@redhat.com>
5799
5800 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5801 maintainer.
5802
5803 2017-05-22 Alan Hayward <alan.hayward@arm.com>
5804
5805 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5806 (store_register): Likewise.
5807 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5808 (get_decimal_float_return_value): Likewise.
5809 (do_ppc_sysv_return_value): Likewise.
5810 (ppc64_sysv_abi_push_integer): Likewise.
5811 (ppc64_sysv_abi_push_freg): Likewise.
5812 (ppc64_sysv_abi_return_value_base): Likewise.
5813 (ppc64_sysv_abi_return_value): Likewise.
5814 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5815 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5816 * rs6000-nat.c: Likewise.
5817 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5818 (rs6000_value_to_register): Likewise.
5819 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5820
5821 2017-05-21 Tom Tromey <tom@tromey.com>
5822
5823 PR rust/21466:
5824 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5825 arrays as "[T]", not "[T; ]".
5826
5827 2017-05-19 Tom Tromey <tom@tromey.com>
5828
5829 PR rust/21484:
5830 * rust-lang.c (exp_descriptor_rust): New function.
5831 (rust_language_defn): Use it.
5832 * p-lang.c (pascal_language_defn): Update.
5833 * opencl-lang.c (opencl_language_defn): Update.
5834 * objc-lang.c (objc_language_defn): Update.
5835 * m2-lang.c (m2_language_defn): Update.
5836 * language.h (struct language_defn)
5837 <la_watch_location_expression>: New member.
5838 * language.c (unknown_language_defn, auto_language_defn)
5839 (local_language_defn): Update.
5840 * go-lang.c (go_language_defn): Update.
5841 * f-lang.c (f_language_defn): Update.
5842 * d-lang.c (d_language_defn): Update.
5843 * c-lang.h (c_watch_location_expression): Declare.
5844 * c-lang.c (c_watch_location_expression): New function.
5845 (c_language_defn, cplus_language_defn, asm_language_defn)
5846 (minimal_language_defn): Use it.
5847 * breakpoint.c (watch_command_1): Call
5848 la_watch_location_expression.
5849 * ada-lang.c (ada_language_defn): Update.
5850
5851 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5852
5853 PR tui/21482
5854 * gdb_curses.h (NOMACROS): Define.
5855 (NCURSES_NOMACROS): Define.
5856
5857 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5858
5859 PR tui/21482
5860 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5861 arg to char *.
5862 * tui/tui-wingeneral.c (box_win): Likewise.
5863 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5864 (tui_show_source_line): Likewise.
5865 (tui_show_exec_info_content): Likewise.
5866
5867 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5868
5869 * sparc-tdep.c (sparc_structure_return_p)
5870 (sparc_arg_on_registers_p): New functions.
5871 (sparc32_store_arguments): Use them.
5872 * sparc64-tdep.c (sparc64_16_byte_align_p)
5873 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5874 Handle TYPE_CODE_ARRAY.
5875
5876 2017-05-17 Yao Qi <yao.qi@linaro.org>
5877
5878 * cli/cli-decode.c (add_alias_cmd): New function.
5879 * command.h (add_alias_cmd): Declare.
5880 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5881 instead call add_alias_cmd.
5882
5883 2017-05-17 Pedro Alves <palves@redhat.com>
5884
5885 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5886 (nat_makefile_frag): ... this. All references updated.
5887 * configure.ac: Likewise.
5888 * configure.nat: Likewise. Enhance comments.
5889 * configure: Regenerate.
5890
5891 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5892
5893 * procfs.c (procfs_create_inferior): Change prototype to match
5894 definition.
5895
5896 2017-05-13 Eli Zaretskii <eliz@gnu.org>
5897
5898 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5899 C++ compiler warning.
5900
5901 2017-05-12 Tom Tromey <tom@tromey.com>
5902
5903 PR rust/21483:
5904 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5905 recurse, just call value_struct_elt directly.
5906
5907 2017-05-12 Tom Tromey <tom@tromey.com>
5908
5909 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5910 OP_RUST_ARRAY>: Fix.
5911
5912 2017-05-12 Tom Tromey <tom@tromey.com>
5913
5914 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5915
5916 2017-05-09 Yao Qi <yao.qi@linaro.org>
5917
5918 * regcache.c: Include <forward_list>.
5919 (struct regcache_list): Remove.
5920 (current_regcache): Update.
5921 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5922 (regcache_thread_ptid_changed): Likewise.
5923 (registers_changed_ptid): Likewise.
5924 (current_regcache_size): Likewise.
5925
5926 2017-05-09 Yao Qi <yao.qi@linaro.org>
5927
5928 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5929 (current_regcache_size): New function.
5930 (current_regcache_test): New function.
5931 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5932
5933 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5934
5935 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5936 (print_gp_register_row): Use get_frame_register_value.
5937
5938 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5939
5940 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5941 (mips_supply_fpregset): Likewise.
5942 (mips64_supply_gregset): Likewise.
5943
5944 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5945
5946 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5947 regcache->raw_supply_zeroed.
5948
5949 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5950
5951 * configure.nat: Rearrange 'case' statements to match
5952 host before cpu.
5953
5954 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5955
5956 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5957 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5958 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5959 "@nat_extra_makefile_frag@".
5960 (Makefile): Remove dependency on "@frags@".
5961 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5962 (data-directory/Makefile): Likewise.
5963 * config/aarch64/linux.mh: Deleted; moved contents to
5964 "gdb/configure.nat".
5965 * config/alpha/alpha-linux.mh: Likewise.
5966 * config/alpha/nbsd.mh: Likewise.
5967 * config/arm/linux.mh: Likewise.
5968 * config/arm/nbsdelf.mh: Likewise.
5969 * config/i386/cygwin.mh: Likewise.
5970 * config/i386/cygwin64.mh: Likewise.
5971 * config/i386/darwin.mh: Likewise.
5972 * config/i386/fbsd.mh: Likewise.
5973 * config/i386/fbsd64.mh: Likewise.
5974 * config/i386/go32.mh: Likewise.
5975 * config/i386/i386gnu.mh: Likewise.
5976 * config/i386/i386sol2.mh: Likewise.
5977 * config/i386/linux.mh: Likewise.
5978 * config/i386/linux64.mh: Likewise.
5979 * config/i386/mingw.mh: Likewise.
5980 * config/i386/mingw64.mh: Likewise.
5981 * config/i386/nbsd64.mh: Likewise.
5982 * config/i386/nbsdelf.mh: Likewise.
5983 * config/i386/nto.mh: Likewise.
5984 * config/i386/obsd.mh: Likewise.
5985 * config/i386/obsd64.mh: Likewise.
5986 * config/i386/sol2-64.mh: Likewise.
5987 * config/ia64/linux.mh: Likewise.
5988 * config/m32r/linux.mh: Likewise.
5989 * config/m68k/linux.mh: Likewise.
5990 * config/m68k/nbsdelf.mh: Likewise.
5991 * config/m68k/obsd.mh: Likewise.
5992 * config/m88k/obsd.mh: Likewise.
5993 * config/mips/fbsd.mh: Likewise.
5994 * config/mips/linux.mh: Likewise.
5995 * config/mips/nbsd.mh: Likewise.
5996 * config/mips/obsd64.mh: Likewise.
5997 * config/pa/linux.mh: Likewise.
5998 * config/pa/nbsd.mh: Likewise.
5999 * config/pa/obsd.mh: Likewise.
6000 * config/powerpc/aix.mh: Likewise.
6001 * config/powerpc/fbsd.mh: Likewise.
6002 * config/powerpc/linux.mh: Likewise.
6003 * config/powerpc/nbsd.mh: Likewise.
6004 * config/powerpc/obsd.mh: Likewise.
6005 * config/powerpc/ppc64-linux.mh: Likewise.
6006 * config/powerpc/spu-linux.mh: Likewise.
6007 * config/s390/linux.mh: Likewise.
6008 * config/sh/nbsd.mh: Likewise.
6009 * config/sparc/fbsd.mh: Likewise.
6010 * config/sparc/linux.mh: Likewise.
6011 * config/sparc/linux64.mh: Likewise.
6012 * config/sparc/nbsd64.mh: Likewise.
6013 * config/sparc/nbsdelf.mh: Likewise.
6014 * config/sparc/obsd64.mh: Likewise.
6015 * config/sparc/sol2.mh: Likewise.
6016 * config/tilegx/linux.mh: Likewise.
6017 * config/vax/nbsdelf.mh: Likewise.
6018 * config/vax/obsd.mh: Likewise.
6019 * config/xtensa/linux.mh: Likewise.
6020 * config/i386/i386gnu.mn: New file, with excerpts from
6021 "config/i386/i386gnu.mh".
6022 * configure: Regenerate.
6023 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6024 *.mh files under "gdb/config".
6025 * configure.nat: New file, with contents from the
6026 "gdb/config/*/*.mh" files.
6027
6028 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6029
6030 * btrace.c (btrace_clear): Free insn vector.
6031
6032 2017-05-05 Pedro Alves <palves@redhat.com>
6033
6034 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6035 * configure: Regenerate.
6036
6037 2017-05-04 Pedro Alves <palves@redhat.com>
6038
6039 * Makefile.in (SFILES): Add progspace-and-thread.c.
6040 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6041 (COMMON_OBS): Add progspace-and-thread.o.
6042 * breakpoint.c: Include "progspace-and-thread.h".
6043 (update_inserted_breakpoint_locations)
6044 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6045 Use scoped_restore_current_pspace_and_thread.
6046 (create_std_terminate_master_breakpoint): Use
6047 scoped_restore_current_program_space.
6048 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6049 (print_breakpoint_location): Use
6050 scoped_restore_current_program_space.
6051 (bp_loc_is_permanent): Use
6052 scoped_restore_current_pspace_and_thread.
6053 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6054 (download_tracepoint_locations): Use
6055 scoped_restore_current_pspace_and_thread.
6056 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6057 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6058 (enum step_over_calls_kind): Moved from inferior.h.
6059 (class scoped_restore_current_thread): New class.
6060 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6061 declaration.
6062 (scoped_restore_current_thread): New class.
6063 * infcmd.c: Include "common/gdb_optional.h".
6064 (continue_1, proceed_after_attach): Use
6065 scoped_restore_current_thread.
6066 (notice_new_inferior): Use scoped_restore_current_thread.
6067 * inferior.c: Include "progspace-and-thread.h".
6068 (restore_inferior, save_current_inferior): Delete.
6069 (add_inferior_command, clone_inferior_command): Use
6070 scoped_restore_current_pspace_and_thread.
6071 * inferior.h (scoped_restore_current_inferior): New class.
6072 * infrun.c: Include "progspace-and-thread.h" and
6073 "common/gdb_optional.h".
6074 (follow_fork_inferior): Use
6075 scoped_restore_current_pspace_and_thread.
6076 (scoped_restore_exited_inferior): New class.
6077 (handle_vfork_child_exec_or_exit): Use
6078 scoped_restore_exited_inferior,
6079 scoped_restore_current_pspace_and_thread,
6080 scoped_restore_current_thread and scoped_restore.
6081 (fetch_inferior_event): Use scoped_restore_current_thread.
6082 * linespec.c (decode_line_full, decode_line_1): Use
6083 scoped_restore_current_program_space.
6084 * mi/mi-main.c: Include "progspace-and-thread.h".
6085 (exec_continue): Use scoped_restore_current_thread.
6086 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6087 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6088 * proc-service.c (ps_pglobal_lookup): Use
6089 scoped_restore_current_program_space.
6090 * progspace-and-thread.c: New file.
6091 * progspace-and-thread.h: New file.
6092 * progspace.c (release_program_space, clone_program_space): Use
6093 scoped_restore_current_program_space.
6094 (restore_program_space, save_current_program_space)
6095 (save_current_space_and_thread): Delete.
6096 (switch_to_program_space_and_thread): Moved to
6097 progspace-and-thread.c.
6098 * progspace.h (save_current_program_space)
6099 (save_current_space_and_thread): Delete declarations.
6100 (scoped_restore_current_program_space): New class.
6101 * remote.c (remote_btrace_maybe_reopen): Use
6102 scoped_restore_current_thread.
6103 * symtab.c: Include "progspace-and-thread.h".
6104 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6105 * thread.c (print_thread_info_1): Use
6106 scoped_restore_current_thread.
6107 (struct current_thread_cleanup): Delete.
6108 (do_restore_current_thread_cleanup)
6109 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6110 (scoped_restore_current_thread::~scoped_restore_current_thread):
6111 ... this new dtor.
6112 (make_cleanup_restore_current_thread): Rename/convert to ...
6113 (scoped_restore_current_thread::scoped_restore_current_thread):
6114 ... this new ctor.
6115 (thread_apply_all_command): Use scoped_restore_current_thread.
6116 (thread_apply_command): Use scoped_restore_current_thread.
6117 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6118 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6119
6120 2017-05-04 Pedro Alves <palves@redhat.com>
6121
6122 * thread.c (make_cleanup_restore_current_thread): Move
6123 find_thread_ptid call before the is_stopped call. Assert that the
6124 thread is found. Replace is_stopped call by checking the thread's
6125 state directly. Remove unnecessary NULL-thread check.
6126
6127 2017-05-04 Pedro Alves <palves@redhat.com>
6128
6129 * corelow.c (thread_section_name): New class.
6130 (get_core_register_section, get_core_siginfo): Use it.
6131
6132 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6133
6134 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6135 (get_core_register_section): Remove xfree of NULL pointer.
6136
6137 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6138
6139 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6140 * regcache.c (regcache::raw_supply_zeroed): New function.
6141 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6142
6143 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6144
6145 * gdbarch.sh: Remove commented out definition of
6146 TARGET_CHAR_BIT.
6147 * gdbarch.h: Re-generate.
6148
6149 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6150
6151 * configure: Regenerate.
6152
6153 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6154
6155 * solib-target.c (solib_target_relocate_section_addresses):
6156 Remove num_section_bases, num_bases, segment_bases variables.
6157
6158 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6159
6160 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6161
6162 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6163
6164 * solib-target.c: Include <vector>
6165 (struct lm_info_target) <~lm_info_target>: Remove.
6166 <segment_bases, section_bases>: Change type to
6167 std::vector<CORE_ADDR>.
6168 (library_list_start_segment, library_list_start_section,
6169 library_list_end_library,
6170 solib_target_relocate_section_addresses): Adjust.
6171
6172 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6173
6174 * gdbarch.sh (software_single_step): Change return type to
6175 std::vector<CORE_ADDR>.
6176 * gdbarch.c, gdbarch.h: Re-generate.
6177 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6178 Adjust.
6179 (arm_deal_with_atomic_sequence_raw): Adjust.
6180 (thumb_get_next_pcs_raw): Adjust.
6181 (arm_get_next_pcs_raw): Adjust.
6182 (arm_get_next_pcs): Adjust.
6183 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6184 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6185 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6186 (alpha_software_single_step): Adjust.
6187 * alpha-tdep.h (alpha_software_single_step): Adjust.
6188 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6189 * arm-tdep.c (arm_software_single_step): Adjust.
6190 (arm_breakpoint_kind_from_current_state): Adjust.
6191 * arm-tdep.h (arm_software_single_step): Adjust.
6192 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6193 * cris-tdep.c (cris_software_single_step): Adjust.
6194 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6195 (micromips_deal_with_atomic_sequence): Adjust.
6196 (deal_with_atomic_sequence): Adjust.
6197 (mips_software_single_step): Adjust.
6198 * mips-tdep.h (mips_software_single_step): Adjust.
6199 * moxie-tdep.c (moxie_software_single_step): Adjust.
6200 * nios2-tdep.c (nios2_software_single_step): Adjust.
6201 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6202 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6203 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6204 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6205 * sparc-tdep.c (sparc_software_single_step): Adjust.
6206 * spu-tdep.c (spu_software_single_step): Adjust.
6207 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6208
6209 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6210
6211 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6212 * gdbarch.h: Re-generate.
6213
6214 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6215
6216 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6217 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6218 * python/py-instruction.c, python/py-instruction.h: New file.
6219 * python/py-record.c: Add py-instruction.h include.
6220 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6221 gdb.RecordInstruction.
6222 * python/python-internal.h: Add gdbpy_initialize_instruction
6223 declaration.
6224 * python/python.c (do_start_initialization): Add
6225 gdbpy_initialize_instruction.
6226
6227 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6228
6229 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6230 Remove.
6231 (btrace_func_from_recpy_func): New function.
6232 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6233 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6234 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6235 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6236 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6237 Also, use new helper functions.
6238 (btpy_list_item): Use new helper functions.
6239 (recpy_bt_function_call_history): Use new type name.
6240 (btpy_call_getset): Remove.
6241 (gdbpy_initialize_btrace): Remove code to initialize
6242 gdb.BtraceFunctionCall.
6243 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6244 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6245 recpy_bt_func_prev, recpy_bt_func_next): New export.
6246 * python/py-record.c (recpy_func_type): New static object.
6247 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6248 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6249 recpy_func_next): New function.
6250 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6251 (recpy_func_getset): New static object.
6252 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6253 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6254
6255 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6256
6257 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6258 (btpy_object, btpy_insn_type, btpy_new): Remove.
6259 (btpy_list_object): Use gdb.RecordInstruction type instead of
6260 gdb.BtraceInstruction type.
6261 (btrace_insn_from_recpy_insn): New function.
6262 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6263 btpy_new.
6264 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6265 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6266 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6267 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6268 instead of btpy_object.
6269 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6270 btpy_insn_data, btpy_insn_decode): Rename to ...
6271 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6272 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6273 recpy_bt_insn_decode): This. Also, use new helper functions.
6274 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6275 recpy_insn_type.
6276 (btpy_insn_getset): Remove.
6277 (gdbpy_initialize_btrace): Remove code to initialize
6278 gdb.BtraceInstruction. Use recpy_element_object.
6279 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6280 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6281 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6282 * python/py-record.c (recpy_insn_type): New static object.
6283 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6284 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6285 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6286 New function.
6287 (recpy_insn_getset): New static object.
6288 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6289 * python/py-record.h (recpy_element_object): New typedef.
6290 (recpy_insn_type, recpy_insn_new): New export.
6291
6292 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6293
6294 * py-record-btrace.c (btpy_insn_new): Removed.
6295 (btpy_insn_or_gap_new): New function.
6296 (btpy_insn_error): Removed.
6297 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6298 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6299 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6300 btpy_insn_or_gap_new instead of btpy_insn_new.
6301 (btpy_insn_getset): Remove btpy_insn_error.
6302 * py-record.c (recpy_gap_type): New static object.
6303 (recpy_gap_object): New typedef.
6304 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6305 recpy_gap_reason_string): New function.
6306 (recpy_gap_getset): New static object.
6307 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6308 * py-record.h (recpy_gap_new): New export.
6309
6310 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6311
6312 * python/py-record.c (recpy_ptid): Remove.
6313 (recpy_record_getset): Remove recpy_ptid.
6314
6315 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6316
6317 * btrace.c (btrace_fetch): Set inferior_ptid.
6318 * python/py-record-btrace.c: Add "py-record.h" include.
6319 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6320 recpy_bt_end, recpy_bt_instruction_history,
6321 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6322 in gdb.Record object instead of current ptid.
6323 * python/py-record.c: Include new "py-record.h" file.
6324 (recpy_record_object): Moved to py-record.h.
6325 * python/py-record.h: New file.
6326
6327 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6328
6329 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6330 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6331 indentation.
6332
6333 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6334
6335 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6336 the past maintainers section.
6337
6338 2017-04-28 Yao Qi <yao.qi@linaro.org>
6339
6340 * infcmd.c (get_return_value): Use regcache ctor, and remove
6341 cleanup.
6342
6343 2017-04-28 Yao Qi <yao.qi@linaro.org>
6344 Pedro Alves <palves@redhat.com>
6345
6346 * regcache.c (regcache::regcache): New tag dispatch ctor.
6347 (do_cooked_read): Moved above.
6348 (regcache_dup): Use the tag dispatch ctor..
6349 * regcache.h (regcache): Declare ctor, delete copy ctor and
6350 assignment operator, remove friend regcache_dup.
6351
6352 2017-04-28 Yao Qi <yao.qi@linaro.org>
6353
6354 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6355 call method save instead of regcache_cpy.
6356 * regcache.h (struct regcache): Make regcache_dup a friend.
6357
6358 2017-04-28 Yao Qi <yao.qi@linaro.org>
6359
6360 * regcache.c (struct regcache): Move to regcache.h
6361 (regcache::arch): New method.
6362 (regcache_get_ptid): Update.
6363 (get_regcache_arch): Call arch method.
6364 (get_regcache_aspace): Call method aspace.
6365 (register_buffer): Change it to method.
6366 (regcache_save): Change it to regcache::save.
6367 (regcache_restore): Likewise.
6368 (regcache_cpy_no_passthrough): Remove the declaration.
6369 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6370 (regcache_cpy_no_passthrough): Change it to method
6371 cpy_no_passthrough.
6372 (regcache_register_status): Change it to method
6373 get_register_status.
6374 (regcache_invalidate): Change it to method invalidate.
6375 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6376 (regcache_raw_update): Change it to method raw_update.
6377 (regcache_raw_read): Likewise.
6378 (regcache_raw_read_signed): Likewise.
6379 (regcache_raw_read_unsigned): Likewise.
6380 (regcache_raw_write_signed): Likewise.
6381 (regcache_raw_write_unsigned): Likewise.
6382 (regcache_cooked_read): Likewise.
6383 (regcache_cooked_read_value): Likewise.
6384 (regcache_cooked_read_signed): Likewise.
6385 (regcache_cooked_read_unsigned): Likewise.
6386 (regcache_cooked_write_signed): Likewise.
6387 (regcache_cooked_write_unsigned): Likewise.
6388 (regcache_raw_set_cached_value): Likewise.
6389 (regcache_raw_write): Likewise.
6390 (regcache_cooked_write): Likewise.
6391 (regcache_xfer_part): Likewise.
6392 (regcache_raw_read_part): Likewise.
6393 (regcache_raw_write_part): Likewise.
6394 (regcache_cooked_read_part): Likewise.
6395 (regcache_cooked_write_part): Likewise.
6396 (regcache_raw_supply): Likewise.
6397 (regcache_raw_collect): Likewise.
6398 (regcache_transfer_regset): Likewise.
6399 (regcache_supply_regset): Likewise.
6400 (regcache_collect_regset): Likewise.
6401 (regcache_debug_print_register): Likewise.
6402 (enum regcache_dump_what): Move it to regcache.h.
6403 (regcache_dump): Change it to method dump.
6404 * regcache.h (enum regcache_dump_what): New.
6405 (class regcache): New.
6406 * target.c (target_fetch_registers): Call method
6407 debug_print_register.
6408 (target_store_registers): Likewise.
6409
6410 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6411
6412 * windows-nat.c (struct lm_info_windows): Initialize field.
6413 (windows_make_so): Allocate lm_info_windows with new.
6414 (windows_free_so): Free lm_info_windows with delete.
6415
6416 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6417
6418 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6419 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6420 cleanup.
6421 (darwin_free_so): Free lm_info_darwin with delete.
6422
6423 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6424
6425 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6426 <l_addr_p>: Change type to bool.
6427 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6428 (svr4_free_so): Free lm_info_svr4 with delete.
6429 (svr4_copy_library_list): Replace memcpy with call to copy
6430 constructor.
6431 (library_list_start_library, svr4_default_sos): Allocate
6432 lm_info_svr4 with new.
6433
6434 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6435
6436 * solib-target.c (struct lm_info_target): Add destructor,
6437 initialize fields.
6438 <name>: Change type to std::string.
6439 (library_list_start_library): Allocate lm_info_target with new.
6440 (solib_target_free_library_list): Free lm_info_target with
6441 delete.
6442 (solib_target_current_sos): Adapt to std::string.
6443 (solib_target_free_so): Free lm_info_target with delete.
6444
6445 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6448 fields.
6449 (frv_current_sos): Allocate lm_info_frv with new.
6450 (frv_relocate_main_executable): Free lm_info_frv with delete,
6451 allocate with new.
6452 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6453
6454 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6455
6456 * solib-frv.c (struct lm_info_frv): Fix indentation.
6457
6458 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6459
6460 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6461 map field.
6462 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6463 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6464 and allocate with new.
6465 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6466
6467 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6468
6469 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6470 <filename, member_name>: Change type to std::string.
6471 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6472 (library_list_start_library): Allocate lm_info_aix with new.
6473 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6474 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6475 with copy constructor.
6476
6477 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6478
6479 * solist.h (struct lm_info): Remove.
6480 (struct lm_info_base): New class.
6481 (struct so_list) <lm_info>: Change type to lm_info_base *.
6482 * nto-tdep.c (struct lm_info): Remove.
6483 (lm_addr): Adjust.
6484 * solib-aix.c (struct lm_info): Rename to ...
6485 (struct lm_info_aix): ... this. Extend lm_info_base.
6486 (lm_info_p): Rename to ...
6487 (lm_info_aix_p): ... this, and adjust.
6488 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6489 solib_aix_parse_libraries, library_list_start_library,
6490 solib_aix_free_library_list, solib_aix_parse_libraries,
6491 solib_aix_get_library_list,
6492 solib_aix_relocate_section_addresses, solib_aix_free_so,
6493 solib_aix_get_section_offsets,
6494 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6495 Adjust.
6496 (struct solib_aix_inferior_data) <library_list>: Adjust.
6497 * solib-darwin.c (struct lm_info): Rename to ...
6498 (struct lm_info_darwin): ... this. Extend lm_info_base.
6499 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6500 * solib-dsbt.c (struct lm_info): Rename to ...
6501 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6502 (struct dsbt_info) <main_executable_lm_info): Adjust.
6503 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6504 dsbt_relocate_section_addresses): Adjust.
6505 * solib-frv.c (struct lm_info): Rename to ...
6506 (struct lm_info_frv): ... this. Extend lm_info_base.
6507 (main_executable_lm_info): Adjust.
6508 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6509 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6510 find_canonical_descriptor_in_load_object,
6511 frv_fdpic_find_canonical_descriptor): Adjust.
6512 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6513 to lm_info_svr4.
6514 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6515 svr4_clear_so, svr4_copy_library_list,
6516 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6517 svr4_current_sos, svr4_fetch_objfile_link_map,
6518 solist_update_incremental): Adjust.
6519 * solib-svr4.h (struct lm_info_svr4): Move here from
6520 solib-svr4.c.
6521 * solib-target.c (struct lm_info): Rename to ...
6522 (struct lm_info_target): ... this. Extend lm_info_base.
6523 (lm_info_p): Rename to ...
6524 (lm_info_target_p): ... this.
6525 (solib_target_parse_libraries, library_list_start_segment,
6526 library_list_start_section, library_list_start_library,
6527 library_list_end_library, solib_target_free_library_list,
6528 solib_target_current_sos, solib_target_free_so,
6529 solib_target_relocate_section_addresses): Adjust.
6530 * windows-nat.c (struct lm_info): Rename to ...
6531 (struct lm_info_windows): ... this. Extend lm_info_base.
6532 (windows_make_so, handle_load_dll, handle_unload_dll,
6533 windows_xfer_shared_libraries): Adjust.
6534
6535 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6536
6537 * solib-darwin.c (struct darwin_so_list): Remove.
6538 (darwin_current_sos): Allocate an so_list object instead of a
6539 darwin_so_list, separately allocate an lm_info object.
6540 (darwin_free_so): Free lm_info.
6541
6542 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6543
6544 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6545 with fprintf_filtered.
6546
6547 2017-04-28 Yao Qi <yao.qi@linaro.org>
6548
6549 * regcache.c (regcache::regcache): New function.
6550 (regcache::~regcache): New function.
6551 (regcache_xmalloc_1): Remove.
6552 (regcache_xmalloc): Call new regcache.
6553 (regcache_xfree): Call delete regcache.
6554 (get_thread_arch_aspace_regcache): Call new regcache.
6555
6556 2017-04-28 Yao Qi <yao.qi@linaro.org>
6557
6558 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6559 lwp instead of ptid_get_lwp.
6560
6561 2017-04-28 Yao Qi <yao.qi@linaro.org>
6562
6563 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6564 lwp_info instead of getting from inferior_ptid.
6565
6566 2017-04-27 Keith Seitz <keiths@redhat.com>
6567
6568 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6569 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6570 (CV_CONVERSION_BADNESS): Define.
6571 (rank_one_type): Remove overly restrictive rvalue reference
6572 rank checks.
6573 Add cv-qualifier checks and subranks for type equality.
6574 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6575 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6576 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6577
6578 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6579
6580 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6581 count when creating the object.
6582
6583 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6584 Ulrich Weigand <uweigand@de.ibm.com>
6585
6586 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6587 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6588 is used in AIX.
6589 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6590 (process_xcoff_symbol): Likewise.
6591 (scan_xcoff_symtab): Likewise.
6592
6593 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6594
6595 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6596 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6597 (ia64_access_reg): Use get_frame_register_unsigned.
6598 (ia64_access_rse_reg): Likewise.
6599 (ia64_libunwind_frame_prev_register): Likewise.
6600
6601 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6602
6603 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6604 * gdbarch.c: Regenerated.
6605 * gdbarch.h: Regenerated.
6606 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6607 visibility external.
6608 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6609 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6610 (enum cfa_how_kind): Move to ...
6611 (struct dwarf2_frame_state_reg_info): Likewise.
6612 (struct dwarf2_frame_state): Likewise.
6613 * dwarf2-frame.h: ... here.
6614 (dwarf2_frame_state_alloc_regs): New declaration.
6615 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6616 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6617
6618 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6619
6620 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6621 regcache_raw_read_unsigned.
6622 (xtensa_pseudo_register_write): Likewise.
6623
6624 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6625
6626 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6627 (nds32_pseudo_register_write): Likewise.
6628
6629 2017-04-25 Yao Qi <yao.qi@linaro.org>
6630
6631 * regcache.c (struct regcache) <readonly_p>: Change its type
6632 to bool.
6633 (regcache_xmalloc_1): Update parameter type and callers update.
6634
6635 2017-04-25 Yao Qi <yao.qi@linaro.org>
6636
6637 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6638 set_gdbarch_wchar_bit.
6639 * arm-tdep.c (arm_gdbarch_init): Likewise.
6640
6641 2017-04-25 Pedro Alves <palves@redhat.com>
6642
6643 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6644 (BothAreRelocatable, memcopy, memmove): Don't define.
6645 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6646 macros.
6647
6648 2017-04-25 Pedro Alves <palves@redhat.com>
6649
6650 * common/common-defs.h: Include "common/poison.h".
6651 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6652 and adjust.
6653 * common/poison.h: New file.
6654 * common/traits.h: Include <type_traits>.
6655 (Not, Or, Requires): New, moved from common/function-view.h.
6656
6657 2017-04-25 Pedro Alves <palves@redhat.com>
6658
6659 * breakpoint.h (struct breakpoint): In-class initialize all
6660 fields. Make boolean fields "bool".
6661 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6662 memset call and initializations no longer necessary.
6663
6664 2017-04-25 Pedro Alves <palves@redhat.com>
6665
6666 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6667 reference.
6668 (pt_btrace_insn): New function.
6669 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6670
6671 2017-04-25 Pedro Alves <palves@redhat.com>
6672
6673 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6674 "base" field and inherit from "bp_location" instead. Add
6675 non-default ctor.
6676 (allocate_location_exception): Use new non-default ctor.
6677 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6678 (init_bp_location): Convert to ...
6679 (bp_location::bp_location): ... this new ctor, and remove memset
6680 call.
6681 (base_breakpoint_allocate_location): Use the new non-default ctor.
6682 * breakpoint.h (bp_location): Now a class. Declare default and
6683 non-default ctors. In-class initialize all members.
6684 (init_bp_location): Remove declaration.
6685
6686 2017-04-25 Pedro Alves <palves@redhat.com>
6687
6688 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6689 assignment operator.
6690
6691 2017-04-24 Yao Qi <yao.qi@linaro.org>
6692
6693 * doublest.c (convert_doublest_to_floatformat): Call
6694 floatformat_totalsize_bytes.
6695
6696 2017-04-22 Tom Tromey <tom@tromey.com>
6697
6698 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6699 ui_out_emit_list.
6700 * stack.c (print_frame): Use ui_out_emit_list.
6701 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6702 ui_out_emit_list.
6703 * mi/mi-main.c (print_one_inferior)
6704 (mi_cmd_data_list_register_names)
6705 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6706 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6707 ui_out_emit_list.
6708 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6709 (mi_output_solib_attribs): Use ui_out_emit_list,
6710 ui_out_emit_tuple.
6711 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6712 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6713 (mi_cmd_stack_list_args, list_args_or_locals): Use
6714 ui_out_emit_list.
6715 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6716 * breakpoint.c (print_solib_event, output_thread_groups): Use
6717 ui_out_emit_list.
6718
6719 2017-04-22 Tom Tromey <tom@tromey.com>
6720
6721 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6722 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6723 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6724
6725 2017-04-22 Tom Tromey <tom@tromey.com>
6726
6727 * tracepoint.c (tvariables_info_1)
6728 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6729
6730 2017-04-22 Tom Tromey <tom@tromey.com>
6731
6732 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6733 annotate_arg_emitter.
6734 * breakpoint.c (print_mention_watchpoint)
6735 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6736 * annotate.h (struct annotate_arg_emitter): New.
6737
6738 2017-04-22 Tom Tromey <tom@tromey.com>
6739
6740 * record-btrace.c (record_btrace_insn_history)
6741 (record_btrace_insn_history_range, record_btrace_call_history)
6742 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6743 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6744 ui_out_emit_tuple.
6745 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6746 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6747 * skip.c (skip_info): Use ui_out_emit_tuple.
6748 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6749 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6750 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6751 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6752 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6753 ui_out_emit_tuple.
6754 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6755 (output_register, mi_cmd_data_read_memory)
6756 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6757 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6758 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6759 Use ui_out_emit_tuple.
6760 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6761 ui_out_emit_tuple.
6762 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6763 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6764 * linux-thread-db.c (info_auto_load_libthread_db): Use
6765 ui_out_emit_tuple.
6766 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6767 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6768 * disasm.c (do_mixed_source_and_assembly_deprecated)
6769 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6770 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6771 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6772 * breakpoint.c (print_one_breakpoint_location)
6773 (print_one_breakpoint): Use ui_out_emit_tuple.
6774 * auto-load.c (print_script, info_auto_load_cmd): Use
6775 ui_out_emit_tuple.
6776 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6777
6778 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6779
6780 * thread.c (print_thread_info_1): Remove dead code.
6781
6782 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6783
6784 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6785 GDB_SELF_TEST.
6786 * arm-tdep.c (selftests::arm_record_test): Likewise.
6787
6788 2017-04-21 Yao Qi <yao.qi@linaro.org>
6789
6790 * regcache.c (regcache_restore): Remove argument 2. Replace
6791 argument 3 with regcache. Get register status from
6792 src->register_status and get register contents from
6793 register_buffer (src, regnum).
6794 (regcache_cpy): Update.
6795
6796 2017-04-19 Pedro Alves <palves@redhat.com>
6797
6798 * gdbthread.h (thread): Add missing closing parenthesis in
6799 comment.
6800
6801 2017-04-19 Pedro Alves <palves@redhat.com>
6802
6803 * common/refcounted-object.h: New file.
6804 * gdbthread.h: Include "common/refcounted-object.h".
6805 (thread_info): Inherit from refcounted_object and add comments.
6806 (thread_info::incref, thread_info::decref)
6807 (thread_info::m_refcount): Delete.
6808 (thread_info::deletable): Use the refcounted_object::refcount()
6809 method.
6810 * inferior.c (current_inferior_): Add comment.
6811 (set_current_inferior): Increment/decrement refcounts.
6812 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6813 not-deletable instead of comparing with the current inferior.
6814 (initialize_inferiors): Increment the initial inferior's refcount.
6815 * inferior.h (struct inferior): Forward declare.
6816 Include "common/refcounted-object.h".
6817 (current_inferior, set_current_inferior): Move declaration to
6818 before struct inferior's definition, and fix comment.
6819 (inferior): Inherit from refcounted_object. Add comments.
6820 * thread.c (switch_to_thread_no_regs): Reference the thread's
6821 inferior pointer directly instead of doing a ptid lookup.
6822 (switch_to_no_thread): New function.
6823 (switch_to_thread(thread_info *)): New function, factored out
6824 from ...
6825 (switch_to_thread(ptid_t)): ... this.
6826 (restore_current_thread): Delete.
6827 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6828 fields, and add 'inf' field.
6829 (do_restore_current_thread_cleanup): Check whether old->inf is
6830 alive instead of looking up an inferior by ptid. Use
6831 switch_to_thread and switch_to_no_thread.
6832 (restore_current_thread_cleanup_dtor): Use old->inf directly
6833 instead of lookup up an inferior by id. Decref the inferior.
6834 Don't restore 'removable'.
6835 (make_cleanup_restore_current_thread): Same the inferior pointer
6836 in old, instead of the inferior number. Incref the inferior.
6837 Don't save/clear 'removable'.
6838
6839 2017-04-19 Pedro Alves <palves@redhat.com>
6840
6841 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6842 unittests/scoped_restore-selftests.c.
6843 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6844 * common/scoped_restore.h (scoped_restore_base): Make "class".
6845 (scoped_restore_base::release): New public method.
6846 (scoped_restore_base::scoped_restore_base): New protected ctor.
6847 (scoped_restore_base::m_saved_var): New protected field.
6848 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6849 scoped_restore_base base class instead of m_saved_var directly.
6850 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6851 (scoped_restore_tmpl::scoped_restore_tmpl(const
6852 scoped_restore_tmpl<T>&)): Likewise.
6853 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6854 method.
6855 (scoped_restore_tmpl::saved_var): New method.
6856 (scoped_restore_tmpl::m_saved_var): Delete.
6857 * inferior.h (inferior::detaching): Now a bool.
6858 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6859 cleanup.
6860 * unittests/scoped_restore-selftests.c: New file.
6861
6862 2017-04-19 Pedro Alves <palves@redhat.com>
6863
6864 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6865 Re-sort in alphabetic order.
6866
6867 2017-04-18 Pedro Alves <palves@redhat.com>
6868
6869 * xml-support.c (obstack_xml_printf): Delete.
6870 * xml-support.h (obstack_xml_printf): Delete.
6871
6872 2017-04-18 Pedro Alves <palves@redhat.com>
6873
6874 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6875 vdebug, verror, body_text, start_element, end_element, name,
6876 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6877 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6878 is_xinclude>: Make private and add m_ prefix.
6879 (gdb_xml_parser::body_text): New method, based on ...
6880 (gdb_xml_body_text): ... this. Adjust.
6881 (gdb_xml_parser::vdebug): New method, based on ...
6882 (gdb_xml_debug): ... this. Adjust.
6883 (gdb_xml_parser::verror): New method, based on ...
6884 (gdb_xml_error): ... this. Adjust.
6885 (gdb_xml_parser::start_element): New method, based on ...
6886 (gdb_xml_start_element): ... this. Adjust.
6887 (gdb_xml_start_element_wrapper): Defer to
6888 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6889 (gdb_xml_parser::end_element): New method, based on ...
6890 (gdb_xml_end_element_wrapper): ... this. Adjust.
6891 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6892 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6893 (gdb_xml_parser::use_dtd): New method, based on ...
6894 (gdb_xml_use_dtd): ... this. Adjust.
6895 (gdb_xml_parser::parse): New method, based on ...
6896 (gdb_xml_parse): ... this. Adjust.
6897 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6898 (xinclude_start_include): Adjust to call the parser's name method.
6899 (xml_xinclude_default, xml_xinclude_start_doctype)
6900 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6901 method.
6902 (xml_process_xincludes): Adjust to call parser methods.
6903 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6904 declarations.
6905
6906 2017-04-18 Pedro Alves <palves@redhat.com>
6907
6908 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6909 gdb::optional<std::string>.
6910 * xml-support.c: Include <string>.
6911 (scope_level::scope_level(scope_level &&))
6912 (scope_level::~scope_level): Delete.
6913 (scope_level::body): Now a std::string.
6914 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6915 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6916 parameter.
6917 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6918 (xinclude_parsing_data::output): Now a std::string reference.
6919 (xinclude_start_include): Adjust.
6920 (xml_xinclude_default): Adjust.
6921 (xml_process_xincludes): Add 'output' parameter, and return bool.
6922 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6923 and return bool.
6924 * xml-tdesc.c: Include <unordered_map> and <string>.
6925 (tdesc_xml_cache): Delete.
6926 (tdesc_xml_cache_s): Delete.
6927 (xml_cache): Now an std::unordered_map.
6928 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6929 (target_fetch_description_xml): Change return type to
6930 gdb::optional<std::string>, and adjust.
6931 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6932 (target_fetch_description_xml): Change return type to
6933 gdb::optional<std::string>.
6934
6935 2017-04-18 Pedro Alves <palves@redhat.com>
6936
6937 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6938 unittests/optional-selftests.c.
6939 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6940 * unittests/optional-selftests.c: New file.
6941 * unittests/optional/assignment/1.cc: New file.
6942 * unittests/optional/assignment/2.cc: New file.
6943 * unittests/optional/assignment/3.cc: New file.
6944 * unittests/optional/assignment/4.cc: New file.
6945 * unittests/optional/assignment/5.cc: New file.
6946 * unittests/optional/assignment/6.cc: New file.
6947 * unittests/optional/assignment/7.cc: New file.
6948 * unittests/optional/cons/copy.cc: New file.
6949 * unittests/optional/cons/default.cc: New file.
6950 * unittests/optional/cons/move.cc: New file.
6951 * unittests/optional/cons/value.cc: New file.
6952 * unittests/optional/in_place.cc: New file.
6953 * unittests/optional/observers/1.cc: New file.
6954 * unittests/optional/observers/2.cc: New file.
6955
6956 2017-04-18 Pedro Alves <palves@redhat.com>
6957
6958 * common/gdb_optional.h: Include common/traits.h.
6959 (in_place_t): New type.
6960 (in_place): New constexpr variable.
6961 (optional::optional): Remove member initialization of
6962 m_instantiated.
6963 (optional::optional(in_place_t...)): New constructor.
6964 (optional::~optional): Use reset.
6965 (optional::optional(const optional&)): New.
6966 (optional::optional(const optional&&)): New.
6967 (optional::optional(T &)): New.
6968 (optional::optional(T &&)): New.
6969 (operator::operator=(const optional &)): New.
6970 (operator::operator=(optional &&)): New.
6971 (operator::operator= (const T &))
6972 (operator::operator= (T &&))
6973 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6974 (operator::reset): New.
6975 (operator::m_instantiated):: Add in-class initializer.
6976 * common/traits.h: Include <type_traits>.
6977 (struct And): New types.
6978
6979 2017-04-18 Pedro Alves <palves@redhat.com>
6980
6981 * xml-support.c: Include <vector>.
6982 (scope_level::scope_level(const gdb_xml_element *))
6983 (scope_level::scope_level(scope_level&&)): New.
6984 (scope_level::~scope_level): New.
6985 (scope_level_s): Delete.
6986 (gdb_xml_parser::scopes): Now a std::vector.
6987 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6988 Use std::vector.
6989 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6990 scope cleanup code.
6991 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6992 of the scopes member. Use std::vector::emplace_back.
6993
6994 2017-04-18 Pedro Alves <palves@redhat.com>
6995
6996 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6997 a bool.
6998 (gdb_xml_end_element): Change type of first parameter.
6999 (gdb_xml_cleanup): Rename to ...
7000 (gdb_xml_parser::~gdb_xml_parser): ... this.
7001 (gdb_xml_create_parser_and_cleanup): Delete with ...
7002 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7003 to this new ctor.
7004 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7005 using gdb_xml_create_parser_and_cleanup.
7006 (xinclude_parsing_data): Add ctor/dtor.
7007 (xml_xinclude_cleanup): Delete.
7008 (xml_process_xincludes): Create a local xinclude_parsing_data
7009 instead of heap-allocating one. Create a local gdb_xml_parser
7010 instead of heap-allocating one with
7011 gdb_xml_create_parser_and_cleanup.
7012
7013 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7014
7015 PR threads/20743
7016 * fbsd-nat.c (resume_one_thread_cb): Remove.
7017 (resume_all_threads_cb): Remove.
7018 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7019 iterate_over_threads.
7020
7021 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7022
7023 * NEWS: Create a new section for the next release branch.
7024 Rename the section of the current branch, now that it has
7025 been cut.
7026
7027 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7028
7029 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7030 * version.in: Bump version to 8.0.50.DATE-git.
7031
7032 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7033
7034 PR gdb/21385
7035 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7036 independently of the host, and fix build breakage on Cygwin.
7037
7038 2017-04-13 Pedro Alves <palves@redhat.com>
7039
7040 * inferior.c (free_inferior): Convert to ...
7041 (inferior::~inferior): ... this dtor.
7042 (inferior::inferior): New ctor, factored out from ...
7043 (add_inferior_silent): ... here. Allocate the inferior with a new
7044 expression.
7045 (delete_inferior): Call delete instead of free_inferior.
7046 * inferior.h (gdb_environ, continuation): Forward declare.
7047 (inferior): Now a class. Add in-class initialization to all
7048 members. Make boolean fields bool, except 'detaching'.
7049 (inferior::inferior): New explicit ctor.
7050 (inferior::~inferior): New.
7051
7052 2017-04-13 Pedro Alves <palves@redhat.com>
7053
7054 * inferior.c (init_inferior_list): Delete.
7055 * inferior.h (init_inferior_list): Delete.
7056
7057 2017-04-13 Pedro Alves <palves@redhat.com>
7058
7059 PR threads/13217
7060 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7061 (top level): Call it twice, with different thread sets.
7062
7063 2017-04-13 Pedro Alves <palves@redhat.com>
7064
7065 * thread.c: Include <algorithm>.
7066 (thread_array_cleanup): Delete.
7067 (scoped_inc_dec_ref): New class.
7068 (live_threads_count): New function.
7069 (set_thread_refcount): Delete.
7070 (tp_array_compar_ascending): Now a bool.
7071 (tp_array_compar): Convert to a std::sort comparison function.
7072 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7073 and live_threads_count.
7074
7075 2017-04-13 Pedro Alves <palves@redhat.com>
7076
7077 * infrun.c (follow_fork_inferior): Also switch the current
7078 inferior.
7079
7080 2017-04-13 Pedro Alves <palves@redhat.com>
7081
7082 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7083 before calling create_internal_breakpoint.
7084
7085 2017-04-13 Pedro Alves <palves@redhat.com>
7086
7087 * fork-child.c (execv_argv): New class.
7088 (breakup_args): Refactored as ...
7089 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7090 Copy arguments to storage and replace separators with NULL
7091 terminators in place.
7092 (escape_bang_in_quoted_argument): Adjust to return bool.
7093 (execv_argv::execv_argv): New ctor.
7094 (execv_argv::init_for_shell): New method, factored out from
7095 fork_inferior. Don't strdup strings into the vector.
7096 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7097 Remove free_vector_argv call.
7098
7099 2017-04-13 Yao Qi <yao.qi@linaro.org>
7100
7101 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7102 tdep->rx_psw_type.
7103
7104 2017-04-13 Yao Qi <yao.qi@linaro.org>
7105
7106 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7107 * rx-tdep.c (rx_gdbarch_init): Likewise.
7108
7109 2017-04-13 Pedro Alves <palves@redhat.com>
7110
7111 * breakpoint.h (struct breakpoint): Reindent.
7112
7113 2017-04-13 Pedro Alves <palves@redhat.com>
7114
7115 * breakpoint.c (bp_location): Rename to ...
7116 (bp_locations): ... this. All references updated.
7117 (bp_location_count): Rename to ...
7118 (bp_locations_count): ... this. All references updated.
7119 (bp_location_placed_address_before_address_max): Rename to ...
7120 (bp_locations_placed_address_before_address_max): ... this. All
7121 references updated.
7122 (bp_location_shadow_len_after_address_max): Rename to ...
7123 (bp_locations_shadow_len_after_address_max): ... this. All
7124 references updated.
7125 (bp_location_compare_addrs): Rename to ...
7126 (bp_locations_compare_addrs): ... this. All references updated.
7127 (bp_location_compare):Rename to ...
7128 (bp_locations_compare): ... this. All references updated.
7129 (bp_location_target_extensions_update): Rename to ...
7130 (bp_locations_target_extensions_update): ... this. All references
7131 updated.
7132
7133 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7134
7135 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7136 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7137 'sgtty.h'.
7138 * common/gdb_termios.h: New file, with parts of "terminal.h".
7139 * inflow.c: Include "gdb_termios.h".
7140 * ser-unix.c: Include "gdb_termios.h".
7141 * terminal.h: Move terminal-related defines to
7142 "common/gdb_termios.h".
7143
7144 2017-04-12 Tom Tromey <tom@tromey.com>
7145
7146 * probe.c (parse_probes): Update.
7147 * location.h (delete_event_location): Don't declare.
7148 (event_location_deleter::operator()): Update.
7149 * location.c (event_location_deleter::operator()): Rename from
7150 delete_event_location.
7151 * linespec.h (linespec_result) <location>: Change type to
7152 event_location_up.
7153 * linespec.c (canonicalize_linespec, event_location_to_sals)
7154 (decode_objc): Update.
7155 (linespec_result): Don't call delete_event_location.
7156 * breakpoint.c (create_breakpoints_sal)
7157 (bkpt_probe_create_sals_from_location)
7158 (strace_marker_create_sals_from_location): Update.
7159
7160 2017-04-12 Tom Tromey <tom@tromey.com>
7161
7162 * linespec.h (struct linespec_result): Add constructor and
7163 destructor.
7164 (init_linespec_result, destroy_linespec_result)
7165 (make_cleanup_destroy_linespec_result): Don't declare.
7166 * linespec.c (init_linespec_result): Remove.
7167 (linespec_result::~linespec_result): Rename from
7168 destroy_linespec_result. Update.
7169 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7170 Remove.
7171 * breakpoint.c (create_breakpoint, break_range_command)
7172 (decode_location_default): Update.
7173 * ax-gdb.c (agent_command_1): Update.
7174
7175 2017-04-12 Tom Tromey <tom@tromey.com>
7176
7177 * remote.c (remote_download_tracepoint): Update.
7178 * python/py-breakpoint.c (bppy_get_location): Update.
7179 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7180 (gdbscm_breakpoint_location): Update.
7181 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7182 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7183 Change type to event_location_up.
7184 * breakpoint.c (create_overlay_event_breakpoint)
7185 (create_longjmp_master_breakpoint)
7186 (create_std_terminate_master_breakpoint)
7187 (create_exception_master_breakpoint)
7188 (breakpoint_event_location_empty_p, print_breakpoint_location)
7189 (print_one_breakpoint_location, create_thread_event_breakpoint)
7190 (init_breakpoint_sal, create_breakpoint)
7191 (print_recreate_ranged_breakpoint, break_range_command)
7192 (init_ada_exception_breakpoint, say_where): Update.
7193 (base_breakpoint_dtor): Don't call delete_event_location.
7194 (bkpt_print_recreate, tracepoint_print_recreate)
7195 (dprintf_print_recreate, update_static_tracepoint)
7196 (breakpoint_re_set_default): Update.
7197
7198 2017-04-12 Tom Tromey <tom@tromey.com>
7199
7200 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7201 type of "to_do". Update.
7202 (compute_stack_depth): Use std::vector.
7203
7204 2017-04-12 Tom Tromey <tom@tromey.com>
7205
7206 * printcmd.c (find_instruction_backward): Use std::vector.
7207
7208 2017-04-12 Tom Tromey <tom@tromey.com>
7209
7210 * symfile.c (objfilep): Remove typedef.
7211 (reread_symbols): Use a std::vector.
7212
7213 2017-04-12 Tom Tromey <tom@tromey.com>
7214
7215 * mi/mi-main.c (exec_direction_forward): Remove.
7216 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7217 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7218 scoped_restore.
7219 * guile/guile.c (guile_repl_command, guile_command)
7220 (gdbscm_execute_gdb_command): Use scoped_restore.
7221 * go-exp.y (go_parse): Use scoped_restore.
7222 * d-exp.y (d_parse): Use scoped_restore.
7223 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7224 * c-exp.y (c_parse): Use scoped_restore.
7225
7226 2017-04-12 Tom Tromey <tom@tromey.com>
7227
7228 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7229 (mi_parse): Update return type.
7230 (mi_parse_free): Remove.
7231 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7232 (mi_parse::~mi_parse): Rename from mi_parse_free.
7233 (mi_parse_cleanup): Remove.
7234 (mi_parse): Return a unique_ptr. Use new.
7235 * mi/mi-main.c (mi_execute_command): Update.
7236
7237 2017-04-12 Tom Tromey <tom@tromey.com>
7238
7239 * location.c (explicit_location_lex_one): Return a
7240 unique_xmalloc_ptr.
7241 (string_to_explicit_location): Update. Remove cleanups.
7242
7243 2017-04-12 Tom Tromey <tom@tromey.com>
7244
7245 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7246 (compare_value_and_voffset): Change type. Update.
7247 (compute_vtable_size): Change type of "offset_vec".
7248 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7249 (gnuv3_get_typeid): Remove extraneous declaration.
7250
7251 2017-04-12 Tom Tromey <tom@tromey.com>
7252
7253 * charset.h (wchar_iterator): Fix comment.
7254
7255 2017-04-12 Tom Tromey <tom@tromey.com>
7256
7257 * charset.c (iconv_wrapper): New class.
7258 (cleanup_iconv): Remove.
7259 (convert_between_encodings): Use it.
7260
7261 2017-04-12 Tom Tromey <tom@tromey.com>
7262
7263 * symfile.h (increment_reading_symtab): Update type.
7264 * symfile.c (decrement_reading_symtab): Remove.
7265 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7266 * psymtab.c (psymtab_to_symtab): Update.
7267 * dwarf2read.c (dw2_instantiate_symtab): Update.
7268
7269 2017-04-12 Tom Tromey <tom@tromey.com>
7270
7271 * jit.c (struct jit_reader): Declare separately. Add constructor
7272 and destructor. Change type of "handle".
7273 (loaded_jit_reader): Define separately.
7274 (jit_reader_load): Update. New "new".
7275 (jit_reader_unload_command): Use "delete".
7276 * gdb-dlfcn.h (struct dlclose_deleter): New.
7277 (gdb_dlhandle_up): New typedef.
7278 (gdb_dlopen, gdb_dlsym): Update types.
7279 (gdb_dlclose): Remove.
7280 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7281 (gdb_dlsym): Change type of "handle".
7282 (make_cleanup_dlclose): Remove.
7283 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7284 * compile/compile-c-support.c (load_libcc): Update.
7285
7286 2017-04-12 Tom Tromey <tom@tromey.com>
7287
7288 * symtab.h (find_pcs_for_symtab_line): Change return type.
7289 * symtab.c (find_pcs_for_symtab_line): Change return type.
7290 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7291 type of "vec". Update.
7292 (ltpy_get_pcs_for_line): Update.
7293 * linespec.c (decode_digits_ordinary): Update.
7294
7295 2017-04-12 Tom Tromey <tom@tromey.com>
7296
7297 * tracepoint.c (actions_command): Update.
7298 * python/python.c (python_command, python_interactive_command):
7299 Update.
7300 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7301 * guile/guile.c (guile_command): Update.
7302 * defs.h (read_command_lines, read_command_lines_1): Return
7303 command_line_up.
7304 (command_lines_deleter): New struct.
7305 (command_line_up): New typedef.
7306 * compile/compile.c (compile_code_command)
7307 (compile_print_command): Update.
7308 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7309 command_line_up.
7310 (make_cleanup_free_command_lines): Remove.
7311 * cli/cli-script.c (get_command_line, read_command_lines_1)
7312 (copy_command_lines): Return command_line_up.
7313 (while_command, if_command, read_command_lines, define_command)
7314 (document_command): Update.
7315 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7316 Remove.
7317 * breakpoint.h (breakpoint_set_commands): Change type of
7318 "commands".
7319 * breakpoint.c (breakpoint_set_commands): Change type of
7320 "commands". Update.
7321 (do_map_commands_command, update_dprintf_command_list)
7322 (create_tracepoint_from_upload): Update.
7323
7324 2017-04-12 Tom Tromey <tom@tromey.com>
7325
7326 * tracepoint.c (scope_info): Update.
7327 * spu-tdep.c (spu_catch_start): Update.
7328 * python/python.c (gdbpy_decode_line): Update.
7329 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7330 * python/py-breakpoint.c (bppy_init): Update.
7331 * probe.c (parse_probes): Update.
7332 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7333 * location.h (event_location_deleter): New struct.
7334 (event_location_up): New typedef.
7335 (new_linespec_location, new_address_location, new_probe_location)
7336 (new_explicit_location, copy_event_location)
7337 (string_to_event_location, string_to_event_location_basic)
7338 (string_to_explicit_location): Update return type.
7339 (make_cleanup_delete_event_location): Remove.
7340 * location.c (new_linespec_location, new_address_location)
7341 (new_probe_location, new_explicit_location, copy_event_location):
7342 Return event_location_up.
7343 (delete_event_location_cleanup)
7344 (make_cleanup_delete_event_location): Remove.
7345 (string_to_explicit_location, string_to_event_location_basic)
7346 (string_to_event_location): Return event_location_up.
7347 * linespec.c (canonicalize_linespec, event_location_to_sals)
7348 (decode_line_with_current_source)
7349 (decode_line_with_last_displayed, decode_objc): Update.
7350 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7351 * completer.c (location_completer): Update.
7352 * cli/cli-cmds.c (edit_command, list_command): Update.
7353 * breakpoint.c (create_overlay_event_breakpoint)
7354 (create_longjmp_master_breakpoint)
7355 (create_std_terminate_master_breakpoint)
7356 (create_exception_master_breakpoint)
7357 (create_thread_event_breakpoint): Update.
7358 (init_breakpoint_sal): Update. Remove some dead code.
7359 (create_breakpoint_sal): Change type of "location". Update.
7360 (create_breakpoints_sal, create_breakpoint, break_command_1)
7361 (dprintf_command, break_range_command, until_break_command)
7362 (init_ada_exception_breakpoint)
7363 (strace_marker_create_sals_from_location)
7364 (update_static_tracepoint, trace_command, ftrace_command)
7365 (strace_command, create_tracepoint_from_upload): Update.
7366 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7367 * ax-gdb.c (agent_command_1): Update.
7368
7369 2017-04-12 Pedro Alves <palves@redhat.com>
7370
7371 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7372 * configure.tgt: Handle i[34567]86-*-go32* and
7373 i[34567]86-*-msdosdjgpp*.
7374 * i386-tdep.c (i386_svr4_reg_to_regnum):
7375 Make extern.
7376 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7377 i386-go32-tdep.c.
7378 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7379 * i386-go32-tdep.c: New file.
7380 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7381 declarations.
7382
7383 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7384
7385 * aix-thread.c (pd_status2str): Change return type to const char *.
7386
7387 2017-04-12 Pedro Alves <palves@redhat.com>
7388
7389 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7390 calls to set_gdbarch_gnu_triplet_regexp.
7391
7392 2017-04-12 Pedro Alves <palves@redhat.com>
7393
7394 PR gdb/21323
7395 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7396 New enum value.
7397 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7398 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7399 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7400 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7401 * gdbarch.h, gdbarch.c: Regenerate.
7402 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7403 gdbarch_wchar_bit and gdbarch_wchar_signed.
7404 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7405 * arm-tdep.c (arm_gdbarch_init): Likewise.
7406 * avr-tdep.c (avr_gdbarch_init): Likewise.
7407 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7408 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7409 * i386-tdep.c (i386_go32_init_abi): Likewise.
7410 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7411 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7412 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7413 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7414 * sh-tdep.c (sh_gdbarch_init): Likewise.
7415 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7416 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7417 * windows-tdep.c (windows_init_abi): Likewise.
7418 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7419
7420 2017-04-12 Pedro Alves <palves@redhat.com>
7421
7422 PR c++/21323
7423 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7424 cplus_primitive_type_char32_t>: New enum values.
7425 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7426 and cplus_primitive_type_char32_t.
7427 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7428 32, use the archtecture's built-in type for char16_t and char32_t,
7429 respectively. Otherwise, fallback to init_integer_type as before,
7430 but make the type unsigned, and issue a complaint.
7431 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7432
7433 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7434
7435 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7436 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7437
7438 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7439
7440 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7441 'const char *'.
7442
7443 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7444
7445 * common/common-utils.c (free_vector_argv): New function.
7446 * common/common-utils.h: Include <vector>.
7447 (free_vector_argv): New prototype.
7448 * darwin-nat.c (darwin_create_inferior): Rewrite function
7449 prototype in order to constify "exec_file" and accept a
7450 "std::string" for "allargs".
7451 * fork-child.c: Include <vector>.
7452 (breakup_args): Rewrite function, using C++.
7453 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7454 and accept "std::string" for "allargs". Update the code to
7455 calculate "argv" based on "allargs". Update calls to "exec_fun"
7456 and "execvp".
7457 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7458 order to constify "exec_file" and accept a "std::string" for
7459 "allargs".
7460 * go32-nat.c (go32_create_inferior): Likewise.
7461 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7462 * infcmd.c (run_command_1): Constify "exec_file". Use
7463 "std::string" for inferior arguments.
7464 * inferior.h (fork_inferior): Update prototype.
7465 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7466 prototype in order to constify "exec_file" and accept a
7467 "std::string" for "allargs".
7468 * nto-procfs.c (procfs_create_inferior): Likewise.
7469 * procfs.c (procfs_create_inferior): Likewise.
7470 * remote-sim.c (gdbsim_create_inferior): Likewise.
7471 * remote.c (extended_remote_run): Update code to accept
7472 "std::string" as argument.
7473 (extended_remote_create_inferior): Rewrite function prototype in
7474 order to constify "exec_file" and accept a "std::string" for
7475 "allargs".
7476 * rs6000-nat.c (super_create_inferior): Likewise.
7477 (rs6000_create_inferior): Likewise.
7478 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7479 * windows-nat.c (windows_create_inferior): Likewise.
7480
7481 2017-04-11 Pedro Alves <palves@redhat.com>
7482
7483 * thread.c: Fix whitespace throughout.
7484
7485 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7486
7487 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7488
7489 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7490
7491 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7492
7493 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7494
7495 PR gdb/21364
7496 * osdata.c (info_osdata): Check if 'type' is an empty string
7497 instead of NULL.
7498
7499 2017-04-10 Pedro Alves <palves@redhat.com>
7500
7501 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7502 (ptid_to_global_thread_id, in_thread_list)
7503 (do_captured_list_thread_ids, set_resumed, set_running)
7504 (set_executing, set_stop_requested, finish_thread_state)
7505 (validate_registers_access, can_access_registers_ptid)
7506 (print_thread_info_1, switch_to_thread)
7507 (do_restore_current_thread_cleanup)
7508 (make_cleanup_restore_current_thread, thread_command)
7509 (thread_name_command): Use operator== instead of ptid_equal.
7510
7511 2017-04-10 Pedro Alves <palves@redhat.com>
7512
7513 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7514 (current_thread_cleanup_chain): Delete.
7515 (restore_current_thread_cleanup_dtor)
7516 (make_cleanup_restore_current_thread): Remove references to
7517 current_thread_cleanup_chain.
7518
7519 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7520
7521 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7522 REG_UNKNOWN.
7523
7524 2017-04-10 Yao Qi <yao.qi@linaro.org>
7525
7526 PR gdb/19942
7527 * gdbthread.h (thread_info::deletable): New method.
7528 (thread_info::incref): New method.
7529 (thread_info::decref): New method.
7530 (thread_info::refcount): Move it to private.
7531 * infrun.c (save_stop_context): Call inc_refcount.
7532 (release_stop_context_cleanup): Likewise.
7533 * thread.c (set_thread_exited): New function.
7534 (init_thread_list): Delete "tp" only it is deletable, otherwise
7535 call set_thread_exited.
7536 (delete_thread_1): Call set_thread_exited.
7537 (current_thread_cleanup) <inferior_pid>: Remove.
7538 <thread>: New field.
7539 (restore_current_thread_ptid_changed): Removed.
7540 (do_restore_current_thread_cleanup): Adjust.
7541 (restore_current_thread_cleanup_dtor): Don't call
7542 find_thread_ptid.
7543 (set_thread_refcount): Use dec_refcount.
7544 (make_cleanup_restore_current_thread): Adjust.
7545 (thread_apply_all_command): Call inc_refcount.
7546 (_initialize_thread): Don't call
7547 observer_attach_thread_ptid_changed.
7548
7549 2017-04-10 Yao Qi <yao.qi@linaro.org>
7550
7551 * thread.c (delete_thread_1): Hoist code on marking thread as
7552 exited.
7553
7554 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7555
7556 * windows-nat.c (windows_detach): Initialize ptid with
7557 minus_one_ptid.
7558
7559 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7560
7561 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7562
7563 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7564
7565 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7566 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7567 (bfin_pseudo_register_write): Likewise
7568
7569 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7570
7571 * common/ptid.h (struct ptid): Change to...
7572 (class ptid_t): ... this.
7573 <ptid_t>: New constructors.
7574 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7575 matches>: New methods.
7576 <make_null, make_minus_one>: New static methods.
7577 <pid>: Rename to...
7578 <m_pid>: ...this.
7579 <lwp>: Rename to...
7580 <m_lwp>: ...this.
7581 <tid>: Rename to...
7582 <m_tid>: ...this.
7583 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7584 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7585 as references, move comment to class ptid_t.
7586 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7587 ptid_t static methods.
7588 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7589 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7590 Take ptid arguments as references, implement using ptid_t methods.
7591 * unittests/ptid-selftests.c: New file.
7592 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7593 unittests/ptid-selftests.c.
7594 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7595
7596 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7597
7598 * python/python.c (python_run_simple_file): Cast mode literal to
7599 non-const char pointer as expected by PyFile_FromString.
7600
7601 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7602
7603 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7604 minus_one_ptid and null_ptid.
7605
7606 2017-04-05 Pedro Alves <palves@redhat.com>
7607
7608 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7609 * configure: Regenerate.
7610
7611 2017-04-05 Pedro Alves <palves@redhat.com>
7612
7613 * ada-exp.y (yyerror): Constify.
7614 * ada-lang.c (bound_name, get_selections)
7615 (ada_variant_discrim_type)
7616 (ada_variant_discrim_name, ada_value_struct_elt)
7617 (ada_lookup_struct_elt_type, is_unchecked_variant)
7618 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7619 (catch_ada_exception_command_split)
7620 (catch_ada_assert_command_split, catch_assert_command)
7621 (ada_op_name): Constify.
7622 * ada-lang.h (ada_yyerror, get_selections)
7623 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7624 * arc-tdep.c (arc_print_frame_cache): Constify.
7625 * arm-tdep.c (arm_skip_stub): Constify.
7626 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7627 (gen_aggregate_elt_ref): Constify.
7628 * bcache.c (print_bcache_statistics): Constify.
7629 * bcache.h (print_bcache_statistics): Constify.
7630 * break-catch-throw.c (catch_exception_command_1):
7631 * breakpoint.c (struct ep_type_description::description):
7632 Constify.
7633 (add_solib_catchpoint): Constify.
7634 (catch_fork_command_1): Add cast.
7635 (add_catch_command): Constify.
7636 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7637 Constify.
7638 * bsd-uthread.c (bsd_uthread_state): Constify.
7639 * buildsym.c (patch_subfile_names): Constify.
7640 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7641 Constify.
7642 * c-exp.y (yyerror): Constify.
7643 (token::oper): Constify.
7644 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7645 * c-varobj.c (cplus_describe_child): Constify.
7646 * charset.c (find_charset_names): Add cast.
7647 (find_charset_names): Constify array and add const_cast.
7648 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7649 (edit_command): Constify.
7650 * cli/cli-decode.c (lookup_cmd): Constify.
7651 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7652 Constify.
7653 (struct dump_context): Constify.
7654 (add_dump_command, restore_command): Constify.
7655 * cli/cli-script.c (get_command_line): Constify.
7656 * cli/cli-script.h (get_command_line): Constify.
7657 * cli/cli-utils.c (check_for_argument): Constify.
7658 * cli/cli-utils.h (check_for_argument): Constify.
7659 * coff-pe-read.c (struct read_pe_section_data): Constify.
7660 * command.h (lookup_cmd): Constify.
7661 * common/print-utils.c (decimal2str): Constify.
7662 * completer.c (gdb_print_filename): Constify.
7663 * corefile.c (set_gnutarget): Constify.
7664 * cp-name-parser.y (yyerror): Constify.
7665 * cp-valprint.c (cp_print_class_member): Constify.
7666 * cris-tdep.c (cris_register_name, crisv32_register_name):
7667 Constify.
7668 * d-exp.y (yyerror): Constify.
7669 (struct token::oper): Constify.
7670 * d-lang.h (d_yyerror): Constify.
7671 * dbxread.c (struct header_file_location::name): Constify.
7672 (add_old_header_file, add_new_header_file, last_function_name)
7673 (dbx_next_symbol_text, add_bincl_to_list)
7674 (find_corresponding_bincl_psymtab, set_namestring)
7675 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7676 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7677 * defs.h (command_line_input, print_address_symbolic)
7678 (deprecated_readline_begin_hook): Constify.
7679 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7680 Constify.
7681 * event-top.c (handle_line_of_input): Constify and add cast.
7682 * exceptions.c (catch_errors): Constify.
7683 * exceptions.h (catch_errors): Constify.
7684 * expprint.c (print_subexp_standard, op_string, op_name)
7685 (op_name_standard, dump_raw_expression, dump_raw_expression):
7686 * expression.h (op_name, op_string, dump_raw_expression):
7687 Constify.
7688 * f-exp.y (yyerror): Constify.
7689 (struct token::oper): Constify.
7690 (struct f77_boolean_val::name): Constify.
7691 * f-lang.c (f_word_break_characters): Constify.
7692 * f-lang.h (f_yyerror): Constify.
7693 * fork-child.c (fork_inferior): Add cast.
7694 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7695 (new_variant): Constify.
7696 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7697 * gdbarch.c: Regenerate.
7698 * gdbcore.h (set_gnutarget): Constify.
7699 * go-exp.y (yyerror): Constify.
7700 (token::oper): Constify.
7701 * go-lang.h (go_yyerror): Constify.
7702 * go32-nat.c (go32_sysinfo): Constify.
7703 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7704 * guile/scm-cmd.c (cmdscm_function): Constify.
7705 * guile/scm-param.c (pascm_param_value): Constify.
7706 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7707 (h8300sx_register_name): Constify.
7708 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7709 Constify.
7710 * ia64-tdep.c (ia64_register_names): Constify.
7711 * infcmd.c (construct_inferior_arguments): Constify.
7712 (path_command, attach_post_wait): Constify.
7713 * language.c (show_range_command, show_case_command)
7714 (unk_lang_error): Constify.
7715 * language.h (language_defn::la_error)
7716 (language_defn::la_name_of_this): Constify.
7717 * linespec.c (decode_line_2): Constify.
7718 * linux-thread-db.c (thread_db_err_str): Constify.
7719 * lm32-tdep.c (lm32_register_name): Constify.
7720 * m2-exp.y (yyerror): Constify.
7721 * m2-lang.h (m2_yyerror): Constify.
7722 * m32r-tdep.c (m32r_register_names): Constify and make static.
7723 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7724 * m88k-tdep.c (m88k_register_name): Constify.
7725 * macroexp.c (appendmem): Constify.
7726 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7727 (upgrade_type, parse_external, parse_partial_symbols)
7728 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7729 (new_symbol): Constify.
7730 * memattr.c (mem_info_command): Constify.
7731 * mep-tdep.c (register_name_from_keyword): Constify.
7732 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7733 Constify.
7734 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7735 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7736 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7737 cast.
7738 (mi_execute_async_cli_command): Constify.
7739 * mips-tdep.c (mips_register_name): Constify.
7740 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7741 (am33_register_name, am33_2_register_name)
7742 * moxie-tdep.c (moxie_register_names): Constify.
7743 * nat/linux-osdata.c (osdata_type): Constify fields.
7744 * nto-tdep.c (nto_parse_redirection): Constify.
7745 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7746 (lookup_child_selector): Constify.
7747 (objc_methcall::name): Constify.
7748 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7749 (lookup_struct_typedef): Constify.
7750 * objfiles.c (pc_in_section): Constify.
7751 * objfiles.h (pc_in_section): Constify.
7752 * p-exp.y (struct token::oper): Constify.
7753 (yyerror): Constify.
7754 * p-lang.h (pascal_yyerror): Constify.
7755 * parser-defs.h (op_name_standard): Constify.
7756 (op_print::string): Constify.
7757 (exp_descriptor::op_name): Constify.
7758 * printcmd.c (print_address_symbolic): Constify.
7759 * psymtab.c (print_partial_symbols): Constify.
7760 * python/py-breakpoint.c (stop_func): Constify.
7761 (bppy_get_expression): Constify.
7762 * python/py-cmd.c (cmdpy_completer::name): Constify.
7763 (cmdpy_function): Constify.
7764 * python/py-event.c (evpy_add_attribute)
7765 (gdbpy_initialize_event_generic): Constify.
7766 * python/py-event.h (evpy_add_attribute)
7767 (gdbpy_initialize_event_generic): Constify.
7768 * python/py-evts.c (add_new_registry): Constify.
7769 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7770 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7771 * python/py-inferior.c (get_buffer): Add cast.
7772 * python/py-param.c (parm_constant::name): Constify.
7773 * python/py-unwind.c (fprint_frame_id): Constify.
7774 * python/python.c (gdbpy_parameter_value): Constify.
7775 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7776 * remote.c (memory_packet_config::name): Constify.
7777 (show_packet_config_cmd, remote_write_bytes)
7778 (remote_buffer_add_string):
7779 * reverse.c (exec_reverse_once): Constify.
7780 * rs6000-tdep.c (variant::name, variant::description): Constify.
7781 * rust-exp.y (rustyyerror): Constify.
7782 * rust-lang.c (rust_op_name): Constify.
7783 * rust-lang.h (rustyyerror): Constify.
7784 * serial.h (serial_ops::name): Constify.
7785 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7786 (sh_sh3e_register_name, sh_sh2e_register_name)
7787 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7788 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7789 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7790 (sh_sh4al_dsp_register_name): Constify.
7791 * sh64-tdep.c (sh64_register_name): Constify.
7792 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7793 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7794 * stabsread.c (patch_block_stabs, read_type_number)
7795 (ref_map::stabs, ref_add, process_reference)
7796 (symbol_reference_defined, define_symbol, define_symbol)
7797 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7798 (read_one_struct_field, read_struct_fields, read_baseclasses)
7799 (read_tilde_fields, read_struct_type, read_array_type)
7800 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7801 (read_huge_number, read_range_type, read_args, common_block_start)
7802 (find_name_end): Constify.
7803 * stabsread.h (common_block_start, define_symbol)
7804 (process_one_symbol, symbol_reference_defined, ref_add):
7805 * symfile.c (get_section_index, add_symbol_file_command):
7806 * symfile.h (get_section_index): Constify.
7807 * target-descriptions.c (tdesc_type::name): Constify.
7808 (tdesc_free_type): Add cast.
7809 * target.c (find_default_run_target):
7810 (add_deprecated_target_alias, find_default_run_target)
7811 (target_announce_detach): Constify.
7812 (do_option): Constify.
7813 * target.h (add_deprecated_target_alias): Constify.
7814 * thread.c (print_thread_info_1): Constify.
7815 * top.c (deprecated_readline_begin_hook, command_line_input):
7816 Constify.
7817 (init_main): Add casts.
7818 * top.h (handle_line_of_input): Constify.
7819 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7820 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7821 (tfind_command): Rename to ...
7822 (tfind_command_1): ... this and constify.
7823 (tfind_command): New function.
7824 (tfind_end_command, tfind_start_command): Adjust.
7825 (encode_source_string): Constify.
7826 * tracepoint.h (encode_source_string): Constify.
7827 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7828 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7829 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7830 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7831 * tui/tui-win.c (parse_scrolling_args): Constify.
7832 * tui/tui-windata.c (tui_erase_data_content): Constify.
7833 * tui/tui-windata.h (tui_erase_data_content): Constify.
7834 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7835 * tui/tui.c (tui_enable): Add cast.
7836 * utils.c (defaulted_query): Constify.
7837 (init_page_info): Add cast.
7838 (puts_debug, subset_compare): Constify.
7839 * utils.h (subset_compare): Constify.
7840 * varobj.c (varobj_format_string): Constify.
7841 * varobj.h (varobj_format_string): Constify.
7842 * vax-tdep.c (vax_register_name): Constify.
7843 * windows-nat.c (windows_detach): Constify.
7844 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7845 * xml-support.c (gdb_xml_end_element): Constify.
7846 * xml-tdesc.c (tdesc_start_reg): Constify.
7847 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7848 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7849 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7850
7851 2017-04-05 Pedro Alves <palves@redhat.com>
7852
7853 * proc-api.c (struct trans): Constify.
7854 (procfs_note): Constify.
7855 * proc-events.c (struct trans, syscall_table):
7856 * proc-flags.c (struct trans): Constify.
7857 * proc-utils.h (procfs_note): Constify.
7858 * proc-why.c (struct trans): Constify.
7859 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7860 (procfs_detach): Constify.
7861 * sol-thread.c (struct string_map): Constify.
7862 (td_err_string, td_state_string): Constify.
7863
7864 2017-04-05 Pedro Alves <palves@redhat.com>
7865
7866 * proc-api.c (procfs_filename): Don't initialize
7867 procfs_filename.
7868 (prepare_to_trace): Assume procfs_filename is non-NULL.
7869 (_initialize_proc_api): Give procfs_filename a default value here.
7870
7871 2017-04-05 Pedro Alves <palves@redhat.com>
7872
7873 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7874 'cond_string' parameter.
7875 (extract_exception_regexp): Constify 'string' parameter.
7876 (catch_exception_command_1): Constify.
7877 * breakpoint.c (init_catchpoint)
7878 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7879 parameter.
7880 (ep_parse_optional_if_clause, catch_fork_command_1)
7881 (catch_exec_command_1): Constify.
7882 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7883 parameter.
7884 (ep_parse_optional_if_clause): Constify.
7885 * cli/cli-utils.c (remove_trailing_whitespace)
7886 (check_for_argument): Constify.
7887 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7888 non-const overload.
7889 (check_for_argument): Likewise.
7890
7891 2017-04-05 Pedro Alves <palves@redhat.com>
7892
7893 * event-top.c (command_line_handler): Add cast to execute_command
7894 call.
7895 * record-btrace.c (cmd_record_btrace_bts_start)
7896 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7897 (cmd_record_btrace_start): Add cast to execute_command call.
7898 * record-full.c (record_full_goto_insn):
7899 * record.c (record_start, record_stop): Add cast to
7900 execute_command_to_string calls.
7901 (cmd_record_start): Add cast to execute_command calls.
7902
7903 2017-04-05 Pedro Alves <palves@redhat.com>
7904
7905 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7906 static inline function.
7907 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7908 array and use gdb_PyArg_ParseTupleAndKeywords.
7909 * python/py-cmd.c (cmdpy_init): Likewise.
7910 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7911 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7912 (infpy_search_memory): Likewise.
7913 * python/py-objfile.c (objfpy_add_separate_debug_file)
7914 (gdbpy_lookup_objfile): Likewise.
7915 * python/py-symbol.c (gdbpy_lookup_symbol)
7916 (gdbpy_lookup_global_symbol): Likewise.
7917 * python/py-type.c (gdbpy_lookup_type): Likewise.
7918 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7919 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7920 Likewise.
7921
7922 2017-04-05 Pedro Alves <palves@redhat.com>
7923
7924 * python/python-internal.h (gdb_PyGetSetDef): New type.
7925 * python/py-block.c (block_object_getset)
7926 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7927 * python/py-event.c (event_object_getset)
7928 (finish_breakpoint_object_getset): Likewise.
7929 * python/py-inferior.c (inferior_object_getset): Likewise.
7930 * python/py-infthread.c (thread_object_getset): Likewise.
7931 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7932 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7933 * python/py-objfile.c (objfile_getset): Likewise.
7934 * python/py-progspace.c (pspace_getset): Likewise.
7935 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7936 Likewise.
7937 * python/py-record.c (recpy_record_getset): Likewise.
7938 * python/py-symbol.c (symbol_object_getset): Likewise.
7939 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7940 Likewise.
7941 * python/py-type.c (type_object_getset, field_object_getset):
7942 Likewise.
7943 * python/py-value.c (value_object_getset): Likewise.
7944
7945 2017-04-05 Pedro Alves <palves@redhat.com>
7946
7947 * python/python-internal.h (gdb_PyObject_CallMethod)
7948 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7949 New functions.
7950 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7951 (PySys_GetObject, PySys_SetPath): New macros.
7952
7953 2017-04-05 Pedro Alves <palves@redhat.com>
7954
7955 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7956 info_osdata_command.
7957 * osdata.c (info_osdata_command): Rename to ...
7958 (info_osdata): ... this. Constify 'type' parameter, and remove
7959 the 'from_tty' parameter. Accept NULL TYPE.
7960 (info_osdata_command): New function.
7961 * osdata.h (info_osdata_command): Remove declaration.
7962 (info_osdata): New declaration.
7963
7964 2017-04-05 Pedro Alves <palves@redhat.com>
7965
7966 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7967 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7968 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7969 parameter.
7970 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7971 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7972 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7973 parameter.
7974 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7975 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7976 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7977 (mi_cmd_file_list_exec_source_files)
7978 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7979 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7980 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7981 parameter.
7982 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7983 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7984 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7985 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7986 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7987 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7988 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7989 'command' parameter.
7990 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7991 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7992 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7993 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7994 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7995 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7996 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7997 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7998 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7999 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8000 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8001 parameter.
8002 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8003 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8004 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8005 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8006 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8007 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8008 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8009 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8010 (mi_cmd_data_list_changed_registers)
8011 (mi_cmd_data_write_register_values)
8012 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8013 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8014 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8015 (mi_cmd_list_features, mi_cmd_list_target_features)
8016 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8017 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8018 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8019 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8020 (mi_cmd_trace_frame_collected): Constify 'command'
8021 parameter.
8022 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8023 'command' parameter.
8024
8025 2017-04-05 Pedro Alves <palves@redhat.com>
8026
8027 * ada-lang.c (ada_completer_word_break_characters): Now a const
8028 array.
8029 (ada_get_gdb_completer_word_break_characters): Constify.
8030 * completer.c (gdb_completer_command_word_break_characters)
8031 (gdb_completer_file_name_break_characters)
8032 (gdb_completer_quote_characters): Now const arrays.
8033 (get_gdb_completer_quote_characters): Constify.
8034 (set_rl_completer_word_break_characters): New function.
8035 (set_gdb_completion_word_break_characters)
8036 (complete_line_internal): Use it.
8037 * completer.h (get_gdb_completer_quote_characters): Constify.
8038 (set_rl_completer_word_break_characters): Declare.
8039 * f-lang.c (f_word_break_characters): Constify.
8040 * language.c (default_word_break_characters): Constify.
8041 * language.h (language_defn::la_word_break_characters): Constify.
8042 (default_word_break_characters): Constify.
8043 * top.c (init_main): Use set_rl_completer_word_break_characters.
8044
8045 2017-04-05 Pedro Alves <palves@redhat.com>
8046
8047 * aix-thread.c (aix_thread_pid_to_str)
8048 (aix_thread_extra_thread_info): Constify.
8049 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8050 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8051 (bsd_uthread_pid_to_str): Constify.
8052 * corelow.c (core_pid_to_str): Constify.
8053 * darwin-nat.c (darwin_pid_to_str): Constify.
8054 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8055 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8056 Constify.
8057 * gnu-nat.c (gnu_pid_to_str): Constify.
8058 * go32-nat.c (go32_pid_to_str): Constify.
8059 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8060 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8061 * inferior.c (inferior_pid_to_str): Constify.
8062 * linux-nat.c (linux_nat_pid_to_str): Constify.
8063 * linux-tdep.c (linux_core_pid_to_str): Constify.
8064 * linux-thread-db.c (thread_db_pid_to_str)
8065 (thread_db_extra_thread_info): Constify.
8066 * nto-tdep.c (nto_extra_thread_info): Constify.
8067 * nto-tdep.h (nto_extra_thread_info): Constify.
8068 * obsd-nat.c (obsd_pid_to_str): Constify.
8069 * procfs.c (procfs_pid_to_str): Constify.
8070 * ravenscar-thread.c (ravenscar_extra_thread_info)
8071 (ravenscar_pid_to_str): Constify.
8072 * remote-sim.c (gdbsim_pid_to_str): Constify.
8073 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8074 Constify.
8075 * sol-thread.c (solaris_pid_to_str): Constify.
8076 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8077 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8078 * target.c (default_pid_to_str, target_pid_to_str)
8079 (normal_pid_to_str, default_pid_to_str): Constify.
8080 * target.h (target_ops::to_pid_to_str)
8081 (target_ops::to_extra_thread_info): Constify.
8082 (target_pid_to_str, normal_pid_to_str): Constify.
8083 * windows-nat.c (windows_pid_to_str): Constify.
8084 * gdbarch.sh (core_pid_to_str): Constify.
8085 * target-delegates.c: Regenerate.
8086 * gdbarch.h, gdbarch.c: Regenerate.
8087
8088 2017-04-05 Pedro Alves <palves@redhat.com>
8089
8090 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8091 the memory of the temporary warning_pre_print override.
8092 * utils.c (warning_pre_print): Constify.
8093 * utils.h (warning_pre_print): Constify.
8094
8095 2017-04-05 Pedro Alves <palves@redhat.com>
8096
8097 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8098 (shell_command): New function.
8099 (make_command): Use std::string.
8100 (init_cli_cmds): Register shell_command instead of shell_escape.
8101
8102 2017-04-05 Pedro Alves <palves@redhat.com>
8103
8104 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8105 * tracepoint.c (default_collect): Don't initialize.
8106
8107 2017-04-05 Pedro Alves <palves@redhat.com>
8108
8109 * macroexp.c (macro_buffer::shared): Now a bool.
8110 (init_buffer): Update.
8111 (init_shared_buffer): Constify 'addr' parameter.
8112 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8113 casts.
8114
8115 2017-04-05 Pedro Alves <palves@redhat.com>
8116
8117 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8118 * disasm.c (set_disassembler_options): Constify local.
8119 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8120
8121 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8122
8123 PR gdb/21352
8124 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8125 option.
8126
8127 2017-04-05 Yao Qi <yao.qi@linaro.org>
8128
8129 * frame.c (frame_unwind_register_unsigned): Call
8130 frame_unwind_register_value.
8131
8132 2017-04-05 Yao Qi <yao.qi@linaro.org>
8133
8134 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8135 Use gdb_test_multiple, and don't match anchor.
8136
8137 2017-04-05 Pedro Alves <palves@redhat.com>
8138
8139 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8140 (Write After Approval): Remove Simon Marchi.
8141
8142 2017-04-05 Pedro Alves <palves@redhat.com>
8143
8144 * common/gdb_optional.h (optional::optional): Make constexpr and
8145 initialize m_dummy.
8146
8147 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8148
8149 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8150 (amd64fbsd_jmp_buf_reg_offset): Remove.
8151 (amd64fbsd_supply_uthread): Remove function.
8152 (amd64fbsd_collect_uthread): Remove function.
8153 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8154 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8155 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8156 (fbsd-nat.c): Update comment.
8157 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8158 (i386fbsd_jmp_buf_reg_offset): Remove.
8159 (i386fbsd_supply_uthread): Remove function.
8160 (i386fbsd_collect_uthread): Remove function.
8161 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8162
8163 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8164
8165 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8166 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8167 * NEWS: Mention that support for FreeBSD/alpha was removed.
8168 * alpha-fbsd-tdep.c: Delete file.
8169 * config/alpha/fbsd.mh: Delete file.
8170 * configure.host: Delete alpha*-*-freebsd* and
8171 alpha*-*-kfreebsd*-gnu.
8172 * configure.tgt: Delete alpha*-*-freebsd* and
8173 alpha*-*-kfreebsd*-gnu.
8174
8175 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8176
8177 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8178 amd64bsd_store_inferior_registers): Use ptid from regcache.
8179
8180 2017-04-04 Pedro Alves <palves@redhat.com>
8181
8182 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8183 data fields, make them private and add "m_" prefixes.
8184 (lnp_state_machine::lnp_state_machine): New ctor.
8185 (record_line, check_line_address, handle_set_discriminator)
8186 (handle_set_address, handle_advance_pc, handle_special_opcode)
8187 (handle_advance_line, handle_set_file, handle_negate_stmt)
8188 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8189 (end_sequence, advance_line): New methods.
8190 (m_gdbarch, m_record_lines_p): New fields.
8191 (lnp_reader_state): Delete.
8192 (dwarf_record_line): Rename to ...
8193 (lnp_state_machine::record_line): ... adjust.
8194 (init_lnp_state_machine): Delete.
8195 (lnp_state_machine::lnp_state_machine): New.
8196 (check_line_address): Rename to ...
8197 (lnp_state_machine::check_line_address): This.
8198 (dwarf_decode_lines_1): Remove reference to "reader_state".
8199 Adjust lnp_state_machine having a non-default ctor. Use bool.
8200 State machine internal state manipulation moved to
8201 lnp_state_machine methods.
8202
8203 2017-04-04 Pedro Alves <palves@redhat.com>
8204
8205 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8206 unittests/offset-type-selftests.c.
8207 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8208 * common/offset-type.h: New file.
8209 * common/preprocessor.h: New file.
8210 * common/traits.h: New file.
8211 * common/valid-expr.h: New file.
8212 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8213 sect_offset and cu_offset strong typedefs throughout.
8214 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8215 typedefs throughout.
8216 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8217 sect_offset and cu_offset strong typedefs throughout.
8218 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8219 typedefs throughout.
8220 * gdbtypes.h: Include "common/offset-type.h".
8221 (cu_offset): Now an offset type (strong typedef) instead of a
8222 struct.
8223 (sect_offset): Likewise.
8224 (union call_site_parameter_u): Rename "param_offset" field to
8225 "param_cu_off".
8226 * unittests/offset-type-selftests.c: New file.
8227
8228 2017-04-04 Pedro Alves <palves@redhat.com>
8229
8230 * common/underlying.h: New file.
8231 * dwarf2read.c: Include "common/gdb_optional.h" and
8232 "common/underlying.h".
8233 (dir_index, file_name_index): New types.
8234 (file_entry): Use them.
8235 (file_entry::include): Use to_underlying.
8236 (line_header::add_file_name): Use dir_index.
8237 (read_formatted_entries): Use gdb::optional. Read form before
8238 writting to file_entry.
8239 (dwarf_decode_line_header): Use dir_index.
8240 (lnp_state_machine::current_file): Use to_underlying.
8241 (lnp_state_machine::file): Change type to file_name_index.
8242 (dwarf_record_line): Use to_underlying.
8243 (init_lnp_state_machine): Use file_name_index.
8244 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8245
8246 2017-04-04 Pedro Alves <palves@redhat.com>
8247
8248 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8249 operator bool, has_value and get methods.
8250
8251 2017-04-04 Pedro Alves <palves@redhat.com>
8252
8253 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8254 fields.
8255 (line_header): Initialize all data fields. Change type of
8256 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8257 Change type of include_dirs to std::vector<const char *>. Remove
8258 num_include_dirs, include_dirs_size. Change type of file_names to
8259 std::vector<file_entry>. Remove num_file_names, file_names_size.
8260 (line_header::line_header): New.
8261 (line_header::add_include_dir, line_header::add_file_name): New
8262 methods.
8263 (line_header::include_dir_at): Remove NULL check.
8264 (line_header::file_name_at): Add const overload.
8265 (line_header_up): New unique_ptr typedef.
8266 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8267 std::vector. Remove free_line_header call.
8268 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8269 free_line_header call.
8270 (free_cu_line_header): Delete.
8271 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8272 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8273 Adjust to use std::vector.
8274 (free_line_header): Delete.
8275 (free_line_header_voidp): Use delete.
8276 (add_include_dir): Replace with ...
8277 (line_header::add_include_dir): ... this method. Use std::vector.
8278 (add_file_name): Replace with ...
8279 (line_header::add_file_name): ... this method. Use std::vector.
8280 (add_include_dir_stub): Delete.
8281 (read_formatted_entries): Remove memset.
8282 (dwarf_decode_line_header): Return a line_header_up instead of a
8283 raw pointer. Remove cleanup handling. Pass lambdas to
8284 read_formatted_entries. Adjust to use line_header methods.
8285 (dwarf_decode_lines_1): Adjust to use line_header methods.
8286 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8287 use std::vector.
8288
8289 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8290
8291 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8292 instead of struct ptid.
8293
8294 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8295
8296 * frame.c (get_frame_register_bytes): Unwind using value.
8297 (put_frame_register_bytes): Likewise.
8298
8299 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8300
8301 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8302 aggregate-like.
8303
8304 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8305
8306 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8307
8308 2017-03-29 Yao Qi <yao.qi@linaro.org>
8309
8310 * gdbthread.h (struct thread_info): Declare constructor and
8311 destructor. Add some in-class member initializers.
8312 * thread.c (free_thread): Remove.
8313 (init_thread_list): Call delete instead of free_thread.
8314 (new_thread): Call thread_info constructor.
8315 (thread_info::thread_info): New function.
8316 (thread_info::~thread_info): New function.
8317 (delete_thread_1): Call delete instead of free_thread.
8318 (make_cleanup_restore_current_thread): Move tp and frame to
8319 inner block.
8320
8321 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8322
8323 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8324 (arc_skip_prologue): Likewise.
8325 (arc_make_frame_cache): Likewise.
8326 (arc_pv_get_operand): New function.
8327 (arc_is_in_prologue): Likewise.
8328 (arc_analyze_prologue): Likewise.
8329 (arc_print_frame_cache): Likewise.
8330 (MAX_PROLOGUE_LENGTH): New constant.
8331
8332 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8333
8334 * configure.tgt: Add arc-insn.o.
8335 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8336 (dump_arc_instruction_command): New function.
8337 (arc_fprintf_disasm): Likewise.
8338 (arc_disassemble_info): Likewise.
8339 (arc_insn_get_operand_value): Likewise.
8340 (arc_insn_get_operand_value_signed): Likewise.
8341 (arc_insn_get_memory_base_reg): Likewise.
8342 (arc_insn_get_memory_offset): Likewise.
8343 (arc_insn_get_branch_target): Likewise.
8344 (arc_insn_dump): Likewise.
8345 (arc_insn_get_linear_next_pc): Likewise.
8346 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8347 (arc_disassemble_info): Likewise.
8348 (arc_insn_get_branch_target): Likewise.
8349 (arc_insn_get_linear_next_pc): Likewise.
8350 * NEWS: Mention new "maint print arc arc-instruction".
8351
8352 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8353
8354 * arc-tdep (maintenance_print_arc_list): New variable.
8355 (maintenance_print_arc_command): New function.
8356
8357 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8358
8359 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8360 Add "limm" and "reserved".
8361 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8362 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8363 * arc-tdep.h (arc_regnum): Likewise.
8364
8365 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8366
8367 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8368 for THREADPTR register.
8369 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8370 register.
8371 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8372 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8373 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8374
8375 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8376
8377 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8378 registers above gdbarch_num_regs (gdbarch) as privileged in
8379 call0 ABI.
8380
8381 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8382
8383 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8384 for a single specified register or for all registers in
8385 a0_base..a0_base + C0_NREGS range.
8386 (supply_gregset_reg): Call regcache_raw_supply for a single
8387 specified register or for all registers in a0_base..a0_base +
8388 C0_NREGS range.
8389
8390 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8391
8392 * arch/xtensa.h (C0_NREGS): Add definition.
8393 * xtensa-tdep.c (C0_NREGS): Remove definition.
8394
8395 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8396
8397 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8398 Drop xtensa_default_isa initialization.
8399 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8400
8401 2017-03-27 Pedro Alves <palves@redhat.com>
8402
8403 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8404 (file_entry::include_dir): New method.
8405 (line_header::include_dir_at, line_header::file_name_at): New
8406 methods.
8407 (setup_type_unit_groups, setup_type_unit_groups)
8408 (psymtab_include_file_name): Simplify using the new methods.
8409 (lnp_state_machine) <the_line_header>: New field.
8410 <file>: Add comment.
8411 (lnp_state_machine::current_file): New method.
8412 (dwarf_record_line): Simplify using the new methods.
8413 (init_lnp_state_machine): Initialize the "the_line_header" field.
8414 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8415 Simplify using the new methods.
8416
8417 2017-03-27 Pedro Alves <palves@redhat.com>
8418
8419 * cp-name-parser.y (make_empty): Delete.
8420 (demangler_special, nested_name, ptr_operator, array_indicator)
8421 (direct_declarator, declarator_1): Use fill_comp instead of
8422 make_empty.
8423
8424 2017-03-27 Pedro Alves <palves@redhat.com>
8425
8426 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8427 to ATTRIBUTE_PRINTF.
8428 * solib-target.c (library_list_start_list): Print "string" not
8429 "version".
8430 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8431 gdb_xml_error call.
8432
8433 2017-03-27 Pedro Alves <palves@redhat.com>
8434
8435 * dwarf2read.c (struct file_and_directory): New.
8436 (dwarf2_get_dwz_file): Adjust to use std::string.
8437 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8438 (find_file_and_directory): Adjust to return a file_and_directory
8439 object.
8440 (read_file_scope): Adjust to use file_and_directory. Remove
8441 make_cleanup/do_cleanups calls.
8442 (open_and_init_dwp_file): Adjust to use std::string. Remove
8443 make_cleanup/do_cleanups calls.
8444 * python/python.c (do_start_initialization): Adjust to ldirname
8445 returning a std::string.
8446 * utils.c (ldirname): Now returns a std::string.
8447 * utils.h (ldirname): Change return type to std::string.
8448 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8449 returning a std::string.
8450 * xml-tdesc.c (file_read_description_xml): Likewise.
8451
8452 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8453
8454 * regcache.c (regcache_debug_print_register): New function.
8455 * regcache.h (regcache_debug_print_register): New declaration.
8456 * target.c (debug_print_register): Remove.
8457 (target_fetch_registers): Call regcache_debug_print_register.
8458 (target_store_registers): Likewise.
8459
8460 2017-03-24 Pádraig Brady <pbrady@fb.com>
8461
8462 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8463 reference beyond the 'lh->include_dirs' array before accessing to
8464 it.
8465 (psymtab_include_file_name): Likewise.
8466 (dwarf_decode_lines_1): Likewise.
8467 (dwarf_decode_lines): Likewise.
8468 (file_file_name): Likewise.
8469
8470 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8471
8472 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8473 inferior_ptid.
8474 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8475 ps_lsetfpregs): Likewise.
8476 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8477 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8478 ps_lsetfpregs): Likewise.
8479 * target.c (target_fetch_registers, target_store_registers):
8480 Remove asserts.
8481
8482 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8483
8484 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8485
8486 2017-03-23 Yao Qi <yao.qi@linaro.org>
8487
8488 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8489 (_initialize_aarch64_tdep): Register it.
8490 (aarch64_record_load_store): Handle PRFM instruction.
8491 (aarch64_process_record_test): New function.
8492
8493 2017-03-23 Yao Qi <yao.qi@linaro.org>
8494
8495 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8496 indentation.
8497
8498 2017-03-23 Yao Qi <yao.qi@linaro.org>
8499
8500 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8501
8502 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8503
8504 python/python.c (do_start_initialization): Fix memory leak.
8505
8506 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8507
8508 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8509 using get_ptrace_pid.
8510 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8511 inferior_ptid.
8512 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8513 inferior_ptid instead of pid.
8514
8515 2017-03-22 Yao Qi <yao.qi@linaro.org>
8516
8517 * aarch64-tdep.c: Wrap locally used classes in anonymous
8518 namespace.
8519 * arm-tdep.c: Likewise.
8520 * linespec.c: Likewise.
8521 * ui-out.c: Likewise.
8522
8523 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8524
8525 PR gdb/19637
8526 * python/lib/gdb/printer/bound_registers.py: Import sys.
8527
8528 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8529
8530 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8531 windows_thread_info parameter and use it instead of
8532 current_thread.
8533 (windows_fetch_inferior_registers): Don't set current_thread,
8534 pass the thread to do_windows_fetch_inferior_registers. Use
8535 ptid from regcache instead of inferior_ptid.
8536 (do_windows_store_inferior_registers): Add windows_thread_info
8537 parameter and use it instead of current_thread.
8538 (windows_store_inferior_registers): Don't set current_thread,
8539 pass the thread to do_windows_store_inferior_registers. Use
8540 ptid from regcache instead of inferior_ptid.
8541
8542 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8543
8544 * ser-mingw.c (ser_windows_raw): Remove reference to
8545 struct serial::current_timeout.
8546
8547 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8548
8549 PR tdep/20928
8550 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8551 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8552 (sparc64_fsr_type): Fix %fsr decoding.
8553
8554 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8555
8556 * python/py-record-btrace.c (btpy_insn_data): Change return type
8557 for Python 2.
8558
8559 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8560
8561 * spu-linux-nat.c (spu_fetch_inferior_registers,
8562 spu_store_inferior_registers): Use ptid from regcache, set and
8563 restore inferior_ptid.
8564 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8565 Likewise.
8566
8567 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8568
8569 * i386-linux-nat.c (fetch_register, store_register,
8570 i386_linux_fetch_inferior_registers,
8571 i386_linux_store_inferior_registers): Use ptid from regcache.
8572 * ia64-linux-nat.c (ia64_linux_fetch_register,
8573 ia64_linux_store_register): Likewise.
8574 * inf-ptrace.c (inf_ptrace_fetch_register,
8575 inf_ptrace_store_register): Likewise.
8576 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8577 m32r_linux_store_inferior_registers): Likewise.
8578 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8579 m68kbsd_store_inferior_registers): Likewise.
8580 * m68k-linux-nat.c (fetch_register, store_register,
8581 m68k_linux_fetch_inferior_registers,
8582 m68k_linux_store_inferior_registers): Likewise.
8583 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8584 m88kbsd_store_inferior_registers): Likewise.
8585 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8586 mips_fbsd_store_inferior_registers): Likewise.
8587 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8588 mips64_linux_regsets_store_registers): Likewise.
8589 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8590 mipsnbsd_store_inferior_registers): Likewise.
8591 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8592 mips64obsd_store_inferior_registers): Likewise.
8593 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8594 Likewise.
8595 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8596 ppcfbsd_store_inferior_registers): Likewise.
8597 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8598 ppc_linux_store_inferior_registers): Likewise.
8599 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8600 ppcnbsd_store_inferior_registers): Likewise.
8601 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8602 ppcobsd_store_registers): Likewise.
8603 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8604 Likewise.
8605 * ravenscar-thread.c (ravenscar_fetch_registers,
8606 ravenscar_store_registers, ravenscar_prepare_to_store):
8607 Likewise.
8608 * record-btrace.c (record_btrace_fetch_registers,
8609 record_btrace_store_registers, record_btrace_prepare_to_store):
8610 Likewise.
8611 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8612 Lookup inferior using ptid from regcache, instead of
8613 current_inferior.
8614 * remote.c (remote_fetch_registers, remote_store_registers): Use
8615 ptid from regcache.
8616 * rs6000-nat.c (fetch_register, store_register): Likewise.
8617 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8618 s390_linux_store_inferior_registers): Likewise.
8619 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8620 shnbsd_store_inferior_registers): Likewise.
8621 * sol-thread.c (sol_thread_fetch_registers,
8622 sol_thread_store_registers): Likewise.
8623 * sparc-nat.c (sparc_fetch_inferior_registers,
8624 sparc_store_inferior_registers): Likewise.
8625 * tilegx-linux-nat.c (fetch_inferior_registers,
8626 store_inferior_registers): Likewise.
8627 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8628 vaxbsd_store_inferior_registers): Likewise.
8629 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8630 store_xtregs): Likewise.
8631
8632 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8633
8634 PR gdb/14441
8635 * NEWS: Mention support for rvalue references in GDB and python.
8636 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8637 supports both lvalue and rvalue references.
8638
8639 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8640
8641 PR gdb/14441
8642 * gdbtypes.c (rank_one_type): Implement overloading
8643 resolution rules regarding rvalue references.
8644
8645 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8646
8647 PR gdb/14441
8648 * aarch64-tdep.c (aarch64_type_align)
8649 (aarch64_extract_return_value, aarch64_store_return_value): Change
8650 lvalue reference type checks to general reference type checks.
8651 * amd64-tdep.c (amd64_classify): Likewise.
8652 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8653 Likewise.
8654 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8655 (arm_store_return_value): Likewise.
8656 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8657 * c-typeprint.c (c_print_type): Likewise.
8658 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8659 (cplus_number_of_children, cplus_describe_child): Likewise.
8660 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8661 * completer.c (expression_completer): Likewise.
8662 * cp-support.c (make_symbol_overload_list_adl_namespace):
8663 Likewise.
8664 * darwin-nat-info.c (info_mach_region_command): Likewise.
8665 * dwarf2loc.c (entry_data_value_coerce_ref)
8666 (value_of_dwarf_reg_entry): Likewise.
8667 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8668 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8669 Likewise.
8670 * findvar.c (extract_typed_address, store_typed_address):
8671 Likewise.
8672 * gdbtypes.c (rank_one_type): Likewise.
8673 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8674 * infcall.c (value_arg_coerce): Likewise.
8675 * language.c (pointer_type): Likewise.
8676 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8677 Likewise.
8678 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8679 * mn10300-tdep.c (mn10300_type_align): Likewise.
8680 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8681 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8682 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8683 Likewise.
8684 * printcmd.c (print_formatted, x_command): Likewise.
8685 * python/py-type.c (typy_get_composite, typy_template_argument):
8686 Likewise.
8687 * python/py-value.c (valpy_referenced_value)
8688 (valpy_get_dynamic_type, value_has_field): Likewise.
8689 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8690 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8691 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8692 * spu-tdep.c (spu_scalar_value_p): Likewise.
8693 * symtab.c (lookup_symbol_aux): Likewise.
8694 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8695 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8696 Likewise.
8697 * valops.c (value_cast_pointers, value_cast)
8698 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8699 (value_struct_elt, value_struct_elt_bitpos)
8700 (value_find_oload_method_list, find_overload_match)
8701 (value_rtti_indirect_type): Likewise.
8702 * valprint.c (val_print_scalar_type_p, generic_val_print):
8703 Likewise.
8704 * value.c (value_actual_type, value_as_address, unpack_long)
8705 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8706 (coerce_ref): Likewise.
8707 * varobj.c (varobj_get_value_type): Likewise.
8708
8709 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8710
8711 PR gdb/14441
8712 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8713 table of constants.
8714 * python/lib/gdb/command/explore.py: Support exploring values
8715 of rvalue reference types.
8716 * python/lib/gdb/types.py: Implement get_basic_type() for
8717 rvalue reference types.
8718 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8719 constant.
8720 * python/py-value.c (valpy_getitem): Add an rvalue reference
8721 check.
8722 (valpy_reference_value): Add new parameter "refcode".
8723 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8724 New wrappers for valpy_reference_value().
8725 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8726 (gdbpy_invoke_xmethod): Likewise.
8727
8728 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8729
8730 PR gdb/14441
8731 * dwarf2read.c (process_die, read_type_die_1): Handle the
8732 DW_TAG_rvalue_reference_type DIE.
8733 (read_tag_reference_type): Add new parameter "refcode".
8734
8735 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8736
8737 PR gdb/14441
8738 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8739 (c_type_print_modifier, c_type_print_varspec_suffix)
8740 (c_type_print_base): Support printing rvalue reference types.
8741 * c-valprint.c (c_val_print, c_value_print): Support printing
8742 rvalue reference values.
8743
8744 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8745
8746 PR gdb/14441
8747 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8748 typename.
8749 * cp-support.c (replace_typedefs): Handle
8750 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8751 * python/py-type.c (typy_lookup_type): Likewise.
8752
8753 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8754
8755 PR gdb/14441
8756 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8757 * parse.c (insert_type): Change assert statement.
8758 (follow_types): Handle rvalue reference types.
8759 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8760 constant.
8761
8762 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8763
8764 PR gdb/14441
8765 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8766 value_ref() interface.
8767 * c-valprint.c (c_value_print): Likewise.
8768 * infcall.c (value_arg_coerce): Likewise.
8769 * python/py-value.c (valpy_reference_value): Likewise.
8770 * valops.c (value_cast, value_reinterpret_cast)
8771 (value_dynamic_cast, typecmp): Likewise.
8772 (value_ref): Parameterize by kind of return value reference type.
8773 * value.h (value_ref): Add new parameter "refcode".
8774
8775 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8776
8777 PR gdb/14441
8778 * dwarf2read.c (read_tag_reference_type): Use
8779 lookup_lvalue_reference_type() instead of lookup_reference_type().
8780 * eval.c (evaluate_subexp_standard): Likewise.
8781 * f-exp.y: Likewise.
8782 * gdbtypes.c (make_reference_type, lookup_reference_type):
8783 Generalize with rvalue reference types.
8784 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8785 convenience wrappers for lookup_reference_type().
8786 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8787 reference kind parameter.
8788 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8789 wrappers for lookup_reference_type().
8790 * guile/scm-type.c (gdbscm_type_reference): Use
8791 lookup_lvalue_reference_type() instead of lookup_reference_type().
8792 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8793 * parse.c (follow_types): Likewise.
8794 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8795 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8796 Likewise.
8797 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8798 (gdbpy_invoke_xmethod): Likewise.
8799 * stabsread.c: Provide extra argument to make_reference_type()
8800 call.
8801 * valops.c (value_ref, value_rtti_indirect_type): Use
8802 lookup_lvalue_reference_type() instead of lookup_reference_type().
8803
8804 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8805
8806 PR gdb/14441
8807 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8808 (TYPE_IS_REFERENCE): New macro.
8809 (struct type): Add rvalue_reference_type field.
8810 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8811
8812 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8813
8814 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8815 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8816 New function definition.
8817 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8818 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8819 New function declaration.
8820 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8821 * mi/mi-interp.h: New file.
8822 * solib.c (info_sharedlibrary_command): Replace for loop with
8823 ALL_SO_LIBS macro
8824 * solib.h (update_solib_list): New function declaration.
8825 (so_list_head): Move macro.
8826 * solist.h (ALL_SO_LIBS): New macro.
8827
8828 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8829
8830 * infcmd.c (post_create_inferior): Remove unused argument in
8831 call to solib_add.
8832 * remote.c (remote_start_remote): Likewise.
8833 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8834 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8835 (enable_break): Likewise.
8836 * solib.c (update_solib_list): Remove unused target argument
8837 and its documentation.
8838 (solib_add): Remove unused target argument. Remove unused
8839 argument in call to update_solib_list.
8840 (info_sharedlibrary_command): Remove unused argument in call
8841 to update_solib_list.
8842 (sharedlibrary_command): Remove unused argument in call to
8843 solib_add.
8844 (handle_solib_event): Likewise.
8845 (reload_shared_libraries): Likewise.
8846 * solib.h (solib_add): Remove unused target argument.
8847
8848 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8849
8850 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8851 (s390_displaced_step_fixup): Cover relative branches with the
8852 default fixup handling. This fixes lack of support for some
8853 relative branch instructions.
8854
8855 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8856
8857 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8858 ptid from regcache.
8859
8860 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8861
8862 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8863 i386_darwin_store_inferior_registers): Use ptid from regcache.
8864
8865 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8866
8867 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8868 i386bsd_store_inferior_registers): Use ptid from regcache.
8869
8870 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8871
8872 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8873 hppaobsd_store_registers): Use ptid from regcache.
8874
8875 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8876
8877 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8878 hppanbsd_store_registers): Use ptid from regcache.
8879
8880 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8881
8882 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8883 from regcache. Use get_ptrace_pid.
8884
8885 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8886
8887 * corelow.c (get_core_register_section): Use ptid from regcache,
8888 update doc.
8889
8890 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8891
8892 * bsd-uthread.c (bsd_uthread_fetch_registers,
8893 bsd_uthread_store_registers): Use ptid from regcache, set and
8894 restore inferior_ptid.
8895
8896 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8897
8898 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8899 fetch_fp_regs, store_register, store_regs, store_fp_register,
8900 store_fp_regs): Use ptid from regcache.
8901
8902 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8903
8904 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8905 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8906 store_vfp_regs): Use ptid from regcache.
8907
8908 2017-03-17 Pedro Alves <palves@redhat.com>
8909
8910 PR remote/21188
8911 * ser-base.c (ser_base_wait_for): Add comment.
8912 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8913 version.
8914 * ser-unix.c (hardwire_raw): Remove reference to
8915 scb->current_timeout.
8916 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8917 (hardwire_ops): Install ser_base_readchar instead of
8918 hardwire_readchar.
8919 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8920 Remove fields.
8921
8922 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
8923
8924 PR gdb/19637
8925 * python/lib/gdb/printer/bound_registers.py: Add support for
8926 Python 3.
8927
8928 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8929
8930 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8931 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8932 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8933 byte_offset to subobj_byte_offset. Fix the handling of
8934 DWARF_VALUE_STACK on big-endian targets when coming via an
8935 implicit pointer.
8936 (dwarf2_evaluate_loc_desc): Adjust call to
8937 dwarf2_evaluate_loc_desc_full.
8938 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8939 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8940
8941 2017-03-16 Yao Qi <yao.qi@linaro.org>
8942
8943 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8944 and REVSH instructions.
8945
8946 2017-03-16 Yao Qi <yao.qi@linaro.org>
8947
8948 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8949 (arm_record_test): Declare.
8950 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8951 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8952 align with the manual.
8953 (thumb_record_misc): Adjust the code order to align with the
8954 manual.
8955 (thumb2_record_decode_insn_handler): Fix instruction matching.
8956 (instruction_reader_thumb): New class.
8957 (arm_record_test): New function.
8958
8959 2017-03-16 Yao Qi <yao.qi@linaro.org>
8960
8961 * arm-tdep.c (abstract_memory_reader): New class.
8962 (instruction_reader): New class.
8963 (extract_arm_insn): Add argument 'reader'. Callers updated.
8964 (decode_insn): Likewise.
8965
8966 2017-03-16 Doug Evans <dje@google.com>
8967
8968 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8969 member. Change type of TYPE member to SCM. All uses updated.
8970 (lsscm_make_lazy_string_smob): Add assert.
8971 (lsscm_make_lazy_string): Flag bad length values.
8972 (lsscm_elt_type): New function.
8973 (gdbscm_lazy_string_to_value): Rewrite to use
8974 lsscm_safe_lazy_string_to_value.
8975 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8976 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8977 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8978 in incoming type.
8979 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8980 * guile/scm-type.c (tyscm_scm_to_type): New function.
8981
8982 2017-03-15 Doug Evans <dje@google.com>
8983
8984 PR python/17728, python/18439, python/18779
8985 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8986 member. Change type of TYPE member to PyObject *. All uses updated.
8987 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8988 (gdbpy_create_lazy_string_object): Flag bad length values.
8989 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8990 Handle typedefs in incoming type.
8991 (stpy_lazy_string_elt_type): New function.
8992 (gdbpy_extract_lazy_string): Call it.
8993 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8994 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8995 typedefs in incoming type.
8996
8997 2017-03-16 Doug Evans <dje@google.com>
8998
8999 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9000 * guile/scm-type.c (tyscm_scm_to_type): New function.
9001
9002 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9003
9004 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9005 "ULONGEST" for "skip".
9006
9007 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9008
9009 PR gdb/21220
9010 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9011 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9012 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9013 over ptrace peek/poke until end of buffer or error.
9014
9015 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9016
9017 * parse.c (length_of_subexp): Make static.
9018 * parser-defs.h (length_of_subexp): Remove.
9019
9020 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9021
9022 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9023 as well.
9024
9025 2017-03-14 Pedro Alves <palves@redhat.com>
9026
9027 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9028 (main): Use std::unique_ptr. Remove calls to
9029 cp_demangled_name_parse_free.
9030
9031 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9032
9033 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9034 alphabsd_store_inferior_registers): Use regcache->ptid instead
9035 of inferior_ptid.
9036
9037 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9038
9039 * aix-thread.c (aix_thread_fetch_registers,
9040 aix_thread_store_registers): Use regcache->ptid instead of
9041 inferior_ptid.
9042
9043 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9044
9045 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9046 store_gregs_to_thread, fetch_fpregs_from_thread,
9047 store_fpregs_to_thread): Use regcache->ptid instead of
9048 inferior_ptid.
9049
9050 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9051
9052 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9053 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9054 instead of inferior_ptid.
9055
9056 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9057
9058 * target.c (target_fetch_registers, target_store_registers): Add
9059 assert.
9060
9061 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9062
9063 * regcache.h (regcache_get_ptid): New function.
9064 * regcache.c (regcache_get_ptid): New function.
9065
9066 2017-03-13 Mark Wielaard <mark@klomp.org>
9067
9068 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9069
9070 2017-03-10 Keith Seitz <keiths@redhat.com>
9071
9072 PR c++/8218
9073 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9074
9075 2017-03-08 Pedro Alves <palves@redhat.com>
9076
9077 PR gdb/18360
9078 * infrun.c (start_step_over, do_target_resume, resume)
9079 (restart_threads): Assert we're not resuming a thread that is
9080 meant to be stopped.
9081 (infrun_thread_stop_requested_callback): Delete.
9082 (infrun_thread_stop_requested): If the thread is internally
9083 stopped, queue a pending stop event and clear the thread's
9084 inline-frame state.
9085 (handle_stop_requested): New function.
9086 (handle_syscall_event, handle_inferior_event_1): Use
9087 handle_stop_requested.
9088 (handle_stop_requested): New function.
9089 (handle_signal_stop): Set the thread's stop_signal here instead of
9090 at caller.
9091 (finish_step_over): Clear step over info unconditionally.
9092 (handle_signal_stop): If the user had interrupted the event
9093 thread, consider the stop a random signal.
9094 (handle_signal_stop) <signal arrived while stepping over
9095 breakpoint>: Don't restart threads here.
9096 (stop_waiting): Don't clear step-over info here.
9097
9098 2017-03-08 Pedro Alves <palves@redhat.com>
9099
9100 PR 21206
9101 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9102 goes to argument 2, not 1.
9103
9104 2017-03-08 Pedro Alves <palves@redhat.com>
9105
9106 PR cli/21218
9107 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9108 display_gdb_prompt.
9109 (command_line_input): Add comment.
9110
9111 2017-03-08 Pedro Alves <palves@redhat.com>
9112
9113 PR tui/21216
9114 * tui/tui-file.c (tui_file::write): New.
9115 * tui/tui-file.h (tui_file): Override "write".
9116 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9117 factored out from ...
9118 (tui_puts): ... here.
9119 (tui_putc): Use them.
9120 (tui_write): New function.
9121 * tui/tui-io.h (tui_write): Declare.
9122
9123 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9124
9125 * Makefile.in (SFILES): Replace "environ.c" with
9126 "common/environ.c".
9127 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9128 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9129 to...
9130 * common/environ.c: ... here.
9131 * environ.h: Moved to...
9132 * common/environ.h: ... here.
9133
9134 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9135
9136 * gdbarch.sh (pstring_ptr): New static function.
9137 (gdbarch_disassembler_options): Use it.
9138 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9139 not valid_disassembler_option->name.
9140 * gdbarch.c: Regenerate.
9141
9142 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9143
9144 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9145
9146 2017-03-07 Pedro Alves <palves@redhat.com>
9147
9148 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9149
9150 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9151
9152 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9153 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9154 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9155 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9156
9157 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9158
9159 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9160
9161 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9162
9163 * remote.c (remote_add_target_side_commands): Use range-based
9164 for loop.
9165
9166 2017-03-03 Yao Qi <yao.qi@linaro.org>
9167
9168 PR gdb/21165
9169 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9170 value is lazy.
9171 * valprint.c (common_val_print): Likewise.
9172
9173 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9174
9175 * NEWS: Mention new set/show disassembler-options commands.
9176 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9177 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9178 (prospective_options): New static variable.
9179 (gdb_disassembler::gdb_disassembler): Initialize
9180 m_di.disassembler_options.
9181 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9182 (get_disassembler_options): New function.
9183 (set_disassembler_options): Likewise.
9184 (set_disassembler_options_sfunc): Likewise.
9185 (show_disassembler_options_sfunc): Likewise.
9186 (disassembler_options_completer): Likewise.
9187 (_initialize_disasm): Likewise.
9188 * disasm.h (get_disassembler_options): New prototype.
9189 (set_disassembler_options): Likewise.
9190 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9191 (gdbarch_verify_disassembler_options): Likewise.
9192 * gdbarch.c: Regenerate.
9193 * gdbarch.h: Likewise.
9194 * arm-tdep.c (num_disassembly_options): Delete.
9195 (set_disassembly_style): Likewise.
9196 (arm_disassembler_options): New static variable.
9197 (set_disassembly_style_sfunc): Convert short style name into long
9198 option name. Call set_disassembler_options.
9199 (show_disassembly_style_sfunc): New function.
9200 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9201 set_gdbarch_verify_disassembler_options.
9202 (_initialize_arm_tdep): Delete regnames variable and update callers.
9203 (arm_disassembler_options): Initialize.
9204 (disasm_options): New variable.
9205 (num_disassembly_options): Rename from this...
9206 (num_disassembly_styles): ...to this. Compute by scanning through
9207 disasm_options.
9208 (valid_disassembly_styles): Initialize using disasm_options.
9209 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9210 set_arm_regname_option.
9211 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9212 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9213 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9214 set_gdbarch_verify_disassembler_options.
9215 * s390-tdep.c (s390_disassembler_options): New static variable.
9216 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9217 set_gdbarch_verify_disassembler_options.
9218
9219 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9220
9221 * remote.c (remote_add_target_side_condition): Remove "struct"
9222 keyword from range-based for loop.
9223
9224 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9225
9226 * remote.c (remote_add_target_side_condition): Use range-based
9227 for loop. Update comment.
9228
9229 2017-02-27 Yao Qi <yao.qi@linaro.org>
9230
9231 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9232
9233 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9234
9235 * regcache.c (regcache_raw_update): New function.
9236 (regcache_raw_read): Move code to regcache_raw_update.
9237 * regcache.h (regcache_raw_update): New declaration.
9238 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9239
9240 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9241
9242 * dwarf2read.c (create_debug_type_hash_table): Initialize
9243 header.signature and header.type_offset_in_tu.
9244
9245 2017-02-24 Pedro Alves <palves@redhat.com>
9246
9247 * symtab.c (make_file_symbol_completion_list_1): Use
9248 add_symtab_completions.
9249
9250 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9251
9252 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9253
9254 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9255
9256 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9257 I386_MAX_REGISTER_SIZE.
9258 (i386_pseudo_register_write): Likewise.
9259 (i386_process_record): Likewise.
9260 * i387-tdep.c (i387_supply_xsave): Likewise.
9261 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9262 (store_register): Likewise.
9263
9264 2017-02-23 Pedro Alves <palves@redhat.com>
9265
9266 * ada-lang.c: Include "common/function-view.h".
9267 (ada_iterate_over_symbols): Adjust to use function_view as
9268 callback type.
9269 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9270 (ada_make_symbol_completion_list): Use a lambda.
9271 (ada_exc_search_name_matches): Delete.
9272 (name_matches_regex): New.
9273 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9274 * compile/compile-c-support.c: Include "common/function-view.h".
9275 (print_one_macro): Change prototype to accept a ui_file pointer.
9276 (write_macro_definitions): Use a lambda.
9277 * dwarf2read.c: Include "common/function-view.h".
9278 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9279 (dw2_expand_symtabs_matching): Adjust to use function_view as
9280 callback type.
9281 * language.h: Include "common/function-view.h".
9282 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9283 function_view as callback type.
9284 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9285 * linespec.c: Include "common/function-view.h".
9286 (collect_info::add_symbol): New method.
9287 (struct symbol_and_data_callback, iterate_inline_only, struct
9288 symbol_matcher_data, iterate_name_matcher): Delete.
9289 (iterate_over_all_matching_symtabs): Adjust to use function_view
9290 as callback type and lambdas.
9291 (iterate_over_file_blocks): Adjust to use function_view as
9292 callback type.
9293 (decode_compound_collector): Now a class with private fields.
9294 (decode_compound_collector::release_symbols): New method.
9295 (collect_one_symbol): Rename to...
9296 (decode_compound_collector::operator()): ... this and adjust.
9297 (lookup_prefix_sym): decode_compound_collector construction bits
9298 move to decode_compound_collector ctor. Pass the
9299 decode_compound_collector object directly as callback. Remove
9300 cleanups and use decode_compound_collector::release_symbols
9301 instead.
9302 (symtab_collector): Now a class with private fields.
9303 (symtab_collector::release_symtabs): New method.
9304 (add_symtabs_to_list): Rename to...
9305 (symtab_collector::operator()): ... this and adjust.
9306 (collect_symtabs_from_filename): symtab_collector construction
9307 bits move to symtab_collector ctor. Pass the symtab_collector
9308 object directly as callback. Remove cleanups and use
9309 symtab_collector::release_symtabs instead.
9310 (collect_symbols): Delete.
9311 (add_matching_symbols_to_info): Use lambdas.
9312 * macrocmd.c (print_macro_callback): Delete.
9313 (info_macro_command): Use a lambda.
9314 (info_macros_command): Pass print_macro_definition as callable
9315 directly.
9316 (print_one_macro): Remove 'ignore' parameter.
9317 (macro_list_command): Adjust.
9318 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9319 (macro_for_each_data::user_data): Delete field.
9320 (foreach_macro): Adjust to call the function_view.
9321 (macro_for_each): Adjust to use function_view as callback type.
9322 (foreach_macro_in_scope): Adjust to call the function_view.
9323 (macro_for_each_in_scope): Adjust to use function_view as callback
9324 type.
9325 * macrotab.h: Include "common/function-view.h".
9326 (macro_callback_fn): Declare a prototype instead of a pointer.
9327 Remove "user_data" parameter.
9328 (macro_for_each, macro_for_each_in_scope): Adjust to use
9329 function_view as callback type.
9330 * psymtab.c (partial_map_expand_apply)
9331 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9332 Adjust to use function_view as callback type and to return bool.
9333 (psym_expand_symtabs_matching): Adjust to use function_view as
9334 callback types.
9335 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9336 to use function_view as callback type and to return bool.
9337 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9338 callback types.
9339 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9340 as callback types.
9341 * symfile.h: Include "common/function-view.h".
9342 (expand_symtabs_file_matcher_ftype)
9343 (expand_symtabs_symbol_matcher_ftype)
9344 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9345 return bool.
9346 (quick_symbol_functions::map_symtabs_matching_filename)
9347 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9348 function_view as callback type and return bool.
9349 (expand_symtabs_matching): Adjust to use function_view as callback
9350 type.
9351 (maintenance_expand_name_matcher)
9352 (maintenance_expand_file_matcher): Delete.
9353 (maintenance_expand_symtabs): Use lambdas.
9354 * symtab.c (iterate_over_some_symtabs): Adjust to use
9355 function_view as callback types and return bool.
9356 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9357 of a cleanup.
9358 (lookup_symtab_callback): Delete.
9359 (lookup_symtab): Use a lambda.
9360 (iterate_over_symbols): Adjust to use function_view as callback
9361 type.
9362 (struct search_symbols_data, search_symbols_file_matches)
9363 (search_symbols_name_matches): Delete.
9364 (search_symbols): Use a pair of lambdas.
9365 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9366 (symtab_expansion_callback): Delete.
9367 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9368 * symtab.h: Include "common/function-view.h".
9369 (iterate_over_some_symtabs): Adjust to use function_view as
9370 callback type and return bool.
9371 (iterate_over_symtabs): Adjust to use function_view as callback
9372 type.
9373 (symbol_found_callback_ftype): Remove 'data' parameter and return
9374 bool.
9375 (iterate_over_symbols): Adjust to use function_view as callback
9376 type.
9377
9378 2017-02-23 Pedro Alves <palves@redhat.com>
9379
9380 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9381 (%.o) <unittests/%.c>: New pattern.
9382 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9383 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9384 * common/function-view.h: New file.
9385 * unittests/function-view-selftests.c: New file.
9386 * configure: Regenerate.
9387
9388 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9389
9390 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9391 inferior_ptid.
9392 * go32-nat.c (go32_thread_alive): Likewise.
9393
9394 2017-02-23 Yao Qi <yao.qi@linaro.org>
9395
9396 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9397 delete.
9398
9399 2017-02-23 Yao Qi <yao.qi@linaro.org>
9400
9401 * varobj.c (varobj_clear_saved_item): Use delete instead of
9402 xfree.
9403 (update_dynamic_varobj_children): Likewise.
9404
9405 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9406
9407 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9408
9409 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9410
9411 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9412 m_enum_value to 0 in default constructor.
9413
9414 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9415
9416 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9417 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9418 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9419 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9420 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9421 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9422 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9423 IS_STORE_CONDITIONAL_INSN.
9424
9425 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9426
9427 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9428
9429 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9430
9431 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9432
9433 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9434
9435 * dwarf2read.c (skip_one_die, read_attribute_value)
9436 (dwarf2_const_value_attr, dump_die_shallow)
9437 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9438 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9439
9440 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9441
9442 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9443 (dwarf_parse_macro_header): Accept DWARF version 5.
9444 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9445
9446 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9447
9448 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9449 DW_AT_GNU_*.
9450 * common/common-exceptions.h (enum errors): Likewise.
9451 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9452 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9453 (dwarf_expr_context::execute_stack_op): Likewise.
9454 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9455 Likewise.
9456 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9457 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9458 (show_entry_values_debug, call_site_to_target_addr)
9459 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9460 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9461 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9462 (value_of_dwarf_block_entry, indirect_pieced_value)
9463 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9464 (disassemble_dwarf_expression): Likewise.
9465 * dwarf2read.c (process_die, inherit_abstract_dies)
9466 (read_call_site_scope): Likewise.
9467 * gdbtypes.h (struct func_type, struct call_site_parameter)
9468 (struct call_site): Likewise.
9469 * stack.c (read_frame_arg): Likewise.
9470 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9471
9472 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9473
9474 * defs.h (read_unsigned_leb128): New declaration.
9475 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9476 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9477 (dwarf2_find_location_expression): Call also
9478 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9479 * dwarf2loc.h (dwarf2_version): New declaration.
9480 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9481 rnglists.
9482 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9483 .debug_rnglists.
9484 (struct dwop_section_names): Add loclists_dwo.
9485 (dwop_section_names): Add .debug_loclists.dwo.
9486 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9487 (struct dwarf2_per_cu_data): Add dwarf_version.
9488 (struct dwo_sections): Add loclists.
9489 (struct attr_abbrev): Add implicit_const.
9490 (read_indirect_line_string): New declaration.
9491 (read_unsigned_leb128): Delete declaration.
9492 (rcuh_kind): New definition.
9493 (read_and_check_comp_unit_head): Change parameter
9494 is_debug_types_section to section_kind.
9495 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9496 (read_comp_unit_head): Change parameter abfd to section, add parameter
9497 section_kind. Handle DWARF-5.
9498 (error_check_comp_unit_head): Accept also DWARF version 5.
9499 (read_and_check_comp_unit_head): Change parameter
9500 is_debug_types_section to section_kind.
9501 (read_and_check_type_unit_head): Delete function.
9502 (read_abbrev_offset): Handle DWARF-5.
9503 (create_debug_type_hash_table): Add parameter section_kind. Process
9504 only DW_UT_type. Use signature and type_offset_in_tu from struct
9505 comp_unit_head.
9506 (create_debug_types_hash_table): Update create_debug_type_hash_table
9507 caller.
9508 (create_all_type_units): Call create_debug_type_hash_table.
9509 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9510 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9511 caller.
9512 (skip_one_die): Handle DW_FORM_implicit_const.
9513 (dwarf2_rnglists_process): New function.
9514 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9515 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9516 (read_attribute_value): Handle DW_FORM_implicit_const,
9517 DW_FORM_line_strp.
9518 (read_attribute): Handle DW_FORM_implicit_const.
9519 (read_indirect_string_at_offset_from): New function from
9520 read_indirect_string_at_offset.
9521 (read_indirect_string_at_offset): Call
9522 read_indirect_string_at_offset_from.
9523 (read_indirect_line_string_at_offset): New function.
9524 (read_indirect_string): New function comment.
9525 (read_indirect_line_string): New function.
9526 (read_unsigned_leb128): Make it global.
9527 (dwarf2_string_attr): Handle DWARF-5.
9528 (add_include_dir_stub, read_formatted_entries): New functions.
9529 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9530 Handle DWARF-5.
9531 (per_cu_header_read_in): Update read_comp_unit_head caller.
9532 (dwarf2_version): New function.
9533 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9534 rnglists.
9535 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9536 fields.
9537
9538 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9539
9540 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9541
9542 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9543
9544 * dwarf2read.c (dwarf2_ranges_process): New function from
9545 dwarf2_ranges_read.
9546 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9547 dwarf2_ranges_process.
9548
9549 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9550
9551 * dwarf2read.c (create_debug_type_hash_table): New function from
9552 create_debug_types_hash_table.
9553 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9554 (create_all_type_units, open_and_init_dwo_file): Update
9555 create_debug_types_hash_table callers.
9556
9557 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9558
9559 PR gdb/16188
9560 * fork-child.c (trace_start_error): Fix thinko. va_end should
9561 refer to 'ap', not 'args'.
9562
9563 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9564 Pedro Alves <palves@redhat.com>
9565
9566 PR gdb/16188
9567 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9568 calls succeeded.
9569 * fork-child.c (trace_start_error): New function.
9570 (trace_start_error_with_name): Likewise.
9571 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9572 * inf-ptrace.c (inf_ptrace_me): Likewise.
9573 * inferior.h (trace_start_error): New prototype.
9574 (trace_start_error_with_name): Likewise.
9575
9576 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9577
9578 PR gdb/21164
9579 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9580 NULL before using it.
9581 * symmisc.c (maintenance_print_symbols): Likewise.
9582 (maintenance_print_msymbols): Likewise.
9583
9584 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9585
9586 * NEWS: Add record Python bindings entry.
9587
9588 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9589
9590 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9591 py-record-full.o.
9592 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9593 * python/py-record-btrace.c, python/py-record-btrace.h,
9594 python/py-record-full.c, python/py-record-full.h: New file.
9595 * python/py-record.c: Add include for py-record-btrace.h and
9596 py-record-full.h.
9597 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9598 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9599 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9600 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9601 New definition.
9602 (gdbpy_initialize_btrace): New export.
9603 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9604
9605 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9606
9607 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9608 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9609 * python/py-record.c: New file.
9610 * python/python-internal.h (gdbpy_start_recording,
9611 gdbpy_current_recording, gdpy_stop_recording,
9612 gdbpy_initialize_record): New export.
9613 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9614 (python_GdbMethods): Add gdbpy_start_recording,
9615 gdbpy_current_recording and gdbpy_stop_recording.
9616
9617 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9618
9619 * record-btrace.c (record_btrace_record_method): New function.
9620 (init_record_btrace_ops): Initialize to_record_method.
9621 * record-full.c (record_full_record_method): New function.
9622 (init_record_full_ops, init_record_full_core_ops): Add
9623 record_full_record_method.
9624 * record.h (enum record_method): New enum.
9625 * target-debug.h (target_debug_print_enum_record_method: New define.
9626 * target-delegates.c: Regenerate.
9627 * target.c (target_record_method): New function.
9628 * target.h: Include record.h.
9629 (struct target_ops) <to_record_method>: New field.
9630 (target_record_method): New export.
9631
9632 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9633
9634 * record.h (record_start, record_stop): New export.
9635 * record.c (record_start, record_stop): New function.
9636
9637 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9638
9639 * btrace.c (btrace_fetch): Copy function call segments pointer
9640 into a vector.
9641 (btrace_clear): Clear the vector.
9642 (btrace_find_insn_by_number): Use binary search to find the correct
9643 function call segment.
9644 * btrace.h (brace_fun_p): New typedef.
9645 (struct btrace_thread_info) <functions>: New field.
9646
9647 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9648
9649 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9650 * btrace.c (btrace_decode_error): ... here. New function.
9651 * btrace.h (btrace_decode_error): New export.
9652
9653 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9654
9655 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9656 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9657 btrace_find_insn_by_number): Remove special case for gaps.
9658 * btrace.h (btrace_insn_get_error): New export.
9659 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9660 * record-btrace.c (btrace_insn_history): Print number for gaps.
9661 (record_btrace_info, record_btrace_goto): Handle gaps.
9662
9663 2017-02-14 Tom Tromey <tom@tromey.com>
9664
9665 PR python/13598:
9666 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9667 event.
9668 * python/py-evts.c (gdbpy_initialize_py_events): Add
9669 before_prompt registry.
9670 * python/py-events.h (events_object) <before_prompt>: New field.
9671
9672 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9673
9674 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9675
9676 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9677
9678 * symfile (_initialize_symfile): Add usage text to the load command's
9679 help text.
9680
9681 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9682
9683 * utils.c (defaulted_query): Don't query on secondary UIs.
9684
9685 2017-02-10 Tom Tromey <tom@tromey.com>
9686
9687 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9688
9689 2017-02-10 Tom Tromey <tom@tromey.com>
9690
9691 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9692 "cleanup" local.
9693 * python/py-type.c (typy_legacy_template_argument): Remove
9694 unnecessary "cleanup" local.
9695
9696 2017-02-10 Tom Tromey <tom@tromey.com>
9697
9698 * python/python.c (do_start_initialization): New function, from
9699 _initialize_python.
9700 (_initialize_python): Call do_start_initialization.
9701 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9702 goto.
9703
9704 2017-02-10 Tom Tromey <tom@tromey.com>
9705
9706 * python/py-prettyprint.c (pretty_print_one_value): Use
9707 gdbpy_ref.
9708
9709 2017-02-10 Tom Tromey <tom@tromey.com>
9710
9711 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9712 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9713 gdbpy_ref.
9714 * python/py-type.c (field_new): Use gdbpy_ref.
9715 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9716 gdbpy_ref.
9717 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9718 (py_free_pspace): Likewise.
9719 (pspace_to_pspace_object): Likewise.
9720 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9721 (py_free_objfile): Likewise.
9722 (objfile_to_objfile_object): Likewise.
9723 * python/py-inferior.c (delete_thread_object): Use
9724 gdbpy_ref.
9725 (infpy_read_memory): Likewise.
9726 (py_free_inferior): Likewise.
9727 * python/py-evtregistry.c (create_eventregistry_object): Use
9728 gdbpy_ref.
9729 * python/py-event.c (create_event_object): Use gdbpy_ref.
9730
9731 2017-02-10 Tom Tromey <tom@tromey.com>
9732
9733 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9734 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9735 used.
9736 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9737 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9738 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9739 python/py-framefilter.c, python/py-function.c,
9740 python/py-inferior.c, python/py-infevents.c,
9741 python/py-linetable.c, python/py-newobjfileevent.c,
9742 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9743 python/py-signalevent.c, python/py-stopevent.c,
9744 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9745 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9746 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9747 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9748
9749 2017-02-10 Tom Tromey <tom@tromey.com>
9750
9751 * ui-out.h (ui_out_emit_type): New class.
9752 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9753 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9754 and ui_out_emit_tuple.
9755 (enumerate_locals): Likewise.
9756 (py_mi_print_variables, py_print_locals, py_print_args): Use
9757 ui_out_emit_list.
9758 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9759 ui_out_emit_list.
9760 * common/gdb_optional.h: New file.
9761
9762 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9763
9764 * MAINTAINERS (Write After Approval): Update my e-mail address.
9765
9766 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9767
9768 PR gdb/21122
9769 * breakpoint.c (_initialize_breakpoint): Update the help description
9770 of the 'commands' command to indicate that it takes a list argument.
9771
9772 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9773
9774 * interps.c (current_interp_set_logging): Remove "return".
9775
9776 2017-02-09 Gary Benson <gbenson@redhat.com>
9777
9778 * symtab.c (add_symtab_completions): Prevent NULL pointer
9779 dereference.
9780
9781 2017-02-08 Pedro Alves <palves@redhat.com>
9782
9783 * interps.c (interp::interp): Remove reference to quiet_p.
9784 (interp_set): Make static. Remove dead "Switching to" output
9785 code.
9786 (interp_quiet_p, interp_set_quiet): Delete.
9787 (interpreter_exec_cmd): Don't set the interpreter quiet.
9788 * interps.h (interp_quiet_p): Make static.
9789 (class interp) <quiet_p>: Remove field
9790
9791 2017-02-08 Jerome Guitton <guitton@adacore.com>
9792
9793 * cli/cli-decode.c (find_command_name_length): Make it extern.
9794 * cli/cli-decode.h (find_command_name_length): Declare.
9795 * cli/cli-script.c (command_name_equals, line_first_arg):
9796 New functions.
9797 (process_next_line): Use cli-decode to parse command names.
9798 (build_command_line): Make args a constant pointer.
9799
9800 2017-02-08 Jerome Guitton <guitton@adacore.com>
9801
9802 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9803 Remove case-insensitive search.
9804
9805 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9806
9807 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9808 at the end of the line. Avoids an ARI warning.
9809
9810 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
9811
9812 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9813 rdseed instructions.
9814 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9815
9816 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9817
9818 PR tdep/20936
9819 Provide and use sparc32 and sparc64 target description XML files.
9820 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9821 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9822 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9823 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9824 * features/sparc/sparc32-solaris.xml: New file.
9825 * features/sparc/sparc64-solaris.xml: New file.
9826 * features/sparc/sparc32-solaris.c: Generated.
9827 * features/sparc/sparc64-solaris.c: Generated.
9828 * sparc-tdep.h: Account for differences in target descriptions.
9829 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9830 (sparc32_register_type): Use target provided registers.
9831 (validate_tdesc_registers): New function.
9832 (sparc32_gdbarch_init): Use tdesc_has_registers.
9833 Set pseudoregister functions.
9834 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9835 (sparc64_register_type): Use target provided registers.
9836 (sparc64_init_abi): Set pseudoregister functions.
9837
9838 2017-02-03 Tom Tromey <tom@tromey.com>
9839
9840 PR rust/21097:
9841 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9842 with a single member.
9843
9844 2017-02-03 Pedro Alves <palves@redhat.com>
9845
9846 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9847 (cli_interp_base::~cli_interp_base): New.
9848 (cli_interp): New struct.
9849 (as_cli_interp): Cast the interp itself to cli_interp.
9850 (cli_interpreter_pre_command_loop): Rename to ...
9851 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9852 parameter.
9853 (cli_interpreter_init): Rename to ...
9854 (cli_interp::init): ... this. Remove 'self' parameter. Use
9855 boolean. Make extern.
9856 (cli_interpreter_resume): Rename to ...
9857 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9858 extern.
9859 (cli_interpreter_suspend): Rename to ...
9860 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9861 extern.
9862 (cli_interpreter_exec): Rename to ...
9863 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9864 extern.
9865 (cli_interpreter_supports_command_editing): Rename to ...
9866 (cli_interp_base::supports_command_editing): ... this. Remove
9867 'interp' parameter. Make extern.
9868 (cli_ui_out): Rename to ...
9869 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9870 Make extern.
9871 (cli_set_logging): Rename to ...
9872 (cli_interp_base::set_logging): ... this. Remove 'interp'
9873 parameter. Make extern.
9874 (cli_interp_procs): Delete.
9875 (cli_interp_factory): Adjust to use "new".
9876 * cli/cli-interp.h: Include "interps.h".
9877 (struct cli_interp_base): New struct.
9878 * interps.c (struct interp): Delete. Fields moved to interps.h.
9879 (interp_new): Delete.
9880 (interp::interp, interp::~interp): New.
9881 (interp_set): Use bool, and return void. Assume the interpreter
9882 has suspend, init and resume methods, and that the all return
9883 void.
9884 (set_top_level_interpreter): interp_set returns void.
9885 (interp_ui_out): Adapt.
9886 (current_interp_set_logging): Adapt.
9887 (interp_data): Delete.
9888 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9889 (interp_exec): Adapt.
9890 (top_level_interpreter_data): Delete.
9891 * interps.h (interp_init_ftype, interp_resume_ftype)
9892 (interp_suspend_ftype, interp_exec_ftype)
9893 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9894 (class interp): New.
9895 (interp_new): Delete.
9896 (interp_set): Now returns void. Use bool.
9897 (interp_data, top_level_interpreter_data): Delete.
9898 * mi/mi-common.h: Include interps.h.
9899 (class mi_interp): Inherit from interp. Define a ctor. Declare
9900 init, resume, suspect, exec, interp_ui_out, set_logging and
9901 pre_command_loop methods.
9902 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9903 (mi_interpreter_init): Rename to ...
9904 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9905 bool, return void and make extern. Adjust.
9906 (mi_interpreter_resume): ... Rename to ...
9907 (mi_interp::resume): ... this. Remove the 'data' parameter,
9908 return void and make extern. Adjust.
9909 (mi_interpreter_suspend): ... Rename to ...
9910 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9911 return void and make extern. Adjust.
9912 (mi_interpreter_exec): ... Rename to ...
9913 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9914 extern. Adjust.
9915 (mi_interpreter_pre_command_loop): ... Rename to ...
9916 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9917 parameter and make extern.
9918 (mi_on_normal_stop_1): Adjust.
9919 (mi_ui_out): Rename to ...
9920 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9921 parameter and make extern. Adjust.
9922 (mi_set_logging): Rename to ...
9923 (mi_interp::set_logging): ... this. Remove the 'interp'
9924 parameter and make extern. Adjust.
9925 (mi_interp_procs): Delete.
9926 (mi_interp_factory): Adjust to use 'new'.
9927 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9928 (mi_print_exception, mi_execute_command, mi_load_progress):
9929 Adjust.
9930 * tui/tui-interp.c (tui_interp): New class.
9931 (as_tui_interp): Return a tui_interp pointer.
9932 (tui_on_normal_stop, tui_on_signal_received)
9933 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9934 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9935 to use interp::interp_ui_out.
9936 (tui_init): Rename to ...
9937 (tui_interp::init): ... this. Remove the 'self' parameter, use
9938 bool, return void and make extern. Adjust.
9939 (tui_resume): Rename to ...
9940 (tui_interp::resume): ... this. Remove the 'data' parameter,
9941 return void and make extern. Adjust.
9942 (tui_suspend): Rename to ...
9943 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9944 return void and make extern. Adjust.
9945 (tui_ui_out): Rename to ...
9946 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9947 parameter, and make extern. Adjust.
9948 (tui_exec): Rename to ...
9949 (tui_interp::exec): ... this. Remove the 'data' parameter and
9950 make extern.
9951 (tui_interp_procs): Delete.
9952 (tui_interp_factory): Use "new".
9953
9954 2017-02-02 Tom Tromey <tom@tromey.com>
9955
9956 * rust-exp.y (ends_raw_string, space_then_number)
9957 (rust_identifier_start_p): Return bool.
9958 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9959 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9960 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9961 (rust_chartype_p): Return bool.
9962 (val_print_struct, rust_print_struct_def, rust_print_type):
9963 Update.
9964 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9965 Return bool.
9966
9967 2017-02-02 Tom Tromey <tom@tromey.com>
9968
9969 * rust-lang.c: Reindent.
9970
9971 2017-02-02 Tom Tromey <tom@tromey.com>
9972
9973 * rust-lang.h (rust_crate_for_block): Update.
9974 * rust-lang.c (rust_crate_for_block): Return std::string.
9975 (rust_get_disr_info): Use std:;string, not
9976 gdb::unique_xmalloc_ptr.
9977 * rust-exp.y (crate_name): Update.
9978
9979 2017-02-02 Pedro Alves <palves@redhat.com>
9980
9981 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9982 field out of gdb_disassembler_test and make it static.
9983
9984 2017-02-02 Pedro Alves <palves@redhat.com>
9985
9986 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9987 mi1_interp and mi_interp fields.
9988
9989 2017-02-02 Pedro Alves <palves@redhat.com>
9990
9991 * cli/cli-interp.c (struct saved_output_files, saved_output):
9992 Moved from cli/cli-logging.c.
9993 (cli_set_logging): New function.
9994 (cli_interp_procs): Install cli_set_logging.
9995 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9996 Declare.
9997 * cli/cli-logging.c (struct saved_output_files, saved_output):
9998 Moved to cli/cli-interp.c.
9999 (pop_output_files): Don't save outputs here.
10000 (make_logging_output): New function.
10001 (handle_redirections): Don't build tee nor save previous outputs
10002 here.
10003 * interps.c (current_interp_set_logging): Change prototype.
10004 Assume there's always a set_logging_proc method installed.
10005 * interps.h (interp_set_logging_ftype): Change prototype.
10006 (current_interp_set_logging): Change prototype and adjust comment.
10007 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10008 use make_logging_output.
10009 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10010 2017-02-02 Pedro Alves <palves@redhat.com>
10011
10012 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10013 from ...
10014 (set_logging_overwrite): ... here.
10015 (logging_no_redirect_file): Delete.
10016 (set_logging_redirect): Don't handle redirection on the fly.
10017 Instead warn that "logging off" / "logging on" is necessary.
10018 (pop_output_files): Delete references to logging_no_redirect_file.
10019 (show_logging_command): Always speak in terms of what will happen
10020 once logging is reenabled.
10021
10022 2017-02-02 Pedro Alves <palves@redhat.com>
10023
10024 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10025
10026 2017-02-02 Pedro Alves <palves@redhat.com>
10027
10028 * disasm.c (gdb_pretty_print_insn): Rename to ...
10029 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10030 Remove gdbarch parameter. Adapt to clear the object's buffers
10031 instead of allocating new buffers, and to print using the object's
10032 gdb_disassembler instead of calling gdb_print_insn.
10033 (dump_insns): Use gdb_pretty_print_disassembler.
10034 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10035 (gdb_pretty_print_disassembler): New class.
10036 * record-btrace.c (btrace_insn_history): Use
10037 gdb_pretty_print_disassembler.
10038
10039 2017-02-02 Pedro Alves <palves@redhat.com>
10040
10041 * ada-lang.c (type_as_string): Use string_file.
10042 * ada-valprint.c (ada_print_floating): Use string_file.
10043 * ada-varobj.c (ada_varobj_scalar_image)
10044 (ada_varobj_get_value_image): Use string_file.
10045 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10046 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10047 * breakpoint.c (update_inserted_breakpoint_locations)
10048 (insert_breakpoint_locations, reattach_breakpoints)
10049 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10050 (print_it_watchpoint): Use string_file.
10051 (save_breakpoints): Use stdio_file.
10052 * c-exp.y (oper): Use string_file.
10053 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10054 tee_file.
10055 (pop_output_files): Use delete.
10056 (handle_redirections): Use stdio_file and tee_file.
10057 * cli/cli-setshow.c (do_show_command): Use string_file.
10058 * compile/compile-c-support.c (c_compute_program): Use
10059 string_file.
10060 * compile/compile-c-symbols.c (generate_vla_size): Take a
10061 'string_file &' instead of a 'ui_file *'.
10062 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10063 of a 'ui_file *'. Use string_file.
10064 (generate_c_for_variable_locations): Take a 'string_file &'
10065 instead of a 'ui_file *'.
10066 * compile/compile-internal.h (generate_c_for_for_one_variable):
10067 Take a 'string_file &' instead of a 'ui_file *'.
10068 * compile/compile-loc2c.c (push, pushf, unary, binary)
10069 (print_label, pushf_register_address, pushf_register)
10070 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10071 'ui_file *'. Adjust.
10072 * compile/compile.c (compile_to_object): Use string_file.
10073 * compile/compile.h (compile_dwarf_expr_to_c)
10074 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10075 'ui_file *'.
10076 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10077 (replace_typedefs_qualified_name): Use string_file and
10078 obstack_copy0.
10079 * disasm.c (gdb_pretty_print_insn): Use string_file.
10080 (gdb_disassembly): Adjust reference the null_stream global.
10081 (do_ui_file_delete): Delete.
10082 (gdb_insn_length): Use null_stream.
10083 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10084 * dwarf2loc.c (dwarf2_compile_property_to_c)
10085 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10086 'string_file &' instead of a 'ui_file *'.
10087 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10088 * dwarf2read.c (do_ui_file_peek_last): Delete.
10089 (dwarf2_compute_name): Use string_file.
10090 * event-top.c (gdb_setup_readline): Use stdio_file.
10091 * gdbarch.sh (verify_gdbarch): Use string_file.
10092 * gdbtypes.c (safe_parse_type): Use null_stream.
10093 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10094 string_file.
10095 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10096 'string_file *' instead of a 'ui_file *'.
10097 (gdbscm_arch_disassemble): Use string_file.
10098 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10099 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10100 inherits from ui_file.
10101 (ioscm_file_port_delete, ioscm_file_port_rewind)
10102 (ioscm_file_port_put): Delete.
10103 (ioscm_file_port_write): Rename to ...
10104 (ioscm_file_port::write): ... this. Remove file_port_magic
10105 checks.
10106 (ioscm_file_port_new): Delete.
10107 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10108 ui_file_up.
10109 * guile/scm-type.c (tyscm_type_name): Use string_file.
10110 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10111 Use string_file.
10112 * infcmd.c (print_return_value_1): Use string_file.
10113 * infrun.c (print_target_wait_results): Use string_file.
10114 * language.c (add_language): Use string_file.
10115 * location.c (explicit_to_string_internal): Use string_file.
10116 * main.c (captured_main_1): Use null_file.
10117 * maint.c (maintenance_print_architecture): Use stdio_file.
10118 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10119 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10120 event_channel>: Change type to mi_console_file pointer.
10121 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10122 (mi_console_file_delete): Delete.
10123 (struct mi_console_file): Delete.
10124 (mi_console_file_magic): Delete.
10125 (mi_console_file_new): Delete.
10126 (mi_console_file::mi_console_file): New.
10127 (mi_console_file_delete): Delete.
10128 (mi_console_file_fputs): Delete.
10129 (mi_console_file::write): New.
10130 (mi_console_raw_packet): Delete.
10131 (mi_console_file::flush): New.
10132 (mi_console_file_flush): Delete.
10133 (mi_console_set_raw): Rename to ...
10134 (mi_console_file::set_raw): ... this.
10135 * mi/mi-console.h (class mi_console_file): New class.
10136 (mi_console_file_new, mi_console_set_raw): Delete.
10137 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10138 (mi_set_logging): Use delete and tee_file. Adjust.
10139 * mi/mi-main.c (output_register): Use string_file.
10140 (mi_cmd_data_evaluate_expression): Use string_file.
10141 (mi_cmd_data_read_memory): Use string_file.
10142 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10143 * mi/mi-out.c (mi_ui_out::main_stream): New.
10144 (mi_ui_out::rewind): Use main_stream and
10145 string_file.
10146 (mi_ui_out::put): Use main_stream and string_file.
10147 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10148 Allocate a 'string_file' instead.
10149 (mi_out_new): Don't allocate a mem_fileopen stream here.
10150 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10151 (mi_ui_out::main_stream): Declare method.
10152 * printcmd.c (eval_command): Use string_file.
10153 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10154 * python/py-arch.c (archpy_disassemble): Use string_file.
10155 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10156 * python/py-frame.c (frapy_str): Use string_file.
10157 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10158 Use string_file.
10159 * python/py-type.c (typy_str): Use string_file.
10160 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10161 * python/py-value.c (valpy_str): Use string_file.
10162 * record-btrace.c (btrace_insn_history): Use string_file.
10163 * regcache.c (regcache_print): Use stdio_file.
10164 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10165 * remote.c (escape_buffer): Use string_file.
10166 * rust-lang.c (rust_get_disr_info): Use string_file.
10167 * serial.c (serial_open_ops_1): Use stdio_file.
10168 (do_serial_close): Use delete.
10169 * stack.c (print_frame_arg): Use string_file.
10170 (print_frame_args): Remove local mem_fileopen stream, not used.
10171 (print_frame): Use string_file.
10172 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10173 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10174 Take a 'string_file *' instead of a 'ui_file *'.
10175 * top.c (new_ui): Use stdio_file and stderr_file.
10176 (free_ui): Use delete.
10177 (execute_command_to_string): Use string_file.
10178 (quit_confirm): Use string_file.
10179 * tracepoint.c (collection_list::append_exp): Use string_file.
10180 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10181 * tui/tui-file.c: Don't include "ui-file.h".
10182 (enum streamtype, struct tui_stream): Delete.
10183 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10184 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10185 (tui_file::tui_file): New method.
10186 (tui_file_fputs): Delete.
10187 (tui_file_get_strbuf): Delete.
10188 (tui_file::puts): New method.
10189 (tui_file_adjust_strbuf): Delete.
10190 (tui_file_flush): Delete.
10191 (tui_file::flush): New method.
10192 * tui/tui-file.h: Tweak intro comment.
10193 Include ui-file.h.
10194 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10195 (tui_file_adjust_strbuf): Delete declarations.
10196 (class tui_file): New class.
10197 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10198 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10199 (tui_register_format): Use string_stream.
10200 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10201 (tui_get_function_from_frame): Use string_file.
10202 * typeprint.c (type_to_string): Use string_file.
10203 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10204 (null_stream): New global.
10205 (ui_file_delete): Delete.
10206 (ui_file::ui_file): New.
10207 (null_file_isatty): Delete.
10208 (ui_file::~ui_file): New.
10209 (null_file_rewind): Delete.
10210 (ui_file::printf): New.
10211 (null_file_put): Delete.
10212 (null_file_flush): Delete.
10213 (ui_file::putstr): New.
10214 (null_file_write): Delete.
10215 (ui_file::putstrn): New.
10216 (null_file_read): Delete.
10217 (ui_file::putc): New.
10218 (null_file_fputs): Delete.
10219 (null_file_write_async_safe): Delete.
10220 (ui_file::vprintf): New.
10221 (null_file_delete): Delete.
10222 (null_file::write): New.
10223 (null_file_fseek): Delete.
10224 (null_file::puts): New.
10225 (ui_file_data): Delete.
10226 (null_file::write_async_safe): New.
10227 (gdb_flush, ui_file_isatty): Adjust.
10228 (ui_file_put, ui_file_rewind): Delete.
10229 (ui_file_write): Adjust.
10230 (ui_file_write_for_put): Delete.
10231 (ui_file_write_async_safe, ui_file_read): Adjust.
10232 (ui_file_fseek): Delete.
10233 (fputs_unfiltered): Adjust.
10234 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10235 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10236 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10237 (set_ui_file_data): Delete.
10238 (string_file::~string_file, string_file::write)
10239 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10240 (do_ui_file_as_string, ui_file_as_string): Delete.
10241 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10242 (struct mem_file): Delete.
10243 (mem_file_new): Delete.
10244 (stdio_file::stdio_file): New.
10245 (mem_file_delete): Delete.
10246 (stdio_file::stdio_file): New.
10247 (mem_fileopen): Delete.
10248 (stdio_file::~stdio_file): New.
10249 (mem_file_rewind): Delete.
10250 (stdio_file::set_stream): New.
10251 (mem_file_put): Delete.
10252 (stdio_file::open): New.
10253 (mem_file_write): Delete.
10254 (stdio_file_magic, struct stdio_file): Delete.
10255 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10256 (stdio_file::flush): New.
10257 (stdio_file_read): Rename to ...
10258 (stdio_file::read): ... this. Adjust.
10259 (stdio_file_write): Rename to ...
10260 (stdio_file::write): ... this. Adjust.
10261 (stdio_file_write_async_safe): Rename to ...
10262 (stdio_file::write_async_safe) ... this. Adjust.
10263 (stdio_file_fputs): Rename to ...
10264 (stdio_file::puts) ... this. Adjust.
10265 (stdio_file_isatty): Delete.
10266 (stdio_file_fseek): Delete.
10267 (stdio_file::isatty): New.
10268 (stderr_file_write): Rename to ...
10269 (stderr_file::write) ... this. Adjust.
10270 (stderr_file_fputs): Rename to ...
10271 (stderr_file::puts) ... this. Adjust.
10272 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10273 (stderr_file::stderr_file): New.
10274 (tee_file_magic): Delete.
10275 (struct tee_file): Delete.
10276 (tee_file::tee_file): New.
10277 (tee_file_new): Delete.
10278 (tee_file::~tee_file): New.
10279 (tee_file_delete): Delete.
10280 (tee_file_flush): Rename to ...
10281 (tee_file::flush): ... this. Adjust.
10282 (tee_file_write): Rename to ...
10283 (tee_file::write): ... this. Adjust.
10284 (tee_file::write_async_safe): New.
10285 (tee_file_fputs): Rename to ...
10286 (tee_file::puts): ... this. Adjust.
10287 (tee_file_isatty): Rename to ...
10288 (tee_file::isatty): ... this. Adjust.
10289 * ui-file.h (struct obstack, struct ui_file): Don't
10290 forward-declare.
10291 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10292 (ui_file_write_ftype)
10293 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10294 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10295 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10296 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10297 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10298 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10299 (set_ui_file_fseek): Delete.
10300 (ui_file_data, ui_file_delete, ui_file_rewind)
10301 (struct ui_file): New.
10302 (ui_file_up): New.
10303 (class null_file): New.
10304 (null_stream): Declare.
10305 (ui_file_write_for_put, ui_file_put): Delete.
10306 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10307 Delete.
10308 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10309 (gdb_fopen, tee_file_new): Delete.
10310 (struct string_file): New.
10311 (struct stdio_file): New.
10312 (stdio_file_up): New.
10313 (struct stderr_file): New.
10314 (class tee_file): New.
10315 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10316 of a 'ui_file *'. Adjust.
10317 * ui-out.h (class ui_out) <field_stream>: Likewise.
10318 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10319 (null_stream): Delete.
10320 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10321 Adjust.
10322 * utils.h (struct ui_file): Delete forward declaration..
10323 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10324 (error_stream): Take a 'string_file &' instead of a
10325 'ui_file *'.
10326 * varobj.c (varobj_value_get_print_value): Use string_file.
10327 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10328 * gdbarch.c: Regenerate.
10329
10330 2017-02-02 Pedro Alves <palves@redhat.com>
10331
10332 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10333 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10334 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10335 Adjust to call gdb_print_insn instead of
10336 gdb_disassembler::print_insn.
10337 (dump_insns, do_mixed_source_and_assembly_deprecated)
10338 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10339 'gdbarch' parameter. Remove gdb_disassembler parameter.
10340 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10341 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10342 declaration.
10343 (gdb_pretty_print_insn): Re-add declaration.
10344 * record-btrace.c (btrace_insn_history): Don't allocate a
10345 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10346
10347 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10348
10349 * disasm.h (gdb_disassembly): Remove file_string parameter.
10350 * disasm.c (gdb_disassembly): Likewise.
10351 * cli/cli-cmds.c (print_disassembly): Adapt.
10352 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10353 * stack.c (do_gdb_disassembly): Likewise.
10354
10355 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10356
10357 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10358 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10359 targets. And if the implicit value is longer than needed, extract
10360 the first bytes instead of the "least significant" ones.
10361
10362 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10363
10364 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10365 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10366 (btrace_fetch): Assert can_access_registers_ptid.
10367 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10368 validate_registers_access.
10369
10370 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10371
10372 * gdbthread.h (can_access_registers_ptid): New.
10373 * thread.c (can_access_registers_ptid): New.
10374
10375 2017-02-01 Pedro Alves <palves@redhat.com>
10376
10377 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10378
10379 2017-01-31 Pedro Alves <palves@redhat.com>
10380
10381 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10382 Fix typos.
10383
10384 2017-01-31 Pedro Alves <palves@redhat.com>
10385
10386 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10387 not used.
10388
10389 2017-01-31 Pedro Alves <palves@redhat.com>
10390
10391 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10392
10393 2017-01-31 Pedro Alves <palves@redhat.com>
10394
10395 * common/scoped_restore.h
10396 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10397 change the value's parameter type to T2.
10398 (make_scoped_restore): Likewise.
10399
10400 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10401 Richard Henderson <rth@redhat.com>
10402
10403 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10404 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10405 GS_BASE for older kernels.
10406 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10407 GS_BASE for older kernels.
10408 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10409 and GS_BASE to the offset table.
10410 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10411 system register group.
10412 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10413 for older kernels.
10414 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10415 amd64 ABI.
10416 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10417 AMD64_GSBASE_REGNUM.
10418 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10419 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10420 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10421 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10422 i386/64bit-segments.xml in those rules.
10423 * features/i386/64bit-segments.xml: New file.
10424 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10425 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10426 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10427 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10428 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10429 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10430 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10431 * features/i386/amd64-avx-linux.c: Regenerated.
10432 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10433 * features/i386/amd64-avx-mpx.c: Regenerated.
10434 * features/i386/amd64-avx512-linux.c: Regenerated.
10435 * features/i386/amd64-linux.c: Regenerated.
10436 * features/i386/amd64-mpx-linux.c: Regenerated.
10437 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10438 * features/i386/i386-avx-mpx.c: Regenerated.
10439 * features/i386/x32-avx-linux.c: Regenerated.
10440 * features/i386/x32-avx512-linux.c: Regenerated.
10441 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10442 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10443 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10444 * regformats/i386/amd64-linux.dat: Regenerated.
10445 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10446 * regformats/i386/x32-avx-linux.dat: Regenerated.
10447 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10448 * regformats/i386/x32-linux.dat: Regenerated.
10449
10450 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10451
10452 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10453 Set to AMD64_NUM_REGS.
10454
10455 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10456
10457 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10458 that checks validity of a register number.
10459
10460 2017-01-27 Kees Cook <keescook@google.com>
10461
10462 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10463 fetch_fpregs if target has fpa registers.
10464 (arm_linux_store_inferior_registers): Call store_fpregs if target
10465 has fpa registers.
10466
10467 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10468
10469 * cris-tdep.c (cris_gdbarch_init): Remove check for
10470 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10471
10472 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10473
10474 * corelow.c (get_core_register_section): Check for regset
10475 existence before checking for REGSET_VARIABLE_SIZE.
10476
10477 2017-01-26 Yao Qi <yao.qi@linaro.org>
10478 Pedro Alves <palves@redhat.com>
10479
10480 PR gdb/20939
10481 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10482 call memory_error, save memaddr instead.
10483 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10484 negative, cal memory_error.
10485 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10486
10487 2017-01-26 Yao Qi <yao.qi@linaro.org>
10488
10489 * disasm-selftests.c (memory_error_test): New function.
10490 (_initialize_disasm_selftests): Register memory_error_test.
10491
10492 2017-01-26 Yao Qi <yao.qi@linaro.org>
10493
10494 * Makefile.in (SFILES): Add disasm-selftests.c and
10495 selftest-arch.c.
10496 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10497 * disasm-selftests.c: New file.
10498 * selftest-arch.c: New file.
10499 * selftest-arch.h: New file.
10500
10501 2017-01-26 Yao Qi <yao.qi@linaro.org>
10502
10503 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10504 to bfd_arch_mep. Don't return 0 if section is not
10505 found. Call print_insn_mep.
10506
10507 2017-01-26 Pedro Alves <palves@redhat.com>
10508 Yao Qi <yao.qi@linaro.org>
10509
10510 * arm-tdep.c: Include "disasm.h".
10511 (gdb_print_insn_arm): Update code to get gdbarch.
10512 * disasm.c (dis_asm_read_memory): Change it to
10513 gdb_disassembler::dis_asm_read_memory.
10514 (dis_asm_memory_error): Likewise.
10515 (dis_asm_print_address): Likewise.
10516 (gdb_pretty_print_insn): Change it to
10517 gdb_disassembler::pretty_print_insn.
10518 (dump_insns): Add one argument gdb_disassemlber. All
10519 callers updated.
10520 (do_mixed_source_and_assembly_deprecated): Likewise.
10521 (do_mixed_source_and_assembly): Likewise.
10522 (do_assembly_only): Likewise.
10523 (gdb_disassembler::gdb_disassembler): New.
10524 (gdb_disassembler::print_insn): New.
10525 * disasm.h (class gdb_disassembler): New.
10526 (gdb_pretty_print_insn): Remove declaration.
10527 (gdb_disassemble_info): Likewise.
10528 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10529 (gdbscm_disasm_read_memory_worker): Update.
10530 (gdbscm_disasm_read_memory): Update.
10531 (gdbscm_disasm_memory_error): Remove.
10532 (gdbscm_disasm_print_address): Remove.
10533 (gdbscm_disassembler::gdbscm_disassembler): New.
10534 (gdbscm_print_insn_from_port): Update.
10535 * mips-tdep.c: Include disasm.h.
10536 (gdb_print_insn_mips): Update code to get gdbarch.
10537 * record-btrace.c (btrace_insn_history): Update.
10538 * spu-tdep.c: Include disasm.h.
10539 (struct spu_dis_asm_data): Remove.
10540 (struct spu_dis_asm_info): New.
10541 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10542 SPU id.
10543 (gdb_print_insn_spu): Cast disassemble_info to
10544 spu_dis_asm_info.
10545
10546 2017-01-26 Yao Qi <yao.qi@linaro.org>
10547
10548 * disasm.c (do_ui_file_delete): Delete.
10549 (gdb_insn_length): Move code creating stream to ...
10550 * utils.c (null_stream): ... here. New function.
10551 * utils.h (null_stream): Declare.
10552
10553 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10554
10555 * python/py-inferior.c (find_thread_object): Return directly
10556 from the loop. Remove "found" variable.
10557
10558 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10559
10560 GDB 7.12.1 released.
10561
10562 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10563
10564 * python/py-function.c (fnpy_call): Reorder declarations to have
10565 the gdbpy_enter object declared first.
10566 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10567
10568 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10569
10570 PR python/21068
10571 * python/python-internal.h (PyMem_RawMalloc): Define for
10572 Python < 3.4.
10573 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10574 PyMem_RawMalloc instead of PyMem_Malloc.
10575
10576 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10577 Luis Machado <lgustavo@codesourcery.com>
10578
10579 * NEWS (New commands): Mention flash-erase.
10580 (New MI commands): Mention target-flash-erase.
10581 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10582 command.
10583 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10584 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10585 * target.c (flash_erase_command): New function.
10586 (initialize_targets): Add new flash-erase command.
10587 * target.h (flash_erase_command): New declaration.
10588
10589 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10590
10591 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10592 HAVE_SYS_PROCFS_H is defined.
10593
10594 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10595
10596 * remote.c (struct cached_reg): Change data into a pointer.
10597 * (stop_reply_dtr): Free data pointers before deleting vector.
10598 (process_stop_reply): Likewise.
10599 (remote_parse_stop_reply): Allocate space for data
10600
10601 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10602
10603 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10604 MAX_REGISTER_SIZE.
10605 (amd64_pseudo_register_read_value): Likewise.
10606 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10607 (store_register_using_P): Likewise.
10608 * regcache.c (regcache_xfer_part): Likewise.
10609
10610 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10611
10612 Split real and pseudo registers.
10613 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10614 (sparc32_pseudo_regnum): New enum.
10615 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10616 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10617 (SPARC32_CP0_REGISTERS): New macro.
10618 (sparc32_pseudo_register_name): New function.
10619 (sparc32_register_name): Use sparc32_pseudo_register_name.
10620 (sparc32_pseudo_register_type): New function.
10621 (sparc32_register_type): Use sparc32_pseudo_register_type.
10622 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10623 pseudo register numbers.
10624 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10625 (SPARC64_CP0_REGISTERS): New macro.
10626 (sparc64_pseudo_register_name): New function.
10627 (sparc64_register_name): Use sparc64_pseudo_register_name.
10628 (sparc64_pseudo_register_type): New function.
10629 (sparc64_register_type): Use sparc64_pseudo_register_type.
10630 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10631 pseudo register numbers.
10632 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10633 sparc64_store_arguments): Handle pseudo register numbers.
10634
10635 2017-01-13 Yao Qi <yao.qi@linaro.org>
10636
10637 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10638 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10639 output.
10640 (getpkt_or_notif_sane_1): Likewise.
10641
10642 2017-01-13 Yao Qi <yao.qi@linaro.org>
10643
10644 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10645 of CC. Pass "-x c++-header" instead of "-x c".
10646
10647 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10648
10649 * remote.c (remote_can_async_p): Update comment.
10650
10651 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10652
10653 * linux-nat.c (linux_nat_can_async_p): Update comment.
10654
10655 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10656
10657 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10658
10659 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10660
10661 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10662
10663 2017-01-10 Tom Tromey <tom@tromey.com>
10664
10665 * python/py-type.c (typy_legacy_template_argument): Update.
10666 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10667 ~demangle_parse_info): Declare new members.
10668 (cp_demangled_name_to_comp): Return unique_ptr.
10669 (cp_demangled_name_parse_free)
10670 (make_cleanup_cp_demangled_name_parse_free)
10671 (cp_new_demangle_parse_info): Remove.
10672 * cp-support.c (do_demangled_name_parse_free_cleanup)
10673 (make_cleanup_cp_demangled_name_parse_free): Remove.
10674 (inspect_type, cp_canonicalize_string_full)
10675 (cp_canonicalize_string): Update.
10676 (mangled_name_to_comp): Change return type.
10677 (cp_class_name_from_physname, method_name_from_physname)
10678 (cp_func_name, cp_remove_params): Update.
10679 * cp-name-parser.y (demangle_parse_info): New constructor, from
10680 cp_new_demangle_parse_info.
10681 (~demangle_parse_info): New destructor, from
10682 cp_demangled_name_parse_free.
10683 (cp_merge_demangle_parse_infos): Update.
10684 (cp_demangled_name_to_comp): Change return type.
10685
10686 2017-01-10 Tom Tromey <tom@tromey.com>
10687
10688 * top.c (prevent_dont_repeat): Change return type.
10689 * python/python.c (execute_gdb_command): Use std::string.
10690 Update.
10691 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10692 * command.h (prevent_dont_repeat): Change return type.
10693 * breakpoint.c (bpstat_do_actions_1): Update.
10694
10695 2017-01-10 Tom Tromey <tom@tromey.com>
10696
10697 * value.h (scoped_value_mark::~scoped_value_mark): Call
10698 free_to_mark.
10699 (scoped_value_mark::free_to_mark): New method.
10700 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10701 scoped_value_mark.
10702
10703 2017-01-10 Tom Tromey <tom@tromey.com>
10704
10705 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10706 (valpy_reference_value, valpy_const_value, valpy_get_address)
10707 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10708 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10709 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10710 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10711 scoped_value_mark.
10712 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10713 * value.h (scoped_value_mark): New class.
10714
10715 2017-01-10 Tom Tromey <tom@tromey.com>
10716
10717 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10718 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10719 * psymtab.c (discard_psymtabs_upto): Remove.
10720 (make_cleanup_discard_psymtabs): Remove.
10721 (struct psymtab_state): Remove.
10722
10723 2017-01-10 Tom Tromey <tom@tromey.com>
10724
10725 * record-full.c (record_full_save_cleanups): Remove.
10726 (record_full_save): Use gdb::unlinker.
10727 * gcore.c (do_bfd_delete_cleanup): Remove.
10728 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10729 cleanups.
10730 * dwarf2read.c (unlink_if_set): Remove.
10731 (write_psymtabs_to_index): Use gdb::unlinker.
10732 * common/gdb_unlinker.h: New file.
10733
10734 2017-01-10 Tom Tromey <tom@tromey.com>
10735
10736 * windows-tdep.c (windows_xfer_shared_library): Update.
10737 * windows-nat.c (windows_make_so): Update.
10738 * utils.h (make_cleanup_bfd_unref): Remove.
10739 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10740 * symfile.h (symfile_bfd_open)
10741 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10742 * symfile.c (read_symbols, symbol_file_add)
10743 (separate_debug_file_exists): Update.
10744 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10745 (generic_load, reread_symbols): Update.
10746 * symfile-mem.c (symbol_file_add_from_memory): Update.
10747 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10748 (spu_symbol_file_add_from_memory): Update.
10749 * solist.h (struct target_so_ops) <bfd_open>: Return
10750 gdb_bfd_ref_ptr.
10751 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10752 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10753 gdb_bfd_ref_ptr.
10754 (solib_map_sections, reload_shared_libraries_1): Update.
10755 * solib-svr4.c (enable_break): Update.
10756 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10757 * solib-frv.c (enable_break2): Update.
10758 * solib-dsbt.c (enable_break): Update.
10759 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10760 gdb_bfd_ref_ptr.
10761 (darwin_solib_get_all_image_info_addr_at_init): Update.
10762 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10763 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10764 * record-full.c (record_full_save): Update.
10765 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10766 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10767 * minidebug.c (find_separate_debug_file_in_section): Return
10768 gdb_bfd_ref_ptr.
10769 * machoread.c (macho_add_oso_symfile): Change abfd to
10770 gdb_bfd_ref_ptr.
10771 (macho_symfile_read_all_oso): Update.
10772 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10773 (macho_symfile_read): Update.
10774 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10775 (jit_bfd_try_read_symtab): Update.
10776 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10777 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10778 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10779 gdb_bfd_ref_ptr.
10780 (gdb_bfd_ref_policy): New struct.
10781 (gdb_bfd_ref_ptr): New typedef.
10782 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10783 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10784 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10785 gdb_bfd_ref_ptr.
10786 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10787 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10788 (gcore_command): Update.
10789 * exec.c (exec_file_attach): Update.
10790 * elfread.c (elf_symfile_read): Update.
10791 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10792 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10793 (open_and_init_dwo_file): Update.
10794 (open_dwp_file): Return gdb_bfd_ref_ptr.
10795 (open_and_init_dwp_file): Update.
10796 * corelow.c (core_open): Update.
10797 * compile/compile-object-load.c (compile_object_load): Update.
10798 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10799 * coffread.c (coff_symfile_read): Update.
10800 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10801 gdb_bfd_ref_ptr. Rename.
10802 (dump_bfd_file, restore_command): Update.
10803 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10804 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10805 (find_separate_debug_file_by_buildid): Update.
10806
10807 2017-01-10 Tom Tromey <tom@tromey.com>
10808
10809 * common/gdb_ref_ptr.h: New file.
10810 * python/py-ref.h (struct gdbpy_ref_policy): New.
10811 (gdbpy_ref): Now a typedef.
10812
10813 2017-01-10 Tom Tromey <tom@tromey.com>
10814
10815 * utils.h (make_cleanup_htab_delete): Don't declare.
10816 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10817 Remove.
10818 * linespec.c (decode_compound_collector): Add constructor,
10819 destructor.
10820 (lookup_prefix_sym): Remove cleanup.
10821 (symtab_collector): Add constructor, destructor.
10822 (collect_symtabs_from_filename): Remove cleanup.
10823 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10824 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10825 Use htab_up.
10826 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10827 * dwarf2read.c (dw2_expand_symtabs_matching)
10828 (dw2_map_symbol_filenames, dwarf_decode_macros)
10829 (write_psymtabs_to_index): Use htab_up.
10830 * dwarf2loc.c (func_verify_no_selftailcall)
10831 (call_site_find_chain_1, func_verify_no_selftailcall)
10832 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10833 std::vector, gdb::unique_xmalloc_ptr.
10834 (call_sitep): Remove typedef.
10835 (dwarf2_locexpr_baton_eval): Remove unused variable.
10836
10837 2017-01-10 Tom Tromey <tom@tromey.com>
10838
10839 * python/python-internal.h (make_cleanup_py_decref)
10840 (make_cleanup_py_xdecref): Don't declare.
10841 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10842 (py_xdecref, make_cleanup_py_xdecref): Remove.
10843
10844 2017-01-10 Tom Tromey <tom@tromey.com>
10845
10846 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10847 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10848
10849 2017-01-10 Tom Tromey <tom@tromey.com>
10850
10851 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10852
10853 2017-01-10 Tom Tromey <tom@tromey.com>
10854
10855 * python/py-utils.c (unicode_to_encoded_string)
10856 (python_string_to_target_string)
10857 (python_string_to_target_python_string)
10858 (python_string_to_host_string, gdbpy_obj_to_string)
10859 (get_addr_from_python): Use gdbpy_ref.
10860
10861 2017-01-10 Tom Tromey <tom@tromey.com>
10862
10863 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10864 gdbpy_ref.
10865
10866 2017-01-10 Tom Tromey <tom@tromey.com>
10867
10868 * python/python.c (eval_python_command, gdbpy_decode_line)
10869 (gdbpy_run_events, gdbpy_start_type_printers)
10870 (gdbpy_apply_type_printers): Use gdbpy_ref.
10871
10872 2017-01-10 Tom Tromey <tom@tromey.com>
10873
10874 * python/py-param.c (get_doc_string, compute_enum_values): Use
10875 gdbpy_ref.
10876
10877 2017-01-10 Tom Tromey <tom@tromey.com>
10878
10879 * python/py-inferior.c (find_thread_object, build_inferior_list):
10880 Use gdbpy_ref.
10881
10882 2017-01-10 Tom Tromey <tom@tromey.com>
10883
10884 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10885
10886 2017-01-10 Tom Tromey <tom@tromey.com>
10887
10888 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10889 gdbpy_ref.
10890
10891 2017-01-10 Tom Tromey <tom@tromey.com>
10892
10893 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10894 extra incref.
10895 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10896 Use gdbpy_ref.
10897
10898 2017-01-10 Tom Tromey <tom@tromey.com>
10899
10900 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10901 gdbpy_ref.
10902
10903 2017-01-10 Tom Tromey <tom@tromey.com>
10904
10905 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10906 decref results of PyArg_ParseTupleAndKeywords.
10907
10908 2017-01-10 Tom Tromey <tom@tromey.com>
10909
10910 * python/python.c (python_run_simple_file): Use
10911 unique_xmalloc_ptr, gdbpy_ref.
10912
10913 2017-01-10 Tom Tromey <tom@tromey.com>
10914
10915 * python/py-prettyprint.c (print_stack_unless_memory_error)
10916 (print_string_repr, print_children): Use gdbpy_ref.
10917 (dummy_python_frame): New class.
10918 (dummy_python_frame::dummy_python_frame): Rename from
10919 push_dummy_python_frame.
10920 (py_restore_tstate): Remove.
10921
10922 2017-01-10 Tom Tromey <tom@tromey.com>
10923
10924 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10925
10926 2017-01-10 Tom Tromey <tom@tromey.com>
10927
10928 * python/python.c (ensure_python_env, restore_python_env):
10929 Remove.
10930 * python/python-internal.h (ensure_python_env): Don't declare.
10931 * varobj.h (varobj_ensure_python_env): Don't declare.
10932 * varobj.c (varobj_ensure_python_env): Remove.
10933
10934 2017-01-10 Tom Tromey <tom@tromey.com>
10935
10936 * varobj.c (varobj_value_get_print_value): Use
10937 gdbpy_enter_varobj.
10938
10939 2017-01-10 Tom Tromey <tom@tromey.com>
10940
10941 * python/py-prettyprint.c (print_string_repr, print_children):
10942 Update.
10943 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10944 of "encoding".
10945 * varobj.c (varobj_value_get_print_value): Update.
10946 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10947
10948 2017-01-10 Tom Tromey <tom@tromey.com>
10949
10950 * varobj.c (varobj_get_display_hint)
10951 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10952 (varobj_set_visualizer, free_variable): Use
10953 gdbpy_enter_varobj.
10954
10955 2017-01-10 Tom Tromey <tom@tromey.com>
10956
10957 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10958 (do_finish_initialization): New function. Use gdbpy_ref.
10959 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10960 do_finish_initialization.
10961
10962 2017-01-10 Tom Tromey <tom@tromey.com>
10963
10964 * python/py-param.c (get_set_value, get_show_value): Use
10965 gdbpy_enter, gdbpy_ref.
10966
10967 2017-01-10 Tom Tromey <tom@tromey.com>
10968
10969 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10970
10971 2017-01-10 Tom Tromey <tom@tromey.com>
10972
10973 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10974
10975 2017-01-10 Tom Tromey <tom@tromey.com>
10976
10977 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10978 Use gdbpy_enter_varobj.
10979
10980 2017-01-10 Tom Tromey <tom@tromey.com>
10981
10982 * varobj.c (gdbpy_enter_varobj): New constructor.
10983 * python/python-internal.h (gdbpy_enter_varobj): New class.
10984 * python/py-varobj.c (py_varobj_get_iterator): Use
10985 gdbpy_enter_varobj.
10986
10987 2017-01-10 Tom Tromey <tom@tromey.com>
10988
10989 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10990 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10991 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10992 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10993 unique_xmalloc_ptr.
10994 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10995
10996 2017-01-10 Tom Tromey <tom@tromey.com>
10997
10998 * python/py-xmethods.c (invoke_match_method): Use
10999 gdbpy_ref.
11000
11001 2017-01-10 Tom Tromey <tom@tromey.com>
11002
11003 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11004 gdbpy_enter, gdbpy_ref.
11005
11006 2017-01-10 Tom Tromey <tom@tromey.com>
11007
11008 * python/python.c (python_interactive_command): Use gdbpy_enter.
11009
11010 2017-01-10 Tom Tromey <tom@tromey.com>
11011
11012 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11013 gdbpy_ref.
11014
11015 2017-01-10 Tom Tromey <tom@tromey.com>
11016
11017 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11018 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11019
11020 2017-01-10 Tom Tromey <tom@tromey.com>
11021
11022 * utils.h (htab_deleter): New struct.
11023 (htab_up): New typedef.
11024 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11025 gdbpy_enter, gdbpy_ref, htab_up.
11026
11027 2017-01-10 Tom Tromey <tom@tromey.com>
11028
11029 * python/py-unwind.c (pending_frame_invalidate): Remove.
11030 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11031
11032 2017-01-10 Tom Tromey <tom@tromey.com>
11033
11034 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11035 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11036
11037 2017-01-10 Tom Tromey <tom@tromey.com>
11038
11039 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11040
11041 2017-01-10 Tom Tromey <tom@tromey.com>
11042
11043 * python/python.c (gdbpy_eval_from_control_command)
11044 (gdbpy_source_script, gdbpy_run_events)
11045 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11046 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11047 gdbpy_enter.
11048
11049 2017-01-10 Tom Tromey <tom@tromey.com>
11050
11051 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11052
11053 2017-01-10 Tom Tromey <tom@tromey.com>
11054
11055 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11056
11057 2017-01-10 Tom Tromey <tom@tromey.com>
11058
11059 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11060 (python_on_inferior_call_pre, python_on_inferior_call_post)
11061 (python_on_memory_change, python_on_register_change)
11062 (python_inferior_exit, python_new_objfile, add_thread_object)
11063 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11064
11065 2017-01-10 Tom Tromey <tom@tromey.com>
11066
11067 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11068 (bpfinishpy_handle_exit): Use gdbpy_enter.
11069
11070 2017-01-10 Tom Tromey <tom@tromey.com>
11071
11072 * python/py-cmd.c (cmdpy_destroyer)
11073 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11074 gdbpy_enter.
11075
11076 2017-01-10 Tom Tromey <tom@tromey.com>
11077
11078 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11079 gdbpy_enter.
11080 (gdbpy_breakpoint_has_cond): Likewise.
11081
11082 2017-01-10 Tom Tromey <tom@tromey.com>
11083
11084 * python/python.c (gdbpy_enter): New constructor.
11085 (~gdbpy_enter): New destructor.
11086 (restore_python_env, ensure_python_env): Rewrite.
11087 * python/python-internal.h (gdbpy_enter): New class.
11088
11089 2017-01-10 Tom Tromey <tom@tromey.com>
11090
11091 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11092
11093 2017-01-10 Tom Tromey <tom@tromey.com>
11094
11095 * python/py-value.c (value_has_field, get_field_flag)
11096 (get_field_type, valpy_getitem, convert_value_from_python): Use
11097 gdbpy_ref.
11098
11099 2017-01-10 Tom Tromey <tom@tromey.com>
11100
11101 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11102 gdbpy_ref.
11103
11104 2017-01-10 Tom Tromey <tom@tromey.com>
11105
11106 * python/py-prettyprint.c (search_pp_list)
11107 (find_pretty_printer_from_objfiles)
11108 (find_pretty_printer_from_progspace)
11109 (find_pretty_printer_from_gdb, find_pretty_printer)
11110 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11111 gdbpy_ref.
11112
11113 2017-01-10 Tom Tromey <tom@tromey.com>
11114
11115 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11116
11117 2017-01-10 Tom Tromey <tom@tromey.com>
11118
11119 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11120 (ltpy_get_all_source_lines): Use gdbpy_ref.
11121
11122 2017-01-10 Tom Tromey <tom@tromey.com>
11123
11124 * python/py-framefilter.c (extract_sym, extract_value)
11125 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11126 gdbpy_ref.
11127
11128 2017-01-10 Tom Tromey <tom@tromey.com>
11129
11130 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11131
11132 2017-01-10 Tom Tromey <tom@tromey.com>
11133
11134 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11135
11136 2017-01-10 Tom Tromey <tom@tromey.com>
11137
11138 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11139 gdbpy_ref.
11140
11141 2017-01-10 Tom Tromey <tom@tromey.com>
11142
11143 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11144
11145 2017-01-10 Tom Tromey <tom@tromey.com>
11146
11147 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11148 (typy_range): Use gdbpy_ref.
11149
11150 2017-01-10 Tom Tromey <tom@tromey.com>
11151
11152 * python/py-threadevent.c (create_thread_event_object): Use
11153 gdbpy_ref.
11154 * python/py-stopevent.c (create_stop_event_object): Simplify.
11155 (emit_stop_event): Use gdbpy_ref.
11156 * python/py-signalevent.c (create_signal_event_object): Use
11157 gdbpy_ref.
11158 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11159 (emit_new_objfile_event, create_clear_objfiles_event_object)
11160 (emit_clear_objfiles_event): Use gdbpy_ref.
11161 * python/py-infevents.c (create_inferior_call_event_object)
11162 (create_register_changed_event_object)
11163 (create_memory_changed_event_object, emit_inferior_call_event)
11164 (emit_memory_changed_event, emit_register_changed_event): Use
11165 gdbpy_ref.
11166 * python/py-exitedevent.c (create_exited_event_object)
11167 (emit_exited_event): Use gdbpy_ref.
11168 * python/py-event.h (evpy_emit_event): Remove
11169 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11170 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11171 * python/py-continueevent.c (emit_continue_event): Use
11172 gdbpy_ref.
11173 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11174 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11175 gdbpy_ref.
11176 * python/py-bpevent.c (create_breakpoint_event_object): Use
11177 gdbpy_ref.
11178
11179 2017-01-10 Tom Tromey <tom@tromey.com>
11180
11181 * python/py-ref.h: New file.
11182
11183 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11184
11185 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11186 void.
11187 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11188 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11189 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11190 * ui-out.c (ui_out::redirect): Likewise.
11191 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11192 * cli/cli-logging.c (set_logging_redirect): Update call site of
11193 ui_out::redirect.
11194 (handle_redirections): Likewise.
11195 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11196 * top.c (execute_command_to_string): Likewise.
11197 * utils.c (do_ui_out_redirect_pop): Likewise.
11198
11199 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11200
11201 * stack.c (_initialize_stack): Update "frame" command help message.
11202
11203 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11204
11205 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11206
11207 2017-01-06 Yao Qi <yao.qi@linaro.org>
11208
11209 * x86-linux-nat.h: Include gdb_proc_service.h.
11210
11211 2017-01-06 Yao Qi <yao.qi@linaro.org>
11212
11213 * ser-base.h: Include serial.h.
11214
11215 2017-01-06 Yao Qi <yao.qi@linaro.org>
11216
11217 * ppc-linux-tdep.h: Include ppc-tdep.h.
11218
11219 2017-01-06 Yao Qi <yao.qi@linaro.org>
11220
11221 * nat/amd64-linux-siginfo.h: Include signal.h.
11222
11223 2017-01-06 Yao Qi <yao.qi@linaro.org>
11224
11225 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11226
11227 2017-01-06 Yao Qi <yao.qi@linaro.org>
11228
11229 * mi/mi-parse.h: Include mi-cmds.h.
11230
11231 2017-01-06 Yao Qi <yao.qi@linaro.org>
11232
11233 * inf-loop.c: Don't include "target.h".
11234 * inf-loop.h: Include it here.
11235
11236 2017-01-06 Yao Qi <yao.qi@linaro.org>
11237
11238 * dfp.h: Include "dboulest.h" and "expression.h".
11239
11240 2017-01-06 Yao Qi <yao.qi@linaro.org>
11241
11242 * ax-gdb.h: Include "ax.h".
11243
11244 2017-01-06 Yao Qi <yao.qi@linaro.org>
11245
11246 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11247 with nat/gdb_ptrace.h.
11248
11249 2017-01-05 Yao Qi <yao.qi@linaro.org>
11250
11251 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11252 new line.
11253 (mips64_fbsd_sigframe_init): Likewise.
11254
11255 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11256
11257 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11258 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11259
11260 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11261
11262 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11263 * NEWS: Mention new FreeBSD/mips native configuration.
11264 * config/mips/fbsd.mh: New file.
11265 * configure.host: Add mips*-*-freebsd*.
11266 * mips-fbsd-nat.c: New file.
11267
11268 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11269
11270 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11271 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11272 * NEWS: Mention new FreeBSD/mips target.
11273 * configure.tgt: Add mips*-*-freebsd*.
11274 * mips-fbsd-tdep.c: New file.
11275 * mips-fbsd-tdep.h: New file.
11276
11277 2017-01-04 Yao Qi <yao.qi@linaro.org>
11278
11279 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11280 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11281
11282 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11283
11284 Update copyright year range in all GDB files.
11285
11286 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11287
11288 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11289
11290 For older changes see ChangeLog-2016.
11291 \f
11292 Local Variables:
11293 mode: change-log
11294 left-margin: 8
11295 fill-column: 74
11296 version-control: never
11297 coding: utf-8
11298 End:
This page took 0.288905 seconds and 4 git commands to generate.