Constify interpreter_exec_cmd
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-27 Tom Tromey <tom@tromey.com>
2
3 * interps.c (interpreter_exec_cmd): Constify.
4
5 2017-09-27 Tom Tromey <tom@tromey.com>
6
7 * record-full.c (cmd_record_full_restore): Constify.
8
9 2017-09-27 Tom Tromey <tom@tromey.com>
10
11 * memattr.c (enable_mem_command, disable_mem_command)
12 (delete_mem_command): Constify.
13
14 2017-09-27 Tom Tromey <tom@tromey.com>
15
16 * value.c (show_convenience): Constify.
17
18 2017-09-27 Tom Tromey <tom@tromey.com>
19
20 * gdbcore.h (core_file_command): Update.
21 * corefile.c (core_file_command): Constify.
22
23 2017-09-27 Tom Tromey <tom@tromey.com>
24
25 * user-regs.c (maintenance_print_user_registers): Constify.
26
27 2017-09-27 Tom Tromey <tom@tromey.com>
28
29 * cp-namespace.c (maintenance_cplus_namespace): Constify.
30
31 2017-09-27 Tom Tromey <tom@tromey.com>
32
33 * cp-support.c (first_component_command): Constify.
34
35 2017-09-27 Tom Tromey <tom@tromey.com>
36
37 * psymtab.c (maintenance_print_psymbols)
38 (maintenance_info_psymtabs, maintenance_check_psymtabs):
39 Constify.
40
41 2017-09-27 Tom Tromey <tom@tromey.com>
42
43 * windows-tdep.c (display_tib): Constify.
44
45 2017-09-27 Tom Tromey <tom@tromey.com>
46
47 * linux-fork.c (delete_checkpoint_command)
48 (detach_checkpoint_command): Constify.
49
50 2017-09-27 Tom Tromey <tom@tromey.com>
51
52 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
53
54 2017-09-27 Tom Tromey <tom@tromey.com>
55
56 * arc-tdep.c (dump_arc_instruction_command): Constify.
57
58 2017-09-27 Tom Tromey <tom@tromey.com>
59
60 * valprint.c (set_radix, show_radix): Constify.
61
62 2017-09-27 Tom Tromey <tom@tromey.com>
63
64 * dtrace-probe.c (info_probes_dtrace_command): Constify.
65
66 2017-09-27 Tom Tromey <tom@tromey.com>
67
68 * command.h (not_just_help_class_command): Update.
69 * cli/cli-decode.h (not_just_help_class_command): Update.
70 * cli/cli-decode.c (not_just_help_class_command): Constify.
71
72 2017-09-27 Tom Tromey <tom@tromey.com>
73
74 * gdb_bfd.c (maintenance_info_bfds): Constify.
75
76 2017-09-27 Tom Tromey <tom@tromey.com>
77
78 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
79 overloads.
80 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
81 (do_const_cfunc): New function.
82 (cmd_cfunc_eq): New overload.
83 (cli_user_command_p): Check do_const_cfunc.
84 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
85 const_cfunc.
86 * command.h (add_cmd): Add const overload and no-function
87 overload.
88 (set_cmd_cfunc): Add const overload.
89 (cmd_const_cfunc_ftype): Declare.
90 (cmd_cfunc_eq): Add const overload.
91 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
92 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
93 overload.
94
95 2017-09-27 Tom Tromey <tom@tromey.com>
96
97 * macroexp.c (get_next_token_for_substitution): New function.
98 (substitute_args): Call it. Check for __VA_OPT__.
99
100 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
101 Pedro Alves <palves@redhat.com>
102
103 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
104 producer_is_icc_lt_14.
105 (producer_is_icc_lt_14): New function.
106 (check_producer): Add code for checking version of ICC.
107 (producer_is_icc): Move to producer.c.
108 (read_structure_type): Restrict ICC workaround to ICC<14.
109 * producer.c: Include selftest.h.
110 (producer_is_icc, producer_parsing_tests, _initialize_producer):
111 New functions.
112 * producer.h (producer_is_icc): New declaration.
113
114 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
115
116 * Makefile.in (SFILES): Add producer.c.
117 (COMMON_OBS): Add producer.o
118 * amd64-tdep.c (producer.h): Add new include.
119 * dwarf2read.c (producer.h): Add new include.
120 * producer.c: New file.
121 * producer.h: New file.
122 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
123 producer.c.
124 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
125 producer.h.
126
127 2017-09-26 Matthias Klose <doko@ubuntu.com>
128
129 * configure.ac: Search ncursesw before ncurses.
130 Check ncursesw/ncurses.h before ncurses/ncurses.h.
131 * gdb_curses.h: Include <ncursesw/ncurses.h>
132 * config.in, configure: Regenerate.
133
134 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
135
136 PR gdb/22185
137 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
138 obsolete.
139 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
140 Remove i386sol2 support.
141 * configure.nat <i386sol2>: Remove.
142 <sol2-64>: Fold into ...
143 <sol2>: ... this.
144 Move common settings to default section.
145 Add sol-thread.o.
146 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
147 x86_64-*-solaris2.1[0-9]*>: Rename to ...
148 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
149 <i[34567]86-*-solaris*>: Remove.
150 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
151
152 * configure.ac: Remove wctype in libw check.
153 (_MSE_INT_H): Don't define on Solaris 7-9.
154 <solaris*>: Remove libthread_db.so.1 check.
155 * configure: Regenerate.
156 * config.in: Regenerate.
157
158 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
159 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
160 (gdb_ps_size_t): Remove.
161 Use base types in users.
162 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
163
164 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
165
166 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
167
168 PR build/22206
169 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
170 (adi_is_addr_mapped): Likewise.
171 (PSR_ICC): Don't redefine.
172 (PSR_IMPL): Likewise.
173
174 2017-09-25 Tom Tromey <tom@tromey.com>
175
176 * regcache.c (regcache::dump): Use string_printf.
177
178 2017-09-25 Tom Tromey <tom@tromey.com>
179
180 * regcache.c (class regcache_invalidator): New.
181 (struct register_to_invalidate): Remove.
182 (make_cleanup_regcache_invalidate): Remove.
183 (regcache::raw_write): Use regcache_invalidator.
184
185 2017-09-25 Tom Tromey <tom@tromey.com>
186
187 * spu-tdep.c (spu2ppu_sniffer): Update.
188 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
189 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
190 Remove.
191 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
192 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
193 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
194 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
195 (frame_pop): Update.
196
197 2017-09-25 Tom Tromey <tom@tromey.com>
198
199 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
200 * regcache.h (regcache_xfree): Don't declare.
201 * regcache.c (regcache_xfree): Remove.
202 (do_regcache_xfree): Use delete.
203 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
204 * linux-fork.c (free_fork): Use delete.
205 (fork_save_infrun_state): Likewise.
206 * jit.c (jit_dealloc_cache): Use delete.
207 * infrun.c (discard_infcall_suspend_state): Use delete.
208
209 2017-09-25 Tom Tromey <tom@tromey.com>
210
211 * regcache.h (regcache_xmalloc): Don't declare.
212 (regcache_raw_set_cached_value): Update comment.
213 * regcache.c (regcache_xmalloc): Remove.
214 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
215 * jit.c (jit_frame_sniffer): Use new.
216 * frame.c (frame_save_as_regcache): Use new.
217
218 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
219
220 * NEWS: Advertise support for guarded-storage registers on IBM z.
221
222 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
223
224 * s390-linux-nat.c (have_regset_gs): New static variable.
225 (s390_linux_fetch_inferior_registers): Handle guarded-storage
226 control block and guarded-storage broadcast control regsets.
227 (s390_read_description): Detect whether the target has
228 guarded-storage support, return appropriate tdesc.
229 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
230 (features/s390x-gs-linux64.c): Likewise.
231 (struct gdbarch_tdep) <have_gs>: New field.
232 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
233 (s390_gsbc_regset): New variables.
234 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
235 and s390_gsbc_regset, if applicable.
236 (s390_core_read_description): Check whether core file was from a
237 target with guarded-storage support; include appropriate regsets.
238 (s390_gdbarch_init): Add registers for guarded-storage support.
239 (_initialize_s390_tdep): Initialize new target descriptions that
240 include registers for guarded-storage support.
241 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
242 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
243 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
244 (S390_NUM_REGS): Adjust macro definition.
245 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
246 (tdesc_s390x_gs_linux64): New declarations.
247
248 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
249
250 * features/s390-gs-linux64.xml: New file.
251 * features/s390-gs.xml: New file.
252 * features/s390-gsbc.xml: New file.
253 * features/s390x-gs-linux64.xml: New file.
254 * features/Makefile (WHICH): Add s390-gs-linux64 and
255 s390x-gs-linux64.
256 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
257 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
258 * features/s390-gs-linux64.c: New generated file.
259 * features/s390x-gs-linux64.c: New file.
260 * regformats/s390-gs-linux64.dat: New file.
261 * regformats/s390x-gs-linux64.dat: New file.
262
263 2017-09-23 Tom Tromey <tom@tromey.com>
264
265 * defs.h (make_cleanup_override_quit_handler): Don't declare.
266
267 2017-09-22 Tom Tromey <tom@tromey.com>
268
269 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
270 type to scoped_restore_tmpl.
271 <scoped_input_handler>: Initialize m_quit_handler directly.
272
273 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
274
275 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
276 (cd_command): Likewise. Free "current_directory" before
277 assigning to it.
278 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
279 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
280 * top.c (gdb_dirbuf): Remove global declaration.
281 * top.h (gdb_dirbuf): Likewise.
282
283 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
284
285 * gnulib/aclocal.m4: Regenerate.
286 * gnulib/config.in: Regenerate.
287 * gnulib/configure: Regenerate.
288 * gnulib/import/Makefile.am: Regenerate.
289 * gnulib/import/Makefile.in: Regenerate.
290 * gnulib/import/assure.h: New file.
291 * gnulib/import/at-func.c: Likewise
292 * gnulib/import/chdir-long.c: New file.
293 * gnulib/import/chdir-long.h: New file.
294 * gnulib/import/cloexec.c: New file.
295 * gnulib/import/cloexec.h: New file.
296 * gnulib/import/close.c: New file.
297 * gnulib/import/closedir.c: New file.
298 * gnulib/import/dirent-private.h: New file.
299 * gnulib/import/dup-safer.c: New file.
300 * gnulib/import/dup.c: New file.
301 * gnulib/import/dup2.c: New file.
302 * gnulib/import/error.c: New file.
303 * gnulib/import/error.h: New file.
304 * gnulib/import/exitfail.c: New file.
305 * gnulib/import/exitfail.h: New file.
306 * gnulib/import/fchdir.c: New file.
307 * gnulib/import/fcntl.c: New file.
308 * gnulib/import/fcntl.in.h: New file.
309 * gnulib/import/fd-hook.c: New file.
310 * gnulib/import/fd-hook.h: New file.
311 * gnulib/import/fd-safer.c: New file.
312 * gnulib/import/fdopendir.c: New file.
313 * gnulib/import/filename.h: New file.
314 * gnulib/import/filenamecat-lgpl.c: New file.
315 * gnulib/import/filenamecat.h: New file.
316 * gnulib/import/fstat.c: New file.
317 * gnulib/import/fstatat.c: New file.
318 * gnulib/import/getcwd-lgpl.c: New file.
319 * gnulib/import/getcwd.c: New file.
320 * gnulib/import/getdtablesize.c: New file.
321 * gnulib/import/getlogin_r.c: New file.
322 * gnulib/import/getprogname.c: New file.
323 * gnulib/import/getprogname.h: New file.
324 * gnulib/import/gettext.h: New file.
325 * gnulib/import/glob-libc.h: New file.
326 * gnulib/import/glob.c: New file.
327 * gnulib/import/glob.in.h: New file.
328 * gnulib/import/intprops.h: New file.
329 * gnulib/import/m4/chdir-long.m4: New file.
330 * gnulib/import/m4/close.m4: New file.
331 * gnulib/import/m4/closedir.m4: New file.
332 * gnulib/import/m4/d-ino.m4: New file.
333 * gnulib/import/m4/d-type.m4: New file.
334 * gnulib/import/m4/dup.m4: New file.
335 * gnulib/import/m4/dup2.m4: New file.
336 * gnulib/import/m4/error.m4: New file.
337 * gnulib/import/m4/fchdir.m4: New file.
338 * gnulib/import/m4/fcntl.m4: New file.
339 * gnulib/import/m4/fcntl_h.m4: New file.
340 * gnulib/import/m4/fdopendir.m4: New file.
341 * gnulib/import/m4/filenamecat.m4: New file.
342 * gnulib/import/m4/fstat.m4: New file.
343 * gnulib/import/m4/fstatat.m4: New file.
344 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
345 * gnulib/import/m4/getcwd-path-max.m4: New file.
346 * gnulib/import/m4/getcwd.m4: New file.
347 * gnulib/import/m4/getdtablesize.m4: New file.
348 * gnulib/import/m4/getlogin_r.m4: New file.
349 * gnulib/import/m4/getprogname.m4: New file.
350 * gnulib/import/m4/glob.m4: New file.
351 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
352 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
353 * gnulib/import/m4/mempcpy.m4: New file.
354 * gnulib/import/m4/memrchr.m4: New file.
355 * gnulib/import/m4/mode_t.m4: New file.
356 * gnulib/import/m4/msvc-inval.m4: New file.
357 * gnulib/import/m4/msvc-nothrow.m4: New file.
358 * gnulib/import/m4/open.m4: New file.
359 * gnulib/import/m4/openat.m4: New file.
360 * gnulib/import/m4/opendir.m4: New file.
361 * gnulib/import/m4/readdir.m4: New file.
362 * gnulib/import/m4/realloc.m4: New file.
363 * gnulib/import/m4/rewinddir.m4: New file.
364 * gnulib/import/m4/save-cwd.m4: New file.
365 * gnulib/import/m4/strdup.m4: New file.
366 * gnulib/import/m4/strerror.m4: New file.
367 * gnulib/import/m4/unistd-safer.m4: New file.
368 * gnulib/import/mempcpy.c: New file.
369 * gnulib/import/memrchr.c: New file.
370 * gnulib/import/msvc-inval.c: New file.
371 * gnulib/import/msvc-inval.h: New file.
372 * gnulib/import/msvc-nothrow.c: New file.
373 * gnulib/import/msvc-nothrow.h: New file.
374 * gnulib/import/open.c: New file.
375 * gnulib/import/openat-die.c: New file.
376 * gnulib/import/openat-priv.h: New file.
377 * gnulib/import/openat-proc.c: New file.
378 * gnulib/import/openat.c: New file.
379 * gnulib/import/openat.h: New file.
380 * gnulib/import/opendir.c: New file.
381 * gnulib/import/pipe-safer.c: New file.
382 * gnulib/import/readdir.c: New file.
383 * gnulib/import/realloc.c: New file.
384 * gnulib/import/rewinddir.c: New file.
385 * gnulib/import/save-cwd.c: New file.
386 * gnulib/import/save-cwd.h: New file.
387 * gnulib/import/strdup.c: New file.
388 * gnulib/import/strerror-override.c: New file.
389 * gnulib/import/strerror-override.h: New file.
390 * gnulib/import/strerror.c: New file.
391 * gnulib/import/unistd--.h: New file.
392 * gnulib/import/unistd-safer.h: New file.
393 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
394 "getcwd" and "glob".
395 * ser-tcp.c: Undefine "close" before redefining it.
396
397 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
398
399 * guile/scm-value.c (gdbscm_value_address): Initialize address,
400 get rid of res_val.
401
402 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
403
404 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
405 <sol2,sparc>: Likewise.
406 <sol2-64,i386>: Likewise.
407
408 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
409 -Wdeprecated-declarations on *-*-solaris*.
410 * configure: Regenerate.
411
412 * procfs.c: Include "nat/inferior.h".
413 (procfs_info_proc): Fix typo.
414
415 2017-09-21 Kevin Buettner <kevinb@redhat.com>
416
417 * remote.c (vector): Include.
418 (struct private_thread_info): Add field, thread_handle.
419 (free_private_thread_info): Deallocate storage associated with
420 thread handle.
421 (get_private_info_thread): Initialize `thread_handle' field.
422 (struct thread_item): Add field, thread_handle.
423 (clear_threads_listing_context): Deallocate storage associated
424 with thread handle.
425 (start_thread): Add support for "handle" attribute.
426 (thread_attributes): Add "handle".
427 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
428 field.
429 (remote_update_thread_list): Update thread_handle.
430 (remote_thread_handle_to_thread_info): New function.
431 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
432
433 2017-09-21 Kevin Buettner <kevinb@redhat.com>
434
435 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
436 function.
437 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
438 * python/python-internal.h (thread_object_type): Declare.
439
440 2017-09-21 Kevin Buettner <kevinb@redhat.com>
441
442 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
443 (target_thread_handle_to_thread_info): Declare.
444 * target.c (target_thread_handle_to_thread_info): New function.
445 * target-delegates.c: Regenerate.
446 * gdbthread.h (find_thread_by_handle): Declare.
447 * thread.c (find_thread_by_handle): New function.
448 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
449 function.
450 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
451
452 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
453
454 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
455
456 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
457
458 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
459
460 2017-09-21 Yao Qi <yao.qi@linaro.org>
461
462 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
463 to gdb_target_obs.
464
465 2017-09-20 Tom Tromey <tom@tromey.com>
466
467 * breakpoint.c (struct counted_command_line): Remove.
468 (breakpoint_commands): Update.
469 (alloc_counted_command_line, incref_counted_command_line)
470 (decref_counted_command_line, do_cleanup_counted_command_line)
471 (make_cleanup_decref_counted_command_line): Remove.
472 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
473 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
474 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
475 (save_breakpoints): Update.
476 * breakpoint.h (counted_command_line): Now a typedef to
477 shared_ptr.
478 (struct breakpoint) <commands>: Now a counted_command_line.
479 (struct bpstats) <command>: Likewise.
480
481 2017-09-20 Tom Tromey <tom@tromey.com>
482
483 * breakpoint.c (struct commands_info, do_map_commands_command):
484 Remove.
485 (commands_command_1): Update.
486 (iterate_over_related_breakpoints): Take a function_view.
487 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
488 (delete_command): Update.
489 (map_breakpoint_numbers): Take a function_view.
490 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
491 (disable_command): Update.
492 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
493 (enable_command): Update.
494 (struct disp_data, do_enable_breakpoint_disp)
495 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
496 (do_map_enable_delete_breakpoint): Remove.
497 (enable_once_command, enable_count_command, enable_delete_command)
498 (delete_trace_variable_command): Update.
499
500 2017-09-20 Tom Tromey <tom@tromey.com>
501
502 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
503 (bpstat_clear): Use delete.
504 (bpstats): New constructors.
505 (bpstat_copy, bpstat_stop_status): Use new.
506 (dprintf_after_condition_true): Update.
507 * breakpoint.h (bpstats::bpstats): Add constructors.
508 (bpstats::~bpstats): Add destructor.
509
510 2017-09-20 Pedro Alves <palves@redhat.com>
511
512 * eval.c (make_params): Delete, refactored as ...
513 (class fake_method): ... this new type's ctor.
514 (fake_method::~fake_method): New.
515 (evaluate_subexp_standard): Use 'fake_method'.
516
517 2017-09-20 Tom Tromey <tom@tromey.com>
518
519 * windows-nat.c (get_windows_debug_event, windows_wait)
520 (do_initial_windows_stuff, windows_attach): Update.
521 * utils.c (vwarning, internal_vproblem): Update.
522 (ui_unregister_input_event_handler_cleanup)
523 (prepare_to_handle_input): Remove.
524 (class scoped_input_handler): New.
525 (defaulted_query, prompt_for_continue): Update.
526 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
527 Update.
528 * top.c (undo_terminal_modifications_before_exit): Update.
529 * target/target.h (target_terminal_init, target_terminal_inferior)
530 (target_terminal_ours): Don't declare.
531 (class target_terminal): New.
532 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
533 (target_terminal_ours_for_output)
534 (make_cleanup_restore_target_terminal): Don't declare.
535 (target_terminal_info): Remove.
536 * target.c (enum terminal_state, terminal_state): Remove.
537 (target_terminal::terminal_state): Define.
538 (target_terminal::init): Rename from target_terminal_init.
539 (target_terminal::inferior): Rename from
540 target_terminal_inferior.
541 (target_terminal::ours): Rename from target_terminal_ours.
542 (target_terminal::ours_for_output): Rename from
543 target_terminal_ours_for_output.
544 (target_terminal::info): New method.
545 (cleanup_restore_target_terminal)
546 (make_cleanup_restore_target_terminal): Remove.
547 * solib.c (handle_solib_event): Update.
548 * remote.c (remote_serial_quit_handler): Update.
549 (remote_terminal_inferior, remote_wait_as): Update.
550 * record-full.c (record_full_wait_1): Update.
551 * nto-procfs.c (procfs_create_inferior): Update.
552 * nat/fork-inferior.c (startup_inferior): Update.
553 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
554 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
555 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
556 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
557 (mi_breakpoint_created, mi_breakpoint_deleted)
558 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
559 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
560 (mi_user_selected_context_changed, report_initial_inferior):
561 Update.
562 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
563 (linux_nat_terminal_inferior): Update.
564 * infrun.c (follow_fork_inferior)
565 (handle_vfork_child_exec_or_exit, do_target_resume)
566 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
567 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
568 Update.
569 * inflow.c (child_terminal_init, info_terminal_command): Update.
570 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
571 (attach_command): Update.
572 * infcall.c (call_thread_fsm_should_stop): Update.
573 * gnu-nat.c (gnu_attach): Update.
574 * extension.c (struct active_ext_lang_state)
575 (restore_active_ext_lang): Update.
576 * exceptions.c (print_flush): Update.
577 * event-top.c (async_enable_stdin, default_quit_handler): Update.
578 (struct quit_handler_cleanup_data, restore_quit_handler)
579 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
580 Remove.
581 * cp-support.c (gdb_demangle): Update.
582 * breakpoint.c (update_inserted_breakpoint_locations)
583 (insert_breakpoint_locations, handle_jit_event)
584 (disable_breakpoints_in_unloaded_shlib): Update.
585 * annotate.c (annotate_breakpoints_invalid)
586 (annotate_frames_invalid): Update.
587
588 2017-09-20 Tom Tromey <tom@tromey.com>
589
590 * main.c (catch_command_errors): Rename from
591 catch_command_errors_const.
592 (captured_main_1): Update.
593
594 2017-09-20 Pedro Alves <palves@redhat.com>
595
596 * cli/cli-cmds.c (list_command): Use print_sal_location.
597 (print_sal_location): New function.
598 (ambiguous_line_spec): Use print_sal_location.
599 * linespec.c (symbol_to_sal): Record the symbol in the sal.
600 * symtab.c (find_function_start_sal): Likewise.
601 * symtab.h (symtab_and_line::symbol): New field.
602
603 2017-09-20 Pedro Alves <palves@redhat.com>
604
605 * linespec.c (minsym_found): Handle non-text minsyms.
606 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
607
608 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
609
610 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
611 backslash.
612
613 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
614
615 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
616 vmovups instead vmovaps.
617 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
618
619 2017-09-19 John Baldwin <jhb@FreeBSD.org>
620
621 * NEWS (Changes since GDB 8.0): Add starti.
622 * infcmd.c (enum run_break): New.
623 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
624 case.
625 (run_command): Use enum run_how.
626 (start_command): Likewise.
627 (starti_command): New function.
628 (RUN_ARGS_HELP): New macro.
629 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
630 commands. Add starti command.
631
632 2017-09-19 Yao Qi <yao.qi@linaro.org>
633
634 * Makefile.in (monitor.o): Remove the rule.
635
636 2017-09-19 Yao Qi <yao.qi@linaro.org>
637
638 * annotate.h (struct annotate_arg_emitter): Use
639 DISABLE_COPY_AND_ASSIGN.
640 * common/refcounted-object.h (refcounted_object): Likewise.
641 * completer.h (struct completion_result): Likewise.
642 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
643 * filename-seen-cache.h (filename_seen_cache): Likewise.
644 * gdbcore.h (thread_section_name): Likewise.
645 * gdb_regex.h (compiled_regex): Likewise.
646 * gdbthread.h (scoped_restore_current_thread): Likewise.
647 * inferior.h (scoped_restore_current_inferior): Likewise.
648 * jit.c (jit_reader): Likewise.
649 * linespec.h (struct linespec_result): Likewise.
650 * mi/mi-parse.h (struct mi_parse): Likewise.
651 * nat/fork-inferior.c (execv_argv): Likewise.
652 * progspace.h (scoped_restore_current_program_space): Likewise.
653 * python/python-internal.h (class gdbpy_enter): Likewise.
654 * regcache.h (regcache): Likewise.
655 * target-descriptions.c (struct tdesc_reg): Likewise.
656 (struct tdesc_type): Likewise.
657 (struct tdesc_feature): Likewise.
658 * ui-out.h (ui_out_emit_type): Likewise.
659
660 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
661
662 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
663 label abort_expression.
664
665 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
666
667 * common/buffer.c (buffer_xml_printf): Adjust.
668 * common/xml-utils.c (xml_escape_text): Change return type to
669 std::string, update code accordingly.
670 * common/xml-utils.h (xml_escape_text): Change return type to
671 std::string.
672 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
673 * windows-tdep.c (windows_xfer_shared_library): Adjust.
674 * unittests/xml-utils-selftests.c (test_xml_escape_text):
675 Adjust.
676
677 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
678
679 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
680 (SUBDIR_UNITTESTS_OBS): Add new object file.
681 * unittests/xml-utils-selftests.c: New file.
682
683 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
684
685 * common/selftest.h (selftest): New struct/interface.
686 (register_test): Add name parameter, add new overload.
687 (run_tests): Add filter parameter.
688 (for_each_selftest_ftype): New typedef.
689 (for_each_selftest): New declaration.
690 * common/selftest.c (tests): Change type to
691 map<string, unique_ptr<selftest>>.
692 (simple_selftest): New struct.
693 (register_test): New function.
694 (register_test): Add name parameter and use it.
695 (run_tests): Add filter parameter and use it. Add prints.
696 Adjust to vector -> map change.
697 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
698 registering selftests.
699 * arm-tdep.c (_initialize_arm_tdep): Likewise.
700 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
701 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
702 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
703 * findvar.c (_initialize_findvar): Likewise.
704 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
705 * maint.c (maintenance_selftest): Update call to run_tests.
706 (maintenance_info_selftests): New function.
707 (_initialize_maint_cmds): Register "maintenance info selftests"
708 command. Update "maintenance selftest" doc.
709 * regcache.c (_initialize_regcache): Add names when registering
710 selftests.
711 * rust-exp.y (_initialize_rust_exp): Likewise.
712 * selftest-arch.c (gdbarch_selftest): New struct.
713 (gdbarch_tests): Remove.
714 (register_test_foreach_arch): Add name parameter. Call
715 register_test.
716 (tests_with_arch): Remove, move most content to
717 gdbarch_selftest::operator().
718 (_initialize_selftests_foreach_arch): Remove.
719 * selftest-arch.h (register_test_foreach_arch): Add name
720 parameter.
721 (run_tests_with_arch): New declaration.
722 * utils-selftests.c (_initialize_utils_selftests): Add names
723 when registering selftests.
724 * utils.c (_initialize_utils): Likewise.
725 * unittests/array-view-selftests.c
726 (_initialize_array_view_selftests): Likewise.
727 * unittests/environ-selftests.c (_initialize_environ_selftests):
728 Likewise.
729 * unittests/function-view-selftests.c
730 (_initialize_function_view_selftests): Likewise.
731 * unittests/offset-type-selftests.c
732 (_initialize_offset_type_selftests): Likewise.
733 * unittests/optional-selftests.c
734 (_initialize_optional_selftests): Likewise.
735 * unittests/scoped_restore-selftests.c
736 (_initialize_scoped_restore_selftests): Likewise.
737 * NEWS: Document "maintenance selftest" and "maint info
738 selftests".
739
740 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
741
742 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
743 scoped_restore.
744
745 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
746
747 * mi/mi-main.c (mi_load_progress): Make uiout variable
748 a unique_ptr.
749
750 2017-09-15 Pedro Alves <palves@redhat.com>
751
752 * compile/compile-c-types.c (convert_enum, convert_int)
753 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
754
755 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
756
757 * dwarf2read.c (copy_string): Remove.
758 (parse_macro_definition): Replace copy_string with savestring.
759
760 2017-09-15 Yao Qi <yao.qi@linaro.org>
761
762 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
763 gdb_target_obs.
764 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
765 Likewise.
766 (i[34567]86-*-linux*): Likewise.
767
768 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
769
770 * dwarf2expr.h (dwarf_stack_value): Add constructor.
771 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
772 <stack>: Change type to std::vector.
773 <stack_len, stack_allocated>: Remove.
774 <grow_stack>: Remove.
775 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
776 (dwarf_expr_context::~dwarf_expr_context): Remove.
777 (dwarf_expr_context::grow_stack): Remove.
778 (dwarf_expr_context::push): Adjust.
779 (dwarf_expr_context::pop): Adjust.
780 (dwarf_expr_context::fetch): Adjust.
781 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
782 (dwarf_expr_context::stack_empty_p): Adjust.
783 (dwarf_expr_context::execute_stack_op): Adjust.
784
785 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
786
787 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
788 return type to bool.
789 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
790
791 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
792
793 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
794 Change type to bool.
795 (dwarf_stack_value) <in_stack_memory>: Likewise.
796 (dwarf_expr_context) <push_address>: Change parameter type to
797 bool.
798 <fetch_in_stack_memory>: Change return type to bool.
799 <push>: Change parameter type to bool.
800 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
801 to bool.
802 (dwarf_expr_context::push_address): Likewise.
803 (dwarf_expr_context::fetch_in_stack_memory): Change return type
804 to bool.
805 (dwarf_expr_context::execute_stack_op): Adjust.
806 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
807
808 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
809
810 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
811 (struct dwarf_expr_context) <n_pieces>: Remove.
812 <pieces>: Change type to std::vector.
813 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
814 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
815 pieces.
816 (dwarf_expr_context::add_piece): Adjust.
817 * dwarf2loc.c (struct piece_closure): Initialize fields.
818 <n_pieces>: Remove.
819 <pieces>: Change type to std::vector.
820 (allocate_piece_closure): Adjust, change parameter to
821 std::vector rvalue and std::move it to piece_closure.
822 (rw_pieced_value): Adjust.
823 (check_pieced_synthetic_pointer): Adjust.
824 (indirect_synthetic_pointer): Adjust.
825 (coerce_pieced_ref): Adjust.
826 (free_pieced_value_closure): Adjust. Use delete to free
827 piece_closure.
828 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
829 to allocate_piece_closure.
830 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
831
832 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
833
834 * probe.h (probe_ops_cp): Remove typedef.
835 (DEF_VEC_P (probe_ops_cp)): Remove.
836 (all_probe_ops): Change type to std::vector.
837 * probe.c (info_probes_for_ops): Adjust to vector change.
838 (probe_linespec_to_ops): Likewise.
839 (all_probe_ops): Change type to std::vector.
840 (_initialize_probe): Adjust to vector change.
841 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
842 * elfread.c (elf_get_probes): Likewise.
843 * stap-probe.c (_initialize_stap_probe): Likewise.
844
845 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
846
847 * probe.h (struct bound_probe): Define constructors.
848 * probe.c (bound_probe_s): Remove typedef.
849 (DEF_VEC_O (bound_probe_s)): Remove VEC.
850 (collect_probes): Change return type to std::vector, remove
851 cleanup.
852 (compare_probes): Return bool, change parameter type. Change
853 semantic to "less than".
854 (gen_ui_out_table_header_info): Change parameter to std::vector
855 and update.
856 (exists_probe_with_pops): Likewise.
857 (info_probes_for_ops): Update to std::vector change.
858 (enable_probes_command): Likewise.
859 (disable_probes_command): Likewise.
860
861 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
862
863 * probe.h (struct probe_ops) <get_probes>: Change parameter from
864 vec to std::vector.
865 * probe.c (parse_probes_in_pspace): Update.
866 (find_probes_in_objfile): Update.
867 (find_probe_by_pc): Update.
868 (collect_probes): Update.
869 (probe_any_get_probes): Update.
870 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
871 return type to reference to std::vector.
872 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
873 std::vector and update.
874 (dtrace_process_dof): Likewise.
875 (dtrace_get_probes): Likewise.
876 * elfread.c (elf_get_probes): Change return type to std::vector,
877 store an std::vector in bfd_data.
878 (probe_key_free): Update to std::vector.
879 * stap-probe.c (handle_stap_probe): Change parameter to
880 std::vector and update.
881 (stap_get_probes): Likewise.
882 * symfile-debug.c (debug_sym_get_probes): Change return type to
883 std::vector and update.
884
885 2017-09-11 Tom Tromey <tom@tromey.com>
886
887 * breakpoint.c (program_breakpoint_here_p): Update.
888 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
889 from make_show_memory_breakpoints_cleanup. Return a
890 scoped_restore_tmpl<int>.
891 (restore_show_memory_breakpoints): Remove.
892 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
893 * mem-break.c (memory_validate_breakpoint): Update.
894 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
895 (ia64_memory_remove_breakpoint): Update.
896 (ia64_breakpoint_from_pc): Update.
897 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
898 from make_show_memory_breakpoints_cleanup.
899
900 2017-09-11 Tom Tromey <tom@tromey.com>
901
902 * d-namespace.c (d_lookup_symbol): Use std::string.
903 (find_symbol_in_baseclass): Likewise.
904
905 2017-09-11 Tom Tromey <tom@tromey.com>
906
907 * ctf.c (ctf_start): Use std::string.
908
909 2017-09-11 Tom Tromey <tom@tromey.com>
910
911 * ada-lang.c (is_known_support_routine): Update.
912 (ada_unhandled_exception_name_addr_from_raise): Update.
913 * guile/scm-frame.c (gdbscm_frame_name): Update.
914 * python/py-frame.c (frapy_name): Update.
915 (frapy_function): Update.
916 * stack.h (find_frame_funname): Update.
917 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
918 (print_frame): Update.
919
920 2017-09-11 Tom Tromey <tom@tromey.com>
921
922 * findcmd.c (put_bits): Take a gdb::byte_vector.
923 (parse_find_args): Return gdb::byte_vector. "args" now const.
924 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
925 cleanups.
926 (find_command): Update.
927
928 2017-09-11 Tom Tromey <tom@tromey.com>
929
930 * cli/cli-script.c (class scoped_restore_hook_in): New.
931 (clear_hook_in_cleanup): Remove.
932 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
933 scoped_restore_hook_in.
934
935 2017-09-11 Tom Tromey <tom@tromey.com>
936
937 * cli/cli-script.c (restore_interp): Remove.
938 (read_command_lines): Use scoped_restore_interp.
939 * interps.c (scoped_restore_interp::set_temp): Rename from
940 interp_set_temp.
941 * interps.h (class scoped_restore_interp): New.
942 (interp_set_temp): Remove.
943
944 2017-09-11 Tom Tromey <tom@tromey.com>
945
946 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
947 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
948 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
949 scoped_restore.
950 (mi_cmd_break_insert_1): Update.
951 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
952 scoped_restore.
953
954 2017-09-11 Tom Tromey <tom@tromey.com>
955
956 * demangle.c (demangle_command): Update.
957 * breakpoint.c (disable_command): Update.
958 (enable_command): Update.
959 (find_location_by_number): Make "number" const. Use
960 get_number_trailer.
961 * cli/cli-utils.c (extract_arg): Return std::string.
962 * probe.c (parse_probe_linespec): Update. Change types.
963 (collect_probes): Take string arguments.
964 (parse_probe_linespec): Likewise.
965 (info_probes_for_ops): Update.
966 (enable_probes_command): Update.
967 (disable_probes_command): Update.
968 * break-catch-sig.c (catch_signal_split_args): Update.
969 * mi/mi-parse.c (mi_parse): Update.
970
971 2017-09-11 Tom Tromey <tom@tromey.com>
972
973 * language.h (language_enum): Make argument const.
974 * language.c (language_enum): Make argument const.
975
976 2017-09-11 Tom Tromey <tom@tromey.com>
977
978 * common/common-utils.h (skip_to_space): Remove macro, redeclare
979 as function.
980 (skip_to_space): Rename from skip_to_space_const.
981 * common/common-utils.c (skip_to_space): New function.
982 (skip_to_space): Rename from skip_to_space_const.
983 * cli/cli-utils.h (get_number): Rename from get_number_const.
984 (extract_arg): Rename from extract_arg_const.
985 * cli/cli-utils.c (get_number): Rename from get_number_const.
986 (extract_arg): Rename from extract_arg_const.
987 (number_or_range_parser::get_number): Use ::get_number.
988 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
989 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
990 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
991 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
992 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
993 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
994 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
995 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
996
997 2017-09-11 Tom Tromey <tom@tromey.com>
998
999 * python/python.c (do_start_initialization): Use
1000 py-event-types.def to initialize types.
1001 Define all object type structures.
1002 * python/python-internal.h: Don't declare event initialization
1003 functions.
1004 * python/py-threadevent.c (thread_event_object_type): Don't
1005 define.
1006 * python/py-stopevent.c (stop_event_object_type): Don't define.
1007 * python/py-signalevent.c (signal_event_object_type): Don't
1008 declare or define.
1009 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1010 (clear_objfiles_event_object_type): Don't declare or define.
1011 * python/py-infevents.c (inferior_call_pre_event_object_type)
1012 (inferior_call_post_event_object_type)
1013 (register_changed_event_object_type)
1014 (memory_changed_event_object_type): Don't declare or define.
1015 * python/py-inferior.c (new_thread_event_object_type)
1016 (new_inferior_event_object_type)
1017 (inferior_deleted_event_object_type): Don't declare or define.
1018 * python/py-exitedevent.c (exited_event_object_type): Don't
1019 declare or define.
1020 * python/py-evts.c (gdbpy_initialize_py_events): Use
1021 py-all-events.def.
1022 * python/py-events.h (thread_event_object_type): Don't declare.
1023 (events_object): Use py-all-events.def.
1024 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1025 py-event-types.def.
1026 * python/py-event-types.def: New file.
1027 * python/py-continueevent.c (create_continue_event_object): Don't
1028 declare or define.
1029 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1030 declare or define.
1031 * python/py-all-events.def: New file.
1032
1033 2017-09-11 Tom Tromey <tom@tromey.com>
1034
1035 * python/py-threadevent.c (create_thread_event_object): Return
1036 gdbpy_ref.
1037 * python/py-stopevent.h (create_stop_event_object)
1038 (create_breakpoint_event_object, create_signal_event_object):
1039 Update.
1040 * python/py-stopevent.c (create_stop_event_object): Return
1041 gdbpy_ref.
1042 (emit_stop_event): Update.
1043 * python/py-signalevent.c (create_signal_event_object): Return
1044 gdbpy_ref.
1045 * python/py-infevents.c (create_inferior_call_event_object):
1046 Update.
1047 * python/py-event.h (create_event_object)
1048 (create_thread_event_object): Update.
1049 * python/py-event.c (create_event_object): Return gdbpy_ref.
1050 * python/py-continueevent.c: Return gdbpy_ref.
1051 * python/py-bpevent.c (create_breakpoint_event_object): Return
1052 gdbpy_ref.
1053
1054 2017-09-11 Tom Tromey <tom@tromey.com>
1055
1056 PR python/15622:
1057 * NEWS: Add entry.
1058 * python/python.c (do_start_initialization): Initialize new event
1059 types.
1060 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1061 (gdbpy_initialize_inferior_deleted_event)
1062 (gdbpy_initialize_new_thread_event): Declare.
1063 * python/py-threadevent.c (create_thread_event_object): Add option
1064 "thread" parameter.
1065 * python/py-inferior.c (new_thread_event_object_type)
1066 (new_inferior_event_object_type)
1067 (inferior_deleted_event_object_type): Declare.
1068 (python_new_inferior, python_inferior_deleted): New functions.
1069 (add_thread_object): Emit new_thread event.
1070 (gdbpy_initialize_inferior): Attach new functions to corresponding
1071 observers.
1072 (new_thread, new_inferior, inferior_deleted): Define new event
1073 types.
1074 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1075 registries.
1076 * python/py-events.h (events_object) <new_inferior,
1077 inferior_deleted, new_thread>: New fields.
1078 * python/py-event.h (create_thread_event_breakpoint): Add optional
1079 "thread" parameter.
1080
1081 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1082
1083 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1084 check current_ui instead.
1085 (internal_vproblem): Likewise.
1086
1087 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1088
1089 * thread.c (print_thread_info_1): Remove unnecessary calls to
1090 uiout->is_mi_like_p.
1091
1092 2017-09-09 Tom Tromey <tom@tromey.com>
1093
1094 * namespace.h (add_using_directive): Update.
1095 * namespace.c (add_using_directive): Change type of excludes to
1096 std::vector.
1097 * dwarf2read.c (read_import_statement): Use std::vector.
1098 (read_namespace): Update.
1099 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1100
1101 2017-09-09 Tom Tromey <tom@tromey.com>
1102
1103 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1104
1105 2017-09-09 Tom Tromey <tom@tromey.com>
1106
1107 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1108
1109 2017-09-09 Tom Tromey <tom@tromey.com>
1110
1111 * stack.c (func_command): Use gdb::def_vector.
1112
1113 2017-09-09 Tom Tromey <tom@tromey.com>
1114
1115 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1116 ui_out_emit_list, ui_out_emit_tuple.
1117 (mi_cmd_var_update): Likewise.
1118
1119 2017-09-09 Tom Tromey <tom@tromey.com>
1120
1121 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1122 ui_out_redirect_pop.
1123 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1124 ui_out_redirect_pop.
1125 * utils.c (do_ui_out_redirect_pop)
1126 (make_cleanup_ui_out_redirect_pop): Remove.
1127 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1128 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1129 * ui-out.h (ui_out_redirect_pop): New class.
1130
1131 2017-09-09 Tom Tromey <tom@tromey.com>
1132
1133 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1134 (list_available_thread_groups, mi_cmd_list_thread_groups)
1135 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1136 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1137 Likewise.
1138
1139 2017-09-09 Tom Tromey <tom@tromey.com>
1140
1141 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1142 ui_out_emit_tuple.
1143
1144 2017-09-09 Tom Tromey <tom@tromey.com>
1145
1146 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1147 * stack.c (print_frame): Use ui_out_emit_tuple.
1148 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1149 (info_spu_mailbox_command, info_spu_dma_command)
1150 (info_spu_proxydma_command): Likewise.
1151 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1152 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1153 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1154 ui_out_emit_tuple.
1155 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1156
1157 2017-09-09 Tom Tromey <tom@tromey.com>
1158
1159 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1160 (class ui_out_emit_table): Update comment.
1161 * ui-out.c (do_cleanup_table_end)
1162 (make_cleanup_ui_out_table_begin_end): Remove.
1163 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1164 (info_spu_dma_cmdlist): Likewise.
1165 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1166 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1167 ui_out_emit_table.
1168
1169 2017-09-09 Tom Tromey <tom@tromey.com>
1170
1171 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1172 ui_out_emit_list, gdb::optional.
1173
1174 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1175
1176 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1177 prototype.
1178 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1179 prototype.
1180 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1181 prototype.
1182 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1183 * ada-exp.y: Remove _initialize_ada_exp prototype.
1184 * ada-lang.c: Remove _initialize_ada_language prototype.
1185 * ada-tasks.c: Remove _initialize_tasks prototype.
1186 * addrmap.c: Remove _initialize_addrmap prototype.
1187 * agent.c: Remove _initialize_agent prototype.
1188 * aix-thread.c: Remove _initialize_aix_thread prototype.
1189 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1190 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1191 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1192 prototype.
1193 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1194 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1195 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1196 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1197 prototype.
1198 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1199 prototype.
1200 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1201 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1202 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1203 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1204 prototype.
1205 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1206 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1207 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1208 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1209 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1210 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1211 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1212 prototype.
1213 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1214 prototype.
1215 * annotate.c: Remove _initialize_annotate prototype.
1216 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1217 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1218 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1219 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1220 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1221 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1222 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1223 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1224 prototype.
1225 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1226 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1227 * auto-load.c: Remove _initialize_auto_load prototype.
1228 * auxv.c: Remove _initialize_auxv prototype.
1229 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1230 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1231 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1232 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1233 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1234 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1235 prototype.
1236 * break-catch-throw.c: Remove _initialize_break_catch_throw
1237 prototype.
1238 * breakpoint.c: Remove _initialize_breakpoint prototype.
1239 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1240 * btrace.c: Remove _initialize_btrace prototype.
1241 * charset.c: Remove _initialize_charset prototype.
1242 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1243 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1244 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1245 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1246 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1247 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1248 * coffread.c: Remove _initialize_coffread prototype.
1249 * compile/compile.c: Remove _initialize_compile prototype.
1250 * complaints.c: Remove _initialize_complaints prototype.
1251 * completer.c: Remove _initialize_completer prototype.
1252 * copying.awk: Remove _initialize_copying prototype.
1253 * copying.c: Regenerate.
1254 * core-regset.c: Remove _initialize_core_regset prototype.
1255 * corefile.c: Remove _initialize_core prototype.
1256 * corelow.c: Remove _initialize_corelow prototype.
1257 * cp-abi.c: Remove _initialize_cp_abi prototype.
1258 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1259 * cp-support.c: Remove _initialize_cp_support prototype.
1260 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1261 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1262 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1263 * ctf.c: Remove _initialize_ctf prototype.
1264 * d-lang.c: Remove _initialize_d_language prototype.
1265 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1266 prototype.
1267 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1268 * dbxread.c: Remove _initialize_dbxread prototype.
1269 * dcache.c: Remove _initialize_dcache prototype.
1270 * demangle.c: Remove _initialize_demangler prototype.
1271 * disasm-selftests.c: Remove _initialize_disasm_selftests
1272 prototype.
1273 * disasm.c: Remove _initialize_disasm prototype.
1274 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1275 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1276 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1277 prototype.
1278 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1279 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1280 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1281 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1282 * elfread.c: Remove _initialize_elfread prototype.
1283 * exec.c: Remove _initialize_exec prototype.
1284 * extension.c: Remove _initialize_extension prototype.
1285 * f-lang.c: Remove _initialize_f_language prototype.
1286 * f-valprint.c: Remove _initialize_f_valprint prototype.
1287 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1288 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1289 * filesystem.c: Remove _initialize_filesystem prototype.
1290 * findcmd.c: Remove _initialize_mem_search prototype.
1291 * fork-child.c: Remove _initialize_fork_child prototype.
1292 * frame-base.c: Remove _initialize_frame_base prototype.
1293 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1294 * frame.c: Remove _initialize_frame prototype.
1295 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1296 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1297 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1298 * gcore.c: Remove _initialize_gcore prototype.
1299 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1300 * gdbarch.c: Regenerate.
1301 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1302 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1303 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1304 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1305 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1306 * go-lang.c: Remove _initialize_go_language prototype.
1307 * go32-nat.c: Remove _initialize_go32_nat prototype.
1308 * guile/guile.c: Remove _initialize_guile prototype.
1309 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1310 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1311 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1312 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1313 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1314 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1315 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1316 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1317 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1318 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1319 prototype.
1320 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1321 prototype.
1322 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1323 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1324 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1325 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1326 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1327 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1328 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1329 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1330 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1331 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1332 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1333 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1334 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1335 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1336 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1337 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1338 prototype.
1339 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1340 prototype.
1341 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1342 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1343 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1344 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1345 * infcall.c: Remove _initialize_infcall prototype.
1346 * infcmd.c: Remove _initialize_infcmd prototype.
1347 * inferior.c: Remove _initialize_inferiors prototype.
1348 * inflow.c: Remove _initialize_inflow prototype.
1349 * infrun.c: Remove _initialize_infrun prototype.
1350 * interps.c: Remove _initialize_interpreter prototype.
1351 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1352 * jit.c: Remove _initialize_jit prototype.
1353 * language.c: Remove _initialize_language prototype.
1354 * linux-fork.c: Remove _initialize_linux_fork prototype.
1355 * linux-nat.c: Remove _initialize_linux_nat prototype.
1356 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1357 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1358 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1359 * m2-lang.c: Remove _initialize_m2_language prototype.
1360 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1361 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1362 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1363 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1364 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1365 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1366 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1367 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1368 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1369 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1370 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1371 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1372 * machoread.c: Remove _initialize_machoread prototype.
1373 * macrocmd.c: Remove _initialize_macrocmd prototype.
1374 * macroscope.c: Remove _initialize_macroscope prototype.
1375 * maint.c: Remove _initialize_maint_cmds prototype.
1376 * mdebugread.c: Remove _initialize_mdebugread prototype.
1377 * memattr.c: Remove _initialize_mem prototype.
1378 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1379 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1380 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1381 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1382 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1383 * microblaze-linux-tdep.c: Remove
1384 _initialize_microblaze_linux_tdep prototype.
1385 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1386 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1387 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1388 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1389 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1390 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1391 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1392 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1393 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1394 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1395 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1396 prototype.
1397 * mipsread.c: Remove _initialize_mipsread prototype.
1398 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1399 prototype.
1400 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1401 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1402 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1403 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1404 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1405 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1406 prototype.
1407 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1408 * nto-procfs.c: Remove _initialize_procfs prototype.
1409 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1410 * objc-lang.c: Remove _initialize_objc_language prototype.
1411 * objfiles.c: Remove _initialize_objfiles prototype.
1412 * observer.c: Remove observer_test_first_notification_function,
1413 observer_test_second_notification_function,
1414 observer_test_third_notification_function, and
1415 _initialize_observer prototypes.
1416 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1417 * osabi.c: Remove _initialize_gdb_osabi prototype.
1418 * osdata.c: Remove _initialize_osdata prototype.
1419 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1420 * parse.c: Remove _initialize_parse prototype.
1421 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1422 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1423 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1424 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1425 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1426 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1427 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1428 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1429 * printcmd.c: Remove _initialize_printcmd prototype.
1430 * probe.c: Remove _initialize_probe prototype.
1431 * proc-api.c: Remove _initialize_proc_api prototype.
1432 * proc-events.c: Remove _initialize_proc_events prototype.
1433 * proc-service.c: Remove _initialize_proc_service prototype.
1434 * procfs.c: Remove _initialize_procfs prototype.
1435 * psymtab.c: Remove _initialize_psymtab prototype.
1436 * python/python.c: Remove _initialize_python prototype.
1437 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1438 * record-btrace.c: Remove _initialize_record_btrace prototype.
1439 * record-full.c: Remove _initialize_record_full prototype.
1440 * record.c: Remove _initialize_record prototype.
1441 * regcache.c: Remove _initialize_regcache prototype.
1442 * reggroups.c: Remove _initialize_reggroup prototype.
1443 * remote-notif.c: Remove _initialize_notif prototype.
1444 * remote-sim.c: Remove _initialize_remote_sim prototype.
1445 * remote.c: Remove _initialize_remote prototype.
1446 * reverse.c: Remove _initialize_reverse prototype.
1447 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1448 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1449 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1450 prototype.
1451 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1452 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1453 * rust-exp.y: Remove _initialize_rust_exp prototype.
1454 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1455 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1456 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1457 * score-tdep.c: Remove _initialize_score_tdep prototype.
1458 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1459 prototype.
1460 * ser-go32.c: Remove _initialize_ser_dos prototype.
1461 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1462 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1463 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1464 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1465 * serial.c: Remove _initialize_serial prototype.
1466 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1467 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1468 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1469 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1470 * skip.c: Remove _initialize_step_skip prototype.
1471 * sol-thread.c: Remove _initialize_sol_thread prototype.
1472 * solib-aix.c: Remove _initialize_solib_aix prototype.
1473 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1474 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1475 * solib-frv.c: Remove _initialize_frv_solib prototype.
1476 * solib-spu.c: Remove _initialize_spu_solib prototype.
1477 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1478 * solib-target.c: Remove _initialize_solib_target prototype.
1479 * solib.c: Remove _initialize_solib prototype.
1480 * source.c: Remove _initialize_source prototype.
1481 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1482 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1483 prototype.
1484 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1485 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1486 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1487 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1488 prototype.
1489 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1490 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1491 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1492 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1493 prototype.
1494 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1495 prototype.
1496 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1497 prototype.
1498 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1499 prototype.
1500 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1501 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1502 prototype.
1503 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1504 prototype.
1505 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1506 prototype.
1507 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1508 prototype.
1509 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1510 prototype.
1511 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1512 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1513 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1514 * stabsread.c: Remove _initialize_stabsread prototype.
1515 * stack.c: Remove _initialize_stack prototype.
1516 * stap-probe.c: Remove _initialize_stap_probe prototype.
1517 * std-regs.c: Remove _initialize_frame_reg prototype.
1518 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1519 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1520 * symfile.c: Remove _initialize_symfile prototype.
1521 * symmisc.c: Remove _initialize_symmisc prototype.
1522 * symtab.c: Remove _initialize_symtab prototype.
1523 * target-dcache.c: Remove _initialize_target_dcache prototype.
1524 * target-descriptions.c: Remove _initialize_target_descriptions
1525 prototype.
1526 * thread.c: Remove _initialize_thread prototype.
1527 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1528 prototype.
1529 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1530 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1531 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1532 prototype.
1533 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1534 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1535 * tracefile.c: Remove _initialize_tracefile prototype.
1536 * tracepoint.c: Remove _initialize_tracepoint prototype.
1537 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1538 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1539 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1540 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1541 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1542 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1543 * tui/tui.c: Remove _initialize_tui prototype.
1544 * typeprint.c: Remove _initialize_typeprint prototype.
1545 * user-regs.c: Remove _initialize_user_regs prototype.
1546 * utils.c: Remove _initialize_utils prototype.
1547 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1548 * valarith.c: Remove _initialize_valarith prototype.
1549 * valops.c: Remove _initialize_valops prototype.
1550 * valprint.c: Remove _initialize_valprint prototype.
1551 * value.c: Remove _initialize_values prototype.
1552 * varobj.c: Remove _initialize_varobj prototype.
1553 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1554 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1555 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1556 * windows-nat.c: Remove _initialize_windows_nat,
1557 _initialize_check_for_gdb_ini, and _initialize_loadable
1558 prototypes.
1559 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1560 * xcoffread.c: Remove _initialize_xcoffread prototype.
1561 * xml-support.c: Remove _initialize_xml_support prototype.
1562 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1563 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1564 prototype.
1565 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1566 prototype.
1567 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1568
1569 2017-09-08 Keith Seitz <keiths@redhat.com>
1570
1571 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1572 field.
1573
1574 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1575
1576 * f-valprint.c (f_val_print): Remove check for one byte
1577 sized integers. Remove printing of character type.
1578
1579 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1580 Christoph Weinmann <christoph.t.weinmann@intel.com>
1581 Bernhard Heckel <bernhard.heckel@intel.com>
1582
1583 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1584 to maintain proper indentation when printing pointers/refs.
1585
1586 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1587
1588 GDB 8.0.1 released.
1589
1590 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1591
1592 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1593
1594 2017-09-05 Tom Tromey <tom@tromey.com>
1595
1596 * parse.c (funcall_chain): Now a std::vector.
1597 (start_arglist, end_arglist): Simplify.
1598 (free_funcalls): Remove.
1599 (parse_exp_in_context_1): Remove cleanup.
1600
1601 2017-09-05 Tom Tromey <tom@tromey.com>
1602
1603 * go-exp.y (go_parse): Don't create a cleanup.
1604
1605 2017-09-05 Tom Tromey <tom@tromey.com>
1606
1607 * d-exp.y (PrimaryExpression): Use std::string.
1608 (d_parse): Don't create a cleanup.
1609
1610 2017-09-05 Tom Tromey <tom@tromey.com>
1611
1612 * utils.c (do_clear_parser_state): Remove.
1613 (make_cleanup_clear_parser_state): Remove.
1614 * p-exp.y (pascal_parse): Use scoped_restore.
1615 * m2-exp.y (m2_parse): Use scoped_restore.
1616 * f-exp.y (f_parse): Use scoped_restore.
1617 * d-exp.y (d_parse): Use scoped_restore.
1618 * c-exp.y (c_parse): Use scoped_restore.
1619 * ada-exp.y (ada_parse): Use scoped_restore.
1620 * utils.h (make_cleanup_clear_parser_state): Remove.
1621
1622 2017-09-06 Keith Seitz <keiths@redhat.com>
1623
1624 * dwarf2read.c (dw2_linkage_name_attr): New function.
1625 (dw2_linkage_name): New function.
1626 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1627 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1628 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1629
1630 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1631
1632 * config/djgpp/djconfig.sh: Correct shell portability issue.
1633
1634 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1635
1636 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1637
1638 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1639
1640 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1641 * NEWS: Mention new FreeBSD/mips native configuration.
1642 * configure.host: Add aarch64*-*-freebsd*.
1643 * configure.nat: Likewise.
1644 * aarch64-fbsd-nat.c: New file.
1645
1646 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1647
1648 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1649 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1650 * NEWS: Mention new FreeBSD/aarch64 target.
1651 * configure.tgt: Add aarch64*-*-freebsd*.
1652 * aarch64-fbsd-tdep.c: New file.
1653 * aarch64-fbsd-tdep.h: New file.
1654
1655 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1656
1657 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1658
1659 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1660
1661 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1662 of TLS symbols.
1663
1664 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1665
1666 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1667 call.
1668
1669 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1670
1671 * infrun.c (follow_exec): Call add_thread after
1672 target_find_description.
1673
1674 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1675
1676 * infrun.c (handle_inferior_event_1): When exec'ing, read
1677 stop_pc after follow_exec.
1678
1679 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1680
1681 * remote.c (process_g_packet): Update error message.
1682
1683 2017-09-05 Yao Qi <yao.qi@linaro.org>
1684
1685 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1686 targets.
1687
1688 2017-09-05 Pedro Alves <palves@redhat.com>
1689
1690 * eval.c (eval_call, evaluate_funcall): New functions, factored
1691 out from ...
1692 (evaluate_subexp_standard): ... this.
1693
1694 2017-09-05 Yao Qi <yao.qi@linaro.org>
1695
1696 * amd64-tdep.c (amd64_target_description): Create target
1697 descriptions.
1698 (_initialize_amd64_tdep): Don't call functions
1699 initialize_tdesc_amd64_*. Add self tests.
1700 * arch/amd64.c (amd64_create_target_description): Add parameter
1701 is_linux. Call set_tdesc_osabi if is_linux is true.
1702 * arch/amd64.h (amd64_create_target_description): Update the
1703 declaration.
1704 * arch/i386.c (i386_create_target_description): Add parameter
1705 is_linux. Call set_tdesc_osabi if is_linux is true.
1706 * arch/i386.h (i386_create_target_description): Update
1707 declaration.
1708 * configure.tgt: Add i386.o to gdb_target_obs.
1709 * features/Makefile (XMLTOC): Remove i386/*.xml.
1710 * features/i386/amd64-avx-avx512.c: Remove.
1711 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1712 * features/i386/amd64-avx-mpx.c: Remove.
1713 * features/i386/amd64-avx.c: Remove.
1714 * features/i386/amd64-mpx.c: Remove.
1715 * features/i386/amd64.c: Remove.
1716 * features/i386/i386-avx-avx512.c: Remove.
1717 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1718 * features/i386/i386-avx-mpx.c: Remove.
1719 * features/i386/i386-avx.c: Remove.
1720 * features/i386/i386-mmx.c: Remove.
1721 * features/i386/i386-mpx.c: Remove.
1722 * features/i386/i386.c: Remove.
1723 * i386-tdep.c: Don't include features/i386/i386*.c., include
1724 target-descriptions.h and arch/i386.h.
1725 (i386_target_description): Create target descriptions.
1726 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1727 functions. Do self tests.
1728
1729 2017-09-05 Yao Qi <yao.qi@linaro.org>
1730
1731 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1732 * features/i386/amd64-avx-avx512-linux.c: Removed.
1733 * features/i386/amd64-avx-linux.c: Removed.
1734 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1735 * features/i386/amd64-avx-mpx-linux.c: Removed.
1736 * features/i386/amd64-linux.c: Removed.
1737 * features/i386/amd64-mpx-linux.c: Removed.
1738 * features/i386/x32-avx-avx512-linux.c: Removed.
1739 * features/i386/x32-avx-linux.c: Removed.
1740 * features/i386/x32-linux.c: Removed.
1741
1742 2017-09-05 Yao Qi <yao.qi@linaro.org>
1743
1744 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1745 features/i386/*.c.
1746 (amd64_linux_read_description): Call
1747 amd64_create_target_description.
1748 * arch/amd64.c: New file.
1749 * arch/amd64.h: New file.
1750 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1751 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1752
1753 2017-09-05 Yao Qi <yao.qi@linaro.org>
1754
1755 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1756 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1757 (amd64_linux_read_description): Create target descriptions.
1758 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1759 functions. Add unit tests.
1760 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1761 x32-core.xml.
1762 * features/i386/64bit-avx.c: Generated.
1763 * features/i386/64bit-avx512.c: Generated.
1764 * features/i386/64bit-core.c: Generated.
1765 * features/i386/64bit-linux.c: Generated.
1766 * features/i386/64bit-mpx.c: Generated.
1767 * features/i386/64bit-pkeys.c: Generated.
1768 * features/i386/64bit-segments.c: Generated.
1769 * features/i386/64bit-sse.c: Generated.
1770 * features/i386/x32-core.c: Generated.
1771 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1772 c files for amd64-linux and x32-linux.
1773
1774 2017-09-05 Yao Qi <yao.qi@linaro.org>
1775
1776 * amd64-linux-tdep.c (amd64_linux_read_description): New
1777 function.
1778 (amd64_linux_core_read_description): Call
1779 amd64_linux_read_description.
1780 (amd64_linux_init_abi): Likewise.
1781 (amd64_x32_linux_init_abi): Likewise.
1782 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1783 * x86-linux-nat.c (x86_linux_read_description): Call
1784 amd64_linux_read_description.
1785
1786 2017-09-05 Yao Qi <yao.qi@linaro.org>
1787
1788 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1789 comments.
1790
1791 2017-09-05 Yao Qi <yao.qi@linaro.org>
1792
1793 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1794 * features/i386/i386-avx-avx512-linux.c: Remove.
1795 * features/i386/i386-avx-linux.c: Remove.
1796 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1797 * features/i386/i386-avx-mpx-linux.c: Remove.
1798 * features/i386/i386-linux.c: Remove.
1799 * features/i386/i386-mmx-linux.c: Remove.
1800 * features/i386/i386-mpx-linux.c: Remove.
1801
1802 2017-09-05 Yao Qi <yao.qi@linaro.org>
1803
1804 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1805 (SFILES): Add arch/i386.c.
1806 (HFILES_NO_SRCDIR): Add arch/i386.h.
1807 * arch/i386.c: New file.
1808 * arch/i386.h: New file.
1809 * arch/tdesc.h (allocate_target_description): Declare.
1810 (set_tdesc_architecture): Declare.
1811 (set_tdesc_osabi): Declare.
1812 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1813 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1814 include arch/i386.h.
1815 (i386_linux_read_description): Remove code and call
1816 i386_create_target_description.
1817 (set_tdesc_architecture): New function.
1818 (set_tdesc_osabi): New function.
1819 * target-descriptions.h (allocate_target_description): Remove.
1820
1821 2017-09-05 Yao Qi <yao.qi@linaro.org>
1822
1823 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1824 * target-descriptions.c (tdesc_create_feature): Likewise, and
1825 adjust code.
1826 * features/i386/32bit-avx.c: Re-generated.
1827 * features/i386/32bit-avx512.c: Re-generated.
1828 * features/i386/32bit-core.c: Re-generated.
1829 * features/i386/32bit-linux.c: Re-generated.
1830 * features/i386/32bit-mpx.c: Re-generated.
1831 * features/i386/32bit-pkeys.c: Re-generated.
1832 * features/i386/32bit-sse.c: Re-generated.
1833
1834 2017-09-05 Yao Qi <yao.qi@linaro.org>
1835
1836 * regformats/regdef.h (struct reg): Override operator == and !=.
1837
1838 2017-09-05 Yao Qi <yao.qi@linaro.org>
1839
1840 * arch/tdesc.h: New file.
1841 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1842 * target-descriptions.c: Update comments.
1843 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1844 declarations.
1845 * features/i386/32bit-avx.c: Re-generated.
1846 * features/i386/32bit-avx512.c: Re-generated.
1847 * features/i386/32bit-core.c: Re-generated.
1848 * features/i386/32bit-linux.c: Re-generated.
1849 * features/i386/32bit-mpx.c: Re-generated.
1850 * features/i386/32bit-pkeys.c: Re-generated.
1851 * features/i386/32bit-sse.c: Re-generated.
1852
1853 2017-09-05 Yao Qi <yao.qi@linaro.org>
1854
1855 * regformats/regdat.sh: Update generated code.
1856
1857 2017-09-05 Yao Qi <yao.qi@linaro.org>
1858
1859 * regformats/regdat.sh: Adjust code order.
1860
1861 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1862
1863 * expprint.c (dump_subexp_body_standard): Use constant format
1864 string in fprintf_filtered call.
1865
1866 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1867
1868 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1869 NetBSD/i386.
1870 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1871
1872 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1873
1874 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1875
1876 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1877
1878 * bsd-kvm.o: Define _KMEMUSER.
1879 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1880 * configure: Regenerate.
1881
1882 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1883
1884 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1885 * i386-fbsd-nat.c: Likewise.
1886
1887 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1888
1889 * unittests/array-view-selftests.c: Add include of <array>.
1890
1891 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1892
1893 * spu-tdep.c (flush_ea_cache): Add missing argument to
1894 call_function_by_hand.
1895
1896 2017-09-04 Pedro Alves <palves@redhat.com>
1897
1898 * NEWS (Safer support for debugging with no debug info): New.
1899
1900 2017-09-04 Pedro Alves <palves@redhat.com>
1901
1902 * c-exp.y (function_method, function_method_void): Add current
1903 instance flags to TYPE_INSTANCE.
1904 * dwarf2read.c (check_modifier): New.
1905 (compute_delayed_physnames): Assert that only C++ adds delayed
1906 physnames. Mark fn_fields as const/volatile depending on
1907 physname.
1908 * eval.c (make_params): New type_instance_flags parameter. Use
1909 it as the new type's instance flags.
1910 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1911 flags element and pass it to make_params.
1912 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1913 instance flags element.
1914 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1915 * gdbtypes.h: Include "enum-flags.h".
1916 (type_instance_flags): New enum-flags type.
1917 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1918 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1919 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1920 (follow_type_instance_flags): New function.
1921 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1922 * parser-defs.h (follow_type_instance_flags): Declare.
1923 * valops.c (value_struct_elt_for_reference): const/volatile must
1924 match too.
1925
1926 2017-09-04 Pedro Alves <palves@redhat.com>
1927
1928 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1929 function/method scopes; lookup the nested name as a function local
1930 static variable.
1931
1932 2017-09-04 Pedro Alves <palves@redhat.com>
1933
1934 (%type <voidval>): Add function_method.
1935 * c-exp.y (exp): New production for calls with no arguments.
1936 (function_method, function_method_void_or_typelist): New
1937 productions.
1938 (exp): New production for "method()::static_var".
1939 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1940 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1941 Handle OP_FUNC_STATIC_VAR.
1942 * parse.c (operator_length_standard):
1943 Handle OP_FUNC_STATIC_VAR.
1944
1945 2017-09-04 Pedro Alves <palves@redhat.com>
1946
1947 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1948 handling.
1949 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1950 Ditto.
1951 * parse.c (operator_length_standard, operator_check_standard):
1952 Ditto.
1953 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1954
1955 2017-09-04 Pedro Alves <palves@redhat.com>
1956
1957 * ax-gdb.c: Include "typeprint.h".
1958 (gen_expr_for_cast): New function.
1959 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1960 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1961 type is unknown.
1962 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1963 nodebug_data_symbol.
1964 * eval.c: Include "typeprint.h".
1965 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1966 Error out if symbol has unknown type.
1967 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1968 evaluate_subexp_for_cast.
1969 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1970 OP_VAR_MSYM_VALUE.
1971 (evaluate_subexp_for_cast): New function.
1972 * gdbtypes.c (init_nodebug_var_type): New function.
1973 (objfile_type): Use it to initialize types of variables with no
1974 debug info.
1975 * typeprint.c (error_unknown_type): New.
1976 * typeprint.h (error_unknown_type): New declaration.
1977 * compile/compile-c-types.c (convert_type_basic): Handle
1978 TYPE_CODE_ERROR; warn and fallback to int for variables with
1979 unknown type.
1980
1981 2017-09-04 Pedro Alves <palves@redhat.com>
1982
1983 * eval.c (evaluate_var_value): New function, factored out from ...
1984 (evaluate_subexp_standard): ... here.
1985
1986 2017-09-04 Pedro Alves <palves@redhat.com>
1987
1988 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1989 Remove useless assignments to 'op'.
1990
1991 2017-09-04 Pedro Alves <palves@redhat.com>
1992
1993 * eval.c (eval_skip_value): New function.
1994 (evaluate_subexp_standard): Use it.
1995
1996 2017-09-04 Pedro Alves <palves@redhat.com>
1997
1998 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1999 function name from symbol/minsym and pass it to
2000 error_call_unknown_return_type.
2001
2002 2017-09-04 Pedro Alves <palves@redhat.com>
2003
2004 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2005 * ax-gdb.c (gen_msym_var_ref): New function.
2006 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2007 * eval.c (evaluate_var_msym_value): New function.
2008 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2009 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2010 to call_function_by_hand.
2011 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2012 Handle OP_VAR_MSYM_VALUE.
2013 (union exp_element) <msymbol>: New field.
2014 * minsyms.h (struct type): Forward declare.
2015 (find_minsym_type_and_address): Declare.
2016 * parse.c (write_exp_elt_msym): New function.
2017 (write_exp_msymbol): Delete, refactored as ...
2018 (find_minsym_type_and_address): ... this new function.
2019 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2020 (operator_length_standard, operator_check_standard): Handle
2021 OP_VAR_MSYM_VALUE.
2022 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2023
2024 2017-09-04 Pedro Alves <palves@redhat.com>
2025
2026 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2027 TYPE_GNU_IFUNC specially here. Throw error if return type is
2028 unknown.
2029 * ada-typeprint.c (print_func_type): Handle functions with unknown
2030 return type.
2031 * c-typeprint.c (c_type_print_base): Handle functions and methods
2032 with unknown return type.
2033 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2034 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2035 * compile/compile-c-types.c: Include "objfiles.h".
2036 (convert_func): For functions with unknown return type, warn and
2037 default to int.
2038 * compile/compile-object-run.c (compile_object_run): Adjust call
2039 to call_function_by_hand_dummy.
2040 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2041 call_function_by_hand.
2042 * eval.c (evaluate_subexp_standard): Adjust calls to
2043 call_function_by_hand. Handle functions and methods with unknown
2044 return type. Pass expect_type to call_function_by_hand.
2045 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2046 return type.
2047 * gcore.c (call_target_sbrk): Adjust call to
2048 call_function_by_hand.
2049 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2050 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2051 an integer address type instead of nodebug.
2052 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2053 call_function_by_hand.
2054 * infcall.c (error_call_unknown_return_type): New function.
2055 (call_function_by_hand): New "default_return_type" parameter.
2056 Pass it down.
2057 (call_function_by_hand_dummy): New "default_return_type"
2058 parameter. Use it instead of defaulting to int. If there's no
2059 default and the return type is unknown, throw an error. If
2060 there's a default return type, and the called function has no
2061 debug info, then assume the function is prototyped.
2062 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2063 New "default_return_type" parameter.
2064 (error_call_unknown_return_type): New declaration.
2065 * linux-fork.c (call_lseek): Cast return type of lseek.
2066 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2067 call_function_by_hand.
2068 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2069 calls to call_function_by_hand.
2070 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2071 return type.
2072 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2073 (value_nsstring, print_object_command): Adjust calls to
2074 call_function_by_hand.
2075 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2076 functions with unknown return type.
2077 (pascal_type_print_func_varspec_suffix): New function.
2078 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2079 TYPE_CODE_METHOD>: Use it.
2080 * python/py-value.c (valpy_call): Adjust call to
2081 call_function_by_hand.
2082 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2083 call_function_by_hand.
2084 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2085 call_function_by_hand.
2086 * valops.c (value_allocate_space_in_inferior): Adjust call to
2087 call_function_by_hand.
2088 * typeprint.c (type_print_unknown_return_type): New function.
2089 * typeprint.h (type_print_unknown_return_type): New declaration.
2090
2091 2017-09-04 Pedro Alves <palves@redhat.com>
2092
2093 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2094 types with more than one parameter as prototyped.
2095
2096 2017-09-04 Pedro Alves <palves@redhat.com>
2097
2098 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2099 (disassemble_command): Use gdb_disassembly_flags instead of bare
2100 int.
2101 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2102 (dump_insns, do_mixed_source_and_assembly_deprecated)
2103 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2104 Use gdb_disassembly_flags instead of bare int.
2105 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2106 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2107 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2108 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2109 (enum gdb_disassembly_flag): ... values of this new enumeration.
2110 (gdb_disassembly_flags): Define.
2111 (gdb_disassembly)
2112 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2113 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2114 gdb_disassembly_flags instead of bare int.
2115 * record-btrace.c (btrace_insn_history)
2116 (record_btrace_insn_history, record_btrace_insn_history_range)
2117 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2118 instead of bare int.
2119 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2120 Use gdb_disassembly_flags instead of bare int.
2121 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2122 Define.
2123 * target-delegates.c: Regenerate.
2124 * target.c (target_insn_history, target_insn_history_from)
2125 (target_insn_history_range): Use gdb_disassembly_flags instead of
2126 bare int.
2127 * target.h: Include "disasm.h".
2128 (struct target_ops) <to_insn_history, to_insn_history_from,
2129 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2130 int.
2131 (target_insn_history, target_insn_history_from)
2132 (target_insn_history_range): Use gdb_disassembly_flags instead of
2133 bare int.
2134
2135 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2136
2137 * cli/cli-script.c (build_command_line): For if/while commands,
2138 check whether args is empty.
2139
2140 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2141
2142 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2143 (enum command_control_type): Likewise.
2144 (struct command_line): Likewise.
2145 (free_command_lines): Likewise.
2146 (struct command_lines_deleter): Likewise.
2147 (command_line_up): Likewise.
2148 (read_command_lines): Likewise.
2149 (read_command_lines_1): Likewise.
2150 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2151 (enum command_control_type): Likewise.
2152 (struct command_line): Likewise.
2153 (free_command_lines): Likewise.
2154 (struct command_lines_deleter): Likewise.
2155 (command_line_up): Likewise.
2156 (read_command_lines): Likewise.
2157 (read_command_lines_1): Likewise.
2158 * breakpoint.h: Include cli/cli-script.h.
2159 * extension-priv.h: Likewise.
2160 * gdbcmd.h: Likewise.
2161
2162 2017-09-04 Pedro Alves <palves@redhat.com>
2163
2164 * ada-lang.c (is_known_support_routine): Move sal declaration to
2165 where it is initialized.
2166 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2167 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2168 (clear_command, update_static_tracepoint): Remove init_sal
2169 references. Move declarations closer to initializations.
2170 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2171 initializations.
2172 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2173 references. Move sal declarations closer to initializations.
2174 * frame.c (find_frame_sal): Return a symtab_and_line via function
2175 return instead of output parameter. Remove init_sal references.
2176 * frame.h (find_frame_sal): Return a symtab_and_line via function
2177 return instead of output parameter.
2178 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2179 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2180 instead of memset.
2181 (gdbscm_find_pc_line): Remove init_sal reference.
2182 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2183 references. Move declarations closer to initializations.
2184 * infcmd.c (set_step_frame): Update. Move declarations closer to
2185 initializations.
2186 (finish_backward): Remove init_sal references. Move declarations
2187 closer to initializations.
2188 * infrun.c (process_event_stop_test, handle_step_into_function)
2189 (insert_hp_step_resume_breakpoint_at_frame)
2190 (insert_step_resume_breakpoint_at_caller): Likewise.
2191 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2192 (symbol_to_sal): Likewise.
2193 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2194 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2195 to its initialization.
2196 * reverse.c (save_bookmark_command): Use new/delete. Remove
2197 init_sal references. Move declarations closer to initializations.
2198 * source.c (get_current_source_symtab_and_line): Remove brace
2199 initialization.
2200 (set_current_source_symtab_and_line): Now takes the sal by const
2201 reference. Remove brace initialization.
2202 (line_info): Remove init_sal reference.
2203 * source.h (set_current_source_symtab_and_line): Now takes a
2204 symtab_and_line via const reference.
2205 * stack.c (set_current_sal_from_frame): Adjust.
2206 (print_frame_info): Adjust.
2207 (get_last_displayed_sal): Return the sal via function return
2208 instead of via output parameter. Simplify.
2209 (frame_info): Adjust.
2210 * stack.h (get_last_displayed_sal): Return the sal via function
2211 return instead of via output parameter.
2212 * symtab.c (init_sal): Delete.
2213 (find_pc_sect_line): Remove init_sal references. Move
2214 declarations closer to initializations.
2215 (find_function_start_sal): Remove init_sal references. Move
2216 declarations closer to initializations.
2217 * symtab.h (struct symtab_and_line): In-class initialize all
2218 fields.
2219 * tracepoint.c (set_traceframe_context)
2220 (print_one_static_tracepoint_marker): Remove init_sal references.
2221 Move declarations closer to initializations.
2222 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2223 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2224 declarations closer to initializations.
2225 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2226 init_sal references. Adjust.
2227
2228 2017-09-04 Pedro Alves <palves@redhat.com>
2229
2230 * ax-gdb.c (agent_command_1): Use range-for.
2231 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2232 * breakpoint.c: Include "common/array-view.h".
2233 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2234 parameter from struct symtabs_and_lines to
2235 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2236 (breakpoint_sals_to_pc): Change sals parameter from struct
2237 symtabs_and_lines to std::vector reference.
2238 (check_fast_tracepoint_sals): Change sals parameter from struct
2239 symtabs_and_lines to std::array_view. Use range-for.
2240 (decode_static_tracepoint_spec): Return a std::vector instead of
2241 symtabs_and_lines. Update.
2242 (create_breakpoint): Update.
2243 (break_range_command, until_break_command, clear_command): Update.
2244 (base_breakpoint_decode_location, bkpt_decode_location)
2245 (bkpt_probe_create_sals_from_location)
2246 (bkpt_probe_decode_location, tracepoint_decode_location)
2247 (tracepoint_probe_decode_location)
2248 (strace_marker_create_sals_from_location): Return a std::vector
2249 instead of symtabs_and_lines.
2250 (strace_marker_create_breakpoints_sal): Update.
2251 (strace_marker_decode_location): Return a std::vector instead of
2252 symtabs_and_lines. Update.
2253 (update_breakpoint_locations): Change struct symtabs_and_lines
2254 parameters to gdb::array_view. Adjust.
2255 (location_to_sals): Return a std::vector instead of
2256 symtabs_and_lines. Update.
2257 (breakpoint_re_set_default): Use std::vector instead of struct
2258 symtabs_and_lines.
2259 (decode_location_default): Return a std::vector instead of
2260 symtabs_and_lines. Update.
2261 * breakpoint.h: Include "common/array-view.h".
2262 (struct breakpoint_ops) <decode_location>: Now returns a
2263 std::vector instead of returning a symtabs_and_lines via output
2264 parameter.
2265 (update_breakpoint_locations): Change sals parameters to use
2266 gdb::array_view.
2267 * cli/cli-cmds.c (edit_command, list_command): Update to use
2268 std::vector and gdb::array_view.
2269 (ambiguous_line_spec): Adjust to use gdb::array_view and
2270 range-for.
2271 (compare_symtabs): Rename to ...
2272 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2273 const reference and adjust.
2274 (filter_sals): Rewrite using std::vector and standard algorithms.
2275 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2276 (jump_command): Update to use std::vector.
2277 * linespec.c (struct linespec_state) <canonical_names>: Update
2278 comment.
2279 (add_sal_to_sals_basic): Delete.
2280 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2281 (decode_line_2, create_sals_line_offset)
2282 (convert_address_location_to_sals, convert_linespec_to_sals)
2283 (convert_explicit_location_to_sals, parse_linespec)
2284 (event_location_to_sals, decode_line_full, decode_line_1)
2285 (decode_line_with_current_source)
2286 (decode_line_with_last_displayed, decode_objc)
2287 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2288 (linespec_result::~linespec_result): Adjust to use std::vector
2289 instead of symtabs_and_lines.
2290 * linespec.h (linespec_sals::sals): Now a std::vector.
2291 (struct linespec_result): Use std::vector, bool, and in-class
2292 initialization.
2293 (decode_line_1, decode_line_with_current_source)
2294 (decode_line_with_last_displayed): Return std::vector.
2295 * macrocmd.c (info_macros_command): Use std::vector.
2296 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2297 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2298 std::vector.
2299 * probe.h (parse_probes): Return a std::vector.
2300 * python/python.c (gdbpy_decode_line): Use std::vector and
2301 gdb::array_view.
2302 * source.c (select_source_symtab, line_info): Use std::vector.
2303 * stack.c (func_command): Use std::vector.
2304 * symtab.h (struct symtabs_and_lines): Delete.
2305 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2306
2307 2017-09-04 Pedro Alves <palves@redhat.com>
2308
2309 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2310 unittests/array-view-selftests.c.
2311 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2312 * common/array-view.h: New file.
2313 * unittests/array-view-selftests.c: New file.
2314
2315 2017-09-04 Pedro Alves <palves@redhat.com>
2316
2317 * cli/cli-cmds.c (edit_command): Pass message to
2318 ambiguous_line_spec.
2319 (list_command): Pass message to ambiguous_line_spec. Say
2320 "first"/"last" instead of "start" and "end" to be consistent with
2321 the manual.
2322 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2323 them to print formatted message.
2324
2325 2017-09-04 Pedro Alves <palves@redhat.com>
2326
2327 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2328 ftrace_update_insns by reference instead of pointer.
2329
2330 2017-09-04 Yao Qi <yao.qi@linaro.org>
2331
2332 * i386-go32-tdep.c: Include x86-xstate.h.
2333 (i386_go32_init_abi): Call i386_target_description.
2334 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2335 if xcr0 is X86_XSTATE_X87_MASK.
2336 * i386-tdep.h (tdesc_i386): Remove the declaration.
2337 (tdesc_i386_mmx): Likewise.
2338
2339 2017-09-04 Yao Qi <yao.qi@linaro.org>
2340
2341 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2342 X86_XSTATE_SSE_MASK instead of 0.
2343
2344 2017-09-04 Yao Qi <yao.qi@linaro.org>
2345
2346 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2347 i386_target_description.
2348 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2349 i386_target_description.
2350 * i386-tdep.c (i386_gdbarch_init): Likewise.
2351
2352 2017-09-04 Yao Qi <yao.qi@linaro.org>
2353
2354 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2355 (x86_darwin_init_abi_64): Call amd64_target_description.
2356 * amd64-dicos-tdep.c: Likewise.
2357 * amd64-fbsd-nat.c: Likewise.
2358 * amd64-fbsd-tdep.c: Likewise.
2359 * amd64-nbsd-tdep.c: Likewise.
2360 * amd64-obsd-tdep.c: Likewise.
2361 * amd64-sol2-tdep.c: Likewise.
2362 * amd64-windows-tdep.c: Likewise.
2363 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2364
2365 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2366
2367 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2368 (btrace_function) <insn>: Change type to use std::vector.
2369 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2370 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2371 ftrace_update_insns, ftrace_compute_global_level_offset,
2372 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2373 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2374 change to std::vector.
2375 (ftrace_update_insns): Adjust to change to std::vector, change
2376 type of INSN parameter.
2377 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2378 * record-btrace.c (btrace_call_history_insn_range,
2379 btrace_compute_src_line_range,
2380 record_btrace_frame_prev_register): Adjust to change to
2381 std::vector.
2382 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2383 to change to std::vector.
2384
2385 2017-09-03 Tom Tromey <tom@tromey.com>
2386
2387 * corefile.c (reopen_exec_file): Use std::string.
2388
2389 2017-09-03 Tom Tromey <tom@tromey.com>
2390
2391 * compile/compile.c (compile_register_name_mangled): Return
2392 std::string.
2393 * compile/compile-loc2c.c (pushf_register_address): Update.
2394 (pushf_register): Update.
2395 * compile/compile-c-types.c (convert_array): Update.
2396 * compile/compile-c-symbols.c (generate_vla_size): Update.
2397 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2398 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2399 (convert_one_symbol): Update.
2400 (generate_c_for_for_one_variable): Update.
2401 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2402 std::string.
2403 (generate_register_struct): Update.
2404 * compile/compile-internal.h (c_get_range_decl_name): Return a
2405 std::string.
2406 (compile_register_name_mangled): Return std::string.
2407
2408 2017-09-03 Tom Tromey <tom@tromey.com>
2409
2410 * utils.c (perror_string): Return a std::string.
2411 (throw_perror_with_name, perror_warning_with_name): Update.
2412
2413 2017-09-03 Tom Tromey <tom@tromey.com>
2414
2415 * demangle.c (demangle_command): Use std::string,
2416 unique_xmalloc_ptr.
2417
2418 2017-09-03 Tom Tromey <tom@tromey.com>
2419
2420 * cli/cli-setshow.c (do_set_command): Use std::string.
2421
2422 2017-09-03 Tom Tromey <tom@tromey.com>
2423
2424 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2425
2426 2017-09-03 Tom Tromey <tom@tromey.com>
2427
2428 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2429
2430 2017-09-03 Tom Tromey <tom@tromey.com>
2431
2432 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2433 gdb::unique_xmalloc_ptr.
2434
2435 2017-09-03 Tom Tromey <tom@tromey.com>
2436
2437 * thread.c (print_thread_info_1): Use string_printf.
2438 (thread_apply_command, thread_apply_all_command): Use
2439 std::string.
2440
2441 2017-09-03 Tom Tromey <tom@tromey.com>
2442
2443 * valprint.c (val_print_string): Update.
2444 * gdbcore.h (memory_error_message): Return std::string.
2445 * corefile.c (memory_error_message): Return std::string.
2446 (memory_error): Update.
2447 * breakpoint.c (insert_bp_location): Update.
2448
2449 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2450
2451 * target/waitstatus.h (target_waitstatus_to_string): Change
2452 return type to std::string.
2453 * target/waitstatus.c (target_waitstatus_to_string): Return
2454 std::string.
2455 * target.h (target_waitstatus_to_string): Remove declaration.
2456 * infrun.c (resume, clear_proceed_status_thread,
2457 print_target_wait_results, do_target_wait, save_waitstatus,
2458 stop_all_threads): Adjust.
2459 * record-btrace.c (record_btrace_wait): Adjust.
2460 * target-debug.h
2461 (target_debug_print_struct_target_waitstatus_p): Adjust.
2462
2463 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2464
2465 PR gdb/22046
2466 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2467 detection.
2468
2469 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2470
2471 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2472 for setting/unsetting environment variables on the remote target.
2473 (New remote packets): Add entries for QEnvironmentHexEncoded,
2474 QEnvironmentUnset and QEnvironmentReset.
2475 * common/environ.c (gdb_environ::operator=): Extend method to
2476 handle m_user_set_env_list and m_user_unset_env_list.
2477 (gdb_environ::clear): Likewise.
2478 (match_var_in_string): Change type of first parameter from 'char
2479 *' to 'const char *'.
2480 (gdb_environ::set): Extend method to handle
2481 m_user_set_env_list and m_user_unset_env_list.
2482 (gdb_environ::unset): Likewise.
2483 (gdb_environ::clear_user_set_env): New method.
2484 (gdb_environ::user_set_envp): Likewise.
2485 (gdb_environ::user_unset_envp): Likewise.
2486 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2487 m_user_unset_env_list on move constructor/assignment.
2488 (unset): Add new default parameter 'update_unset_list = true'.
2489 (clear_user_set_env): New method.
2490 (user_set_envp): Likewise.
2491 (user_unset_envp): Likewise.
2492 (m_user_set_env_list): New std::set.
2493 (m_user_unset_env_list): Likewise.
2494 * common/rsp-low.c (hex2str): New function.
2495 (bin2hex): New overload for bin2hex function.
2496 * common/rsp-low.c (hex2str): New prototype.
2497 (str2hex): New overload prototype.
2498 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2499 QEnvironmentUnset and QEnvironmentReset.
2500 (remote_protocol_features): Add QEnvironmentHexEncoded,
2501 QEnvironmentUnset and QEnvironmentReset packets.
2502 (send_environment_packet): New function.
2503 (extended_remote_environment_support): Likewise.
2504 (extended_remote_create_inferior): Call
2505 extended_remote_environment_support.
2506 (_initialize_remote): Add QEnvironmentHexEncoded,
2507 QEnvironmentUnset and QEnvironmentReset packet configs.
2508 * unittests/environ-selftests.c (gdb_selftest_env_var):
2509 New variable.
2510 (test_vector_initialization): New function.
2511 (test_init_from_host_environ): Likewise.
2512 (test_reinit_from_host_environ): Likewise.
2513 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2514 Likewise.
2515 (test_unset_set_empty_vector): Likewise.
2516 (test_vector_clear): Likewise.
2517 (test_std_move): Likewise.
2518 (test_move_constructor):
2519 (test_self_move): Likewise.
2520 (test_set_unset_reset): Likewise.
2521 (run_tests): Rewrite in terms of the functions above.
2522
2523 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2524
2525 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2526 (adi_available): Use a temp variable of type CORE_ADDR as argument
2527 3 when calling target_auxv_search.
2528 (adi_normalize_address): Use masks and xor operators to calculate
2529 normalized address.
2530 (adi_read_versions, adi_write_versions, adi_print_versions)
2531 (do_examine, do_assign): Use paddress.
2532
2533 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2534
2535 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2536 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2537 out of loop and add supply of FIR.
2538 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2539 add collect of FIR.
2540
2541 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2542
2543 PR gdb/21827
2544 * cli/cli-script.c (define_command): Don't convert command name
2545 to lower case.
2546
2547 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2548
2549 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2550 Update all callers accordingly. Remove all code blocks handling
2551 the case where DISPP is not NULL.
2552
2553 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2554
2555 PR symtab/22003
2556 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2557 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2558 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2559
2560 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2561
2562 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2563 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2564 (read_comp_units_from_section): New parameter abbrev_section, use
2565 read_and_check_comp_unit_head, allocate signatured_type if needed.
2566 (create_all_comp_units): Update read_comp_units_from_section caller.
2567
2568 2017-08-23 Pedro Alves <palves@redhat.com>
2569
2570 PR remote/21852
2571 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2572 to null_ptid and switch to thread without reading the registers
2573 after adding the inferior.
2574
2575 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2576
2577 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2578 compile-gcc.
2579 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2580 (compile_to_object): Implement compile_gcc.
2581 (_initialize_compile): Install "set compile-gcc". Initialize
2582 compile_gcc.
2583
2584 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2585
2586 * compile/compile.c (compile_to_object): Conditionally call
2587 set_verbose. Conditionally call compile or compile_v0.
2588
2589 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2590
2591 * sparc64-tdep.h: (adi_normalize_address): New export.
2592 * sparc-nat.h: (open_adi_tag_fd): New export.
2593 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2594 * sparc64-linux-tdep.c:
2595 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2596 (sparc64_linux_handle_segmentation_fault): New function.
2597 (sparc64_linux_init_abi): Register
2598 sparc64_linux_handle_segmentation_fault
2599 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2600 (sparc64_addr_bits_remove): New function.
2601 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2602 (MAX_PROC_NAME_SIZE): New macro.
2603 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2604 (sparc64adilist): New variable.
2605 (adi_proc_list): New variable.
2606 (find_adi_info): New function.
2607 (add_adi_info): New function.
2608 (get_adi_info_proc): New function.
2609 (get_adi_info): New function.
2610 (info_adi_command): New function.
2611 (read_maps_entry): New function.
2612 (adi_available): New function.
2613 (adi_normalize_address): New function.
2614 (adi_align_address): New function.
2615 (adi_convert_byte_count): New function.
2616 (adi_tag_fd): New function.
2617 (adi_is_addr_mapped): New function.
2618 (adi_read_versions): New function.
2619 (adi_write_versions): New function.
2620 (adi_print_versions): New function.
2621 (do_examine): New function.
2622 (do_assign): New function.
2623 (adi_examine_command): New function.
2624 (adi_assign_command): New function.
2625 (_initialize_sparc64_adi_tdep): New function.
2626
2627 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2628
2629 * breakpoint.c (breakpoints_info): Rename to ...
2630 (info_breakpoints_command): ... this.
2631 (watchpoints_info): Rename to ...
2632 (info_watchpoints_command): ... this.
2633 (tracepoints_info): Rename to ...
2634 (info_tracepoints_command): ... this.
2635 (_initialize_breakpoint): Adjust.
2636 * dcache.c (dcache_info): Rename to ...
2637 (info_display_command): ... this.
2638 (_initialize_dcache): Adjust.
2639 * frame.h (args_info): Rename to ...
2640 (info_args_command): ... this.
2641 (locals_info): Rename to ...
2642 (info_locals_command): ... this.
2643 * infcmd.c (nofp_registers_info): Rename to ...
2644 (info_registers_command): ... this.
2645 (float_info): Rename to ...
2646 (info_float_command): ... this.
2647 (program_info): Rename to ...
2648 (info_program_command): ... this.
2649 (all_registers_info): Rename to ...
2650 (info_all_registers_command): ... this.
2651 (vector_info): Rename to ...
2652 (info_vector_command): ... this.
2653 (float_info): Rename to ...
2654 (info_float_command): ... this.
2655 (_initialize_infcmd): Adjust.
2656 * inferior.h (term_info): Rename to ...
2657 (info_terminal_command): ... this.
2658 * inflow.c (term_info): Rename to ...
2659 (info_terminal_command): ... this.
2660 (_initialize_inflow): Adjust.
2661 * infrun.c (signals_info): Rename to ...
2662 (info_signals_command): ... this.
2663 (_initialize_infrun): Adjust.
2664 * objc-lang.c (classes_info): Rename to ...
2665 (info_classes_command): ... this.
2666 (selectors_info): Rename to ...
2667 (info_selectors_command): ... this.
2668 (_initialize_objc_language): Adjust.
2669 * printcmd.c (sym_info): Rename to ...
2670 (info_symbol_command): ... this.
2671 (address_info): Rename to ...
2672 (info_address_command): ... this.
2673 (display_info): Rename to ...
2674 (info_display_command): ... this.
2675 (_initialize_printcmd): Adjust.
2676 * reverse.c (bookmarks_info): Rename to ...
2677 (info_breakpoints_command): ... this.
2678 (_initialize_reverse): Adjust.
2679 * ser-go32.c (dos_info): Rename to ...
2680 (info_serial_command): ... this.
2681 (_initialize_ser_dos): Adjust.
2682 * skip.c (skip_info): Rename to ...
2683 (info_skip_command): ... this.
2684 (_initialize_step_skip): Adjust.
2685 * source.c (line_info): Rename to ...
2686 (info_line_command): ... this.
2687 (source_info): Rename to ...
2688 (info_source_command)
2689 * stack.c (frame_info): Rename to ...
2690 (info_frame_command): ... this.
2691 (locals_info): Rename to ...
2692 (info_locals_command): ... this.
2693 (args_info): Rename to ...
2694 (info_args_command): ... this.
2695 (_initialize_stack): Adjust.
2696 * symtab.c (sources_info): Rename to ...
2697 (info_sources_command): ... this.
2698 (variables_info): Rename to ...
2699 (info_variables_command): ... this.
2700 (functions_info): Rename to ...
2701 (info_functions_command): ... this.
2702 (types_info): Rename to ...
2703 (info_types_command): ... this.
2704 (_initialize_symtab): Adjust.
2705 * target.c (target_info): Rename to ...
2706 (info_target_command): ... this.
2707 (initialize_targets): Adjust.
2708 * tracepoint.c (tvariables_info): Rename to ...
2709 (info_tvariables_command): ... this.
2710 (scope_info): Rename to ...
2711 (info_scope_command): ... this.
2712 (trace_dump_actions): Adjust.
2713 (_initialize_tracepoint): Adjust.
2714
2715 2017-08-22 Tom Tromey <tom@tromey.com>
2716
2717 * breakpoint.h (install_breakpoint): Update.
2718 * breakpoint.c (add_solib_catchpoint): Update.
2719 (install_breakpoint): Change argument to a std::unique_ptr.
2720 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2721 (create_breakpoint_sal, create_breakpoint): Update.
2722 (watch_command_1, catch_exec_command_1)
2723 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2724 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2725 Return the breakpoint.
2726 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2727 (new_single_step_breakpoint): Update.
2728 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2729 std::unique_ptr.
2730 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2731 std::unique_ptr.
2732 * break-catch-sig.c (create_signal_catchpoint): Use
2733 std::unique_ptr.
2734 * ada-lang.c (create_ada_exception_catchpoint): Use
2735 std::unique_ptr.
2736
2737 2017-08-22 Tom Tromey <tom@tromey.com>
2738
2739 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2740
2741 2017-08-22 Tom Tromey <tom@tromey.com>
2742
2743 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2744 (lookup_partial_symbol): Update.
2745
2746 2017-08-22 Tom Tromey <tom@tromey.com>
2747
2748 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2749 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2750 (find_and_open_source, symtab_to_fullname): Update.
2751 * psymtab.c (psymtab_to_fullname): Update.
2752
2753 2017-08-22 Tom Tromey <tom@tromey.com>
2754
2755 * exec.c (exec_file_attach): Update.
2756 * linux-thread-db.c (try_thread_db_load): Update.
2757 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2758 * utils.c (gdb_realpath): Change return type.
2759 (gdb_realpath_keepfile): Update.
2760 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2761 (_initialize_utils): Register the new self test.
2762 * source.c (openp): Update.
2763 (find_and_open_source): Update.
2764 * nto-tdep.c (nto_find_and_open_solib): Update.
2765 * main.c (set_gdb_data_directory): Update.
2766 (captured_main_1): Update.
2767 * dwarf2read.c (dwarf2_get_dwz_file): Update
2768 (dw2_map_symbol_filenames): Update.
2769 * auto-load.c (auto_load_safe_path_vec_update): Update.
2770 (filename_is_in_auto_load_safe_path_vec): Change type of
2771 "filename_realp".
2772 (auto_load_objfile_script): Update.
2773 (file_is_auto_load_safe): Update. Use std::string.
2774 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2775
2776 2017-08-22 Tom Tromey <tom@tromey.com>
2777
2778 * utils.c (gdb_realpath_keepfile): Return a
2779 gdb::unique_xmalloc_ptr.
2780 * exec.c (exec_file_attach): Update.
2781 * utils.h (gdb_realpath_keepfile): Return a
2782 gdb::unique_xmalloc_ptr.
2783
2784 2017-08-22 Tom Tromey <tom@tromey.com>
2785
2786 * compile/compile.c (compile_file_command): Use
2787 gdb::unique_xmalloc_ptr, std::string.
2788 * utils.c (gdb_abspath): Change return type.
2789 * source.c (openp): Update.
2790 * objfiles.c (allocate_objfile): Update.
2791 * main.c (set_gdb_data_directory): Update.
2792 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2793
2794 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2795
2796 * cli-cmds.c (list_commands): List actual code around more than
2797 one location.
2798
2799 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2800
2801 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2802
2803 2017-08-21 Pedro Alves <palves@redhat.com>
2804
2805 PR gdb/19487
2806 * c-exp.y (variable production): Handle function aliases.
2807 * minsyms.c (msymbol_is_text): New function.
2808 * minsyms.h (msymbol_is_text): Declare.
2809 * symtab.c (find_function_alias_target): New function.
2810 * symtab.h (find_function_alias_target): Declare.
2811
2812 2017-08-21 Pedro Alves <palves@redhat.com>
2813
2814 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2815 typedefs.
2816 * typeprint.c (whatis_exp): If handling "whatis", and expression
2817 is OP_TYPE, strip one typedef level. Otherwise don't strip
2818 typedefs here.
2819 * valops.c (value_cast): Save "to" type before resolving
2820 stubs/typedefs. Use that type as resulting value's type.
2821
2822 2017-08-18 Tom Tromey <tom@tromey.com>
2823 Pedro Alves <palves@redhat.com>
2824
2825 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2826 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2827 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2828 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2829 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2830 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2831 (linux_get_siginfo_data): Add "thread" argument. Use
2832 scoped_restore.
2833 * linux-nat.c (linux_child_follow_fork)
2834 (check_stopped_by_watchpoint): Use scoped_restore.
2835 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2836 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2837 (restore_inferior_ptid, save_inferior_ptid): Remove.
2838 * btrace.c (btrace_fetch): Use scoped_restore.
2839 * bsd-uthread.c (bsd_uthread_fetch_registers)
2840 (bsd_uthread_store_registers): Use scoped_restore.
2841 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2842 scoped_restore.
2843 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2844 (aix_thread_xfer_partial): Use scoped_restore.
2845 * inferior.h (save_inferior_ptid): Remove.
2846
2847 2017-08-18 Yao Qi <yao.qi@linaro.org>
2848
2849 PR tdep/21818
2850 * arm-tdep.c (gdb_print_insn_arm): Mark
2851 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2852
2853 2017-08-18 Yao Qi <yao.qi@linaro.org>
2854
2855 * NEWS: Mention GDBserver's new option "--selftest".
2856 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2857 * selftest.c: Move it to common/selftest.c.
2858 * selftest.h: Move it to common/selftest.h.
2859 * selftest-arch.c (reset): New function.
2860 (tests_with_arch): Call reset.
2861
2862 2017-08-18 Yao Qi <yao.qi@linaro.org>
2863
2864 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2865 instead of exception_fprintf and printf_filtered.
2866
2867 2017-08-18 Yao Qi <yao.qi@linaro.org>
2868
2869 * selftest.c (register_self_test): Rename it to
2870 selftests::register_test.
2871 (run_self_tests): selftest::run_tests.
2872 * selftest.h: Update declarations.
2873 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2874 selftests::register_test_foreach_arch.
2875 * selftest-arch.h: Update declaration.
2876 * aarch64-tdep.c: Update.
2877 * arm-tdep.c: Likewise.
2878 * disasm-selftests.c: Likewise.
2879 * dwarf2loc.c: Likewise.
2880 * dwarf2-frame.c: Likewise.
2881 * findvar.c: Likewise.
2882 * gdbarch-selftests.c: Likewise.
2883 * maint.c (maintenance_selftest): Likewise.
2884 * regcache.c: Likewise.
2885 * rust-exp.y: Likewise.
2886 * selftest-arch.c: Likewise.
2887 * unittests/environ-selftests.c: Likewise.
2888 * unittests/function-view-selftests.c: Likewise.
2889 * unittests/offset-type-selftests.c: Likewise.
2890 * unittests/optional-selftests.c: Likewise.
2891 * unittests/scoped_restore-selftests.c: Likewise.
2892 * utils-selftests.c: Likewise.
2893
2894 2017-08-17 Pedro Alves <palves@redhat.com>
2895
2896 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2897 local.
2898
2899 2017-08-17 Pedro Alves <palves@redhat.com>
2900
2901 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2902 field.
2903 (reset_die_in_process): Delete, replaced by ...
2904 (process_die_scope): ... this new class. Make it responsible for
2905 freeing cu->line_header too.
2906 (process_die): Use process_die_scope.
2907 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2908 cu->line_header_die_owner. Don't release the line header if it's
2909 owned by the CU.
2910 (setup_type_unit_groups): Make the CU/DIE own the line header.
2911 Don't release the line header here.
2912
2913 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2914
2915 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2916
2917 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2918
2919 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2920 Single-Key mode
2921
2922 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2923
2924 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2925 mode command list.
2926
2927 2017-08-15 Stafford Horne <shorne@gmail.com>
2928
2929 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2930
2931 2017-08-15 Stafford Horne <shorne@gmail.com>
2932
2933 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2934
2935 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2936
2937 PR gdb/21954
2938 * infcmd.c (unset_environment_command): Use the 'clear' method on
2939 the environment instead of resetting it.
2940
2941 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2942
2943 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2944 platforms.
2945
2946 2017-08-14 Tom Tromey <tom@tromey.com>
2947
2948 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2949 (print_binary_chars): Likewise.
2950 (BITS_IN_BYTES): Remove.
2951
2952 2017-08-14 Tom Tromey <tom@tromey.com>
2953
2954 PR gdb/21675
2955 * valprint.c (LOW_ZERO): Change value to 034.
2956 (print_octal_chars): Add static_asserts for octal constants.
2957 * printcmd.c (print_scalar_formatted): Add 'd' case.
2958
2959 2017-08-11 Tom Tromey <tom@tromey.com>
2960
2961 * symfile.c (add_symbol_file_command): Use std::vector.
2962
2963 2017-08-14 Tom Tromey <tom@tromey.com>
2964
2965 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2966 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2967 std::move.
2968 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2969
2970 2017-08-11 Pedro Alves <palves@redhat.com>
2971
2972 * infrun.c (process_event_stop_test): Adjust
2973 function_name_is_marked_for_skip call.
2974 * skip.c: Include <list>.
2975 (skiplist_entry): Make it a class with private fields, and
2976 getters/setters.
2977 (skiplist_entry_chain): Delete.
2978 (skiplist_entries): New.
2979 (skiplist_entry_count): Delete.
2980 (highest_skiplist_entry_num): New.
2981 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2982 (add_skiplist_entry): Delete.
2983 (skiplist_entry::skiplist_entry): New.
2984 (skiplist_entry::add_entry): New.
2985 (skip_file_command, skip_function): Adjust.
2986 (compile_skip_regexp): Delete.
2987 (skip_command): Don't compile regexp here. Adjust to use
2988 skiplist_entry::add_entry.
2989 (skip_info): Adjust to use range-for and getters.
2990 (skip_enable_command, skip_disable_command): Adjust to use
2991 range-for and setters.
2992 (skip_delete_command): Adjust to use std::list.
2993 (add_skiplist_entry): Delete.
2994 (skip_file_p): Delete, refactored as ...
2995 (skiplist_entry::do_skip_file_p): ... this new method.
2996 (skip_gfile_p): Delete, refactored as ...
2997 (skiplist_entry::do_gskip_file_p): ... this new method.
2998 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2999 (skiplist_entry::skip_function_p): ... this new method.
3000 (function_name_is_marked_for_skip): Now returns bool, and takes
3001 the function sal by const reference. Adjust to use range-for and
3002 skiplist_entry methods.
3003 (_initialize_step_skip): Remove references to
3004 skiplist_entry_chain, skiplist_entry_count.
3005 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3006 takes the function sal by const reference.
3007
3008 2017-08-11 Yao Qi <yao.qi@linaro.org>
3009
3010 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3011 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3012 (dwarf2_frame_cache):
3013 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3014 RETURN_MASK_ALL and set *this_case to NULL.
3015 * frame-unwind.h: Update comments.
3016
3017 2017-08-11 Yao Qi <yao.qi@linaro.org>
3018
3019 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3020 (dwarf2_frame_state_copy_regs): Remove.
3021 (dwarf2_frame_state_free_regs): Remove.
3022 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3023 (dwarf2_restore_rule): Call method .alloc_regs instead of
3024 dwarf2_frame_state_alloc_regs.
3025 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3026 constructor. Call std::move.
3027 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3028 (dwarf2_frame_cache): Likewise.
3029
3030 [GDB_SELF_TEST]: Include selftest.h and
3031 selftest-arch.h.
3032 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3033 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3034 execute_cfa_program_test.
3035
3036 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3037 copy ctor, assignment operator, move assignment.
3038 <alloc_regs>: New method.
3039 <swap>: New method.
3040 (struct dwarf2_frame_state): Delete dtor.
3041 (dwarf2_frame_state_alloc_regs): Remove declaration.
3042 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3043 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3044
3045 2017-08-11 Yao Qi <yao.qi@linaro.org>
3046
3047 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3048 (dwarf2_frame_state::dwarf2_frame_state): New.
3049 (dwarf2_frame_state::~dwarf2_frame_state): New.
3050 (dwarf2_fetch_cfa_info): Update.
3051 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3052 rather than a pointer. Update code.
3053 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3054 dtor.
3055 <data_align, code_align, retaddr_column>: Change them to const.
3056 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3057 to bool.
3058
3059 2017-08-11 Yao Qi <yao.qi@linaro.org>
3060
3061 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3062 <loc.exp>: New field.
3063 * dwarf2-frame.c (execute_cfa_program): Update.
3064 (dwarf2_frame_prev_register): Update.
3065
3066 2017-08-10 Pedro Alves <palves@redhat.com>
3067
3068 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3069
3070 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3071
3072 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3073 (fbsd_pending_children): Use std::list.
3074 (fbsd_remember_child): Likewise.
3075 (fbsd_is_child_pending): Likewise.
3076 (fbsd_pending_vfork_done): Use std::forward_list.
3077 (fbsd_add_vfork_done): Likewise.
3078 (fbsd_is_vfork_done_pending): Likewise.
3079 (fbsd_next_vfork_done): Likewise.
3080
3081 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3082
3083 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3084 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3085 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3086 for `mapfilename'.
3087 (fbsd_xfer_partial): Use gdb::byte_vector.
3088 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3089
3090 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3091
3092 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3093 "filestuff.h".
3094 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3095
3096 2017-08-09 Tom Tromey <tom@tromey.com>
3097
3098 * skip.c (skiplist_entry): New constructor.
3099 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3100 (skiplist_entry::file_is_glob): Now bool.
3101 (skiplist_entry::file, skiplist_entry::function): Now
3102 std::string.
3103 (make_skip_entry): Return a unique_ptr. Use new.
3104 (free_skiplist_entry, free_skiplist_entry_cleanup)
3105 (make_free_skiplist_entry_cleanup): Remove.
3106 (skip_command, skip_disable_command, add_skiplist_entry)
3107 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3108 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3109 (function_name_is_marked_for_skip): Update.
3110 (skip_delete_command): Update. Use delete.
3111
3112 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3113
3114 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3115 (aarch64_linux_core_read_description): New function.
3116 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3117
3118 2017-08-09 Pedro Alves <palves@redhat.com>
3119
3120 * cp-name-parser.y (cp_comp_to_string): Return a
3121 gdb::unique_xmalloc_ptr<char>.
3122 * cp-support.c (replace_typedefs_qualified_name)
3123 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3124 (cp_canonicalize_string_full): Use op= instead of explicit
3125 convertion.
3126 (cp_class_name_from_physname, method_name_from_physname)
3127 (cp_func_name, cp_remove_params): Adjust to use
3128 gdb::unique_xmalloc_ptr<char>.
3129 * cp-support.h (cp_comp_to_string): Return a
3130 gdb::unique_xmalloc_ptr<char>.
3131 * python/py-type.c (typy_lookup_type): Adjust to use
3132 gdb::unique_xmalloc_ptr<char>.
3133
3134 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3135
3136 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3137
3138 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3139 Yao Qi <yao.qi@linaro.org>
3140
3141 * cp-support.c (cp_canonicalize_string_full): Use
3142 gdb::unique_xmalloc_ptr<char>.
3143 (cp_canonicalize_string): Likewise.
3144
3145 2017-08-09 Yao Qi <yao.qi@linaro.org>
3146
3147 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3148 * regformats/i386/amd64-avx-avx512.dat: Remove.
3149 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3150 * regformats/i386/amd64-avx-mpx.dat:Remove.
3151 * regformats/i386/amd64-avx.dat: Remove.
3152 * regformats/i386/amd64-mpx.dat: Remove.
3153 * regformats/i386/i386-avx-avx512.dat: Remove.
3154 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3155 * regformats/i386/i386-avx-mpx.dat: Remove.
3156 * regformats/i386/i386-mmx.dat: Remove.
3157 * regformats/i386/i386-mpx.dat: Remove.
3158
3159 2017-08-09 Yao Qi <yao.qi@linaro.org>
3160
3161 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3162 * amd64-tdep.c: Don't include features/i386/x32*.c.
3163 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3164 functions.
3165 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3166 and i386/x32-avx-avx512.
3167 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3168 and i386/x32.xml.
3169 * features/i386/x32-avx-avx512.c: Removed.
3170 * features/i386/x32-avx-avx512.xml: Removed.
3171 * features/i386/x32-avx.c: Removed.
3172 * features/i386/x32-avx.xml: Removed.
3173 * features/i386/x32.c: Removed.
3174 * features/i386/x32.xml: Removed.
3175 * regformats/i386/x32-avx-avx512.dat: Removed.
3176 * regformats/i386/x32-avx.dat: Removed.
3177 * regformats/i386/x32.dat: Removed.
3178
3179 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3180
3181 PR breakpoints/21886
3182 * mem-break.c (default_memory_insert_breakpoint): Use
3183 `->placed_address' rather than `->reqstd_address' for the
3184 breakpoint location.
3185
3186 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3187
3188 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3189 assertions.
3190
3191 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3192
3193 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3194 a union of `tdep_info', `tdesc_data' and `id'.
3195 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3196 rather than `info.tdep_info'.
3197 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3198 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3199 * i386-tdep.c (i386_gdbarch_init): Likewise.
3200 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3201 * mips-tdep.c (mips_gdbarch_init): Likewise.
3202 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3203 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3204 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3205 `info.tdep_info'.
3206 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3207 `info.tdep_info'.
3208 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3209 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3210 `info.tdep_info'.
3211 * spu-tdep.c (spu_gdbarch_init): Likewise.
3212 * gdbarch.h: Regenerate.
3213
3214 2017-08-07 Leszek Swirski <leszeks@google.com>
3215
3216 PR symtab/20899
3217 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3218
3219 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3220
3221 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3222 (gdbsim_open): Rename gdb_argv args object to argv.
3223
3224 2017-08-05 Tom Tromey <tom@tromey.com>
3225
3226 * compile/compile-object-load.c (compile_object_load): Use
3227 gdb::unique_xmalloc_ptr.
3228 * cli/cli-dump.c (scan_filename): Rename from
3229 scan_filename_with_cleanup. Change return type.
3230 (scan_expression): Rename from scan_expression_with_cleanup.
3231 Change return type.
3232 (dump_memory_to_file, dump_value_to_file, restore_command):
3233 Use gdb::unique_xmalloc_ptr. Update.
3234 * cli/cli-cmds.c (find_and_open_script): Use
3235 gdb::unique_xmalloc_ptr.
3236 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3237 * symmisc.c (maintenance_print_symbols)
3238 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3239 * symfile.c (symfile_bfd_open, generic_load)
3240 (add_symbol_file_command, remove_symbol_file_command): Use
3241 gdb::unique_xmalloc_ptr.
3242 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3243 * psymtab.c (maintenance_print_psymbols): Use
3244 gdb::unique_xmalloc_ptr.
3245 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3246 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3247 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3248 (reload_shared_libraries_1): Likewise.
3249
3250 2017-08-05 Tom Tromey <tom@tromey.com>
3251
3252 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3253 (rust_op_vector, rust_set_vector): New typedefs.
3254 (current_parser): New global.
3255 (work_obstack): Change to pointer type. Update all users.
3256 (rust_ast, pstate): Remove globals.
3257 (struct rust_parser): New.
3258 (%union) <params, field_inits>: Change type.
3259 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3260 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3261 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3262 (convert_params_to_types, convert_params_to_expression): Change
3263 type of "params".
3264 (ast_string): Change type of "fields".
3265 (rust_parse): Make a rust_parser. Remove cleanups.
3266 (rust_lex_tests): Make and install an auto_obstack.
3267
3268 2017-08-04 Yao Qi <yao.qi@linaro.org>
3269
3270 * configure.srv (ipa_x32_linux_regobj): New.
3271 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3272 instead of X86_TDESC_AVX512.
3273 (initialize_low_tracepoint): Call
3274 init_registers_x32_avx_avx512_linux.
3275
3276 2017-08-04 Yao Qi <yao.qi@linaro.org>
3277
3278 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3279
3280 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3281
3282 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3283
3284 2017-08-03 Tom Tromey <tom@tromey.com>
3285
3286 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3287 Remove.
3288 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3289
3290 2017-08-03 Tom Tromey <tom@tromey.com>
3291
3292 * python/py-param.c (compute_enum_values): Use gdb_argv.
3293
3294 2017-08-03 Tom Tromey <tom@tromey.com>
3295
3296 * utils.h (struct gdb_argv_deleter): New.
3297 (gdb_argv): New class.
3298 * utils.c (gdb_argv::reset): New method.
3299 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3300 * tracefile.c (tsave_command): Use gdb_argv.
3301 * top.c (new_ui_command): Use gdb_argv.
3302 * symmisc.c (maintenance_print_symbols)
3303 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3304 * symfile.c (symbol_file_command, generic_load)
3305 (remove_symbol_file_command): Use gdb_argv.
3306 * stack.c (backtrace_command): Use gdb_argv.
3307 * source.c (add_path, show_substitute_path_command)
3308 (unset_substitute_path_command, set_substitute_path_command):
3309 Use gdb_argv.
3310 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3311 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3312 * remote.c (extended_remote_run, remote_put_command)
3313 (remote_get_command, remote_delete_command): Use gdb_argv.
3314 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3315 (gdbsim_open): Use gdb_argv.
3316 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3317 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3318 * procfs.c (procfs_info_proc): Use gdb_argv.
3319 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3320 * infrun.c (handle_command): Use gdb_argv.
3321 * inferior.c (add_inferior_command, clone_inferior_command):
3322 Use gdb_argv.
3323 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3324 * exec.c (exec_file_command): Use gdb_argv.
3325 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3326 * compile/compile.c (build_argc_argv): Use gdb_argv.
3327
3328 2017-08-03 Tom Tromey <tom@tromey.com>
3329
3330 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3331
3332 2017-08-03 Tom Tromey <tom@tromey.com>
3333
3334 * python/python.c (compute_python_string): Return std::string.
3335 (gdbpy_eval_from_control_command): Update.
3336 (do_start_initialization): Use std::string.
3337 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3338 xstrprintf.
3339 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3340 xstrprintf.
3341
3342 2017-08-03 Tom Tromey <tom@tromey.com>
3343
3344 * top.h (do_restore_instream_cleanup): Remove.
3345 * top.c (do_restore_instream_cleanup): Remove.
3346 (read_command_file): Use scoped_restore.
3347 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3348
3349 2017-08-03 Tom Tromey <tom@tromey.com>
3350
3351 * cli/cli-script.c (execute_user_command)
3352 (execute_control_command): Use scoped_restore.
3353
3354 2017-08-03 Tom Tromey <tom@tromey.com>
3355
3356 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3357 (execute_user_command): Remove user_call_depth; use
3358 user_args_stack's size instead.
3359
3360 2017-08-03 Tom Tromey <tom@tromey.com>
3361
3362 * top.h (in_user_command): Remove.
3363 * top.c (in_user_command): Remove.
3364 * cli/cli-script.c (do_restore_user_call_depth)
3365 (execute_user_command): Update.
3366
3367 2017-08-03 Tom Tromey <tom@tromey.com>
3368
3369 * valops.c (search_struct_method): Use gdb::byte_vector.
3370 * valarith.c (value_concat): Use std::vector.
3371 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3372 (simple_search_memory): Likewise.
3373 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3374 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3375 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3376 * elfread.c (elf_rel_plt_read): Use std::string.
3377 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3378 * cli/cli-dump.c (restore_section_callback): Use
3379 gdb::byte_vector.
3380
3381 2017-08-03 Tom Tromey <tom@tromey.com>
3382
3383 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3384
3385 2017-08-03 Tom Tromey <tom@tromey.com>
3386
3387 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3388 (tui_register_format): Use scoped_restore.
3389
3390 2017-08-03 Tom Tromey <tom@tromey.com>
3391
3392 * reverse.c (exec_direction_default): Remove.
3393 (exec_reverse_once): Use scoped_restore.
3394 * remote.c (restore_remote_timeout): Remove.
3395 (remote_flash_erase, remote_flash_write, remote_flash_done)
3396 (readchar, remote_serial_write): Use scoped_restore.
3397 * cli/cli-script.c (struct source_cleanup_lines_args)
3398 (source_cleanup_lines): Remove.
3399 (script_from_file): Use scoped_restore.
3400 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3401 (source_command): Use scoped_restore.
3402
3403 2017-08-03 Tom Tromey <tom@tromey.com>
3404
3405 * utils.h (make_cleanup_free_so): Remove.
3406 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3407 * solist.h (struct so_deleter): New.
3408 (so_list_up): New typedef.
3409 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3410
3411 2017-08-03 Tom Tromey <tom@tromey.com>
3412
3413 * utils.h (make_cleanup_restore_current_language): Remove.
3414 * utils.c (do_restore_current_language)
3415 (make_cleanup_restore_current_language): Remove.
3416 * parse.c (parse_exp_in_context_1)
3417 (parse_expression_with_language): Use
3418 scoped_restore_current_language.
3419 * mi/mi-main.c (mi_cmd_execute): Use
3420 scoped_restore_current_language.
3421 * language.h (scoped_restore_current_language): New class.
3422
3423 2017-08-03 Tom Tromey <tom@tromey.com>
3424
3425 * compile/compile.c (cleanup_unlink_file): Remove.
3426 (compile_to_object): Use gdb::unlinker.
3427 (eval_compile_command): Likewise.
3428
3429 2017-08-03 Tom Tromey <tom@tromey.com>
3430
3431 * utils.h (make_cleanup_fclose): Remove.
3432 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3433
3434 2017-08-03 Tom Tromey <tom@tromey.com>
3435
3436 * top.c (open_terminal_stream): Return gdb_file_up.
3437 (new_ui_command): Update.
3438
3439 2017-08-03 Tom Tromey <tom@tromey.com>
3440
3441 * source.c (print_source_lines_base, forward_search_command)
3442 (reverse_search_command): Use gdb_file_up.
3443
3444 2017-08-03 Tom Tromey <tom@tromey.com>
3445
3446 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3447
3448 2017-08-03 Tom Tromey <tom@tromey.com>
3449
3450 * cli/cli-cmds.c (find_and_open_script): Change return type.
3451 Remove "streamp" and "full_path" parameters.
3452 (source_script_with_search): Update.
3453 * auto-load.c (source_script_file): Update.
3454 * cli/cli-cmds.h (find_and_open_script): Change type.
3455 (open_script): New struct.
3456
3457 2017-08-03 Tom Tromey <tom@tromey.com>
3458
3459 * xml-support.c (xml_fetch_content_from_file): Update.
3460 * ui-file.c (stdio_file::open): Update.
3461 * tracefile-tfile.c (tfile_start): Update.
3462 * remote.c (remote_file_put, remote_file_get): Update.
3463 * nat/linux-procfs.c (linux_proc_get_int)
3464 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3465 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3466 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3467 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3468 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3469 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3470 * linux-nat.c (linux_proc_pending_signals): Update.
3471 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3472 (file_closer): Remove.
3473 * compile/compile.c (compile_to_object): Update.
3474 * common/filestuff.h (struct gdb_file_deleter): New.
3475 (gdb_file_up): New typedef.
3476 (gdb_fopen_cloexec): Change return type.
3477 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3478 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3479 (dump_binary_file, restore_binary_file): Update.
3480 * auto-load.c (auto_load_objfile_script_1): Update.
3481
3482 2017-08-03 Tom Tromey <tom@tromey.com>
3483
3484 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3485 (info_static_tracepoint_markers_command): Likewise.
3486 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3487 * skip.c (skip_info): Use ui_out_emit_table.
3488 * progspace.c (print_program_space): Use ui_out_emit_table.
3489 * osdata.c (info_osdata): Use ui_out_emit_table.
3490 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3491 ui_out_emit_table.
3492 * linux-thread-db.c (info_auto_load_libthread_db): Use
3493 ui_out_emit_table.
3494 * inferior.c (print_inferior): Use ui_out_emit_table.
3495 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3496 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3497 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3498 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3499 * ui-out.h (class ui_out_emit_table): New.
3500
3501 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3502
3503 * mips-tdep.c (mips_fpu_type_str): New function.
3504 (mips_dump_tdep): Call it.
3505
3506 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3507
3508 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3509 `->mips_fpu_type'.
3510
3511 2017-07-31 Xavier Roirand <roirand@adacore.com>
3512
3513 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3514
3515 2017-07-27 Xavier Roirand <roirand@adacore.com>
3516
3517 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3518
3519 2017-07-26 Yao Qi <yao.qi@linaro.org>
3520
3521 * cli/cli-cmds.c (maintenancechecklist): New variable.
3522 * gdbcmd.h (maintenancechecklist): Declare it.
3523 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3524 Call i386_linux_read_description with different masks.
3525 * maint.c (maintenance_check_command): New function.
3526 (_initialize_maint_cmds): Call add_prefix_cmd.
3527 * target-descriptions.c (tdesc_reg): override operator != and ==.
3528 (tdesc_type): Likewise.
3529 (tdesc_feature): Likewise.
3530 (target_desc): Likewise.
3531 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3532 (maintenance_check_xml_descriptions): New function.
3533 (_initialize_target_descriptions) Add command "xml-descriptions".
3534 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3535
3536 2017-07-26 Yao Qi <yao.qi@linaro.org>
3537
3538 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3539 Include features/i386/32bit-*.c.
3540 (i386_linux_read_description): Generate target description if it
3541 doesn't exist.
3542 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3543 functions.
3544 * features/i386/32bit-linux.c: Re-generated.
3545 * features/i386/32bit-sse.c: Likewise.
3546 * target-descriptions.c (print_c_feature::visit): Print code to
3547 set register number if needed.
3548 (print_c_feature) <m_next_regnum>: New field.
3549
3550 2017-07-26 Yao Qi <yao.qi@linaro.org>
3551
3552 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3553 (FEATURE_XMLFILES): New.
3554 (FEATURE_CFILES): New.
3555 New rules.
3556 (clean-cfiles): Remove generated c files.
3557 * features/i386/32bit-avx.c: Generated.
3558 * features/i386/32bit-avx512.c: Generated.
3559 * features/i386/32bit-core.c: Generated.
3560 * features/i386/32bit-linux.c: Generated.
3561 * features/i386/32bit-mpx.c: Generated.
3562 * features/i386/32bit-pkeys.c: Generated.
3563 * features/i386/32bit-sse.c: Generated.
3564 * target-descriptions.c: Include algorithm.
3565 (tdesc_element_visitor): Add method visit_end.
3566 (print_c_tdesc): Implement visit_end.
3567 (print_c_tdesc:: m_filename_after_features): Move it to
3568 protected.
3569 (print_c_feature): New class.
3570 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3571 name starts with "i386/32bit-".
3572
3573 2017-07-26 Yao Qi <yao.qi@linaro.org>
3574
3575 * target-descriptions.c (tdesc_element_visitor): New class.
3576 (tdesc_element): New class.
3577 (tdesc_reg): Inherit from tdesc_element.
3578 (tdesc_reg::accept): New function.
3579 (tdesc_type): Inherit from tdesc_element.
3580 (tdesc_type::accept): New function.
3581 (tdesc_feature): Inherit from tdesc_element.
3582 (tdesc_feature::accept): New function.
3583 (target_desc): Inherit from tdesc_element.
3584 (target_desc::target_desc): New.
3585 (target_desc::~target_desc): New.
3586 (target_desc::accept): New.
3587 (allocate_target_description): Use new.
3588 (free_target_description): Use delete.
3589 (print_c_tdesc): New class.
3590 (maint_print_c_tdesc_cmd): Adjust.
3591
3592 * features/aarch64.c: Re-generated.
3593 * features/arc-arcompact.c: Re-generated.
3594 * features/arc-v2.c: Re-generated.
3595 * features/arm/arm-with-iwmmxt.c: Re-generated.
3596 * features/arm/arm-with-m.c: Re-generated.
3597 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3598 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3599 * features/arm/arm-with-neon.c: Re-generated.
3600 * features/arm/arm-with-vfpv2.c: Re-generated.
3601 * features/arm/arm-with-vfpv3.c: Re-generated.
3602 * features/i386/amd64-avx-avx512.c: Re-generated.
3603 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3604 * features/i386/amd64-avx.c: Re-generated.
3605 * features/i386/amd64-avx-linux.c: Re-generated.
3606 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3607 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3608 * features/i386/amd64-avx-mpx.c: Re-generated.
3609 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3610 * features/i386/amd64.c: Re-generated.
3611 * features/i386/amd64-linux.c: Re-generated.
3612 * features/i386/amd64-mpx.c: Re-generated.
3613 * features/i386/amd64-mpx-linux.c: Re-generated.
3614 * features/i386/i386-avx-avx512.c: Re-generated.
3615 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3616 * features/i386/i386-avx.c: Re-generated.
3617 * features/i386/i386-avx-linux.c: Re-generated.
3618 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3619 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3620 * features/i386/i386-avx-mpx.c: Re-generated.
3621 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3622 * features/i386/i386.c: Re-generated.
3623 * features/i386/i386-linux.c: Re-generated.
3624 * features/i386/i386-mmx.c: Re-generated.
3625 * features/i386/i386-mmx-linux.c: Re-generated.
3626 * features/i386/i386-mpx.c: Re-generated.
3627 * features/i386/i386-mpx-linux.c: Re-generated.
3628 * features/i386/x32-avx-avx512.c: Re-generated.
3629 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3630 * features/i386/x32-avx.c: Re-generated.
3631 * features/i386/x32-avx-linux.c: Re-generated.
3632 * features/i386/x32.c: Re-generated.
3633 * features/i386/x32-linux.c: Re-generated.
3634 * features/microblaze.c: Re-generated.
3635 * features/microblaze-with-stack-protect.c: Re-generated.
3636 * features/mips64-dsp-linux.c: Re-generated.
3637 * features/mips64-linux.c: Re-generated.
3638 * features/mips-dsp-linux.c: Re-generated.
3639 * features/mips-linux.c: Re-generated.
3640 * features/nds32.c: Re-generated.
3641 * features/nios2.c: Re-generated.
3642 * features/nios2-linux.c: Re-generated.
3643 * features/rs6000/powerpc-32.c: Re-generated.
3644 * features/rs6000/powerpc-32l.c: Re-generated.
3645 * features/rs6000/powerpc-403.c: Re-generated.
3646 * features/rs6000/powerpc-403gc.c : Re-generated.
3647 * features/rs6000/powerpc-405.c: Re-generated.
3648 * features/rs6000/powerpc-505.c: Re-generated.
3649 * features/rs6000/powerpc-601.c: Re-generated.
3650 * features/rs6000/powerpc-602.c: Re-generated.
3651 * features/rs6000/powerpc-603.c: Re-generated.
3652 * features/rs6000/powerpc-604.c: Re-generated.
3653 * features/rs6000/powerpc-64.c: Re-generated.
3654 * features/rs6000/powerpc-64l.c: Re-generated.
3655 * features/rs6000/powerpc-7400.c: Re-generated.
3656 * features/rs6000/powerpc-750.c: Re-generated.
3657 * features/rs6000/powerpc-860.c: Re-generated.
3658 * features/rs6000/powerpc-altivec32.c: Re-generated.
3659 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3660 * features/rs6000/powerpc-altivec64.c: Re-generated.
3661 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3662 * features/rs6000/powerpc-cell32l.c: Re-generated.
3663 * features/rs6000/powerpc-cell64l.c: Re-generated.
3664 * features/rs6000/powerpc-e500.c: Re-generated.
3665 * features/rs6000/powerpc-e500l.c: Re-generated.
3666 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3667 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3668 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3669 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3670 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3671 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3672 * features/rs6000/powerpc-vsx32.c: Re-generated.
3673 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3674 * features/rs6000/powerpc-vsx64.c: Re-generated.
3675 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3676 * features/rs6000/rs6000.c: Re-generated.
3677 * features/s390-linux32.c: Re-generated.
3678 * features/s390-linux32v1.c: Re-generated.
3679 * features/s390-linux32v2.c: Re-generated.
3680 * features/s390-linux64.c: Re-generated.
3681 * features/s390-linux64v1.c: Re-generated.
3682 * features/s390-linux64v2.c: Re-generated.
3683 * features/s390-te-linux64.c: Re-generated.
3684 * features/s390-tevx-linux64.c: Re-generated.
3685 * features/s390-vx-linux64.c: Re-generated.
3686 * features/s390x-linux64.c: Re-generated.
3687 * features/s390x-linux64v1.c: Re-generated.
3688 * features/s390x-linux64v2.c: Re-generated.
3689 * features/s390x-te-linux64.c: Re-generated.
3690 * features/s390x-tevx-linux64.c: Re-generated.
3691 * features/s390x-vx-linux64.c: Re-generated.
3692 * features/sparc/sparc32-solaris.c: Re-generated.
3693 * features/sparc/sparc64-solaris.c: Re-generated.
3694 * features/tic6x-c62x.c: Re-generated.
3695 * features/tic6x-c62x-linux.c: Re-generated.
3696 * features/tic6x-c64x.c: Re-generated.
3697 * features/tic6x-c64x-linux.c: Re-generated.
3698 * features/tic6x-c64xp.c: Re-generated.
3699 * features/tic6x-c64xp-linux.c: Re-generated.
3700
3701 2017-07-26 Yao Qi <yao.qi@linaro.org>
3702
3703 * i386-linux-tdep.c (i386_linux_read_description): New function.
3704 (i386_linux_core_read_description): Call
3705 i386_linux_read_description.
3706 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3707 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3708 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3709 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3710 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3711 * x86-linux-nat.c (x86_linux_read_description): Call
3712 i386_linux_read_description.
3713
3714 2017-07-26 Yao Qi <yao.qi@linaro.org>
3715
3716 * NEWS: Mention it.
3717 * features/Makefile (%.c: %.xml): Pass the xml file name to
3718 command "maint print c-tdesc".
3719 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3720 name from 'arg'.
3721
3722 2017-07-26 Yao Qi <yao.qi@linaro.org>
3723
3724 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3725 in-class initialization.
3726 (tdesc_create_feature): Call new instead of XCNEW.
3727 (free_target_description): Ue delete.
3728
3729 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3730
3731 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3732
3733 2017-07-25 Yao Qi <yao.qi@linaro.org>
3734
3735 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3736 constant.
3737 (amd64_x32_init_abi): Likewise.
3738 * amd64-tdep.h (amd64_init_abi): Update declaration.
3739 (amd64_x32_init_abi): Likewise.
3740
3741 2017-07-25 Yao Qi <yao.qi@linaro.org>
3742
3743 PR tdep/21717
3744 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3745 condition for FPSCR.
3746 (arm_linux_store_inferior_registers): Likewise.
3747
3748 2017-07-22 Tom Tromey <tom@tromey.com>
3749
3750 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3751 <syscalls_counts>: Now a std::vector.
3752 (get_catch_syscall_inferior_data): Use "new".
3753 (catch_syscall_inferior_data_cleanup): Use "delete".
3754 (insert_catch_syscall, remove_catch_syscall)
3755 (clear_syscall_counts): Update.
3756
3757 2017-07-22 Tom Tromey <tom@tromey.com>
3758
3759 * break-catch-syscall.c (syscall_catchpoint)
3760 <syscalls_to_be_caught>: Now a std::vector<int>
3761 (~syscall_catchpoint): Remove.
3762 (insert_catch_syscall, remove_catch_syscall)
3763 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3764 (print_mention_catch_syscall, print_recreate_catch_syscall):
3765 Update.
3766 (create_syscall_event_catchpoint): Change type of "filter"
3767 parameter.
3768 (catch_syscall_split_args): Return a std::vector.
3769 (catch_syscall_command_1, catching_syscall_number_1): Update.
3770
3771 2017-07-22 Tom Tromey <tom@tromey.com>
3772
3773 * break-catch-throw.c (struct exception_catchpoint)
3774 <exception_rx>: Now a std::string.
3775 (~exception_catchpoint): Remove.
3776 (print_one_detail_exception_catchpoint): Update.
3777 (handle_gnu_v3_exceptions): Change type of except_rx.
3778 (extract_exception_regexp): Return a std::string.
3779 (catch_exception_command_1): Update.
3780
3781 2017-07-22 Tom Tromey <tom@tromey.com>
3782
3783 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3784 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3785 std::vector.
3786 <catch_all>: Now a bool.
3787 (~signal_catchpoint): Remove.
3788 (signal_catchpoint_insert_location)
3789 (signal_catchpoint_remove_location)
3790 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3791 (signal_catchpoint_print_mention)
3792 (signal_catchpoint_print_recreate)
3793 (signal_catchpoint_explains_signal): Update.
3794 (create_signal_catchpoint): Change type of "filter" and
3795 "catch_all".
3796 (catch_signal_split_args): Return a std::vector. Change type of
3797 "catch_all".
3798 (catch_signal_command): Update.
3799
3800 2017-07-20 Pedro Alves <palves@redhat.com>
3801
3802 * ada-lang.c (ada_language_defn): Make extern.
3803 (_initialize_ada_language): Remove add_language call.
3804 * c-lang.c (c_language_defn, cplus_language_defn)
3805 (asm_language_defn, minimal_language_defn): Make extern.
3806 (_initialize_c_language): Delete.
3807 * completer.c (compare_cstrings): Delete, moved to utils.h.
3808 * d-lang.c (d_language_defn): Make extern.
3809 (_initialize_d_language): Remove add_language calls.
3810 * defs.h (enum language): Add comment.
3811 * f-lang.c (f_language_defn): Make extern.
3812 (_initialize_f_language): Remove add_language call.
3813 * go-lang.c (go_language_defn): Make extern.
3814 (_initialize_go_language): Remove add_language call.
3815 * language.c: Include <algorithm>.
3816 (languages): Redefine as const array.
3817 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3818 (set_language_command): Handle "local". Use for-range loop.
3819 (set_language): Remove loop.
3820 (language_enum): Rewrite.
3821 (language_def, language_str): Remove loops.
3822 (add_language): Delete.
3823 (add_set_language_command): New, based on add_languages.
3824 (skip_language_trampoline): Adjust.
3825 (local_language_defn): Delete.
3826 (language_gdbarch_post_init): Adjust.
3827 (_initialize_language): Remove add_language calls. Call
3828 add_set_language_command.
3829 * language.h (add_language): Delete.
3830 (auto_language_defn)
3831 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3832 (asm_language_defn, c_language_defn, cplus_language_defn)
3833 (d_language_defn, f_language_defn, go_language_defn)
3834 (m2_language_defn, objc_language_defn, opencl_language_defn)
3835 (pascal_language_defn, rust_language_defn): Declare.
3836 * m2-lang.c (m2_language_defn): Make extern.
3837 (_initialize_m2_language): Remove add_language call.
3838 * objc-lang.c (objc_language_defn): Make extern.
3839 (_initialize_objc_language): Remove add_language call.
3840 * opencl-lang.c (opencl_language_defn): Make extern.
3841 (_initialize_opencl_language): Remove add_language call.
3842 * p-lang.c (pascal_language_defn): Make extern.
3843 (_initialize_pascal_language): Delete.
3844 * rust-lang.c (rust_language_defn): Make extern.
3845 (_initialize_rust_language): Delete.
3846 * utils.h (compare_cstrings): New static inline function.
3847
3848 2017-07-20 Pedro Alves <palves@redhat.com>
3849
3850 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3851 (get_var_value): Constify parameters.
3852 (get_int_var_value): Change prototype.
3853 (to_fixed_range_type): Adjust.
3854 * ada-lang.h (get_int_var_value): Change prototype.
3855
3856 2017-07-20 Pedro Alves <palves@redhat.com>
3857
3858 * dwarf2read.c (dw2_lookup_symbol): Use
3859 SYMBOL_MATCHES_SEARCH_NAME.
3860 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3861
3862 2017-07-20 Pedro Alves <palves@redhat.com>
3863
3864 * block.c (block_iter_name_step, block_iter_name_first)
3865 (block_iter_name_next): Delete.
3866 (block_lookup_symbol_primary): Adjust to use
3867 dict_iter_match_first/dict_iter_match_next.
3868 * block.h (block_iter_name_first, block_iter_name_next): Delete
3869 declarations.
3870 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3871 dict_iter_match_first/dict_iter_match_next.
3872
3873 2017-07-20 Pedro Alves <palves@redhat.com>
3874
3875 * cp-support.c (cp_find_first_component_aux): Add missing case for
3876 end of string.
3877
3878 2017-07-18 David Blaikie <dblaikie@gmail.com>
3879
3880 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3881 of dwo_cu's dwo_file.
3882
3883 2017-07-18 Yao Qi <yao.qi@linaro.org>
3884
3885 * remote.c (store_registers_using_G): Remove one line comment.
3886
3887 2017-07-18 Yao Qi <yao.qi@linaro.org>
3888
3889 * regcache.c (regcache_cpy): Simplify it.
3890 (regcache::cpy_no_passthrough): Remove it.
3891 * regcache.h (cpy_no_passthrough): Remove it.
3892 (regcache_dup, regcache_cpy): Update comments.
3893
3894 2017-07-18 Pedro Alves <palves@redhat.com>
3895
3896 * remote-sim.c (sim_command_completer): Adjust to work with a
3897 completion_tracker instead of a VEC.
3898
3899 2017-07-17 Pedro Alves <palves@redhat.com>
3900
3901 * completer.c (complete_source_filenames): New function.
3902 (complete_address_and_linespec_locations): New function.
3903 (location_completer): Use complete_address_and_linespec_locations.
3904 (completion_tracker::build_completion_result): Honor the tracker's
3905 request to suppress append.
3906 * completer.h (completion_tracker::suppress_append_ws)
3907 (completion_tracker::set_suppress_append_ws): New methods.
3908 (completion_tracker::m_suppress_append_ws): New field.
3909 (complete_source_filenames): New declaration.
3910 * linespec.c (linespec_complete_what): New.
3911 (struct ls_parser) <complete_what, completion_word,
3912 completion_quote_char, completion_quote_end, completion_tracker>:
3913 New fields.
3914 (string_find_incomplete_keyword_at_end): New.
3915 (linespec_lexer_lex_string): Record quote char. If in completion
3916 mode, don't throw.
3917 (linespec_lexer_consume_token): Advance the completion word point.
3918 (linespec_lexer_peek_token): Save/restore completion info.
3919 (save_stream_and_consume_token): New.
3920 (set_completion_after_number): New.
3921 (linespec_parse_basic): Set what to complete next depending on
3922 token. Handle function and label completions specially.
3923 (parse_linespec): Disable objc shortcut in completion mode. Set
3924 what to complete next depending on token type. Skip keyword if in
3925 completion mode.
3926 (complete_linespec_component, linespec_complete): New.
3927 * linespec.h (linespec_complete): Declare.
3928
3929 2017-07-17 Pedro Alves <palves@redhat.com>
3930
3931 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3932 Handle 'operator<' / 'operator<<'.
3933
3934 2017-07-17 Pedro Alves <palves@redhat.com>
3935
3936 * completer.c (collect_explicit_location_matches): Handle
3937 MATCH_LABEL.
3938 (convert_explicit_location_to_linespec): New, factored out from
3939 ...
3940 (convert_explicit_location_to_sals): ... this.
3941 (complete_label): New.
3942 (linespec_complete_label, find_label_symbols_in_block): New.
3943 (find_label_symbols): Add completion_mode parameter and adjust to
3944 call find_label_symbols_in_block.
3945 * linespec.h (linespec_complete_label): Declare.
3946
3947 2017-07-17 Pedro Alves <palves@redhat.com>
3948
3949 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3950 complete_symbol_mode parameter.
3951 * cli/cli-cmds.c (complete_command): Get the completion result out
3952 of the handle_brkchars tracker if used a custom word point.
3953 * completer.c: Include "linespec.h".
3954 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3955 (advance_to_expression_complete_word_point): New.
3956 (completion_tracker::completes_to_completion_word): New.
3957 (complete_files_symbols): Pass down
3958 complete_symbol_mode::EXPRESSION.
3959 (explicit_options, probe_options): New.
3960 (collect_explicit_location_matches): Complete on the
3961 explictit_loc->foo instead of word. Use
3962 linespec_complete_function. Handle MATCH_LINE. Handle offering
3963 keyword and options completions.
3964 (backup_text_ptr): Delete.
3965 (skip_keyword): New.
3966 (complete_explicit_location): Remove 'word' parameter. Add
3967 language, quoted_arg_start and quoted_arg_end parameters.
3968 Rewrite, parsing left to right.
3969 (location_completer): Rewrite.
3970 (location_completer_handle_brkchars): New function.
3971 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3972 (enum complete_line_internal_reason): Adjust comments.
3973 (completion_tracker::discard_completions): New.
3974 (completer_handle_brkchars_func_for_completer): Handle
3975 location_completer.
3976 (gdb_custom_word_point_brkchars)
3977 (gdb_org_rl_basic_quote_characters): New.
3978 (gdb_completion_word_break_characters_throw)
3979 (completion_find_completion_word): Handle trackers that use a
3980 custom word point.
3981 (completion_tracker::advance_custom_word_point_by): New.
3982 (completion_tracker::build_completion_result): Don't rely on
3983 readline appending the quote char.
3984 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3985 use a custom word point.
3986 (gdb_rl_attempted_completion_function): Restore
3987 rl_basic_quote_characters.
3988 * completer.h (class completion_tracker): Extend intro comment.
3989 (completion_tracker::set_quote_char)
3990 (completion_tracker::quote_char)
3991 (completion_tracker::set_use_custom_word_point)
3992 (completion_tracker::use_custom_word_point)
3993 (completion_tracker::custom_word_point)
3994 (completion_tracker::set_custom_word_point)
3995 (completion_tracker::advance_custom_word_point_by)
3996 (completion_tracker::completes_to_completion_word)
3997 (completion_tracker::discard_completions): New methods.
3998 (completion_tracker::m_quote_char)
3999 (completion_tracker::m_use_custom_word_point)
4000 (completion_tracker::m_custom_word_point): New fields.
4001 (advance_to_expression_complete_word_point): Declare.
4002 * f-lang.c (f_collect_symbol_completion_matches): Add
4003 complete_symbol_mode parameter.
4004 * language.h (struct language_defn)
4005 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4006 parameter.
4007 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4008 (linespec_complete_function): New function.
4009 (linespec_lexer_lex_keyword): Adjust.
4010 * linespec.h (linespec_keywords, linespec_complete_function): New
4011 declarations.
4012 * location.c (find_end_quote): New function.
4013 (explicit_location_lex_one): Add explicit_completion_info
4014 parameter. Save quoting info. Don't throw if being called for
4015 completion. Don't handle Ada operators here.
4016 (is_cp_operator, skip_op_false_positives, first_of)
4017 (explicit_location_lex_one_function): New function.
4018 (string_to_explicit_location): Replace 'dont_throw' parameter with
4019 an explicit_completion_info pointer parameter. Handle it. Don't
4020 use explicit_location_lex_one to lex function names. Use
4021 explicit_location_lex_one_function instead.
4022 * location.h (struct explicit_completion_info): New.
4023 (string_to_explicit_location): Replace 'dont_throw' parameter with
4024 an explicit_completion_info pointer parameter.
4025 * symtab.c (default_collect_symbol_completion_matches_break_on):
4026 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4027 (default_collect_symbol_completion_matches)
4028 (collect_symbol_completion_matches): Add complete_symbol_mode
4029 parameter.
4030 (collect_symbol_completion_matches_type): Pass down
4031 complete_symbol_mode::EXPRESSION.
4032 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4033 parameter. Handle LINESPEC mode.
4034 * symtab.h (complete_symbol_mode): New.
4035 (default_collect_symbol_completion_matches_break_on)
4036 (default_collect_symbol_completion_matches)
4037 (collect_symbol_completion_matches)
4038 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4039 parameter.
4040
4041 2017-07-17 Pedro Alves <palves@redhat.com>
4042
4043 * utils.c (enum class strncmp_iw_mode): New.
4044 (strcmp_iw): Rename to ...
4045 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4046 parameters. Handle them.
4047 (strncmp_iw): New.
4048 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4049 * utils.h (strncmp_iw): Declare.
4050 (strcmp_iw): Move describing comments here.
4051
4052 2017-07-17 Pedro Alves <palves@redhat.com>
4053
4054 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4055 CP_OPERATOR_STR.
4056 * c-typeprint.c (is_type_conversion_operator): Use
4057 CP_OPERATOR_STR.
4058 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4059 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4060 CP_OPERATOR_LEN.
4061 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4062 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4063 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4064 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4065 CP_OPERATOR_STR.
4066 * location.c: Include "cp-support.h".
4067 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4068 CP_OPERATOR_STR.
4069 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4070 CP_OPERATOR_LEN.
4071
4072 2017-07-17 Pedro Alves <palves@redhat.com>
4073
4074 * cli/cli-cmds.c (complete_command): Use a completion tracker
4075 along with completion_find_completion_word for handle_brkchars
4076 phase.
4077 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4078 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4079 (struct gdb_rl_completion_word_info): New.
4080 (gdb_rl_find_completion_word): New.
4081 (completion_find_completion_word): New.
4082 * completer.h (completion_find_completion_word): Declare.
4083
4084 2017-07-17 Pedro Alves <palves@redhat.com>
4085
4086 * ada-lang.c (symbol_completion_match): Adjust comments.
4087 (symbol_completion_add): Replace vector parameter with
4088 completion_tracker parameter. Use it.
4089 (ada_make_symbol_completion_list): Rename to...
4090 (ada_collect_symbol_completion_matches): ... this. Add
4091 completion_tracker parameter and use it.
4092 (ada_language_defn): Adjust.
4093 * break-catch-syscall.c (catch_syscall_completer): Adjust
4094 prototype and work with completion_tracker instead of VEC.
4095 * breakpoint.c (condition_completer): Adjust prototype and work
4096 with completion_tracker instead of VEC.
4097 * c-lang.c (c_language_defn, cplus_language_defn)
4098 (asm_language_defn, minimal_language_defn): Adjust to renames.
4099 * cli/cli-cmds.c (complete_command): Rework using
4100 completion_tracker. Catch exceptions when completing.
4101 * cli/cli-decode.c (integer_unlimited_completer)
4102 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4103 with completion_tracker instead of VEC.
4104 * command.h (struct completion_tracker): Forward declare.
4105 (completer_ftype, completer_handle_brkchars_ftype): Change
4106 types.
4107 (complete_on_cmdlist, complete_on_enum): Adjust.
4108 * completer.c: Include <algorithm>.
4109 (struct gdb_completer_state): New.
4110 (current_completion): New global.
4111 (readline_line_completion_function): Delete.
4112 (noop_completer, filename_completer)
4113 (filename_completer_handle_brkchars, complete_files_symbols)
4114 (linespec_location_completer): Adjust to work with a
4115 completion_tracker instead of a VEC.
4116 (string_or_empty): New.
4117 (collect_explicit_location_matches): Adjust to work with a
4118 completion_tracker instead of a VEC.
4119 (explicit_location_completer): Rename to ...
4120 (complete_explicit_location): ... this and adjust to work with a
4121 completion_tracker instead of a VEC.
4122 (location_completer): Adjust to work with a completion_tracker
4123 instead of a VEC.
4124 (add_struct_fields): Adjust to work with a completion_list instead
4125 of VEC.
4126 (expression_completer): Rename to ...
4127 (complete_expression): ... this and adjust to work with a
4128 completion_tracker instead of a VEC. Use complete_files_symbols.
4129 (expression_completer): Reimplement on top of complete_expression.
4130 (symbol_completer): Adjust to work with a completion_tracker
4131 instead of a VEC.
4132 (enum complete_line_internal_reason): Add describing comments.
4133 (complete_line_internal_normal_command): Adjust to work with a
4134 completion_tracker instead of a VEC.
4135 (complete_line_internal): Rename to ...
4136 (complete_line_internal_1): ... this and adjust to work with a
4137 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4138 handle_brkchars phase.
4139 (new_completion_tracker): Delete.
4140 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4141 complete_line_internal_1.
4142 (free_completion_tracker): Delete.
4143 (INITIAL_COMPLETION_HTAB_SIZE): New.
4144 (completion_tracker::completion_tracker)
4145 (completion_tracker::~completion_tracker): New.
4146 (maybe_add_completion): Delete.
4147 (completion_tracker::maybe_add_completion)
4148 (completion_tracker::add_completion)
4149 (completion_tracker::add_completions): New.
4150 (throw_max_completions_reached_error): Delete.
4151 (complete_line): Adjust to work with a completion_tracker instead
4152 of a VEC. Don't create a completion_tracker_t or check for max
4153 completions here.
4154 (command_completer, command_completer_handle_brkchars)
4155 (signal_completer, reg_or_group_completer_1)
4156 (reg_or_group_completer, default_completer_handle_brkchars):
4157 Adjust to work with a completion_tracker.
4158 (gdb_completion_word_break_characters_throw): New.
4159 (gdb_completion_word_break_characters): Reimplement.
4160 (line_completion_function): Delete.
4161 (completion_tracker::recompute_lowest_common_denominator)
4162 (expand_preserving_ws)
4163 (completion_tracker::build_completion_result)
4164 (completion_result::completion_result)
4165 (completion_result::completion_result)
4166 (completion_result::~completion_result)
4167 (completion_result::completion_result)
4168 (completion_result::release_match_list, compare_cstrings)
4169 (completion_result::sort_match_list)
4170 (completion_result::reset_match_list)
4171 (gdb_rl_attempted_completion_function_throw)
4172 (gdb_rl_attempted_completion_function): New.
4173 * completer.h (completion_list, struct completion_result)
4174 (class completion_tracker): New.
4175 (complete_line): Add completion_tracker parameter.
4176 (readline_line_completion_function): Delete.
4177 (gdb_rl_attempted_completion_function): New.
4178 (noop_completer, filename_completer, expression_completer)
4179 (location_completer, symbol_completer, command_completer)
4180 (signal_completer, reg_or_group_completer): Update prototypes.
4181 (completion_tracker_t, new_completion_tracker)
4182 (make_cleanup_free_completion_tracker): Delete.
4183 (enum maybe_add_completion_enum): Delete.
4184 (maybe_add_completion): Delete.
4185 (throw_max_completions_reached_error): Delete.
4186 * corefile.c (complete_set_gnutarget): Adjust to work with a
4187 completion_tracker instead of a VEC.
4188 * cp-abi.c (cp_abi_completer): Adjust to work with a
4189 completion_tracker instead of a VEC.
4190 * d-lang.c (d_language_defn): Adjust.
4191 * disasm.c (disassembler_options_completer): Adjust to work with a
4192 completion_tracker instead of a VEC.
4193 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4194 (f_collect_symbol_completion_matches): ... this. Adjust to work
4195 with a completion_tracker instead of a VEC.
4196 (f_language_defn): Adjust.
4197 * go-lang.c (go_language_defn): Adjust.
4198 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4199 Adjust to work with a completion_tracker instead of a VEC.
4200 * infrun.c (handle_completer): Likewise.
4201 * interps.c (interpreter_completer): Likewise.
4202 * interps.h (interpreter_completer): Likewise.
4203 * language.c (unknown_language_defn, auto_language_defn)
4204 (local_language_defn): Adjust.
4205 * language.h (language_defn::la_make_symbol_completion_list):
4206 Rename to ...
4207 (language_defn::la_collect_symbol_completion_matches): ... this
4208 and adjust to work with a completion_tracker instead of a VEC.
4209 * m2-lang.c (m2_language_defn): Adjust.
4210 * objc-lang.c (objc_language_defn): Adjust.
4211 * opencl-lang.c (opencl_language_defn): Adjust.
4212 * p-lang.c (pascal_language_defn): Adjust.
4213 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4214 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4215 with a completion_tracker.
4216 * rust-lang.c (rust_language_defn): Adjust.
4217 * symtab.c (free_completion_list, do_free_completion_list)
4218 (return_val, completion_tracker): Delete.
4219 (completion_list_add_name, completion_list_add_symbol)
4220 (completion_list_add_msymbol, completion_list_objc_symbol)
4221 (completion_list_add_fields, add_symtab_completions): Add
4222 completion_tracker parameter and use it.
4223 (default_make_symbol_completion_list_break_on_1): Rename to...
4224 (default_collect_symbol_completion_matches_break_on): ... this.
4225 Add completion_tracker parameter and use it instead of allocating
4226 a completion tracker here.
4227 (default_make_symbol_completion_list_break_on): Delete old
4228 implementation.
4229 (default_make_symbol_completion_list): Delete.
4230 (default_collect_symbol_completion_matches): New.
4231 (make_symbol_completion_list): Delete.
4232 (collect_symbol_completion_matches): New.
4233 (make_symbol_completion_type): Rename to ...
4234 (collect_symbol_completion_matches_type): ... this. Add
4235 completion_tracker parameter and use it instead of VEC.
4236 (make_file_symbol_completion_list_1): Rename to...
4237 (collect_file_symbol_completion_matches): ... this. Add
4238 completion_tracker parameter and use it instead of VEC.
4239 (make_file_symbol_completion_list): Delete.
4240 (add_filename_to_list): Use completion_list instead of a VEC.
4241 (add_partial_filename_data::list): Now a completion_list.
4242 (make_source_files_completion_list): Work with a completion_list
4243 instead of a VEC.
4244 * symtab.h: Include "completer.h".
4245 (default_make_symbol_completion_list_break_on)
4246 (default_make_symbol_completion_list, make_symbol_completion_list)
4247 (make_symbol_completion_type, make_file_symbol_completion_list)
4248 (make_source_files_completion_list): Delete.
4249 (default_collect_symbol_completion_matches_break_on)
4250 (default_collect_symbol_completion_matches)
4251 (collect_symbol_completion_matches)
4252 (collect_symbol_completion_matches_type)
4253 (collect_file_symbol_completion_matches)
4254 (make_source_files_completion_list): New.
4255 * top.c (init_main): Don't install a rl_completion_entry_function
4256 hook. Install a rl_attempted_completion_function hook instead.
4257 * tui/tui-layout.c (layout_completer): Adjust to work with a
4258 completion_tracker.
4259 * tui/tui-regs.c (tui_reggroup_completer):
4260 * tui/tui-win.c (window_name_completer, focus_completer)
4261 (winheight_completer): Adjust to work with a completion_tracker.
4262 * value.c: Include "completer.h".
4263 (complete_internalvar): Adjust to work with a completion_tracker.
4264 * value.h (complete_internalvar): Likewise.
4265
4266 2017-07-17 Pedro Alves <palves@redhat.com>
4267
4268 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4269 renames.
4270 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4271 comments to completer_ftype's declaration.
4272 <completer_handle_brkchars>: Change type to
4273 completer_handle_brkchars_ftype.
4274 * command.h (completer_ftype): Add describing comment and give
4275 names to parameters.
4276 (completer_ftype_void): Rename to ...
4277 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4278 (set_cmd_completer_handle_brkchars): Adjust.
4279 * completer.c (filename_completer_handle_brkchars): New function.
4280 (complete_line_internal_normal_command): New function, factored
4281 out from ...
4282 (complete_line_internal): ... here.
4283 (command_completer_handle_brkchars)
4284 (default_completer_handle_brkchars)
4285 (completer_handle_brkchars_func_for_completer): New functions.
4286 * completer.h (set_gdb_completion_word_break_characters): Delete
4287 declaration.
4288 (completer_handle_brkchars_func_for_completer): New declaration.
4289 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4290 completer_handle_brkchars_func_for_completer.
4291
4292 2017-07-17 Pedro Alves <palves@redhat.com>
4293
4294 * completer.c (symbol_completer): New function, based on
4295 make_symbol_completion_list_fn.
4296 * completer.h (symbol_completer): New declaration.
4297 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4298 * python/py-cmd.c (completers): Adjust.
4299 * symtab.c (make_symbol_completion_list_fn): Delete.
4300 * symtab.h (make_symbol_completion_list_fn): Delete.
4301 * cli/cli-decode.c (add_cmd): Adjust.
4302
4303 2017-07-17 Pedro Alves <palves@redhat.com>
4304
4305 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4306 * dwarf2read.c: Include "filename-seen-cache.h".
4307 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4308 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4309 * filename-seen-cache.c: New file.
4310 * filename-seen-cache.h: New file.
4311 * symtab.c: Include "filename-seen-cache.h".
4312 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4313 (create_filename_seen_cache, clear_filename_seen_cache)
4314 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4315 to filename-seen-cache.h/filename-seen-cache.c.
4316 (output_source_filename, sources_info)
4317 (maybe_add_partial_symtab_filename)
4318 (make_source_files_completion_list): Adjust to use
4319 filename_seen_cache.
4320
4321 2017-07-17 Pedro Alves <palves@redhat.com>
4322
4323 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4324 fields.
4325 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4326 dwarf2_debug_sections*)): New.
4327 (dwarf2_per_objfile::dwarf2_per_objfile(const
4328 dwarf2_per_objfile&)): Declare as deleted.
4329 (dwarf2_per_objfile::operator=): Declare as deleted.
4330 (dwarf2_per_objfile::dwarf2_per_objfile)
4331 (dwarf2_per_objfile::~dwarf2_per_objfile)
4332 (dwarf2_per_objfile::free_cached_comp_units): New.
4333 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4334 ctor. Call dwarf2_per_objfile's ctor manually.
4335 (dwarf2_locate_sections): Deleted/refactored as ...
4336 (dwarf2_per_objfile::locate_sections): ... this new method.
4337 (free_cached_comp_units): Defer to
4338 dwarf2_per_objfile::free_cached_comp_units.
4339 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4340
4341 2017-07-14 Tom Tromey <tom@tromey.com>
4342
4343 PR rust/21764:
4344 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4345 parameter.
4346 <UNOP_SIZEOF>: Split into separate case.
4347 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4348
4349 2017-07-14 Tom Tromey <tom@tromey.com>
4350
4351 PR rust/21763:
4352 * symtab.c (symbol_matches_domain): Add language_rust to special
4353 case.
4354 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4355 treat LOC_TYPEDEF symbols as variables.
4356
4357 2017-07-14 Pedro Alves <palves@redhat.com>
4358
4359 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4360 symtabs matching all symtabs with SRCFILE as file name instead of
4361 only considering the first hit, with lookup_symtab.
4362
4363 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4364
4365 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4366 operator_name parameters.
4367 (gen_expr): Update function call.
4368
4369 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4370
4371 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4372 parameter.
4373 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4374 Likewise.
4375 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4376 parameter, use agent_expr::gdbarch instead, update function
4377 calls.
4378 (locexpr_tracepoint_var_ref): Likewise.
4379 (loclist_tracepoint_var_ref): Likewise.
4380 * ax-gdb.c (gen_trace_static_fields): Likewise.
4381 (gen_traced_pop): Likewise.
4382 (gen_frame_args_address): Likewise.
4383 (gen_frame_locals_address): Likewise.
4384 (gen_var_ref): Likewise.
4385 (gen_struct_ref_recursive): Likewise.
4386 (gen_static_field): Likewise.
4387 (gen_maybe_namespace_elt): Likewise.
4388 (gen_expr): Likewise.
4389 (gen_trace_for_var): Likewise.
4390 (gen_trace_for_expr): Likewise.
4391 (gen_trace_for_return_address): Likewise.
4392
4393 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4394
4395 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4396 parameter.
4397 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4398
4399 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4400
4401 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4402 from ax, update calls.
4403 (gen_usual_arithmetic): Likewise.
4404 (gen_integral_promotions): Likewise.
4405 (gen_bitfield_ref): Likewise.
4406 (gen_primitive_field): Likewise.
4407 (gen_struct_ref_recursive): Likewise.
4408 (gen_struct_ref): Likewise.
4409 (gen_maybe_namespace_elt): Likewise.
4410 (gen_struct_elt_for_reference): Likewise.
4411 (gen_namespace_elt): Likewise.
4412 (gen_aggregate_elt_ref): Likewise.
4413 (gen_expr): Get gdbarch from ax, update calls.
4414 (gen_expr_binop_rest): Likewise.
4415
4416 2017-07-13 Pedro Alves <palves@redhat.com>
4417
4418 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4419 as default tdesc.
4420 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4421 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4422 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4423 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4424 tdep.
4425 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4426 Get final tdesc from the tdep.
4427 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4428 default tdesc.
4429 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4430 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4431 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4432 Use it as default tdesc.
4433 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4434 down to amd_init_abi. No longer handle fallback tdesc here.
4435 * amd64-tdep.h (tdesc_x32): Declare.
4436 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4437 parameter.
4438 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4439 as default tdesc.
4440
4441 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4442
4443 * s390-linux-tdep.c (s390_process_record): Add support for
4444 instructions new in arch12.
4445
4446 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4447
4448 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4449 PT_GETFSBASE and PT_GETGSBASE.
4450 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4451 PT_SETGSBASE.
4452
4453 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4454
4455 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4456 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4457 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4458 those rules.
4459 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4460 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4461 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4462 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4463 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4464 * features/i386/amd64.xml: Add 64bit-segments.xml.
4465 * features/i386/amd64-avx-avx512.c: Regenerated.
4466 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4467 * features/i386/amd64-avx-mpx.c: Regenerated.
4468 * features/i386/amd64-avx.c: Regenerated.
4469 * features/i386/amd64-mpx.c: Regenerated.
4470 * features/i386/amd64.c: Regenerated.
4471 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4472 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4473 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4474 * regformats/i386/amd64-avx.dat: Regenerated.
4475 * regformats/i386/amd64-mpx.dat: Regenerated.
4476 * regformats/i386/amd64.dat: Regenerated.
4477
4478 2017-07-10 Yao Qi <yao.qi@linaro.org>
4479
4480 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4481 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4482
4483 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4484
4485 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4486 unsetenv.
4487 * gnulib/aclocal.m4: Regenerate.
4488 * gnulib/config.in: Regenerate.
4489 * gnulib/configure: Regenerate.
4490 * gnulib/import/Makefile.am: Regenerate.
4491 * gnulib/import/Makefile.in: Regenerate.
4492 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4493 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4494 * gnulib/import/m4/environ.m4: New file.
4495 * gnulib/import/m4/setenv.m4: New file.
4496 * gnulib/import/setenv.c: New file.
4497 * gnulib/import/unsetenv.c: New file.
4498
4499 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4500
4501 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4502 address when op is DW_OP_addr.
4503
4504 2017-07-09 Tom Tromey <tom@tromey.com>
4505
4506 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4507 check and apply to outer type.
4508
4509 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4510
4511 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4512 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4513 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4514 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4515
4516 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4517
4518 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4519
4520 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4521
4522 * corelow.c (get_core_siginfo): Remove.
4523 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4524 instead of get_core_siginfo.
4525 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4526 * gdbarch.h: Re-generate.
4527 * gdbarch.c: Re-generate.
4528 * linux-tdep.c (linux_core_xfer_siginfo): New.
4529 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4530
4531 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4532
4533 * corelow.c (thread_section_name): Move to ...
4534 * gdbcore.h (thread_section_name): ... here.
4535
4536 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4537
4538 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4539 (struct siginfo32): New.
4540 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4541 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4542 via ptrace(PT_LWPINFO).
4543
4544 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4545
4546 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4547 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4548 (fbsd_get_siginfo_type): New.
4549 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4550 (_initialize_fbsd_tdep): New.
4551
4552 2017-07-06 David Blaikie <dblaikie@gmail.com>
4553
4554 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4555 a singular dwo_unit*) to support multiple CUs in the same way that
4556 multiple TUs are supported.
4557 (create_cus_hash_table): Replace create_dwo_cu with a function for
4558 parsing multiple CUs from a DWO file.
4559 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4560 create_dwo_cu.
4561 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4562 htab_find, rather than comparing the signature to a singleton CU in
4563 the dwo_file.
4564
4565 2017-07-06 Pedro Alves <palves@redhat.com>
4566
4567 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4568
4569 2017-07-04 Pedro Alves <palves@redhat.com>
4570
4571 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4572 * gdbtypes.h (TYPE_STATIC): Delete.
4573 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4574 is_synchronized, is_native>: Delete.
4575 <dummy>: Bump.
4576 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4577 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4578 (TYPE_FN_FIELD_ABSTRACT): Delete.
4579
4580 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4581
4582 * buffer.h (buffer_finish): Fix spelling mistakes.
4583
4584 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4585
4586 * .dir-locals.el: Automatically switch to C-style comments in
4587 versions of Emacs that support the feature.
4588
4589 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4590 Pedro Alves <palves@redhat.com>
4591
4592 PR cli/21688
4593 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4594 (process_next_line): New variable 'inline_cmd'.
4595 Adjust 'if' clauses for "python", "compile" and "guile" to use
4596 'command_name_equals' and check for '!inline_cmd'.
4597
4598 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4599
4600 PR cli/21688
4601 * cli/cli-script.c (command_name_equals_not_inline): New function.
4602 (process_next_line): Adjust 'if' clauses for "python", "compile"
4603 and "guile" to use command_name_equals_not_inline.
4604
4605 2017-06-29 Pedro Alves <palves@redhat.com>
4606
4607 * completer.c (expression_completer): Call
4608 linespec_location_completer instead of location_completer.
4609
4610 2017-06-29 Pedro Alves <palves@redhat.com>
4611
4612 * completer.c (expression_completer): Remove code that recomputes
4613 'text' from 'word'.
4614
4615 2017-06-29 Yao Qi <yao.qi@linaro.org>
4616
4617 * regformats/regdat.sh: Generate code with
4618 "ifndef IN_PROCESS_AGENT".
4619
4620 2017-06-28 Pedro Alves <palves@redhat.com>
4621
4622 * command.h: Include "common/scoped_restore.h".
4623
4624 2017-06-28 Yao Qi <yao.qi@linaro.org>
4625
4626 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4627 instead of obstack_grow.
4628
4629 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4630
4631 PR gdb/21337
4632 * symfile.c (reread_symbols): Call objfiles_changed just before
4633 read_symbols.
4634
4635 2017-06-27 Pedro Alves <palves@redhat.com>
4636
4637 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4638 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4639 (completion_list_add_symbol, completion_list_add_msymbol):
4640 ... these new functions.
4641 (add_symtab_completions)
4642 (default_make_symbol_completion_list_break_on_1): Adjust.
4643
4644 2017-06-27 Pedro Alves <palves@redhat.com>
4645
4646 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4647 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4648 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4649 dtor.
4650 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4651 'storage_obstack' field an auto_obstack. In-class initialize all
4652 non-bitfield fields. Make minsyms_read bool.
4653 * symfile.c (read_symbols): Adjust.
4654
4655 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4656
4657 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4658 (gdbsim_store_register): Likewise.
4659
4660 2017-06-27 Pedro Alves <palves@redhat.com>
4661
4662 * c-exp.y (name_obstack): Now an auto_obstack.
4663 (yylex): Use auto_obstack::clear.
4664 (c_parse): Use auto_obstack::clear instead of reinitializing and
4665 freeing the obstack.
4666 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4667 * d-exp.y (name_obstack): Now an auto_obstack.
4668 (yylex): Use auto_obstack::clear.
4669 (d_parse): Use auto_obstack::clear instead of reinitializing and
4670 freeing the obstack.
4671 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4672 auto_obstack.
4673 * dwarf2read.c (create_addrmap_from_index)
4674 (dwarf2_build_psymtabs_hard)
4675 (update_enumeration_type_from_children): Likewise.
4676 * gdb_obstack.h (auto_obstack): New type.
4677 * go-exp.y (name_obstack): Now an auto_obstack.
4678 (build_packaged_name): Use auto_obstack::clear.
4679 (go_parse): Use auto_obstack::clear instead of reinitializing and
4680 freeing the obstack.
4681 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4682 auto_obstack.
4683 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4684 * rust-exp.y (work_obstack): Now an auto_obstack.
4685 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4686 reinitializing and freeing the obstack.
4687 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4688 (host_char_to_target): Use auto_obstack.
4689 * utils.h (make_cleanup_obstack_free): Delete declaration.
4690 * valprint.c (generic_emit_char, generic_printstr): Use
4691 auto_obstack.
4692
4693 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4694
4695 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4696 thread.
4697 (darwin_init_thread_list): Don't update dummy thread.
4698 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4699
4700 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4701
4702 * record-full.c (netorder16): Remove.
4703
4704 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4705
4706 * common/diagnostics.h: Define macros for GCC.
4707 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4708 * common/vec.h: Include diagnostics.h.
4709 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4710 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4711 warning.
4712
4713 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4714
4715 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4716 New macro.
4717 * ada-lex.l: Ignore deprecated register warnings.
4718
4719 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4720
4721 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4722 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4723
4724 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4725
4726 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4727 its own line.
4728
4729 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4730
4731 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4732
4733 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4734
4735 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4736 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4737 (xtensa_register_read_masked): Likewise.
4738
4739 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4740
4741 * common/environ.c (gdb_environ::unset): Update comment.
4742
4743 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4744
4745 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4746 registers.
4747
4748 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4749
4750 * record-full.c (record_full_exec_insn): Use byte_vector.
4751
4752 2017-06-22 Yao Qi <yao.qi@linaro.org>
4753
4754 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4755 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4756
4757 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4758
4759 * remote.c (cached_reg): Move from here...
4760 * regcache.h (cached_reg): ...to here.
4761 * python/py-unwind.c (struct reg_info): Remove.
4762 (cached_frame_info): Use cached_reg_t.
4763 (pyuw_prev_register): Likewise.
4764 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4765 (pyuw_dealloc_cache): Free all registers.
4766
4767 2017-06-22 Pedro Alves <palves@redhat.com>
4768 Simon Marchi <simon.marchi@ericsson.com>
4769
4770 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4771 warning.
4772 * common/diagnostics.h: New file.
4773
4774 2017-06-22 Pedro Alves <palves@redhat.com>
4775
4776 * common/agent.h: Add include guards.
4777
4778 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4779
4780 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4781 talk about addressable units instead of bytes.
4782
4783 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4784
4785 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4786 of '::const_iterator'.
4787
4788 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4789
4790 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4791 'unittests/environ-selftests.c'.
4792 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4793 * charset.c (find_charset_names): Declare object 'iconv_env'.
4794 Update code to use 'iconv_env' object. Remove call to
4795 'free_environ'.
4796 * common/environ.c: Include <utility>.
4797 (make_environ): Delete function.
4798 (free_environ): Delete function.
4799 (gdb_environ::clear): New function.
4800 (gdb_environ::operator=): New function.
4801 (gdb_environ::get): Likewise.
4802 (environ_vector): Delete function.
4803 (set_in_environ): Delete function.
4804 (gdb_environ::set): New function.
4805 (unset_in_environ): Delete function.
4806 (gdb_environ::unset): New function.
4807 (gdb_environ::envp): Likewise.
4808 * common/environ.h: Include <vector>.
4809 (struct gdb_environ): Delete; transform into...
4810 (class gdb_environ): ... this class.
4811 (free_environ): Delete prototype.
4812 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4813 environ_vector): Likewise.
4814 * infcmd.c (run_command_1): Update code to call
4815 'envp' from 'gdb_environ' class.
4816 (environment_info): Update code to call methods from 'gdb_environ'
4817 class.
4818 (unset_environment_command): Likewise.
4819 (path_info): Likewise.
4820 (path_command): Likewise.
4821 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4822 (inferior::inferior): Initialize 'environment' using the host's
4823 information.
4824 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4825 Include "environ.h".
4826 (class inferior) <environment>: Change type from 'struct
4827 gdb_environ' to 'gdb_environ'.
4828 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4829 methods from 'gdb_environ' class.
4830 * solib.c (solib_find_1): Likewise
4831 * unittests/environ-selftests.c: New file.
4832
4833 2017-06-20 Yao Qi <yao.qi@linaro.org>
4834
4835 * features/i386/i386-linux.xml: Exchange the order of including
4836 32bit-linux.xml and 32bit-sse.xml.
4837 * features/i386/i386-linux.c: Regenerated.
4838
4839 2017-06-20 Yao Qi <yao.qi@linaro.org>
4840
4841 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4842 Delete copy ctor and assignment operator.
4843 (tdesc_type): Likewise.
4844 (tdesc_feature): Likewise.
4845 (tdesc_free_reg): Remove.
4846 (tdesc_create_reg): Use new.
4847 (tdesc_free_type): Remove.
4848 (tdesc_create_vector): Use new.
4849 (tdesc_create_union): Likewise.
4850 (tdesc_create_flags): Likewise.
4851 (tdesc_create_enum): Likewise.
4852 (tdesc_free_feature): Delete.
4853 (free_target_description): Use delete.
4854
4855 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4856
4857 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4858 registers.
4859
4860 2017-06-19 Pedro Alves <palves@redhat.com>
4861
4862 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4863 after gdb::unlinker.
4864
4865 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4866
4867 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4868 gdb_environ to access an environment variable.
4869
4870 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4871
4872 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4873 gdb_byte*.
4874
4875 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4876
4877 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4878
4879 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4880
4881 * configure: Re-generate.
4882 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4883
4884 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4885
4886 * configure: Re-generate.
4887 * warning.m4: Pass -Werror to compiler when checking for
4888 supported warning flags.
4889
4890 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4891
4892 * Makefile.in (COMPILE.pre): Add "-x c++".
4893
4894 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4895 Pedro Alves <palves@redhat.com>
4896 Yao Qi <yao.qi@linaro.org>
4897
4898 * defs.h (RequireLongest): New.
4899 (extract_integer): Declare function template.
4900 (extract_signed_integer): Remove the declaration, but define it
4901 static inline.
4902 (extract_unsigned_integer): Likewise.
4903 (store_integer): Declare function template.
4904 (store_signed_integer): Remove the declaration, but define it
4905 static inline.
4906 (store_unsigned_integer): Likewise.
4907 * findvar.c (extract_integer): New function template.
4908 (extract_signed_integer): Remove.
4909 (extract_unsigned_integer): Remove.
4910 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4911 instantiations.
4912 (store_integer): New function template.
4913 (store_signed_integer): Remove.
4914 (store_unsigned_integer): Remove.
4915 (store_integer): Explicit instantiations.
4916 * regcache.c (regcache_raw_read_signed): Update.
4917 (regcache::raw_read): New function.
4918 (regcache::raw_read_signed): Remove.
4919 (regcache::raw_read_unsigned): Remove.
4920 (regcache_raw_read_unsigned): Update.
4921 (regcache_raw_write_unsigned): Update.
4922 (regcache::raw_write_signed): Remove.
4923 (regcache::raw_write): New function.
4924 (regcache_cooked_read_signed): Update.
4925 (regcache::raw_write_unsigned): Remove.
4926 (regcache::cooked_read_signed): Remove.
4927 (regcache_cooked_read_unsigned): Update.
4928 (regcache::cooked_read_unsigned): Remove.
4929 (regcache_cooked_write_signed): Update.
4930 (regcache_cooked_write_unsigned): Update.
4931 * regcache.h (regcache) <raw_read_signed>: Remove.
4932 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4933 <raw_read, raw_write>: New.
4934 <cooked_read_signed, cooked_write_signed>: Remove.
4935 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4936 <cooked_read, cooked_write>: New.
4937 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4938 (sh64_pseudo_register_write): Update.
4939
4940 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4941
4942 * arc-tdep.c (arc_disassembler_options): New variable.
4943 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4944 of default_print_insn.
4945 (arc_delayed_print_insn): Set info->section when needed,
4946 use default_print_insn to retrieve a disassembler.
4947
4948 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4949
4950 PR gdb/21574
4951 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4952 to mention $SHELL and startup-with-shell.
4953
4954 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4955
4956 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4957
4958 2017-06-14 Yao Qi <yao.qi@linaro.org>
4959
4960 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4961 default_print_insn instead of print_insn_aarch64.
4962 * arm-tdep.c (gdb_print_insn_arm): Call
4963 default_print_insn instead of print_insn_big_arm
4964 and print_insn_little_arm.
4965 * i386-tdep.c (i386_print_insn): Call default_print_insn
4966 instead of print_insn_i386.
4967 * ia64-tdep.c (ia64_print_insn): Call
4968 default_print_insn instead of print_insn_ia64.
4969 * mips-tdep.c (gdb_print_insn_mips): Call
4970 default_print_insn instead of print_insn_big_mips
4971 and print_insn_little_mips.
4972 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4973 instead of print_insn_spu.
4974
4975 2017-06-14 Pedro Alves <palves@redhat.com>
4976
4977 * ada-lang.c: Include "common/byte-vector.h".
4978 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4979 * charset.c (wchar_iterator::iterate): Resize the vector instead
4980 of reserving it.
4981 * common/byte-vector.h: Include "common/def-vector.h".
4982 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4983 * cli/cli-dump.c: Include "common/byte-vector.h".
4984 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4985 * common/byte-vector.h: New file.
4986 * common/def-vector.h: New file.
4987 * common/default-init-alloc.h: New file.
4988 * dwarf2loc.c: Include "common/byte-vector.h".
4989 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4990 instead of reserving it.
4991 * dwarf2read.c: Include "common/byte-vector.h".
4992 (data_buf::m_vec): Now a gdb::byte_vector.
4993 * gdb_regex.c: Include "common/def-vector.h".
4994 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4995 * mi/mi-main.c: Include "common/byte-vector.h".
4996 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4997 * printcmd.c: Include "common/byte-vector.h".
4998 (print_scalar_formatted): Use gdb::byte_vector.
4999 * valprint.c: Include "common/byte-vector.h".
5000 (maybe_negate_by_bytes, print_decimal_chars): Use
5001 gdb::byte_vector.
5002
5003 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5004
5005 * darwin-nat.c: Include "nat/fork-inferior.h".
5006
5007 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5008
5009 * configure.nat: Factor out Darwin bits that are not
5010 architecture-specific. Add fork-inferior.o.
5011
5012 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5013
5014 * configure.nat: Factor out AIX bits that are not
5015 architecture-specific. Add fork-inferior.o.
5016
5017 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5018
5019 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5020 (read_pieced_value, write_pieced_value): ...here. Reduce to
5021 wrappers that just call rw_pieced_value.
5022
5023 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5024
5025 * dwarf2loc.c (write_pieced_value): When writing the data for a
5026 memory piece, use write_memory_with_notification instead of
5027 write_memory.
5028
5029 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5030
5031 * valops.c (read_value_memory): Change embedded_offset to
5032 represent a bit offset instead of a byte offset.
5033 * value.h (read_value_memory): Adjust comment.
5034
5035 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5036
5037 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5038 dest_offset_bits and source_offset_bits.
5039 (write_pieced_value): Likewise.
5040
5041 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5042
5043 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5044 given by DW_OP_bit_piece.
5045 (write_pieced_value): Likewise.
5046
5047 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5048
5049 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5050 some other preparations to the places where sufficient information
5051 is available.
5052 (write_pieced_value): Likewise.
5053
5054 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5055
5056 * dwarf2loc.c (bits_to_bytes): New function.
5057 (read_pieced_value): Fix offset calculations for register pieces
5058 on big-endian targets.
5059 (write_pieced_value): Likewise.
5060
5061 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5062
5063 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5064 (write_pieced_value): Likewise.
5065
5066 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5067
5068 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5069 transfer the source value's least significant bits, instead of its
5070 lowest-addressed ones. Rename type_len to max_offset.
5071 (read_pieced_value): Mirror above changes to write_pieced_value as
5072 applicable.
5073
5074 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5075
5076 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5077 truncate full bytes from dest_offset_bits before using it as an
5078 offset into the buffer.
5079
5080 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5081
5082 * dwarf2loc.c (write_pieced_value): Include transfer size in
5083 byte-wise check.
5084
5085 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5086
5087 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5088 calculation of this_size.
5089
5090 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5091
5092 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5093 when targeting a bit-field.
5094 (write_pieced_value): Likewise.
5095
5096 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5097
5098 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5099 (allocate_piece_closure): Drop addr_size parameter.
5100 (dwarf2_evaluate_loc_desc_full): Adjust call to
5101 allocate_piece_closure.
5102
5103 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5104
5105 PR gdb/21226
5106 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5107 the LSB end, independent of endianness.
5108
5109 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5110
5111 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5112 size capping.
5113
5114 2017-06-13 Yao Qi <yao.qi@linaro.org>
5115
5116 * mips-linux-nat.c: Move include features/mips*-linux.c to
5117 mips-linux-tdep.c.
5118 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5119 to mips-linux-tdep.c.
5120 * mips-linux-tdep.c: Include features/mips*-linux.c
5121 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5122 functions.
5123 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5124 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5125 (tdesc_mips64_dsp_linux): Declare.
5126
5127 2017-06-12 Tom Tromey <tom@tromey.com>
5128
5129 * valprint.h (val_print_type_code_int): Remove.
5130 * valprint.c (generic_val_print_int): Always call
5131 val_print_scalar_formatted.
5132 (val_print_type_code_int): Remove.
5133 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5134 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5135 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5136 * ada-valprint.c (ada_val_print_num): Use
5137 val_print_scalar_formatted.
5138
5139 2017-06-12 Tom Tromey <tom@tromey.com>
5140
5141 * printcmd.c (print_scalar_formatted): Unify the two switches.
5142 Don't convert scalars to LONGEST.
5143
5144 2017-06-12 Tom Tromey <tom@tromey.com>
5145
5146 PR exp/16225:
5147 * valprint.h (print_decimal_chars): Update.
5148 * valprint.c (maybe_negate_by_bytes): New function.
5149 (print_decimal_chars): Add "is_signed" argument.
5150 * printcmd.c (print_scalar_formatted): Update.
5151
5152 2017-06-12 Tom Tromey <tom@tromey.com>
5153
5154 PR exp/16225:
5155 * valprint.h (print_binary_chars, print_hex_chars): Update.
5156 * valprint.c (val_print_type_code_int): Update.
5157 (print_binary_chars): Add "zero_pad" argument.
5158 (emit_octal_digit): New function.
5159 (print_octal_chars): Don't zero-pad.
5160 (print_decimal_chars): Likewise.
5161 (print_hex_chars): Add "zero_pad" argument.
5162 * sh64-tdep.c (sh64_do_fp_register): Update.
5163 * regcache.c (regcache::dump): Update.
5164 * printcmd.c (print_scalar_formatted): Update.
5165 * infcmd.c (default_print_one_register_info): Update.
5166
5167 2017-06-12 Pedro Alves <palves@redhat.com>
5168 Alan Hayward <alan.hayward@arm.com>
5169
5170 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5171 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5172 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5173 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5174 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5175
5176 2017-06-12 Pedro Alves <palves@redhat.com>
5177
5178 * dwarf2read.c (mapped_symtab::data): Now a vector of
5179 symtab_index_entry instead of vector of
5180 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5181 whether an element's name is NULL instead of checking whether the
5182 element itself is NULL.
5183 (find_slot): Change return type. Adjust.
5184 (hash_expand, , add_index_entry, uniquify_cu_indices)
5185 (write_hash_table): Adjust.
5186
5187 2017-06-12 Pedro Alves <palves@redhat.com>
5188
5189 * dwarf2read.c (recursively_count_psymbols): New function.
5190 (write_psymtabs_to_index): Call it to compute number of psyms and
5191 pass estimate size of psyms_seen to unordered_set's ctor.
5192
5193 2017-06-12 Pedro Alves <palves@redhat.com>
5194
5195 * dwarf2read.c (write_hash_table): Check if key already exists
5196 before emplacing.
5197
5198 2017-06-12 Pedro Alves <palves@redhat.com>
5199
5200 * dwarf2read.c (data_buf::append_space): Rename to...
5201 (data_buf::grow): ... this, and make private. Adjust all callers.
5202 (data_buf::append_uint): New method.
5203 (add_address_entry, write_one_signatured_type)
5204 (write_psymtabs_to_index): Use it.
5205
5206 2017-06-12 Pedro Alves <palves@redhat.com>
5207
5208 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5209 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5210 (data_buf::file_write): Call ::fwrite directly.
5211
5212 2017-06-12 Pedro Alves <palves@redhat.com>
5213
5214 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5215 std::vector::erase.
5216
5217 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5218
5219 Code cleanup: C++ify .gdb_index producer.
5220 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5221 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5222 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5223 (create_strtab, add_string): Remove.
5224 (file_write, data_buf): New.
5225 (struct symtab_index_entry): Use std::vector for cu_indices.
5226 (struct mapped_symtab): Use std::vector for data.
5227 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5228 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5229 Remove.
5230 (find_slot): Change return type. Update it to the new data structures.
5231 (hash_expand, add_index_entry): Update it to the new data structures.
5232 (offset_type_compare): Remove.
5233 (uniquify_cu_indices): Update it to the new data structures.
5234 (c_str_view, c_str_view_hasher, vector_hasher): New.
5235 (add_indices_to_cpool): Remove.
5236 (write_hash_table): Update it to the new data structures.
5237 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5238 (eq_psymtab_cu_index): Remove.
5239 (psym_index_map): New typedef.
5240 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5241 reference and std::unordered_map for cu_index_htab.
5242 (add_address_entry, add_address_entry_worker, write_address_map)
5243 (write_psymbols): Update it to the new data structures.
5244 (write_obstack): Remove.
5245 (struct signatured_type_index_data): Change types_list to a data_buf
5246 reference and psyms_seen to a std::unordered_set reference.
5247 (write_one_signatured_type, recursively_write_psymbols)
5248 (write_psymtabs_to_index): Update it to the new data structures.
5249
5250 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5251
5252 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5253 separate-debug-file commands.
5254 * symfile.h (separate_debug_file_debug): New global.
5255 * symfile.c (separate_debug_file_debug): New global.
5256 (separate_debug_file_exists, find_separate_debug_file): Add
5257 debug output.
5258 (_initialize_symfile): Add "set debug separate-debug-file"
5259 command.
5260 * build-id.c (build_id_to_debug_bfd,
5261 find_separate_debug_file_by_buildid): Add debug output.
5262
5263 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5264
5265 * gdbarch.sh (displaced_step_free_closure): Remove.
5266 * gdbarch.h, gdbarch.c: Re-generate.
5267 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5268 displaced_step_free_closure.
5269 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5270 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5271 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5272 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5273 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5274 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5275 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5276 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5277 * infrun.c (displaced_step_clear): Call xfree instead of
5278 gdbarch_displaced_step_free_closure.
5279
5280 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5281
5282 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5283 NULL".
5284
5285 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5286
5287 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5288 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5289 (mn10300_push_dummy_call): Likewise.
5290
5291 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5292
5293 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5294
5295 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5296
5297 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5298
5299 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5300
5301 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5302 able to start inferiors using a shell.
5303 (New remote packets): Announce new packet "QStartupWithShell".
5304 * remote.c: Add PACKET_QStartupWithShell.
5305 (extended_remote_create_inferior): Handle new
5306 PACKET_QStartupWithShell.
5307 (remote_protocol_features) <QStartupWithShell>: New entry for
5308 PACKET_QStartupWithShell.
5309 (_initialize_remote): Call "add_packet_config_cmd" for
5310 QStartupShell.
5311
5312 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5313 Pedro Alves <palves@redhat.com>
5314
5315 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5316 and "nat/fork-inferior.h".
5317 * common/common-inferior.h: New file, with contents from
5318 "gdb/inferior.h".
5319 * commom/common-utils.c: Include "common-utils.h".
5320 (stringify_argv): New function.
5321 * common/common-utils.h (stringify_argv): New prototype.
5322 * configure.nat: Add "fork-inferior.o" as a dependency for
5323 "*linux*", "fbsd*" and "nbsd*" hosts.
5324 * corefile.c (get_exec_file): Update comment.
5325 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5326 instead of "startup_inferior".
5327 (darwin_create_inferior): Call "add_thread_silent" after
5328 "fork_inferior".
5329 * fork-child.c: Cleanup unnecessary includes.
5330 (SHELL_FILE): Move to "common/common-fork-child.c".
5331 (environ): Likewise.
5332 (exec_wrapper): Initialize.
5333 (get_exec_wrapper): New function.
5334 (breakup_args): Move to "common/common-fork-child.c"; rename to
5335 "breakup_args_for_exec".
5336 (escape_bang_in_quoted_argument): Move to
5337 "common/common-fork-child.c".
5338 (saved_ui): New variable.
5339 (prefork_hook): New function.
5340 (postfork_hook): Likewise.
5341 (postfork_child_hook): Likewise.
5342 (gdb_startup_inferior): Likewise.
5343 (fork_inferior): Move to "common/common-fork-child.c". Update
5344 function to support gdbserver.
5345 (startup_inferior): Likewise.
5346 * gdbcore.h (get_exec_file): Remove declaration.
5347 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5348 instead of "startup_inferior". Call "add_thread_silent" after
5349 "fork_inferior".
5350 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5351 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5352 instead of "startup_inferior". Call "add_thread_silent" after
5353 "fork_inferior".
5354 * inferior.h: Include "common-inferior.h".
5355 (trace_start_error): Move to "common/common-utils.h".
5356 (trace_start_error_with_name): Likewise.
5357 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5358 (startup_inferior): Likewise.
5359 (gdb_startup_inferior): New prototype.
5360 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5361 * nat/fork-inferior.h: New file.
5362 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5363 instead of "startup_inferior". Call "add_thread_silent" after
5364 "fork_inferior".
5365 * target.h (target_terminal_init): Move prototype to
5366 "target/target.h".
5367 (target_terminal_inferior): Likewise.
5368 (target_terminal_ours): Likewise.
5369 * target/target.h (target_terminal_init): New prototype, moved
5370 from "target.h".
5371 (target_terminal_inferior): Likewise.
5372 (target_terminal_ours): Likewise.
5373 * utils.c (gdb_flush_out_err): New function.
5374
5375 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5376
5377 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5378 * common/common-gdbthread.h: New file, with parts from
5379 "gdb/gdbthread.h".
5380 * gdbthread.h: Include "common-gdbthread.h".
5381 (switch_to_thread): Moved to "common/common-gdbthread.h".
5382
5383 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5384
5385 * Makefile.in (SFILES): Add "common/job-control.c".
5386 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5387 (COMMON_OBS): Add "job-control.o".
5388 * common/job-control.c: New file, with contents from
5389 "gdb/inflow.c".
5390 * common/job-control.h: New file, with contents from "terminal.h".
5391 * fork-child.c: Include "job-control.h".
5392 * inflow.c: Include "job-control.h".
5393 (gdb_setpgid): Move to "common/common-inflow.c".
5394 (_initialize_inflow): Move setting of "job_control" to
5395 "handle_job_control".
5396 * terminal.h (job_control): Moved to "common/common-terminal.h".
5397 (gdb_setpgid): Likewise.
5398 * top.c: Include "job_control.h".
5399 * utils.c: Likewise.
5400 (job_control): Moved to "job-control.c".
5401
5402 2017-06-07 Pedro Alves <palves@redhat.com>
5403
5404 * Makefile.in (SFILES): Add gdb_regex.c.
5405 (COMMON_OBS): Add gdb_regex.o.
5406 * ada-lang.c (ada_add_standard_exceptions)
5407 (ada_add_exceptions_from_frame, name_matches_regex)
5408 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5409 parameter type to compiled_regex. Adjust.
5410 (ada_exceptions_list): Use compiled_regex.
5411 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5412 std::unique_ptr<compiled_regex>.
5413 (exception_catchpoint::~exception_catchpoint): Remove regfree
5414 call.
5415 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5416 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5417 * breakpoint.c (solib_catchpoint::compiled): Now a
5418 std::unique_ptr<compiled_regex>.
5419 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5420 (check_status_catch_solib): Adjust to use compiled_regex.
5421 (add_solib_catchpoint): Adjust to use compiled_regex.
5422 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5423 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5424 compiled_regex reference. Adjust to use it.
5425 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5426 declaration. Include "gdb_regex.h".
5427 (apropos_cmd): Change regex parameter to compiled_regex reference.
5428 * gdb_regex.c: New file.
5429 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5430 declarations.
5431 (class compiled_regex): New.
5432 * linux-tdep.c: Include "common/gdb_optional.h".
5433 (struct mapping_regexes): New, factored out from
5434 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5435 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5436 gdb::optional and remove cleanups. Adjust to compiled_regex.
5437 * probe.c: Include "common/gdb_optional.h".
5438 (collect_probes): Use compiled_regex and gdb::optional and remove
5439 cleanups.
5440 * skip.c: Include "common/gdb_optional.h".
5441 (skiplist_entry::compiled_function_regexp): Now a
5442 gdb::optional<compiled_regex>.
5443 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5444 (free_skiplist_entry): Remove regfree call.
5445 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5446 compiled_regex and gdb::optional.
5447 * symtab.c: Include "common/gdb_optional.h".
5448 (search_symbols): Use compiled_regex and gdb::optional.
5449 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5450 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5451 to gdb_regex.c.
5452
5453 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5454
5455 * regcache.c (regcache::save): Avoid buffer use.
5456 (regcache::dump): Likewise.
5457
5458 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5459
5460 * sh-tdep.c (sh_pseudo_register_read): Remove
5461 MAX_REGISTER_SIZE.
5462 (sh_pseudo_register_write): Likewise.
5463 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5464 (sh64_pseudo_register_write): Likewise
5465
5466 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5467
5468 * aarch64-tdep.c (aarch64_store_return_value): Use
5469 V_REGISTER_SIZE.
5470 (aarch64_pseudo_read_value): Likewise.
5471 (aarch64_pseudo_write): Likewise.
5472
5473 2017-06-06 Yao Qi <yao.qi@linaro.org>
5474
5475 * regformats/regdef.h (set_register_cache): Remove the
5476 declaration.
5477
5478 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5479
5480 * frame.c (frame_unwind_register_signed): Use
5481 frame_unwind_register_value.
5482
5483 2017-06-06 Pedro Alves <palves@redhat.com>
5484
5485 PR breakpoints/21553
5486 * breakpoint.c (create_breakpoints_sal_default)
5487 (init_breakpoint_sal, create_breakpoint_sal): Use
5488 gdb::unique_xmalloc_ptr for string parameters.
5489 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5490 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5491 (base_breakpoint_create_breakpoints_sal)
5492 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5493 (strace_marker_create_breakpoints_sal)
5494 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5495 string parameters.
5496 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5497 gdb::unique_xmalloc_ptr for string parameters.
5498 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5499 parameters.
5500
5501 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5502
5503 * alpha-tdep.c (alpha_register_to_value): Use
5504 get_frame_register_value.
5505 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5506
5507 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5508
5509 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5510 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5511 (ia64_value_to_register): Likewise.
5512 (ia64_extract_return_value): Likewise.
5513 (ia64_store_return_value): Likewise.
5514 (ia64_push_dummy_call): Likewise.
5515
5516 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5517
5518 GDB 8.0 released.
5519
5520 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5521
5522 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5523
5524 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5525
5526 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5527 parameter.
5528 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5529
5530 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5531
5532 * event-loop.c (poll_timers): Unallocate timer using delete
5533 instead of xfree.
5534
5535 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5536
5537 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5538 (struct breakpoint) <~breakpoint>: New.
5539 (struct watchpoint): Inherit from breakpoint.
5540 <~watchpoint>: New.
5541 <base>: Remove.
5542 (struct tracepoint): Inherit from breakpoint.
5543 <base>: Remove.
5544 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5545 (struct longjmp_breakpoint): Inherit from breakpoint.
5546 <~longjmp_breakpoint>: New.
5547 <base>: Remove.
5548 (new_breakpoint_from_type): Remove casts.
5549 (watchpoint_in_thread_scope): Remove reference to base field.
5550 (watchpoint_del_at_next_stop): Likewise.
5551 (update_watchpoint): Likewise.
5552 (watchpoint_check): Likewise.
5553 (bpstat_check_watchpoint): Likewise.
5554 (set_longjmp_breakpoint): Likewise.
5555 (struct fork_catchpoint): Inherit from breakpoint.
5556 <base>: Remove.
5557 (struct solib_catchpoint): Inherit from breakpoint.
5558 <~solib_catchpoint>: New.
5559 <base>: Remove.
5560 (dtor_catch_solib): Change to ...
5561 (solib_catchpoint::~solib_catchpoint): ... this.
5562 (breakpoint_hit_catch_solib): Remove reference to base field.
5563 (add_solib_catchpoint): Likewise.
5564 (create_fork_vfork_event_catchpoint): Likewise.
5565 (struct exec_catchpoint): Inherit from breakpoint.
5566 <~exec_catchpoint>: New.
5567 <base>: Remove.
5568 (dtor_catch_exec): Change to ...
5569 (exec_catchpoint::~exec_catchpoint): ... this.
5570 (dtor_watchpoint): Change to ...
5571 (watchpoint::~watchpoint): ... this.
5572 (watch_command_1): Remove reference to base field.
5573 (catch_exec_command_1): Likewise.
5574 (base_breakpoint_dtor): Change to ...
5575 (breakpoint::~breakpoint): ... this.
5576 (base_breakpoint_ops): Remove dtor field value.
5577 (longjmp_bkpt_dtor): Change to ...
5578 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5579 (strace_marker_create_breakpoints_sal): Remove reference to base
5580 field.
5581 (delete_breakpoint): Don't manually call breakpoint destructor.
5582 (create_tracepoint_from_upload): Remove reference to base field.
5583 (trace_pass_set_count): Likewise.
5584 (initialize_breakpoint_ops): Don't initialize
5585 momentary_breakpoint_ops, don't set dtors.
5586 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5587 <~ada_catchpoint>: New.
5588 <base>: Remove.
5589 (create_excep_cond_exprs): Remove reference to base field.
5590 (dtor_exception): Change to ...
5591 (ada_catchpoint::~ada_catchpoint): ... this.
5592 (dtor_catch_exception): Remove.
5593 (dtor_catch_exception_unhandled): Remove.
5594 (dtor_catch_assert): Remove.
5595 (create_ada_exception_catchpoint): Remove reference to base
5596 field.
5597 (initialize_ada_catchpoint_ops): Don't set dtors.
5598 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5599 breakpoint.
5600 <~signal_catchpoint>: New.
5601 <base>: Remove.
5602 (signal_catchpoint_dtor): Change to ...
5603 (signal_catchpoint::~signal_catchpoint): ... this.
5604 (create_signal_catchpoint): Remove reference to base field.
5605 (initialize_signal_catchpoint_ops): Don't set dtor.
5606 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5607 from breakpoint.
5608 <~syscall_catchpoint>: New.
5609 <base>: Remove.
5610 (dtor_catch_syscall): Change to ...
5611 (syscall_catchpoint::~syscall_catchpoint): ... this.
5612 (create_syscall_event_catchpoint): Remove reference to base
5613 field.
5614 (initialize_syscall_catchpoint_ops): Don't set dtor.
5615 * break-catch-throw.c (struct exception_catchpoint): Inherit
5616 from breakpoint.
5617 <~exception_catchpoint>: New.
5618 <base>: Remove.
5619 (dtor_exception_catchpoint): Change to ...
5620 (exception_catchpoint::~exception_catchpoint): ... this.
5621 (handle_gnu_v3_exceptions): Remove reference to base field.
5622 (initialize_throw_catchpoint_ops): Don't set dtor.
5623 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5624 field.
5625 * remote.c (remote_get_tracepoint_status): Likewise.
5626 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5627 * tracefile.c (tracefile_fetch_registers): Likewise.
5628 * tracepoint.c (actions_command): Likewise.
5629 (validate_actionline): Likewise.
5630 (tfind_1): Likewise.
5631 (get_traceframe_location): Likewise.
5632 (find_matching_tracepoint_location): Likewise.
5633 (parse_tracepoint_status): Likewise.
5634 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5635
5636 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5637
5638 * breakpoint.c (struct longjmp_breakpoint): New struct.
5639 (is_tracepoint_type): Change return type to bool.
5640 (is_longjmp_type): New function.
5641 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5642 (set_raw_breakpoint_without_location): Use
5643 new_breakpoint_from_type.
5644 (set_raw_breakpoint): Likewise.
5645
5646 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5647
5648 * breakpoint.c (new_breakpoint_from_type): New function.
5649 (create_breakpoint_sal): Use new_breakpoint_from_type and
5650 unique_ptr.
5651 (create_breakpoint): Likewise.
5652
5653 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5654
5655 * memattr.c (mem_info_command): Rename to ...
5656 (info_mem_command): ... this.
5657 (mem_enable_command): Rename to ...
5658 (enable_mem_command): ... this.
5659 (mem_disable_command): Rename to ...
5660 (disable_mem_command): ... this.
5661 (mem_delete_command): Rename to ...
5662 (delete_mem_command): ... this.
5663 (_initialize_mem): Adjust function names.
5664
5665 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5666
5667 * btrace.c (handle_pt_insn_events): New.
5668 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5669 STATUS. Split into this and ...
5670 (handle_pt_insn_event_flags): ... this.
5671
5672 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5673
5674 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5675 and struct pt_insn.resynced.
5676 * configure: Regenerated.
5677 * config.in: Regenerated.
5678
5679 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5680
5681 * btrace.c (ftrace_find_call_by_number): New function.
5682 (ftrace_new_function): Store objects, not pointers.
5683 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5684 ftrace_new_gap, ftrace_update_function,
5685 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5686 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5687 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5688 btrace_ends_with_single_insn, btrace_call_get): Account for
5689 btrace_thread_info::functions now storing objects.
5690 * btrace.h (struct btrace_thread_info): Add constructor.
5691 (struct btrace_thread_info) <functions>: Make std::vector.
5692 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5693 Initialize with default values.
5694 * record-btrace.c (record_btrace_frame_sniffer): Account for
5695 btrace_thread_info::functions now storing objects.
5696
5697 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5698
5699 * btrace.c: Remove typedef bfun_s.
5700 (ftrace_new_gap): Directly add gaps to the list of gaps.
5701 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5702 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5703 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5704 instead of gdb VEC.
5705
5706 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5707
5708 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5709 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5710 with btrace_thread_info::next_segment and
5711 btrace_thread_info::prev_segment.
5712 * btrace.h: Remove struct btrace_func_link.
5713 (struct btrace_function): Replace pair of function segment pointers
5714 with pair of indices.
5715 * python/py-record-btrace.c (btpy_call_prev_sibling,
5716 btpy_call_next_sibling): Replace references to
5717 btrace_thread_info::segment with btrace_thread_info::next_segment and
5718 btrace_thread_info::prev_segment.
5719 * record-btrace.c (record_btrace_frame_this_id): Use
5720 btrace_find_call_by_number.
5721
5722 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5723
5724 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5725 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5726 btrace_insn_next, btrace_insn_prev): Remove references to
5727 btrace_thread_info::flow.
5728 * btrace.h (struct btrace_function): Remove FLOW.
5729
5730 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5731
5732 * btrace.c (ftrace_find_call_by_number): New function.
5733 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5734 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5735 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5736 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5737 index.
5738 * btrace.h (struct btrace_function): Turn UP into an index.
5739 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5740 as an index.
5741 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5742 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5743 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5744
5745 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5746
5747 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5748 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5749 ftrace_update_function, ftrace_compute_global_level_offset,
5750 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5751 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5752 btrace_insn_end, btrace_is_empty): Remove references to
5753 btrace_thread_info::begin and btrace_thread_info::end.
5754 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5755 (struct btrace_thread_info) <functions>: Adjust comment.
5756 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5757 btrace_thread_info::begin.
5758
5759 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5760
5761 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5762 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5763 ftrace_update_function): Remove arguments that implicitly were always
5764 BTINFO->END.
5765 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5766 Don't pass BTINFO->END.
5767
5768 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5769
5770 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5771 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5772 btrace_find_insn_by_number): Replace function segment pointer with
5773 index.
5774 (btrace_insn_cmp): Simplify.
5775 * btrace.h: (struct btrace_insn_iterator) Rename index to
5776 insn_index. Replace function segment pointer with index into function
5777 segment vector.
5778 * record-btrace.c (record_btrace_call_history): Replace function
5779 segment pointer use with index.
5780 (record_btrace_frame_sniffer): Retrieve function call segment through
5781 vector.
5782 (record_btrace_set_replay): Remove defunc't safety check.
5783
5784 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5785
5786 * btrace.c (btrace_ends_with_single_insn): New function.
5787 (btrace_call_get, btrace_call_number, btrace_call_begin,
5788 btrace_call_end, btrace_call_next, btrace_call_prev,
5789 btrace_find_call_by_number): Use index into call segment vector
5790 instead of pointer.
5791 (btrace_call_cmp): Simplify.
5792 * btrace.h (struct btrace_call_iterator): Replace function call segment
5793 pointer with index into vector.
5794 * record-btrace.c (record_btrace_call_history): Use index instead of
5795 pointer.
5796
5797 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5798
5799 * btrace.c (btrace_insn_begin, btrace_insn_end,
5800 btrace_find_insn_by_number): Add btinfo to iterator.
5801 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5802
5803 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5804
5805 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5806 and save pointers directly.
5807 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5808 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5809 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5810 changed signature of functions.
5811 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5812 (btrace_fetch): Remove code that adds btrace_function pointers to
5813 vector of btrace_functions.
5814 (btrace_clear): Simplify freeing vector of btrace_functions.
5815
5816 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5817
5818 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5819 Replace VEC_* with std::vector functions.
5820 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5821 (struct btrace_thread_info)<functions>: Change type to std::vector.
5822
5823 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5824
5825 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5826 "Removed targets and native configurations" up. Merge duplicate
5827 "New commands" sub-sections. Add "New options" sub-sections.
5828
5829 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5830
5831 * defs.h (copy_integer_to_size): New declaration.
5832 * findvar.c (copy_integer_to_size): New function.
5833 (do_cint_test): New selftest function.
5834 (copy_integer_to_size_test): Likewise.
5835 (_initialize_findvar): Likewise.
5836 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5837 (mips_fbsd_collect_reg): Use raw_collect_integer.
5838 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5839 (mips64_fill_gregset): Use raw_collect_integer
5840 (mips64_fill_fpregset): Use raw_supply_integer.
5841 * regcache.c (regcache::raw_supply_integer): New function.
5842 (regcache::raw_collect_integer): Likewise.
5843 * regcache.h: (regcache::raw_supply_integer): New declaration.
5844 (regcache::raw_collect_integer): Likewise.
5845
5846 2017-05-24 Yao Qi <yao.qi@linaro.org>
5847
5848 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5849 (COMMON_OBS): Add gdbarch-selftests.o.
5850 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5851 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5852 * gdbarch-selftests.c: New file.
5853 * regcache.h (regcache) <~regcache>: Mark it virtual if
5854 GDB_SELF_TEST.
5855 <raw_write>: Likewise.
5856
5857 2017-05-24 Yao Qi <yao.qi@linaro.org>
5858
5859 * regcache.c (current_regcache): Change it to
5860 regcache::current_regcache.
5861 (regcache_observer_target_changed): Update.
5862 (regcache_thread_ptid_changed): Make it a regcache static
5863 method.
5864 (regcache_thread_ptid_changed): Update.
5865 (class regcache_access): New.
5866 (current_regcache_test): Update.
5867 (_initialize_regcache): Update.
5868 * regcache.h: Include forward_list.
5869 (regcache): Declare regcache_thread_ptid_changed and declare
5870 registers_changed_ptid as friend.
5871
5872 2017-05-24 Yao Qi <yao.qi@linaro.org>
5873
5874 * i387-tdep.c (i387_register_to_value): Use register_size
5875 instead of TYPE_LENGTH.
5876 * m68k-tdep.c (m68k_register_to_value): Likewise.
5877
5878 2017-05-24 Yao Qi <yao.qi@linaro.org>
5879
5880 * i387-tdep.c (i387_convert_register_p): Return false if type
5881 code isn't TYPE_CODE_FLT.
5882
5883 2017-05-24 Yao Qi <yao.qi@linaro.org>
5884
5885 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5886 length is 4.
5887 (alpha_register_to_value): Remove type length check.
5888 (alpha_value_to_register): Likewise.
5889
5890 2017-05-24 Yao Qi <yao.qi@linaro.org>
5891
5892 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5893 TYPE_CODE_FLT.
5894
5895 2017-05-24 Yao Qi <yao.qi@linaro.org>
5896
5897 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5898 TYPE_CODE_FLT or not.
5899
5900 2017-05-24 Yao Qi <yao.qi@linaro.org>
5901
5902 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5903 * avr-tdep.c (avr_gdbarch_init): Likewise.
5904 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5905 * cris-tdep.c (cris_gdbarch_init): Likewise.
5906 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5907 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5908 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5909 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5910 * mep-tdep.c (mep_gdbarch_init): Likewise.
5911 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5912 * mips-tdep.c (mips_gdbarch_init): Likewise.
5913 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5914 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5915 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5916 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5917 * v850-tdep.c (v850_gdbarch_init): Likewise.
5918
5919 2017-05-24 Yao Qi <yao.qi@linaro.org>
5920
5921 * selftest-arch.c (tests_with_arch): Call registers_changed
5922 and reinit_frame_cache.
5923 * selftest.c (run_self_tests): Likewise.
5924
5925 2017-05-24 Yao Qi <yao.qi@linaro.org>
5926
5927 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5928 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5929
5930 2017-05-24 Yao Qi <yao.qi@linaro.org>
5931
5932 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5933 set_gdbarch_print_insn.
5934
5935 2017-05-24 Yao Qi <yao.qi@linaro.org>
5936
5937 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5938 set_gdbarch_print_insn.
5939
5940 2017-05-24 Yao Qi <yao.qi@linaro.org>
5941
5942 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5943 set_gdbarch_print_insn.
5944 * arc-tdep.c (arc_gdbarch_init): Likewise.
5945 * arch-utils.c: include dis-asm.h.
5946 (default_print_insn): New function.
5947 * arch-utils.h (default_print_insn): Declare.
5948 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5949 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5950 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5951 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5952 * frv-tdep.c (frv_gdbarch_init): Likewise.
5953 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5954 * gdbarch.sh (print_insn): Use default_print_insn.
5955 * gdbarch.c: Regenerated.
5956 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5957 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5958 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5959 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5960 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5961 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5962 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5963 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5964 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5965 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5966 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5967 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5968 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5969 * mt-tdep.c (mt_gdbarch_init): Likewise.
5970 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5971 * nios2-tdep.c (nios2_print_insn): Remove.
5972 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5973 * rx-tdep.c (rx_gdbarch_init): Likewise.
5974 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5975 * score-tdep.c (score_print_insn): Remove.
5976 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5977 * sh-tdep.c (sh_gdbarch_init): Likewise.
5978 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5979 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5980 * tic6x-tdep.c (tic6x_print_insn): Remove.
5981 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5982 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5983 * v850-tdep.c (v850_gdbarch_init): Likewise.
5984 * vax-tdep.c (vax_gdbarch_init): Likewise.
5985 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5986 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5987
5988 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5989
5990 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5991 (MIPS_FP0_REGNUM): Remove.
5992 (MIPS_FSR_REGNUM): Remove.
5993 (mips_fbsd_supply_fpregs): Use mips_regnum.
5994 (mips_fbsd_supply_gregs): Likewise.
5995 (mips_fbsd_collect_fpregs): Likewise.
5996 (mips_fbsd_collect_gregs): Likewise.
5997
5998 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5999
6000 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6001 (getpfpregs_supplies): New function.
6002 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6003 getfpregs_supplies.
6004 (mips_fbsd_store_inferior_registers): Likewise.
6005
6006 2017-05-22 Pedro Alves <palves@redhat.com>
6007
6008 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6009 maintainer.
6010
6011 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6012
6013 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6014 (store_register): Likewise.
6015 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6016 (get_decimal_float_return_value): Likewise.
6017 (do_ppc_sysv_return_value): Likewise.
6018 (ppc64_sysv_abi_push_integer): Likewise.
6019 (ppc64_sysv_abi_push_freg): Likewise.
6020 (ppc64_sysv_abi_return_value_base): Likewise.
6021 (ppc64_sysv_abi_return_value): Likewise.
6022 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6023 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6024 * rs6000-nat.c: Likewise.
6025 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6026 (rs6000_value_to_register): Likewise.
6027 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6028
6029 2017-05-21 Tom Tromey <tom@tromey.com>
6030
6031 PR rust/21466:
6032 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6033 arrays as "[T]", not "[T; ]".
6034
6035 2017-05-19 Tom Tromey <tom@tromey.com>
6036
6037 PR rust/21484:
6038 * rust-lang.c (exp_descriptor_rust): New function.
6039 (rust_language_defn): Use it.
6040 * p-lang.c (pascal_language_defn): Update.
6041 * opencl-lang.c (opencl_language_defn): Update.
6042 * objc-lang.c (objc_language_defn): Update.
6043 * m2-lang.c (m2_language_defn): Update.
6044 * language.h (struct language_defn)
6045 <la_watch_location_expression>: New member.
6046 * language.c (unknown_language_defn, auto_language_defn)
6047 (local_language_defn): Update.
6048 * go-lang.c (go_language_defn): Update.
6049 * f-lang.c (f_language_defn): Update.
6050 * d-lang.c (d_language_defn): Update.
6051 * c-lang.h (c_watch_location_expression): Declare.
6052 * c-lang.c (c_watch_location_expression): New function.
6053 (c_language_defn, cplus_language_defn, asm_language_defn)
6054 (minimal_language_defn): Use it.
6055 * breakpoint.c (watch_command_1): Call
6056 la_watch_location_expression.
6057 * ada-lang.c (ada_language_defn): Update.
6058
6059 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6060
6061 PR tui/21482
6062 * gdb_curses.h (NOMACROS): Define.
6063 (NCURSES_NOMACROS): Define.
6064
6065 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6066
6067 PR tui/21482
6068 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6069 arg to char *.
6070 * tui/tui-wingeneral.c (box_win): Likewise.
6071 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6072 (tui_show_source_line): Likewise.
6073 (tui_show_exec_info_content): Likewise.
6074
6075 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6076
6077 * sparc-tdep.c (sparc_structure_return_p)
6078 (sparc_arg_on_registers_p): New functions.
6079 (sparc32_store_arguments): Use them.
6080 * sparc64-tdep.c (sparc64_16_byte_align_p)
6081 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6082 Handle TYPE_CODE_ARRAY.
6083
6084 2017-05-17 Yao Qi <yao.qi@linaro.org>
6085
6086 * cli/cli-decode.c (add_alias_cmd): New function.
6087 * command.h (add_alias_cmd): Declare.
6088 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6089 instead call add_alias_cmd.
6090
6091 2017-05-17 Pedro Alves <palves@redhat.com>
6092
6093 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6094 (nat_makefile_frag): ... this. All references updated.
6095 * configure.ac: Likewise.
6096 * configure.nat: Likewise. Enhance comments.
6097 * configure: Regenerate.
6098
6099 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6100
6101 * procfs.c (procfs_create_inferior): Change prototype to match
6102 definition.
6103
6104 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6105
6106 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6107 C++ compiler warning.
6108
6109 2017-05-12 Tom Tromey <tom@tromey.com>
6110
6111 PR rust/21483:
6112 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6113 recurse, just call value_struct_elt directly.
6114
6115 2017-05-12 Tom Tromey <tom@tromey.com>
6116
6117 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6118 OP_RUST_ARRAY>: Fix.
6119
6120 2017-05-12 Tom Tromey <tom@tromey.com>
6121
6122 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6123
6124 2017-05-09 Yao Qi <yao.qi@linaro.org>
6125
6126 * regcache.c: Include <forward_list>.
6127 (struct regcache_list): Remove.
6128 (current_regcache): Update.
6129 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6130 (regcache_thread_ptid_changed): Likewise.
6131 (registers_changed_ptid): Likewise.
6132 (current_regcache_size): Likewise.
6133
6134 2017-05-09 Yao Qi <yao.qi@linaro.org>
6135
6136 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6137 (current_regcache_size): New function.
6138 (current_regcache_test): New function.
6139 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6140
6141 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6142
6143 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6144 (print_gp_register_row): Use get_frame_register_value.
6145
6146 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6147
6148 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6149 (mips_supply_fpregset): Likewise.
6150 (mips64_supply_gregset): Likewise.
6151
6152 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6153
6154 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6155 regcache->raw_supply_zeroed.
6156
6157 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6158
6159 * configure.nat: Rearrange 'case' statements to match
6160 host before cpu.
6161
6162 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6163
6164 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6165 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6166 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6167 "@nat_extra_makefile_frag@".
6168 (Makefile): Remove dependency on "@frags@".
6169 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6170 (data-directory/Makefile): Likewise.
6171 * config/aarch64/linux.mh: Deleted; moved contents to
6172 "gdb/configure.nat".
6173 * config/alpha/alpha-linux.mh: Likewise.
6174 * config/alpha/nbsd.mh: Likewise.
6175 * config/arm/linux.mh: Likewise.
6176 * config/arm/nbsdelf.mh: Likewise.
6177 * config/i386/cygwin.mh: Likewise.
6178 * config/i386/cygwin64.mh: Likewise.
6179 * config/i386/darwin.mh: Likewise.
6180 * config/i386/fbsd.mh: Likewise.
6181 * config/i386/fbsd64.mh: Likewise.
6182 * config/i386/go32.mh: Likewise.
6183 * config/i386/i386gnu.mh: Likewise.
6184 * config/i386/i386sol2.mh: Likewise.
6185 * config/i386/linux.mh: Likewise.
6186 * config/i386/linux64.mh: Likewise.
6187 * config/i386/mingw.mh: Likewise.
6188 * config/i386/mingw64.mh: Likewise.
6189 * config/i386/nbsd64.mh: Likewise.
6190 * config/i386/nbsdelf.mh: Likewise.
6191 * config/i386/nto.mh: Likewise.
6192 * config/i386/obsd.mh: Likewise.
6193 * config/i386/obsd64.mh: Likewise.
6194 * config/i386/sol2-64.mh: Likewise.
6195 * config/ia64/linux.mh: Likewise.
6196 * config/m32r/linux.mh: Likewise.
6197 * config/m68k/linux.mh: Likewise.
6198 * config/m68k/nbsdelf.mh: Likewise.
6199 * config/m68k/obsd.mh: Likewise.
6200 * config/m88k/obsd.mh: Likewise.
6201 * config/mips/fbsd.mh: Likewise.
6202 * config/mips/linux.mh: Likewise.
6203 * config/mips/nbsd.mh: Likewise.
6204 * config/mips/obsd64.mh: Likewise.
6205 * config/pa/linux.mh: Likewise.
6206 * config/pa/nbsd.mh: Likewise.
6207 * config/pa/obsd.mh: Likewise.
6208 * config/powerpc/aix.mh: Likewise.
6209 * config/powerpc/fbsd.mh: Likewise.
6210 * config/powerpc/linux.mh: Likewise.
6211 * config/powerpc/nbsd.mh: Likewise.
6212 * config/powerpc/obsd.mh: Likewise.
6213 * config/powerpc/ppc64-linux.mh: Likewise.
6214 * config/powerpc/spu-linux.mh: Likewise.
6215 * config/s390/linux.mh: Likewise.
6216 * config/sh/nbsd.mh: Likewise.
6217 * config/sparc/fbsd.mh: Likewise.
6218 * config/sparc/linux.mh: Likewise.
6219 * config/sparc/linux64.mh: Likewise.
6220 * config/sparc/nbsd64.mh: Likewise.
6221 * config/sparc/nbsdelf.mh: Likewise.
6222 * config/sparc/obsd64.mh: Likewise.
6223 * config/sparc/sol2.mh: Likewise.
6224 * config/tilegx/linux.mh: Likewise.
6225 * config/vax/nbsdelf.mh: Likewise.
6226 * config/vax/obsd.mh: Likewise.
6227 * config/xtensa/linux.mh: Likewise.
6228 * config/i386/i386gnu.mn: New file, with excerpts from
6229 "config/i386/i386gnu.mh".
6230 * configure: Regenerate.
6231 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6232 *.mh files under "gdb/config".
6233 * configure.nat: New file, with contents from the
6234 "gdb/config/*/*.mh" files.
6235
6236 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6237
6238 * btrace.c (btrace_clear): Free insn vector.
6239
6240 2017-05-05 Pedro Alves <palves@redhat.com>
6241
6242 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6243 * configure: Regenerate.
6244
6245 2017-05-04 Pedro Alves <palves@redhat.com>
6246
6247 * Makefile.in (SFILES): Add progspace-and-thread.c.
6248 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6249 (COMMON_OBS): Add progspace-and-thread.o.
6250 * breakpoint.c: Include "progspace-and-thread.h".
6251 (update_inserted_breakpoint_locations)
6252 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6253 Use scoped_restore_current_pspace_and_thread.
6254 (create_std_terminate_master_breakpoint): Use
6255 scoped_restore_current_program_space.
6256 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6257 (print_breakpoint_location): Use
6258 scoped_restore_current_program_space.
6259 (bp_loc_is_permanent): Use
6260 scoped_restore_current_pspace_and_thread.
6261 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6262 (download_tracepoint_locations): Use
6263 scoped_restore_current_pspace_and_thread.
6264 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6265 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6266 (enum step_over_calls_kind): Moved from inferior.h.
6267 (class scoped_restore_current_thread): New class.
6268 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6269 declaration.
6270 (scoped_restore_current_thread): New class.
6271 * infcmd.c: Include "common/gdb_optional.h".
6272 (continue_1, proceed_after_attach): Use
6273 scoped_restore_current_thread.
6274 (notice_new_inferior): Use scoped_restore_current_thread.
6275 * inferior.c: Include "progspace-and-thread.h".
6276 (restore_inferior, save_current_inferior): Delete.
6277 (add_inferior_command, clone_inferior_command): Use
6278 scoped_restore_current_pspace_and_thread.
6279 * inferior.h (scoped_restore_current_inferior): New class.
6280 * infrun.c: Include "progspace-and-thread.h" and
6281 "common/gdb_optional.h".
6282 (follow_fork_inferior): Use
6283 scoped_restore_current_pspace_and_thread.
6284 (scoped_restore_exited_inferior): New class.
6285 (handle_vfork_child_exec_or_exit): Use
6286 scoped_restore_exited_inferior,
6287 scoped_restore_current_pspace_and_thread,
6288 scoped_restore_current_thread and scoped_restore.
6289 (fetch_inferior_event): Use scoped_restore_current_thread.
6290 * linespec.c (decode_line_full, decode_line_1): Use
6291 scoped_restore_current_program_space.
6292 * mi/mi-main.c: Include "progspace-and-thread.h".
6293 (exec_continue): Use scoped_restore_current_thread.
6294 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6295 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6296 * proc-service.c (ps_pglobal_lookup): Use
6297 scoped_restore_current_program_space.
6298 * progspace-and-thread.c: New file.
6299 * progspace-and-thread.h: New file.
6300 * progspace.c (release_program_space, clone_program_space): Use
6301 scoped_restore_current_program_space.
6302 (restore_program_space, save_current_program_space)
6303 (save_current_space_and_thread): Delete.
6304 (switch_to_program_space_and_thread): Moved to
6305 progspace-and-thread.c.
6306 * progspace.h (save_current_program_space)
6307 (save_current_space_and_thread): Delete declarations.
6308 (scoped_restore_current_program_space): New class.
6309 * remote.c (remote_btrace_maybe_reopen): Use
6310 scoped_restore_current_thread.
6311 * symtab.c: Include "progspace-and-thread.h".
6312 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6313 * thread.c (print_thread_info_1): Use
6314 scoped_restore_current_thread.
6315 (struct current_thread_cleanup): Delete.
6316 (do_restore_current_thread_cleanup)
6317 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6318 (scoped_restore_current_thread::~scoped_restore_current_thread):
6319 ... this new dtor.
6320 (make_cleanup_restore_current_thread): Rename/convert to ...
6321 (scoped_restore_current_thread::scoped_restore_current_thread):
6322 ... this new ctor.
6323 (thread_apply_all_command): Use scoped_restore_current_thread.
6324 (thread_apply_command): Use scoped_restore_current_thread.
6325 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6326 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6327
6328 2017-05-04 Pedro Alves <palves@redhat.com>
6329
6330 * thread.c (make_cleanup_restore_current_thread): Move
6331 find_thread_ptid call before the is_stopped call. Assert that the
6332 thread is found. Replace is_stopped call by checking the thread's
6333 state directly. Remove unnecessary NULL-thread check.
6334
6335 2017-05-04 Pedro Alves <palves@redhat.com>
6336
6337 * corelow.c (thread_section_name): New class.
6338 (get_core_register_section, get_core_siginfo): Use it.
6339
6340 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6341
6342 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6343 (get_core_register_section): Remove xfree of NULL pointer.
6344
6345 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6346
6347 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6348 * regcache.c (regcache::raw_supply_zeroed): New function.
6349 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6350
6351 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6352
6353 * gdbarch.sh: Remove commented out definition of
6354 TARGET_CHAR_BIT.
6355 * gdbarch.h: Re-generate.
6356
6357 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6358
6359 * configure: Regenerate.
6360
6361 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6362
6363 * solib-target.c (solib_target_relocate_section_addresses):
6364 Remove num_section_bases, num_bases, segment_bases variables.
6365
6366 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6367
6368 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6369
6370 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6371
6372 * solib-target.c: Include <vector>
6373 (struct lm_info_target) <~lm_info_target>: Remove.
6374 <segment_bases, section_bases>: Change type to
6375 std::vector<CORE_ADDR>.
6376 (library_list_start_segment, library_list_start_section,
6377 library_list_end_library,
6378 solib_target_relocate_section_addresses): Adjust.
6379
6380 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6381
6382 * gdbarch.sh (software_single_step): Change return type to
6383 std::vector<CORE_ADDR>.
6384 * gdbarch.c, gdbarch.h: Re-generate.
6385 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6386 Adjust.
6387 (arm_deal_with_atomic_sequence_raw): Adjust.
6388 (thumb_get_next_pcs_raw): Adjust.
6389 (arm_get_next_pcs_raw): Adjust.
6390 (arm_get_next_pcs): Adjust.
6391 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6392 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6393 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6394 (alpha_software_single_step): Adjust.
6395 * alpha-tdep.h (alpha_software_single_step): Adjust.
6396 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6397 * arm-tdep.c (arm_software_single_step): Adjust.
6398 (arm_breakpoint_kind_from_current_state): Adjust.
6399 * arm-tdep.h (arm_software_single_step): Adjust.
6400 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6401 * cris-tdep.c (cris_software_single_step): Adjust.
6402 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6403 (micromips_deal_with_atomic_sequence): Adjust.
6404 (deal_with_atomic_sequence): Adjust.
6405 (mips_software_single_step): Adjust.
6406 * mips-tdep.h (mips_software_single_step): Adjust.
6407 * moxie-tdep.c (moxie_software_single_step): Adjust.
6408 * nios2-tdep.c (nios2_software_single_step): Adjust.
6409 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6410 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6411 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6412 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6413 * sparc-tdep.c (sparc_software_single_step): Adjust.
6414 * spu-tdep.c (spu_software_single_step): Adjust.
6415 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6416
6417 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6418
6419 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6420 * gdbarch.h: Re-generate.
6421
6422 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6423
6424 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6425 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6426 * python/py-instruction.c, python/py-instruction.h: New file.
6427 * python/py-record.c: Add py-instruction.h include.
6428 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6429 gdb.RecordInstruction.
6430 * python/python-internal.h: Add gdbpy_initialize_instruction
6431 declaration.
6432 * python/python.c (do_start_initialization): Add
6433 gdbpy_initialize_instruction.
6434
6435 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6436
6437 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6438 Remove.
6439 (btrace_func_from_recpy_func): New function.
6440 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6441 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6442 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6443 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6444 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6445 Also, use new helper functions.
6446 (btpy_list_item): Use new helper functions.
6447 (recpy_bt_function_call_history): Use new type name.
6448 (btpy_call_getset): Remove.
6449 (gdbpy_initialize_btrace): Remove code to initialize
6450 gdb.BtraceFunctionCall.
6451 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6452 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6453 recpy_bt_func_prev, recpy_bt_func_next): New export.
6454 * python/py-record.c (recpy_func_type): New static object.
6455 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6456 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6457 recpy_func_next): New function.
6458 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6459 (recpy_func_getset): New static object.
6460 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6461 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6462
6463 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6464
6465 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6466 (btpy_object, btpy_insn_type, btpy_new): Remove.
6467 (btpy_list_object): Use gdb.RecordInstruction type instead of
6468 gdb.BtraceInstruction type.
6469 (btrace_insn_from_recpy_insn): New function.
6470 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6471 btpy_new.
6472 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6473 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6474 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6475 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6476 instead of btpy_object.
6477 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6478 btpy_insn_data, btpy_insn_decode): Rename to ...
6479 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6480 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6481 recpy_bt_insn_decode): This. Also, use new helper functions.
6482 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6483 recpy_insn_type.
6484 (btpy_insn_getset): Remove.
6485 (gdbpy_initialize_btrace): Remove code to initialize
6486 gdb.BtraceInstruction. Use recpy_element_object.
6487 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6488 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6489 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6490 * python/py-record.c (recpy_insn_type): New static object.
6491 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6492 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6493 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6494 New function.
6495 (recpy_insn_getset): New static object.
6496 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6497 * python/py-record.h (recpy_element_object): New typedef.
6498 (recpy_insn_type, recpy_insn_new): New export.
6499
6500 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6501
6502 * py-record-btrace.c (btpy_insn_new): Removed.
6503 (btpy_insn_or_gap_new): New function.
6504 (btpy_insn_error): Removed.
6505 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6506 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6507 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6508 btpy_insn_or_gap_new instead of btpy_insn_new.
6509 (btpy_insn_getset): Remove btpy_insn_error.
6510 * py-record.c (recpy_gap_type): New static object.
6511 (recpy_gap_object): New typedef.
6512 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6513 recpy_gap_reason_string): New function.
6514 (recpy_gap_getset): New static object.
6515 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6516 * py-record.h (recpy_gap_new): New export.
6517
6518 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6519
6520 * python/py-record.c (recpy_ptid): Remove.
6521 (recpy_record_getset): Remove recpy_ptid.
6522
6523 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6524
6525 * btrace.c (btrace_fetch): Set inferior_ptid.
6526 * python/py-record-btrace.c: Add "py-record.h" include.
6527 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6528 recpy_bt_end, recpy_bt_instruction_history,
6529 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6530 in gdb.Record object instead of current ptid.
6531 * python/py-record.c: Include new "py-record.h" file.
6532 (recpy_record_object): Moved to py-record.h.
6533 * python/py-record.h: New file.
6534
6535 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6536
6537 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6538 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6539 indentation.
6540
6541 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6542
6543 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6544 the past maintainers section.
6545
6546 2017-04-28 Yao Qi <yao.qi@linaro.org>
6547
6548 * infcmd.c (get_return_value): Use regcache ctor, and remove
6549 cleanup.
6550
6551 2017-04-28 Yao Qi <yao.qi@linaro.org>
6552 Pedro Alves <palves@redhat.com>
6553
6554 * regcache.c (regcache::regcache): New tag dispatch ctor.
6555 (do_cooked_read): Moved above.
6556 (regcache_dup): Use the tag dispatch ctor..
6557 * regcache.h (regcache): Declare ctor, delete copy ctor and
6558 assignment operator, remove friend regcache_dup.
6559
6560 2017-04-28 Yao Qi <yao.qi@linaro.org>
6561
6562 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6563 call method save instead of regcache_cpy.
6564 * regcache.h (struct regcache): Make regcache_dup a friend.
6565
6566 2017-04-28 Yao Qi <yao.qi@linaro.org>
6567
6568 * regcache.c (struct regcache): Move to regcache.h
6569 (regcache::arch): New method.
6570 (regcache_get_ptid): Update.
6571 (get_regcache_arch): Call arch method.
6572 (get_regcache_aspace): Call method aspace.
6573 (register_buffer): Change it to method.
6574 (regcache_save): Change it to regcache::save.
6575 (regcache_restore): Likewise.
6576 (regcache_cpy_no_passthrough): Remove the declaration.
6577 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6578 (regcache_cpy_no_passthrough): Change it to method
6579 cpy_no_passthrough.
6580 (regcache_register_status): Change it to method
6581 get_register_status.
6582 (regcache_invalidate): Change it to method invalidate.
6583 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6584 (regcache_raw_update): Change it to method raw_update.
6585 (regcache_raw_read): Likewise.
6586 (regcache_raw_read_signed): Likewise.
6587 (regcache_raw_read_unsigned): Likewise.
6588 (regcache_raw_write_signed): Likewise.
6589 (regcache_raw_write_unsigned): Likewise.
6590 (regcache_cooked_read): Likewise.
6591 (regcache_cooked_read_value): Likewise.
6592 (regcache_cooked_read_signed): Likewise.
6593 (regcache_cooked_read_unsigned): Likewise.
6594 (regcache_cooked_write_signed): Likewise.
6595 (regcache_cooked_write_unsigned): Likewise.
6596 (regcache_raw_set_cached_value): Likewise.
6597 (regcache_raw_write): Likewise.
6598 (regcache_cooked_write): Likewise.
6599 (regcache_xfer_part): Likewise.
6600 (regcache_raw_read_part): Likewise.
6601 (regcache_raw_write_part): Likewise.
6602 (regcache_cooked_read_part): Likewise.
6603 (regcache_cooked_write_part): Likewise.
6604 (regcache_raw_supply): Likewise.
6605 (regcache_raw_collect): Likewise.
6606 (regcache_transfer_regset): Likewise.
6607 (regcache_supply_regset): Likewise.
6608 (regcache_collect_regset): Likewise.
6609 (regcache_debug_print_register): Likewise.
6610 (enum regcache_dump_what): Move it to regcache.h.
6611 (regcache_dump): Change it to method dump.
6612 * regcache.h (enum regcache_dump_what): New.
6613 (class regcache): New.
6614 * target.c (target_fetch_registers): Call method
6615 debug_print_register.
6616 (target_store_registers): Likewise.
6617
6618 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6619
6620 * windows-nat.c (struct lm_info_windows): Initialize field.
6621 (windows_make_so): Allocate lm_info_windows with new.
6622 (windows_free_so): Free lm_info_windows with delete.
6623
6624 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6625
6626 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6627 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6628 cleanup.
6629 (darwin_free_so): Free lm_info_darwin with delete.
6630
6631 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6632
6633 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6634 <l_addr_p>: Change type to bool.
6635 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6636 (svr4_free_so): Free lm_info_svr4 with delete.
6637 (svr4_copy_library_list): Replace memcpy with call to copy
6638 constructor.
6639 (library_list_start_library, svr4_default_sos): Allocate
6640 lm_info_svr4 with new.
6641
6642 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6643
6644 * solib-target.c (struct lm_info_target): Add destructor,
6645 initialize fields.
6646 <name>: Change type to std::string.
6647 (library_list_start_library): Allocate lm_info_target with new.
6648 (solib_target_free_library_list): Free lm_info_target with
6649 delete.
6650 (solib_target_current_sos): Adapt to std::string.
6651 (solib_target_free_so): Free lm_info_target with delete.
6652
6653 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6654
6655 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6656 fields.
6657 (frv_current_sos): Allocate lm_info_frv with new.
6658 (frv_relocate_main_executable): Free lm_info_frv with delete,
6659 allocate with new.
6660 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6661
6662 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6663
6664 * solib-frv.c (struct lm_info_frv): Fix indentation.
6665
6666 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6667
6668 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6669 map field.
6670 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6671 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6672 and allocate with new.
6673 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6674
6675 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6676
6677 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6678 <filename, member_name>: Change type to std::string.
6679 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6680 (library_list_start_library): Allocate lm_info_aix with new.
6681 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6682 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6683 with copy constructor.
6684
6685 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6686
6687 * solist.h (struct lm_info): Remove.
6688 (struct lm_info_base): New class.
6689 (struct so_list) <lm_info>: Change type to lm_info_base *.
6690 * nto-tdep.c (struct lm_info): Remove.
6691 (lm_addr): Adjust.
6692 * solib-aix.c (struct lm_info): Rename to ...
6693 (struct lm_info_aix): ... this. Extend lm_info_base.
6694 (lm_info_p): Rename to ...
6695 (lm_info_aix_p): ... this, and adjust.
6696 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6697 solib_aix_parse_libraries, library_list_start_library,
6698 solib_aix_free_library_list, solib_aix_parse_libraries,
6699 solib_aix_get_library_list,
6700 solib_aix_relocate_section_addresses, solib_aix_free_so,
6701 solib_aix_get_section_offsets,
6702 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6703 Adjust.
6704 (struct solib_aix_inferior_data) <library_list>: Adjust.
6705 * solib-darwin.c (struct lm_info): Rename to ...
6706 (struct lm_info_darwin): ... this. Extend lm_info_base.
6707 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6708 * solib-dsbt.c (struct lm_info): Rename to ...
6709 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6710 (struct dsbt_info) <main_executable_lm_info): Adjust.
6711 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6712 dsbt_relocate_section_addresses): Adjust.
6713 * solib-frv.c (struct lm_info): Rename to ...
6714 (struct lm_info_frv): ... this. Extend lm_info_base.
6715 (main_executable_lm_info): Adjust.
6716 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6717 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6718 find_canonical_descriptor_in_load_object,
6719 frv_fdpic_find_canonical_descriptor): Adjust.
6720 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6721 to lm_info_svr4.
6722 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6723 svr4_clear_so, svr4_copy_library_list,
6724 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6725 svr4_current_sos, svr4_fetch_objfile_link_map,
6726 solist_update_incremental): Adjust.
6727 * solib-svr4.h (struct lm_info_svr4): Move here from
6728 solib-svr4.c.
6729 * solib-target.c (struct lm_info): Rename to ...
6730 (struct lm_info_target): ... this. Extend lm_info_base.
6731 (lm_info_p): Rename to ...
6732 (lm_info_target_p): ... this.
6733 (solib_target_parse_libraries, library_list_start_segment,
6734 library_list_start_section, library_list_start_library,
6735 library_list_end_library, solib_target_free_library_list,
6736 solib_target_current_sos, solib_target_free_so,
6737 solib_target_relocate_section_addresses): Adjust.
6738 * windows-nat.c (struct lm_info): Rename to ...
6739 (struct lm_info_windows): ... this. Extend lm_info_base.
6740 (windows_make_so, handle_load_dll, handle_unload_dll,
6741 windows_xfer_shared_libraries): Adjust.
6742
6743 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6744
6745 * solib-darwin.c (struct darwin_so_list): Remove.
6746 (darwin_current_sos): Allocate an so_list object instead of a
6747 darwin_so_list, separately allocate an lm_info object.
6748 (darwin_free_so): Free lm_info.
6749
6750 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6751
6752 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6753 with fprintf_filtered.
6754
6755 2017-04-28 Yao Qi <yao.qi@linaro.org>
6756
6757 * regcache.c (regcache::regcache): New function.
6758 (regcache::~regcache): New function.
6759 (regcache_xmalloc_1): Remove.
6760 (regcache_xmalloc): Call new regcache.
6761 (regcache_xfree): Call delete regcache.
6762 (get_thread_arch_aspace_regcache): Call new regcache.
6763
6764 2017-04-28 Yao Qi <yao.qi@linaro.org>
6765
6766 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6767 lwp instead of ptid_get_lwp.
6768
6769 2017-04-28 Yao Qi <yao.qi@linaro.org>
6770
6771 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6772 lwp_info instead of getting from inferior_ptid.
6773
6774 2017-04-27 Keith Seitz <keiths@redhat.com>
6775
6776 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6777 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6778 (CV_CONVERSION_BADNESS): Define.
6779 (rank_one_type): Remove overly restrictive rvalue reference
6780 rank checks.
6781 Add cv-qualifier checks and subranks for type equality.
6782 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6783 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6784 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6785
6786 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6787
6788 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6789 count when creating the object.
6790
6791 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6792 Ulrich Weigand <uweigand@de.ibm.com>
6793
6794 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6795 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6796 is used in AIX.
6797 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6798 (process_xcoff_symbol): Likewise.
6799 (scan_xcoff_symtab): Likewise.
6800
6801 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6802
6803 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6804 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6805 (ia64_access_reg): Use get_frame_register_unsigned.
6806 (ia64_access_rse_reg): Likewise.
6807 (ia64_libunwind_frame_prev_register): Likewise.
6808
6809 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6810
6811 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6812 * gdbarch.c: Regenerated.
6813 * gdbarch.h: Regenerated.
6814 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6815 visibility external.
6816 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6817 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6818 (enum cfa_how_kind): Move to ...
6819 (struct dwarf2_frame_state_reg_info): Likewise.
6820 (struct dwarf2_frame_state): Likewise.
6821 * dwarf2-frame.h: ... here.
6822 (dwarf2_frame_state_alloc_regs): New declaration.
6823 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6824 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6825
6826 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6827
6828 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6829 regcache_raw_read_unsigned.
6830 (xtensa_pseudo_register_write): Likewise.
6831
6832 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6833
6834 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6835 (nds32_pseudo_register_write): Likewise.
6836
6837 2017-04-25 Yao Qi <yao.qi@linaro.org>
6838
6839 * regcache.c (struct regcache) <readonly_p>: Change its type
6840 to bool.
6841 (regcache_xmalloc_1): Update parameter type and callers update.
6842
6843 2017-04-25 Yao Qi <yao.qi@linaro.org>
6844
6845 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6846 set_gdbarch_wchar_bit.
6847 * arm-tdep.c (arm_gdbarch_init): Likewise.
6848
6849 2017-04-25 Pedro Alves <palves@redhat.com>
6850
6851 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6852 (BothAreRelocatable, memcopy, memmove): Don't define.
6853 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6854 macros.
6855
6856 2017-04-25 Pedro Alves <palves@redhat.com>
6857
6858 * common/common-defs.h: Include "common/poison.h".
6859 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6860 and adjust.
6861 * common/poison.h: New file.
6862 * common/traits.h: Include <type_traits>.
6863 (Not, Or, Requires): New, moved from common/function-view.h.
6864
6865 2017-04-25 Pedro Alves <palves@redhat.com>
6866
6867 * breakpoint.h (struct breakpoint): In-class initialize all
6868 fields. Make boolean fields "bool".
6869 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6870 memset call and initializations no longer necessary.
6871
6872 2017-04-25 Pedro Alves <palves@redhat.com>
6873
6874 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6875 reference.
6876 (pt_btrace_insn): New function.
6877 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6878
6879 2017-04-25 Pedro Alves <palves@redhat.com>
6880
6881 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6882 "base" field and inherit from "bp_location" instead. Add
6883 non-default ctor.
6884 (allocate_location_exception): Use new non-default ctor.
6885 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6886 (init_bp_location): Convert to ...
6887 (bp_location::bp_location): ... this new ctor, and remove memset
6888 call.
6889 (base_breakpoint_allocate_location): Use the new non-default ctor.
6890 * breakpoint.h (bp_location): Now a class. Declare default and
6891 non-default ctors. In-class initialize all members.
6892 (init_bp_location): Remove declaration.
6893
6894 2017-04-25 Pedro Alves <palves@redhat.com>
6895
6896 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6897 assignment operator.
6898
6899 2017-04-24 Yao Qi <yao.qi@linaro.org>
6900
6901 * doublest.c (convert_doublest_to_floatformat): Call
6902 floatformat_totalsize_bytes.
6903
6904 2017-04-22 Tom Tromey <tom@tromey.com>
6905
6906 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6907 ui_out_emit_list.
6908 * stack.c (print_frame): Use ui_out_emit_list.
6909 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6910 ui_out_emit_list.
6911 * mi/mi-main.c (print_one_inferior)
6912 (mi_cmd_data_list_register_names)
6913 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6914 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6915 ui_out_emit_list.
6916 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6917 (mi_output_solib_attribs): Use ui_out_emit_list,
6918 ui_out_emit_tuple.
6919 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6920 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6921 (mi_cmd_stack_list_args, list_args_or_locals): Use
6922 ui_out_emit_list.
6923 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6924 * breakpoint.c (print_solib_event, output_thread_groups): Use
6925 ui_out_emit_list.
6926
6927 2017-04-22 Tom Tromey <tom@tromey.com>
6928
6929 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6930 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6931 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6932
6933 2017-04-22 Tom Tromey <tom@tromey.com>
6934
6935 * tracepoint.c (tvariables_info_1)
6936 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6937
6938 2017-04-22 Tom Tromey <tom@tromey.com>
6939
6940 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6941 annotate_arg_emitter.
6942 * breakpoint.c (print_mention_watchpoint)
6943 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6944 * annotate.h (struct annotate_arg_emitter): New.
6945
6946 2017-04-22 Tom Tromey <tom@tromey.com>
6947
6948 * record-btrace.c (record_btrace_insn_history)
6949 (record_btrace_insn_history_range, record_btrace_call_history)
6950 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6951 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6952 ui_out_emit_tuple.
6953 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6954 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6955 * skip.c (skip_info): Use ui_out_emit_tuple.
6956 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6957 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6958 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6959 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6960 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6961 ui_out_emit_tuple.
6962 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6963 (output_register, mi_cmd_data_read_memory)
6964 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6965 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6966 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6967 Use ui_out_emit_tuple.
6968 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6969 ui_out_emit_tuple.
6970 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6971 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6972 * linux-thread-db.c (info_auto_load_libthread_db): Use
6973 ui_out_emit_tuple.
6974 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6975 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6976 * disasm.c (do_mixed_source_and_assembly_deprecated)
6977 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6978 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6979 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6980 * breakpoint.c (print_one_breakpoint_location)
6981 (print_one_breakpoint): Use ui_out_emit_tuple.
6982 * auto-load.c (print_script, info_auto_load_cmd): Use
6983 ui_out_emit_tuple.
6984 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6985
6986 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6987
6988 * thread.c (print_thread_info_1): Remove dead code.
6989
6990 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6991
6992 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6993 GDB_SELF_TEST.
6994 * arm-tdep.c (selftests::arm_record_test): Likewise.
6995
6996 2017-04-21 Yao Qi <yao.qi@linaro.org>
6997
6998 * regcache.c (regcache_restore): Remove argument 2. Replace
6999 argument 3 with regcache. Get register status from
7000 src->register_status and get register contents from
7001 register_buffer (src, regnum).
7002 (regcache_cpy): Update.
7003
7004 2017-04-19 Pedro Alves <palves@redhat.com>
7005
7006 * gdbthread.h (thread): Add missing closing parenthesis in
7007 comment.
7008
7009 2017-04-19 Pedro Alves <palves@redhat.com>
7010
7011 * common/refcounted-object.h: New file.
7012 * gdbthread.h: Include "common/refcounted-object.h".
7013 (thread_info): Inherit from refcounted_object and add comments.
7014 (thread_info::incref, thread_info::decref)
7015 (thread_info::m_refcount): Delete.
7016 (thread_info::deletable): Use the refcounted_object::refcount()
7017 method.
7018 * inferior.c (current_inferior_): Add comment.
7019 (set_current_inferior): Increment/decrement refcounts.
7020 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7021 not-deletable instead of comparing with the current inferior.
7022 (initialize_inferiors): Increment the initial inferior's refcount.
7023 * inferior.h (struct inferior): Forward declare.
7024 Include "common/refcounted-object.h".
7025 (current_inferior, set_current_inferior): Move declaration to
7026 before struct inferior's definition, and fix comment.
7027 (inferior): Inherit from refcounted_object. Add comments.
7028 * thread.c (switch_to_thread_no_regs): Reference the thread's
7029 inferior pointer directly instead of doing a ptid lookup.
7030 (switch_to_no_thread): New function.
7031 (switch_to_thread(thread_info *)): New function, factored out
7032 from ...
7033 (switch_to_thread(ptid_t)): ... this.
7034 (restore_current_thread): Delete.
7035 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7036 fields, and add 'inf' field.
7037 (do_restore_current_thread_cleanup): Check whether old->inf is
7038 alive instead of looking up an inferior by ptid. Use
7039 switch_to_thread and switch_to_no_thread.
7040 (restore_current_thread_cleanup_dtor): Use old->inf directly
7041 instead of lookup up an inferior by id. Decref the inferior.
7042 Don't restore 'removable'.
7043 (make_cleanup_restore_current_thread): Same the inferior pointer
7044 in old, instead of the inferior number. Incref the inferior.
7045 Don't save/clear 'removable'.
7046
7047 2017-04-19 Pedro Alves <palves@redhat.com>
7048
7049 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7050 unittests/scoped_restore-selftests.c.
7051 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7052 * common/scoped_restore.h (scoped_restore_base): Make "class".
7053 (scoped_restore_base::release): New public method.
7054 (scoped_restore_base::scoped_restore_base): New protected ctor.
7055 (scoped_restore_base::m_saved_var): New protected field.
7056 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7057 scoped_restore_base base class instead of m_saved_var directly.
7058 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7059 (scoped_restore_tmpl::scoped_restore_tmpl(const
7060 scoped_restore_tmpl<T>&)): Likewise.
7061 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7062 method.
7063 (scoped_restore_tmpl::saved_var): New method.
7064 (scoped_restore_tmpl::m_saved_var): Delete.
7065 * inferior.h (inferior::detaching): Now a bool.
7066 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7067 cleanup.
7068 * unittests/scoped_restore-selftests.c: New file.
7069
7070 2017-04-19 Pedro Alves <palves@redhat.com>
7071
7072 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7073 Re-sort in alphabetic order.
7074
7075 2017-04-18 Pedro Alves <palves@redhat.com>
7076
7077 * xml-support.c (obstack_xml_printf): Delete.
7078 * xml-support.h (obstack_xml_printf): Delete.
7079
7080 2017-04-18 Pedro Alves <palves@redhat.com>
7081
7082 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7083 vdebug, verror, body_text, start_element, end_element, name,
7084 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7085 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7086 is_xinclude>: Make private and add m_ prefix.
7087 (gdb_xml_parser::body_text): New method, based on ...
7088 (gdb_xml_body_text): ... this. Adjust.
7089 (gdb_xml_parser::vdebug): New method, based on ...
7090 (gdb_xml_debug): ... this. Adjust.
7091 (gdb_xml_parser::verror): New method, based on ...
7092 (gdb_xml_error): ... this. Adjust.
7093 (gdb_xml_parser::start_element): New method, based on ...
7094 (gdb_xml_start_element): ... this. Adjust.
7095 (gdb_xml_start_element_wrapper): Defer to
7096 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7097 (gdb_xml_parser::end_element): New method, based on ...
7098 (gdb_xml_end_element_wrapper): ... this. Adjust.
7099 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7100 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7101 (gdb_xml_parser::use_dtd): New method, based on ...
7102 (gdb_xml_use_dtd): ... this. Adjust.
7103 (gdb_xml_parser::parse): New method, based on ...
7104 (gdb_xml_parse): ... this. Adjust.
7105 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7106 (xinclude_start_include): Adjust to call the parser's name method.
7107 (xml_xinclude_default, xml_xinclude_start_doctype)
7108 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7109 method.
7110 (xml_process_xincludes): Adjust to call parser methods.
7111 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7112 declarations.
7113
7114 2017-04-18 Pedro Alves <palves@redhat.com>
7115
7116 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7117 gdb::optional<std::string>.
7118 * xml-support.c: Include <string>.
7119 (scope_level::scope_level(scope_level &&))
7120 (scope_level::~scope_level): Delete.
7121 (scope_level::body): Now a std::string.
7122 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7123 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7124 parameter.
7125 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7126 (xinclude_parsing_data::output): Now a std::string reference.
7127 (xinclude_start_include): Adjust.
7128 (xml_xinclude_default): Adjust.
7129 (xml_process_xincludes): Add 'output' parameter, and return bool.
7130 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7131 and return bool.
7132 * xml-tdesc.c: Include <unordered_map> and <string>.
7133 (tdesc_xml_cache): Delete.
7134 (tdesc_xml_cache_s): Delete.
7135 (xml_cache): Now an std::unordered_map.
7136 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7137 (target_fetch_description_xml): Change return type to
7138 gdb::optional<std::string>, and adjust.
7139 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7140 (target_fetch_description_xml): Change return type to
7141 gdb::optional<std::string>.
7142
7143 2017-04-18 Pedro Alves <palves@redhat.com>
7144
7145 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7146 unittests/optional-selftests.c.
7147 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7148 * unittests/optional-selftests.c: New file.
7149 * unittests/optional/assignment/1.cc: New file.
7150 * unittests/optional/assignment/2.cc: New file.
7151 * unittests/optional/assignment/3.cc: New file.
7152 * unittests/optional/assignment/4.cc: New file.
7153 * unittests/optional/assignment/5.cc: New file.
7154 * unittests/optional/assignment/6.cc: New file.
7155 * unittests/optional/assignment/7.cc: New file.
7156 * unittests/optional/cons/copy.cc: New file.
7157 * unittests/optional/cons/default.cc: New file.
7158 * unittests/optional/cons/move.cc: New file.
7159 * unittests/optional/cons/value.cc: New file.
7160 * unittests/optional/in_place.cc: New file.
7161 * unittests/optional/observers/1.cc: New file.
7162 * unittests/optional/observers/2.cc: New file.
7163
7164 2017-04-18 Pedro Alves <palves@redhat.com>
7165
7166 * common/gdb_optional.h: Include common/traits.h.
7167 (in_place_t): New type.
7168 (in_place): New constexpr variable.
7169 (optional::optional): Remove member initialization of
7170 m_instantiated.
7171 (optional::optional(in_place_t...)): New constructor.
7172 (optional::~optional): Use reset.
7173 (optional::optional(const optional&)): New.
7174 (optional::optional(const optional&&)): New.
7175 (optional::optional(T &)): New.
7176 (optional::optional(T &&)): New.
7177 (operator::operator=(const optional &)): New.
7178 (operator::operator=(optional &&)): New.
7179 (operator::operator= (const T &))
7180 (operator::operator= (T &&))
7181 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7182 (operator::reset): New.
7183 (operator::m_instantiated):: Add in-class initializer.
7184 * common/traits.h: Include <type_traits>.
7185 (struct And): New types.
7186
7187 2017-04-18 Pedro Alves <palves@redhat.com>
7188
7189 * xml-support.c: Include <vector>.
7190 (scope_level::scope_level(const gdb_xml_element *))
7191 (scope_level::scope_level(scope_level&&)): New.
7192 (scope_level::~scope_level): New.
7193 (scope_level_s): Delete.
7194 (gdb_xml_parser::scopes): Now a std::vector.
7195 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7196 Use std::vector.
7197 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7198 scope cleanup code.
7199 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7200 of the scopes member. Use std::vector::emplace_back.
7201
7202 2017-04-18 Pedro Alves <palves@redhat.com>
7203
7204 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7205 a bool.
7206 (gdb_xml_end_element): Change type of first parameter.
7207 (gdb_xml_cleanup): Rename to ...
7208 (gdb_xml_parser::~gdb_xml_parser): ... this.
7209 (gdb_xml_create_parser_and_cleanup): Delete with ...
7210 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7211 to this new ctor.
7212 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7213 using gdb_xml_create_parser_and_cleanup.
7214 (xinclude_parsing_data): Add ctor/dtor.
7215 (xml_xinclude_cleanup): Delete.
7216 (xml_process_xincludes): Create a local xinclude_parsing_data
7217 instead of heap-allocating one. Create a local gdb_xml_parser
7218 instead of heap-allocating one with
7219 gdb_xml_create_parser_and_cleanup.
7220
7221 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7222
7223 PR threads/20743
7224 * fbsd-nat.c (resume_one_thread_cb): Remove.
7225 (resume_all_threads_cb): Remove.
7226 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7227 iterate_over_threads.
7228
7229 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7230
7231 * NEWS: Create a new section for the next release branch.
7232 Rename the section of the current branch, now that it has
7233 been cut.
7234
7235 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7236
7237 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7238 * version.in: Bump version to 8.0.50.DATE-git.
7239
7240 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7241
7242 PR gdb/21385
7243 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7244 independently of the host, and fix build breakage on Cygwin.
7245
7246 2017-04-13 Pedro Alves <palves@redhat.com>
7247
7248 * inferior.c (free_inferior): Convert to ...
7249 (inferior::~inferior): ... this dtor.
7250 (inferior::inferior): New ctor, factored out from ...
7251 (add_inferior_silent): ... here. Allocate the inferior with a new
7252 expression.
7253 (delete_inferior): Call delete instead of free_inferior.
7254 * inferior.h (gdb_environ, continuation): Forward declare.
7255 (inferior): Now a class. Add in-class initialization to all
7256 members. Make boolean fields bool, except 'detaching'.
7257 (inferior::inferior): New explicit ctor.
7258 (inferior::~inferior): New.
7259
7260 2017-04-13 Pedro Alves <palves@redhat.com>
7261
7262 * inferior.c (init_inferior_list): Delete.
7263 * inferior.h (init_inferior_list): Delete.
7264
7265 2017-04-13 Pedro Alves <palves@redhat.com>
7266
7267 PR threads/13217
7268 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7269 (top level): Call it twice, with different thread sets.
7270
7271 2017-04-13 Pedro Alves <palves@redhat.com>
7272
7273 * thread.c: Include <algorithm>.
7274 (thread_array_cleanup): Delete.
7275 (scoped_inc_dec_ref): New class.
7276 (live_threads_count): New function.
7277 (set_thread_refcount): Delete.
7278 (tp_array_compar_ascending): Now a bool.
7279 (tp_array_compar): Convert to a std::sort comparison function.
7280 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7281 and live_threads_count.
7282
7283 2017-04-13 Pedro Alves <palves@redhat.com>
7284
7285 * infrun.c (follow_fork_inferior): Also switch the current
7286 inferior.
7287
7288 2017-04-13 Pedro Alves <palves@redhat.com>
7289
7290 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7291 before calling create_internal_breakpoint.
7292
7293 2017-04-13 Pedro Alves <palves@redhat.com>
7294
7295 * fork-child.c (execv_argv): New class.
7296 (breakup_args): Refactored as ...
7297 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7298 Copy arguments to storage and replace separators with NULL
7299 terminators in place.
7300 (escape_bang_in_quoted_argument): Adjust to return bool.
7301 (execv_argv::execv_argv): New ctor.
7302 (execv_argv::init_for_shell): New method, factored out from
7303 fork_inferior. Don't strdup strings into the vector.
7304 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7305 Remove free_vector_argv call.
7306
7307 2017-04-13 Yao Qi <yao.qi@linaro.org>
7308
7309 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7310 tdep->rx_psw_type.
7311
7312 2017-04-13 Yao Qi <yao.qi@linaro.org>
7313
7314 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7315 * rx-tdep.c (rx_gdbarch_init): Likewise.
7316
7317 2017-04-13 Pedro Alves <palves@redhat.com>
7318
7319 * breakpoint.h (struct breakpoint): Reindent.
7320
7321 2017-04-13 Pedro Alves <palves@redhat.com>
7322
7323 * breakpoint.c (bp_location): Rename to ...
7324 (bp_locations): ... this. All references updated.
7325 (bp_location_count): Rename to ...
7326 (bp_locations_count): ... this. All references updated.
7327 (bp_location_placed_address_before_address_max): Rename to ...
7328 (bp_locations_placed_address_before_address_max): ... this. All
7329 references updated.
7330 (bp_location_shadow_len_after_address_max): Rename to ...
7331 (bp_locations_shadow_len_after_address_max): ... this. All
7332 references updated.
7333 (bp_location_compare_addrs): Rename to ...
7334 (bp_locations_compare_addrs): ... this. All references updated.
7335 (bp_location_compare):Rename to ...
7336 (bp_locations_compare): ... this. All references updated.
7337 (bp_location_target_extensions_update): Rename to ...
7338 (bp_locations_target_extensions_update): ... this. All references
7339 updated.
7340
7341 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7342
7343 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7344 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7345 'sgtty.h'.
7346 * common/gdb_termios.h: New file, with parts of "terminal.h".
7347 * inflow.c: Include "gdb_termios.h".
7348 * ser-unix.c: Include "gdb_termios.h".
7349 * terminal.h: Move terminal-related defines to
7350 "common/gdb_termios.h".
7351
7352 2017-04-12 Tom Tromey <tom@tromey.com>
7353
7354 * probe.c (parse_probes): Update.
7355 * location.h (delete_event_location): Don't declare.
7356 (event_location_deleter::operator()): Update.
7357 * location.c (event_location_deleter::operator()): Rename from
7358 delete_event_location.
7359 * linespec.h (linespec_result) <location>: Change type to
7360 event_location_up.
7361 * linespec.c (canonicalize_linespec, event_location_to_sals)
7362 (decode_objc): Update.
7363 (linespec_result): Don't call delete_event_location.
7364 * breakpoint.c (create_breakpoints_sal)
7365 (bkpt_probe_create_sals_from_location)
7366 (strace_marker_create_sals_from_location): Update.
7367
7368 2017-04-12 Tom Tromey <tom@tromey.com>
7369
7370 * linespec.h (struct linespec_result): Add constructor and
7371 destructor.
7372 (init_linespec_result, destroy_linespec_result)
7373 (make_cleanup_destroy_linespec_result): Don't declare.
7374 * linespec.c (init_linespec_result): Remove.
7375 (linespec_result::~linespec_result): Rename from
7376 destroy_linespec_result. Update.
7377 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7378 Remove.
7379 * breakpoint.c (create_breakpoint, break_range_command)
7380 (decode_location_default): Update.
7381 * ax-gdb.c (agent_command_1): Update.
7382
7383 2017-04-12 Tom Tromey <tom@tromey.com>
7384
7385 * remote.c (remote_download_tracepoint): Update.
7386 * python/py-breakpoint.c (bppy_get_location): Update.
7387 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7388 (gdbscm_breakpoint_location): Update.
7389 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7390 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7391 Change type to event_location_up.
7392 * breakpoint.c (create_overlay_event_breakpoint)
7393 (create_longjmp_master_breakpoint)
7394 (create_std_terminate_master_breakpoint)
7395 (create_exception_master_breakpoint)
7396 (breakpoint_event_location_empty_p, print_breakpoint_location)
7397 (print_one_breakpoint_location, create_thread_event_breakpoint)
7398 (init_breakpoint_sal, create_breakpoint)
7399 (print_recreate_ranged_breakpoint, break_range_command)
7400 (init_ada_exception_breakpoint, say_where): Update.
7401 (base_breakpoint_dtor): Don't call delete_event_location.
7402 (bkpt_print_recreate, tracepoint_print_recreate)
7403 (dprintf_print_recreate, update_static_tracepoint)
7404 (breakpoint_re_set_default): Update.
7405
7406 2017-04-12 Tom Tromey <tom@tromey.com>
7407
7408 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7409 type of "to_do". Update.
7410 (compute_stack_depth): Use std::vector.
7411
7412 2017-04-12 Tom Tromey <tom@tromey.com>
7413
7414 * printcmd.c (find_instruction_backward): Use std::vector.
7415
7416 2017-04-12 Tom Tromey <tom@tromey.com>
7417
7418 * symfile.c (objfilep): Remove typedef.
7419 (reread_symbols): Use a std::vector.
7420
7421 2017-04-12 Tom Tromey <tom@tromey.com>
7422
7423 * mi/mi-main.c (exec_direction_forward): Remove.
7424 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7425 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7426 scoped_restore.
7427 * guile/guile.c (guile_repl_command, guile_command)
7428 (gdbscm_execute_gdb_command): Use scoped_restore.
7429 * go-exp.y (go_parse): Use scoped_restore.
7430 * d-exp.y (d_parse): Use scoped_restore.
7431 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7432 * c-exp.y (c_parse): Use scoped_restore.
7433
7434 2017-04-12 Tom Tromey <tom@tromey.com>
7435
7436 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7437 (mi_parse): Update return type.
7438 (mi_parse_free): Remove.
7439 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7440 (mi_parse::~mi_parse): Rename from mi_parse_free.
7441 (mi_parse_cleanup): Remove.
7442 (mi_parse): Return a unique_ptr. Use new.
7443 * mi/mi-main.c (mi_execute_command): Update.
7444
7445 2017-04-12 Tom Tromey <tom@tromey.com>
7446
7447 * location.c (explicit_location_lex_one): Return a
7448 unique_xmalloc_ptr.
7449 (string_to_explicit_location): Update. Remove cleanups.
7450
7451 2017-04-12 Tom Tromey <tom@tromey.com>
7452
7453 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7454 (compare_value_and_voffset): Change type. Update.
7455 (compute_vtable_size): Change type of "offset_vec".
7456 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7457 (gnuv3_get_typeid): Remove extraneous declaration.
7458
7459 2017-04-12 Tom Tromey <tom@tromey.com>
7460
7461 * charset.h (wchar_iterator): Fix comment.
7462
7463 2017-04-12 Tom Tromey <tom@tromey.com>
7464
7465 * charset.c (iconv_wrapper): New class.
7466 (cleanup_iconv): Remove.
7467 (convert_between_encodings): Use it.
7468
7469 2017-04-12 Tom Tromey <tom@tromey.com>
7470
7471 * symfile.h (increment_reading_symtab): Update type.
7472 * symfile.c (decrement_reading_symtab): Remove.
7473 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7474 * psymtab.c (psymtab_to_symtab): Update.
7475 * dwarf2read.c (dw2_instantiate_symtab): Update.
7476
7477 2017-04-12 Tom Tromey <tom@tromey.com>
7478
7479 * jit.c (struct jit_reader): Declare separately. Add constructor
7480 and destructor. Change type of "handle".
7481 (loaded_jit_reader): Define separately.
7482 (jit_reader_load): Update. New "new".
7483 (jit_reader_unload_command): Use "delete".
7484 * gdb-dlfcn.h (struct dlclose_deleter): New.
7485 (gdb_dlhandle_up): New typedef.
7486 (gdb_dlopen, gdb_dlsym): Update types.
7487 (gdb_dlclose): Remove.
7488 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7489 (gdb_dlsym): Change type of "handle".
7490 (make_cleanup_dlclose): Remove.
7491 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7492 * compile/compile-c-support.c (load_libcc): Update.
7493
7494 2017-04-12 Tom Tromey <tom@tromey.com>
7495
7496 * symtab.h (find_pcs_for_symtab_line): Change return type.
7497 * symtab.c (find_pcs_for_symtab_line): Change return type.
7498 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7499 type of "vec". Update.
7500 (ltpy_get_pcs_for_line): Update.
7501 * linespec.c (decode_digits_ordinary): Update.
7502
7503 2017-04-12 Tom Tromey <tom@tromey.com>
7504
7505 * tracepoint.c (actions_command): Update.
7506 * python/python.c (python_command, python_interactive_command):
7507 Update.
7508 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7509 * guile/guile.c (guile_command): Update.
7510 * defs.h (read_command_lines, read_command_lines_1): Return
7511 command_line_up.
7512 (command_lines_deleter): New struct.
7513 (command_line_up): New typedef.
7514 * compile/compile.c (compile_code_command)
7515 (compile_print_command): Update.
7516 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7517 command_line_up.
7518 (make_cleanup_free_command_lines): Remove.
7519 * cli/cli-script.c (get_command_line, read_command_lines_1)
7520 (copy_command_lines): Return command_line_up.
7521 (while_command, if_command, read_command_lines, define_command)
7522 (document_command): Update.
7523 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7524 Remove.
7525 * breakpoint.h (breakpoint_set_commands): Change type of
7526 "commands".
7527 * breakpoint.c (breakpoint_set_commands): Change type of
7528 "commands". Update.
7529 (do_map_commands_command, update_dprintf_command_list)
7530 (create_tracepoint_from_upload): Update.
7531
7532 2017-04-12 Tom Tromey <tom@tromey.com>
7533
7534 * tracepoint.c (scope_info): Update.
7535 * spu-tdep.c (spu_catch_start): Update.
7536 * python/python.c (gdbpy_decode_line): Update.
7537 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7538 * python/py-breakpoint.c (bppy_init): Update.
7539 * probe.c (parse_probes): Update.
7540 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7541 * location.h (event_location_deleter): New struct.
7542 (event_location_up): New typedef.
7543 (new_linespec_location, new_address_location, new_probe_location)
7544 (new_explicit_location, copy_event_location)
7545 (string_to_event_location, string_to_event_location_basic)
7546 (string_to_explicit_location): Update return type.
7547 (make_cleanup_delete_event_location): Remove.
7548 * location.c (new_linespec_location, new_address_location)
7549 (new_probe_location, new_explicit_location, copy_event_location):
7550 Return event_location_up.
7551 (delete_event_location_cleanup)
7552 (make_cleanup_delete_event_location): Remove.
7553 (string_to_explicit_location, string_to_event_location_basic)
7554 (string_to_event_location): Return event_location_up.
7555 * linespec.c (canonicalize_linespec, event_location_to_sals)
7556 (decode_line_with_current_source)
7557 (decode_line_with_last_displayed, decode_objc): Update.
7558 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7559 * completer.c (location_completer): Update.
7560 * cli/cli-cmds.c (edit_command, list_command): Update.
7561 * breakpoint.c (create_overlay_event_breakpoint)
7562 (create_longjmp_master_breakpoint)
7563 (create_std_terminate_master_breakpoint)
7564 (create_exception_master_breakpoint)
7565 (create_thread_event_breakpoint): Update.
7566 (init_breakpoint_sal): Update. Remove some dead code.
7567 (create_breakpoint_sal): Change type of "location". Update.
7568 (create_breakpoints_sal, create_breakpoint, break_command_1)
7569 (dprintf_command, break_range_command, until_break_command)
7570 (init_ada_exception_breakpoint)
7571 (strace_marker_create_sals_from_location)
7572 (update_static_tracepoint, trace_command, ftrace_command)
7573 (strace_command, create_tracepoint_from_upload): Update.
7574 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7575 * ax-gdb.c (agent_command_1): Update.
7576
7577 2017-04-12 Pedro Alves <palves@redhat.com>
7578
7579 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7580 * configure.tgt: Handle i[34567]86-*-go32* and
7581 i[34567]86-*-msdosdjgpp*.
7582 * i386-tdep.c (i386_svr4_reg_to_regnum):
7583 Make extern.
7584 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7585 i386-go32-tdep.c.
7586 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7587 * i386-go32-tdep.c: New file.
7588 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7589 declarations.
7590
7591 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7592
7593 * aix-thread.c (pd_status2str): Change return type to const char *.
7594
7595 2017-04-12 Pedro Alves <palves@redhat.com>
7596
7597 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7598 calls to set_gdbarch_gnu_triplet_regexp.
7599
7600 2017-04-12 Pedro Alves <palves@redhat.com>
7601
7602 PR gdb/21323
7603 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7604 New enum value.
7605 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7606 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7607 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7608 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7609 * gdbarch.h, gdbarch.c: Regenerate.
7610 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7611 gdbarch_wchar_bit and gdbarch_wchar_signed.
7612 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7613 * arm-tdep.c (arm_gdbarch_init): Likewise.
7614 * avr-tdep.c (avr_gdbarch_init): Likewise.
7615 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7616 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7617 * i386-tdep.c (i386_go32_init_abi): Likewise.
7618 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7619 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7620 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7621 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7622 * sh-tdep.c (sh_gdbarch_init): Likewise.
7623 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7624 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7625 * windows-tdep.c (windows_init_abi): Likewise.
7626 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7627
7628 2017-04-12 Pedro Alves <palves@redhat.com>
7629
7630 PR c++/21323
7631 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7632 cplus_primitive_type_char32_t>: New enum values.
7633 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7634 and cplus_primitive_type_char32_t.
7635 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7636 32, use the archtecture's built-in type for char16_t and char32_t,
7637 respectively. Otherwise, fallback to init_integer_type as before,
7638 but make the type unsigned, and issue a complaint.
7639 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7640
7641 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7642
7643 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7644 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7645
7646 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7647
7648 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7649 'const char *'.
7650
7651 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7652
7653 * common/common-utils.c (free_vector_argv): New function.
7654 * common/common-utils.h: Include <vector>.
7655 (free_vector_argv): New prototype.
7656 * darwin-nat.c (darwin_create_inferior): Rewrite function
7657 prototype in order to constify "exec_file" and accept a
7658 "std::string" for "allargs".
7659 * fork-child.c: Include <vector>.
7660 (breakup_args): Rewrite function, using C++.
7661 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7662 and accept "std::string" for "allargs". Update the code to
7663 calculate "argv" based on "allargs". Update calls to "exec_fun"
7664 and "execvp".
7665 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7666 order to constify "exec_file" and accept a "std::string" for
7667 "allargs".
7668 * go32-nat.c (go32_create_inferior): Likewise.
7669 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7670 * infcmd.c (run_command_1): Constify "exec_file". Use
7671 "std::string" for inferior arguments.
7672 * inferior.h (fork_inferior): Update prototype.
7673 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7674 prototype in order to constify "exec_file" and accept a
7675 "std::string" for "allargs".
7676 * nto-procfs.c (procfs_create_inferior): Likewise.
7677 * procfs.c (procfs_create_inferior): Likewise.
7678 * remote-sim.c (gdbsim_create_inferior): Likewise.
7679 * remote.c (extended_remote_run): Update code to accept
7680 "std::string" as argument.
7681 (extended_remote_create_inferior): Rewrite function prototype in
7682 order to constify "exec_file" and accept a "std::string" for
7683 "allargs".
7684 * rs6000-nat.c (super_create_inferior): Likewise.
7685 (rs6000_create_inferior): Likewise.
7686 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7687 * windows-nat.c (windows_create_inferior): Likewise.
7688
7689 2017-04-11 Pedro Alves <palves@redhat.com>
7690
7691 * thread.c: Fix whitespace throughout.
7692
7693 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7694
7695 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7696
7697 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7698
7699 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7700
7701 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7702
7703 PR gdb/21364
7704 * osdata.c (info_osdata): Check if 'type' is an empty string
7705 instead of NULL.
7706
7707 2017-04-10 Pedro Alves <palves@redhat.com>
7708
7709 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7710 (ptid_to_global_thread_id, in_thread_list)
7711 (do_captured_list_thread_ids, set_resumed, set_running)
7712 (set_executing, set_stop_requested, finish_thread_state)
7713 (validate_registers_access, can_access_registers_ptid)
7714 (print_thread_info_1, switch_to_thread)
7715 (do_restore_current_thread_cleanup)
7716 (make_cleanup_restore_current_thread, thread_command)
7717 (thread_name_command): Use operator== instead of ptid_equal.
7718
7719 2017-04-10 Pedro Alves <palves@redhat.com>
7720
7721 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7722 (current_thread_cleanup_chain): Delete.
7723 (restore_current_thread_cleanup_dtor)
7724 (make_cleanup_restore_current_thread): Remove references to
7725 current_thread_cleanup_chain.
7726
7727 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7728
7729 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7730 REG_UNKNOWN.
7731
7732 2017-04-10 Yao Qi <yao.qi@linaro.org>
7733
7734 PR gdb/19942
7735 * gdbthread.h (thread_info::deletable): New method.
7736 (thread_info::incref): New method.
7737 (thread_info::decref): New method.
7738 (thread_info::refcount): Move it to private.
7739 * infrun.c (save_stop_context): Call inc_refcount.
7740 (release_stop_context_cleanup): Likewise.
7741 * thread.c (set_thread_exited): New function.
7742 (init_thread_list): Delete "tp" only it is deletable, otherwise
7743 call set_thread_exited.
7744 (delete_thread_1): Call set_thread_exited.
7745 (current_thread_cleanup) <inferior_pid>: Remove.
7746 <thread>: New field.
7747 (restore_current_thread_ptid_changed): Removed.
7748 (do_restore_current_thread_cleanup): Adjust.
7749 (restore_current_thread_cleanup_dtor): Don't call
7750 find_thread_ptid.
7751 (set_thread_refcount): Use dec_refcount.
7752 (make_cleanup_restore_current_thread): Adjust.
7753 (thread_apply_all_command): Call inc_refcount.
7754 (_initialize_thread): Don't call
7755 observer_attach_thread_ptid_changed.
7756
7757 2017-04-10 Yao Qi <yao.qi@linaro.org>
7758
7759 * thread.c (delete_thread_1): Hoist code on marking thread as
7760 exited.
7761
7762 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7763
7764 * windows-nat.c (windows_detach): Initialize ptid with
7765 minus_one_ptid.
7766
7767 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7768
7769 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7770
7771 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7772
7773 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7774 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7775 (bfin_pseudo_register_write): Likewise
7776
7777 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7778
7779 * common/ptid.h (struct ptid): Change to...
7780 (class ptid_t): ... this.
7781 <ptid_t>: New constructors.
7782 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7783 matches>: New methods.
7784 <make_null, make_minus_one>: New static methods.
7785 <pid>: Rename to...
7786 <m_pid>: ...this.
7787 <lwp>: Rename to...
7788 <m_lwp>: ...this.
7789 <tid>: Rename to...
7790 <m_tid>: ...this.
7791 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7792 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7793 as references, move comment to class ptid_t.
7794 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7795 ptid_t static methods.
7796 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7797 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7798 Take ptid arguments as references, implement using ptid_t methods.
7799 * unittests/ptid-selftests.c: New file.
7800 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7801 unittests/ptid-selftests.c.
7802 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7803
7804 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7805
7806 * python/python.c (python_run_simple_file): Cast mode literal to
7807 non-const char pointer as expected by PyFile_FromString.
7808
7809 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7810
7811 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7812 minus_one_ptid and null_ptid.
7813
7814 2017-04-05 Pedro Alves <palves@redhat.com>
7815
7816 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7817 * configure: Regenerate.
7818
7819 2017-04-05 Pedro Alves <palves@redhat.com>
7820
7821 * ada-exp.y (yyerror): Constify.
7822 * ada-lang.c (bound_name, get_selections)
7823 (ada_variant_discrim_type)
7824 (ada_variant_discrim_name, ada_value_struct_elt)
7825 (ada_lookup_struct_elt_type, is_unchecked_variant)
7826 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7827 (catch_ada_exception_command_split)
7828 (catch_ada_assert_command_split, catch_assert_command)
7829 (ada_op_name): Constify.
7830 * ada-lang.h (ada_yyerror, get_selections)
7831 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7832 * arc-tdep.c (arc_print_frame_cache): Constify.
7833 * arm-tdep.c (arm_skip_stub): Constify.
7834 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7835 (gen_aggregate_elt_ref): Constify.
7836 * bcache.c (print_bcache_statistics): Constify.
7837 * bcache.h (print_bcache_statistics): Constify.
7838 * break-catch-throw.c (catch_exception_command_1):
7839 * breakpoint.c (struct ep_type_description::description):
7840 Constify.
7841 (add_solib_catchpoint): Constify.
7842 (catch_fork_command_1): Add cast.
7843 (add_catch_command): Constify.
7844 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7845 Constify.
7846 * bsd-uthread.c (bsd_uthread_state): Constify.
7847 * buildsym.c (patch_subfile_names): Constify.
7848 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7849 Constify.
7850 * c-exp.y (yyerror): Constify.
7851 (token::oper): Constify.
7852 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7853 * c-varobj.c (cplus_describe_child): Constify.
7854 * charset.c (find_charset_names): Add cast.
7855 (find_charset_names): Constify array and add const_cast.
7856 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7857 (edit_command): Constify.
7858 * cli/cli-decode.c (lookup_cmd): Constify.
7859 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7860 Constify.
7861 (struct dump_context): Constify.
7862 (add_dump_command, restore_command): Constify.
7863 * cli/cli-script.c (get_command_line): Constify.
7864 * cli/cli-script.h (get_command_line): Constify.
7865 * cli/cli-utils.c (check_for_argument): Constify.
7866 * cli/cli-utils.h (check_for_argument): Constify.
7867 * coff-pe-read.c (struct read_pe_section_data): Constify.
7868 * command.h (lookup_cmd): Constify.
7869 * common/print-utils.c (decimal2str): Constify.
7870 * completer.c (gdb_print_filename): Constify.
7871 * corefile.c (set_gnutarget): Constify.
7872 * cp-name-parser.y (yyerror): Constify.
7873 * cp-valprint.c (cp_print_class_member): Constify.
7874 * cris-tdep.c (cris_register_name, crisv32_register_name):
7875 Constify.
7876 * d-exp.y (yyerror): Constify.
7877 (struct token::oper): Constify.
7878 * d-lang.h (d_yyerror): Constify.
7879 * dbxread.c (struct header_file_location::name): Constify.
7880 (add_old_header_file, add_new_header_file, last_function_name)
7881 (dbx_next_symbol_text, add_bincl_to_list)
7882 (find_corresponding_bincl_psymtab, set_namestring)
7883 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7884 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7885 * defs.h (command_line_input, print_address_symbolic)
7886 (deprecated_readline_begin_hook): Constify.
7887 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7888 Constify.
7889 * event-top.c (handle_line_of_input): Constify and add cast.
7890 * exceptions.c (catch_errors): Constify.
7891 * exceptions.h (catch_errors): Constify.
7892 * expprint.c (print_subexp_standard, op_string, op_name)
7893 (op_name_standard, dump_raw_expression, dump_raw_expression):
7894 * expression.h (op_name, op_string, dump_raw_expression):
7895 Constify.
7896 * f-exp.y (yyerror): Constify.
7897 (struct token::oper): Constify.
7898 (struct f77_boolean_val::name): Constify.
7899 * f-lang.c (f_word_break_characters): Constify.
7900 * f-lang.h (f_yyerror): Constify.
7901 * fork-child.c (fork_inferior): Add cast.
7902 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7903 (new_variant): Constify.
7904 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7905 * gdbarch.c: Regenerate.
7906 * gdbcore.h (set_gnutarget): Constify.
7907 * go-exp.y (yyerror): Constify.
7908 (token::oper): Constify.
7909 * go-lang.h (go_yyerror): Constify.
7910 * go32-nat.c (go32_sysinfo): Constify.
7911 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7912 * guile/scm-cmd.c (cmdscm_function): Constify.
7913 * guile/scm-param.c (pascm_param_value): Constify.
7914 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7915 (h8300sx_register_name): Constify.
7916 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7917 Constify.
7918 * ia64-tdep.c (ia64_register_names): Constify.
7919 * infcmd.c (construct_inferior_arguments): Constify.
7920 (path_command, attach_post_wait): Constify.
7921 * language.c (show_range_command, show_case_command)
7922 (unk_lang_error): Constify.
7923 * language.h (language_defn::la_error)
7924 (language_defn::la_name_of_this): Constify.
7925 * linespec.c (decode_line_2): Constify.
7926 * linux-thread-db.c (thread_db_err_str): Constify.
7927 * lm32-tdep.c (lm32_register_name): Constify.
7928 * m2-exp.y (yyerror): Constify.
7929 * m2-lang.h (m2_yyerror): Constify.
7930 * m32r-tdep.c (m32r_register_names): Constify and make static.
7931 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7932 * m88k-tdep.c (m88k_register_name): Constify.
7933 * macroexp.c (appendmem): Constify.
7934 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7935 (upgrade_type, parse_external, parse_partial_symbols)
7936 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7937 (new_symbol): Constify.
7938 * memattr.c (mem_info_command): Constify.
7939 * mep-tdep.c (register_name_from_keyword): Constify.
7940 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7941 Constify.
7942 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7943 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7944 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7945 cast.
7946 (mi_execute_async_cli_command): Constify.
7947 * mips-tdep.c (mips_register_name): Constify.
7948 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7949 (am33_register_name, am33_2_register_name)
7950 * moxie-tdep.c (moxie_register_names): Constify.
7951 * nat/linux-osdata.c (osdata_type): Constify fields.
7952 * nto-tdep.c (nto_parse_redirection): Constify.
7953 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7954 (lookup_child_selector): Constify.
7955 (objc_methcall::name): Constify.
7956 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7957 (lookup_struct_typedef): Constify.
7958 * objfiles.c (pc_in_section): Constify.
7959 * objfiles.h (pc_in_section): Constify.
7960 * p-exp.y (struct token::oper): Constify.
7961 (yyerror): Constify.
7962 * p-lang.h (pascal_yyerror): Constify.
7963 * parser-defs.h (op_name_standard): Constify.
7964 (op_print::string): Constify.
7965 (exp_descriptor::op_name): Constify.
7966 * printcmd.c (print_address_symbolic): Constify.
7967 * psymtab.c (print_partial_symbols): Constify.
7968 * python/py-breakpoint.c (stop_func): Constify.
7969 (bppy_get_expression): Constify.
7970 * python/py-cmd.c (cmdpy_completer::name): Constify.
7971 (cmdpy_function): Constify.
7972 * python/py-event.c (evpy_add_attribute)
7973 (gdbpy_initialize_event_generic): Constify.
7974 * python/py-event.h (evpy_add_attribute)
7975 (gdbpy_initialize_event_generic): Constify.
7976 * python/py-evts.c (add_new_registry): Constify.
7977 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7978 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7979 * python/py-inferior.c (get_buffer): Add cast.
7980 * python/py-param.c (parm_constant::name): Constify.
7981 * python/py-unwind.c (fprint_frame_id): Constify.
7982 * python/python.c (gdbpy_parameter_value): Constify.
7983 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7984 * remote.c (memory_packet_config::name): Constify.
7985 (show_packet_config_cmd, remote_write_bytes)
7986 (remote_buffer_add_string):
7987 * reverse.c (exec_reverse_once): Constify.
7988 * rs6000-tdep.c (variant::name, variant::description): Constify.
7989 * rust-exp.y (rustyyerror): Constify.
7990 * rust-lang.c (rust_op_name): Constify.
7991 * rust-lang.h (rustyyerror): Constify.
7992 * serial.h (serial_ops::name): Constify.
7993 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7994 (sh_sh3e_register_name, sh_sh2e_register_name)
7995 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7996 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7997 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7998 (sh_sh4al_dsp_register_name): Constify.
7999 * sh64-tdep.c (sh64_register_name): Constify.
8000 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8001 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8002 * stabsread.c (patch_block_stabs, read_type_number)
8003 (ref_map::stabs, ref_add, process_reference)
8004 (symbol_reference_defined, define_symbol, define_symbol)
8005 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8006 (read_one_struct_field, read_struct_fields, read_baseclasses)
8007 (read_tilde_fields, read_struct_type, read_array_type)
8008 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8009 (read_huge_number, read_range_type, read_args, common_block_start)
8010 (find_name_end): Constify.
8011 * stabsread.h (common_block_start, define_symbol)
8012 (process_one_symbol, symbol_reference_defined, ref_add):
8013 * symfile.c (get_section_index, add_symbol_file_command):
8014 * symfile.h (get_section_index): Constify.
8015 * target-descriptions.c (tdesc_type::name): Constify.
8016 (tdesc_free_type): Add cast.
8017 * target.c (find_default_run_target):
8018 (add_deprecated_target_alias, find_default_run_target)
8019 (target_announce_detach): Constify.
8020 (do_option): Constify.
8021 * target.h (add_deprecated_target_alias): Constify.
8022 * thread.c (print_thread_info_1): Constify.
8023 * top.c (deprecated_readline_begin_hook, command_line_input):
8024 Constify.
8025 (init_main): Add casts.
8026 * top.h (handle_line_of_input): Constify.
8027 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8028 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8029 (tfind_command): Rename to ...
8030 (tfind_command_1): ... this and constify.
8031 (tfind_command): New function.
8032 (tfind_end_command, tfind_start_command): Adjust.
8033 (encode_source_string): Constify.
8034 * tracepoint.h (encode_source_string): Constify.
8035 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8036 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8037 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8038 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8039 * tui/tui-win.c (parse_scrolling_args): Constify.
8040 * tui/tui-windata.c (tui_erase_data_content): Constify.
8041 * tui/tui-windata.h (tui_erase_data_content): Constify.
8042 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8043 * tui/tui.c (tui_enable): Add cast.
8044 * utils.c (defaulted_query): Constify.
8045 (init_page_info): Add cast.
8046 (puts_debug, subset_compare): Constify.
8047 * utils.h (subset_compare): Constify.
8048 * varobj.c (varobj_format_string): Constify.
8049 * varobj.h (varobj_format_string): Constify.
8050 * vax-tdep.c (vax_register_name): Constify.
8051 * windows-nat.c (windows_detach): Constify.
8052 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8053 * xml-support.c (gdb_xml_end_element): Constify.
8054 * xml-tdesc.c (tdesc_start_reg): Constify.
8055 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8056 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8057 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8058
8059 2017-04-05 Pedro Alves <palves@redhat.com>
8060
8061 * proc-api.c (struct trans): Constify.
8062 (procfs_note): Constify.
8063 * proc-events.c (struct trans, syscall_table):
8064 * proc-flags.c (struct trans): Constify.
8065 * proc-utils.h (procfs_note): Constify.
8066 * proc-why.c (struct trans): Constify.
8067 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8068 (procfs_detach): Constify.
8069 * sol-thread.c (struct string_map): Constify.
8070 (td_err_string, td_state_string): Constify.
8071
8072 2017-04-05 Pedro Alves <palves@redhat.com>
8073
8074 * proc-api.c (procfs_filename): Don't initialize
8075 procfs_filename.
8076 (prepare_to_trace): Assume procfs_filename is non-NULL.
8077 (_initialize_proc_api): Give procfs_filename a default value here.
8078
8079 2017-04-05 Pedro Alves <palves@redhat.com>
8080
8081 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8082 'cond_string' parameter.
8083 (extract_exception_regexp): Constify 'string' parameter.
8084 (catch_exception_command_1): Constify.
8085 * breakpoint.c (init_catchpoint)
8086 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8087 parameter.
8088 (ep_parse_optional_if_clause, catch_fork_command_1)
8089 (catch_exec_command_1): Constify.
8090 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8091 parameter.
8092 (ep_parse_optional_if_clause): Constify.
8093 * cli/cli-utils.c (remove_trailing_whitespace)
8094 (check_for_argument): Constify.
8095 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8096 non-const overload.
8097 (check_for_argument): Likewise.
8098
8099 2017-04-05 Pedro Alves <palves@redhat.com>
8100
8101 * event-top.c (command_line_handler): Add cast to execute_command
8102 call.
8103 * record-btrace.c (cmd_record_btrace_bts_start)
8104 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8105 (cmd_record_btrace_start): Add cast to execute_command call.
8106 * record-full.c (record_full_goto_insn):
8107 * record.c (record_start, record_stop): Add cast to
8108 execute_command_to_string calls.
8109 (cmd_record_start): Add cast to execute_command calls.
8110
8111 2017-04-05 Pedro Alves <palves@redhat.com>
8112
8113 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8114 static inline function.
8115 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8116 array and use gdb_PyArg_ParseTupleAndKeywords.
8117 * python/py-cmd.c (cmdpy_init): Likewise.
8118 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8119 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8120 (infpy_search_memory): Likewise.
8121 * python/py-objfile.c (objfpy_add_separate_debug_file)
8122 (gdbpy_lookup_objfile): Likewise.
8123 * python/py-symbol.c (gdbpy_lookup_symbol)
8124 (gdbpy_lookup_global_symbol): Likewise.
8125 * python/py-type.c (gdbpy_lookup_type): Likewise.
8126 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8127 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8128 Likewise.
8129
8130 2017-04-05 Pedro Alves <palves@redhat.com>
8131
8132 * python/python-internal.h (gdb_PyGetSetDef): New type.
8133 * python/py-block.c (block_object_getset)
8134 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8135 * python/py-event.c (event_object_getset)
8136 (finish_breakpoint_object_getset): Likewise.
8137 * python/py-inferior.c (inferior_object_getset): Likewise.
8138 * python/py-infthread.c (thread_object_getset): Likewise.
8139 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8140 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8141 * python/py-objfile.c (objfile_getset): Likewise.
8142 * python/py-progspace.c (pspace_getset): Likewise.
8143 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8144 Likewise.
8145 * python/py-record.c (recpy_record_getset): Likewise.
8146 * python/py-symbol.c (symbol_object_getset): Likewise.
8147 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8148 Likewise.
8149 * python/py-type.c (type_object_getset, field_object_getset):
8150 Likewise.
8151 * python/py-value.c (value_object_getset): Likewise.
8152
8153 2017-04-05 Pedro Alves <palves@redhat.com>
8154
8155 * python/python-internal.h (gdb_PyObject_CallMethod)
8156 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8157 New functions.
8158 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8159 (PySys_GetObject, PySys_SetPath): New macros.
8160
8161 2017-04-05 Pedro Alves <palves@redhat.com>
8162
8163 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8164 info_osdata_command.
8165 * osdata.c (info_osdata_command): Rename to ...
8166 (info_osdata): ... this. Constify 'type' parameter, and remove
8167 the 'from_tty' parameter. Accept NULL TYPE.
8168 (info_osdata_command): New function.
8169 * osdata.h (info_osdata_command): Remove declaration.
8170 (info_osdata): New declaration.
8171
8172 2017-04-05 Pedro Alves <palves@redhat.com>
8173
8174 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8175 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8176 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8177 parameter.
8178 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8179 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8180 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8181 parameter.
8182 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8183 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8184 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8185 (mi_cmd_file_list_exec_source_files)
8186 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8187 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8188 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8189 parameter.
8190 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8191 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8192 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8193 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8194 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8195 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8196 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8197 'command' parameter.
8198 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8199 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8200 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8201 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8202 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8203 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8204 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8205 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8206 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8207 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8208 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8209 parameter.
8210 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8211 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8212 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8213 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8214 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8215 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8216 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8217 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8218 (mi_cmd_data_list_changed_registers)
8219 (mi_cmd_data_write_register_values)
8220 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8221 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8222 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8223 (mi_cmd_list_features, mi_cmd_list_target_features)
8224 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8225 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8226 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8227 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8228 (mi_cmd_trace_frame_collected): Constify 'command'
8229 parameter.
8230 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8231 'command' parameter.
8232
8233 2017-04-05 Pedro Alves <palves@redhat.com>
8234
8235 * ada-lang.c (ada_completer_word_break_characters): Now a const
8236 array.
8237 (ada_get_gdb_completer_word_break_characters): Constify.
8238 * completer.c (gdb_completer_command_word_break_characters)
8239 (gdb_completer_file_name_break_characters)
8240 (gdb_completer_quote_characters): Now const arrays.
8241 (get_gdb_completer_quote_characters): Constify.
8242 (set_rl_completer_word_break_characters): New function.
8243 (set_gdb_completion_word_break_characters)
8244 (complete_line_internal): Use it.
8245 * completer.h (get_gdb_completer_quote_characters): Constify.
8246 (set_rl_completer_word_break_characters): Declare.
8247 * f-lang.c (f_word_break_characters): Constify.
8248 * language.c (default_word_break_characters): Constify.
8249 * language.h (language_defn::la_word_break_characters): Constify.
8250 (default_word_break_characters): Constify.
8251 * top.c (init_main): Use set_rl_completer_word_break_characters.
8252
8253 2017-04-05 Pedro Alves <palves@redhat.com>
8254
8255 * aix-thread.c (aix_thread_pid_to_str)
8256 (aix_thread_extra_thread_info): Constify.
8257 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8258 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8259 (bsd_uthread_pid_to_str): Constify.
8260 * corelow.c (core_pid_to_str): Constify.
8261 * darwin-nat.c (darwin_pid_to_str): Constify.
8262 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8263 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8264 Constify.
8265 * gnu-nat.c (gnu_pid_to_str): Constify.
8266 * go32-nat.c (go32_pid_to_str): Constify.
8267 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8268 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8269 * inferior.c (inferior_pid_to_str): Constify.
8270 * linux-nat.c (linux_nat_pid_to_str): Constify.
8271 * linux-tdep.c (linux_core_pid_to_str): Constify.
8272 * linux-thread-db.c (thread_db_pid_to_str)
8273 (thread_db_extra_thread_info): Constify.
8274 * nto-tdep.c (nto_extra_thread_info): Constify.
8275 * nto-tdep.h (nto_extra_thread_info): Constify.
8276 * obsd-nat.c (obsd_pid_to_str): Constify.
8277 * procfs.c (procfs_pid_to_str): Constify.
8278 * ravenscar-thread.c (ravenscar_extra_thread_info)
8279 (ravenscar_pid_to_str): Constify.
8280 * remote-sim.c (gdbsim_pid_to_str): Constify.
8281 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8282 Constify.
8283 * sol-thread.c (solaris_pid_to_str): Constify.
8284 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8285 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8286 * target.c (default_pid_to_str, target_pid_to_str)
8287 (normal_pid_to_str, default_pid_to_str): Constify.
8288 * target.h (target_ops::to_pid_to_str)
8289 (target_ops::to_extra_thread_info): Constify.
8290 (target_pid_to_str, normal_pid_to_str): Constify.
8291 * windows-nat.c (windows_pid_to_str): Constify.
8292 * gdbarch.sh (core_pid_to_str): Constify.
8293 * target-delegates.c: Regenerate.
8294 * gdbarch.h, gdbarch.c: Regenerate.
8295
8296 2017-04-05 Pedro Alves <palves@redhat.com>
8297
8298 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8299 the memory of the temporary warning_pre_print override.
8300 * utils.c (warning_pre_print): Constify.
8301 * utils.h (warning_pre_print): Constify.
8302
8303 2017-04-05 Pedro Alves <palves@redhat.com>
8304
8305 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8306 (shell_command): New function.
8307 (make_command): Use std::string.
8308 (init_cli_cmds): Register shell_command instead of shell_escape.
8309
8310 2017-04-05 Pedro Alves <palves@redhat.com>
8311
8312 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8313 * tracepoint.c (default_collect): Don't initialize.
8314
8315 2017-04-05 Pedro Alves <palves@redhat.com>
8316
8317 * macroexp.c (macro_buffer::shared): Now a bool.
8318 (init_buffer): Update.
8319 (init_shared_buffer): Constify 'addr' parameter.
8320 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8321 casts.
8322
8323 2017-04-05 Pedro Alves <palves@redhat.com>
8324
8325 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8326 * disasm.c (set_disassembler_options): Constify local.
8327 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8328
8329 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8330
8331 PR gdb/21352
8332 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8333 option.
8334
8335 2017-04-05 Yao Qi <yao.qi@linaro.org>
8336
8337 * frame.c (frame_unwind_register_unsigned): Call
8338 frame_unwind_register_value.
8339
8340 2017-04-05 Yao Qi <yao.qi@linaro.org>
8341
8342 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8343 Use gdb_test_multiple, and don't match anchor.
8344
8345 2017-04-05 Pedro Alves <palves@redhat.com>
8346
8347 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8348 (Write After Approval): Remove Simon Marchi.
8349
8350 2017-04-05 Pedro Alves <palves@redhat.com>
8351
8352 * common/gdb_optional.h (optional::optional): Make constexpr and
8353 initialize m_dummy.
8354
8355 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8356
8357 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8358 (amd64fbsd_jmp_buf_reg_offset): Remove.
8359 (amd64fbsd_supply_uthread): Remove function.
8360 (amd64fbsd_collect_uthread): Remove function.
8361 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8362 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8363 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8364 (fbsd-nat.c): Update comment.
8365 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8366 (i386fbsd_jmp_buf_reg_offset): Remove.
8367 (i386fbsd_supply_uthread): Remove function.
8368 (i386fbsd_collect_uthread): Remove function.
8369 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8370
8371 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8372
8373 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8374 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8375 * NEWS: Mention that support for FreeBSD/alpha was removed.
8376 * alpha-fbsd-tdep.c: Delete file.
8377 * config/alpha/fbsd.mh: Delete file.
8378 * configure.host: Delete alpha*-*-freebsd* and
8379 alpha*-*-kfreebsd*-gnu.
8380 * configure.tgt: Delete alpha*-*-freebsd* and
8381 alpha*-*-kfreebsd*-gnu.
8382
8383 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8384
8385 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8386 amd64bsd_store_inferior_registers): Use ptid from regcache.
8387
8388 2017-04-04 Pedro Alves <palves@redhat.com>
8389
8390 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8391 data fields, make them private and add "m_" prefixes.
8392 (lnp_state_machine::lnp_state_machine): New ctor.
8393 (record_line, check_line_address, handle_set_discriminator)
8394 (handle_set_address, handle_advance_pc, handle_special_opcode)
8395 (handle_advance_line, handle_set_file, handle_negate_stmt)
8396 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8397 (end_sequence, advance_line): New methods.
8398 (m_gdbarch, m_record_lines_p): New fields.
8399 (lnp_reader_state): Delete.
8400 (dwarf_record_line): Rename to ...
8401 (lnp_state_machine::record_line): ... adjust.
8402 (init_lnp_state_machine): Delete.
8403 (lnp_state_machine::lnp_state_machine): New.
8404 (check_line_address): Rename to ...
8405 (lnp_state_machine::check_line_address): This.
8406 (dwarf_decode_lines_1): Remove reference to "reader_state".
8407 Adjust lnp_state_machine having a non-default ctor. Use bool.
8408 State machine internal state manipulation moved to
8409 lnp_state_machine methods.
8410
8411 2017-04-04 Pedro Alves <palves@redhat.com>
8412
8413 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8414 unittests/offset-type-selftests.c.
8415 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8416 * common/offset-type.h: New file.
8417 * common/preprocessor.h: New file.
8418 * common/traits.h: New file.
8419 * common/valid-expr.h: New file.
8420 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8421 sect_offset and cu_offset strong typedefs throughout.
8422 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8423 typedefs throughout.
8424 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8425 sect_offset and cu_offset strong typedefs throughout.
8426 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8427 typedefs throughout.
8428 * gdbtypes.h: Include "common/offset-type.h".
8429 (cu_offset): Now an offset type (strong typedef) instead of a
8430 struct.
8431 (sect_offset): Likewise.
8432 (union call_site_parameter_u): Rename "param_offset" field to
8433 "param_cu_off".
8434 * unittests/offset-type-selftests.c: New file.
8435
8436 2017-04-04 Pedro Alves <palves@redhat.com>
8437
8438 * common/underlying.h: New file.
8439 * dwarf2read.c: Include "common/gdb_optional.h" and
8440 "common/underlying.h".
8441 (dir_index, file_name_index): New types.
8442 (file_entry): Use them.
8443 (file_entry::include): Use to_underlying.
8444 (line_header::add_file_name): Use dir_index.
8445 (read_formatted_entries): Use gdb::optional. Read form before
8446 writting to file_entry.
8447 (dwarf_decode_line_header): Use dir_index.
8448 (lnp_state_machine::current_file): Use to_underlying.
8449 (lnp_state_machine::file): Change type to file_name_index.
8450 (dwarf_record_line): Use to_underlying.
8451 (init_lnp_state_machine): Use file_name_index.
8452 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8453
8454 2017-04-04 Pedro Alves <palves@redhat.com>
8455
8456 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8457 operator bool, has_value and get methods.
8458
8459 2017-04-04 Pedro Alves <palves@redhat.com>
8460
8461 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8462 fields.
8463 (line_header): Initialize all data fields. Change type of
8464 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8465 Change type of include_dirs to std::vector<const char *>. Remove
8466 num_include_dirs, include_dirs_size. Change type of file_names to
8467 std::vector<file_entry>. Remove num_file_names, file_names_size.
8468 (line_header::line_header): New.
8469 (line_header::add_include_dir, line_header::add_file_name): New
8470 methods.
8471 (line_header::include_dir_at): Remove NULL check.
8472 (line_header::file_name_at): Add const overload.
8473 (line_header_up): New unique_ptr typedef.
8474 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8475 std::vector. Remove free_line_header call.
8476 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8477 free_line_header call.
8478 (free_cu_line_header): Delete.
8479 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8480 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8481 Adjust to use std::vector.
8482 (free_line_header): Delete.
8483 (free_line_header_voidp): Use delete.
8484 (add_include_dir): Replace with ...
8485 (line_header::add_include_dir): ... this method. Use std::vector.
8486 (add_file_name): Replace with ...
8487 (line_header::add_file_name): ... this method. Use std::vector.
8488 (add_include_dir_stub): Delete.
8489 (read_formatted_entries): Remove memset.
8490 (dwarf_decode_line_header): Return a line_header_up instead of a
8491 raw pointer. Remove cleanup handling. Pass lambdas to
8492 read_formatted_entries. Adjust to use line_header methods.
8493 (dwarf_decode_lines_1): Adjust to use line_header methods.
8494 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8495 use std::vector.
8496
8497 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8498
8499 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8500 instead of struct ptid.
8501
8502 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8503
8504 * frame.c (get_frame_register_bytes): Unwind using value.
8505 (put_frame_register_bytes): Likewise.
8506
8507 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8508
8509 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8510 aggregate-like.
8511
8512 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8513
8514 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8515
8516 2017-03-29 Yao Qi <yao.qi@linaro.org>
8517
8518 * gdbthread.h (struct thread_info): Declare constructor and
8519 destructor. Add some in-class member initializers.
8520 * thread.c (free_thread): Remove.
8521 (init_thread_list): Call delete instead of free_thread.
8522 (new_thread): Call thread_info constructor.
8523 (thread_info::thread_info): New function.
8524 (thread_info::~thread_info): New function.
8525 (delete_thread_1): Call delete instead of free_thread.
8526 (make_cleanup_restore_current_thread): Move tp and frame to
8527 inner block.
8528
8529 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8530
8531 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8532 (arc_skip_prologue): Likewise.
8533 (arc_make_frame_cache): Likewise.
8534 (arc_pv_get_operand): New function.
8535 (arc_is_in_prologue): Likewise.
8536 (arc_analyze_prologue): Likewise.
8537 (arc_print_frame_cache): Likewise.
8538 (MAX_PROLOGUE_LENGTH): New constant.
8539
8540 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8541
8542 * configure.tgt: Add arc-insn.o.
8543 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8544 (dump_arc_instruction_command): New function.
8545 (arc_fprintf_disasm): Likewise.
8546 (arc_disassemble_info): Likewise.
8547 (arc_insn_get_operand_value): Likewise.
8548 (arc_insn_get_operand_value_signed): Likewise.
8549 (arc_insn_get_memory_base_reg): Likewise.
8550 (arc_insn_get_memory_offset): Likewise.
8551 (arc_insn_get_branch_target): Likewise.
8552 (arc_insn_dump): Likewise.
8553 (arc_insn_get_linear_next_pc): Likewise.
8554 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8555 (arc_disassemble_info): Likewise.
8556 (arc_insn_get_branch_target): Likewise.
8557 (arc_insn_get_linear_next_pc): Likewise.
8558 * NEWS: Mention new "maint print arc arc-instruction".
8559
8560 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8561
8562 * arc-tdep (maintenance_print_arc_list): New variable.
8563 (maintenance_print_arc_command): New function.
8564
8565 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8566
8567 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8568 Add "limm" and "reserved".
8569 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8570 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8571 * arc-tdep.h (arc_regnum): Likewise.
8572
8573 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8574
8575 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8576 for THREADPTR register.
8577 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8578 register.
8579 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8580 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8581 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8582
8583 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8584
8585 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8586 registers above gdbarch_num_regs (gdbarch) as privileged in
8587 call0 ABI.
8588
8589 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8590
8591 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8592 for a single specified register or for all registers in
8593 a0_base..a0_base + C0_NREGS range.
8594 (supply_gregset_reg): Call regcache_raw_supply for a single
8595 specified register or for all registers in a0_base..a0_base +
8596 C0_NREGS range.
8597
8598 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8599
8600 * arch/xtensa.h (C0_NREGS): Add definition.
8601 * xtensa-tdep.c (C0_NREGS): Remove definition.
8602
8603 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8604
8605 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8606 Drop xtensa_default_isa initialization.
8607 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8608
8609 2017-03-27 Pedro Alves <palves@redhat.com>
8610
8611 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8612 (file_entry::include_dir): New method.
8613 (line_header::include_dir_at, line_header::file_name_at): New
8614 methods.
8615 (setup_type_unit_groups, setup_type_unit_groups)
8616 (psymtab_include_file_name): Simplify using the new methods.
8617 (lnp_state_machine) <the_line_header>: New field.
8618 <file>: Add comment.
8619 (lnp_state_machine::current_file): New method.
8620 (dwarf_record_line): Simplify using the new methods.
8621 (init_lnp_state_machine): Initialize the "the_line_header" field.
8622 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8623 Simplify using the new methods.
8624
8625 2017-03-27 Pedro Alves <palves@redhat.com>
8626
8627 * cp-name-parser.y (make_empty): Delete.
8628 (demangler_special, nested_name, ptr_operator, array_indicator)
8629 (direct_declarator, declarator_1): Use fill_comp instead of
8630 make_empty.
8631
8632 2017-03-27 Pedro Alves <palves@redhat.com>
8633
8634 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8635 to ATTRIBUTE_PRINTF.
8636 * solib-target.c (library_list_start_list): Print "string" not
8637 "version".
8638 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8639 gdb_xml_error call.
8640
8641 2017-03-27 Pedro Alves <palves@redhat.com>
8642
8643 * dwarf2read.c (struct file_and_directory): New.
8644 (dwarf2_get_dwz_file): Adjust to use std::string.
8645 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8646 (find_file_and_directory): Adjust to return a file_and_directory
8647 object.
8648 (read_file_scope): Adjust to use file_and_directory. Remove
8649 make_cleanup/do_cleanups calls.
8650 (open_and_init_dwp_file): Adjust to use std::string. Remove
8651 make_cleanup/do_cleanups calls.
8652 * python/python.c (do_start_initialization): Adjust to ldirname
8653 returning a std::string.
8654 * utils.c (ldirname): Now returns a std::string.
8655 * utils.h (ldirname): Change return type to std::string.
8656 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8657 returning a std::string.
8658 * xml-tdesc.c (file_read_description_xml): Likewise.
8659
8660 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8661
8662 * regcache.c (regcache_debug_print_register): New function.
8663 * regcache.h (regcache_debug_print_register): New declaration.
8664 * target.c (debug_print_register): Remove.
8665 (target_fetch_registers): Call regcache_debug_print_register.
8666 (target_store_registers): Likewise.
8667
8668 2017-03-24 Pádraig Brady <pbrady@fb.com>
8669
8670 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8671 reference beyond the 'lh->include_dirs' array before accessing to
8672 it.
8673 (psymtab_include_file_name): Likewise.
8674 (dwarf_decode_lines_1): Likewise.
8675 (dwarf_decode_lines): Likewise.
8676 (file_file_name): Likewise.
8677
8678 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8679
8680 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8681 inferior_ptid.
8682 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8683 ps_lsetfpregs): Likewise.
8684 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8685 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8686 ps_lsetfpregs): Likewise.
8687 * target.c (target_fetch_registers, target_store_registers):
8688 Remove asserts.
8689
8690 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8691
8692 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8693
8694 2017-03-23 Yao Qi <yao.qi@linaro.org>
8695
8696 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8697 (_initialize_aarch64_tdep): Register it.
8698 (aarch64_record_load_store): Handle PRFM instruction.
8699 (aarch64_process_record_test): New function.
8700
8701 2017-03-23 Yao Qi <yao.qi@linaro.org>
8702
8703 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8704 indentation.
8705
8706 2017-03-23 Yao Qi <yao.qi@linaro.org>
8707
8708 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8709
8710 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8711
8712 python/python.c (do_start_initialization): Fix memory leak.
8713
8714 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8715
8716 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8717 using get_ptrace_pid.
8718 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8719 inferior_ptid.
8720 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8721 inferior_ptid instead of pid.
8722
8723 2017-03-22 Yao Qi <yao.qi@linaro.org>
8724
8725 * aarch64-tdep.c: Wrap locally used classes in anonymous
8726 namespace.
8727 * arm-tdep.c: Likewise.
8728 * linespec.c: Likewise.
8729 * ui-out.c: Likewise.
8730
8731 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8732
8733 PR gdb/19637
8734 * python/lib/gdb/printer/bound_registers.py: Import sys.
8735
8736 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8737
8738 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8739 windows_thread_info parameter and use it instead of
8740 current_thread.
8741 (windows_fetch_inferior_registers): Don't set current_thread,
8742 pass the thread to do_windows_fetch_inferior_registers. Use
8743 ptid from regcache instead of inferior_ptid.
8744 (do_windows_store_inferior_registers): Add windows_thread_info
8745 parameter and use it instead of current_thread.
8746 (windows_store_inferior_registers): Don't set current_thread,
8747 pass the thread to do_windows_store_inferior_registers. Use
8748 ptid from regcache instead of inferior_ptid.
8749
8750 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8751
8752 * ser-mingw.c (ser_windows_raw): Remove reference to
8753 struct serial::current_timeout.
8754
8755 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8756
8757 PR tdep/20928
8758 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8759 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8760 (sparc64_fsr_type): Fix %fsr decoding.
8761
8762 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8763
8764 * python/py-record-btrace.c (btpy_insn_data): Change return type
8765 for Python 2.
8766
8767 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8768
8769 * spu-linux-nat.c (spu_fetch_inferior_registers,
8770 spu_store_inferior_registers): Use ptid from regcache, set and
8771 restore inferior_ptid.
8772 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8773 Likewise.
8774
8775 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8776
8777 * i386-linux-nat.c (fetch_register, store_register,
8778 i386_linux_fetch_inferior_registers,
8779 i386_linux_store_inferior_registers): Use ptid from regcache.
8780 * ia64-linux-nat.c (ia64_linux_fetch_register,
8781 ia64_linux_store_register): Likewise.
8782 * inf-ptrace.c (inf_ptrace_fetch_register,
8783 inf_ptrace_store_register): Likewise.
8784 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8785 m32r_linux_store_inferior_registers): Likewise.
8786 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8787 m68kbsd_store_inferior_registers): Likewise.
8788 * m68k-linux-nat.c (fetch_register, store_register,
8789 m68k_linux_fetch_inferior_registers,
8790 m68k_linux_store_inferior_registers): Likewise.
8791 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8792 m88kbsd_store_inferior_registers): Likewise.
8793 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8794 mips_fbsd_store_inferior_registers): Likewise.
8795 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8796 mips64_linux_regsets_store_registers): Likewise.
8797 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8798 mipsnbsd_store_inferior_registers): Likewise.
8799 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8800 mips64obsd_store_inferior_registers): Likewise.
8801 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8802 Likewise.
8803 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8804 ppcfbsd_store_inferior_registers): Likewise.
8805 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8806 ppc_linux_store_inferior_registers): Likewise.
8807 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8808 ppcnbsd_store_inferior_registers): Likewise.
8809 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8810 ppcobsd_store_registers): Likewise.
8811 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8812 Likewise.
8813 * ravenscar-thread.c (ravenscar_fetch_registers,
8814 ravenscar_store_registers, ravenscar_prepare_to_store):
8815 Likewise.
8816 * record-btrace.c (record_btrace_fetch_registers,
8817 record_btrace_store_registers, record_btrace_prepare_to_store):
8818 Likewise.
8819 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8820 Lookup inferior using ptid from regcache, instead of
8821 current_inferior.
8822 * remote.c (remote_fetch_registers, remote_store_registers): Use
8823 ptid from regcache.
8824 * rs6000-nat.c (fetch_register, store_register): Likewise.
8825 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8826 s390_linux_store_inferior_registers): Likewise.
8827 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8828 shnbsd_store_inferior_registers): Likewise.
8829 * sol-thread.c (sol_thread_fetch_registers,
8830 sol_thread_store_registers): Likewise.
8831 * sparc-nat.c (sparc_fetch_inferior_registers,
8832 sparc_store_inferior_registers): Likewise.
8833 * tilegx-linux-nat.c (fetch_inferior_registers,
8834 store_inferior_registers): Likewise.
8835 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8836 vaxbsd_store_inferior_registers): Likewise.
8837 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8838 store_xtregs): Likewise.
8839
8840 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8841
8842 PR gdb/14441
8843 * NEWS: Mention support for rvalue references in GDB and python.
8844 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8845 supports both lvalue and rvalue references.
8846
8847 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8848
8849 PR gdb/14441
8850 * gdbtypes.c (rank_one_type): Implement overloading
8851 resolution rules regarding rvalue references.
8852
8853 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8854
8855 PR gdb/14441
8856 * aarch64-tdep.c (aarch64_type_align)
8857 (aarch64_extract_return_value, aarch64_store_return_value): Change
8858 lvalue reference type checks to general reference type checks.
8859 * amd64-tdep.c (amd64_classify): Likewise.
8860 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8861 Likewise.
8862 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8863 (arm_store_return_value): Likewise.
8864 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8865 * c-typeprint.c (c_print_type): Likewise.
8866 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8867 (cplus_number_of_children, cplus_describe_child): Likewise.
8868 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8869 * completer.c (expression_completer): Likewise.
8870 * cp-support.c (make_symbol_overload_list_adl_namespace):
8871 Likewise.
8872 * darwin-nat-info.c (info_mach_region_command): Likewise.
8873 * dwarf2loc.c (entry_data_value_coerce_ref)
8874 (value_of_dwarf_reg_entry): Likewise.
8875 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8876 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8877 Likewise.
8878 * findvar.c (extract_typed_address, store_typed_address):
8879 Likewise.
8880 * gdbtypes.c (rank_one_type): Likewise.
8881 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8882 * infcall.c (value_arg_coerce): Likewise.
8883 * language.c (pointer_type): Likewise.
8884 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8885 Likewise.
8886 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8887 * mn10300-tdep.c (mn10300_type_align): Likewise.
8888 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8889 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8890 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8891 Likewise.
8892 * printcmd.c (print_formatted, x_command): Likewise.
8893 * python/py-type.c (typy_get_composite, typy_template_argument):
8894 Likewise.
8895 * python/py-value.c (valpy_referenced_value)
8896 (valpy_get_dynamic_type, value_has_field): Likewise.
8897 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8898 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8899 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8900 * spu-tdep.c (spu_scalar_value_p): Likewise.
8901 * symtab.c (lookup_symbol_aux): Likewise.
8902 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8903 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8904 Likewise.
8905 * valops.c (value_cast_pointers, value_cast)
8906 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8907 (value_struct_elt, value_struct_elt_bitpos)
8908 (value_find_oload_method_list, find_overload_match)
8909 (value_rtti_indirect_type): Likewise.
8910 * valprint.c (val_print_scalar_type_p, generic_val_print):
8911 Likewise.
8912 * value.c (value_actual_type, value_as_address, unpack_long)
8913 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8914 (coerce_ref): Likewise.
8915 * varobj.c (varobj_get_value_type): Likewise.
8916
8917 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8918
8919 PR gdb/14441
8920 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8921 table of constants.
8922 * python/lib/gdb/command/explore.py: Support exploring values
8923 of rvalue reference types.
8924 * python/lib/gdb/types.py: Implement get_basic_type() for
8925 rvalue reference types.
8926 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8927 constant.
8928 * python/py-value.c (valpy_getitem): Add an rvalue reference
8929 check.
8930 (valpy_reference_value): Add new parameter "refcode".
8931 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8932 New wrappers for valpy_reference_value().
8933 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8934 (gdbpy_invoke_xmethod): Likewise.
8935
8936 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8937
8938 PR gdb/14441
8939 * dwarf2read.c (process_die, read_type_die_1): Handle the
8940 DW_TAG_rvalue_reference_type DIE.
8941 (read_tag_reference_type): Add new parameter "refcode".
8942
8943 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8944
8945 PR gdb/14441
8946 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8947 (c_type_print_modifier, c_type_print_varspec_suffix)
8948 (c_type_print_base): Support printing rvalue reference types.
8949 * c-valprint.c (c_val_print, c_value_print): Support printing
8950 rvalue reference values.
8951
8952 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8953
8954 PR gdb/14441
8955 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8956 typename.
8957 * cp-support.c (replace_typedefs): Handle
8958 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8959 * python/py-type.c (typy_lookup_type): Likewise.
8960
8961 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8962
8963 PR gdb/14441
8964 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8965 * parse.c (insert_type): Change assert statement.
8966 (follow_types): Handle rvalue reference types.
8967 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8968 constant.
8969
8970 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8971
8972 PR gdb/14441
8973 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8974 value_ref() interface.
8975 * c-valprint.c (c_value_print): Likewise.
8976 * infcall.c (value_arg_coerce): Likewise.
8977 * python/py-value.c (valpy_reference_value): Likewise.
8978 * valops.c (value_cast, value_reinterpret_cast)
8979 (value_dynamic_cast, typecmp): Likewise.
8980 (value_ref): Parameterize by kind of return value reference type.
8981 * value.h (value_ref): Add new parameter "refcode".
8982
8983 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8984
8985 PR gdb/14441
8986 * dwarf2read.c (read_tag_reference_type): Use
8987 lookup_lvalue_reference_type() instead of lookup_reference_type().
8988 * eval.c (evaluate_subexp_standard): Likewise.
8989 * f-exp.y: Likewise.
8990 * gdbtypes.c (make_reference_type, lookup_reference_type):
8991 Generalize with rvalue reference types.
8992 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8993 convenience wrappers for lookup_reference_type().
8994 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8995 reference kind parameter.
8996 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8997 wrappers for lookup_reference_type().
8998 * guile/scm-type.c (gdbscm_type_reference): Use
8999 lookup_lvalue_reference_type() instead of lookup_reference_type().
9000 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9001 * parse.c (follow_types): Likewise.
9002 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9003 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9004 Likewise.
9005 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9006 (gdbpy_invoke_xmethod): Likewise.
9007 * stabsread.c: Provide extra argument to make_reference_type()
9008 call.
9009 * valops.c (value_ref, value_rtti_indirect_type): Use
9010 lookup_lvalue_reference_type() instead of lookup_reference_type().
9011
9012 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9013
9014 PR gdb/14441
9015 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9016 (TYPE_IS_REFERENCE): New macro.
9017 (struct type): Add rvalue_reference_type field.
9018 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9019
9020 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9021
9022 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9023 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9024 New function definition.
9025 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9026 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9027 New function declaration.
9028 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9029 * mi/mi-interp.h: New file.
9030 * solib.c (info_sharedlibrary_command): Replace for loop with
9031 ALL_SO_LIBS macro
9032 * solib.h (update_solib_list): New function declaration.
9033 (so_list_head): Move macro.
9034 * solist.h (ALL_SO_LIBS): New macro.
9035
9036 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9037
9038 * infcmd.c (post_create_inferior): Remove unused argument in
9039 call to solib_add.
9040 * remote.c (remote_start_remote): Likewise.
9041 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9042 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9043 (enable_break): Likewise.
9044 * solib.c (update_solib_list): Remove unused target argument
9045 and its documentation.
9046 (solib_add): Remove unused target argument. Remove unused
9047 argument in call to update_solib_list.
9048 (info_sharedlibrary_command): Remove unused argument in call
9049 to update_solib_list.
9050 (sharedlibrary_command): Remove unused argument in call to
9051 solib_add.
9052 (handle_solib_event): Likewise.
9053 (reload_shared_libraries): Likewise.
9054 * solib.h (solib_add): Remove unused target argument.
9055
9056 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9057
9058 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9059 (s390_displaced_step_fixup): Cover relative branches with the
9060 default fixup handling. This fixes lack of support for some
9061 relative branch instructions.
9062
9063 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9064
9065 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9066 ptid from regcache.
9067
9068 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9069
9070 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9071 i386_darwin_store_inferior_registers): Use ptid from regcache.
9072
9073 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9074
9075 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9076 i386bsd_store_inferior_registers): Use ptid from regcache.
9077
9078 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9079
9080 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9081 hppaobsd_store_registers): Use ptid from regcache.
9082
9083 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9084
9085 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9086 hppanbsd_store_registers): Use ptid from regcache.
9087
9088 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9089
9090 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9091 from regcache. Use get_ptrace_pid.
9092
9093 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9094
9095 * corelow.c (get_core_register_section): Use ptid from regcache,
9096 update doc.
9097
9098 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9099
9100 * bsd-uthread.c (bsd_uthread_fetch_registers,
9101 bsd_uthread_store_registers): Use ptid from regcache, set and
9102 restore inferior_ptid.
9103
9104 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9105
9106 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9107 fetch_fp_regs, store_register, store_regs, store_fp_register,
9108 store_fp_regs): Use ptid from regcache.
9109
9110 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9111
9112 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9113 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9114 store_vfp_regs): Use ptid from regcache.
9115
9116 2017-03-17 Pedro Alves <palves@redhat.com>
9117
9118 PR remote/21188
9119 * ser-base.c (ser_base_wait_for): Add comment.
9120 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9121 version.
9122 * ser-unix.c (hardwire_raw): Remove reference to
9123 scb->current_timeout.
9124 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9125 (hardwire_ops): Install ser_base_readchar instead of
9126 hardwire_readchar.
9127 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9128 Remove fields.
9129
9130 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9131
9132 PR gdb/19637
9133 * python/lib/gdb/printer/bound_registers.py: Add support for
9134 Python 3.
9135
9136 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9137
9138 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9139 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9140 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9141 byte_offset to subobj_byte_offset. Fix the handling of
9142 DWARF_VALUE_STACK on big-endian targets when coming via an
9143 implicit pointer.
9144 (dwarf2_evaluate_loc_desc): Adjust call to
9145 dwarf2_evaluate_loc_desc_full.
9146 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9147 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9148
9149 2017-03-16 Yao Qi <yao.qi@linaro.org>
9150
9151 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9152 and REVSH instructions.
9153
9154 2017-03-16 Yao Qi <yao.qi@linaro.org>
9155
9156 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9157 (arm_record_test): Declare.
9158 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9159 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9160 align with the manual.
9161 (thumb_record_misc): Adjust the code order to align with the
9162 manual.
9163 (thumb2_record_decode_insn_handler): Fix instruction matching.
9164 (instruction_reader_thumb): New class.
9165 (arm_record_test): New function.
9166
9167 2017-03-16 Yao Qi <yao.qi@linaro.org>
9168
9169 * arm-tdep.c (abstract_memory_reader): New class.
9170 (instruction_reader): New class.
9171 (extract_arm_insn): Add argument 'reader'. Callers updated.
9172 (decode_insn): Likewise.
9173
9174 2017-03-16 Doug Evans <dje@google.com>
9175
9176 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9177 member. Change type of TYPE member to SCM. All uses updated.
9178 (lsscm_make_lazy_string_smob): Add assert.
9179 (lsscm_make_lazy_string): Flag bad length values.
9180 (lsscm_elt_type): New function.
9181 (gdbscm_lazy_string_to_value): Rewrite to use
9182 lsscm_safe_lazy_string_to_value.
9183 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9184 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9185 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9186 in incoming type.
9187 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9188 * guile/scm-type.c (tyscm_scm_to_type): New function.
9189
9190 2017-03-15 Doug Evans <dje@google.com>
9191
9192 PR python/17728, python/18439, python/18779
9193 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9194 member. Change type of TYPE member to PyObject *. All uses updated.
9195 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9196 (gdbpy_create_lazy_string_object): Flag bad length values.
9197 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9198 Handle typedefs in incoming type.
9199 (stpy_lazy_string_elt_type): New function.
9200 (gdbpy_extract_lazy_string): Call it.
9201 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9202 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9203 typedefs in incoming type.
9204
9205 2017-03-16 Doug Evans <dje@google.com>
9206
9207 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9208 * guile/scm-type.c (tyscm_scm_to_type): New function.
9209
9210 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9211
9212 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9213 "ULONGEST" for "skip".
9214
9215 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9216
9217 PR gdb/21220
9218 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9219 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9220 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9221 over ptrace peek/poke until end of buffer or error.
9222
9223 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9224
9225 * parse.c (length_of_subexp): Make static.
9226 * parser-defs.h (length_of_subexp): Remove.
9227
9228 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9229
9230 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9231 as well.
9232
9233 2017-03-14 Pedro Alves <palves@redhat.com>
9234
9235 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9236 (main): Use std::unique_ptr. Remove calls to
9237 cp_demangled_name_parse_free.
9238
9239 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9240
9241 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9242 alphabsd_store_inferior_registers): Use regcache->ptid instead
9243 of inferior_ptid.
9244
9245 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9246
9247 * aix-thread.c (aix_thread_fetch_registers,
9248 aix_thread_store_registers): Use regcache->ptid instead of
9249 inferior_ptid.
9250
9251 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9252
9253 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9254 store_gregs_to_thread, fetch_fpregs_from_thread,
9255 store_fpregs_to_thread): Use regcache->ptid instead of
9256 inferior_ptid.
9257
9258 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9259
9260 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9261 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9262 instead of inferior_ptid.
9263
9264 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9265
9266 * target.c (target_fetch_registers, target_store_registers): Add
9267 assert.
9268
9269 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9270
9271 * regcache.h (regcache_get_ptid): New function.
9272 * regcache.c (regcache_get_ptid): New function.
9273
9274 2017-03-13 Mark Wielaard <mark@klomp.org>
9275
9276 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9277
9278 2017-03-10 Keith Seitz <keiths@redhat.com>
9279
9280 PR c++/8218
9281 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9282
9283 2017-03-08 Pedro Alves <palves@redhat.com>
9284
9285 PR gdb/18360
9286 * infrun.c (start_step_over, do_target_resume, resume)
9287 (restart_threads): Assert we're not resuming a thread that is
9288 meant to be stopped.
9289 (infrun_thread_stop_requested_callback): Delete.
9290 (infrun_thread_stop_requested): If the thread is internally
9291 stopped, queue a pending stop event and clear the thread's
9292 inline-frame state.
9293 (handle_stop_requested): New function.
9294 (handle_syscall_event, handle_inferior_event_1): Use
9295 handle_stop_requested.
9296 (handle_stop_requested): New function.
9297 (handle_signal_stop): Set the thread's stop_signal here instead of
9298 at caller.
9299 (finish_step_over): Clear step over info unconditionally.
9300 (handle_signal_stop): If the user had interrupted the event
9301 thread, consider the stop a random signal.
9302 (handle_signal_stop) <signal arrived while stepping over
9303 breakpoint>: Don't restart threads here.
9304 (stop_waiting): Don't clear step-over info here.
9305
9306 2017-03-08 Pedro Alves <palves@redhat.com>
9307
9308 PR 21206
9309 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9310 goes to argument 2, not 1.
9311
9312 2017-03-08 Pedro Alves <palves@redhat.com>
9313
9314 PR cli/21218
9315 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9316 display_gdb_prompt.
9317 (command_line_input): Add comment.
9318
9319 2017-03-08 Pedro Alves <palves@redhat.com>
9320
9321 PR tui/21216
9322 * tui/tui-file.c (tui_file::write): New.
9323 * tui/tui-file.h (tui_file): Override "write".
9324 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9325 factored out from ...
9326 (tui_puts): ... here.
9327 (tui_putc): Use them.
9328 (tui_write): New function.
9329 * tui/tui-io.h (tui_write): Declare.
9330
9331 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9332
9333 * Makefile.in (SFILES): Replace "environ.c" with
9334 "common/environ.c".
9335 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9336 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9337 to...
9338 * common/environ.c: ... here.
9339 * environ.h: Moved to...
9340 * common/environ.h: ... here.
9341
9342 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9343
9344 * gdbarch.sh (pstring_ptr): New static function.
9345 (gdbarch_disassembler_options): Use it.
9346 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9347 not valid_disassembler_option->name.
9348 * gdbarch.c: Regenerate.
9349
9350 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9351
9352 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9353
9354 2017-03-07 Pedro Alves <palves@redhat.com>
9355
9356 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9357
9358 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9359
9360 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9361 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9362 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9363 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9364
9365 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9366
9367 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9368
9369 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9370
9371 * remote.c (remote_add_target_side_commands): Use range-based
9372 for loop.
9373
9374 2017-03-03 Yao Qi <yao.qi@linaro.org>
9375
9376 PR gdb/21165
9377 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9378 value is lazy.
9379 * valprint.c (common_val_print): Likewise.
9380
9381 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9382
9383 * NEWS: Mention new set/show disassembler-options commands.
9384 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9385 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9386 (prospective_options): New static variable.
9387 (gdb_disassembler::gdb_disassembler): Initialize
9388 m_di.disassembler_options.
9389 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9390 (get_disassembler_options): New function.
9391 (set_disassembler_options): Likewise.
9392 (set_disassembler_options_sfunc): Likewise.
9393 (show_disassembler_options_sfunc): Likewise.
9394 (disassembler_options_completer): Likewise.
9395 (_initialize_disasm): Likewise.
9396 * disasm.h (get_disassembler_options): New prototype.
9397 (set_disassembler_options): Likewise.
9398 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9399 (gdbarch_verify_disassembler_options): Likewise.
9400 * gdbarch.c: Regenerate.
9401 * gdbarch.h: Likewise.
9402 * arm-tdep.c (num_disassembly_options): Delete.
9403 (set_disassembly_style): Likewise.
9404 (arm_disassembler_options): New static variable.
9405 (set_disassembly_style_sfunc): Convert short style name into long
9406 option name. Call set_disassembler_options.
9407 (show_disassembly_style_sfunc): New function.
9408 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9409 set_gdbarch_verify_disassembler_options.
9410 (_initialize_arm_tdep): Delete regnames variable and update callers.
9411 (arm_disassembler_options): Initialize.
9412 (disasm_options): New variable.
9413 (num_disassembly_options): Rename from this...
9414 (num_disassembly_styles): ...to this. Compute by scanning through
9415 disasm_options.
9416 (valid_disassembly_styles): Initialize using disasm_options.
9417 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9418 set_arm_regname_option.
9419 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9420 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9421 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9422 set_gdbarch_verify_disassembler_options.
9423 * s390-tdep.c (s390_disassembler_options): New static variable.
9424 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9425 set_gdbarch_verify_disassembler_options.
9426
9427 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9428
9429 * remote.c (remote_add_target_side_condition): Remove "struct"
9430 keyword from range-based for loop.
9431
9432 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9433
9434 * remote.c (remote_add_target_side_condition): Use range-based
9435 for loop. Update comment.
9436
9437 2017-02-27 Yao Qi <yao.qi@linaro.org>
9438
9439 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9440
9441 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9442
9443 * regcache.c (regcache_raw_update): New function.
9444 (regcache_raw_read): Move code to regcache_raw_update.
9445 * regcache.h (regcache_raw_update): New declaration.
9446 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9447
9448 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9449
9450 * dwarf2read.c (create_debug_type_hash_table): Initialize
9451 header.signature and header.type_offset_in_tu.
9452
9453 2017-02-24 Pedro Alves <palves@redhat.com>
9454
9455 * symtab.c (make_file_symbol_completion_list_1): Use
9456 add_symtab_completions.
9457
9458 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9459
9460 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9461
9462 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9463
9464 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9465 I386_MAX_REGISTER_SIZE.
9466 (i386_pseudo_register_write): Likewise.
9467 (i386_process_record): Likewise.
9468 * i387-tdep.c (i387_supply_xsave): Likewise.
9469 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9470 (store_register): Likewise.
9471
9472 2017-02-23 Pedro Alves <palves@redhat.com>
9473
9474 * ada-lang.c: Include "common/function-view.h".
9475 (ada_iterate_over_symbols): Adjust to use function_view as
9476 callback type.
9477 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9478 (ada_make_symbol_completion_list): Use a lambda.
9479 (ada_exc_search_name_matches): Delete.
9480 (name_matches_regex): New.
9481 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9482 * compile/compile-c-support.c: Include "common/function-view.h".
9483 (print_one_macro): Change prototype to accept a ui_file pointer.
9484 (write_macro_definitions): Use a lambda.
9485 * dwarf2read.c: Include "common/function-view.h".
9486 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9487 (dw2_expand_symtabs_matching): Adjust to use function_view as
9488 callback type.
9489 * language.h: Include "common/function-view.h".
9490 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9491 function_view as callback type.
9492 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9493 * linespec.c: Include "common/function-view.h".
9494 (collect_info::add_symbol): New method.
9495 (struct symbol_and_data_callback, iterate_inline_only, struct
9496 symbol_matcher_data, iterate_name_matcher): Delete.
9497 (iterate_over_all_matching_symtabs): Adjust to use function_view
9498 as callback type and lambdas.
9499 (iterate_over_file_blocks): Adjust to use function_view as
9500 callback type.
9501 (decode_compound_collector): Now a class with private fields.
9502 (decode_compound_collector::release_symbols): New method.
9503 (collect_one_symbol): Rename to...
9504 (decode_compound_collector::operator()): ... this and adjust.
9505 (lookup_prefix_sym): decode_compound_collector construction bits
9506 move to decode_compound_collector ctor. Pass the
9507 decode_compound_collector object directly as callback. Remove
9508 cleanups and use decode_compound_collector::release_symbols
9509 instead.
9510 (symtab_collector): Now a class with private fields.
9511 (symtab_collector::release_symtabs): New method.
9512 (add_symtabs_to_list): Rename to...
9513 (symtab_collector::operator()): ... this and adjust.
9514 (collect_symtabs_from_filename): symtab_collector construction
9515 bits move to symtab_collector ctor. Pass the symtab_collector
9516 object directly as callback. Remove cleanups and use
9517 symtab_collector::release_symtabs instead.
9518 (collect_symbols): Delete.
9519 (add_matching_symbols_to_info): Use lambdas.
9520 * macrocmd.c (print_macro_callback): Delete.
9521 (info_macro_command): Use a lambda.
9522 (info_macros_command): Pass print_macro_definition as callable
9523 directly.
9524 (print_one_macro): Remove 'ignore' parameter.
9525 (macro_list_command): Adjust.
9526 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9527 (macro_for_each_data::user_data): Delete field.
9528 (foreach_macro): Adjust to call the function_view.
9529 (macro_for_each): Adjust to use function_view as callback type.
9530 (foreach_macro_in_scope): Adjust to call the function_view.
9531 (macro_for_each_in_scope): Adjust to use function_view as callback
9532 type.
9533 * macrotab.h: Include "common/function-view.h".
9534 (macro_callback_fn): Declare a prototype instead of a pointer.
9535 Remove "user_data" parameter.
9536 (macro_for_each, macro_for_each_in_scope): Adjust to use
9537 function_view as callback type.
9538 * psymtab.c (partial_map_expand_apply)
9539 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9540 Adjust to use function_view as callback type and to return bool.
9541 (psym_expand_symtabs_matching): Adjust to use function_view as
9542 callback types.
9543 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9544 to use function_view as callback type and to return bool.
9545 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9546 callback types.
9547 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9548 as callback types.
9549 * symfile.h: Include "common/function-view.h".
9550 (expand_symtabs_file_matcher_ftype)
9551 (expand_symtabs_symbol_matcher_ftype)
9552 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9553 return bool.
9554 (quick_symbol_functions::map_symtabs_matching_filename)
9555 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9556 function_view as callback type and return bool.
9557 (expand_symtabs_matching): Adjust to use function_view as callback
9558 type.
9559 (maintenance_expand_name_matcher)
9560 (maintenance_expand_file_matcher): Delete.
9561 (maintenance_expand_symtabs): Use lambdas.
9562 * symtab.c (iterate_over_some_symtabs): Adjust to use
9563 function_view as callback types and return bool.
9564 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9565 of a cleanup.
9566 (lookup_symtab_callback): Delete.
9567 (lookup_symtab): Use a lambda.
9568 (iterate_over_symbols): Adjust to use function_view as callback
9569 type.
9570 (struct search_symbols_data, search_symbols_file_matches)
9571 (search_symbols_name_matches): Delete.
9572 (search_symbols): Use a pair of lambdas.
9573 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9574 (symtab_expansion_callback): Delete.
9575 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9576 * symtab.h: Include "common/function-view.h".
9577 (iterate_over_some_symtabs): Adjust to use function_view as
9578 callback type and return bool.
9579 (iterate_over_symtabs): Adjust to use function_view as callback
9580 type.
9581 (symbol_found_callback_ftype): Remove 'data' parameter and return
9582 bool.
9583 (iterate_over_symbols): Adjust to use function_view as callback
9584 type.
9585
9586 2017-02-23 Pedro Alves <palves@redhat.com>
9587
9588 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9589 (%.o) <unittests/%.c>: New pattern.
9590 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9591 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9592 * common/function-view.h: New file.
9593 * unittests/function-view-selftests.c: New file.
9594 * configure: Regenerate.
9595
9596 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9597
9598 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9599 inferior_ptid.
9600 * go32-nat.c (go32_thread_alive): Likewise.
9601
9602 2017-02-23 Yao Qi <yao.qi@linaro.org>
9603
9604 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9605 delete.
9606
9607 2017-02-23 Yao Qi <yao.qi@linaro.org>
9608
9609 * varobj.c (varobj_clear_saved_item): Use delete instead of
9610 xfree.
9611 (update_dynamic_varobj_children): Likewise.
9612
9613 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9614
9615 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9616
9617 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9618
9619 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9620 m_enum_value to 0 in default constructor.
9621
9622 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9623
9624 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9625 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9626 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9627 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9628 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9629 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9630 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9631 IS_STORE_CONDITIONAL_INSN.
9632
9633 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9634
9635 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9636
9637 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9638
9639 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9640
9641 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9642
9643 * dwarf2read.c (skip_one_die, read_attribute_value)
9644 (dwarf2_const_value_attr, dump_die_shallow)
9645 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9646 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9647
9648 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9649
9650 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9651 (dwarf_parse_macro_header): Accept DWARF version 5.
9652 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9653
9654 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9655
9656 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9657 DW_AT_GNU_*.
9658 * common/common-exceptions.h (enum errors): Likewise.
9659 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9660 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9661 (dwarf_expr_context::execute_stack_op): Likewise.
9662 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9663 Likewise.
9664 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9665 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9666 (show_entry_values_debug, call_site_to_target_addr)
9667 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9668 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9669 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9670 (value_of_dwarf_block_entry, indirect_pieced_value)
9671 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9672 (disassemble_dwarf_expression): Likewise.
9673 * dwarf2read.c (process_die, inherit_abstract_dies)
9674 (read_call_site_scope): Likewise.
9675 * gdbtypes.h (struct func_type, struct call_site_parameter)
9676 (struct call_site): Likewise.
9677 * stack.c (read_frame_arg): Likewise.
9678 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9679
9680 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9681
9682 * defs.h (read_unsigned_leb128): New declaration.
9683 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9684 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9685 (dwarf2_find_location_expression): Call also
9686 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9687 * dwarf2loc.h (dwarf2_version): New declaration.
9688 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9689 rnglists.
9690 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9691 .debug_rnglists.
9692 (struct dwop_section_names): Add loclists_dwo.
9693 (dwop_section_names): Add .debug_loclists.dwo.
9694 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9695 (struct dwarf2_per_cu_data): Add dwarf_version.
9696 (struct dwo_sections): Add loclists.
9697 (struct attr_abbrev): Add implicit_const.
9698 (read_indirect_line_string): New declaration.
9699 (read_unsigned_leb128): Delete declaration.
9700 (rcuh_kind): New definition.
9701 (read_and_check_comp_unit_head): Change parameter
9702 is_debug_types_section to section_kind.
9703 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9704 (read_comp_unit_head): Change parameter abfd to section, add parameter
9705 section_kind. Handle DWARF-5.
9706 (error_check_comp_unit_head): Accept also DWARF version 5.
9707 (read_and_check_comp_unit_head): Change parameter
9708 is_debug_types_section to section_kind.
9709 (read_and_check_type_unit_head): Delete function.
9710 (read_abbrev_offset): Handle DWARF-5.
9711 (create_debug_type_hash_table): Add parameter section_kind. Process
9712 only DW_UT_type. Use signature and type_offset_in_tu from struct
9713 comp_unit_head.
9714 (create_debug_types_hash_table): Update create_debug_type_hash_table
9715 caller.
9716 (create_all_type_units): Call create_debug_type_hash_table.
9717 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9718 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9719 caller.
9720 (skip_one_die): Handle DW_FORM_implicit_const.
9721 (dwarf2_rnglists_process): New function.
9722 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9723 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9724 (read_attribute_value): Handle DW_FORM_implicit_const,
9725 DW_FORM_line_strp.
9726 (read_attribute): Handle DW_FORM_implicit_const.
9727 (read_indirect_string_at_offset_from): New function from
9728 read_indirect_string_at_offset.
9729 (read_indirect_string_at_offset): Call
9730 read_indirect_string_at_offset_from.
9731 (read_indirect_line_string_at_offset): New function.
9732 (read_indirect_string): New function comment.
9733 (read_indirect_line_string): New function.
9734 (read_unsigned_leb128): Make it global.
9735 (dwarf2_string_attr): Handle DWARF-5.
9736 (add_include_dir_stub, read_formatted_entries): New functions.
9737 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9738 Handle DWARF-5.
9739 (per_cu_header_read_in): Update read_comp_unit_head caller.
9740 (dwarf2_version): New function.
9741 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9742 rnglists.
9743 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9744 fields.
9745
9746 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9747
9748 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9749
9750 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9751
9752 * dwarf2read.c (dwarf2_ranges_process): New function from
9753 dwarf2_ranges_read.
9754 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9755 dwarf2_ranges_process.
9756
9757 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9758
9759 * dwarf2read.c (create_debug_type_hash_table): New function from
9760 create_debug_types_hash_table.
9761 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9762 (create_all_type_units, open_and_init_dwo_file): Update
9763 create_debug_types_hash_table callers.
9764
9765 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9766
9767 PR gdb/16188
9768 * fork-child.c (trace_start_error): Fix thinko. va_end should
9769 refer to 'ap', not 'args'.
9770
9771 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9772 Pedro Alves <palves@redhat.com>
9773
9774 PR gdb/16188
9775 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9776 calls succeeded.
9777 * fork-child.c (trace_start_error): New function.
9778 (trace_start_error_with_name): Likewise.
9779 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9780 * inf-ptrace.c (inf_ptrace_me): Likewise.
9781 * inferior.h (trace_start_error): New prototype.
9782 (trace_start_error_with_name): Likewise.
9783
9784 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9785
9786 PR gdb/21164
9787 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9788 NULL before using it.
9789 * symmisc.c (maintenance_print_symbols): Likewise.
9790 (maintenance_print_msymbols): Likewise.
9791
9792 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9793
9794 * NEWS: Add record Python bindings entry.
9795
9796 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9797
9798 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9799 py-record-full.o.
9800 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9801 * python/py-record-btrace.c, python/py-record-btrace.h,
9802 python/py-record-full.c, python/py-record-full.h: New file.
9803 * python/py-record.c: Add include for py-record-btrace.h and
9804 py-record-full.h.
9805 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9806 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9807 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9808 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9809 New definition.
9810 (gdbpy_initialize_btrace): New export.
9811 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9812
9813 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9814
9815 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9816 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9817 * python/py-record.c: New file.
9818 * python/python-internal.h (gdbpy_start_recording,
9819 gdbpy_current_recording, gdpy_stop_recording,
9820 gdbpy_initialize_record): New export.
9821 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9822 (python_GdbMethods): Add gdbpy_start_recording,
9823 gdbpy_current_recording and gdbpy_stop_recording.
9824
9825 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9826
9827 * record-btrace.c (record_btrace_record_method): New function.
9828 (init_record_btrace_ops): Initialize to_record_method.
9829 * record-full.c (record_full_record_method): New function.
9830 (init_record_full_ops, init_record_full_core_ops): Add
9831 record_full_record_method.
9832 * record.h (enum record_method): New enum.
9833 * target-debug.h (target_debug_print_enum_record_method: New define.
9834 * target-delegates.c: Regenerate.
9835 * target.c (target_record_method): New function.
9836 * target.h: Include record.h.
9837 (struct target_ops) <to_record_method>: New field.
9838 (target_record_method): New export.
9839
9840 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9841
9842 * record.h (record_start, record_stop): New export.
9843 * record.c (record_start, record_stop): New function.
9844
9845 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9846
9847 * btrace.c (btrace_fetch): Copy function call segments pointer
9848 into a vector.
9849 (btrace_clear): Clear the vector.
9850 (btrace_find_insn_by_number): Use binary search to find the correct
9851 function call segment.
9852 * btrace.h (brace_fun_p): New typedef.
9853 (struct btrace_thread_info) <functions>: New field.
9854
9855 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9856
9857 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9858 * btrace.c (btrace_decode_error): ... here. New function.
9859 * btrace.h (btrace_decode_error): New export.
9860
9861 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9862
9863 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9864 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9865 btrace_find_insn_by_number): Remove special case for gaps.
9866 * btrace.h (btrace_insn_get_error): New export.
9867 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9868 * record-btrace.c (btrace_insn_history): Print number for gaps.
9869 (record_btrace_info, record_btrace_goto): Handle gaps.
9870
9871 2017-02-14 Tom Tromey <tom@tromey.com>
9872
9873 PR python/13598:
9874 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9875 event.
9876 * python/py-evts.c (gdbpy_initialize_py_events): Add
9877 before_prompt registry.
9878 * python/py-events.h (events_object) <before_prompt>: New field.
9879
9880 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9881
9882 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9883
9884 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9885
9886 * symfile (_initialize_symfile): Add usage text to the load command's
9887 help text.
9888
9889 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9890
9891 * utils.c (defaulted_query): Don't query on secondary UIs.
9892
9893 2017-02-10 Tom Tromey <tom@tromey.com>
9894
9895 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9896
9897 2017-02-10 Tom Tromey <tom@tromey.com>
9898
9899 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9900 "cleanup" local.
9901 * python/py-type.c (typy_legacy_template_argument): Remove
9902 unnecessary "cleanup" local.
9903
9904 2017-02-10 Tom Tromey <tom@tromey.com>
9905
9906 * python/python.c (do_start_initialization): New function, from
9907 _initialize_python.
9908 (_initialize_python): Call do_start_initialization.
9909 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9910 goto.
9911
9912 2017-02-10 Tom Tromey <tom@tromey.com>
9913
9914 * python/py-prettyprint.c (pretty_print_one_value): Use
9915 gdbpy_ref.
9916
9917 2017-02-10 Tom Tromey <tom@tromey.com>
9918
9919 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9920 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9921 gdbpy_ref.
9922 * python/py-type.c (field_new): Use gdbpy_ref.
9923 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9924 gdbpy_ref.
9925 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9926 (py_free_pspace): Likewise.
9927 (pspace_to_pspace_object): Likewise.
9928 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9929 (py_free_objfile): Likewise.
9930 (objfile_to_objfile_object): Likewise.
9931 * python/py-inferior.c (delete_thread_object): Use
9932 gdbpy_ref.
9933 (infpy_read_memory): Likewise.
9934 (py_free_inferior): Likewise.
9935 * python/py-evtregistry.c (create_eventregistry_object): Use
9936 gdbpy_ref.
9937 * python/py-event.c (create_event_object): Use gdbpy_ref.
9938
9939 2017-02-10 Tom Tromey <tom@tromey.com>
9940
9941 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9942 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9943 used.
9944 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9945 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9946 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9947 python/py-framefilter.c, python/py-function.c,
9948 python/py-inferior.c, python/py-infevents.c,
9949 python/py-linetable.c, python/py-newobjfileevent.c,
9950 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9951 python/py-signalevent.c, python/py-stopevent.c,
9952 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9953 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9954 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9955 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9956
9957 2017-02-10 Tom Tromey <tom@tromey.com>
9958
9959 * ui-out.h (ui_out_emit_type): New class.
9960 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9961 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9962 and ui_out_emit_tuple.
9963 (enumerate_locals): Likewise.
9964 (py_mi_print_variables, py_print_locals, py_print_args): Use
9965 ui_out_emit_list.
9966 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9967 ui_out_emit_list.
9968 * common/gdb_optional.h: New file.
9969
9970 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9971
9972 * MAINTAINERS (Write After Approval): Update my e-mail address.
9973
9974 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9975
9976 PR gdb/21122
9977 * breakpoint.c (_initialize_breakpoint): Update the help description
9978 of the 'commands' command to indicate that it takes a list argument.
9979
9980 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9981
9982 * interps.c (current_interp_set_logging): Remove "return".
9983
9984 2017-02-09 Gary Benson <gbenson@redhat.com>
9985
9986 * symtab.c (add_symtab_completions): Prevent NULL pointer
9987 dereference.
9988
9989 2017-02-08 Pedro Alves <palves@redhat.com>
9990
9991 * interps.c (interp::interp): Remove reference to quiet_p.
9992 (interp_set): Make static. Remove dead "Switching to" output
9993 code.
9994 (interp_quiet_p, interp_set_quiet): Delete.
9995 (interpreter_exec_cmd): Don't set the interpreter quiet.
9996 * interps.h (interp_quiet_p): Make static.
9997 (class interp) <quiet_p>: Remove field
9998
9999 2017-02-08 Jerome Guitton <guitton@adacore.com>
10000
10001 * cli/cli-decode.c (find_command_name_length): Make it extern.
10002 * cli/cli-decode.h (find_command_name_length): Declare.
10003 * cli/cli-script.c (command_name_equals, line_first_arg):
10004 New functions.
10005 (process_next_line): Use cli-decode to parse command names.
10006 (build_command_line): Make args a constant pointer.
10007
10008 2017-02-08 Jerome Guitton <guitton@adacore.com>
10009
10010 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10011 Remove case-insensitive search.
10012
10013 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10014
10015 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10016 at the end of the line. Avoids an ARI warning.
10017
10018 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10019
10020 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10021 rdseed instructions.
10022 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10023
10024 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10025
10026 PR tdep/20936
10027 Provide and use sparc32 and sparc64 target description XML files.
10028 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10029 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10030 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10031 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10032 * features/sparc/sparc32-solaris.xml: New file.
10033 * features/sparc/sparc64-solaris.xml: New file.
10034 * features/sparc/sparc32-solaris.c: Generated.
10035 * features/sparc/sparc64-solaris.c: Generated.
10036 * sparc-tdep.h: Account for differences in target descriptions.
10037 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10038 (sparc32_register_type): Use target provided registers.
10039 (validate_tdesc_registers): New function.
10040 (sparc32_gdbarch_init): Use tdesc_has_registers.
10041 Set pseudoregister functions.
10042 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10043 (sparc64_register_type): Use target provided registers.
10044 (sparc64_init_abi): Set pseudoregister functions.
10045
10046 2017-02-03 Tom Tromey <tom@tromey.com>
10047
10048 PR rust/21097:
10049 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10050 with a single member.
10051
10052 2017-02-03 Pedro Alves <palves@redhat.com>
10053
10054 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10055 (cli_interp_base::~cli_interp_base): New.
10056 (cli_interp): New struct.
10057 (as_cli_interp): Cast the interp itself to cli_interp.
10058 (cli_interpreter_pre_command_loop): Rename to ...
10059 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10060 parameter.
10061 (cli_interpreter_init): Rename to ...
10062 (cli_interp::init): ... this. Remove 'self' parameter. Use
10063 boolean. Make extern.
10064 (cli_interpreter_resume): Rename to ...
10065 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10066 extern.
10067 (cli_interpreter_suspend): Rename to ...
10068 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10069 extern.
10070 (cli_interpreter_exec): Rename to ...
10071 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10072 extern.
10073 (cli_interpreter_supports_command_editing): Rename to ...
10074 (cli_interp_base::supports_command_editing): ... this. Remove
10075 'interp' parameter. Make extern.
10076 (cli_ui_out): Rename to ...
10077 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10078 Make extern.
10079 (cli_set_logging): Rename to ...
10080 (cli_interp_base::set_logging): ... this. Remove 'interp'
10081 parameter. Make extern.
10082 (cli_interp_procs): Delete.
10083 (cli_interp_factory): Adjust to use "new".
10084 * cli/cli-interp.h: Include "interps.h".
10085 (struct cli_interp_base): New struct.
10086 * interps.c (struct interp): Delete. Fields moved to interps.h.
10087 (interp_new): Delete.
10088 (interp::interp, interp::~interp): New.
10089 (interp_set): Use bool, and return void. Assume the interpreter
10090 has suspend, init and resume methods, and that the all return
10091 void.
10092 (set_top_level_interpreter): interp_set returns void.
10093 (interp_ui_out): Adapt.
10094 (current_interp_set_logging): Adapt.
10095 (interp_data): Delete.
10096 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10097 (interp_exec): Adapt.
10098 (top_level_interpreter_data): Delete.
10099 * interps.h (interp_init_ftype, interp_resume_ftype)
10100 (interp_suspend_ftype, interp_exec_ftype)
10101 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10102 (class interp): New.
10103 (interp_new): Delete.
10104 (interp_set): Now returns void. Use bool.
10105 (interp_data, top_level_interpreter_data): Delete.
10106 * mi/mi-common.h: Include interps.h.
10107 (class mi_interp): Inherit from interp. Define a ctor. Declare
10108 init, resume, suspect, exec, interp_ui_out, set_logging and
10109 pre_command_loop methods.
10110 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10111 (mi_interpreter_init): Rename to ...
10112 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10113 bool, return void and make extern. Adjust.
10114 (mi_interpreter_resume): ... Rename to ...
10115 (mi_interp::resume): ... this. Remove the 'data' parameter,
10116 return void and make extern. Adjust.
10117 (mi_interpreter_suspend): ... Rename to ...
10118 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10119 return void and make extern. Adjust.
10120 (mi_interpreter_exec): ... Rename to ...
10121 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10122 extern. Adjust.
10123 (mi_interpreter_pre_command_loop): ... Rename to ...
10124 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10125 parameter and make extern.
10126 (mi_on_normal_stop_1): Adjust.
10127 (mi_ui_out): Rename to ...
10128 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10129 parameter and make extern. Adjust.
10130 (mi_set_logging): Rename to ...
10131 (mi_interp::set_logging): ... this. Remove the 'interp'
10132 parameter and make extern. Adjust.
10133 (mi_interp_procs): Delete.
10134 (mi_interp_factory): Adjust to use 'new'.
10135 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10136 (mi_print_exception, mi_execute_command, mi_load_progress):
10137 Adjust.
10138 * tui/tui-interp.c (tui_interp): New class.
10139 (as_tui_interp): Return a tui_interp pointer.
10140 (tui_on_normal_stop, tui_on_signal_received)
10141 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10142 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10143 to use interp::interp_ui_out.
10144 (tui_init): Rename to ...
10145 (tui_interp::init): ... this. Remove the 'self' parameter, use
10146 bool, return void and make extern. Adjust.
10147 (tui_resume): Rename to ...
10148 (tui_interp::resume): ... this. Remove the 'data' parameter,
10149 return void and make extern. Adjust.
10150 (tui_suspend): Rename to ...
10151 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10152 return void and make extern. Adjust.
10153 (tui_ui_out): Rename to ...
10154 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10155 parameter, and make extern. Adjust.
10156 (tui_exec): Rename to ...
10157 (tui_interp::exec): ... this. Remove the 'data' parameter and
10158 make extern.
10159 (tui_interp_procs): Delete.
10160 (tui_interp_factory): Use "new".
10161
10162 2017-02-02 Tom Tromey <tom@tromey.com>
10163
10164 * rust-exp.y (ends_raw_string, space_then_number)
10165 (rust_identifier_start_p): Return bool.
10166 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10167 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10168 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10169 (rust_chartype_p): Return bool.
10170 (val_print_struct, rust_print_struct_def, rust_print_type):
10171 Update.
10172 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10173 Return bool.
10174
10175 2017-02-02 Tom Tromey <tom@tromey.com>
10176
10177 * rust-lang.c: Reindent.
10178
10179 2017-02-02 Tom Tromey <tom@tromey.com>
10180
10181 * rust-lang.h (rust_crate_for_block): Update.
10182 * rust-lang.c (rust_crate_for_block): Return std::string.
10183 (rust_get_disr_info): Use std:;string, not
10184 gdb::unique_xmalloc_ptr.
10185 * rust-exp.y (crate_name): Update.
10186
10187 2017-02-02 Pedro Alves <palves@redhat.com>
10188
10189 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10190 field out of gdb_disassembler_test and make it static.
10191
10192 2017-02-02 Pedro Alves <palves@redhat.com>
10193
10194 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10195 mi1_interp and mi_interp fields.
10196
10197 2017-02-02 Pedro Alves <palves@redhat.com>
10198
10199 * cli/cli-interp.c (struct saved_output_files, saved_output):
10200 Moved from cli/cli-logging.c.
10201 (cli_set_logging): New function.
10202 (cli_interp_procs): Install cli_set_logging.
10203 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10204 Declare.
10205 * cli/cli-logging.c (struct saved_output_files, saved_output):
10206 Moved to cli/cli-interp.c.
10207 (pop_output_files): Don't save outputs here.
10208 (make_logging_output): New function.
10209 (handle_redirections): Don't build tee nor save previous outputs
10210 here.
10211 * interps.c (current_interp_set_logging): Change prototype.
10212 Assume there's always a set_logging_proc method installed.
10213 * interps.h (interp_set_logging_ftype): Change prototype.
10214 (current_interp_set_logging): Change prototype and adjust comment.
10215 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10216 use make_logging_output.
10217 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10218 2017-02-02 Pedro Alves <palves@redhat.com>
10219
10220 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10221 from ...
10222 (set_logging_overwrite): ... here.
10223 (logging_no_redirect_file): Delete.
10224 (set_logging_redirect): Don't handle redirection on the fly.
10225 Instead warn that "logging off" / "logging on" is necessary.
10226 (pop_output_files): Delete references to logging_no_redirect_file.
10227 (show_logging_command): Always speak in terms of what will happen
10228 once logging is reenabled.
10229
10230 2017-02-02 Pedro Alves <palves@redhat.com>
10231
10232 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10233
10234 2017-02-02 Pedro Alves <palves@redhat.com>
10235
10236 * disasm.c (gdb_pretty_print_insn): Rename to ...
10237 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10238 Remove gdbarch parameter. Adapt to clear the object's buffers
10239 instead of allocating new buffers, and to print using the object's
10240 gdb_disassembler instead of calling gdb_print_insn.
10241 (dump_insns): Use gdb_pretty_print_disassembler.
10242 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10243 (gdb_pretty_print_disassembler): New class.
10244 * record-btrace.c (btrace_insn_history): Use
10245 gdb_pretty_print_disassembler.
10246
10247 2017-02-02 Pedro Alves <palves@redhat.com>
10248
10249 * ada-lang.c (type_as_string): Use string_file.
10250 * ada-valprint.c (ada_print_floating): Use string_file.
10251 * ada-varobj.c (ada_varobj_scalar_image)
10252 (ada_varobj_get_value_image): Use string_file.
10253 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10254 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10255 * breakpoint.c (update_inserted_breakpoint_locations)
10256 (insert_breakpoint_locations, reattach_breakpoints)
10257 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10258 (print_it_watchpoint): Use string_file.
10259 (save_breakpoints): Use stdio_file.
10260 * c-exp.y (oper): Use string_file.
10261 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10262 tee_file.
10263 (pop_output_files): Use delete.
10264 (handle_redirections): Use stdio_file and tee_file.
10265 * cli/cli-setshow.c (do_show_command): Use string_file.
10266 * compile/compile-c-support.c (c_compute_program): Use
10267 string_file.
10268 * compile/compile-c-symbols.c (generate_vla_size): Take a
10269 'string_file &' instead of a 'ui_file *'.
10270 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10271 of a 'ui_file *'. Use string_file.
10272 (generate_c_for_variable_locations): Take a 'string_file &'
10273 instead of a 'ui_file *'.
10274 * compile/compile-internal.h (generate_c_for_for_one_variable):
10275 Take a 'string_file &' instead of a 'ui_file *'.
10276 * compile/compile-loc2c.c (push, pushf, unary, binary)
10277 (print_label, pushf_register_address, pushf_register)
10278 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10279 'ui_file *'. Adjust.
10280 * compile/compile.c (compile_to_object): Use string_file.
10281 * compile/compile.h (compile_dwarf_expr_to_c)
10282 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10283 'ui_file *'.
10284 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10285 (replace_typedefs_qualified_name): Use string_file and
10286 obstack_copy0.
10287 * disasm.c (gdb_pretty_print_insn): Use string_file.
10288 (gdb_disassembly): Adjust reference the null_stream global.
10289 (do_ui_file_delete): Delete.
10290 (gdb_insn_length): Use null_stream.
10291 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10292 * dwarf2loc.c (dwarf2_compile_property_to_c)
10293 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10294 'string_file &' instead of a 'ui_file *'.
10295 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10296 * dwarf2read.c (do_ui_file_peek_last): Delete.
10297 (dwarf2_compute_name): Use string_file.
10298 * event-top.c (gdb_setup_readline): Use stdio_file.
10299 * gdbarch.sh (verify_gdbarch): Use string_file.
10300 * gdbtypes.c (safe_parse_type): Use null_stream.
10301 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10302 string_file.
10303 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10304 'string_file *' instead of a 'ui_file *'.
10305 (gdbscm_arch_disassemble): Use string_file.
10306 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10307 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10308 inherits from ui_file.
10309 (ioscm_file_port_delete, ioscm_file_port_rewind)
10310 (ioscm_file_port_put): Delete.
10311 (ioscm_file_port_write): Rename to ...
10312 (ioscm_file_port::write): ... this. Remove file_port_magic
10313 checks.
10314 (ioscm_file_port_new): Delete.
10315 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10316 ui_file_up.
10317 * guile/scm-type.c (tyscm_type_name): Use string_file.
10318 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10319 Use string_file.
10320 * infcmd.c (print_return_value_1): Use string_file.
10321 * infrun.c (print_target_wait_results): Use string_file.
10322 * language.c (add_language): Use string_file.
10323 * location.c (explicit_to_string_internal): Use string_file.
10324 * main.c (captured_main_1): Use null_file.
10325 * maint.c (maintenance_print_architecture): Use stdio_file.
10326 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10327 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10328 event_channel>: Change type to mi_console_file pointer.
10329 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10330 (mi_console_file_delete): Delete.
10331 (struct mi_console_file): Delete.
10332 (mi_console_file_magic): Delete.
10333 (mi_console_file_new): Delete.
10334 (mi_console_file::mi_console_file): New.
10335 (mi_console_file_delete): Delete.
10336 (mi_console_file_fputs): Delete.
10337 (mi_console_file::write): New.
10338 (mi_console_raw_packet): Delete.
10339 (mi_console_file::flush): New.
10340 (mi_console_file_flush): Delete.
10341 (mi_console_set_raw): Rename to ...
10342 (mi_console_file::set_raw): ... this.
10343 * mi/mi-console.h (class mi_console_file): New class.
10344 (mi_console_file_new, mi_console_set_raw): Delete.
10345 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10346 (mi_set_logging): Use delete and tee_file. Adjust.
10347 * mi/mi-main.c (output_register): Use string_file.
10348 (mi_cmd_data_evaluate_expression): Use string_file.
10349 (mi_cmd_data_read_memory): Use string_file.
10350 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10351 * mi/mi-out.c (mi_ui_out::main_stream): New.
10352 (mi_ui_out::rewind): Use main_stream and
10353 string_file.
10354 (mi_ui_out::put): Use main_stream and string_file.
10355 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10356 Allocate a 'string_file' instead.
10357 (mi_out_new): Don't allocate a mem_fileopen stream here.
10358 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10359 (mi_ui_out::main_stream): Declare method.
10360 * printcmd.c (eval_command): Use string_file.
10361 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10362 * python/py-arch.c (archpy_disassemble): Use string_file.
10363 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10364 * python/py-frame.c (frapy_str): Use string_file.
10365 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10366 Use string_file.
10367 * python/py-type.c (typy_str): Use string_file.
10368 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10369 * python/py-value.c (valpy_str): Use string_file.
10370 * record-btrace.c (btrace_insn_history): Use string_file.
10371 * regcache.c (regcache_print): Use stdio_file.
10372 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10373 * remote.c (escape_buffer): Use string_file.
10374 * rust-lang.c (rust_get_disr_info): Use string_file.
10375 * serial.c (serial_open_ops_1): Use stdio_file.
10376 (do_serial_close): Use delete.
10377 * stack.c (print_frame_arg): Use string_file.
10378 (print_frame_args): Remove local mem_fileopen stream, not used.
10379 (print_frame): Use string_file.
10380 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10381 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10382 Take a 'string_file *' instead of a 'ui_file *'.
10383 * top.c (new_ui): Use stdio_file and stderr_file.
10384 (free_ui): Use delete.
10385 (execute_command_to_string): Use string_file.
10386 (quit_confirm): Use string_file.
10387 * tracepoint.c (collection_list::append_exp): Use string_file.
10388 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10389 * tui/tui-file.c: Don't include "ui-file.h".
10390 (enum streamtype, struct tui_stream): Delete.
10391 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10392 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10393 (tui_file::tui_file): New method.
10394 (tui_file_fputs): Delete.
10395 (tui_file_get_strbuf): Delete.
10396 (tui_file::puts): New method.
10397 (tui_file_adjust_strbuf): Delete.
10398 (tui_file_flush): Delete.
10399 (tui_file::flush): New method.
10400 * tui/tui-file.h: Tweak intro comment.
10401 Include ui-file.h.
10402 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10403 (tui_file_adjust_strbuf): Delete declarations.
10404 (class tui_file): New class.
10405 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10406 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10407 (tui_register_format): Use string_stream.
10408 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10409 (tui_get_function_from_frame): Use string_file.
10410 * typeprint.c (type_to_string): Use string_file.
10411 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10412 (null_stream): New global.
10413 (ui_file_delete): Delete.
10414 (ui_file::ui_file): New.
10415 (null_file_isatty): Delete.
10416 (ui_file::~ui_file): New.
10417 (null_file_rewind): Delete.
10418 (ui_file::printf): New.
10419 (null_file_put): Delete.
10420 (null_file_flush): Delete.
10421 (ui_file::putstr): New.
10422 (null_file_write): Delete.
10423 (ui_file::putstrn): New.
10424 (null_file_read): Delete.
10425 (ui_file::putc): New.
10426 (null_file_fputs): Delete.
10427 (null_file_write_async_safe): Delete.
10428 (ui_file::vprintf): New.
10429 (null_file_delete): Delete.
10430 (null_file::write): New.
10431 (null_file_fseek): Delete.
10432 (null_file::puts): New.
10433 (ui_file_data): Delete.
10434 (null_file::write_async_safe): New.
10435 (gdb_flush, ui_file_isatty): Adjust.
10436 (ui_file_put, ui_file_rewind): Delete.
10437 (ui_file_write): Adjust.
10438 (ui_file_write_for_put): Delete.
10439 (ui_file_write_async_safe, ui_file_read): Adjust.
10440 (ui_file_fseek): Delete.
10441 (fputs_unfiltered): Adjust.
10442 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10443 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10444 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10445 (set_ui_file_data): Delete.
10446 (string_file::~string_file, string_file::write)
10447 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10448 (do_ui_file_as_string, ui_file_as_string): Delete.
10449 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10450 (struct mem_file): Delete.
10451 (mem_file_new): Delete.
10452 (stdio_file::stdio_file): New.
10453 (mem_file_delete): Delete.
10454 (stdio_file::stdio_file): New.
10455 (mem_fileopen): Delete.
10456 (stdio_file::~stdio_file): New.
10457 (mem_file_rewind): Delete.
10458 (stdio_file::set_stream): New.
10459 (mem_file_put): Delete.
10460 (stdio_file::open): New.
10461 (mem_file_write): Delete.
10462 (stdio_file_magic, struct stdio_file): Delete.
10463 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10464 (stdio_file::flush): New.
10465 (stdio_file_read): Rename to ...
10466 (stdio_file::read): ... this. Adjust.
10467 (stdio_file_write): Rename to ...
10468 (stdio_file::write): ... this. Adjust.
10469 (stdio_file_write_async_safe): Rename to ...
10470 (stdio_file::write_async_safe) ... this. Adjust.
10471 (stdio_file_fputs): Rename to ...
10472 (stdio_file::puts) ... this. Adjust.
10473 (stdio_file_isatty): Delete.
10474 (stdio_file_fseek): Delete.
10475 (stdio_file::isatty): New.
10476 (stderr_file_write): Rename to ...
10477 (stderr_file::write) ... this. Adjust.
10478 (stderr_file_fputs): Rename to ...
10479 (stderr_file::puts) ... this. Adjust.
10480 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10481 (stderr_file::stderr_file): New.
10482 (tee_file_magic): Delete.
10483 (struct tee_file): Delete.
10484 (tee_file::tee_file): New.
10485 (tee_file_new): Delete.
10486 (tee_file::~tee_file): New.
10487 (tee_file_delete): Delete.
10488 (tee_file_flush): Rename to ...
10489 (tee_file::flush): ... this. Adjust.
10490 (tee_file_write): Rename to ...
10491 (tee_file::write): ... this. Adjust.
10492 (tee_file::write_async_safe): New.
10493 (tee_file_fputs): Rename to ...
10494 (tee_file::puts): ... this. Adjust.
10495 (tee_file_isatty): Rename to ...
10496 (tee_file::isatty): ... this. Adjust.
10497 * ui-file.h (struct obstack, struct ui_file): Don't
10498 forward-declare.
10499 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10500 (ui_file_write_ftype)
10501 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10502 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10503 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10504 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10505 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10506 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10507 (set_ui_file_fseek): Delete.
10508 (ui_file_data, ui_file_delete, ui_file_rewind)
10509 (struct ui_file): New.
10510 (ui_file_up): New.
10511 (class null_file): New.
10512 (null_stream): Declare.
10513 (ui_file_write_for_put, ui_file_put): Delete.
10514 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10515 Delete.
10516 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10517 (gdb_fopen, tee_file_new): Delete.
10518 (struct string_file): New.
10519 (struct stdio_file): New.
10520 (stdio_file_up): New.
10521 (struct stderr_file): New.
10522 (class tee_file): New.
10523 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10524 of a 'ui_file *'. Adjust.
10525 * ui-out.h (class ui_out) <field_stream>: Likewise.
10526 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10527 (null_stream): Delete.
10528 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10529 Adjust.
10530 * utils.h (struct ui_file): Delete forward declaration..
10531 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10532 (error_stream): Take a 'string_file &' instead of a
10533 'ui_file *'.
10534 * varobj.c (varobj_value_get_print_value): Use string_file.
10535 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10536 * gdbarch.c: Regenerate.
10537
10538 2017-02-02 Pedro Alves <palves@redhat.com>
10539
10540 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10541 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10542 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10543 Adjust to call gdb_print_insn instead of
10544 gdb_disassembler::print_insn.
10545 (dump_insns, do_mixed_source_and_assembly_deprecated)
10546 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10547 'gdbarch' parameter. Remove gdb_disassembler parameter.
10548 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10549 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10550 declaration.
10551 (gdb_pretty_print_insn): Re-add declaration.
10552 * record-btrace.c (btrace_insn_history): Don't allocate a
10553 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10554
10555 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10556
10557 * disasm.h (gdb_disassembly): Remove file_string parameter.
10558 * disasm.c (gdb_disassembly): Likewise.
10559 * cli/cli-cmds.c (print_disassembly): Adapt.
10560 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10561 * stack.c (do_gdb_disassembly): Likewise.
10562
10563 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10564
10565 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10566 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10567 targets. And if the implicit value is longer than needed, extract
10568 the first bytes instead of the "least significant" ones.
10569
10570 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10571
10572 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10573 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10574 (btrace_fetch): Assert can_access_registers_ptid.
10575 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10576 validate_registers_access.
10577
10578 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10579
10580 * gdbthread.h (can_access_registers_ptid): New.
10581 * thread.c (can_access_registers_ptid): New.
10582
10583 2017-02-01 Pedro Alves <palves@redhat.com>
10584
10585 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10586
10587 2017-01-31 Pedro Alves <palves@redhat.com>
10588
10589 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10590 Fix typos.
10591
10592 2017-01-31 Pedro Alves <palves@redhat.com>
10593
10594 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10595 not used.
10596
10597 2017-01-31 Pedro Alves <palves@redhat.com>
10598
10599 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10600
10601 2017-01-31 Pedro Alves <palves@redhat.com>
10602
10603 * common/scoped_restore.h
10604 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10605 change the value's parameter type to T2.
10606 (make_scoped_restore): Likewise.
10607
10608 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10609 Richard Henderson <rth@redhat.com>
10610
10611 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10612 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10613 GS_BASE for older kernels.
10614 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10615 GS_BASE for older kernels.
10616 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10617 and GS_BASE to the offset table.
10618 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10619 system register group.
10620 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10621 for older kernels.
10622 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10623 amd64 ABI.
10624 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10625 AMD64_GSBASE_REGNUM.
10626 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10627 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10628 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10629 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10630 i386/64bit-segments.xml in those rules.
10631 * features/i386/64bit-segments.xml: New file.
10632 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10633 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10634 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10635 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10636 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10637 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10638 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10639 * features/i386/amd64-avx-linux.c: Regenerated.
10640 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10641 * features/i386/amd64-avx-mpx.c: Regenerated.
10642 * features/i386/amd64-avx512-linux.c: Regenerated.
10643 * features/i386/amd64-linux.c: Regenerated.
10644 * features/i386/amd64-mpx-linux.c: Regenerated.
10645 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10646 * features/i386/i386-avx-mpx.c: Regenerated.
10647 * features/i386/x32-avx-linux.c: Regenerated.
10648 * features/i386/x32-avx512-linux.c: Regenerated.
10649 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10650 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10651 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10652 * regformats/i386/amd64-linux.dat: Regenerated.
10653 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10654 * regformats/i386/x32-avx-linux.dat: Regenerated.
10655 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10656 * regformats/i386/x32-linux.dat: Regenerated.
10657
10658 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10659
10660 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10661 Set to AMD64_NUM_REGS.
10662
10663 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10664
10665 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10666 that checks validity of a register number.
10667
10668 2017-01-27 Kees Cook <keescook@google.com>
10669
10670 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10671 fetch_fpregs if target has fpa registers.
10672 (arm_linux_store_inferior_registers): Call store_fpregs if target
10673 has fpa registers.
10674
10675 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10676
10677 * cris-tdep.c (cris_gdbarch_init): Remove check for
10678 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10679
10680 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10681
10682 * corelow.c (get_core_register_section): Check for regset
10683 existence before checking for REGSET_VARIABLE_SIZE.
10684
10685 2017-01-26 Yao Qi <yao.qi@linaro.org>
10686 Pedro Alves <palves@redhat.com>
10687
10688 PR gdb/20939
10689 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10690 call memory_error, save memaddr instead.
10691 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10692 negative, cal memory_error.
10693 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10694
10695 2017-01-26 Yao Qi <yao.qi@linaro.org>
10696
10697 * disasm-selftests.c (memory_error_test): New function.
10698 (_initialize_disasm_selftests): Register memory_error_test.
10699
10700 2017-01-26 Yao Qi <yao.qi@linaro.org>
10701
10702 * Makefile.in (SFILES): Add disasm-selftests.c and
10703 selftest-arch.c.
10704 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10705 * disasm-selftests.c: New file.
10706 * selftest-arch.c: New file.
10707 * selftest-arch.h: New file.
10708
10709 2017-01-26 Yao Qi <yao.qi@linaro.org>
10710
10711 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10712 to bfd_arch_mep. Don't return 0 if section is not
10713 found. Call print_insn_mep.
10714
10715 2017-01-26 Pedro Alves <palves@redhat.com>
10716 Yao Qi <yao.qi@linaro.org>
10717
10718 * arm-tdep.c: Include "disasm.h".
10719 (gdb_print_insn_arm): Update code to get gdbarch.
10720 * disasm.c (dis_asm_read_memory): Change it to
10721 gdb_disassembler::dis_asm_read_memory.
10722 (dis_asm_memory_error): Likewise.
10723 (dis_asm_print_address): Likewise.
10724 (gdb_pretty_print_insn): Change it to
10725 gdb_disassembler::pretty_print_insn.
10726 (dump_insns): Add one argument gdb_disassemlber. All
10727 callers updated.
10728 (do_mixed_source_and_assembly_deprecated): Likewise.
10729 (do_mixed_source_and_assembly): Likewise.
10730 (do_assembly_only): Likewise.
10731 (gdb_disassembler::gdb_disassembler): New.
10732 (gdb_disassembler::print_insn): New.
10733 * disasm.h (class gdb_disassembler): New.
10734 (gdb_pretty_print_insn): Remove declaration.
10735 (gdb_disassemble_info): Likewise.
10736 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10737 (gdbscm_disasm_read_memory_worker): Update.
10738 (gdbscm_disasm_read_memory): Update.
10739 (gdbscm_disasm_memory_error): Remove.
10740 (gdbscm_disasm_print_address): Remove.
10741 (gdbscm_disassembler::gdbscm_disassembler): New.
10742 (gdbscm_print_insn_from_port): Update.
10743 * mips-tdep.c: Include disasm.h.
10744 (gdb_print_insn_mips): Update code to get gdbarch.
10745 * record-btrace.c (btrace_insn_history): Update.
10746 * spu-tdep.c: Include disasm.h.
10747 (struct spu_dis_asm_data): Remove.
10748 (struct spu_dis_asm_info): New.
10749 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10750 SPU id.
10751 (gdb_print_insn_spu): Cast disassemble_info to
10752 spu_dis_asm_info.
10753
10754 2017-01-26 Yao Qi <yao.qi@linaro.org>
10755
10756 * disasm.c (do_ui_file_delete): Delete.
10757 (gdb_insn_length): Move code creating stream to ...
10758 * utils.c (null_stream): ... here. New function.
10759 * utils.h (null_stream): Declare.
10760
10761 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10762
10763 * python/py-inferior.c (find_thread_object): Return directly
10764 from the loop. Remove "found" variable.
10765
10766 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10767
10768 GDB 7.12.1 released.
10769
10770 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10771
10772 * python/py-function.c (fnpy_call): Reorder declarations to have
10773 the gdbpy_enter object declared first.
10774 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10775
10776 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10777
10778 PR python/21068
10779 * python/python-internal.h (PyMem_RawMalloc): Define for
10780 Python < 3.4.
10781 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10782 PyMem_RawMalloc instead of PyMem_Malloc.
10783
10784 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10785 Luis Machado <lgustavo@codesourcery.com>
10786
10787 * NEWS (New commands): Mention flash-erase.
10788 (New MI commands): Mention target-flash-erase.
10789 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10790 command.
10791 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10792 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10793 * target.c (flash_erase_command): New function.
10794 (initialize_targets): Add new flash-erase command.
10795 * target.h (flash_erase_command): New declaration.
10796
10797 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10798
10799 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10800 HAVE_SYS_PROCFS_H is defined.
10801
10802 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10803
10804 * remote.c (struct cached_reg): Change data into a pointer.
10805 * (stop_reply_dtr): Free data pointers before deleting vector.
10806 (process_stop_reply): Likewise.
10807 (remote_parse_stop_reply): Allocate space for data
10808
10809 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10810
10811 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10812 MAX_REGISTER_SIZE.
10813 (amd64_pseudo_register_read_value): Likewise.
10814 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10815 (store_register_using_P): Likewise.
10816 * regcache.c (regcache_xfer_part): Likewise.
10817
10818 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10819
10820 Split real and pseudo registers.
10821 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10822 (sparc32_pseudo_regnum): New enum.
10823 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10824 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10825 (SPARC32_CP0_REGISTERS): New macro.
10826 (sparc32_pseudo_register_name): New function.
10827 (sparc32_register_name): Use sparc32_pseudo_register_name.
10828 (sparc32_pseudo_register_type): New function.
10829 (sparc32_register_type): Use sparc32_pseudo_register_type.
10830 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10831 pseudo register numbers.
10832 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10833 (SPARC64_CP0_REGISTERS): New macro.
10834 (sparc64_pseudo_register_name): New function.
10835 (sparc64_register_name): Use sparc64_pseudo_register_name.
10836 (sparc64_pseudo_register_type): New function.
10837 (sparc64_register_type): Use sparc64_pseudo_register_type.
10838 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10839 pseudo register numbers.
10840 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10841 sparc64_store_arguments): Handle pseudo register numbers.
10842
10843 2017-01-13 Yao Qi <yao.qi@linaro.org>
10844
10845 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10846 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10847 output.
10848 (getpkt_or_notif_sane_1): Likewise.
10849
10850 2017-01-13 Yao Qi <yao.qi@linaro.org>
10851
10852 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10853 of CC. Pass "-x c++-header" instead of "-x c".
10854
10855 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10856
10857 * remote.c (remote_can_async_p): Update comment.
10858
10859 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10860
10861 * linux-nat.c (linux_nat_can_async_p): Update comment.
10862
10863 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10864
10865 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10866
10867 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10868
10869 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10870
10871 2017-01-10 Tom Tromey <tom@tromey.com>
10872
10873 * python/py-type.c (typy_legacy_template_argument): Update.
10874 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10875 ~demangle_parse_info): Declare new members.
10876 (cp_demangled_name_to_comp): Return unique_ptr.
10877 (cp_demangled_name_parse_free)
10878 (make_cleanup_cp_demangled_name_parse_free)
10879 (cp_new_demangle_parse_info): Remove.
10880 * cp-support.c (do_demangled_name_parse_free_cleanup)
10881 (make_cleanup_cp_demangled_name_parse_free): Remove.
10882 (inspect_type, cp_canonicalize_string_full)
10883 (cp_canonicalize_string): Update.
10884 (mangled_name_to_comp): Change return type.
10885 (cp_class_name_from_physname, method_name_from_physname)
10886 (cp_func_name, cp_remove_params): Update.
10887 * cp-name-parser.y (demangle_parse_info): New constructor, from
10888 cp_new_demangle_parse_info.
10889 (~demangle_parse_info): New destructor, from
10890 cp_demangled_name_parse_free.
10891 (cp_merge_demangle_parse_infos): Update.
10892 (cp_demangled_name_to_comp): Change return type.
10893
10894 2017-01-10 Tom Tromey <tom@tromey.com>
10895
10896 * top.c (prevent_dont_repeat): Change return type.
10897 * python/python.c (execute_gdb_command): Use std::string.
10898 Update.
10899 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10900 * command.h (prevent_dont_repeat): Change return type.
10901 * breakpoint.c (bpstat_do_actions_1): Update.
10902
10903 2017-01-10 Tom Tromey <tom@tromey.com>
10904
10905 * value.h (scoped_value_mark::~scoped_value_mark): Call
10906 free_to_mark.
10907 (scoped_value_mark::free_to_mark): New method.
10908 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10909 scoped_value_mark.
10910
10911 2017-01-10 Tom Tromey <tom@tromey.com>
10912
10913 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10914 (valpy_reference_value, valpy_const_value, valpy_get_address)
10915 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10916 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10917 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10918 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10919 scoped_value_mark.
10920 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10921 * value.h (scoped_value_mark): New class.
10922
10923 2017-01-10 Tom Tromey <tom@tromey.com>
10924
10925 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10926 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10927 * psymtab.c (discard_psymtabs_upto): Remove.
10928 (make_cleanup_discard_psymtabs): Remove.
10929 (struct psymtab_state): Remove.
10930
10931 2017-01-10 Tom Tromey <tom@tromey.com>
10932
10933 * record-full.c (record_full_save_cleanups): Remove.
10934 (record_full_save): Use gdb::unlinker.
10935 * gcore.c (do_bfd_delete_cleanup): Remove.
10936 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10937 cleanups.
10938 * dwarf2read.c (unlink_if_set): Remove.
10939 (write_psymtabs_to_index): Use gdb::unlinker.
10940 * common/gdb_unlinker.h: New file.
10941
10942 2017-01-10 Tom Tromey <tom@tromey.com>
10943
10944 * windows-tdep.c (windows_xfer_shared_library): Update.
10945 * windows-nat.c (windows_make_so): Update.
10946 * utils.h (make_cleanup_bfd_unref): Remove.
10947 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10948 * symfile.h (symfile_bfd_open)
10949 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10950 * symfile.c (read_symbols, symbol_file_add)
10951 (separate_debug_file_exists): Update.
10952 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10953 (generic_load, reread_symbols): Update.
10954 * symfile-mem.c (symbol_file_add_from_memory): Update.
10955 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10956 (spu_symbol_file_add_from_memory): Update.
10957 * solist.h (struct target_so_ops) <bfd_open>: Return
10958 gdb_bfd_ref_ptr.
10959 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10960 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10961 gdb_bfd_ref_ptr.
10962 (solib_map_sections, reload_shared_libraries_1): Update.
10963 * solib-svr4.c (enable_break): Update.
10964 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10965 * solib-frv.c (enable_break2): Update.
10966 * solib-dsbt.c (enable_break): Update.
10967 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10968 gdb_bfd_ref_ptr.
10969 (darwin_solib_get_all_image_info_addr_at_init): Update.
10970 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10971 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10972 * record-full.c (record_full_save): Update.
10973 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10974 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10975 * minidebug.c (find_separate_debug_file_in_section): Return
10976 gdb_bfd_ref_ptr.
10977 * machoread.c (macho_add_oso_symfile): Change abfd to
10978 gdb_bfd_ref_ptr.
10979 (macho_symfile_read_all_oso): Update.
10980 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10981 (macho_symfile_read): Update.
10982 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10983 (jit_bfd_try_read_symtab): Update.
10984 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10985 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10986 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10987 gdb_bfd_ref_ptr.
10988 (gdb_bfd_ref_policy): New struct.
10989 (gdb_bfd_ref_ptr): New typedef.
10990 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10991 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10992 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10993 gdb_bfd_ref_ptr.
10994 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10995 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10996 (gcore_command): Update.
10997 * exec.c (exec_file_attach): Update.
10998 * elfread.c (elf_symfile_read): Update.
10999 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11000 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11001 (open_and_init_dwo_file): Update.
11002 (open_dwp_file): Return gdb_bfd_ref_ptr.
11003 (open_and_init_dwp_file): Update.
11004 * corelow.c (core_open): Update.
11005 * compile/compile-object-load.c (compile_object_load): Update.
11006 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11007 * coffread.c (coff_symfile_read): Update.
11008 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11009 gdb_bfd_ref_ptr. Rename.
11010 (dump_bfd_file, restore_command): Update.
11011 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11012 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11013 (find_separate_debug_file_by_buildid): Update.
11014
11015 2017-01-10 Tom Tromey <tom@tromey.com>
11016
11017 * common/gdb_ref_ptr.h: New file.
11018 * python/py-ref.h (struct gdbpy_ref_policy): New.
11019 (gdbpy_ref): Now a typedef.
11020
11021 2017-01-10 Tom Tromey <tom@tromey.com>
11022
11023 * utils.h (make_cleanup_htab_delete): Don't declare.
11024 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11025 Remove.
11026 * linespec.c (decode_compound_collector): Add constructor,
11027 destructor.
11028 (lookup_prefix_sym): Remove cleanup.
11029 (symtab_collector): Add constructor, destructor.
11030 (collect_symtabs_from_filename): Remove cleanup.
11031 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11032 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11033 Use htab_up.
11034 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11035 * dwarf2read.c (dw2_expand_symtabs_matching)
11036 (dw2_map_symbol_filenames, dwarf_decode_macros)
11037 (write_psymtabs_to_index): Use htab_up.
11038 * dwarf2loc.c (func_verify_no_selftailcall)
11039 (call_site_find_chain_1, func_verify_no_selftailcall)
11040 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11041 std::vector, gdb::unique_xmalloc_ptr.
11042 (call_sitep): Remove typedef.
11043 (dwarf2_locexpr_baton_eval): Remove unused variable.
11044
11045 2017-01-10 Tom Tromey <tom@tromey.com>
11046
11047 * python/python-internal.h (make_cleanup_py_decref)
11048 (make_cleanup_py_xdecref): Don't declare.
11049 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11050 (py_xdecref, make_cleanup_py_xdecref): Remove.
11051
11052 2017-01-10 Tom Tromey <tom@tromey.com>
11053
11054 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11055 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11056
11057 2017-01-10 Tom Tromey <tom@tromey.com>
11058
11059 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11060
11061 2017-01-10 Tom Tromey <tom@tromey.com>
11062
11063 * python/py-utils.c (unicode_to_encoded_string)
11064 (python_string_to_target_string)
11065 (python_string_to_target_python_string)
11066 (python_string_to_host_string, gdbpy_obj_to_string)
11067 (get_addr_from_python): Use gdbpy_ref.
11068
11069 2017-01-10 Tom Tromey <tom@tromey.com>
11070
11071 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11072 gdbpy_ref.
11073
11074 2017-01-10 Tom Tromey <tom@tromey.com>
11075
11076 * python/python.c (eval_python_command, gdbpy_decode_line)
11077 (gdbpy_run_events, gdbpy_start_type_printers)
11078 (gdbpy_apply_type_printers): Use gdbpy_ref.
11079
11080 2017-01-10 Tom Tromey <tom@tromey.com>
11081
11082 * python/py-param.c (get_doc_string, compute_enum_values): Use
11083 gdbpy_ref.
11084
11085 2017-01-10 Tom Tromey <tom@tromey.com>
11086
11087 * python/py-inferior.c (find_thread_object, build_inferior_list):
11088 Use gdbpy_ref.
11089
11090 2017-01-10 Tom Tromey <tom@tromey.com>
11091
11092 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11093
11094 2017-01-10 Tom Tromey <tom@tromey.com>
11095
11096 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11097 gdbpy_ref.
11098
11099 2017-01-10 Tom Tromey <tom@tromey.com>
11100
11101 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11102 extra incref.
11103 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11104 Use gdbpy_ref.
11105
11106 2017-01-10 Tom Tromey <tom@tromey.com>
11107
11108 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11109 gdbpy_ref.
11110
11111 2017-01-10 Tom Tromey <tom@tromey.com>
11112
11113 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11114 decref results of PyArg_ParseTupleAndKeywords.
11115
11116 2017-01-10 Tom Tromey <tom@tromey.com>
11117
11118 * python/python.c (python_run_simple_file): Use
11119 unique_xmalloc_ptr, gdbpy_ref.
11120
11121 2017-01-10 Tom Tromey <tom@tromey.com>
11122
11123 * python/py-prettyprint.c (print_stack_unless_memory_error)
11124 (print_string_repr, print_children): Use gdbpy_ref.
11125 (dummy_python_frame): New class.
11126 (dummy_python_frame::dummy_python_frame): Rename from
11127 push_dummy_python_frame.
11128 (py_restore_tstate): Remove.
11129
11130 2017-01-10 Tom Tromey <tom@tromey.com>
11131
11132 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11133
11134 2017-01-10 Tom Tromey <tom@tromey.com>
11135
11136 * python/python.c (ensure_python_env, restore_python_env):
11137 Remove.
11138 * python/python-internal.h (ensure_python_env): Don't declare.
11139 * varobj.h (varobj_ensure_python_env): Don't declare.
11140 * varobj.c (varobj_ensure_python_env): Remove.
11141
11142 2017-01-10 Tom Tromey <tom@tromey.com>
11143
11144 * varobj.c (varobj_value_get_print_value): Use
11145 gdbpy_enter_varobj.
11146
11147 2017-01-10 Tom Tromey <tom@tromey.com>
11148
11149 * python/py-prettyprint.c (print_string_repr, print_children):
11150 Update.
11151 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11152 of "encoding".
11153 * varobj.c (varobj_value_get_print_value): Update.
11154 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11155
11156 2017-01-10 Tom Tromey <tom@tromey.com>
11157
11158 * varobj.c (varobj_get_display_hint)
11159 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11160 (varobj_set_visualizer, free_variable): Use
11161 gdbpy_enter_varobj.
11162
11163 2017-01-10 Tom Tromey <tom@tromey.com>
11164
11165 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11166 (do_finish_initialization): New function. Use gdbpy_ref.
11167 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11168 do_finish_initialization.
11169
11170 2017-01-10 Tom Tromey <tom@tromey.com>
11171
11172 * python/py-param.c (get_set_value, get_show_value): Use
11173 gdbpy_enter, gdbpy_ref.
11174
11175 2017-01-10 Tom Tromey <tom@tromey.com>
11176
11177 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11178
11179 2017-01-10 Tom Tromey <tom@tromey.com>
11180
11181 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11182
11183 2017-01-10 Tom Tromey <tom@tromey.com>
11184
11185 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11186 Use gdbpy_enter_varobj.
11187
11188 2017-01-10 Tom Tromey <tom@tromey.com>
11189
11190 * varobj.c (gdbpy_enter_varobj): New constructor.
11191 * python/python-internal.h (gdbpy_enter_varobj): New class.
11192 * python/py-varobj.c (py_varobj_get_iterator): Use
11193 gdbpy_enter_varobj.
11194
11195 2017-01-10 Tom Tromey <tom@tromey.com>
11196
11197 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11198 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11199 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11200 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11201 unique_xmalloc_ptr.
11202 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11203
11204 2017-01-10 Tom Tromey <tom@tromey.com>
11205
11206 * python/py-xmethods.c (invoke_match_method): Use
11207 gdbpy_ref.
11208
11209 2017-01-10 Tom Tromey <tom@tromey.com>
11210
11211 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11212 gdbpy_enter, gdbpy_ref.
11213
11214 2017-01-10 Tom Tromey <tom@tromey.com>
11215
11216 * python/python.c (python_interactive_command): Use gdbpy_enter.
11217
11218 2017-01-10 Tom Tromey <tom@tromey.com>
11219
11220 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11221 gdbpy_ref.
11222
11223 2017-01-10 Tom Tromey <tom@tromey.com>
11224
11225 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11226 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11227
11228 2017-01-10 Tom Tromey <tom@tromey.com>
11229
11230 * utils.h (htab_deleter): New struct.
11231 (htab_up): New typedef.
11232 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11233 gdbpy_enter, gdbpy_ref, htab_up.
11234
11235 2017-01-10 Tom Tromey <tom@tromey.com>
11236
11237 * python/py-unwind.c (pending_frame_invalidate): Remove.
11238 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11239
11240 2017-01-10 Tom Tromey <tom@tromey.com>
11241
11242 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11243 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11244
11245 2017-01-10 Tom Tromey <tom@tromey.com>
11246
11247 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11248
11249 2017-01-10 Tom Tromey <tom@tromey.com>
11250
11251 * python/python.c (gdbpy_eval_from_control_command)
11252 (gdbpy_source_script, gdbpy_run_events)
11253 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11254 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11255 gdbpy_enter.
11256
11257 2017-01-10 Tom Tromey <tom@tromey.com>
11258
11259 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11260
11261 2017-01-10 Tom Tromey <tom@tromey.com>
11262
11263 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11264
11265 2017-01-10 Tom Tromey <tom@tromey.com>
11266
11267 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11268 (python_on_inferior_call_pre, python_on_inferior_call_post)
11269 (python_on_memory_change, python_on_register_change)
11270 (python_inferior_exit, python_new_objfile, add_thread_object)
11271 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11272
11273 2017-01-10 Tom Tromey <tom@tromey.com>
11274
11275 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11276 (bpfinishpy_handle_exit): Use gdbpy_enter.
11277
11278 2017-01-10 Tom Tromey <tom@tromey.com>
11279
11280 * python/py-cmd.c (cmdpy_destroyer)
11281 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11282 gdbpy_enter.
11283
11284 2017-01-10 Tom Tromey <tom@tromey.com>
11285
11286 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11287 gdbpy_enter.
11288 (gdbpy_breakpoint_has_cond): Likewise.
11289
11290 2017-01-10 Tom Tromey <tom@tromey.com>
11291
11292 * python/python.c (gdbpy_enter): New constructor.
11293 (~gdbpy_enter): New destructor.
11294 (restore_python_env, ensure_python_env): Rewrite.
11295 * python/python-internal.h (gdbpy_enter): New class.
11296
11297 2017-01-10 Tom Tromey <tom@tromey.com>
11298
11299 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11300
11301 2017-01-10 Tom Tromey <tom@tromey.com>
11302
11303 * python/py-value.c (value_has_field, get_field_flag)
11304 (get_field_type, valpy_getitem, convert_value_from_python): Use
11305 gdbpy_ref.
11306
11307 2017-01-10 Tom Tromey <tom@tromey.com>
11308
11309 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11310 gdbpy_ref.
11311
11312 2017-01-10 Tom Tromey <tom@tromey.com>
11313
11314 * python/py-prettyprint.c (search_pp_list)
11315 (find_pretty_printer_from_objfiles)
11316 (find_pretty_printer_from_progspace)
11317 (find_pretty_printer_from_gdb, find_pretty_printer)
11318 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11319 gdbpy_ref.
11320
11321 2017-01-10 Tom Tromey <tom@tromey.com>
11322
11323 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11324
11325 2017-01-10 Tom Tromey <tom@tromey.com>
11326
11327 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11328 (ltpy_get_all_source_lines): Use gdbpy_ref.
11329
11330 2017-01-10 Tom Tromey <tom@tromey.com>
11331
11332 * python/py-framefilter.c (extract_sym, extract_value)
11333 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11334 gdbpy_ref.
11335
11336 2017-01-10 Tom Tromey <tom@tromey.com>
11337
11338 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11339
11340 2017-01-10 Tom Tromey <tom@tromey.com>
11341
11342 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11343
11344 2017-01-10 Tom Tromey <tom@tromey.com>
11345
11346 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11347 gdbpy_ref.
11348
11349 2017-01-10 Tom Tromey <tom@tromey.com>
11350
11351 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11352
11353 2017-01-10 Tom Tromey <tom@tromey.com>
11354
11355 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11356 (typy_range): Use gdbpy_ref.
11357
11358 2017-01-10 Tom Tromey <tom@tromey.com>
11359
11360 * python/py-threadevent.c (create_thread_event_object): Use
11361 gdbpy_ref.
11362 * python/py-stopevent.c (create_stop_event_object): Simplify.
11363 (emit_stop_event): Use gdbpy_ref.
11364 * python/py-signalevent.c (create_signal_event_object): Use
11365 gdbpy_ref.
11366 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11367 (emit_new_objfile_event, create_clear_objfiles_event_object)
11368 (emit_clear_objfiles_event): Use gdbpy_ref.
11369 * python/py-infevents.c (create_inferior_call_event_object)
11370 (create_register_changed_event_object)
11371 (create_memory_changed_event_object, emit_inferior_call_event)
11372 (emit_memory_changed_event, emit_register_changed_event): Use
11373 gdbpy_ref.
11374 * python/py-exitedevent.c (create_exited_event_object)
11375 (emit_exited_event): Use gdbpy_ref.
11376 * python/py-event.h (evpy_emit_event): Remove
11377 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11378 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11379 * python/py-continueevent.c (emit_continue_event): Use
11380 gdbpy_ref.
11381 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11382 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11383 gdbpy_ref.
11384 * python/py-bpevent.c (create_breakpoint_event_object): Use
11385 gdbpy_ref.
11386
11387 2017-01-10 Tom Tromey <tom@tromey.com>
11388
11389 * python/py-ref.h: New file.
11390
11391 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11392
11393 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11394 void.
11395 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11396 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11397 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11398 * ui-out.c (ui_out::redirect): Likewise.
11399 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11400 * cli/cli-logging.c (set_logging_redirect): Update call site of
11401 ui_out::redirect.
11402 (handle_redirections): Likewise.
11403 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11404 * top.c (execute_command_to_string): Likewise.
11405 * utils.c (do_ui_out_redirect_pop): Likewise.
11406
11407 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11408
11409 * stack.c (_initialize_stack): Update "frame" command help message.
11410
11411 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11412
11413 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11414
11415 2017-01-06 Yao Qi <yao.qi@linaro.org>
11416
11417 * x86-linux-nat.h: Include gdb_proc_service.h.
11418
11419 2017-01-06 Yao Qi <yao.qi@linaro.org>
11420
11421 * ser-base.h: Include serial.h.
11422
11423 2017-01-06 Yao Qi <yao.qi@linaro.org>
11424
11425 * ppc-linux-tdep.h: Include ppc-tdep.h.
11426
11427 2017-01-06 Yao Qi <yao.qi@linaro.org>
11428
11429 * nat/amd64-linux-siginfo.h: Include signal.h.
11430
11431 2017-01-06 Yao Qi <yao.qi@linaro.org>
11432
11433 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11434
11435 2017-01-06 Yao Qi <yao.qi@linaro.org>
11436
11437 * mi/mi-parse.h: Include mi-cmds.h.
11438
11439 2017-01-06 Yao Qi <yao.qi@linaro.org>
11440
11441 * inf-loop.c: Don't include "target.h".
11442 * inf-loop.h: Include it here.
11443
11444 2017-01-06 Yao Qi <yao.qi@linaro.org>
11445
11446 * dfp.h: Include "dboulest.h" and "expression.h".
11447
11448 2017-01-06 Yao Qi <yao.qi@linaro.org>
11449
11450 * ax-gdb.h: Include "ax.h".
11451
11452 2017-01-06 Yao Qi <yao.qi@linaro.org>
11453
11454 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11455 with nat/gdb_ptrace.h.
11456
11457 2017-01-05 Yao Qi <yao.qi@linaro.org>
11458
11459 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11460 new line.
11461 (mips64_fbsd_sigframe_init): Likewise.
11462
11463 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11464
11465 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11466 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11467
11468 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11469
11470 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11471 * NEWS: Mention new FreeBSD/mips native configuration.
11472 * config/mips/fbsd.mh: New file.
11473 * configure.host: Add mips*-*-freebsd*.
11474 * mips-fbsd-nat.c: New file.
11475
11476 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11477
11478 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11479 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11480 * NEWS: Mention new FreeBSD/mips target.
11481 * configure.tgt: Add mips*-*-freebsd*.
11482 * mips-fbsd-tdep.c: New file.
11483 * mips-fbsd-tdep.h: New file.
11484
11485 2017-01-04 Yao Qi <yao.qi@linaro.org>
11486
11487 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11488 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11489
11490 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11491
11492 Update copyright year range in all GDB files.
11493
11494 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11495
11496 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11497
11498 For older changes see ChangeLog-2016.
11499 \f
11500 Local Variables:
11501 mode: change-log
11502 left-margin: 8
11503 fill-column: 74
11504 version-control: never
11505 coding: utf-8
11506 End:
This page took 0.251624 seconds and 5 git commands to generate.