Constify some commands in symfile.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-27 Tom Tromey <tom@tromey.com>
2
3 * symfile.c (add_symbol_file_command)
4 (remove_symbol_file_command, list_overlays_command)
5 (map_overlay_command, unmap_overlay_command)
6 (overlay_auto_command, overlay_manual_command)
7 (overlay_off_command, overlay_load_command): Constify.
8
9 2017-09-27 Tom Tromey <tom@tromey.com>
10
11 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
12 (info_spu_mailbox_command, info_spu_dma_command)
13 (info_spu_proxydma_command): Constify.
14
15 2017-09-27 Tom Tromey <tom@tromey.com>
16
17 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
18
19 2017-09-27 Tom Tromey <tom@tromey.com>
20
21 * cli/cli-script.c (user_defined_command): Constify.
22
23 2017-09-27 Tom Tromey <tom@tromey.com>
24
25 * cli/cli-dump.c (dump_memory_command, dump_value_command)
26 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
27 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
28 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
29 (dump_binary_value, append_binary_memory, append_binary_value):
30 Constify.
31 (struct dump_context) <func>: Constify.
32 (add_dump_command): Update.
33
34 2017-09-27 Tom Tromey <tom@tromey.com>
35
36 * cli/cli-cmds.c (show_version, show_configuration)
37 (source_command, show_user): Constify.
38
39 2017-09-27 Tom Tromey <tom@tromey.com>
40
41 * target.c (maintenance_print_target_stack): Constify.
42
43 2017-09-27 Tom Tromey <tom@tromey.com>
44
45 * interps.c (interpreter_exec_cmd): Constify.
46
47 2017-09-27 Tom Tromey <tom@tromey.com>
48
49 * record-full.c (cmd_record_full_restore): Constify.
50
51 2017-09-27 Tom Tromey <tom@tromey.com>
52
53 * memattr.c (enable_mem_command, disable_mem_command)
54 (delete_mem_command): Constify.
55
56 2017-09-27 Tom Tromey <tom@tromey.com>
57
58 * value.c (show_convenience): Constify.
59
60 2017-09-27 Tom Tromey <tom@tromey.com>
61
62 * gdbcore.h (core_file_command): Update.
63 * corefile.c (core_file_command): Constify.
64
65 2017-09-27 Tom Tromey <tom@tromey.com>
66
67 * user-regs.c (maintenance_print_user_registers): Constify.
68
69 2017-09-27 Tom Tromey <tom@tromey.com>
70
71 * cp-namespace.c (maintenance_cplus_namespace): Constify.
72
73 2017-09-27 Tom Tromey <tom@tromey.com>
74
75 * cp-support.c (first_component_command): Constify.
76
77 2017-09-27 Tom Tromey <tom@tromey.com>
78
79 * psymtab.c (maintenance_print_psymbols)
80 (maintenance_info_psymtabs, maintenance_check_psymtabs):
81 Constify.
82
83 2017-09-27 Tom Tromey <tom@tromey.com>
84
85 * windows-tdep.c (display_tib): Constify.
86
87 2017-09-27 Tom Tromey <tom@tromey.com>
88
89 * linux-fork.c (delete_checkpoint_command)
90 (detach_checkpoint_command): Constify.
91
92 2017-09-27 Tom Tromey <tom@tromey.com>
93
94 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
95
96 2017-09-27 Tom Tromey <tom@tromey.com>
97
98 * arc-tdep.c (dump_arc_instruction_command): Constify.
99
100 2017-09-27 Tom Tromey <tom@tromey.com>
101
102 * valprint.c (set_radix, show_radix): Constify.
103
104 2017-09-27 Tom Tromey <tom@tromey.com>
105
106 * dtrace-probe.c (info_probes_dtrace_command): Constify.
107
108 2017-09-27 Tom Tromey <tom@tromey.com>
109
110 * command.h (not_just_help_class_command): Update.
111 * cli/cli-decode.h (not_just_help_class_command): Update.
112 * cli/cli-decode.c (not_just_help_class_command): Constify.
113
114 2017-09-27 Tom Tromey <tom@tromey.com>
115
116 * gdb_bfd.c (maintenance_info_bfds): Constify.
117
118 2017-09-27 Tom Tromey <tom@tromey.com>
119
120 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
121 overloads.
122 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
123 (do_const_cfunc): New function.
124 (cmd_cfunc_eq): New overload.
125 (cli_user_command_p): Check do_const_cfunc.
126 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
127 const_cfunc.
128 * command.h (add_cmd): Add const overload and no-function
129 overload.
130 (set_cmd_cfunc): Add const overload.
131 (cmd_const_cfunc_ftype): Declare.
132 (cmd_cfunc_eq): Add const overload.
133 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
134 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
135 overload.
136
137 2017-09-27 Tom Tromey <tom@tromey.com>
138
139 * macroexp.c (get_next_token_for_substitution): New function.
140 (substitute_args): Call it. Check for __VA_OPT__.
141
142 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
143 Pedro Alves <palves@redhat.com>
144
145 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
146 producer_is_icc_lt_14.
147 (producer_is_icc_lt_14): New function.
148 (check_producer): Add code for checking version of ICC.
149 (producer_is_icc): Move to producer.c.
150 (read_structure_type): Restrict ICC workaround to ICC<14.
151 * producer.c: Include selftest.h.
152 (producer_is_icc, producer_parsing_tests, _initialize_producer):
153 New functions.
154 * producer.h (producer_is_icc): New declaration.
155
156 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
157
158 * Makefile.in (SFILES): Add producer.c.
159 (COMMON_OBS): Add producer.o
160 * amd64-tdep.c (producer.h): Add new include.
161 * dwarf2read.c (producer.h): Add new include.
162 * producer.c: New file.
163 * producer.h: New file.
164 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
165 producer.c.
166 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
167 producer.h.
168
169 2017-09-26 Matthias Klose <doko@ubuntu.com>
170
171 * configure.ac: Search ncursesw before ncurses.
172 Check ncursesw/ncurses.h before ncurses/ncurses.h.
173 * gdb_curses.h: Include <ncursesw/ncurses.h>
174 * config.in, configure: Regenerate.
175
176 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
177
178 PR gdb/22185
179 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
180 obsolete.
181 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
182 Remove i386sol2 support.
183 * configure.nat <i386sol2>: Remove.
184 <sol2-64>: Fold into ...
185 <sol2>: ... this.
186 Move common settings to default section.
187 Add sol-thread.o.
188 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
189 x86_64-*-solaris2.1[0-9]*>: Rename to ...
190 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
191 <i[34567]86-*-solaris*>: Remove.
192 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
193
194 * configure.ac: Remove wctype in libw check.
195 (_MSE_INT_H): Don't define on Solaris 7-9.
196 <solaris*>: Remove libthread_db.so.1 check.
197 * configure: Regenerate.
198 * config.in: Regenerate.
199
200 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
201 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
202 (gdb_ps_size_t): Remove.
203 Use base types in users.
204 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
205
206 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
207
208 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
209
210 PR build/22206
211 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
212 (adi_is_addr_mapped): Likewise.
213 (PSR_ICC): Don't redefine.
214 (PSR_IMPL): Likewise.
215
216 2017-09-25 Tom Tromey <tom@tromey.com>
217
218 * regcache.c (regcache::dump): Use string_printf.
219
220 2017-09-25 Tom Tromey <tom@tromey.com>
221
222 * regcache.c (class regcache_invalidator): New.
223 (struct register_to_invalidate): Remove.
224 (make_cleanup_regcache_invalidate): Remove.
225 (regcache::raw_write): Use regcache_invalidator.
226
227 2017-09-25 Tom Tromey <tom@tromey.com>
228
229 * spu-tdep.c (spu2ppu_sniffer): Update.
230 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
231 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
232 Remove.
233 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
234 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
235 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
236 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
237 (frame_pop): Update.
238
239 2017-09-25 Tom Tromey <tom@tromey.com>
240
241 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
242 * regcache.h (regcache_xfree): Don't declare.
243 * regcache.c (regcache_xfree): Remove.
244 (do_regcache_xfree): Use delete.
245 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
246 * linux-fork.c (free_fork): Use delete.
247 (fork_save_infrun_state): Likewise.
248 * jit.c (jit_dealloc_cache): Use delete.
249 * infrun.c (discard_infcall_suspend_state): Use delete.
250
251 2017-09-25 Tom Tromey <tom@tromey.com>
252
253 * regcache.h (regcache_xmalloc): Don't declare.
254 (regcache_raw_set_cached_value): Update comment.
255 * regcache.c (regcache_xmalloc): Remove.
256 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
257 * jit.c (jit_frame_sniffer): Use new.
258 * frame.c (frame_save_as_regcache): Use new.
259
260 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
261
262 * NEWS: Advertise support for guarded-storage registers on IBM z.
263
264 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
265
266 * s390-linux-nat.c (have_regset_gs): New static variable.
267 (s390_linux_fetch_inferior_registers): Handle guarded-storage
268 control block and guarded-storage broadcast control regsets.
269 (s390_read_description): Detect whether the target has
270 guarded-storage support, return appropriate tdesc.
271 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
272 (features/s390x-gs-linux64.c): Likewise.
273 (struct gdbarch_tdep) <have_gs>: New field.
274 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
275 (s390_gsbc_regset): New variables.
276 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
277 and s390_gsbc_regset, if applicable.
278 (s390_core_read_description): Check whether core file was from a
279 target with guarded-storage support; include appropriate regsets.
280 (s390_gdbarch_init): Add registers for guarded-storage support.
281 (_initialize_s390_tdep): Initialize new target descriptions that
282 include registers for guarded-storage support.
283 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
284 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
285 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
286 (S390_NUM_REGS): Adjust macro definition.
287 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
288 (tdesc_s390x_gs_linux64): New declarations.
289
290 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
291
292 * features/s390-gs-linux64.xml: New file.
293 * features/s390-gs.xml: New file.
294 * features/s390-gsbc.xml: New file.
295 * features/s390x-gs-linux64.xml: New file.
296 * features/Makefile (WHICH): Add s390-gs-linux64 and
297 s390x-gs-linux64.
298 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
299 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
300 * features/s390-gs-linux64.c: New generated file.
301 * features/s390x-gs-linux64.c: New file.
302 * regformats/s390-gs-linux64.dat: New file.
303 * regformats/s390x-gs-linux64.dat: New file.
304
305 2017-09-23 Tom Tromey <tom@tromey.com>
306
307 * defs.h (make_cleanup_override_quit_handler): Don't declare.
308
309 2017-09-22 Tom Tromey <tom@tromey.com>
310
311 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
312 type to scoped_restore_tmpl.
313 <scoped_input_handler>: Initialize m_quit_handler directly.
314
315 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
316
317 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
318 (cd_command): Likewise. Free "current_directory" before
319 assigning to it.
320 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
321 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
322 * top.c (gdb_dirbuf): Remove global declaration.
323 * top.h (gdb_dirbuf): Likewise.
324
325 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
326
327 * gnulib/aclocal.m4: Regenerate.
328 * gnulib/config.in: Regenerate.
329 * gnulib/configure: Regenerate.
330 * gnulib/import/Makefile.am: Regenerate.
331 * gnulib/import/Makefile.in: Regenerate.
332 * gnulib/import/assure.h: New file.
333 * gnulib/import/at-func.c: Likewise
334 * gnulib/import/chdir-long.c: New file.
335 * gnulib/import/chdir-long.h: New file.
336 * gnulib/import/cloexec.c: New file.
337 * gnulib/import/cloexec.h: New file.
338 * gnulib/import/close.c: New file.
339 * gnulib/import/closedir.c: New file.
340 * gnulib/import/dirent-private.h: New file.
341 * gnulib/import/dup-safer.c: New file.
342 * gnulib/import/dup.c: New file.
343 * gnulib/import/dup2.c: New file.
344 * gnulib/import/error.c: New file.
345 * gnulib/import/error.h: New file.
346 * gnulib/import/exitfail.c: New file.
347 * gnulib/import/exitfail.h: New file.
348 * gnulib/import/fchdir.c: New file.
349 * gnulib/import/fcntl.c: New file.
350 * gnulib/import/fcntl.in.h: New file.
351 * gnulib/import/fd-hook.c: New file.
352 * gnulib/import/fd-hook.h: New file.
353 * gnulib/import/fd-safer.c: New file.
354 * gnulib/import/fdopendir.c: New file.
355 * gnulib/import/filename.h: New file.
356 * gnulib/import/filenamecat-lgpl.c: New file.
357 * gnulib/import/filenamecat.h: New file.
358 * gnulib/import/fstat.c: New file.
359 * gnulib/import/fstatat.c: New file.
360 * gnulib/import/getcwd-lgpl.c: New file.
361 * gnulib/import/getcwd.c: New file.
362 * gnulib/import/getdtablesize.c: New file.
363 * gnulib/import/getlogin_r.c: New file.
364 * gnulib/import/getprogname.c: New file.
365 * gnulib/import/getprogname.h: New file.
366 * gnulib/import/gettext.h: New file.
367 * gnulib/import/glob-libc.h: New file.
368 * gnulib/import/glob.c: New file.
369 * gnulib/import/glob.in.h: New file.
370 * gnulib/import/intprops.h: New file.
371 * gnulib/import/m4/chdir-long.m4: New file.
372 * gnulib/import/m4/close.m4: New file.
373 * gnulib/import/m4/closedir.m4: New file.
374 * gnulib/import/m4/d-ino.m4: New file.
375 * gnulib/import/m4/d-type.m4: New file.
376 * gnulib/import/m4/dup.m4: New file.
377 * gnulib/import/m4/dup2.m4: New file.
378 * gnulib/import/m4/error.m4: New file.
379 * gnulib/import/m4/fchdir.m4: New file.
380 * gnulib/import/m4/fcntl.m4: New file.
381 * gnulib/import/m4/fcntl_h.m4: New file.
382 * gnulib/import/m4/fdopendir.m4: New file.
383 * gnulib/import/m4/filenamecat.m4: New file.
384 * gnulib/import/m4/fstat.m4: New file.
385 * gnulib/import/m4/fstatat.m4: New file.
386 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
387 * gnulib/import/m4/getcwd-path-max.m4: New file.
388 * gnulib/import/m4/getcwd.m4: New file.
389 * gnulib/import/m4/getdtablesize.m4: New file.
390 * gnulib/import/m4/getlogin_r.m4: New file.
391 * gnulib/import/m4/getprogname.m4: New file.
392 * gnulib/import/m4/glob.m4: New file.
393 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
394 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
395 * gnulib/import/m4/mempcpy.m4: New file.
396 * gnulib/import/m4/memrchr.m4: New file.
397 * gnulib/import/m4/mode_t.m4: New file.
398 * gnulib/import/m4/msvc-inval.m4: New file.
399 * gnulib/import/m4/msvc-nothrow.m4: New file.
400 * gnulib/import/m4/open.m4: New file.
401 * gnulib/import/m4/openat.m4: New file.
402 * gnulib/import/m4/opendir.m4: New file.
403 * gnulib/import/m4/readdir.m4: New file.
404 * gnulib/import/m4/realloc.m4: New file.
405 * gnulib/import/m4/rewinddir.m4: New file.
406 * gnulib/import/m4/save-cwd.m4: New file.
407 * gnulib/import/m4/strdup.m4: New file.
408 * gnulib/import/m4/strerror.m4: New file.
409 * gnulib/import/m4/unistd-safer.m4: New file.
410 * gnulib/import/mempcpy.c: New file.
411 * gnulib/import/memrchr.c: New file.
412 * gnulib/import/msvc-inval.c: New file.
413 * gnulib/import/msvc-inval.h: New file.
414 * gnulib/import/msvc-nothrow.c: New file.
415 * gnulib/import/msvc-nothrow.h: New file.
416 * gnulib/import/open.c: New file.
417 * gnulib/import/openat-die.c: New file.
418 * gnulib/import/openat-priv.h: New file.
419 * gnulib/import/openat-proc.c: New file.
420 * gnulib/import/openat.c: New file.
421 * gnulib/import/openat.h: New file.
422 * gnulib/import/opendir.c: New file.
423 * gnulib/import/pipe-safer.c: New file.
424 * gnulib/import/readdir.c: New file.
425 * gnulib/import/realloc.c: New file.
426 * gnulib/import/rewinddir.c: New file.
427 * gnulib/import/save-cwd.c: New file.
428 * gnulib/import/save-cwd.h: New file.
429 * gnulib/import/strdup.c: New file.
430 * gnulib/import/strerror-override.c: New file.
431 * gnulib/import/strerror-override.h: New file.
432 * gnulib/import/strerror.c: New file.
433 * gnulib/import/unistd--.h: New file.
434 * gnulib/import/unistd-safer.h: New file.
435 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
436 "getcwd" and "glob".
437 * ser-tcp.c: Undefine "close" before redefining it.
438
439 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
440
441 * guile/scm-value.c (gdbscm_value_address): Initialize address,
442 get rid of res_val.
443
444 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
445
446 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
447 <sol2,sparc>: Likewise.
448 <sol2-64,i386>: Likewise.
449
450 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
451 -Wdeprecated-declarations on *-*-solaris*.
452 * configure: Regenerate.
453
454 * procfs.c: Include "nat/inferior.h".
455 (procfs_info_proc): Fix typo.
456
457 2017-09-21 Kevin Buettner <kevinb@redhat.com>
458
459 * remote.c (vector): Include.
460 (struct private_thread_info): Add field, thread_handle.
461 (free_private_thread_info): Deallocate storage associated with
462 thread handle.
463 (get_private_info_thread): Initialize `thread_handle' field.
464 (struct thread_item): Add field, thread_handle.
465 (clear_threads_listing_context): Deallocate storage associated
466 with thread handle.
467 (start_thread): Add support for "handle" attribute.
468 (thread_attributes): Add "handle".
469 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
470 field.
471 (remote_update_thread_list): Update thread_handle.
472 (remote_thread_handle_to_thread_info): New function.
473 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
474
475 2017-09-21 Kevin Buettner <kevinb@redhat.com>
476
477 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
478 function.
479 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
480 * python/python-internal.h (thread_object_type): Declare.
481
482 2017-09-21 Kevin Buettner <kevinb@redhat.com>
483
484 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
485 (target_thread_handle_to_thread_info): Declare.
486 * target.c (target_thread_handle_to_thread_info): New function.
487 * target-delegates.c: Regenerate.
488 * gdbthread.h (find_thread_by_handle): Declare.
489 * thread.c (find_thread_by_handle): New function.
490 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
491 function.
492 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
493
494 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
495
496 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
497
498 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
499
500 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
501
502 2017-09-21 Yao Qi <yao.qi@linaro.org>
503
504 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
505 to gdb_target_obs.
506
507 2017-09-20 Tom Tromey <tom@tromey.com>
508
509 * breakpoint.c (struct counted_command_line): Remove.
510 (breakpoint_commands): Update.
511 (alloc_counted_command_line, incref_counted_command_line)
512 (decref_counted_command_line, do_cleanup_counted_command_line)
513 (make_cleanup_decref_counted_command_line): Remove.
514 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
515 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
516 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
517 (save_breakpoints): Update.
518 * breakpoint.h (counted_command_line): Now a typedef to
519 shared_ptr.
520 (struct breakpoint) <commands>: Now a counted_command_line.
521 (struct bpstats) <command>: Likewise.
522
523 2017-09-20 Tom Tromey <tom@tromey.com>
524
525 * breakpoint.c (struct commands_info, do_map_commands_command):
526 Remove.
527 (commands_command_1): Update.
528 (iterate_over_related_breakpoints): Take a function_view.
529 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
530 (delete_command): Update.
531 (map_breakpoint_numbers): Take a function_view.
532 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
533 (disable_command): Update.
534 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
535 (enable_command): Update.
536 (struct disp_data, do_enable_breakpoint_disp)
537 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
538 (do_map_enable_delete_breakpoint): Remove.
539 (enable_once_command, enable_count_command, enable_delete_command)
540 (delete_trace_variable_command): Update.
541
542 2017-09-20 Tom Tromey <tom@tromey.com>
543
544 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
545 (bpstat_clear): Use delete.
546 (bpstats): New constructors.
547 (bpstat_copy, bpstat_stop_status): Use new.
548 (dprintf_after_condition_true): Update.
549 * breakpoint.h (bpstats::bpstats): Add constructors.
550 (bpstats::~bpstats): Add destructor.
551
552 2017-09-20 Pedro Alves <palves@redhat.com>
553
554 * eval.c (make_params): Delete, refactored as ...
555 (class fake_method): ... this new type's ctor.
556 (fake_method::~fake_method): New.
557 (evaluate_subexp_standard): Use 'fake_method'.
558
559 2017-09-20 Tom Tromey <tom@tromey.com>
560
561 * windows-nat.c (get_windows_debug_event, windows_wait)
562 (do_initial_windows_stuff, windows_attach): Update.
563 * utils.c (vwarning, internal_vproblem): Update.
564 (ui_unregister_input_event_handler_cleanup)
565 (prepare_to_handle_input): Remove.
566 (class scoped_input_handler): New.
567 (defaulted_query, prompt_for_continue): Update.
568 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
569 Update.
570 * top.c (undo_terminal_modifications_before_exit): Update.
571 * target/target.h (target_terminal_init, target_terminal_inferior)
572 (target_terminal_ours): Don't declare.
573 (class target_terminal): New.
574 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
575 (target_terminal_ours_for_output)
576 (make_cleanup_restore_target_terminal): Don't declare.
577 (target_terminal_info): Remove.
578 * target.c (enum terminal_state, terminal_state): Remove.
579 (target_terminal::terminal_state): Define.
580 (target_terminal::init): Rename from target_terminal_init.
581 (target_terminal::inferior): Rename from
582 target_terminal_inferior.
583 (target_terminal::ours): Rename from target_terminal_ours.
584 (target_terminal::ours_for_output): Rename from
585 target_terminal_ours_for_output.
586 (target_terminal::info): New method.
587 (cleanup_restore_target_terminal)
588 (make_cleanup_restore_target_terminal): Remove.
589 * solib.c (handle_solib_event): Update.
590 * remote.c (remote_serial_quit_handler): Update.
591 (remote_terminal_inferior, remote_wait_as): Update.
592 * record-full.c (record_full_wait_1): Update.
593 * nto-procfs.c (procfs_create_inferior): Update.
594 * nat/fork-inferior.c (startup_inferior): Update.
595 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
596 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
597 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
598 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
599 (mi_breakpoint_created, mi_breakpoint_deleted)
600 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
601 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
602 (mi_user_selected_context_changed, report_initial_inferior):
603 Update.
604 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
605 (linux_nat_terminal_inferior): Update.
606 * infrun.c (follow_fork_inferior)
607 (handle_vfork_child_exec_or_exit, do_target_resume)
608 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
609 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
610 Update.
611 * inflow.c (child_terminal_init, info_terminal_command): Update.
612 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
613 (attach_command): Update.
614 * infcall.c (call_thread_fsm_should_stop): Update.
615 * gnu-nat.c (gnu_attach): Update.
616 * extension.c (struct active_ext_lang_state)
617 (restore_active_ext_lang): Update.
618 * exceptions.c (print_flush): Update.
619 * event-top.c (async_enable_stdin, default_quit_handler): Update.
620 (struct quit_handler_cleanup_data, restore_quit_handler)
621 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
622 Remove.
623 * cp-support.c (gdb_demangle): Update.
624 * breakpoint.c (update_inserted_breakpoint_locations)
625 (insert_breakpoint_locations, handle_jit_event)
626 (disable_breakpoints_in_unloaded_shlib): Update.
627 * annotate.c (annotate_breakpoints_invalid)
628 (annotate_frames_invalid): Update.
629
630 2017-09-20 Tom Tromey <tom@tromey.com>
631
632 * main.c (catch_command_errors): Rename from
633 catch_command_errors_const.
634 (captured_main_1): Update.
635
636 2017-09-20 Pedro Alves <palves@redhat.com>
637
638 * cli/cli-cmds.c (list_command): Use print_sal_location.
639 (print_sal_location): New function.
640 (ambiguous_line_spec): Use print_sal_location.
641 * linespec.c (symbol_to_sal): Record the symbol in the sal.
642 * symtab.c (find_function_start_sal): Likewise.
643 * symtab.h (symtab_and_line::symbol): New field.
644
645 2017-09-20 Pedro Alves <palves@redhat.com>
646
647 * linespec.c (minsym_found): Handle non-text minsyms.
648 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
649
650 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
651
652 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
653 backslash.
654
655 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
656
657 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
658 vmovups instead vmovaps.
659 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
660
661 2017-09-19 John Baldwin <jhb@FreeBSD.org>
662
663 * NEWS (Changes since GDB 8.0): Add starti.
664 * infcmd.c (enum run_break): New.
665 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
666 case.
667 (run_command): Use enum run_how.
668 (start_command): Likewise.
669 (starti_command): New function.
670 (RUN_ARGS_HELP): New macro.
671 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
672 commands. Add starti command.
673
674 2017-09-19 Yao Qi <yao.qi@linaro.org>
675
676 * Makefile.in (monitor.o): Remove the rule.
677
678 2017-09-19 Yao Qi <yao.qi@linaro.org>
679
680 * annotate.h (struct annotate_arg_emitter): Use
681 DISABLE_COPY_AND_ASSIGN.
682 * common/refcounted-object.h (refcounted_object): Likewise.
683 * completer.h (struct completion_result): Likewise.
684 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
685 * filename-seen-cache.h (filename_seen_cache): Likewise.
686 * gdbcore.h (thread_section_name): Likewise.
687 * gdb_regex.h (compiled_regex): Likewise.
688 * gdbthread.h (scoped_restore_current_thread): Likewise.
689 * inferior.h (scoped_restore_current_inferior): Likewise.
690 * jit.c (jit_reader): Likewise.
691 * linespec.h (struct linespec_result): Likewise.
692 * mi/mi-parse.h (struct mi_parse): Likewise.
693 * nat/fork-inferior.c (execv_argv): Likewise.
694 * progspace.h (scoped_restore_current_program_space): Likewise.
695 * python/python-internal.h (class gdbpy_enter): Likewise.
696 * regcache.h (regcache): Likewise.
697 * target-descriptions.c (struct tdesc_reg): Likewise.
698 (struct tdesc_type): Likewise.
699 (struct tdesc_feature): Likewise.
700 * ui-out.h (ui_out_emit_type): Likewise.
701
702 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
703
704 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
705 label abort_expression.
706
707 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
708
709 * common/buffer.c (buffer_xml_printf): Adjust.
710 * common/xml-utils.c (xml_escape_text): Change return type to
711 std::string, update code accordingly.
712 * common/xml-utils.h (xml_escape_text): Change return type to
713 std::string.
714 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
715 * windows-tdep.c (windows_xfer_shared_library): Adjust.
716 * unittests/xml-utils-selftests.c (test_xml_escape_text):
717 Adjust.
718
719 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
720
721 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
722 (SUBDIR_UNITTESTS_OBS): Add new object file.
723 * unittests/xml-utils-selftests.c: New file.
724
725 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
726
727 * common/selftest.h (selftest): New struct/interface.
728 (register_test): Add name parameter, add new overload.
729 (run_tests): Add filter parameter.
730 (for_each_selftest_ftype): New typedef.
731 (for_each_selftest): New declaration.
732 * common/selftest.c (tests): Change type to
733 map<string, unique_ptr<selftest>>.
734 (simple_selftest): New struct.
735 (register_test): New function.
736 (register_test): Add name parameter and use it.
737 (run_tests): Add filter parameter and use it. Add prints.
738 Adjust to vector -> map change.
739 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
740 registering selftests.
741 * arm-tdep.c (_initialize_arm_tdep): Likewise.
742 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
743 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
744 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
745 * findvar.c (_initialize_findvar): Likewise.
746 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
747 * maint.c (maintenance_selftest): Update call to run_tests.
748 (maintenance_info_selftests): New function.
749 (_initialize_maint_cmds): Register "maintenance info selftests"
750 command. Update "maintenance selftest" doc.
751 * regcache.c (_initialize_regcache): Add names when registering
752 selftests.
753 * rust-exp.y (_initialize_rust_exp): Likewise.
754 * selftest-arch.c (gdbarch_selftest): New struct.
755 (gdbarch_tests): Remove.
756 (register_test_foreach_arch): Add name parameter. Call
757 register_test.
758 (tests_with_arch): Remove, move most content to
759 gdbarch_selftest::operator().
760 (_initialize_selftests_foreach_arch): Remove.
761 * selftest-arch.h (register_test_foreach_arch): Add name
762 parameter.
763 (run_tests_with_arch): New declaration.
764 * utils-selftests.c (_initialize_utils_selftests): Add names
765 when registering selftests.
766 * utils.c (_initialize_utils): Likewise.
767 * unittests/array-view-selftests.c
768 (_initialize_array_view_selftests): Likewise.
769 * unittests/environ-selftests.c (_initialize_environ_selftests):
770 Likewise.
771 * unittests/function-view-selftests.c
772 (_initialize_function_view_selftests): Likewise.
773 * unittests/offset-type-selftests.c
774 (_initialize_offset_type_selftests): Likewise.
775 * unittests/optional-selftests.c
776 (_initialize_optional_selftests): Likewise.
777 * unittests/scoped_restore-selftests.c
778 (_initialize_scoped_restore_selftests): Likewise.
779 * NEWS: Document "maintenance selftest" and "maint info
780 selftests".
781
782 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
783
784 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
785 scoped_restore.
786
787 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
788
789 * mi/mi-main.c (mi_load_progress): Make uiout variable
790 a unique_ptr.
791
792 2017-09-15 Pedro Alves <palves@redhat.com>
793
794 * compile/compile-c-types.c (convert_enum, convert_int)
795 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
796
797 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
798
799 * dwarf2read.c (copy_string): Remove.
800 (parse_macro_definition): Replace copy_string with savestring.
801
802 2017-09-15 Yao Qi <yao.qi@linaro.org>
803
804 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
805 gdb_target_obs.
806 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
807 Likewise.
808 (i[34567]86-*-linux*): Likewise.
809
810 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
811
812 * dwarf2expr.h (dwarf_stack_value): Add constructor.
813 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
814 <stack>: Change type to std::vector.
815 <stack_len, stack_allocated>: Remove.
816 <grow_stack>: Remove.
817 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
818 (dwarf_expr_context::~dwarf_expr_context): Remove.
819 (dwarf_expr_context::grow_stack): Remove.
820 (dwarf_expr_context::push): Adjust.
821 (dwarf_expr_context::pop): Adjust.
822 (dwarf_expr_context::fetch): Adjust.
823 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
824 (dwarf_expr_context::stack_empty_p): Adjust.
825 (dwarf_expr_context::execute_stack_op): Adjust.
826
827 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
828
829 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
830 return type to bool.
831 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
832
833 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
834
835 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
836 Change type to bool.
837 (dwarf_stack_value) <in_stack_memory>: Likewise.
838 (dwarf_expr_context) <push_address>: Change parameter type to
839 bool.
840 <fetch_in_stack_memory>: Change return type to bool.
841 <push>: Change parameter type to bool.
842 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
843 to bool.
844 (dwarf_expr_context::push_address): Likewise.
845 (dwarf_expr_context::fetch_in_stack_memory): Change return type
846 to bool.
847 (dwarf_expr_context::execute_stack_op): Adjust.
848 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
849
850 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
851
852 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
853 (struct dwarf_expr_context) <n_pieces>: Remove.
854 <pieces>: Change type to std::vector.
855 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
856 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
857 pieces.
858 (dwarf_expr_context::add_piece): Adjust.
859 * dwarf2loc.c (struct piece_closure): Initialize fields.
860 <n_pieces>: Remove.
861 <pieces>: Change type to std::vector.
862 (allocate_piece_closure): Adjust, change parameter to
863 std::vector rvalue and std::move it to piece_closure.
864 (rw_pieced_value): Adjust.
865 (check_pieced_synthetic_pointer): Adjust.
866 (indirect_synthetic_pointer): Adjust.
867 (coerce_pieced_ref): Adjust.
868 (free_pieced_value_closure): Adjust. Use delete to free
869 piece_closure.
870 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
871 to allocate_piece_closure.
872 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
873
874 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
875
876 * probe.h (probe_ops_cp): Remove typedef.
877 (DEF_VEC_P (probe_ops_cp)): Remove.
878 (all_probe_ops): Change type to std::vector.
879 * probe.c (info_probes_for_ops): Adjust to vector change.
880 (probe_linespec_to_ops): Likewise.
881 (all_probe_ops): Change type to std::vector.
882 (_initialize_probe): Adjust to vector change.
883 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
884 * elfread.c (elf_get_probes): Likewise.
885 * stap-probe.c (_initialize_stap_probe): Likewise.
886
887 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
888
889 * probe.h (struct bound_probe): Define constructors.
890 * probe.c (bound_probe_s): Remove typedef.
891 (DEF_VEC_O (bound_probe_s)): Remove VEC.
892 (collect_probes): Change return type to std::vector, remove
893 cleanup.
894 (compare_probes): Return bool, change parameter type. Change
895 semantic to "less than".
896 (gen_ui_out_table_header_info): Change parameter to std::vector
897 and update.
898 (exists_probe_with_pops): Likewise.
899 (info_probes_for_ops): Update to std::vector change.
900 (enable_probes_command): Likewise.
901 (disable_probes_command): Likewise.
902
903 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
904
905 * probe.h (struct probe_ops) <get_probes>: Change parameter from
906 vec to std::vector.
907 * probe.c (parse_probes_in_pspace): Update.
908 (find_probes_in_objfile): Update.
909 (find_probe_by_pc): Update.
910 (collect_probes): Update.
911 (probe_any_get_probes): Update.
912 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
913 return type to reference to std::vector.
914 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
915 std::vector and update.
916 (dtrace_process_dof): Likewise.
917 (dtrace_get_probes): Likewise.
918 * elfread.c (elf_get_probes): Change return type to std::vector,
919 store an std::vector in bfd_data.
920 (probe_key_free): Update to std::vector.
921 * stap-probe.c (handle_stap_probe): Change parameter to
922 std::vector and update.
923 (stap_get_probes): Likewise.
924 * symfile-debug.c (debug_sym_get_probes): Change return type to
925 std::vector and update.
926
927 2017-09-11 Tom Tromey <tom@tromey.com>
928
929 * breakpoint.c (program_breakpoint_here_p): Update.
930 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
931 from make_show_memory_breakpoints_cleanup. Return a
932 scoped_restore_tmpl<int>.
933 (restore_show_memory_breakpoints): Remove.
934 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
935 * mem-break.c (memory_validate_breakpoint): Update.
936 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
937 (ia64_memory_remove_breakpoint): Update.
938 (ia64_breakpoint_from_pc): Update.
939 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
940 from make_show_memory_breakpoints_cleanup.
941
942 2017-09-11 Tom Tromey <tom@tromey.com>
943
944 * d-namespace.c (d_lookup_symbol): Use std::string.
945 (find_symbol_in_baseclass): Likewise.
946
947 2017-09-11 Tom Tromey <tom@tromey.com>
948
949 * ctf.c (ctf_start): Use std::string.
950
951 2017-09-11 Tom Tromey <tom@tromey.com>
952
953 * ada-lang.c (is_known_support_routine): Update.
954 (ada_unhandled_exception_name_addr_from_raise): Update.
955 * guile/scm-frame.c (gdbscm_frame_name): Update.
956 * python/py-frame.c (frapy_name): Update.
957 (frapy_function): Update.
958 * stack.h (find_frame_funname): Update.
959 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
960 (print_frame): Update.
961
962 2017-09-11 Tom Tromey <tom@tromey.com>
963
964 * findcmd.c (put_bits): Take a gdb::byte_vector.
965 (parse_find_args): Return gdb::byte_vector. "args" now const.
966 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
967 cleanups.
968 (find_command): Update.
969
970 2017-09-11 Tom Tromey <tom@tromey.com>
971
972 * cli/cli-script.c (class scoped_restore_hook_in): New.
973 (clear_hook_in_cleanup): Remove.
974 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
975 scoped_restore_hook_in.
976
977 2017-09-11 Tom Tromey <tom@tromey.com>
978
979 * cli/cli-script.c (restore_interp): Remove.
980 (read_command_lines): Use scoped_restore_interp.
981 * interps.c (scoped_restore_interp::set_temp): Rename from
982 interp_set_temp.
983 * interps.h (class scoped_restore_interp): New.
984 (interp_set_temp): Remove.
985
986 2017-09-11 Tom Tromey <tom@tromey.com>
987
988 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
989 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
990 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
991 scoped_restore.
992 (mi_cmd_break_insert_1): Update.
993 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
994 scoped_restore.
995
996 2017-09-11 Tom Tromey <tom@tromey.com>
997
998 * demangle.c (demangle_command): Update.
999 * breakpoint.c (disable_command): Update.
1000 (enable_command): Update.
1001 (find_location_by_number): Make "number" const. Use
1002 get_number_trailer.
1003 * cli/cli-utils.c (extract_arg): Return std::string.
1004 * probe.c (parse_probe_linespec): Update. Change types.
1005 (collect_probes): Take string arguments.
1006 (parse_probe_linespec): Likewise.
1007 (info_probes_for_ops): Update.
1008 (enable_probes_command): Update.
1009 (disable_probes_command): Update.
1010 * break-catch-sig.c (catch_signal_split_args): Update.
1011 * mi/mi-parse.c (mi_parse): Update.
1012
1013 2017-09-11 Tom Tromey <tom@tromey.com>
1014
1015 * language.h (language_enum): Make argument const.
1016 * language.c (language_enum): Make argument const.
1017
1018 2017-09-11 Tom Tromey <tom@tromey.com>
1019
1020 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1021 as function.
1022 (skip_to_space): Rename from skip_to_space_const.
1023 * common/common-utils.c (skip_to_space): New function.
1024 (skip_to_space): Rename from skip_to_space_const.
1025 * cli/cli-utils.h (get_number): Rename from get_number_const.
1026 (extract_arg): Rename from extract_arg_const.
1027 * cli/cli-utils.c (get_number): Rename from get_number_const.
1028 (extract_arg): Rename from extract_arg_const.
1029 (number_or_range_parser::get_number): Use ::get_number.
1030 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1031 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1032 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1033 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1034 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1035 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1036 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1037 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1038
1039 2017-09-11 Tom Tromey <tom@tromey.com>
1040
1041 * python/python.c (do_start_initialization): Use
1042 py-event-types.def to initialize types.
1043 Define all object type structures.
1044 * python/python-internal.h: Don't declare event initialization
1045 functions.
1046 * python/py-threadevent.c (thread_event_object_type): Don't
1047 define.
1048 * python/py-stopevent.c (stop_event_object_type): Don't define.
1049 * python/py-signalevent.c (signal_event_object_type): Don't
1050 declare or define.
1051 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1052 (clear_objfiles_event_object_type): Don't declare or define.
1053 * python/py-infevents.c (inferior_call_pre_event_object_type)
1054 (inferior_call_post_event_object_type)
1055 (register_changed_event_object_type)
1056 (memory_changed_event_object_type): Don't declare or define.
1057 * python/py-inferior.c (new_thread_event_object_type)
1058 (new_inferior_event_object_type)
1059 (inferior_deleted_event_object_type): Don't declare or define.
1060 * python/py-exitedevent.c (exited_event_object_type): Don't
1061 declare or define.
1062 * python/py-evts.c (gdbpy_initialize_py_events): Use
1063 py-all-events.def.
1064 * python/py-events.h (thread_event_object_type): Don't declare.
1065 (events_object): Use py-all-events.def.
1066 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1067 py-event-types.def.
1068 * python/py-event-types.def: New file.
1069 * python/py-continueevent.c (create_continue_event_object): Don't
1070 declare or define.
1071 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1072 declare or define.
1073 * python/py-all-events.def: New file.
1074
1075 2017-09-11 Tom Tromey <tom@tromey.com>
1076
1077 * python/py-threadevent.c (create_thread_event_object): Return
1078 gdbpy_ref.
1079 * python/py-stopevent.h (create_stop_event_object)
1080 (create_breakpoint_event_object, create_signal_event_object):
1081 Update.
1082 * python/py-stopevent.c (create_stop_event_object): Return
1083 gdbpy_ref.
1084 (emit_stop_event): Update.
1085 * python/py-signalevent.c (create_signal_event_object): Return
1086 gdbpy_ref.
1087 * python/py-infevents.c (create_inferior_call_event_object):
1088 Update.
1089 * python/py-event.h (create_event_object)
1090 (create_thread_event_object): Update.
1091 * python/py-event.c (create_event_object): Return gdbpy_ref.
1092 * python/py-continueevent.c: Return gdbpy_ref.
1093 * python/py-bpevent.c (create_breakpoint_event_object): Return
1094 gdbpy_ref.
1095
1096 2017-09-11 Tom Tromey <tom@tromey.com>
1097
1098 PR python/15622:
1099 * NEWS: Add entry.
1100 * python/python.c (do_start_initialization): Initialize new event
1101 types.
1102 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1103 (gdbpy_initialize_inferior_deleted_event)
1104 (gdbpy_initialize_new_thread_event): Declare.
1105 * python/py-threadevent.c (create_thread_event_object): Add option
1106 "thread" parameter.
1107 * python/py-inferior.c (new_thread_event_object_type)
1108 (new_inferior_event_object_type)
1109 (inferior_deleted_event_object_type): Declare.
1110 (python_new_inferior, python_inferior_deleted): New functions.
1111 (add_thread_object): Emit new_thread event.
1112 (gdbpy_initialize_inferior): Attach new functions to corresponding
1113 observers.
1114 (new_thread, new_inferior, inferior_deleted): Define new event
1115 types.
1116 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1117 registries.
1118 * python/py-events.h (events_object) <new_inferior,
1119 inferior_deleted, new_thread>: New fields.
1120 * python/py-event.h (create_thread_event_breakpoint): Add optional
1121 "thread" parameter.
1122
1123 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1124
1125 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1126 check current_ui instead.
1127 (internal_vproblem): Likewise.
1128
1129 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1130
1131 * thread.c (print_thread_info_1): Remove unnecessary calls to
1132 uiout->is_mi_like_p.
1133
1134 2017-09-09 Tom Tromey <tom@tromey.com>
1135
1136 * namespace.h (add_using_directive): Update.
1137 * namespace.c (add_using_directive): Change type of excludes to
1138 std::vector.
1139 * dwarf2read.c (read_import_statement): Use std::vector.
1140 (read_namespace): Update.
1141 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1142
1143 2017-09-09 Tom Tromey <tom@tromey.com>
1144
1145 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1146
1147 2017-09-09 Tom Tromey <tom@tromey.com>
1148
1149 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1150
1151 2017-09-09 Tom Tromey <tom@tromey.com>
1152
1153 * stack.c (func_command): Use gdb::def_vector.
1154
1155 2017-09-09 Tom Tromey <tom@tromey.com>
1156
1157 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1158 ui_out_emit_list, ui_out_emit_tuple.
1159 (mi_cmd_var_update): Likewise.
1160
1161 2017-09-09 Tom Tromey <tom@tromey.com>
1162
1163 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1164 ui_out_redirect_pop.
1165 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1166 ui_out_redirect_pop.
1167 * utils.c (do_ui_out_redirect_pop)
1168 (make_cleanup_ui_out_redirect_pop): Remove.
1169 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1170 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1171 * ui-out.h (ui_out_redirect_pop): New class.
1172
1173 2017-09-09 Tom Tromey <tom@tromey.com>
1174
1175 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1176 (list_available_thread_groups, mi_cmd_list_thread_groups)
1177 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1178 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1179 Likewise.
1180
1181 2017-09-09 Tom Tromey <tom@tromey.com>
1182
1183 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1184 ui_out_emit_tuple.
1185
1186 2017-09-09 Tom Tromey <tom@tromey.com>
1187
1188 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1189 * stack.c (print_frame): Use ui_out_emit_tuple.
1190 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1191 (info_spu_mailbox_command, info_spu_dma_command)
1192 (info_spu_proxydma_command): Likewise.
1193 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1194 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1195 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1196 ui_out_emit_tuple.
1197 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1198
1199 2017-09-09 Tom Tromey <tom@tromey.com>
1200
1201 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1202 (class ui_out_emit_table): Update comment.
1203 * ui-out.c (do_cleanup_table_end)
1204 (make_cleanup_ui_out_table_begin_end): Remove.
1205 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1206 (info_spu_dma_cmdlist): Likewise.
1207 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1208 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1209 ui_out_emit_table.
1210
1211 2017-09-09 Tom Tromey <tom@tromey.com>
1212
1213 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1214 ui_out_emit_list, gdb::optional.
1215
1216 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1217
1218 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1219 prototype.
1220 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1221 prototype.
1222 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1223 prototype.
1224 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1225 * ada-exp.y: Remove _initialize_ada_exp prototype.
1226 * ada-lang.c: Remove _initialize_ada_language prototype.
1227 * ada-tasks.c: Remove _initialize_tasks prototype.
1228 * addrmap.c: Remove _initialize_addrmap prototype.
1229 * agent.c: Remove _initialize_agent prototype.
1230 * aix-thread.c: Remove _initialize_aix_thread prototype.
1231 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1232 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1233 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1234 prototype.
1235 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1236 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1237 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1238 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1239 prototype.
1240 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1241 prototype.
1242 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1243 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1244 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1245 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1246 prototype.
1247 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1248 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1249 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1250 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1251 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1252 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1253 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1254 prototype.
1255 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1256 prototype.
1257 * annotate.c: Remove _initialize_annotate prototype.
1258 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1259 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1260 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1261 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1262 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1263 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1264 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1265 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1266 prototype.
1267 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1268 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1269 * auto-load.c: Remove _initialize_auto_load prototype.
1270 * auxv.c: Remove _initialize_auxv prototype.
1271 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1272 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1273 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1274 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1275 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1276 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1277 prototype.
1278 * break-catch-throw.c: Remove _initialize_break_catch_throw
1279 prototype.
1280 * breakpoint.c: Remove _initialize_breakpoint prototype.
1281 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1282 * btrace.c: Remove _initialize_btrace prototype.
1283 * charset.c: Remove _initialize_charset prototype.
1284 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1285 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1286 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1287 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1288 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1289 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1290 * coffread.c: Remove _initialize_coffread prototype.
1291 * compile/compile.c: Remove _initialize_compile prototype.
1292 * complaints.c: Remove _initialize_complaints prototype.
1293 * completer.c: Remove _initialize_completer prototype.
1294 * copying.awk: Remove _initialize_copying prototype.
1295 * copying.c: Regenerate.
1296 * core-regset.c: Remove _initialize_core_regset prototype.
1297 * corefile.c: Remove _initialize_core prototype.
1298 * corelow.c: Remove _initialize_corelow prototype.
1299 * cp-abi.c: Remove _initialize_cp_abi prototype.
1300 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1301 * cp-support.c: Remove _initialize_cp_support prototype.
1302 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1303 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1304 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1305 * ctf.c: Remove _initialize_ctf prototype.
1306 * d-lang.c: Remove _initialize_d_language prototype.
1307 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1308 prototype.
1309 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1310 * dbxread.c: Remove _initialize_dbxread prototype.
1311 * dcache.c: Remove _initialize_dcache prototype.
1312 * demangle.c: Remove _initialize_demangler prototype.
1313 * disasm-selftests.c: Remove _initialize_disasm_selftests
1314 prototype.
1315 * disasm.c: Remove _initialize_disasm prototype.
1316 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1317 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1318 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1319 prototype.
1320 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1321 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1322 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1323 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1324 * elfread.c: Remove _initialize_elfread prototype.
1325 * exec.c: Remove _initialize_exec prototype.
1326 * extension.c: Remove _initialize_extension prototype.
1327 * f-lang.c: Remove _initialize_f_language prototype.
1328 * f-valprint.c: Remove _initialize_f_valprint prototype.
1329 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1330 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1331 * filesystem.c: Remove _initialize_filesystem prototype.
1332 * findcmd.c: Remove _initialize_mem_search prototype.
1333 * fork-child.c: Remove _initialize_fork_child prototype.
1334 * frame-base.c: Remove _initialize_frame_base prototype.
1335 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1336 * frame.c: Remove _initialize_frame prototype.
1337 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1338 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1339 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1340 * gcore.c: Remove _initialize_gcore prototype.
1341 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1342 * gdbarch.c: Regenerate.
1343 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1344 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1345 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1346 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1347 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1348 * go-lang.c: Remove _initialize_go_language prototype.
1349 * go32-nat.c: Remove _initialize_go32_nat prototype.
1350 * guile/guile.c: Remove _initialize_guile prototype.
1351 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1352 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1353 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1354 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1355 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1356 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1357 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1358 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1359 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1360 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1361 prototype.
1362 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1363 prototype.
1364 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1365 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1366 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1367 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1368 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1369 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1370 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1371 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1372 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1373 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1374 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1375 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1376 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1377 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1378 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1379 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1380 prototype.
1381 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1382 prototype.
1383 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1384 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1385 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1386 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1387 * infcall.c: Remove _initialize_infcall prototype.
1388 * infcmd.c: Remove _initialize_infcmd prototype.
1389 * inferior.c: Remove _initialize_inferiors prototype.
1390 * inflow.c: Remove _initialize_inflow prototype.
1391 * infrun.c: Remove _initialize_infrun prototype.
1392 * interps.c: Remove _initialize_interpreter prototype.
1393 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1394 * jit.c: Remove _initialize_jit prototype.
1395 * language.c: Remove _initialize_language prototype.
1396 * linux-fork.c: Remove _initialize_linux_fork prototype.
1397 * linux-nat.c: Remove _initialize_linux_nat prototype.
1398 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1399 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1400 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1401 * m2-lang.c: Remove _initialize_m2_language prototype.
1402 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1403 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1404 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1405 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1406 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1407 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1408 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1409 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1410 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1411 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1412 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1413 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1414 * machoread.c: Remove _initialize_machoread prototype.
1415 * macrocmd.c: Remove _initialize_macrocmd prototype.
1416 * macroscope.c: Remove _initialize_macroscope prototype.
1417 * maint.c: Remove _initialize_maint_cmds prototype.
1418 * mdebugread.c: Remove _initialize_mdebugread prototype.
1419 * memattr.c: Remove _initialize_mem prototype.
1420 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1421 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1422 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1423 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1424 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1425 * microblaze-linux-tdep.c: Remove
1426 _initialize_microblaze_linux_tdep prototype.
1427 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1428 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1429 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1430 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1431 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1432 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1433 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1434 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1435 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1436 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1437 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1438 prototype.
1439 * mipsread.c: Remove _initialize_mipsread prototype.
1440 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1441 prototype.
1442 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1443 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1444 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1445 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1446 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1447 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1448 prototype.
1449 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1450 * nto-procfs.c: Remove _initialize_procfs prototype.
1451 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1452 * objc-lang.c: Remove _initialize_objc_language prototype.
1453 * objfiles.c: Remove _initialize_objfiles prototype.
1454 * observer.c: Remove observer_test_first_notification_function,
1455 observer_test_second_notification_function,
1456 observer_test_third_notification_function, and
1457 _initialize_observer prototypes.
1458 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1459 * osabi.c: Remove _initialize_gdb_osabi prototype.
1460 * osdata.c: Remove _initialize_osdata prototype.
1461 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1462 * parse.c: Remove _initialize_parse prototype.
1463 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1464 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1465 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1466 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1467 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1468 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1469 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1470 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1471 * printcmd.c: Remove _initialize_printcmd prototype.
1472 * probe.c: Remove _initialize_probe prototype.
1473 * proc-api.c: Remove _initialize_proc_api prototype.
1474 * proc-events.c: Remove _initialize_proc_events prototype.
1475 * proc-service.c: Remove _initialize_proc_service prototype.
1476 * procfs.c: Remove _initialize_procfs prototype.
1477 * psymtab.c: Remove _initialize_psymtab prototype.
1478 * python/python.c: Remove _initialize_python prototype.
1479 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1480 * record-btrace.c: Remove _initialize_record_btrace prototype.
1481 * record-full.c: Remove _initialize_record_full prototype.
1482 * record.c: Remove _initialize_record prototype.
1483 * regcache.c: Remove _initialize_regcache prototype.
1484 * reggroups.c: Remove _initialize_reggroup prototype.
1485 * remote-notif.c: Remove _initialize_notif prototype.
1486 * remote-sim.c: Remove _initialize_remote_sim prototype.
1487 * remote.c: Remove _initialize_remote prototype.
1488 * reverse.c: Remove _initialize_reverse prototype.
1489 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1490 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1491 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1492 prototype.
1493 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1494 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1495 * rust-exp.y: Remove _initialize_rust_exp prototype.
1496 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1497 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1498 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1499 * score-tdep.c: Remove _initialize_score_tdep prototype.
1500 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1501 prototype.
1502 * ser-go32.c: Remove _initialize_ser_dos prototype.
1503 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1504 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1505 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1506 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1507 * serial.c: Remove _initialize_serial prototype.
1508 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1509 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1510 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1511 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1512 * skip.c: Remove _initialize_step_skip prototype.
1513 * sol-thread.c: Remove _initialize_sol_thread prototype.
1514 * solib-aix.c: Remove _initialize_solib_aix prototype.
1515 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1516 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1517 * solib-frv.c: Remove _initialize_frv_solib prototype.
1518 * solib-spu.c: Remove _initialize_spu_solib prototype.
1519 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1520 * solib-target.c: Remove _initialize_solib_target prototype.
1521 * solib.c: Remove _initialize_solib prototype.
1522 * source.c: Remove _initialize_source prototype.
1523 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1524 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1525 prototype.
1526 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1527 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1528 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1529 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1530 prototype.
1531 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1532 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1533 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1534 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1535 prototype.
1536 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1537 prototype.
1538 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1539 prototype.
1540 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1541 prototype.
1542 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1543 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1544 prototype.
1545 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1546 prototype.
1547 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1548 prototype.
1549 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1550 prototype.
1551 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1552 prototype.
1553 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1554 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1555 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1556 * stabsread.c: Remove _initialize_stabsread prototype.
1557 * stack.c: Remove _initialize_stack prototype.
1558 * stap-probe.c: Remove _initialize_stap_probe prototype.
1559 * std-regs.c: Remove _initialize_frame_reg prototype.
1560 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1561 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1562 * symfile.c: Remove _initialize_symfile prototype.
1563 * symmisc.c: Remove _initialize_symmisc prototype.
1564 * symtab.c: Remove _initialize_symtab prototype.
1565 * target-dcache.c: Remove _initialize_target_dcache prototype.
1566 * target-descriptions.c: Remove _initialize_target_descriptions
1567 prototype.
1568 * thread.c: Remove _initialize_thread prototype.
1569 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1570 prototype.
1571 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1572 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1573 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1574 prototype.
1575 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1576 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1577 * tracefile.c: Remove _initialize_tracefile prototype.
1578 * tracepoint.c: Remove _initialize_tracepoint prototype.
1579 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1580 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1581 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1582 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1583 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1584 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1585 * tui/tui.c: Remove _initialize_tui prototype.
1586 * typeprint.c: Remove _initialize_typeprint prototype.
1587 * user-regs.c: Remove _initialize_user_regs prototype.
1588 * utils.c: Remove _initialize_utils prototype.
1589 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1590 * valarith.c: Remove _initialize_valarith prototype.
1591 * valops.c: Remove _initialize_valops prototype.
1592 * valprint.c: Remove _initialize_valprint prototype.
1593 * value.c: Remove _initialize_values prototype.
1594 * varobj.c: Remove _initialize_varobj prototype.
1595 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1596 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1597 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1598 * windows-nat.c: Remove _initialize_windows_nat,
1599 _initialize_check_for_gdb_ini, and _initialize_loadable
1600 prototypes.
1601 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1602 * xcoffread.c: Remove _initialize_xcoffread prototype.
1603 * xml-support.c: Remove _initialize_xml_support prototype.
1604 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1605 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1606 prototype.
1607 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1608 prototype.
1609 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1610
1611 2017-09-08 Keith Seitz <keiths@redhat.com>
1612
1613 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1614 field.
1615
1616 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1617
1618 * f-valprint.c (f_val_print): Remove check for one byte
1619 sized integers. Remove printing of character type.
1620
1621 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1622 Christoph Weinmann <christoph.t.weinmann@intel.com>
1623 Bernhard Heckel <bernhard.heckel@intel.com>
1624
1625 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1626 to maintain proper indentation when printing pointers/refs.
1627
1628 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1629
1630 GDB 8.0.1 released.
1631
1632 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1633
1634 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1635
1636 2017-09-05 Tom Tromey <tom@tromey.com>
1637
1638 * parse.c (funcall_chain): Now a std::vector.
1639 (start_arglist, end_arglist): Simplify.
1640 (free_funcalls): Remove.
1641 (parse_exp_in_context_1): Remove cleanup.
1642
1643 2017-09-05 Tom Tromey <tom@tromey.com>
1644
1645 * go-exp.y (go_parse): Don't create a cleanup.
1646
1647 2017-09-05 Tom Tromey <tom@tromey.com>
1648
1649 * d-exp.y (PrimaryExpression): Use std::string.
1650 (d_parse): Don't create a cleanup.
1651
1652 2017-09-05 Tom Tromey <tom@tromey.com>
1653
1654 * utils.c (do_clear_parser_state): Remove.
1655 (make_cleanup_clear_parser_state): Remove.
1656 * p-exp.y (pascal_parse): Use scoped_restore.
1657 * m2-exp.y (m2_parse): Use scoped_restore.
1658 * f-exp.y (f_parse): Use scoped_restore.
1659 * d-exp.y (d_parse): Use scoped_restore.
1660 * c-exp.y (c_parse): Use scoped_restore.
1661 * ada-exp.y (ada_parse): Use scoped_restore.
1662 * utils.h (make_cleanup_clear_parser_state): Remove.
1663
1664 2017-09-06 Keith Seitz <keiths@redhat.com>
1665
1666 * dwarf2read.c (dw2_linkage_name_attr): New function.
1667 (dw2_linkage_name): New function.
1668 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1669 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1670 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1671
1672 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1673
1674 * config/djgpp/djconfig.sh: Correct shell portability issue.
1675
1676 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1677
1678 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1679
1680 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1681
1682 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1683 * NEWS: Mention new FreeBSD/mips native configuration.
1684 * configure.host: Add aarch64*-*-freebsd*.
1685 * configure.nat: Likewise.
1686 * aarch64-fbsd-nat.c: New file.
1687
1688 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1689
1690 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1691 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1692 * NEWS: Mention new FreeBSD/aarch64 target.
1693 * configure.tgt: Add aarch64*-*-freebsd*.
1694 * aarch64-fbsd-tdep.c: New file.
1695 * aarch64-fbsd-tdep.h: New file.
1696
1697 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1698
1699 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1700
1701 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1702
1703 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1704 of TLS symbols.
1705
1706 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1707
1708 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1709 call.
1710
1711 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * infrun.c (follow_exec): Call add_thread after
1714 target_find_description.
1715
1716 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1717
1718 * infrun.c (handle_inferior_event_1): When exec'ing, read
1719 stop_pc after follow_exec.
1720
1721 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1722
1723 * remote.c (process_g_packet): Update error message.
1724
1725 2017-09-05 Yao Qi <yao.qi@linaro.org>
1726
1727 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1728 targets.
1729
1730 2017-09-05 Pedro Alves <palves@redhat.com>
1731
1732 * eval.c (eval_call, evaluate_funcall): New functions, factored
1733 out from ...
1734 (evaluate_subexp_standard): ... this.
1735
1736 2017-09-05 Yao Qi <yao.qi@linaro.org>
1737
1738 * amd64-tdep.c (amd64_target_description): Create target
1739 descriptions.
1740 (_initialize_amd64_tdep): Don't call functions
1741 initialize_tdesc_amd64_*. Add self tests.
1742 * arch/amd64.c (amd64_create_target_description): Add parameter
1743 is_linux. Call set_tdesc_osabi if is_linux is true.
1744 * arch/amd64.h (amd64_create_target_description): Update the
1745 declaration.
1746 * arch/i386.c (i386_create_target_description): Add parameter
1747 is_linux. Call set_tdesc_osabi if is_linux is true.
1748 * arch/i386.h (i386_create_target_description): Update
1749 declaration.
1750 * configure.tgt: Add i386.o to gdb_target_obs.
1751 * features/Makefile (XMLTOC): Remove i386/*.xml.
1752 * features/i386/amd64-avx-avx512.c: Remove.
1753 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1754 * features/i386/amd64-avx-mpx.c: Remove.
1755 * features/i386/amd64-avx.c: Remove.
1756 * features/i386/amd64-mpx.c: Remove.
1757 * features/i386/amd64.c: Remove.
1758 * features/i386/i386-avx-avx512.c: Remove.
1759 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1760 * features/i386/i386-avx-mpx.c: Remove.
1761 * features/i386/i386-avx.c: Remove.
1762 * features/i386/i386-mmx.c: Remove.
1763 * features/i386/i386-mpx.c: Remove.
1764 * features/i386/i386.c: Remove.
1765 * i386-tdep.c: Don't include features/i386/i386*.c., include
1766 target-descriptions.h and arch/i386.h.
1767 (i386_target_description): Create target descriptions.
1768 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1769 functions. Do self tests.
1770
1771 2017-09-05 Yao Qi <yao.qi@linaro.org>
1772
1773 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1774 * features/i386/amd64-avx-avx512-linux.c: Removed.
1775 * features/i386/amd64-avx-linux.c: Removed.
1776 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1777 * features/i386/amd64-avx-mpx-linux.c: Removed.
1778 * features/i386/amd64-linux.c: Removed.
1779 * features/i386/amd64-mpx-linux.c: Removed.
1780 * features/i386/x32-avx-avx512-linux.c: Removed.
1781 * features/i386/x32-avx-linux.c: Removed.
1782 * features/i386/x32-linux.c: Removed.
1783
1784 2017-09-05 Yao Qi <yao.qi@linaro.org>
1785
1786 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1787 features/i386/*.c.
1788 (amd64_linux_read_description): Call
1789 amd64_create_target_description.
1790 * arch/amd64.c: New file.
1791 * arch/amd64.h: New file.
1792 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1793 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1794
1795 2017-09-05 Yao Qi <yao.qi@linaro.org>
1796
1797 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1798 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1799 (amd64_linux_read_description): Create target descriptions.
1800 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1801 functions. Add unit tests.
1802 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1803 x32-core.xml.
1804 * features/i386/64bit-avx.c: Generated.
1805 * features/i386/64bit-avx512.c: Generated.
1806 * features/i386/64bit-core.c: Generated.
1807 * features/i386/64bit-linux.c: Generated.
1808 * features/i386/64bit-mpx.c: Generated.
1809 * features/i386/64bit-pkeys.c: Generated.
1810 * features/i386/64bit-segments.c: Generated.
1811 * features/i386/64bit-sse.c: Generated.
1812 * features/i386/x32-core.c: Generated.
1813 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1814 c files for amd64-linux and x32-linux.
1815
1816 2017-09-05 Yao Qi <yao.qi@linaro.org>
1817
1818 * amd64-linux-tdep.c (amd64_linux_read_description): New
1819 function.
1820 (amd64_linux_core_read_description): Call
1821 amd64_linux_read_description.
1822 (amd64_linux_init_abi): Likewise.
1823 (amd64_x32_linux_init_abi): Likewise.
1824 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1825 * x86-linux-nat.c (x86_linux_read_description): Call
1826 amd64_linux_read_description.
1827
1828 2017-09-05 Yao Qi <yao.qi@linaro.org>
1829
1830 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1831 comments.
1832
1833 2017-09-05 Yao Qi <yao.qi@linaro.org>
1834
1835 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1836 * features/i386/i386-avx-avx512-linux.c: Remove.
1837 * features/i386/i386-avx-linux.c: Remove.
1838 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1839 * features/i386/i386-avx-mpx-linux.c: Remove.
1840 * features/i386/i386-linux.c: Remove.
1841 * features/i386/i386-mmx-linux.c: Remove.
1842 * features/i386/i386-mpx-linux.c: Remove.
1843
1844 2017-09-05 Yao Qi <yao.qi@linaro.org>
1845
1846 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1847 (SFILES): Add arch/i386.c.
1848 (HFILES_NO_SRCDIR): Add arch/i386.h.
1849 * arch/i386.c: New file.
1850 * arch/i386.h: New file.
1851 * arch/tdesc.h (allocate_target_description): Declare.
1852 (set_tdesc_architecture): Declare.
1853 (set_tdesc_osabi): Declare.
1854 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1855 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1856 include arch/i386.h.
1857 (i386_linux_read_description): Remove code and call
1858 i386_create_target_description.
1859 (set_tdesc_architecture): New function.
1860 (set_tdesc_osabi): New function.
1861 * target-descriptions.h (allocate_target_description): Remove.
1862
1863 2017-09-05 Yao Qi <yao.qi@linaro.org>
1864
1865 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1866 * target-descriptions.c (tdesc_create_feature): Likewise, and
1867 adjust code.
1868 * features/i386/32bit-avx.c: Re-generated.
1869 * features/i386/32bit-avx512.c: Re-generated.
1870 * features/i386/32bit-core.c: Re-generated.
1871 * features/i386/32bit-linux.c: Re-generated.
1872 * features/i386/32bit-mpx.c: Re-generated.
1873 * features/i386/32bit-pkeys.c: Re-generated.
1874 * features/i386/32bit-sse.c: Re-generated.
1875
1876 2017-09-05 Yao Qi <yao.qi@linaro.org>
1877
1878 * regformats/regdef.h (struct reg): Override operator == and !=.
1879
1880 2017-09-05 Yao Qi <yao.qi@linaro.org>
1881
1882 * arch/tdesc.h: New file.
1883 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1884 * target-descriptions.c: Update comments.
1885 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1886 declarations.
1887 * features/i386/32bit-avx.c: Re-generated.
1888 * features/i386/32bit-avx512.c: Re-generated.
1889 * features/i386/32bit-core.c: Re-generated.
1890 * features/i386/32bit-linux.c: Re-generated.
1891 * features/i386/32bit-mpx.c: Re-generated.
1892 * features/i386/32bit-pkeys.c: Re-generated.
1893 * features/i386/32bit-sse.c: Re-generated.
1894
1895 2017-09-05 Yao Qi <yao.qi@linaro.org>
1896
1897 * regformats/regdat.sh: Update generated code.
1898
1899 2017-09-05 Yao Qi <yao.qi@linaro.org>
1900
1901 * regformats/regdat.sh: Adjust code order.
1902
1903 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1904
1905 * expprint.c (dump_subexp_body_standard): Use constant format
1906 string in fprintf_filtered call.
1907
1908 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1909
1910 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1911 NetBSD/i386.
1912 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1913
1914 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1915
1916 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1917
1918 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1919
1920 * bsd-kvm.o: Define _KMEMUSER.
1921 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1922 * configure: Regenerate.
1923
1924 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1925
1926 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1927 * i386-fbsd-nat.c: Likewise.
1928
1929 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1930
1931 * unittests/array-view-selftests.c: Add include of <array>.
1932
1933 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1934
1935 * spu-tdep.c (flush_ea_cache): Add missing argument to
1936 call_function_by_hand.
1937
1938 2017-09-04 Pedro Alves <palves@redhat.com>
1939
1940 * NEWS (Safer support for debugging with no debug info): New.
1941
1942 2017-09-04 Pedro Alves <palves@redhat.com>
1943
1944 * c-exp.y (function_method, function_method_void): Add current
1945 instance flags to TYPE_INSTANCE.
1946 * dwarf2read.c (check_modifier): New.
1947 (compute_delayed_physnames): Assert that only C++ adds delayed
1948 physnames. Mark fn_fields as const/volatile depending on
1949 physname.
1950 * eval.c (make_params): New type_instance_flags parameter. Use
1951 it as the new type's instance flags.
1952 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1953 flags element and pass it to make_params.
1954 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1955 instance flags element.
1956 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1957 * gdbtypes.h: Include "enum-flags.h".
1958 (type_instance_flags): New enum-flags type.
1959 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1960 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1961 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1962 (follow_type_instance_flags): New function.
1963 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1964 * parser-defs.h (follow_type_instance_flags): Declare.
1965 * valops.c (value_struct_elt_for_reference): const/volatile must
1966 match too.
1967
1968 2017-09-04 Pedro Alves <palves@redhat.com>
1969
1970 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1971 function/method scopes; lookup the nested name as a function local
1972 static variable.
1973
1974 2017-09-04 Pedro Alves <palves@redhat.com>
1975
1976 (%type <voidval>): Add function_method.
1977 * c-exp.y (exp): New production for calls with no arguments.
1978 (function_method, function_method_void_or_typelist): New
1979 productions.
1980 (exp): New production for "method()::static_var".
1981 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1982 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1983 Handle OP_FUNC_STATIC_VAR.
1984 * parse.c (operator_length_standard):
1985 Handle OP_FUNC_STATIC_VAR.
1986
1987 2017-09-04 Pedro Alves <palves@redhat.com>
1988
1989 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1990 handling.
1991 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1992 Ditto.
1993 * parse.c (operator_length_standard, operator_check_standard):
1994 Ditto.
1995 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1996
1997 2017-09-04 Pedro Alves <palves@redhat.com>
1998
1999 * ax-gdb.c: Include "typeprint.h".
2000 (gen_expr_for_cast): New function.
2001 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2002 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2003 type is unknown.
2004 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2005 nodebug_data_symbol.
2006 * eval.c: Include "typeprint.h".
2007 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2008 Error out if symbol has unknown type.
2009 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2010 evaluate_subexp_for_cast.
2011 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2012 OP_VAR_MSYM_VALUE.
2013 (evaluate_subexp_for_cast): New function.
2014 * gdbtypes.c (init_nodebug_var_type): New function.
2015 (objfile_type): Use it to initialize types of variables with no
2016 debug info.
2017 * typeprint.c (error_unknown_type): New.
2018 * typeprint.h (error_unknown_type): New declaration.
2019 * compile/compile-c-types.c (convert_type_basic): Handle
2020 TYPE_CODE_ERROR; warn and fallback to int for variables with
2021 unknown type.
2022
2023 2017-09-04 Pedro Alves <palves@redhat.com>
2024
2025 * eval.c (evaluate_var_value): New function, factored out from ...
2026 (evaluate_subexp_standard): ... here.
2027
2028 2017-09-04 Pedro Alves <palves@redhat.com>
2029
2030 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2031 Remove useless assignments to 'op'.
2032
2033 2017-09-04 Pedro Alves <palves@redhat.com>
2034
2035 * eval.c (eval_skip_value): New function.
2036 (evaluate_subexp_standard): Use it.
2037
2038 2017-09-04 Pedro Alves <palves@redhat.com>
2039
2040 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2041 function name from symbol/minsym and pass it to
2042 error_call_unknown_return_type.
2043
2044 2017-09-04 Pedro Alves <palves@redhat.com>
2045
2046 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2047 * ax-gdb.c (gen_msym_var_ref): New function.
2048 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2049 * eval.c (evaluate_var_msym_value): New function.
2050 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2051 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2052 to call_function_by_hand.
2053 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2054 Handle OP_VAR_MSYM_VALUE.
2055 (union exp_element) <msymbol>: New field.
2056 * minsyms.h (struct type): Forward declare.
2057 (find_minsym_type_and_address): Declare.
2058 * parse.c (write_exp_elt_msym): New function.
2059 (write_exp_msymbol): Delete, refactored as ...
2060 (find_minsym_type_and_address): ... this new function.
2061 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2062 (operator_length_standard, operator_check_standard): Handle
2063 OP_VAR_MSYM_VALUE.
2064 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2065
2066 2017-09-04 Pedro Alves <palves@redhat.com>
2067
2068 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2069 TYPE_GNU_IFUNC specially here. Throw error if return type is
2070 unknown.
2071 * ada-typeprint.c (print_func_type): Handle functions with unknown
2072 return type.
2073 * c-typeprint.c (c_type_print_base): Handle functions and methods
2074 with unknown return type.
2075 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2076 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2077 * compile/compile-c-types.c: Include "objfiles.h".
2078 (convert_func): For functions with unknown return type, warn and
2079 default to int.
2080 * compile/compile-object-run.c (compile_object_run): Adjust call
2081 to call_function_by_hand_dummy.
2082 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2083 call_function_by_hand.
2084 * eval.c (evaluate_subexp_standard): Adjust calls to
2085 call_function_by_hand. Handle functions and methods with unknown
2086 return type. Pass expect_type to call_function_by_hand.
2087 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2088 return type.
2089 * gcore.c (call_target_sbrk): Adjust call to
2090 call_function_by_hand.
2091 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2092 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2093 an integer address type instead of nodebug.
2094 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2095 call_function_by_hand.
2096 * infcall.c (error_call_unknown_return_type): New function.
2097 (call_function_by_hand): New "default_return_type" parameter.
2098 Pass it down.
2099 (call_function_by_hand_dummy): New "default_return_type"
2100 parameter. Use it instead of defaulting to int. If there's no
2101 default and the return type is unknown, throw an error. If
2102 there's a default return type, and the called function has no
2103 debug info, then assume the function is prototyped.
2104 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2105 New "default_return_type" parameter.
2106 (error_call_unknown_return_type): New declaration.
2107 * linux-fork.c (call_lseek): Cast return type of lseek.
2108 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2109 call_function_by_hand.
2110 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2111 calls to call_function_by_hand.
2112 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2113 return type.
2114 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2115 (value_nsstring, print_object_command): Adjust calls to
2116 call_function_by_hand.
2117 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2118 functions with unknown return type.
2119 (pascal_type_print_func_varspec_suffix): New function.
2120 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2121 TYPE_CODE_METHOD>: Use it.
2122 * python/py-value.c (valpy_call): Adjust call to
2123 call_function_by_hand.
2124 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2125 call_function_by_hand.
2126 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2127 call_function_by_hand.
2128 * valops.c (value_allocate_space_in_inferior): Adjust call to
2129 call_function_by_hand.
2130 * typeprint.c (type_print_unknown_return_type): New function.
2131 * typeprint.h (type_print_unknown_return_type): New declaration.
2132
2133 2017-09-04 Pedro Alves <palves@redhat.com>
2134
2135 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2136 types with more than one parameter as prototyped.
2137
2138 2017-09-04 Pedro Alves <palves@redhat.com>
2139
2140 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2141 (disassemble_command): Use gdb_disassembly_flags instead of bare
2142 int.
2143 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2144 (dump_insns, do_mixed_source_and_assembly_deprecated)
2145 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2146 Use gdb_disassembly_flags instead of bare int.
2147 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2148 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2149 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2150 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2151 (enum gdb_disassembly_flag): ... values of this new enumeration.
2152 (gdb_disassembly_flags): Define.
2153 (gdb_disassembly)
2154 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2155 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2156 gdb_disassembly_flags instead of bare int.
2157 * record-btrace.c (btrace_insn_history)
2158 (record_btrace_insn_history, record_btrace_insn_history_range)
2159 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2160 instead of bare int.
2161 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2162 Use gdb_disassembly_flags instead of bare int.
2163 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2164 Define.
2165 * target-delegates.c: Regenerate.
2166 * target.c (target_insn_history, target_insn_history_from)
2167 (target_insn_history_range): Use gdb_disassembly_flags instead of
2168 bare int.
2169 * target.h: Include "disasm.h".
2170 (struct target_ops) <to_insn_history, to_insn_history_from,
2171 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2172 int.
2173 (target_insn_history, target_insn_history_from)
2174 (target_insn_history_range): Use gdb_disassembly_flags instead of
2175 bare int.
2176
2177 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2178
2179 * cli/cli-script.c (build_command_line): For if/while commands,
2180 check whether args is empty.
2181
2182 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2183
2184 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2185 (enum command_control_type): Likewise.
2186 (struct command_line): Likewise.
2187 (free_command_lines): Likewise.
2188 (struct command_lines_deleter): Likewise.
2189 (command_line_up): Likewise.
2190 (read_command_lines): Likewise.
2191 (read_command_lines_1): Likewise.
2192 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2193 (enum command_control_type): Likewise.
2194 (struct command_line): Likewise.
2195 (free_command_lines): Likewise.
2196 (struct command_lines_deleter): Likewise.
2197 (command_line_up): Likewise.
2198 (read_command_lines): Likewise.
2199 (read_command_lines_1): Likewise.
2200 * breakpoint.h: Include cli/cli-script.h.
2201 * extension-priv.h: Likewise.
2202 * gdbcmd.h: Likewise.
2203
2204 2017-09-04 Pedro Alves <palves@redhat.com>
2205
2206 * ada-lang.c (is_known_support_routine): Move sal declaration to
2207 where it is initialized.
2208 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2209 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2210 (clear_command, update_static_tracepoint): Remove init_sal
2211 references. Move declarations closer to initializations.
2212 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2213 initializations.
2214 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2215 references. Move sal declarations closer to initializations.
2216 * frame.c (find_frame_sal): Return a symtab_and_line via function
2217 return instead of output parameter. Remove init_sal references.
2218 * frame.h (find_frame_sal): Return a symtab_and_line via function
2219 return instead of output parameter.
2220 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2221 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2222 instead of memset.
2223 (gdbscm_find_pc_line): Remove init_sal reference.
2224 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2225 references. Move declarations closer to initializations.
2226 * infcmd.c (set_step_frame): Update. Move declarations closer to
2227 initializations.
2228 (finish_backward): Remove init_sal references. Move declarations
2229 closer to initializations.
2230 * infrun.c (process_event_stop_test, handle_step_into_function)
2231 (insert_hp_step_resume_breakpoint_at_frame)
2232 (insert_step_resume_breakpoint_at_caller): Likewise.
2233 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2234 (symbol_to_sal): Likewise.
2235 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2236 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2237 to its initialization.
2238 * reverse.c (save_bookmark_command): Use new/delete. Remove
2239 init_sal references. Move declarations closer to initializations.
2240 * source.c (get_current_source_symtab_and_line): Remove brace
2241 initialization.
2242 (set_current_source_symtab_and_line): Now takes the sal by const
2243 reference. Remove brace initialization.
2244 (line_info): Remove init_sal reference.
2245 * source.h (set_current_source_symtab_and_line): Now takes a
2246 symtab_and_line via const reference.
2247 * stack.c (set_current_sal_from_frame): Adjust.
2248 (print_frame_info): Adjust.
2249 (get_last_displayed_sal): Return the sal via function return
2250 instead of via output parameter. Simplify.
2251 (frame_info): Adjust.
2252 * stack.h (get_last_displayed_sal): Return the sal via function
2253 return instead of via output parameter.
2254 * symtab.c (init_sal): Delete.
2255 (find_pc_sect_line): Remove init_sal references. Move
2256 declarations closer to initializations.
2257 (find_function_start_sal): Remove init_sal references. Move
2258 declarations closer to initializations.
2259 * symtab.h (struct symtab_and_line): In-class initialize all
2260 fields.
2261 * tracepoint.c (set_traceframe_context)
2262 (print_one_static_tracepoint_marker): Remove init_sal references.
2263 Move declarations closer to initializations.
2264 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2265 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2266 declarations closer to initializations.
2267 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2268 init_sal references. Adjust.
2269
2270 2017-09-04 Pedro Alves <palves@redhat.com>
2271
2272 * ax-gdb.c (agent_command_1): Use range-for.
2273 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2274 * breakpoint.c: Include "common/array-view.h".
2275 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2276 parameter from struct symtabs_and_lines to
2277 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2278 (breakpoint_sals_to_pc): Change sals parameter from struct
2279 symtabs_and_lines to std::vector reference.
2280 (check_fast_tracepoint_sals): Change sals parameter from struct
2281 symtabs_and_lines to std::array_view. Use range-for.
2282 (decode_static_tracepoint_spec): Return a std::vector instead of
2283 symtabs_and_lines. Update.
2284 (create_breakpoint): Update.
2285 (break_range_command, until_break_command, clear_command): Update.
2286 (base_breakpoint_decode_location, bkpt_decode_location)
2287 (bkpt_probe_create_sals_from_location)
2288 (bkpt_probe_decode_location, tracepoint_decode_location)
2289 (tracepoint_probe_decode_location)
2290 (strace_marker_create_sals_from_location): Return a std::vector
2291 instead of symtabs_and_lines.
2292 (strace_marker_create_breakpoints_sal): Update.
2293 (strace_marker_decode_location): Return a std::vector instead of
2294 symtabs_and_lines. Update.
2295 (update_breakpoint_locations): Change struct symtabs_and_lines
2296 parameters to gdb::array_view. Adjust.
2297 (location_to_sals): Return a std::vector instead of
2298 symtabs_and_lines. Update.
2299 (breakpoint_re_set_default): Use std::vector instead of struct
2300 symtabs_and_lines.
2301 (decode_location_default): Return a std::vector instead of
2302 symtabs_and_lines. Update.
2303 * breakpoint.h: Include "common/array-view.h".
2304 (struct breakpoint_ops) <decode_location>: Now returns a
2305 std::vector instead of returning a symtabs_and_lines via output
2306 parameter.
2307 (update_breakpoint_locations): Change sals parameters to use
2308 gdb::array_view.
2309 * cli/cli-cmds.c (edit_command, list_command): Update to use
2310 std::vector and gdb::array_view.
2311 (ambiguous_line_spec): Adjust to use gdb::array_view and
2312 range-for.
2313 (compare_symtabs): Rename to ...
2314 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2315 const reference and adjust.
2316 (filter_sals): Rewrite using std::vector and standard algorithms.
2317 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2318 (jump_command): Update to use std::vector.
2319 * linespec.c (struct linespec_state) <canonical_names>: Update
2320 comment.
2321 (add_sal_to_sals_basic): Delete.
2322 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2323 (decode_line_2, create_sals_line_offset)
2324 (convert_address_location_to_sals, convert_linespec_to_sals)
2325 (convert_explicit_location_to_sals, parse_linespec)
2326 (event_location_to_sals, decode_line_full, decode_line_1)
2327 (decode_line_with_current_source)
2328 (decode_line_with_last_displayed, decode_objc)
2329 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2330 (linespec_result::~linespec_result): Adjust to use std::vector
2331 instead of symtabs_and_lines.
2332 * linespec.h (linespec_sals::sals): Now a std::vector.
2333 (struct linespec_result): Use std::vector, bool, and in-class
2334 initialization.
2335 (decode_line_1, decode_line_with_current_source)
2336 (decode_line_with_last_displayed): Return std::vector.
2337 * macrocmd.c (info_macros_command): Use std::vector.
2338 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2339 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2340 std::vector.
2341 * probe.h (parse_probes): Return a std::vector.
2342 * python/python.c (gdbpy_decode_line): Use std::vector and
2343 gdb::array_view.
2344 * source.c (select_source_symtab, line_info): Use std::vector.
2345 * stack.c (func_command): Use std::vector.
2346 * symtab.h (struct symtabs_and_lines): Delete.
2347 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2348
2349 2017-09-04 Pedro Alves <palves@redhat.com>
2350
2351 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2352 unittests/array-view-selftests.c.
2353 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2354 * common/array-view.h: New file.
2355 * unittests/array-view-selftests.c: New file.
2356
2357 2017-09-04 Pedro Alves <palves@redhat.com>
2358
2359 * cli/cli-cmds.c (edit_command): Pass message to
2360 ambiguous_line_spec.
2361 (list_command): Pass message to ambiguous_line_spec. Say
2362 "first"/"last" instead of "start" and "end" to be consistent with
2363 the manual.
2364 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2365 them to print formatted message.
2366
2367 2017-09-04 Pedro Alves <palves@redhat.com>
2368
2369 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2370 ftrace_update_insns by reference instead of pointer.
2371
2372 2017-09-04 Yao Qi <yao.qi@linaro.org>
2373
2374 * i386-go32-tdep.c: Include x86-xstate.h.
2375 (i386_go32_init_abi): Call i386_target_description.
2376 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2377 if xcr0 is X86_XSTATE_X87_MASK.
2378 * i386-tdep.h (tdesc_i386): Remove the declaration.
2379 (tdesc_i386_mmx): Likewise.
2380
2381 2017-09-04 Yao Qi <yao.qi@linaro.org>
2382
2383 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2384 X86_XSTATE_SSE_MASK instead of 0.
2385
2386 2017-09-04 Yao Qi <yao.qi@linaro.org>
2387
2388 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2389 i386_target_description.
2390 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2391 i386_target_description.
2392 * i386-tdep.c (i386_gdbarch_init): Likewise.
2393
2394 2017-09-04 Yao Qi <yao.qi@linaro.org>
2395
2396 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2397 (x86_darwin_init_abi_64): Call amd64_target_description.
2398 * amd64-dicos-tdep.c: Likewise.
2399 * amd64-fbsd-nat.c: Likewise.
2400 * amd64-fbsd-tdep.c: Likewise.
2401 * amd64-nbsd-tdep.c: Likewise.
2402 * amd64-obsd-tdep.c: Likewise.
2403 * amd64-sol2-tdep.c: Likewise.
2404 * amd64-windows-tdep.c: Likewise.
2405 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2406
2407 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2410 (btrace_function) <insn>: Change type to use std::vector.
2411 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2412 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2413 ftrace_update_insns, ftrace_compute_global_level_offset,
2414 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2415 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2416 change to std::vector.
2417 (ftrace_update_insns): Adjust to change to std::vector, change
2418 type of INSN parameter.
2419 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2420 * record-btrace.c (btrace_call_history_insn_range,
2421 btrace_compute_src_line_range,
2422 record_btrace_frame_prev_register): Adjust to change to
2423 std::vector.
2424 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2425 to change to std::vector.
2426
2427 2017-09-03 Tom Tromey <tom@tromey.com>
2428
2429 * corefile.c (reopen_exec_file): Use std::string.
2430
2431 2017-09-03 Tom Tromey <tom@tromey.com>
2432
2433 * compile/compile.c (compile_register_name_mangled): Return
2434 std::string.
2435 * compile/compile-loc2c.c (pushf_register_address): Update.
2436 (pushf_register): Update.
2437 * compile/compile-c-types.c (convert_array): Update.
2438 * compile/compile-c-symbols.c (generate_vla_size): Update.
2439 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2440 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2441 (convert_one_symbol): Update.
2442 (generate_c_for_for_one_variable): Update.
2443 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2444 std::string.
2445 (generate_register_struct): Update.
2446 * compile/compile-internal.h (c_get_range_decl_name): Return a
2447 std::string.
2448 (compile_register_name_mangled): Return std::string.
2449
2450 2017-09-03 Tom Tromey <tom@tromey.com>
2451
2452 * utils.c (perror_string): Return a std::string.
2453 (throw_perror_with_name, perror_warning_with_name): Update.
2454
2455 2017-09-03 Tom Tromey <tom@tromey.com>
2456
2457 * demangle.c (demangle_command): Use std::string,
2458 unique_xmalloc_ptr.
2459
2460 2017-09-03 Tom Tromey <tom@tromey.com>
2461
2462 * cli/cli-setshow.c (do_set_command): Use std::string.
2463
2464 2017-09-03 Tom Tromey <tom@tromey.com>
2465
2466 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2467
2468 2017-09-03 Tom Tromey <tom@tromey.com>
2469
2470 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2471
2472 2017-09-03 Tom Tromey <tom@tromey.com>
2473
2474 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2475 gdb::unique_xmalloc_ptr.
2476
2477 2017-09-03 Tom Tromey <tom@tromey.com>
2478
2479 * thread.c (print_thread_info_1): Use string_printf.
2480 (thread_apply_command, thread_apply_all_command): Use
2481 std::string.
2482
2483 2017-09-03 Tom Tromey <tom@tromey.com>
2484
2485 * valprint.c (val_print_string): Update.
2486 * gdbcore.h (memory_error_message): Return std::string.
2487 * corefile.c (memory_error_message): Return std::string.
2488 (memory_error): Update.
2489 * breakpoint.c (insert_bp_location): Update.
2490
2491 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2492
2493 * target/waitstatus.h (target_waitstatus_to_string): Change
2494 return type to std::string.
2495 * target/waitstatus.c (target_waitstatus_to_string): Return
2496 std::string.
2497 * target.h (target_waitstatus_to_string): Remove declaration.
2498 * infrun.c (resume, clear_proceed_status_thread,
2499 print_target_wait_results, do_target_wait, save_waitstatus,
2500 stop_all_threads): Adjust.
2501 * record-btrace.c (record_btrace_wait): Adjust.
2502 * target-debug.h
2503 (target_debug_print_struct_target_waitstatus_p): Adjust.
2504
2505 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2506
2507 PR gdb/22046
2508 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2509 detection.
2510
2511 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2512
2513 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2514 for setting/unsetting environment variables on the remote target.
2515 (New remote packets): Add entries for QEnvironmentHexEncoded,
2516 QEnvironmentUnset and QEnvironmentReset.
2517 * common/environ.c (gdb_environ::operator=): Extend method to
2518 handle m_user_set_env_list and m_user_unset_env_list.
2519 (gdb_environ::clear): Likewise.
2520 (match_var_in_string): Change type of first parameter from 'char
2521 *' to 'const char *'.
2522 (gdb_environ::set): Extend method to handle
2523 m_user_set_env_list and m_user_unset_env_list.
2524 (gdb_environ::unset): Likewise.
2525 (gdb_environ::clear_user_set_env): New method.
2526 (gdb_environ::user_set_envp): Likewise.
2527 (gdb_environ::user_unset_envp): Likewise.
2528 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2529 m_user_unset_env_list on move constructor/assignment.
2530 (unset): Add new default parameter 'update_unset_list = true'.
2531 (clear_user_set_env): New method.
2532 (user_set_envp): Likewise.
2533 (user_unset_envp): Likewise.
2534 (m_user_set_env_list): New std::set.
2535 (m_user_unset_env_list): Likewise.
2536 * common/rsp-low.c (hex2str): New function.
2537 (bin2hex): New overload for bin2hex function.
2538 * common/rsp-low.c (hex2str): New prototype.
2539 (str2hex): New overload prototype.
2540 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2541 QEnvironmentUnset and QEnvironmentReset.
2542 (remote_protocol_features): Add QEnvironmentHexEncoded,
2543 QEnvironmentUnset and QEnvironmentReset packets.
2544 (send_environment_packet): New function.
2545 (extended_remote_environment_support): Likewise.
2546 (extended_remote_create_inferior): Call
2547 extended_remote_environment_support.
2548 (_initialize_remote): Add QEnvironmentHexEncoded,
2549 QEnvironmentUnset and QEnvironmentReset packet configs.
2550 * unittests/environ-selftests.c (gdb_selftest_env_var):
2551 New variable.
2552 (test_vector_initialization): New function.
2553 (test_init_from_host_environ): Likewise.
2554 (test_reinit_from_host_environ): Likewise.
2555 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2556 Likewise.
2557 (test_unset_set_empty_vector): Likewise.
2558 (test_vector_clear): Likewise.
2559 (test_std_move): Likewise.
2560 (test_move_constructor):
2561 (test_self_move): Likewise.
2562 (test_set_unset_reset): Likewise.
2563 (run_tests): Rewrite in terms of the functions above.
2564
2565 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2566
2567 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2568 (adi_available): Use a temp variable of type CORE_ADDR as argument
2569 3 when calling target_auxv_search.
2570 (adi_normalize_address): Use masks and xor operators to calculate
2571 normalized address.
2572 (adi_read_versions, adi_write_versions, adi_print_versions)
2573 (do_examine, do_assign): Use paddress.
2574
2575 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2576
2577 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2578 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2579 out of loop and add supply of FIR.
2580 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2581 add collect of FIR.
2582
2583 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 PR gdb/21827
2586 * cli/cli-script.c (define_command): Don't convert command name
2587 to lower case.
2588
2589 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2590
2591 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2592 Update all callers accordingly. Remove all code blocks handling
2593 the case where DISPP is not NULL.
2594
2595 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2596
2597 PR symtab/22003
2598 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2599 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2600 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2601
2602 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2603
2604 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2605 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2606 (read_comp_units_from_section): New parameter abbrev_section, use
2607 read_and_check_comp_unit_head, allocate signatured_type if needed.
2608 (create_all_comp_units): Update read_comp_units_from_section caller.
2609
2610 2017-08-23 Pedro Alves <palves@redhat.com>
2611
2612 PR remote/21852
2613 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2614 to null_ptid and switch to thread without reading the registers
2615 after adding the inferior.
2616
2617 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2618
2619 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2620 compile-gcc.
2621 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2622 (compile_to_object): Implement compile_gcc.
2623 (_initialize_compile): Install "set compile-gcc". Initialize
2624 compile_gcc.
2625
2626 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2627
2628 * compile/compile.c (compile_to_object): Conditionally call
2629 set_verbose. Conditionally call compile or compile_v0.
2630
2631 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2632
2633 * sparc64-tdep.h: (adi_normalize_address): New export.
2634 * sparc-nat.h: (open_adi_tag_fd): New export.
2635 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2636 * sparc64-linux-tdep.c:
2637 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2638 (sparc64_linux_handle_segmentation_fault): New function.
2639 (sparc64_linux_init_abi): Register
2640 sparc64_linux_handle_segmentation_fault
2641 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2642 (sparc64_addr_bits_remove): New function.
2643 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2644 (MAX_PROC_NAME_SIZE): New macro.
2645 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2646 (sparc64adilist): New variable.
2647 (adi_proc_list): New variable.
2648 (find_adi_info): New function.
2649 (add_adi_info): New function.
2650 (get_adi_info_proc): New function.
2651 (get_adi_info): New function.
2652 (info_adi_command): New function.
2653 (read_maps_entry): New function.
2654 (adi_available): New function.
2655 (adi_normalize_address): New function.
2656 (adi_align_address): New function.
2657 (adi_convert_byte_count): New function.
2658 (adi_tag_fd): New function.
2659 (adi_is_addr_mapped): New function.
2660 (adi_read_versions): New function.
2661 (adi_write_versions): New function.
2662 (adi_print_versions): New function.
2663 (do_examine): New function.
2664 (do_assign): New function.
2665 (adi_examine_command): New function.
2666 (adi_assign_command): New function.
2667 (_initialize_sparc64_adi_tdep): New function.
2668
2669 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2670
2671 * breakpoint.c (breakpoints_info): Rename to ...
2672 (info_breakpoints_command): ... this.
2673 (watchpoints_info): Rename to ...
2674 (info_watchpoints_command): ... this.
2675 (tracepoints_info): Rename to ...
2676 (info_tracepoints_command): ... this.
2677 (_initialize_breakpoint): Adjust.
2678 * dcache.c (dcache_info): Rename to ...
2679 (info_display_command): ... this.
2680 (_initialize_dcache): Adjust.
2681 * frame.h (args_info): Rename to ...
2682 (info_args_command): ... this.
2683 (locals_info): Rename to ...
2684 (info_locals_command): ... this.
2685 * infcmd.c (nofp_registers_info): Rename to ...
2686 (info_registers_command): ... this.
2687 (float_info): Rename to ...
2688 (info_float_command): ... this.
2689 (program_info): Rename to ...
2690 (info_program_command): ... this.
2691 (all_registers_info): Rename to ...
2692 (info_all_registers_command): ... this.
2693 (vector_info): Rename to ...
2694 (info_vector_command): ... this.
2695 (float_info): Rename to ...
2696 (info_float_command): ... this.
2697 (_initialize_infcmd): Adjust.
2698 * inferior.h (term_info): Rename to ...
2699 (info_terminal_command): ... this.
2700 * inflow.c (term_info): Rename to ...
2701 (info_terminal_command): ... this.
2702 (_initialize_inflow): Adjust.
2703 * infrun.c (signals_info): Rename to ...
2704 (info_signals_command): ... this.
2705 (_initialize_infrun): Adjust.
2706 * objc-lang.c (classes_info): Rename to ...
2707 (info_classes_command): ... this.
2708 (selectors_info): Rename to ...
2709 (info_selectors_command): ... this.
2710 (_initialize_objc_language): Adjust.
2711 * printcmd.c (sym_info): Rename to ...
2712 (info_symbol_command): ... this.
2713 (address_info): Rename to ...
2714 (info_address_command): ... this.
2715 (display_info): Rename to ...
2716 (info_display_command): ... this.
2717 (_initialize_printcmd): Adjust.
2718 * reverse.c (bookmarks_info): Rename to ...
2719 (info_breakpoints_command): ... this.
2720 (_initialize_reverse): Adjust.
2721 * ser-go32.c (dos_info): Rename to ...
2722 (info_serial_command): ... this.
2723 (_initialize_ser_dos): Adjust.
2724 * skip.c (skip_info): Rename to ...
2725 (info_skip_command): ... this.
2726 (_initialize_step_skip): Adjust.
2727 * source.c (line_info): Rename to ...
2728 (info_line_command): ... this.
2729 (source_info): Rename to ...
2730 (info_source_command)
2731 * stack.c (frame_info): Rename to ...
2732 (info_frame_command): ... this.
2733 (locals_info): Rename to ...
2734 (info_locals_command): ... this.
2735 (args_info): Rename to ...
2736 (info_args_command): ... this.
2737 (_initialize_stack): Adjust.
2738 * symtab.c (sources_info): Rename to ...
2739 (info_sources_command): ... this.
2740 (variables_info): Rename to ...
2741 (info_variables_command): ... this.
2742 (functions_info): Rename to ...
2743 (info_functions_command): ... this.
2744 (types_info): Rename to ...
2745 (info_types_command): ... this.
2746 (_initialize_symtab): Adjust.
2747 * target.c (target_info): Rename to ...
2748 (info_target_command): ... this.
2749 (initialize_targets): Adjust.
2750 * tracepoint.c (tvariables_info): Rename to ...
2751 (info_tvariables_command): ... this.
2752 (scope_info): Rename to ...
2753 (info_scope_command): ... this.
2754 (trace_dump_actions): Adjust.
2755 (_initialize_tracepoint): Adjust.
2756
2757 2017-08-22 Tom Tromey <tom@tromey.com>
2758
2759 * breakpoint.h (install_breakpoint): Update.
2760 * breakpoint.c (add_solib_catchpoint): Update.
2761 (install_breakpoint): Change argument to a std::unique_ptr.
2762 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2763 (create_breakpoint_sal, create_breakpoint): Update.
2764 (watch_command_1, catch_exec_command_1)
2765 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2766 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2767 Return the breakpoint.
2768 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2769 (new_single_step_breakpoint): Update.
2770 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2771 std::unique_ptr.
2772 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2773 std::unique_ptr.
2774 * break-catch-sig.c (create_signal_catchpoint): Use
2775 std::unique_ptr.
2776 * ada-lang.c (create_ada_exception_catchpoint): Use
2777 std::unique_ptr.
2778
2779 2017-08-22 Tom Tromey <tom@tromey.com>
2780
2781 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2782
2783 2017-08-22 Tom Tromey <tom@tromey.com>
2784
2785 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2786 (lookup_partial_symbol): Update.
2787
2788 2017-08-22 Tom Tromey <tom@tromey.com>
2789
2790 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2791 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2792 (find_and_open_source, symtab_to_fullname): Update.
2793 * psymtab.c (psymtab_to_fullname): Update.
2794
2795 2017-08-22 Tom Tromey <tom@tromey.com>
2796
2797 * exec.c (exec_file_attach): Update.
2798 * linux-thread-db.c (try_thread_db_load): Update.
2799 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2800 * utils.c (gdb_realpath): Change return type.
2801 (gdb_realpath_keepfile): Update.
2802 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2803 (_initialize_utils): Register the new self test.
2804 * source.c (openp): Update.
2805 (find_and_open_source): Update.
2806 * nto-tdep.c (nto_find_and_open_solib): Update.
2807 * main.c (set_gdb_data_directory): Update.
2808 (captured_main_1): Update.
2809 * dwarf2read.c (dwarf2_get_dwz_file): Update
2810 (dw2_map_symbol_filenames): Update.
2811 * auto-load.c (auto_load_safe_path_vec_update): Update.
2812 (filename_is_in_auto_load_safe_path_vec): Change type of
2813 "filename_realp".
2814 (auto_load_objfile_script): Update.
2815 (file_is_auto_load_safe): Update. Use std::string.
2816 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2817
2818 2017-08-22 Tom Tromey <tom@tromey.com>
2819
2820 * utils.c (gdb_realpath_keepfile): Return a
2821 gdb::unique_xmalloc_ptr.
2822 * exec.c (exec_file_attach): Update.
2823 * utils.h (gdb_realpath_keepfile): Return a
2824 gdb::unique_xmalloc_ptr.
2825
2826 2017-08-22 Tom Tromey <tom@tromey.com>
2827
2828 * compile/compile.c (compile_file_command): Use
2829 gdb::unique_xmalloc_ptr, std::string.
2830 * utils.c (gdb_abspath): Change return type.
2831 * source.c (openp): Update.
2832 * objfiles.c (allocate_objfile): Update.
2833 * main.c (set_gdb_data_directory): Update.
2834 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2835
2836 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2837
2838 * cli-cmds.c (list_commands): List actual code around more than
2839 one location.
2840
2841 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2842
2843 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2844
2845 2017-08-21 Pedro Alves <palves@redhat.com>
2846
2847 PR gdb/19487
2848 * c-exp.y (variable production): Handle function aliases.
2849 * minsyms.c (msymbol_is_text): New function.
2850 * minsyms.h (msymbol_is_text): Declare.
2851 * symtab.c (find_function_alias_target): New function.
2852 * symtab.h (find_function_alias_target): Declare.
2853
2854 2017-08-21 Pedro Alves <palves@redhat.com>
2855
2856 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2857 typedefs.
2858 * typeprint.c (whatis_exp): If handling "whatis", and expression
2859 is OP_TYPE, strip one typedef level. Otherwise don't strip
2860 typedefs here.
2861 * valops.c (value_cast): Save "to" type before resolving
2862 stubs/typedefs. Use that type as resulting value's type.
2863
2864 2017-08-18 Tom Tromey <tom@tromey.com>
2865 Pedro Alves <palves@redhat.com>
2866
2867 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2868 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2869 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2870 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2871 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2872 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2873 (linux_get_siginfo_data): Add "thread" argument. Use
2874 scoped_restore.
2875 * linux-nat.c (linux_child_follow_fork)
2876 (check_stopped_by_watchpoint): Use scoped_restore.
2877 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2878 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2879 (restore_inferior_ptid, save_inferior_ptid): Remove.
2880 * btrace.c (btrace_fetch): Use scoped_restore.
2881 * bsd-uthread.c (bsd_uthread_fetch_registers)
2882 (bsd_uthread_store_registers): Use scoped_restore.
2883 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2884 scoped_restore.
2885 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2886 (aix_thread_xfer_partial): Use scoped_restore.
2887 * inferior.h (save_inferior_ptid): Remove.
2888
2889 2017-08-18 Yao Qi <yao.qi@linaro.org>
2890
2891 PR tdep/21818
2892 * arm-tdep.c (gdb_print_insn_arm): Mark
2893 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2894
2895 2017-08-18 Yao Qi <yao.qi@linaro.org>
2896
2897 * NEWS: Mention GDBserver's new option "--selftest".
2898 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2899 * selftest.c: Move it to common/selftest.c.
2900 * selftest.h: Move it to common/selftest.h.
2901 * selftest-arch.c (reset): New function.
2902 (tests_with_arch): Call reset.
2903
2904 2017-08-18 Yao Qi <yao.qi@linaro.org>
2905
2906 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2907 instead of exception_fprintf and printf_filtered.
2908
2909 2017-08-18 Yao Qi <yao.qi@linaro.org>
2910
2911 * selftest.c (register_self_test): Rename it to
2912 selftests::register_test.
2913 (run_self_tests): selftest::run_tests.
2914 * selftest.h: Update declarations.
2915 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2916 selftests::register_test_foreach_arch.
2917 * selftest-arch.h: Update declaration.
2918 * aarch64-tdep.c: Update.
2919 * arm-tdep.c: Likewise.
2920 * disasm-selftests.c: Likewise.
2921 * dwarf2loc.c: Likewise.
2922 * dwarf2-frame.c: Likewise.
2923 * findvar.c: Likewise.
2924 * gdbarch-selftests.c: Likewise.
2925 * maint.c (maintenance_selftest): Likewise.
2926 * regcache.c: Likewise.
2927 * rust-exp.y: Likewise.
2928 * selftest-arch.c: Likewise.
2929 * unittests/environ-selftests.c: Likewise.
2930 * unittests/function-view-selftests.c: Likewise.
2931 * unittests/offset-type-selftests.c: Likewise.
2932 * unittests/optional-selftests.c: Likewise.
2933 * unittests/scoped_restore-selftests.c: Likewise.
2934 * utils-selftests.c: Likewise.
2935
2936 2017-08-17 Pedro Alves <palves@redhat.com>
2937
2938 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2939 local.
2940
2941 2017-08-17 Pedro Alves <palves@redhat.com>
2942
2943 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2944 field.
2945 (reset_die_in_process): Delete, replaced by ...
2946 (process_die_scope): ... this new class. Make it responsible for
2947 freeing cu->line_header too.
2948 (process_die): Use process_die_scope.
2949 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2950 cu->line_header_die_owner. Don't release the line header if it's
2951 owned by the CU.
2952 (setup_type_unit_groups): Make the CU/DIE own the line header.
2953 Don't release the line header here.
2954
2955 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2956
2957 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2958
2959 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2960
2961 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2962 Single-Key mode
2963
2964 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2965
2966 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2967 mode command list.
2968
2969 2017-08-15 Stafford Horne <shorne@gmail.com>
2970
2971 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2972
2973 2017-08-15 Stafford Horne <shorne@gmail.com>
2974
2975 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2976
2977 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2978
2979 PR gdb/21954
2980 * infcmd.c (unset_environment_command): Use the 'clear' method on
2981 the environment instead of resetting it.
2982
2983 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2984
2985 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2986 platforms.
2987
2988 2017-08-14 Tom Tromey <tom@tromey.com>
2989
2990 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2991 (print_binary_chars): Likewise.
2992 (BITS_IN_BYTES): Remove.
2993
2994 2017-08-14 Tom Tromey <tom@tromey.com>
2995
2996 PR gdb/21675
2997 * valprint.c (LOW_ZERO): Change value to 034.
2998 (print_octal_chars): Add static_asserts for octal constants.
2999 * printcmd.c (print_scalar_formatted): Add 'd' case.
3000
3001 2017-08-11 Tom Tromey <tom@tromey.com>
3002
3003 * symfile.c (add_symbol_file_command): Use std::vector.
3004
3005 2017-08-14 Tom Tromey <tom@tromey.com>
3006
3007 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3008 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3009 std::move.
3010 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3011
3012 2017-08-11 Pedro Alves <palves@redhat.com>
3013
3014 * infrun.c (process_event_stop_test): Adjust
3015 function_name_is_marked_for_skip call.
3016 * skip.c: Include <list>.
3017 (skiplist_entry): Make it a class with private fields, and
3018 getters/setters.
3019 (skiplist_entry_chain): Delete.
3020 (skiplist_entries): New.
3021 (skiplist_entry_count): Delete.
3022 (highest_skiplist_entry_num): New.
3023 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3024 (add_skiplist_entry): Delete.
3025 (skiplist_entry::skiplist_entry): New.
3026 (skiplist_entry::add_entry): New.
3027 (skip_file_command, skip_function): Adjust.
3028 (compile_skip_regexp): Delete.
3029 (skip_command): Don't compile regexp here. Adjust to use
3030 skiplist_entry::add_entry.
3031 (skip_info): Adjust to use range-for and getters.
3032 (skip_enable_command, skip_disable_command): Adjust to use
3033 range-for and setters.
3034 (skip_delete_command): Adjust to use std::list.
3035 (add_skiplist_entry): Delete.
3036 (skip_file_p): Delete, refactored as ...
3037 (skiplist_entry::do_skip_file_p): ... this new method.
3038 (skip_gfile_p): Delete, refactored as ...
3039 (skiplist_entry::do_gskip_file_p): ... this new method.
3040 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3041 (skiplist_entry::skip_function_p): ... this new method.
3042 (function_name_is_marked_for_skip): Now returns bool, and takes
3043 the function sal by const reference. Adjust to use range-for and
3044 skiplist_entry methods.
3045 (_initialize_step_skip): Remove references to
3046 skiplist_entry_chain, skiplist_entry_count.
3047 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3048 takes the function sal by const reference.
3049
3050 2017-08-11 Yao Qi <yao.qi@linaro.org>
3051
3052 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3053 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3054 (dwarf2_frame_cache):
3055 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3056 RETURN_MASK_ALL and set *this_case to NULL.
3057 * frame-unwind.h: Update comments.
3058
3059 2017-08-11 Yao Qi <yao.qi@linaro.org>
3060
3061 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3062 (dwarf2_frame_state_copy_regs): Remove.
3063 (dwarf2_frame_state_free_regs): Remove.
3064 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3065 (dwarf2_restore_rule): Call method .alloc_regs instead of
3066 dwarf2_frame_state_alloc_regs.
3067 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3068 constructor. Call std::move.
3069 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3070 (dwarf2_frame_cache): Likewise.
3071
3072 [GDB_SELF_TEST]: Include selftest.h and
3073 selftest-arch.h.
3074 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3075 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3076 execute_cfa_program_test.
3077
3078 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3079 copy ctor, assignment operator, move assignment.
3080 <alloc_regs>: New method.
3081 <swap>: New method.
3082 (struct dwarf2_frame_state): Delete dtor.
3083 (dwarf2_frame_state_alloc_regs): Remove declaration.
3084 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3085 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3086
3087 2017-08-11 Yao Qi <yao.qi@linaro.org>
3088
3089 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3090 (dwarf2_frame_state::dwarf2_frame_state): New.
3091 (dwarf2_frame_state::~dwarf2_frame_state): New.
3092 (dwarf2_fetch_cfa_info): Update.
3093 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3094 rather than a pointer. Update code.
3095 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3096 dtor.
3097 <data_align, code_align, retaddr_column>: Change them to const.
3098 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3099 to bool.
3100
3101 2017-08-11 Yao Qi <yao.qi@linaro.org>
3102
3103 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3104 <loc.exp>: New field.
3105 * dwarf2-frame.c (execute_cfa_program): Update.
3106 (dwarf2_frame_prev_register): Update.
3107
3108 2017-08-10 Pedro Alves <palves@redhat.com>
3109
3110 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3111
3112 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3113
3114 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3115 (fbsd_pending_children): Use std::list.
3116 (fbsd_remember_child): Likewise.
3117 (fbsd_is_child_pending): Likewise.
3118 (fbsd_pending_vfork_done): Use std::forward_list.
3119 (fbsd_add_vfork_done): Likewise.
3120 (fbsd_is_vfork_done_pending): Likewise.
3121 (fbsd_next_vfork_done): Likewise.
3122
3123 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3124
3125 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3126 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3127 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3128 for `mapfilename'.
3129 (fbsd_xfer_partial): Use gdb::byte_vector.
3130 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3131
3132 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3133
3134 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3135 "filestuff.h".
3136 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3137
3138 2017-08-09 Tom Tromey <tom@tromey.com>
3139
3140 * skip.c (skiplist_entry): New constructor.
3141 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3142 (skiplist_entry::file_is_glob): Now bool.
3143 (skiplist_entry::file, skiplist_entry::function): Now
3144 std::string.
3145 (make_skip_entry): Return a unique_ptr. Use new.
3146 (free_skiplist_entry, free_skiplist_entry_cleanup)
3147 (make_free_skiplist_entry_cleanup): Remove.
3148 (skip_command, skip_disable_command, add_skiplist_entry)
3149 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3150 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3151 (function_name_is_marked_for_skip): Update.
3152 (skip_delete_command): Update. Use delete.
3153
3154 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3155
3156 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3157 (aarch64_linux_core_read_description): New function.
3158 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3159
3160 2017-08-09 Pedro Alves <palves@redhat.com>
3161
3162 * cp-name-parser.y (cp_comp_to_string): Return a
3163 gdb::unique_xmalloc_ptr<char>.
3164 * cp-support.c (replace_typedefs_qualified_name)
3165 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3166 (cp_canonicalize_string_full): Use op= instead of explicit
3167 convertion.
3168 (cp_class_name_from_physname, method_name_from_physname)
3169 (cp_func_name, cp_remove_params): Adjust to use
3170 gdb::unique_xmalloc_ptr<char>.
3171 * cp-support.h (cp_comp_to_string): Return a
3172 gdb::unique_xmalloc_ptr<char>.
3173 * python/py-type.c (typy_lookup_type): Adjust to use
3174 gdb::unique_xmalloc_ptr<char>.
3175
3176 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3177
3178 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3179
3180 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3181 Yao Qi <yao.qi@linaro.org>
3182
3183 * cp-support.c (cp_canonicalize_string_full): Use
3184 gdb::unique_xmalloc_ptr<char>.
3185 (cp_canonicalize_string): Likewise.
3186
3187 2017-08-09 Yao Qi <yao.qi@linaro.org>
3188
3189 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3190 * regformats/i386/amd64-avx-avx512.dat: Remove.
3191 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3192 * regformats/i386/amd64-avx-mpx.dat:Remove.
3193 * regformats/i386/amd64-avx.dat: Remove.
3194 * regformats/i386/amd64-mpx.dat: Remove.
3195 * regformats/i386/i386-avx-avx512.dat: Remove.
3196 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3197 * regformats/i386/i386-avx-mpx.dat: Remove.
3198 * regformats/i386/i386-mmx.dat: Remove.
3199 * regformats/i386/i386-mpx.dat: Remove.
3200
3201 2017-08-09 Yao Qi <yao.qi@linaro.org>
3202
3203 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3204 * amd64-tdep.c: Don't include features/i386/x32*.c.
3205 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3206 functions.
3207 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3208 and i386/x32-avx-avx512.
3209 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3210 and i386/x32.xml.
3211 * features/i386/x32-avx-avx512.c: Removed.
3212 * features/i386/x32-avx-avx512.xml: Removed.
3213 * features/i386/x32-avx.c: Removed.
3214 * features/i386/x32-avx.xml: Removed.
3215 * features/i386/x32.c: Removed.
3216 * features/i386/x32.xml: Removed.
3217 * regformats/i386/x32-avx-avx512.dat: Removed.
3218 * regformats/i386/x32-avx.dat: Removed.
3219 * regformats/i386/x32.dat: Removed.
3220
3221 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3222
3223 PR breakpoints/21886
3224 * mem-break.c (default_memory_insert_breakpoint): Use
3225 `->placed_address' rather than `->reqstd_address' for the
3226 breakpoint location.
3227
3228 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3229
3230 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3231 assertions.
3232
3233 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3234
3235 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3236 a union of `tdep_info', `tdesc_data' and `id'.
3237 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3238 rather than `info.tdep_info'.
3239 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3240 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3241 * i386-tdep.c (i386_gdbarch_init): Likewise.
3242 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3243 * mips-tdep.c (mips_gdbarch_init): Likewise.
3244 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3245 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3246 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3247 `info.tdep_info'.
3248 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3249 `info.tdep_info'.
3250 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3251 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3252 `info.tdep_info'.
3253 * spu-tdep.c (spu_gdbarch_init): Likewise.
3254 * gdbarch.h: Regenerate.
3255
3256 2017-08-07 Leszek Swirski <leszeks@google.com>
3257
3258 PR symtab/20899
3259 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3260
3261 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3262
3263 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3264 (gdbsim_open): Rename gdb_argv args object to argv.
3265
3266 2017-08-05 Tom Tromey <tom@tromey.com>
3267
3268 * compile/compile-object-load.c (compile_object_load): Use
3269 gdb::unique_xmalloc_ptr.
3270 * cli/cli-dump.c (scan_filename): Rename from
3271 scan_filename_with_cleanup. Change return type.
3272 (scan_expression): Rename from scan_expression_with_cleanup.
3273 Change return type.
3274 (dump_memory_to_file, dump_value_to_file, restore_command):
3275 Use gdb::unique_xmalloc_ptr. Update.
3276 * cli/cli-cmds.c (find_and_open_script): Use
3277 gdb::unique_xmalloc_ptr.
3278 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3279 * symmisc.c (maintenance_print_symbols)
3280 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3281 * symfile.c (symfile_bfd_open, generic_load)
3282 (add_symbol_file_command, remove_symbol_file_command): Use
3283 gdb::unique_xmalloc_ptr.
3284 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3285 * psymtab.c (maintenance_print_psymbols): Use
3286 gdb::unique_xmalloc_ptr.
3287 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3288 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3289 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3290 (reload_shared_libraries_1): Likewise.
3291
3292 2017-08-05 Tom Tromey <tom@tromey.com>
3293
3294 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3295 (rust_op_vector, rust_set_vector): New typedefs.
3296 (current_parser): New global.
3297 (work_obstack): Change to pointer type. Update all users.
3298 (rust_ast, pstate): Remove globals.
3299 (struct rust_parser): New.
3300 (%union) <params, field_inits>: Change type.
3301 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3302 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3303 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3304 (convert_params_to_types, convert_params_to_expression): Change
3305 type of "params".
3306 (ast_string): Change type of "fields".
3307 (rust_parse): Make a rust_parser. Remove cleanups.
3308 (rust_lex_tests): Make and install an auto_obstack.
3309
3310 2017-08-04 Yao Qi <yao.qi@linaro.org>
3311
3312 * configure.srv (ipa_x32_linux_regobj): New.
3313 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3314 instead of X86_TDESC_AVX512.
3315 (initialize_low_tracepoint): Call
3316 init_registers_x32_avx_avx512_linux.
3317
3318 2017-08-04 Yao Qi <yao.qi@linaro.org>
3319
3320 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3321
3322 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3323
3324 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3325
3326 2017-08-03 Tom Tromey <tom@tromey.com>
3327
3328 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3329 Remove.
3330 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3331
3332 2017-08-03 Tom Tromey <tom@tromey.com>
3333
3334 * python/py-param.c (compute_enum_values): Use gdb_argv.
3335
3336 2017-08-03 Tom Tromey <tom@tromey.com>
3337
3338 * utils.h (struct gdb_argv_deleter): New.
3339 (gdb_argv): New class.
3340 * utils.c (gdb_argv::reset): New method.
3341 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3342 * tracefile.c (tsave_command): Use gdb_argv.
3343 * top.c (new_ui_command): Use gdb_argv.
3344 * symmisc.c (maintenance_print_symbols)
3345 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3346 * symfile.c (symbol_file_command, generic_load)
3347 (remove_symbol_file_command): Use gdb_argv.
3348 * stack.c (backtrace_command): Use gdb_argv.
3349 * source.c (add_path, show_substitute_path_command)
3350 (unset_substitute_path_command, set_substitute_path_command):
3351 Use gdb_argv.
3352 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3353 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3354 * remote.c (extended_remote_run, remote_put_command)
3355 (remote_get_command, remote_delete_command): Use gdb_argv.
3356 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3357 (gdbsim_open): Use gdb_argv.
3358 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3359 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3360 * procfs.c (procfs_info_proc): Use gdb_argv.
3361 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3362 * infrun.c (handle_command): Use gdb_argv.
3363 * inferior.c (add_inferior_command, clone_inferior_command):
3364 Use gdb_argv.
3365 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3366 * exec.c (exec_file_command): Use gdb_argv.
3367 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3368 * compile/compile.c (build_argc_argv): Use gdb_argv.
3369
3370 2017-08-03 Tom Tromey <tom@tromey.com>
3371
3372 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3373
3374 2017-08-03 Tom Tromey <tom@tromey.com>
3375
3376 * python/python.c (compute_python_string): Return std::string.
3377 (gdbpy_eval_from_control_command): Update.
3378 (do_start_initialization): Use std::string.
3379 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3380 xstrprintf.
3381 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3382 xstrprintf.
3383
3384 2017-08-03 Tom Tromey <tom@tromey.com>
3385
3386 * top.h (do_restore_instream_cleanup): Remove.
3387 * top.c (do_restore_instream_cleanup): Remove.
3388 (read_command_file): Use scoped_restore.
3389 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3390
3391 2017-08-03 Tom Tromey <tom@tromey.com>
3392
3393 * cli/cli-script.c (execute_user_command)
3394 (execute_control_command): Use scoped_restore.
3395
3396 2017-08-03 Tom Tromey <tom@tromey.com>
3397
3398 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3399 (execute_user_command): Remove user_call_depth; use
3400 user_args_stack's size instead.
3401
3402 2017-08-03 Tom Tromey <tom@tromey.com>
3403
3404 * top.h (in_user_command): Remove.
3405 * top.c (in_user_command): Remove.
3406 * cli/cli-script.c (do_restore_user_call_depth)
3407 (execute_user_command): Update.
3408
3409 2017-08-03 Tom Tromey <tom@tromey.com>
3410
3411 * valops.c (search_struct_method): Use gdb::byte_vector.
3412 * valarith.c (value_concat): Use std::vector.
3413 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3414 (simple_search_memory): Likewise.
3415 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3416 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3417 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3418 * elfread.c (elf_rel_plt_read): Use std::string.
3419 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3420 * cli/cli-dump.c (restore_section_callback): Use
3421 gdb::byte_vector.
3422
3423 2017-08-03 Tom Tromey <tom@tromey.com>
3424
3425 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3426
3427 2017-08-03 Tom Tromey <tom@tromey.com>
3428
3429 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3430 (tui_register_format): Use scoped_restore.
3431
3432 2017-08-03 Tom Tromey <tom@tromey.com>
3433
3434 * reverse.c (exec_direction_default): Remove.
3435 (exec_reverse_once): Use scoped_restore.
3436 * remote.c (restore_remote_timeout): Remove.
3437 (remote_flash_erase, remote_flash_write, remote_flash_done)
3438 (readchar, remote_serial_write): Use scoped_restore.
3439 * cli/cli-script.c (struct source_cleanup_lines_args)
3440 (source_cleanup_lines): Remove.
3441 (script_from_file): Use scoped_restore.
3442 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3443 (source_command): Use scoped_restore.
3444
3445 2017-08-03 Tom Tromey <tom@tromey.com>
3446
3447 * utils.h (make_cleanup_free_so): Remove.
3448 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3449 * solist.h (struct so_deleter): New.
3450 (so_list_up): New typedef.
3451 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3452
3453 2017-08-03 Tom Tromey <tom@tromey.com>
3454
3455 * utils.h (make_cleanup_restore_current_language): Remove.
3456 * utils.c (do_restore_current_language)
3457 (make_cleanup_restore_current_language): Remove.
3458 * parse.c (parse_exp_in_context_1)
3459 (parse_expression_with_language): Use
3460 scoped_restore_current_language.
3461 * mi/mi-main.c (mi_cmd_execute): Use
3462 scoped_restore_current_language.
3463 * language.h (scoped_restore_current_language): New class.
3464
3465 2017-08-03 Tom Tromey <tom@tromey.com>
3466
3467 * compile/compile.c (cleanup_unlink_file): Remove.
3468 (compile_to_object): Use gdb::unlinker.
3469 (eval_compile_command): Likewise.
3470
3471 2017-08-03 Tom Tromey <tom@tromey.com>
3472
3473 * utils.h (make_cleanup_fclose): Remove.
3474 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3475
3476 2017-08-03 Tom Tromey <tom@tromey.com>
3477
3478 * top.c (open_terminal_stream): Return gdb_file_up.
3479 (new_ui_command): Update.
3480
3481 2017-08-03 Tom Tromey <tom@tromey.com>
3482
3483 * source.c (print_source_lines_base, forward_search_command)
3484 (reverse_search_command): Use gdb_file_up.
3485
3486 2017-08-03 Tom Tromey <tom@tromey.com>
3487
3488 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3489
3490 2017-08-03 Tom Tromey <tom@tromey.com>
3491
3492 * cli/cli-cmds.c (find_and_open_script): Change return type.
3493 Remove "streamp" and "full_path" parameters.
3494 (source_script_with_search): Update.
3495 * auto-load.c (source_script_file): Update.
3496 * cli/cli-cmds.h (find_and_open_script): Change type.
3497 (open_script): New struct.
3498
3499 2017-08-03 Tom Tromey <tom@tromey.com>
3500
3501 * xml-support.c (xml_fetch_content_from_file): Update.
3502 * ui-file.c (stdio_file::open): Update.
3503 * tracefile-tfile.c (tfile_start): Update.
3504 * remote.c (remote_file_put, remote_file_get): Update.
3505 * nat/linux-procfs.c (linux_proc_get_int)
3506 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3507 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3508 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3509 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3510 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3511 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3512 * linux-nat.c (linux_proc_pending_signals): Update.
3513 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3514 (file_closer): Remove.
3515 * compile/compile.c (compile_to_object): Update.
3516 * common/filestuff.h (struct gdb_file_deleter): New.
3517 (gdb_file_up): New typedef.
3518 (gdb_fopen_cloexec): Change return type.
3519 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3520 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3521 (dump_binary_file, restore_binary_file): Update.
3522 * auto-load.c (auto_load_objfile_script_1): Update.
3523
3524 2017-08-03 Tom Tromey <tom@tromey.com>
3525
3526 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3527 (info_static_tracepoint_markers_command): Likewise.
3528 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3529 * skip.c (skip_info): Use ui_out_emit_table.
3530 * progspace.c (print_program_space): Use ui_out_emit_table.
3531 * osdata.c (info_osdata): Use ui_out_emit_table.
3532 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3533 ui_out_emit_table.
3534 * linux-thread-db.c (info_auto_load_libthread_db): Use
3535 ui_out_emit_table.
3536 * inferior.c (print_inferior): Use ui_out_emit_table.
3537 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3538 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3539 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3540 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3541 * ui-out.h (class ui_out_emit_table): New.
3542
3543 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3544
3545 * mips-tdep.c (mips_fpu_type_str): New function.
3546 (mips_dump_tdep): Call it.
3547
3548 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3549
3550 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3551 `->mips_fpu_type'.
3552
3553 2017-07-31 Xavier Roirand <roirand@adacore.com>
3554
3555 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3556
3557 2017-07-27 Xavier Roirand <roirand@adacore.com>
3558
3559 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3560
3561 2017-07-26 Yao Qi <yao.qi@linaro.org>
3562
3563 * cli/cli-cmds.c (maintenancechecklist): New variable.
3564 * gdbcmd.h (maintenancechecklist): Declare it.
3565 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3566 Call i386_linux_read_description with different masks.
3567 * maint.c (maintenance_check_command): New function.
3568 (_initialize_maint_cmds): Call add_prefix_cmd.
3569 * target-descriptions.c (tdesc_reg): override operator != and ==.
3570 (tdesc_type): Likewise.
3571 (tdesc_feature): Likewise.
3572 (target_desc): Likewise.
3573 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3574 (maintenance_check_xml_descriptions): New function.
3575 (_initialize_target_descriptions) Add command "xml-descriptions".
3576 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3577
3578 2017-07-26 Yao Qi <yao.qi@linaro.org>
3579
3580 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3581 Include features/i386/32bit-*.c.
3582 (i386_linux_read_description): Generate target description if it
3583 doesn't exist.
3584 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3585 functions.
3586 * features/i386/32bit-linux.c: Re-generated.
3587 * features/i386/32bit-sse.c: Likewise.
3588 * target-descriptions.c (print_c_feature::visit): Print code to
3589 set register number if needed.
3590 (print_c_feature) <m_next_regnum>: New field.
3591
3592 2017-07-26 Yao Qi <yao.qi@linaro.org>
3593
3594 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3595 (FEATURE_XMLFILES): New.
3596 (FEATURE_CFILES): New.
3597 New rules.
3598 (clean-cfiles): Remove generated c files.
3599 * features/i386/32bit-avx.c: Generated.
3600 * features/i386/32bit-avx512.c: Generated.
3601 * features/i386/32bit-core.c: Generated.
3602 * features/i386/32bit-linux.c: Generated.
3603 * features/i386/32bit-mpx.c: Generated.
3604 * features/i386/32bit-pkeys.c: Generated.
3605 * features/i386/32bit-sse.c: Generated.
3606 * target-descriptions.c: Include algorithm.
3607 (tdesc_element_visitor): Add method visit_end.
3608 (print_c_tdesc): Implement visit_end.
3609 (print_c_tdesc:: m_filename_after_features): Move it to
3610 protected.
3611 (print_c_feature): New class.
3612 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3613 name starts with "i386/32bit-".
3614
3615 2017-07-26 Yao Qi <yao.qi@linaro.org>
3616
3617 * target-descriptions.c (tdesc_element_visitor): New class.
3618 (tdesc_element): New class.
3619 (tdesc_reg): Inherit from tdesc_element.
3620 (tdesc_reg::accept): New function.
3621 (tdesc_type): Inherit from tdesc_element.
3622 (tdesc_type::accept): New function.
3623 (tdesc_feature): Inherit from tdesc_element.
3624 (tdesc_feature::accept): New function.
3625 (target_desc): Inherit from tdesc_element.
3626 (target_desc::target_desc): New.
3627 (target_desc::~target_desc): New.
3628 (target_desc::accept): New.
3629 (allocate_target_description): Use new.
3630 (free_target_description): Use delete.
3631 (print_c_tdesc): New class.
3632 (maint_print_c_tdesc_cmd): Adjust.
3633
3634 * features/aarch64.c: Re-generated.
3635 * features/arc-arcompact.c: Re-generated.
3636 * features/arc-v2.c: Re-generated.
3637 * features/arm/arm-with-iwmmxt.c: Re-generated.
3638 * features/arm/arm-with-m.c: Re-generated.
3639 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3640 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3641 * features/arm/arm-with-neon.c: Re-generated.
3642 * features/arm/arm-with-vfpv2.c: Re-generated.
3643 * features/arm/arm-with-vfpv3.c: Re-generated.
3644 * features/i386/amd64-avx-avx512.c: Re-generated.
3645 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3646 * features/i386/amd64-avx.c: Re-generated.
3647 * features/i386/amd64-avx-linux.c: Re-generated.
3648 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3649 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3650 * features/i386/amd64-avx-mpx.c: Re-generated.
3651 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3652 * features/i386/amd64.c: Re-generated.
3653 * features/i386/amd64-linux.c: Re-generated.
3654 * features/i386/amd64-mpx.c: Re-generated.
3655 * features/i386/amd64-mpx-linux.c: Re-generated.
3656 * features/i386/i386-avx-avx512.c: Re-generated.
3657 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3658 * features/i386/i386-avx.c: Re-generated.
3659 * features/i386/i386-avx-linux.c: Re-generated.
3660 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3661 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3662 * features/i386/i386-avx-mpx.c: Re-generated.
3663 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3664 * features/i386/i386.c: Re-generated.
3665 * features/i386/i386-linux.c: Re-generated.
3666 * features/i386/i386-mmx.c: Re-generated.
3667 * features/i386/i386-mmx-linux.c: Re-generated.
3668 * features/i386/i386-mpx.c: Re-generated.
3669 * features/i386/i386-mpx-linux.c: Re-generated.
3670 * features/i386/x32-avx-avx512.c: Re-generated.
3671 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3672 * features/i386/x32-avx.c: Re-generated.
3673 * features/i386/x32-avx-linux.c: Re-generated.
3674 * features/i386/x32.c: Re-generated.
3675 * features/i386/x32-linux.c: Re-generated.
3676 * features/microblaze.c: Re-generated.
3677 * features/microblaze-with-stack-protect.c: Re-generated.
3678 * features/mips64-dsp-linux.c: Re-generated.
3679 * features/mips64-linux.c: Re-generated.
3680 * features/mips-dsp-linux.c: Re-generated.
3681 * features/mips-linux.c: Re-generated.
3682 * features/nds32.c: Re-generated.
3683 * features/nios2.c: Re-generated.
3684 * features/nios2-linux.c: Re-generated.
3685 * features/rs6000/powerpc-32.c: Re-generated.
3686 * features/rs6000/powerpc-32l.c: Re-generated.
3687 * features/rs6000/powerpc-403.c: Re-generated.
3688 * features/rs6000/powerpc-403gc.c : Re-generated.
3689 * features/rs6000/powerpc-405.c: Re-generated.
3690 * features/rs6000/powerpc-505.c: Re-generated.
3691 * features/rs6000/powerpc-601.c: Re-generated.
3692 * features/rs6000/powerpc-602.c: Re-generated.
3693 * features/rs6000/powerpc-603.c: Re-generated.
3694 * features/rs6000/powerpc-604.c: Re-generated.
3695 * features/rs6000/powerpc-64.c: Re-generated.
3696 * features/rs6000/powerpc-64l.c: Re-generated.
3697 * features/rs6000/powerpc-7400.c: Re-generated.
3698 * features/rs6000/powerpc-750.c: Re-generated.
3699 * features/rs6000/powerpc-860.c: Re-generated.
3700 * features/rs6000/powerpc-altivec32.c: Re-generated.
3701 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3702 * features/rs6000/powerpc-altivec64.c: Re-generated.
3703 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3704 * features/rs6000/powerpc-cell32l.c: Re-generated.
3705 * features/rs6000/powerpc-cell64l.c: Re-generated.
3706 * features/rs6000/powerpc-e500.c: Re-generated.
3707 * features/rs6000/powerpc-e500l.c: Re-generated.
3708 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3709 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3710 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3711 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3712 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3713 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3714 * features/rs6000/powerpc-vsx32.c: Re-generated.
3715 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3716 * features/rs6000/powerpc-vsx64.c: Re-generated.
3717 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3718 * features/rs6000/rs6000.c: Re-generated.
3719 * features/s390-linux32.c: Re-generated.
3720 * features/s390-linux32v1.c: Re-generated.
3721 * features/s390-linux32v2.c: Re-generated.
3722 * features/s390-linux64.c: Re-generated.
3723 * features/s390-linux64v1.c: Re-generated.
3724 * features/s390-linux64v2.c: Re-generated.
3725 * features/s390-te-linux64.c: Re-generated.
3726 * features/s390-tevx-linux64.c: Re-generated.
3727 * features/s390-vx-linux64.c: Re-generated.
3728 * features/s390x-linux64.c: Re-generated.
3729 * features/s390x-linux64v1.c: Re-generated.
3730 * features/s390x-linux64v2.c: Re-generated.
3731 * features/s390x-te-linux64.c: Re-generated.
3732 * features/s390x-tevx-linux64.c: Re-generated.
3733 * features/s390x-vx-linux64.c: Re-generated.
3734 * features/sparc/sparc32-solaris.c: Re-generated.
3735 * features/sparc/sparc64-solaris.c: Re-generated.
3736 * features/tic6x-c62x.c: Re-generated.
3737 * features/tic6x-c62x-linux.c: Re-generated.
3738 * features/tic6x-c64x.c: Re-generated.
3739 * features/tic6x-c64x-linux.c: Re-generated.
3740 * features/tic6x-c64xp.c: Re-generated.
3741 * features/tic6x-c64xp-linux.c: Re-generated.
3742
3743 2017-07-26 Yao Qi <yao.qi@linaro.org>
3744
3745 * i386-linux-tdep.c (i386_linux_read_description): New function.
3746 (i386_linux_core_read_description): Call
3747 i386_linux_read_description.
3748 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3749 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3750 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3751 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3752 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3753 * x86-linux-nat.c (x86_linux_read_description): Call
3754 i386_linux_read_description.
3755
3756 2017-07-26 Yao Qi <yao.qi@linaro.org>
3757
3758 * NEWS: Mention it.
3759 * features/Makefile (%.c: %.xml): Pass the xml file name to
3760 command "maint print c-tdesc".
3761 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3762 name from 'arg'.
3763
3764 2017-07-26 Yao Qi <yao.qi@linaro.org>
3765
3766 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3767 in-class initialization.
3768 (tdesc_create_feature): Call new instead of XCNEW.
3769 (free_target_description): Ue delete.
3770
3771 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3772
3773 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3774
3775 2017-07-25 Yao Qi <yao.qi@linaro.org>
3776
3777 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3778 constant.
3779 (amd64_x32_init_abi): Likewise.
3780 * amd64-tdep.h (amd64_init_abi): Update declaration.
3781 (amd64_x32_init_abi): Likewise.
3782
3783 2017-07-25 Yao Qi <yao.qi@linaro.org>
3784
3785 PR tdep/21717
3786 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3787 condition for FPSCR.
3788 (arm_linux_store_inferior_registers): Likewise.
3789
3790 2017-07-22 Tom Tromey <tom@tromey.com>
3791
3792 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3793 <syscalls_counts>: Now a std::vector.
3794 (get_catch_syscall_inferior_data): Use "new".
3795 (catch_syscall_inferior_data_cleanup): Use "delete".
3796 (insert_catch_syscall, remove_catch_syscall)
3797 (clear_syscall_counts): Update.
3798
3799 2017-07-22 Tom Tromey <tom@tromey.com>
3800
3801 * break-catch-syscall.c (syscall_catchpoint)
3802 <syscalls_to_be_caught>: Now a std::vector<int>
3803 (~syscall_catchpoint): Remove.
3804 (insert_catch_syscall, remove_catch_syscall)
3805 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3806 (print_mention_catch_syscall, print_recreate_catch_syscall):
3807 Update.
3808 (create_syscall_event_catchpoint): Change type of "filter"
3809 parameter.
3810 (catch_syscall_split_args): Return a std::vector.
3811 (catch_syscall_command_1, catching_syscall_number_1): Update.
3812
3813 2017-07-22 Tom Tromey <tom@tromey.com>
3814
3815 * break-catch-throw.c (struct exception_catchpoint)
3816 <exception_rx>: Now a std::string.
3817 (~exception_catchpoint): Remove.
3818 (print_one_detail_exception_catchpoint): Update.
3819 (handle_gnu_v3_exceptions): Change type of except_rx.
3820 (extract_exception_regexp): Return a std::string.
3821 (catch_exception_command_1): Update.
3822
3823 2017-07-22 Tom Tromey <tom@tromey.com>
3824
3825 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3826 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3827 std::vector.
3828 <catch_all>: Now a bool.
3829 (~signal_catchpoint): Remove.
3830 (signal_catchpoint_insert_location)
3831 (signal_catchpoint_remove_location)
3832 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3833 (signal_catchpoint_print_mention)
3834 (signal_catchpoint_print_recreate)
3835 (signal_catchpoint_explains_signal): Update.
3836 (create_signal_catchpoint): Change type of "filter" and
3837 "catch_all".
3838 (catch_signal_split_args): Return a std::vector. Change type of
3839 "catch_all".
3840 (catch_signal_command): Update.
3841
3842 2017-07-20 Pedro Alves <palves@redhat.com>
3843
3844 * ada-lang.c (ada_language_defn): Make extern.
3845 (_initialize_ada_language): Remove add_language call.
3846 * c-lang.c (c_language_defn, cplus_language_defn)
3847 (asm_language_defn, minimal_language_defn): Make extern.
3848 (_initialize_c_language): Delete.
3849 * completer.c (compare_cstrings): Delete, moved to utils.h.
3850 * d-lang.c (d_language_defn): Make extern.
3851 (_initialize_d_language): Remove add_language calls.
3852 * defs.h (enum language): Add comment.
3853 * f-lang.c (f_language_defn): Make extern.
3854 (_initialize_f_language): Remove add_language call.
3855 * go-lang.c (go_language_defn): Make extern.
3856 (_initialize_go_language): Remove add_language call.
3857 * language.c: Include <algorithm>.
3858 (languages): Redefine as const array.
3859 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3860 (set_language_command): Handle "local". Use for-range loop.
3861 (set_language): Remove loop.
3862 (language_enum): Rewrite.
3863 (language_def, language_str): Remove loops.
3864 (add_language): Delete.
3865 (add_set_language_command): New, based on add_languages.
3866 (skip_language_trampoline): Adjust.
3867 (local_language_defn): Delete.
3868 (language_gdbarch_post_init): Adjust.
3869 (_initialize_language): Remove add_language calls. Call
3870 add_set_language_command.
3871 * language.h (add_language): Delete.
3872 (auto_language_defn)
3873 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3874 (asm_language_defn, c_language_defn, cplus_language_defn)
3875 (d_language_defn, f_language_defn, go_language_defn)
3876 (m2_language_defn, objc_language_defn, opencl_language_defn)
3877 (pascal_language_defn, rust_language_defn): Declare.
3878 * m2-lang.c (m2_language_defn): Make extern.
3879 (_initialize_m2_language): Remove add_language call.
3880 * objc-lang.c (objc_language_defn): Make extern.
3881 (_initialize_objc_language): Remove add_language call.
3882 * opencl-lang.c (opencl_language_defn): Make extern.
3883 (_initialize_opencl_language): Remove add_language call.
3884 * p-lang.c (pascal_language_defn): Make extern.
3885 (_initialize_pascal_language): Delete.
3886 * rust-lang.c (rust_language_defn): Make extern.
3887 (_initialize_rust_language): Delete.
3888 * utils.h (compare_cstrings): New static inline function.
3889
3890 2017-07-20 Pedro Alves <palves@redhat.com>
3891
3892 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3893 (get_var_value): Constify parameters.
3894 (get_int_var_value): Change prototype.
3895 (to_fixed_range_type): Adjust.
3896 * ada-lang.h (get_int_var_value): Change prototype.
3897
3898 2017-07-20 Pedro Alves <palves@redhat.com>
3899
3900 * dwarf2read.c (dw2_lookup_symbol): Use
3901 SYMBOL_MATCHES_SEARCH_NAME.
3902 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3903
3904 2017-07-20 Pedro Alves <palves@redhat.com>
3905
3906 * block.c (block_iter_name_step, block_iter_name_first)
3907 (block_iter_name_next): Delete.
3908 (block_lookup_symbol_primary): Adjust to use
3909 dict_iter_match_first/dict_iter_match_next.
3910 * block.h (block_iter_name_first, block_iter_name_next): Delete
3911 declarations.
3912 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3913 dict_iter_match_first/dict_iter_match_next.
3914
3915 2017-07-20 Pedro Alves <palves@redhat.com>
3916
3917 * cp-support.c (cp_find_first_component_aux): Add missing case for
3918 end of string.
3919
3920 2017-07-18 David Blaikie <dblaikie@gmail.com>
3921
3922 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3923 of dwo_cu's dwo_file.
3924
3925 2017-07-18 Yao Qi <yao.qi@linaro.org>
3926
3927 * remote.c (store_registers_using_G): Remove one line comment.
3928
3929 2017-07-18 Yao Qi <yao.qi@linaro.org>
3930
3931 * regcache.c (regcache_cpy): Simplify it.
3932 (regcache::cpy_no_passthrough): Remove it.
3933 * regcache.h (cpy_no_passthrough): Remove it.
3934 (regcache_dup, regcache_cpy): Update comments.
3935
3936 2017-07-18 Pedro Alves <palves@redhat.com>
3937
3938 * remote-sim.c (sim_command_completer): Adjust to work with a
3939 completion_tracker instead of a VEC.
3940
3941 2017-07-17 Pedro Alves <palves@redhat.com>
3942
3943 * completer.c (complete_source_filenames): New function.
3944 (complete_address_and_linespec_locations): New function.
3945 (location_completer): Use complete_address_and_linespec_locations.
3946 (completion_tracker::build_completion_result): Honor the tracker's
3947 request to suppress append.
3948 * completer.h (completion_tracker::suppress_append_ws)
3949 (completion_tracker::set_suppress_append_ws): New methods.
3950 (completion_tracker::m_suppress_append_ws): New field.
3951 (complete_source_filenames): New declaration.
3952 * linespec.c (linespec_complete_what): New.
3953 (struct ls_parser) <complete_what, completion_word,
3954 completion_quote_char, completion_quote_end, completion_tracker>:
3955 New fields.
3956 (string_find_incomplete_keyword_at_end): New.
3957 (linespec_lexer_lex_string): Record quote char. If in completion
3958 mode, don't throw.
3959 (linespec_lexer_consume_token): Advance the completion word point.
3960 (linespec_lexer_peek_token): Save/restore completion info.
3961 (save_stream_and_consume_token): New.
3962 (set_completion_after_number): New.
3963 (linespec_parse_basic): Set what to complete next depending on
3964 token. Handle function and label completions specially.
3965 (parse_linespec): Disable objc shortcut in completion mode. Set
3966 what to complete next depending on token type. Skip keyword if in
3967 completion mode.
3968 (complete_linespec_component, linespec_complete): New.
3969 * linespec.h (linespec_complete): Declare.
3970
3971 2017-07-17 Pedro Alves <palves@redhat.com>
3972
3973 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3974 Handle 'operator<' / 'operator<<'.
3975
3976 2017-07-17 Pedro Alves <palves@redhat.com>
3977
3978 * completer.c (collect_explicit_location_matches): Handle
3979 MATCH_LABEL.
3980 (convert_explicit_location_to_linespec): New, factored out from
3981 ...
3982 (convert_explicit_location_to_sals): ... this.
3983 (complete_label): New.
3984 (linespec_complete_label, find_label_symbols_in_block): New.
3985 (find_label_symbols): Add completion_mode parameter and adjust to
3986 call find_label_symbols_in_block.
3987 * linespec.h (linespec_complete_label): Declare.
3988
3989 2017-07-17 Pedro Alves <palves@redhat.com>
3990
3991 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3992 complete_symbol_mode parameter.
3993 * cli/cli-cmds.c (complete_command): Get the completion result out
3994 of the handle_brkchars tracker if used a custom word point.
3995 * completer.c: Include "linespec.h".
3996 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3997 (advance_to_expression_complete_word_point): New.
3998 (completion_tracker::completes_to_completion_word): New.
3999 (complete_files_symbols): Pass down
4000 complete_symbol_mode::EXPRESSION.
4001 (explicit_options, probe_options): New.
4002 (collect_explicit_location_matches): Complete on the
4003 explictit_loc->foo instead of word. Use
4004 linespec_complete_function. Handle MATCH_LINE. Handle offering
4005 keyword and options completions.
4006 (backup_text_ptr): Delete.
4007 (skip_keyword): New.
4008 (complete_explicit_location): Remove 'word' parameter. Add
4009 language, quoted_arg_start and quoted_arg_end parameters.
4010 Rewrite, parsing left to right.
4011 (location_completer): Rewrite.
4012 (location_completer_handle_brkchars): New function.
4013 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4014 (enum complete_line_internal_reason): Adjust comments.
4015 (completion_tracker::discard_completions): New.
4016 (completer_handle_brkchars_func_for_completer): Handle
4017 location_completer.
4018 (gdb_custom_word_point_brkchars)
4019 (gdb_org_rl_basic_quote_characters): New.
4020 (gdb_completion_word_break_characters_throw)
4021 (completion_find_completion_word): Handle trackers that use a
4022 custom word point.
4023 (completion_tracker::advance_custom_word_point_by): New.
4024 (completion_tracker::build_completion_result): Don't rely on
4025 readline appending the quote char.
4026 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4027 use a custom word point.
4028 (gdb_rl_attempted_completion_function): Restore
4029 rl_basic_quote_characters.
4030 * completer.h (class completion_tracker): Extend intro comment.
4031 (completion_tracker::set_quote_char)
4032 (completion_tracker::quote_char)
4033 (completion_tracker::set_use_custom_word_point)
4034 (completion_tracker::use_custom_word_point)
4035 (completion_tracker::custom_word_point)
4036 (completion_tracker::set_custom_word_point)
4037 (completion_tracker::advance_custom_word_point_by)
4038 (completion_tracker::completes_to_completion_word)
4039 (completion_tracker::discard_completions): New methods.
4040 (completion_tracker::m_quote_char)
4041 (completion_tracker::m_use_custom_word_point)
4042 (completion_tracker::m_custom_word_point): New fields.
4043 (advance_to_expression_complete_word_point): Declare.
4044 * f-lang.c (f_collect_symbol_completion_matches): Add
4045 complete_symbol_mode parameter.
4046 * language.h (struct language_defn)
4047 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4048 parameter.
4049 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4050 (linespec_complete_function): New function.
4051 (linespec_lexer_lex_keyword): Adjust.
4052 * linespec.h (linespec_keywords, linespec_complete_function): New
4053 declarations.
4054 * location.c (find_end_quote): New function.
4055 (explicit_location_lex_one): Add explicit_completion_info
4056 parameter. Save quoting info. Don't throw if being called for
4057 completion. Don't handle Ada operators here.
4058 (is_cp_operator, skip_op_false_positives, first_of)
4059 (explicit_location_lex_one_function): New function.
4060 (string_to_explicit_location): Replace 'dont_throw' parameter with
4061 an explicit_completion_info pointer parameter. Handle it. Don't
4062 use explicit_location_lex_one to lex function names. Use
4063 explicit_location_lex_one_function instead.
4064 * location.h (struct explicit_completion_info): New.
4065 (string_to_explicit_location): Replace 'dont_throw' parameter with
4066 an explicit_completion_info pointer parameter.
4067 * symtab.c (default_collect_symbol_completion_matches_break_on):
4068 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4069 (default_collect_symbol_completion_matches)
4070 (collect_symbol_completion_matches): Add complete_symbol_mode
4071 parameter.
4072 (collect_symbol_completion_matches_type): Pass down
4073 complete_symbol_mode::EXPRESSION.
4074 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4075 parameter. Handle LINESPEC mode.
4076 * symtab.h (complete_symbol_mode): New.
4077 (default_collect_symbol_completion_matches_break_on)
4078 (default_collect_symbol_completion_matches)
4079 (collect_symbol_completion_matches)
4080 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4081 parameter.
4082
4083 2017-07-17 Pedro Alves <palves@redhat.com>
4084
4085 * utils.c (enum class strncmp_iw_mode): New.
4086 (strcmp_iw): Rename to ...
4087 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4088 parameters. Handle them.
4089 (strncmp_iw): New.
4090 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4091 * utils.h (strncmp_iw): Declare.
4092 (strcmp_iw): Move describing comments here.
4093
4094 2017-07-17 Pedro Alves <palves@redhat.com>
4095
4096 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4097 CP_OPERATOR_STR.
4098 * c-typeprint.c (is_type_conversion_operator): Use
4099 CP_OPERATOR_STR.
4100 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4101 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4102 CP_OPERATOR_LEN.
4103 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4104 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4105 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4106 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4107 CP_OPERATOR_STR.
4108 * location.c: Include "cp-support.h".
4109 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4110 CP_OPERATOR_STR.
4111 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4112 CP_OPERATOR_LEN.
4113
4114 2017-07-17 Pedro Alves <palves@redhat.com>
4115
4116 * cli/cli-cmds.c (complete_command): Use a completion tracker
4117 along with completion_find_completion_word for handle_brkchars
4118 phase.
4119 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4120 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4121 (struct gdb_rl_completion_word_info): New.
4122 (gdb_rl_find_completion_word): New.
4123 (completion_find_completion_word): New.
4124 * completer.h (completion_find_completion_word): Declare.
4125
4126 2017-07-17 Pedro Alves <palves@redhat.com>
4127
4128 * ada-lang.c (symbol_completion_match): Adjust comments.
4129 (symbol_completion_add): Replace vector parameter with
4130 completion_tracker parameter. Use it.
4131 (ada_make_symbol_completion_list): Rename to...
4132 (ada_collect_symbol_completion_matches): ... this. Add
4133 completion_tracker parameter and use it.
4134 (ada_language_defn): Adjust.
4135 * break-catch-syscall.c (catch_syscall_completer): Adjust
4136 prototype and work with completion_tracker instead of VEC.
4137 * breakpoint.c (condition_completer): Adjust prototype and work
4138 with completion_tracker instead of VEC.
4139 * c-lang.c (c_language_defn, cplus_language_defn)
4140 (asm_language_defn, minimal_language_defn): Adjust to renames.
4141 * cli/cli-cmds.c (complete_command): Rework using
4142 completion_tracker. Catch exceptions when completing.
4143 * cli/cli-decode.c (integer_unlimited_completer)
4144 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4145 with completion_tracker instead of VEC.
4146 * command.h (struct completion_tracker): Forward declare.
4147 (completer_ftype, completer_handle_brkchars_ftype): Change
4148 types.
4149 (complete_on_cmdlist, complete_on_enum): Adjust.
4150 * completer.c: Include <algorithm>.
4151 (struct gdb_completer_state): New.
4152 (current_completion): New global.
4153 (readline_line_completion_function): Delete.
4154 (noop_completer, filename_completer)
4155 (filename_completer_handle_brkchars, complete_files_symbols)
4156 (linespec_location_completer): Adjust to work with a
4157 completion_tracker instead of a VEC.
4158 (string_or_empty): New.
4159 (collect_explicit_location_matches): Adjust to work with a
4160 completion_tracker instead of a VEC.
4161 (explicit_location_completer): Rename to ...
4162 (complete_explicit_location): ... this and adjust to work with a
4163 completion_tracker instead of a VEC.
4164 (location_completer): Adjust to work with a completion_tracker
4165 instead of a VEC.
4166 (add_struct_fields): Adjust to work with a completion_list instead
4167 of VEC.
4168 (expression_completer): Rename to ...
4169 (complete_expression): ... this and adjust to work with a
4170 completion_tracker instead of a VEC. Use complete_files_symbols.
4171 (expression_completer): Reimplement on top of complete_expression.
4172 (symbol_completer): Adjust to work with a completion_tracker
4173 instead of a VEC.
4174 (enum complete_line_internal_reason): Add describing comments.
4175 (complete_line_internal_normal_command): Adjust to work with a
4176 completion_tracker instead of a VEC.
4177 (complete_line_internal): Rename to ...
4178 (complete_line_internal_1): ... this and adjust to work with a
4179 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4180 handle_brkchars phase.
4181 (new_completion_tracker): Delete.
4182 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4183 complete_line_internal_1.
4184 (free_completion_tracker): Delete.
4185 (INITIAL_COMPLETION_HTAB_SIZE): New.
4186 (completion_tracker::completion_tracker)
4187 (completion_tracker::~completion_tracker): New.
4188 (maybe_add_completion): Delete.
4189 (completion_tracker::maybe_add_completion)
4190 (completion_tracker::add_completion)
4191 (completion_tracker::add_completions): New.
4192 (throw_max_completions_reached_error): Delete.
4193 (complete_line): Adjust to work with a completion_tracker instead
4194 of a VEC. Don't create a completion_tracker_t or check for max
4195 completions here.
4196 (command_completer, command_completer_handle_brkchars)
4197 (signal_completer, reg_or_group_completer_1)
4198 (reg_or_group_completer, default_completer_handle_brkchars):
4199 Adjust to work with a completion_tracker.
4200 (gdb_completion_word_break_characters_throw): New.
4201 (gdb_completion_word_break_characters): Reimplement.
4202 (line_completion_function): Delete.
4203 (completion_tracker::recompute_lowest_common_denominator)
4204 (expand_preserving_ws)
4205 (completion_tracker::build_completion_result)
4206 (completion_result::completion_result)
4207 (completion_result::completion_result)
4208 (completion_result::~completion_result)
4209 (completion_result::completion_result)
4210 (completion_result::release_match_list, compare_cstrings)
4211 (completion_result::sort_match_list)
4212 (completion_result::reset_match_list)
4213 (gdb_rl_attempted_completion_function_throw)
4214 (gdb_rl_attempted_completion_function): New.
4215 * completer.h (completion_list, struct completion_result)
4216 (class completion_tracker): New.
4217 (complete_line): Add completion_tracker parameter.
4218 (readline_line_completion_function): Delete.
4219 (gdb_rl_attempted_completion_function): New.
4220 (noop_completer, filename_completer, expression_completer)
4221 (location_completer, symbol_completer, command_completer)
4222 (signal_completer, reg_or_group_completer): Update prototypes.
4223 (completion_tracker_t, new_completion_tracker)
4224 (make_cleanup_free_completion_tracker): Delete.
4225 (enum maybe_add_completion_enum): Delete.
4226 (maybe_add_completion): Delete.
4227 (throw_max_completions_reached_error): Delete.
4228 * corefile.c (complete_set_gnutarget): Adjust to work with a
4229 completion_tracker instead of a VEC.
4230 * cp-abi.c (cp_abi_completer): Adjust to work with a
4231 completion_tracker instead of a VEC.
4232 * d-lang.c (d_language_defn): Adjust.
4233 * disasm.c (disassembler_options_completer): Adjust to work with a
4234 completion_tracker instead of a VEC.
4235 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4236 (f_collect_symbol_completion_matches): ... this. Adjust to work
4237 with a completion_tracker instead of a VEC.
4238 (f_language_defn): Adjust.
4239 * go-lang.c (go_language_defn): Adjust.
4240 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4241 Adjust to work with a completion_tracker instead of a VEC.
4242 * infrun.c (handle_completer): Likewise.
4243 * interps.c (interpreter_completer): Likewise.
4244 * interps.h (interpreter_completer): Likewise.
4245 * language.c (unknown_language_defn, auto_language_defn)
4246 (local_language_defn): Adjust.
4247 * language.h (language_defn::la_make_symbol_completion_list):
4248 Rename to ...
4249 (language_defn::la_collect_symbol_completion_matches): ... this
4250 and adjust to work with a completion_tracker instead of a VEC.
4251 * m2-lang.c (m2_language_defn): Adjust.
4252 * objc-lang.c (objc_language_defn): Adjust.
4253 * opencl-lang.c (opencl_language_defn): Adjust.
4254 * p-lang.c (pascal_language_defn): Adjust.
4255 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4256 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4257 with a completion_tracker.
4258 * rust-lang.c (rust_language_defn): Adjust.
4259 * symtab.c (free_completion_list, do_free_completion_list)
4260 (return_val, completion_tracker): Delete.
4261 (completion_list_add_name, completion_list_add_symbol)
4262 (completion_list_add_msymbol, completion_list_objc_symbol)
4263 (completion_list_add_fields, add_symtab_completions): Add
4264 completion_tracker parameter and use it.
4265 (default_make_symbol_completion_list_break_on_1): Rename to...
4266 (default_collect_symbol_completion_matches_break_on): ... this.
4267 Add completion_tracker parameter and use it instead of allocating
4268 a completion tracker here.
4269 (default_make_symbol_completion_list_break_on): Delete old
4270 implementation.
4271 (default_make_symbol_completion_list): Delete.
4272 (default_collect_symbol_completion_matches): New.
4273 (make_symbol_completion_list): Delete.
4274 (collect_symbol_completion_matches): New.
4275 (make_symbol_completion_type): Rename to ...
4276 (collect_symbol_completion_matches_type): ... this. Add
4277 completion_tracker parameter and use it instead of VEC.
4278 (make_file_symbol_completion_list_1): Rename to...
4279 (collect_file_symbol_completion_matches): ... this. Add
4280 completion_tracker parameter and use it instead of VEC.
4281 (make_file_symbol_completion_list): Delete.
4282 (add_filename_to_list): Use completion_list instead of a VEC.
4283 (add_partial_filename_data::list): Now a completion_list.
4284 (make_source_files_completion_list): Work with a completion_list
4285 instead of a VEC.
4286 * symtab.h: Include "completer.h".
4287 (default_make_symbol_completion_list_break_on)
4288 (default_make_symbol_completion_list, make_symbol_completion_list)
4289 (make_symbol_completion_type, make_file_symbol_completion_list)
4290 (make_source_files_completion_list): Delete.
4291 (default_collect_symbol_completion_matches_break_on)
4292 (default_collect_symbol_completion_matches)
4293 (collect_symbol_completion_matches)
4294 (collect_symbol_completion_matches_type)
4295 (collect_file_symbol_completion_matches)
4296 (make_source_files_completion_list): New.
4297 * top.c (init_main): Don't install a rl_completion_entry_function
4298 hook. Install a rl_attempted_completion_function hook instead.
4299 * tui/tui-layout.c (layout_completer): Adjust to work with a
4300 completion_tracker.
4301 * tui/tui-regs.c (tui_reggroup_completer):
4302 * tui/tui-win.c (window_name_completer, focus_completer)
4303 (winheight_completer): Adjust to work with a completion_tracker.
4304 * value.c: Include "completer.h".
4305 (complete_internalvar): Adjust to work with a completion_tracker.
4306 * value.h (complete_internalvar): Likewise.
4307
4308 2017-07-17 Pedro Alves <palves@redhat.com>
4309
4310 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4311 renames.
4312 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4313 comments to completer_ftype's declaration.
4314 <completer_handle_brkchars>: Change type to
4315 completer_handle_brkchars_ftype.
4316 * command.h (completer_ftype): Add describing comment and give
4317 names to parameters.
4318 (completer_ftype_void): Rename to ...
4319 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4320 (set_cmd_completer_handle_brkchars): Adjust.
4321 * completer.c (filename_completer_handle_brkchars): New function.
4322 (complete_line_internal_normal_command): New function, factored
4323 out from ...
4324 (complete_line_internal): ... here.
4325 (command_completer_handle_brkchars)
4326 (default_completer_handle_brkchars)
4327 (completer_handle_brkchars_func_for_completer): New functions.
4328 * completer.h (set_gdb_completion_word_break_characters): Delete
4329 declaration.
4330 (completer_handle_brkchars_func_for_completer): New declaration.
4331 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4332 completer_handle_brkchars_func_for_completer.
4333
4334 2017-07-17 Pedro Alves <palves@redhat.com>
4335
4336 * completer.c (symbol_completer): New function, based on
4337 make_symbol_completion_list_fn.
4338 * completer.h (symbol_completer): New declaration.
4339 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4340 * python/py-cmd.c (completers): Adjust.
4341 * symtab.c (make_symbol_completion_list_fn): Delete.
4342 * symtab.h (make_symbol_completion_list_fn): Delete.
4343 * cli/cli-decode.c (add_cmd): Adjust.
4344
4345 2017-07-17 Pedro Alves <palves@redhat.com>
4346
4347 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4348 * dwarf2read.c: Include "filename-seen-cache.h".
4349 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4350 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4351 * filename-seen-cache.c: New file.
4352 * filename-seen-cache.h: New file.
4353 * symtab.c: Include "filename-seen-cache.h".
4354 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4355 (create_filename_seen_cache, clear_filename_seen_cache)
4356 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4357 to filename-seen-cache.h/filename-seen-cache.c.
4358 (output_source_filename, sources_info)
4359 (maybe_add_partial_symtab_filename)
4360 (make_source_files_completion_list): Adjust to use
4361 filename_seen_cache.
4362
4363 2017-07-17 Pedro Alves <palves@redhat.com>
4364
4365 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4366 fields.
4367 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4368 dwarf2_debug_sections*)): New.
4369 (dwarf2_per_objfile::dwarf2_per_objfile(const
4370 dwarf2_per_objfile&)): Declare as deleted.
4371 (dwarf2_per_objfile::operator=): Declare as deleted.
4372 (dwarf2_per_objfile::dwarf2_per_objfile)
4373 (dwarf2_per_objfile::~dwarf2_per_objfile)
4374 (dwarf2_per_objfile::free_cached_comp_units): New.
4375 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4376 ctor. Call dwarf2_per_objfile's ctor manually.
4377 (dwarf2_locate_sections): Deleted/refactored as ...
4378 (dwarf2_per_objfile::locate_sections): ... this new method.
4379 (free_cached_comp_units): Defer to
4380 dwarf2_per_objfile::free_cached_comp_units.
4381 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4382
4383 2017-07-14 Tom Tromey <tom@tromey.com>
4384
4385 PR rust/21764:
4386 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4387 parameter.
4388 <UNOP_SIZEOF>: Split into separate case.
4389 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4390
4391 2017-07-14 Tom Tromey <tom@tromey.com>
4392
4393 PR rust/21763:
4394 * symtab.c (symbol_matches_domain): Add language_rust to special
4395 case.
4396 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4397 treat LOC_TYPEDEF symbols as variables.
4398
4399 2017-07-14 Pedro Alves <palves@redhat.com>
4400
4401 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4402 symtabs matching all symtabs with SRCFILE as file name instead of
4403 only considering the first hit, with lookup_symtab.
4404
4405 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4406
4407 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4408 operator_name parameters.
4409 (gen_expr): Update function call.
4410
4411 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4412
4413 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4414 parameter.
4415 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4416 Likewise.
4417 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4418 parameter, use agent_expr::gdbarch instead, update function
4419 calls.
4420 (locexpr_tracepoint_var_ref): Likewise.
4421 (loclist_tracepoint_var_ref): Likewise.
4422 * ax-gdb.c (gen_trace_static_fields): Likewise.
4423 (gen_traced_pop): Likewise.
4424 (gen_frame_args_address): Likewise.
4425 (gen_frame_locals_address): Likewise.
4426 (gen_var_ref): Likewise.
4427 (gen_struct_ref_recursive): Likewise.
4428 (gen_static_field): Likewise.
4429 (gen_maybe_namespace_elt): Likewise.
4430 (gen_expr): Likewise.
4431 (gen_trace_for_var): Likewise.
4432 (gen_trace_for_expr): Likewise.
4433 (gen_trace_for_return_address): Likewise.
4434
4435 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4436
4437 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4438 parameter.
4439 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4440
4441 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4442
4443 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4444 from ax, update calls.
4445 (gen_usual_arithmetic): Likewise.
4446 (gen_integral_promotions): Likewise.
4447 (gen_bitfield_ref): Likewise.
4448 (gen_primitive_field): Likewise.
4449 (gen_struct_ref_recursive): Likewise.
4450 (gen_struct_ref): Likewise.
4451 (gen_maybe_namespace_elt): Likewise.
4452 (gen_struct_elt_for_reference): Likewise.
4453 (gen_namespace_elt): Likewise.
4454 (gen_aggregate_elt_ref): Likewise.
4455 (gen_expr): Get gdbarch from ax, update calls.
4456 (gen_expr_binop_rest): Likewise.
4457
4458 2017-07-13 Pedro Alves <palves@redhat.com>
4459
4460 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4461 as default tdesc.
4462 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4463 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4464 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4465 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4466 tdep.
4467 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4468 Get final tdesc from the tdep.
4469 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4470 default tdesc.
4471 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4472 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4473 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4474 Use it as default tdesc.
4475 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4476 down to amd_init_abi. No longer handle fallback tdesc here.
4477 * amd64-tdep.h (tdesc_x32): Declare.
4478 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4479 parameter.
4480 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4481 as default tdesc.
4482
4483 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4484
4485 * s390-linux-tdep.c (s390_process_record): Add support for
4486 instructions new in arch12.
4487
4488 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4489
4490 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4491 PT_GETFSBASE and PT_GETGSBASE.
4492 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4493 PT_SETGSBASE.
4494
4495 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4496
4497 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4498 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4499 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4500 those rules.
4501 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4502 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4503 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4504 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4505 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4506 * features/i386/amd64.xml: Add 64bit-segments.xml.
4507 * features/i386/amd64-avx-avx512.c: Regenerated.
4508 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4509 * features/i386/amd64-avx-mpx.c: Regenerated.
4510 * features/i386/amd64-avx.c: Regenerated.
4511 * features/i386/amd64-mpx.c: Regenerated.
4512 * features/i386/amd64.c: Regenerated.
4513 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4514 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4515 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4516 * regformats/i386/amd64-avx.dat: Regenerated.
4517 * regformats/i386/amd64-mpx.dat: Regenerated.
4518 * regformats/i386/amd64.dat: Regenerated.
4519
4520 2017-07-10 Yao Qi <yao.qi@linaro.org>
4521
4522 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4523 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4524
4525 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4526
4527 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4528 unsetenv.
4529 * gnulib/aclocal.m4: Regenerate.
4530 * gnulib/config.in: Regenerate.
4531 * gnulib/configure: Regenerate.
4532 * gnulib/import/Makefile.am: Regenerate.
4533 * gnulib/import/Makefile.in: Regenerate.
4534 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4535 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4536 * gnulib/import/m4/environ.m4: New file.
4537 * gnulib/import/m4/setenv.m4: New file.
4538 * gnulib/import/setenv.c: New file.
4539 * gnulib/import/unsetenv.c: New file.
4540
4541 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4542
4543 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4544 address when op is DW_OP_addr.
4545
4546 2017-07-09 Tom Tromey <tom@tromey.com>
4547
4548 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4549 check and apply to outer type.
4550
4551 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4552
4553 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4554 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4555 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4556 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4557
4558 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4559
4560 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4561
4562 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4563
4564 * corelow.c (get_core_siginfo): Remove.
4565 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4566 instead of get_core_siginfo.
4567 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4568 * gdbarch.h: Re-generate.
4569 * gdbarch.c: Re-generate.
4570 * linux-tdep.c (linux_core_xfer_siginfo): New.
4571 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4572
4573 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4574
4575 * corelow.c (thread_section_name): Move to ...
4576 * gdbcore.h (thread_section_name): ... here.
4577
4578 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4579
4580 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4581 (struct siginfo32): New.
4582 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4583 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4584 via ptrace(PT_LWPINFO).
4585
4586 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4587
4588 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4589 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4590 (fbsd_get_siginfo_type): New.
4591 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4592 (_initialize_fbsd_tdep): New.
4593
4594 2017-07-06 David Blaikie <dblaikie@gmail.com>
4595
4596 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4597 a singular dwo_unit*) to support multiple CUs in the same way that
4598 multiple TUs are supported.
4599 (create_cus_hash_table): Replace create_dwo_cu with a function for
4600 parsing multiple CUs from a DWO file.
4601 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4602 create_dwo_cu.
4603 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4604 htab_find, rather than comparing the signature to a singleton CU in
4605 the dwo_file.
4606
4607 2017-07-06 Pedro Alves <palves@redhat.com>
4608
4609 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4610
4611 2017-07-04 Pedro Alves <palves@redhat.com>
4612
4613 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4614 * gdbtypes.h (TYPE_STATIC): Delete.
4615 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4616 is_synchronized, is_native>: Delete.
4617 <dummy>: Bump.
4618 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4619 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4620 (TYPE_FN_FIELD_ABSTRACT): Delete.
4621
4622 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4623
4624 * buffer.h (buffer_finish): Fix spelling mistakes.
4625
4626 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4627
4628 * .dir-locals.el: Automatically switch to C-style comments in
4629 versions of Emacs that support the feature.
4630
4631 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4632 Pedro Alves <palves@redhat.com>
4633
4634 PR cli/21688
4635 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4636 (process_next_line): New variable 'inline_cmd'.
4637 Adjust 'if' clauses for "python", "compile" and "guile" to use
4638 'command_name_equals' and check for '!inline_cmd'.
4639
4640 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4641
4642 PR cli/21688
4643 * cli/cli-script.c (command_name_equals_not_inline): New function.
4644 (process_next_line): Adjust 'if' clauses for "python", "compile"
4645 and "guile" to use command_name_equals_not_inline.
4646
4647 2017-06-29 Pedro Alves <palves@redhat.com>
4648
4649 * completer.c (expression_completer): Call
4650 linespec_location_completer instead of location_completer.
4651
4652 2017-06-29 Pedro Alves <palves@redhat.com>
4653
4654 * completer.c (expression_completer): Remove code that recomputes
4655 'text' from 'word'.
4656
4657 2017-06-29 Yao Qi <yao.qi@linaro.org>
4658
4659 * regformats/regdat.sh: Generate code with
4660 "ifndef IN_PROCESS_AGENT".
4661
4662 2017-06-28 Pedro Alves <palves@redhat.com>
4663
4664 * command.h: Include "common/scoped_restore.h".
4665
4666 2017-06-28 Yao Qi <yao.qi@linaro.org>
4667
4668 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4669 instead of obstack_grow.
4670
4671 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4672
4673 PR gdb/21337
4674 * symfile.c (reread_symbols): Call objfiles_changed just before
4675 read_symbols.
4676
4677 2017-06-27 Pedro Alves <palves@redhat.com>
4678
4679 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4680 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4681 (completion_list_add_symbol, completion_list_add_msymbol):
4682 ... these new functions.
4683 (add_symtab_completions)
4684 (default_make_symbol_completion_list_break_on_1): Adjust.
4685
4686 2017-06-27 Pedro Alves <palves@redhat.com>
4687
4688 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4689 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4690 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4691 dtor.
4692 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4693 'storage_obstack' field an auto_obstack. In-class initialize all
4694 non-bitfield fields. Make minsyms_read bool.
4695 * symfile.c (read_symbols): Adjust.
4696
4697 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4698
4699 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4700 (gdbsim_store_register): Likewise.
4701
4702 2017-06-27 Pedro Alves <palves@redhat.com>
4703
4704 * c-exp.y (name_obstack): Now an auto_obstack.
4705 (yylex): Use auto_obstack::clear.
4706 (c_parse): Use auto_obstack::clear instead of reinitializing and
4707 freeing the obstack.
4708 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4709 * d-exp.y (name_obstack): Now an auto_obstack.
4710 (yylex): Use auto_obstack::clear.
4711 (d_parse): Use auto_obstack::clear instead of reinitializing and
4712 freeing the obstack.
4713 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4714 auto_obstack.
4715 * dwarf2read.c (create_addrmap_from_index)
4716 (dwarf2_build_psymtabs_hard)
4717 (update_enumeration_type_from_children): Likewise.
4718 * gdb_obstack.h (auto_obstack): New type.
4719 * go-exp.y (name_obstack): Now an auto_obstack.
4720 (build_packaged_name): Use auto_obstack::clear.
4721 (go_parse): Use auto_obstack::clear instead of reinitializing and
4722 freeing the obstack.
4723 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4724 auto_obstack.
4725 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4726 * rust-exp.y (work_obstack): Now an auto_obstack.
4727 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4728 reinitializing and freeing the obstack.
4729 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4730 (host_char_to_target): Use auto_obstack.
4731 * utils.h (make_cleanup_obstack_free): Delete declaration.
4732 * valprint.c (generic_emit_char, generic_printstr): Use
4733 auto_obstack.
4734
4735 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4736
4737 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4738 thread.
4739 (darwin_init_thread_list): Don't update dummy thread.
4740 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4741
4742 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4743
4744 * record-full.c (netorder16): Remove.
4745
4746 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4747
4748 * common/diagnostics.h: Define macros for GCC.
4749 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4750 * common/vec.h: Include diagnostics.h.
4751 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4752 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4753 warning.
4754
4755 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4756
4757 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4758 New macro.
4759 * ada-lex.l: Ignore deprecated register warnings.
4760
4761 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4762
4763 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4764 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4765
4766 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4767
4768 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4769 its own line.
4770
4771 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4772
4773 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4774
4775 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4776
4777 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4778 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4779 (xtensa_register_read_masked): Likewise.
4780
4781 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4782
4783 * common/environ.c (gdb_environ::unset): Update comment.
4784
4785 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4786
4787 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4788 registers.
4789
4790 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4791
4792 * record-full.c (record_full_exec_insn): Use byte_vector.
4793
4794 2017-06-22 Yao Qi <yao.qi@linaro.org>
4795
4796 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4797 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4798
4799 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4800
4801 * remote.c (cached_reg): Move from here...
4802 * regcache.h (cached_reg): ...to here.
4803 * python/py-unwind.c (struct reg_info): Remove.
4804 (cached_frame_info): Use cached_reg_t.
4805 (pyuw_prev_register): Likewise.
4806 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4807 (pyuw_dealloc_cache): Free all registers.
4808
4809 2017-06-22 Pedro Alves <palves@redhat.com>
4810 Simon Marchi <simon.marchi@ericsson.com>
4811
4812 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4813 warning.
4814 * common/diagnostics.h: New file.
4815
4816 2017-06-22 Pedro Alves <palves@redhat.com>
4817
4818 * common/agent.h: Add include guards.
4819
4820 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4821
4822 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4823 talk about addressable units instead of bytes.
4824
4825 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4826
4827 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4828 of '::const_iterator'.
4829
4830 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4831
4832 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4833 'unittests/environ-selftests.c'.
4834 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4835 * charset.c (find_charset_names): Declare object 'iconv_env'.
4836 Update code to use 'iconv_env' object. Remove call to
4837 'free_environ'.
4838 * common/environ.c: Include <utility>.
4839 (make_environ): Delete function.
4840 (free_environ): Delete function.
4841 (gdb_environ::clear): New function.
4842 (gdb_environ::operator=): New function.
4843 (gdb_environ::get): Likewise.
4844 (environ_vector): Delete function.
4845 (set_in_environ): Delete function.
4846 (gdb_environ::set): New function.
4847 (unset_in_environ): Delete function.
4848 (gdb_environ::unset): New function.
4849 (gdb_environ::envp): Likewise.
4850 * common/environ.h: Include <vector>.
4851 (struct gdb_environ): Delete; transform into...
4852 (class gdb_environ): ... this class.
4853 (free_environ): Delete prototype.
4854 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4855 environ_vector): Likewise.
4856 * infcmd.c (run_command_1): Update code to call
4857 'envp' from 'gdb_environ' class.
4858 (environment_info): Update code to call methods from 'gdb_environ'
4859 class.
4860 (unset_environment_command): Likewise.
4861 (path_info): Likewise.
4862 (path_command): Likewise.
4863 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4864 (inferior::inferior): Initialize 'environment' using the host's
4865 information.
4866 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4867 Include "environ.h".
4868 (class inferior) <environment>: Change type from 'struct
4869 gdb_environ' to 'gdb_environ'.
4870 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4871 methods from 'gdb_environ' class.
4872 * solib.c (solib_find_1): Likewise
4873 * unittests/environ-selftests.c: New file.
4874
4875 2017-06-20 Yao Qi <yao.qi@linaro.org>
4876
4877 * features/i386/i386-linux.xml: Exchange the order of including
4878 32bit-linux.xml and 32bit-sse.xml.
4879 * features/i386/i386-linux.c: Regenerated.
4880
4881 2017-06-20 Yao Qi <yao.qi@linaro.org>
4882
4883 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4884 Delete copy ctor and assignment operator.
4885 (tdesc_type): Likewise.
4886 (tdesc_feature): Likewise.
4887 (tdesc_free_reg): Remove.
4888 (tdesc_create_reg): Use new.
4889 (tdesc_free_type): Remove.
4890 (tdesc_create_vector): Use new.
4891 (tdesc_create_union): Likewise.
4892 (tdesc_create_flags): Likewise.
4893 (tdesc_create_enum): Likewise.
4894 (tdesc_free_feature): Delete.
4895 (free_target_description): Use delete.
4896
4897 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4898
4899 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4900 registers.
4901
4902 2017-06-19 Pedro Alves <palves@redhat.com>
4903
4904 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4905 after gdb::unlinker.
4906
4907 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4908
4909 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4910 gdb_environ to access an environment variable.
4911
4912 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4913
4914 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4915 gdb_byte*.
4916
4917 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4918
4919 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4920
4921 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4922
4923 * configure: Re-generate.
4924 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4925
4926 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4927
4928 * configure: Re-generate.
4929 * warning.m4: Pass -Werror to compiler when checking for
4930 supported warning flags.
4931
4932 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4933
4934 * Makefile.in (COMPILE.pre): Add "-x c++".
4935
4936 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4937 Pedro Alves <palves@redhat.com>
4938 Yao Qi <yao.qi@linaro.org>
4939
4940 * defs.h (RequireLongest): New.
4941 (extract_integer): Declare function template.
4942 (extract_signed_integer): Remove the declaration, but define it
4943 static inline.
4944 (extract_unsigned_integer): Likewise.
4945 (store_integer): Declare function template.
4946 (store_signed_integer): Remove the declaration, but define it
4947 static inline.
4948 (store_unsigned_integer): Likewise.
4949 * findvar.c (extract_integer): New function template.
4950 (extract_signed_integer): Remove.
4951 (extract_unsigned_integer): Remove.
4952 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4953 instantiations.
4954 (store_integer): New function template.
4955 (store_signed_integer): Remove.
4956 (store_unsigned_integer): Remove.
4957 (store_integer): Explicit instantiations.
4958 * regcache.c (regcache_raw_read_signed): Update.
4959 (regcache::raw_read): New function.
4960 (regcache::raw_read_signed): Remove.
4961 (regcache::raw_read_unsigned): Remove.
4962 (regcache_raw_read_unsigned): Update.
4963 (regcache_raw_write_unsigned): Update.
4964 (regcache::raw_write_signed): Remove.
4965 (regcache::raw_write): New function.
4966 (regcache_cooked_read_signed): Update.
4967 (regcache::raw_write_unsigned): Remove.
4968 (regcache::cooked_read_signed): Remove.
4969 (regcache_cooked_read_unsigned): Update.
4970 (regcache::cooked_read_unsigned): Remove.
4971 (regcache_cooked_write_signed): Update.
4972 (regcache_cooked_write_unsigned): Update.
4973 * regcache.h (regcache) <raw_read_signed>: Remove.
4974 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4975 <raw_read, raw_write>: New.
4976 <cooked_read_signed, cooked_write_signed>: Remove.
4977 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4978 <cooked_read, cooked_write>: New.
4979 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4980 (sh64_pseudo_register_write): Update.
4981
4982 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4983
4984 * arc-tdep.c (arc_disassembler_options): New variable.
4985 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4986 of default_print_insn.
4987 (arc_delayed_print_insn): Set info->section when needed,
4988 use default_print_insn to retrieve a disassembler.
4989
4990 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4991
4992 PR gdb/21574
4993 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4994 to mention $SHELL and startup-with-shell.
4995
4996 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4997
4998 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4999
5000 2017-06-14 Yao Qi <yao.qi@linaro.org>
5001
5002 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5003 default_print_insn instead of print_insn_aarch64.
5004 * arm-tdep.c (gdb_print_insn_arm): Call
5005 default_print_insn instead of print_insn_big_arm
5006 and print_insn_little_arm.
5007 * i386-tdep.c (i386_print_insn): Call default_print_insn
5008 instead of print_insn_i386.
5009 * ia64-tdep.c (ia64_print_insn): Call
5010 default_print_insn instead of print_insn_ia64.
5011 * mips-tdep.c (gdb_print_insn_mips): Call
5012 default_print_insn instead of print_insn_big_mips
5013 and print_insn_little_mips.
5014 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5015 instead of print_insn_spu.
5016
5017 2017-06-14 Pedro Alves <palves@redhat.com>
5018
5019 * ada-lang.c: Include "common/byte-vector.h".
5020 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5021 * charset.c (wchar_iterator::iterate): Resize the vector instead
5022 of reserving it.
5023 * common/byte-vector.h: Include "common/def-vector.h".
5024 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5025 * cli/cli-dump.c: Include "common/byte-vector.h".
5026 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5027 * common/byte-vector.h: New file.
5028 * common/def-vector.h: New file.
5029 * common/default-init-alloc.h: New file.
5030 * dwarf2loc.c: Include "common/byte-vector.h".
5031 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5032 instead of reserving it.
5033 * dwarf2read.c: Include "common/byte-vector.h".
5034 (data_buf::m_vec): Now a gdb::byte_vector.
5035 * gdb_regex.c: Include "common/def-vector.h".
5036 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5037 * mi/mi-main.c: Include "common/byte-vector.h".
5038 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5039 * printcmd.c: Include "common/byte-vector.h".
5040 (print_scalar_formatted): Use gdb::byte_vector.
5041 * valprint.c: Include "common/byte-vector.h".
5042 (maybe_negate_by_bytes, print_decimal_chars): Use
5043 gdb::byte_vector.
5044
5045 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5046
5047 * darwin-nat.c: Include "nat/fork-inferior.h".
5048
5049 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5050
5051 * configure.nat: Factor out Darwin bits that are not
5052 architecture-specific. Add fork-inferior.o.
5053
5054 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5055
5056 * configure.nat: Factor out AIX bits that are not
5057 architecture-specific. Add fork-inferior.o.
5058
5059 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5060
5061 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5062 (read_pieced_value, write_pieced_value): ...here. Reduce to
5063 wrappers that just call rw_pieced_value.
5064
5065 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5066
5067 * dwarf2loc.c (write_pieced_value): When writing the data for a
5068 memory piece, use write_memory_with_notification instead of
5069 write_memory.
5070
5071 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5072
5073 * valops.c (read_value_memory): Change embedded_offset to
5074 represent a bit offset instead of a byte offset.
5075 * value.h (read_value_memory): Adjust comment.
5076
5077 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5078
5079 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5080 dest_offset_bits and source_offset_bits.
5081 (write_pieced_value): Likewise.
5082
5083 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5084
5085 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5086 given by DW_OP_bit_piece.
5087 (write_pieced_value): Likewise.
5088
5089 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5090
5091 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5092 some other preparations to the places where sufficient information
5093 is available.
5094 (write_pieced_value): Likewise.
5095
5096 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5097
5098 * dwarf2loc.c (bits_to_bytes): New function.
5099 (read_pieced_value): Fix offset calculations for register pieces
5100 on big-endian targets.
5101 (write_pieced_value): Likewise.
5102
5103 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5104
5105 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5106 (write_pieced_value): Likewise.
5107
5108 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5109
5110 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5111 transfer the source value's least significant bits, instead of its
5112 lowest-addressed ones. Rename type_len to max_offset.
5113 (read_pieced_value): Mirror above changes to write_pieced_value as
5114 applicable.
5115
5116 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5117
5118 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5119 truncate full bytes from dest_offset_bits before using it as an
5120 offset into the buffer.
5121
5122 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5123
5124 * dwarf2loc.c (write_pieced_value): Include transfer size in
5125 byte-wise check.
5126
5127 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5128
5129 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5130 calculation of this_size.
5131
5132 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5133
5134 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5135 when targeting a bit-field.
5136 (write_pieced_value): Likewise.
5137
5138 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5139
5140 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5141 (allocate_piece_closure): Drop addr_size parameter.
5142 (dwarf2_evaluate_loc_desc_full): Adjust call to
5143 allocate_piece_closure.
5144
5145 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5146
5147 PR gdb/21226
5148 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5149 the LSB end, independent of endianness.
5150
5151 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5152
5153 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5154 size capping.
5155
5156 2017-06-13 Yao Qi <yao.qi@linaro.org>
5157
5158 * mips-linux-nat.c: Move include features/mips*-linux.c to
5159 mips-linux-tdep.c.
5160 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5161 to mips-linux-tdep.c.
5162 * mips-linux-tdep.c: Include features/mips*-linux.c
5163 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5164 functions.
5165 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5166 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5167 (tdesc_mips64_dsp_linux): Declare.
5168
5169 2017-06-12 Tom Tromey <tom@tromey.com>
5170
5171 * valprint.h (val_print_type_code_int): Remove.
5172 * valprint.c (generic_val_print_int): Always call
5173 val_print_scalar_formatted.
5174 (val_print_type_code_int): Remove.
5175 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5176 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5177 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5178 * ada-valprint.c (ada_val_print_num): Use
5179 val_print_scalar_formatted.
5180
5181 2017-06-12 Tom Tromey <tom@tromey.com>
5182
5183 * printcmd.c (print_scalar_formatted): Unify the two switches.
5184 Don't convert scalars to LONGEST.
5185
5186 2017-06-12 Tom Tromey <tom@tromey.com>
5187
5188 PR exp/16225:
5189 * valprint.h (print_decimal_chars): Update.
5190 * valprint.c (maybe_negate_by_bytes): New function.
5191 (print_decimal_chars): Add "is_signed" argument.
5192 * printcmd.c (print_scalar_formatted): Update.
5193
5194 2017-06-12 Tom Tromey <tom@tromey.com>
5195
5196 PR exp/16225:
5197 * valprint.h (print_binary_chars, print_hex_chars): Update.
5198 * valprint.c (val_print_type_code_int): Update.
5199 (print_binary_chars): Add "zero_pad" argument.
5200 (emit_octal_digit): New function.
5201 (print_octal_chars): Don't zero-pad.
5202 (print_decimal_chars): Likewise.
5203 (print_hex_chars): Add "zero_pad" argument.
5204 * sh64-tdep.c (sh64_do_fp_register): Update.
5205 * regcache.c (regcache::dump): Update.
5206 * printcmd.c (print_scalar_formatted): Update.
5207 * infcmd.c (default_print_one_register_info): Update.
5208
5209 2017-06-12 Pedro Alves <palves@redhat.com>
5210 Alan Hayward <alan.hayward@arm.com>
5211
5212 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5213 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5214 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5215 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5216 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5217
5218 2017-06-12 Pedro Alves <palves@redhat.com>
5219
5220 * dwarf2read.c (mapped_symtab::data): Now a vector of
5221 symtab_index_entry instead of vector of
5222 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5223 whether an element's name is NULL instead of checking whether the
5224 element itself is NULL.
5225 (find_slot): Change return type. Adjust.
5226 (hash_expand, , add_index_entry, uniquify_cu_indices)
5227 (write_hash_table): Adjust.
5228
5229 2017-06-12 Pedro Alves <palves@redhat.com>
5230
5231 * dwarf2read.c (recursively_count_psymbols): New function.
5232 (write_psymtabs_to_index): Call it to compute number of psyms and
5233 pass estimate size of psyms_seen to unordered_set's ctor.
5234
5235 2017-06-12 Pedro Alves <palves@redhat.com>
5236
5237 * dwarf2read.c (write_hash_table): Check if key already exists
5238 before emplacing.
5239
5240 2017-06-12 Pedro Alves <palves@redhat.com>
5241
5242 * dwarf2read.c (data_buf::append_space): Rename to...
5243 (data_buf::grow): ... this, and make private. Adjust all callers.
5244 (data_buf::append_uint): New method.
5245 (add_address_entry, write_one_signatured_type)
5246 (write_psymtabs_to_index): Use it.
5247
5248 2017-06-12 Pedro Alves <palves@redhat.com>
5249
5250 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5251 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5252 (data_buf::file_write): Call ::fwrite directly.
5253
5254 2017-06-12 Pedro Alves <palves@redhat.com>
5255
5256 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5257 std::vector::erase.
5258
5259 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5260
5261 Code cleanup: C++ify .gdb_index producer.
5262 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5263 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5264 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5265 (create_strtab, add_string): Remove.
5266 (file_write, data_buf): New.
5267 (struct symtab_index_entry): Use std::vector for cu_indices.
5268 (struct mapped_symtab): Use std::vector for data.
5269 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5270 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5271 Remove.
5272 (find_slot): Change return type. Update it to the new data structures.
5273 (hash_expand, add_index_entry): Update it to the new data structures.
5274 (offset_type_compare): Remove.
5275 (uniquify_cu_indices): Update it to the new data structures.
5276 (c_str_view, c_str_view_hasher, vector_hasher): New.
5277 (add_indices_to_cpool): Remove.
5278 (write_hash_table): Update it to the new data structures.
5279 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5280 (eq_psymtab_cu_index): Remove.
5281 (psym_index_map): New typedef.
5282 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5283 reference and std::unordered_map for cu_index_htab.
5284 (add_address_entry, add_address_entry_worker, write_address_map)
5285 (write_psymbols): Update it to the new data structures.
5286 (write_obstack): Remove.
5287 (struct signatured_type_index_data): Change types_list to a data_buf
5288 reference and psyms_seen to a std::unordered_set reference.
5289 (write_one_signatured_type, recursively_write_psymbols)
5290 (write_psymtabs_to_index): Update it to the new data structures.
5291
5292 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5293
5294 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5295 separate-debug-file commands.
5296 * symfile.h (separate_debug_file_debug): New global.
5297 * symfile.c (separate_debug_file_debug): New global.
5298 (separate_debug_file_exists, find_separate_debug_file): Add
5299 debug output.
5300 (_initialize_symfile): Add "set debug separate-debug-file"
5301 command.
5302 * build-id.c (build_id_to_debug_bfd,
5303 find_separate_debug_file_by_buildid): Add debug output.
5304
5305 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5306
5307 * gdbarch.sh (displaced_step_free_closure): Remove.
5308 * gdbarch.h, gdbarch.c: Re-generate.
5309 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5310 displaced_step_free_closure.
5311 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5312 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5313 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5314 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5315 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5316 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5317 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5318 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5319 * infrun.c (displaced_step_clear): Call xfree instead of
5320 gdbarch_displaced_step_free_closure.
5321
5322 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5323
5324 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5325 NULL".
5326
5327 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5328
5329 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5330 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5331 (mn10300_push_dummy_call): Likewise.
5332
5333 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5334
5335 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5336
5337 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5338
5339 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5340
5341 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5342
5343 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5344 able to start inferiors using a shell.
5345 (New remote packets): Announce new packet "QStartupWithShell".
5346 * remote.c: Add PACKET_QStartupWithShell.
5347 (extended_remote_create_inferior): Handle new
5348 PACKET_QStartupWithShell.
5349 (remote_protocol_features) <QStartupWithShell>: New entry for
5350 PACKET_QStartupWithShell.
5351 (_initialize_remote): Call "add_packet_config_cmd" for
5352 QStartupShell.
5353
5354 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5355 Pedro Alves <palves@redhat.com>
5356
5357 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5358 and "nat/fork-inferior.h".
5359 * common/common-inferior.h: New file, with contents from
5360 "gdb/inferior.h".
5361 * commom/common-utils.c: Include "common-utils.h".
5362 (stringify_argv): New function.
5363 * common/common-utils.h (stringify_argv): New prototype.
5364 * configure.nat: Add "fork-inferior.o" as a dependency for
5365 "*linux*", "fbsd*" and "nbsd*" hosts.
5366 * corefile.c (get_exec_file): Update comment.
5367 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5368 instead of "startup_inferior".
5369 (darwin_create_inferior): Call "add_thread_silent" after
5370 "fork_inferior".
5371 * fork-child.c: Cleanup unnecessary includes.
5372 (SHELL_FILE): Move to "common/common-fork-child.c".
5373 (environ): Likewise.
5374 (exec_wrapper): Initialize.
5375 (get_exec_wrapper): New function.
5376 (breakup_args): Move to "common/common-fork-child.c"; rename to
5377 "breakup_args_for_exec".
5378 (escape_bang_in_quoted_argument): Move to
5379 "common/common-fork-child.c".
5380 (saved_ui): New variable.
5381 (prefork_hook): New function.
5382 (postfork_hook): Likewise.
5383 (postfork_child_hook): Likewise.
5384 (gdb_startup_inferior): Likewise.
5385 (fork_inferior): Move to "common/common-fork-child.c". Update
5386 function to support gdbserver.
5387 (startup_inferior): Likewise.
5388 * gdbcore.h (get_exec_file): Remove declaration.
5389 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5390 instead of "startup_inferior". Call "add_thread_silent" after
5391 "fork_inferior".
5392 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5393 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5394 instead of "startup_inferior". Call "add_thread_silent" after
5395 "fork_inferior".
5396 * inferior.h: Include "common-inferior.h".
5397 (trace_start_error): Move to "common/common-utils.h".
5398 (trace_start_error_with_name): Likewise.
5399 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5400 (startup_inferior): Likewise.
5401 (gdb_startup_inferior): New prototype.
5402 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5403 * nat/fork-inferior.h: New file.
5404 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5405 instead of "startup_inferior". Call "add_thread_silent" after
5406 "fork_inferior".
5407 * target.h (target_terminal_init): Move prototype to
5408 "target/target.h".
5409 (target_terminal_inferior): Likewise.
5410 (target_terminal_ours): Likewise.
5411 * target/target.h (target_terminal_init): New prototype, moved
5412 from "target.h".
5413 (target_terminal_inferior): Likewise.
5414 (target_terminal_ours): Likewise.
5415 * utils.c (gdb_flush_out_err): New function.
5416
5417 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5418
5419 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5420 * common/common-gdbthread.h: New file, with parts from
5421 "gdb/gdbthread.h".
5422 * gdbthread.h: Include "common-gdbthread.h".
5423 (switch_to_thread): Moved to "common/common-gdbthread.h".
5424
5425 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5426
5427 * Makefile.in (SFILES): Add "common/job-control.c".
5428 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5429 (COMMON_OBS): Add "job-control.o".
5430 * common/job-control.c: New file, with contents from
5431 "gdb/inflow.c".
5432 * common/job-control.h: New file, with contents from "terminal.h".
5433 * fork-child.c: Include "job-control.h".
5434 * inflow.c: Include "job-control.h".
5435 (gdb_setpgid): Move to "common/common-inflow.c".
5436 (_initialize_inflow): Move setting of "job_control" to
5437 "handle_job_control".
5438 * terminal.h (job_control): Moved to "common/common-terminal.h".
5439 (gdb_setpgid): Likewise.
5440 * top.c: Include "job_control.h".
5441 * utils.c: Likewise.
5442 (job_control): Moved to "job-control.c".
5443
5444 2017-06-07 Pedro Alves <palves@redhat.com>
5445
5446 * Makefile.in (SFILES): Add gdb_regex.c.
5447 (COMMON_OBS): Add gdb_regex.o.
5448 * ada-lang.c (ada_add_standard_exceptions)
5449 (ada_add_exceptions_from_frame, name_matches_regex)
5450 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5451 parameter type to compiled_regex. Adjust.
5452 (ada_exceptions_list): Use compiled_regex.
5453 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5454 std::unique_ptr<compiled_regex>.
5455 (exception_catchpoint::~exception_catchpoint): Remove regfree
5456 call.
5457 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5458 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5459 * breakpoint.c (solib_catchpoint::compiled): Now a
5460 std::unique_ptr<compiled_regex>.
5461 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5462 (check_status_catch_solib): Adjust to use compiled_regex.
5463 (add_solib_catchpoint): Adjust to use compiled_regex.
5464 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5465 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5466 compiled_regex reference. Adjust to use it.
5467 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5468 declaration. Include "gdb_regex.h".
5469 (apropos_cmd): Change regex parameter to compiled_regex reference.
5470 * gdb_regex.c: New file.
5471 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5472 declarations.
5473 (class compiled_regex): New.
5474 * linux-tdep.c: Include "common/gdb_optional.h".
5475 (struct mapping_regexes): New, factored out from
5476 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5477 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5478 gdb::optional and remove cleanups. Adjust to compiled_regex.
5479 * probe.c: Include "common/gdb_optional.h".
5480 (collect_probes): Use compiled_regex and gdb::optional and remove
5481 cleanups.
5482 * skip.c: Include "common/gdb_optional.h".
5483 (skiplist_entry::compiled_function_regexp): Now a
5484 gdb::optional<compiled_regex>.
5485 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5486 (free_skiplist_entry): Remove regfree call.
5487 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5488 compiled_regex and gdb::optional.
5489 * symtab.c: Include "common/gdb_optional.h".
5490 (search_symbols): Use compiled_regex and gdb::optional.
5491 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5492 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5493 to gdb_regex.c.
5494
5495 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5496
5497 * regcache.c (regcache::save): Avoid buffer use.
5498 (regcache::dump): Likewise.
5499
5500 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5501
5502 * sh-tdep.c (sh_pseudo_register_read): Remove
5503 MAX_REGISTER_SIZE.
5504 (sh_pseudo_register_write): Likewise.
5505 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5506 (sh64_pseudo_register_write): Likewise
5507
5508 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5509
5510 * aarch64-tdep.c (aarch64_store_return_value): Use
5511 V_REGISTER_SIZE.
5512 (aarch64_pseudo_read_value): Likewise.
5513 (aarch64_pseudo_write): Likewise.
5514
5515 2017-06-06 Yao Qi <yao.qi@linaro.org>
5516
5517 * regformats/regdef.h (set_register_cache): Remove the
5518 declaration.
5519
5520 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5521
5522 * frame.c (frame_unwind_register_signed): Use
5523 frame_unwind_register_value.
5524
5525 2017-06-06 Pedro Alves <palves@redhat.com>
5526
5527 PR breakpoints/21553
5528 * breakpoint.c (create_breakpoints_sal_default)
5529 (init_breakpoint_sal, create_breakpoint_sal): Use
5530 gdb::unique_xmalloc_ptr for string parameters.
5531 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5532 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5533 (base_breakpoint_create_breakpoints_sal)
5534 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5535 (strace_marker_create_breakpoints_sal)
5536 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5537 string parameters.
5538 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5539 gdb::unique_xmalloc_ptr for string parameters.
5540 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5541 parameters.
5542
5543 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5544
5545 * alpha-tdep.c (alpha_register_to_value): Use
5546 get_frame_register_value.
5547 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5548
5549 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5550
5551 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5552 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5553 (ia64_value_to_register): Likewise.
5554 (ia64_extract_return_value): Likewise.
5555 (ia64_store_return_value): Likewise.
5556 (ia64_push_dummy_call): Likewise.
5557
5558 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5559
5560 GDB 8.0 released.
5561
5562 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5563
5564 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5565
5566 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5567
5568 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5569 parameter.
5570 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5571
5572 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5573
5574 * event-loop.c (poll_timers): Unallocate timer using delete
5575 instead of xfree.
5576
5577 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5578
5579 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5580 (struct breakpoint) <~breakpoint>: New.
5581 (struct watchpoint): Inherit from breakpoint.
5582 <~watchpoint>: New.
5583 <base>: Remove.
5584 (struct tracepoint): Inherit from breakpoint.
5585 <base>: Remove.
5586 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5587 (struct longjmp_breakpoint): Inherit from breakpoint.
5588 <~longjmp_breakpoint>: New.
5589 <base>: Remove.
5590 (new_breakpoint_from_type): Remove casts.
5591 (watchpoint_in_thread_scope): Remove reference to base field.
5592 (watchpoint_del_at_next_stop): Likewise.
5593 (update_watchpoint): Likewise.
5594 (watchpoint_check): Likewise.
5595 (bpstat_check_watchpoint): Likewise.
5596 (set_longjmp_breakpoint): Likewise.
5597 (struct fork_catchpoint): Inherit from breakpoint.
5598 <base>: Remove.
5599 (struct solib_catchpoint): Inherit from breakpoint.
5600 <~solib_catchpoint>: New.
5601 <base>: Remove.
5602 (dtor_catch_solib): Change to ...
5603 (solib_catchpoint::~solib_catchpoint): ... this.
5604 (breakpoint_hit_catch_solib): Remove reference to base field.
5605 (add_solib_catchpoint): Likewise.
5606 (create_fork_vfork_event_catchpoint): Likewise.
5607 (struct exec_catchpoint): Inherit from breakpoint.
5608 <~exec_catchpoint>: New.
5609 <base>: Remove.
5610 (dtor_catch_exec): Change to ...
5611 (exec_catchpoint::~exec_catchpoint): ... this.
5612 (dtor_watchpoint): Change to ...
5613 (watchpoint::~watchpoint): ... this.
5614 (watch_command_1): Remove reference to base field.
5615 (catch_exec_command_1): Likewise.
5616 (base_breakpoint_dtor): Change to ...
5617 (breakpoint::~breakpoint): ... this.
5618 (base_breakpoint_ops): Remove dtor field value.
5619 (longjmp_bkpt_dtor): Change to ...
5620 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5621 (strace_marker_create_breakpoints_sal): Remove reference to base
5622 field.
5623 (delete_breakpoint): Don't manually call breakpoint destructor.
5624 (create_tracepoint_from_upload): Remove reference to base field.
5625 (trace_pass_set_count): Likewise.
5626 (initialize_breakpoint_ops): Don't initialize
5627 momentary_breakpoint_ops, don't set dtors.
5628 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5629 <~ada_catchpoint>: New.
5630 <base>: Remove.
5631 (create_excep_cond_exprs): Remove reference to base field.
5632 (dtor_exception): Change to ...
5633 (ada_catchpoint::~ada_catchpoint): ... this.
5634 (dtor_catch_exception): Remove.
5635 (dtor_catch_exception_unhandled): Remove.
5636 (dtor_catch_assert): Remove.
5637 (create_ada_exception_catchpoint): Remove reference to base
5638 field.
5639 (initialize_ada_catchpoint_ops): Don't set dtors.
5640 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5641 breakpoint.
5642 <~signal_catchpoint>: New.
5643 <base>: Remove.
5644 (signal_catchpoint_dtor): Change to ...
5645 (signal_catchpoint::~signal_catchpoint): ... this.
5646 (create_signal_catchpoint): Remove reference to base field.
5647 (initialize_signal_catchpoint_ops): Don't set dtor.
5648 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5649 from breakpoint.
5650 <~syscall_catchpoint>: New.
5651 <base>: Remove.
5652 (dtor_catch_syscall): Change to ...
5653 (syscall_catchpoint::~syscall_catchpoint): ... this.
5654 (create_syscall_event_catchpoint): Remove reference to base
5655 field.
5656 (initialize_syscall_catchpoint_ops): Don't set dtor.
5657 * break-catch-throw.c (struct exception_catchpoint): Inherit
5658 from breakpoint.
5659 <~exception_catchpoint>: New.
5660 <base>: Remove.
5661 (dtor_exception_catchpoint): Change to ...
5662 (exception_catchpoint::~exception_catchpoint): ... this.
5663 (handle_gnu_v3_exceptions): Remove reference to base field.
5664 (initialize_throw_catchpoint_ops): Don't set dtor.
5665 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5666 field.
5667 * remote.c (remote_get_tracepoint_status): Likewise.
5668 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5669 * tracefile.c (tracefile_fetch_registers): Likewise.
5670 * tracepoint.c (actions_command): Likewise.
5671 (validate_actionline): Likewise.
5672 (tfind_1): Likewise.
5673 (get_traceframe_location): Likewise.
5674 (find_matching_tracepoint_location): Likewise.
5675 (parse_tracepoint_status): Likewise.
5676 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5677
5678 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5679
5680 * breakpoint.c (struct longjmp_breakpoint): New struct.
5681 (is_tracepoint_type): Change return type to bool.
5682 (is_longjmp_type): New function.
5683 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5684 (set_raw_breakpoint_without_location): Use
5685 new_breakpoint_from_type.
5686 (set_raw_breakpoint): Likewise.
5687
5688 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5689
5690 * breakpoint.c (new_breakpoint_from_type): New function.
5691 (create_breakpoint_sal): Use new_breakpoint_from_type and
5692 unique_ptr.
5693 (create_breakpoint): Likewise.
5694
5695 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5696
5697 * memattr.c (mem_info_command): Rename to ...
5698 (info_mem_command): ... this.
5699 (mem_enable_command): Rename to ...
5700 (enable_mem_command): ... this.
5701 (mem_disable_command): Rename to ...
5702 (disable_mem_command): ... this.
5703 (mem_delete_command): Rename to ...
5704 (delete_mem_command): ... this.
5705 (_initialize_mem): Adjust function names.
5706
5707 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5708
5709 * btrace.c (handle_pt_insn_events): New.
5710 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5711 STATUS. Split into this and ...
5712 (handle_pt_insn_event_flags): ... this.
5713
5714 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5715
5716 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5717 and struct pt_insn.resynced.
5718 * configure: Regenerated.
5719 * config.in: Regenerated.
5720
5721 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5722
5723 * btrace.c (ftrace_find_call_by_number): New function.
5724 (ftrace_new_function): Store objects, not pointers.
5725 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5726 ftrace_new_gap, ftrace_update_function,
5727 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5728 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5729 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5730 btrace_ends_with_single_insn, btrace_call_get): Account for
5731 btrace_thread_info::functions now storing objects.
5732 * btrace.h (struct btrace_thread_info): Add constructor.
5733 (struct btrace_thread_info) <functions>: Make std::vector.
5734 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5735 Initialize with default values.
5736 * record-btrace.c (record_btrace_frame_sniffer): Account for
5737 btrace_thread_info::functions now storing objects.
5738
5739 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5740
5741 * btrace.c: Remove typedef bfun_s.
5742 (ftrace_new_gap): Directly add gaps to the list of gaps.
5743 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5744 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5745 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5746 instead of gdb VEC.
5747
5748 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5749
5750 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5751 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5752 with btrace_thread_info::next_segment and
5753 btrace_thread_info::prev_segment.
5754 * btrace.h: Remove struct btrace_func_link.
5755 (struct btrace_function): Replace pair of function segment pointers
5756 with pair of indices.
5757 * python/py-record-btrace.c (btpy_call_prev_sibling,
5758 btpy_call_next_sibling): Replace references to
5759 btrace_thread_info::segment with btrace_thread_info::next_segment and
5760 btrace_thread_info::prev_segment.
5761 * record-btrace.c (record_btrace_frame_this_id): Use
5762 btrace_find_call_by_number.
5763
5764 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5765
5766 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5767 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5768 btrace_insn_next, btrace_insn_prev): Remove references to
5769 btrace_thread_info::flow.
5770 * btrace.h (struct btrace_function): Remove FLOW.
5771
5772 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5773
5774 * btrace.c (ftrace_find_call_by_number): New function.
5775 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5776 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5777 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5778 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5779 index.
5780 * btrace.h (struct btrace_function): Turn UP into an index.
5781 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5782 as an index.
5783 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5784 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5785 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5786
5787 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5788
5789 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5790 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5791 ftrace_update_function, ftrace_compute_global_level_offset,
5792 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5793 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5794 btrace_insn_end, btrace_is_empty): Remove references to
5795 btrace_thread_info::begin and btrace_thread_info::end.
5796 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5797 (struct btrace_thread_info) <functions>: Adjust comment.
5798 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5799 btrace_thread_info::begin.
5800
5801 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5802
5803 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5804 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5805 ftrace_update_function): Remove arguments that implicitly were always
5806 BTINFO->END.
5807 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5808 Don't pass BTINFO->END.
5809
5810 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5811
5812 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5813 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5814 btrace_find_insn_by_number): Replace function segment pointer with
5815 index.
5816 (btrace_insn_cmp): Simplify.
5817 * btrace.h: (struct btrace_insn_iterator) Rename index to
5818 insn_index. Replace function segment pointer with index into function
5819 segment vector.
5820 * record-btrace.c (record_btrace_call_history): Replace function
5821 segment pointer use with index.
5822 (record_btrace_frame_sniffer): Retrieve function call segment through
5823 vector.
5824 (record_btrace_set_replay): Remove defunc't safety check.
5825
5826 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5827
5828 * btrace.c (btrace_ends_with_single_insn): New function.
5829 (btrace_call_get, btrace_call_number, btrace_call_begin,
5830 btrace_call_end, btrace_call_next, btrace_call_prev,
5831 btrace_find_call_by_number): Use index into call segment vector
5832 instead of pointer.
5833 (btrace_call_cmp): Simplify.
5834 * btrace.h (struct btrace_call_iterator): Replace function call segment
5835 pointer with index into vector.
5836 * record-btrace.c (record_btrace_call_history): Use index instead of
5837 pointer.
5838
5839 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5840
5841 * btrace.c (btrace_insn_begin, btrace_insn_end,
5842 btrace_find_insn_by_number): Add btinfo to iterator.
5843 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5844
5845 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5846
5847 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5848 and save pointers directly.
5849 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5850 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5851 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5852 changed signature of functions.
5853 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5854 (btrace_fetch): Remove code that adds btrace_function pointers to
5855 vector of btrace_functions.
5856 (btrace_clear): Simplify freeing vector of btrace_functions.
5857
5858 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5859
5860 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5861 Replace VEC_* with std::vector functions.
5862 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5863 (struct btrace_thread_info)<functions>: Change type to std::vector.
5864
5865 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5866
5867 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5868 "Removed targets and native configurations" up. Merge duplicate
5869 "New commands" sub-sections. Add "New options" sub-sections.
5870
5871 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5872
5873 * defs.h (copy_integer_to_size): New declaration.
5874 * findvar.c (copy_integer_to_size): New function.
5875 (do_cint_test): New selftest function.
5876 (copy_integer_to_size_test): Likewise.
5877 (_initialize_findvar): Likewise.
5878 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5879 (mips_fbsd_collect_reg): Use raw_collect_integer.
5880 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5881 (mips64_fill_gregset): Use raw_collect_integer
5882 (mips64_fill_fpregset): Use raw_supply_integer.
5883 * regcache.c (regcache::raw_supply_integer): New function.
5884 (regcache::raw_collect_integer): Likewise.
5885 * regcache.h: (regcache::raw_supply_integer): New declaration.
5886 (regcache::raw_collect_integer): Likewise.
5887
5888 2017-05-24 Yao Qi <yao.qi@linaro.org>
5889
5890 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5891 (COMMON_OBS): Add gdbarch-selftests.o.
5892 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5893 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5894 * gdbarch-selftests.c: New file.
5895 * regcache.h (regcache) <~regcache>: Mark it virtual if
5896 GDB_SELF_TEST.
5897 <raw_write>: Likewise.
5898
5899 2017-05-24 Yao Qi <yao.qi@linaro.org>
5900
5901 * regcache.c (current_regcache): Change it to
5902 regcache::current_regcache.
5903 (regcache_observer_target_changed): Update.
5904 (regcache_thread_ptid_changed): Make it a regcache static
5905 method.
5906 (regcache_thread_ptid_changed): Update.
5907 (class regcache_access): New.
5908 (current_regcache_test): Update.
5909 (_initialize_regcache): Update.
5910 * regcache.h: Include forward_list.
5911 (regcache): Declare regcache_thread_ptid_changed and declare
5912 registers_changed_ptid as friend.
5913
5914 2017-05-24 Yao Qi <yao.qi@linaro.org>
5915
5916 * i387-tdep.c (i387_register_to_value): Use register_size
5917 instead of TYPE_LENGTH.
5918 * m68k-tdep.c (m68k_register_to_value): Likewise.
5919
5920 2017-05-24 Yao Qi <yao.qi@linaro.org>
5921
5922 * i387-tdep.c (i387_convert_register_p): Return false if type
5923 code isn't TYPE_CODE_FLT.
5924
5925 2017-05-24 Yao Qi <yao.qi@linaro.org>
5926
5927 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5928 length is 4.
5929 (alpha_register_to_value): Remove type length check.
5930 (alpha_value_to_register): Likewise.
5931
5932 2017-05-24 Yao Qi <yao.qi@linaro.org>
5933
5934 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5935 TYPE_CODE_FLT.
5936
5937 2017-05-24 Yao Qi <yao.qi@linaro.org>
5938
5939 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5940 TYPE_CODE_FLT or not.
5941
5942 2017-05-24 Yao Qi <yao.qi@linaro.org>
5943
5944 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5945 * avr-tdep.c (avr_gdbarch_init): Likewise.
5946 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5947 * cris-tdep.c (cris_gdbarch_init): Likewise.
5948 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5949 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5950 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5951 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5952 * mep-tdep.c (mep_gdbarch_init): Likewise.
5953 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5954 * mips-tdep.c (mips_gdbarch_init): Likewise.
5955 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5956 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5957 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5958 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5959 * v850-tdep.c (v850_gdbarch_init): Likewise.
5960
5961 2017-05-24 Yao Qi <yao.qi@linaro.org>
5962
5963 * selftest-arch.c (tests_with_arch): Call registers_changed
5964 and reinit_frame_cache.
5965 * selftest.c (run_self_tests): Likewise.
5966
5967 2017-05-24 Yao Qi <yao.qi@linaro.org>
5968
5969 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5970 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5971
5972 2017-05-24 Yao Qi <yao.qi@linaro.org>
5973
5974 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5975 set_gdbarch_print_insn.
5976
5977 2017-05-24 Yao Qi <yao.qi@linaro.org>
5978
5979 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5980 set_gdbarch_print_insn.
5981
5982 2017-05-24 Yao Qi <yao.qi@linaro.org>
5983
5984 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5985 set_gdbarch_print_insn.
5986 * arc-tdep.c (arc_gdbarch_init): Likewise.
5987 * arch-utils.c: include dis-asm.h.
5988 (default_print_insn): New function.
5989 * arch-utils.h (default_print_insn): Declare.
5990 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5991 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5992 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5993 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5994 * frv-tdep.c (frv_gdbarch_init): Likewise.
5995 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5996 * gdbarch.sh (print_insn): Use default_print_insn.
5997 * gdbarch.c: Regenerated.
5998 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5999 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6000 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6001 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6002 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6003 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6004 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6005 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6006 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6007 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6008 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6009 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6010 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6011 * mt-tdep.c (mt_gdbarch_init): Likewise.
6012 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6013 * nios2-tdep.c (nios2_print_insn): Remove.
6014 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6015 * rx-tdep.c (rx_gdbarch_init): Likewise.
6016 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6017 * score-tdep.c (score_print_insn): Remove.
6018 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6019 * sh-tdep.c (sh_gdbarch_init): Likewise.
6020 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6021 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6022 * tic6x-tdep.c (tic6x_print_insn): Remove.
6023 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6024 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6025 * v850-tdep.c (v850_gdbarch_init): Likewise.
6026 * vax-tdep.c (vax_gdbarch_init): Likewise.
6027 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6028 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6029
6030 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6031
6032 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6033 (MIPS_FP0_REGNUM): Remove.
6034 (MIPS_FSR_REGNUM): Remove.
6035 (mips_fbsd_supply_fpregs): Use mips_regnum.
6036 (mips_fbsd_supply_gregs): Likewise.
6037 (mips_fbsd_collect_fpregs): Likewise.
6038 (mips_fbsd_collect_gregs): Likewise.
6039
6040 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6041
6042 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6043 (getpfpregs_supplies): New function.
6044 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6045 getfpregs_supplies.
6046 (mips_fbsd_store_inferior_registers): Likewise.
6047
6048 2017-05-22 Pedro Alves <palves@redhat.com>
6049
6050 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6051 maintainer.
6052
6053 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6054
6055 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6056 (store_register): Likewise.
6057 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6058 (get_decimal_float_return_value): Likewise.
6059 (do_ppc_sysv_return_value): Likewise.
6060 (ppc64_sysv_abi_push_integer): Likewise.
6061 (ppc64_sysv_abi_push_freg): Likewise.
6062 (ppc64_sysv_abi_return_value_base): Likewise.
6063 (ppc64_sysv_abi_return_value): Likewise.
6064 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6065 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6066 * rs6000-nat.c: Likewise.
6067 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6068 (rs6000_value_to_register): Likewise.
6069 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6070
6071 2017-05-21 Tom Tromey <tom@tromey.com>
6072
6073 PR rust/21466:
6074 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6075 arrays as "[T]", not "[T; ]".
6076
6077 2017-05-19 Tom Tromey <tom@tromey.com>
6078
6079 PR rust/21484:
6080 * rust-lang.c (exp_descriptor_rust): New function.
6081 (rust_language_defn): Use it.
6082 * p-lang.c (pascal_language_defn): Update.
6083 * opencl-lang.c (opencl_language_defn): Update.
6084 * objc-lang.c (objc_language_defn): Update.
6085 * m2-lang.c (m2_language_defn): Update.
6086 * language.h (struct language_defn)
6087 <la_watch_location_expression>: New member.
6088 * language.c (unknown_language_defn, auto_language_defn)
6089 (local_language_defn): Update.
6090 * go-lang.c (go_language_defn): Update.
6091 * f-lang.c (f_language_defn): Update.
6092 * d-lang.c (d_language_defn): Update.
6093 * c-lang.h (c_watch_location_expression): Declare.
6094 * c-lang.c (c_watch_location_expression): New function.
6095 (c_language_defn, cplus_language_defn, asm_language_defn)
6096 (minimal_language_defn): Use it.
6097 * breakpoint.c (watch_command_1): Call
6098 la_watch_location_expression.
6099 * ada-lang.c (ada_language_defn): Update.
6100
6101 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6102
6103 PR tui/21482
6104 * gdb_curses.h (NOMACROS): Define.
6105 (NCURSES_NOMACROS): Define.
6106
6107 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6108
6109 PR tui/21482
6110 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6111 arg to char *.
6112 * tui/tui-wingeneral.c (box_win): Likewise.
6113 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6114 (tui_show_source_line): Likewise.
6115 (tui_show_exec_info_content): Likewise.
6116
6117 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6118
6119 * sparc-tdep.c (sparc_structure_return_p)
6120 (sparc_arg_on_registers_p): New functions.
6121 (sparc32_store_arguments): Use them.
6122 * sparc64-tdep.c (sparc64_16_byte_align_p)
6123 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6124 Handle TYPE_CODE_ARRAY.
6125
6126 2017-05-17 Yao Qi <yao.qi@linaro.org>
6127
6128 * cli/cli-decode.c (add_alias_cmd): New function.
6129 * command.h (add_alias_cmd): Declare.
6130 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6131 instead call add_alias_cmd.
6132
6133 2017-05-17 Pedro Alves <palves@redhat.com>
6134
6135 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6136 (nat_makefile_frag): ... this. All references updated.
6137 * configure.ac: Likewise.
6138 * configure.nat: Likewise. Enhance comments.
6139 * configure: Regenerate.
6140
6141 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6142
6143 * procfs.c (procfs_create_inferior): Change prototype to match
6144 definition.
6145
6146 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6147
6148 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6149 C++ compiler warning.
6150
6151 2017-05-12 Tom Tromey <tom@tromey.com>
6152
6153 PR rust/21483:
6154 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6155 recurse, just call value_struct_elt directly.
6156
6157 2017-05-12 Tom Tromey <tom@tromey.com>
6158
6159 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6160 OP_RUST_ARRAY>: Fix.
6161
6162 2017-05-12 Tom Tromey <tom@tromey.com>
6163
6164 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6165
6166 2017-05-09 Yao Qi <yao.qi@linaro.org>
6167
6168 * regcache.c: Include <forward_list>.
6169 (struct regcache_list): Remove.
6170 (current_regcache): Update.
6171 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6172 (regcache_thread_ptid_changed): Likewise.
6173 (registers_changed_ptid): Likewise.
6174 (current_regcache_size): Likewise.
6175
6176 2017-05-09 Yao Qi <yao.qi@linaro.org>
6177
6178 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6179 (current_regcache_size): New function.
6180 (current_regcache_test): New function.
6181 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6182
6183 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6184
6185 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6186 (print_gp_register_row): Use get_frame_register_value.
6187
6188 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6189
6190 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6191 (mips_supply_fpregset): Likewise.
6192 (mips64_supply_gregset): Likewise.
6193
6194 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6195
6196 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6197 regcache->raw_supply_zeroed.
6198
6199 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6200
6201 * configure.nat: Rearrange 'case' statements to match
6202 host before cpu.
6203
6204 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6205
6206 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6207 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6208 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6209 "@nat_extra_makefile_frag@".
6210 (Makefile): Remove dependency on "@frags@".
6211 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6212 (data-directory/Makefile): Likewise.
6213 * config/aarch64/linux.mh: Deleted; moved contents to
6214 "gdb/configure.nat".
6215 * config/alpha/alpha-linux.mh: Likewise.
6216 * config/alpha/nbsd.mh: Likewise.
6217 * config/arm/linux.mh: Likewise.
6218 * config/arm/nbsdelf.mh: Likewise.
6219 * config/i386/cygwin.mh: Likewise.
6220 * config/i386/cygwin64.mh: Likewise.
6221 * config/i386/darwin.mh: Likewise.
6222 * config/i386/fbsd.mh: Likewise.
6223 * config/i386/fbsd64.mh: Likewise.
6224 * config/i386/go32.mh: Likewise.
6225 * config/i386/i386gnu.mh: Likewise.
6226 * config/i386/i386sol2.mh: Likewise.
6227 * config/i386/linux.mh: Likewise.
6228 * config/i386/linux64.mh: Likewise.
6229 * config/i386/mingw.mh: Likewise.
6230 * config/i386/mingw64.mh: Likewise.
6231 * config/i386/nbsd64.mh: Likewise.
6232 * config/i386/nbsdelf.mh: Likewise.
6233 * config/i386/nto.mh: Likewise.
6234 * config/i386/obsd.mh: Likewise.
6235 * config/i386/obsd64.mh: Likewise.
6236 * config/i386/sol2-64.mh: Likewise.
6237 * config/ia64/linux.mh: Likewise.
6238 * config/m32r/linux.mh: Likewise.
6239 * config/m68k/linux.mh: Likewise.
6240 * config/m68k/nbsdelf.mh: Likewise.
6241 * config/m68k/obsd.mh: Likewise.
6242 * config/m88k/obsd.mh: Likewise.
6243 * config/mips/fbsd.mh: Likewise.
6244 * config/mips/linux.mh: Likewise.
6245 * config/mips/nbsd.mh: Likewise.
6246 * config/mips/obsd64.mh: Likewise.
6247 * config/pa/linux.mh: Likewise.
6248 * config/pa/nbsd.mh: Likewise.
6249 * config/pa/obsd.mh: Likewise.
6250 * config/powerpc/aix.mh: Likewise.
6251 * config/powerpc/fbsd.mh: Likewise.
6252 * config/powerpc/linux.mh: Likewise.
6253 * config/powerpc/nbsd.mh: Likewise.
6254 * config/powerpc/obsd.mh: Likewise.
6255 * config/powerpc/ppc64-linux.mh: Likewise.
6256 * config/powerpc/spu-linux.mh: Likewise.
6257 * config/s390/linux.mh: Likewise.
6258 * config/sh/nbsd.mh: Likewise.
6259 * config/sparc/fbsd.mh: Likewise.
6260 * config/sparc/linux.mh: Likewise.
6261 * config/sparc/linux64.mh: Likewise.
6262 * config/sparc/nbsd64.mh: Likewise.
6263 * config/sparc/nbsdelf.mh: Likewise.
6264 * config/sparc/obsd64.mh: Likewise.
6265 * config/sparc/sol2.mh: Likewise.
6266 * config/tilegx/linux.mh: Likewise.
6267 * config/vax/nbsdelf.mh: Likewise.
6268 * config/vax/obsd.mh: Likewise.
6269 * config/xtensa/linux.mh: Likewise.
6270 * config/i386/i386gnu.mn: New file, with excerpts from
6271 "config/i386/i386gnu.mh".
6272 * configure: Regenerate.
6273 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6274 *.mh files under "gdb/config".
6275 * configure.nat: New file, with contents from the
6276 "gdb/config/*/*.mh" files.
6277
6278 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6279
6280 * btrace.c (btrace_clear): Free insn vector.
6281
6282 2017-05-05 Pedro Alves <palves@redhat.com>
6283
6284 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6285 * configure: Regenerate.
6286
6287 2017-05-04 Pedro Alves <palves@redhat.com>
6288
6289 * Makefile.in (SFILES): Add progspace-and-thread.c.
6290 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6291 (COMMON_OBS): Add progspace-and-thread.o.
6292 * breakpoint.c: Include "progspace-and-thread.h".
6293 (update_inserted_breakpoint_locations)
6294 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6295 Use scoped_restore_current_pspace_and_thread.
6296 (create_std_terminate_master_breakpoint): Use
6297 scoped_restore_current_program_space.
6298 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6299 (print_breakpoint_location): Use
6300 scoped_restore_current_program_space.
6301 (bp_loc_is_permanent): Use
6302 scoped_restore_current_pspace_and_thread.
6303 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6304 (download_tracepoint_locations): Use
6305 scoped_restore_current_pspace_and_thread.
6306 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6307 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6308 (enum step_over_calls_kind): Moved from inferior.h.
6309 (class scoped_restore_current_thread): New class.
6310 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6311 declaration.
6312 (scoped_restore_current_thread): New class.
6313 * infcmd.c: Include "common/gdb_optional.h".
6314 (continue_1, proceed_after_attach): Use
6315 scoped_restore_current_thread.
6316 (notice_new_inferior): Use scoped_restore_current_thread.
6317 * inferior.c: Include "progspace-and-thread.h".
6318 (restore_inferior, save_current_inferior): Delete.
6319 (add_inferior_command, clone_inferior_command): Use
6320 scoped_restore_current_pspace_and_thread.
6321 * inferior.h (scoped_restore_current_inferior): New class.
6322 * infrun.c: Include "progspace-and-thread.h" and
6323 "common/gdb_optional.h".
6324 (follow_fork_inferior): Use
6325 scoped_restore_current_pspace_and_thread.
6326 (scoped_restore_exited_inferior): New class.
6327 (handle_vfork_child_exec_or_exit): Use
6328 scoped_restore_exited_inferior,
6329 scoped_restore_current_pspace_and_thread,
6330 scoped_restore_current_thread and scoped_restore.
6331 (fetch_inferior_event): Use scoped_restore_current_thread.
6332 * linespec.c (decode_line_full, decode_line_1): Use
6333 scoped_restore_current_program_space.
6334 * mi/mi-main.c: Include "progspace-and-thread.h".
6335 (exec_continue): Use scoped_restore_current_thread.
6336 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6337 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6338 * proc-service.c (ps_pglobal_lookup): Use
6339 scoped_restore_current_program_space.
6340 * progspace-and-thread.c: New file.
6341 * progspace-and-thread.h: New file.
6342 * progspace.c (release_program_space, clone_program_space): Use
6343 scoped_restore_current_program_space.
6344 (restore_program_space, save_current_program_space)
6345 (save_current_space_and_thread): Delete.
6346 (switch_to_program_space_and_thread): Moved to
6347 progspace-and-thread.c.
6348 * progspace.h (save_current_program_space)
6349 (save_current_space_and_thread): Delete declarations.
6350 (scoped_restore_current_program_space): New class.
6351 * remote.c (remote_btrace_maybe_reopen): Use
6352 scoped_restore_current_thread.
6353 * symtab.c: Include "progspace-and-thread.h".
6354 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6355 * thread.c (print_thread_info_1): Use
6356 scoped_restore_current_thread.
6357 (struct current_thread_cleanup): Delete.
6358 (do_restore_current_thread_cleanup)
6359 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6360 (scoped_restore_current_thread::~scoped_restore_current_thread):
6361 ... this new dtor.
6362 (make_cleanup_restore_current_thread): Rename/convert to ...
6363 (scoped_restore_current_thread::scoped_restore_current_thread):
6364 ... this new ctor.
6365 (thread_apply_all_command): Use scoped_restore_current_thread.
6366 (thread_apply_command): Use scoped_restore_current_thread.
6367 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6368 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6369
6370 2017-05-04 Pedro Alves <palves@redhat.com>
6371
6372 * thread.c (make_cleanup_restore_current_thread): Move
6373 find_thread_ptid call before the is_stopped call. Assert that the
6374 thread is found. Replace is_stopped call by checking the thread's
6375 state directly. Remove unnecessary NULL-thread check.
6376
6377 2017-05-04 Pedro Alves <palves@redhat.com>
6378
6379 * corelow.c (thread_section_name): New class.
6380 (get_core_register_section, get_core_siginfo): Use it.
6381
6382 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6383
6384 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6385 (get_core_register_section): Remove xfree of NULL pointer.
6386
6387 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6388
6389 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6390 * regcache.c (regcache::raw_supply_zeroed): New function.
6391 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6392
6393 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6394
6395 * gdbarch.sh: Remove commented out definition of
6396 TARGET_CHAR_BIT.
6397 * gdbarch.h: Re-generate.
6398
6399 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6400
6401 * configure: Regenerate.
6402
6403 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * solib-target.c (solib_target_relocate_section_addresses):
6406 Remove num_section_bases, num_bases, segment_bases variables.
6407
6408 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6409
6410 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6411
6412 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6413
6414 * solib-target.c: Include <vector>
6415 (struct lm_info_target) <~lm_info_target>: Remove.
6416 <segment_bases, section_bases>: Change type to
6417 std::vector<CORE_ADDR>.
6418 (library_list_start_segment, library_list_start_section,
6419 library_list_end_library,
6420 solib_target_relocate_section_addresses): Adjust.
6421
6422 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6423
6424 * gdbarch.sh (software_single_step): Change return type to
6425 std::vector<CORE_ADDR>.
6426 * gdbarch.c, gdbarch.h: Re-generate.
6427 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6428 Adjust.
6429 (arm_deal_with_atomic_sequence_raw): Adjust.
6430 (thumb_get_next_pcs_raw): Adjust.
6431 (arm_get_next_pcs_raw): Adjust.
6432 (arm_get_next_pcs): Adjust.
6433 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6434 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6435 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6436 (alpha_software_single_step): Adjust.
6437 * alpha-tdep.h (alpha_software_single_step): Adjust.
6438 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6439 * arm-tdep.c (arm_software_single_step): Adjust.
6440 (arm_breakpoint_kind_from_current_state): Adjust.
6441 * arm-tdep.h (arm_software_single_step): Adjust.
6442 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6443 * cris-tdep.c (cris_software_single_step): Adjust.
6444 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6445 (micromips_deal_with_atomic_sequence): Adjust.
6446 (deal_with_atomic_sequence): Adjust.
6447 (mips_software_single_step): Adjust.
6448 * mips-tdep.h (mips_software_single_step): Adjust.
6449 * moxie-tdep.c (moxie_software_single_step): Adjust.
6450 * nios2-tdep.c (nios2_software_single_step): Adjust.
6451 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6452 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6453 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6454 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6455 * sparc-tdep.c (sparc_software_single_step): Adjust.
6456 * spu-tdep.c (spu_software_single_step): Adjust.
6457 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6458
6459 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6460
6461 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6462 * gdbarch.h: Re-generate.
6463
6464 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6465
6466 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6467 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6468 * python/py-instruction.c, python/py-instruction.h: New file.
6469 * python/py-record.c: Add py-instruction.h include.
6470 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6471 gdb.RecordInstruction.
6472 * python/python-internal.h: Add gdbpy_initialize_instruction
6473 declaration.
6474 * python/python.c (do_start_initialization): Add
6475 gdbpy_initialize_instruction.
6476
6477 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6478
6479 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6480 Remove.
6481 (btrace_func_from_recpy_func): New function.
6482 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6483 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6484 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6485 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6486 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6487 Also, use new helper functions.
6488 (btpy_list_item): Use new helper functions.
6489 (recpy_bt_function_call_history): Use new type name.
6490 (btpy_call_getset): Remove.
6491 (gdbpy_initialize_btrace): Remove code to initialize
6492 gdb.BtraceFunctionCall.
6493 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6494 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6495 recpy_bt_func_prev, recpy_bt_func_next): New export.
6496 * python/py-record.c (recpy_func_type): New static object.
6497 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6498 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6499 recpy_func_next): New function.
6500 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6501 (recpy_func_getset): New static object.
6502 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6503 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6504
6505 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6506
6507 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6508 (btpy_object, btpy_insn_type, btpy_new): Remove.
6509 (btpy_list_object): Use gdb.RecordInstruction type instead of
6510 gdb.BtraceInstruction type.
6511 (btrace_insn_from_recpy_insn): New function.
6512 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6513 btpy_new.
6514 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6515 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6516 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6517 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6518 instead of btpy_object.
6519 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6520 btpy_insn_data, btpy_insn_decode): Rename to ...
6521 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6522 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6523 recpy_bt_insn_decode): This. Also, use new helper functions.
6524 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6525 recpy_insn_type.
6526 (btpy_insn_getset): Remove.
6527 (gdbpy_initialize_btrace): Remove code to initialize
6528 gdb.BtraceInstruction. Use recpy_element_object.
6529 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6530 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6531 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6532 * python/py-record.c (recpy_insn_type): New static object.
6533 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6534 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6535 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6536 New function.
6537 (recpy_insn_getset): New static object.
6538 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6539 * python/py-record.h (recpy_element_object): New typedef.
6540 (recpy_insn_type, recpy_insn_new): New export.
6541
6542 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6543
6544 * py-record-btrace.c (btpy_insn_new): Removed.
6545 (btpy_insn_or_gap_new): New function.
6546 (btpy_insn_error): Removed.
6547 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6548 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6549 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6550 btpy_insn_or_gap_new instead of btpy_insn_new.
6551 (btpy_insn_getset): Remove btpy_insn_error.
6552 * py-record.c (recpy_gap_type): New static object.
6553 (recpy_gap_object): New typedef.
6554 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6555 recpy_gap_reason_string): New function.
6556 (recpy_gap_getset): New static object.
6557 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6558 * py-record.h (recpy_gap_new): New export.
6559
6560 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6561
6562 * python/py-record.c (recpy_ptid): Remove.
6563 (recpy_record_getset): Remove recpy_ptid.
6564
6565 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6566
6567 * btrace.c (btrace_fetch): Set inferior_ptid.
6568 * python/py-record-btrace.c: Add "py-record.h" include.
6569 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6570 recpy_bt_end, recpy_bt_instruction_history,
6571 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6572 in gdb.Record object instead of current ptid.
6573 * python/py-record.c: Include new "py-record.h" file.
6574 (recpy_record_object): Moved to py-record.h.
6575 * python/py-record.h: New file.
6576
6577 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6578
6579 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6580 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6581 indentation.
6582
6583 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6584
6585 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6586 the past maintainers section.
6587
6588 2017-04-28 Yao Qi <yao.qi@linaro.org>
6589
6590 * infcmd.c (get_return_value): Use regcache ctor, and remove
6591 cleanup.
6592
6593 2017-04-28 Yao Qi <yao.qi@linaro.org>
6594 Pedro Alves <palves@redhat.com>
6595
6596 * regcache.c (regcache::regcache): New tag dispatch ctor.
6597 (do_cooked_read): Moved above.
6598 (regcache_dup): Use the tag dispatch ctor..
6599 * regcache.h (regcache): Declare ctor, delete copy ctor and
6600 assignment operator, remove friend regcache_dup.
6601
6602 2017-04-28 Yao Qi <yao.qi@linaro.org>
6603
6604 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6605 call method save instead of regcache_cpy.
6606 * regcache.h (struct regcache): Make regcache_dup a friend.
6607
6608 2017-04-28 Yao Qi <yao.qi@linaro.org>
6609
6610 * regcache.c (struct regcache): Move to regcache.h
6611 (regcache::arch): New method.
6612 (regcache_get_ptid): Update.
6613 (get_regcache_arch): Call arch method.
6614 (get_regcache_aspace): Call method aspace.
6615 (register_buffer): Change it to method.
6616 (regcache_save): Change it to regcache::save.
6617 (regcache_restore): Likewise.
6618 (regcache_cpy_no_passthrough): Remove the declaration.
6619 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6620 (regcache_cpy_no_passthrough): Change it to method
6621 cpy_no_passthrough.
6622 (regcache_register_status): Change it to method
6623 get_register_status.
6624 (regcache_invalidate): Change it to method invalidate.
6625 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6626 (regcache_raw_update): Change it to method raw_update.
6627 (regcache_raw_read): Likewise.
6628 (regcache_raw_read_signed): Likewise.
6629 (regcache_raw_read_unsigned): Likewise.
6630 (regcache_raw_write_signed): Likewise.
6631 (regcache_raw_write_unsigned): Likewise.
6632 (regcache_cooked_read): Likewise.
6633 (regcache_cooked_read_value): Likewise.
6634 (regcache_cooked_read_signed): Likewise.
6635 (regcache_cooked_read_unsigned): Likewise.
6636 (regcache_cooked_write_signed): Likewise.
6637 (regcache_cooked_write_unsigned): Likewise.
6638 (regcache_raw_set_cached_value): Likewise.
6639 (regcache_raw_write): Likewise.
6640 (regcache_cooked_write): Likewise.
6641 (regcache_xfer_part): Likewise.
6642 (regcache_raw_read_part): Likewise.
6643 (regcache_raw_write_part): Likewise.
6644 (regcache_cooked_read_part): Likewise.
6645 (regcache_cooked_write_part): Likewise.
6646 (regcache_raw_supply): Likewise.
6647 (regcache_raw_collect): Likewise.
6648 (regcache_transfer_regset): Likewise.
6649 (regcache_supply_regset): Likewise.
6650 (regcache_collect_regset): Likewise.
6651 (regcache_debug_print_register): Likewise.
6652 (enum regcache_dump_what): Move it to regcache.h.
6653 (regcache_dump): Change it to method dump.
6654 * regcache.h (enum regcache_dump_what): New.
6655 (class regcache): New.
6656 * target.c (target_fetch_registers): Call method
6657 debug_print_register.
6658 (target_store_registers): Likewise.
6659
6660 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6661
6662 * windows-nat.c (struct lm_info_windows): Initialize field.
6663 (windows_make_so): Allocate lm_info_windows with new.
6664 (windows_free_so): Free lm_info_windows with delete.
6665
6666 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6667
6668 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6669 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6670 cleanup.
6671 (darwin_free_so): Free lm_info_darwin with delete.
6672
6673 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6674
6675 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6676 <l_addr_p>: Change type to bool.
6677 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6678 (svr4_free_so): Free lm_info_svr4 with delete.
6679 (svr4_copy_library_list): Replace memcpy with call to copy
6680 constructor.
6681 (library_list_start_library, svr4_default_sos): Allocate
6682 lm_info_svr4 with new.
6683
6684 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6685
6686 * solib-target.c (struct lm_info_target): Add destructor,
6687 initialize fields.
6688 <name>: Change type to std::string.
6689 (library_list_start_library): Allocate lm_info_target with new.
6690 (solib_target_free_library_list): Free lm_info_target with
6691 delete.
6692 (solib_target_current_sos): Adapt to std::string.
6693 (solib_target_free_so): Free lm_info_target with delete.
6694
6695 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6696
6697 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6698 fields.
6699 (frv_current_sos): Allocate lm_info_frv with new.
6700 (frv_relocate_main_executable): Free lm_info_frv with delete,
6701 allocate with new.
6702 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6703
6704 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6705
6706 * solib-frv.c (struct lm_info_frv): Fix indentation.
6707
6708 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6709
6710 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6711 map field.
6712 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6713 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6714 and allocate with new.
6715 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6716
6717 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6718
6719 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6720 <filename, member_name>: Change type to std::string.
6721 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6722 (library_list_start_library): Allocate lm_info_aix with new.
6723 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6724 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6725 with copy constructor.
6726
6727 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6728
6729 * solist.h (struct lm_info): Remove.
6730 (struct lm_info_base): New class.
6731 (struct so_list) <lm_info>: Change type to lm_info_base *.
6732 * nto-tdep.c (struct lm_info): Remove.
6733 (lm_addr): Adjust.
6734 * solib-aix.c (struct lm_info): Rename to ...
6735 (struct lm_info_aix): ... this. Extend lm_info_base.
6736 (lm_info_p): Rename to ...
6737 (lm_info_aix_p): ... this, and adjust.
6738 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6739 solib_aix_parse_libraries, library_list_start_library,
6740 solib_aix_free_library_list, solib_aix_parse_libraries,
6741 solib_aix_get_library_list,
6742 solib_aix_relocate_section_addresses, solib_aix_free_so,
6743 solib_aix_get_section_offsets,
6744 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6745 Adjust.
6746 (struct solib_aix_inferior_data) <library_list>: Adjust.
6747 * solib-darwin.c (struct lm_info): Rename to ...
6748 (struct lm_info_darwin): ... this. Extend lm_info_base.
6749 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6750 * solib-dsbt.c (struct lm_info): Rename to ...
6751 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6752 (struct dsbt_info) <main_executable_lm_info): Adjust.
6753 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6754 dsbt_relocate_section_addresses): Adjust.
6755 * solib-frv.c (struct lm_info): Rename to ...
6756 (struct lm_info_frv): ... this. Extend lm_info_base.
6757 (main_executable_lm_info): Adjust.
6758 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6759 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6760 find_canonical_descriptor_in_load_object,
6761 frv_fdpic_find_canonical_descriptor): Adjust.
6762 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6763 to lm_info_svr4.
6764 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6765 svr4_clear_so, svr4_copy_library_list,
6766 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6767 svr4_current_sos, svr4_fetch_objfile_link_map,
6768 solist_update_incremental): Adjust.
6769 * solib-svr4.h (struct lm_info_svr4): Move here from
6770 solib-svr4.c.
6771 * solib-target.c (struct lm_info): Rename to ...
6772 (struct lm_info_target): ... this. Extend lm_info_base.
6773 (lm_info_p): Rename to ...
6774 (lm_info_target_p): ... this.
6775 (solib_target_parse_libraries, library_list_start_segment,
6776 library_list_start_section, library_list_start_library,
6777 library_list_end_library, solib_target_free_library_list,
6778 solib_target_current_sos, solib_target_free_so,
6779 solib_target_relocate_section_addresses): Adjust.
6780 * windows-nat.c (struct lm_info): Rename to ...
6781 (struct lm_info_windows): ... this. Extend lm_info_base.
6782 (windows_make_so, handle_load_dll, handle_unload_dll,
6783 windows_xfer_shared_libraries): Adjust.
6784
6785 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6786
6787 * solib-darwin.c (struct darwin_so_list): Remove.
6788 (darwin_current_sos): Allocate an so_list object instead of a
6789 darwin_so_list, separately allocate an lm_info object.
6790 (darwin_free_so): Free lm_info.
6791
6792 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6793
6794 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6795 with fprintf_filtered.
6796
6797 2017-04-28 Yao Qi <yao.qi@linaro.org>
6798
6799 * regcache.c (regcache::regcache): New function.
6800 (regcache::~regcache): New function.
6801 (regcache_xmalloc_1): Remove.
6802 (regcache_xmalloc): Call new regcache.
6803 (regcache_xfree): Call delete regcache.
6804 (get_thread_arch_aspace_regcache): Call new regcache.
6805
6806 2017-04-28 Yao Qi <yao.qi@linaro.org>
6807
6808 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6809 lwp instead of ptid_get_lwp.
6810
6811 2017-04-28 Yao Qi <yao.qi@linaro.org>
6812
6813 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6814 lwp_info instead of getting from inferior_ptid.
6815
6816 2017-04-27 Keith Seitz <keiths@redhat.com>
6817
6818 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6819 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6820 (CV_CONVERSION_BADNESS): Define.
6821 (rank_one_type): Remove overly restrictive rvalue reference
6822 rank checks.
6823 Add cv-qualifier checks and subranks for type equality.
6824 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6825 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6826 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6827
6828 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6829
6830 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6831 count when creating the object.
6832
6833 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6834 Ulrich Weigand <uweigand@de.ibm.com>
6835
6836 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6837 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6838 is used in AIX.
6839 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6840 (process_xcoff_symbol): Likewise.
6841 (scan_xcoff_symtab): Likewise.
6842
6843 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6844
6845 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6846 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6847 (ia64_access_reg): Use get_frame_register_unsigned.
6848 (ia64_access_rse_reg): Likewise.
6849 (ia64_libunwind_frame_prev_register): Likewise.
6850
6851 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6852
6853 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6854 * gdbarch.c: Regenerated.
6855 * gdbarch.h: Regenerated.
6856 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6857 visibility external.
6858 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6859 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6860 (enum cfa_how_kind): Move to ...
6861 (struct dwarf2_frame_state_reg_info): Likewise.
6862 (struct dwarf2_frame_state): Likewise.
6863 * dwarf2-frame.h: ... here.
6864 (dwarf2_frame_state_alloc_regs): New declaration.
6865 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6866 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6867
6868 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6869
6870 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6871 regcache_raw_read_unsigned.
6872 (xtensa_pseudo_register_write): Likewise.
6873
6874 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6875
6876 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6877 (nds32_pseudo_register_write): Likewise.
6878
6879 2017-04-25 Yao Qi <yao.qi@linaro.org>
6880
6881 * regcache.c (struct regcache) <readonly_p>: Change its type
6882 to bool.
6883 (regcache_xmalloc_1): Update parameter type and callers update.
6884
6885 2017-04-25 Yao Qi <yao.qi@linaro.org>
6886
6887 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6888 set_gdbarch_wchar_bit.
6889 * arm-tdep.c (arm_gdbarch_init): Likewise.
6890
6891 2017-04-25 Pedro Alves <palves@redhat.com>
6892
6893 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6894 (BothAreRelocatable, memcopy, memmove): Don't define.
6895 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6896 macros.
6897
6898 2017-04-25 Pedro Alves <palves@redhat.com>
6899
6900 * common/common-defs.h: Include "common/poison.h".
6901 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6902 and adjust.
6903 * common/poison.h: New file.
6904 * common/traits.h: Include <type_traits>.
6905 (Not, Or, Requires): New, moved from common/function-view.h.
6906
6907 2017-04-25 Pedro Alves <palves@redhat.com>
6908
6909 * breakpoint.h (struct breakpoint): In-class initialize all
6910 fields. Make boolean fields "bool".
6911 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6912 memset call and initializations no longer necessary.
6913
6914 2017-04-25 Pedro Alves <palves@redhat.com>
6915
6916 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6917 reference.
6918 (pt_btrace_insn): New function.
6919 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6920
6921 2017-04-25 Pedro Alves <palves@redhat.com>
6922
6923 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6924 "base" field and inherit from "bp_location" instead. Add
6925 non-default ctor.
6926 (allocate_location_exception): Use new non-default ctor.
6927 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6928 (init_bp_location): Convert to ...
6929 (bp_location::bp_location): ... this new ctor, and remove memset
6930 call.
6931 (base_breakpoint_allocate_location): Use the new non-default ctor.
6932 * breakpoint.h (bp_location): Now a class. Declare default and
6933 non-default ctors. In-class initialize all members.
6934 (init_bp_location): Remove declaration.
6935
6936 2017-04-25 Pedro Alves <palves@redhat.com>
6937
6938 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6939 assignment operator.
6940
6941 2017-04-24 Yao Qi <yao.qi@linaro.org>
6942
6943 * doublest.c (convert_doublest_to_floatformat): Call
6944 floatformat_totalsize_bytes.
6945
6946 2017-04-22 Tom Tromey <tom@tromey.com>
6947
6948 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6949 ui_out_emit_list.
6950 * stack.c (print_frame): Use ui_out_emit_list.
6951 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6952 ui_out_emit_list.
6953 * mi/mi-main.c (print_one_inferior)
6954 (mi_cmd_data_list_register_names)
6955 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6956 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6957 ui_out_emit_list.
6958 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6959 (mi_output_solib_attribs): Use ui_out_emit_list,
6960 ui_out_emit_tuple.
6961 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6962 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6963 (mi_cmd_stack_list_args, list_args_or_locals): Use
6964 ui_out_emit_list.
6965 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6966 * breakpoint.c (print_solib_event, output_thread_groups): Use
6967 ui_out_emit_list.
6968
6969 2017-04-22 Tom Tromey <tom@tromey.com>
6970
6971 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6972 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6973 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6974
6975 2017-04-22 Tom Tromey <tom@tromey.com>
6976
6977 * tracepoint.c (tvariables_info_1)
6978 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6979
6980 2017-04-22 Tom Tromey <tom@tromey.com>
6981
6982 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6983 annotate_arg_emitter.
6984 * breakpoint.c (print_mention_watchpoint)
6985 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6986 * annotate.h (struct annotate_arg_emitter): New.
6987
6988 2017-04-22 Tom Tromey <tom@tromey.com>
6989
6990 * record-btrace.c (record_btrace_insn_history)
6991 (record_btrace_insn_history_range, record_btrace_call_history)
6992 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6993 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6994 ui_out_emit_tuple.
6995 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6996 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6997 * skip.c (skip_info): Use ui_out_emit_tuple.
6998 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6999 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7000 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7001 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7002 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7003 ui_out_emit_tuple.
7004 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7005 (output_register, mi_cmd_data_read_memory)
7006 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7007 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7008 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7009 Use ui_out_emit_tuple.
7010 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7011 ui_out_emit_tuple.
7012 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7013 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7014 * linux-thread-db.c (info_auto_load_libthread_db): Use
7015 ui_out_emit_tuple.
7016 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7017 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7018 * disasm.c (do_mixed_source_and_assembly_deprecated)
7019 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7020 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7021 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7022 * breakpoint.c (print_one_breakpoint_location)
7023 (print_one_breakpoint): Use ui_out_emit_tuple.
7024 * auto-load.c (print_script, info_auto_load_cmd): Use
7025 ui_out_emit_tuple.
7026 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7027
7028 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7029
7030 * thread.c (print_thread_info_1): Remove dead code.
7031
7032 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7033
7034 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7035 GDB_SELF_TEST.
7036 * arm-tdep.c (selftests::arm_record_test): Likewise.
7037
7038 2017-04-21 Yao Qi <yao.qi@linaro.org>
7039
7040 * regcache.c (regcache_restore): Remove argument 2. Replace
7041 argument 3 with regcache. Get register status from
7042 src->register_status and get register contents from
7043 register_buffer (src, regnum).
7044 (regcache_cpy): Update.
7045
7046 2017-04-19 Pedro Alves <palves@redhat.com>
7047
7048 * gdbthread.h (thread): Add missing closing parenthesis in
7049 comment.
7050
7051 2017-04-19 Pedro Alves <palves@redhat.com>
7052
7053 * common/refcounted-object.h: New file.
7054 * gdbthread.h: Include "common/refcounted-object.h".
7055 (thread_info): Inherit from refcounted_object and add comments.
7056 (thread_info::incref, thread_info::decref)
7057 (thread_info::m_refcount): Delete.
7058 (thread_info::deletable): Use the refcounted_object::refcount()
7059 method.
7060 * inferior.c (current_inferior_): Add comment.
7061 (set_current_inferior): Increment/decrement refcounts.
7062 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7063 not-deletable instead of comparing with the current inferior.
7064 (initialize_inferiors): Increment the initial inferior's refcount.
7065 * inferior.h (struct inferior): Forward declare.
7066 Include "common/refcounted-object.h".
7067 (current_inferior, set_current_inferior): Move declaration to
7068 before struct inferior's definition, and fix comment.
7069 (inferior): Inherit from refcounted_object. Add comments.
7070 * thread.c (switch_to_thread_no_regs): Reference the thread's
7071 inferior pointer directly instead of doing a ptid lookup.
7072 (switch_to_no_thread): New function.
7073 (switch_to_thread(thread_info *)): New function, factored out
7074 from ...
7075 (switch_to_thread(ptid_t)): ... this.
7076 (restore_current_thread): Delete.
7077 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7078 fields, and add 'inf' field.
7079 (do_restore_current_thread_cleanup): Check whether old->inf is
7080 alive instead of looking up an inferior by ptid. Use
7081 switch_to_thread and switch_to_no_thread.
7082 (restore_current_thread_cleanup_dtor): Use old->inf directly
7083 instead of lookup up an inferior by id. Decref the inferior.
7084 Don't restore 'removable'.
7085 (make_cleanup_restore_current_thread): Same the inferior pointer
7086 in old, instead of the inferior number. Incref the inferior.
7087 Don't save/clear 'removable'.
7088
7089 2017-04-19 Pedro Alves <palves@redhat.com>
7090
7091 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7092 unittests/scoped_restore-selftests.c.
7093 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7094 * common/scoped_restore.h (scoped_restore_base): Make "class".
7095 (scoped_restore_base::release): New public method.
7096 (scoped_restore_base::scoped_restore_base): New protected ctor.
7097 (scoped_restore_base::m_saved_var): New protected field.
7098 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7099 scoped_restore_base base class instead of m_saved_var directly.
7100 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7101 (scoped_restore_tmpl::scoped_restore_tmpl(const
7102 scoped_restore_tmpl<T>&)): Likewise.
7103 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7104 method.
7105 (scoped_restore_tmpl::saved_var): New method.
7106 (scoped_restore_tmpl::m_saved_var): Delete.
7107 * inferior.h (inferior::detaching): Now a bool.
7108 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7109 cleanup.
7110 * unittests/scoped_restore-selftests.c: New file.
7111
7112 2017-04-19 Pedro Alves <palves@redhat.com>
7113
7114 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7115 Re-sort in alphabetic order.
7116
7117 2017-04-18 Pedro Alves <palves@redhat.com>
7118
7119 * xml-support.c (obstack_xml_printf): Delete.
7120 * xml-support.h (obstack_xml_printf): Delete.
7121
7122 2017-04-18 Pedro Alves <palves@redhat.com>
7123
7124 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7125 vdebug, verror, body_text, start_element, end_element, name,
7126 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7127 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7128 is_xinclude>: Make private and add m_ prefix.
7129 (gdb_xml_parser::body_text): New method, based on ...
7130 (gdb_xml_body_text): ... this. Adjust.
7131 (gdb_xml_parser::vdebug): New method, based on ...
7132 (gdb_xml_debug): ... this. Adjust.
7133 (gdb_xml_parser::verror): New method, based on ...
7134 (gdb_xml_error): ... this. Adjust.
7135 (gdb_xml_parser::start_element): New method, based on ...
7136 (gdb_xml_start_element): ... this. Adjust.
7137 (gdb_xml_start_element_wrapper): Defer to
7138 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7139 (gdb_xml_parser::end_element): New method, based on ...
7140 (gdb_xml_end_element_wrapper): ... this. Adjust.
7141 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7142 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7143 (gdb_xml_parser::use_dtd): New method, based on ...
7144 (gdb_xml_use_dtd): ... this. Adjust.
7145 (gdb_xml_parser::parse): New method, based on ...
7146 (gdb_xml_parse): ... this. Adjust.
7147 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7148 (xinclude_start_include): Adjust to call the parser's name method.
7149 (xml_xinclude_default, xml_xinclude_start_doctype)
7150 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7151 method.
7152 (xml_process_xincludes): Adjust to call parser methods.
7153 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7154 declarations.
7155
7156 2017-04-18 Pedro Alves <palves@redhat.com>
7157
7158 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7159 gdb::optional<std::string>.
7160 * xml-support.c: Include <string>.
7161 (scope_level::scope_level(scope_level &&))
7162 (scope_level::~scope_level): Delete.
7163 (scope_level::body): Now a std::string.
7164 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7165 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7166 parameter.
7167 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7168 (xinclude_parsing_data::output): Now a std::string reference.
7169 (xinclude_start_include): Adjust.
7170 (xml_xinclude_default): Adjust.
7171 (xml_process_xincludes): Add 'output' parameter, and return bool.
7172 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7173 and return bool.
7174 * xml-tdesc.c: Include <unordered_map> and <string>.
7175 (tdesc_xml_cache): Delete.
7176 (tdesc_xml_cache_s): Delete.
7177 (xml_cache): Now an std::unordered_map.
7178 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7179 (target_fetch_description_xml): Change return type to
7180 gdb::optional<std::string>, and adjust.
7181 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7182 (target_fetch_description_xml): Change return type to
7183 gdb::optional<std::string>.
7184
7185 2017-04-18 Pedro Alves <palves@redhat.com>
7186
7187 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7188 unittests/optional-selftests.c.
7189 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7190 * unittests/optional-selftests.c: New file.
7191 * unittests/optional/assignment/1.cc: New file.
7192 * unittests/optional/assignment/2.cc: New file.
7193 * unittests/optional/assignment/3.cc: New file.
7194 * unittests/optional/assignment/4.cc: New file.
7195 * unittests/optional/assignment/5.cc: New file.
7196 * unittests/optional/assignment/6.cc: New file.
7197 * unittests/optional/assignment/7.cc: New file.
7198 * unittests/optional/cons/copy.cc: New file.
7199 * unittests/optional/cons/default.cc: New file.
7200 * unittests/optional/cons/move.cc: New file.
7201 * unittests/optional/cons/value.cc: New file.
7202 * unittests/optional/in_place.cc: New file.
7203 * unittests/optional/observers/1.cc: New file.
7204 * unittests/optional/observers/2.cc: New file.
7205
7206 2017-04-18 Pedro Alves <palves@redhat.com>
7207
7208 * common/gdb_optional.h: Include common/traits.h.
7209 (in_place_t): New type.
7210 (in_place): New constexpr variable.
7211 (optional::optional): Remove member initialization of
7212 m_instantiated.
7213 (optional::optional(in_place_t...)): New constructor.
7214 (optional::~optional): Use reset.
7215 (optional::optional(const optional&)): New.
7216 (optional::optional(const optional&&)): New.
7217 (optional::optional(T &)): New.
7218 (optional::optional(T &&)): New.
7219 (operator::operator=(const optional &)): New.
7220 (operator::operator=(optional &&)): New.
7221 (operator::operator= (const T &))
7222 (operator::operator= (T &&))
7223 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7224 (operator::reset): New.
7225 (operator::m_instantiated):: Add in-class initializer.
7226 * common/traits.h: Include <type_traits>.
7227 (struct And): New types.
7228
7229 2017-04-18 Pedro Alves <palves@redhat.com>
7230
7231 * xml-support.c: Include <vector>.
7232 (scope_level::scope_level(const gdb_xml_element *))
7233 (scope_level::scope_level(scope_level&&)): New.
7234 (scope_level::~scope_level): New.
7235 (scope_level_s): Delete.
7236 (gdb_xml_parser::scopes): Now a std::vector.
7237 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7238 Use std::vector.
7239 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7240 scope cleanup code.
7241 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7242 of the scopes member. Use std::vector::emplace_back.
7243
7244 2017-04-18 Pedro Alves <palves@redhat.com>
7245
7246 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7247 a bool.
7248 (gdb_xml_end_element): Change type of first parameter.
7249 (gdb_xml_cleanup): Rename to ...
7250 (gdb_xml_parser::~gdb_xml_parser): ... this.
7251 (gdb_xml_create_parser_and_cleanup): Delete with ...
7252 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7253 to this new ctor.
7254 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7255 using gdb_xml_create_parser_and_cleanup.
7256 (xinclude_parsing_data): Add ctor/dtor.
7257 (xml_xinclude_cleanup): Delete.
7258 (xml_process_xincludes): Create a local xinclude_parsing_data
7259 instead of heap-allocating one. Create a local gdb_xml_parser
7260 instead of heap-allocating one with
7261 gdb_xml_create_parser_and_cleanup.
7262
7263 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7264
7265 PR threads/20743
7266 * fbsd-nat.c (resume_one_thread_cb): Remove.
7267 (resume_all_threads_cb): Remove.
7268 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7269 iterate_over_threads.
7270
7271 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7272
7273 * NEWS: Create a new section for the next release branch.
7274 Rename the section of the current branch, now that it has
7275 been cut.
7276
7277 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7278
7279 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7280 * version.in: Bump version to 8.0.50.DATE-git.
7281
7282 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7283
7284 PR gdb/21385
7285 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7286 independently of the host, and fix build breakage on Cygwin.
7287
7288 2017-04-13 Pedro Alves <palves@redhat.com>
7289
7290 * inferior.c (free_inferior): Convert to ...
7291 (inferior::~inferior): ... this dtor.
7292 (inferior::inferior): New ctor, factored out from ...
7293 (add_inferior_silent): ... here. Allocate the inferior with a new
7294 expression.
7295 (delete_inferior): Call delete instead of free_inferior.
7296 * inferior.h (gdb_environ, continuation): Forward declare.
7297 (inferior): Now a class. Add in-class initialization to all
7298 members. Make boolean fields bool, except 'detaching'.
7299 (inferior::inferior): New explicit ctor.
7300 (inferior::~inferior): New.
7301
7302 2017-04-13 Pedro Alves <palves@redhat.com>
7303
7304 * inferior.c (init_inferior_list): Delete.
7305 * inferior.h (init_inferior_list): Delete.
7306
7307 2017-04-13 Pedro Alves <palves@redhat.com>
7308
7309 PR threads/13217
7310 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7311 (top level): Call it twice, with different thread sets.
7312
7313 2017-04-13 Pedro Alves <palves@redhat.com>
7314
7315 * thread.c: Include <algorithm>.
7316 (thread_array_cleanup): Delete.
7317 (scoped_inc_dec_ref): New class.
7318 (live_threads_count): New function.
7319 (set_thread_refcount): Delete.
7320 (tp_array_compar_ascending): Now a bool.
7321 (tp_array_compar): Convert to a std::sort comparison function.
7322 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7323 and live_threads_count.
7324
7325 2017-04-13 Pedro Alves <palves@redhat.com>
7326
7327 * infrun.c (follow_fork_inferior): Also switch the current
7328 inferior.
7329
7330 2017-04-13 Pedro Alves <palves@redhat.com>
7331
7332 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7333 before calling create_internal_breakpoint.
7334
7335 2017-04-13 Pedro Alves <palves@redhat.com>
7336
7337 * fork-child.c (execv_argv): New class.
7338 (breakup_args): Refactored as ...
7339 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7340 Copy arguments to storage and replace separators with NULL
7341 terminators in place.
7342 (escape_bang_in_quoted_argument): Adjust to return bool.
7343 (execv_argv::execv_argv): New ctor.
7344 (execv_argv::init_for_shell): New method, factored out from
7345 fork_inferior. Don't strdup strings into the vector.
7346 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7347 Remove free_vector_argv call.
7348
7349 2017-04-13 Yao Qi <yao.qi@linaro.org>
7350
7351 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7352 tdep->rx_psw_type.
7353
7354 2017-04-13 Yao Qi <yao.qi@linaro.org>
7355
7356 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7357 * rx-tdep.c (rx_gdbarch_init): Likewise.
7358
7359 2017-04-13 Pedro Alves <palves@redhat.com>
7360
7361 * breakpoint.h (struct breakpoint): Reindent.
7362
7363 2017-04-13 Pedro Alves <palves@redhat.com>
7364
7365 * breakpoint.c (bp_location): Rename to ...
7366 (bp_locations): ... this. All references updated.
7367 (bp_location_count): Rename to ...
7368 (bp_locations_count): ... this. All references updated.
7369 (bp_location_placed_address_before_address_max): Rename to ...
7370 (bp_locations_placed_address_before_address_max): ... this. All
7371 references updated.
7372 (bp_location_shadow_len_after_address_max): Rename to ...
7373 (bp_locations_shadow_len_after_address_max): ... this. All
7374 references updated.
7375 (bp_location_compare_addrs): Rename to ...
7376 (bp_locations_compare_addrs): ... this. All references updated.
7377 (bp_location_compare):Rename to ...
7378 (bp_locations_compare): ... this. All references updated.
7379 (bp_location_target_extensions_update): Rename to ...
7380 (bp_locations_target_extensions_update): ... this. All references
7381 updated.
7382
7383 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7384
7385 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7386 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7387 'sgtty.h'.
7388 * common/gdb_termios.h: New file, with parts of "terminal.h".
7389 * inflow.c: Include "gdb_termios.h".
7390 * ser-unix.c: Include "gdb_termios.h".
7391 * terminal.h: Move terminal-related defines to
7392 "common/gdb_termios.h".
7393
7394 2017-04-12 Tom Tromey <tom@tromey.com>
7395
7396 * probe.c (parse_probes): Update.
7397 * location.h (delete_event_location): Don't declare.
7398 (event_location_deleter::operator()): Update.
7399 * location.c (event_location_deleter::operator()): Rename from
7400 delete_event_location.
7401 * linespec.h (linespec_result) <location>: Change type to
7402 event_location_up.
7403 * linespec.c (canonicalize_linespec, event_location_to_sals)
7404 (decode_objc): Update.
7405 (linespec_result): Don't call delete_event_location.
7406 * breakpoint.c (create_breakpoints_sal)
7407 (bkpt_probe_create_sals_from_location)
7408 (strace_marker_create_sals_from_location): Update.
7409
7410 2017-04-12 Tom Tromey <tom@tromey.com>
7411
7412 * linespec.h (struct linespec_result): Add constructor and
7413 destructor.
7414 (init_linespec_result, destroy_linespec_result)
7415 (make_cleanup_destroy_linespec_result): Don't declare.
7416 * linespec.c (init_linespec_result): Remove.
7417 (linespec_result::~linespec_result): Rename from
7418 destroy_linespec_result. Update.
7419 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7420 Remove.
7421 * breakpoint.c (create_breakpoint, break_range_command)
7422 (decode_location_default): Update.
7423 * ax-gdb.c (agent_command_1): Update.
7424
7425 2017-04-12 Tom Tromey <tom@tromey.com>
7426
7427 * remote.c (remote_download_tracepoint): Update.
7428 * python/py-breakpoint.c (bppy_get_location): Update.
7429 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7430 (gdbscm_breakpoint_location): Update.
7431 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7432 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7433 Change type to event_location_up.
7434 * breakpoint.c (create_overlay_event_breakpoint)
7435 (create_longjmp_master_breakpoint)
7436 (create_std_terminate_master_breakpoint)
7437 (create_exception_master_breakpoint)
7438 (breakpoint_event_location_empty_p, print_breakpoint_location)
7439 (print_one_breakpoint_location, create_thread_event_breakpoint)
7440 (init_breakpoint_sal, create_breakpoint)
7441 (print_recreate_ranged_breakpoint, break_range_command)
7442 (init_ada_exception_breakpoint, say_where): Update.
7443 (base_breakpoint_dtor): Don't call delete_event_location.
7444 (bkpt_print_recreate, tracepoint_print_recreate)
7445 (dprintf_print_recreate, update_static_tracepoint)
7446 (breakpoint_re_set_default): Update.
7447
7448 2017-04-12 Tom Tromey <tom@tromey.com>
7449
7450 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7451 type of "to_do". Update.
7452 (compute_stack_depth): Use std::vector.
7453
7454 2017-04-12 Tom Tromey <tom@tromey.com>
7455
7456 * printcmd.c (find_instruction_backward): Use std::vector.
7457
7458 2017-04-12 Tom Tromey <tom@tromey.com>
7459
7460 * symfile.c (objfilep): Remove typedef.
7461 (reread_symbols): Use a std::vector.
7462
7463 2017-04-12 Tom Tromey <tom@tromey.com>
7464
7465 * mi/mi-main.c (exec_direction_forward): Remove.
7466 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7467 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7468 scoped_restore.
7469 * guile/guile.c (guile_repl_command, guile_command)
7470 (gdbscm_execute_gdb_command): Use scoped_restore.
7471 * go-exp.y (go_parse): Use scoped_restore.
7472 * d-exp.y (d_parse): Use scoped_restore.
7473 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7474 * c-exp.y (c_parse): Use scoped_restore.
7475
7476 2017-04-12 Tom Tromey <tom@tromey.com>
7477
7478 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7479 (mi_parse): Update return type.
7480 (mi_parse_free): Remove.
7481 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7482 (mi_parse::~mi_parse): Rename from mi_parse_free.
7483 (mi_parse_cleanup): Remove.
7484 (mi_parse): Return a unique_ptr. Use new.
7485 * mi/mi-main.c (mi_execute_command): Update.
7486
7487 2017-04-12 Tom Tromey <tom@tromey.com>
7488
7489 * location.c (explicit_location_lex_one): Return a
7490 unique_xmalloc_ptr.
7491 (string_to_explicit_location): Update. Remove cleanups.
7492
7493 2017-04-12 Tom Tromey <tom@tromey.com>
7494
7495 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7496 (compare_value_and_voffset): Change type. Update.
7497 (compute_vtable_size): Change type of "offset_vec".
7498 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7499 (gnuv3_get_typeid): Remove extraneous declaration.
7500
7501 2017-04-12 Tom Tromey <tom@tromey.com>
7502
7503 * charset.h (wchar_iterator): Fix comment.
7504
7505 2017-04-12 Tom Tromey <tom@tromey.com>
7506
7507 * charset.c (iconv_wrapper): New class.
7508 (cleanup_iconv): Remove.
7509 (convert_between_encodings): Use it.
7510
7511 2017-04-12 Tom Tromey <tom@tromey.com>
7512
7513 * symfile.h (increment_reading_symtab): Update type.
7514 * symfile.c (decrement_reading_symtab): Remove.
7515 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7516 * psymtab.c (psymtab_to_symtab): Update.
7517 * dwarf2read.c (dw2_instantiate_symtab): Update.
7518
7519 2017-04-12 Tom Tromey <tom@tromey.com>
7520
7521 * jit.c (struct jit_reader): Declare separately. Add constructor
7522 and destructor. Change type of "handle".
7523 (loaded_jit_reader): Define separately.
7524 (jit_reader_load): Update. New "new".
7525 (jit_reader_unload_command): Use "delete".
7526 * gdb-dlfcn.h (struct dlclose_deleter): New.
7527 (gdb_dlhandle_up): New typedef.
7528 (gdb_dlopen, gdb_dlsym): Update types.
7529 (gdb_dlclose): Remove.
7530 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7531 (gdb_dlsym): Change type of "handle".
7532 (make_cleanup_dlclose): Remove.
7533 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7534 * compile/compile-c-support.c (load_libcc): Update.
7535
7536 2017-04-12 Tom Tromey <tom@tromey.com>
7537
7538 * symtab.h (find_pcs_for_symtab_line): Change return type.
7539 * symtab.c (find_pcs_for_symtab_line): Change return type.
7540 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7541 type of "vec". Update.
7542 (ltpy_get_pcs_for_line): Update.
7543 * linespec.c (decode_digits_ordinary): Update.
7544
7545 2017-04-12 Tom Tromey <tom@tromey.com>
7546
7547 * tracepoint.c (actions_command): Update.
7548 * python/python.c (python_command, python_interactive_command):
7549 Update.
7550 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7551 * guile/guile.c (guile_command): Update.
7552 * defs.h (read_command_lines, read_command_lines_1): Return
7553 command_line_up.
7554 (command_lines_deleter): New struct.
7555 (command_line_up): New typedef.
7556 * compile/compile.c (compile_code_command)
7557 (compile_print_command): Update.
7558 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7559 command_line_up.
7560 (make_cleanup_free_command_lines): Remove.
7561 * cli/cli-script.c (get_command_line, read_command_lines_1)
7562 (copy_command_lines): Return command_line_up.
7563 (while_command, if_command, read_command_lines, define_command)
7564 (document_command): Update.
7565 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7566 Remove.
7567 * breakpoint.h (breakpoint_set_commands): Change type of
7568 "commands".
7569 * breakpoint.c (breakpoint_set_commands): Change type of
7570 "commands". Update.
7571 (do_map_commands_command, update_dprintf_command_list)
7572 (create_tracepoint_from_upload): Update.
7573
7574 2017-04-12 Tom Tromey <tom@tromey.com>
7575
7576 * tracepoint.c (scope_info): Update.
7577 * spu-tdep.c (spu_catch_start): Update.
7578 * python/python.c (gdbpy_decode_line): Update.
7579 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7580 * python/py-breakpoint.c (bppy_init): Update.
7581 * probe.c (parse_probes): Update.
7582 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7583 * location.h (event_location_deleter): New struct.
7584 (event_location_up): New typedef.
7585 (new_linespec_location, new_address_location, new_probe_location)
7586 (new_explicit_location, copy_event_location)
7587 (string_to_event_location, string_to_event_location_basic)
7588 (string_to_explicit_location): Update return type.
7589 (make_cleanup_delete_event_location): Remove.
7590 * location.c (new_linespec_location, new_address_location)
7591 (new_probe_location, new_explicit_location, copy_event_location):
7592 Return event_location_up.
7593 (delete_event_location_cleanup)
7594 (make_cleanup_delete_event_location): Remove.
7595 (string_to_explicit_location, string_to_event_location_basic)
7596 (string_to_event_location): Return event_location_up.
7597 * linespec.c (canonicalize_linespec, event_location_to_sals)
7598 (decode_line_with_current_source)
7599 (decode_line_with_last_displayed, decode_objc): Update.
7600 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7601 * completer.c (location_completer): Update.
7602 * cli/cli-cmds.c (edit_command, list_command): Update.
7603 * breakpoint.c (create_overlay_event_breakpoint)
7604 (create_longjmp_master_breakpoint)
7605 (create_std_terminate_master_breakpoint)
7606 (create_exception_master_breakpoint)
7607 (create_thread_event_breakpoint): Update.
7608 (init_breakpoint_sal): Update. Remove some dead code.
7609 (create_breakpoint_sal): Change type of "location". Update.
7610 (create_breakpoints_sal, create_breakpoint, break_command_1)
7611 (dprintf_command, break_range_command, until_break_command)
7612 (init_ada_exception_breakpoint)
7613 (strace_marker_create_sals_from_location)
7614 (update_static_tracepoint, trace_command, ftrace_command)
7615 (strace_command, create_tracepoint_from_upload): Update.
7616 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7617 * ax-gdb.c (agent_command_1): Update.
7618
7619 2017-04-12 Pedro Alves <palves@redhat.com>
7620
7621 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7622 * configure.tgt: Handle i[34567]86-*-go32* and
7623 i[34567]86-*-msdosdjgpp*.
7624 * i386-tdep.c (i386_svr4_reg_to_regnum):
7625 Make extern.
7626 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7627 i386-go32-tdep.c.
7628 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7629 * i386-go32-tdep.c: New file.
7630 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7631 declarations.
7632
7633 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7634
7635 * aix-thread.c (pd_status2str): Change return type to const char *.
7636
7637 2017-04-12 Pedro Alves <palves@redhat.com>
7638
7639 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7640 calls to set_gdbarch_gnu_triplet_regexp.
7641
7642 2017-04-12 Pedro Alves <palves@redhat.com>
7643
7644 PR gdb/21323
7645 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7646 New enum value.
7647 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7648 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7649 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7650 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7651 * gdbarch.h, gdbarch.c: Regenerate.
7652 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7653 gdbarch_wchar_bit and gdbarch_wchar_signed.
7654 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7655 * arm-tdep.c (arm_gdbarch_init): Likewise.
7656 * avr-tdep.c (avr_gdbarch_init): Likewise.
7657 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7658 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7659 * i386-tdep.c (i386_go32_init_abi): Likewise.
7660 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7661 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7662 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7663 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7664 * sh-tdep.c (sh_gdbarch_init): Likewise.
7665 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7666 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7667 * windows-tdep.c (windows_init_abi): Likewise.
7668 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7669
7670 2017-04-12 Pedro Alves <palves@redhat.com>
7671
7672 PR c++/21323
7673 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7674 cplus_primitive_type_char32_t>: New enum values.
7675 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7676 and cplus_primitive_type_char32_t.
7677 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7678 32, use the archtecture's built-in type for char16_t and char32_t,
7679 respectively. Otherwise, fallback to init_integer_type as before,
7680 but make the type unsigned, and issue a complaint.
7681 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7682
7683 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7684
7685 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7686 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7687
7688 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7689
7690 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7691 'const char *'.
7692
7693 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7694
7695 * common/common-utils.c (free_vector_argv): New function.
7696 * common/common-utils.h: Include <vector>.
7697 (free_vector_argv): New prototype.
7698 * darwin-nat.c (darwin_create_inferior): Rewrite function
7699 prototype in order to constify "exec_file" and accept a
7700 "std::string" for "allargs".
7701 * fork-child.c: Include <vector>.
7702 (breakup_args): Rewrite function, using C++.
7703 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7704 and accept "std::string" for "allargs". Update the code to
7705 calculate "argv" based on "allargs". Update calls to "exec_fun"
7706 and "execvp".
7707 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7708 order to constify "exec_file" and accept a "std::string" for
7709 "allargs".
7710 * go32-nat.c (go32_create_inferior): Likewise.
7711 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7712 * infcmd.c (run_command_1): Constify "exec_file". Use
7713 "std::string" for inferior arguments.
7714 * inferior.h (fork_inferior): Update prototype.
7715 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7716 prototype in order to constify "exec_file" and accept a
7717 "std::string" for "allargs".
7718 * nto-procfs.c (procfs_create_inferior): Likewise.
7719 * procfs.c (procfs_create_inferior): Likewise.
7720 * remote-sim.c (gdbsim_create_inferior): Likewise.
7721 * remote.c (extended_remote_run): Update code to accept
7722 "std::string" as argument.
7723 (extended_remote_create_inferior): Rewrite function prototype in
7724 order to constify "exec_file" and accept a "std::string" for
7725 "allargs".
7726 * rs6000-nat.c (super_create_inferior): Likewise.
7727 (rs6000_create_inferior): Likewise.
7728 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7729 * windows-nat.c (windows_create_inferior): Likewise.
7730
7731 2017-04-11 Pedro Alves <palves@redhat.com>
7732
7733 * thread.c: Fix whitespace throughout.
7734
7735 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7736
7737 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7738
7739 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7740
7741 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7742
7743 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7744
7745 PR gdb/21364
7746 * osdata.c (info_osdata): Check if 'type' is an empty string
7747 instead of NULL.
7748
7749 2017-04-10 Pedro Alves <palves@redhat.com>
7750
7751 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7752 (ptid_to_global_thread_id, in_thread_list)
7753 (do_captured_list_thread_ids, set_resumed, set_running)
7754 (set_executing, set_stop_requested, finish_thread_state)
7755 (validate_registers_access, can_access_registers_ptid)
7756 (print_thread_info_1, switch_to_thread)
7757 (do_restore_current_thread_cleanup)
7758 (make_cleanup_restore_current_thread, thread_command)
7759 (thread_name_command): Use operator== instead of ptid_equal.
7760
7761 2017-04-10 Pedro Alves <palves@redhat.com>
7762
7763 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7764 (current_thread_cleanup_chain): Delete.
7765 (restore_current_thread_cleanup_dtor)
7766 (make_cleanup_restore_current_thread): Remove references to
7767 current_thread_cleanup_chain.
7768
7769 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7770
7771 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7772 REG_UNKNOWN.
7773
7774 2017-04-10 Yao Qi <yao.qi@linaro.org>
7775
7776 PR gdb/19942
7777 * gdbthread.h (thread_info::deletable): New method.
7778 (thread_info::incref): New method.
7779 (thread_info::decref): New method.
7780 (thread_info::refcount): Move it to private.
7781 * infrun.c (save_stop_context): Call inc_refcount.
7782 (release_stop_context_cleanup): Likewise.
7783 * thread.c (set_thread_exited): New function.
7784 (init_thread_list): Delete "tp" only it is deletable, otherwise
7785 call set_thread_exited.
7786 (delete_thread_1): Call set_thread_exited.
7787 (current_thread_cleanup) <inferior_pid>: Remove.
7788 <thread>: New field.
7789 (restore_current_thread_ptid_changed): Removed.
7790 (do_restore_current_thread_cleanup): Adjust.
7791 (restore_current_thread_cleanup_dtor): Don't call
7792 find_thread_ptid.
7793 (set_thread_refcount): Use dec_refcount.
7794 (make_cleanup_restore_current_thread): Adjust.
7795 (thread_apply_all_command): Call inc_refcount.
7796 (_initialize_thread): Don't call
7797 observer_attach_thread_ptid_changed.
7798
7799 2017-04-10 Yao Qi <yao.qi@linaro.org>
7800
7801 * thread.c (delete_thread_1): Hoist code on marking thread as
7802 exited.
7803
7804 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7805
7806 * windows-nat.c (windows_detach): Initialize ptid with
7807 minus_one_ptid.
7808
7809 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7810
7811 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7812
7813 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7814
7815 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7816 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7817 (bfin_pseudo_register_write): Likewise
7818
7819 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7820
7821 * common/ptid.h (struct ptid): Change to...
7822 (class ptid_t): ... this.
7823 <ptid_t>: New constructors.
7824 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7825 matches>: New methods.
7826 <make_null, make_minus_one>: New static methods.
7827 <pid>: Rename to...
7828 <m_pid>: ...this.
7829 <lwp>: Rename to...
7830 <m_lwp>: ...this.
7831 <tid>: Rename to...
7832 <m_tid>: ...this.
7833 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7834 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7835 as references, move comment to class ptid_t.
7836 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7837 ptid_t static methods.
7838 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7839 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7840 Take ptid arguments as references, implement using ptid_t methods.
7841 * unittests/ptid-selftests.c: New file.
7842 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7843 unittests/ptid-selftests.c.
7844 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7845
7846 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7847
7848 * python/python.c (python_run_simple_file): Cast mode literal to
7849 non-const char pointer as expected by PyFile_FromString.
7850
7851 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7852
7853 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7854 minus_one_ptid and null_ptid.
7855
7856 2017-04-05 Pedro Alves <palves@redhat.com>
7857
7858 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7859 * configure: Regenerate.
7860
7861 2017-04-05 Pedro Alves <palves@redhat.com>
7862
7863 * ada-exp.y (yyerror): Constify.
7864 * ada-lang.c (bound_name, get_selections)
7865 (ada_variant_discrim_type)
7866 (ada_variant_discrim_name, ada_value_struct_elt)
7867 (ada_lookup_struct_elt_type, is_unchecked_variant)
7868 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7869 (catch_ada_exception_command_split)
7870 (catch_ada_assert_command_split, catch_assert_command)
7871 (ada_op_name): Constify.
7872 * ada-lang.h (ada_yyerror, get_selections)
7873 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7874 * arc-tdep.c (arc_print_frame_cache): Constify.
7875 * arm-tdep.c (arm_skip_stub): Constify.
7876 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7877 (gen_aggregate_elt_ref): Constify.
7878 * bcache.c (print_bcache_statistics): Constify.
7879 * bcache.h (print_bcache_statistics): Constify.
7880 * break-catch-throw.c (catch_exception_command_1):
7881 * breakpoint.c (struct ep_type_description::description):
7882 Constify.
7883 (add_solib_catchpoint): Constify.
7884 (catch_fork_command_1): Add cast.
7885 (add_catch_command): Constify.
7886 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7887 Constify.
7888 * bsd-uthread.c (bsd_uthread_state): Constify.
7889 * buildsym.c (patch_subfile_names): Constify.
7890 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7891 Constify.
7892 * c-exp.y (yyerror): Constify.
7893 (token::oper): Constify.
7894 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7895 * c-varobj.c (cplus_describe_child): Constify.
7896 * charset.c (find_charset_names): Add cast.
7897 (find_charset_names): Constify array and add const_cast.
7898 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7899 (edit_command): Constify.
7900 * cli/cli-decode.c (lookup_cmd): Constify.
7901 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7902 Constify.
7903 (struct dump_context): Constify.
7904 (add_dump_command, restore_command): Constify.
7905 * cli/cli-script.c (get_command_line): Constify.
7906 * cli/cli-script.h (get_command_line): Constify.
7907 * cli/cli-utils.c (check_for_argument): Constify.
7908 * cli/cli-utils.h (check_for_argument): Constify.
7909 * coff-pe-read.c (struct read_pe_section_data): Constify.
7910 * command.h (lookup_cmd): Constify.
7911 * common/print-utils.c (decimal2str): Constify.
7912 * completer.c (gdb_print_filename): Constify.
7913 * corefile.c (set_gnutarget): Constify.
7914 * cp-name-parser.y (yyerror): Constify.
7915 * cp-valprint.c (cp_print_class_member): Constify.
7916 * cris-tdep.c (cris_register_name, crisv32_register_name):
7917 Constify.
7918 * d-exp.y (yyerror): Constify.
7919 (struct token::oper): Constify.
7920 * d-lang.h (d_yyerror): Constify.
7921 * dbxread.c (struct header_file_location::name): Constify.
7922 (add_old_header_file, add_new_header_file, last_function_name)
7923 (dbx_next_symbol_text, add_bincl_to_list)
7924 (find_corresponding_bincl_psymtab, set_namestring)
7925 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7926 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7927 * defs.h (command_line_input, print_address_symbolic)
7928 (deprecated_readline_begin_hook): Constify.
7929 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7930 Constify.
7931 * event-top.c (handle_line_of_input): Constify and add cast.
7932 * exceptions.c (catch_errors): Constify.
7933 * exceptions.h (catch_errors): Constify.
7934 * expprint.c (print_subexp_standard, op_string, op_name)
7935 (op_name_standard, dump_raw_expression, dump_raw_expression):
7936 * expression.h (op_name, op_string, dump_raw_expression):
7937 Constify.
7938 * f-exp.y (yyerror): Constify.
7939 (struct token::oper): Constify.
7940 (struct f77_boolean_val::name): Constify.
7941 * f-lang.c (f_word_break_characters): Constify.
7942 * f-lang.h (f_yyerror): Constify.
7943 * fork-child.c (fork_inferior): Add cast.
7944 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7945 (new_variant): Constify.
7946 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7947 * gdbarch.c: Regenerate.
7948 * gdbcore.h (set_gnutarget): Constify.
7949 * go-exp.y (yyerror): Constify.
7950 (token::oper): Constify.
7951 * go-lang.h (go_yyerror): Constify.
7952 * go32-nat.c (go32_sysinfo): Constify.
7953 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7954 * guile/scm-cmd.c (cmdscm_function): Constify.
7955 * guile/scm-param.c (pascm_param_value): Constify.
7956 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7957 (h8300sx_register_name): Constify.
7958 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7959 Constify.
7960 * ia64-tdep.c (ia64_register_names): Constify.
7961 * infcmd.c (construct_inferior_arguments): Constify.
7962 (path_command, attach_post_wait): Constify.
7963 * language.c (show_range_command, show_case_command)
7964 (unk_lang_error): Constify.
7965 * language.h (language_defn::la_error)
7966 (language_defn::la_name_of_this): Constify.
7967 * linespec.c (decode_line_2): Constify.
7968 * linux-thread-db.c (thread_db_err_str): Constify.
7969 * lm32-tdep.c (lm32_register_name): Constify.
7970 * m2-exp.y (yyerror): Constify.
7971 * m2-lang.h (m2_yyerror): Constify.
7972 * m32r-tdep.c (m32r_register_names): Constify and make static.
7973 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7974 * m88k-tdep.c (m88k_register_name): Constify.
7975 * macroexp.c (appendmem): Constify.
7976 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7977 (upgrade_type, parse_external, parse_partial_symbols)
7978 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7979 (new_symbol): Constify.
7980 * memattr.c (mem_info_command): Constify.
7981 * mep-tdep.c (register_name_from_keyword): Constify.
7982 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7983 Constify.
7984 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7985 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7986 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7987 cast.
7988 (mi_execute_async_cli_command): Constify.
7989 * mips-tdep.c (mips_register_name): Constify.
7990 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7991 (am33_register_name, am33_2_register_name)
7992 * moxie-tdep.c (moxie_register_names): Constify.
7993 * nat/linux-osdata.c (osdata_type): Constify fields.
7994 * nto-tdep.c (nto_parse_redirection): Constify.
7995 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7996 (lookup_child_selector): Constify.
7997 (objc_methcall::name): Constify.
7998 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7999 (lookup_struct_typedef): Constify.
8000 * objfiles.c (pc_in_section): Constify.
8001 * objfiles.h (pc_in_section): Constify.
8002 * p-exp.y (struct token::oper): Constify.
8003 (yyerror): Constify.
8004 * p-lang.h (pascal_yyerror): Constify.
8005 * parser-defs.h (op_name_standard): Constify.
8006 (op_print::string): Constify.
8007 (exp_descriptor::op_name): Constify.
8008 * printcmd.c (print_address_symbolic): Constify.
8009 * psymtab.c (print_partial_symbols): Constify.
8010 * python/py-breakpoint.c (stop_func): Constify.
8011 (bppy_get_expression): Constify.
8012 * python/py-cmd.c (cmdpy_completer::name): Constify.
8013 (cmdpy_function): Constify.
8014 * python/py-event.c (evpy_add_attribute)
8015 (gdbpy_initialize_event_generic): Constify.
8016 * python/py-event.h (evpy_add_attribute)
8017 (gdbpy_initialize_event_generic): Constify.
8018 * python/py-evts.c (add_new_registry): Constify.
8019 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8020 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8021 * python/py-inferior.c (get_buffer): Add cast.
8022 * python/py-param.c (parm_constant::name): Constify.
8023 * python/py-unwind.c (fprint_frame_id): Constify.
8024 * python/python.c (gdbpy_parameter_value): Constify.
8025 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8026 * remote.c (memory_packet_config::name): Constify.
8027 (show_packet_config_cmd, remote_write_bytes)
8028 (remote_buffer_add_string):
8029 * reverse.c (exec_reverse_once): Constify.
8030 * rs6000-tdep.c (variant::name, variant::description): Constify.
8031 * rust-exp.y (rustyyerror): Constify.
8032 * rust-lang.c (rust_op_name): Constify.
8033 * rust-lang.h (rustyyerror): Constify.
8034 * serial.h (serial_ops::name): Constify.
8035 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8036 (sh_sh3e_register_name, sh_sh2e_register_name)
8037 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8038 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8039 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8040 (sh_sh4al_dsp_register_name): Constify.
8041 * sh64-tdep.c (sh64_register_name): Constify.
8042 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8043 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8044 * stabsread.c (patch_block_stabs, read_type_number)
8045 (ref_map::stabs, ref_add, process_reference)
8046 (symbol_reference_defined, define_symbol, define_symbol)
8047 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8048 (read_one_struct_field, read_struct_fields, read_baseclasses)
8049 (read_tilde_fields, read_struct_type, read_array_type)
8050 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8051 (read_huge_number, read_range_type, read_args, common_block_start)
8052 (find_name_end): Constify.
8053 * stabsread.h (common_block_start, define_symbol)
8054 (process_one_symbol, symbol_reference_defined, ref_add):
8055 * symfile.c (get_section_index, add_symbol_file_command):
8056 * symfile.h (get_section_index): Constify.
8057 * target-descriptions.c (tdesc_type::name): Constify.
8058 (tdesc_free_type): Add cast.
8059 * target.c (find_default_run_target):
8060 (add_deprecated_target_alias, find_default_run_target)
8061 (target_announce_detach): Constify.
8062 (do_option): Constify.
8063 * target.h (add_deprecated_target_alias): Constify.
8064 * thread.c (print_thread_info_1): Constify.
8065 * top.c (deprecated_readline_begin_hook, command_line_input):
8066 Constify.
8067 (init_main): Add casts.
8068 * top.h (handle_line_of_input): Constify.
8069 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8070 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8071 (tfind_command): Rename to ...
8072 (tfind_command_1): ... this and constify.
8073 (tfind_command): New function.
8074 (tfind_end_command, tfind_start_command): Adjust.
8075 (encode_source_string): Constify.
8076 * tracepoint.h (encode_source_string): Constify.
8077 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8078 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8079 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8080 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8081 * tui/tui-win.c (parse_scrolling_args): Constify.
8082 * tui/tui-windata.c (tui_erase_data_content): Constify.
8083 * tui/tui-windata.h (tui_erase_data_content): Constify.
8084 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8085 * tui/tui.c (tui_enable): Add cast.
8086 * utils.c (defaulted_query): Constify.
8087 (init_page_info): Add cast.
8088 (puts_debug, subset_compare): Constify.
8089 * utils.h (subset_compare): Constify.
8090 * varobj.c (varobj_format_string): Constify.
8091 * varobj.h (varobj_format_string): Constify.
8092 * vax-tdep.c (vax_register_name): Constify.
8093 * windows-nat.c (windows_detach): Constify.
8094 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8095 * xml-support.c (gdb_xml_end_element): Constify.
8096 * xml-tdesc.c (tdesc_start_reg): Constify.
8097 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8098 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8099 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8100
8101 2017-04-05 Pedro Alves <palves@redhat.com>
8102
8103 * proc-api.c (struct trans): Constify.
8104 (procfs_note): Constify.
8105 * proc-events.c (struct trans, syscall_table):
8106 * proc-flags.c (struct trans): Constify.
8107 * proc-utils.h (procfs_note): Constify.
8108 * proc-why.c (struct trans): Constify.
8109 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8110 (procfs_detach): Constify.
8111 * sol-thread.c (struct string_map): Constify.
8112 (td_err_string, td_state_string): Constify.
8113
8114 2017-04-05 Pedro Alves <palves@redhat.com>
8115
8116 * proc-api.c (procfs_filename): Don't initialize
8117 procfs_filename.
8118 (prepare_to_trace): Assume procfs_filename is non-NULL.
8119 (_initialize_proc_api): Give procfs_filename a default value here.
8120
8121 2017-04-05 Pedro Alves <palves@redhat.com>
8122
8123 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8124 'cond_string' parameter.
8125 (extract_exception_regexp): Constify 'string' parameter.
8126 (catch_exception_command_1): Constify.
8127 * breakpoint.c (init_catchpoint)
8128 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8129 parameter.
8130 (ep_parse_optional_if_clause, catch_fork_command_1)
8131 (catch_exec_command_1): Constify.
8132 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8133 parameter.
8134 (ep_parse_optional_if_clause): Constify.
8135 * cli/cli-utils.c (remove_trailing_whitespace)
8136 (check_for_argument): Constify.
8137 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8138 non-const overload.
8139 (check_for_argument): Likewise.
8140
8141 2017-04-05 Pedro Alves <palves@redhat.com>
8142
8143 * event-top.c (command_line_handler): Add cast to execute_command
8144 call.
8145 * record-btrace.c (cmd_record_btrace_bts_start)
8146 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8147 (cmd_record_btrace_start): Add cast to execute_command call.
8148 * record-full.c (record_full_goto_insn):
8149 * record.c (record_start, record_stop): Add cast to
8150 execute_command_to_string calls.
8151 (cmd_record_start): Add cast to execute_command calls.
8152
8153 2017-04-05 Pedro Alves <palves@redhat.com>
8154
8155 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8156 static inline function.
8157 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8158 array and use gdb_PyArg_ParseTupleAndKeywords.
8159 * python/py-cmd.c (cmdpy_init): Likewise.
8160 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8161 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8162 (infpy_search_memory): Likewise.
8163 * python/py-objfile.c (objfpy_add_separate_debug_file)
8164 (gdbpy_lookup_objfile): Likewise.
8165 * python/py-symbol.c (gdbpy_lookup_symbol)
8166 (gdbpy_lookup_global_symbol): Likewise.
8167 * python/py-type.c (gdbpy_lookup_type): Likewise.
8168 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8169 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8170 Likewise.
8171
8172 2017-04-05 Pedro Alves <palves@redhat.com>
8173
8174 * python/python-internal.h (gdb_PyGetSetDef): New type.
8175 * python/py-block.c (block_object_getset)
8176 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8177 * python/py-event.c (event_object_getset)
8178 (finish_breakpoint_object_getset): Likewise.
8179 * python/py-inferior.c (inferior_object_getset): Likewise.
8180 * python/py-infthread.c (thread_object_getset): Likewise.
8181 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8182 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8183 * python/py-objfile.c (objfile_getset): Likewise.
8184 * python/py-progspace.c (pspace_getset): Likewise.
8185 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8186 Likewise.
8187 * python/py-record.c (recpy_record_getset): Likewise.
8188 * python/py-symbol.c (symbol_object_getset): Likewise.
8189 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8190 Likewise.
8191 * python/py-type.c (type_object_getset, field_object_getset):
8192 Likewise.
8193 * python/py-value.c (value_object_getset): Likewise.
8194
8195 2017-04-05 Pedro Alves <palves@redhat.com>
8196
8197 * python/python-internal.h (gdb_PyObject_CallMethod)
8198 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8199 New functions.
8200 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8201 (PySys_GetObject, PySys_SetPath): New macros.
8202
8203 2017-04-05 Pedro Alves <palves@redhat.com>
8204
8205 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8206 info_osdata_command.
8207 * osdata.c (info_osdata_command): Rename to ...
8208 (info_osdata): ... this. Constify 'type' parameter, and remove
8209 the 'from_tty' parameter. Accept NULL TYPE.
8210 (info_osdata_command): New function.
8211 * osdata.h (info_osdata_command): Remove declaration.
8212 (info_osdata): New declaration.
8213
8214 2017-04-05 Pedro Alves <palves@redhat.com>
8215
8216 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8217 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8218 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8219 parameter.
8220 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8221 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8222 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8223 parameter.
8224 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8225 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8226 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8227 (mi_cmd_file_list_exec_source_files)
8228 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8229 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8230 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8231 parameter.
8232 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8233 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8234 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8235 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8236 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8237 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8238 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8239 'command' parameter.
8240 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8241 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8242 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8243 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8244 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8245 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8246 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8247 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8248 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8249 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8250 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8251 parameter.
8252 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8253 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8254 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8255 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8256 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8257 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8258 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8259 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8260 (mi_cmd_data_list_changed_registers)
8261 (mi_cmd_data_write_register_values)
8262 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8263 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8264 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8265 (mi_cmd_list_features, mi_cmd_list_target_features)
8266 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8267 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8268 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8269 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8270 (mi_cmd_trace_frame_collected): Constify 'command'
8271 parameter.
8272 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8273 'command' parameter.
8274
8275 2017-04-05 Pedro Alves <palves@redhat.com>
8276
8277 * ada-lang.c (ada_completer_word_break_characters): Now a const
8278 array.
8279 (ada_get_gdb_completer_word_break_characters): Constify.
8280 * completer.c (gdb_completer_command_word_break_characters)
8281 (gdb_completer_file_name_break_characters)
8282 (gdb_completer_quote_characters): Now const arrays.
8283 (get_gdb_completer_quote_characters): Constify.
8284 (set_rl_completer_word_break_characters): New function.
8285 (set_gdb_completion_word_break_characters)
8286 (complete_line_internal): Use it.
8287 * completer.h (get_gdb_completer_quote_characters): Constify.
8288 (set_rl_completer_word_break_characters): Declare.
8289 * f-lang.c (f_word_break_characters): Constify.
8290 * language.c (default_word_break_characters): Constify.
8291 * language.h (language_defn::la_word_break_characters): Constify.
8292 (default_word_break_characters): Constify.
8293 * top.c (init_main): Use set_rl_completer_word_break_characters.
8294
8295 2017-04-05 Pedro Alves <palves@redhat.com>
8296
8297 * aix-thread.c (aix_thread_pid_to_str)
8298 (aix_thread_extra_thread_info): Constify.
8299 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8300 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8301 (bsd_uthread_pid_to_str): Constify.
8302 * corelow.c (core_pid_to_str): Constify.
8303 * darwin-nat.c (darwin_pid_to_str): Constify.
8304 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8305 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8306 Constify.
8307 * gnu-nat.c (gnu_pid_to_str): Constify.
8308 * go32-nat.c (go32_pid_to_str): Constify.
8309 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8310 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8311 * inferior.c (inferior_pid_to_str): Constify.
8312 * linux-nat.c (linux_nat_pid_to_str): Constify.
8313 * linux-tdep.c (linux_core_pid_to_str): Constify.
8314 * linux-thread-db.c (thread_db_pid_to_str)
8315 (thread_db_extra_thread_info): Constify.
8316 * nto-tdep.c (nto_extra_thread_info): Constify.
8317 * nto-tdep.h (nto_extra_thread_info): Constify.
8318 * obsd-nat.c (obsd_pid_to_str): Constify.
8319 * procfs.c (procfs_pid_to_str): Constify.
8320 * ravenscar-thread.c (ravenscar_extra_thread_info)
8321 (ravenscar_pid_to_str): Constify.
8322 * remote-sim.c (gdbsim_pid_to_str): Constify.
8323 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8324 Constify.
8325 * sol-thread.c (solaris_pid_to_str): Constify.
8326 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8327 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8328 * target.c (default_pid_to_str, target_pid_to_str)
8329 (normal_pid_to_str, default_pid_to_str): Constify.
8330 * target.h (target_ops::to_pid_to_str)
8331 (target_ops::to_extra_thread_info): Constify.
8332 (target_pid_to_str, normal_pid_to_str): Constify.
8333 * windows-nat.c (windows_pid_to_str): Constify.
8334 * gdbarch.sh (core_pid_to_str): Constify.
8335 * target-delegates.c: Regenerate.
8336 * gdbarch.h, gdbarch.c: Regenerate.
8337
8338 2017-04-05 Pedro Alves <palves@redhat.com>
8339
8340 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8341 the memory of the temporary warning_pre_print override.
8342 * utils.c (warning_pre_print): Constify.
8343 * utils.h (warning_pre_print): Constify.
8344
8345 2017-04-05 Pedro Alves <palves@redhat.com>
8346
8347 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8348 (shell_command): New function.
8349 (make_command): Use std::string.
8350 (init_cli_cmds): Register shell_command instead of shell_escape.
8351
8352 2017-04-05 Pedro Alves <palves@redhat.com>
8353
8354 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8355 * tracepoint.c (default_collect): Don't initialize.
8356
8357 2017-04-05 Pedro Alves <palves@redhat.com>
8358
8359 * macroexp.c (macro_buffer::shared): Now a bool.
8360 (init_buffer): Update.
8361 (init_shared_buffer): Constify 'addr' parameter.
8362 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8363 casts.
8364
8365 2017-04-05 Pedro Alves <palves@redhat.com>
8366
8367 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8368 * disasm.c (set_disassembler_options): Constify local.
8369 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8370
8371 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8372
8373 PR gdb/21352
8374 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8375 option.
8376
8377 2017-04-05 Yao Qi <yao.qi@linaro.org>
8378
8379 * frame.c (frame_unwind_register_unsigned): Call
8380 frame_unwind_register_value.
8381
8382 2017-04-05 Yao Qi <yao.qi@linaro.org>
8383
8384 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8385 Use gdb_test_multiple, and don't match anchor.
8386
8387 2017-04-05 Pedro Alves <palves@redhat.com>
8388
8389 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8390 (Write After Approval): Remove Simon Marchi.
8391
8392 2017-04-05 Pedro Alves <palves@redhat.com>
8393
8394 * common/gdb_optional.h (optional::optional): Make constexpr and
8395 initialize m_dummy.
8396
8397 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8398
8399 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8400 (amd64fbsd_jmp_buf_reg_offset): Remove.
8401 (amd64fbsd_supply_uthread): Remove function.
8402 (amd64fbsd_collect_uthread): Remove function.
8403 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8404 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8405 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8406 (fbsd-nat.c): Update comment.
8407 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8408 (i386fbsd_jmp_buf_reg_offset): Remove.
8409 (i386fbsd_supply_uthread): Remove function.
8410 (i386fbsd_collect_uthread): Remove function.
8411 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8412
8413 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8414
8415 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8416 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8417 * NEWS: Mention that support for FreeBSD/alpha was removed.
8418 * alpha-fbsd-tdep.c: Delete file.
8419 * config/alpha/fbsd.mh: Delete file.
8420 * configure.host: Delete alpha*-*-freebsd* and
8421 alpha*-*-kfreebsd*-gnu.
8422 * configure.tgt: Delete alpha*-*-freebsd* and
8423 alpha*-*-kfreebsd*-gnu.
8424
8425 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8426
8427 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8428 amd64bsd_store_inferior_registers): Use ptid from regcache.
8429
8430 2017-04-04 Pedro Alves <palves@redhat.com>
8431
8432 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8433 data fields, make them private and add "m_" prefixes.
8434 (lnp_state_machine::lnp_state_machine): New ctor.
8435 (record_line, check_line_address, handle_set_discriminator)
8436 (handle_set_address, handle_advance_pc, handle_special_opcode)
8437 (handle_advance_line, handle_set_file, handle_negate_stmt)
8438 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8439 (end_sequence, advance_line): New methods.
8440 (m_gdbarch, m_record_lines_p): New fields.
8441 (lnp_reader_state): Delete.
8442 (dwarf_record_line): Rename to ...
8443 (lnp_state_machine::record_line): ... adjust.
8444 (init_lnp_state_machine): Delete.
8445 (lnp_state_machine::lnp_state_machine): New.
8446 (check_line_address): Rename to ...
8447 (lnp_state_machine::check_line_address): This.
8448 (dwarf_decode_lines_1): Remove reference to "reader_state".
8449 Adjust lnp_state_machine having a non-default ctor. Use bool.
8450 State machine internal state manipulation moved to
8451 lnp_state_machine methods.
8452
8453 2017-04-04 Pedro Alves <palves@redhat.com>
8454
8455 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8456 unittests/offset-type-selftests.c.
8457 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8458 * common/offset-type.h: New file.
8459 * common/preprocessor.h: New file.
8460 * common/traits.h: New file.
8461 * common/valid-expr.h: New file.
8462 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8463 sect_offset and cu_offset strong typedefs throughout.
8464 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8465 typedefs throughout.
8466 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8467 sect_offset and cu_offset strong typedefs throughout.
8468 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8469 typedefs throughout.
8470 * gdbtypes.h: Include "common/offset-type.h".
8471 (cu_offset): Now an offset type (strong typedef) instead of a
8472 struct.
8473 (sect_offset): Likewise.
8474 (union call_site_parameter_u): Rename "param_offset" field to
8475 "param_cu_off".
8476 * unittests/offset-type-selftests.c: New file.
8477
8478 2017-04-04 Pedro Alves <palves@redhat.com>
8479
8480 * common/underlying.h: New file.
8481 * dwarf2read.c: Include "common/gdb_optional.h" and
8482 "common/underlying.h".
8483 (dir_index, file_name_index): New types.
8484 (file_entry): Use them.
8485 (file_entry::include): Use to_underlying.
8486 (line_header::add_file_name): Use dir_index.
8487 (read_formatted_entries): Use gdb::optional. Read form before
8488 writting to file_entry.
8489 (dwarf_decode_line_header): Use dir_index.
8490 (lnp_state_machine::current_file): Use to_underlying.
8491 (lnp_state_machine::file): Change type to file_name_index.
8492 (dwarf_record_line): Use to_underlying.
8493 (init_lnp_state_machine): Use file_name_index.
8494 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8495
8496 2017-04-04 Pedro Alves <palves@redhat.com>
8497
8498 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8499 operator bool, has_value and get methods.
8500
8501 2017-04-04 Pedro Alves <palves@redhat.com>
8502
8503 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8504 fields.
8505 (line_header): Initialize all data fields. Change type of
8506 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8507 Change type of include_dirs to std::vector<const char *>. Remove
8508 num_include_dirs, include_dirs_size. Change type of file_names to
8509 std::vector<file_entry>. Remove num_file_names, file_names_size.
8510 (line_header::line_header): New.
8511 (line_header::add_include_dir, line_header::add_file_name): New
8512 methods.
8513 (line_header::include_dir_at): Remove NULL check.
8514 (line_header::file_name_at): Add const overload.
8515 (line_header_up): New unique_ptr typedef.
8516 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8517 std::vector. Remove free_line_header call.
8518 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8519 free_line_header call.
8520 (free_cu_line_header): Delete.
8521 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8522 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8523 Adjust to use std::vector.
8524 (free_line_header): Delete.
8525 (free_line_header_voidp): Use delete.
8526 (add_include_dir): Replace with ...
8527 (line_header::add_include_dir): ... this method. Use std::vector.
8528 (add_file_name): Replace with ...
8529 (line_header::add_file_name): ... this method. Use std::vector.
8530 (add_include_dir_stub): Delete.
8531 (read_formatted_entries): Remove memset.
8532 (dwarf_decode_line_header): Return a line_header_up instead of a
8533 raw pointer. Remove cleanup handling. Pass lambdas to
8534 read_formatted_entries. Adjust to use line_header methods.
8535 (dwarf_decode_lines_1): Adjust to use line_header methods.
8536 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8537 use std::vector.
8538
8539 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8540
8541 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8542 instead of struct ptid.
8543
8544 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8545
8546 * frame.c (get_frame_register_bytes): Unwind using value.
8547 (put_frame_register_bytes): Likewise.
8548
8549 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8550
8551 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8552 aggregate-like.
8553
8554 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8555
8556 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8557
8558 2017-03-29 Yao Qi <yao.qi@linaro.org>
8559
8560 * gdbthread.h (struct thread_info): Declare constructor and
8561 destructor. Add some in-class member initializers.
8562 * thread.c (free_thread): Remove.
8563 (init_thread_list): Call delete instead of free_thread.
8564 (new_thread): Call thread_info constructor.
8565 (thread_info::thread_info): New function.
8566 (thread_info::~thread_info): New function.
8567 (delete_thread_1): Call delete instead of free_thread.
8568 (make_cleanup_restore_current_thread): Move tp and frame to
8569 inner block.
8570
8571 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8572
8573 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8574 (arc_skip_prologue): Likewise.
8575 (arc_make_frame_cache): Likewise.
8576 (arc_pv_get_operand): New function.
8577 (arc_is_in_prologue): Likewise.
8578 (arc_analyze_prologue): Likewise.
8579 (arc_print_frame_cache): Likewise.
8580 (MAX_PROLOGUE_LENGTH): New constant.
8581
8582 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8583
8584 * configure.tgt: Add arc-insn.o.
8585 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8586 (dump_arc_instruction_command): New function.
8587 (arc_fprintf_disasm): Likewise.
8588 (arc_disassemble_info): Likewise.
8589 (arc_insn_get_operand_value): Likewise.
8590 (arc_insn_get_operand_value_signed): Likewise.
8591 (arc_insn_get_memory_base_reg): Likewise.
8592 (arc_insn_get_memory_offset): Likewise.
8593 (arc_insn_get_branch_target): Likewise.
8594 (arc_insn_dump): Likewise.
8595 (arc_insn_get_linear_next_pc): Likewise.
8596 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8597 (arc_disassemble_info): Likewise.
8598 (arc_insn_get_branch_target): Likewise.
8599 (arc_insn_get_linear_next_pc): Likewise.
8600 * NEWS: Mention new "maint print arc arc-instruction".
8601
8602 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8603
8604 * arc-tdep (maintenance_print_arc_list): New variable.
8605 (maintenance_print_arc_command): New function.
8606
8607 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8608
8609 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8610 Add "limm" and "reserved".
8611 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8612 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8613 * arc-tdep.h (arc_regnum): Likewise.
8614
8615 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8616
8617 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8618 for THREADPTR register.
8619 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8620 register.
8621 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8622 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8623 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8624
8625 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8626
8627 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8628 registers above gdbarch_num_regs (gdbarch) as privileged in
8629 call0 ABI.
8630
8631 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8632
8633 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8634 for a single specified register or for all registers in
8635 a0_base..a0_base + C0_NREGS range.
8636 (supply_gregset_reg): Call regcache_raw_supply for a single
8637 specified register or for all registers in a0_base..a0_base +
8638 C0_NREGS range.
8639
8640 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8641
8642 * arch/xtensa.h (C0_NREGS): Add definition.
8643 * xtensa-tdep.c (C0_NREGS): Remove definition.
8644
8645 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8646
8647 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8648 Drop xtensa_default_isa initialization.
8649 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8650
8651 2017-03-27 Pedro Alves <palves@redhat.com>
8652
8653 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8654 (file_entry::include_dir): New method.
8655 (line_header::include_dir_at, line_header::file_name_at): New
8656 methods.
8657 (setup_type_unit_groups, setup_type_unit_groups)
8658 (psymtab_include_file_name): Simplify using the new methods.
8659 (lnp_state_machine) <the_line_header>: New field.
8660 <file>: Add comment.
8661 (lnp_state_machine::current_file): New method.
8662 (dwarf_record_line): Simplify using the new methods.
8663 (init_lnp_state_machine): Initialize the "the_line_header" field.
8664 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8665 Simplify using the new methods.
8666
8667 2017-03-27 Pedro Alves <palves@redhat.com>
8668
8669 * cp-name-parser.y (make_empty): Delete.
8670 (demangler_special, nested_name, ptr_operator, array_indicator)
8671 (direct_declarator, declarator_1): Use fill_comp instead of
8672 make_empty.
8673
8674 2017-03-27 Pedro Alves <palves@redhat.com>
8675
8676 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8677 to ATTRIBUTE_PRINTF.
8678 * solib-target.c (library_list_start_list): Print "string" not
8679 "version".
8680 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8681 gdb_xml_error call.
8682
8683 2017-03-27 Pedro Alves <palves@redhat.com>
8684
8685 * dwarf2read.c (struct file_and_directory): New.
8686 (dwarf2_get_dwz_file): Adjust to use std::string.
8687 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8688 (find_file_and_directory): Adjust to return a file_and_directory
8689 object.
8690 (read_file_scope): Adjust to use file_and_directory. Remove
8691 make_cleanup/do_cleanups calls.
8692 (open_and_init_dwp_file): Adjust to use std::string. Remove
8693 make_cleanup/do_cleanups calls.
8694 * python/python.c (do_start_initialization): Adjust to ldirname
8695 returning a std::string.
8696 * utils.c (ldirname): Now returns a std::string.
8697 * utils.h (ldirname): Change return type to std::string.
8698 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8699 returning a std::string.
8700 * xml-tdesc.c (file_read_description_xml): Likewise.
8701
8702 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8703
8704 * regcache.c (regcache_debug_print_register): New function.
8705 * regcache.h (regcache_debug_print_register): New declaration.
8706 * target.c (debug_print_register): Remove.
8707 (target_fetch_registers): Call regcache_debug_print_register.
8708 (target_store_registers): Likewise.
8709
8710 2017-03-24 Pádraig Brady <pbrady@fb.com>
8711
8712 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8713 reference beyond the 'lh->include_dirs' array before accessing to
8714 it.
8715 (psymtab_include_file_name): Likewise.
8716 (dwarf_decode_lines_1): Likewise.
8717 (dwarf_decode_lines): Likewise.
8718 (file_file_name): Likewise.
8719
8720 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8721
8722 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8723 inferior_ptid.
8724 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8725 ps_lsetfpregs): Likewise.
8726 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8727 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8728 ps_lsetfpregs): Likewise.
8729 * target.c (target_fetch_registers, target_store_registers):
8730 Remove asserts.
8731
8732 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8733
8734 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8735
8736 2017-03-23 Yao Qi <yao.qi@linaro.org>
8737
8738 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8739 (_initialize_aarch64_tdep): Register it.
8740 (aarch64_record_load_store): Handle PRFM instruction.
8741 (aarch64_process_record_test): New function.
8742
8743 2017-03-23 Yao Qi <yao.qi@linaro.org>
8744
8745 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8746 indentation.
8747
8748 2017-03-23 Yao Qi <yao.qi@linaro.org>
8749
8750 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8751
8752 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8753
8754 python/python.c (do_start_initialization): Fix memory leak.
8755
8756 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8757
8758 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8759 using get_ptrace_pid.
8760 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8761 inferior_ptid.
8762 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8763 inferior_ptid instead of pid.
8764
8765 2017-03-22 Yao Qi <yao.qi@linaro.org>
8766
8767 * aarch64-tdep.c: Wrap locally used classes in anonymous
8768 namespace.
8769 * arm-tdep.c: Likewise.
8770 * linespec.c: Likewise.
8771 * ui-out.c: Likewise.
8772
8773 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8774
8775 PR gdb/19637
8776 * python/lib/gdb/printer/bound_registers.py: Import sys.
8777
8778 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8779
8780 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8781 windows_thread_info parameter and use it instead of
8782 current_thread.
8783 (windows_fetch_inferior_registers): Don't set current_thread,
8784 pass the thread to do_windows_fetch_inferior_registers. Use
8785 ptid from regcache instead of inferior_ptid.
8786 (do_windows_store_inferior_registers): Add windows_thread_info
8787 parameter and use it instead of current_thread.
8788 (windows_store_inferior_registers): Don't set current_thread,
8789 pass the thread to do_windows_store_inferior_registers. Use
8790 ptid from regcache instead of inferior_ptid.
8791
8792 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8793
8794 * ser-mingw.c (ser_windows_raw): Remove reference to
8795 struct serial::current_timeout.
8796
8797 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8798
8799 PR tdep/20928
8800 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8801 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8802 (sparc64_fsr_type): Fix %fsr decoding.
8803
8804 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8805
8806 * python/py-record-btrace.c (btpy_insn_data): Change return type
8807 for Python 2.
8808
8809 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8810
8811 * spu-linux-nat.c (spu_fetch_inferior_registers,
8812 spu_store_inferior_registers): Use ptid from regcache, set and
8813 restore inferior_ptid.
8814 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8815 Likewise.
8816
8817 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8818
8819 * i386-linux-nat.c (fetch_register, store_register,
8820 i386_linux_fetch_inferior_registers,
8821 i386_linux_store_inferior_registers): Use ptid from regcache.
8822 * ia64-linux-nat.c (ia64_linux_fetch_register,
8823 ia64_linux_store_register): Likewise.
8824 * inf-ptrace.c (inf_ptrace_fetch_register,
8825 inf_ptrace_store_register): Likewise.
8826 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8827 m32r_linux_store_inferior_registers): Likewise.
8828 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8829 m68kbsd_store_inferior_registers): Likewise.
8830 * m68k-linux-nat.c (fetch_register, store_register,
8831 m68k_linux_fetch_inferior_registers,
8832 m68k_linux_store_inferior_registers): Likewise.
8833 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8834 m88kbsd_store_inferior_registers): Likewise.
8835 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8836 mips_fbsd_store_inferior_registers): Likewise.
8837 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8838 mips64_linux_regsets_store_registers): Likewise.
8839 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8840 mipsnbsd_store_inferior_registers): Likewise.
8841 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8842 mips64obsd_store_inferior_registers): Likewise.
8843 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8844 Likewise.
8845 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8846 ppcfbsd_store_inferior_registers): Likewise.
8847 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8848 ppc_linux_store_inferior_registers): Likewise.
8849 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8850 ppcnbsd_store_inferior_registers): Likewise.
8851 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8852 ppcobsd_store_registers): Likewise.
8853 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8854 Likewise.
8855 * ravenscar-thread.c (ravenscar_fetch_registers,
8856 ravenscar_store_registers, ravenscar_prepare_to_store):
8857 Likewise.
8858 * record-btrace.c (record_btrace_fetch_registers,
8859 record_btrace_store_registers, record_btrace_prepare_to_store):
8860 Likewise.
8861 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8862 Lookup inferior using ptid from regcache, instead of
8863 current_inferior.
8864 * remote.c (remote_fetch_registers, remote_store_registers): Use
8865 ptid from regcache.
8866 * rs6000-nat.c (fetch_register, store_register): Likewise.
8867 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8868 s390_linux_store_inferior_registers): Likewise.
8869 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8870 shnbsd_store_inferior_registers): Likewise.
8871 * sol-thread.c (sol_thread_fetch_registers,
8872 sol_thread_store_registers): Likewise.
8873 * sparc-nat.c (sparc_fetch_inferior_registers,
8874 sparc_store_inferior_registers): Likewise.
8875 * tilegx-linux-nat.c (fetch_inferior_registers,
8876 store_inferior_registers): Likewise.
8877 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8878 vaxbsd_store_inferior_registers): Likewise.
8879 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8880 store_xtregs): Likewise.
8881
8882 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8883
8884 PR gdb/14441
8885 * NEWS: Mention support for rvalue references in GDB and python.
8886 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8887 supports both lvalue and rvalue references.
8888
8889 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8890
8891 PR gdb/14441
8892 * gdbtypes.c (rank_one_type): Implement overloading
8893 resolution rules regarding rvalue references.
8894
8895 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8896
8897 PR gdb/14441
8898 * aarch64-tdep.c (aarch64_type_align)
8899 (aarch64_extract_return_value, aarch64_store_return_value): Change
8900 lvalue reference type checks to general reference type checks.
8901 * amd64-tdep.c (amd64_classify): Likewise.
8902 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8903 Likewise.
8904 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8905 (arm_store_return_value): Likewise.
8906 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8907 * c-typeprint.c (c_print_type): Likewise.
8908 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8909 (cplus_number_of_children, cplus_describe_child): Likewise.
8910 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8911 * completer.c (expression_completer): Likewise.
8912 * cp-support.c (make_symbol_overload_list_adl_namespace):
8913 Likewise.
8914 * darwin-nat-info.c (info_mach_region_command): Likewise.
8915 * dwarf2loc.c (entry_data_value_coerce_ref)
8916 (value_of_dwarf_reg_entry): Likewise.
8917 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8918 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8919 Likewise.
8920 * findvar.c (extract_typed_address, store_typed_address):
8921 Likewise.
8922 * gdbtypes.c (rank_one_type): Likewise.
8923 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8924 * infcall.c (value_arg_coerce): Likewise.
8925 * language.c (pointer_type): Likewise.
8926 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8927 Likewise.
8928 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8929 * mn10300-tdep.c (mn10300_type_align): Likewise.
8930 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8931 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8932 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8933 Likewise.
8934 * printcmd.c (print_formatted, x_command): Likewise.
8935 * python/py-type.c (typy_get_composite, typy_template_argument):
8936 Likewise.
8937 * python/py-value.c (valpy_referenced_value)
8938 (valpy_get_dynamic_type, value_has_field): Likewise.
8939 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8940 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8941 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8942 * spu-tdep.c (spu_scalar_value_p): Likewise.
8943 * symtab.c (lookup_symbol_aux): Likewise.
8944 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8945 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8946 Likewise.
8947 * valops.c (value_cast_pointers, value_cast)
8948 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8949 (value_struct_elt, value_struct_elt_bitpos)
8950 (value_find_oload_method_list, find_overload_match)
8951 (value_rtti_indirect_type): Likewise.
8952 * valprint.c (val_print_scalar_type_p, generic_val_print):
8953 Likewise.
8954 * value.c (value_actual_type, value_as_address, unpack_long)
8955 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8956 (coerce_ref): Likewise.
8957 * varobj.c (varobj_get_value_type): Likewise.
8958
8959 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8960
8961 PR gdb/14441
8962 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8963 table of constants.
8964 * python/lib/gdb/command/explore.py: Support exploring values
8965 of rvalue reference types.
8966 * python/lib/gdb/types.py: Implement get_basic_type() for
8967 rvalue reference types.
8968 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8969 constant.
8970 * python/py-value.c (valpy_getitem): Add an rvalue reference
8971 check.
8972 (valpy_reference_value): Add new parameter "refcode".
8973 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8974 New wrappers for valpy_reference_value().
8975 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8976 (gdbpy_invoke_xmethod): Likewise.
8977
8978 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8979
8980 PR gdb/14441
8981 * dwarf2read.c (process_die, read_type_die_1): Handle the
8982 DW_TAG_rvalue_reference_type DIE.
8983 (read_tag_reference_type): Add new parameter "refcode".
8984
8985 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8986
8987 PR gdb/14441
8988 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8989 (c_type_print_modifier, c_type_print_varspec_suffix)
8990 (c_type_print_base): Support printing rvalue reference types.
8991 * c-valprint.c (c_val_print, c_value_print): Support printing
8992 rvalue reference values.
8993
8994 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8995
8996 PR gdb/14441
8997 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8998 typename.
8999 * cp-support.c (replace_typedefs): Handle
9000 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9001 * python/py-type.c (typy_lookup_type): Likewise.
9002
9003 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9004
9005 PR gdb/14441
9006 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9007 * parse.c (insert_type): Change assert statement.
9008 (follow_types): Handle rvalue reference types.
9009 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9010 constant.
9011
9012 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9013
9014 PR gdb/14441
9015 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9016 value_ref() interface.
9017 * c-valprint.c (c_value_print): Likewise.
9018 * infcall.c (value_arg_coerce): Likewise.
9019 * python/py-value.c (valpy_reference_value): Likewise.
9020 * valops.c (value_cast, value_reinterpret_cast)
9021 (value_dynamic_cast, typecmp): Likewise.
9022 (value_ref): Parameterize by kind of return value reference type.
9023 * value.h (value_ref): Add new parameter "refcode".
9024
9025 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9026
9027 PR gdb/14441
9028 * dwarf2read.c (read_tag_reference_type): Use
9029 lookup_lvalue_reference_type() instead of lookup_reference_type().
9030 * eval.c (evaluate_subexp_standard): Likewise.
9031 * f-exp.y: Likewise.
9032 * gdbtypes.c (make_reference_type, lookup_reference_type):
9033 Generalize with rvalue reference types.
9034 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9035 convenience wrappers for lookup_reference_type().
9036 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9037 reference kind parameter.
9038 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9039 wrappers for lookup_reference_type().
9040 * guile/scm-type.c (gdbscm_type_reference): Use
9041 lookup_lvalue_reference_type() instead of lookup_reference_type().
9042 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9043 * parse.c (follow_types): Likewise.
9044 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9045 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9046 Likewise.
9047 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9048 (gdbpy_invoke_xmethod): Likewise.
9049 * stabsread.c: Provide extra argument to make_reference_type()
9050 call.
9051 * valops.c (value_ref, value_rtti_indirect_type): Use
9052 lookup_lvalue_reference_type() instead of lookup_reference_type().
9053
9054 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9055
9056 PR gdb/14441
9057 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9058 (TYPE_IS_REFERENCE): New macro.
9059 (struct type): Add rvalue_reference_type field.
9060 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9061
9062 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9063
9064 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9065 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9066 New function definition.
9067 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9068 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9069 New function declaration.
9070 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9071 * mi/mi-interp.h: New file.
9072 * solib.c (info_sharedlibrary_command): Replace for loop with
9073 ALL_SO_LIBS macro
9074 * solib.h (update_solib_list): New function declaration.
9075 (so_list_head): Move macro.
9076 * solist.h (ALL_SO_LIBS): New macro.
9077
9078 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9079
9080 * infcmd.c (post_create_inferior): Remove unused argument in
9081 call to solib_add.
9082 * remote.c (remote_start_remote): Likewise.
9083 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9084 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9085 (enable_break): Likewise.
9086 * solib.c (update_solib_list): Remove unused target argument
9087 and its documentation.
9088 (solib_add): Remove unused target argument. Remove unused
9089 argument in call to update_solib_list.
9090 (info_sharedlibrary_command): Remove unused argument in call
9091 to update_solib_list.
9092 (sharedlibrary_command): Remove unused argument in call to
9093 solib_add.
9094 (handle_solib_event): Likewise.
9095 (reload_shared_libraries): Likewise.
9096 * solib.h (solib_add): Remove unused target argument.
9097
9098 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9099
9100 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9101 (s390_displaced_step_fixup): Cover relative branches with the
9102 default fixup handling. This fixes lack of support for some
9103 relative branch instructions.
9104
9105 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9106
9107 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9108 ptid from regcache.
9109
9110 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9111
9112 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9113 i386_darwin_store_inferior_registers): Use ptid from regcache.
9114
9115 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9116
9117 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9118 i386bsd_store_inferior_registers): Use ptid from regcache.
9119
9120 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9121
9122 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9123 hppaobsd_store_registers): Use ptid from regcache.
9124
9125 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9126
9127 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9128 hppanbsd_store_registers): Use ptid from regcache.
9129
9130 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9131
9132 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9133 from regcache. Use get_ptrace_pid.
9134
9135 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9136
9137 * corelow.c (get_core_register_section): Use ptid from regcache,
9138 update doc.
9139
9140 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9141
9142 * bsd-uthread.c (bsd_uthread_fetch_registers,
9143 bsd_uthread_store_registers): Use ptid from regcache, set and
9144 restore inferior_ptid.
9145
9146 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9147
9148 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9149 fetch_fp_regs, store_register, store_regs, store_fp_register,
9150 store_fp_regs): Use ptid from regcache.
9151
9152 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9153
9154 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9155 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9156 store_vfp_regs): Use ptid from regcache.
9157
9158 2017-03-17 Pedro Alves <palves@redhat.com>
9159
9160 PR remote/21188
9161 * ser-base.c (ser_base_wait_for): Add comment.
9162 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9163 version.
9164 * ser-unix.c (hardwire_raw): Remove reference to
9165 scb->current_timeout.
9166 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9167 (hardwire_ops): Install ser_base_readchar instead of
9168 hardwire_readchar.
9169 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9170 Remove fields.
9171
9172 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9173
9174 PR gdb/19637
9175 * python/lib/gdb/printer/bound_registers.py: Add support for
9176 Python 3.
9177
9178 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9179
9180 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9181 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9182 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9183 byte_offset to subobj_byte_offset. Fix the handling of
9184 DWARF_VALUE_STACK on big-endian targets when coming via an
9185 implicit pointer.
9186 (dwarf2_evaluate_loc_desc): Adjust call to
9187 dwarf2_evaluate_loc_desc_full.
9188 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9189 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9190
9191 2017-03-16 Yao Qi <yao.qi@linaro.org>
9192
9193 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9194 and REVSH instructions.
9195
9196 2017-03-16 Yao Qi <yao.qi@linaro.org>
9197
9198 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9199 (arm_record_test): Declare.
9200 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9201 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9202 align with the manual.
9203 (thumb_record_misc): Adjust the code order to align with the
9204 manual.
9205 (thumb2_record_decode_insn_handler): Fix instruction matching.
9206 (instruction_reader_thumb): New class.
9207 (arm_record_test): New function.
9208
9209 2017-03-16 Yao Qi <yao.qi@linaro.org>
9210
9211 * arm-tdep.c (abstract_memory_reader): New class.
9212 (instruction_reader): New class.
9213 (extract_arm_insn): Add argument 'reader'. Callers updated.
9214 (decode_insn): Likewise.
9215
9216 2017-03-16 Doug Evans <dje@google.com>
9217
9218 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9219 member. Change type of TYPE member to SCM. All uses updated.
9220 (lsscm_make_lazy_string_smob): Add assert.
9221 (lsscm_make_lazy_string): Flag bad length values.
9222 (lsscm_elt_type): New function.
9223 (gdbscm_lazy_string_to_value): Rewrite to use
9224 lsscm_safe_lazy_string_to_value.
9225 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9226 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9227 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9228 in incoming type.
9229 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9230 * guile/scm-type.c (tyscm_scm_to_type): New function.
9231
9232 2017-03-15 Doug Evans <dje@google.com>
9233
9234 PR python/17728, python/18439, python/18779
9235 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9236 member. Change type of TYPE member to PyObject *. All uses updated.
9237 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9238 (gdbpy_create_lazy_string_object): Flag bad length values.
9239 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9240 Handle typedefs in incoming type.
9241 (stpy_lazy_string_elt_type): New function.
9242 (gdbpy_extract_lazy_string): Call it.
9243 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9244 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9245 typedefs in incoming type.
9246
9247 2017-03-16 Doug Evans <dje@google.com>
9248
9249 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9250 * guile/scm-type.c (tyscm_scm_to_type): New function.
9251
9252 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9253
9254 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9255 "ULONGEST" for "skip".
9256
9257 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9258
9259 PR gdb/21220
9260 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9261 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9262 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9263 over ptrace peek/poke until end of buffer or error.
9264
9265 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9266
9267 * parse.c (length_of_subexp): Make static.
9268 * parser-defs.h (length_of_subexp): Remove.
9269
9270 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9271
9272 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9273 as well.
9274
9275 2017-03-14 Pedro Alves <palves@redhat.com>
9276
9277 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9278 (main): Use std::unique_ptr. Remove calls to
9279 cp_demangled_name_parse_free.
9280
9281 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9282
9283 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9284 alphabsd_store_inferior_registers): Use regcache->ptid instead
9285 of inferior_ptid.
9286
9287 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9288
9289 * aix-thread.c (aix_thread_fetch_registers,
9290 aix_thread_store_registers): Use regcache->ptid instead of
9291 inferior_ptid.
9292
9293 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9294
9295 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9296 store_gregs_to_thread, fetch_fpregs_from_thread,
9297 store_fpregs_to_thread): Use regcache->ptid instead of
9298 inferior_ptid.
9299
9300 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9301
9302 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9303 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9304 instead of inferior_ptid.
9305
9306 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9307
9308 * target.c (target_fetch_registers, target_store_registers): Add
9309 assert.
9310
9311 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9312
9313 * regcache.h (regcache_get_ptid): New function.
9314 * regcache.c (regcache_get_ptid): New function.
9315
9316 2017-03-13 Mark Wielaard <mark@klomp.org>
9317
9318 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9319
9320 2017-03-10 Keith Seitz <keiths@redhat.com>
9321
9322 PR c++/8218
9323 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9324
9325 2017-03-08 Pedro Alves <palves@redhat.com>
9326
9327 PR gdb/18360
9328 * infrun.c (start_step_over, do_target_resume, resume)
9329 (restart_threads): Assert we're not resuming a thread that is
9330 meant to be stopped.
9331 (infrun_thread_stop_requested_callback): Delete.
9332 (infrun_thread_stop_requested): If the thread is internally
9333 stopped, queue a pending stop event and clear the thread's
9334 inline-frame state.
9335 (handle_stop_requested): New function.
9336 (handle_syscall_event, handle_inferior_event_1): Use
9337 handle_stop_requested.
9338 (handle_stop_requested): New function.
9339 (handle_signal_stop): Set the thread's stop_signal here instead of
9340 at caller.
9341 (finish_step_over): Clear step over info unconditionally.
9342 (handle_signal_stop): If the user had interrupted the event
9343 thread, consider the stop a random signal.
9344 (handle_signal_stop) <signal arrived while stepping over
9345 breakpoint>: Don't restart threads here.
9346 (stop_waiting): Don't clear step-over info here.
9347
9348 2017-03-08 Pedro Alves <palves@redhat.com>
9349
9350 PR 21206
9351 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9352 goes to argument 2, not 1.
9353
9354 2017-03-08 Pedro Alves <palves@redhat.com>
9355
9356 PR cli/21218
9357 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9358 display_gdb_prompt.
9359 (command_line_input): Add comment.
9360
9361 2017-03-08 Pedro Alves <palves@redhat.com>
9362
9363 PR tui/21216
9364 * tui/tui-file.c (tui_file::write): New.
9365 * tui/tui-file.h (tui_file): Override "write".
9366 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9367 factored out from ...
9368 (tui_puts): ... here.
9369 (tui_putc): Use them.
9370 (tui_write): New function.
9371 * tui/tui-io.h (tui_write): Declare.
9372
9373 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9374
9375 * Makefile.in (SFILES): Replace "environ.c" with
9376 "common/environ.c".
9377 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9378 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9379 to...
9380 * common/environ.c: ... here.
9381 * environ.h: Moved to...
9382 * common/environ.h: ... here.
9383
9384 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9385
9386 * gdbarch.sh (pstring_ptr): New static function.
9387 (gdbarch_disassembler_options): Use it.
9388 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9389 not valid_disassembler_option->name.
9390 * gdbarch.c: Regenerate.
9391
9392 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9393
9394 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9395
9396 2017-03-07 Pedro Alves <palves@redhat.com>
9397
9398 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9399
9400 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9401
9402 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9403 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9404 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9405 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9406
9407 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9408
9409 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9410
9411 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9412
9413 * remote.c (remote_add_target_side_commands): Use range-based
9414 for loop.
9415
9416 2017-03-03 Yao Qi <yao.qi@linaro.org>
9417
9418 PR gdb/21165
9419 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9420 value is lazy.
9421 * valprint.c (common_val_print): Likewise.
9422
9423 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9424
9425 * NEWS: Mention new set/show disassembler-options commands.
9426 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9427 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9428 (prospective_options): New static variable.
9429 (gdb_disassembler::gdb_disassembler): Initialize
9430 m_di.disassembler_options.
9431 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9432 (get_disassembler_options): New function.
9433 (set_disassembler_options): Likewise.
9434 (set_disassembler_options_sfunc): Likewise.
9435 (show_disassembler_options_sfunc): Likewise.
9436 (disassembler_options_completer): Likewise.
9437 (_initialize_disasm): Likewise.
9438 * disasm.h (get_disassembler_options): New prototype.
9439 (set_disassembler_options): Likewise.
9440 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9441 (gdbarch_verify_disassembler_options): Likewise.
9442 * gdbarch.c: Regenerate.
9443 * gdbarch.h: Likewise.
9444 * arm-tdep.c (num_disassembly_options): Delete.
9445 (set_disassembly_style): Likewise.
9446 (arm_disassembler_options): New static variable.
9447 (set_disassembly_style_sfunc): Convert short style name into long
9448 option name. Call set_disassembler_options.
9449 (show_disassembly_style_sfunc): New function.
9450 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9451 set_gdbarch_verify_disassembler_options.
9452 (_initialize_arm_tdep): Delete regnames variable and update callers.
9453 (arm_disassembler_options): Initialize.
9454 (disasm_options): New variable.
9455 (num_disassembly_options): Rename from this...
9456 (num_disassembly_styles): ...to this. Compute by scanning through
9457 disasm_options.
9458 (valid_disassembly_styles): Initialize using disasm_options.
9459 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9460 set_arm_regname_option.
9461 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9462 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9463 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9464 set_gdbarch_verify_disassembler_options.
9465 * s390-tdep.c (s390_disassembler_options): New static variable.
9466 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9467 set_gdbarch_verify_disassembler_options.
9468
9469 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9470
9471 * remote.c (remote_add_target_side_condition): Remove "struct"
9472 keyword from range-based for loop.
9473
9474 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9475
9476 * remote.c (remote_add_target_side_condition): Use range-based
9477 for loop. Update comment.
9478
9479 2017-02-27 Yao Qi <yao.qi@linaro.org>
9480
9481 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9482
9483 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9484
9485 * regcache.c (regcache_raw_update): New function.
9486 (regcache_raw_read): Move code to regcache_raw_update.
9487 * regcache.h (regcache_raw_update): New declaration.
9488 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9489
9490 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9491
9492 * dwarf2read.c (create_debug_type_hash_table): Initialize
9493 header.signature and header.type_offset_in_tu.
9494
9495 2017-02-24 Pedro Alves <palves@redhat.com>
9496
9497 * symtab.c (make_file_symbol_completion_list_1): Use
9498 add_symtab_completions.
9499
9500 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9501
9502 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9503
9504 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9505
9506 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9507 I386_MAX_REGISTER_SIZE.
9508 (i386_pseudo_register_write): Likewise.
9509 (i386_process_record): Likewise.
9510 * i387-tdep.c (i387_supply_xsave): Likewise.
9511 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9512 (store_register): Likewise.
9513
9514 2017-02-23 Pedro Alves <palves@redhat.com>
9515
9516 * ada-lang.c: Include "common/function-view.h".
9517 (ada_iterate_over_symbols): Adjust to use function_view as
9518 callback type.
9519 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9520 (ada_make_symbol_completion_list): Use a lambda.
9521 (ada_exc_search_name_matches): Delete.
9522 (name_matches_regex): New.
9523 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9524 * compile/compile-c-support.c: Include "common/function-view.h".
9525 (print_one_macro): Change prototype to accept a ui_file pointer.
9526 (write_macro_definitions): Use a lambda.
9527 * dwarf2read.c: Include "common/function-view.h".
9528 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9529 (dw2_expand_symtabs_matching): Adjust to use function_view as
9530 callback type.
9531 * language.h: Include "common/function-view.h".
9532 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9533 function_view as callback type.
9534 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9535 * linespec.c: Include "common/function-view.h".
9536 (collect_info::add_symbol): New method.
9537 (struct symbol_and_data_callback, iterate_inline_only, struct
9538 symbol_matcher_data, iterate_name_matcher): Delete.
9539 (iterate_over_all_matching_symtabs): Adjust to use function_view
9540 as callback type and lambdas.
9541 (iterate_over_file_blocks): Adjust to use function_view as
9542 callback type.
9543 (decode_compound_collector): Now a class with private fields.
9544 (decode_compound_collector::release_symbols): New method.
9545 (collect_one_symbol): Rename to...
9546 (decode_compound_collector::operator()): ... this and adjust.
9547 (lookup_prefix_sym): decode_compound_collector construction bits
9548 move to decode_compound_collector ctor. Pass the
9549 decode_compound_collector object directly as callback. Remove
9550 cleanups and use decode_compound_collector::release_symbols
9551 instead.
9552 (symtab_collector): Now a class with private fields.
9553 (symtab_collector::release_symtabs): New method.
9554 (add_symtabs_to_list): Rename to...
9555 (symtab_collector::operator()): ... this and adjust.
9556 (collect_symtabs_from_filename): symtab_collector construction
9557 bits move to symtab_collector ctor. Pass the symtab_collector
9558 object directly as callback. Remove cleanups and use
9559 symtab_collector::release_symtabs instead.
9560 (collect_symbols): Delete.
9561 (add_matching_symbols_to_info): Use lambdas.
9562 * macrocmd.c (print_macro_callback): Delete.
9563 (info_macro_command): Use a lambda.
9564 (info_macros_command): Pass print_macro_definition as callable
9565 directly.
9566 (print_one_macro): Remove 'ignore' parameter.
9567 (macro_list_command): Adjust.
9568 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9569 (macro_for_each_data::user_data): Delete field.
9570 (foreach_macro): Adjust to call the function_view.
9571 (macro_for_each): Adjust to use function_view as callback type.
9572 (foreach_macro_in_scope): Adjust to call the function_view.
9573 (macro_for_each_in_scope): Adjust to use function_view as callback
9574 type.
9575 * macrotab.h: Include "common/function-view.h".
9576 (macro_callback_fn): Declare a prototype instead of a pointer.
9577 Remove "user_data" parameter.
9578 (macro_for_each, macro_for_each_in_scope): Adjust to use
9579 function_view as callback type.
9580 * psymtab.c (partial_map_expand_apply)
9581 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9582 Adjust to use function_view as callback type and to return bool.
9583 (psym_expand_symtabs_matching): Adjust to use function_view as
9584 callback types.
9585 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9586 to use function_view as callback type and to return bool.
9587 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9588 callback types.
9589 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9590 as callback types.
9591 * symfile.h: Include "common/function-view.h".
9592 (expand_symtabs_file_matcher_ftype)
9593 (expand_symtabs_symbol_matcher_ftype)
9594 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9595 return bool.
9596 (quick_symbol_functions::map_symtabs_matching_filename)
9597 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9598 function_view as callback type and return bool.
9599 (expand_symtabs_matching): Adjust to use function_view as callback
9600 type.
9601 (maintenance_expand_name_matcher)
9602 (maintenance_expand_file_matcher): Delete.
9603 (maintenance_expand_symtabs): Use lambdas.
9604 * symtab.c (iterate_over_some_symtabs): Adjust to use
9605 function_view as callback types and return bool.
9606 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9607 of a cleanup.
9608 (lookup_symtab_callback): Delete.
9609 (lookup_symtab): Use a lambda.
9610 (iterate_over_symbols): Adjust to use function_view as callback
9611 type.
9612 (struct search_symbols_data, search_symbols_file_matches)
9613 (search_symbols_name_matches): Delete.
9614 (search_symbols): Use a pair of lambdas.
9615 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9616 (symtab_expansion_callback): Delete.
9617 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9618 * symtab.h: Include "common/function-view.h".
9619 (iterate_over_some_symtabs): Adjust to use function_view as
9620 callback type and return bool.
9621 (iterate_over_symtabs): Adjust to use function_view as callback
9622 type.
9623 (symbol_found_callback_ftype): Remove 'data' parameter and return
9624 bool.
9625 (iterate_over_symbols): Adjust to use function_view as callback
9626 type.
9627
9628 2017-02-23 Pedro Alves <palves@redhat.com>
9629
9630 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9631 (%.o) <unittests/%.c>: New pattern.
9632 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9633 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9634 * common/function-view.h: New file.
9635 * unittests/function-view-selftests.c: New file.
9636 * configure: Regenerate.
9637
9638 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9639
9640 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9641 inferior_ptid.
9642 * go32-nat.c (go32_thread_alive): Likewise.
9643
9644 2017-02-23 Yao Qi <yao.qi@linaro.org>
9645
9646 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9647 delete.
9648
9649 2017-02-23 Yao Qi <yao.qi@linaro.org>
9650
9651 * varobj.c (varobj_clear_saved_item): Use delete instead of
9652 xfree.
9653 (update_dynamic_varobj_children): Likewise.
9654
9655 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9656
9657 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9658
9659 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9660
9661 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9662 m_enum_value to 0 in default constructor.
9663
9664 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9665
9666 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9667 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9668 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9669 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9670 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9671 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9672 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9673 IS_STORE_CONDITIONAL_INSN.
9674
9675 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9676
9677 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9678
9679 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9680
9681 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9682
9683 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9684
9685 * dwarf2read.c (skip_one_die, read_attribute_value)
9686 (dwarf2_const_value_attr, dump_die_shallow)
9687 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9688 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9689
9690 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9691
9692 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9693 (dwarf_parse_macro_header): Accept DWARF version 5.
9694 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9695
9696 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9697
9698 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9699 DW_AT_GNU_*.
9700 * common/common-exceptions.h (enum errors): Likewise.
9701 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9702 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9703 (dwarf_expr_context::execute_stack_op): Likewise.
9704 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9705 Likewise.
9706 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9707 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9708 (show_entry_values_debug, call_site_to_target_addr)
9709 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9710 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9711 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9712 (value_of_dwarf_block_entry, indirect_pieced_value)
9713 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9714 (disassemble_dwarf_expression): Likewise.
9715 * dwarf2read.c (process_die, inherit_abstract_dies)
9716 (read_call_site_scope): Likewise.
9717 * gdbtypes.h (struct func_type, struct call_site_parameter)
9718 (struct call_site): Likewise.
9719 * stack.c (read_frame_arg): Likewise.
9720 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9721
9722 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9723
9724 * defs.h (read_unsigned_leb128): New declaration.
9725 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9726 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9727 (dwarf2_find_location_expression): Call also
9728 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9729 * dwarf2loc.h (dwarf2_version): New declaration.
9730 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9731 rnglists.
9732 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9733 .debug_rnglists.
9734 (struct dwop_section_names): Add loclists_dwo.
9735 (dwop_section_names): Add .debug_loclists.dwo.
9736 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9737 (struct dwarf2_per_cu_data): Add dwarf_version.
9738 (struct dwo_sections): Add loclists.
9739 (struct attr_abbrev): Add implicit_const.
9740 (read_indirect_line_string): New declaration.
9741 (read_unsigned_leb128): Delete declaration.
9742 (rcuh_kind): New definition.
9743 (read_and_check_comp_unit_head): Change parameter
9744 is_debug_types_section to section_kind.
9745 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9746 (read_comp_unit_head): Change parameter abfd to section, add parameter
9747 section_kind. Handle DWARF-5.
9748 (error_check_comp_unit_head): Accept also DWARF version 5.
9749 (read_and_check_comp_unit_head): Change parameter
9750 is_debug_types_section to section_kind.
9751 (read_and_check_type_unit_head): Delete function.
9752 (read_abbrev_offset): Handle DWARF-5.
9753 (create_debug_type_hash_table): Add parameter section_kind. Process
9754 only DW_UT_type. Use signature and type_offset_in_tu from struct
9755 comp_unit_head.
9756 (create_debug_types_hash_table): Update create_debug_type_hash_table
9757 caller.
9758 (create_all_type_units): Call create_debug_type_hash_table.
9759 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9760 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9761 caller.
9762 (skip_one_die): Handle DW_FORM_implicit_const.
9763 (dwarf2_rnglists_process): New function.
9764 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9765 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9766 (read_attribute_value): Handle DW_FORM_implicit_const,
9767 DW_FORM_line_strp.
9768 (read_attribute): Handle DW_FORM_implicit_const.
9769 (read_indirect_string_at_offset_from): New function from
9770 read_indirect_string_at_offset.
9771 (read_indirect_string_at_offset): Call
9772 read_indirect_string_at_offset_from.
9773 (read_indirect_line_string_at_offset): New function.
9774 (read_indirect_string): New function comment.
9775 (read_indirect_line_string): New function.
9776 (read_unsigned_leb128): Make it global.
9777 (dwarf2_string_attr): Handle DWARF-5.
9778 (add_include_dir_stub, read_formatted_entries): New functions.
9779 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9780 Handle DWARF-5.
9781 (per_cu_header_read_in): Update read_comp_unit_head caller.
9782 (dwarf2_version): New function.
9783 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9784 rnglists.
9785 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9786 fields.
9787
9788 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9789
9790 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9791
9792 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9793
9794 * dwarf2read.c (dwarf2_ranges_process): New function from
9795 dwarf2_ranges_read.
9796 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9797 dwarf2_ranges_process.
9798
9799 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9800
9801 * dwarf2read.c (create_debug_type_hash_table): New function from
9802 create_debug_types_hash_table.
9803 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9804 (create_all_type_units, open_and_init_dwo_file): Update
9805 create_debug_types_hash_table callers.
9806
9807 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9808
9809 PR gdb/16188
9810 * fork-child.c (trace_start_error): Fix thinko. va_end should
9811 refer to 'ap', not 'args'.
9812
9813 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9814 Pedro Alves <palves@redhat.com>
9815
9816 PR gdb/16188
9817 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9818 calls succeeded.
9819 * fork-child.c (trace_start_error): New function.
9820 (trace_start_error_with_name): Likewise.
9821 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9822 * inf-ptrace.c (inf_ptrace_me): Likewise.
9823 * inferior.h (trace_start_error): New prototype.
9824 (trace_start_error_with_name): Likewise.
9825
9826 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9827
9828 PR gdb/21164
9829 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9830 NULL before using it.
9831 * symmisc.c (maintenance_print_symbols): Likewise.
9832 (maintenance_print_msymbols): Likewise.
9833
9834 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9835
9836 * NEWS: Add record Python bindings entry.
9837
9838 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9839
9840 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9841 py-record-full.o.
9842 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9843 * python/py-record-btrace.c, python/py-record-btrace.h,
9844 python/py-record-full.c, python/py-record-full.h: New file.
9845 * python/py-record.c: Add include for py-record-btrace.h and
9846 py-record-full.h.
9847 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9848 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9849 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9850 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9851 New definition.
9852 (gdbpy_initialize_btrace): New export.
9853 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9854
9855 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9856
9857 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9858 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9859 * python/py-record.c: New file.
9860 * python/python-internal.h (gdbpy_start_recording,
9861 gdbpy_current_recording, gdpy_stop_recording,
9862 gdbpy_initialize_record): New export.
9863 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9864 (python_GdbMethods): Add gdbpy_start_recording,
9865 gdbpy_current_recording and gdbpy_stop_recording.
9866
9867 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9868
9869 * record-btrace.c (record_btrace_record_method): New function.
9870 (init_record_btrace_ops): Initialize to_record_method.
9871 * record-full.c (record_full_record_method): New function.
9872 (init_record_full_ops, init_record_full_core_ops): Add
9873 record_full_record_method.
9874 * record.h (enum record_method): New enum.
9875 * target-debug.h (target_debug_print_enum_record_method: New define.
9876 * target-delegates.c: Regenerate.
9877 * target.c (target_record_method): New function.
9878 * target.h: Include record.h.
9879 (struct target_ops) <to_record_method>: New field.
9880 (target_record_method): New export.
9881
9882 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9883
9884 * record.h (record_start, record_stop): New export.
9885 * record.c (record_start, record_stop): New function.
9886
9887 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9888
9889 * btrace.c (btrace_fetch): Copy function call segments pointer
9890 into a vector.
9891 (btrace_clear): Clear the vector.
9892 (btrace_find_insn_by_number): Use binary search to find the correct
9893 function call segment.
9894 * btrace.h (brace_fun_p): New typedef.
9895 (struct btrace_thread_info) <functions>: New field.
9896
9897 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9898
9899 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9900 * btrace.c (btrace_decode_error): ... here. New function.
9901 * btrace.h (btrace_decode_error): New export.
9902
9903 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9904
9905 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9906 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9907 btrace_find_insn_by_number): Remove special case for gaps.
9908 * btrace.h (btrace_insn_get_error): New export.
9909 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9910 * record-btrace.c (btrace_insn_history): Print number for gaps.
9911 (record_btrace_info, record_btrace_goto): Handle gaps.
9912
9913 2017-02-14 Tom Tromey <tom@tromey.com>
9914
9915 PR python/13598:
9916 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9917 event.
9918 * python/py-evts.c (gdbpy_initialize_py_events): Add
9919 before_prompt registry.
9920 * python/py-events.h (events_object) <before_prompt>: New field.
9921
9922 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9923
9924 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9925
9926 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9927
9928 * symfile (_initialize_symfile): Add usage text to the load command's
9929 help text.
9930
9931 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9932
9933 * utils.c (defaulted_query): Don't query on secondary UIs.
9934
9935 2017-02-10 Tom Tromey <tom@tromey.com>
9936
9937 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9938
9939 2017-02-10 Tom Tromey <tom@tromey.com>
9940
9941 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9942 "cleanup" local.
9943 * python/py-type.c (typy_legacy_template_argument): Remove
9944 unnecessary "cleanup" local.
9945
9946 2017-02-10 Tom Tromey <tom@tromey.com>
9947
9948 * python/python.c (do_start_initialization): New function, from
9949 _initialize_python.
9950 (_initialize_python): Call do_start_initialization.
9951 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9952 goto.
9953
9954 2017-02-10 Tom Tromey <tom@tromey.com>
9955
9956 * python/py-prettyprint.c (pretty_print_one_value): Use
9957 gdbpy_ref.
9958
9959 2017-02-10 Tom Tromey <tom@tromey.com>
9960
9961 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9962 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9963 gdbpy_ref.
9964 * python/py-type.c (field_new): Use gdbpy_ref.
9965 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9966 gdbpy_ref.
9967 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9968 (py_free_pspace): Likewise.
9969 (pspace_to_pspace_object): Likewise.
9970 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9971 (py_free_objfile): Likewise.
9972 (objfile_to_objfile_object): Likewise.
9973 * python/py-inferior.c (delete_thread_object): Use
9974 gdbpy_ref.
9975 (infpy_read_memory): Likewise.
9976 (py_free_inferior): Likewise.
9977 * python/py-evtregistry.c (create_eventregistry_object): Use
9978 gdbpy_ref.
9979 * python/py-event.c (create_event_object): Use gdbpy_ref.
9980
9981 2017-02-10 Tom Tromey <tom@tromey.com>
9982
9983 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9984 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9985 used.
9986 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9987 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9988 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9989 python/py-framefilter.c, python/py-function.c,
9990 python/py-inferior.c, python/py-infevents.c,
9991 python/py-linetable.c, python/py-newobjfileevent.c,
9992 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9993 python/py-signalevent.c, python/py-stopevent.c,
9994 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9995 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9996 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9997 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9998
9999 2017-02-10 Tom Tromey <tom@tromey.com>
10000
10001 * ui-out.h (ui_out_emit_type): New class.
10002 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10003 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10004 and ui_out_emit_tuple.
10005 (enumerate_locals): Likewise.
10006 (py_mi_print_variables, py_print_locals, py_print_args): Use
10007 ui_out_emit_list.
10008 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10009 ui_out_emit_list.
10010 * common/gdb_optional.h: New file.
10011
10012 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10013
10014 * MAINTAINERS (Write After Approval): Update my e-mail address.
10015
10016 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10017
10018 PR gdb/21122
10019 * breakpoint.c (_initialize_breakpoint): Update the help description
10020 of the 'commands' command to indicate that it takes a list argument.
10021
10022 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10023
10024 * interps.c (current_interp_set_logging): Remove "return".
10025
10026 2017-02-09 Gary Benson <gbenson@redhat.com>
10027
10028 * symtab.c (add_symtab_completions): Prevent NULL pointer
10029 dereference.
10030
10031 2017-02-08 Pedro Alves <palves@redhat.com>
10032
10033 * interps.c (interp::interp): Remove reference to quiet_p.
10034 (interp_set): Make static. Remove dead "Switching to" output
10035 code.
10036 (interp_quiet_p, interp_set_quiet): Delete.
10037 (interpreter_exec_cmd): Don't set the interpreter quiet.
10038 * interps.h (interp_quiet_p): Make static.
10039 (class interp) <quiet_p>: Remove field
10040
10041 2017-02-08 Jerome Guitton <guitton@adacore.com>
10042
10043 * cli/cli-decode.c (find_command_name_length): Make it extern.
10044 * cli/cli-decode.h (find_command_name_length): Declare.
10045 * cli/cli-script.c (command_name_equals, line_first_arg):
10046 New functions.
10047 (process_next_line): Use cli-decode to parse command names.
10048 (build_command_line): Make args a constant pointer.
10049
10050 2017-02-08 Jerome Guitton <guitton@adacore.com>
10051
10052 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10053 Remove case-insensitive search.
10054
10055 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10056
10057 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10058 at the end of the line. Avoids an ARI warning.
10059
10060 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10061
10062 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10063 rdseed instructions.
10064 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10065
10066 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10067
10068 PR tdep/20936
10069 Provide and use sparc32 and sparc64 target description XML files.
10070 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10071 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10072 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10073 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10074 * features/sparc/sparc32-solaris.xml: New file.
10075 * features/sparc/sparc64-solaris.xml: New file.
10076 * features/sparc/sparc32-solaris.c: Generated.
10077 * features/sparc/sparc64-solaris.c: Generated.
10078 * sparc-tdep.h: Account for differences in target descriptions.
10079 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10080 (sparc32_register_type): Use target provided registers.
10081 (validate_tdesc_registers): New function.
10082 (sparc32_gdbarch_init): Use tdesc_has_registers.
10083 Set pseudoregister functions.
10084 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10085 (sparc64_register_type): Use target provided registers.
10086 (sparc64_init_abi): Set pseudoregister functions.
10087
10088 2017-02-03 Tom Tromey <tom@tromey.com>
10089
10090 PR rust/21097:
10091 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10092 with a single member.
10093
10094 2017-02-03 Pedro Alves <palves@redhat.com>
10095
10096 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10097 (cli_interp_base::~cli_interp_base): New.
10098 (cli_interp): New struct.
10099 (as_cli_interp): Cast the interp itself to cli_interp.
10100 (cli_interpreter_pre_command_loop): Rename to ...
10101 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10102 parameter.
10103 (cli_interpreter_init): Rename to ...
10104 (cli_interp::init): ... this. Remove 'self' parameter. Use
10105 boolean. Make extern.
10106 (cli_interpreter_resume): Rename to ...
10107 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10108 extern.
10109 (cli_interpreter_suspend): Rename to ...
10110 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10111 extern.
10112 (cli_interpreter_exec): Rename to ...
10113 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10114 extern.
10115 (cli_interpreter_supports_command_editing): Rename to ...
10116 (cli_interp_base::supports_command_editing): ... this. Remove
10117 'interp' parameter. Make extern.
10118 (cli_ui_out): Rename to ...
10119 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10120 Make extern.
10121 (cli_set_logging): Rename to ...
10122 (cli_interp_base::set_logging): ... this. Remove 'interp'
10123 parameter. Make extern.
10124 (cli_interp_procs): Delete.
10125 (cli_interp_factory): Adjust to use "new".
10126 * cli/cli-interp.h: Include "interps.h".
10127 (struct cli_interp_base): New struct.
10128 * interps.c (struct interp): Delete. Fields moved to interps.h.
10129 (interp_new): Delete.
10130 (interp::interp, interp::~interp): New.
10131 (interp_set): Use bool, and return void. Assume the interpreter
10132 has suspend, init and resume methods, and that the all return
10133 void.
10134 (set_top_level_interpreter): interp_set returns void.
10135 (interp_ui_out): Adapt.
10136 (current_interp_set_logging): Adapt.
10137 (interp_data): Delete.
10138 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10139 (interp_exec): Adapt.
10140 (top_level_interpreter_data): Delete.
10141 * interps.h (interp_init_ftype, interp_resume_ftype)
10142 (interp_suspend_ftype, interp_exec_ftype)
10143 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10144 (class interp): New.
10145 (interp_new): Delete.
10146 (interp_set): Now returns void. Use bool.
10147 (interp_data, top_level_interpreter_data): Delete.
10148 * mi/mi-common.h: Include interps.h.
10149 (class mi_interp): Inherit from interp. Define a ctor. Declare
10150 init, resume, suspect, exec, interp_ui_out, set_logging and
10151 pre_command_loop methods.
10152 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10153 (mi_interpreter_init): Rename to ...
10154 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10155 bool, return void and make extern. Adjust.
10156 (mi_interpreter_resume): ... Rename to ...
10157 (mi_interp::resume): ... this. Remove the 'data' parameter,
10158 return void and make extern. Adjust.
10159 (mi_interpreter_suspend): ... Rename to ...
10160 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10161 return void and make extern. Adjust.
10162 (mi_interpreter_exec): ... Rename to ...
10163 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10164 extern. Adjust.
10165 (mi_interpreter_pre_command_loop): ... Rename to ...
10166 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10167 parameter and make extern.
10168 (mi_on_normal_stop_1): Adjust.
10169 (mi_ui_out): Rename to ...
10170 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10171 parameter and make extern. Adjust.
10172 (mi_set_logging): Rename to ...
10173 (mi_interp::set_logging): ... this. Remove the 'interp'
10174 parameter and make extern. Adjust.
10175 (mi_interp_procs): Delete.
10176 (mi_interp_factory): Adjust to use 'new'.
10177 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10178 (mi_print_exception, mi_execute_command, mi_load_progress):
10179 Adjust.
10180 * tui/tui-interp.c (tui_interp): New class.
10181 (as_tui_interp): Return a tui_interp pointer.
10182 (tui_on_normal_stop, tui_on_signal_received)
10183 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10184 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10185 to use interp::interp_ui_out.
10186 (tui_init): Rename to ...
10187 (tui_interp::init): ... this. Remove the 'self' parameter, use
10188 bool, return void and make extern. Adjust.
10189 (tui_resume): Rename to ...
10190 (tui_interp::resume): ... this. Remove the 'data' parameter,
10191 return void and make extern. Adjust.
10192 (tui_suspend): Rename to ...
10193 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10194 return void and make extern. Adjust.
10195 (tui_ui_out): Rename to ...
10196 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10197 parameter, and make extern. Adjust.
10198 (tui_exec): Rename to ...
10199 (tui_interp::exec): ... this. Remove the 'data' parameter and
10200 make extern.
10201 (tui_interp_procs): Delete.
10202 (tui_interp_factory): Use "new".
10203
10204 2017-02-02 Tom Tromey <tom@tromey.com>
10205
10206 * rust-exp.y (ends_raw_string, space_then_number)
10207 (rust_identifier_start_p): Return bool.
10208 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10209 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10210 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10211 (rust_chartype_p): Return bool.
10212 (val_print_struct, rust_print_struct_def, rust_print_type):
10213 Update.
10214 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10215 Return bool.
10216
10217 2017-02-02 Tom Tromey <tom@tromey.com>
10218
10219 * rust-lang.c: Reindent.
10220
10221 2017-02-02 Tom Tromey <tom@tromey.com>
10222
10223 * rust-lang.h (rust_crate_for_block): Update.
10224 * rust-lang.c (rust_crate_for_block): Return std::string.
10225 (rust_get_disr_info): Use std:;string, not
10226 gdb::unique_xmalloc_ptr.
10227 * rust-exp.y (crate_name): Update.
10228
10229 2017-02-02 Pedro Alves <palves@redhat.com>
10230
10231 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10232 field out of gdb_disassembler_test and make it static.
10233
10234 2017-02-02 Pedro Alves <palves@redhat.com>
10235
10236 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10237 mi1_interp and mi_interp fields.
10238
10239 2017-02-02 Pedro Alves <palves@redhat.com>
10240
10241 * cli/cli-interp.c (struct saved_output_files, saved_output):
10242 Moved from cli/cli-logging.c.
10243 (cli_set_logging): New function.
10244 (cli_interp_procs): Install cli_set_logging.
10245 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10246 Declare.
10247 * cli/cli-logging.c (struct saved_output_files, saved_output):
10248 Moved to cli/cli-interp.c.
10249 (pop_output_files): Don't save outputs here.
10250 (make_logging_output): New function.
10251 (handle_redirections): Don't build tee nor save previous outputs
10252 here.
10253 * interps.c (current_interp_set_logging): Change prototype.
10254 Assume there's always a set_logging_proc method installed.
10255 * interps.h (interp_set_logging_ftype): Change prototype.
10256 (current_interp_set_logging): Change prototype and adjust comment.
10257 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10258 use make_logging_output.
10259 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10260 2017-02-02 Pedro Alves <palves@redhat.com>
10261
10262 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10263 from ...
10264 (set_logging_overwrite): ... here.
10265 (logging_no_redirect_file): Delete.
10266 (set_logging_redirect): Don't handle redirection on the fly.
10267 Instead warn that "logging off" / "logging on" is necessary.
10268 (pop_output_files): Delete references to logging_no_redirect_file.
10269 (show_logging_command): Always speak in terms of what will happen
10270 once logging is reenabled.
10271
10272 2017-02-02 Pedro Alves <palves@redhat.com>
10273
10274 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10275
10276 2017-02-02 Pedro Alves <palves@redhat.com>
10277
10278 * disasm.c (gdb_pretty_print_insn): Rename to ...
10279 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10280 Remove gdbarch parameter. Adapt to clear the object's buffers
10281 instead of allocating new buffers, and to print using the object's
10282 gdb_disassembler instead of calling gdb_print_insn.
10283 (dump_insns): Use gdb_pretty_print_disassembler.
10284 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10285 (gdb_pretty_print_disassembler): New class.
10286 * record-btrace.c (btrace_insn_history): Use
10287 gdb_pretty_print_disassembler.
10288
10289 2017-02-02 Pedro Alves <palves@redhat.com>
10290
10291 * ada-lang.c (type_as_string): Use string_file.
10292 * ada-valprint.c (ada_print_floating): Use string_file.
10293 * ada-varobj.c (ada_varobj_scalar_image)
10294 (ada_varobj_get_value_image): Use string_file.
10295 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10296 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10297 * breakpoint.c (update_inserted_breakpoint_locations)
10298 (insert_breakpoint_locations, reattach_breakpoints)
10299 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10300 (print_it_watchpoint): Use string_file.
10301 (save_breakpoints): Use stdio_file.
10302 * c-exp.y (oper): Use string_file.
10303 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10304 tee_file.
10305 (pop_output_files): Use delete.
10306 (handle_redirections): Use stdio_file and tee_file.
10307 * cli/cli-setshow.c (do_show_command): Use string_file.
10308 * compile/compile-c-support.c (c_compute_program): Use
10309 string_file.
10310 * compile/compile-c-symbols.c (generate_vla_size): Take a
10311 'string_file &' instead of a 'ui_file *'.
10312 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10313 of a 'ui_file *'. Use string_file.
10314 (generate_c_for_variable_locations): Take a 'string_file &'
10315 instead of a 'ui_file *'.
10316 * compile/compile-internal.h (generate_c_for_for_one_variable):
10317 Take a 'string_file &' instead of a 'ui_file *'.
10318 * compile/compile-loc2c.c (push, pushf, unary, binary)
10319 (print_label, pushf_register_address, pushf_register)
10320 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10321 'ui_file *'. Adjust.
10322 * compile/compile.c (compile_to_object): Use string_file.
10323 * compile/compile.h (compile_dwarf_expr_to_c)
10324 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10325 'ui_file *'.
10326 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10327 (replace_typedefs_qualified_name): Use string_file and
10328 obstack_copy0.
10329 * disasm.c (gdb_pretty_print_insn): Use string_file.
10330 (gdb_disassembly): Adjust reference the null_stream global.
10331 (do_ui_file_delete): Delete.
10332 (gdb_insn_length): Use null_stream.
10333 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10334 * dwarf2loc.c (dwarf2_compile_property_to_c)
10335 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10336 'string_file &' instead of a 'ui_file *'.
10337 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10338 * dwarf2read.c (do_ui_file_peek_last): Delete.
10339 (dwarf2_compute_name): Use string_file.
10340 * event-top.c (gdb_setup_readline): Use stdio_file.
10341 * gdbarch.sh (verify_gdbarch): Use string_file.
10342 * gdbtypes.c (safe_parse_type): Use null_stream.
10343 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10344 string_file.
10345 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10346 'string_file *' instead of a 'ui_file *'.
10347 (gdbscm_arch_disassemble): Use string_file.
10348 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10349 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10350 inherits from ui_file.
10351 (ioscm_file_port_delete, ioscm_file_port_rewind)
10352 (ioscm_file_port_put): Delete.
10353 (ioscm_file_port_write): Rename to ...
10354 (ioscm_file_port::write): ... this. Remove file_port_magic
10355 checks.
10356 (ioscm_file_port_new): Delete.
10357 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10358 ui_file_up.
10359 * guile/scm-type.c (tyscm_type_name): Use string_file.
10360 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10361 Use string_file.
10362 * infcmd.c (print_return_value_1): Use string_file.
10363 * infrun.c (print_target_wait_results): Use string_file.
10364 * language.c (add_language): Use string_file.
10365 * location.c (explicit_to_string_internal): Use string_file.
10366 * main.c (captured_main_1): Use null_file.
10367 * maint.c (maintenance_print_architecture): Use stdio_file.
10368 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10369 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10370 event_channel>: Change type to mi_console_file pointer.
10371 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10372 (mi_console_file_delete): Delete.
10373 (struct mi_console_file): Delete.
10374 (mi_console_file_magic): Delete.
10375 (mi_console_file_new): Delete.
10376 (mi_console_file::mi_console_file): New.
10377 (mi_console_file_delete): Delete.
10378 (mi_console_file_fputs): Delete.
10379 (mi_console_file::write): New.
10380 (mi_console_raw_packet): Delete.
10381 (mi_console_file::flush): New.
10382 (mi_console_file_flush): Delete.
10383 (mi_console_set_raw): Rename to ...
10384 (mi_console_file::set_raw): ... this.
10385 * mi/mi-console.h (class mi_console_file): New class.
10386 (mi_console_file_new, mi_console_set_raw): Delete.
10387 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10388 (mi_set_logging): Use delete and tee_file. Adjust.
10389 * mi/mi-main.c (output_register): Use string_file.
10390 (mi_cmd_data_evaluate_expression): Use string_file.
10391 (mi_cmd_data_read_memory): Use string_file.
10392 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10393 * mi/mi-out.c (mi_ui_out::main_stream): New.
10394 (mi_ui_out::rewind): Use main_stream and
10395 string_file.
10396 (mi_ui_out::put): Use main_stream and string_file.
10397 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10398 Allocate a 'string_file' instead.
10399 (mi_out_new): Don't allocate a mem_fileopen stream here.
10400 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10401 (mi_ui_out::main_stream): Declare method.
10402 * printcmd.c (eval_command): Use string_file.
10403 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10404 * python/py-arch.c (archpy_disassemble): Use string_file.
10405 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10406 * python/py-frame.c (frapy_str): Use string_file.
10407 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10408 Use string_file.
10409 * python/py-type.c (typy_str): Use string_file.
10410 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10411 * python/py-value.c (valpy_str): Use string_file.
10412 * record-btrace.c (btrace_insn_history): Use string_file.
10413 * regcache.c (regcache_print): Use stdio_file.
10414 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10415 * remote.c (escape_buffer): Use string_file.
10416 * rust-lang.c (rust_get_disr_info): Use string_file.
10417 * serial.c (serial_open_ops_1): Use stdio_file.
10418 (do_serial_close): Use delete.
10419 * stack.c (print_frame_arg): Use string_file.
10420 (print_frame_args): Remove local mem_fileopen stream, not used.
10421 (print_frame): Use string_file.
10422 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10423 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10424 Take a 'string_file *' instead of a 'ui_file *'.
10425 * top.c (new_ui): Use stdio_file and stderr_file.
10426 (free_ui): Use delete.
10427 (execute_command_to_string): Use string_file.
10428 (quit_confirm): Use string_file.
10429 * tracepoint.c (collection_list::append_exp): Use string_file.
10430 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10431 * tui/tui-file.c: Don't include "ui-file.h".
10432 (enum streamtype, struct tui_stream): Delete.
10433 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10434 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10435 (tui_file::tui_file): New method.
10436 (tui_file_fputs): Delete.
10437 (tui_file_get_strbuf): Delete.
10438 (tui_file::puts): New method.
10439 (tui_file_adjust_strbuf): Delete.
10440 (tui_file_flush): Delete.
10441 (tui_file::flush): New method.
10442 * tui/tui-file.h: Tweak intro comment.
10443 Include ui-file.h.
10444 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10445 (tui_file_adjust_strbuf): Delete declarations.
10446 (class tui_file): New class.
10447 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10448 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10449 (tui_register_format): Use string_stream.
10450 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10451 (tui_get_function_from_frame): Use string_file.
10452 * typeprint.c (type_to_string): Use string_file.
10453 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10454 (null_stream): New global.
10455 (ui_file_delete): Delete.
10456 (ui_file::ui_file): New.
10457 (null_file_isatty): Delete.
10458 (ui_file::~ui_file): New.
10459 (null_file_rewind): Delete.
10460 (ui_file::printf): New.
10461 (null_file_put): Delete.
10462 (null_file_flush): Delete.
10463 (ui_file::putstr): New.
10464 (null_file_write): Delete.
10465 (ui_file::putstrn): New.
10466 (null_file_read): Delete.
10467 (ui_file::putc): New.
10468 (null_file_fputs): Delete.
10469 (null_file_write_async_safe): Delete.
10470 (ui_file::vprintf): New.
10471 (null_file_delete): Delete.
10472 (null_file::write): New.
10473 (null_file_fseek): Delete.
10474 (null_file::puts): New.
10475 (ui_file_data): Delete.
10476 (null_file::write_async_safe): New.
10477 (gdb_flush, ui_file_isatty): Adjust.
10478 (ui_file_put, ui_file_rewind): Delete.
10479 (ui_file_write): Adjust.
10480 (ui_file_write_for_put): Delete.
10481 (ui_file_write_async_safe, ui_file_read): Adjust.
10482 (ui_file_fseek): Delete.
10483 (fputs_unfiltered): Adjust.
10484 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10485 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10486 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10487 (set_ui_file_data): Delete.
10488 (string_file::~string_file, string_file::write)
10489 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10490 (do_ui_file_as_string, ui_file_as_string): Delete.
10491 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10492 (struct mem_file): Delete.
10493 (mem_file_new): Delete.
10494 (stdio_file::stdio_file): New.
10495 (mem_file_delete): Delete.
10496 (stdio_file::stdio_file): New.
10497 (mem_fileopen): Delete.
10498 (stdio_file::~stdio_file): New.
10499 (mem_file_rewind): Delete.
10500 (stdio_file::set_stream): New.
10501 (mem_file_put): Delete.
10502 (stdio_file::open): New.
10503 (mem_file_write): Delete.
10504 (stdio_file_magic, struct stdio_file): Delete.
10505 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10506 (stdio_file::flush): New.
10507 (stdio_file_read): Rename to ...
10508 (stdio_file::read): ... this. Adjust.
10509 (stdio_file_write): Rename to ...
10510 (stdio_file::write): ... this. Adjust.
10511 (stdio_file_write_async_safe): Rename to ...
10512 (stdio_file::write_async_safe) ... this. Adjust.
10513 (stdio_file_fputs): Rename to ...
10514 (stdio_file::puts) ... this. Adjust.
10515 (stdio_file_isatty): Delete.
10516 (stdio_file_fseek): Delete.
10517 (stdio_file::isatty): New.
10518 (stderr_file_write): Rename to ...
10519 (stderr_file::write) ... this. Adjust.
10520 (stderr_file_fputs): Rename to ...
10521 (stderr_file::puts) ... this. Adjust.
10522 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10523 (stderr_file::stderr_file): New.
10524 (tee_file_magic): Delete.
10525 (struct tee_file): Delete.
10526 (tee_file::tee_file): New.
10527 (tee_file_new): Delete.
10528 (tee_file::~tee_file): New.
10529 (tee_file_delete): Delete.
10530 (tee_file_flush): Rename to ...
10531 (tee_file::flush): ... this. Adjust.
10532 (tee_file_write): Rename to ...
10533 (tee_file::write): ... this. Adjust.
10534 (tee_file::write_async_safe): New.
10535 (tee_file_fputs): Rename to ...
10536 (tee_file::puts): ... this. Adjust.
10537 (tee_file_isatty): Rename to ...
10538 (tee_file::isatty): ... this. Adjust.
10539 * ui-file.h (struct obstack, struct ui_file): Don't
10540 forward-declare.
10541 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10542 (ui_file_write_ftype)
10543 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10544 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10545 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10546 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10547 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10548 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10549 (set_ui_file_fseek): Delete.
10550 (ui_file_data, ui_file_delete, ui_file_rewind)
10551 (struct ui_file): New.
10552 (ui_file_up): New.
10553 (class null_file): New.
10554 (null_stream): Declare.
10555 (ui_file_write_for_put, ui_file_put): Delete.
10556 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10557 Delete.
10558 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10559 (gdb_fopen, tee_file_new): Delete.
10560 (struct string_file): New.
10561 (struct stdio_file): New.
10562 (stdio_file_up): New.
10563 (struct stderr_file): New.
10564 (class tee_file): New.
10565 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10566 of a 'ui_file *'. Adjust.
10567 * ui-out.h (class ui_out) <field_stream>: Likewise.
10568 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10569 (null_stream): Delete.
10570 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10571 Adjust.
10572 * utils.h (struct ui_file): Delete forward declaration..
10573 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10574 (error_stream): Take a 'string_file &' instead of a
10575 'ui_file *'.
10576 * varobj.c (varobj_value_get_print_value): Use string_file.
10577 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10578 * gdbarch.c: Regenerate.
10579
10580 2017-02-02 Pedro Alves <palves@redhat.com>
10581
10582 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10583 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10584 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10585 Adjust to call gdb_print_insn instead of
10586 gdb_disassembler::print_insn.
10587 (dump_insns, do_mixed_source_and_assembly_deprecated)
10588 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10589 'gdbarch' parameter. Remove gdb_disassembler parameter.
10590 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10591 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10592 declaration.
10593 (gdb_pretty_print_insn): Re-add declaration.
10594 * record-btrace.c (btrace_insn_history): Don't allocate a
10595 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10596
10597 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10598
10599 * disasm.h (gdb_disassembly): Remove file_string parameter.
10600 * disasm.c (gdb_disassembly): Likewise.
10601 * cli/cli-cmds.c (print_disassembly): Adapt.
10602 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10603 * stack.c (do_gdb_disassembly): Likewise.
10604
10605 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10606
10607 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10608 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10609 targets. And if the implicit value is longer than needed, extract
10610 the first bytes instead of the "least significant" ones.
10611
10612 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10613
10614 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10615 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10616 (btrace_fetch): Assert can_access_registers_ptid.
10617 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10618 validate_registers_access.
10619
10620 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10621
10622 * gdbthread.h (can_access_registers_ptid): New.
10623 * thread.c (can_access_registers_ptid): New.
10624
10625 2017-02-01 Pedro Alves <palves@redhat.com>
10626
10627 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10628
10629 2017-01-31 Pedro Alves <palves@redhat.com>
10630
10631 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10632 Fix typos.
10633
10634 2017-01-31 Pedro Alves <palves@redhat.com>
10635
10636 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10637 not used.
10638
10639 2017-01-31 Pedro Alves <palves@redhat.com>
10640
10641 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10642
10643 2017-01-31 Pedro Alves <palves@redhat.com>
10644
10645 * common/scoped_restore.h
10646 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10647 change the value's parameter type to T2.
10648 (make_scoped_restore): Likewise.
10649
10650 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10651 Richard Henderson <rth@redhat.com>
10652
10653 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10654 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10655 GS_BASE for older kernels.
10656 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10657 GS_BASE for older kernels.
10658 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10659 and GS_BASE to the offset table.
10660 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10661 system register group.
10662 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10663 for older kernels.
10664 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10665 amd64 ABI.
10666 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10667 AMD64_GSBASE_REGNUM.
10668 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10669 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10670 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10671 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10672 i386/64bit-segments.xml in those rules.
10673 * features/i386/64bit-segments.xml: New file.
10674 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10675 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10676 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10677 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10678 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10679 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10680 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10681 * features/i386/amd64-avx-linux.c: Regenerated.
10682 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10683 * features/i386/amd64-avx-mpx.c: Regenerated.
10684 * features/i386/amd64-avx512-linux.c: Regenerated.
10685 * features/i386/amd64-linux.c: Regenerated.
10686 * features/i386/amd64-mpx-linux.c: Regenerated.
10687 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10688 * features/i386/i386-avx-mpx.c: Regenerated.
10689 * features/i386/x32-avx-linux.c: Regenerated.
10690 * features/i386/x32-avx512-linux.c: Regenerated.
10691 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10692 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10693 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10694 * regformats/i386/amd64-linux.dat: Regenerated.
10695 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10696 * regformats/i386/x32-avx-linux.dat: Regenerated.
10697 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10698 * regformats/i386/x32-linux.dat: Regenerated.
10699
10700 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10701
10702 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10703 Set to AMD64_NUM_REGS.
10704
10705 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10706
10707 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10708 that checks validity of a register number.
10709
10710 2017-01-27 Kees Cook <keescook@google.com>
10711
10712 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10713 fetch_fpregs if target has fpa registers.
10714 (arm_linux_store_inferior_registers): Call store_fpregs if target
10715 has fpa registers.
10716
10717 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10718
10719 * cris-tdep.c (cris_gdbarch_init): Remove check for
10720 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10721
10722 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10723
10724 * corelow.c (get_core_register_section): Check for regset
10725 existence before checking for REGSET_VARIABLE_SIZE.
10726
10727 2017-01-26 Yao Qi <yao.qi@linaro.org>
10728 Pedro Alves <palves@redhat.com>
10729
10730 PR gdb/20939
10731 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10732 call memory_error, save memaddr instead.
10733 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10734 negative, cal memory_error.
10735 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10736
10737 2017-01-26 Yao Qi <yao.qi@linaro.org>
10738
10739 * disasm-selftests.c (memory_error_test): New function.
10740 (_initialize_disasm_selftests): Register memory_error_test.
10741
10742 2017-01-26 Yao Qi <yao.qi@linaro.org>
10743
10744 * Makefile.in (SFILES): Add disasm-selftests.c and
10745 selftest-arch.c.
10746 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10747 * disasm-selftests.c: New file.
10748 * selftest-arch.c: New file.
10749 * selftest-arch.h: New file.
10750
10751 2017-01-26 Yao Qi <yao.qi@linaro.org>
10752
10753 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10754 to bfd_arch_mep. Don't return 0 if section is not
10755 found. Call print_insn_mep.
10756
10757 2017-01-26 Pedro Alves <palves@redhat.com>
10758 Yao Qi <yao.qi@linaro.org>
10759
10760 * arm-tdep.c: Include "disasm.h".
10761 (gdb_print_insn_arm): Update code to get gdbarch.
10762 * disasm.c (dis_asm_read_memory): Change it to
10763 gdb_disassembler::dis_asm_read_memory.
10764 (dis_asm_memory_error): Likewise.
10765 (dis_asm_print_address): Likewise.
10766 (gdb_pretty_print_insn): Change it to
10767 gdb_disassembler::pretty_print_insn.
10768 (dump_insns): Add one argument gdb_disassemlber. All
10769 callers updated.
10770 (do_mixed_source_and_assembly_deprecated): Likewise.
10771 (do_mixed_source_and_assembly): Likewise.
10772 (do_assembly_only): Likewise.
10773 (gdb_disassembler::gdb_disassembler): New.
10774 (gdb_disassembler::print_insn): New.
10775 * disasm.h (class gdb_disassembler): New.
10776 (gdb_pretty_print_insn): Remove declaration.
10777 (gdb_disassemble_info): Likewise.
10778 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10779 (gdbscm_disasm_read_memory_worker): Update.
10780 (gdbscm_disasm_read_memory): Update.
10781 (gdbscm_disasm_memory_error): Remove.
10782 (gdbscm_disasm_print_address): Remove.
10783 (gdbscm_disassembler::gdbscm_disassembler): New.
10784 (gdbscm_print_insn_from_port): Update.
10785 * mips-tdep.c: Include disasm.h.
10786 (gdb_print_insn_mips): Update code to get gdbarch.
10787 * record-btrace.c (btrace_insn_history): Update.
10788 * spu-tdep.c: Include disasm.h.
10789 (struct spu_dis_asm_data): Remove.
10790 (struct spu_dis_asm_info): New.
10791 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10792 SPU id.
10793 (gdb_print_insn_spu): Cast disassemble_info to
10794 spu_dis_asm_info.
10795
10796 2017-01-26 Yao Qi <yao.qi@linaro.org>
10797
10798 * disasm.c (do_ui_file_delete): Delete.
10799 (gdb_insn_length): Move code creating stream to ...
10800 * utils.c (null_stream): ... here. New function.
10801 * utils.h (null_stream): Declare.
10802
10803 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10804
10805 * python/py-inferior.c (find_thread_object): Return directly
10806 from the loop. Remove "found" variable.
10807
10808 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10809
10810 GDB 7.12.1 released.
10811
10812 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10813
10814 * python/py-function.c (fnpy_call): Reorder declarations to have
10815 the gdbpy_enter object declared first.
10816 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10817
10818 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10819
10820 PR python/21068
10821 * python/python-internal.h (PyMem_RawMalloc): Define for
10822 Python < 3.4.
10823 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10824 PyMem_RawMalloc instead of PyMem_Malloc.
10825
10826 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10827 Luis Machado <lgustavo@codesourcery.com>
10828
10829 * NEWS (New commands): Mention flash-erase.
10830 (New MI commands): Mention target-flash-erase.
10831 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10832 command.
10833 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10834 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10835 * target.c (flash_erase_command): New function.
10836 (initialize_targets): Add new flash-erase command.
10837 * target.h (flash_erase_command): New declaration.
10838
10839 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10840
10841 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10842 HAVE_SYS_PROCFS_H is defined.
10843
10844 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10845
10846 * remote.c (struct cached_reg): Change data into a pointer.
10847 * (stop_reply_dtr): Free data pointers before deleting vector.
10848 (process_stop_reply): Likewise.
10849 (remote_parse_stop_reply): Allocate space for data
10850
10851 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10852
10853 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10854 MAX_REGISTER_SIZE.
10855 (amd64_pseudo_register_read_value): Likewise.
10856 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10857 (store_register_using_P): Likewise.
10858 * regcache.c (regcache_xfer_part): Likewise.
10859
10860 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10861
10862 Split real and pseudo registers.
10863 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10864 (sparc32_pseudo_regnum): New enum.
10865 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10866 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10867 (SPARC32_CP0_REGISTERS): New macro.
10868 (sparc32_pseudo_register_name): New function.
10869 (sparc32_register_name): Use sparc32_pseudo_register_name.
10870 (sparc32_pseudo_register_type): New function.
10871 (sparc32_register_type): Use sparc32_pseudo_register_type.
10872 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10873 pseudo register numbers.
10874 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10875 (SPARC64_CP0_REGISTERS): New macro.
10876 (sparc64_pseudo_register_name): New function.
10877 (sparc64_register_name): Use sparc64_pseudo_register_name.
10878 (sparc64_pseudo_register_type): New function.
10879 (sparc64_register_type): Use sparc64_pseudo_register_type.
10880 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10881 pseudo register numbers.
10882 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10883 sparc64_store_arguments): Handle pseudo register numbers.
10884
10885 2017-01-13 Yao Qi <yao.qi@linaro.org>
10886
10887 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10888 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10889 output.
10890 (getpkt_or_notif_sane_1): Likewise.
10891
10892 2017-01-13 Yao Qi <yao.qi@linaro.org>
10893
10894 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10895 of CC. Pass "-x c++-header" instead of "-x c".
10896
10897 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10898
10899 * remote.c (remote_can_async_p): Update comment.
10900
10901 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10902
10903 * linux-nat.c (linux_nat_can_async_p): Update comment.
10904
10905 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10906
10907 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10908
10909 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10910
10911 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10912
10913 2017-01-10 Tom Tromey <tom@tromey.com>
10914
10915 * python/py-type.c (typy_legacy_template_argument): Update.
10916 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10917 ~demangle_parse_info): Declare new members.
10918 (cp_demangled_name_to_comp): Return unique_ptr.
10919 (cp_demangled_name_parse_free)
10920 (make_cleanup_cp_demangled_name_parse_free)
10921 (cp_new_demangle_parse_info): Remove.
10922 * cp-support.c (do_demangled_name_parse_free_cleanup)
10923 (make_cleanup_cp_demangled_name_parse_free): Remove.
10924 (inspect_type, cp_canonicalize_string_full)
10925 (cp_canonicalize_string): Update.
10926 (mangled_name_to_comp): Change return type.
10927 (cp_class_name_from_physname, method_name_from_physname)
10928 (cp_func_name, cp_remove_params): Update.
10929 * cp-name-parser.y (demangle_parse_info): New constructor, from
10930 cp_new_demangle_parse_info.
10931 (~demangle_parse_info): New destructor, from
10932 cp_demangled_name_parse_free.
10933 (cp_merge_demangle_parse_infos): Update.
10934 (cp_demangled_name_to_comp): Change return type.
10935
10936 2017-01-10 Tom Tromey <tom@tromey.com>
10937
10938 * top.c (prevent_dont_repeat): Change return type.
10939 * python/python.c (execute_gdb_command): Use std::string.
10940 Update.
10941 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10942 * command.h (prevent_dont_repeat): Change return type.
10943 * breakpoint.c (bpstat_do_actions_1): Update.
10944
10945 2017-01-10 Tom Tromey <tom@tromey.com>
10946
10947 * value.h (scoped_value_mark::~scoped_value_mark): Call
10948 free_to_mark.
10949 (scoped_value_mark::free_to_mark): New method.
10950 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10951 scoped_value_mark.
10952
10953 2017-01-10 Tom Tromey <tom@tromey.com>
10954
10955 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10956 (valpy_reference_value, valpy_const_value, valpy_get_address)
10957 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10958 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10959 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10960 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10961 scoped_value_mark.
10962 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10963 * value.h (scoped_value_mark): New class.
10964
10965 2017-01-10 Tom Tromey <tom@tromey.com>
10966
10967 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10968 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10969 * psymtab.c (discard_psymtabs_upto): Remove.
10970 (make_cleanup_discard_psymtabs): Remove.
10971 (struct psymtab_state): Remove.
10972
10973 2017-01-10 Tom Tromey <tom@tromey.com>
10974
10975 * record-full.c (record_full_save_cleanups): Remove.
10976 (record_full_save): Use gdb::unlinker.
10977 * gcore.c (do_bfd_delete_cleanup): Remove.
10978 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10979 cleanups.
10980 * dwarf2read.c (unlink_if_set): Remove.
10981 (write_psymtabs_to_index): Use gdb::unlinker.
10982 * common/gdb_unlinker.h: New file.
10983
10984 2017-01-10 Tom Tromey <tom@tromey.com>
10985
10986 * windows-tdep.c (windows_xfer_shared_library): Update.
10987 * windows-nat.c (windows_make_so): Update.
10988 * utils.h (make_cleanup_bfd_unref): Remove.
10989 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10990 * symfile.h (symfile_bfd_open)
10991 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10992 * symfile.c (read_symbols, symbol_file_add)
10993 (separate_debug_file_exists): Update.
10994 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10995 (generic_load, reread_symbols): Update.
10996 * symfile-mem.c (symbol_file_add_from_memory): Update.
10997 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10998 (spu_symbol_file_add_from_memory): Update.
10999 * solist.h (struct target_so_ops) <bfd_open>: Return
11000 gdb_bfd_ref_ptr.
11001 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11002 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11003 gdb_bfd_ref_ptr.
11004 (solib_map_sections, reload_shared_libraries_1): Update.
11005 * solib-svr4.c (enable_break): Update.
11006 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11007 * solib-frv.c (enable_break2): Update.
11008 * solib-dsbt.c (enable_break): Update.
11009 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11010 gdb_bfd_ref_ptr.
11011 (darwin_solib_get_all_image_info_addr_at_init): Update.
11012 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11013 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11014 * record-full.c (record_full_save): Update.
11015 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11016 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11017 * minidebug.c (find_separate_debug_file_in_section): Return
11018 gdb_bfd_ref_ptr.
11019 * machoread.c (macho_add_oso_symfile): Change abfd to
11020 gdb_bfd_ref_ptr.
11021 (macho_symfile_read_all_oso): Update.
11022 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11023 (macho_symfile_read): Update.
11024 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11025 (jit_bfd_try_read_symtab): Update.
11026 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11027 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11028 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11029 gdb_bfd_ref_ptr.
11030 (gdb_bfd_ref_policy): New struct.
11031 (gdb_bfd_ref_ptr): New typedef.
11032 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11033 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11034 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11035 gdb_bfd_ref_ptr.
11036 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11037 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11038 (gcore_command): Update.
11039 * exec.c (exec_file_attach): Update.
11040 * elfread.c (elf_symfile_read): Update.
11041 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11042 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11043 (open_and_init_dwo_file): Update.
11044 (open_dwp_file): Return gdb_bfd_ref_ptr.
11045 (open_and_init_dwp_file): Update.
11046 * corelow.c (core_open): Update.
11047 * compile/compile-object-load.c (compile_object_load): Update.
11048 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11049 * coffread.c (coff_symfile_read): Update.
11050 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11051 gdb_bfd_ref_ptr. Rename.
11052 (dump_bfd_file, restore_command): Update.
11053 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11054 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11055 (find_separate_debug_file_by_buildid): Update.
11056
11057 2017-01-10 Tom Tromey <tom@tromey.com>
11058
11059 * common/gdb_ref_ptr.h: New file.
11060 * python/py-ref.h (struct gdbpy_ref_policy): New.
11061 (gdbpy_ref): Now a typedef.
11062
11063 2017-01-10 Tom Tromey <tom@tromey.com>
11064
11065 * utils.h (make_cleanup_htab_delete): Don't declare.
11066 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11067 Remove.
11068 * linespec.c (decode_compound_collector): Add constructor,
11069 destructor.
11070 (lookup_prefix_sym): Remove cleanup.
11071 (symtab_collector): Add constructor, destructor.
11072 (collect_symtabs_from_filename): Remove cleanup.
11073 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11074 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11075 Use htab_up.
11076 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11077 * dwarf2read.c (dw2_expand_symtabs_matching)
11078 (dw2_map_symbol_filenames, dwarf_decode_macros)
11079 (write_psymtabs_to_index): Use htab_up.
11080 * dwarf2loc.c (func_verify_no_selftailcall)
11081 (call_site_find_chain_1, func_verify_no_selftailcall)
11082 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11083 std::vector, gdb::unique_xmalloc_ptr.
11084 (call_sitep): Remove typedef.
11085 (dwarf2_locexpr_baton_eval): Remove unused variable.
11086
11087 2017-01-10 Tom Tromey <tom@tromey.com>
11088
11089 * python/python-internal.h (make_cleanup_py_decref)
11090 (make_cleanup_py_xdecref): Don't declare.
11091 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11092 (py_xdecref, make_cleanup_py_xdecref): Remove.
11093
11094 2017-01-10 Tom Tromey <tom@tromey.com>
11095
11096 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11097 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11098
11099 2017-01-10 Tom Tromey <tom@tromey.com>
11100
11101 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11102
11103 2017-01-10 Tom Tromey <tom@tromey.com>
11104
11105 * python/py-utils.c (unicode_to_encoded_string)
11106 (python_string_to_target_string)
11107 (python_string_to_target_python_string)
11108 (python_string_to_host_string, gdbpy_obj_to_string)
11109 (get_addr_from_python): Use gdbpy_ref.
11110
11111 2017-01-10 Tom Tromey <tom@tromey.com>
11112
11113 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11114 gdbpy_ref.
11115
11116 2017-01-10 Tom Tromey <tom@tromey.com>
11117
11118 * python/python.c (eval_python_command, gdbpy_decode_line)
11119 (gdbpy_run_events, gdbpy_start_type_printers)
11120 (gdbpy_apply_type_printers): Use gdbpy_ref.
11121
11122 2017-01-10 Tom Tromey <tom@tromey.com>
11123
11124 * python/py-param.c (get_doc_string, compute_enum_values): Use
11125 gdbpy_ref.
11126
11127 2017-01-10 Tom Tromey <tom@tromey.com>
11128
11129 * python/py-inferior.c (find_thread_object, build_inferior_list):
11130 Use gdbpy_ref.
11131
11132 2017-01-10 Tom Tromey <tom@tromey.com>
11133
11134 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11135
11136 2017-01-10 Tom Tromey <tom@tromey.com>
11137
11138 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11139 gdbpy_ref.
11140
11141 2017-01-10 Tom Tromey <tom@tromey.com>
11142
11143 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11144 extra incref.
11145 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11146 Use gdbpy_ref.
11147
11148 2017-01-10 Tom Tromey <tom@tromey.com>
11149
11150 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11151 gdbpy_ref.
11152
11153 2017-01-10 Tom Tromey <tom@tromey.com>
11154
11155 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11156 decref results of PyArg_ParseTupleAndKeywords.
11157
11158 2017-01-10 Tom Tromey <tom@tromey.com>
11159
11160 * python/python.c (python_run_simple_file): Use
11161 unique_xmalloc_ptr, gdbpy_ref.
11162
11163 2017-01-10 Tom Tromey <tom@tromey.com>
11164
11165 * python/py-prettyprint.c (print_stack_unless_memory_error)
11166 (print_string_repr, print_children): Use gdbpy_ref.
11167 (dummy_python_frame): New class.
11168 (dummy_python_frame::dummy_python_frame): Rename from
11169 push_dummy_python_frame.
11170 (py_restore_tstate): Remove.
11171
11172 2017-01-10 Tom Tromey <tom@tromey.com>
11173
11174 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11175
11176 2017-01-10 Tom Tromey <tom@tromey.com>
11177
11178 * python/python.c (ensure_python_env, restore_python_env):
11179 Remove.
11180 * python/python-internal.h (ensure_python_env): Don't declare.
11181 * varobj.h (varobj_ensure_python_env): Don't declare.
11182 * varobj.c (varobj_ensure_python_env): Remove.
11183
11184 2017-01-10 Tom Tromey <tom@tromey.com>
11185
11186 * varobj.c (varobj_value_get_print_value): Use
11187 gdbpy_enter_varobj.
11188
11189 2017-01-10 Tom Tromey <tom@tromey.com>
11190
11191 * python/py-prettyprint.c (print_string_repr, print_children):
11192 Update.
11193 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11194 of "encoding".
11195 * varobj.c (varobj_value_get_print_value): Update.
11196 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11197
11198 2017-01-10 Tom Tromey <tom@tromey.com>
11199
11200 * varobj.c (varobj_get_display_hint)
11201 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11202 (varobj_set_visualizer, free_variable): Use
11203 gdbpy_enter_varobj.
11204
11205 2017-01-10 Tom Tromey <tom@tromey.com>
11206
11207 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11208 (do_finish_initialization): New function. Use gdbpy_ref.
11209 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11210 do_finish_initialization.
11211
11212 2017-01-10 Tom Tromey <tom@tromey.com>
11213
11214 * python/py-param.c (get_set_value, get_show_value): Use
11215 gdbpy_enter, gdbpy_ref.
11216
11217 2017-01-10 Tom Tromey <tom@tromey.com>
11218
11219 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11220
11221 2017-01-10 Tom Tromey <tom@tromey.com>
11222
11223 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11224
11225 2017-01-10 Tom Tromey <tom@tromey.com>
11226
11227 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11228 Use gdbpy_enter_varobj.
11229
11230 2017-01-10 Tom Tromey <tom@tromey.com>
11231
11232 * varobj.c (gdbpy_enter_varobj): New constructor.
11233 * python/python-internal.h (gdbpy_enter_varobj): New class.
11234 * python/py-varobj.c (py_varobj_get_iterator): Use
11235 gdbpy_enter_varobj.
11236
11237 2017-01-10 Tom Tromey <tom@tromey.com>
11238
11239 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11240 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11241 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11242 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11243 unique_xmalloc_ptr.
11244 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11245
11246 2017-01-10 Tom Tromey <tom@tromey.com>
11247
11248 * python/py-xmethods.c (invoke_match_method): Use
11249 gdbpy_ref.
11250
11251 2017-01-10 Tom Tromey <tom@tromey.com>
11252
11253 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11254 gdbpy_enter, gdbpy_ref.
11255
11256 2017-01-10 Tom Tromey <tom@tromey.com>
11257
11258 * python/python.c (python_interactive_command): Use gdbpy_enter.
11259
11260 2017-01-10 Tom Tromey <tom@tromey.com>
11261
11262 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11263 gdbpy_ref.
11264
11265 2017-01-10 Tom Tromey <tom@tromey.com>
11266
11267 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11268 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11269
11270 2017-01-10 Tom Tromey <tom@tromey.com>
11271
11272 * utils.h (htab_deleter): New struct.
11273 (htab_up): New typedef.
11274 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11275 gdbpy_enter, gdbpy_ref, htab_up.
11276
11277 2017-01-10 Tom Tromey <tom@tromey.com>
11278
11279 * python/py-unwind.c (pending_frame_invalidate): Remove.
11280 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11281
11282 2017-01-10 Tom Tromey <tom@tromey.com>
11283
11284 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11285 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11286
11287 2017-01-10 Tom Tromey <tom@tromey.com>
11288
11289 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11290
11291 2017-01-10 Tom Tromey <tom@tromey.com>
11292
11293 * python/python.c (gdbpy_eval_from_control_command)
11294 (gdbpy_source_script, gdbpy_run_events)
11295 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11296 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11297 gdbpy_enter.
11298
11299 2017-01-10 Tom Tromey <tom@tromey.com>
11300
11301 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11302
11303 2017-01-10 Tom Tromey <tom@tromey.com>
11304
11305 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11306
11307 2017-01-10 Tom Tromey <tom@tromey.com>
11308
11309 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11310 (python_on_inferior_call_pre, python_on_inferior_call_post)
11311 (python_on_memory_change, python_on_register_change)
11312 (python_inferior_exit, python_new_objfile, add_thread_object)
11313 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11314
11315 2017-01-10 Tom Tromey <tom@tromey.com>
11316
11317 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11318 (bpfinishpy_handle_exit): Use gdbpy_enter.
11319
11320 2017-01-10 Tom Tromey <tom@tromey.com>
11321
11322 * python/py-cmd.c (cmdpy_destroyer)
11323 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11324 gdbpy_enter.
11325
11326 2017-01-10 Tom Tromey <tom@tromey.com>
11327
11328 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11329 gdbpy_enter.
11330 (gdbpy_breakpoint_has_cond): Likewise.
11331
11332 2017-01-10 Tom Tromey <tom@tromey.com>
11333
11334 * python/python.c (gdbpy_enter): New constructor.
11335 (~gdbpy_enter): New destructor.
11336 (restore_python_env, ensure_python_env): Rewrite.
11337 * python/python-internal.h (gdbpy_enter): New class.
11338
11339 2017-01-10 Tom Tromey <tom@tromey.com>
11340
11341 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11342
11343 2017-01-10 Tom Tromey <tom@tromey.com>
11344
11345 * python/py-value.c (value_has_field, get_field_flag)
11346 (get_field_type, valpy_getitem, convert_value_from_python): Use
11347 gdbpy_ref.
11348
11349 2017-01-10 Tom Tromey <tom@tromey.com>
11350
11351 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11352 gdbpy_ref.
11353
11354 2017-01-10 Tom Tromey <tom@tromey.com>
11355
11356 * python/py-prettyprint.c (search_pp_list)
11357 (find_pretty_printer_from_objfiles)
11358 (find_pretty_printer_from_progspace)
11359 (find_pretty_printer_from_gdb, find_pretty_printer)
11360 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11361 gdbpy_ref.
11362
11363 2017-01-10 Tom Tromey <tom@tromey.com>
11364
11365 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11366
11367 2017-01-10 Tom Tromey <tom@tromey.com>
11368
11369 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11370 (ltpy_get_all_source_lines): Use gdbpy_ref.
11371
11372 2017-01-10 Tom Tromey <tom@tromey.com>
11373
11374 * python/py-framefilter.c (extract_sym, extract_value)
11375 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11376 gdbpy_ref.
11377
11378 2017-01-10 Tom Tromey <tom@tromey.com>
11379
11380 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11381
11382 2017-01-10 Tom Tromey <tom@tromey.com>
11383
11384 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11385
11386 2017-01-10 Tom Tromey <tom@tromey.com>
11387
11388 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11389 gdbpy_ref.
11390
11391 2017-01-10 Tom Tromey <tom@tromey.com>
11392
11393 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11394
11395 2017-01-10 Tom Tromey <tom@tromey.com>
11396
11397 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11398 (typy_range): Use gdbpy_ref.
11399
11400 2017-01-10 Tom Tromey <tom@tromey.com>
11401
11402 * python/py-threadevent.c (create_thread_event_object): Use
11403 gdbpy_ref.
11404 * python/py-stopevent.c (create_stop_event_object): Simplify.
11405 (emit_stop_event): Use gdbpy_ref.
11406 * python/py-signalevent.c (create_signal_event_object): Use
11407 gdbpy_ref.
11408 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11409 (emit_new_objfile_event, create_clear_objfiles_event_object)
11410 (emit_clear_objfiles_event): Use gdbpy_ref.
11411 * python/py-infevents.c (create_inferior_call_event_object)
11412 (create_register_changed_event_object)
11413 (create_memory_changed_event_object, emit_inferior_call_event)
11414 (emit_memory_changed_event, emit_register_changed_event): Use
11415 gdbpy_ref.
11416 * python/py-exitedevent.c (create_exited_event_object)
11417 (emit_exited_event): Use gdbpy_ref.
11418 * python/py-event.h (evpy_emit_event): Remove
11419 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11420 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11421 * python/py-continueevent.c (emit_continue_event): Use
11422 gdbpy_ref.
11423 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11424 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11425 gdbpy_ref.
11426 * python/py-bpevent.c (create_breakpoint_event_object): Use
11427 gdbpy_ref.
11428
11429 2017-01-10 Tom Tromey <tom@tromey.com>
11430
11431 * python/py-ref.h: New file.
11432
11433 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11434
11435 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11436 void.
11437 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11438 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11439 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11440 * ui-out.c (ui_out::redirect): Likewise.
11441 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11442 * cli/cli-logging.c (set_logging_redirect): Update call site of
11443 ui_out::redirect.
11444 (handle_redirections): Likewise.
11445 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11446 * top.c (execute_command_to_string): Likewise.
11447 * utils.c (do_ui_out_redirect_pop): Likewise.
11448
11449 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11450
11451 * stack.c (_initialize_stack): Update "frame" command help message.
11452
11453 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11454
11455 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11456
11457 2017-01-06 Yao Qi <yao.qi@linaro.org>
11458
11459 * x86-linux-nat.h: Include gdb_proc_service.h.
11460
11461 2017-01-06 Yao Qi <yao.qi@linaro.org>
11462
11463 * ser-base.h: Include serial.h.
11464
11465 2017-01-06 Yao Qi <yao.qi@linaro.org>
11466
11467 * ppc-linux-tdep.h: Include ppc-tdep.h.
11468
11469 2017-01-06 Yao Qi <yao.qi@linaro.org>
11470
11471 * nat/amd64-linux-siginfo.h: Include signal.h.
11472
11473 2017-01-06 Yao Qi <yao.qi@linaro.org>
11474
11475 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11476
11477 2017-01-06 Yao Qi <yao.qi@linaro.org>
11478
11479 * mi/mi-parse.h: Include mi-cmds.h.
11480
11481 2017-01-06 Yao Qi <yao.qi@linaro.org>
11482
11483 * inf-loop.c: Don't include "target.h".
11484 * inf-loop.h: Include it here.
11485
11486 2017-01-06 Yao Qi <yao.qi@linaro.org>
11487
11488 * dfp.h: Include "dboulest.h" and "expression.h".
11489
11490 2017-01-06 Yao Qi <yao.qi@linaro.org>
11491
11492 * ax-gdb.h: Include "ax.h".
11493
11494 2017-01-06 Yao Qi <yao.qi@linaro.org>
11495
11496 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11497 with nat/gdb_ptrace.h.
11498
11499 2017-01-05 Yao Qi <yao.qi@linaro.org>
11500
11501 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11502 new line.
11503 (mips64_fbsd_sigframe_init): Likewise.
11504
11505 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11506
11507 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11508 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11509
11510 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11511
11512 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11513 * NEWS: Mention new FreeBSD/mips native configuration.
11514 * config/mips/fbsd.mh: New file.
11515 * configure.host: Add mips*-*-freebsd*.
11516 * mips-fbsd-nat.c: New file.
11517
11518 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11519
11520 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11521 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11522 * NEWS: Mention new FreeBSD/mips target.
11523 * configure.tgt: Add mips*-*-freebsd*.
11524 * mips-fbsd-tdep.c: New file.
11525 * mips-fbsd-tdep.h: New file.
11526
11527 2017-01-04 Yao Qi <yao.qi@linaro.org>
11528
11529 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11530 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11531
11532 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11533
11534 Update copyright year range in all GDB files.
11535
11536 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11537
11538 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11539
11540 For older changes see ChangeLog-2016.
11541 \f
11542 Local Variables:
11543 mode: change-log
11544 left-margin: 8
11545 fill-column: 74
11546 version-control: never
11547 coding: utf-8
11548 End:
This page took 0.275944 seconds and 4 git commands to generate.