Constify some commands in cli-cmds.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-27 Tom Tromey <tom@tromey.com>
2
3 * cli/cli-cmds.c (show_version, show_configuration)
4 (source_command, show_user): Constify.
5
6 2017-09-27 Tom Tromey <tom@tromey.com>
7
8 * target.c (maintenance_print_target_stack): Constify.
9
10 2017-09-27 Tom Tromey <tom@tromey.com>
11
12 * interps.c (interpreter_exec_cmd): Constify.
13
14 2017-09-27 Tom Tromey <tom@tromey.com>
15
16 * record-full.c (cmd_record_full_restore): Constify.
17
18 2017-09-27 Tom Tromey <tom@tromey.com>
19
20 * memattr.c (enable_mem_command, disable_mem_command)
21 (delete_mem_command): Constify.
22
23 2017-09-27 Tom Tromey <tom@tromey.com>
24
25 * value.c (show_convenience): Constify.
26
27 2017-09-27 Tom Tromey <tom@tromey.com>
28
29 * gdbcore.h (core_file_command): Update.
30 * corefile.c (core_file_command): Constify.
31
32 2017-09-27 Tom Tromey <tom@tromey.com>
33
34 * user-regs.c (maintenance_print_user_registers): Constify.
35
36 2017-09-27 Tom Tromey <tom@tromey.com>
37
38 * cp-namespace.c (maintenance_cplus_namespace): Constify.
39
40 2017-09-27 Tom Tromey <tom@tromey.com>
41
42 * cp-support.c (first_component_command): Constify.
43
44 2017-09-27 Tom Tromey <tom@tromey.com>
45
46 * psymtab.c (maintenance_print_psymbols)
47 (maintenance_info_psymtabs, maintenance_check_psymtabs):
48 Constify.
49
50 2017-09-27 Tom Tromey <tom@tromey.com>
51
52 * windows-tdep.c (display_tib): Constify.
53
54 2017-09-27 Tom Tromey <tom@tromey.com>
55
56 * linux-fork.c (delete_checkpoint_command)
57 (detach_checkpoint_command): Constify.
58
59 2017-09-27 Tom Tromey <tom@tromey.com>
60
61 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
62
63 2017-09-27 Tom Tromey <tom@tromey.com>
64
65 * arc-tdep.c (dump_arc_instruction_command): Constify.
66
67 2017-09-27 Tom Tromey <tom@tromey.com>
68
69 * valprint.c (set_radix, show_radix): Constify.
70
71 2017-09-27 Tom Tromey <tom@tromey.com>
72
73 * dtrace-probe.c (info_probes_dtrace_command): Constify.
74
75 2017-09-27 Tom Tromey <tom@tromey.com>
76
77 * command.h (not_just_help_class_command): Update.
78 * cli/cli-decode.h (not_just_help_class_command): Update.
79 * cli/cli-decode.c (not_just_help_class_command): Constify.
80
81 2017-09-27 Tom Tromey <tom@tromey.com>
82
83 * gdb_bfd.c (maintenance_info_bfds): Constify.
84
85 2017-09-27 Tom Tromey <tom@tromey.com>
86
87 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
88 overloads.
89 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
90 (do_const_cfunc): New function.
91 (cmd_cfunc_eq): New overload.
92 (cli_user_command_p): Check do_const_cfunc.
93 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
94 const_cfunc.
95 * command.h (add_cmd): Add const overload and no-function
96 overload.
97 (set_cmd_cfunc): Add const overload.
98 (cmd_const_cfunc_ftype): Declare.
99 (cmd_cfunc_eq): Add const overload.
100 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
101 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
102 overload.
103
104 2017-09-27 Tom Tromey <tom@tromey.com>
105
106 * macroexp.c (get_next_token_for_substitution): New function.
107 (substitute_args): Call it. Check for __VA_OPT__.
108
109 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
110 Pedro Alves <palves@redhat.com>
111
112 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
113 producer_is_icc_lt_14.
114 (producer_is_icc_lt_14): New function.
115 (check_producer): Add code for checking version of ICC.
116 (producer_is_icc): Move to producer.c.
117 (read_structure_type): Restrict ICC workaround to ICC<14.
118 * producer.c: Include selftest.h.
119 (producer_is_icc, producer_parsing_tests, _initialize_producer):
120 New functions.
121 * producer.h (producer_is_icc): New declaration.
122
123 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
124
125 * Makefile.in (SFILES): Add producer.c.
126 (COMMON_OBS): Add producer.o
127 * amd64-tdep.c (producer.h): Add new include.
128 * dwarf2read.c (producer.h): Add new include.
129 * producer.c: New file.
130 * producer.h: New file.
131 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
132 producer.c.
133 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
134 producer.h.
135
136 2017-09-26 Matthias Klose <doko@ubuntu.com>
137
138 * configure.ac: Search ncursesw before ncurses.
139 Check ncursesw/ncurses.h before ncurses/ncurses.h.
140 * gdb_curses.h: Include <ncursesw/ncurses.h>
141 * config.in, configure: Regenerate.
142
143 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
144
145 PR gdb/22185
146 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
147 obsolete.
148 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
149 Remove i386sol2 support.
150 * configure.nat <i386sol2>: Remove.
151 <sol2-64>: Fold into ...
152 <sol2>: ... this.
153 Move common settings to default section.
154 Add sol-thread.o.
155 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
156 x86_64-*-solaris2.1[0-9]*>: Rename to ...
157 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
158 <i[34567]86-*-solaris*>: Remove.
159 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
160
161 * configure.ac: Remove wctype in libw check.
162 (_MSE_INT_H): Don't define on Solaris 7-9.
163 <solaris*>: Remove libthread_db.so.1 check.
164 * configure: Regenerate.
165 * config.in: Regenerate.
166
167 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
168 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
169 (gdb_ps_size_t): Remove.
170 Use base types in users.
171 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
172
173 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
174
175 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
176
177 PR build/22206
178 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
179 (adi_is_addr_mapped): Likewise.
180 (PSR_ICC): Don't redefine.
181 (PSR_IMPL): Likewise.
182
183 2017-09-25 Tom Tromey <tom@tromey.com>
184
185 * regcache.c (regcache::dump): Use string_printf.
186
187 2017-09-25 Tom Tromey <tom@tromey.com>
188
189 * regcache.c (class regcache_invalidator): New.
190 (struct register_to_invalidate): Remove.
191 (make_cleanup_regcache_invalidate): Remove.
192 (regcache::raw_write): Use regcache_invalidator.
193
194 2017-09-25 Tom Tromey <tom@tromey.com>
195
196 * spu-tdep.c (spu2ppu_sniffer): Update.
197 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
198 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
199 Remove.
200 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
201 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
202 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
203 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
204 (frame_pop): Update.
205
206 2017-09-25 Tom Tromey <tom@tromey.com>
207
208 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
209 * regcache.h (regcache_xfree): Don't declare.
210 * regcache.c (regcache_xfree): Remove.
211 (do_regcache_xfree): Use delete.
212 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
213 * linux-fork.c (free_fork): Use delete.
214 (fork_save_infrun_state): Likewise.
215 * jit.c (jit_dealloc_cache): Use delete.
216 * infrun.c (discard_infcall_suspend_state): Use delete.
217
218 2017-09-25 Tom Tromey <tom@tromey.com>
219
220 * regcache.h (regcache_xmalloc): Don't declare.
221 (regcache_raw_set_cached_value): Update comment.
222 * regcache.c (regcache_xmalloc): Remove.
223 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
224 * jit.c (jit_frame_sniffer): Use new.
225 * frame.c (frame_save_as_regcache): Use new.
226
227 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
228
229 * NEWS: Advertise support for guarded-storage registers on IBM z.
230
231 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
232
233 * s390-linux-nat.c (have_regset_gs): New static variable.
234 (s390_linux_fetch_inferior_registers): Handle guarded-storage
235 control block and guarded-storage broadcast control regsets.
236 (s390_read_description): Detect whether the target has
237 guarded-storage support, return appropriate tdesc.
238 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
239 (features/s390x-gs-linux64.c): Likewise.
240 (struct gdbarch_tdep) <have_gs>: New field.
241 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
242 (s390_gsbc_regset): New variables.
243 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
244 and s390_gsbc_regset, if applicable.
245 (s390_core_read_description): Check whether core file was from a
246 target with guarded-storage support; include appropriate regsets.
247 (s390_gdbarch_init): Add registers for guarded-storage support.
248 (_initialize_s390_tdep): Initialize new target descriptions that
249 include registers for guarded-storage support.
250 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
251 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
252 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
253 (S390_NUM_REGS): Adjust macro definition.
254 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
255 (tdesc_s390x_gs_linux64): New declarations.
256
257 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
258
259 * features/s390-gs-linux64.xml: New file.
260 * features/s390-gs.xml: New file.
261 * features/s390-gsbc.xml: New file.
262 * features/s390x-gs-linux64.xml: New file.
263 * features/Makefile (WHICH): Add s390-gs-linux64 and
264 s390x-gs-linux64.
265 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
266 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
267 * features/s390-gs-linux64.c: New generated file.
268 * features/s390x-gs-linux64.c: New file.
269 * regformats/s390-gs-linux64.dat: New file.
270 * regformats/s390x-gs-linux64.dat: New file.
271
272 2017-09-23 Tom Tromey <tom@tromey.com>
273
274 * defs.h (make_cleanup_override_quit_handler): Don't declare.
275
276 2017-09-22 Tom Tromey <tom@tromey.com>
277
278 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
279 type to scoped_restore_tmpl.
280 <scoped_input_handler>: Initialize m_quit_handler directly.
281
282 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
283
284 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
285 (cd_command): Likewise. Free "current_directory" before
286 assigning to it.
287 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
288 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
289 * top.c (gdb_dirbuf): Remove global declaration.
290 * top.h (gdb_dirbuf): Likewise.
291
292 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
293
294 * gnulib/aclocal.m4: Regenerate.
295 * gnulib/config.in: Regenerate.
296 * gnulib/configure: Regenerate.
297 * gnulib/import/Makefile.am: Regenerate.
298 * gnulib/import/Makefile.in: Regenerate.
299 * gnulib/import/assure.h: New file.
300 * gnulib/import/at-func.c: Likewise
301 * gnulib/import/chdir-long.c: New file.
302 * gnulib/import/chdir-long.h: New file.
303 * gnulib/import/cloexec.c: New file.
304 * gnulib/import/cloexec.h: New file.
305 * gnulib/import/close.c: New file.
306 * gnulib/import/closedir.c: New file.
307 * gnulib/import/dirent-private.h: New file.
308 * gnulib/import/dup-safer.c: New file.
309 * gnulib/import/dup.c: New file.
310 * gnulib/import/dup2.c: New file.
311 * gnulib/import/error.c: New file.
312 * gnulib/import/error.h: New file.
313 * gnulib/import/exitfail.c: New file.
314 * gnulib/import/exitfail.h: New file.
315 * gnulib/import/fchdir.c: New file.
316 * gnulib/import/fcntl.c: New file.
317 * gnulib/import/fcntl.in.h: New file.
318 * gnulib/import/fd-hook.c: New file.
319 * gnulib/import/fd-hook.h: New file.
320 * gnulib/import/fd-safer.c: New file.
321 * gnulib/import/fdopendir.c: New file.
322 * gnulib/import/filename.h: New file.
323 * gnulib/import/filenamecat-lgpl.c: New file.
324 * gnulib/import/filenamecat.h: New file.
325 * gnulib/import/fstat.c: New file.
326 * gnulib/import/fstatat.c: New file.
327 * gnulib/import/getcwd-lgpl.c: New file.
328 * gnulib/import/getcwd.c: New file.
329 * gnulib/import/getdtablesize.c: New file.
330 * gnulib/import/getlogin_r.c: New file.
331 * gnulib/import/getprogname.c: New file.
332 * gnulib/import/getprogname.h: New file.
333 * gnulib/import/gettext.h: New file.
334 * gnulib/import/glob-libc.h: New file.
335 * gnulib/import/glob.c: New file.
336 * gnulib/import/glob.in.h: New file.
337 * gnulib/import/intprops.h: New file.
338 * gnulib/import/m4/chdir-long.m4: New file.
339 * gnulib/import/m4/close.m4: New file.
340 * gnulib/import/m4/closedir.m4: New file.
341 * gnulib/import/m4/d-ino.m4: New file.
342 * gnulib/import/m4/d-type.m4: New file.
343 * gnulib/import/m4/dup.m4: New file.
344 * gnulib/import/m4/dup2.m4: New file.
345 * gnulib/import/m4/error.m4: New file.
346 * gnulib/import/m4/fchdir.m4: New file.
347 * gnulib/import/m4/fcntl.m4: New file.
348 * gnulib/import/m4/fcntl_h.m4: New file.
349 * gnulib/import/m4/fdopendir.m4: New file.
350 * gnulib/import/m4/filenamecat.m4: New file.
351 * gnulib/import/m4/fstat.m4: New file.
352 * gnulib/import/m4/fstatat.m4: New file.
353 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
354 * gnulib/import/m4/getcwd-path-max.m4: New file.
355 * gnulib/import/m4/getcwd.m4: New file.
356 * gnulib/import/m4/getdtablesize.m4: New file.
357 * gnulib/import/m4/getlogin_r.m4: New file.
358 * gnulib/import/m4/getprogname.m4: New file.
359 * gnulib/import/m4/glob.m4: New file.
360 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
361 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
362 * gnulib/import/m4/mempcpy.m4: New file.
363 * gnulib/import/m4/memrchr.m4: New file.
364 * gnulib/import/m4/mode_t.m4: New file.
365 * gnulib/import/m4/msvc-inval.m4: New file.
366 * gnulib/import/m4/msvc-nothrow.m4: New file.
367 * gnulib/import/m4/open.m4: New file.
368 * gnulib/import/m4/openat.m4: New file.
369 * gnulib/import/m4/opendir.m4: New file.
370 * gnulib/import/m4/readdir.m4: New file.
371 * gnulib/import/m4/realloc.m4: New file.
372 * gnulib/import/m4/rewinddir.m4: New file.
373 * gnulib/import/m4/save-cwd.m4: New file.
374 * gnulib/import/m4/strdup.m4: New file.
375 * gnulib/import/m4/strerror.m4: New file.
376 * gnulib/import/m4/unistd-safer.m4: New file.
377 * gnulib/import/mempcpy.c: New file.
378 * gnulib/import/memrchr.c: New file.
379 * gnulib/import/msvc-inval.c: New file.
380 * gnulib/import/msvc-inval.h: New file.
381 * gnulib/import/msvc-nothrow.c: New file.
382 * gnulib/import/msvc-nothrow.h: New file.
383 * gnulib/import/open.c: New file.
384 * gnulib/import/openat-die.c: New file.
385 * gnulib/import/openat-priv.h: New file.
386 * gnulib/import/openat-proc.c: New file.
387 * gnulib/import/openat.c: New file.
388 * gnulib/import/openat.h: New file.
389 * gnulib/import/opendir.c: New file.
390 * gnulib/import/pipe-safer.c: New file.
391 * gnulib/import/readdir.c: New file.
392 * gnulib/import/realloc.c: New file.
393 * gnulib/import/rewinddir.c: New file.
394 * gnulib/import/save-cwd.c: New file.
395 * gnulib/import/save-cwd.h: New file.
396 * gnulib/import/strdup.c: New file.
397 * gnulib/import/strerror-override.c: New file.
398 * gnulib/import/strerror-override.h: New file.
399 * gnulib/import/strerror.c: New file.
400 * gnulib/import/unistd--.h: New file.
401 * gnulib/import/unistd-safer.h: New file.
402 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
403 "getcwd" and "glob".
404 * ser-tcp.c: Undefine "close" before redefining it.
405
406 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
407
408 * guile/scm-value.c (gdbscm_value_address): Initialize address,
409 get rid of res_val.
410
411 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
412
413 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
414 <sol2,sparc>: Likewise.
415 <sol2-64,i386>: Likewise.
416
417 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
418 -Wdeprecated-declarations on *-*-solaris*.
419 * configure: Regenerate.
420
421 * procfs.c: Include "nat/inferior.h".
422 (procfs_info_proc): Fix typo.
423
424 2017-09-21 Kevin Buettner <kevinb@redhat.com>
425
426 * remote.c (vector): Include.
427 (struct private_thread_info): Add field, thread_handle.
428 (free_private_thread_info): Deallocate storage associated with
429 thread handle.
430 (get_private_info_thread): Initialize `thread_handle' field.
431 (struct thread_item): Add field, thread_handle.
432 (clear_threads_listing_context): Deallocate storage associated
433 with thread handle.
434 (start_thread): Add support for "handle" attribute.
435 (thread_attributes): Add "handle".
436 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
437 field.
438 (remote_update_thread_list): Update thread_handle.
439 (remote_thread_handle_to_thread_info): New function.
440 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
441
442 2017-09-21 Kevin Buettner <kevinb@redhat.com>
443
444 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
445 function.
446 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
447 * python/python-internal.h (thread_object_type): Declare.
448
449 2017-09-21 Kevin Buettner <kevinb@redhat.com>
450
451 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
452 (target_thread_handle_to_thread_info): Declare.
453 * target.c (target_thread_handle_to_thread_info): New function.
454 * target-delegates.c: Regenerate.
455 * gdbthread.h (find_thread_by_handle): Declare.
456 * thread.c (find_thread_by_handle): New function.
457 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
458 function.
459 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
460
461 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
462
463 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
464
465 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
466
467 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
468
469 2017-09-21 Yao Qi <yao.qi@linaro.org>
470
471 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
472 to gdb_target_obs.
473
474 2017-09-20 Tom Tromey <tom@tromey.com>
475
476 * breakpoint.c (struct counted_command_line): Remove.
477 (breakpoint_commands): Update.
478 (alloc_counted_command_line, incref_counted_command_line)
479 (decref_counted_command_line, do_cleanup_counted_command_line)
480 (make_cleanup_decref_counted_command_line): Remove.
481 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
482 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
483 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
484 (save_breakpoints): Update.
485 * breakpoint.h (counted_command_line): Now a typedef to
486 shared_ptr.
487 (struct breakpoint) <commands>: Now a counted_command_line.
488 (struct bpstats) <command>: Likewise.
489
490 2017-09-20 Tom Tromey <tom@tromey.com>
491
492 * breakpoint.c (struct commands_info, do_map_commands_command):
493 Remove.
494 (commands_command_1): Update.
495 (iterate_over_related_breakpoints): Take a function_view.
496 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
497 (delete_command): Update.
498 (map_breakpoint_numbers): Take a function_view.
499 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
500 (disable_command): Update.
501 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
502 (enable_command): Update.
503 (struct disp_data, do_enable_breakpoint_disp)
504 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
505 (do_map_enable_delete_breakpoint): Remove.
506 (enable_once_command, enable_count_command, enable_delete_command)
507 (delete_trace_variable_command): Update.
508
509 2017-09-20 Tom Tromey <tom@tromey.com>
510
511 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
512 (bpstat_clear): Use delete.
513 (bpstats): New constructors.
514 (bpstat_copy, bpstat_stop_status): Use new.
515 (dprintf_after_condition_true): Update.
516 * breakpoint.h (bpstats::bpstats): Add constructors.
517 (bpstats::~bpstats): Add destructor.
518
519 2017-09-20 Pedro Alves <palves@redhat.com>
520
521 * eval.c (make_params): Delete, refactored as ...
522 (class fake_method): ... this new type's ctor.
523 (fake_method::~fake_method): New.
524 (evaluate_subexp_standard): Use 'fake_method'.
525
526 2017-09-20 Tom Tromey <tom@tromey.com>
527
528 * windows-nat.c (get_windows_debug_event, windows_wait)
529 (do_initial_windows_stuff, windows_attach): Update.
530 * utils.c (vwarning, internal_vproblem): Update.
531 (ui_unregister_input_event_handler_cleanup)
532 (prepare_to_handle_input): Remove.
533 (class scoped_input_handler): New.
534 (defaulted_query, prompt_for_continue): Update.
535 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
536 Update.
537 * top.c (undo_terminal_modifications_before_exit): Update.
538 * target/target.h (target_terminal_init, target_terminal_inferior)
539 (target_terminal_ours): Don't declare.
540 (class target_terminal): New.
541 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
542 (target_terminal_ours_for_output)
543 (make_cleanup_restore_target_terminal): Don't declare.
544 (target_terminal_info): Remove.
545 * target.c (enum terminal_state, terminal_state): Remove.
546 (target_terminal::terminal_state): Define.
547 (target_terminal::init): Rename from target_terminal_init.
548 (target_terminal::inferior): Rename from
549 target_terminal_inferior.
550 (target_terminal::ours): Rename from target_terminal_ours.
551 (target_terminal::ours_for_output): Rename from
552 target_terminal_ours_for_output.
553 (target_terminal::info): New method.
554 (cleanup_restore_target_terminal)
555 (make_cleanup_restore_target_terminal): Remove.
556 * solib.c (handle_solib_event): Update.
557 * remote.c (remote_serial_quit_handler): Update.
558 (remote_terminal_inferior, remote_wait_as): Update.
559 * record-full.c (record_full_wait_1): Update.
560 * nto-procfs.c (procfs_create_inferior): Update.
561 * nat/fork-inferior.c (startup_inferior): Update.
562 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
563 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
564 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
565 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
566 (mi_breakpoint_created, mi_breakpoint_deleted)
567 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
568 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
569 (mi_user_selected_context_changed, report_initial_inferior):
570 Update.
571 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
572 (linux_nat_terminal_inferior): Update.
573 * infrun.c (follow_fork_inferior)
574 (handle_vfork_child_exec_or_exit, do_target_resume)
575 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
576 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
577 Update.
578 * inflow.c (child_terminal_init, info_terminal_command): Update.
579 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
580 (attach_command): Update.
581 * infcall.c (call_thread_fsm_should_stop): Update.
582 * gnu-nat.c (gnu_attach): Update.
583 * extension.c (struct active_ext_lang_state)
584 (restore_active_ext_lang): Update.
585 * exceptions.c (print_flush): Update.
586 * event-top.c (async_enable_stdin, default_quit_handler): Update.
587 (struct quit_handler_cleanup_data, restore_quit_handler)
588 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
589 Remove.
590 * cp-support.c (gdb_demangle): Update.
591 * breakpoint.c (update_inserted_breakpoint_locations)
592 (insert_breakpoint_locations, handle_jit_event)
593 (disable_breakpoints_in_unloaded_shlib): Update.
594 * annotate.c (annotate_breakpoints_invalid)
595 (annotate_frames_invalid): Update.
596
597 2017-09-20 Tom Tromey <tom@tromey.com>
598
599 * main.c (catch_command_errors): Rename from
600 catch_command_errors_const.
601 (captured_main_1): Update.
602
603 2017-09-20 Pedro Alves <palves@redhat.com>
604
605 * cli/cli-cmds.c (list_command): Use print_sal_location.
606 (print_sal_location): New function.
607 (ambiguous_line_spec): Use print_sal_location.
608 * linespec.c (symbol_to_sal): Record the symbol in the sal.
609 * symtab.c (find_function_start_sal): Likewise.
610 * symtab.h (symtab_and_line::symbol): New field.
611
612 2017-09-20 Pedro Alves <palves@redhat.com>
613
614 * linespec.c (minsym_found): Handle non-text minsyms.
615 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
616
617 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
618
619 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
620 backslash.
621
622 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
623
624 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
625 vmovups instead vmovaps.
626 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
627
628 2017-09-19 John Baldwin <jhb@FreeBSD.org>
629
630 * NEWS (Changes since GDB 8.0): Add starti.
631 * infcmd.c (enum run_break): New.
632 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
633 case.
634 (run_command): Use enum run_how.
635 (start_command): Likewise.
636 (starti_command): New function.
637 (RUN_ARGS_HELP): New macro.
638 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
639 commands. Add starti command.
640
641 2017-09-19 Yao Qi <yao.qi@linaro.org>
642
643 * Makefile.in (monitor.o): Remove the rule.
644
645 2017-09-19 Yao Qi <yao.qi@linaro.org>
646
647 * annotate.h (struct annotate_arg_emitter): Use
648 DISABLE_COPY_AND_ASSIGN.
649 * common/refcounted-object.h (refcounted_object): Likewise.
650 * completer.h (struct completion_result): Likewise.
651 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
652 * filename-seen-cache.h (filename_seen_cache): Likewise.
653 * gdbcore.h (thread_section_name): Likewise.
654 * gdb_regex.h (compiled_regex): Likewise.
655 * gdbthread.h (scoped_restore_current_thread): Likewise.
656 * inferior.h (scoped_restore_current_inferior): Likewise.
657 * jit.c (jit_reader): Likewise.
658 * linespec.h (struct linespec_result): Likewise.
659 * mi/mi-parse.h (struct mi_parse): Likewise.
660 * nat/fork-inferior.c (execv_argv): Likewise.
661 * progspace.h (scoped_restore_current_program_space): Likewise.
662 * python/python-internal.h (class gdbpy_enter): Likewise.
663 * regcache.h (regcache): Likewise.
664 * target-descriptions.c (struct tdesc_reg): Likewise.
665 (struct tdesc_type): Likewise.
666 (struct tdesc_feature): Likewise.
667 * ui-out.h (ui_out_emit_type): Likewise.
668
669 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
670
671 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
672 label abort_expression.
673
674 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
675
676 * common/buffer.c (buffer_xml_printf): Adjust.
677 * common/xml-utils.c (xml_escape_text): Change return type to
678 std::string, update code accordingly.
679 * common/xml-utils.h (xml_escape_text): Change return type to
680 std::string.
681 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
682 * windows-tdep.c (windows_xfer_shared_library): Adjust.
683 * unittests/xml-utils-selftests.c (test_xml_escape_text):
684 Adjust.
685
686 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
687
688 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
689 (SUBDIR_UNITTESTS_OBS): Add new object file.
690 * unittests/xml-utils-selftests.c: New file.
691
692 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
693
694 * common/selftest.h (selftest): New struct/interface.
695 (register_test): Add name parameter, add new overload.
696 (run_tests): Add filter parameter.
697 (for_each_selftest_ftype): New typedef.
698 (for_each_selftest): New declaration.
699 * common/selftest.c (tests): Change type to
700 map<string, unique_ptr<selftest>>.
701 (simple_selftest): New struct.
702 (register_test): New function.
703 (register_test): Add name parameter and use it.
704 (run_tests): Add filter parameter and use it. Add prints.
705 Adjust to vector -> map change.
706 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
707 registering selftests.
708 * arm-tdep.c (_initialize_arm_tdep): Likewise.
709 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
710 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
711 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
712 * findvar.c (_initialize_findvar): Likewise.
713 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
714 * maint.c (maintenance_selftest): Update call to run_tests.
715 (maintenance_info_selftests): New function.
716 (_initialize_maint_cmds): Register "maintenance info selftests"
717 command. Update "maintenance selftest" doc.
718 * regcache.c (_initialize_regcache): Add names when registering
719 selftests.
720 * rust-exp.y (_initialize_rust_exp): Likewise.
721 * selftest-arch.c (gdbarch_selftest): New struct.
722 (gdbarch_tests): Remove.
723 (register_test_foreach_arch): Add name parameter. Call
724 register_test.
725 (tests_with_arch): Remove, move most content to
726 gdbarch_selftest::operator().
727 (_initialize_selftests_foreach_arch): Remove.
728 * selftest-arch.h (register_test_foreach_arch): Add name
729 parameter.
730 (run_tests_with_arch): New declaration.
731 * utils-selftests.c (_initialize_utils_selftests): Add names
732 when registering selftests.
733 * utils.c (_initialize_utils): Likewise.
734 * unittests/array-view-selftests.c
735 (_initialize_array_view_selftests): Likewise.
736 * unittests/environ-selftests.c (_initialize_environ_selftests):
737 Likewise.
738 * unittests/function-view-selftests.c
739 (_initialize_function_view_selftests): Likewise.
740 * unittests/offset-type-selftests.c
741 (_initialize_offset_type_selftests): Likewise.
742 * unittests/optional-selftests.c
743 (_initialize_optional_selftests): Likewise.
744 * unittests/scoped_restore-selftests.c
745 (_initialize_scoped_restore_selftests): Likewise.
746 * NEWS: Document "maintenance selftest" and "maint info
747 selftests".
748
749 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
750
751 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
752 scoped_restore.
753
754 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
755
756 * mi/mi-main.c (mi_load_progress): Make uiout variable
757 a unique_ptr.
758
759 2017-09-15 Pedro Alves <palves@redhat.com>
760
761 * compile/compile-c-types.c (convert_enum, convert_int)
762 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
763
764 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
765
766 * dwarf2read.c (copy_string): Remove.
767 (parse_macro_definition): Replace copy_string with savestring.
768
769 2017-09-15 Yao Qi <yao.qi@linaro.org>
770
771 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
772 gdb_target_obs.
773 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
774 Likewise.
775 (i[34567]86-*-linux*): Likewise.
776
777 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
778
779 * dwarf2expr.h (dwarf_stack_value): Add constructor.
780 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
781 <stack>: Change type to std::vector.
782 <stack_len, stack_allocated>: Remove.
783 <grow_stack>: Remove.
784 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
785 (dwarf_expr_context::~dwarf_expr_context): Remove.
786 (dwarf_expr_context::grow_stack): Remove.
787 (dwarf_expr_context::push): Adjust.
788 (dwarf_expr_context::pop): Adjust.
789 (dwarf_expr_context::fetch): Adjust.
790 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
791 (dwarf_expr_context::stack_empty_p): Adjust.
792 (dwarf_expr_context::execute_stack_op): Adjust.
793
794 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
795
796 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
797 return type to bool.
798 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
799
800 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
801
802 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
803 Change type to bool.
804 (dwarf_stack_value) <in_stack_memory>: Likewise.
805 (dwarf_expr_context) <push_address>: Change parameter type to
806 bool.
807 <fetch_in_stack_memory>: Change return type to bool.
808 <push>: Change parameter type to bool.
809 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
810 to bool.
811 (dwarf_expr_context::push_address): Likewise.
812 (dwarf_expr_context::fetch_in_stack_memory): Change return type
813 to bool.
814 (dwarf_expr_context::execute_stack_op): Adjust.
815 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
816
817 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
818
819 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
820 (struct dwarf_expr_context) <n_pieces>: Remove.
821 <pieces>: Change type to std::vector.
822 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
823 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
824 pieces.
825 (dwarf_expr_context::add_piece): Adjust.
826 * dwarf2loc.c (struct piece_closure): Initialize fields.
827 <n_pieces>: Remove.
828 <pieces>: Change type to std::vector.
829 (allocate_piece_closure): Adjust, change parameter to
830 std::vector rvalue and std::move it to piece_closure.
831 (rw_pieced_value): Adjust.
832 (check_pieced_synthetic_pointer): Adjust.
833 (indirect_synthetic_pointer): Adjust.
834 (coerce_pieced_ref): Adjust.
835 (free_pieced_value_closure): Adjust. Use delete to free
836 piece_closure.
837 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
838 to allocate_piece_closure.
839 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
840
841 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
842
843 * probe.h (probe_ops_cp): Remove typedef.
844 (DEF_VEC_P (probe_ops_cp)): Remove.
845 (all_probe_ops): Change type to std::vector.
846 * probe.c (info_probes_for_ops): Adjust to vector change.
847 (probe_linespec_to_ops): Likewise.
848 (all_probe_ops): Change type to std::vector.
849 (_initialize_probe): Adjust to vector change.
850 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
851 * elfread.c (elf_get_probes): Likewise.
852 * stap-probe.c (_initialize_stap_probe): Likewise.
853
854 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
855
856 * probe.h (struct bound_probe): Define constructors.
857 * probe.c (bound_probe_s): Remove typedef.
858 (DEF_VEC_O (bound_probe_s)): Remove VEC.
859 (collect_probes): Change return type to std::vector, remove
860 cleanup.
861 (compare_probes): Return bool, change parameter type. Change
862 semantic to "less than".
863 (gen_ui_out_table_header_info): Change parameter to std::vector
864 and update.
865 (exists_probe_with_pops): Likewise.
866 (info_probes_for_ops): Update to std::vector change.
867 (enable_probes_command): Likewise.
868 (disable_probes_command): Likewise.
869
870 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
871
872 * probe.h (struct probe_ops) <get_probes>: Change parameter from
873 vec to std::vector.
874 * probe.c (parse_probes_in_pspace): Update.
875 (find_probes_in_objfile): Update.
876 (find_probe_by_pc): Update.
877 (collect_probes): Update.
878 (probe_any_get_probes): Update.
879 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
880 return type to reference to std::vector.
881 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
882 std::vector and update.
883 (dtrace_process_dof): Likewise.
884 (dtrace_get_probes): Likewise.
885 * elfread.c (elf_get_probes): Change return type to std::vector,
886 store an std::vector in bfd_data.
887 (probe_key_free): Update to std::vector.
888 * stap-probe.c (handle_stap_probe): Change parameter to
889 std::vector and update.
890 (stap_get_probes): Likewise.
891 * symfile-debug.c (debug_sym_get_probes): Change return type to
892 std::vector and update.
893
894 2017-09-11 Tom Tromey <tom@tromey.com>
895
896 * breakpoint.c (program_breakpoint_here_p): Update.
897 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
898 from make_show_memory_breakpoints_cleanup. Return a
899 scoped_restore_tmpl<int>.
900 (restore_show_memory_breakpoints): Remove.
901 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
902 * mem-break.c (memory_validate_breakpoint): Update.
903 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
904 (ia64_memory_remove_breakpoint): Update.
905 (ia64_breakpoint_from_pc): Update.
906 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
907 from make_show_memory_breakpoints_cleanup.
908
909 2017-09-11 Tom Tromey <tom@tromey.com>
910
911 * d-namespace.c (d_lookup_symbol): Use std::string.
912 (find_symbol_in_baseclass): Likewise.
913
914 2017-09-11 Tom Tromey <tom@tromey.com>
915
916 * ctf.c (ctf_start): Use std::string.
917
918 2017-09-11 Tom Tromey <tom@tromey.com>
919
920 * ada-lang.c (is_known_support_routine): Update.
921 (ada_unhandled_exception_name_addr_from_raise): Update.
922 * guile/scm-frame.c (gdbscm_frame_name): Update.
923 * python/py-frame.c (frapy_name): Update.
924 (frapy_function): Update.
925 * stack.h (find_frame_funname): Update.
926 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
927 (print_frame): Update.
928
929 2017-09-11 Tom Tromey <tom@tromey.com>
930
931 * findcmd.c (put_bits): Take a gdb::byte_vector.
932 (parse_find_args): Return gdb::byte_vector. "args" now const.
933 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
934 cleanups.
935 (find_command): Update.
936
937 2017-09-11 Tom Tromey <tom@tromey.com>
938
939 * cli/cli-script.c (class scoped_restore_hook_in): New.
940 (clear_hook_in_cleanup): Remove.
941 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
942 scoped_restore_hook_in.
943
944 2017-09-11 Tom Tromey <tom@tromey.com>
945
946 * cli/cli-script.c (restore_interp): Remove.
947 (read_command_lines): Use scoped_restore_interp.
948 * interps.c (scoped_restore_interp::set_temp): Rename from
949 interp_set_temp.
950 * interps.h (class scoped_restore_interp): New.
951 (interp_set_temp): Remove.
952
953 2017-09-11 Tom Tromey <tom@tromey.com>
954
955 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
956 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
957 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
958 scoped_restore.
959 (mi_cmd_break_insert_1): Update.
960 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
961 scoped_restore.
962
963 2017-09-11 Tom Tromey <tom@tromey.com>
964
965 * demangle.c (demangle_command): Update.
966 * breakpoint.c (disable_command): Update.
967 (enable_command): Update.
968 (find_location_by_number): Make "number" const. Use
969 get_number_trailer.
970 * cli/cli-utils.c (extract_arg): Return std::string.
971 * probe.c (parse_probe_linespec): Update. Change types.
972 (collect_probes): Take string arguments.
973 (parse_probe_linespec): Likewise.
974 (info_probes_for_ops): Update.
975 (enable_probes_command): Update.
976 (disable_probes_command): Update.
977 * break-catch-sig.c (catch_signal_split_args): Update.
978 * mi/mi-parse.c (mi_parse): Update.
979
980 2017-09-11 Tom Tromey <tom@tromey.com>
981
982 * language.h (language_enum): Make argument const.
983 * language.c (language_enum): Make argument const.
984
985 2017-09-11 Tom Tromey <tom@tromey.com>
986
987 * common/common-utils.h (skip_to_space): Remove macro, redeclare
988 as function.
989 (skip_to_space): Rename from skip_to_space_const.
990 * common/common-utils.c (skip_to_space): New function.
991 (skip_to_space): Rename from skip_to_space_const.
992 * cli/cli-utils.h (get_number): Rename from get_number_const.
993 (extract_arg): Rename from extract_arg_const.
994 * cli/cli-utils.c (get_number): Rename from get_number_const.
995 (extract_arg): Rename from extract_arg_const.
996 (number_or_range_parser::get_number): Use ::get_number.
997 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
998 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
999 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1000 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1001 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1002 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1003 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1004 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1005
1006 2017-09-11 Tom Tromey <tom@tromey.com>
1007
1008 * python/python.c (do_start_initialization): Use
1009 py-event-types.def to initialize types.
1010 Define all object type structures.
1011 * python/python-internal.h: Don't declare event initialization
1012 functions.
1013 * python/py-threadevent.c (thread_event_object_type): Don't
1014 define.
1015 * python/py-stopevent.c (stop_event_object_type): Don't define.
1016 * python/py-signalevent.c (signal_event_object_type): Don't
1017 declare or define.
1018 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1019 (clear_objfiles_event_object_type): Don't declare or define.
1020 * python/py-infevents.c (inferior_call_pre_event_object_type)
1021 (inferior_call_post_event_object_type)
1022 (register_changed_event_object_type)
1023 (memory_changed_event_object_type): Don't declare or define.
1024 * python/py-inferior.c (new_thread_event_object_type)
1025 (new_inferior_event_object_type)
1026 (inferior_deleted_event_object_type): Don't declare or define.
1027 * python/py-exitedevent.c (exited_event_object_type): Don't
1028 declare or define.
1029 * python/py-evts.c (gdbpy_initialize_py_events): Use
1030 py-all-events.def.
1031 * python/py-events.h (thread_event_object_type): Don't declare.
1032 (events_object): Use py-all-events.def.
1033 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1034 py-event-types.def.
1035 * python/py-event-types.def: New file.
1036 * python/py-continueevent.c (create_continue_event_object): Don't
1037 declare or define.
1038 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1039 declare or define.
1040 * python/py-all-events.def: New file.
1041
1042 2017-09-11 Tom Tromey <tom@tromey.com>
1043
1044 * python/py-threadevent.c (create_thread_event_object): Return
1045 gdbpy_ref.
1046 * python/py-stopevent.h (create_stop_event_object)
1047 (create_breakpoint_event_object, create_signal_event_object):
1048 Update.
1049 * python/py-stopevent.c (create_stop_event_object): Return
1050 gdbpy_ref.
1051 (emit_stop_event): Update.
1052 * python/py-signalevent.c (create_signal_event_object): Return
1053 gdbpy_ref.
1054 * python/py-infevents.c (create_inferior_call_event_object):
1055 Update.
1056 * python/py-event.h (create_event_object)
1057 (create_thread_event_object): Update.
1058 * python/py-event.c (create_event_object): Return gdbpy_ref.
1059 * python/py-continueevent.c: Return gdbpy_ref.
1060 * python/py-bpevent.c (create_breakpoint_event_object): Return
1061 gdbpy_ref.
1062
1063 2017-09-11 Tom Tromey <tom@tromey.com>
1064
1065 PR python/15622:
1066 * NEWS: Add entry.
1067 * python/python.c (do_start_initialization): Initialize new event
1068 types.
1069 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1070 (gdbpy_initialize_inferior_deleted_event)
1071 (gdbpy_initialize_new_thread_event): Declare.
1072 * python/py-threadevent.c (create_thread_event_object): Add option
1073 "thread" parameter.
1074 * python/py-inferior.c (new_thread_event_object_type)
1075 (new_inferior_event_object_type)
1076 (inferior_deleted_event_object_type): Declare.
1077 (python_new_inferior, python_inferior_deleted): New functions.
1078 (add_thread_object): Emit new_thread event.
1079 (gdbpy_initialize_inferior): Attach new functions to corresponding
1080 observers.
1081 (new_thread, new_inferior, inferior_deleted): Define new event
1082 types.
1083 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1084 registries.
1085 * python/py-events.h (events_object) <new_inferior,
1086 inferior_deleted, new_thread>: New fields.
1087 * python/py-event.h (create_thread_event_breakpoint): Add optional
1088 "thread" parameter.
1089
1090 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1091
1092 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1093 check current_ui instead.
1094 (internal_vproblem): Likewise.
1095
1096 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1097
1098 * thread.c (print_thread_info_1): Remove unnecessary calls to
1099 uiout->is_mi_like_p.
1100
1101 2017-09-09 Tom Tromey <tom@tromey.com>
1102
1103 * namespace.h (add_using_directive): Update.
1104 * namespace.c (add_using_directive): Change type of excludes to
1105 std::vector.
1106 * dwarf2read.c (read_import_statement): Use std::vector.
1107 (read_namespace): Update.
1108 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1109
1110 2017-09-09 Tom Tromey <tom@tromey.com>
1111
1112 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1113
1114 2017-09-09 Tom Tromey <tom@tromey.com>
1115
1116 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1117
1118 2017-09-09 Tom Tromey <tom@tromey.com>
1119
1120 * stack.c (func_command): Use gdb::def_vector.
1121
1122 2017-09-09 Tom Tromey <tom@tromey.com>
1123
1124 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1125 ui_out_emit_list, ui_out_emit_tuple.
1126 (mi_cmd_var_update): Likewise.
1127
1128 2017-09-09 Tom Tromey <tom@tromey.com>
1129
1130 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1131 ui_out_redirect_pop.
1132 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1133 ui_out_redirect_pop.
1134 * utils.c (do_ui_out_redirect_pop)
1135 (make_cleanup_ui_out_redirect_pop): Remove.
1136 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1137 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1138 * ui-out.h (ui_out_redirect_pop): New class.
1139
1140 2017-09-09 Tom Tromey <tom@tromey.com>
1141
1142 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1143 (list_available_thread_groups, mi_cmd_list_thread_groups)
1144 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1145 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1146 Likewise.
1147
1148 2017-09-09 Tom Tromey <tom@tromey.com>
1149
1150 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1151 ui_out_emit_tuple.
1152
1153 2017-09-09 Tom Tromey <tom@tromey.com>
1154
1155 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1156 * stack.c (print_frame): Use ui_out_emit_tuple.
1157 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1158 (info_spu_mailbox_command, info_spu_dma_command)
1159 (info_spu_proxydma_command): Likewise.
1160 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1161 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1162 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1163 ui_out_emit_tuple.
1164 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1165
1166 2017-09-09 Tom Tromey <tom@tromey.com>
1167
1168 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1169 (class ui_out_emit_table): Update comment.
1170 * ui-out.c (do_cleanup_table_end)
1171 (make_cleanup_ui_out_table_begin_end): Remove.
1172 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1173 (info_spu_dma_cmdlist): Likewise.
1174 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1175 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1176 ui_out_emit_table.
1177
1178 2017-09-09 Tom Tromey <tom@tromey.com>
1179
1180 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1181 ui_out_emit_list, gdb::optional.
1182
1183 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1184
1185 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1186 prototype.
1187 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1188 prototype.
1189 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1190 prototype.
1191 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1192 * ada-exp.y: Remove _initialize_ada_exp prototype.
1193 * ada-lang.c: Remove _initialize_ada_language prototype.
1194 * ada-tasks.c: Remove _initialize_tasks prototype.
1195 * addrmap.c: Remove _initialize_addrmap prototype.
1196 * agent.c: Remove _initialize_agent prototype.
1197 * aix-thread.c: Remove _initialize_aix_thread prototype.
1198 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1199 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1200 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1201 prototype.
1202 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1203 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1204 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1205 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1206 prototype.
1207 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1208 prototype.
1209 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1210 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1211 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1212 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1213 prototype.
1214 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1215 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1216 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1217 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1218 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1219 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1220 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1221 prototype.
1222 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1223 prototype.
1224 * annotate.c: Remove _initialize_annotate prototype.
1225 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1226 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1227 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1228 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1229 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1230 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1231 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1232 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1233 prototype.
1234 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1235 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1236 * auto-load.c: Remove _initialize_auto_load prototype.
1237 * auxv.c: Remove _initialize_auxv prototype.
1238 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1239 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1240 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1241 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1242 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1243 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1244 prototype.
1245 * break-catch-throw.c: Remove _initialize_break_catch_throw
1246 prototype.
1247 * breakpoint.c: Remove _initialize_breakpoint prototype.
1248 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1249 * btrace.c: Remove _initialize_btrace prototype.
1250 * charset.c: Remove _initialize_charset prototype.
1251 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1252 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1253 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1254 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1255 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1256 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1257 * coffread.c: Remove _initialize_coffread prototype.
1258 * compile/compile.c: Remove _initialize_compile prototype.
1259 * complaints.c: Remove _initialize_complaints prototype.
1260 * completer.c: Remove _initialize_completer prototype.
1261 * copying.awk: Remove _initialize_copying prototype.
1262 * copying.c: Regenerate.
1263 * core-regset.c: Remove _initialize_core_regset prototype.
1264 * corefile.c: Remove _initialize_core prototype.
1265 * corelow.c: Remove _initialize_corelow prototype.
1266 * cp-abi.c: Remove _initialize_cp_abi prototype.
1267 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1268 * cp-support.c: Remove _initialize_cp_support prototype.
1269 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1270 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1271 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1272 * ctf.c: Remove _initialize_ctf prototype.
1273 * d-lang.c: Remove _initialize_d_language prototype.
1274 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1275 prototype.
1276 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1277 * dbxread.c: Remove _initialize_dbxread prototype.
1278 * dcache.c: Remove _initialize_dcache prototype.
1279 * demangle.c: Remove _initialize_demangler prototype.
1280 * disasm-selftests.c: Remove _initialize_disasm_selftests
1281 prototype.
1282 * disasm.c: Remove _initialize_disasm prototype.
1283 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1284 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1285 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1286 prototype.
1287 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1288 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1289 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1290 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1291 * elfread.c: Remove _initialize_elfread prototype.
1292 * exec.c: Remove _initialize_exec prototype.
1293 * extension.c: Remove _initialize_extension prototype.
1294 * f-lang.c: Remove _initialize_f_language prototype.
1295 * f-valprint.c: Remove _initialize_f_valprint prototype.
1296 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1297 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1298 * filesystem.c: Remove _initialize_filesystem prototype.
1299 * findcmd.c: Remove _initialize_mem_search prototype.
1300 * fork-child.c: Remove _initialize_fork_child prototype.
1301 * frame-base.c: Remove _initialize_frame_base prototype.
1302 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1303 * frame.c: Remove _initialize_frame prototype.
1304 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1305 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1306 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1307 * gcore.c: Remove _initialize_gcore prototype.
1308 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1309 * gdbarch.c: Regenerate.
1310 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1311 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1312 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1313 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1314 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1315 * go-lang.c: Remove _initialize_go_language prototype.
1316 * go32-nat.c: Remove _initialize_go32_nat prototype.
1317 * guile/guile.c: Remove _initialize_guile prototype.
1318 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1319 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1320 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1321 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1322 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1323 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1324 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1325 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1326 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1327 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1328 prototype.
1329 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1330 prototype.
1331 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1332 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1333 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1334 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1335 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1336 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1337 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1338 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1339 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1340 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1341 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1342 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1343 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1344 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1345 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1346 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1347 prototype.
1348 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1349 prototype.
1350 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1351 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1352 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1353 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1354 * infcall.c: Remove _initialize_infcall prototype.
1355 * infcmd.c: Remove _initialize_infcmd prototype.
1356 * inferior.c: Remove _initialize_inferiors prototype.
1357 * inflow.c: Remove _initialize_inflow prototype.
1358 * infrun.c: Remove _initialize_infrun prototype.
1359 * interps.c: Remove _initialize_interpreter prototype.
1360 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1361 * jit.c: Remove _initialize_jit prototype.
1362 * language.c: Remove _initialize_language prototype.
1363 * linux-fork.c: Remove _initialize_linux_fork prototype.
1364 * linux-nat.c: Remove _initialize_linux_nat prototype.
1365 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1366 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1367 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1368 * m2-lang.c: Remove _initialize_m2_language prototype.
1369 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1370 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1371 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1372 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1373 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1374 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1375 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1376 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1377 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1378 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1379 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1380 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1381 * machoread.c: Remove _initialize_machoread prototype.
1382 * macrocmd.c: Remove _initialize_macrocmd prototype.
1383 * macroscope.c: Remove _initialize_macroscope prototype.
1384 * maint.c: Remove _initialize_maint_cmds prototype.
1385 * mdebugread.c: Remove _initialize_mdebugread prototype.
1386 * memattr.c: Remove _initialize_mem prototype.
1387 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1388 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1389 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1390 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1391 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1392 * microblaze-linux-tdep.c: Remove
1393 _initialize_microblaze_linux_tdep prototype.
1394 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1395 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1396 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1397 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1398 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1399 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1400 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1401 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1402 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1403 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1404 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1405 prototype.
1406 * mipsread.c: Remove _initialize_mipsread prototype.
1407 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1408 prototype.
1409 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1410 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1411 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1412 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1413 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1414 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1415 prototype.
1416 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1417 * nto-procfs.c: Remove _initialize_procfs prototype.
1418 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1419 * objc-lang.c: Remove _initialize_objc_language prototype.
1420 * objfiles.c: Remove _initialize_objfiles prototype.
1421 * observer.c: Remove observer_test_first_notification_function,
1422 observer_test_second_notification_function,
1423 observer_test_third_notification_function, and
1424 _initialize_observer prototypes.
1425 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1426 * osabi.c: Remove _initialize_gdb_osabi prototype.
1427 * osdata.c: Remove _initialize_osdata prototype.
1428 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1429 * parse.c: Remove _initialize_parse prototype.
1430 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1431 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1432 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1433 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1434 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1435 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1436 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1437 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1438 * printcmd.c: Remove _initialize_printcmd prototype.
1439 * probe.c: Remove _initialize_probe prototype.
1440 * proc-api.c: Remove _initialize_proc_api prototype.
1441 * proc-events.c: Remove _initialize_proc_events prototype.
1442 * proc-service.c: Remove _initialize_proc_service prototype.
1443 * procfs.c: Remove _initialize_procfs prototype.
1444 * psymtab.c: Remove _initialize_psymtab prototype.
1445 * python/python.c: Remove _initialize_python prototype.
1446 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1447 * record-btrace.c: Remove _initialize_record_btrace prototype.
1448 * record-full.c: Remove _initialize_record_full prototype.
1449 * record.c: Remove _initialize_record prototype.
1450 * regcache.c: Remove _initialize_regcache prototype.
1451 * reggroups.c: Remove _initialize_reggroup prototype.
1452 * remote-notif.c: Remove _initialize_notif prototype.
1453 * remote-sim.c: Remove _initialize_remote_sim prototype.
1454 * remote.c: Remove _initialize_remote prototype.
1455 * reverse.c: Remove _initialize_reverse prototype.
1456 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1457 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1458 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1459 prototype.
1460 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1461 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1462 * rust-exp.y: Remove _initialize_rust_exp prototype.
1463 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1464 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1465 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1466 * score-tdep.c: Remove _initialize_score_tdep prototype.
1467 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1468 prototype.
1469 * ser-go32.c: Remove _initialize_ser_dos prototype.
1470 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1471 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1472 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1473 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1474 * serial.c: Remove _initialize_serial prototype.
1475 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1476 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1477 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1478 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1479 * skip.c: Remove _initialize_step_skip prototype.
1480 * sol-thread.c: Remove _initialize_sol_thread prototype.
1481 * solib-aix.c: Remove _initialize_solib_aix prototype.
1482 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1483 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1484 * solib-frv.c: Remove _initialize_frv_solib prototype.
1485 * solib-spu.c: Remove _initialize_spu_solib prototype.
1486 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1487 * solib-target.c: Remove _initialize_solib_target prototype.
1488 * solib.c: Remove _initialize_solib prototype.
1489 * source.c: Remove _initialize_source prototype.
1490 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1491 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1492 prototype.
1493 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1494 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1495 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1496 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1497 prototype.
1498 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1499 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1500 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1501 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1502 prototype.
1503 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1504 prototype.
1505 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1506 prototype.
1507 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1508 prototype.
1509 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1510 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1511 prototype.
1512 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1513 prototype.
1514 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1515 prototype.
1516 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1517 prototype.
1518 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1519 prototype.
1520 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1521 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1522 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1523 * stabsread.c: Remove _initialize_stabsread prototype.
1524 * stack.c: Remove _initialize_stack prototype.
1525 * stap-probe.c: Remove _initialize_stap_probe prototype.
1526 * std-regs.c: Remove _initialize_frame_reg prototype.
1527 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1528 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1529 * symfile.c: Remove _initialize_symfile prototype.
1530 * symmisc.c: Remove _initialize_symmisc prototype.
1531 * symtab.c: Remove _initialize_symtab prototype.
1532 * target-dcache.c: Remove _initialize_target_dcache prototype.
1533 * target-descriptions.c: Remove _initialize_target_descriptions
1534 prototype.
1535 * thread.c: Remove _initialize_thread prototype.
1536 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1537 prototype.
1538 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1539 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1540 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1541 prototype.
1542 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1543 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1544 * tracefile.c: Remove _initialize_tracefile prototype.
1545 * tracepoint.c: Remove _initialize_tracepoint prototype.
1546 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1547 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1548 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1549 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1550 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1551 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1552 * tui/tui.c: Remove _initialize_tui prototype.
1553 * typeprint.c: Remove _initialize_typeprint prototype.
1554 * user-regs.c: Remove _initialize_user_regs prototype.
1555 * utils.c: Remove _initialize_utils prototype.
1556 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1557 * valarith.c: Remove _initialize_valarith prototype.
1558 * valops.c: Remove _initialize_valops prototype.
1559 * valprint.c: Remove _initialize_valprint prototype.
1560 * value.c: Remove _initialize_values prototype.
1561 * varobj.c: Remove _initialize_varobj prototype.
1562 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1563 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1564 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1565 * windows-nat.c: Remove _initialize_windows_nat,
1566 _initialize_check_for_gdb_ini, and _initialize_loadable
1567 prototypes.
1568 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1569 * xcoffread.c: Remove _initialize_xcoffread prototype.
1570 * xml-support.c: Remove _initialize_xml_support prototype.
1571 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1572 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1573 prototype.
1574 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1575 prototype.
1576 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1577
1578 2017-09-08 Keith Seitz <keiths@redhat.com>
1579
1580 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1581 field.
1582
1583 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1584
1585 * f-valprint.c (f_val_print): Remove check for one byte
1586 sized integers. Remove printing of character type.
1587
1588 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1589 Christoph Weinmann <christoph.t.weinmann@intel.com>
1590 Bernhard Heckel <bernhard.heckel@intel.com>
1591
1592 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1593 to maintain proper indentation when printing pointers/refs.
1594
1595 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1596
1597 GDB 8.0.1 released.
1598
1599 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1600
1601 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1602
1603 2017-09-05 Tom Tromey <tom@tromey.com>
1604
1605 * parse.c (funcall_chain): Now a std::vector.
1606 (start_arglist, end_arglist): Simplify.
1607 (free_funcalls): Remove.
1608 (parse_exp_in_context_1): Remove cleanup.
1609
1610 2017-09-05 Tom Tromey <tom@tromey.com>
1611
1612 * go-exp.y (go_parse): Don't create a cleanup.
1613
1614 2017-09-05 Tom Tromey <tom@tromey.com>
1615
1616 * d-exp.y (PrimaryExpression): Use std::string.
1617 (d_parse): Don't create a cleanup.
1618
1619 2017-09-05 Tom Tromey <tom@tromey.com>
1620
1621 * utils.c (do_clear_parser_state): Remove.
1622 (make_cleanup_clear_parser_state): Remove.
1623 * p-exp.y (pascal_parse): Use scoped_restore.
1624 * m2-exp.y (m2_parse): Use scoped_restore.
1625 * f-exp.y (f_parse): Use scoped_restore.
1626 * d-exp.y (d_parse): Use scoped_restore.
1627 * c-exp.y (c_parse): Use scoped_restore.
1628 * ada-exp.y (ada_parse): Use scoped_restore.
1629 * utils.h (make_cleanup_clear_parser_state): Remove.
1630
1631 2017-09-06 Keith Seitz <keiths@redhat.com>
1632
1633 * dwarf2read.c (dw2_linkage_name_attr): New function.
1634 (dw2_linkage_name): New function.
1635 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1636 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1637 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1638
1639 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1640
1641 * config/djgpp/djconfig.sh: Correct shell portability issue.
1642
1643 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1644
1645 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1646
1647 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1648
1649 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1650 * NEWS: Mention new FreeBSD/mips native configuration.
1651 * configure.host: Add aarch64*-*-freebsd*.
1652 * configure.nat: Likewise.
1653 * aarch64-fbsd-nat.c: New file.
1654
1655 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1656
1657 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1658 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1659 * NEWS: Mention new FreeBSD/aarch64 target.
1660 * configure.tgt: Add aarch64*-*-freebsd*.
1661 * aarch64-fbsd-tdep.c: New file.
1662 * aarch64-fbsd-tdep.h: New file.
1663
1664 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1665
1666 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1667
1668 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1669
1670 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1671 of TLS symbols.
1672
1673 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1674
1675 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1676 call.
1677
1678 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1679
1680 * infrun.c (follow_exec): Call add_thread after
1681 target_find_description.
1682
1683 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1684
1685 * infrun.c (handle_inferior_event_1): When exec'ing, read
1686 stop_pc after follow_exec.
1687
1688 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1689
1690 * remote.c (process_g_packet): Update error message.
1691
1692 2017-09-05 Yao Qi <yao.qi@linaro.org>
1693
1694 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1695 targets.
1696
1697 2017-09-05 Pedro Alves <palves@redhat.com>
1698
1699 * eval.c (eval_call, evaluate_funcall): New functions, factored
1700 out from ...
1701 (evaluate_subexp_standard): ... this.
1702
1703 2017-09-05 Yao Qi <yao.qi@linaro.org>
1704
1705 * amd64-tdep.c (amd64_target_description): Create target
1706 descriptions.
1707 (_initialize_amd64_tdep): Don't call functions
1708 initialize_tdesc_amd64_*. Add self tests.
1709 * arch/amd64.c (amd64_create_target_description): Add parameter
1710 is_linux. Call set_tdesc_osabi if is_linux is true.
1711 * arch/amd64.h (amd64_create_target_description): Update the
1712 declaration.
1713 * arch/i386.c (i386_create_target_description): Add parameter
1714 is_linux. Call set_tdesc_osabi if is_linux is true.
1715 * arch/i386.h (i386_create_target_description): Update
1716 declaration.
1717 * configure.tgt: Add i386.o to gdb_target_obs.
1718 * features/Makefile (XMLTOC): Remove i386/*.xml.
1719 * features/i386/amd64-avx-avx512.c: Remove.
1720 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1721 * features/i386/amd64-avx-mpx.c: Remove.
1722 * features/i386/amd64-avx.c: Remove.
1723 * features/i386/amd64-mpx.c: Remove.
1724 * features/i386/amd64.c: Remove.
1725 * features/i386/i386-avx-avx512.c: Remove.
1726 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1727 * features/i386/i386-avx-mpx.c: Remove.
1728 * features/i386/i386-avx.c: Remove.
1729 * features/i386/i386-mmx.c: Remove.
1730 * features/i386/i386-mpx.c: Remove.
1731 * features/i386/i386.c: Remove.
1732 * i386-tdep.c: Don't include features/i386/i386*.c., include
1733 target-descriptions.h and arch/i386.h.
1734 (i386_target_description): Create target descriptions.
1735 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1736 functions. Do self tests.
1737
1738 2017-09-05 Yao Qi <yao.qi@linaro.org>
1739
1740 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1741 * features/i386/amd64-avx-avx512-linux.c: Removed.
1742 * features/i386/amd64-avx-linux.c: Removed.
1743 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1744 * features/i386/amd64-avx-mpx-linux.c: Removed.
1745 * features/i386/amd64-linux.c: Removed.
1746 * features/i386/amd64-mpx-linux.c: Removed.
1747 * features/i386/x32-avx-avx512-linux.c: Removed.
1748 * features/i386/x32-avx-linux.c: Removed.
1749 * features/i386/x32-linux.c: Removed.
1750
1751 2017-09-05 Yao Qi <yao.qi@linaro.org>
1752
1753 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1754 features/i386/*.c.
1755 (amd64_linux_read_description): Call
1756 amd64_create_target_description.
1757 * arch/amd64.c: New file.
1758 * arch/amd64.h: New file.
1759 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1760 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1761
1762 2017-09-05 Yao Qi <yao.qi@linaro.org>
1763
1764 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1765 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1766 (amd64_linux_read_description): Create target descriptions.
1767 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1768 functions. Add unit tests.
1769 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1770 x32-core.xml.
1771 * features/i386/64bit-avx.c: Generated.
1772 * features/i386/64bit-avx512.c: Generated.
1773 * features/i386/64bit-core.c: Generated.
1774 * features/i386/64bit-linux.c: Generated.
1775 * features/i386/64bit-mpx.c: Generated.
1776 * features/i386/64bit-pkeys.c: Generated.
1777 * features/i386/64bit-segments.c: Generated.
1778 * features/i386/64bit-sse.c: Generated.
1779 * features/i386/x32-core.c: Generated.
1780 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1781 c files for amd64-linux and x32-linux.
1782
1783 2017-09-05 Yao Qi <yao.qi@linaro.org>
1784
1785 * amd64-linux-tdep.c (amd64_linux_read_description): New
1786 function.
1787 (amd64_linux_core_read_description): Call
1788 amd64_linux_read_description.
1789 (amd64_linux_init_abi): Likewise.
1790 (amd64_x32_linux_init_abi): Likewise.
1791 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1792 * x86-linux-nat.c (x86_linux_read_description): Call
1793 amd64_linux_read_description.
1794
1795 2017-09-05 Yao Qi <yao.qi@linaro.org>
1796
1797 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1798 comments.
1799
1800 2017-09-05 Yao Qi <yao.qi@linaro.org>
1801
1802 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1803 * features/i386/i386-avx-avx512-linux.c: Remove.
1804 * features/i386/i386-avx-linux.c: Remove.
1805 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1806 * features/i386/i386-avx-mpx-linux.c: Remove.
1807 * features/i386/i386-linux.c: Remove.
1808 * features/i386/i386-mmx-linux.c: Remove.
1809 * features/i386/i386-mpx-linux.c: Remove.
1810
1811 2017-09-05 Yao Qi <yao.qi@linaro.org>
1812
1813 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1814 (SFILES): Add arch/i386.c.
1815 (HFILES_NO_SRCDIR): Add arch/i386.h.
1816 * arch/i386.c: New file.
1817 * arch/i386.h: New file.
1818 * arch/tdesc.h (allocate_target_description): Declare.
1819 (set_tdesc_architecture): Declare.
1820 (set_tdesc_osabi): Declare.
1821 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1822 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1823 include arch/i386.h.
1824 (i386_linux_read_description): Remove code and call
1825 i386_create_target_description.
1826 (set_tdesc_architecture): New function.
1827 (set_tdesc_osabi): New function.
1828 * target-descriptions.h (allocate_target_description): Remove.
1829
1830 2017-09-05 Yao Qi <yao.qi@linaro.org>
1831
1832 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1833 * target-descriptions.c (tdesc_create_feature): Likewise, and
1834 adjust code.
1835 * features/i386/32bit-avx.c: Re-generated.
1836 * features/i386/32bit-avx512.c: Re-generated.
1837 * features/i386/32bit-core.c: Re-generated.
1838 * features/i386/32bit-linux.c: Re-generated.
1839 * features/i386/32bit-mpx.c: Re-generated.
1840 * features/i386/32bit-pkeys.c: Re-generated.
1841 * features/i386/32bit-sse.c: Re-generated.
1842
1843 2017-09-05 Yao Qi <yao.qi@linaro.org>
1844
1845 * regformats/regdef.h (struct reg): Override operator == and !=.
1846
1847 2017-09-05 Yao Qi <yao.qi@linaro.org>
1848
1849 * arch/tdesc.h: New file.
1850 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1851 * target-descriptions.c: Update comments.
1852 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1853 declarations.
1854 * features/i386/32bit-avx.c: Re-generated.
1855 * features/i386/32bit-avx512.c: Re-generated.
1856 * features/i386/32bit-core.c: Re-generated.
1857 * features/i386/32bit-linux.c: Re-generated.
1858 * features/i386/32bit-mpx.c: Re-generated.
1859 * features/i386/32bit-pkeys.c: Re-generated.
1860 * features/i386/32bit-sse.c: Re-generated.
1861
1862 2017-09-05 Yao Qi <yao.qi@linaro.org>
1863
1864 * regformats/regdat.sh: Update generated code.
1865
1866 2017-09-05 Yao Qi <yao.qi@linaro.org>
1867
1868 * regformats/regdat.sh: Adjust code order.
1869
1870 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1871
1872 * expprint.c (dump_subexp_body_standard): Use constant format
1873 string in fprintf_filtered call.
1874
1875 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1876
1877 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1878 NetBSD/i386.
1879 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1880
1881 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1882
1883 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1884
1885 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1886
1887 * bsd-kvm.o: Define _KMEMUSER.
1888 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1889 * configure: Regenerate.
1890
1891 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1892
1893 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1894 * i386-fbsd-nat.c: Likewise.
1895
1896 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1897
1898 * unittests/array-view-selftests.c: Add include of <array>.
1899
1900 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1901
1902 * spu-tdep.c (flush_ea_cache): Add missing argument to
1903 call_function_by_hand.
1904
1905 2017-09-04 Pedro Alves <palves@redhat.com>
1906
1907 * NEWS (Safer support for debugging with no debug info): New.
1908
1909 2017-09-04 Pedro Alves <palves@redhat.com>
1910
1911 * c-exp.y (function_method, function_method_void): Add current
1912 instance flags to TYPE_INSTANCE.
1913 * dwarf2read.c (check_modifier): New.
1914 (compute_delayed_physnames): Assert that only C++ adds delayed
1915 physnames. Mark fn_fields as const/volatile depending on
1916 physname.
1917 * eval.c (make_params): New type_instance_flags parameter. Use
1918 it as the new type's instance flags.
1919 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1920 flags element and pass it to make_params.
1921 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1922 instance flags element.
1923 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1924 * gdbtypes.h: Include "enum-flags.h".
1925 (type_instance_flags): New enum-flags type.
1926 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1927 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1928 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1929 (follow_type_instance_flags): New function.
1930 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1931 * parser-defs.h (follow_type_instance_flags): Declare.
1932 * valops.c (value_struct_elt_for_reference): const/volatile must
1933 match too.
1934
1935 2017-09-04 Pedro Alves <palves@redhat.com>
1936
1937 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1938 function/method scopes; lookup the nested name as a function local
1939 static variable.
1940
1941 2017-09-04 Pedro Alves <palves@redhat.com>
1942
1943 (%type <voidval>): Add function_method.
1944 * c-exp.y (exp): New production for calls with no arguments.
1945 (function_method, function_method_void_or_typelist): New
1946 productions.
1947 (exp): New production for "method()::static_var".
1948 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1949 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1950 Handle OP_FUNC_STATIC_VAR.
1951 * parse.c (operator_length_standard):
1952 Handle OP_FUNC_STATIC_VAR.
1953
1954 2017-09-04 Pedro Alves <palves@redhat.com>
1955
1956 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1957 handling.
1958 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1959 Ditto.
1960 * parse.c (operator_length_standard, operator_check_standard):
1961 Ditto.
1962 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1963
1964 2017-09-04 Pedro Alves <palves@redhat.com>
1965
1966 * ax-gdb.c: Include "typeprint.h".
1967 (gen_expr_for_cast): New function.
1968 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1969 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1970 type is unknown.
1971 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1972 nodebug_data_symbol.
1973 * eval.c: Include "typeprint.h".
1974 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1975 Error out if symbol has unknown type.
1976 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1977 evaluate_subexp_for_cast.
1978 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1979 OP_VAR_MSYM_VALUE.
1980 (evaluate_subexp_for_cast): New function.
1981 * gdbtypes.c (init_nodebug_var_type): New function.
1982 (objfile_type): Use it to initialize types of variables with no
1983 debug info.
1984 * typeprint.c (error_unknown_type): New.
1985 * typeprint.h (error_unknown_type): New declaration.
1986 * compile/compile-c-types.c (convert_type_basic): Handle
1987 TYPE_CODE_ERROR; warn and fallback to int for variables with
1988 unknown type.
1989
1990 2017-09-04 Pedro Alves <palves@redhat.com>
1991
1992 * eval.c (evaluate_var_value): New function, factored out from ...
1993 (evaluate_subexp_standard): ... here.
1994
1995 2017-09-04 Pedro Alves <palves@redhat.com>
1996
1997 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1998 Remove useless assignments to 'op'.
1999
2000 2017-09-04 Pedro Alves <palves@redhat.com>
2001
2002 * eval.c (eval_skip_value): New function.
2003 (evaluate_subexp_standard): Use it.
2004
2005 2017-09-04 Pedro Alves <palves@redhat.com>
2006
2007 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2008 function name from symbol/minsym and pass it to
2009 error_call_unknown_return_type.
2010
2011 2017-09-04 Pedro Alves <palves@redhat.com>
2012
2013 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2014 * ax-gdb.c (gen_msym_var_ref): New function.
2015 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2016 * eval.c (evaluate_var_msym_value): New function.
2017 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2018 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2019 to call_function_by_hand.
2020 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2021 Handle OP_VAR_MSYM_VALUE.
2022 (union exp_element) <msymbol>: New field.
2023 * minsyms.h (struct type): Forward declare.
2024 (find_minsym_type_and_address): Declare.
2025 * parse.c (write_exp_elt_msym): New function.
2026 (write_exp_msymbol): Delete, refactored as ...
2027 (find_minsym_type_and_address): ... this new function.
2028 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2029 (operator_length_standard, operator_check_standard): Handle
2030 OP_VAR_MSYM_VALUE.
2031 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2032
2033 2017-09-04 Pedro Alves <palves@redhat.com>
2034
2035 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2036 TYPE_GNU_IFUNC specially here. Throw error if return type is
2037 unknown.
2038 * ada-typeprint.c (print_func_type): Handle functions with unknown
2039 return type.
2040 * c-typeprint.c (c_type_print_base): Handle functions and methods
2041 with unknown return type.
2042 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2043 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2044 * compile/compile-c-types.c: Include "objfiles.h".
2045 (convert_func): For functions with unknown return type, warn and
2046 default to int.
2047 * compile/compile-object-run.c (compile_object_run): Adjust call
2048 to call_function_by_hand_dummy.
2049 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2050 call_function_by_hand.
2051 * eval.c (evaluate_subexp_standard): Adjust calls to
2052 call_function_by_hand. Handle functions and methods with unknown
2053 return type. Pass expect_type to call_function_by_hand.
2054 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2055 return type.
2056 * gcore.c (call_target_sbrk): Adjust call to
2057 call_function_by_hand.
2058 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2059 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2060 an integer address type instead of nodebug.
2061 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2062 call_function_by_hand.
2063 * infcall.c (error_call_unknown_return_type): New function.
2064 (call_function_by_hand): New "default_return_type" parameter.
2065 Pass it down.
2066 (call_function_by_hand_dummy): New "default_return_type"
2067 parameter. Use it instead of defaulting to int. If there's no
2068 default and the return type is unknown, throw an error. If
2069 there's a default return type, and the called function has no
2070 debug info, then assume the function is prototyped.
2071 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2072 New "default_return_type" parameter.
2073 (error_call_unknown_return_type): New declaration.
2074 * linux-fork.c (call_lseek): Cast return type of lseek.
2075 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2076 call_function_by_hand.
2077 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2078 calls to call_function_by_hand.
2079 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2080 return type.
2081 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2082 (value_nsstring, print_object_command): Adjust calls to
2083 call_function_by_hand.
2084 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2085 functions with unknown return type.
2086 (pascal_type_print_func_varspec_suffix): New function.
2087 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2088 TYPE_CODE_METHOD>: Use it.
2089 * python/py-value.c (valpy_call): Adjust call to
2090 call_function_by_hand.
2091 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2092 call_function_by_hand.
2093 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2094 call_function_by_hand.
2095 * valops.c (value_allocate_space_in_inferior): Adjust call to
2096 call_function_by_hand.
2097 * typeprint.c (type_print_unknown_return_type): New function.
2098 * typeprint.h (type_print_unknown_return_type): New declaration.
2099
2100 2017-09-04 Pedro Alves <palves@redhat.com>
2101
2102 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2103 types with more than one parameter as prototyped.
2104
2105 2017-09-04 Pedro Alves <palves@redhat.com>
2106
2107 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2108 (disassemble_command): Use gdb_disassembly_flags instead of bare
2109 int.
2110 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2111 (dump_insns, do_mixed_source_and_assembly_deprecated)
2112 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2113 Use gdb_disassembly_flags instead of bare int.
2114 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2115 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2116 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2117 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2118 (enum gdb_disassembly_flag): ... values of this new enumeration.
2119 (gdb_disassembly_flags): Define.
2120 (gdb_disassembly)
2121 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2122 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2123 gdb_disassembly_flags instead of bare int.
2124 * record-btrace.c (btrace_insn_history)
2125 (record_btrace_insn_history, record_btrace_insn_history_range)
2126 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2127 instead of bare int.
2128 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2129 Use gdb_disassembly_flags instead of bare int.
2130 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2131 Define.
2132 * target-delegates.c: Regenerate.
2133 * target.c (target_insn_history, target_insn_history_from)
2134 (target_insn_history_range): Use gdb_disassembly_flags instead of
2135 bare int.
2136 * target.h: Include "disasm.h".
2137 (struct target_ops) <to_insn_history, to_insn_history_from,
2138 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2139 int.
2140 (target_insn_history, target_insn_history_from)
2141 (target_insn_history_range): Use gdb_disassembly_flags instead of
2142 bare int.
2143
2144 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2145
2146 * cli/cli-script.c (build_command_line): For if/while commands,
2147 check whether args is empty.
2148
2149 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2150
2151 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2152 (enum command_control_type): Likewise.
2153 (struct command_line): Likewise.
2154 (free_command_lines): Likewise.
2155 (struct command_lines_deleter): Likewise.
2156 (command_line_up): Likewise.
2157 (read_command_lines): Likewise.
2158 (read_command_lines_1): Likewise.
2159 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2160 (enum command_control_type): Likewise.
2161 (struct command_line): Likewise.
2162 (free_command_lines): Likewise.
2163 (struct command_lines_deleter): Likewise.
2164 (command_line_up): Likewise.
2165 (read_command_lines): Likewise.
2166 (read_command_lines_1): Likewise.
2167 * breakpoint.h: Include cli/cli-script.h.
2168 * extension-priv.h: Likewise.
2169 * gdbcmd.h: Likewise.
2170
2171 2017-09-04 Pedro Alves <palves@redhat.com>
2172
2173 * ada-lang.c (is_known_support_routine): Move sal declaration to
2174 where it is initialized.
2175 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2176 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2177 (clear_command, update_static_tracepoint): Remove init_sal
2178 references. Move declarations closer to initializations.
2179 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2180 initializations.
2181 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2182 references. Move sal declarations closer to initializations.
2183 * frame.c (find_frame_sal): Return a symtab_and_line via function
2184 return instead of output parameter. Remove init_sal references.
2185 * frame.h (find_frame_sal): Return a symtab_and_line via function
2186 return instead of output parameter.
2187 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2188 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2189 instead of memset.
2190 (gdbscm_find_pc_line): Remove init_sal reference.
2191 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2192 references. Move declarations closer to initializations.
2193 * infcmd.c (set_step_frame): Update. Move declarations closer to
2194 initializations.
2195 (finish_backward): Remove init_sal references. Move declarations
2196 closer to initializations.
2197 * infrun.c (process_event_stop_test, handle_step_into_function)
2198 (insert_hp_step_resume_breakpoint_at_frame)
2199 (insert_step_resume_breakpoint_at_caller): Likewise.
2200 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2201 (symbol_to_sal): Likewise.
2202 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2203 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2204 to its initialization.
2205 * reverse.c (save_bookmark_command): Use new/delete. Remove
2206 init_sal references. Move declarations closer to initializations.
2207 * source.c (get_current_source_symtab_and_line): Remove brace
2208 initialization.
2209 (set_current_source_symtab_and_line): Now takes the sal by const
2210 reference. Remove brace initialization.
2211 (line_info): Remove init_sal reference.
2212 * source.h (set_current_source_symtab_and_line): Now takes a
2213 symtab_and_line via const reference.
2214 * stack.c (set_current_sal_from_frame): Adjust.
2215 (print_frame_info): Adjust.
2216 (get_last_displayed_sal): Return the sal via function return
2217 instead of via output parameter. Simplify.
2218 (frame_info): Adjust.
2219 * stack.h (get_last_displayed_sal): Return the sal via function
2220 return instead of via output parameter.
2221 * symtab.c (init_sal): Delete.
2222 (find_pc_sect_line): Remove init_sal references. Move
2223 declarations closer to initializations.
2224 (find_function_start_sal): Remove init_sal references. Move
2225 declarations closer to initializations.
2226 * symtab.h (struct symtab_and_line): In-class initialize all
2227 fields.
2228 * tracepoint.c (set_traceframe_context)
2229 (print_one_static_tracepoint_marker): Remove init_sal references.
2230 Move declarations closer to initializations.
2231 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2232 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2233 declarations closer to initializations.
2234 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2235 init_sal references. Adjust.
2236
2237 2017-09-04 Pedro Alves <palves@redhat.com>
2238
2239 * ax-gdb.c (agent_command_1): Use range-for.
2240 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2241 * breakpoint.c: Include "common/array-view.h".
2242 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2243 parameter from struct symtabs_and_lines to
2244 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2245 (breakpoint_sals_to_pc): Change sals parameter from struct
2246 symtabs_and_lines to std::vector reference.
2247 (check_fast_tracepoint_sals): Change sals parameter from struct
2248 symtabs_and_lines to std::array_view. Use range-for.
2249 (decode_static_tracepoint_spec): Return a std::vector instead of
2250 symtabs_and_lines. Update.
2251 (create_breakpoint): Update.
2252 (break_range_command, until_break_command, clear_command): Update.
2253 (base_breakpoint_decode_location, bkpt_decode_location)
2254 (bkpt_probe_create_sals_from_location)
2255 (bkpt_probe_decode_location, tracepoint_decode_location)
2256 (tracepoint_probe_decode_location)
2257 (strace_marker_create_sals_from_location): Return a std::vector
2258 instead of symtabs_and_lines.
2259 (strace_marker_create_breakpoints_sal): Update.
2260 (strace_marker_decode_location): Return a std::vector instead of
2261 symtabs_and_lines. Update.
2262 (update_breakpoint_locations): Change struct symtabs_and_lines
2263 parameters to gdb::array_view. Adjust.
2264 (location_to_sals): Return a std::vector instead of
2265 symtabs_and_lines. Update.
2266 (breakpoint_re_set_default): Use std::vector instead of struct
2267 symtabs_and_lines.
2268 (decode_location_default): Return a std::vector instead of
2269 symtabs_and_lines. Update.
2270 * breakpoint.h: Include "common/array-view.h".
2271 (struct breakpoint_ops) <decode_location>: Now returns a
2272 std::vector instead of returning a symtabs_and_lines via output
2273 parameter.
2274 (update_breakpoint_locations): Change sals parameters to use
2275 gdb::array_view.
2276 * cli/cli-cmds.c (edit_command, list_command): Update to use
2277 std::vector and gdb::array_view.
2278 (ambiguous_line_spec): Adjust to use gdb::array_view and
2279 range-for.
2280 (compare_symtabs): Rename to ...
2281 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2282 const reference and adjust.
2283 (filter_sals): Rewrite using std::vector and standard algorithms.
2284 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2285 (jump_command): Update to use std::vector.
2286 * linespec.c (struct linespec_state) <canonical_names>: Update
2287 comment.
2288 (add_sal_to_sals_basic): Delete.
2289 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2290 (decode_line_2, create_sals_line_offset)
2291 (convert_address_location_to_sals, convert_linespec_to_sals)
2292 (convert_explicit_location_to_sals, parse_linespec)
2293 (event_location_to_sals, decode_line_full, decode_line_1)
2294 (decode_line_with_current_source)
2295 (decode_line_with_last_displayed, decode_objc)
2296 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2297 (linespec_result::~linespec_result): Adjust to use std::vector
2298 instead of symtabs_and_lines.
2299 * linespec.h (linespec_sals::sals): Now a std::vector.
2300 (struct linespec_result): Use std::vector, bool, and in-class
2301 initialization.
2302 (decode_line_1, decode_line_with_current_source)
2303 (decode_line_with_last_displayed): Return std::vector.
2304 * macrocmd.c (info_macros_command): Use std::vector.
2305 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2306 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2307 std::vector.
2308 * probe.h (parse_probes): Return a std::vector.
2309 * python/python.c (gdbpy_decode_line): Use std::vector and
2310 gdb::array_view.
2311 * source.c (select_source_symtab, line_info): Use std::vector.
2312 * stack.c (func_command): Use std::vector.
2313 * symtab.h (struct symtabs_and_lines): Delete.
2314 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2315
2316 2017-09-04 Pedro Alves <palves@redhat.com>
2317
2318 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2319 unittests/array-view-selftests.c.
2320 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2321 * common/array-view.h: New file.
2322 * unittests/array-view-selftests.c: New file.
2323
2324 2017-09-04 Pedro Alves <palves@redhat.com>
2325
2326 * cli/cli-cmds.c (edit_command): Pass message to
2327 ambiguous_line_spec.
2328 (list_command): Pass message to ambiguous_line_spec. Say
2329 "first"/"last" instead of "start" and "end" to be consistent with
2330 the manual.
2331 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2332 them to print formatted message.
2333
2334 2017-09-04 Pedro Alves <palves@redhat.com>
2335
2336 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2337 ftrace_update_insns by reference instead of pointer.
2338
2339 2017-09-04 Yao Qi <yao.qi@linaro.org>
2340
2341 * i386-go32-tdep.c: Include x86-xstate.h.
2342 (i386_go32_init_abi): Call i386_target_description.
2343 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2344 if xcr0 is X86_XSTATE_X87_MASK.
2345 * i386-tdep.h (tdesc_i386): Remove the declaration.
2346 (tdesc_i386_mmx): Likewise.
2347
2348 2017-09-04 Yao Qi <yao.qi@linaro.org>
2349
2350 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2351 X86_XSTATE_SSE_MASK instead of 0.
2352
2353 2017-09-04 Yao Qi <yao.qi@linaro.org>
2354
2355 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2356 i386_target_description.
2357 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2358 i386_target_description.
2359 * i386-tdep.c (i386_gdbarch_init): Likewise.
2360
2361 2017-09-04 Yao Qi <yao.qi@linaro.org>
2362
2363 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2364 (x86_darwin_init_abi_64): Call amd64_target_description.
2365 * amd64-dicos-tdep.c: Likewise.
2366 * amd64-fbsd-nat.c: Likewise.
2367 * amd64-fbsd-tdep.c: Likewise.
2368 * amd64-nbsd-tdep.c: Likewise.
2369 * amd64-obsd-tdep.c: Likewise.
2370 * amd64-sol2-tdep.c: Likewise.
2371 * amd64-windows-tdep.c: Likewise.
2372 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2373
2374 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2375
2376 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2377 (btrace_function) <insn>: Change type to use std::vector.
2378 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2379 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2380 ftrace_update_insns, ftrace_compute_global_level_offset,
2381 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2382 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2383 change to std::vector.
2384 (ftrace_update_insns): Adjust to change to std::vector, change
2385 type of INSN parameter.
2386 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2387 * record-btrace.c (btrace_call_history_insn_range,
2388 btrace_compute_src_line_range,
2389 record_btrace_frame_prev_register): Adjust to change to
2390 std::vector.
2391 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2392 to change to std::vector.
2393
2394 2017-09-03 Tom Tromey <tom@tromey.com>
2395
2396 * corefile.c (reopen_exec_file): Use std::string.
2397
2398 2017-09-03 Tom Tromey <tom@tromey.com>
2399
2400 * compile/compile.c (compile_register_name_mangled): Return
2401 std::string.
2402 * compile/compile-loc2c.c (pushf_register_address): Update.
2403 (pushf_register): Update.
2404 * compile/compile-c-types.c (convert_array): Update.
2405 * compile/compile-c-symbols.c (generate_vla_size): Update.
2406 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2407 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2408 (convert_one_symbol): Update.
2409 (generate_c_for_for_one_variable): Update.
2410 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2411 std::string.
2412 (generate_register_struct): Update.
2413 * compile/compile-internal.h (c_get_range_decl_name): Return a
2414 std::string.
2415 (compile_register_name_mangled): Return std::string.
2416
2417 2017-09-03 Tom Tromey <tom@tromey.com>
2418
2419 * utils.c (perror_string): Return a std::string.
2420 (throw_perror_with_name, perror_warning_with_name): Update.
2421
2422 2017-09-03 Tom Tromey <tom@tromey.com>
2423
2424 * demangle.c (demangle_command): Use std::string,
2425 unique_xmalloc_ptr.
2426
2427 2017-09-03 Tom Tromey <tom@tromey.com>
2428
2429 * cli/cli-setshow.c (do_set_command): Use std::string.
2430
2431 2017-09-03 Tom Tromey <tom@tromey.com>
2432
2433 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2434
2435 2017-09-03 Tom Tromey <tom@tromey.com>
2436
2437 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2438
2439 2017-09-03 Tom Tromey <tom@tromey.com>
2440
2441 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2442 gdb::unique_xmalloc_ptr.
2443
2444 2017-09-03 Tom Tromey <tom@tromey.com>
2445
2446 * thread.c (print_thread_info_1): Use string_printf.
2447 (thread_apply_command, thread_apply_all_command): Use
2448 std::string.
2449
2450 2017-09-03 Tom Tromey <tom@tromey.com>
2451
2452 * valprint.c (val_print_string): Update.
2453 * gdbcore.h (memory_error_message): Return std::string.
2454 * corefile.c (memory_error_message): Return std::string.
2455 (memory_error): Update.
2456 * breakpoint.c (insert_bp_location): Update.
2457
2458 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2459
2460 * target/waitstatus.h (target_waitstatus_to_string): Change
2461 return type to std::string.
2462 * target/waitstatus.c (target_waitstatus_to_string): Return
2463 std::string.
2464 * target.h (target_waitstatus_to_string): Remove declaration.
2465 * infrun.c (resume, clear_proceed_status_thread,
2466 print_target_wait_results, do_target_wait, save_waitstatus,
2467 stop_all_threads): Adjust.
2468 * record-btrace.c (record_btrace_wait): Adjust.
2469 * target-debug.h
2470 (target_debug_print_struct_target_waitstatus_p): Adjust.
2471
2472 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2473
2474 PR gdb/22046
2475 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2476 detection.
2477
2478 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2479
2480 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2481 for setting/unsetting environment variables on the remote target.
2482 (New remote packets): Add entries for QEnvironmentHexEncoded,
2483 QEnvironmentUnset and QEnvironmentReset.
2484 * common/environ.c (gdb_environ::operator=): Extend method to
2485 handle m_user_set_env_list and m_user_unset_env_list.
2486 (gdb_environ::clear): Likewise.
2487 (match_var_in_string): Change type of first parameter from 'char
2488 *' to 'const char *'.
2489 (gdb_environ::set): Extend method to handle
2490 m_user_set_env_list and m_user_unset_env_list.
2491 (gdb_environ::unset): Likewise.
2492 (gdb_environ::clear_user_set_env): New method.
2493 (gdb_environ::user_set_envp): Likewise.
2494 (gdb_environ::user_unset_envp): Likewise.
2495 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2496 m_user_unset_env_list on move constructor/assignment.
2497 (unset): Add new default parameter 'update_unset_list = true'.
2498 (clear_user_set_env): New method.
2499 (user_set_envp): Likewise.
2500 (user_unset_envp): Likewise.
2501 (m_user_set_env_list): New std::set.
2502 (m_user_unset_env_list): Likewise.
2503 * common/rsp-low.c (hex2str): New function.
2504 (bin2hex): New overload for bin2hex function.
2505 * common/rsp-low.c (hex2str): New prototype.
2506 (str2hex): New overload prototype.
2507 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2508 QEnvironmentUnset and QEnvironmentReset.
2509 (remote_protocol_features): Add QEnvironmentHexEncoded,
2510 QEnvironmentUnset and QEnvironmentReset packets.
2511 (send_environment_packet): New function.
2512 (extended_remote_environment_support): Likewise.
2513 (extended_remote_create_inferior): Call
2514 extended_remote_environment_support.
2515 (_initialize_remote): Add QEnvironmentHexEncoded,
2516 QEnvironmentUnset and QEnvironmentReset packet configs.
2517 * unittests/environ-selftests.c (gdb_selftest_env_var):
2518 New variable.
2519 (test_vector_initialization): New function.
2520 (test_init_from_host_environ): Likewise.
2521 (test_reinit_from_host_environ): Likewise.
2522 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2523 Likewise.
2524 (test_unset_set_empty_vector): Likewise.
2525 (test_vector_clear): Likewise.
2526 (test_std_move): Likewise.
2527 (test_move_constructor):
2528 (test_self_move): Likewise.
2529 (test_set_unset_reset): Likewise.
2530 (run_tests): Rewrite in terms of the functions above.
2531
2532 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2533
2534 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2535 (adi_available): Use a temp variable of type CORE_ADDR as argument
2536 3 when calling target_auxv_search.
2537 (adi_normalize_address): Use masks and xor operators to calculate
2538 normalized address.
2539 (adi_read_versions, adi_write_versions, adi_print_versions)
2540 (do_examine, do_assign): Use paddress.
2541
2542 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2543
2544 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2545 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2546 out of loop and add supply of FIR.
2547 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2548 add collect of FIR.
2549
2550 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2551
2552 PR gdb/21827
2553 * cli/cli-script.c (define_command): Don't convert command name
2554 to lower case.
2555
2556 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2557
2558 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2559 Update all callers accordingly. Remove all code blocks handling
2560 the case where DISPP is not NULL.
2561
2562 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2563
2564 PR symtab/22003
2565 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2566 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2567 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2568
2569 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2570
2571 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2572 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2573 (read_comp_units_from_section): New parameter abbrev_section, use
2574 read_and_check_comp_unit_head, allocate signatured_type if needed.
2575 (create_all_comp_units): Update read_comp_units_from_section caller.
2576
2577 2017-08-23 Pedro Alves <palves@redhat.com>
2578
2579 PR remote/21852
2580 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2581 to null_ptid and switch to thread without reading the registers
2582 after adding the inferior.
2583
2584 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2585
2586 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2587 compile-gcc.
2588 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2589 (compile_to_object): Implement compile_gcc.
2590 (_initialize_compile): Install "set compile-gcc". Initialize
2591 compile_gcc.
2592
2593 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2594
2595 * compile/compile.c (compile_to_object): Conditionally call
2596 set_verbose. Conditionally call compile or compile_v0.
2597
2598 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2599
2600 * sparc64-tdep.h: (adi_normalize_address): New export.
2601 * sparc-nat.h: (open_adi_tag_fd): New export.
2602 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2603 * sparc64-linux-tdep.c:
2604 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2605 (sparc64_linux_handle_segmentation_fault): New function.
2606 (sparc64_linux_init_abi): Register
2607 sparc64_linux_handle_segmentation_fault
2608 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2609 (sparc64_addr_bits_remove): New function.
2610 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2611 (MAX_PROC_NAME_SIZE): New macro.
2612 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2613 (sparc64adilist): New variable.
2614 (adi_proc_list): New variable.
2615 (find_adi_info): New function.
2616 (add_adi_info): New function.
2617 (get_adi_info_proc): New function.
2618 (get_adi_info): New function.
2619 (info_adi_command): New function.
2620 (read_maps_entry): New function.
2621 (adi_available): New function.
2622 (adi_normalize_address): New function.
2623 (adi_align_address): New function.
2624 (adi_convert_byte_count): New function.
2625 (adi_tag_fd): New function.
2626 (adi_is_addr_mapped): New function.
2627 (adi_read_versions): New function.
2628 (adi_write_versions): New function.
2629 (adi_print_versions): New function.
2630 (do_examine): New function.
2631 (do_assign): New function.
2632 (adi_examine_command): New function.
2633 (adi_assign_command): New function.
2634 (_initialize_sparc64_adi_tdep): New function.
2635
2636 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2637
2638 * breakpoint.c (breakpoints_info): Rename to ...
2639 (info_breakpoints_command): ... this.
2640 (watchpoints_info): Rename to ...
2641 (info_watchpoints_command): ... this.
2642 (tracepoints_info): Rename to ...
2643 (info_tracepoints_command): ... this.
2644 (_initialize_breakpoint): Adjust.
2645 * dcache.c (dcache_info): Rename to ...
2646 (info_display_command): ... this.
2647 (_initialize_dcache): Adjust.
2648 * frame.h (args_info): Rename to ...
2649 (info_args_command): ... this.
2650 (locals_info): Rename to ...
2651 (info_locals_command): ... this.
2652 * infcmd.c (nofp_registers_info): Rename to ...
2653 (info_registers_command): ... this.
2654 (float_info): Rename to ...
2655 (info_float_command): ... this.
2656 (program_info): Rename to ...
2657 (info_program_command): ... this.
2658 (all_registers_info): Rename to ...
2659 (info_all_registers_command): ... this.
2660 (vector_info): Rename to ...
2661 (info_vector_command): ... this.
2662 (float_info): Rename to ...
2663 (info_float_command): ... this.
2664 (_initialize_infcmd): Adjust.
2665 * inferior.h (term_info): Rename to ...
2666 (info_terminal_command): ... this.
2667 * inflow.c (term_info): Rename to ...
2668 (info_terminal_command): ... this.
2669 (_initialize_inflow): Adjust.
2670 * infrun.c (signals_info): Rename to ...
2671 (info_signals_command): ... this.
2672 (_initialize_infrun): Adjust.
2673 * objc-lang.c (classes_info): Rename to ...
2674 (info_classes_command): ... this.
2675 (selectors_info): Rename to ...
2676 (info_selectors_command): ... this.
2677 (_initialize_objc_language): Adjust.
2678 * printcmd.c (sym_info): Rename to ...
2679 (info_symbol_command): ... this.
2680 (address_info): Rename to ...
2681 (info_address_command): ... this.
2682 (display_info): Rename to ...
2683 (info_display_command): ... this.
2684 (_initialize_printcmd): Adjust.
2685 * reverse.c (bookmarks_info): Rename to ...
2686 (info_breakpoints_command): ... this.
2687 (_initialize_reverse): Adjust.
2688 * ser-go32.c (dos_info): Rename to ...
2689 (info_serial_command): ... this.
2690 (_initialize_ser_dos): Adjust.
2691 * skip.c (skip_info): Rename to ...
2692 (info_skip_command): ... this.
2693 (_initialize_step_skip): Adjust.
2694 * source.c (line_info): Rename to ...
2695 (info_line_command): ... this.
2696 (source_info): Rename to ...
2697 (info_source_command)
2698 * stack.c (frame_info): Rename to ...
2699 (info_frame_command): ... this.
2700 (locals_info): Rename to ...
2701 (info_locals_command): ... this.
2702 (args_info): Rename to ...
2703 (info_args_command): ... this.
2704 (_initialize_stack): Adjust.
2705 * symtab.c (sources_info): Rename to ...
2706 (info_sources_command): ... this.
2707 (variables_info): Rename to ...
2708 (info_variables_command): ... this.
2709 (functions_info): Rename to ...
2710 (info_functions_command): ... this.
2711 (types_info): Rename to ...
2712 (info_types_command): ... this.
2713 (_initialize_symtab): Adjust.
2714 * target.c (target_info): Rename to ...
2715 (info_target_command): ... this.
2716 (initialize_targets): Adjust.
2717 * tracepoint.c (tvariables_info): Rename to ...
2718 (info_tvariables_command): ... this.
2719 (scope_info): Rename to ...
2720 (info_scope_command): ... this.
2721 (trace_dump_actions): Adjust.
2722 (_initialize_tracepoint): Adjust.
2723
2724 2017-08-22 Tom Tromey <tom@tromey.com>
2725
2726 * breakpoint.h (install_breakpoint): Update.
2727 * breakpoint.c (add_solib_catchpoint): Update.
2728 (install_breakpoint): Change argument to a std::unique_ptr.
2729 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2730 (create_breakpoint_sal, create_breakpoint): Update.
2731 (watch_command_1, catch_exec_command_1)
2732 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2733 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2734 Return the breakpoint.
2735 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2736 (new_single_step_breakpoint): Update.
2737 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2738 std::unique_ptr.
2739 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2740 std::unique_ptr.
2741 * break-catch-sig.c (create_signal_catchpoint): Use
2742 std::unique_ptr.
2743 * ada-lang.c (create_ada_exception_catchpoint): Use
2744 std::unique_ptr.
2745
2746 2017-08-22 Tom Tromey <tom@tromey.com>
2747
2748 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2749
2750 2017-08-22 Tom Tromey <tom@tromey.com>
2751
2752 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2753 (lookup_partial_symbol): Update.
2754
2755 2017-08-22 Tom Tromey <tom@tromey.com>
2756
2757 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2758 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2759 (find_and_open_source, symtab_to_fullname): Update.
2760 * psymtab.c (psymtab_to_fullname): Update.
2761
2762 2017-08-22 Tom Tromey <tom@tromey.com>
2763
2764 * exec.c (exec_file_attach): Update.
2765 * linux-thread-db.c (try_thread_db_load): Update.
2766 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2767 * utils.c (gdb_realpath): Change return type.
2768 (gdb_realpath_keepfile): Update.
2769 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2770 (_initialize_utils): Register the new self test.
2771 * source.c (openp): Update.
2772 (find_and_open_source): Update.
2773 * nto-tdep.c (nto_find_and_open_solib): Update.
2774 * main.c (set_gdb_data_directory): Update.
2775 (captured_main_1): Update.
2776 * dwarf2read.c (dwarf2_get_dwz_file): Update
2777 (dw2_map_symbol_filenames): Update.
2778 * auto-load.c (auto_load_safe_path_vec_update): Update.
2779 (filename_is_in_auto_load_safe_path_vec): Change type of
2780 "filename_realp".
2781 (auto_load_objfile_script): Update.
2782 (file_is_auto_load_safe): Update. Use std::string.
2783 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2784
2785 2017-08-22 Tom Tromey <tom@tromey.com>
2786
2787 * utils.c (gdb_realpath_keepfile): Return a
2788 gdb::unique_xmalloc_ptr.
2789 * exec.c (exec_file_attach): Update.
2790 * utils.h (gdb_realpath_keepfile): Return a
2791 gdb::unique_xmalloc_ptr.
2792
2793 2017-08-22 Tom Tromey <tom@tromey.com>
2794
2795 * compile/compile.c (compile_file_command): Use
2796 gdb::unique_xmalloc_ptr, std::string.
2797 * utils.c (gdb_abspath): Change return type.
2798 * source.c (openp): Update.
2799 * objfiles.c (allocate_objfile): Update.
2800 * main.c (set_gdb_data_directory): Update.
2801 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2802
2803 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2804
2805 * cli-cmds.c (list_commands): List actual code around more than
2806 one location.
2807
2808 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2809
2810 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2811
2812 2017-08-21 Pedro Alves <palves@redhat.com>
2813
2814 PR gdb/19487
2815 * c-exp.y (variable production): Handle function aliases.
2816 * minsyms.c (msymbol_is_text): New function.
2817 * minsyms.h (msymbol_is_text): Declare.
2818 * symtab.c (find_function_alias_target): New function.
2819 * symtab.h (find_function_alias_target): Declare.
2820
2821 2017-08-21 Pedro Alves <palves@redhat.com>
2822
2823 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2824 typedefs.
2825 * typeprint.c (whatis_exp): If handling "whatis", and expression
2826 is OP_TYPE, strip one typedef level. Otherwise don't strip
2827 typedefs here.
2828 * valops.c (value_cast): Save "to" type before resolving
2829 stubs/typedefs. Use that type as resulting value's type.
2830
2831 2017-08-18 Tom Tromey <tom@tromey.com>
2832 Pedro Alves <palves@redhat.com>
2833
2834 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2835 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2836 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2837 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2838 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2839 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2840 (linux_get_siginfo_data): Add "thread" argument. Use
2841 scoped_restore.
2842 * linux-nat.c (linux_child_follow_fork)
2843 (check_stopped_by_watchpoint): Use scoped_restore.
2844 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2845 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2846 (restore_inferior_ptid, save_inferior_ptid): Remove.
2847 * btrace.c (btrace_fetch): Use scoped_restore.
2848 * bsd-uthread.c (bsd_uthread_fetch_registers)
2849 (bsd_uthread_store_registers): Use scoped_restore.
2850 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2851 scoped_restore.
2852 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2853 (aix_thread_xfer_partial): Use scoped_restore.
2854 * inferior.h (save_inferior_ptid): Remove.
2855
2856 2017-08-18 Yao Qi <yao.qi@linaro.org>
2857
2858 PR tdep/21818
2859 * arm-tdep.c (gdb_print_insn_arm): Mark
2860 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2861
2862 2017-08-18 Yao Qi <yao.qi@linaro.org>
2863
2864 * NEWS: Mention GDBserver's new option "--selftest".
2865 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2866 * selftest.c: Move it to common/selftest.c.
2867 * selftest.h: Move it to common/selftest.h.
2868 * selftest-arch.c (reset): New function.
2869 (tests_with_arch): Call reset.
2870
2871 2017-08-18 Yao Qi <yao.qi@linaro.org>
2872
2873 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2874 instead of exception_fprintf and printf_filtered.
2875
2876 2017-08-18 Yao Qi <yao.qi@linaro.org>
2877
2878 * selftest.c (register_self_test): Rename it to
2879 selftests::register_test.
2880 (run_self_tests): selftest::run_tests.
2881 * selftest.h: Update declarations.
2882 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2883 selftests::register_test_foreach_arch.
2884 * selftest-arch.h: Update declaration.
2885 * aarch64-tdep.c: Update.
2886 * arm-tdep.c: Likewise.
2887 * disasm-selftests.c: Likewise.
2888 * dwarf2loc.c: Likewise.
2889 * dwarf2-frame.c: Likewise.
2890 * findvar.c: Likewise.
2891 * gdbarch-selftests.c: Likewise.
2892 * maint.c (maintenance_selftest): Likewise.
2893 * regcache.c: Likewise.
2894 * rust-exp.y: Likewise.
2895 * selftest-arch.c: Likewise.
2896 * unittests/environ-selftests.c: Likewise.
2897 * unittests/function-view-selftests.c: Likewise.
2898 * unittests/offset-type-selftests.c: Likewise.
2899 * unittests/optional-selftests.c: Likewise.
2900 * unittests/scoped_restore-selftests.c: Likewise.
2901 * utils-selftests.c: Likewise.
2902
2903 2017-08-17 Pedro Alves <palves@redhat.com>
2904
2905 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2906 local.
2907
2908 2017-08-17 Pedro Alves <palves@redhat.com>
2909
2910 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2911 field.
2912 (reset_die_in_process): Delete, replaced by ...
2913 (process_die_scope): ... this new class. Make it responsible for
2914 freeing cu->line_header too.
2915 (process_die): Use process_die_scope.
2916 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2917 cu->line_header_die_owner. Don't release the line header if it's
2918 owned by the CU.
2919 (setup_type_unit_groups): Make the CU/DIE own the line header.
2920 Don't release the line header here.
2921
2922 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2923
2924 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2925
2926 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2927
2928 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2929 Single-Key mode
2930
2931 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2932
2933 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2934 mode command list.
2935
2936 2017-08-15 Stafford Horne <shorne@gmail.com>
2937
2938 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2939
2940 2017-08-15 Stafford Horne <shorne@gmail.com>
2941
2942 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2943
2944 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2945
2946 PR gdb/21954
2947 * infcmd.c (unset_environment_command): Use the 'clear' method on
2948 the environment instead of resetting it.
2949
2950 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2951
2952 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2953 platforms.
2954
2955 2017-08-14 Tom Tromey <tom@tromey.com>
2956
2957 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2958 (print_binary_chars): Likewise.
2959 (BITS_IN_BYTES): Remove.
2960
2961 2017-08-14 Tom Tromey <tom@tromey.com>
2962
2963 PR gdb/21675
2964 * valprint.c (LOW_ZERO): Change value to 034.
2965 (print_octal_chars): Add static_asserts for octal constants.
2966 * printcmd.c (print_scalar_formatted): Add 'd' case.
2967
2968 2017-08-11 Tom Tromey <tom@tromey.com>
2969
2970 * symfile.c (add_symbol_file_command): Use std::vector.
2971
2972 2017-08-14 Tom Tromey <tom@tromey.com>
2973
2974 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2975 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2976 std::move.
2977 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2978
2979 2017-08-11 Pedro Alves <palves@redhat.com>
2980
2981 * infrun.c (process_event_stop_test): Adjust
2982 function_name_is_marked_for_skip call.
2983 * skip.c: Include <list>.
2984 (skiplist_entry): Make it a class with private fields, and
2985 getters/setters.
2986 (skiplist_entry_chain): Delete.
2987 (skiplist_entries): New.
2988 (skiplist_entry_count): Delete.
2989 (highest_skiplist_entry_num): New.
2990 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2991 (add_skiplist_entry): Delete.
2992 (skiplist_entry::skiplist_entry): New.
2993 (skiplist_entry::add_entry): New.
2994 (skip_file_command, skip_function): Adjust.
2995 (compile_skip_regexp): Delete.
2996 (skip_command): Don't compile regexp here. Adjust to use
2997 skiplist_entry::add_entry.
2998 (skip_info): Adjust to use range-for and getters.
2999 (skip_enable_command, skip_disable_command): Adjust to use
3000 range-for and setters.
3001 (skip_delete_command): Adjust to use std::list.
3002 (add_skiplist_entry): Delete.
3003 (skip_file_p): Delete, refactored as ...
3004 (skiplist_entry::do_skip_file_p): ... this new method.
3005 (skip_gfile_p): Delete, refactored as ...
3006 (skiplist_entry::do_gskip_file_p): ... this new method.
3007 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3008 (skiplist_entry::skip_function_p): ... this new method.
3009 (function_name_is_marked_for_skip): Now returns bool, and takes
3010 the function sal by const reference. Adjust to use range-for and
3011 skiplist_entry methods.
3012 (_initialize_step_skip): Remove references to
3013 skiplist_entry_chain, skiplist_entry_count.
3014 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3015 takes the function sal by const reference.
3016
3017 2017-08-11 Yao Qi <yao.qi@linaro.org>
3018
3019 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3020 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3021 (dwarf2_frame_cache):
3022 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3023 RETURN_MASK_ALL and set *this_case to NULL.
3024 * frame-unwind.h: Update comments.
3025
3026 2017-08-11 Yao Qi <yao.qi@linaro.org>
3027
3028 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3029 (dwarf2_frame_state_copy_regs): Remove.
3030 (dwarf2_frame_state_free_regs): Remove.
3031 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3032 (dwarf2_restore_rule): Call method .alloc_regs instead of
3033 dwarf2_frame_state_alloc_regs.
3034 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3035 constructor. Call std::move.
3036 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3037 (dwarf2_frame_cache): Likewise.
3038
3039 [GDB_SELF_TEST]: Include selftest.h and
3040 selftest-arch.h.
3041 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3042 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3043 execute_cfa_program_test.
3044
3045 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3046 copy ctor, assignment operator, move assignment.
3047 <alloc_regs>: New method.
3048 <swap>: New method.
3049 (struct dwarf2_frame_state): Delete dtor.
3050 (dwarf2_frame_state_alloc_regs): Remove declaration.
3051 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3052 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3053
3054 2017-08-11 Yao Qi <yao.qi@linaro.org>
3055
3056 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3057 (dwarf2_frame_state::dwarf2_frame_state): New.
3058 (dwarf2_frame_state::~dwarf2_frame_state): New.
3059 (dwarf2_fetch_cfa_info): Update.
3060 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3061 rather than a pointer. Update code.
3062 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3063 dtor.
3064 <data_align, code_align, retaddr_column>: Change them to const.
3065 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3066 to bool.
3067
3068 2017-08-11 Yao Qi <yao.qi@linaro.org>
3069
3070 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3071 <loc.exp>: New field.
3072 * dwarf2-frame.c (execute_cfa_program): Update.
3073 (dwarf2_frame_prev_register): Update.
3074
3075 2017-08-10 Pedro Alves <palves@redhat.com>
3076
3077 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3078
3079 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3080
3081 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3082 (fbsd_pending_children): Use std::list.
3083 (fbsd_remember_child): Likewise.
3084 (fbsd_is_child_pending): Likewise.
3085 (fbsd_pending_vfork_done): Use std::forward_list.
3086 (fbsd_add_vfork_done): Likewise.
3087 (fbsd_is_vfork_done_pending): Likewise.
3088 (fbsd_next_vfork_done): Likewise.
3089
3090 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3091
3092 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3093 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3094 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3095 for `mapfilename'.
3096 (fbsd_xfer_partial): Use gdb::byte_vector.
3097 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3098
3099 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3100
3101 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3102 "filestuff.h".
3103 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3104
3105 2017-08-09 Tom Tromey <tom@tromey.com>
3106
3107 * skip.c (skiplist_entry): New constructor.
3108 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3109 (skiplist_entry::file_is_glob): Now bool.
3110 (skiplist_entry::file, skiplist_entry::function): Now
3111 std::string.
3112 (make_skip_entry): Return a unique_ptr. Use new.
3113 (free_skiplist_entry, free_skiplist_entry_cleanup)
3114 (make_free_skiplist_entry_cleanup): Remove.
3115 (skip_command, skip_disable_command, add_skiplist_entry)
3116 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3117 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3118 (function_name_is_marked_for_skip): Update.
3119 (skip_delete_command): Update. Use delete.
3120
3121 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3122
3123 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3124 (aarch64_linux_core_read_description): New function.
3125 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3126
3127 2017-08-09 Pedro Alves <palves@redhat.com>
3128
3129 * cp-name-parser.y (cp_comp_to_string): Return a
3130 gdb::unique_xmalloc_ptr<char>.
3131 * cp-support.c (replace_typedefs_qualified_name)
3132 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3133 (cp_canonicalize_string_full): Use op= instead of explicit
3134 convertion.
3135 (cp_class_name_from_physname, method_name_from_physname)
3136 (cp_func_name, cp_remove_params): Adjust to use
3137 gdb::unique_xmalloc_ptr<char>.
3138 * cp-support.h (cp_comp_to_string): Return a
3139 gdb::unique_xmalloc_ptr<char>.
3140 * python/py-type.c (typy_lookup_type): Adjust to use
3141 gdb::unique_xmalloc_ptr<char>.
3142
3143 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3144
3145 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3146
3147 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3148 Yao Qi <yao.qi@linaro.org>
3149
3150 * cp-support.c (cp_canonicalize_string_full): Use
3151 gdb::unique_xmalloc_ptr<char>.
3152 (cp_canonicalize_string): Likewise.
3153
3154 2017-08-09 Yao Qi <yao.qi@linaro.org>
3155
3156 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3157 * regformats/i386/amd64-avx-avx512.dat: Remove.
3158 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3159 * regformats/i386/amd64-avx-mpx.dat:Remove.
3160 * regformats/i386/amd64-avx.dat: Remove.
3161 * regformats/i386/amd64-mpx.dat: Remove.
3162 * regformats/i386/i386-avx-avx512.dat: Remove.
3163 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3164 * regformats/i386/i386-avx-mpx.dat: Remove.
3165 * regformats/i386/i386-mmx.dat: Remove.
3166 * regformats/i386/i386-mpx.dat: Remove.
3167
3168 2017-08-09 Yao Qi <yao.qi@linaro.org>
3169
3170 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3171 * amd64-tdep.c: Don't include features/i386/x32*.c.
3172 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3173 functions.
3174 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3175 and i386/x32-avx-avx512.
3176 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3177 and i386/x32.xml.
3178 * features/i386/x32-avx-avx512.c: Removed.
3179 * features/i386/x32-avx-avx512.xml: Removed.
3180 * features/i386/x32-avx.c: Removed.
3181 * features/i386/x32-avx.xml: Removed.
3182 * features/i386/x32.c: Removed.
3183 * features/i386/x32.xml: Removed.
3184 * regformats/i386/x32-avx-avx512.dat: Removed.
3185 * regformats/i386/x32-avx.dat: Removed.
3186 * regformats/i386/x32.dat: Removed.
3187
3188 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3189
3190 PR breakpoints/21886
3191 * mem-break.c (default_memory_insert_breakpoint): Use
3192 `->placed_address' rather than `->reqstd_address' for the
3193 breakpoint location.
3194
3195 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3196
3197 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3198 assertions.
3199
3200 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3201
3202 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3203 a union of `tdep_info', `tdesc_data' and `id'.
3204 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3205 rather than `info.tdep_info'.
3206 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3207 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3208 * i386-tdep.c (i386_gdbarch_init): Likewise.
3209 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3210 * mips-tdep.c (mips_gdbarch_init): Likewise.
3211 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3212 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3213 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3214 `info.tdep_info'.
3215 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3216 `info.tdep_info'.
3217 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3218 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3219 `info.tdep_info'.
3220 * spu-tdep.c (spu_gdbarch_init): Likewise.
3221 * gdbarch.h: Regenerate.
3222
3223 2017-08-07 Leszek Swirski <leszeks@google.com>
3224
3225 PR symtab/20899
3226 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3227
3228 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3229
3230 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3231 (gdbsim_open): Rename gdb_argv args object to argv.
3232
3233 2017-08-05 Tom Tromey <tom@tromey.com>
3234
3235 * compile/compile-object-load.c (compile_object_load): Use
3236 gdb::unique_xmalloc_ptr.
3237 * cli/cli-dump.c (scan_filename): Rename from
3238 scan_filename_with_cleanup. Change return type.
3239 (scan_expression): Rename from scan_expression_with_cleanup.
3240 Change return type.
3241 (dump_memory_to_file, dump_value_to_file, restore_command):
3242 Use gdb::unique_xmalloc_ptr. Update.
3243 * cli/cli-cmds.c (find_and_open_script): Use
3244 gdb::unique_xmalloc_ptr.
3245 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3246 * symmisc.c (maintenance_print_symbols)
3247 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3248 * symfile.c (symfile_bfd_open, generic_load)
3249 (add_symbol_file_command, remove_symbol_file_command): Use
3250 gdb::unique_xmalloc_ptr.
3251 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3252 * psymtab.c (maintenance_print_psymbols): Use
3253 gdb::unique_xmalloc_ptr.
3254 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3255 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3256 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3257 (reload_shared_libraries_1): Likewise.
3258
3259 2017-08-05 Tom Tromey <tom@tromey.com>
3260
3261 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3262 (rust_op_vector, rust_set_vector): New typedefs.
3263 (current_parser): New global.
3264 (work_obstack): Change to pointer type. Update all users.
3265 (rust_ast, pstate): Remove globals.
3266 (struct rust_parser): New.
3267 (%union) <params, field_inits>: Change type.
3268 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3269 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3270 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3271 (convert_params_to_types, convert_params_to_expression): Change
3272 type of "params".
3273 (ast_string): Change type of "fields".
3274 (rust_parse): Make a rust_parser. Remove cleanups.
3275 (rust_lex_tests): Make and install an auto_obstack.
3276
3277 2017-08-04 Yao Qi <yao.qi@linaro.org>
3278
3279 * configure.srv (ipa_x32_linux_regobj): New.
3280 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3281 instead of X86_TDESC_AVX512.
3282 (initialize_low_tracepoint): Call
3283 init_registers_x32_avx_avx512_linux.
3284
3285 2017-08-04 Yao Qi <yao.qi@linaro.org>
3286
3287 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3288
3289 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3290
3291 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3292
3293 2017-08-03 Tom Tromey <tom@tromey.com>
3294
3295 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3296 Remove.
3297 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3298
3299 2017-08-03 Tom Tromey <tom@tromey.com>
3300
3301 * python/py-param.c (compute_enum_values): Use gdb_argv.
3302
3303 2017-08-03 Tom Tromey <tom@tromey.com>
3304
3305 * utils.h (struct gdb_argv_deleter): New.
3306 (gdb_argv): New class.
3307 * utils.c (gdb_argv::reset): New method.
3308 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3309 * tracefile.c (tsave_command): Use gdb_argv.
3310 * top.c (new_ui_command): Use gdb_argv.
3311 * symmisc.c (maintenance_print_symbols)
3312 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3313 * symfile.c (symbol_file_command, generic_load)
3314 (remove_symbol_file_command): Use gdb_argv.
3315 * stack.c (backtrace_command): Use gdb_argv.
3316 * source.c (add_path, show_substitute_path_command)
3317 (unset_substitute_path_command, set_substitute_path_command):
3318 Use gdb_argv.
3319 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3320 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3321 * remote.c (extended_remote_run, remote_put_command)
3322 (remote_get_command, remote_delete_command): Use gdb_argv.
3323 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3324 (gdbsim_open): Use gdb_argv.
3325 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3326 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3327 * procfs.c (procfs_info_proc): Use gdb_argv.
3328 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3329 * infrun.c (handle_command): Use gdb_argv.
3330 * inferior.c (add_inferior_command, clone_inferior_command):
3331 Use gdb_argv.
3332 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3333 * exec.c (exec_file_command): Use gdb_argv.
3334 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3335 * compile/compile.c (build_argc_argv): Use gdb_argv.
3336
3337 2017-08-03 Tom Tromey <tom@tromey.com>
3338
3339 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3340
3341 2017-08-03 Tom Tromey <tom@tromey.com>
3342
3343 * python/python.c (compute_python_string): Return std::string.
3344 (gdbpy_eval_from_control_command): Update.
3345 (do_start_initialization): Use std::string.
3346 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3347 xstrprintf.
3348 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3349 xstrprintf.
3350
3351 2017-08-03 Tom Tromey <tom@tromey.com>
3352
3353 * top.h (do_restore_instream_cleanup): Remove.
3354 * top.c (do_restore_instream_cleanup): Remove.
3355 (read_command_file): Use scoped_restore.
3356 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3357
3358 2017-08-03 Tom Tromey <tom@tromey.com>
3359
3360 * cli/cli-script.c (execute_user_command)
3361 (execute_control_command): Use scoped_restore.
3362
3363 2017-08-03 Tom Tromey <tom@tromey.com>
3364
3365 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3366 (execute_user_command): Remove user_call_depth; use
3367 user_args_stack's size instead.
3368
3369 2017-08-03 Tom Tromey <tom@tromey.com>
3370
3371 * top.h (in_user_command): Remove.
3372 * top.c (in_user_command): Remove.
3373 * cli/cli-script.c (do_restore_user_call_depth)
3374 (execute_user_command): Update.
3375
3376 2017-08-03 Tom Tromey <tom@tromey.com>
3377
3378 * valops.c (search_struct_method): Use gdb::byte_vector.
3379 * valarith.c (value_concat): Use std::vector.
3380 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3381 (simple_search_memory): Likewise.
3382 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3383 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3384 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3385 * elfread.c (elf_rel_plt_read): Use std::string.
3386 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3387 * cli/cli-dump.c (restore_section_callback): Use
3388 gdb::byte_vector.
3389
3390 2017-08-03 Tom Tromey <tom@tromey.com>
3391
3392 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3393
3394 2017-08-03 Tom Tromey <tom@tromey.com>
3395
3396 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3397 (tui_register_format): Use scoped_restore.
3398
3399 2017-08-03 Tom Tromey <tom@tromey.com>
3400
3401 * reverse.c (exec_direction_default): Remove.
3402 (exec_reverse_once): Use scoped_restore.
3403 * remote.c (restore_remote_timeout): Remove.
3404 (remote_flash_erase, remote_flash_write, remote_flash_done)
3405 (readchar, remote_serial_write): Use scoped_restore.
3406 * cli/cli-script.c (struct source_cleanup_lines_args)
3407 (source_cleanup_lines): Remove.
3408 (script_from_file): Use scoped_restore.
3409 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3410 (source_command): Use scoped_restore.
3411
3412 2017-08-03 Tom Tromey <tom@tromey.com>
3413
3414 * utils.h (make_cleanup_free_so): Remove.
3415 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3416 * solist.h (struct so_deleter): New.
3417 (so_list_up): New typedef.
3418 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3419
3420 2017-08-03 Tom Tromey <tom@tromey.com>
3421
3422 * utils.h (make_cleanup_restore_current_language): Remove.
3423 * utils.c (do_restore_current_language)
3424 (make_cleanup_restore_current_language): Remove.
3425 * parse.c (parse_exp_in_context_1)
3426 (parse_expression_with_language): Use
3427 scoped_restore_current_language.
3428 * mi/mi-main.c (mi_cmd_execute): Use
3429 scoped_restore_current_language.
3430 * language.h (scoped_restore_current_language): New class.
3431
3432 2017-08-03 Tom Tromey <tom@tromey.com>
3433
3434 * compile/compile.c (cleanup_unlink_file): Remove.
3435 (compile_to_object): Use gdb::unlinker.
3436 (eval_compile_command): Likewise.
3437
3438 2017-08-03 Tom Tromey <tom@tromey.com>
3439
3440 * utils.h (make_cleanup_fclose): Remove.
3441 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3442
3443 2017-08-03 Tom Tromey <tom@tromey.com>
3444
3445 * top.c (open_terminal_stream): Return gdb_file_up.
3446 (new_ui_command): Update.
3447
3448 2017-08-03 Tom Tromey <tom@tromey.com>
3449
3450 * source.c (print_source_lines_base, forward_search_command)
3451 (reverse_search_command): Use gdb_file_up.
3452
3453 2017-08-03 Tom Tromey <tom@tromey.com>
3454
3455 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3456
3457 2017-08-03 Tom Tromey <tom@tromey.com>
3458
3459 * cli/cli-cmds.c (find_and_open_script): Change return type.
3460 Remove "streamp" and "full_path" parameters.
3461 (source_script_with_search): Update.
3462 * auto-load.c (source_script_file): Update.
3463 * cli/cli-cmds.h (find_and_open_script): Change type.
3464 (open_script): New struct.
3465
3466 2017-08-03 Tom Tromey <tom@tromey.com>
3467
3468 * xml-support.c (xml_fetch_content_from_file): Update.
3469 * ui-file.c (stdio_file::open): Update.
3470 * tracefile-tfile.c (tfile_start): Update.
3471 * remote.c (remote_file_put, remote_file_get): Update.
3472 * nat/linux-procfs.c (linux_proc_get_int)
3473 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3474 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3475 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3476 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3477 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3478 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3479 * linux-nat.c (linux_proc_pending_signals): Update.
3480 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3481 (file_closer): Remove.
3482 * compile/compile.c (compile_to_object): Update.
3483 * common/filestuff.h (struct gdb_file_deleter): New.
3484 (gdb_file_up): New typedef.
3485 (gdb_fopen_cloexec): Change return type.
3486 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3487 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3488 (dump_binary_file, restore_binary_file): Update.
3489 * auto-load.c (auto_load_objfile_script_1): Update.
3490
3491 2017-08-03 Tom Tromey <tom@tromey.com>
3492
3493 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3494 (info_static_tracepoint_markers_command): Likewise.
3495 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3496 * skip.c (skip_info): Use ui_out_emit_table.
3497 * progspace.c (print_program_space): Use ui_out_emit_table.
3498 * osdata.c (info_osdata): Use ui_out_emit_table.
3499 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3500 ui_out_emit_table.
3501 * linux-thread-db.c (info_auto_load_libthread_db): Use
3502 ui_out_emit_table.
3503 * inferior.c (print_inferior): Use ui_out_emit_table.
3504 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3505 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3506 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3507 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3508 * ui-out.h (class ui_out_emit_table): New.
3509
3510 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3511
3512 * mips-tdep.c (mips_fpu_type_str): New function.
3513 (mips_dump_tdep): Call it.
3514
3515 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3516
3517 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3518 `->mips_fpu_type'.
3519
3520 2017-07-31 Xavier Roirand <roirand@adacore.com>
3521
3522 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3523
3524 2017-07-27 Xavier Roirand <roirand@adacore.com>
3525
3526 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3527
3528 2017-07-26 Yao Qi <yao.qi@linaro.org>
3529
3530 * cli/cli-cmds.c (maintenancechecklist): New variable.
3531 * gdbcmd.h (maintenancechecklist): Declare it.
3532 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3533 Call i386_linux_read_description with different masks.
3534 * maint.c (maintenance_check_command): New function.
3535 (_initialize_maint_cmds): Call add_prefix_cmd.
3536 * target-descriptions.c (tdesc_reg): override operator != and ==.
3537 (tdesc_type): Likewise.
3538 (tdesc_feature): Likewise.
3539 (target_desc): Likewise.
3540 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3541 (maintenance_check_xml_descriptions): New function.
3542 (_initialize_target_descriptions) Add command "xml-descriptions".
3543 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3544
3545 2017-07-26 Yao Qi <yao.qi@linaro.org>
3546
3547 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3548 Include features/i386/32bit-*.c.
3549 (i386_linux_read_description): Generate target description if it
3550 doesn't exist.
3551 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3552 functions.
3553 * features/i386/32bit-linux.c: Re-generated.
3554 * features/i386/32bit-sse.c: Likewise.
3555 * target-descriptions.c (print_c_feature::visit): Print code to
3556 set register number if needed.
3557 (print_c_feature) <m_next_regnum>: New field.
3558
3559 2017-07-26 Yao Qi <yao.qi@linaro.org>
3560
3561 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3562 (FEATURE_XMLFILES): New.
3563 (FEATURE_CFILES): New.
3564 New rules.
3565 (clean-cfiles): Remove generated c files.
3566 * features/i386/32bit-avx.c: Generated.
3567 * features/i386/32bit-avx512.c: Generated.
3568 * features/i386/32bit-core.c: Generated.
3569 * features/i386/32bit-linux.c: Generated.
3570 * features/i386/32bit-mpx.c: Generated.
3571 * features/i386/32bit-pkeys.c: Generated.
3572 * features/i386/32bit-sse.c: Generated.
3573 * target-descriptions.c: Include algorithm.
3574 (tdesc_element_visitor): Add method visit_end.
3575 (print_c_tdesc): Implement visit_end.
3576 (print_c_tdesc:: m_filename_after_features): Move it to
3577 protected.
3578 (print_c_feature): New class.
3579 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3580 name starts with "i386/32bit-".
3581
3582 2017-07-26 Yao Qi <yao.qi@linaro.org>
3583
3584 * target-descriptions.c (tdesc_element_visitor): New class.
3585 (tdesc_element): New class.
3586 (tdesc_reg): Inherit from tdesc_element.
3587 (tdesc_reg::accept): New function.
3588 (tdesc_type): Inherit from tdesc_element.
3589 (tdesc_type::accept): New function.
3590 (tdesc_feature): Inherit from tdesc_element.
3591 (tdesc_feature::accept): New function.
3592 (target_desc): Inherit from tdesc_element.
3593 (target_desc::target_desc): New.
3594 (target_desc::~target_desc): New.
3595 (target_desc::accept): New.
3596 (allocate_target_description): Use new.
3597 (free_target_description): Use delete.
3598 (print_c_tdesc): New class.
3599 (maint_print_c_tdesc_cmd): Adjust.
3600
3601 * features/aarch64.c: Re-generated.
3602 * features/arc-arcompact.c: Re-generated.
3603 * features/arc-v2.c: Re-generated.
3604 * features/arm/arm-with-iwmmxt.c: Re-generated.
3605 * features/arm/arm-with-m.c: Re-generated.
3606 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3607 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3608 * features/arm/arm-with-neon.c: Re-generated.
3609 * features/arm/arm-with-vfpv2.c: Re-generated.
3610 * features/arm/arm-with-vfpv3.c: Re-generated.
3611 * features/i386/amd64-avx-avx512.c: Re-generated.
3612 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3613 * features/i386/amd64-avx.c: Re-generated.
3614 * features/i386/amd64-avx-linux.c: Re-generated.
3615 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3616 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3617 * features/i386/amd64-avx-mpx.c: Re-generated.
3618 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3619 * features/i386/amd64.c: Re-generated.
3620 * features/i386/amd64-linux.c: Re-generated.
3621 * features/i386/amd64-mpx.c: Re-generated.
3622 * features/i386/amd64-mpx-linux.c: Re-generated.
3623 * features/i386/i386-avx-avx512.c: Re-generated.
3624 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3625 * features/i386/i386-avx.c: Re-generated.
3626 * features/i386/i386-avx-linux.c: Re-generated.
3627 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3628 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3629 * features/i386/i386-avx-mpx.c: Re-generated.
3630 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3631 * features/i386/i386.c: Re-generated.
3632 * features/i386/i386-linux.c: Re-generated.
3633 * features/i386/i386-mmx.c: Re-generated.
3634 * features/i386/i386-mmx-linux.c: Re-generated.
3635 * features/i386/i386-mpx.c: Re-generated.
3636 * features/i386/i386-mpx-linux.c: Re-generated.
3637 * features/i386/x32-avx-avx512.c: Re-generated.
3638 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3639 * features/i386/x32-avx.c: Re-generated.
3640 * features/i386/x32-avx-linux.c: Re-generated.
3641 * features/i386/x32.c: Re-generated.
3642 * features/i386/x32-linux.c: Re-generated.
3643 * features/microblaze.c: Re-generated.
3644 * features/microblaze-with-stack-protect.c: Re-generated.
3645 * features/mips64-dsp-linux.c: Re-generated.
3646 * features/mips64-linux.c: Re-generated.
3647 * features/mips-dsp-linux.c: Re-generated.
3648 * features/mips-linux.c: Re-generated.
3649 * features/nds32.c: Re-generated.
3650 * features/nios2.c: Re-generated.
3651 * features/nios2-linux.c: Re-generated.
3652 * features/rs6000/powerpc-32.c: Re-generated.
3653 * features/rs6000/powerpc-32l.c: Re-generated.
3654 * features/rs6000/powerpc-403.c: Re-generated.
3655 * features/rs6000/powerpc-403gc.c : Re-generated.
3656 * features/rs6000/powerpc-405.c: Re-generated.
3657 * features/rs6000/powerpc-505.c: Re-generated.
3658 * features/rs6000/powerpc-601.c: Re-generated.
3659 * features/rs6000/powerpc-602.c: Re-generated.
3660 * features/rs6000/powerpc-603.c: Re-generated.
3661 * features/rs6000/powerpc-604.c: Re-generated.
3662 * features/rs6000/powerpc-64.c: Re-generated.
3663 * features/rs6000/powerpc-64l.c: Re-generated.
3664 * features/rs6000/powerpc-7400.c: Re-generated.
3665 * features/rs6000/powerpc-750.c: Re-generated.
3666 * features/rs6000/powerpc-860.c: Re-generated.
3667 * features/rs6000/powerpc-altivec32.c: Re-generated.
3668 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3669 * features/rs6000/powerpc-altivec64.c: Re-generated.
3670 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3671 * features/rs6000/powerpc-cell32l.c: Re-generated.
3672 * features/rs6000/powerpc-cell64l.c: Re-generated.
3673 * features/rs6000/powerpc-e500.c: Re-generated.
3674 * features/rs6000/powerpc-e500l.c: Re-generated.
3675 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3676 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3677 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3678 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3679 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3680 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3681 * features/rs6000/powerpc-vsx32.c: Re-generated.
3682 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3683 * features/rs6000/powerpc-vsx64.c: Re-generated.
3684 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3685 * features/rs6000/rs6000.c: Re-generated.
3686 * features/s390-linux32.c: Re-generated.
3687 * features/s390-linux32v1.c: Re-generated.
3688 * features/s390-linux32v2.c: Re-generated.
3689 * features/s390-linux64.c: Re-generated.
3690 * features/s390-linux64v1.c: Re-generated.
3691 * features/s390-linux64v2.c: Re-generated.
3692 * features/s390-te-linux64.c: Re-generated.
3693 * features/s390-tevx-linux64.c: Re-generated.
3694 * features/s390-vx-linux64.c: Re-generated.
3695 * features/s390x-linux64.c: Re-generated.
3696 * features/s390x-linux64v1.c: Re-generated.
3697 * features/s390x-linux64v2.c: Re-generated.
3698 * features/s390x-te-linux64.c: Re-generated.
3699 * features/s390x-tevx-linux64.c: Re-generated.
3700 * features/s390x-vx-linux64.c: Re-generated.
3701 * features/sparc/sparc32-solaris.c: Re-generated.
3702 * features/sparc/sparc64-solaris.c: Re-generated.
3703 * features/tic6x-c62x.c: Re-generated.
3704 * features/tic6x-c62x-linux.c: Re-generated.
3705 * features/tic6x-c64x.c: Re-generated.
3706 * features/tic6x-c64x-linux.c: Re-generated.
3707 * features/tic6x-c64xp.c: Re-generated.
3708 * features/tic6x-c64xp-linux.c: Re-generated.
3709
3710 2017-07-26 Yao Qi <yao.qi@linaro.org>
3711
3712 * i386-linux-tdep.c (i386_linux_read_description): New function.
3713 (i386_linux_core_read_description): Call
3714 i386_linux_read_description.
3715 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3716 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3717 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3718 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3719 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3720 * x86-linux-nat.c (x86_linux_read_description): Call
3721 i386_linux_read_description.
3722
3723 2017-07-26 Yao Qi <yao.qi@linaro.org>
3724
3725 * NEWS: Mention it.
3726 * features/Makefile (%.c: %.xml): Pass the xml file name to
3727 command "maint print c-tdesc".
3728 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3729 name from 'arg'.
3730
3731 2017-07-26 Yao Qi <yao.qi@linaro.org>
3732
3733 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3734 in-class initialization.
3735 (tdesc_create_feature): Call new instead of XCNEW.
3736 (free_target_description): Ue delete.
3737
3738 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3739
3740 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3741
3742 2017-07-25 Yao Qi <yao.qi@linaro.org>
3743
3744 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3745 constant.
3746 (amd64_x32_init_abi): Likewise.
3747 * amd64-tdep.h (amd64_init_abi): Update declaration.
3748 (amd64_x32_init_abi): Likewise.
3749
3750 2017-07-25 Yao Qi <yao.qi@linaro.org>
3751
3752 PR tdep/21717
3753 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3754 condition for FPSCR.
3755 (arm_linux_store_inferior_registers): Likewise.
3756
3757 2017-07-22 Tom Tromey <tom@tromey.com>
3758
3759 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3760 <syscalls_counts>: Now a std::vector.
3761 (get_catch_syscall_inferior_data): Use "new".
3762 (catch_syscall_inferior_data_cleanup): Use "delete".
3763 (insert_catch_syscall, remove_catch_syscall)
3764 (clear_syscall_counts): Update.
3765
3766 2017-07-22 Tom Tromey <tom@tromey.com>
3767
3768 * break-catch-syscall.c (syscall_catchpoint)
3769 <syscalls_to_be_caught>: Now a std::vector<int>
3770 (~syscall_catchpoint): Remove.
3771 (insert_catch_syscall, remove_catch_syscall)
3772 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3773 (print_mention_catch_syscall, print_recreate_catch_syscall):
3774 Update.
3775 (create_syscall_event_catchpoint): Change type of "filter"
3776 parameter.
3777 (catch_syscall_split_args): Return a std::vector.
3778 (catch_syscall_command_1, catching_syscall_number_1): Update.
3779
3780 2017-07-22 Tom Tromey <tom@tromey.com>
3781
3782 * break-catch-throw.c (struct exception_catchpoint)
3783 <exception_rx>: Now a std::string.
3784 (~exception_catchpoint): Remove.
3785 (print_one_detail_exception_catchpoint): Update.
3786 (handle_gnu_v3_exceptions): Change type of except_rx.
3787 (extract_exception_regexp): Return a std::string.
3788 (catch_exception_command_1): Update.
3789
3790 2017-07-22 Tom Tromey <tom@tromey.com>
3791
3792 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3793 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3794 std::vector.
3795 <catch_all>: Now a bool.
3796 (~signal_catchpoint): Remove.
3797 (signal_catchpoint_insert_location)
3798 (signal_catchpoint_remove_location)
3799 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3800 (signal_catchpoint_print_mention)
3801 (signal_catchpoint_print_recreate)
3802 (signal_catchpoint_explains_signal): Update.
3803 (create_signal_catchpoint): Change type of "filter" and
3804 "catch_all".
3805 (catch_signal_split_args): Return a std::vector. Change type of
3806 "catch_all".
3807 (catch_signal_command): Update.
3808
3809 2017-07-20 Pedro Alves <palves@redhat.com>
3810
3811 * ada-lang.c (ada_language_defn): Make extern.
3812 (_initialize_ada_language): Remove add_language call.
3813 * c-lang.c (c_language_defn, cplus_language_defn)
3814 (asm_language_defn, minimal_language_defn): Make extern.
3815 (_initialize_c_language): Delete.
3816 * completer.c (compare_cstrings): Delete, moved to utils.h.
3817 * d-lang.c (d_language_defn): Make extern.
3818 (_initialize_d_language): Remove add_language calls.
3819 * defs.h (enum language): Add comment.
3820 * f-lang.c (f_language_defn): Make extern.
3821 (_initialize_f_language): Remove add_language call.
3822 * go-lang.c (go_language_defn): Make extern.
3823 (_initialize_go_language): Remove add_language call.
3824 * language.c: Include <algorithm>.
3825 (languages): Redefine as const array.
3826 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3827 (set_language_command): Handle "local". Use for-range loop.
3828 (set_language): Remove loop.
3829 (language_enum): Rewrite.
3830 (language_def, language_str): Remove loops.
3831 (add_language): Delete.
3832 (add_set_language_command): New, based on add_languages.
3833 (skip_language_trampoline): Adjust.
3834 (local_language_defn): Delete.
3835 (language_gdbarch_post_init): Adjust.
3836 (_initialize_language): Remove add_language calls. Call
3837 add_set_language_command.
3838 * language.h (add_language): Delete.
3839 (auto_language_defn)
3840 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3841 (asm_language_defn, c_language_defn, cplus_language_defn)
3842 (d_language_defn, f_language_defn, go_language_defn)
3843 (m2_language_defn, objc_language_defn, opencl_language_defn)
3844 (pascal_language_defn, rust_language_defn): Declare.
3845 * m2-lang.c (m2_language_defn): Make extern.
3846 (_initialize_m2_language): Remove add_language call.
3847 * objc-lang.c (objc_language_defn): Make extern.
3848 (_initialize_objc_language): Remove add_language call.
3849 * opencl-lang.c (opencl_language_defn): Make extern.
3850 (_initialize_opencl_language): Remove add_language call.
3851 * p-lang.c (pascal_language_defn): Make extern.
3852 (_initialize_pascal_language): Delete.
3853 * rust-lang.c (rust_language_defn): Make extern.
3854 (_initialize_rust_language): Delete.
3855 * utils.h (compare_cstrings): New static inline function.
3856
3857 2017-07-20 Pedro Alves <palves@redhat.com>
3858
3859 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3860 (get_var_value): Constify parameters.
3861 (get_int_var_value): Change prototype.
3862 (to_fixed_range_type): Adjust.
3863 * ada-lang.h (get_int_var_value): Change prototype.
3864
3865 2017-07-20 Pedro Alves <palves@redhat.com>
3866
3867 * dwarf2read.c (dw2_lookup_symbol): Use
3868 SYMBOL_MATCHES_SEARCH_NAME.
3869 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3870
3871 2017-07-20 Pedro Alves <palves@redhat.com>
3872
3873 * block.c (block_iter_name_step, block_iter_name_first)
3874 (block_iter_name_next): Delete.
3875 (block_lookup_symbol_primary): Adjust to use
3876 dict_iter_match_first/dict_iter_match_next.
3877 * block.h (block_iter_name_first, block_iter_name_next): Delete
3878 declarations.
3879 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3880 dict_iter_match_first/dict_iter_match_next.
3881
3882 2017-07-20 Pedro Alves <palves@redhat.com>
3883
3884 * cp-support.c (cp_find_first_component_aux): Add missing case for
3885 end of string.
3886
3887 2017-07-18 David Blaikie <dblaikie@gmail.com>
3888
3889 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3890 of dwo_cu's dwo_file.
3891
3892 2017-07-18 Yao Qi <yao.qi@linaro.org>
3893
3894 * remote.c (store_registers_using_G): Remove one line comment.
3895
3896 2017-07-18 Yao Qi <yao.qi@linaro.org>
3897
3898 * regcache.c (regcache_cpy): Simplify it.
3899 (regcache::cpy_no_passthrough): Remove it.
3900 * regcache.h (cpy_no_passthrough): Remove it.
3901 (regcache_dup, regcache_cpy): Update comments.
3902
3903 2017-07-18 Pedro Alves <palves@redhat.com>
3904
3905 * remote-sim.c (sim_command_completer): Adjust to work with a
3906 completion_tracker instead of a VEC.
3907
3908 2017-07-17 Pedro Alves <palves@redhat.com>
3909
3910 * completer.c (complete_source_filenames): New function.
3911 (complete_address_and_linespec_locations): New function.
3912 (location_completer): Use complete_address_and_linespec_locations.
3913 (completion_tracker::build_completion_result): Honor the tracker's
3914 request to suppress append.
3915 * completer.h (completion_tracker::suppress_append_ws)
3916 (completion_tracker::set_suppress_append_ws): New methods.
3917 (completion_tracker::m_suppress_append_ws): New field.
3918 (complete_source_filenames): New declaration.
3919 * linespec.c (linespec_complete_what): New.
3920 (struct ls_parser) <complete_what, completion_word,
3921 completion_quote_char, completion_quote_end, completion_tracker>:
3922 New fields.
3923 (string_find_incomplete_keyword_at_end): New.
3924 (linespec_lexer_lex_string): Record quote char. If in completion
3925 mode, don't throw.
3926 (linespec_lexer_consume_token): Advance the completion word point.
3927 (linespec_lexer_peek_token): Save/restore completion info.
3928 (save_stream_and_consume_token): New.
3929 (set_completion_after_number): New.
3930 (linespec_parse_basic): Set what to complete next depending on
3931 token. Handle function and label completions specially.
3932 (parse_linespec): Disable objc shortcut in completion mode. Set
3933 what to complete next depending on token type. Skip keyword if in
3934 completion mode.
3935 (complete_linespec_component, linespec_complete): New.
3936 * linespec.h (linespec_complete): Declare.
3937
3938 2017-07-17 Pedro Alves <palves@redhat.com>
3939
3940 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3941 Handle 'operator<' / 'operator<<'.
3942
3943 2017-07-17 Pedro Alves <palves@redhat.com>
3944
3945 * completer.c (collect_explicit_location_matches): Handle
3946 MATCH_LABEL.
3947 (convert_explicit_location_to_linespec): New, factored out from
3948 ...
3949 (convert_explicit_location_to_sals): ... this.
3950 (complete_label): New.
3951 (linespec_complete_label, find_label_symbols_in_block): New.
3952 (find_label_symbols): Add completion_mode parameter and adjust to
3953 call find_label_symbols_in_block.
3954 * linespec.h (linespec_complete_label): Declare.
3955
3956 2017-07-17 Pedro Alves <palves@redhat.com>
3957
3958 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3959 complete_symbol_mode parameter.
3960 * cli/cli-cmds.c (complete_command): Get the completion result out
3961 of the handle_brkchars tracker if used a custom word point.
3962 * completer.c: Include "linespec.h".
3963 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3964 (advance_to_expression_complete_word_point): New.
3965 (completion_tracker::completes_to_completion_word): New.
3966 (complete_files_symbols): Pass down
3967 complete_symbol_mode::EXPRESSION.
3968 (explicit_options, probe_options): New.
3969 (collect_explicit_location_matches): Complete on the
3970 explictit_loc->foo instead of word. Use
3971 linespec_complete_function. Handle MATCH_LINE. Handle offering
3972 keyword and options completions.
3973 (backup_text_ptr): Delete.
3974 (skip_keyword): New.
3975 (complete_explicit_location): Remove 'word' parameter. Add
3976 language, quoted_arg_start and quoted_arg_end parameters.
3977 Rewrite, parsing left to right.
3978 (location_completer): Rewrite.
3979 (location_completer_handle_brkchars): New function.
3980 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3981 (enum complete_line_internal_reason): Adjust comments.
3982 (completion_tracker::discard_completions): New.
3983 (completer_handle_brkchars_func_for_completer): Handle
3984 location_completer.
3985 (gdb_custom_word_point_brkchars)
3986 (gdb_org_rl_basic_quote_characters): New.
3987 (gdb_completion_word_break_characters_throw)
3988 (completion_find_completion_word): Handle trackers that use a
3989 custom word point.
3990 (completion_tracker::advance_custom_word_point_by): New.
3991 (completion_tracker::build_completion_result): Don't rely on
3992 readline appending the quote char.
3993 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3994 use a custom word point.
3995 (gdb_rl_attempted_completion_function): Restore
3996 rl_basic_quote_characters.
3997 * completer.h (class completion_tracker): Extend intro comment.
3998 (completion_tracker::set_quote_char)
3999 (completion_tracker::quote_char)
4000 (completion_tracker::set_use_custom_word_point)
4001 (completion_tracker::use_custom_word_point)
4002 (completion_tracker::custom_word_point)
4003 (completion_tracker::set_custom_word_point)
4004 (completion_tracker::advance_custom_word_point_by)
4005 (completion_tracker::completes_to_completion_word)
4006 (completion_tracker::discard_completions): New methods.
4007 (completion_tracker::m_quote_char)
4008 (completion_tracker::m_use_custom_word_point)
4009 (completion_tracker::m_custom_word_point): New fields.
4010 (advance_to_expression_complete_word_point): Declare.
4011 * f-lang.c (f_collect_symbol_completion_matches): Add
4012 complete_symbol_mode parameter.
4013 * language.h (struct language_defn)
4014 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4015 parameter.
4016 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4017 (linespec_complete_function): New function.
4018 (linespec_lexer_lex_keyword): Adjust.
4019 * linespec.h (linespec_keywords, linespec_complete_function): New
4020 declarations.
4021 * location.c (find_end_quote): New function.
4022 (explicit_location_lex_one): Add explicit_completion_info
4023 parameter. Save quoting info. Don't throw if being called for
4024 completion. Don't handle Ada operators here.
4025 (is_cp_operator, skip_op_false_positives, first_of)
4026 (explicit_location_lex_one_function): New function.
4027 (string_to_explicit_location): Replace 'dont_throw' parameter with
4028 an explicit_completion_info pointer parameter. Handle it. Don't
4029 use explicit_location_lex_one to lex function names. Use
4030 explicit_location_lex_one_function instead.
4031 * location.h (struct explicit_completion_info): New.
4032 (string_to_explicit_location): Replace 'dont_throw' parameter with
4033 an explicit_completion_info pointer parameter.
4034 * symtab.c (default_collect_symbol_completion_matches_break_on):
4035 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4036 (default_collect_symbol_completion_matches)
4037 (collect_symbol_completion_matches): Add complete_symbol_mode
4038 parameter.
4039 (collect_symbol_completion_matches_type): Pass down
4040 complete_symbol_mode::EXPRESSION.
4041 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4042 parameter. Handle LINESPEC mode.
4043 * symtab.h (complete_symbol_mode): New.
4044 (default_collect_symbol_completion_matches_break_on)
4045 (default_collect_symbol_completion_matches)
4046 (collect_symbol_completion_matches)
4047 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4048 parameter.
4049
4050 2017-07-17 Pedro Alves <palves@redhat.com>
4051
4052 * utils.c (enum class strncmp_iw_mode): New.
4053 (strcmp_iw): Rename to ...
4054 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4055 parameters. Handle them.
4056 (strncmp_iw): New.
4057 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4058 * utils.h (strncmp_iw): Declare.
4059 (strcmp_iw): Move describing comments here.
4060
4061 2017-07-17 Pedro Alves <palves@redhat.com>
4062
4063 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4064 CP_OPERATOR_STR.
4065 * c-typeprint.c (is_type_conversion_operator): Use
4066 CP_OPERATOR_STR.
4067 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4068 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4069 CP_OPERATOR_LEN.
4070 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4071 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4072 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4073 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4074 CP_OPERATOR_STR.
4075 * location.c: Include "cp-support.h".
4076 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4077 CP_OPERATOR_STR.
4078 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4079 CP_OPERATOR_LEN.
4080
4081 2017-07-17 Pedro Alves <palves@redhat.com>
4082
4083 * cli/cli-cmds.c (complete_command): Use a completion tracker
4084 along with completion_find_completion_word for handle_brkchars
4085 phase.
4086 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4087 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4088 (struct gdb_rl_completion_word_info): New.
4089 (gdb_rl_find_completion_word): New.
4090 (completion_find_completion_word): New.
4091 * completer.h (completion_find_completion_word): Declare.
4092
4093 2017-07-17 Pedro Alves <palves@redhat.com>
4094
4095 * ada-lang.c (symbol_completion_match): Adjust comments.
4096 (symbol_completion_add): Replace vector parameter with
4097 completion_tracker parameter. Use it.
4098 (ada_make_symbol_completion_list): Rename to...
4099 (ada_collect_symbol_completion_matches): ... this. Add
4100 completion_tracker parameter and use it.
4101 (ada_language_defn): Adjust.
4102 * break-catch-syscall.c (catch_syscall_completer): Adjust
4103 prototype and work with completion_tracker instead of VEC.
4104 * breakpoint.c (condition_completer): Adjust prototype and work
4105 with completion_tracker instead of VEC.
4106 * c-lang.c (c_language_defn, cplus_language_defn)
4107 (asm_language_defn, minimal_language_defn): Adjust to renames.
4108 * cli/cli-cmds.c (complete_command): Rework using
4109 completion_tracker. Catch exceptions when completing.
4110 * cli/cli-decode.c (integer_unlimited_completer)
4111 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4112 with completion_tracker instead of VEC.
4113 * command.h (struct completion_tracker): Forward declare.
4114 (completer_ftype, completer_handle_brkchars_ftype): Change
4115 types.
4116 (complete_on_cmdlist, complete_on_enum): Adjust.
4117 * completer.c: Include <algorithm>.
4118 (struct gdb_completer_state): New.
4119 (current_completion): New global.
4120 (readline_line_completion_function): Delete.
4121 (noop_completer, filename_completer)
4122 (filename_completer_handle_brkchars, complete_files_symbols)
4123 (linespec_location_completer): Adjust to work with a
4124 completion_tracker instead of a VEC.
4125 (string_or_empty): New.
4126 (collect_explicit_location_matches): Adjust to work with a
4127 completion_tracker instead of a VEC.
4128 (explicit_location_completer): Rename to ...
4129 (complete_explicit_location): ... this and adjust to work with a
4130 completion_tracker instead of a VEC.
4131 (location_completer): Adjust to work with a completion_tracker
4132 instead of a VEC.
4133 (add_struct_fields): Adjust to work with a completion_list instead
4134 of VEC.
4135 (expression_completer): Rename to ...
4136 (complete_expression): ... this and adjust to work with a
4137 completion_tracker instead of a VEC. Use complete_files_symbols.
4138 (expression_completer): Reimplement on top of complete_expression.
4139 (symbol_completer): Adjust to work with a completion_tracker
4140 instead of a VEC.
4141 (enum complete_line_internal_reason): Add describing comments.
4142 (complete_line_internal_normal_command): Adjust to work with a
4143 completion_tracker instead of a VEC.
4144 (complete_line_internal): Rename to ...
4145 (complete_line_internal_1): ... this and adjust to work with a
4146 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4147 handle_brkchars phase.
4148 (new_completion_tracker): Delete.
4149 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4150 complete_line_internal_1.
4151 (free_completion_tracker): Delete.
4152 (INITIAL_COMPLETION_HTAB_SIZE): New.
4153 (completion_tracker::completion_tracker)
4154 (completion_tracker::~completion_tracker): New.
4155 (maybe_add_completion): Delete.
4156 (completion_tracker::maybe_add_completion)
4157 (completion_tracker::add_completion)
4158 (completion_tracker::add_completions): New.
4159 (throw_max_completions_reached_error): Delete.
4160 (complete_line): Adjust to work with a completion_tracker instead
4161 of a VEC. Don't create a completion_tracker_t or check for max
4162 completions here.
4163 (command_completer, command_completer_handle_brkchars)
4164 (signal_completer, reg_or_group_completer_1)
4165 (reg_or_group_completer, default_completer_handle_brkchars):
4166 Adjust to work with a completion_tracker.
4167 (gdb_completion_word_break_characters_throw): New.
4168 (gdb_completion_word_break_characters): Reimplement.
4169 (line_completion_function): Delete.
4170 (completion_tracker::recompute_lowest_common_denominator)
4171 (expand_preserving_ws)
4172 (completion_tracker::build_completion_result)
4173 (completion_result::completion_result)
4174 (completion_result::completion_result)
4175 (completion_result::~completion_result)
4176 (completion_result::completion_result)
4177 (completion_result::release_match_list, compare_cstrings)
4178 (completion_result::sort_match_list)
4179 (completion_result::reset_match_list)
4180 (gdb_rl_attempted_completion_function_throw)
4181 (gdb_rl_attempted_completion_function): New.
4182 * completer.h (completion_list, struct completion_result)
4183 (class completion_tracker): New.
4184 (complete_line): Add completion_tracker parameter.
4185 (readline_line_completion_function): Delete.
4186 (gdb_rl_attempted_completion_function): New.
4187 (noop_completer, filename_completer, expression_completer)
4188 (location_completer, symbol_completer, command_completer)
4189 (signal_completer, reg_or_group_completer): Update prototypes.
4190 (completion_tracker_t, new_completion_tracker)
4191 (make_cleanup_free_completion_tracker): Delete.
4192 (enum maybe_add_completion_enum): Delete.
4193 (maybe_add_completion): Delete.
4194 (throw_max_completions_reached_error): Delete.
4195 * corefile.c (complete_set_gnutarget): Adjust to work with a
4196 completion_tracker instead of a VEC.
4197 * cp-abi.c (cp_abi_completer): Adjust to work with a
4198 completion_tracker instead of a VEC.
4199 * d-lang.c (d_language_defn): Adjust.
4200 * disasm.c (disassembler_options_completer): Adjust to work with a
4201 completion_tracker instead of a VEC.
4202 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4203 (f_collect_symbol_completion_matches): ... this. Adjust to work
4204 with a completion_tracker instead of a VEC.
4205 (f_language_defn): Adjust.
4206 * go-lang.c (go_language_defn): Adjust.
4207 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4208 Adjust to work with a completion_tracker instead of a VEC.
4209 * infrun.c (handle_completer): Likewise.
4210 * interps.c (interpreter_completer): Likewise.
4211 * interps.h (interpreter_completer): Likewise.
4212 * language.c (unknown_language_defn, auto_language_defn)
4213 (local_language_defn): Adjust.
4214 * language.h (language_defn::la_make_symbol_completion_list):
4215 Rename to ...
4216 (language_defn::la_collect_symbol_completion_matches): ... this
4217 and adjust to work with a completion_tracker instead of a VEC.
4218 * m2-lang.c (m2_language_defn): Adjust.
4219 * objc-lang.c (objc_language_defn): Adjust.
4220 * opencl-lang.c (opencl_language_defn): Adjust.
4221 * p-lang.c (pascal_language_defn): Adjust.
4222 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4223 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4224 with a completion_tracker.
4225 * rust-lang.c (rust_language_defn): Adjust.
4226 * symtab.c (free_completion_list, do_free_completion_list)
4227 (return_val, completion_tracker): Delete.
4228 (completion_list_add_name, completion_list_add_symbol)
4229 (completion_list_add_msymbol, completion_list_objc_symbol)
4230 (completion_list_add_fields, add_symtab_completions): Add
4231 completion_tracker parameter and use it.
4232 (default_make_symbol_completion_list_break_on_1): Rename to...
4233 (default_collect_symbol_completion_matches_break_on): ... this.
4234 Add completion_tracker parameter and use it instead of allocating
4235 a completion tracker here.
4236 (default_make_symbol_completion_list_break_on): Delete old
4237 implementation.
4238 (default_make_symbol_completion_list): Delete.
4239 (default_collect_symbol_completion_matches): New.
4240 (make_symbol_completion_list): Delete.
4241 (collect_symbol_completion_matches): New.
4242 (make_symbol_completion_type): Rename to ...
4243 (collect_symbol_completion_matches_type): ... this. Add
4244 completion_tracker parameter and use it instead of VEC.
4245 (make_file_symbol_completion_list_1): Rename to...
4246 (collect_file_symbol_completion_matches): ... this. Add
4247 completion_tracker parameter and use it instead of VEC.
4248 (make_file_symbol_completion_list): Delete.
4249 (add_filename_to_list): Use completion_list instead of a VEC.
4250 (add_partial_filename_data::list): Now a completion_list.
4251 (make_source_files_completion_list): Work with a completion_list
4252 instead of a VEC.
4253 * symtab.h: Include "completer.h".
4254 (default_make_symbol_completion_list_break_on)
4255 (default_make_symbol_completion_list, make_symbol_completion_list)
4256 (make_symbol_completion_type, make_file_symbol_completion_list)
4257 (make_source_files_completion_list): Delete.
4258 (default_collect_symbol_completion_matches_break_on)
4259 (default_collect_symbol_completion_matches)
4260 (collect_symbol_completion_matches)
4261 (collect_symbol_completion_matches_type)
4262 (collect_file_symbol_completion_matches)
4263 (make_source_files_completion_list): New.
4264 * top.c (init_main): Don't install a rl_completion_entry_function
4265 hook. Install a rl_attempted_completion_function hook instead.
4266 * tui/tui-layout.c (layout_completer): Adjust to work with a
4267 completion_tracker.
4268 * tui/tui-regs.c (tui_reggroup_completer):
4269 * tui/tui-win.c (window_name_completer, focus_completer)
4270 (winheight_completer): Adjust to work with a completion_tracker.
4271 * value.c: Include "completer.h".
4272 (complete_internalvar): Adjust to work with a completion_tracker.
4273 * value.h (complete_internalvar): Likewise.
4274
4275 2017-07-17 Pedro Alves <palves@redhat.com>
4276
4277 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4278 renames.
4279 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4280 comments to completer_ftype's declaration.
4281 <completer_handle_brkchars>: Change type to
4282 completer_handle_brkchars_ftype.
4283 * command.h (completer_ftype): Add describing comment and give
4284 names to parameters.
4285 (completer_ftype_void): Rename to ...
4286 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4287 (set_cmd_completer_handle_brkchars): Adjust.
4288 * completer.c (filename_completer_handle_brkchars): New function.
4289 (complete_line_internal_normal_command): New function, factored
4290 out from ...
4291 (complete_line_internal): ... here.
4292 (command_completer_handle_brkchars)
4293 (default_completer_handle_brkchars)
4294 (completer_handle_brkchars_func_for_completer): New functions.
4295 * completer.h (set_gdb_completion_word_break_characters): Delete
4296 declaration.
4297 (completer_handle_brkchars_func_for_completer): New declaration.
4298 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4299 completer_handle_brkchars_func_for_completer.
4300
4301 2017-07-17 Pedro Alves <palves@redhat.com>
4302
4303 * completer.c (symbol_completer): New function, based on
4304 make_symbol_completion_list_fn.
4305 * completer.h (symbol_completer): New declaration.
4306 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4307 * python/py-cmd.c (completers): Adjust.
4308 * symtab.c (make_symbol_completion_list_fn): Delete.
4309 * symtab.h (make_symbol_completion_list_fn): Delete.
4310 * cli/cli-decode.c (add_cmd): Adjust.
4311
4312 2017-07-17 Pedro Alves <palves@redhat.com>
4313
4314 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4315 * dwarf2read.c: Include "filename-seen-cache.h".
4316 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4317 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4318 * filename-seen-cache.c: New file.
4319 * filename-seen-cache.h: New file.
4320 * symtab.c: Include "filename-seen-cache.h".
4321 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4322 (create_filename_seen_cache, clear_filename_seen_cache)
4323 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4324 to filename-seen-cache.h/filename-seen-cache.c.
4325 (output_source_filename, sources_info)
4326 (maybe_add_partial_symtab_filename)
4327 (make_source_files_completion_list): Adjust to use
4328 filename_seen_cache.
4329
4330 2017-07-17 Pedro Alves <palves@redhat.com>
4331
4332 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4333 fields.
4334 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4335 dwarf2_debug_sections*)): New.
4336 (dwarf2_per_objfile::dwarf2_per_objfile(const
4337 dwarf2_per_objfile&)): Declare as deleted.
4338 (dwarf2_per_objfile::operator=): Declare as deleted.
4339 (dwarf2_per_objfile::dwarf2_per_objfile)
4340 (dwarf2_per_objfile::~dwarf2_per_objfile)
4341 (dwarf2_per_objfile::free_cached_comp_units): New.
4342 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4343 ctor. Call dwarf2_per_objfile's ctor manually.
4344 (dwarf2_locate_sections): Deleted/refactored as ...
4345 (dwarf2_per_objfile::locate_sections): ... this new method.
4346 (free_cached_comp_units): Defer to
4347 dwarf2_per_objfile::free_cached_comp_units.
4348 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4349
4350 2017-07-14 Tom Tromey <tom@tromey.com>
4351
4352 PR rust/21764:
4353 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4354 parameter.
4355 <UNOP_SIZEOF>: Split into separate case.
4356 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4357
4358 2017-07-14 Tom Tromey <tom@tromey.com>
4359
4360 PR rust/21763:
4361 * symtab.c (symbol_matches_domain): Add language_rust to special
4362 case.
4363 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4364 treat LOC_TYPEDEF symbols as variables.
4365
4366 2017-07-14 Pedro Alves <palves@redhat.com>
4367
4368 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4369 symtabs matching all symtabs with SRCFILE as file name instead of
4370 only considering the first hit, with lookup_symtab.
4371
4372 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4373
4374 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4375 operator_name parameters.
4376 (gen_expr): Update function call.
4377
4378 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4379
4380 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4381 parameter.
4382 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4383 Likewise.
4384 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4385 parameter, use agent_expr::gdbarch instead, update function
4386 calls.
4387 (locexpr_tracepoint_var_ref): Likewise.
4388 (loclist_tracepoint_var_ref): Likewise.
4389 * ax-gdb.c (gen_trace_static_fields): Likewise.
4390 (gen_traced_pop): Likewise.
4391 (gen_frame_args_address): Likewise.
4392 (gen_frame_locals_address): Likewise.
4393 (gen_var_ref): Likewise.
4394 (gen_struct_ref_recursive): Likewise.
4395 (gen_static_field): Likewise.
4396 (gen_maybe_namespace_elt): Likewise.
4397 (gen_expr): Likewise.
4398 (gen_trace_for_var): Likewise.
4399 (gen_trace_for_expr): Likewise.
4400 (gen_trace_for_return_address): Likewise.
4401
4402 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4403
4404 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4405 parameter.
4406 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4407
4408 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4409
4410 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4411 from ax, update calls.
4412 (gen_usual_arithmetic): Likewise.
4413 (gen_integral_promotions): Likewise.
4414 (gen_bitfield_ref): Likewise.
4415 (gen_primitive_field): Likewise.
4416 (gen_struct_ref_recursive): Likewise.
4417 (gen_struct_ref): Likewise.
4418 (gen_maybe_namespace_elt): Likewise.
4419 (gen_struct_elt_for_reference): Likewise.
4420 (gen_namespace_elt): Likewise.
4421 (gen_aggregate_elt_ref): Likewise.
4422 (gen_expr): Get gdbarch from ax, update calls.
4423 (gen_expr_binop_rest): Likewise.
4424
4425 2017-07-13 Pedro Alves <palves@redhat.com>
4426
4427 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4428 as default tdesc.
4429 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4430 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4431 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4432 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4433 tdep.
4434 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4435 Get final tdesc from the tdep.
4436 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4437 default tdesc.
4438 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4439 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4440 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4441 Use it as default tdesc.
4442 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4443 down to amd_init_abi. No longer handle fallback tdesc here.
4444 * amd64-tdep.h (tdesc_x32): Declare.
4445 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4446 parameter.
4447 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4448 as default tdesc.
4449
4450 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4451
4452 * s390-linux-tdep.c (s390_process_record): Add support for
4453 instructions new in arch12.
4454
4455 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4456
4457 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4458 PT_GETFSBASE and PT_GETGSBASE.
4459 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4460 PT_SETGSBASE.
4461
4462 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4463
4464 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4465 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4466 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4467 those rules.
4468 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4469 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4470 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4471 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4472 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4473 * features/i386/amd64.xml: Add 64bit-segments.xml.
4474 * features/i386/amd64-avx-avx512.c: Regenerated.
4475 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4476 * features/i386/amd64-avx-mpx.c: Regenerated.
4477 * features/i386/amd64-avx.c: Regenerated.
4478 * features/i386/amd64-mpx.c: Regenerated.
4479 * features/i386/amd64.c: Regenerated.
4480 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4481 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4482 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4483 * regformats/i386/amd64-avx.dat: Regenerated.
4484 * regformats/i386/amd64-mpx.dat: Regenerated.
4485 * regformats/i386/amd64.dat: Regenerated.
4486
4487 2017-07-10 Yao Qi <yao.qi@linaro.org>
4488
4489 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4490 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4491
4492 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4493
4494 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4495 unsetenv.
4496 * gnulib/aclocal.m4: Regenerate.
4497 * gnulib/config.in: Regenerate.
4498 * gnulib/configure: Regenerate.
4499 * gnulib/import/Makefile.am: Regenerate.
4500 * gnulib/import/Makefile.in: Regenerate.
4501 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4502 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4503 * gnulib/import/m4/environ.m4: New file.
4504 * gnulib/import/m4/setenv.m4: New file.
4505 * gnulib/import/setenv.c: New file.
4506 * gnulib/import/unsetenv.c: New file.
4507
4508 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4509
4510 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4511 address when op is DW_OP_addr.
4512
4513 2017-07-09 Tom Tromey <tom@tromey.com>
4514
4515 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4516 check and apply to outer type.
4517
4518 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4519
4520 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4521 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4522 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4523 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4524
4525 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4526
4527 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4528
4529 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4530
4531 * corelow.c (get_core_siginfo): Remove.
4532 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4533 instead of get_core_siginfo.
4534 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4535 * gdbarch.h: Re-generate.
4536 * gdbarch.c: Re-generate.
4537 * linux-tdep.c (linux_core_xfer_siginfo): New.
4538 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4539
4540 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4541
4542 * corelow.c (thread_section_name): Move to ...
4543 * gdbcore.h (thread_section_name): ... here.
4544
4545 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4546
4547 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4548 (struct siginfo32): New.
4549 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4550 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4551 via ptrace(PT_LWPINFO).
4552
4553 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4554
4555 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4556 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4557 (fbsd_get_siginfo_type): New.
4558 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4559 (_initialize_fbsd_tdep): New.
4560
4561 2017-07-06 David Blaikie <dblaikie@gmail.com>
4562
4563 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4564 a singular dwo_unit*) to support multiple CUs in the same way that
4565 multiple TUs are supported.
4566 (create_cus_hash_table): Replace create_dwo_cu with a function for
4567 parsing multiple CUs from a DWO file.
4568 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4569 create_dwo_cu.
4570 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4571 htab_find, rather than comparing the signature to a singleton CU in
4572 the dwo_file.
4573
4574 2017-07-06 Pedro Alves <palves@redhat.com>
4575
4576 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4577
4578 2017-07-04 Pedro Alves <palves@redhat.com>
4579
4580 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4581 * gdbtypes.h (TYPE_STATIC): Delete.
4582 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4583 is_synchronized, is_native>: Delete.
4584 <dummy>: Bump.
4585 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4586 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4587 (TYPE_FN_FIELD_ABSTRACT): Delete.
4588
4589 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4590
4591 * buffer.h (buffer_finish): Fix spelling mistakes.
4592
4593 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4594
4595 * .dir-locals.el: Automatically switch to C-style comments in
4596 versions of Emacs that support the feature.
4597
4598 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4599 Pedro Alves <palves@redhat.com>
4600
4601 PR cli/21688
4602 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4603 (process_next_line): New variable 'inline_cmd'.
4604 Adjust 'if' clauses for "python", "compile" and "guile" to use
4605 'command_name_equals' and check for '!inline_cmd'.
4606
4607 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4608
4609 PR cli/21688
4610 * cli/cli-script.c (command_name_equals_not_inline): New function.
4611 (process_next_line): Adjust 'if' clauses for "python", "compile"
4612 and "guile" to use command_name_equals_not_inline.
4613
4614 2017-06-29 Pedro Alves <palves@redhat.com>
4615
4616 * completer.c (expression_completer): Call
4617 linespec_location_completer instead of location_completer.
4618
4619 2017-06-29 Pedro Alves <palves@redhat.com>
4620
4621 * completer.c (expression_completer): Remove code that recomputes
4622 'text' from 'word'.
4623
4624 2017-06-29 Yao Qi <yao.qi@linaro.org>
4625
4626 * regformats/regdat.sh: Generate code with
4627 "ifndef IN_PROCESS_AGENT".
4628
4629 2017-06-28 Pedro Alves <palves@redhat.com>
4630
4631 * command.h: Include "common/scoped_restore.h".
4632
4633 2017-06-28 Yao Qi <yao.qi@linaro.org>
4634
4635 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4636 instead of obstack_grow.
4637
4638 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4639
4640 PR gdb/21337
4641 * symfile.c (reread_symbols): Call objfiles_changed just before
4642 read_symbols.
4643
4644 2017-06-27 Pedro Alves <palves@redhat.com>
4645
4646 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4647 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4648 (completion_list_add_symbol, completion_list_add_msymbol):
4649 ... these new functions.
4650 (add_symtab_completions)
4651 (default_make_symbol_completion_list_break_on_1): Adjust.
4652
4653 2017-06-27 Pedro Alves <palves@redhat.com>
4654
4655 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4656 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4657 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4658 dtor.
4659 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4660 'storage_obstack' field an auto_obstack. In-class initialize all
4661 non-bitfield fields. Make minsyms_read bool.
4662 * symfile.c (read_symbols): Adjust.
4663
4664 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4665
4666 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4667 (gdbsim_store_register): Likewise.
4668
4669 2017-06-27 Pedro Alves <palves@redhat.com>
4670
4671 * c-exp.y (name_obstack): Now an auto_obstack.
4672 (yylex): Use auto_obstack::clear.
4673 (c_parse): Use auto_obstack::clear instead of reinitializing and
4674 freeing the obstack.
4675 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4676 * d-exp.y (name_obstack): Now an auto_obstack.
4677 (yylex): Use auto_obstack::clear.
4678 (d_parse): Use auto_obstack::clear instead of reinitializing and
4679 freeing the obstack.
4680 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4681 auto_obstack.
4682 * dwarf2read.c (create_addrmap_from_index)
4683 (dwarf2_build_psymtabs_hard)
4684 (update_enumeration_type_from_children): Likewise.
4685 * gdb_obstack.h (auto_obstack): New type.
4686 * go-exp.y (name_obstack): Now an auto_obstack.
4687 (build_packaged_name): Use auto_obstack::clear.
4688 (go_parse): Use auto_obstack::clear instead of reinitializing and
4689 freeing the obstack.
4690 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4691 auto_obstack.
4692 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4693 * rust-exp.y (work_obstack): Now an auto_obstack.
4694 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4695 reinitializing and freeing the obstack.
4696 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4697 (host_char_to_target): Use auto_obstack.
4698 * utils.h (make_cleanup_obstack_free): Delete declaration.
4699 * valprint.c (generic_emit_char, generic_printstr): Use
4700 auto_obstack.
4701
4702 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4703
4704 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4705 thread.
4706 (darwin_init_thread_list): Don't update dummy thread.
4707 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4708
4709 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4710
4711 * record-full.c (netorder16): Remove.
4712
4713 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4714
4715 * common/diagnostics.h: Define macros for GCC.
4716 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4717 * common/vec.h: Include diagnostics.h.
4718 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4719 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4720 warning.
4721
4722 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4723
4724 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4725 New macro.
4726 * ada-lex.l: Ignore deprecated register warnings.
4727
4728 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4729
4730 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4731 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4732
4733 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4734
4735 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4736 its own line.
4737
4738 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4739
4740 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4741
4742 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4743
4744 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4745 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4746 (xtensa_register_read_masked): Likewise.
4747
4748 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4749
4750 * common/environ.c (gdb_environ::unset): Update comment.
4751
4752 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4753
4754 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4755 registers.
4756
4757 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4758
4759 * record-full.c (record_full_exec_insn): Use byte_vector.
4760
4761 2017-06-22 Yao Qi <yao.qi@linaro.org>
4762
4763 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4764 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4765
4766 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4767
4768 * remote.c (cached_reg): Move from here...
4769 * regcache.h (cached_reg): ...to here.
4770 * python/py-unwind.c (struct reg_info): Remove.
4771 (cached_frame_info): Use cached_reg_t.
4772 (pyuw_prev_register): Likewise.
4773 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4774 (pyuw_dealloc_cache): Free all registers.
4775
4776 2017-06-22 Pedro Alves <palves@redhat.com>
4777 Simon Marchi <simon.marchi@ericsson.com>
4778
4779 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4780 warning.
4781 * common/diagnostics.h: New file.
4782
4783 2017-06-22 Pedro Alves <palves@redhat.com>
4784
4785 * common/agent.h: Add include guards.
4786
4787 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4788
4789 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4790 talk about addressable units instead of bytes.
4791
4792 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4793
4794 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4795 of '::const_iterator'.
4796
4797 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4798
4799 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4800 'unittests/environ-selftests.c'.
4801 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4802 * charset.c (find_charset_names): Declare object 'iconv_env'.
4803 Update code to use 'iconv_env' object. Remove call to
4804 'free_environ'.
4805 * common/environ.c: Include <utility>.
4806 (make_environ): Delete function.
4807 (free_environ): Delete function.
4808 (gdb_environ::clear): New function.
4809 (gdb_environ::operator=): New function.
4810 (gdb_environ::get): Likewise.
4811 (environ_vector): Delete function.
4812 (set_in_environ): Delete function.
4813 (gdb_environ::set): New function.
4814 (unset_in_environ): Delete function.
4815 (gdb_environ::unset): New function.
4816 (gdb_environ::envp): Likewise.
4817 * common/environ.h: Include <vector>.
4818 (struct gdb_environ): Delete; transform into...
4819 (class gdb_environ): ... this class.
4820 (free_environ): Delete prototype.
4821 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4822 environ_vector): Likewise.
4823 * infcmd.c (run_command_1): Update code to call
4824 'envp' from 'gdb_environ' class.
4825 (environment_info): Update code to call methods from 'gdb_environ'
4826 class.
4827 (unset_environment_command): Likewise.
4828 (path_info): Likewise.
4829 (path_command): Likewise.
4830 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4831 (inferior::inferior): Initialize 'environment' using the host's
4832 information.
4833 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4834 Include "environ.h".
4835 (class inferior) <environment>: Change type from 'struct
4836 gdb_environ' to 'gdb_environ'.
4837 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4838 methods from 'gdb_environ' class.
4839 * solib.c (solib_find_1): Likewise
4840 * unittests/environ-selftests.c: New file.
4841
4842 2017-06-20 Yao Qi <yao.qi@linaro.org>
4843
4844 * features/i386/i386-linux.xml: Exchange the order of including
4845 32bit-linux.xml and 32bit-sse.xml.
4846 * features/i386/i386-linux.c: Regenerated.
4847
4848 2017-06-20 Yao Qi <yao.qi@linaro.org>
4849
4850 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4851 Delete copy ctor and assignment operator.
4852 (tdesc_type): Likewise.
4853 (tdesc_feature): Likewise.
4854 (tdesc_free_reg): Remove.
4855 (tdesc_create_reg): Use new.
4856 (tdesc_free_type): Remove.
4857 (tdesc_create_vector): Use new.
4858 (tdesc_create_union): Likewise.
4859 (tdesc_create_flags): Likewise.
4860 (tdesc_create_enum): Likewise.
4861 (tdesc_free_feature): Delete.
4862 (free_target_description): Use delete.
4863
4864 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4865
4866 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4867 registers.
4868
4869 2017-06-19 Pedro Alves <palves@redhat.com>
4870
4871 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4872 after gdb::unlinker.
4873
4874 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4875
4876 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4877 gdb_environ to access an environment variable.
4878
4879 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4880
4881 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4882 gdb_byte*.
4883
4884 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4885
4886 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4887
4888 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4889
4890 * configure: Re-generate.
4891 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4892
4893 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * configure: Re-generate.
4896 * warning.m4: Pass -Werror to compiler when checking for
4897 supported warning flags.
4898
4899 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4900
4901 * Makefile.in (COMPILE.pre): Add "-x c++".
4902
4903 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4904 Pedro Alves <palves@redhat.com>
4905 Yao Qi <yao.qi@linaro.org>
4906
4907 * defs.h (RequireLongest): New.
4908 (extract_integer): Declare function template.
4909 (extract_signed_integer): Remove the declaration, but define it
4910 static inline.
4911 (extract_unsigned_integer): Likewise.
4912 (store_integer): Declare function template.
4913 (store_signed_integer): Remove the declaration, but define it
4914 static inline.
4915 (store_unsigned_integer): Likewise.
4916 * findvar.c (extract_integer): New function template.
4917 (extract_signed_integer): Remove.
4918 (extract_unsigned_integer): Remove.
4919 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4920 instantiations.
4921 (store_integer): New function template.
4922 (store_signed_integer): Remove.
4923 (store_unsigned_integer): Remove.
4924 (store_integer): Explicit instantiations.
4925 * regcache.c (regcache_raw_read_signed): Update.
4926 (regcache::raw_read): New function.
4927 (regcache::raw_read_signed): Remove.
4928 (regcache::raw_read_unsigned): Remove.
4929 (regcache_raw_read_unsigned): Update.
4930 (regcache_raw_write_unsigned): Update.
4931 (regcache::raw_write_signed): Remove.
4932 (regcache::raw_write): New function.
4933 (regcache_cooked_read_signed): Update.
4934 (regcache::raw_write_unsigned): Remove.
4935 (regcache::cooked_read_signed): Remove.
4936 (regcache_cooked_read_unsigned): Update.
4937 (regcache::cooked_read_unsigned): Remove.
4938 (regcache_cooked_write_signed): Update.
4939 (regcache_cooked_write_unsigned): Update.
4940 * regcache.h (regcache) <raw_read_signed>: Remove.
4941 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4942 <raw_read, raw_write>: New.
4943 <cooked_read_signed, cooked_write_signed>: Remove.
4944 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4945 <cooked_read, cooked_write>: New.
4946 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4947 (sh64_pseudo_register_write): Update.
4948
4949 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4950
4951 * arc-tdep.c (arc_disassembler_options): New variable.
4952 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4953 of default_print_insn.
4954 (arc_delayed_print_insn): Set info->section when needed,
4955 use default_print_insn to retrieve a disassembler.
4956
4957 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4958
4959 PR gdb/21574
4960 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4961 to mention $SHELL and startup-with-shell.
4962
4963 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4964
4965 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4966
4967 2017-06-14 Yao Qi <yao.qi@linaro.org>
4968
4969 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4970 default_print_insn instead of print_insn_aarch64.
4971 * arm-tdep.c (gdb_print_insn_arm): Call
4972 default_print_insn instead of print_insn_big_arm
4973 and print_insn_little_arm.
4974 * i386-tdep.c (i386_print_insn): Call default_print_insn
4975 instead of print_insn_i386.
4976 * ia64-tdep.c (ia64_print_insn): Call
4977 default_print_insn instead of print_insn_ia64.
4978 * mips-tdep.c (gdb_print_insn_mips): Call
4979 default_print_insn instead of print_insn_big_mips
4980 and print_insn_little_mips.
4981 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4982 instead of print_insn_spu.
4983
4984 2017-06-14 Pedro Alves <palves@redhat.com>
4985
4986 * ada-lang.c: Include "common/byte-vector.h".
4987 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4988 * charset.c (wchar_iterator::iterate): Resize the vector instead
4989 of reserving it.
4990 * common/byte-vector.h: Include "common/def-vector.h".
4991 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4992 * cli/cli-dump.c: Include "common/byte-vector.h".
4993 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4994 * common/byte-vector.h: New file.
4995 * common/def-vector.h: New file.
4996 * common/default-init-alloc.h: New file.
4997 * dwarf2loc.c: Include "common/byte-vector.h".
4998 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4999 instead of reserving it.
5000 * dwarf2read.c: Include "common/byte-vector.h".
5001 (data_buf::m_vec): Now a gdb::byte_vector.
5002 * gdb_regex.c: Include "common/def-vector.h".
5003 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5004 * mi/mi-main.c: Include "common/byte-vector.h".
5005 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5006 * printcmd.c: Include "common/byte-vector.h".
5007 (print_scalar_formatted): Use gdb::byte_vector.
5008 * valprint.c: Include "common/byte-vector.h".
5009 (maybe_negate_by_bytes, print_decimal_chars): Use
5010 gdb::byte_vector.
5011
5012 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5013
5014 * darwin-nat.c: Include "nat/fork-inferior.h".
5015
5016 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5017
5018 * configure.nat: Factor out Darwin bits that are not
5019 architecture-specific. Add fork-inferior.o.
5020
5021 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5022
5023 * configure.nat: Factor out AIX bits that are not
5024 architecture-specific. Add fork-inferior.o.
5025
5026 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5027
5028 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5029 (read_pieced_value, write_pieced_value): ...here. Reduce to
5030 wrappers that just call rw_pieced_value.
5031
5032 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5033
5034 * dwarf2loc.c (write_pieced_value): When writing the data for a
5035 memory piece, use write_memory_with_notification instead of
5036 write_memory.
5037
5038 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5039
5040 * valops.c (read_value_memory): Change embedded_offset to
5041 represent a bit offset instead of a byte offset.
5042 * value.h (read_value_memory): Adjust comment.
5043
5044 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5045
5046 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5047 dest_offset_bits and source_offset_bits.
5048 (write_pieced_value): Likewise.
5049
5050 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5051
5052 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5053 given by DW_OP_bit_piece.
5054 (write_pieced_value): Likewise.
5055
5056 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5057
5058 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5059 some other preparations to the places where sufficient information
5060 is available.
5061 (write_pieced_value): Likewise.
5062
5063 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5064
5065 * dwarf2loc.c (bits_to_bytes): New function.
5066 (read_pieced_value): Fix offset calculations for register pieces
5067 on big-endian targets.
5068 (write_pieced_value): Likewise.
5069
5070 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5071
5072 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5073 (write_pieced_value): Likewise.
5074
5075 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5076
5077 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5078 transfer the source value's least significant bits, instead of its
5079 lowest-addressed ones. Rename type_len to max_offset.
5080 (read_pieced_value): Mirror above changes to write_pieced_value as
5081 applicable.
5082
5083 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5084
5085 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5086 truncate full bytes from dest_offset_bits before using it as an
5087 offset into the buffer.
5088
5089 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5090
5091 * dwarf2loc.c (write_pieced_value): Include transfer size in
5092 byte-wise check.
5093
5094 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5095
5096 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5097 calculation of this_size.
5098
5099 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5100
5101 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5102 when targeting a bit-field.
5103 (write_pieced_value): Likewise.
5104
5105 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5106
5107 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5108 (allocate_piece_closure): Drop addr_size parameter.
5109 (dwarf2_evaluate_loc_desc_full): Adjust call to
5110 allocate_piece_closure.
5111
5112 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5113
5114 PR gdb/21226
5115 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5116 the LSB end, independent of endianness.
5117
5118 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5119
5120 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5121 size capping.
5122
5123 2017-06-13 Yao Qi <yao.qi@linaro.org>
5124
5125 * mips-linux-nat.c: Move include features/mips*-linux.c to
5126 mips-linux-tdep.c.
5127 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5128 to mips-linux-tdep.c.
5129 * mips-linux-tdep.c: Include features/mips*-linux.c
5130 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5131 functions.
5132 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5133 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5134 (tdesc_mips64_dsp_linux): Declare.
5135
5136 2017-06-12 Tom Tromey <tom@tromey.com>
5137
5138 * valprint.h (val_print_type_code_int): Remove.
5139 * valprint.c (generic_val_print_int): Always call
5140 val_print_scalar_formatted.
5141 (val_print_type_code_int): Remove.
5142 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5143 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5144 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5145 * ada-valprint.c (ada_val_print_num): Use
5146 val_print_scalar_formatted.
5147
5148 2017-06-12 Tom Tromey <tom@tromey.com>
5149
5150 * printcmd.c (print_scalar_formatted): Unify the two switches.
5151 Don't convert scalars to LONGEST.
5152
5153 2017-06-12 Tom Tromey <tom@tromey.com>
5154
5155 PR exp/16225:
5156 * valprint.h (print_decimal_chars): Update.
5157 * valprint.c (maybe_negate_by_bytes): New function.
5158 (print_decimal_chars): Add "is_signed" argument.
5159 * printcmd.c (print_scalar_formatted): Update.
5160
5161 2017-06-12 Tom Tromey <tom@tromey.com>
5162
5163 PR exp/16225:
5164 * valprint.h (print_binary_chars, print_hex_chars): Update.
5165 * valprint.c (val_print_type_code_int): Update.
5166 (print_binary_chars): Add "zero_pad" argument.
5167 (emit_octal_digit): New function.
5168 (print_octal_chars): Don't zero-pad.
5169 (print_decimal_chars): Likewise.
5170 (print_hex_chars): Add "zero_pad" argument.
5171 * sh64-tdep.c (sh64_do_fp_register): Update.
5172 * regcache.c (regcache::dump): Update.
5173 * printcmd.c (print_scalar_formatted): Update.
5174 * infcmd.c (default_print_one_register_info): Update.
5175
5176 2017-06-12 Pedro Alves <palves@redhat.com>
5177 Alan Hayward <alan.hayward@arm.com>
5178
5179 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5180 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5181 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5182 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5183 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5184
5185 2017-06-12 Pedro Alves <palves@redhat.com>
5186
5187 * dwarf2read.c (mapped_symtab::data): Now a vector of
5188 symtab_index_entry instead of vector of
5189 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5190 whether an element's name is NULL instead of checking whether the
5191 element itself is NULL.
5192 (find_slot): Change return type. Adjust.
5193 (hash_expand, , add_index_entry, uniquify_cu_indices)
5194 (write_hash_table): Adjust.
5195
5196 2017-06-12 Pedro Alves <palves@redhat.com>
5197
5198 * dwarf2read.c (recursively_count_psymbols): New function.
5199 (write_psymtabs_to_index): Call it to compute number of psyms and
5200 pass estimate size of psyms_seen to unordered_set's ctor.
5201
5202 2017-06-12 Pedro Alves <palves@redhat.com>
5203
5204 * dwarf2read.c (write_hash_table): Check if key already exists
5205 before emplacing.
5206
5207 2017-06-12 Pedro Alves <palves@redhat.com>
5208
5209 * dwarf2read.c (data_buf::append_space): Rename to...
5210 (data_buf::grow): ... this, and make private. Adjust all callers.
5211 (data_buf::append_uint): New method.
5212 (add_address_entry, write_one_signatured_type)
5213 (write_psymtabs_to_index): Use it.
5214
5215 2017-06-12 Pedro Alves <palves@redhat.com>
5216
5217 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5218 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5219 (data_buf::file_write): Call ::fwrite directly.
5220
5221 2017-06-12 Pedro Alves <palves@redhat.com>
5222
5223 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5224 std::vector::erase.
5225
5226 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5227
5228 Code cleanup: C++ify .gdb_index producer.
5229 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5230 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5231 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5232 (create_strtab, add_string): Remove.
5233 (file_write, data_buf): New.
5234 (struct symtab_index_entry): Use std::vector for cu_indices.
5235 (struct mapped_symtab): Use std::vector for data.
5236 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5237 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5238 Remove.
5239 (find_slot): Change return type. Update it to the new data structures.
5240 (hash_expand, add_index_entry): Update it to the new data structures.
5241 (offset_type_compare): Remove.
5242 (uniquify_cu_indices): Update it to the new data structures.
5243 (c_str_view, c_str_view_hasher, vector_hasher): New.
5244 (add_indices_to_cpool): Remove.
5245 (write_hash_table): Update it to the new data structures.
5246 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5247 (eq_psymtab_cu_index): Remove.
5248 (psym_index_map): New typedef.
5249 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5250 reference and std::unordered_map for cu_index_htab.
5251 (add_address_entry, add_address_entry_worker, write_address_map)
5252 (write_psymbols): Update it to the new data structures.
5253 (write_obstack): Remove.
5254 (struct signatured_type_index_data): Change types_list to a data_buf
5255 reference and psyms_seen to a std::unordered_set reference.
5256 (write_one_signatured_type, recursively_write_psymbols)
5257 (write_psymtabs_to_index): Update it to the new data structures.
5258
5259 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5260
5261 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5262 separate-debug-file commands.
5263 * symfile.h (separate_debug_file_debug): New global.
5264 * symfile.c (separate_debug_file_debug): New global.
5265 (separate_debug_file_exists, find_separate_debug_file): Add
5266 debug output.
5267 (_initialize_symfile): Add "set debug separate-debug-file"
5268 command.
5269 * build-id.c (build_id_to_debug_bfd,
5270 find_separate_debug_file_by_buildid): Add debug output.
5271
5272 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5273
5274 * gdbarch.sh (displaced_step_free_closure): Remove.
5275 * gdbarch.h, gdbarch.c: Re-generate.
5276 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5277 displaced_step_free_closure.
5278 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5279 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5280 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5281 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5282 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5283 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5284 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5285 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5286 * infrun.c (displaced_step_clear): Call xfree instead of
5287 gdbarch_displaced_step_free_closure.
5288
5289 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5290
5291 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5292 NULL".
5293
5294 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5295
5296 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5297 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5298 (mn10300_push_dummy_call): Likewise.
5299
5300 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5301
5302 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5303
5304 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5305
5306 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5307
5308 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5309
5310 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5311 able to start inferiors using a shell.
5312 (New remote packets): Announce new packet "QStartupWithShell".
5313 * remote.c: Add PACKET_QStartupWithShell.
5314 (extended_remote_create_inferior): Handle new
5315 PACKET_QStartupWithShell.
5316 (remote_protocol_features) <QStartupWithShell>: New entry for
5317 PACKET_QStartupWithShell.
5318 (_initialize_remote): Call "add_packet_config_cmd" for
5319 QStartupShell.
5320
5321 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5322 Pedro Alves <palves@redhat.com>
5323
5324 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5325 and "nat/fork-inferior.h".
5326 * common/common-inferior.h: New file, with contents from
5327 "gdb/inferior.h".
5328 * commom/common-utils.c: Include "common-utils.h".
5329 (stringify_argv): New function.
5330 * common/common-utils.h (stringify_argv): New prototype.
5331 * configure.nat: Add "fork-inferior.o" as a dependency for
5332 "*linux*", "fbsd*" and "nbsd*" hosts.
5333 * corefile.c (get_exec_file): Update comment.
5334 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5335 instead of "startup_inferior".
5336 (darwin_create_inferior): Call "add_thread_silent" after
5337 "fork_inferior".
5338 * fork-child.c: Cleanup unnecessary includes.
5339 (SHELL_FILE): Move to "common/common-fork-child.c".
5340 (environ): Likewise.
5341 (exec_wrapper): Initialize.
5342 (get_exec_wrapper): New function.
5343 (breakup_args): Move to "common/common-fork-child.c"; rename to
5344 "breakup_args_for_exec".
5345 (escape_bang_in_quoted_argument): Move to
5346 "common/common-fork-child.c".
5347 (saved_ui): New variable.
5348 (prefork_hook): New function.
5349 (postfork_hook): Likewise.
5350 (postfork_child_hook): Likewise.
5351 (gdb_startup_inferior): Likewise.
5352 (fork_inferior): Move to "common/common-fork-child.c". Update
5353 function to support gdbserver.
5354 (startup_inferior): Likewise.
5355 * gdbcore.h (get_exec_file): Remove declaration.
5356 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5357 instead of "startup_inferior". Call "add_thread_silent" after
5358 "fork_inferior".
5359 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5360 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5361 instead of "startup_inferior". Call "add_thread_silent" after
5362 "fork_inferior".
5363 * inferior.h: Include "common-inferior.h".
5364 (trace_start_error): Move to "common/common-utils.h".
5365 (trace_start_error_with_name): Likewise.
5366 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5367 (startup_inferior): Likewise.
5368 (gdb_startup_inferior): New prototype.
5369 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5370 * nat/fork-inferior.h: New file.
5371 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5372 instead of "startup_inferior". Call "add_thread_silent" after
5373 "fork_inferior".
5374 * target.h (target_terminal_init): Move prototype to
5375 "target/target.h".
5376 (target_terminal_inferior): Likewise.
5377 (target_terminal_ours): Likewise.
5378 * target/target.h (target_terminal_init): New prototype, moved
5379 from "target.h".
5380 (target_terminal_inferior): Likewise.
5381 (target_terminal_ours): Likewise.
5382 * utils.c (gdb_flush_out_err): New function.
5383
5384 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5385
5386 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5387 * common/common-gdbthread.h: New file, with parts from
5388 "gdb/gdbthread.h".
5389 * gdbthread.h: Include "common-gdbthread.h".
5390 (switch_to_thread): Moved to "common/common-gdbthread.h".
5391
5392 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5393
5394 * Makefile.in (SFILES): Add "common/job-control.c".
5395 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5396 (COMMON_OBS): Add "job-control.o".
5397 * common/job-control.c: New file, with contents from
5398 "gdb/inflow.c".
5399 * common/job-control.h: New file, with contents from "terminal.h".
5400 * fork-child.c: Include "job-control.h".
5401 * inflow.c: Include "job-control.h".
5402 (gdb_setpgid): Move to "common/common-inflow.c".
5403 (_initialize_inflow): Move setting of "job_control" to
5404 "handle_job_control".
5405 * terminal.h (job_control): Moved to "common/common-terminal.h".
5406 (gdb_setpgid): Likewise.
5407 * top.c: Include "job_control.h".
5408 * utils.c: Likewise.
5409 (job_control): Moved to "job-control.c".
5410
5411 2017-06-07 Pedro Alves <palves@redhat.com>
5412
5413 * Makefile.in (SFILES): Add gdb_regex.c.
5414 (COMMON_OBS): Add gdb_regex.o.
5415 * ada-lang.c (ada_add_standard_exceptions)
5416 (ada_add_exceptions_from_frame, name_matches_regex)
5417 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5418 parameter type to compiled_regex. Adjust.
5419 (ada_exceptions_list): Use compiled_regex.
5420 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5421 std::unique_ptr<compiled_regex>.
5422 (exception_catchpoint::~exception_catchpoint): Remove regfree
5423 call.
5424 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5425 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5426 * breakpoint.c (solib_catchpoint::compiled): Now a
5427 std::unique_ptr<compiled_regex>.
5428 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5429 (check_status_catch_solib): Adjust to use compiled_regex.
5430 (add_solib_catchpoint): Adjust to use compiled_regex.
5431 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5432 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5433 compiled_regex reference. Adjust to use it.
5434 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5435 declaration. Include "gdb_regex.h".
5436 (apropos_cmd): Change regex parameter to compiled_regex reference.
5437 * gdb_regex.c: New file.
5438 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5439 declarations.
5440 (class compiled_regex): New.
5441 * linux-tdep.c: Include "common/gdb_optional.h".
5442 (struct mapping_regexes): New, factored out from
5443 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5444 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5445 gdb::optional and remove cleanups. Adjust to compiled_regex.
5446 * probe.c: Include "common/gdb_optional.h".
5447 (collect_probes): Use compiled_regex and gdb::optional and remove
5448 cleanups.
5449 * skip.c: Include "common/gdb_optional.h".
5450 (skiplist_entry::compiled_function_regexp): Now a
5451 gdb::optional<compiled_regex>.
5452 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5453 (free_skiplist_entry): Remove regfree call.
5454 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5455 compiled_regex and gdb::optional.
5456 * symtab.c: Include "common/gdb_optional.h".
5457 (search_symbols): Use compiled_regex and gdb::optional.
5458 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5459 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5460 to gdb_regex.c.
5461
5462 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5463
5464 * regcache.c (regcache::save): Avoid buffer use.
5465 (regcache::dump): Likewise.
5466
5467 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5468
5469 * sh-tdep.c (sh_pseudo_register_read): Remove
5470 MAX_REGISTER_SIZE.
5471 (sh_pseudo_register_write): Likewise.
5472 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5473 (sh64_pseudo_register_write): Likewise
5474
5475 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5476
5477 * aarch64-tdep.c (aarch64_store_return_value): Use
5478 V_REGISTER_SIZE.
5479 (aarch64_pseudo_read_value): Likewise.
5480 (aarch64_pseudo_write): Likewise.
5481
5482 2017-06-06 Yao Qi <yao.qi@linaro.org>
5483
5484 * regformats/regdef.h (set_register_cache): Remove the
5485 declaration.
5486
5487 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5488
5489 * frame.c (frame_unwind_register_signed): Use
5490 frame_unwind_register_value.
5491
5492 2017-06-06 Pedro Alves <palves@redhat.com>
5493
5494 PR breakpoints/21553
5495 * breakpoint.c (create_breakpoints_sal_default)
5496 (init_breakpoint_sal, create_breakpoint_sal): Use
5497 gdb::unique_xmalloc_ptr for string parameters.
5498 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5499 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5500 (base_breakpoint_create_breakpoints_sal)
5501 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5502 (strace_marker_create_breakpoints_sal)
5503 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5504 string parameters.
5505 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5506 gdb::unique_xmalloc_ptr for string parameters.
5507 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5508 parameters.
5509
5510 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5511
5512 * alpha-tdep.c (alpha_register_to_value): Use
5513 get_frame_register_value.
5514 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5515
5516 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5517
5518 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5519 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5520 (ia64_value_to_register): Likewise.
5521 (ia64_extract_return_value): Likewise.
5522 (ia64_store_return_value): Likewise.
5523 (ia64_push_dummy_call): Likewise.
5524
5525 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5526
5527 GDB 8.0 released.
5528
5529 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5530
5531 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5532
5533 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5534
5535 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5536 parameter.
5537 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5538
5539 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5540
5541 * event-loop.c (poll_timers): Unallocate timer using delete
5542 instead of xfree.
5543
5544 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5545
5546 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5547 (struct breakpoint) <~breakpoint>: New.
5548 (struct watchpoint): Inherit from breakpoint.
5549 <~watchpoint>: New.
5550 <base>: Remove.
5551 (struct tracepoint): Inherit from breakpoint.
5552 <base>: Remove.
5553 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5554 (struct longjmp_breakpoint): Inherit from breakpoint.
5555 <~longjmp_breakpoint>: New.
5556 <base>: Remove.
5557 (new_breakpoint_from_type): Remove casts.
5558 (watchpoint_in_thread_scope): Remove reference to base field.
5559 (watchpoint_del_at_next_stop): Likewise.
5560 (update_watchpoint): Likewise.
5561 (watchpoint_check): Likewise.
5562 (bpstat_check_watchpoint): Likewise.
5563 (set_longjmp_breakpoint): Likewise.
5564 (struct fork_catchpoint): Inherit from breakpoint.
5565 <base>: Remove.
5566 (struct solib_catchpoint): Inherit from breakpoint.
5567 <~solib_catchpoint>: New.
5568 <base>: Remove.
5569 (dtor_catch_solib): Change to ...
5570 (solib_catchpoint::~solib_catchpoint): ... this.
5571 (breakpoint_hit_catch_solib): Remove reference to base field.
5572 (add_solib_catchpoint): Likewise.
5573 (create_fork_vfork_event_catchpoint): Likewise.
5574 (struct exec_catchpoint): Inherit from breakpoint.
5575 <~exec_catchpoint>: New.
5576 <base>: Remove.
5577 (dtor_catch_exec): Change to ...
5578 (exec_catchpoint::~exec_catchpoint): ... this.
5579 (dtor_watchpoint): Change to ...
5580 (watchpoint::~watchpoint): ... this.
5581 (watch_command_1): Remove reference to base field.
5582 (catch_exec_command_1): Likewise.
5583 (base_breakpoint_dtor): Change to ...
5584 (breakpoint::~breakpoint): ... this.
5585 (base_breakpoint_ops): Remove dtor field value.
5586 (longjmp_bkpt_dtor): Change to ...
5587 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5588 (strace_marker_create_breakpoints_sal): Remove reference to base
5589 field.
5590 (delete_breakpoint): Don't manually call breakpoint destructor.
5591 (create_tracepoint_from_upload): Remove reference to base field.
5592 (trace_pass_set_count): Likewise.
5593 (initialize_breakpoint_ops): Don't initialize
5594 momentary_breakpoint_ops, don't set dtors.
5595 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5596 <~ada_catchpoint>: New.
5597 <base>: Remove.
5598 (create_excep_cond_exprs): Remove reference to base field.
5599 (dtor_exception): Change to ...
5600 (ada_catchpoint::~ada_catchpoint): ... this.
5601 (dtor_catch_exception): Remove.
5602 (dtor_catch_exception_unhandled): Remove.
5603 (dtor_catch_assert): Remove.
5604 (create_ada_exception_catchpoint): Remove reference to base
5605 field.
5606 (initialize_ada_catchpoint_ops): Don't set dtors.
5607 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5608 breakpoint.
5609 <~signal_catchpoint>: New.
5610 <base>: Remove.
5611 (signal_catchpoint_dtor): Change to ...
5612 (signal_catchpoint::~signal_catchpoint): ... this.
5613 (create_signal_catchpoint): Remove reference to base field.
5614 (initialize_signal_catchpoint_ops): Don't set dtor.
5615 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5616 from breakpoint.
5617 <~syscall_catchpoint>: New.
5618 <base>: Remove.
5619 (dtor_catch_syscall): Change to ...
5620 (syscall_catchpoint::~syscall_catchpoint): ... this.
5621 (create_syscall_event_catchpoint): Remove reference to base
5622 field.
5623 (initialize_syscall_catchpoint_ops): Don't set dtor.
5624 * break-catch-throw.c (struct exception_catchpoint): Inherit
5625 from breakpoint.
5626 <~exception_catchpoint>: New.
5627 <base>: Remove.
5628 (dtor_exception_catchpoint): Change to ...
5629 (exception_catchpoint::~exception_catchpoint): ... this.
5630 (handle_gnu_v3_exceptions): Remove reference to base field.
5631 (initialize_throw_catchpoint_ops): Don't set dtor.
5632 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5633 field.
5634 * remote.c (remote_get_tracepoint_status): Likewise.
5635 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5636 * tracefile.c (tracefile_fetch_registers): Likewise.
5637 * tracepoint.c (actions_command): Likewise.
5638 (validate_actionline): Likewise.
5639 (tfind_1): Likewise.
5640 (get_traceframe_location): Likewise.
5641 (find_matching_tracepoint_location): Likewise.
5642 (parse_tracepoint_status): Likewise.
5643 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5644
5645 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5646
5647 * breakpoint.c (struct longjmp_breakpoint): New struct.
5648 (is_tracepoint_type): Change return type to bool.
5649 (is_longjmp_type): New function.
5650 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5651 (set_raw_breakpoint_without_location): Use
5652 new_breakpoint_from_type.
5653 (set_raw_breakpoint): Likewise.
5654
5655 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5656
5657 * breakpoint.c (new_breakpoint_from_type): New function.
5658 (create_breakpoint_sal): Use new_breakpoint_from_type and
5659 unique_ptr.
5660 (create_breakpoint): Likewise.
5661
5662 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5663
5664 * memattr.c (mem_info_command): Rename to ...
5665 (info_mem_command): ... this.
5666 (mem_enable_command): Rename to ...
5667 (enable_mem_command): ... this.
5668 (mem_disable_command): Rename to ...
5669 (disable_mem_command): ... this.
5670 (mem_delete_command): Rename to ...
5671 (delete_mem_command): ... this.
5672 (_initialize_mem): Adjust function names.
5673
5674 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5675
5676 * btrace.c (handle_pt_insn_events): New.
5677 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5678 STATUS. Split into this and ...
5679 (handle_pt_insn_event_flags): ... this.
5680
5681 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5682
5683 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5684 and struct pt_insn.resynced.
5685 * configure: Regenerated.
5686 * config.in: Regenerated.
5687
5688 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5689
5690 * btrace.c (ftrace_find_call_by_number): New function.
5691 (ftrace_new_function): Store objects, not pointers.
5692 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5693 ftrace_new_gap, ftrace_update_function,
5694 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5695 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5696 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5697 btrace_ends_with_single_insn, btrace_call_get): Account for
5698 btrace_thread_info::functions now storing objects.
5699 * btrace.h (struct btrace_thread_info): Add constructor.
5700 (struct btrace_thread_info) <functions>: Make std::vector.
5701 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5702 Initialize with default values.
5703 * record-btrace.c (record_btrace_frame_sniffer): Account for
5704 btrace_thread_info::functions now storing objects.
5705
5706 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5707
5708 * btrace.c: Remove typedef bfun_s.
5709 (ftrace_new_gap): Directly add gaps to the list of gaps.
5710 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5711 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5712 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5713 instead of gdb VEC.
5714
5715 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5716
5717 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5718 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5719 with btrace_thread_info::next_segment and
5720 btrace_thread_info::prev_segment.
5721 * btrace.h: Remove struct btrace_func_link.
5722 (struct btrace_function): Replace pair of function segment pointers
5723 with pair of indices.
5724 * python/py-record-btrace.c (btpy_call_prev_sibling,
5725 btpy_call_next_sibling): Replace references to
5726 btrace_thread_info::segment with btrace_thread_info::next_segment and
5727 btrace_thread_info::prev_segment.
5728 * record-btrace.c (record_btrace_frame_this_id): Use
5729 btrace_find_call_by_number.
5730
5731 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5732
5733 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5734 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5735 btrace_insn_next, btrace_insn_prev): Remove references to
5736 btrace_thread_info::flow.
5737 * btrace.h (struct btrace_function): Remove FLOW.
5738
5739 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5740
5741 * btrace.c (ftrace_find_call_by_number): New function.
5742 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5743 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5744 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5745 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5746 index.
5747 * btrace.h (struct btrace_function): Turn UP into an index.
5748 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5749 as an index.
5750 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5751 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5752 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5753
5754 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5755
5756 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5757 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5758 ftrace_update_function, ftrace_compute_global_level_offset,
5759 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5760 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5761 btrace_insn_end, btrace_is_empty): Remove references to
5762 btrace_thread_info::begin and btrace_thread_info::end.
5763 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5764 (struct btrace_thread_info) <functions>: Adjust comment.
5765 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5766 btrace_thread_info::begin.
5767
5768 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5769
5770 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5771 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5772 ftrace_update_function): Remove arguments that implicitly were always
5773 BTINFO->END.
5774 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5775 Don't pass BTINFO->END.
5776
5777 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5778
5779 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5780 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5781 btrace_find_insn_by_number): Replace function segment pointer with
5782 index.
5783 (btrace_insn_cmp): Simplify.
5784 * btrace.h: (struct btrace_insn_iterator) Rename index to
5785 insn_index. Replace function segment pointer with index into function
5786 segment vector.
5787 * record-btrace.c (record_btrace_call_history): Replace function
5788 segment pointer use with index.
5789 (record_btrace_frame_sniffer): Retrieve function call segment through
5790 vector.
5791 (record_btrace_set_replay): Remove defunc't safety check.
5792
5793 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5794
5795 * btrace.c (btrace_ends_with_single_insn): New function.
5796 (btrace_call_get, btrace_call_number, btrace_call_begin,
5797 btrace_call_end, btrace_call_next, btrace_call_prev,
5798 btrace_find_call_by_number): Use index into call segment vector
5799 instead of pointer.
5800 (btrace_call_cmp): Simplify.
5801 * btrace.h (struct btrace_call_iterator): Replace function call segment
5802 pointer with index into vector.
5803 * record-btrace.c (record_btrace_call_history): Use index instead of
5804 pointer.
5805
5806 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5807
5808 * btrace.c (btrace_insn_begin, btrace_insn_end,
5809 btrace_find_insn_by_number): Add btinfo to iterator.
5810 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5811
5812 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5813
5814 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5815 and save pointers directly.
5816 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5817 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5818 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5819 changed signature of functions.
5820 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5821 (btrace_fetch): Remove code that adds btrace_function pointers to
5822 vector of btrace_functions.
5823 (btrace_clear): Simplify freeing vector of btrace_functions.
5824
5825 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5826
5827 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5828 Replace VEC_* with std::vector functions.
5829 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5830 (struct btrace_thread_info)<functions>: Change type to std::vector.
5831
5832 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5833
5834 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5835 "Removed targets and native configurations" up. Merge duplicate
5836 "New commands" sub-sections. Add "New options" sub-sections.
5837
5838 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5839
5840 * defs.h (copy_integer_to_size): New declaration.
5841 * findvar.c (copy_integer_to_size): New function.
5842 (do_cint_test): New selftest function.
5843 (copy_integer_to_size_test): Likewise.
5844 (_initialize_findvar): Likewise.
5845 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5846 (mips_fbsd_collect_reg): Use raw_collect_integer.
5847 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5848 (mips64_fill_gregset): Use raw_collect_integer
5849 (mips64_fill_fpregset): Use raw_supply_integer.
5850 * regcache.c (regcache::raw_supply_integer): New function.
5851 (regcache::raw_collect_integer): Likewise.
5852 * regcache.h: (regcache::raw_supply_integer): New declaration.
5853 (regcache::raw_collect_integer): Likewise.
5854
5855 2017-05-24 Yao Qi <yao.qi@linaro.org>
5856
5857 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5858 (COMMON_OBS): Add gdbarch-selftests.o.
5859 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5860 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5861 * gdbarch-selftests.c: New file.
5862 * regcache.h (regcache) <~regcache>: Mark it virtual if
5863 GDB_SELF_TEST.
5864 <raw_write>: Likewise.
5865
5866 2017-05-24 Yao Qi <yao.qi@linaro.org>
5867
5868 * regcache.c (current_regcache): Change it to
5869 regcache::current_regcache.
5870 (regcache_observer_target_changed): Update.
5871 (regcache_thread_ptid_changed): Make it a regcache static
5872 method.
5873 (regcache_thread_ptid_changed): Update.
5874 (class regcache_access): New.
5875 (current_regcache_test): Update.
5876 (_initialize_regcache): Update.
5877 * regcache.h: Include forward_list.
5878 (regcache): Declare regcache_thread_ptid_changed and declare
5879 registers_changed_ptid as friend.
5880
5881 2017-05-24 Yao Qi <yao.qi@linaro.org>
5882
5883 * i387-tdep.c (i387_register_to_value): Use register_size
5884 instead of TYPE_LENGTH.
5885 * m68k-tdep.c (m68k_register_to_value): Likewise.
5886
5887 2017-05-24 Yao Qi <yao.qi@linaro.org>
5888
5889 * i387-tdep.c (i387_convert_register_p): Return false if type
5890 code isn't TYPE_CODE_FLT.
5891
5892 2017-05-24 Yao Qi <yao.qi@linaro.org>
5893
5894 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5895 length is 4.
5896 (alpha_register_to_value): Remove type length check.
5897 (alpha_value_to_register): Likewise.
5898
5899 2017-05-24 Yao Qi <yao.qi@linaro.org>
5900
5901 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5902 TYPE_CODE_FLT.
5903
5904 2017-05-24 Yao Qi <yao.qi@linaro.org>
5905
5906 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5907 TYPE_CODE_FLT or not.
5908
5909 2017-05-24 Yao Qi <yao.qi@linaro.org>
5910
5911 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5912 * avr-tdep.c (avr_gdbarch_init): Likewise.
5913 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5914 * cris-tdep.c (cris_gdbarch_init): Likewise.
5915 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5916 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5917 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5918 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5919 * mep-tdep.c (mep_gdbarch_init): Likewise.
5920 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5921 * mips-tdep.c (mips_gdbarch_init): Likewise.
5922 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5923 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5924 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5925 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5926 * v850-tdep.c (v850_gdbarch_init): Likewise.
5927
5928 2017-05-24 Yao Qi <yao.qi@linaro.org>
5929
5930 * selftest-arch.c (tests_with_arch): Call registers_changed
5931 and reinit_frame_cache.
5932 * selftest.c (run_self_tests): Likewise.
5933
5934 2017-05-24 Yao Qi <yao.qi@linaro.org>
5935
5936 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5937 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5938
5939 2017-05-24 Yao Qi <yao.qi@linaro.org>
5940
5941 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5942 set_gdbarch_print_insn.
5943
5944 2017-05-24 Yao Qi <yao.qi@linaro.org>
5945
5946 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5947 set_gdbarch_print_insn.
5948
5949 2017-05-24 Yao Qi <yao.qi@linaro.org>
5950
5951 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5952 set_gdbarch_print_insn.
5953 * arc-tdep.c (arc_gdbarch_init): Likewise.
5954 * arch-utils.c: include dis-asm.h.
5955 (default_print_insn): New function.
5956 * arch-utils.h (default_print_insn): Declare.
5957 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5958 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5959 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5960 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5961 * frv-tdep.c (frv_gdbarch_init): Likewise.
5962 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5963 * gdbarch.sh (print_insn): Use default_print_insn.
5964 * gdbarch.c: Regenerated.
5965 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5966 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5967 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5968 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5969 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5970 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5971 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5972 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5973 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5974 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5975 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5976 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5977 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5978 * mt-tdep.c (mt_gdbarch_init): Likewise.
5979 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5980 * nios2-tdep.c (nios2_print_insn): Remove.
5981 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5982 * rx-tdep.c (rx_gdbarch_init): Likewise.
5983 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5984 * score-tdep.c (score_print_insn): Remove.
5985 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5986 * sh-tdep.c (sh_gdbarch_init): Likewise.
5987 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5988 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5989 * tic6x-tdep.c (tic6x_print_insn): Remove.
5990 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5991 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5992 * v850-tdep.c (v850_gdbarch_init): Likewise.
5993 * vax-tdep.c (vax_gdbarch_init): Likewise.
5994 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5995 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5996
5997 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5998
5999 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6000 (MIPS_FP0_REGNUM): Remove.
6001 (MIPS_FSR_REGNUM): Remove.
6002 (mips_fbsd_supply_fpregs): Use mips_regnum.
6003 (mips_fbsd_supply_gregs): Likewise.
6004 (mips_fbsd_collect_fpregs): Likewise.
6005 (mips_fbsd_collect_gregs): Likewise.
6006
6007 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6008
6009 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6010 (getpfpregs_supplies): New function.
6011 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6012 getfpregs_supplies.
6013 (mips_fbsd_store_inferior_registers): Likewise.
6014
6015 2017-05-22 Pedro Alves <palves@redhat.com>
6016
6017 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6018 maintainer.
6019
6020 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6021
6022 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6023 (store_register): Likewise.
6024 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6025 (get_decimal_float_return_value): Likewise.
6026 (do_ppc_sysv_return_value): Likewise.
6027 (ppc64_sysv_abi_push_integer): Likewise.
6028 (ppc64_sysv_abi_push_freg): Likewise.
6029 (ppc64_sysv_abi_return_value_base): Likewise.
6030 (ppc64_sysv_abi_return_value): Likewise.
6031 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6032 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6033 * rs6000-nat.c: Likewise.
6034 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6035 (rs6000_value_to_register): Likewise.
6036 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6037
6038 2017-05-21 Tom Tromey <tom@tromey.com>
6039
6040 PR rust/21466:
6041 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6042 arrays as "[T]", not "[T; ]".
6043
6044 2017-05-19 Tom Tromey <tom@tromey.com>
6045
6046 PR rust/21484:
6047 * rust-lang.c (exp_descriptor_rust): New function.
6048 (rust_language_defn): Use it.
6049 * p-lang.c (pascal_language_defn): Update.
6050 * opencl-lang.c (opencl_language_defn): Update.
6051 * objc-lang.c (objc_language_defn): Update.
6052 * m2-lang.c (m2_language_defn): Update.
6053 * language.h (struct language_defn)
6054 <la_watch_location_expression>: New member.
6055 * language.c (unknown_language_defn, auto_language_defn)
6056 (local_language_defn): Update.
6057 * go-lang.c (go_language_defn): Update.
6058 * f-lang.c (f_language_defn): Update.
6059 * d-lang.c (d_language_defn): Update.
6060 * c-lang.h (c_watch_location_expression): Declare.
6061 * c-lang.c (c_watch_location_expression): New function.
6062 (c_language_defn, cplus_language_defn, asm_language_defn)
6063 (minimal_language_defn): Use it.
6064 * breakpoint.c (watch_command_1): Call
6065 la_watch_location_expression.
6066 * ada-lang.c (ada_language_defn): Update.
6067
6068 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6069
6070 PR tui/21482
6071 * gdb_curses.h (NOMACROS): Define.
6072 (NCURSES_NOMACROS): Define.
6073
6074 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6075
6076 PR tui/21482
6077 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6078 arg to char *.
6079 * tui/tui-wingeneral.c (box_win): Likewise.
6080 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6081 (tui_show_source_line): Likewise.
6082 (tui_show_exec_info_content): Likewise.
6083
6084 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6085
6086 * sparc-tdep.c (sparc_structure_return_p)
6087 (sparc_arg_on_registers_p): New functions.
6088 (sparc32_store_arguments): Use them.
6089 * sparc64-tdep.c (sparc64_16_byte_align_p)
6090 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6091 Handle TYPE_CODE_ARRAY.
6092
6093 2017-05-17 Yao Qi <yao.qi@linaro.org>
6094
6095 * cli/cli-decode.c (add_alias_cmd): New function.
6096 * command.h (add_alias_cmd): Declare.
6097 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6098 instead call add_alias_cmd.
6099
6100 2017-05-17 Pedro Alves <palves@redhat.com>
6101
6102 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6103 (nat_makefile_frag): ... this. All references updated.
6104 * configure.ac: Likewise.
6105 * configure.nat: Likewise. Enhance comments.
6106 * configure: Regenerate.
6107
6108 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6109
6110 * procfs.c (procfs_create_inferior): Change prototype to match
6111 definition.
6112
6113 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6114
6115 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6116 C++ compiler warning.
6117
6118 2017-05-12 Tom Tromey <tom@tromey.com>
6119
6120 PR rust/21483:
6121 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6122 recurse, just call value_struct_elt directly.
6123
6124 2017-05-12 Tom Tromey <tom@tromey.com>
6125
6126 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6127 OP_RUST_ARRAY>: Fix.
6128
6129 2017-05-12 Tom Tromey <tom@tromey.com>
6130
6131 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6132
6133 2017-05-09 Yao Qi <yao.qi@linaro.org>
6134
6135 * regcache.c: Include <forward_list>.
6136 (struct regcache_list): Remove.
6137 (current_regcache): Update.
6138 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6139 (regcache_thread_ptid_changed): Likewise.
6140 (registers_changed_ptid): Likewise.
6141 (current_regcache_size): Likewise.
6142
6143 2017-05-09 Yao Qi <yao.qi@linaro.org>
6144
6145 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6146 (current_regcache_size): New function.
6147 (current_regcache_test): New function.
6148 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6149
6150 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6151
6152 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6153 (print_gp_register_row): Use get_frame_register_value.
6154
6155 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6156
6157 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6158 (mips_supply_fpregset): Likewise.
6159 (mips64_supply_gregset): Likewise.
6160
6161 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6162
6163 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6164 regcache->raw_supply_zeroed.
6165
6166 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6167
6168 * configure.nat: Rearrange 'case' statements to match
6169 host before cpu.
6170
6171 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6172
6173 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6174 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6175 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6176 "@nat_extra_makefile_frag@".
6177 (Makefile): Remove dependency on "@frags@".
6178 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6179 (data-directory/Makefile): Likewise.
6180 * config/aarch64/linux.mh: Deleted; moved contents to
6181 "gdb/configure.nat".
6182 * config/alpha/alpha-linux.mh: Likewise.
6183 * config/alpha/nbsd.mh: Likewise.
6184 * config/arm/linux.mh: Likewise.
6185 * config/arm/nbsdelf.mh: Likewise.
6186 * config/i386/cygwin.mh: Likewise.
6187 * config/i386/cygwin64.mh: Likewise.
6188 * config/i386/darwin.mh: Likewise.
6189 * config/i386/fbsd.mh: Likewise.
6190 * config/i386/fbsd64.mh: Likewise.
6191 * config/i386/go32.mh: Likewise.
6192 * config/i386/i386gnu.mh: Likewise.
6193 * config/i386/i386sol2.mh: Likewise.
6194 * config/i386/linux.mh: Likewise.
6195 * config/i386/linux64.mh: Likewise.
6196 * config/i386/mingw.mh: Likewise.
6197 * config/i386/mingw64.mh: Likewise.
6198 * config/i386/nbsd64.mh: Likewise.
6199 * config/i386/nbsdelf.mh: Likewise.
6200 * config/i386/nto.mh: Likewise.
6201 * config/i386/obsd.mh: Likewise.
6202 * config/i386/obsd64.mh: Likewise.
6203 * config/i386/sol2-64.mh: Likewise.
6204 * config/ia64/linux.mh: Likewise.
6205 * config/m32r/linux.mh: Likewise.
6206 * config/m68k/linux.mh: Likewise.
6207 * config/m68k/nbsdelf.mh: Likewise.
6208 * config/m68k/obsd.mh: Likewise.
6209 * config/m88k/obsd.mh: Likewise.
6210 * config/mips/fbsd.mh: Likewise.
6211 * config/mips/linux.mh: Likewise.
6212 * config/mips/nbsd.mh: Likewise.
6213 * config/mips/obsd64.mh: Likewise.
6214 * config/pa/linux.mh: Likewise.
6215 * config/pa/nbsd.mh: Likewise.
6216 * config/pa/obsd.mh: Likewise.
6217 * config/powerpc/aix.mh: Likewise.
6218 * config/powerpc/fbsd.mh: Likewise.
6219 * config/powerpc/linux.mh: Likewise.
6220 * config/powerpc/nbsd.mh: Likewise.
6221 * config/powerpc/obsd.mh: Likewise.
6222 * config/powerpc/ppc64-linux.mh: Likewise.
6223 * config/powerpc/spu-linux.mh: Likewise.
6224 * config/s390/linux.mh: Likewise.
6225 * config/sh/nbsd.mh: Likewise.
6226 * config/sparc/fbsd.mh: Likewise.
6227 * config/sparc/linux.mh: Likewise.
6228 * config/sparc/linux64.mh: Likewise.
6229 * config/sparc/nbsd64.mh: Likewise.
6230 * config/sparc/nbsdelf.mh: Likewise.
6231 * config/sparc/obsd64.mh: Likewise.
6232 * config/sparc/sol2.mh: Likewise.
6233 * config/tilegx/linux.mh: Likewise.
6234 * config/vax/nbsdelf.mh: Likewise.
6235 * config/vax/obsd.mh: Likewise.
6236 * config/xtensa/linux.mh: Likewise.
6237 * config/i386/i386gnu.mn: New file, with excerpts from
6238 "config/i386/i386gnu.mh".
6239 * configure: Regenerate.
6240 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6241 *.mh files under "gdb/config".
6242 * configure.nat: New file, with contents from the
6243 "gdb/config/*/*.mh" files.
6244
6245 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6246
6247 * btrace.c (btrace_clear): Free insn vector.
6248
6249 2017-05-05 Pedro Alves <palves@redhat.com>
6250
6251 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6252 * configure: Regenerate.
6253
6254 2017-05-04 Pedro Alves <palves@redhat.com>
6255
6256 * Makefile.in (SFILES): Add progspace-and-thread.c.
6257 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6258 (COMMON_OBS): Add progspace-and-thread.o.
6259 * breakpoint.c: Include "progspace-and-thread.h".
6260 (update_inserted_breakpoint_locations)
6261 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6262 Use scoped_restore_current_pspace_and_thread.
6263 (create_std_terminate_master_breakpoint): Use
6264 scoped_restore_current_program_space.
6265 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6266 (print_breakpoint_location): Use
6267 scoped_restore_current_program_space.
6268 (bp_loc_is_permanent): Use
6269 scoped_restore_current_pspace_and_thread.
6270 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6271 (download_tracepoint_locations): Use
6272 scoped_restore_current_pspace_and_thread.
6273 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6274 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6275 (enum step_over_calls_kind): Moved from inferior.h.
6276 (class scoped_restore_current_thread): New class.
6277 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6278 declaration.
6279 (scoped_restore_current_thread): New class.
6280 * infcmd.c: Include "common/gdb_optional.h".
6281 (continue_1, proceed_after_attach): Use
6282 scoped_restore_current_thread.
6283 (notice_new_inferior): Use scoped_restore_current_thread.
6284 * inferior.c: Include "progspace-and-thread.h".
6285 (restore_inferior, save_current_inferior): Delete.
6286 (add_inferior_command, clone_inferior_command): Use
6287 scoped_restore_current_pspace_and_thread.
6288 * inferior.h (scoped_restore_current_inferior): New class.
6289 * infrun.c: Include "progspace-and-thread.h" and
6290 "common/gdb_optional.h".
6291 (follow_fork_inferior): Use
6292 scoped_restore_current_pspace_and_thread.
6293 (scoped_restore_exited_inferior): New class.
6294 (handle_vfork_child_exec_or_exit): Use
6295 scoped_restore_exited_inferior,
6296 scoped_restore_current_pspace_and_thread,
6297 scoped_restore_current_thread and scoped_restore.
6298 (fetch_inferior_event): Use scoped_restore_current_thread.
6299 * linespec.c (decode_line_full, decode_line_1): Use
6300 scoped_restore_current_program_space.
6301 * mi/mi-main.c: Include "progspace-and-thread.h".
6302 (exec_continue): Use scoped_restore_current_thread.
6303 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6304 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6305 * proc-service.c (ps_pglobal_lookup): Use
6306 scoped_restore_current_program_space.
6307 * progspace-and-thread.c: New file.
6308 * progspace-and-thread.h: New file.
6309 * progspace.c (release_program_space, clone_program_space): Use
6310 scoped_restore_current_program_space.
6311 (restore_program_space, save_current_program_space)
6312 (save_current_space_and_thread): Delete.
6313 (switch_to_program_space_and_thread): Moved to
6314 progspace-and-thread.c.
6315 * progspace.h (save_current_program_space)
6316 (save_current_space_and_thread): Delete declarations.
6317 (scoped_restore_current_program_space): New class.
6318 * remote.c (remote_btrace_maybe_reopen): Use
6319 scoped_restore_current_thread.
6320 * symtab.c: Include "progspace-and-thread.h".
6321 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6322 * thread.c (print_thread_info_1): Use
6323 scoped_restore_current_thread.
6324 (struct current_thread_cleanup): Delete.
6325 (do_restore_current_thread_cleanup)
6326 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6327 (scoped_restore_current_thread::~scoped_restore_current_thread):
6328 ... this new dtor.
6329 (make_cleanup_restore_current_thread): Rename/convert to ...
6330 (scoped_restore_current_thread::scoped_restore_current_thread):
6331 ... this new ctor.
6332 (thread_apply_all_command): Use scoped_restore_current_thread.
6333 (thread_apply_command): Use scoped_restore_current_thread.
6334 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6335 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6336
6337 2017-05-04 Pedro Alves <palves@redhat.com>
6338
6339 * thread.c (make_cleanup_restore_current_thread): Move
6340 find_thread_ptid call before the is_stopped call. Assert that the
6341 thread is found. Replace is_stopped call by checking the thread's
6342 state directly. Remove unnecessary NULL-thread check.
6343
6344 2017-05-04 Pedro Alves <palves@redhat.com>
6345
6346 * corelow.c (thread_section_name): New class.
6347 (get_core_register_section, get_core_siginfo): Use it.
6348
6349 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6350
6351 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6352 (get_core_register_section): Remove xfree of NULL pointer.
6353
6354 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6355
6356 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6357 * regcache.c (regcache::raw_supply_zeroed): New function.
6358 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6359
6360 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6361
6362 * gdbarch.sh: Remove commented out definition of
6363 TARGET_CHAR_BIT.
6364 * gdbarch.h: Re-generate.
6365
6366 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6367
6368 * configure: Regenerate.
6369
6370 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6371
6372 * solib-target.c (solib_target_relocate_section_addresses):
6373 Remove num_section_bases, num_bases, segment_bases variables.
6374
6375 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6376
6377 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6378
6379 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6380
6381 * solib-target.c: Include <vector>
6382 (struct lm_info_target) <~lm_info_target>: Remove.
6383 <segment_bases, section_bases>: Change type to
6384 std::vector<CORE_ADDR>.
6385 (library_list_start_segment, library_list_start_section,
6386 library_list_end_library,
6387 solib_target_relocate_section_addresses): Adjust.
6388
6389 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6390
6391 * gdbarch.sh (software_single_step): Change return type to
6392 std::vector<CORE_ADDR>.
6393 * gdbarch.c, gdbarch.h: Re-generate.
6394 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6395 Adjust.
6396 (arm_deal_with_atomic_sequence_raw): Adjust.
6397 (thumb_get_next_pcs_raw): Adjust.
6398 (arm_get_next_pcs_raw): Adjust.
6399 (arm_get_next_pcs): Adjust.
6400 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6401 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6402 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6403 (alpha_software_single_step): Adjust.
6404 * alpha-tdep.h (alpha_software_single_step): Adjust.
6405 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6406 * arm-tdep.c (arm_software_single_step): Adjust.
6407 (arm_breakpoint_kind_from_current_state): Adjust.
6408 * arm-tdep.h (arm_software_single_step): Adjust.
6409 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6410 * cris-tdep.c (cris_software_single_step): Adjust.
6411 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6412 (micromips_deal_with_atomic_sequence): Adjust.
6413 (deal_with_atomic_sequence): Adjust.
6414 (mips_software_single_step): Adjust.
6415 * mips-tdep.h (mips_software_single_step): Adjust.
6416 * moxie-tdep.c (moxie_software_single_step): Adjust.
6417 * nios2-tdep.c (nios2_software_single_step): Adjust.
6418 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6419 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6420 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6421 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6422 * sparc-tdep.c (sparc_software_single_step): Adjust.
6423 * spu-tdep.c (spu_software_single_step): Adjust.
6424 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6425
6426 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6427
6428 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6429 * gdbarch.h: Re-generate.
6430
6431 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6432
6433 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6434 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6435 * python/py-instruction.c, python/py-instruction.h: New file.
6436 * python/py-record.c: Add py-instruction.h include.
6437 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6438 gdb.RecordInstruction.
6439 * python/python-internal.h: Add gdbpy_initialize_instruction
6440 declaration.
6441 * python/python.c (do_start_initialization): Add
6442 gdbpy_initialize_instruction.
6443
6444 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6445
6446 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6447 Remove.
6448 (btrace_func_from_recpy_func): New function.
6449 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6450 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6451 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6452 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6453 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6454 Also, use new helper functions.
6455 (btpy_list_item): Use new helper functions.
6456 (recpy_bt_function_call_history): Use new type name.
6457 (btpy_call_getset): Remove.
6458 (gdbpy_initialize_btrace): Remove code to initialize
6459 gdb.BtraceFunctionCall.
6460 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6461 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6462 recpy_bt_func_prev, recpy_bt_func_next): New export.
6463 * python/py-record.c (recpy_func_type): New static object.
6464 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6465 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6466 recpy_func_next): New function.
6467 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6468 (recpy_func_getset): New static object.
6469 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6470 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6471
6472 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6473
6474 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6475 (btpy_object, btpy_insn_type, btpy_new): Remove.
6476 (btpy_list_object): Use gdb.RecordInstruction type instead of
6477 gdb.BtraceInstruction type.
6478 (btrace_insn_from_recpy_insn): New function.
6479 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6480 btpy_new.
6481 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6482 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6483 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6484 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6485 instead of btpy_object.
6486 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6487 btpy_insn_data, btpy_insn_decode): Rename to ...
6488 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6489 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6490 recpy_bt_insn_decode): This. Also, use new helper functions.
6491 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6492 recpy_insn_type.
6493 (btpy_insn_getset): Remove.
6494 (gdbpy_initialize_btrace): Remove code to initialize
6495 gdb.BtraceInstruction. Use recpy_element_object.
6496 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6497 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6498 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6499 * python/py-record.c (recpy_insn_type): New static object.
6500 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6501 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6502 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6503 New function.
6504 (recpy_insn_getset): New static object.
6505 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6506 * python/py-record.h (recpy_element_object): New typedef.
6507 (recpy_insn_type, recpy_insn_new): New export.
6508
6509 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6510
6511 * py-record-btrace.c (btpy_insn_new): Removed.
6512 (btpy_insn_or_gap_new): New function.
6513 (btpy_insn_error): Removed.
6514 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6515 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6516 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6517 btpy_insn_or_gap_new instead of btpy_insn_new.
6518 (btpy_insn_getset): Remove btpy_insn_error.
6519 * py-record.c (recpy_gap_type): New static object.
6520 (recpy_gap_object): New typedef.
6521 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6522 recpy_gap_reason_string): New function.
6523 (recpy_gap_getset): New static object.
6524 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6525 * py-record.h (recpy_gap_new): New export.
6526
6527 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6528
6529 * python/py-record.c (recpy_ptid): Remove.
6530 (recpy_record_getset): Remove recpy_ptid.
6531
6532 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6533
6534 * btrace.c (btrace_fetch): Set inferior_ptid.
6535 * python/py-record-btrace.c: Add "py-record.h" include.
6536 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6537 recpy_bt_end, recpy_bt_instruction_history,
6538 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6539 in gdb.Record object instead of current ptid.
6540 * python/py-record.c: Include new "py-record.h" file.
6541 (recpy_record_object): Moved to py-record.h.
6542 * python/py-record.h: New file.
6543
6544 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6545
6546 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6547 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6548 indentation.
6549
6550 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6551
6552 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6553 the past maintainers section.
6554
6555 2017-04-28 Yao Qi <yao.qi@linaro.org>
6556
6557 * infcmd.c (get_return_value): Use regcache ctor, and remove
6558 cleanup.
6559
6560 2017-04-28 Yao Qi <yao.qi@linaro.org>
6561 Pedro Alves <palves@redhat.com>
6562
6563 * regcache.c (regcache::regcache): New tag dispatch ctor.
6564 (do_cooked_read): Moved above.
6565 (regcache_dup): Use the tag dispatch ctor..
6566 * regcache.h (regcache): Declare ctor, delete copy ctor and
6567 assignment operator, remove friend regcache_dup.
6568
6569 2017-04-28 Yao Qi <yao.qi@linaro.org>
6570
6571 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6572 call method save instead of regcache_cpy.
6573 * regcache.h (struct regcache): Make regcache_dup a friend.
6574
6575 2017-04-28 Yao Qi <yao.qi@linaro.org>
6576
6577 * regcache.c (struct regcache): Move to regcache.h
6578 (regcache::arch): New method.
6579 (regcache_get_ptid): Update.
6580 (get_regcache_arch): Call arch method.
6581 (get_regcache_aspace): Call method aspace.
6582 (register_buffer): Change it to method.
6583 (regcache_save): Change it to regcache::save.
6584 (regcache_restore): Likewise.
6585 (regcache_cpy_no_passthrough): Remove the declaration.
6586 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6587 (regcache_cpy_no_passthrough): Change it to method
6588 cpy_no_passthrough.
6589 (regcache_register_status): Change it to method
6590 get_register_status.
6591 (regcache_invalidate): Change it to method invalidate.
6592 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6593 (regcache_raw_update): Change it to method raw_update.
6594 (regcache_raw_read): Likewise.
6595 (regcache_raw_read_signed): Likewise.
6596 (regcache_raw_read_unsigned): Likewise.
6597 (regcache_raw_write_signed): Likewise.
6598 (regcache_raw_write_unsigned): Likewise.
6599 (regcache_cooked_read): Likewise.
6600 (regcache_cooked_read_value): Likewise.
6601 (regcache_cooked_read_signed): Likewise.
6602 (regcache_cooked_read_unsigned): Likewise.
6603 (regcache_cooked_write_signed): Likewise.
6604 (regcache_cooked_write_unsigned): Likewise.
6605 (regcache_raw_set_cached_value): Likewise.
6606 (regcache_raw_write): Likewise.
6607 (regcache_cooked_write): Likewise.
6608 (regcache_xfer_part): Likewise.
6609 (regcache_raw_read_part): Likewise.
6610 (regcache_raw_write_part): Likewise.
6611 (regcache_cooked_read_part): Likewise.
6612 (regcache_cooked_write_part): Likewise.
6613 (regcache_raw_supply): Likewise.
6614 (regcache_raw_collect): Likewise.
6615 (regcache_transfer_regset): Likewise.
6616 (regcache_supply_regset): Likewise.
6617 (regcache_collect_regset): Likewise.
6618 (regcache_debug_print_register): Likewise.
6619 (enum regcache_dump_what): Move it to regcache.h.
6620 (regcache_dump): Change it to method dump.
6621 * regcache.h (enum regcache_dump_what): New.
6622 (class regcache): New.
6623 * target.c (target_fetch_registers): Call method
6624 debug_print_register.
6625 (target_store_registers): Likewise.
6626
6627 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6628
6629 * windows-nat.c (struct lm_info_windows): Initialize field.
6630 (windows_make_so): Allocate lm_info_windows with new.
6631 (windows_free_so): Free lm_info_windows with delete.
6632
6633 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6634
6635 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6636 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6637 cleanup.
6638 (darwin_free_so): Free lm_info_darwin with delete.
6639
6640 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6641
6642 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6643 <l_addr_p>: Change type to bool.
6644 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6645 (svr4_free_so): Free lm_info_svr4 with delete.
6646 (svr4_copy_library_list): Replace memcpy with call to copy
6647 constructor.
6648 (library_list_start_library, svr4_default_sos): Allocate
6649 lm_info_svr4 with new.
6650
6651 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6652
6653 * solib-target.c (struct lm_info_target): Add destructor,
6654 initialize fields.
6655 <name>: Change type to std::string.
6656 (library_list_start_library): Allocate lm_info_target with new.
6657 (solib_target_free_library_list): Free lm_info_target with
6658 delete.
6659 (solib_target_current_sos): Adapt to std::string.
6660 (solib_target_free_so): Free lm_info_target with delete.
6661
6662 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6663
6664 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6665 fields.
6666 (frv_current_sos): Allocate lm_info_frv with new.
6667 (frv_relocate_main_executable): Free lm_info_frv with delete,
6668 allocate with new.
6669 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6670
6671 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6672
6673 * solib-frv.c (struct lm_info_frv): Fix indentation.
6674
6675 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6676
6677 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6678 map field.
6679 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6680 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6681 and allocate with new.
6682 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6683
6684 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6685
6686 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6687 <filename, member_name>: Change type to std::string.
6688 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6689 (library_list_start_library): Allocate lm_info_aix with new.
6690 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6691 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6692 with copy constructor.
6693
6694 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6695
6696 * solist.h (struct lm_info): Remove.
6697 (struct lm_info_base): New class.
6698 (struct so_list) <lm_info>: Change type to lm_info_base *.
6699 * nto-tdep.c (struct lm_info): Remove.
6700 (lm_addr): Adjust.
6701 * solib-aix.c (struct lm_info): Rename to ...
6702 (struct lm_info_aix): ... this. Extend lm_info_base.
6703 (lm_info_p): Rename to ...
6704 (lm_info_aix_p): ... this, and adjust.
6705 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6706 solib_aix_parse_libraries, library_list_start_library,
6707 solib_aix_free_library_list, solib_aix_parse_libraries,
6708 solib_aix_get_library_list,
6709 solib_aix_relocate_section_addresses, solib_aix_free_so,
6710 solib_aix_get_section_offsets,
6711 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6712 Adjust.
6713 (struct solib_aix_inferior_data) <library_list>: Adjust.
6714 * solib-darwin.c (struct lm_info): Rename to ...
6715 (struct lm_info_darwin): ... this. Extend lm_info_base.
6716 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6717 * solib-dsbt.c (struct lm_info): Rename to ...
6718 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6719 (struct dsbt_info) <main_executable_lm_info): Adjust.
6720 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6721 dsbt_relocate_section_addresses): Adjust.
6722 * solib-frv.c (struct lm_info): Rename to ...
6723 (struct lm_info_frv): ... this. Extend lm_info_base.
6724 (main_executable_lm_info): Adjust.
6725 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6726 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6727 find_canonical_descriptor_in_load_object,
6728 frv_fdpic_find_canonical_descriptor): Adjust.
6729 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6730 to lm_info_svr4.
6731 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6732 svr4_clear_so, svr4_copy_library_list,
6733 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6734 svr4_current_sos, svr4_fetch_objfile_link_map,
6735 solist_update_incremental): Adjust.
6736 * solib-svr4.h (struct lm_info_svr4): Move here from
6737 solib-svr4.c.
6738 * solib-target.c (struct lm_info): Rename to ...
6739 (struct lm_info_target): ... this. Extend lm_info_base.
6740 (lm_info_p): Rename to ...
6741 (lm_info_target_p): ... this.
6742 (solib_target_parse_libraries, library_list_start_segment,
6743 library_list_start_section, library_list_start_library,
6744 library_list_end_library, solib_target_free_library_list,
6745 solib_target_current_sos, solib_target_free_so,
6746 solib_target_relocate_section_addresses): Adjust.
6747 * windows-nat.c (struct lm_info): Rename to ...
6748 (struct lm_info_windows): ... this. Extend lm_info_base.
6749 (windows_make_so, handle_load_dll, handle_unload_dll,
6750 windows_xfer_shared_libraries): Adjust.
6751
6752 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6753
6754 * solib-darwin.c (struct darwin_so_list): Remove.
6755 (darwin_current_sos): Allocate an so_list object instead of a
6756 darwin_so_list, separately allocate an lm_info object.
6757 (darwin_free_so): Free lm_info.
6758
6759 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6760
6761 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6762 with fprintf_filtered.
6763
6764 2017-04-28 Yao Qi <yao.qi@linaro.org>
6765
6766 * regcache.c (regcache::regcache): New function.
6767 (regcache::~regcache): New function.
6768 (regcache_xmalloc_1): Remove.
6769 (regcache_xmalloc): Call new regcache.
6770 (regcache_xfree): Call delete regcache.
6771 (get_thread_arch_aspace_regcache): Call new regcache.
6772
6773 2017-04-28 Yao Qi <yao.qi@linaro.org>
6774
6775 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6776 lwp instead of ptid_get_lwp.
6777
6778 2017-04-28 Yao Qi <yao.qi@linaro.org>
6779
6780 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6781 lwp_info instead of getting from inferior_ptid.
6782
6783 2017-04-27 Keith Seitz <keiths@redhat.com>
6784
6785 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6786 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6787 (CV_CONVERSION_BADNESS): Define.
6788 (rank_one_type): Remove overly restrictive rvalue reference
6789 rank checks.
6790 Add cv-qualifier checks and subranks for type equality.
6791 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6792 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6793 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6794
6795 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6796
6797 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6798 count when creating the object.
6799
6800 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6801 Ulrich Weigand <uweigand@de.ibm.com>
6802
6803 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6804 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6805 is used in AIX.
6806 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6807 (process_xcoff_symbol): Likewise.
6808 (scan_xcoff_symtab): Likewise.
6809
6810 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6811
6812 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6813 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6814 (ia64_access_reg): Use get_frame_register_unsigned.
6815 (ia64_access_rse_reg): Likewise.
6816 (ia64_libunwind_frame_prev_register): Likewise.
6817
6818 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6819
6820 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6821 * gdbarch.c: Regenerated.
6822 * gdbarch.h: Regenerated.
6823 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6824 visibility external.
6825 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6826 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6827 (enum cfa_how_kind): Move to ...
6828 (struct dwarf2_frame_state_reg_info): Likewise.
6829 (struct dwarf2_frame_state): Likewise.
6830 * dwarf2-frame.h: ... here.
6831 (dwarf2_frame_state_alloc_regs): New declaration.
6832 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6833 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6834
6835 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6836
6837 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6838 regcache_raw_read_unsigned.
6839 (xtensa_pseudo_register_write): Likewise.
6840
6841 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6842
6843 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6844 (nds32_pseudo_register_write): Likewise.
6845
6846 2017-04-25 Yao Qi <yao.qi@linaro.org>
6847
6848 * regcache.c (struct regcache) <readonly_p>: Change its type
6849 to bool.
6850 (regcache_xmalloc_1): Update parameter type and callers update.
6851
6852 2017-04-25 Yao Qi <yao.qi@linaro.org>
6853
6854 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6855 set_gdbarch_wchar_bit.
6856 * arm-tdep.c (arm_gdbarch_init): Likewise.
6857
6858 2017-04-25 Pedro Alves <palves@redhat.com>
6859
6860 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6861 (BothAreRelocatable, memcopy, memmove): Don't define.
6862 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6863 macros.
6864
6865 2017-04-25 Pedro Alves <palves@redhat.com>
6866
6867 * common/common-defs.h: Include "common/poison.h".
6868 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6869 and adjust.
6870 * common/poison.h: New file.
6871 * common/traits.h: Include <type_traits>.
6872 (Not, Or, Requires): New, moved from common/function-view.h.
6873
6874 2017-04-25 Pedro Alves <palves@redhat.com>
6875
6876 * breakpoint.h (struct breakpoint): In-class initialize all
6877 fields. Make boolean fields "bool".
6878 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6879 memset call and initializations no longer necessary.
6880
6881 2017-04-25 Pedro Alves <palves@redhat.com>
6882
6883 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6884 reference.
6885 (pt_btrace_insn): New function.
6886 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6887
6888 2017-04-25 Pedro Alves <palves@redhat.com>
6889
6890 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6891 "base" field and inherit from "bp_location" instead. Add
6892 non-default ctor.
6893 (allocate_location_exception): Use new non-default ctor.
6894 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6895 (init_bp_location): Convert to ...
6896 (bp_location::bp_location): ... this new ctor, and remove memset
6897 call.
6898 (base_breakpoint_allocate_location): Use the new non-default ctor.
6899 * breakpoint.h (bp_location): Now a class. Declare default and
6900 non-default ctors. In-class initialize all members.
6901 (init_bp_location): Remove declaration.
6902
6903 2017-04-25 Pedro Alves <palves@redhat.com>
6904
6905 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6906 assignment operator.
6907
6908 2017-04-24 Yao Qi <yao.qi@linaro.org>
6909
6910 * doublest.c (convert_doublest_to_floatformat): Call
6911 floatformat_totalsize_bytes.
6912
6913 2017-04-22 Tom Tromey <tom@tromey.com>
6914
6915 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6916 ui_out_emit_list.
6917 * stack.c (print_frame): Use ui_out_emit_list.
6918 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6919 ui_out_emit_list.
6920 * mi/mi-main.c (print_one_inferior)
6921 (mi_cmd_data_list_register_names)
6922 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6923 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6924 ui_out_emit_list.
6925 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6926 (mi_output_solib_attribs): Use ui_out_emit_list,
6927 ui_out_emit_tuple.
6928 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6929 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6930 (mi_cmd_stack_list_args, list_args_or_locals): Use
6931 ui_out_emit_list.
6932 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6933 * breakpoint.c (print_solib_event, output_thread_groups): Use
6934 ui_out_emit_list.
6935
6936 2017-04-22 Tom Tromey <tom@tromey.com>
6937
6938 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6939 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6940 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6941
6942 2017-04-22 Tom Tromey <tom@tromey.com>
6943
6944 * tracepoint.c (tvariables_info_1)
6945 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6946
6947 2017-04-22 Tom Tromey <tom@tromey.com>
6948
6949 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6950 annotate_arg_emitter.
6951 * breakpoint.c (print_mention_watchpoint)
6952 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6953 * annotate.h (struct annotate_arg_emitter): New.
6954
6955 2017-04-22 Tom Tromey <tom@tromey.com>
6956
6957 * record-btrace.c (record_btrace_insn_history)
6958 (record_btrace_insn_history_range, record_btrace_call_history)
6959 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6960 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6961 ui_out_emit_tuple.
6962 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6963 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6964 * skip.c (skip_info): Use ui_out_emit_tuple.
6965 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6966 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6967 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6968 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6969 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6970 ui_out_emit_tuple.
6971 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6972 (output_register, mi_cmd_data_read_memory)
6973 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6974 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6975 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6976 Use ui_out_emit_tuple.
6977 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6978 ui_out_emit_tuple.
6979 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6980 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6981 * linux-thread-db.c (info_auto_load_libthread_db): Use
6982 ui_out_emit_tuple.
6983 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6984 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6985 * disasm.c (do_mixed_source_and_assembly_deprecated)
6986 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6987 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6988 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6989 * breakpoint.c (print_one_breakpoint_location)
6990 (print_one_breakpoint): Use ui_out_emit_tuple.
6991 * auto-load.c (print_script, info_auto_load_cmd): Use
6992 ui_out_emit_tuple.
6993 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6994
6995 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6996
6997 * thread.c (print_thread_info_1): Remove dead code.
6998
6999 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7000
7001 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7002 GDB_SELF_TEST.
7003 * arm-tdep.c (selftests::arm_record_test): Likewise.
7004
7005 2017-04-21 Yao Qi <yao.qi@linaro.org>
7006
7007 * regcache.c (regcache_restore): Remove argument 2. Replace
7008 argument 3 with regcache. Get register status from
7009 src->register_status and get register contents from
7010 register_buffer (src, regnum).
7011 (regcache_cpy): Update.
7012
7013 2017-04-19 Pedro Alves <palves@redhat.com>
7014
7015 * gdbthread.h (thread): Add missing closing parenthesis in
7016 comment.
7017
7018 2017-04-19 Pedro Alves <palves@redhat.com>
7019
7020 * common/refcounted-object.h: New file.
7021 * gdbthread.h: Include "common/refcounted-object.h".
7022 (thread_info): Inherit from refcounted_object and add comments.
7023 (thread_info::incref, thread_info::decref)
7024 (thread_info::m_refcount): Delete.
7025 (thread_info::deletable): Use the refcounted_object::refcount()
7026 method.
7027 * inferior.c (current_inferior_): Add comment.
7028 (set_current_inferior): Increment/decrement refcounts.
7029 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7030 not-deletable instead of comparing with the current inferior.
7031 (initialize_inferiors): Increment the initial inferior's refcount.
7032 * inferior.h (struct inferior): Forward declare.
7033 Include "common/refcounted-object.h".
7034 (current_inferior, set_current_inferior): Move declaration to
7035 before struct inferior's definition, and fix comment.
7036 (inferior): Inherit from refcounted_object. Add comments.
7037 * thread.c (switch_to_thread_no_regs): Reference the thread's
7038 inferior pointer directly instead of doing a ptid lookup.
7039 (switch_to_no_thread): New function.
7040 (switch_to_thread(thread_info *)): New function, factored out
7041 from ...
7042 (switch_to_thread(ptid_t)): ... this.
7043 (restore_current_thread): Delete.
7044 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7045 fields, and add 'inf' field.
7046 (do_restore_current_thread_cleanup): Check whether old->inf is
7047 alive instead of looking up an inferior by ptid. Use
7048 switch_to_thread and switch_to_no_thread.
7049 (restore_current_thread_cleanup_dtor): Use old->inf directly
7050 instead of lookup up an inferior by id. Decref the inferior.
7051 Don't restore 'removable'.
7052 (make_cleanup_restore_current_thread): Same the inferior pointer
7053 in old, instead of the inferior number. Incref the inferior.
7054 Don't save/clear 'removable'.
7055
7056 2017-04-19 Pedro Alves <palves@redhat.com>
7057
7058 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7059 unittests/scoped_restore-selftests.c.
7060 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7061 * common/scoped_restore.h (scoped_restore_base): Make "class".
7062 (scoped_restore_base::release): New public method.
7063 (scoped_restore_base::scoped_restore_base): New protected ctor.
7064 (scoped_restore_base::m_saved_var): New protected field.
7065 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7066 scoped_restore_base base class instead of m_saved_var directly.
7067 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7068 (scoped_restore_tmpl::scoped_restore_tmpl(const
7069 scoped_restore_tmpl<T>&)): Likewise.
7070 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7071 method.
7072 (scoped_restore_tmpl::saved_var): New method.
7073 (scoped_restore_tmpl::m_saved_var): Delete.
7074 * inferior.h (inferior::detaching): Now a bool.
7075 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7076 cleanup.
7077 * unittests/scoped_restore-selftests.c: New file.
7078
7079 2017-04-19 Pedro Alves <palves@redhat.com>
7080
7081 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7082 Re-sort in alphabetic order.
7083
7084 2017-04-18 Pedro Alves <palves@redhat.com>
7085
7086 * xml-support.c (obstack_xml_printf): Delete.
7087 * xml-support.h (obstack_xml_printf): Delete.
7088
7089 2017-04-18 Pedro Alves <palves@redhat.com>
7090
7091 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7092 vdebug, verror, body_text, start_element, end_element, name,
7093 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7094 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7095 is_xinclude>: Make private and add m_ prefix.
7096 (gdb_xml_parser::body_text): New method, based on ...
7097 (gdb_xml_body_text): ... this. Adjust.
7098 (gdb_xml_parser::vdebug): New method, based on ...
7099 (gdb_xml_debug): ... this. Adjust.
7100 (gdb_xml_parser::verror): New method, based on ...
7101 (gdb_xml_error): ... this. Adjust.
7102 (gdb_xml_parser::start_element): New method, based on ...
7103 (gdb_xml_start_element): ... this. Adjust.
7104 (gdb_xml_start_element_wrapper): Defer to
7105 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7106 (gdb_xml_parser::end_element): New method, based on ...
7107 (gdb_xml_end_element_wrapper): ... this. Adjust.
7108 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7109 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7110 (gdb_xml_parser::use_dtd): New method, based on ...
7111 (gdb_xml_use_dtd): ... this. Adjust.
7112 (gdb_xml_parser::parse): New method, based on ...
7113 (gdb_xml_parse): ... this. Adjust.
7114 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7115 (xinclude_start_include): Adjust to call the parser's name method.
7116 (xml_xinclude_default, xml_xinclude_start_doctype)
7117 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7118 method.
7119 (xml_process_xincludes): Adjust to call parser methods.
7120 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7121 declarations.
7122
7123 2017-04-18 Pedro Alves <palves@redhat.com>
7124
7125 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7126 gdb::optional<std::string>.
7127 * xml-support.c: Include <string>.
7128 (scope_level::scope_level(scope_level &&))
7129 (scope_level::~scope_level): Delete.
7130 (scope_level::body): Now a std::string.
7131 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7132 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7133 parameter.
7134 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7135 (xinclude_parsing_data::output): Now a std::string reference.
7136 (xinclude_start_include): Adjust.
7137 (xml_xinclude_default): Adjust.
7138 (xml_process_xincludes): Add 'output' parameter, and return bool.
7139 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7140 and return bool.
7141 * xml-tdesc.c: Include <unordered_map> and <string>.
7142 (tdesc_xml_cache): Delete.
7143 (tdesc_xml_cache_s): Delete.
7144 (xml_cache): Now an std::unordered_map.
7145 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7146 (target_fetch_description_xml): Change return type to
7147 gdb::optional<std::string>, and adjust.
7148 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7149 (target_fetch_description_xml): Change return type to
7150 gdb::optional<std::string>.
7151
7152 2017-04-18 Pedro Alves <palves@redhat.com>
7153
7154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7155 unittests/optional-selftests.c.
7156 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7157 * unittests/optional-selftests.c: New file.
7158 * unittests/optional/assignment/1.cc: New file.
7159 * unittests/optional/assignment/2.cc: New file.
7160 * unittests/optional/assignment/3.cc: New file.
7161 * unittests/optional/assignment/4.cc: New file.
7162 * unittests/optional/assignment/5.cc: New file.
7163 * unittests/optional/assignment/6.cc: New file.
7164 * unittests/optional/assignment/7.cc: New file.
7165 * unittests/optional/cons/copy.cc: New file.
7166 * unittests/optional/cons/default.cc: New file.
7167 * unittests/optional/cons/move.cc: New file.
7168 * unittests/optional/cons/value.cc: New file.
7169 * unittests/optional/in_place.cc: New file.
7170 * unittests/optional/observers/1.cc: New file.
7171 * unittests/optional/observers/2.cc: New file.
7172
7173 2017-04-18 Pedro Alves <palves@redhat.com>
7174
7175 * common/gdb_optional.h: Include common/traits.h.
7176 (in_place_t): New type.
7177 (in_place): New constexpr variable.
7178 (optional::optional): Remove member initialization of
7179 m_instantiated.
7180 (optional::optional(in_place_t...)): New constructor.
7181 (optional::~optional): Use reset.
7182 (optional::optional(const optional&)): New.
7183 (optional::optional(const optional&&)): New.
7184 (optional::optional(T &)): New.
7185 (optional::optional(T &&)): New.
7186 (operator::operator=(const optional &)): New.
7187 (operator::operator=(optional &&)): New.
7188 (operator::operator= (const T &))
7189 (operator::operator= (T &&))
7190 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7191 (operator::reset): New.
7192 (operator::m_instantiated):: Add in-class initializer.
7193 * common/traits.h: Include <type_traits>.
7194 (struct And): New types.
7195
7196 2017-04-18 Pedro Alves <palves@redhat.com>
7197
7198 * xml-support.c: Include <vector>.
7199 (scope_level::scope_level(const gdb_xml_element *))
7200 (scope_level::scope_level(scope_level&&)): New.
7201 (scope_level::~scope_level): New.
7202 (scope_level_s): Delete.
7203 (gdb_xml_parser::scopes): Now a std::vector.
7204 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7205 Use std::vector.
7206 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7207 scope cleanup code.
7208 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7209 of the scopes member. Use std::vector::emplace_back.
7210
7211 2017-04-18 Pedro Alves <palves@redhat.com>
7212
7213 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7214 a bool.
7215 (gdb_xml_end_element): Change type of first parameter.
7216 (gdb_xml_cleanup): Rename to ...
7217 (gdb_xml_parser::~gdb_xml_parser): ... this.
7218 (gdb_xml_create_parser_and_cleanup): Delete with ...
7219 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7220 to this new ctor.
7221 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7222 using gdb_xml_create_parser_and_cleanup.
7223 (xinclude_parsing_data): Add ctor/dtor.
7224 (xml_xinclude_cleanup): Delete.
7225 (xml_process_xincludes): Create a local xinclude_parsing_data
7226 instead of heap-allocating one. Create a local gdb_xml_parser
7227 instead of heap-allocating one with
7228 gdb_xml_create_parser_and_cleanup.
7229
7230 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7231
7232 PR threads/20743
7233 * fbsd-nat.c (resume_one_thread_cb): Remove.
7234 (resume_all_threads_cb): Remove.
7235 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7236 iterate_over_threads.
7237
7238 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7239
7240 * NEWS: Create a new section for the next release branch.
7241 Rename the section of the current branch, now that it has
7242 been cut.
7243
7244 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7245
7246 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7247 * version.in: Bump version to 8.0.50.DATE-git.
7248
7249 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7250
7251 PR gdb/21385
7252 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7253 independently of the host, and fix build breakage on Cygwin.
7254
7255 2017-04-13 Pedro Alves <palves@redhat.com>
7256
7257 * inferior.c (free_inferior): Convert to ...
7258 (inferior::~inferior): ... this dtor.
7259 (inferior::inferior): New ctor, factored out from ...
7260 (add_inferior_silent): ... here. Allocate the inferior with a new
7261 expression.
7262 (delete_inferior): Call delete instead of free_inferior.
7263 * inferior.h (gdb_environ, continuation): Forward declare.
7264 (inferior): Now a class. Add in-class initialization to all
7265 members. Make boolean fields bool, except 'detaching'.
7266 (inferior::inferior): New explicit ctor.
7267 (inferior::~inferior): New.
7268
7269 2017-04-13 Pedro Alves <palves@redhat.com>
7270
7271 * inferior.c (init_inferior_list): Delete.
7272 * inferior.h (init_inferior_list): Delete.
7273
7274 2017-04-13 Pedro Alves <palves@redhat.com>
7275
7276 PR threads/13217
7277 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7278 (top level): Call it twice, with different thread sets.
7279
7280 2017-04-13 Pedro Alves <palves@redhat.com>
7281
7282 * thread.c: Include <algorithm>.
7283 (thread_array_cleanup): Delete.
7284 (scoped_inc_dec_ref): New class.
7285 (live_threads_count): New function.
7286 (set_thread_refcount): Delete.
7287 (tp_array_compar_ascending): Now a bool.
7288 (tp_array_compar): Convert to a std::sort comparison function.
7289 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7290 and live_threads_count.
7291
7292 2017-04-13 Pedro Alves <palves@redhat.com>
7293
7294 * infrun.c (follow_fork_inferior): Also switch the current
7295 inferior.
7296
7297 2017-04-13 Pedro Alves <palves@redhat.com>
7298
7299 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7300 before calling create_internal_breakpoint.
7301
7302 2017-04-13 Pedro Alves <palves@redhat.com>
7303
7304 * fork-child.c (execv_argv): New class.
7305 (breakup_args): Refactored as ...
7306 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7307 Copy arguments to storage and replace separators with NULL
7308 terminators in place.
7309 (escape_bang_in_quoted_argument): Adjust to return bool.
7310 (execv_argv::execv_argv): New ctor.
7311 (execv_argv::init_for_shell): New method, factored out from
7312 fork_inferior. Don't strdup strings into the vector.
7313 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7314 Remove free_vector_argv call.
7315
7316 2017-04-13 Yao Qi <yao.qi@linaro.org>
7317
7318 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7319 tdep->rx_psw_type.
7320
7321 2017-04-13 Yao Qi <yao.qi@linaro.org>
7322
7323 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7324 * rx-tdep.c (rx_gdbarch_init): Likewise.
7325
7326 2017-04-13 Pedro Alves <palves@redhat.com>
7327
7328 * breakpoint.h (struct breakpoint): Reindent.
7329
7330 2017-04-13 Pedro Alves <palves@redhat.com>
7331
7332 * breakpoint.c (bp_location): Rename to ...
7333 (bp_locations): ... this. All references updated.
7334 (bp_location_count): Rename to ...
7335 (bp_locations_count): ... this. All references updated.
7336 (bp_location_placed_address_before_address_max): Rename to ...
7337 (bp_locations_placed_address_before_address_max): ... this. All
7338 references updated.
7339 (bp_location_shadow_len_after_address_max): Rename to ...
7340 (bp_locations_shadow_len_after_address_max): ... this. All
7341 references updated.
7342 (bp_location_compare_addrs): Rename to ...
7343 (bp_locations_compare_addrs): ... this. All references updated.
7344 (bp_location_compare):Rename to ...
7345 (bp_locations_compare): ... this. All references updated.
7346 (bp_location_target_extensions_update): Rename to ...
7347 (bp_locations_target_extensions_update): ... this. All references
7348 updated.
7349
7350 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7351
7352 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7353 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7354 'sgtty.h'.
7355 * common/gdb_termios.h: New file, with parts of "terminal.h".
7356 * inflow.c: Include "gdb_termios.h".
7357 * ser-unix.c: Include "gdb_termios.h".
7358 * terminal.h: Move terminal-related defines to
7359 "common/gdb_termios.h".
7360
7361 2017-04-12 Tom Tromey <tom@tromey.com>
7362
7363 * probe.c (parse_probes): Update.
7364 * location.h (delete_event_location): Don't declare.
7365 (event_location_deleter::operator()): Update.
7366 * location.c (event_location_deleter::operator()): Rename from
7367 delete_event_location.
7368 * linespec.h (linespec_result) <location>: Change type to
7369 event_location_up.
7370 * linespec.c (canonicalize_linespec, event_location_to_sals)
7371 (decode_objc): Update.
7372 (linespec_result): Don't call delete_event_location.
7373 * breakpoint.c (create_breakpoints_sal)
7374 (bkpt_probe_create_sals_from_location)
7375 (strace_marker_create_sals_from_location): Update.
7376
7377 2017-04-12 Tom Tromey <tom@tromey.com>
7378
7379 * linespec.h (struct linespec_result): Add constructor and
7380 destructor.
7381 (init_linespec_result, destroy_linespec_result)
7382 (make_cleanup_destroy_linespec_result): Don't declare.
7383 * linespec.c (init_linespec_result): Remove.
7384 (linespec_result::~linespec_result): Rename from
7385 destroy_linespec_result. Update.
7386 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7387 Remove.
7388 * breakpoint.c (create_breakpoint, break_range_command)
7389 (decode_location_default): Update.
7390 * ax-gdb.c (agent_command_1): Update.
7391
7392 2017-04-12 Tom Tromey <tom@tromey.com>
7393
7394 * remote.c (remote_download_tracepoint): Update.
7395 * python/py-breakpoint.c (bppy_get_location): Update.
7396 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7397 (gdbscm_breakpoint_location): Update.
7398 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7399 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7400 Change type to event_location_up.
7401 * breakpoint.c (create_overlay_event_breakpoint)
7402 (create_longjmp_master_breakpoint)
7403 (create_std_terminate_master_breakpoint)
7404 (create_exception_master_breakpoint)
7405 (breakpoint_event_location_empty_p, print_breakpoint_location)
7406 (print_one_breakpoint_location, create_thread_event_breakpoint)
7407 (init_breakpoint_sal, create_breakpoint)
7408 (print_recreate_ranged_breakpoint, break_range_command)
7409 (init_ada_exception_breakpoint, say_where): Update.
7410 (base_breakpoint_dtor): Don't call delete_event_location.
7411 (bkpt_print_recreate, tracepoint_print_recreate)
7412 (dprintf_print_recreate, update_static_tracepoint)
7413 (breakpoint_re_set_default): Update.
7414
7415 2017-04-12 Tom Tromey <tom@tromey.com>
7416
7417 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7418 type of "to_do". Update.
7419 (compute_stack_depth): Use std::vector.
7420
7421 2017-04-12 Tom Tromey <tom@tromey.com>
7422
7423 * printcmd.c (find_instruction_backward): Use std::vector.
7424
7425 2017-04-12 Tom Tromey <tom@tromey.com>
7426
7427 * symfile.c (objfilep): Remove typedef.
7428 (reread_symbols): Use a std::vector.
7429
7430 2017-04-12 Tom Tromey <tom@tromey.com>
7431
7432 * mi/mi-main.c (exec_direction_forward): Remove.
7433 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7434 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7435 scoped_restore.
7436 * guile/guile.c (guile_repl_command, guile_command)
7437 (gdbscm_execute_gdb_command): Use scoped_restore.
7438 * go-exp.y (go_parse): Use scoped_restore.
7439 * d-exp.y (d_parse): Use scoped_restore.
7440 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7441 * c-exp.y (c_parse): Use scoped_restore.
7442
7443 2017-04-12 Tom Tromey <tom@tromey.com>
7444
7445 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7446 (mi_parse): Update return type.
7447 (mi_parse_free): Remove.
7448 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7449 (mi_parse::~mi_parse): Rename from mi_parse_free.
7450 (mi_parse_cleanup): Remove.
7451 (mi_parse): Return a unique_ptr. Use new.
7452 * mi/mi-main.c (mi_execute_command): Update.
7453
7454 2017-04-12 Tom Tromey <tom@tromey.com>
7455
7456 * location.c (explicit_location_lex_one): Return a
7457 unique_xmalloc_ptr.
7458 (string_to_explicit_location): Update. Remove cleanups.
7459
7460 2017-04-12 Tom Tromey <tom@tromey.com>
7461
7462 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7463 (compare_value_and_voffset): Change type. Update.
7464 (compute_vtable_size): Change type of "offset_vec".
7465 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7466 (gnuv3_get_typeid): Remove extraneous declaration.
7467
7468 2017-04-12 Tom Tromey <tom@tromey.com>
7469
7470 * charset.h (wchar_iterator): Fix comment.
7471
7472 2017-04-12 Tom Tromey <tom@tromey.com>
7473
7474 * charset.c (iconv_wrapper): New class.
7475 (cleanup_iconv): Remove.
7476 (convert_between_encodings): Use it.
7477
7478 2017-04-12 Tom Tromey <tom@tromey.com>
7479
7480 * symfile.h (increment_reading_symtab): Update type.
7481 * symfile.c (decrement_reading_symtab): Remove.
7482 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7483 * psymtab.c (psymtab_to_symtab): Update.
7484 * dwarf2read.c (dw2_instantiate_symtab): Update.
7485
7486 2017-04-12 Tom Tromey <tom@tromey.com>
7487
7488 * jit.c (struct jit_reader): Declare separately. Add constructor
7489 and destructor. Change type of "handle".
7490 (loaded_jit_reader): Define separately.
7491 (jit_reader_load): Update. New "new".
7492 (jit_reader_unload_command): Use "delete".
7493 * gdb-dlfcn.h (struct dlclose_deleter): New.
7494 (gdb_dlhandle_up): New typedef.
7495 (gdb_dlopen, gdb_dlsym): Update types.
7496 (gdb_dlclose): Remove.
7497 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7498 (gdb_dlsym): Change type of "handle".
7499 (make_cleanup_dlclose): Remove.
7500 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7501 * compile/compile-c-support.c (load_libcc): Update.
7502
7503 2017-04-12 Tom Tromey <tom@tromey.com>
7504
7505 * symtab.h (find_pcs_for_symtab_line): Change return type.
7506 * symtab.c (find_pcs_for_symtab_line): Change return type.
7507 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7508 type of "vec". Update.
7509 (ltpy_get_pcs_for_line): Update.
7510 * linespec.c (decode_digits_ordinary): Update.
7511
7512 2017-04-12 Tom Tromey <tom@tromey.com>
7513
7514 * tracepoint.c (actions_command): Update.
7515 * python/python.c (python_command, python_interactive_command):
7516 Update.
7517 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7518 * guile/guile.c (guile_command): Update.
7519 * defs.h (read_command_lines, read_command_lines_1): Return
7520 command_line_up.
7521 (command_lines_deleter): New struct.
7522 (command_line_up): New typedef.
7523 * compile/compile.c (compile_code_command)
7524 (compile_print_command): Update.
7525 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7526 command_line_up.
7527 (make_cleanup_free_command_lines): Remove.
7528 * cli/cli-script.c (get_command_line, read_command_lines_1)
7529 (copy_command_lines): Return command_line_up.
7530 (while_command, if_command, read_command_lines, define_command)
7531 (document_command): Update.
7532 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7533 Remove.
7534 * breakpoint.h (breakpoint_set_commands): Change type of
7535 "commands".
7536 * breakpoint.c (breakpoint_set_commands): Change type of
7537 "commands". Update.
7538 (do_map_commands_command, update_dprintf_command_list)
7539 (create_tracepoint_from_upload): Update.
7540
7541 2017-04-12 Tom Tromey <tom@tromey.com>
7542
7543 * tracepoint.c (scope_info): Update.
7544 * spu-tdep.c (spu_catch_start): Update.
7545 * python/python.c (gdbpy_decode_line): Update.
7546 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7547 * python/py-breakpoint.c (bppy_init): Update.
7548 * probe.c (parse_probes): Update.
7549 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7550 * location.h (event_location_deleter): New struct.
7551 (event_location_up): New typedef.
7552 (new_linespec_location, new_address_location, new_probe_location)
7553 (new_explicit_location, copy_event_location)
7554 (string_to_event_location, string_to_event_location_basic)
7555 (string_to_explicit_location): Update return type.
7556 (make_cleanup_delete_event_location): Remove.
7557 * location.c (new_linespec_location, new_address_location)
7558 (new_probe_location, new_explicit_location, copy_event_location):
7559 Return event_location_up.
7560 (delete_event_location_cleanup)
7561 (make_cleanup_delete_event_location): Remove.
7562 (string_to_explicit_location, string_to_event_location_basic)
7563 (string_to_event_location): Return event_location_up.
7564 * linespec.c (canonicalize_linespec, event_location_to_sals)
7565 (decode_line_with_current_source)
7566 (decode_line_with_last_displayed, decode_objc): Update.
7567 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7568 * completer.c (location_completer): Update.
7569 * cli/cli-cmds.c (edit_command, list_command): Update.
7570 * breakpoint.c (create_overlay_event_breakpoint)
7571 (create_longjmp_master_breakpoint)
7572 (create_std_terminate_master_breakpoint)
7573 (create_exception_master_breakpoint)
7574 (create_thread_event_breakpoint): Update.
7575 (init_breakpoint_sal): Update. Remove some dead code.
7576 (create_breakpoint_sal): Change type of "location". Update.
7577 (create_breakpoints_sal, create_breakpoint, break_command_1)
7578 (dprintf_command, break_range_command, until_break_command)
7579 (init_ada_exception_breakpoint)
7580 (strace_marker_create_sals_from_location)
7581 (update_static_tracepoint, trace_command, ftrace_command)
7582 (strace_command, create_tracepoint_from_upload): Update.
7583 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7584 * ax-gdb.c (agent_command_1): Update.
7585
7586 2017-04-12 Pedro Alves <palves@redhat.com>
7587
7588 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7589 * configure.tgt: Handle i[34567]86-*-go32* and
7590 i[34567]86-*-msdosdjgpp*.
7591 * i386-tdep.c (i386_svr4_reg_to_regnum):
7592 Make extern.
7593 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7594 i386-go32-tdep.c.
7595 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7596 * i386-go32-tdep.c: New file.
7597 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7598 declarations.
7599
7600 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7601
7602 * aix-thread.c (pd_status2str): Change return type to const char *.
7603
7604 2017-04-12 Pedro Alves <palves@redhat.com>
7605
7606 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7607 calls to set_gdbarch_gnu_triplet_regexp.
7608
7609 2017-04-12 Pedro Alves <palves@redhat.com>
7610
7611 PR gdb/21323
7612 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7613 New enum value.
7614 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7615 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7616 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7617 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7618 * gdbarch.h, gdbarch.c: Regenerate.
7619 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7620 gdbarch_wchar_bit and gdbarch_wchar_signed.
7621 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7622 * arm-tdep.c (arm_gdbarch_init): Likewise.
7623 * avr-tdep.c (avr_gdbarch_init): Likewise.
7624 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7625 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7626 * i386-tdep.c (i386_go32_init_abi): Likewise.
7627 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7628 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7629 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7630 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7631 * sh-tdep.c (sh_gdbarch_init): Likewise.
7632 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7633 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7634 * windows-tdep.c (windows_init_abi): Likewise.
7635 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7636
7637 2017-04-12 Pedro Alves <palves@redhat.com>
7638
7639 PR c++/21323
7640 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7641 cplus_primitive_type_char32_t>: New enum values.
7642 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7643 and cplus_primitive_type_char32_t.
7644 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7645 32, use the archtecture's built-in type for char16_t and char32_t,
7646 respectively. Otherwise, fallback to init_integer_type as before,
7647 but make the type unsigned, and issue a complaint.
7648 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7649
7650 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7651
7652 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7653 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7654
7655 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7656
7657 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7658 'const char *'.
7659
7660 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7661
7662 * common/common-utils.c (free_vector_argv): New function.
7663 * common/common-utils.h: Include <vector>.
7664 (free_vector_argv): New prototype.
7665 * darwin-nat.c (darwin_create_inferior): Rewrite function
7666 prototype in order to constify "exec_file" and accept a
7667 "std::string" for "allargs".
7668 * fork-child.c: Include <vector>.
7669 (breakup_args): Rewrite function, using C++.
7670 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7671 and accept "std::string" for "allargs". Update the code to
7672 calculate "argv" based on "allargs". Update calls to "exec_fun"
7673 and "execvp".
7674 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7675 order to constify "exec_file" and accept a "std::string" for
7676 "allargs".
7677 * go32-nat.c (go32_create_inferior): Likewise.
7678 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7679 * infcmd.c (run_command_1): Constify "exec_file". Use
7680 "std::string" for inferior arguments.
7681 * inferior.h (fork_inferior): Update prototype.
7682 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7683 prototype in order to constify "exec_file" and accept a
7684 "std::string" for "allargs".
7685 * nto-procfs.c (procfs_create_inferior): Likewise.
7686 * procfs.c (procfs_create_inferior): Likewise.
7687 * remote-sim.c (gdbsim_create_inferior): Likewise.
7688 * remote.c (extended_remote_run): Update code to accept
7689 "std::string" as argument.
7690 (extended_remote_create_inferior): Rewrite function prototype in
7691 order to constify "exec_file" and accept a "std::string" for
7692 "allargs".
7693 * rs6000-nat.c (super_create_inferior): Likewise.
7694 (rs6000_create_inferior): Likewise.
7695 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7696 * windows-nat.c (windows_create_inferior): Likewise.
7697
7698 2017-04-11 Pedro Alves <palves@redhat.com>
7699
7700 * thread.c: Fix whitespace throughout.
7701
7702 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7703
7704 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7705
7706 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7707
7708 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7709
7710 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7711
7712 PR gdb/21364
7713 * osdata.c (info_osdata): Check if 'type' is an empty string
7714 instead of NULL.
7715
7716 2017-04-10 Pedro Alves <palves@redhat.com>
7717
7718 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7719 (ptid_to_global_thread_id, in_thread_list)
7720 (do_captured_list_thread_ids, set_resumed, set_running)
7721 (set_executing, set_stop_requested, finish_thread_state)
7722 (validate_registers_access, can_access_registers_ptid)
7723 (print_thread_info_1, switch_to_thread)
7724 (do_restore_current_thread_cleanup)
7725 (make_cleanup_restore_current_thread, thread_command)
7726 (thread_name_command): Use operator== instead of ptid_equal.
7727
7728 2017-04-10 Pedro Alves <palves@redhat.com>
7729
7730 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7731 (current_thread_cleanup_chain): Delete.
7732 (restore_current_thread_cleanup_dtor)
7733 (make_cleanup_restore_current_thread): Remove references to
7734 current_thread_cleanup_chain.
7735
7736 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7737
7738 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7739 REG_UNKNOWN.
7740
7741 2017-04-10 Yao Qi <yao.qi@linaro.org>
7742
7743 PR gdb/19942
7744 * gdbthread.h (thread_info::deletable): New method.
7745 (thread_info::incref): New method.
7746 (thread_info::decref): New method.
7747 (thread_info::refcount): Move it to private.
7748 * infrun.c (save_stop_context): Call inc_refcount.
7749 (release_stop_context_cleanup): Likewise.
7750 * thread.c (set_thread_exited): New function.
7751 (init_thread_list): Delete "tp" only it is deletable, otherwise
7752 call set_thread_exited.
7753 (delete_thread_1): Call set_thread_exited.
7754 (current_thread_cleanup) <inferior_pid>: Remove.
7755 <thread>: New field.
7756 (restore_current_thread_ptid_changed): Removed.
7757 (do_restore_current_thread_cleanup): Adjust.
7758 (restore_current_thread_cleanup_dtor): Don't call
7759 find_thread_ptid.
7760 (set_thread_refcount): Use dec_refcount.
7761 (make_cleanup_restore_current_thread): Adjust.
7762 (thread_apply_all_command): Call inc_refcount.
7763 (_initialize_thread): Don't call
7764 observer_attach_thread_ptid_changed.
7765
7766 2017-04-10 Yao Qi <yao.qi@linaro.org>
7767
7768 * thread.c (delete_thread_1): Hoist code on marking thread as
7769 exited.
7770
7771 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7772
7773 * windows-nat.c (windows_detach): Initialize ptid with
7774 minus_one_ptid.
7775
7776 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7777
7778 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7779
7780 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7781
7782 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7783 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7784 (bfin_pseudo_register_write): Likewise
7785
7786 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7787
7788 * common/ptid.h (struct ptid): Change to...
7789 (class ptid_t): ... this.
7790 <ptid_t>: New constructors.
7791 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7792 matches>: New methods.
7793 <make_null, make_minus_one>: New static methods.
7794 <pid>: Rename to...
7795 <m_pid>: ...this.
7796 <lwp>: Rename to...
7797 <m_lwp>: ...this.
7798 <tid>: Rename to...
7799 <m_tid>: ...this.
7800 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7801 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7802 as references, move comment to class ptid_t.
7803 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7804 ptid_t static methods.
7805 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7806 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7807 Take ptid arguments as references, implement using ptid_t methods.
7808 * unittests/ptid-selftests.c: New file.
7809 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7810 unittests/ptid-selftests.c.
7811 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7812
7813 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7814
7815 * python/python.c (python_run_simple_file): Cast mode literal to
7816 non-const char pointer as expected by PyFile_FromString.
7817
7818 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7819
7820 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7821 minus_one_ptid and null_ptid.
7822
7823 2017-04-05 Pedro Alves <palves@redhat.com>
7824
7825 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7826 * configure: Regenerate.
7827
7828 2017-04-05 Pedro Alves <palves@redhat.com>
7829
7830 * ada-exp.y (yyerror): Constify.
7831 * ada-lang.c (bound_name, get_selections)
7832 (ada_variant_discrim_type)
7833 (ada_variant_discrim_name, ada_value_struct_elt)
7834 (ada_lookup_struct_elt_type, is_unchecked_variant)
7835 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7836 (catch_ada_exception_command_split)
7837 (catch_ada_assert_command_split, catch_assert_command)
7838 (ada_op_name): Constify.
7839 * ada-lang.h (ada_yyerror, get_selections)
7840 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7841 * arc-tdep.c (arc_print_frame_cache): Constify.
7842 * arm-tdep.c (arm_skip_stub): Constify.
7843 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7844 (gen_aggregate_elt_ref): Constify.
7845 * bcache.c (print_bcache_statistics): Constify.
7846 * bcache.h (print_bcache_statistics): Constify.
7847 * break-catch-throw.c (catch_exception_command_1):
7848 * breakpoint.c (struct ep_type_description::description):
7849 Constify.
7850 (add_solib_catchpoint): Constify.
7851 (catch_fork_command_1): Add cast.
7852 (add_catch_command): Constify.
7853 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7854 Constify.
7855 * bsd-uthread.c (bsd_uthread_state): Constify.
7856 * buildsym.c (patch_subfile_names): Constify.
7857 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7858 Constify.
7859 * c-exp.y (yyerror): Constify.
7860 (token::oper): Constify.
7861 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7862 * c-varobj.c (cplus_describe_child): Constify.
7863 * charset.c (find_charset_names): Add cast.
7864 (find_charset_names): Constify array and add const_cast.
7865 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7866 (edit_command): Constify.
7867 * cli/cli-decode.c (lookup_cmd): Constify.
7868 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7869 Constify.
7870 (struct dump_context): Constify.
7871 (add_dump_command, restore_command): Constify.
7872 * cli/cli-script.c (get_command_line): Constify.
7873 * cli/cli-script.h (get_command_line): Constify.
7874 * cli/cli-utils.c (check_for_argument): Constify.
7875 * cli/cli-utils.h (check_for_argument): Constify.
7876 * coff-pe-read.c (struct read_pe_section_data): Constify.
7877 * command.h (lookup_cmd): Constify.
7878 * common/print-utils.c (decimal2str): Constify.
7879 * completer.c (gdb_print_filename): Constify.
7880 * corefile.c (set_gnutarget): Constify.
7881 * cp-name-parser.y (yyerror): Constify.
7882 * cp-valprint.c (cp_print_class_member): Constify.
7883 * cris-tdep.c (cris_register_name, crisv32_register_name):
7884 Constify.
7885 * d-exp.y (yyerror): Constify.
7886 (struct token::oper): Constify.
7887 * d-lang.h (d_yyerror): Constify.
7888 * dbxread.c (struct header_file_location::name): Constify.
7889 (add_old_header_file, add_new_header_file, last_function_name)
7890 (dbx_next_symbol_text, add_bincl_to_list)
7891 (find_corresponding_bincl_psymtab, set_namestring)
7892 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7893 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7894 * defs.h (command_line_input, print_address_symbolic)
7895 (deprecated_readline_begin_hook): Constify.
7896 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7897 Constify.
7898 * event-top.c (handle_line_of_input): Constify and add cast.
7899 * exceptions.c (catch_errors): Constify.
7900 * exceptions.h (catch_errors): Constify.
7901 * expprint.c (print_subexp_standard, op_string, op_name)
7902 (op_name_standard, dump_raw_expression, dump_raw_expression):
7903 * expression.h (op_name, op_string, dump_raw_expression):
7904 Constify.
7905 * f-exp.y (yyerror): Constify.
7906 (struct token::oper): Constify.
7907 (struct f77_boolean_val::name): Constify.
7908 * f-lang.c (f_word_break_characters): Constify.
7909 * f-lang.h (f_yyerror): Constify.
7910 * fork-child.c (fork_inferior): Add cast.
7911 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7912 (new_variant): Constify.
7913 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7914 * gdbarch.c: Regenerate.
7915 * gdbcore.h (set_gnutarget): Constify.
7916 * go-exp.y (yyerror): Constify.
7917 (token::oper): Constify.
7918 * go-lang.h (go_yyerror): Constify.
7919 * go32-nat.c (go32_sysinfo): Constify.
7920 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7921 * guile/scm-cmd.c (cmdscm_function): Constify.
7922 * guile/scm-param.c (pascm_param_value): Constify.
7923 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7924 (h8300sx_register_name): Constify.
7925 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7926 Constify.
7927 * ia64-tdep.c (ia64_register_names): Constify.
7928 * infcmd.c (construct_inferior_arguments): Constify.
7929 (path_command, attach_post_wait): Constify.
7930 * language.c (show_range_command, show_case_command)
7931 (unk_lang_error): Constify.
7932 * language.h (language_defn::la_error)
7933 (language_defn::la_name_of_this): Constify.
7934 * linespec.c (decode_line_2): Constify.
7935 * linux-thread-db.c (thread_db_err_str): Constify.
7936 * lm32-tdep.c (lm32_register_name): Constify.
7937 * m2-exp.y (yyerror): Constify.
7938 * m2-lang.h (m2_yyerror): Constify.
7939 * m32r-tdep.c (m32r_register_names): Constify and make static.
7940 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7941 * m88k-tdep.c (m88k_register_name): Constify.
7942 * macroexp.c (appendmem): Constify.
7943 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7944 (upgrade_type, parse_external, parse_partial_symbols)
7945 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7946 (new_symbol): Constify.
7947 * memattr.c (mem_info_command): Constify.
7948 * mep-tdep.c (register_name_from_keyword): Constify.
7949 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7950 Constify.
7951 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7952 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7953 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7954 cast.
7955 (mi_execute_async_cli_command): Constify.
7956 * mips-tdep.c (mips_register_name): Constify.
7957 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7958 (am33_register_name, am33_2_register_name)
7959 * moxie-tdep.c (moxie_register_names): Constify.
7960 * nat/linux-osdata.c (osdata_type): Constify fields.
7961 * nto-tdep.c (nto_parse_redirection): Constify.
7962 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7963 (lookup_child_selector): Constify.
7964 (objc_methcall::name): Constify.
7965 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7966 (lookup_struct_typedef): Constify.
7967 * objfiles.c (pc_in_section): Constify.
7968 * objfiles.h (pc_in_section): Constify.
7969 * p-exp.y (struct token::oper): Constify.
7970 (yyerror): Constify.
7971 * p-lang.h (pascal_yyerror): Constify.
7972 * parser-defs.h (op_name_standard): Constify.
7973 (op_print::string): Constify.
7974 (exp_descriptor::op_name): Constify.
7975 * printcmd.c (print_address_symbolic): Constify.
7976 * psymtab.c (print_partial_symbols): Constify.
7977 * python/py-breakpoint.c (stop_func): Constify.
7978 (bppy_get_expression): Constify.
7979 * python/py-cmd.c (cmdpy_completer::name): Constify.
7980 (cmdpy_function): Constify.
7981 * python/py-event.c (evpy_add_attribute)
7982 (gdbpy_initialize_event_generic): Constify.
7983 * python/py-event.h (evpy_add_attribute)
7984 (gdbpy_initialize_event_generic): Constify.
7985 * python/py-evts.c (add_new_registry): Constify.
7986 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7987 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7988 * python/py-inferior.c (get_buffer): Add cast.
7989 * python/py-param.c (parm_constant::name): Constify.
7990 * python/py-unwind.c (fprint_frame_id): Constify.
7991 * python/python.c (gdbpy_parameter_value): Constify.
7992 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7993 * remote.c (memory_packet_config::name): Constify.
7994 (show_packet_config_cmd, remote_write_bytes)
7995 (remote_buffer_add_string):
7996 * reverse.c (exec_reverse_once): Constify.
7997 * rs6000-tdep.c (variant::name, variant::description): Constify.
7998 * rust-exp.y (rustyyerror): Constify.
7999 * rust-lang.c (rust_op_name): Constify.
8000 * rust-lang.h (rustyyerror): Constify.
8001 * serial.h (serial_ops::name): Constify.
8002 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8003 (sh_sh3e_register_name, sh_sh2e_register_name)
8004 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8005 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8006 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8007 (sh_sh4al_dsp_register_name): Constify.
8008 * sh64-tdep.c (sh64_register_name): Constify.
8009 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8010 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8011 * stabsread.c (patch_block_stabs, read_type_number)
8012 (ref_map::stabs, ref_add, process_reference)
8013 (symbol_reference_defined, define_symbol, define_symbol)
8014 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8015 (read_one_struct_field, read_struct_fields, read_baseclasses)
8016 (read_tilde_fields, read_struct_type, read_array_type)
8017 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8018 (read_huge_number, read_range_type, read_args, common_block_start)
8019 (find_name_end): Constify.
8020 * stabsread.h (common_block_start, define_symbol)
8021 (process_one_symbol, symbol_reference_defined, ref_add):
8022 * symfile.c (get_section_index, add_symbol_file_command):
8023 * symfile.h (get_section_index): Constify.
8024 * target-descriptions.c (tdesc_type::name): Constify.
8025 (tdesc_free_type): Add cast.
8026 * target.c (find_default_run_target):
8027 (add_deprecated_target_alias, find_default_run_target)
8028 (target_announce_detach): Constify.
8029 (do_option): Constify.
8030 * target.h (add_deprecated_target_alias): Constify.
8031 * thread.c (print_thread_info_1): Constify.
8032 * top.c (deprecated_readline_begin_hook, command_line_input):
8033 Constify.
8034 (init_main): Add casts.
8035 * top.h (handle_line_of_input): Constify.
8036 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8037 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8038 (tfind_command): Rename to ...
8039 (tfind_command_1): ... this and constify.
8040 (tfind_command): New function.
8041 (tfind_end_command, tfind_start_command): Adjust.
8042 (encode_source_string): Constify.
8043 * tracepoint.h (encode_source_string): Constify.
8044 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8045 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8046 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8047 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8048 * tui/tui-win.c (parse_scrolling_args): Constify.
8049 * tui/tui-windata.c (tui_erase_data_content): Constify.
8050 * tui/tui-windata.h (tui_erase_data_content): Constify.
8051 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8052 * tui/tui.c (tui_enable): Add cast.
8053 * utils.c (defaulted_query): Constify.
8054 (init_page_info): Add cast.
8055 (puts_debug, subset_compare): Constify.
8056 * utils.h (subset_compare): Constify.
8057 * varobj.c (varobj_format_string): Constify.
8058 * varobj.h (varobj_format_string): Constify.
8059 * vax-tdep.c (vax_register_name): Constify.
8060 * windows-nat.c (windows_detach): Constify.
8061 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8062 * xml-support.c (gdb_xml_end_element): Constify.
8063 * xml-tdesc.c (tdesc_start_reg): Constify.
8064 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8065 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8066 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8067
8068 2017-04-05 Pedro Alves <palves@redhat.com>
8069
8070 * proc-api.c (struct trans): Constify.
8071 (procfs_note): Constify.
8072 * proc-events.c (struct trans, syscall_table):
8073 * proc-flags.c (struct trans): Constify.
8074 * proc-utils.h (procfs_note): Constify.
8075 * proc-why.c (struct trans): Constify.
8076 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8077 (procfs_detach): Constify.
8078 * sol-thread.c (struct string_map): Constify.
8079 (td_err_string, td_state_string): Constify.
8080
8081 2017-04-05 Pedro Alves <palves@redhat.com>
8082
8083 * proc-api.c (procfs_filename): Don't initialize
8084 procfs_filename.
8085 (prepare_to_trace): Assume procfs_filename is non-NULL.
8086 (_initialize_proc_api): Give procfs_filename a default value here.
8087
8088 2017-04-05 Pedro Alves <palves@redhat.com>
8089
8090 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8091 'cond_string' parameter.
8092 (extract_exception_regexp): Constify 'string' parameter.
8093 (catch_exception_command_1): Constify.
8094 * breakpoint.c (init_catchpoint)
8095 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8096 parameter.
8097 (ep_parse_optional_if_clause, catch_fork_command_1)
8098 (catch_exec_command_1): Constify.
8099 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8100 parameter.
8101 (ep_parse_optional_if_clause): Constify.
8102 * cli/cli-utils.c (remove_trailing_whitespace)
8103 (check_for_argument): Constify.
8104 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8105 non-const overload.
8106 (check_for_argument): Likewise.
8107
8108 2017-04-05 Pedro Alves <palves@redhat.com>
8109
8110 * event-top.c (command_line_handler): Add cast to execute_command
8111 call.
8112 * record-btrace.c (cmd_record_btrace_bts_start)
8113 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8114 (cmd_record_btrace_start): Add cast to execute_command call.
8115 * record-full.c (record_full_goto_insn):
8116 * record.c (record_start, record_stop): Add cast to
8117 execute_command_to_string calls.
8118 (cmd_record_start): Add cast to execute_command calls.
8119
8120 2017-04-05 Pedro Alves <palves@redhat.com>
8121
8122 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8123 static inline function.
8124 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8125 array and use gdb_PyArg_ParseTupleAndKeywords.
8126 * python/py-cmd.c (cmdpy_init): Likewise.
8127 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8128 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8129 (infpy_search_memory): Likewise.
8130 * python/py-objfile.c (objfpy_add_separate_debug_file)
8131 (gdbpy_lookup_objfile): Likewise.
8132 * python/py-symbol.c (gdbpy_lookup_symbol)
8133 (gdbpy_lookup_global_symbol): Likewise.
8134 * python/py-type.c (gdbpy_lookup_type): Likewise.
8135 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8136 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8137 Likewise.
8138
8139 2017-04-05 Pedro Alves <palves@redhat.com>
8140
8141 * python/python-internal.h (gdb_PyGetSetDef): New type.
8142 * python/py-block.c (block_object_getset)
8143 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8144 * python/py-event.c (event_object_getset)
8145 (finish_breakpoint_object_getset): Likewise.
8146 * python/py-inferior.c (inferior_object_getset): Likewise.
8147 * python/py-infthread.c (thread_object_getset): Likewise.
8148 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8149 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8150 * python/py-objfile.c (objfile_getset): Likewise.
8151 * python/py-progspace.c (pspace_getset): Likewise.
8152 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8153 Likewise.
8154 * python/py-record.c (recpy_record_getset): Likewise.
8155 * python/py-symbol.c (symbol_object_getset): Likewise.
8156 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8157 Likewise.
8158 * python/py-type.c (type_object_getset, field_object_getset):
8159 Likewise.
8160 * python/py-value.c (value_object_getset): Likewise.
8161
8162 2017-04-05 Pedro Alves <palves@redhat.com>
8163
8164 * python/python-internal.h (gdb_PyObject_CallMethod)
8165 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8166 New functions.
8167 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8168 (PySys_GetObject, PySys_SetPath): New macros.
8169
8170 2017-04-05 Pedro Alves <palves@redhat.com>
8171
8172 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8173 info_osdata_command.
8174 * osdata.c (info_osdata_command): Rename to ...
8175 (info_osdata): ... this. Constify 'type' parameter, and remove
8176 the 'from_tty' parameter. Accept NULL TYPE.
8177 (info_osdata_command): New function.
8178 * osdata.h (info_osdata_command): Remove declaration.
8179 (info_osdata): New declaration.
8180
8181 2017-04-05 Pedro Alves <palves@redhat.com>
8182
8183 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8184 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8185 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8186 parameter.
8187 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8188 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8189 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8190 parameter.
8191 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8192 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8193 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8194 (mi_cmd_file_list_exec_source_files)
8195 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8196 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8197 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8198 parameter.
8199 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8200 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8201 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8202 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8203 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8204 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8205 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8206 'command' parameter.
8207 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8208 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8209 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8210 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8211 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8212 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8213 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8214 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8215 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8216 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8217 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8218 parameter.
8219 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8220 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8221 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8222 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8223 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8224 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8225 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8226 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8227 (mi_cmd_data_list_changed_registers)
8228 (mi_cmd_data_write_register_values)
8229 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8230 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8231 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8232 (mi_cmd_list_features, mi_cmd_list_target_features)
8233 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8234 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8235 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8236 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8237 (mi_cmd_trace_frame_collected): Constify 'command'
8238 parameter.
8239 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8240 'command' parameter.
8241
8242 2017-04-05 Pedro Alves <palves@redhat.com>
8243
8244 * ada-lang.c (ada_completer_word_break_characters): Now a const
8245 array.
8246 (ada_get_gdb_completer_word_break_characters): Constify.
8247 * completer.c (gdb_completer_command_word_break_characters)
8248 (gdb_completer_file_name_break_characters)
8249 (gdb_completer_quote_characters): Now const arrays.
8250 (get_gdb_completer_quote_characters): Constify.
8251 (set_rl_completer_word_break_characters): New function.
8252 (set_gdb_completion_word_break_characters)
8253 (complete_line_internal): Use it.
8254 * completer.h (get_gdb_completer_quote_characters): Constify.
8255 (set_rl_completer_word_break_characters): Declare.
8256 * f-lang.c (f_word_break_characters): Constify.
8257 * language.c (default_word_break_characters): Constify.
8258 * language.h (language_defn::la_word_break_characters): Constify.
8259 (default_word_break_characters): Constify.
8260 * top.c (init_main): Use set_rl_completer_word_break_characters.
8261
8262 2017-04-05 Pedro Alves <palves@redhat.com>
8263
8264 * aix-thread.c (aix_thread_pid_to_str)
8265 (aix_thread_extra_thread_info): Constify.
8266 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8267 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8268 (bsd_uthread_pid_to_str): Constify.
8269 * corelow.c (core_pid_to_str): Constify.
8270 * darwin-nat.c (darwin_pid_to_str): Constify.
8271 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8272 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8273 Constify.
8274 * gnu-nat.c (gnu_pid_to_str): Constify.
8275 * go32-nat.c (go32_pid_to_str): Constify.
8276 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8277 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8278 * inferior.c (inferior_pid_to_str): Constify.
8279 * linux-nat.c (linux_nat_pid_to_str): Constify.
8280 * linux-tdep.c (linux_core_pid_to_str): Constify.
8281 * linux-thread-db.c (thread_db_pid_to_str)
8282 (thread_db_extra_thread_info): Constify.
8283 * nto-tdep.c (nto_extra_thread_info): Constify.
8284 * nto-tdep.h (nto_extra_thread_info): Constify.
8285 * obsd-nat.c (obsd_pid_to_str): Constify.
8286 * procfs.c (procfs_pid_to_str): Constify.
8287 * ravenscar-thread.c (ravenscar_extra_thread_info)
8288 (ravenscar_pid_to_str): Constify.
8289 * remote-sim.c (gdbsim_pid_to_str): Constify.
8290 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8291 Constify.
8292 * sol-thread.c (solaris_pid_to_str): Constify.
8293 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8294 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8295 * target.c (default_pid_to_str, target_pid_to_str)
8296 (normal_pid_to_str, default_pid_to_str): Constify.
8297 * target.h (target_ops::to_pid_to_str)
8298 (target_ops::to_extra_thread_info): Constify.
8299 (target_pid_to_str, normal_pid_to_str): Constify.
8300 * windows-nat.c (windows_pid_to_str): Constify.
8301 * gdbarch.sh (core_pid_to_str): Constify.
8302 * target-delegates.c: Regenerate.
8303 * gdbarch.h, gdbarch.c: Regenerate.
8304
8305 2017-04-05 Pedro Alves <palves@redhat.com>
8306
8307 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8308 the memory of the temporary warning_pre_print override.
8309 * utils.c (warning_pre_print): Constify.
8310 * utils.h (warning_pre_print): Constify.
8311
8312 2017-04-05 Pedro Alves <palves@redhat.com>
8313
8314 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8315 (shell_command): New function.
8316 (make_command): Use std::string.
8317 (init_cli_cmds): Register shell_command instead of shell_escape.
8318
8319 2017-04-05 Pedro Alves <palves@redhat.com>
8320
8321 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8322 * tracepoint.c (default_collect): Don't initialize.
8323
8324 2017-04-05 Pedro Alves <palves@redhat.com>
8325
8326 * macroexp.c (macro_buffer::shared): Now a bool.
8327 (init_buffer): Update.
8328 (init_shared_buffer): Constify 'addr' parameter.
8329 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8330 casts.
8331
8332 2017-04-05 Pedro Alves <palves@redhat.com>
8333
8334 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8335 * disasm.c (set_disassembler_options): Constify local.
8336 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8337
8338 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8339
8340 PR gdb/21352
8341 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8342 option.
8343
8344 2017-04-05 Yao Qi <yao.qi@linaro.org>
8345
8346 * frame.c (frame_unwind_register_unsigned): Call
8347 frame_unwind_register_value.
8348
8349 2017-04-05 Yao Qi <yao.qi@linaro.org>
8350
8351 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8352 Use gdb_test_multiple, and don't match anchor.
8353
8354 2017-04-05 Pedro Alves <palves@redhat.com>
8355
8356 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8357 (Write After Approval): Remove Simon Marchi.
8358
8359 2017-04-05 Pedro Alves <palves@redhat.com>
8360
8361 * common/gdb_optional.h (optional::optional): Make constexpr and
8362 initialize m_dummy.
8363
8364 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8365
8366 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8367 (amd64fbsd_jmp_buf_reg_offset): Remove.
8368 (amd64fbsd_supply_uthread): Remove function.
8369 (amd64fbsd_collect_uthread): Remove function.
8370 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8371 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8372 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8373 (fbsd-nat.c): Update comment.
8374 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8375 (i386fbsd_jmp_buf_reg_offset): Remove.
8376 (i386fbsd_supply_uthread): Remove function.
8377 (i386fbsd_collect_uthread): Remove function.
8378 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8379
8380 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8381
8382 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8383 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8384 * NEWS: Mention that support for FreeBSD/alpha was removed.
8385 * alpha-fbsd-tdep.c: Delete file.
8386 * config/alpha/fbsd.mh: Delete file.
8387 * configure.host: Delete alpha*-*-freebsd* and
8388 alpha*-*-kfreebsd*-gnu.
8389 * configure.tgt: Delete alpha*-*-freebsd* and
8390 alpha*-*-kfreebsd*-gnu.
8391
8392 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8393
8394 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8395 amd64bsd_store_inferior_registers): Use ptid from regcache.
8396
8397 2017-04-04 Pedro Alves <palves@redhat.com>
8398
8399 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8400 data fields, make them private and add "m_" prefixes.
8401 (lnp_state_machine::lnp_state_machine): New ctor.
8402 (record_line, check_line_address, handle_set_discriminator)
8403 (handle_set_address, handle_advance_pc, handle_special_opcode)
8404 (handle_advance_line, handle_set_file, handle_negate_stmt)
8405 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8406 (end_sequence, advance_line): New methods.
8407 (m_gdbarch, m_record_lines_p): New fields.
8408 (lnp_reader_state): Delete.
8409 (dwarf_record_line): Rename to ...
8410 (lnp_state_machine::record_line): ... adjust.
8411 (init_lnp_state_machine): Delete.
8412 (lnp_state_machine::lnp_state_machine): New.
8413 (check_line_address): Rename to ...
8414 (lnp_state_machine::check_line_address): This.
8415 (dwarf_decode_lines_1): Remove reference to "reader_state".
8416 Adjust lnp_state_machine having a non-default ctor. Use bool.
8417 State machine internal state manipulation moved to
8418 lnp_state_machine methods.
8419
8420 2017-04-04 Pedro Alves <palves@redhat.com>
8421
8422 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8423 unittests/offset-type-selftests.c.
8424 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8425 * common/offset-type.h: New file.
8426 * common/preprocessor.h: New file.
8427 * common/traits.h: New file.
8428 * common/valid-expr.h: New file.
8429 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8430 sect_offset and cu_offset strong typedefs throughout.
8431 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8432 typedefs throughout.
8433 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8434 sect_offset and cu_offset strong typedefs throughout.
8435 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8436 typedefs throughout.
8437 * gdbtypes.h: Include "common/offset-type.h".
8438 (cu_offset): Now an offset type (strong typedef) instead of a
8439 struct.
8440 (sect_offset): Likewise.
8441 (union call_site_parameter_u): Rename "param_offset" field to
8442 "param_cu_off".
8443 * unittests/offset-type-selftests.c: New file.
8444
8445 2017-04-04 Pedro Alves <palves@redhat.com>
8446
8447 * common/underlying.h: New file.
8448 * dwarf2read.c: Include "common/gdb_optional.h" and
8449 "common/underlying.h".
8450 (dir_index, file_name_index): New types.
8451 (file_entry): Use them.
8452 (file_entry::include): Use to_underlying.
8453 (line_header::add_file_name): Use dir_index.
8454 (read_formatted_entries): Use gdb::optional. Read form before
8455 writting to file_entry.
8456 (dwarf_decode_line_header): Use dir_index.
8457 (lnp_state_machine::current_file): Use to_underlying.
8458 (lnp_state_machine::file): Change type to file_name_index.
8459 (dwarf_record_line): Use to_underlying.
8460 (init_lnp_state_machine): Use file_name_index.
8461 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8462
8463 2017-04-04 Pedro Alves <palves@redhat.com>
8464
8465 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8466 operator bool, has_value and get methods.
8467
8468 2017-04-04 Pedro Alves <palves@redhat.com>
8469
8470 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8471 fields.
8472 (line_header): Initialize all data fields. Change type of
8473 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8474 Change type of include_dirs to std::vector<const char *>. Remove
8475 num_include_dirs, include_dirs_size. Change type of file_names to
8476 std::vector<file_entry>. Remove num_file_names, file_names_size.
8477 (line_header::line_header): New.
8478 (line_header::add_include_dir, line_header::add_file_name): New
8479 methods.
8480 (line_header::include_dir_at): Remove NULL check.
8481 (line_header::file_name_at): Add const overload.
8482 (line_header_up): New unique_ptr typedef.
8483 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8484 std::vector. Remove free_line_header call.
8485 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8486 free_line_header call.
8487 (free_cu_line_header): Delete.
8488 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8489 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8490 Adjust to use std::vector.
8491 (free_line_header): Delete.
8492 (free_line_header_voidp): Use delete.
8493 (add_include_dir): Replace with ...
8494 (line_header::add_include_dir): ... this method. Use std::vector.
8495 (add_file_name): Replace with ...
8496 (line_header::add_file_name): ... this method. Use std::vector.
8497 (add_include_dir_stub): Delete.
8498 (read_formatted_entries): Remove memset.
8499 (dwarf_decode_line_header): Return a line_header_up instead of a
8500 raw pointer. Remove cleanup handling. Pass lambdas to
8501 read_formatted_entries. Adjust to use line_header methods.
8502 (dwarf_decode_lines_1): Adjust to use line_header methods.
8503 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8504 use std::vector.
8505
8506 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8507
8508 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8509 instead of struct ptid.
8510
8511 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8512
8513 * frame.c (get_frame_register_bytes): Unwind using value.
8514 (put_frame_register_bytes): Likewise.
8515
8516 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8517
8518 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8519 aggregate-like.
8520
8521 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8522
8523 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8524
8525 2017-03-29 Yao Qi <yao.qi@linaro.org>
8526
8527 * gdbthread.h (struct thread_info): Declare constructor and
8528 destructor. Add some in-class member initializers.
8529 * thread.c (free_thread): Remove.
8530 (init_thread_list): Call delete instead of free_thread.
8531 (new_thread): Call thread_info constructor.
8532 (thread_info::thread_info): New function.
8533 (thread_info::~thread_info): New function.
8534 (delete_thread_1): Call delete instead of free_thread.
8535 (make_cleanup_restore_current_thread): Move tp and frame to
8536 inner block.
8537
8538 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8539
8540 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8541 (arc_skip_prologue): Likewise.
8542 (arc_make_frame_cache): Likewise.
8543 (arc_pv_get_operand): New function.
8544 (arc_is_in_prologue): Likewise.
8545 (arc_analyze_prologue): Likewise.
8546 (arc_print_frame_cache): Likewise.
8547 (MAX_PROLOGUE_LENGTH): New constant.
8548
8549 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8550
8551 * configure.tgt: Add arc-insn.o.
8552 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8553 (dump_arc_instruction_command): New function.
8554 (arc_fprintf_disasm): Likewise.
8555 (arc_disassemble_info): Likewise.
8556 (arc_insn_get_operand_value): Likewise.
8557 (arc_insn_get_operand_value_signed): Likewise.
8558 (arc_insn_get_memory_base_reg): Likewise.
8559 (arc_insn_get_memory_offset): Likewise.
8560 (arc_insn_get_branch_target): Likewise.
8561 (arc_insn_dump): Likewise.
8562 (arc_insn_get_linear_next_pc): Likewise.
8563 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8564 (arc_disassemble_info): Likewise.
8565 (arc_insn_get_branch_target): Likewise.
8566 (arc_insn_get_linear_next_pc): Likewise.
8567 * NEWS: Mention new "maint print arc arc-instruction".
8568
8569 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8570
8571 * arc-tdep (maintenance_print_arc_list): New variable.
8572 (maintenance_print_arc_command): New function.
8573
8574 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8575
8576 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8577 Add "limm" and "reserved".
8578 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8579 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8580 * arc-tdep.h (arc_regnum): Likewise.
8581
8582 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8583
8584 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8585 for THREADPTR register.
8586 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8587 register.
8588 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8589 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8590 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8591
8592 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8593
8594 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8595 registers above gdbarch_num_regs (gdbarch) as privileged in
8596 call0 ABI.
8597
8598 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8599
8600 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8601 for a single specified register or for all registers in
8602 a0_base..a0_base + C0_NREGS range.
8603 (supply_gregset_reg): Call regcache_raw_supply for a single
8604 specified register or for all registers in a0_base..a0_base +
8605 C0_NREGS range.
8606
8607 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8608
8609 * arch/xtensa.h (C0_NREGS): Add definition.
8610 * xtensa-tdep.c (C0_NREGS): Remove definition.
8611
8612 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8613
8614 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8615 Drop xtensa_default_isa initialization.
8616 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8617
8618 2017-03-27 Pedro Alves <palves@redhat.com>
8619
8620 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8621 (file_entry::include_dir): New method.
8622 (line_header::include_dir_at, line_header::file_name_at): New
8623 methods.
8624 (setup_type_unit_groups, setup_type_unit_groups)
8625 (psymtab_include_file_name): Simplify using the new methods.
8626 (lnp_state_machine) <the_line_header>: New field.
8627 <file>: Add comment.
8628 (lnp_state_machine::current_file): New method.
8629 (dwarf_record_line): Simplify using the new methods.
8630 (init_lnp_state_machine): Initialize the "the_line_header" field.
8631 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8632 Simplify using the new methods.
8633
8634 2017-03-27 Pedro Alves <palves@redhat.com>
8635
8636 * cp-name-parser.y (make_empty): Delete.
8637 (demangler_special, nested_name, ptr_operator, array_indicator)
8638 (direct_declarator, declarator_1): Use fill_comp instead of
8639 make_empty.
8640
8641 2017-03-27 Pedro Alves <palves@redhat.com>
8642
8643 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8644 to ATTRIBUTE_PRINTF.
8645 * solib-target.c (library_list_start_list): Print "string" not
8646 "version".
8647 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8648 gdb_xml_error call.
8649
8650 2017-03-27 Pedro Alves <palves@redhat.com>
8651
8652 * dwarf2read.c (struct file_and_directory): New.
8653 (dwarf2_get_dwz_file): Adjust to use std::string.
8654 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8655 (find_file_and_directory): Adjust to return a file_and_directory
8656 object.
8657 (read_file_scope): Adjust to use file_and_directory. Remove
8658 make_cleanup/do_cleanups calls.
8659 (open_and_init_dwp_file): Adjust to use std::string. Remove
8660 make_cleanup/do_cleanups calls.
8661 * python/python.c (do_start_initialization): Adjust to ldirname
8662 returning a std::string.
8663 * utils.c (ldirname): Now returns a std::string.
8664 * utils.h (ldirname): Change return type to std::string.
8665 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8666 returning a std::string.
8667 * xml-tdesc.c (file_read_description_xml): Likewise.
8668
8669 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8670
8671 * regcache.c (regcache_debug_print_register): New function.
8672 * regcache.h (regcache_debug_print_register): New declaration.
8673 * target.c (debug_print_register): Remove.
8674 (target_fetch_registers): Call regcache_debug_print_register.
8675 (target_store_registers): Likewise.
8676
8677 2017-03-24 Pádraig Brady <pbrady@fb.com>
8678
8679 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8680 reference beyond the 'lh->include_dirs' array before accessing to
8681 it.
8682 (psymtab_include_file_name): Likewise.
8683 (dwarf_decode_lines_1): Likewise.
8684 (dwarf_decode_lines): Likewise.
8685 (file_file_name): Likewise.
8686
8687 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8688
8689 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8690 inferior_ptid.
8691 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8692 ps_lsetfpregs): Likewise.
8693 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8694 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8695 ps_lsetfpregs): Likewise.
8696 * target.c (target_fetch_registers, target_store_registers):
8697 Remove asserts.
8698
8699 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8700
8701 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8702
8703 2017-03-23 Yao Qi <yao.qi@linaro.org>
8704
8705 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8706 (_initialize_aarch64_tdep): Register it.
8707 (aarch64_record_load_store): Handle PRFM instruction.
8708 (aarch64_process_record_test): New function.
8709
8710 2017-03-23 Yao Qi <yao.qi@linaro.org>
8711
8712 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8713 indentation.
8714
8715 2017-03-23 Yao Qi <yao.qi@linaro.org>
8716
8717 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8718
8719 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8720
8721 python/python.c (do_start_initialization): Fix memory leak.
8722
8723 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8724
8725 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8726 using get_ptrace_pid.
8727 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8728 inferior_ptid.
8729 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8730 inferior_ptid instead of pid.
8731
8732 2017-03-22 Yao Qi <yao.qi@linaro.org>
8733
8734 * aarch64-tdep.c: Wrap locally used classes in anonymous
8735 namespace.
8736 * arm-tdep.c: Likewise.
8737 * linespec.c: Likewise.
8738 * ui-out.c: Likewise.
8739
8740 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8741
8742 PR gdb/19637
8743 * python/lib/gdb/printer/bound_registers.py: Import sys.
8744
8745 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8746
8747 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8748 windows_thread_info parameter and use it instead of
8749 current_thread.
8750 (windows_fetch_inferior_registers): Don't set current_thread,
8751 pass the thread to do_windows_fetch_inferior_registers. Use
8752 ptid from regcache instead of inferior_ptid.
8753 (do_windows_store_inferior_registers): Add windows_thread_info
8754 parameter and use it instead of current_thread.
8755 (windows_store_inferior_registers): Don't set current_thread,
8756 pass the thread to do_windows_store_inferior_registers. Use
8757 ptid from regcache instead of inferior_ptid.
8758
8759 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8760
8761 * ser-mingw.c (ser_windows_raw): Remove reference to
8762 struct serial::current_timeout.
8763
8764 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8765
8766 PR tdep/20928
8767 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8768 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8769 (sparc64_fsr_type): Fix %fsr decoding.
8770
8771 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8772
8773 * python/py-record-btrace.c (btpy_insn_data): Change return type
8774 for Python 2.
8775
8776 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8777
8778 * spu-linux-nat.c (spu_fetch_inferior_registers,
8779 spu_store_inferior_registers): Use ptid from regcache, set and
8780 restore inferior_ptid.
8781 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8782 Likewise.
8783
8784 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8785
8786 * i386-linux-nat.c (fetch_register, store_register,
8787 i386_linux_fetch_inferior_registers,
8788 i386_linux_store_inferior_registers): Use ptid from regcache.
8789 * ia64-linux-nat.c (ia64_linux_fetch_register,
8790 ia64_linux_store_register): Likewise.
8791 * inf-ptrace.c (inf_ptrace_fetch_register,
8792 inf_ptrace_store_register): Likewise.
8793 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8794 m32r_linux_store_inferior_registers): Likewise.
8795 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8796 m68kbsd_store_inferior_registers): Likewise.
8797 * m68k-linux-nat.c (fetch_register, store_register,
8798 m68k_linux_fetch_inferior_registers,
8799 m68k_linux_store_inferior_registers): Likewise.
8800 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8801 m88kbsd_store_inferior_registers): Likewise.
8802 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8803 mips_fbsd_store_inferior_registers): Likewise.
8804 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8805 mips64_linux_regsets_store_registers): Likewise.
8806 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8807 mipsnbsd_store_inferior_registers): Likewise.
8808 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8809 mips64obsd_store_inferior_registers): Likewise.
8810 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8811 Likewise.
8812 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8813 ppcfbsd_store_inferior_registers): Likewise.
8814 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8815 ppc_linux_store_inferior_registers): Likewise.
8816 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8817 ppcnbsd_store_inferior_registers): Likewise.
8818 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8819 ppcobsd_store_registers): Likewise.
8820 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8821 Likewise.
8822 * ravenscar-thread.c (ravenscar_fetch_registers,
8823 ravenscar_store_registers, ravenscar_prepare_to_store):
8824 Likewise.
8825 * record-btrace.c (record_btrace_fetch_registers,
8826 record_btrace_store_registers, record_btrace_prepare_to_store):
8827 Likewise.
8828 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8829 Lookup inferior using ptid from regcache, instead of
8830 current_inferior.
8831 * remote.c (remote_fetch_registers, remote_store_registers): Use
8832 ptid from regcache.
8833 * rs6000-nat.c (fetch_register, store_register): Likewise.
8834 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8835 s390_linux_store_inferior_registers): Likewise.
8836 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8837 shnbsd_store_inferior_registers): Likewise.
8838 * sol-thread.c (sol_thread_fetch_registers,
8839 sol_thread_store_registers): Likewise.
8840 * sparc-nat.c (sparc_fetch_inferior_registers,
8841 sparc_store_inferior_registers): Likewise.
8842 * tilegx-linux-nat.c (fetch_inferior_registers,
8843 store_inferior_registers): Likewise.
8844 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8845 vaxbsd_store_inferior_registers): Likewise.
8846 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8847 store_xtregs): Likewise.
8848
8849 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8850
8851 PR gdb/14441
8852 * NEWS: Mention support for rvalue references in GDB and python.
8853 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8854 supports both lvalue and rvalue references.
8855
8856 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8857
8858 PR gdb/14441
8859 * gdbtypes.c (rank_one_type): Implement overloading
8860 resolution rules regarding rvalue references.
8861
8862 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8863
8864 PR gdb/14441
8865 * aarch64-tdep.c (aarch64_type_align)
8866 (aarch64_extract_return_value, aarch64_store_return_value): Change
8867 lvalue reference type checks to general reference type checks.
8868 * amd64-tdep.c (amd64_classify): Likewise.
8869 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8870 Likewise.
8871 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8872 (arm_store_return_value): Likewise.
8873 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8874 * c-typeprint.c (c_print_type): Likewise.
8875 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8876 (cplus_number_of_children, cplus_describe_child): Likewise.
8877 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8878 * completer.c (expression_completer): Likewise.
8879 * cp-support.c (make_symbol_overload_list_adl_namespace):
8880 Likewise.
8881 * darwin-nat-info.c (info_mach_region_command): Likewise.
8882 * dwarf2loc.c (entry_data_value_coerce_ref)
8883 (value_of_dwarf_reg_entry): Likewise.
8884 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8885 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8886 Likewise.
8887 * findvar.c (extract_typed_address, store_typed_address):
8888 Likewise.
8889 * gdbtypes.c (rank_one_type): Likewise.
8890 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8891 * infcall.c (value_arg_coerce): Likewise.
8892 * language.c (pointer_type): Likewise.
8893 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8894 Likewise.
8895 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8896 * mn10300-tdep.c (mn10300_type_align): Likewise.
8897 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8898 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8899 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8900 Likewise.
8901 * printcmd.c (print_formatted, x_command): Likewise.
8902 * python/py-type.c (typy_get_composite, typy_template_argument):
8903 Likewise.
8904 * python/py-value.c (valpy_referenced_value)
8905 (valpy_get_dynamic_type, value_has_field): Likewise.
8906 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8907 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8908 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8909 * spu-tdep.c (spu_scalar_value_p): Likewise.
8910 * symtab.c (lookup_symbol_aux): Likewise.
8911 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8912 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8913 Likewise.
8914 * valops.c (value_cast_pointers, value_cast)
8915 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8916 (value_struct_elt, value_struct_elt_bitpos)
8917 (value_find_oload_method_list, find_overload_match)
8918 (value_rtti_indirect_type): Likewise.
8919 * valprint.c (val_print_scalar_type_p, generic_val_print):
8920 Likewise.
8921 * value.c (value_actual_type, value_as_address, unpack_long)
8922 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8923 (coerce_ref): Likewise.
8924 * varobj.c (varobj_get_value_type): Likewise.
8925
8926 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8927
8928 PR gdb/14441
8929 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8930 table of constants.
8931 * python/lib/gdb/command/explore.py: Support exploring values
8932 of rvalue reference types.
8933 * python/lib/gdb/types.py: Implement get_basic_type() for
8934 rvalue reference types.
8935 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8936 constant.
8937 * python/py-value.c (valpy_getitem): Add an rvalue reference
8938 check.
8939 (valpy_reference_value): Add new parameter "refcode".
8940 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8941 New wrappers for valpy_reference_value().
8942 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8943 (gdbpy_invoke_xmethod): Likewise.
8944
8945 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8946
8947 PR gdb/14441
8948 * dwarf2read.c (process_die, read_type_die_1): Handle the
8949 DW_TAG_rvalue_reference_type DIE.
8950 (read_tag_reference_type): Add new parameter "refcode".
8951
8952 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8953
8954 PR gdb/14441
8955 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8956 (c_type_print_modifier, c_type_print_varspec_suffix)
8957 (c_type_print_base): Support printing rvalue reference types.
8958 * c-valprint.c (c_val_print, c_value_print): Support printing
8959 rvalue reference values.
8960
8961 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8962
8963 PR gdb/14441
8964 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8965 typename.
8966 * cp-support.c (replace_typedefs): Handle
8967 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8968 * python/py-type.c (typy_lookup_type): Likewise.
8969
8970 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8971
8972 PR gdb/14441
8973 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8974 * parse.c (insert_type): Change assert statement.
8975 (follow_types): Handle rvalue reference types.
8976 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8977 constant.
8978
8979 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8980
8981 PR gdb/14441
8982 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8983 value_ref() interface.
8984 * c-valprint.c (c_value_print): Likewise.
8985 * infcall.c (value_arg_coerce): Likewise.
8986 * python/py-value.c (valpy_reference_value): Likewise.
8987 * valops.c (value_cast, value_reinterpret_cast)
8988 (value_dynamic_cast, typecmp): Likewise.
8989 (value_ref): Parameterize by kind of return value reference type.
8990 * value.h (value_ref): Add new parameter "refcode".
8991
8992 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8993
8994 PR gdb/14441
8995 * dwarf2read.c (read_tag_reference_type): Use
8996 lookup_lvalue_reference_type() instead of lookup_reference_type().
8997 * eval.c (evaluate_subexp_standard): Likewise.
8998 * f-exp.y: Likewise.
8999 * gdbtypes.c (make_reference_type, lookup_reference_type):
9000 Generalize with rvalue reference types.
9001 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9002 convenience wrappers for lookup_reference_type().
9003 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9004 reference kind parameter.
9005 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9006 wrappers for lookup_reference_type().
9007 * guile/scm-type.c (gdbscm_type_reference): Use
9008 lookup_lvalue_reference_type() instead of lookup_reference_type().
9009 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9010 * parse.c (follow_types): Likewise.
9011 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9012 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9013 Likewise.
9014 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9015 (gdbpy_invoke_xmethod): Likewise.
9016 * stabsread.c: Provide extra argument to make_reference_type()
9017 call.
9018 * valops.c (value_ref, value_rtti_indirect_type): Use
9019 lookup_lvalue_reference_type() instead of lookup_reference_type().
9020
9021 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9022
9023 PR gdb/14441
9024 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9025 (TYPE_IS_REFERENCE): New macro.
9026 (struct type): Add rvalue_reference_type field.
9027 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9028
9029 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9030
9031 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9032 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9033 New function definition.
9034 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9035 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9036 New function declaration.
9037 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9038 * mi/mi-interp.h: New file.
9039 * solib.c (info_sharedlibrary_command): Replace for loop with
9040 ALL_SO_LIBS macro
9041 * solib.h (update_solib_list): New function declaration.
9042 (so_list_head): Move macro.
9043 * solist.h (ALL_SO_LIBS): New macro.
9044
9045 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9046
9047 * infcmd.c (post_create_inferior): Remove unused argument in
9048 call to solib_add.
9049 * remote.c (remote_start_remote): Likewise.
9050 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9051 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9052 (enable_break): Likewise.
9053 * solib.c (update_solib_list): Remove unused target argument
9054 and its documentation.
9055 (solib_add): Remove unused target argument. Remove unused
9056 argument in call to update_solib_list.
9057 (info_sharedlibrary_command): Remove unused argument in call
9058 to update_solib_list.
9059 (sharedlibrary_command): Remove unused argument in call to
9060 solib_add.
9061 (handle_solib_event): Likewise.
9062 (reload_shared_libraries): Likewise.
9063 * solib.h (solib_add): Remove unused target argument.
9064
9065 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9066
9067 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9068 (s390_displaced_step_fixup): Cover relative branches with the
9069 default fixup handling. This fixes lack of support for some
9070 relative branch instructions.
9071
9072 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9073
9074 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9075 ptid from regcache.
9076
9077 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9078
9079 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9080 i386_darwin_store_inferior_registers): Use ptid from regcache.
9081
9082 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9083
9084 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9085 i386bsd_store_inferior_registers): Use ptid from regcache.
9086
9087 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9088
9089 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9090 hppaobsd_store_registers): Use ptid from regcache.
9091
9092 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9093
9094 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9095 hppanbsd_store_registers): Use ptid from regcache.
9096
9097 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9098
9099 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9100 from regcache. Use get_ptrace_pid.
9101
9102 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9103
9104 * corelow.c (get_core_register_section): Use ptid from regcache,
9105 update doc.
9106
9107 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9108
9109 * bsd-uthread.c (bsd_uthread_fetch_registers,
9110 bsd_uthread_store_registers): Use ptid from regcache, set and
9111 restore inferior_ptid.
9112
9113 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9114
9115 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9116 fetch_fp_regs, store_register, store_regs, store_fp_register,
9117 store_fp_regs): Use ptid from regcache.
9118
9119 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9120
9121 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9122 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9123 store_vfp_regs): Use ptid from regcache.
9124
9125 2017-03-17 Pedro Alves <palves@redhat.com>
9126
9127 PR remote/21188
9128 * ser-base.c (ser_base_wait_for): Add comment.
9129 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9130 version.
9131 * ser-unix.c (hardwire_raw): Remove reference to
9132 scb->current_timeout.
9133 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9134 (hardwire_ops): Install ser_base_readchar instead of
9135 hardwire_readchar.
9136 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9137 Remove fields.
9138
9139 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9140
9141 PR gdb/19637
9142 * python/lib/gdb/printer/bound_registers.py: Add support for
9143 Python 3.
9144
9145 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9146
9147 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9148 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9149 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9150 byte_offset to subobj_byte_offset. Fix the handling of
9151 DWARF_VALUE_STACK on big-endian targets when coming via an
9152 implicit pointer.
9153 (dwarf2_evaluate_loc_desc): Adjust call to
9154 dwarf2_evaluate_loc_desc_full.
9155 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9156 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9157
9158 2017-03-16 Yao Qi <yao.qi@linaro.org>
9159
9160 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9161 and REVSH instructions.
9162
9163 2017-03-16 Yao Qi <yao.qi@linaro.org>
9164
9165 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9166 (arm_record_test): Declare.
9167 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9168 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9169 align with the manual.
9170 (thumb_record_misc): Adjust the code order to align with the
9171 manual.
9172 (thumb2_record_decode_insn_handler): Fix instruction matching.
9173 (instruction_reader_thumb): New class.
9174 (arm_record_test): New function.
9175
9176 2017-03-16 Yao Qi <yao.qi@linaro.org>
9177
9178 * arm-tdep.c (abstract_memory_reader): New class.
9179 (instruction_reader): New class.
9180 (extract_arm_insn): Add argument 'reader'. Callers updated.
9181 (decode_insn): Likewise.
9182
9183 2017-03-16 Doug Evans <dje@google.com>
9184
9185 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9186 member. Change type of TYPE member to SCM. All uses updated.
9187 (lsscm_make_lazy_string_smob): Add assert.
9188 (lsscm_make_lazy_string): Flag bad length values.
9189 (lsscm_elt_type): New function.
9190 (gdbscm_lazy_string_to_value): Rewrite to use
9191 lsscm_safe_lazy_string_to_value.
9192 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9193 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9194 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9195 in incoming type.
9196 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9197 * guile/scm-type.c (tyscm_scm_to_type): New function.
9198
9199 2017-03-15 Doug Evans <dje@google.com>
9200
9201 PR python/17728, python/18439, python/18779
9202 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9203 member. Change type of TYPE member to PyObject *. All uses updated.
9204 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9205 (gdbpy_create_lazy_string_object): Flag bad length values.
9206 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9207 Handle typedefs in incoming type.
9208 (stpy_lazy_string_elt_type): New function.
9209 (gdbpy_extract_lazy_string): Call it.
9210 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9211 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9212 typedefs in incoming type.
9213
9214 2017-03-16 Doug Evans <dje@google.com>
9215
9216 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9217 * guile/scm-type.c (tyscm_scm_to_type): New function.
9218
9219 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9220
9221 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9222 "ULONGEST" for "skip".
9223
9224 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9225
9226 PR gdb/21220
9227 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9228 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9229 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9230 over ptrace peek/poke until end of buffer or error.
9231
9232 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9233
9234 * parse.c (length_of_subexp): Make static.
9235 * parser-defs.h (length_of_subexp): Remove.
9236
9237 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9238
9239 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9240 as well.
9241
9242 2017-03-14 Pedro Alves <palves@redhat.com>
9243
9244 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9245 (main): Use std::unique_ptr. Remove calls to
9246 cp_demangled_name_parse_free.
9247
9248 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9249
9250 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9251 alphabsd_store_inferior_registers): Use regcache->ptid instead
9252 of inferior_ptid.
9253
9254 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9255
9256 * aix-thread.c (aix_thread_fetch_registers,
9257 aix_thread_store_registers): Use regcache->ptid instead of
9258 inferior_ptid.
9259
9260 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9261
9262 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9263 store_gregs_to_thread, fetch_fpregs_from_thread,
9264 store_fpregs_to_thread): Use regcache->ptid instead of
9265 inferior_ptid.
9266
9267 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9268
9269 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9270 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9271 instead of inferior_ptid.
9272
9273 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9274
9275 * target.c (target_fetch_registers, target_store_registers): Add
9276 assert.
9277
9278 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9279
9280 * regcache.h (regcache_get_ptid): New function.
9281 * regcache.c (regcache_get_ptid): New function.
9282
9283 2017-03-13 Mark Wielaard <mark@klomp.org>
9284
9285 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9286
9287 2017-03-10 Keith Seitz <keiths@redhat.com>
9288
9289 PR c++/8218
9290 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9291
9292 2017-03-08 Pedro Alves <palves@redhat.com>
9293
9294 PR gdb/18360
9295 * infrun.c (start_step_over, do_target_resume, resume)
9296 (restart_threads): Assert we're not resuming a thread that is
9297 meant to be stopped.
9298 (infrun_thread_stop_requested_callback): Delete.
9299 (infrun_thread_stop_requested): If the thread is internally
9300 stopped, queue a pending stop event and clear the thread's
9301 inline-frame state.
9302 (handle_stop_requested): New function.
9303 (handle_syscall_event, handle_inferior_event_1): Use
9304 handle_stop_requested.
9305 (handle_stop_requested): New function.
9306 (handle_signal_stop): Set the thread's stop_signal here instead of
9307 at caller.
9308 (finish_step_over): Clear step over info unconditionally.
9309 (handle_signal_stop): If the user had interrupted the event
9310 thread, consider the stop a random signal.
9311 (handle_signal_stop) <signal arrived while stepping over
9312 breakpoint>: Don't restart threads here.
9313 (stop_waiting): Don't clear step-over info here.
9314
9315 2017-03-08 Pedro Alves <palves@redhat.com>
9316
9317 PR 21206
9318 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9319 goes to argument 2, not 1.
9320
9321 2017-03-08 Pedro Alves <palves@redhat.com>
9322
9323 PR cli/21218
9324 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9325 display_gdb_prompt.
9326 (command_line_input): Add comment.
9327
9328 2017-03-08 Pedro Alves <palves@redhat.com>
9329
9330 PR tui/21216
9331 * tui/tui-file.c (tui_file::write): New.
9332 * tui/tui-file.h (tui_file): Override "write".
9333 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9334 factored out from ...
9335 (tui_puts): ... here.
9336 (tui_putc): Use them.
9337 (tui_write): New function.
9338 * tui/tui-io.h (tui_write): Declare.
9339
9340 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9341
9342 * Makefile.in (SFILES): Replace "environ.c" with
9343 "common/environ.c".
9344 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9345 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9346 to...
9347 * common/environ.c: ... here.
9348 * environ.h: Moved to...
9349 * common/environ.h: ... here.
9350
9351 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9352
9353 * gdbarch.sh (pstring_ptr): New static function.
9354 (gdbarch_disassembler_options): Use it.
9355 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9356 not valid_disassembler_option->name.
9357 * gdbarch.c: Regenerate.
9358
9359 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9360
9361 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9362
9363 2017-03-07 Pedro Alves <palves@redhat.com>
9364
9365 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9366
9367 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9368
9369 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9370 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9371 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9372 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9373
9374 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9375
9376 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9377
9378 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9379
9380 * remote.c (remote_add_target_side_commands): Use range-based
9381 for loop.
9382
9383 2017-03-03 Yao Qi <yao.qi@linaro.org>
9384
9385 PR gdb/21165
9386 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9387 value is lazy.
9388 * valprint.c (common_val_print): Likewise.
9389
9390 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9391
9392 * NEWS: Mention new set/show disassembler-options commands.
9393 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9394 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9395 (prospective_options): New static variable.
9396 (gdb_disassembler::gdb_disassembler): Initialize
9397 m_di.disassembler_options.
9398 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9399 (get_disassembler_options): New function.
9400 (set_disassembler_options): Likewise.
9401 (set_disassembler_options_sfunc): Likewise.
9402 (show_disassembler_options_sfunc): Likewise.
9403 (disassembler_options_completer): Likewise.
9404 (_initialize_disasm): Likewise.
9405 * disasm.h (get_disassembler_options): New prototype.
9406 (set_disassembler_options): Likewise.
9407 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9408 (gdbarch_verify_disassembler_options): Likewise.
9409 * gdbarch.c: Regenerate.
9410 * gdbarch.h: Likewise.
9411 * arm-tdep.c (num_disassembly_options): Delete.
9412 (set_disassembly_style): Likewise.
9413 (arm_disassembler_options): New static variable.
9414 (set_disassembly_style_sfunc): Convert short style name into long
9415 option name. Call set_disassembler_options.
9416 (show_disassembly_style_sfunc): New function.
9417 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9418 set_gdbarch_verify_disassembler_options.
9419 (_initialize_arm_tdep): Delete regnames variable and update callers.
9420 (arm_disassembler_options): Initialize.
9421 (disasm_options): New variable.
9422 (num_disassembly_options): Rename from this...
9423 (num_disassembly_styles): ...to this. Compute by scanning through
9424 disasm_options.
9425 (valid_disassembly_styles): Initialize using disasm_options.
9426 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9427 set_arm_regname_option.
9428 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9429 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9430 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9431 set_gdbarch_verify_disassembler_options.
9432 * s390-tdep.c (s390_disassembler_options): New static variable.
9433 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9434 set_gdbarch_verify_disassembler_options.
9435
9436 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9437
9438 * remote.c (remote_add_target_side_condition): Remove "struct"
9439 keyword from range-based for loop.
9440
9441 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9442
9443 * remote.c (remote_add_target_side_condition): Use range-based
9444 for loop. Update comment.
9445
9446 2017-02-27 Yao Qi <yao.qi@linaro.org>
9447
9448 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9449
9450 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9451
9452 * regcache.c (regcache_raw_update): New function.
9453 (regcache_raw_read): Move code to regcache_raw_update.
9454 * regcache.h (regcache_raw_update): New declaration.
9455 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9456
9457 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9458
9459 * dwarf2read.c (create_debug_type_hash_table): Initialize
9460 header.signature and header.type_offset_in_tu.
9461
9462 2017-02-24 Pedro Alves <palves@redhat.com>
9463
9464 * symtab.c (make_file_symbol_completion_list_1): Use
9465 add_symtab_completions.
9466
9467 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9468
9469 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9470
9471 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9472
9473 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9474 I386_MAX_REGISTER_SIZE.
9475 (i386_pseudo_register_write): Likewise.
9476 (i386_process_record): Likewise.
9477 * i387-tdep.c (i387_supply_xsave): Likewise.
9478 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9479 (store_register): Likewise.
9480
9481 2017-02-23 Pedro Alves <palves@redhat.com>
9482
9483 * ada-lang.c: Include "common/function-view.h".
9484 (ada_iterate_over_symbols): Adjust to use function_view as
9485 callback type.
9486 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9487 (ada_make_symbol_completion_list): Use a lambda.
9488 (ada_exc_search_name_matches): Delete.
9489 (name_matches_regex): New.
9490 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9491 * compile/compile-c-support.c: Include "common/function-view.h".
9492 (print_one_macro): Change prototype to accept a ui_file pointer.
9493 (write_macro_definitions): Use a lambda.
9494 * dwarf2read.c: Include "common/function-view.h".
9495 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9496 (dw2_expand_symtabs_matching): Adjust to use function_view as
9497 callback type.
9498 * language.h: Include "common/function-view.h".
9499 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9500 function_view as callback type.
9501 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9502 * linespec.c: Include "common/function-view.h".
9503 (collect_info::add_symbol): New method.
9504 (struct symbol_and_data_callback, iterate_inline_only, struct
9505 symbol_matcher_data, iterate_name_matcher): Delete.
9506 (iterate_over_all_matching_symtabs): Adjust to use function_view
9507 as callback type and lambdas.
9508 (iterate_over_file_blocks): Adjust to use function_view as
9509 callback type.
9510 (decode_compound_collector): Now a class with private fields.
9511 (decode_compound_collector::release_symbols): New method.
9512 (collect_one_symbol): Rename to...
9513 (decode_compound_collector::operator()): ... this and adjust.
9514 (lookup_prefix_sym): decode_compound_collector construction bits
9515 move to decode_compound_collector ctor. Pass the
9516 decode_compound_collector object directly as callback. Remove
9517 cleanups and use decode_compound_collector::release_symbols
9518 instead.
9519 (symtab_collector): Now a class with private fields.
9520 (symtab_collector::release_symtabs): New method.
9521 (add_symtabs_to_list): Rename to...
9522 (symtab_collector::operator()): ... this and adjust.
9523 (collect_symtabs_from_filename): symtab_collector construction
9524 bits move to symtab_collector ctor. Pass the symtab_collector
9525 object directly as callback. Remove cleanups and use
9526 symtab_collector::release_symtabs instead.
9527 (collect_symbols): Delete.
9528 (add_matching_symbols_to_info): Use lambdas.
9529 * macrocmd.c (print_macro_callback): Delete.
9530 (info_macro_command): Use a lambda.
9531 (info_macros_command): Pass print_macro_definition as callable
9532 directly.
9533 (print_one_macro): Remove 'ignore' parameter.
9534 (macro_list_command): Adjust.
9535 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9536 (macro_for_each_data::user_data): Delete field.
9537 (foreach_macro): Adjust to call the function_view.
9538 (macro_for_each): Adjust to use function_view as callback type.
9539 (foreach_macro_in_scope): Adjust to call the function_view.
9540 (macro_for_each_in_scope): Adjust to use function_view as callback
9541 type.
9542 * macrotab.h: Include "common/function-view.h".
9543 (macro_callback_fn): Declare a prototype instead of a pointer.
9544 Remove "user_data" parameter.
9545 (macro_for_each, macro_for_each_in_scope): Adjust to use
9546 function_view as callback type.
9547 * psymtab.c (partial_map_expand_apply)
9548 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9549 Adjust to use function_view as callback type and to return bool.
9550 (psym_expand_symtabs_matching): Adjust to use function_view as
9551 callback types.
9552 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9553 to use function_view as callback type and to return bool.
9554 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9555 callback types.
9556 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9557 as callback types.
9558 * symfile.h: Include "common/function-view.h".
9559 (expand_symtabs_file_matcher_ftype)
9560 (expand_symtabs_symbol_matcher_ftype)
9561 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9562 return bool.
9563 (quick_symbol_functions::map_symtabs_matching_filename)
9564 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9565 function_view as callback type and return bool.
9566 (expand_symtabs_matching): Adjust to use function_view as callback
9567 type.
9568 (maintenance_expand_name_matcher)
9569 (maintenance_expand_file_matcher): Delete.
9570 (maintenance_expand_symtabs): Use lambdas.
9571 * symtab.c (iterate_over_some_symtabs): Adjust to use
9572 function_view as callback types and return bool.
9573 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9574 of a cleanup.
9575 (lookup_symtab_callback): Delete.
9576 (lookup_symtab): Use a lambda.
9577 (iterate_over_symbols): Adjust to use function_view as callback
9578 type.
9579 (struct search_symbols_data, search_symbols_file_matches)
9580 (search_symbols_name_matches): Delete.
9581 (search_symbols): Use a pair of lambdas.
9582 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9583 (symtab_expansion_callback): Delete.
9584 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9585 * symtab.h: Include "common/function-view.h".
9586 (iterate_over_some_symtabs): Adjust to use function_view as
9587 callback type and return bool.
9588 (iterate_over_symtabs): Adjust to use function_view as callback
9589 type.
9590 (symbol_found_callback_ftype): Remove 'data' parameter and return
9591 bool.
9592 (iterate_over_symbols): Adjust to use function_view as callback
9593 type.
9594
9595 2017-02-23 Pedro Alves <palves@redhat.com>
9596
9597 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9598 (%.o) <unittests/%.c>: New pattern.
9599 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9600 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9601 * common/function-view.h: New file.
9602 * unittests/function-view-selftests.c: New file.
9603 * configure: Regenerate.
9604
9605 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9606
9607 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9608 inferior_ptid.
9609 * go32-nat.c (go32_thread_alive): Likewise.
9610
9611 2017-02-23 Yao Qi <yao.qi@linaro.org>
9612
9613 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9614 delete.
9615
9616 2017-02-23 Yao Qi <yao.qi@linaro.org>
9617
9618 * varobj.c (varobj_clear_saved_item): Use delete instead of
9619 xfree.
9620 (update_dynamic_varobj_children): Likewise.
9621
9622 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9623
9624 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9625
9626 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9627
9628 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9629 m_enum_value to 0 in default constructor.
9630
9631 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9632
9633 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9634 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9635 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9636 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9637 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9638 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9639 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9640 IS_STORE_CONDITIONAL_INSN.
9641
9642 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9643
9644 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9645
9646 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9647
9648 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9649
9650 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9651
9652 * dwarf2read.c (skip_one_die, read_attribute_value)
9653 (dwarf2_const_value_attr, dump_die_shallow)
9654 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9655 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9656
9657 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9658
9659 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9660 (dwarf_parse_macro_header): Accept DWARF version 5.
9661 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9662
9663 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9664
9665 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9666 DW_AT_GNU_*.
9667 * common/common-exceptions.h (enum errors): Likewise.
9668 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9669 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9670 (dwarf_expr_context::execute_stack_op): Likewise.
9671 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9672 Likewise.
9673 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9674 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9675 (show_entry_values_debug, call_site_to_target_addr)
9676 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9677 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9678 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9679 (value_of_dwarf_block_entry, indirect_pieced_value)
9680 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9681 (disassemble_dwarf_expression): Likewise.
9682 * dwarf2read.c (process_die, inherit_abstract_dies)
9683 (read_call_site_scope): Likewise.
9684 * gdbtypes.h (struct func_type, struct call_site_parameter)
9685 (struct call_site): Likewise.
9686 * stack.c (read_frame_arg): Likewise.
9687 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9688
9689 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9690
9691 * defs.h (read_unsigned_leb128): New declaration.
9692 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9693 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9694 (dwarf2_find_location_expression): Call also
9695 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9696 * dwarf2loc.h (dwarf2_version): New declaration.
9697 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9698 rnglists.
9699 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9700 .debug_rnglists.
9701 (struct dwop_section_names): Add loclists_dwo.
9702 (dwop_section_names): Add .debug_loclists.dwo.
9703 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9704 (struct dwarf2_per_cu_data): Add dwarf_version.
9705 (struct dwo_sections): Add loclists.
9706 (struct attr_abbrev): Add implicit_const.
9707 (read_indirect_line_string): New declaration.
9708 (read_unsigned_leb128): Delete declaration.
9709 (rcuh_kind): New definition.
9710 (read_and_check_comp_unit_head): Change parameter
9711 is_debug_types_section to section_kind.
9712 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9713 (read_comp_unit_head): Change parameter abfd to section, add parameter
9714 section_kind. Handle DWARF-5.
9715 (error_check_comp_unit_head): Accept also DWARF version 5.
9716 (read_and_check_comp_unit_head): Change parameter
9717 is_debug_types_section to section_kind.
9718 (read_and_check_type_unit_head): Delete function.
9719 (read_abbrev_offset): Handle DWARF-5.
9720 (create_debug_type_hash_table): Add parameter section_kind. Process
9721 only DW_UT_type. Use signature and type_offset_in_tu from struct
9722 comp_unit_head.
9723 (create_debug_types_hash_table): Update create_debug_type_hash_table
9724 caller.
9725 (create_all_type_units): Call create_debug_type_hash_table.
9726 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9727 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9728 caller.
9729 (skip_one_die): Handle DW_FORM_implicit_const.
9730 (dwarf2_rnglists_process): New function.
9731 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9732 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9733 (read_attribute_value): Handle DW_FORM_implicit_const,
9734 DW_FORM_line_strp.
9735 (read_attribute): Handle DW_FORM_implicit_const.
9736 (read_indirect_string_at_offset_from): New function from
9737 read_indirect_string_at_offset.
9738 (read_indirect_string_at_offset): Call
9739 read_indirect_string_at_offset_from.
9740 (read_indirect_line_string_at_offset): New function.
9741 (read_indirect_string): New function comment.
9742 (read_indirect_line_string): New function.
9743 (read_unsigned_leb128): Make it global.
9744 (dwarf2_string_attr): Handle DWARF-5.
9745 (add_include_dir_stub, read_formatted_entries): New functions.
9746 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9747 Handle DWARF-5.
9748 (per_cu_header_read_in): Update read_comp_unit_head caller.
9749 (dwarf2_version): New function.
9750 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9751 rnglists.
9752 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9753 fields.
9754
9755 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9756
9757 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9758
9759 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9760
9761 * dwarf2read.c (dwarf2_ranges_process): New function from
9762 dwarf2_ranges_read.
9763 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9764 dwarf2_ranges_process.
9765
9766 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9767
9768 * dwarf2read.c (create_debug_type_hash_table): New function from
9769 create_debug_types_hash_table.
9770 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9771 (create_all_type_units, open_and_init_dwo_file): Update
9772 create_debug_types_hash_table callers.
9773
9774 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9775
9776 PR gdb/16188
9777 * fork-child.c (trace_start_error): Fix thinko. va_end should
9778 refer to 'ap', not 'args'.
9779
9780 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9781 Pedro Alves <palves@redhat.com>
9782
9783 PR gdb/16188
9784 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9785 calls succeeded.
9786 * fork-child.c (trace_start_error): New function.
9787 (trace_start_error_with_name): Likewise.
9788 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9789 * inf-ptrace.c (inf_ptrace_me): Likewise.
9790 * inferior.h (trace_start_error): New prototype.
9791 (trace_start_error_with_name): Likewise.
9792
9793 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9794
9795 PR gdb/21164
9796 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9797 NULL before using it.
9798 * symmisc.c (maintenance_print_symbols): Likewise.
9799 (maintenance_print_msymbols): Likewise.
9800
9801 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9802
9803 * NEWS: Add record Python bindings entry.
9804
9805 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9806
9807 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9808 py-record-full.o.
9809 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9810 * python/py-record-btrace.c, python/py-record-btrace.h,
9811 python/py-record-full.c, python/py-record-full.h: New file.
9812 * python/py-record.c: Add include for py-record-btrace.h and
9813 py-record-full.h.
9814 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9815 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9816 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9817 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9818 New definition.
9819 (gdbpy_initialize_btrace): New export.
9820 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9821
9822 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9823
9824 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9825 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9826 * python/py-record.c: New file.
9827 * python/python-internal.h (gdbpy_start_recording,
9828 gdbpy_current_recording, gdpy_stop_recording,
9829 gdbpy_initialize_record): New export.
9830 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9831 (python_GdbMethods): Add gdbpy_start_recording,
9832 gdbpy_current_recording and gdbpy_stop_recording.
9833
9834 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9835
9836 * record-btrace.c (record_btrace_record_method): New function.
9837 (init_record_btrace_ops): Initialize to_record_method.
9838 * record-full.c (record_full_record_method): New function.
9839 (init_record_full_ops, init_record_full_core_ops): Add
9840 record_full_record_method.
9841 * record.h (enum record_method): New enum.
9842 * target-debug.h (target_debug_print_enum_record_method: New define.
9843 * target-delegates.c: Regenerate.
9844 * target.c (target_record_method): New function.
9845 * target.h: Include record.h.
9846 (struct target_ops) <to_record_method>: New field.
9847 (target_record_method): New export.
9848
9849 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9850
9851 * record.h (record_start, record_stop): New export.
9852 * record.c (record_start, record_stop): New function.
9853
9854 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9855
9856 * btrace.c (btrace_fetch): Copy function call segments pointer
9857 into a vector.
9858 (btrace_clear): Clear the vector.
9859 (btrace_find_insn_by_number): Use binary search to find the correct
9860 function call segment.
9861 * btrace.h (brace_fun_p): New typedef.
9862 (struct btrace_thread_info) <functions>: New field.
9863
9864 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9865
9866 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9867 * btrace.c (btrace_decode_error): ... here. New function.
9868 * btrace.h (btrace_decode_error): New export.
9869
9870 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9871
9872 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9873 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9874 btrace_find_insn_by_number): Remove special case for gaps.
9875 * btrace.h (btrace_insn_get_error): New export.
9876 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9877 * record-btrace.c (btrace_insn_history): Print number for gaps.
9878 (record_btrace_info, record_btrace_goto): Handle gaps.
9879
9880 2017-02-14 Tom Tromey <tom@tromey.com>
9881
9882 PR python/13598:
9883 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9884 event.
9885 * python/py-evts.c (gdbpy_initialize_py_events): Add
9886 before_prompt registry.
9887 * python/py-events.h (events_object) <before_prompt>: New field.
9888
9889 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9890
9891 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9892
9893 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9894
9895 * symfile (_initialize_symfile): Add usage text to the load command's
9896 help text.
9897
9898 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9899
9900 * utils.c (defaulted_query): Don't query on secondary UIs.
9901
9902 2017-02-10 Tom Tromey <tom@tromey.com>
9903
9904 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9905
9906 2017-02-10 Tom Tromey <tom@tromey.com>
9907
9908 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9909 "cleanup" local.
9910 * python/py-type.c (typy_legacy_template_argument): Remove
9911 unnecessary "cleanup" local.
9912
9913 2017-02-10 Tom Tromey <tom@tromey.com>
9914
9915 * python/python.c (do_start_initialization): New function, from
9916 _initialize_python.
9917 (_initialize_python): Call do_start_initialization.
9918 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9919 goto.
9920
9921 2017-02-10 Tom Tromey <tom@tromey.com>
9922
9923 * python/py-prettyprint.c (pretty_print_one_value): Use
9924 gdbpy_ref.
9925
9926 2017-02-10 Tom Tromey <tom@tromey.com>
9927
9928 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9929 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9930 gdbpy_ref.
9931 * python/py-type.c (field_new): Use gdbpy_ref.
9932 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9933 gdbpy_ref.
9934 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9935 (py_free_pspace): Likewise.
9936 (pspace_to_pspace_object): Likewise.
9937 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9938 (py_free_objfile): Likewise.
9939 (objfile_to_objfile_object): Likewise.
9940 * python/py-inferior.c (delete_thread_object): Use
9941 gdbpy_ref.
9942 (infpy_read_memory): Likewise.
9943 (py_free_inferior): Likewise.
9944 * python/py-evtregistry.c (create_eventregistry_object): Use
9945 gdbpy_ref.
9946 * python/py-event.c (create_event_object): Use gdbpy_ref.
9947
9948 2017-02-10 Tom Tromey <tom@tromey.com>
9949
9950 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9951 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9952 used.
9953 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9954 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9955 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9956 python/py-framefilter.c, python/py-function.c,
9957 python/py-inferior.c, python/py-infevents.c,
9958 python/py-linetable.c, python/py-newobjfileevent.c,
9959 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9960 python/py-signalevent.c, python/py-stopevent.c,
9961 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9962 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9963 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9964 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9965
9966 2017-02-10 Tom Tromey <tom@tromey.com>
9967
9968 * ui-out.h (ui_out_emit_type): New class.
9969 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9970 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9971 and ui_out_emit_tuple.
9972 (enumerate_locals): Likewise.
9973 (py_mi_print_variables, py_print_locals, py_print_args): Use
9974 ui_out_emit_list.
9975 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9976 ui_out_emit_list.
9977 * common/gdb_optional.h: New file.
9978
9979 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9980
9981 * MAINTAINERS (Write After Approval): Update my e-mail address.
9982
9983 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9984
9985 PR gdb/21122
9986 * breakpoint.c (_initialize_breakpoint): Update the help description
9987 of the 'commands' command to indicate that it takes a list argument.
9988
9989 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9990
9991 * interps.c (current_interp_set_logging): Remove "return".
9992
9993 2017-02-09 Gary Benson <gbenson@redhat.com>
9994
9995 * symtab.c (add_symtab_completions): Prevent NULL pointer
9996 dereference.
9997
9998 2017-02-08 Pedro Alves <palves@redhat.com>
9999
10000 * interps.c (interp::interp): Remove reference to quiet_p.
10001 (interp_set): Make static. Remove dead "Switching to" output
10002 code.
10003 (interp_quiet_p, interp_set_quiet): Delete.
10004 (interpreter_exec_cmd): Don't set the interpreter quiet.
10005 * interps.h (interp_quiet_p): Make static.
10006 (class interp) <quiet_p>: Remove field
10007
10008 2017-02-08 Jerome Guitton <guitton@adacore.com>
10009
10010 * cli/cli-decode.c (find_command_name_length): Make it extern.
10011 * cli/cli-decode.h (find_command_name_length): Declare.
10012 * cli/cli-script.c (command_name_equals, line_first_arg):
10013 New functions.
10014 (process_next_line): Use cli-decode to parse command names.
10015 (build_command_line): Make args a constant pointer.
10016
10017 2017-02-08 Jerome Guitton <guitton@adacore.com>
10018
10019 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10020 Remove case-insensitive search.
10021
10022 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10023
10024 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10025 at the end of the line. Avoids an ARI warning.
10026
10027 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10028
10029 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10030 rdseed instructions.
10031 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10032
10033 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10034
10035 PR tdep/20936
10036 Provide and use sparc32 and sparc64 target description XML files.
10037 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10038 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10039 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10040 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10041 * features/sparc/sparc32-solaris.xml: New file.
10042 * features/sparc/sparc64-solaris.xml: New file.
10043 * features/sparc/sparc32-solaris.c: Generated.
10044 * features/sparc/sparc64-solaris.c: Generated.
10045 * sparc-tdep.h: Account for differences in target descriptions.
10046 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10047 (sparc32_register_type): Use target provided registers.
10048 (validate_tdesc_registers): New function.
10049 (sparc32_gdbarch_init): Use tdesc_has_registers.
10050 Set pseudoregister functions.
10051 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10052 (sparc64_register_type): Use target provided registers.
10053 (sparc64_init_abi): Set pseudoregister functions.
10054
10055 2017-02-03 Tom Tromey <tom@tromey.com>
10056
10057 PR rust/21097:
10058 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10059 with a single member.
10060
10061 2017-02-03 Pedro Alves <palves@redhat.com>
10062
10063 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10064 (cli_interp_base::~cli_interp_base): New.
10065 (cli_interp): New struct.
10066 (as_cli_interp): Cast the interp itself to cli_interp.
10067 (cli_interpreter_pre_command_loop): Rename to ...
10068 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10069 parameter.
10070 (cli_interpreter_init): Rename to ...
10071 (cli_interp::init): ... this. Remove 'self' parameter. Use
10072 boolean. Make extern.
10073 (cli_interpreter_resume): Rename to ...
10074 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10075 extern.
10076 (cli_interpreter_suspend): Rename to ...
10077 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10078 extern.
10079 (cli_interpreter_exec): Rename to ...
10080 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10081 extern.
10082 (cli_interpreter_supports_command_editing): Rename to ...
10083 (cli_interp_base::supports_command_editing): ... this. Remove
10084 'interp' parameter. Make extern.
10085 (cli_ui_out): Rename to ...
10086 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10087 Make extern.
10088 (cli_set_logging): Rename to ...
10089 (cli_interp_base::set_logging): ... this. Remove 'interp'
10090 parameter. Make extern.
10091 (cli_interp_procs): Delete.
10092 (cli_interp_factory): Adjust to use "new".
10093 * cli/cli-interp.h: Include "interps.h".
10094 (struct cli_interp_base): New struct.
10095 * interps.c (struct interp): Delete. Fields moved to interps.h.
10096 (interp_new): Delete.
10097 (interp::interp, interp::~interp): New.
10098 (interp_set): Use bool, and return void. Assume the interpreter
10099 has suspend, init and resume methods, and that the all return
10100 void.
10101 (set_top_level_interpreter): interp_set returns void.
10102 (interp_ui_out): Adapt.
10103 (current_interp_set_logging): Adapt.
10104 (interp_data): Delete.
10105 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10106 (interp_exec): Adapt.
10107 (top_level_interpreter_data): Delete.
10108 * interps.h (interp_init_ftype, interp_resume_ftype)
10109 (interp_suspend_ftype, interp_exec_ftype)
10110 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10111 (class interp): New.
10112 (interp_new): Delete.
10113 (interp_set): Now returns void. Use bool.
10114 (interp_data, top_level_interpreter_data): Delete.
10115 * mi/mi-common.h: Include interps.h.
10116 (class mi_interp): Inherit from interp. Define a ctor. Declare
10117 init, resume, suspect, exec, interp_ui_out, set_logging and
10118 pre_command_loop methods.
10119 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10120 (mi_interpreter_init): Rename to ...
10121 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10122 bool, return void and make extern. Adjust.
10123 (mi_interpreter_resume): ... Rename to ...
10124 (mi_interp::resume): ... this. Remove the 'data' parameter,
10125 return void and make extern. Adjust.
10126 (mi_interpreter_suspend): ... Rename to ...
10127 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10128 return void and make extern. Adjust.
10129 (mi_interpreter_exec): ... Rename to ...
10130 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10131 extern. Adjust.
10132 (mi_interpreter_pre_command_loop): ... Rename to ...
10133 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10134 parameter and make extern.
10135 (mi_on_normal_stop_1): Adjust.
10136 (mi_ui_out): Rename to ...
10137 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10138 parameter and make extern. Adjust.
10139 (mi_set_logging): Rename to ...
10140 (mi_interp::set_logging): ... this. Remove the 'interp'
10141 parameter and make extern. Adjust.
10142 (mi_interp_procs): Delete.
10143 (mi_interp_factory): Adjust to use 'new'.
10144 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10145 (mi_print_exception, mi_execute_command, mi_load_progress):
10146 Adjust.
10147 * tui/tui-interp.c (tui_interp): New class.
10148 (as_tui_interp): Return a tui_interp pointer.
10149 (tui_on_normal_stop, tui_on_signal_received)
10150 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10151 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10152 to use interp::interp_ui_out.
10153 (tui_init): Rename to ...
10154 (tui_interp::init): ... this. Remove the 'self' parameter, use
10155 bool, return void and make extern. Adjust.
10156 (tui_resume): Rename to ...
10157 (tui_interp::resume): ... this. Remove the 'data' parameter,
10158 return void and make extern. Adjust.
10159 (tui_suspend): Rename to ...
10160 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10161 return void and make extern. Adjust.
10162 (tui_ui_out): Rename to ...
10163 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10164 parameter, and make extern. Adjust.
10165 (tui_exec): Rename to ...
10166 (tui_interp::exec): ... this. Remove the 'data' parameter and
10167 make extern.
10168 (tui_interp_procs): Delete.
10169 (tui_interp_factory): Use "new".
10170
10171 2017-02-02 Tom Tromey <tom@tromey.com>
10172
10173 * rust-exp.y (ends_raw_string, space_then_number)
10174 (rust_identifier_start_p): Return bool.
10175 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10176 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10177 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10178 (rust_chartype_p): Return bool.
10179 (val_print_struct, rust_print_struct_def, rust_print_type):
10180 Update.
10181 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10182 Return bool.
10183
10184 2017-02-02 Tom Tromey <tom@tromey.com>
10185
10186 * rust-lang.c: Reindent.
10187
10188 2017-02-02 Tom Tromey <tom@tromey.com>
10189
10190 * rust-lang.h (rust_crate_for_block): Update.
10191 * rust-lang.c (rust_crate_for_block): Return std::string.
10192 (rust_get_disr_info): Use std:;string, not
10193 gdb::unique_xmalloc_ptr.
10194 * rust-exp.y (crate_name): Update.
10195
10196 2017-02-02 Pedro Alves <palves@redhat.com>
10197
10198 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10199 field out of gdb_disassembler_test and make it static.
10200
10201 2017-02-02 Pedro Alves <palves@redhat.com>
10202
10203 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10204 mi1_interp and mi_interp fields.
10205
10206 2017-02-02 Pedro Alves <palves@redhat.com>
10207
10208 * cli/cli-interp.c (struct saved_output_files, saved_output):
10209 Moved from cli/cli-logging.c.
10210 (cli_set_logging): New function.
10211 (cli_interp_procs): Install cli_set_logging.
10212 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10213 Declare.
10214 * cli/cli-logging.c (struct saved_output_files, saved_output):
10215 Moved to cli/cli-interp.c.
10216 (pop_output_files): Don't save outputs here.
10217 (make_logging_output): New function.
10218 (handle_redirections): Don't build tee nor save previous outputs
10219 here.
10220 * interps.c (current_interp_set_logging): Change prototype.
10221 Assume there's always a set_logging_proc method installed.
10222 * interps.h (interp_set_logging_ftype): Change prototype.
10223 (current_interp_set_logging): Change prototype and adjust comment.
10224 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10225 use make_logging_output.
10226 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10227 2017-02-02 Pedro Alves <palves@redhat.com>
10228
10229 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10230 from ...
10231 (set_logging_overwrite): ... here.
10232 (logging_no_redirect_file): Delete.
10233 (set_logging_redirect): Don't handle redirection on the fly.
10234 Instead warn that "logging off" / "logging on" is necessary.
10235 (pop_output_files): Delete references to logging_no_redirect_file.
10236 (show_logging_command): Always speak in terms of what will happen
10237 once logging is reenabled.
10238
10239 2017-02-02 Pedro Alves <palves@redhat.com>
10240
10241 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10242
10243 2017-02-02 Pedro Alves <palves@redhat.com>
10244
10245 * disasm.c (gdb_pretty_print_insn): Rename to ...
10246 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10247 Remove gdbarch parameter. Adapt to clear the object's buffers
10248 instead of allocating new buffers, and to print using the object's
10249 gdb_disassembler instead of calling gdb_print_insn.
10250 (dump_insns): Use gdb_pretty_print_disassembler.
10251 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10252 (gdb_pretty_print_disassembler): New class.
10253 * record-btrace.c (btrace_insn_history): Use
10254 gdb_pretty_print_disassembler.
10255
10256 2017-02-02 Pedro Alves <palves@redhat.com>
10257
10258 * ada-lang.c (type_as_string): Use string_file.
10259 * ada-valprint.c (ada_print_floating): Use string_file.
10260 * ada-varobj.c (ada_varobj_scalar_image)
10261 (ada_varobj_get_value_image): Use string_file.
10262 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10263 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10264 * breakpoint.c (update_inserted_breakpoint_locations)
10265 (insert_breakpoint_locations, reattach_breakpoints)
10266 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10267 (print_it_watchpoint): Use string_file.
10268 (save_breakpoints): Use stdio_file.
10269 * c-exp.y (oper): Use string_file.
10270 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10271 tee_file.
10272 (pop_output_files): Use delete.
10273 (handle_redirections): Use stdio_file and tee_file.
10274 * cli/cli-setshow.c (do_show_command): Use string_file.
10275 * compile/compile-c-support.c (c_compute_program): Use
10276 string_file.
10277 * compile/compile-c-symbols.c (generate_vla_size): Take a
10278 'string_file &' instead of a 'ui_file *'.
10279 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10280 of a 'ui_file *'. Use string_file.
10281 (generate_c_for_variable_locations): Take a 'string_file &'
10282 instead of a 'ui_file *'.
10283 * compile/compile-internal.h (generate_c_for_for_one_variable):
10284 Take a 'string_file &' instead of a 'ui_file *'.
10285 * compile/compile-loc2c.c (push, pushf, unary, binary)
10286 (print_label, pushf_register_address, pushf_register)
10287 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10288 'ui_file *'. Adjust.
10289 * compile/compile.c (compile_to_object): Use string_file.
10290 * compile/compile.h (compile_dwarf_expr_to_c)
10291 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10292 'ui_file *'.
10293 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10294 (replace_typedefs_qualified_name): Use string_file and
10295 obstack_copy0.
10296 * disasm.c (gdb_pretty_print_insn): Use string_file.
10297 (gdb_disassembly): Adjust reference the null_stream global.
10298 (do_ui_file_delete): Delete.
10299 (gdb_insn_length): Use null_stream.
10300 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10301 * dwarf2loc.c (dwarf2_compile_property_to_c)
10302 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10303 'string_file &' instead of a 'ui_file *'.
10304 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10305 * dwarf2read.c (do_ui_file_peek_last): Delete.
10306 (dwarf2_compute_name): Use string_file.
10307 * event-top.c (gdb_setup_readline): Use stdio_file.
10308 * gdbarch.sh (verify_gdbarch): Use string_file.
10309 * gdbtypes.c (safe_parse_type): Use null_stream.
10310 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10311 string_file.
10312 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10313 'string_file *' instead of a 'ui_file *'.
10314 (gdbscm_arch_disassemble): Use string_file.
10315 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10316 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10317 inherits from ui_file.
10318 (ioscm_file_port_delete, ioscm_file_port_rewind)
10319 (ioscm_file_port_put): Delete.
10320 (ioscm_file_port_write): Rename to ...
10321 (ioscm_file_port::write): ... this. Remove file_port_magic
10322 checks.
10323 (ioscm_file_port_new): Delete.
10324 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10325 ui_file_up.
10326 * guile/scm-type.c (tyscm_type_name): Use string_file.
10327 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10328 Use string_file.
10329 * infcmd.c (print_return_value_1): Use string_file.
10330 * infrun.c (print_target_wait_results): Use string_file.
10331 * language.c (add_language): Use string_file.
10332 * location.c (explicit_to_string_internal): Use string_file.
10333 * main.c (captured_main_1): Use null_file.
10334 * maint.c (maintenance_print_architecture): Use stdio_file.
10335 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10336 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10337 event_channel>: Change type to mi_console_file pointer.
10338 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10339 (mi_console_file_delete): Delete.
10340 (struct mi_console_file): Delete.
10341 (mi_console_file_magic): Delete.
10342 (mi_console_file_new): Delete.
10343 (mi_console_file::mi_console_file): New.
10344 (mi_console_file_delete): Delete.
10345 (mi_console_file_fputs): Delete.
10346 (mi_console_file::write): New.
10347 (mi_console_raw_packet): Delete.
10348 (mi_console_file::flush): New.
10349 (mi_console_file_flush): Delete.
10350 (mi_console_set_raw): Rename to ...
10351 (mi_console_file::set_raw): ... this.
10352 * mi/mi-console.h (class mi_console_file): New class.
10353 (mi_console_file_new, mi_console_set_raw): Delete.
10354 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10355 (mi_set_logging): Use delete and tee_file. Adjust.
10356 * mi/mi-main.c (output_register): Use string_file.
10357 (mi_cmd_data_evaluate_expression): Use string_file.
10358 (mi_cmd_data_read_memory): Use string_file.
10359 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10360 * mi/mi-out.c (mi_ui_out::main_stream): New.
10361 (mi_ui_out::rewind): Use main_stream and
10362 string_file.
10363 (mi_ui_out::put): Use main_stream and string_file.
10364 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10365 Allocate a 'string_file' instead.
10366 (mi_out_new): Don't allocate a mem_fileopen stream here.
10367 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10368 (mi_ui_out::main_stream): Declare method.
10369 * printcmd.c (eval_command): Use string_file.
10370 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10371 * python/py-arch.c (archpy_disassemble): Use string_file.
10372 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10373 * python/py-frame.c (frapy_str): Use string_file.
10374 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10375 Use string_file.
10376 * python/py-type.c (typy_str): Use string_file.
10377 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10378 * python/py-value.c (valpy_str): Use string_file.
10379 * record-btrace.c (btrace_insn_history): Use string_file.
10380 * regcache.c (regcache_print): Use stdio_file.
10381 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10382 * remote.c (escape_buffer): Use string_file.
10383 * rust-lang.c (rust_get_disr_info): Use string_file.
10384 * serial.c (serial_open_ops_1): Use stdio_file.
10385 (do_serial_close): Use delete.
10386 * stack.c (print_frame_arg): Use string_file.
10387 (print_frame_args): Remove local mem_fileopen stream, not used.
10388 (print_frame): Use string_file.
10389 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10390 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10391 Take a 'string_file *' instead of a 'ui_file *'.
10392 * top.c (new_ui): Use stdio_file and stderr_file.
10393 (free_ui): Use delete.
10394 (execute_command_to_string): Use string_file.
10395 (quit_confirm): Use string_file.
10396 * tracepoint.c (collection_list::append_exp): Use string_file.
10397 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10398 * tui/tui-file.c: Don't include "ui-file.h".
10399 (enum streamtype, struct tui_stream): Delete.
10400 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10401 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10402 (tui_file::tui_file): New method.
10403 (tui_file_fputs): Delete.
10404 (tui_file_get_strbuf): Delete.
10405 (tui_file::puts): New method.
10406 (tui_file_adjust_strbuf): Delete.
10407 (tui_file_flush): Delete.
10408 (tui_file::flush): New method.
10409 * tui/tui-file.h: Tweak intro comment.
10410 Include ui-file.h.
10411 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10412 (tui_file_adjust_strbuf): Delete declarations.
10413 (class tui_file): New class.
10414 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10415 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10416 (tui_register_format): Use string_stream.
10417 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10418 (tui_get_function_from_frame): Use string_file.
10419 * typeprint.c (type_to_string): Use string_file.
10420 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10421 (null_stream): New global.
10422 (ui_file_delete): Delete.
10423 (ui_file::ui_file): New.
10424 (null_file_isatty): Delete.
10425 (ui_file::~ui_file): New.
10426 (null_file_rewind): Delete.
10427 (ui_file::printf): New.
10428 (null_file_put): Delete.
10429 (null_file_flush): Delete.
10430 (ui_file::putstr): New.
10431 (null_file_write): Delete.
10432 (ui_file::putstrn): New.
10433 (null_file_read): Delete.
10434 (ui_file::putc): New.
10435 (null_file_fputs): Delete.
10436 (null_file_write_async_safe): Delete.
10437 (ui_file::vprintf): New.
10438 (null_file_delete): Delete.
10439 (null_file::write): New.
10440 (null_file_fseek): Delete.
10441 (null_file::puts): New.
10442 (ui_file_data): Delete.
10443 (null_file::write_async_safe): New.
10444 (gdb_flush, ui_file_isatty): Adjust.
10445 (ui_file_put, ui_file_rewind): Delete.
10446 (ui_file_write): Adjust.
10447 (ui_file_write_for_put): Delete.
10448 (ui_file_write_async_safe, ui_file_read): Adjust.
10449 (ui_file_fseek): Delete.
10450 (fputs_unfiltered): Adjust.
10451 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10452 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10453 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10454 (set_ui_file_data): Delete.
10455 (string_file::~string_file, string_file::write)
10456 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10457 (do_ui_file_as_string, ui_file_as_string): Delete.
10458 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10459 (struct mem_file): Delete.
10460 (mem_file_new): Delete.
10461 (stdio_file::stdio_file): New.
10462 (mem_file_delete): Delete.
10463 (stdio_file::stdio_file): New.
10464 (mem_fileopen): Delete.
10465 (stdio_file::~stdio_file): New.
10466 (mem_file_rewind): Delete.
10467 (stdio_file::set_stream): New.
10468 (mem_file_put): Delete.
10469 (stdio_file::open): New.
10470 (mem_file_write): Delete.
10471 (stdio_file_magic, struct stdio_file): Delete.
10472 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10473 (stdio_file::flush): New.
10474 (stdio_file_read): Rename to ...
10475 (stdio_file::read): ... this. Adjust.
10476 (stdio_file_write): Rename to ...
10477 (stdio_file::write): ... this. Adjust.
10478 (stdio_file_write_async_safe): Rename to ...
10479 (stdio_file::write_async_safe) ... this. Adjust.
10480 (stdio_file_fputs): Rename to ...
10481 (stdio_file::puts) ... this. Adjust.
10482 (stdio_file_isatty): Delete.
10483 (stdio_file_fseek): Delete.
10484 (stdio_file::isatty): New.
10485 (stderr_file_write): Rename to ...
10486 (stderr_file::write) ... this. Adjust.
10487 (stderr_file_fputs): Rename to ...
10488 (stderr_file::puts) ... this. Adjust.
10489 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10490 (stderr_file::stderr_file): New.
10491 (tee_file_magic): Delete.
10492 (struct tee_file): Delete.
10493 (tee_file::tee_file): New.
10494 (tee_file_new): Delete.
10495 (tee_file::~tee_file): New.
10496 (tee_file_delete): Delete.
10497 (tee_file_flush): Rename to ...
10498 (tee_file::flush): ... this. Adjust.
10499 (tee_file_write): Rename to ...
10500 (tee_file::write): ... this. Adjust.
10501 (tee_file::write_async_safe): New.
10502 (tee_file_fputs): Rename to ...
10503 (tee_file::puts): ... this. Adjust.
10504 (tee_file_isatty): Rename to ...
10505 (tee_file::isatty): ... this. Adjust.
10506 * ui-file.h (struct obstack, struct ui_file): Don't
10507 forward-declare.
10508 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10509 (ui_file_write_ftype)
10510 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10511 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10512 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10513 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10514 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10515 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10516 (set_ui_file_fseek): Delete.
10517 (ui_file_data, ui_file_delete, ui_file_rewind)
10518 (struct ui_file): New.
10519 (ui_file_up): New.
10520 (class null_file): New.
10521 (null_stream): Declare.
10522 (ui_file_write_for_put, ui_file_put): Delete.
10523 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10524 Delete.
10525 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10526 (gdb_fopen, tee_file_new): Delete.
10527 (struct string_file): New.
10528 (struct stdio_file): New.
10529 (stdio_file_up): New.
10530 (struct stderr_file): New.
10531 (class tee_file): New.
10532 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10533 of a 'ui_file *'. Adjust.
10534 * ui-out.h (class ui_out) <field_stream>: Likewise.
10535 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10536 (null_stream): Delete.
10537 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10538 Adjust.
10539 * utils.h (struct ui_file): Delete forward declaration..
10540 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10541 (error_stream): Take a 'string_file &' instead of a
10542 'ui_file *'.
10543 * varobj.c (varobj_value_get_print_value): Use string_file.
10544 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10545 * gdbarch.c: Regenerate.
10546
10547 2017-02-02 Pedro Alves <palves@redhat.com>
10548
10549 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10550 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10551 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10552 Adjust to call gdb_print_insn instead of
10553 gdb_disassembler::print_insn.
10554 (dump_insns, do_mixed_source_and_assembly_deprecated)
10555 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10556 'gdbarch' parameter. Remove gdb_disassembler parameter.
10557 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10558 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10559 declaration.
10560 (gdb_pretty_print_insn): Re-add declaration.
10561 * record-btrace.c (btrace_insn_history): Don't allocate a
10562 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10563
10564 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10565
10566 * disasm.h (gdb_disassembly): Remove file_string parameter.
10567 * disasm.c (gdb_disassembly): Likewise.
10568 * cli/cli-cmds.c (print_disassembly): Adapt.
10569 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10570 * stack.c (do_gdb_disassembly): Likewise.
10571
10572 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10573
10574 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10575 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10576 targets. And if the implicit value is longer than needed, extract
10577 the first bytes instead of the "least significant" ones.
10578
10579 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10580
10581 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10582 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10583 (btrace_fetch): Assert can_access_registers_ptid.
10584 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10585 validate_registers_access.
10586
10587 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10588
10589 * gdbthread.h (can_access_registers_ptid): New.
10590 * thread.c (can_access_registers_ptid): New.
10591
10592 2017-02-01 Pedro Alves <palves@redhat.com>
10593
10594 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10595
10596 2017-01-31 Pedro Alves <palves@redhat.com>
10597
10598 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10599 Fix typos.
10600
10601 2017-01-31 Pedro Alves <palves@redhat.com>
10602
10603 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10604 not used.
10605
10606 2017-01-31 Pedro Alves <palves@redhat.com>
10607
10608 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10609
10610 2017-01-31 Pedro Alves <palves@redhat.com>
10611
10612 * common/scoped_restore.h
10613 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10614 change the value's parameter type to T2.
10615 (make_scoped_restore): Likewise.
10616
10617 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10618 Richard Henderson <rth@redhat.com>
10619
10620 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10621 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10622 GS_BASE for older kernels.
10623 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10624 GS_BASE for older kernels.
10625 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10626 and GS_BASE to the offset table.
10627 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10628 system register group.
10629 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10630 for older kernels.
10631 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10632 amd64 ABI.
10633 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10634 AMD64_GSBASE_REGNUM.
10635 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10636 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10637 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10638 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10639 i386/64bit-segments.xml in those rules.
10640 * features/i386/64bit-segments.xml: New file.
10641 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10642 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10643 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10644 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10645 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10646 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10647 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10648 * features/i386/amd64-avx-linux.c: Regenerated.
10649 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10650 * features/i386/amd64-avx-mpx.c: Regenerated.
10651 * features/i386/amd64-avx512-linux.c: Regenerated.
10652 * features/i386/amd64-linux.c: Regenerated.
10653 * features/i386/amd64-mpx-linux.c: Regenerated.
10654 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10655 * features/i386/i386-avx-mpx.c: Regenerated.
10656 * features/i386/x32-avx-linux.c: Regenerated.
10657 * features/i386/x32-avx512-linux.c: Regenerated.
10658 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10659 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10660 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10661 * regformats/i386/amd64-linux.dat: Regenerated.
10662 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10663 * regformats/i386/x32-avx-linux.dat: Regenerated.
10664 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10665 * regformats/i386/x32-linux.dat: Regenerated.
10666
10667 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10668
10669 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10670 Set to AMD64_NUM_REGS.
10671
10672 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10673
10674 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10675 that checks validity of a register number.
10676
10677 2017-01-27 Kees Cook <keescook@google.com>
10678
10679 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10680 fetch_fpregs if target has fpa registers.
10681 (arm_linux_store_inferior_registers): Call store_fpregs if target
10682 has fpa registers.
10683
10684 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10685
10686 * cris-tdep.c (cris_gdbarch_init): Remove check for
10687 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10688
10689 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10690
10691 * corelow.c (get_core_register_section): Check for regset
10692 existence before checking for REGSET_VARIABLE_SIZE.
10693
10694 2017-01-26 Yao Qi <yao.qi@linaro.org>
10695 Pedro Alves <palves@redhat.com>
10696
10697 PR gdb/20939
10698 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10699 call memory_error, save memaddr instead.
10700 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10701 negative, cal memory_error.
10702 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10703
10704 2017-01-26 Yao Qi <yao.qi@linaro.org>
10705
10706 * disasm-selftests.c (memory_error_test): New function.
10707 (_initialize_disasm_selftests): Register memory_error_test.
10708
10709 2017-01-26 Yao Qi <yao.qi@linaro.org>
10710
10711 * Makefile.in (SFILES): Add disasm-selftests.c and
10712 selftest-arch.c.
10713 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10714 * disasm-selftests.c: New file.
10715 * selftest-arch.c: New file.
10716 * selftest-arch.h: New file.
10717
10718 2017-01-26 Yao Qi <yao.qi@linaro.org>
10719
10720 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10721 to bfd_arch_mep. Don't return 0 if section is not
10722 found. Call print_insn_mep.
10723
10724 2017-01-26 Pedro Alves <palves@redhat.com>
10725 Yao Qi <yao.qi@linaro.org>
10726
10727 * arm-tdep.c: Include "disasm.h".
10728 (gdb_print_insn_arm): Update code to get gdbarch.
10729 * disasm.c (dis_asm_read_memory): Change it to
10730 gdb_disassembler::dis_asm_read_memory.
10731 (dis_asm_memory_error): Likewise.
10732 (dis_asm_print_address): Likewise.
10733 (gdb_pretty_print_insn): Change it to
10734 gdb_disassembler::pretty_print_insn.
10735 (dump_insns): Add one argument gdb_disassemlber. All
10736 callers updated.
10737 (do_mixed_source_and_assembly_deprecated): Likewise.
10738 (do_mixed_source_and_assembly): Likewise.
10739 (do_assembly_only): Likewise.
10740 (gdb_disassembler::gdb_disassembler): New.
10741 (gdb_disassembler::print_insn): New.
10742 * disasm.h (class gdb_disassembler): New.
10743 (gdb_pretty_print_insn): Remove declaration.
10744 (gdb_disassemble_info): Likewise.
10745 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10746 (gdbscm_disasm_read_memory_worker): Update.
10747 (gdbscm_disasm_read_memory): Update.
10748 (gdbscm_disasm_memory_error): Remove.
10749 (gdbscm_disasm_print_address): Remove.
10750 (gdbscm_disassembler::gdbscm_disassembler): New.
10751 (gdbscm_print_insn_from_port): Update.
10752 * mips-tdep.c: Include disasm.h.
10753 (gdb_print_insn_mips): Update code to get gdbarch.
10754 * record-btrace.c (btrace_insn_history): Update.
10755 * spu-tdep.c: Include disasm.h.
10756 (struct spu_dis_asm_data): Remove.
10757 (struct spu_dis_asm_info): New.
10758 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10759 SPU id.
10760 (gdb_print_insn_spu): Cast disassemble_info to
10761 spu_dis_asm_info.
10762
10763 2017-01-26 Yao Qi <yao.qi@linaro.org>
10764
10765 * disasm.c (do_ui_file_delete): Delete.
10766 (gdb_insn_length): Move code creating stream to ...
10767 * utils.c (null_stream): ... here. New function.
10768 * utils.h (null_stream): Declare.
10769
10770 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10771
10772 * python/py-inferior.c (find_thread_object): Return directly
10773 from the loop. Remove "found" variable.
10774
10775 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10776
10777 GDB 7.12.1 released.
10778
10779 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10780
10781 * python/py-function.c (fnpy_call): Reorder declarations to have
10782 the gdbpy_enter object declared first.
10783 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10784
10785 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10786
10787 PR python/21068
10788 * python/python-internal.h (PyMem_RawMalloc): Define for
10789 Python < 3.4.
10790 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10791 PyMem_RawMalloc instead of PyMem_Malloc.
10792
10793 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10794 Luis Machado <lgustavo@codesourcery.com>
10795
10796 * NEWS (New commands): Mention flash-erase.
10797 (New MI commands): Mention target-flash-erase.
10798 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10799 command.
10800 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10801 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10802 * target.c (flash_erase_command): New function.
10803 (initialize_targets): Add new flash-erase command.
10804 * target.h (flash_erase_command): New declaration.
10805
10806 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10807
10808 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10809 HAVE_SYS_PROCFS_H is defined.
10810
10811 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10812
10813 * remote.c (struct cached_reg): Change data into a pointer.
10814 * (stop_reply_dtr): Free data pointers before deleting vector.
10815 (process_stop_reply): Likewise.
10816 (remote_parse_stop_reply): Allocate space for data
10817
10818 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10819
10820 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10821 MAX_REGISTER_SIZE.
10822 (amd64_pseudo_register_read_value): Likewise.
10823 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10824 (store_register_using_P): Likewise.
10825 * regcache.c (regcache_xfer_part): Likewise.
10826
10827 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10828
10829 Split real and pseudo registers.
10830 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10831 (sparc32_pseudo_regnum): New enum.
10832 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10833 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10834 (SPARC32_CP0_REGISTERS): New macro.
10835 (sparc32_pseudo_register_name): New function.
10836 (sparc32_register_name): Use sparc32_pseudo_register_name.
10837 (sparc32_pseudo_register_type): New function.
10838 (sparc32_register_type): Use sparc32_pseudo_register_type.
10839 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10840 pseudo register numbers.
10841 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10842 (SPARC64_CP0_REGISTERS): New macro.
10843 (sparc64_pseudo_register_name): New function.
10844 (sparc64_register_name): Use sparc64_pseudo_register_name.
10845 (sparc64_pseudo_register_type): New function.
10846 (sparc64_register_type): Use sparc64_pseudo_register_type.
10847 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10848 pseudo register numbers.
10849 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10850 sparc64_store_arguments): Handle pseudo register numbers.
10851
10852 2017-01-13 Yao Qi <yao.qi@linaro.org>
10853
10854 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10855 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10856 output.
10857 (getpkt_or_notif_sane_1): Likewise.
10858
10859 2017-01-13 Yao Qi <yao.qi@linaro.org>
10860
10861 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10862 of CC. Pass "-x c++-header" instead of "-x c".
10863
10864 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10865
10866 * remote.c (remote_can_async_p): Update comment.
10867
10868 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10869
10870 * linux-nat.c (linux_nat_can_async_p): Update comment.
10871
10872 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10873
10874 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10875
10876 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10877
10878 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10879
10880 2017-01-10 Tom Tromey <tom@tromey.com>
10881
10882 * python/py-type.c (typy_legacy_template_argument): Update.
10883 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10884 ~demangle_parse_info): Declare new members.
10885 (cp_demangled_name_to_comp): Return unique_ptr.
10886 (cp_demangled_name_parse_free)
10887 (make_cleanup_cp_demangled_name_parse_free)
10888 (cp_new_demangle_parse_info): Remove.
10889 * cp-support.c (do_demangled_name_parse_free_cleanup)
10890 (make_cleanup_cp_demangled_name_parse_free): Remove.
10891 (inspect_type, cp_canonicalize_string_full)
10892 (cp_canonicalize_string): Update.
10893 (mangled_name_to_comp): Change return type.
10894 (cp_class_name_from_physname, method_name_from_physname)
10895 (cp_func_name, cp_remove_params): Update.
10896 * cp-name-parser.y (demangle_parse_info): New constructor, from
10897 cp_new_demangle_parse_info.
10898 (~demangle_parse_info): New destructor, from
10899 cp_demangled_name_parse_free.
10900 (cp_merge_demangle_parse_infos): Update.
10901 (cp_demangled_name_to_comp): Change return type.
10902
10903 2017-01-10 Tom Tromey <tom@tromey.com>
10904
10905 * top.c (prevent_dont_repeat): Change return type.
10906 * python/python.c (execute_gdb_command): Use std::string.
10907 Update.
10908 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10909 * command.h (prevent_dont_repeat): Change return type.
10910 * breakpoint.c (bpstat_do_actions_1): Update.
10911
10912 2017-01-10 Tom Tromey <tom@tromey.com>
10913
10914 * value.h (scoped_value_mark::~scoped_value_mark): Call
10915 free_to_mark.
10916 (scoped_value_mark::free_to_mark): New method.
10917 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10918 scoped_value_mark.
10919
10920 2017-01-10 Tom Tromey <tom@tromey.com>
10921
10922 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10923 (valpy_reference_value, valpy_const_value, valpy_get_address)
10924 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10925 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10926 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10927 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10928 scoped_value_mark.
10929 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10930 * value.h (scoped_value_mark): New class.
10931
10932 2017-01-10 Tom Tromey <tom@tromey.com>
10933
10934 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10935 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10936 * psymtab.c (discard_psymtabs_upto): Remove.
10937 (make_cleanup_discard_psymtabs): Remove.
10938 (struct psymtab_state): Remove.
10939
10940 2017-01-10 Tom Tromey <tom@tromey.com>
10941
10942 * record-full.c (record_full_save_cleanups): Remove.
10943 (record_full_save): Use gdb::unlinker.
10944 * gcore.c (do_bfd_delete_cleanup): Remove.
10945 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10946 cleanups.
10947 * dwarf2read.c (unlink_if_set): Remove.
10948 (write_psymtabs_to_index): Use gdb::unlinker.
10949 * common/gdb_unlinker.h: New file.
10950
10951 2017-01-10 Tom Tromey <tom@tromey.com>
10952
10953 * windows-tdep.c (windows_xfer_shared_library): Update.
10954 * windows-nat.c (windows_make_so): Update.
10955 * utils.h (make_cleanup_bfd_unref): Remove.
10956 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10957 * symfile.h (symfile_bfd_open)
10958 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10959 * symfile.c (read_symbols, symbol_file_add)
10960 (separate_debug_file_exists): Update.
10961 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10962 (generic_load, reread_symbols): Update.
10963 * symfile-mem.c (symbol_file_add_from_memory): Update.
10964 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10965 (spu_symbol_file_add_from_memory): Update.
10966 * solist.h (struct target_so_ops) <bfd_open>: Return
10967 gdb_bfd_ref_ptr.
10968 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10969 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10970 gdb_bfd_ref_ptr.
10971 (solib_map_sections, reload_shared_libraries_1): Update.
10972 * solib-svr4.c (enable_break): Update.
10973 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10974 * solib-frv.c (enable_break2): Update.
10975 * solib-dsbt.c (enable_break): Update.
10976 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10977 gdb_bfd_ref_ptr.
10978 (darwin_solib_get_all_image_info_addr_at_init): Update.
10979 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10980 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10981 * record-full.c (record_full_save): Update.
10982 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10983 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10984 * minidebug.c (find_separate_debug_file_in_section): Return
10985 gdb_bfd_ref_ptr.
10986 * machoread.c (macho_add_oso_symfile): Change abfd to
10987 gdb_bfd_ref_ptr.
10988 (macho_symfile_read_all_oso): Update.
10989 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10990 (macho_symfile_read): Update.
10991 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10992 (jit_bfd_try_read_symtab): Update.
10993 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10994 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10995 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10996 gdb_bfd_ref_ptr.
10997 (gdb_bfd_ref_policy): New struct.
10998 (gdb_bfd_ref_ptr): New typedef.
10999 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11000 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11001 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11002 gdb_bfd_ref_ptr.
11003 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11004 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11005 (gcore_command): Update.
11006 * exec.c (exec_file_attach): Update.
11007 * elfread.c (elf_symfile_read): Update.
11008 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11009 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11010 (open_and_init_dwo_file): Update.
11011 (open_dwp_file): Return gdb_bfd_ref_ptr.
11012 (open_and_init_dwp_file): Update.
11013 * corelow.c (core_open): Update.
11014 * compile/compile-object-load.c (compile_object_load): Update.
11015 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11016 * coffread.c (coff_symfile_read): Update.
11017 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11018 gdb_bfd_ref_ptr. Rename.
11019 (dump_bfd_file, restore_command): Update.
11020 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11021 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11022 (find_separate_debug_file_by_buildid): Update.
11023
11024 2017-01-10 Tom Tromey <tom@tromey.com>
11025
11026 * common/gdb_ref_ptr.h: New file.
11027 * python/py-ref.h (struct gdbpy_ref_policy): New.
11028 (gdbpy_ref): Now a typedef.
11029
11030 2017-01-10 Tom Tromey <tom@tromey.com>
11031
11032 * utils.h (make_cleanup_htab_delete): Don't declare.
11033 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11034 Remove.
11035 * linespec.c (decode_compound_collector): Add constructor,
11036 destructor.
11037 (lookup_prefix_sym): Remove cleanup.
11038 (symtab_collector): Add constructor, destructor.
11039 (collect_symtabs_from_filename): Remove cleanup.
11040 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11041 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11042 Use htab_up.
11043 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11044 * dwarf2read.c (dw2_expand_symtabs_matching)
11045 (dw2_map_symbol_filenames, dwarf_decode_macros)
11046 (write_psymtabs_to_index): Use htab_up.
11047 * dwarf2loc.c (func_verify_no_selftailcall)
11048 (call_site_find_chain_1, func_verify_no_selftailcall)
11049 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11050 std::vector, gdb::unique_xmalloc_ptr.
11051 (call_sitep): Remove typedef.
11052 (dwarf2_locexpr_baton_eval): Remove unused variable.
11053
11054 2017-01-10 Tom Tromey <tom@tromey.com>
11055
11056 * python/python-internal.h (make_cleanup_py_decref)
11057 (make_cleanup_py_xdecref): Don't declare.
11058 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11059 (py_xdecref, make_cleanup_py_xdecref): Remove.
11060
11061 2017-01-10 Tom Tromey <tom@tromey.com>
11062
11063 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11064 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11065
11066 2017-01-10 Tom Tromey <tom@tromey.com>
11067
11068 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11069
11070 2017-01-10 Tom Tromey <tom@tromey.com>
11071
11072 * python/py-utils.c (unicode_to_encoded_string)
11073 (python_string_to_target_string)
11074 (python_string_to_target_python_string)
11075 (python_string_to_host_string, gdbpy_obj_to_string)
11076 (get_addr_from_python): Use gdbpy_ref.
11077
11078 2017-01-10 Tom Tromey <tom@tromey.com>
11079
11080 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11081 gdbpy_ref.
11082
11083 2017-01-10 Tom Tromey <tom@tromey.com>
11084
11085 * python/python.c (eval_python_command, gdbpy_decode_line)
11086 (gdbpy_run_events, gdbpy_start_type_printers)
11087 (gdbpy_apply_type_printers): Use gdbpy_ref.
11088
11089 2017-01-10 Tom Tromey <tom@tromey.com>
11090
11091 * python/py-param.c (get_doc_string, compute_enum_values): Use
11092 gdbpy_ref.
11093
11094 2017-01-10 Tom Tromey <tom@tromey.com>
11095
11096 * python/py-inferior.c (find_thread_object, build_inferior_list):
11097 Use gdbpy_ref.
11098
11099 2017-01-10 Tom Tromey <tom@tromey.com>
11100
11101 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11102
11103 2017-01-10 Tom Tromey <tom@tromey.com>
11104
11105 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11106 gdbpy_ref.
11107
11108 2017-01-10 Tom Tromey <tom@tromey.com>
11109
11110 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11111 extra incref.
11112 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11113 Use gdbpy_ref.
11114
11115 2017-01-10 Tom Tromey <tom@tromey.com>
11116
11117 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11118 gdbpy_ref.
11119
11120 2017-01-10 Tom Tromey <tom@tromey.com>
11121
11122 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11123 decref results of PyArg_ParseTupleAndKeywords.
11124
11125 2017-01-10 Tom Tromey <tom@tromey.com>
11126
11127 * python/python.c (python_run_simple_file): Use
11128 unique_xmalloc_ptr, gdbpy_ref.
11129
11130 2017-01-10 Tom Tromey <tom@tromey.com>
11131
11132 * python/py-prettyprint.c (print_stack_unless_memory_error)
11133 (print_string_repr, print_children): Use gdbpy_ref.
11134 (dummy_python_frame): New class.
11135 (dummy_python_frame::dummy_python_frame): Rename from
11136 push_dummy_python_frame.
11137 (py_restore_tstate): Remove.
11138
11139 2017-01-10 Tom Tromey <tom@tromey.com>
11140
11141 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11142
11143 2017-01-10 Tom Tromey <tom@tromey.com>
11144
11145 * python/python.c (ensure_python_env, restore_python_env):
11146 Remove.
11147 * python/python-internal.h (ensure_python_env): Don't declare.
11148 * varobj.h (varobj_ensure_python_env): Don't declare.
11149 * varobj.c (varobj_ensure_python_env): Remove.
11150
11151 2017-01-10 Tom Tromey <tom@tromey.com>
11152
11153 * varobj.c (varobj_value_get_print_value): Use
11154 gdbpy_enter_varobj.
11155
11156 2017-01-10 Tom Tromey <tom@tromey.com>
11157
11158 * python/py-prettyprint.c (print_string_repr, print_children):
11159 Update.
11160 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11161 of "encoding".
11162 * varobj.c (varobj_value_get_print_value): Update.
11163 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11164
11165 2017-01-10 Tom Tromey <tom@tromey.com>
11166
11167 * varobj.c (varobj_get_display_hint)
11168 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11169 (varobj_set_visualizer, free_variable): Use
11170 gdbpy_enter_varobj.
11171
11172 2017-01-10 Tom Tromey <tom@tromey.com>
11173
11174 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11175 (do_finish_initialization): New function. Use gdbpy_ref.
11176 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11177 do_finish_initialization.
11178
11179 2017-01-10 Tom Tromey <tom@tromey.com>
11180
11181 * python/py-param.c (get_set_value, get_show_value): Use
11182 gdbpy_enter, gdbpy_ref.
11183
11184 2017-01-10 Tom Tromey <tom@tromey.com>
11185
11186 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11187
11188 2017-01-10 Tom Tromey <tom@tromey.com>
11189
11190 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11191
11192 2017-01-10 Tom Tromey <tom@tromey.com>
11193
11194 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11195 Use gdbpy_enter_varobj.
11196
11197 2017-01-10 Tom Tromey <tom@tromey.com>
11198
11199 * varobj.c (gdbpy_enter_varobj): New constructor.
11200 * python/python-internal.h (gdbpy_enter_varobj): New class.
11201 * python/py-varobj.c (py_varobj_get_iterator): Use
11202 gdbpy_enter_varobj.
11203
11204 2017-01-10 Tom Tromey <tom@tromey.com>
11205
11206 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11207 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11208 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11209 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11210 unique_xmalloc_ptr.
11211 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11212
11213 2017-01-10 Tom Tromey <tom@tromey.com>
11214
11215 * python/py-xmethods.c (invoke_match_method): Use
11216 gdbpy_ref.
11217
11218 2017-01-10 Tom Tromey <tom@tromey.com>
11219
11220 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11221 gdbpy_enter, gdbpy_ref.
11222
11223 2017-01-10 Tom Tromey <tom@tromey.com>
11224
11225 * python/python.c (python_interactive_command): Use gdbpy_enter.
11226
11227 2017-01-10 Tom Tromey <tom@tromey.com>
11228
11229 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11230 gdbpy_ref.
11231
11232 2017-01-10 Tom Tromey <tom@tromey.com>
11233
11234 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11235 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11236
11237 2017-01-10 Tom Tromey <tom@tromey.com>
11238
11239 * utils.h (htab_deleter): New struct.
11240 (htab_up): New typedef.
11241 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11242 gdbpy_enter, gdbpy_ref, htab_up.
11243
11244 2017-01-10 Tom Tromey <tom@tromey.com>
11245
11246 * python/py-unwind.c (pending_frame_invalidate): Remove.
11247 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11248
11249 2017-01-10 Tom Tromey <tom@tromey.com>
11250
11251 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11252 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11253
11254 2017-01-10 Tom Tromey <tom@tromey.com>
11255
11256 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11257
11258 2017-01-10 Tom Tromey <tom@tromey.com>
11259
11260 * python/python.c (gdbpy_eval_from_control_command)
11261 (gdbpy_source_script, gdbpy_run_events)
11262 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11263 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11264 gdbpy_enter.
11265
11266 2017-01-10 Tom Tromey <tom@tromey.com>
11267
11268 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11269
11270 2017-01-10 Tom Tromey <tom@tromey.com>
11271
11272 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11273
11274 2017-01-10 Tom Tromey <tom@tromey.com>
11275
11276 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11277 (python_on_inferior_call_pre, python_on_inferior_call_post)
11278 (python_on_memory_change, python_on_register_change)
11279 (python_inferior_exit, python_new_objfile, add_thread_object)
11280 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11281
11282 2017-01-10 Tom Tromey <tom@tromey.com>
11283
11284 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11285 (bpfinishpy_handle_exit): Use gdbpy_enter.
11286
11287 2017-01-10 Tom Tromey <tom@tromey.com>
11288
11289 * python/py-cmd.c (cmdpy_destroyer)
11290 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11291 gdbpy_enter.
11292
11293 2017-01-10 Tom Tromey <tom@tromey.com>
11294
11295 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11296 gdbpy_enter.
11297 (gdbpy_breakpoint_has_cond): Likewise.
11298
11299 2017-01-10 Tom Tromey <tom@tromey.com>
11300
11301 * python/python.c (gdbpy_enter): New constructor.
11302 (~gdbpy_enter): New destructor.
11303 (restore_python_env, ensure_python_env): Rewrite.
11304 * python/python-internal.h (gdbpy_enter): New class.
11305
11306 2017-01-10 Tom Tromey <tom@tromey.com>
11307
11308 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11309
11310 2017-01-10 Tom Tromey <tom@tromey.com>
11311
11312 * python/py-value.c (value_has_field, get_field_flag)
11313 (get_field_type, valpy_getitem, convert_value_from_python): Use
11314 gdbpy_ref.
11315
11316 2017-01-10 Tom Tromey <tom@tromey.com>
11317
11318 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11319 gdbpy_ref.
11320
11321 2017-01-10 Tom Tromey <tom@tromey.com>
11322
11323 * python/py-prettyprint.c (search_pp_list)
11324 (find_pretty_printer_from_objfiles)
11325 (find_pretty_printer_from_progspace)
11326 (find_pretty_printer_from_gdb, find_pretty_printer)
11327 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11328 gdbpy_ref.
11329
11330 2017-01-10 Tom Tromey <tom@tromey.com>
11331
11332 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11333
11334 2017-01-10 Tom Tromey <tom@tromey.com>
11335
11336 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11337 (ltpy_get_all_source_lines): Use gdbpy_ref.
11338
11339 2017-01-10 Tom Tromey <tom@tromey.com>
11340
11341 * python/py-framefilter.c (extract_sym, extract_value)
11342 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11343 gdbpy_ref.
11344
11345 2017-01-10 Tom Tromey <tom@tromey.com>
11346
11347 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11348
11349 2017-01-10 Tom Tromey <tom@tromey.com>
11350
11351 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11352
11353 2017-01-10 Tom Tromey <tom@tromey.com>
11354
11355 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11356 gdbpy_ref.
11357
11358 2017-01-10 Tom Tromey <tom@tromey.com>
11359
11360 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11361
11362 2017-01-10 Tom Tromey <tom@tromey.com>
11363
11364 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11365 (typy_range): Use gdbpy_ref.
11366
11367 2017-01-10 Tom Tromey <tom@tromey.com>
11368
11369 * python/py-threadevent.c (create_thread_event_object): Use
11370 gdbpy_ref.
11371 * python/py-stopevent.c (create_stop_event_object): Simplify.
11372 (emit_stop_event): Use gdbpy_ref.
11373 * python/py-signalevent.c (create_signal_event_object): Use
11374 gdbpy_ref.
11375 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11376 (emit_new_objfile_event, create_clear_objfiles_event_object)
11377 (emit_clear_objfiles_event): Use gdbpy_ref.
11378 * python/py-infevents.c (create_inferior_call_event_object)
11379 (create_register_changed_event_object)
11380 (create_memory_changed_event_object, emit_inferior_call_event)
11381 (emit_memory_changed_event, emit_register_changed_event): Use
11382 gdbpy_ref.
11383 * python/py-exitedevent.c (create_exited_event_object)
11384 (emit_exited_event): Use gdbpy_ref.
11385 * python/py-event.h (evpy_emit_event): Remove
11386 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11387 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11388 * python/py-continueevent.c (emit_continue_event): Use
11389 gdbpy_ref.
11390 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11391 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11392 gdbpy_ref.
11393 * python/py-bpevent.c (create_breakpoint_event_object): Use
11394 gdbpy_ref.
11395
11396 2017-01-10 Tom Tromey <tom@tromey.com>
11397
11398 * python/py-ref.h: New file.
11399
11400 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11401
11402 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11403 void.
11404 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11405 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11406 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11407 * ui-out.c (ui_out::redirect): Likewise.
11408 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11409 * cli/cli-logging.c (set_logging_redirect): Update call site of
11410 ui_out::redirect.
11411 (handle_redirections): Likewise.
11412 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11413 * top.c (execute_command_to_string): Likewise.
11414 * utils.c (do_ui_out_redirect_pop): Likewise.
11415
11416 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11417
11418 * stack.c (_initialize_stack): Update "frame" command help message.
11419
11420 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11421
11422 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11423
11424 2017-01-06 Yao Qi <yao.qi@linaro.org>
11425
11426 * x86-linux-nat.h: Include gdb_proc_service.h.
11427
11428 2017-01-06 Yao Qi <yao.qi@linaro.org>
11429
11430 * ser-base.h: Include serial.h.
11431
11432 2017-01-06 Yao Qi <yao.qi@linaro.org>
11433
11434 * ppc-linux-tdep.h: Include ppc-tdep.h.
11435
11436 2017-01-06 Yao Qi <yao.qi@linaro.org>
11437
11438 * nat/amd64-linux-siginfo.h: Include signal.h.
11439
11440 2017-01-06 Yao Qi <yao.qi@linaro.org>
11441
11442 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11443
11444 2017-01-06 Yao Qi <yao.qi@linaro.org>
11445
11446 * mi/mi-parse.h: Include mi-cmds.h.
11447
11448 2017-01-06 Yao Qi <yao.qi@linaro.org>
11449
11450 * inf-loop.c: Don't include "target.h".
11451 * inf-loop.h: Include it here.
11452
11453 2017-01-06 Yao Qi <yao.qi@linaro.org>
11454
11455 * dfp.h: Include "dboulest.h" and "expression.h".
11456
11457 2017-01-06 Yao Qi <yao.qi@linaro.org>
11458
11459 * ax-gdb.h: Include "ax.h".
11460
11461 2017-01-06 Yao Qi <yao.qi@linaro.org>
11462
11463 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11464 with nat/gdb_ptrace.h.
11465
11466 2017-01-05 Yao Qi <yao.qi@linaro.org>
11467
11468 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11469 new line.
11470 (mips64_fbsd_sigframe_init): Likewise.
11471
11472 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11473
11474 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11475 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11476
11477 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11478
11479 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11480 * NEWS: Mention new FreeBSD/mips native configuration.
11481 * config/mips/fbsd.mh: New file.
11482 * configure.host: Add mips*-*-freebsd*.
11483 * mips-fbsd-nat.c: New file.
11484
11485 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11486
11487 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11488 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11489 * NEWS: Mention new FreeBSD/mips target.
11490 * configure.tgt: Add mips*-*-freebsd*.
11491 * mips-fbsd-tdep.c: New file.
11492 * mips-fbsd-tdep.h: New file.
11493
11494 2017-01-04 Yao Qi <yao.qi@linaro.org>
11495
11496 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11497 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11498
11499 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11500
11501 Update copyright year range in all GDB files.
11502
11503 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11504
11505 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11506
11507 For older changes see ChangeLog-2016.
11508 \f
11509 Local Variables:
11510 mode: change-log
11511 left-margin: 8
11512 fill-column: 74
11513 version-control: never
11514 coding: utf-8
11515 End:
This page took 0.254805 seconds and 5 git commands to generate.