Constify some commands in symmisc.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-27 Tom Tromey <tom@tromey.com>
2
3 * symmisc.c (maintenance_print_symbols)
4 (maintenance_print_msymbols, maintenance_print_objfiles)
5 (maintenance_info_symtabs, maintenance_check_symtabs)
6 (maintenance_expand_symtabs, maintenance_info_line_tables):
7 Constify.
8
9 2017-09-27 Tom Tromey <tom@tromey.com>
10
11 * top.c (new_ui_command): Constify.
12
13 2017-09-27 Tom Tromey <tom@tromey.com>
14
15 * symfile.c (add_symbol_file_command)
16 (remove_symbol_file_command, list_overlays_command)
17 (map_overlay_command, unmap_overlay_command)
18 (overlay_auto_command, overlay_manual_command)
19 (overlay_off_command, overlay_load_command): Constify.
20
21 2017-09-27 Tom Tromey <tom@tromey.com>
22
23 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
24 (info_spu_mailbox_command, info_spu_dma_command)
25 (info_spu_proxydma_command): Constify.
26
27 2017-09-27 Tom Tromey <tom@tromey.com>
28
29 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
30
31 2017-09-27 Tom Tromey <tom@tromey.com>
32
33 * cli/cli-script.c (user_defined_command): Constify.
34
35 2017-09-27 Tom Tromey <tom@tromey.com>
36
37 * cli/cli-dump.c (dump_memory_command, dump_value_command)
38 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
39 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
40 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
41 (dump_binary_value, append_binary_memory, append_binary_value):
42 Constify.
43 (struct dump_context) <func>: Constify.
44 (add_dump_command): Update.
45
46 2017-09-27 Tom Tromey <tom@tromey.com>
47
48 * cli/cli-cmds.c (show_version, show_configuration)
49 (source_command, show_user): Constify.
50
51 2017-09-27 Tom Tromey <tom@tromey.com>
52
53 * target.c (maintenance_print_target_stack): Constify.
54
55 2017-09-27 Tom Tromey <tom@tromey.com>
56
57 * interps.c (interpreter_exec_cmd): Constify.
58
59 2017-09-27 Tom Tromey <tom@tromey.com>
60
61 * record-full.c (cmd_record_full_restore): Constify.
62
63 2017-09-27 Tom Tromey <tom@tromey.com>
64
65 * memattr.c (enable_mem_command, disable_mem_command)
66 (delete_mem_command): Constify.
67
68 2017-09-27 Tom Tromey <tom@tromey.com>
69
70 * value.c (show_convenience): Constify.
71
72 2017-09-27 Tom Tromey <tom@tromey.com>
73
74 * gdbcore.h (core_file_command): Update.
75 * corefile.c (core_file_command): Constify.
76
77 2017-09-27 Tom Tromey <tom@tromey.com>
78
79 * user-regs.c (maintenance_print_user_registers): Constify.
80
81 2017-09-27 Tom Tromey <tom@tromey.com>
82
83 * cp-namespace.c (maintenance_cplus_namespace): Constify.
84
85 2017-09-27 Tom Tromey <tom@tromey.com>
86
87 * cp-support.c (first_component_command): Constify.
88
89 2017-09-27 Tom Tromey <tom@tromey.com>
90
91 * psymtab.c (maintenance_print_psymbols)
92 (maintenance_info_psymtabs, maintenance_check_psymtabs):
93 Constify.
94
95 2017-09-27 Tom Tromey <tom@tromey.com>
96
97 * windows-tdep.c (display_tib): Constify.
98
99 2017-09-27 Tom Tromey <tom@tromey.com>
100
101 * linux-fork.c (delete_checkpoint_command)
102 (detach_checkpoint_command): Constify.
103
104 2017-09-27 Tom Tromey <tom@tromey.com>
105
106 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
107
108 2017-09-27 Tom Tromey <tom@tromey.com>
109
110 * arc-tdep.c (dump_arc_instruction_command): Constify.
111
112 2017-09-27 Tom Tromey <tom@tromey.com>
113
114 * valprint.c (set_radix, show_radix): Constify.
115
116 2017-09-27 Tom Tromey <tom@tromey.com>
117
118 * dtrace-probe.c (info_probes_dtrace_command): Constify.
119
120 2017-09-27 Tom Tromey <tom@tromey.com>
121
122 * command.h (not_just_help_class_command): Update.
123 * cli/cli-decode.h (not_just_help_class_command): Update.
124 * cli/cli-decode.c (not_just_help_class_command): Constify.
125
126 2017-09-27 Tom Tromey <tom@tromey.com>
127
128 * gdb_bfd.c (maintenance_info_bfds): Constify.
129
130 2017-09-27 Tom Tromey <tom@tromey.com>
131
132 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
133 overloads.
134 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
135 (do_const_cfunc): New function.
136 (cmd_cfunc_eq): New overload.
137 (cli_user_command_p): Check do_const_cfunc.
138 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
139 const_cfunc.
140 * command.h (add_cmd): Add const overload and no-function
141 overload.
142 (set_cmd_cfunc): Add const overload.
143 (cmd_const_cfunc_ftype): Declare.
144 (cmd_cfunc_eq): Add const overload.
145 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
146 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
147 overload.
148
149 2017-09-27 Tom Tromey <tom@tromey.com>
150
151 * macroexp.c (get_next_token_for_substitution): New function.
152 (substitute_args): Call it. Check for __VA_OPT__.
153
154 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
155 Pedro Alves <palves@redhat.com>
156
157 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
158 producer_is_icc_lt_14.
159 (producer_is_icc_lt_14): New function.
160 (check_producer): Add code for checking version of ICC.
161 (producer_is_icc): Move to producer.c.
162 (read_structure_type): Restrict ICC workaround to ICC<14.
163 * producer.c: Include selftest.h.
164 (producer_is_icc, producer_parsing_tests, _initialize_producer):
165 New functions.
166 * producer.h (producer_is_icc): New declaration.
167
168 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
169
170 * Makefile.in (SFILES): Add producer.c.
171 (COMMON_OBS): Add producer.o
172 * amd64-tdep.c (producer.h): Add new include.
173 * dwarf2read.c (producer.h): Add new include.
174 * producer.c: New file.
175 * producer.h: New file.
176 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
177 producer.c.
178 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
179 producer.h.
180
181 2017-09-26 Matthias Klose <doko@ubuntu.com>
182
183 * configure.ac: Search ncursesw before ncurses.
184 Check ncursesw/ncurses.h before ncurses/ncurses.h.
185 * gdb_curses.h: Include <ncursesw/ncurses.h>
186 * config.in, configure: Regenerate.
187
188 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
189
190 PR gdb/22185
191 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
192 obsolete.
193 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
194 Remove i386sol2 support.
195 * configure.nat <i386sol2>: Remove.
196 <sol2-64>: Fold into ...
197 <sol2>: ... this.
198 Move common settings to default section.
199 Add sol-thread.o.
200 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
201 x86_64-*-solaris2.1[0-9]*>: Rename to ...
202 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
203 <i[34567]86-*-solaris*>: Remove.
204 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
205
206 * configure.ac: Remove wctype in libw check.
207 (_MSE_INT_H): Don't define on Solaris 7-9.
208 <solaris*>: Remove libthread_db.so.1 check.
209 * configure: Regenerate.
210 * config.in: Regenerate.
211
212 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
213 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
214 (gdb_ps_size_t): Remove.
215 Use base types in users.
216 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
217
218 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
219
220 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
221
222 PR build/22206
223 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
224 (adi_is_addr_mapped): Likewise.
225 (PSR_ICC): Don't redefine.
226 (PSR_IMPL): Likewise.
227
228 2017-09-25 Tom Tromey <tom@tromey.com>
229
230 * regcache.c (regcache::dump): Use string_printf.
231
232 2017-09-25 Tom Tromey <tom@tromey.com>
233
234 * regcache.c (class regcache_invalidator): New.
235 (struct register_to_invalidate): Remove.
236 (make_cleanup_regcache_invalidate): Remove.
237 (regcache::raw_write): Use regcache_invalidator.
238
239 2017-09-25 Tom Tromey <tom@tromey.com>
240
241 * spu-tdep.c (spu2ppu_sniffer): Update.
242 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
243 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
244 Remove.
245 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
246 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
247 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
248 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
249 (frame_pop): Update.
250
251 2017-09-25 Tom Tromey <tom@tromey.com>
252
253 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
254 * regcache.h (regcache_xfree): Don't declare.
255 * regcache.c (regcache_xfree): Remove.
256 (do_regcache_xfree): Use delete.
257 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
258 * linux-fork.c (free_fork): Use delete.
259 (fork_save_infrun_state): Likewise.
260 * jit.c (jit_dealloc_cache): Use delete.
261 * infrun.c (discard_infcall_suspend_state): Use delete.
262
263 2017-09-25 Tom Tromey <tom@tromey.com>
264
265 * regcache.h (regcache_xmalloc): Don't declare.
266 (regcache_raw_set_cached_value): Update comment.
267 * regcache.c (regcache_xmalloc): Remove.
268 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
269 * jit.c (jit_frame_sniffer): Use new.
270 * frame.c (frame_save_as_regcache): Use new.
271
272 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
273
274 * NEWS: Advertise support for guarded-storage registers on IBM z.
275
276 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
277
278 * s390-linux-nat.c (have_regset_gs): New static variable.
279 (s390_linux_fetch_inferior_registers): Handle guarded-storage
280 control block and guarded-storage broadcast control regsets.
281 (s390_read_description): Detect whether the target has
282 guarded-storage support, return appropriate tdesc.
283 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
284 (features/s390x-gs-linux64.c): Likewise.
285 (struct gdbarch_tdep) <have_gs>: New field.
286 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
287 (s390_gsbc_regset): New variables.
288 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
289 and s390_gsbc_regset, if applicable.
290 (s390_core_read_description): Check whether core file was from a
291 target with guarded-storage support; include appropriate regsets.
292 (s390_gdbarch_init): Add registers for guarded-storage support.
293 (_initialize_s390_tdep): Initialize new target descriptions that
294 include registers for guarded-storage support.
295 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
296 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
297 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
298 (S390_NUM_REGS): Adjust macro definition.
299 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
300 (tdesc_s390x_gs_linux64): New declarations.
301
302 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
303
304 * features/s390-gs-linux64.xml: New file.
305 * features/s390-gs.xml: New file.
306 * features/s390-gsbc.xml: New file.
307 * features/s390x-gs-linux64.xml: New file.
308 * features/Makefile (WHICH): Add s390-gs-linux64 and
309 s390x-gs-linux64.
310 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
311 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
312 * features/s390-gs-linux64.c: New generated file.
313 * features/s390x-gs-linux64.c: New file.
314 * regformats/s390-gs-linux64.dat: New file.
315 * regformats/s390x-gs-linux64.dat: New file.
316
317 2017-09-23 Tom Tromey <tom@tromey.com>
318
319 * defs.h (make_cleanup_override_quit_handler): Don't declare.
320
321 2017-09-22 Tom Tromey <tom@tromey.com>
322
323 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
324 type to scoped_restore_tmpl.
325 <scoped_input_handler>: Initialize m_quit_handler directly.
326
327 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
328
329 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
330 (cd_command): Likewise. Free "current_directory" before
331 assigning to it.
332 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
333 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
334 * top.c (gdb_dirbuf): Remove global declaration.
335 * top.h (gdb_dirbuf): Likewise.
336
337 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
338
339 * gnulib/aclocal.m4: Regenerate.
340 * gnulib/config.in: Regenerate.
341 * gnulib/configure: Regenerate.
342 * gnulib/import/Makefile.am: Regenerate.
343 * gnulib/import/Makefile.in: Regenerate.
344 * gnulib/import/assure.h: New file.
345 * gnulib/import/at-func.c: Likewise
346 * gnulib/import/chdir-long.c: New file.
347 * gnulib/import/chdir-long.h: New file.
348 * gnulib/import/cloexec.c: New file.
349 * gnulib/import/cloexec.h: New file.
350 * gnulib/import/close.c: New file.
351 * gnulib/import/closedir.c: New file.
352 * gnulib/import/dirent-private.h: New file.
353 * gnulib/import/dup-safer.c: New file.
354 * gnulib/import/dup.c: New file.
355 * gnulib/import/dup2.c: New file.
356 * gnulib/import/error.c: New file.
357 * gnulib/import/error.h: New file.
358 * gnulib/import/exitfail.c: New file.
359 * gnulib/import/exitfail.h: New file.
360 * gnulib/import/fchdir.c: New file.
361 * gnulib/import/fcntl.c: New file.
362 * gnulib/import/fcntl.in.h: New file.
363 * gnulib/import/fd-hook.c: New file.
364 * gnulib/import/fd-hook.h: New file.
365 * gnulib/import/fd-safer.c: New file.
366 * gnulib/import/fdopendir.c: New file.
367 * gnulib/import/filename.h: New file.
368 * gnulib/import/filenamecat-lgpl.c: New file.
369 * gnulib/import/filenamecat.h: New file.
370 * gnulib/import/fstat.c: New file.
371 * gnulib/import/fstatat.c: New file.
372 * gnulib/import/getcwd-lgpl.c: New file.
373 * gnulib/import/getcwd.c: New file.
374 * gnulib/import/getdtablesize.c: New file.
375 * gnulib/import/getlogin_r.c: New file.
376 * gnulib/import/getprogname.c: New file.
377 * gnulib/import/getprogname.h: New file.
378 * gnulib/import/gettext.h: New file.
379 * gnulib/import/glob-libc.h: New file.
380 * gnulib/import/glob.c: New file.
381 * gnulib/import/glob.in.h: New file.
382 * gnulib/import/intprops.h: New file.
383 * gnulib/import/m4/chdir-long.m4: New file.
384 * gnulib/import/m4/close.m4: New file.
385 * gnulib/import/m4/closedir.m4: New file.
386 * gnulib/import/m4/d-ino.m4: New file.
387 * gnulib/import/m4/d-type.m4: New file.
388 * gnulib/import/m4/dup.m4: New file.
389 * gnulib/import/m4/dup2.m4: New file.
390 * gnulib/import/m4/error.m4: New file.
391 * gnulib/import/m4/fchdir.m4: New file.
392 * gnulib/import/m4/fcntl.m4: New file.
393 * gnulib/import/m4/fcntl_h.m4: New file.
394 * gnulib/import/m4/fdopendir.m4: New file.
395 * gnulib/import/m4/filenamecat.m4: New file.
396 * gnulib/import/m4/fstat.m4: New file.
397 * gnulib/import/m4/fstatat.m4: New file.
398 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
399 * gnulib/import/m4/getcwd-path-max.m4: New file.
400 * gnulib/import/m4/getcwd.m4: New file.
401 * gnulib/import/m4/getdtablesize.m4: New file.
402 * gnulib/import/m4/getlogin_r.m4: New file.
403 * gnulib/import/m4/getprogname.m4: New file.
404 * gnulib/import/m4/glob.m4: New file.
405 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
406 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
407 * gnulib/import/m4/mempcpy.m4: New file.
408 * gnulib/import/m4/memrchr.m4: New file.
409 * gnulib/import/m4/mode_t.m4: New file.
410 * gnulib/import/m4/msvc-inval.m4: New file.
411 * gnulib/import/m4/msvc-nothrow.m4: New file.
412 * gnulib/import/m4/open.m4: New file.
413 * gnulib/import/m4/openat.m4: New file.
414 * gnulib/import/m4/opendir.m4: New file.
415 * gnulib/import/m4/readdir.m4: New file.
416 * gnulib/import/m4/realloc.m4: New file.
417 * gnulib/import/m4/rewinddir.m4: New file.
418 * gnulib/import/m4/save-cwd.m4: New file.
419 * gnulib/import/m4/strdup.m4: New file.
420 * gnulib/import/m4/strerror.m4: New file.
421 * gnulib/import/m4/unistd-safer.m4: New file.
422 * gnulib/import/mempcpy.c: New file.
423 * gnulib/import/memrchr.c: New file.
424 * gnulib/import/msvc-inval.c: New file.
425 * gnulib/import/msvc-inval.h: New file.
426 * gnulib/import/msvc-nothrow.c: New file.
427 * gnulib/import/msvc-nothrow.h: New file.
428 * gnulib/import/open.c: New file.
429 * gnulib/import/openat-die.c: New file.
430 * gnulib/import/openat-priv.h: New file.
431 * gnulib/import/openat-proc.c: New file.
432 * gnulib/import/openat.c: New file.
433 * gnulib/import/openat.h: New file.
434 * gnulib/import/opendir.c: New file.
435 * gnulib/import/pipe-safer.c: New file.
436 * gnulib/import/readdir.c: New file.
437 * gnulib/import/realloc.c: New file.
438 * gnulib/import/rewinddir.c: New file.
439 * gnulib/import/save-cwd.c: New file.
440 * gnulib/import/save-cwd.h: New file.
441 * gnulib/import/strdup.c: New file.
442 * gnulib/import/strerror-override.c: New file.
443 * gnulib/import/strerror-override.h: New file.
444 * gnulib/import/strerror.c: New file.
445 * gnulib/import/unistd--.h: New file.
446 * gnulib/import/unistd-safer.h: New file.
447 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
448 "getcwd" and "glob".
449 * ser-tcp.c: Undefine "close" before redefining it.
450
451 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
452
453 * guile/scm-value.c (gdbscm_value_address): Initialize address,
454 get rid of res_val.
455
456 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
457
458 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
459 <sol2,sparc>: Likewise.
460 <sol2-64,i386>: Likewise.
461
462 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
463 -Wdeprecated-declarations on *-*-solaris*.
464 * configure: Regenerate.
465
466 * procfs.c: Include "nat/inferior.h".
467 (procfs_info_proc): Fix typo.
468
469 2017-09-21 Kevin Buettner <kevinb@redhat.com>
470
471 * remote.c (vector): Include.
472 (struct private_thread_info): Add field, thread_handle.
473 (free_private_thread_info): Deallocate storage associated with
474 thread handle.
475 (get_private_info_thread): Initialize `thread_handle' field.
476 (struct thread_item): Add field, thread_handle.
477 (clear_threads_listing_context): Deallocate storage associated
478 with thread handle.
479 (start_thread): Add support for "handle" attribute.
480 (thread_attributes): Add "handle".
481 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
482 field.
483 (remote_update_thread_list): Update thread_handle.
484 (remote_thread_handle_to_thread_info): New function.
485 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
486
487 2017-09-21 Kevin Buettner <kevinb@redhat.com>
488
489 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
490 function.
491 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
492 * python/python-internal.h (thread_object_type): Declare.
493
494 2017-09-21 Kevin Buettner <kevinb@redhat.com>
495
496 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
497 (target_thread_handle_to_thread_info): Declare.
498 * target.c (target_thread_handle_to_thread_info): New function.
499 * target-delegates.c: Regenerate.
500 * gdbthread.h (find_thread_by_handle): Declare.
501 * thread.c (find_thread_by_handle): New function.
502 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
503 function.
504 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
505
506 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
507
508 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
509
510 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
511
512 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
513
514 2017-09-21 Yao Qi <yao.qi@linaro.org>
515
516 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
517 to gdb_target_obs.
518
519 2017-09-20 Tom Tromey <tom@tromey.com>
520
521 * breakpoint.c (struct counted_command_line): Remove.
522 (breakpoint_commands): Update.
523 (alloc_counted_command_line, incref_counted_command_line)
524 (decref_counted_command_line, do_cleanup_counted_command_line)
525 (make_cleanup_decref_counted_command_line): Remove.
526 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
527 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
528 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
529 (save_breakpoints): Update.
530 * breakpoint.h (counted_command_line): Now a typedef to
531 shared_ptr.
532 (struct breakpoint) <commands>: Now a counted_command_line.
533 (struct bpstats) <command>: Likewise.
534
535 2017-09-20 Tom Tromey <tom@tromey.com>
536
537 * breakpoint.c (struct commands_info, do_map_commands_command):
538 Remove.
539 (commands_command_1): Update.
540 (iterate_over_related_breakpoints): Take a function_view.
541 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
542 (delete_command): Update.
543 (map_breakpoint_numbers): Take a function_view.
544 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
545 (disable_command): Update.
546 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
547 (enable_command): Update.
548 (struct disp_data, do_enable_breakpoint_disp)
549 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
550 (do_map_enable_delete_breakpoint): Remove.
551 (enable_once_command, enable_count_command, enable_delete_command)
552 (delete_trace_variable_command): Update.
553
554 2017-09-20 Tom Tromey <tom@tromey.com>
555
556 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
557 (bpstat_clear): Use delete.
558 (bpstats): New constructors.
559 (bpstat_copy, bpstat_stop_status): Use new.
560 (dprintf_after_condition_true): Update.
561 * breakpoint.h (bpstats::bpstats): Add constructors.
562 (bpstats::~bpstats): Add destructor.
563
564 2017-09-20 Pedro Alves <palves@redhat.com>
565
566 * eval.c (make_params): Delete, refactored as ...
567 (class fake_method): ... this new type's ctor.
568 (fake_method::~fake_method): New.
569 (evaluate_subexp_standard): Use 'fake_method'.
570
571 2017-09-20 Tom Tromey <tom@tromey.com>
572
573 * windows-nat.c (get_windows_debug_event, windows_wait)
574 (do_initial_windows_stuff, windows_attach): Update.
575 * utils.c (vwarning, internal_vproblem): Update.
576 (ui_unregister_input_event_handler_cleanup)
577 (prepare_to_handle_input): Remove.
578 (class scoped_input_handler): New.
579 (defaulted_query, prompt_for_continue): Update.
580 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
581 Update.
582 * top.c (undo_terminal_modifications_before_exit): Update.
583 * target/target.h (target_terminal_init, target_terminal_inferior)
584 (target_terminal_ours): Don't declare.
585 (class target_terminal): New.
586 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
587 (target_terminal_ours_for_output)
588 (make_cleanup_restore_target_terminal): Don't declare.
589 (target_terminal_info): Remove.
590 * target.c (enum terminal_state, terminal_state): Remove.
591 (target_terminal::terminal_state): Define.
592 (target_terminal::init): Rename from target_terminal_init.
593 (target_terminal::inferior): Rename from
594 target_terminal_inferior.
595 (target_terminal::ours): Rename from target_terminal_ours.
596 (target_terminal::ours_for_output): Rename from
597 target_terminal_ours_for_output.
598 (target_terminal::info): New method.
599 (cleanup_restore_target_terminal)
600 (make_cleanup_restore_target_terminal): Remove.
601 * solib.c (handle_solib_event): Update.
602 * remote.c (remote_serial_quit_handler): Update.
603 (remote_terminal_inferior, remote_wait_as): Update.
604 * record-full.c (record_full_wait_1): Update.
605 * nto-procfs.c (procfs_create_inferior): Update.
606 * nat/fork-inferior.c (startup_inferior): Update.
607 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
608 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
609 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
610 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
611 (mi_breakpoint_created, mi_breakpoint_deleted)
612 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
613 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
614 (mi_user_selected_context_changed, report_initial_inferior):
615 Update.
616 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
617 (linux_nat_terminal_inferior): Update.
618 * infrun.c (follow_fork_inferior)
619 (handle_vfork_child_exec_or_exit, do_target_resume)
620 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
621 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
622 Update.
623 * inflow.c (child_terminal_init, info_terminal_command): Update.
624 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
625 (attach_command): Update.
626 * infcall.c (call_thread_fsm_should_stop): Update.
627 * gnu-nat.c (gnu_attach): Update.
628 * extension.c (struct active_ext_lang_state)
629 (restore_active_ext_lang): Update.
630 * exceptions.c (print_flush): Update.
631 * event-top.c (async_enable_stdin, default_quit_handler): Update.
632 (struct quit_handler_cleanup_data, restore_quit_handler)
633 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
634 Remove.
635 * cp-support.c (gdb_demangle): Update.
636 * breakpoint.c (update_inserted_breakpoint_locations)
637 (insert_breakpoint_locations, handle_jit_event)
638 (disable_breakpoints_in_unloaded_shlib): Update.
639 * annotate.c (annotate_breakpoints_invalid)
640 (annotate_frames_invalid): Update.
641
642 2017-09-20 Tom Tromey <tom@tromey.com>
643
644 * main.c (catch_command_errors): Rename from
645 catch_command_errors_const.
646 (captured_main_1): Update.
647
648 2017-09-20 Pedro Alves <palves@redhat.com>
649
650 * cli/cli-cmds.c (list_command): Use print_sal_location.
651 (print_sal_location): New function.
652 (ambiguous_line_spec): Use print_sal_location.
653 * linespec.c (symbol_to_sal): Record the symbol in the sal.
654 * symtab.c (find_function_start_sal): Likewise.
655 * symtab.h (symtab_and_line::symbol): New field.
656
657 2017-09-20 Pedro Alves <palves@redhat.com>
658
659 * linespec.c (minsym_found): Handle non-text minsyms.
660 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
661
662 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
663
664 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
665 backslash.
666
667 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
668
669 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
670 vmovups instead vmovaps.
671 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
672
673 2017-09-19 John Baldwin <jhb@FreeBSD.org>
674
675 * NEWS (Changes since GDB 8.0): Add starti.
676 * infcmd.c (enum run_break): New.
677 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
678 case.
679 (run_command): Use enum run_how.
680 (start_command): Likewise.
681 (starti_command): New function.
682 (RUN_ARGS_HELP): New macro.
683 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
684 commands. Add starti command.
685
686 2017-09-19 Yao Qi <yao.qi@linaro.org>
687
688 * Makefile.in (monitor.o): Remove the rule.
689
690 2017-09-19 Yao Qi <yao.qi@linaro.org>
691
692 * annotate.h (struct annotate_arg_emitter): Use
693 DISABLE_COPY_AND_ASSIGN.
694 * common/refcounted-object.h (refcounted_object): Likewise.
695 * completer.h (struct completion_result): Likewise.
696 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
697 * filename-seen-cache.h (filename_seen_cache): Likewise.
698 * gdbcore.h (thread_section_name): Likewise.
699 * gdb_regex.h (compiled_regex): Likewise.
700 * gdbthread.h (scoped_restore_current_thread): Likewise.
701 * inferior.h (scoped_restore_current_inferior): Likewise.
702 * jit.c (jit_reader): Likewise.
703 * linespec.h (struct linespec_result): Likewise.
704 * mi/mi-parse.h (struct mi_parse): Likewise.
705 * nat/fork-inferior.c (execv_argv): Likewise.
706 * progspace.h (scoped_restore_current_program_space): Likewise.
707 * python/python-internal.h (class gdbpy_enter): Likewise.
708 * regcache.h (regcache): Likewise.
709 * target-descriptions.c (struct tdesc_reg): Likewise.
710 (struct tdesc_type): Likewise.
711 (struct tdesc_feature): Likewise.
712 * ui-out.h (ui_out_emit_type): Likewise.
713
714 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
715
716 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
717 label abort_expression.
718
719 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
720
721 * common/buffer.c (buffer_xml_printf): Adjust.
722 * common/xml-utils.c (xml_escape_text): Change return type to
723 std::string, update code accordingly.
724 * common/xml-utils.h (xml_escape_text): Change return type to
725 std::string.
726 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
727 * windows-tdep.c (windows_xfer_shared_library): Adjust.
728 * unittests/xml-utils-selftests.c (test_xml_escape_text):
729 Adjust.
730
731 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
732
733 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
734 (SUBDIR_UNITTESTS_OBS): Add new object file.
735 * unittests/xml-utils-selftests.c: New file.
736
737 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
738
739 * common/selftest.h (selftest): New struct/interface.
740 (register_test): Add name parameter, add new overload.
741 (run_tests): Add filter parameter.
742 (for_each_selftest_ftype): New typedef.
743 (for_each_selftest): New declaration.
744 * common/selftest.c (tests): Change type to
745 map<string, unique_ptr<selftest>>.
746 (simple_selftest): New struct.
747 (register_test): New function.
748 (register_test): Add name parameter and use it.
749 (run_tests): Add filter parameter and use it. Add prints.
750 Adjust to vector -> map change.
751 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
752 registering selftests.
753 * arm-tdep.c (_initialize_arm_tdep): Likewise.
754 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
755 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
756 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
757 * findvar.c (_initialize_findvar): Likewise.
758 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
759 * maint.c (maintenance_selftest): Update call to run_tests.
760 (maintenance_info_selftests): New function.
761 (_initialize_maint_cmds): Register "maintenance info selftests"
762 command. Update "maintenance selftest" doc.
763 * regcache.c (_initialize_regcache): Add names when registering
764 selftests.
765 * rust-exp.y (_initialize_rust_exp): Likewise.
766 * selftest-arch.c (gdbarch_selftest): New struct.
767 (gdbarch_tests): Remove.
768 (register_test_foreach_arch): Add name parameter. Call
769 register_test.
770 (tests_with_arch): Remove, move most content to
771 gdbarch_selftest::operator().
772 (_initialize_selftests_foreach_arch): Remove.
773 * selftest-arch.h (register_test_foreach_arch): Add name
774 parameter.
775 (run_tests_with_arch): New declaration.
776 * utils-selftests.c (_initialize_utils_selftests): Add names
777 when registering selftests.
778 * utils.c (_initialize_utils): Likewise.
779 * unittests/array-view-selftests.c
780 (_initialize_array_view_selftests): Likewise.
781 * unittests/environ-selftests.c (_initialize_environ_selftests):
782 Likewise.
783 * unittests/function-view-selftests.c
784 (_initialize_function_view_selftests): Likewise.
785 * unittests/offset-type-selftests.c
786 (_initialize_offset_type_selftests): Likewise.
787 * unittests/optional-selftests.c
788 (_initialize_optional_selftests): Likewise.
789 * unittests/scoped_restore-selftests.c
790 (_initialize_scoped_restore_selftests): Likewise.
791 * NEWS: Document "maintenance selftest" and "maint info
792 selftests".
793
794 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
795
796 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
797 scoped_restore.
798
799 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
800
801 * mi/mi-main.c (mi_load_progress): Make uiout variable
802 a unique_ptr.
803
804 2017-09-15 Pedro Alves <palves@redhat.com>
805
806 * compile/compile-c-types.c (convert_enum, convert_int)
807 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
808
809 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
810
811 * dwarf2read.c (copy_string): Remove.
812 (parse_macro_definition): Replace copy_string with savestring.
813
814 2017-09-15 Yao Qi <yao.qi@linaro.org>
815
816 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
817 gdb_target_obs.
818 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
819 Likewise.
820 (i[34567]86-*-linux*): Likewise.
821
822 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
823
824 * dwarf2expr.h (dwarf_stack_value): Add constructor.
825 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
826 <stack>: Change type to std::vector.
827 <stack_len, stack_allocated>: Remove.
828 <grow_stack>: Remove.
829 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
830 (dwarf_expr_context::~dwarf_expr_context): Remove.
831 (dwarf_expr_context::grow_stack): Remove.
832 (dwarf_expr_context::push): Adjust.
833 (dwarf_expr_context::pop): Adjust.
834 (dwarf_expr_context::fetch): Adjust.
835 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
836 (dwarf_expr_context::stack_empty_p): Adjust.
837 (dwarf_expr_context::execute_stack_op): Adjust.
838
839 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
840
841 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
842 return type to bool.
843 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
844
845 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
846
847 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
848 Change type to bool.
849 (dwarf_stack_value) <in_stack_memory>: Likewise.
850 (dwarf_expr_context) <push_address>: Change parameter type to
851 bool.
852 <fetch_in_stack_memory>: Change return type to bool.
853 <push>: Change parameter type to bool.
854 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
855 to bool.
856 (dwarf_expr_context::push_address): Likewise.
857 (dwarf_expr_context::fetch_in_stack_memory): Change return type
858 to bool.
859 (dwarf_expr_context::execute_stack_op): Adjust.
860 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
861
862 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
863
864 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
865 (struct dwarf_expr_context) <n_pieces>: Remove.
866 <pieces>: Change type to std::vector.
867 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
868 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
869 pieces.
870 (dwarf_expr_context::add_piece): Adjust.
871 * dwarf2loc.c (struct piece_closure): Initialize fields.
872 <n_pieces>: Remove.
873 <pieces>: Change type to std::vector.
874 (allocate_piece_closure): Adjust, change parameter to
875 std::vector rvalue and std::move it to piece_closure.
876 (rw_pieced_value): Adjust.
877 (check_pieced_synthetic_pointer): Adjust.
878 (indirect_synthetic_pointer): Adjust.
879 (coerce_pieced_ref): Adjust.
880 (free_pieced_value_closure): Adjust. Use delete to free
881 piece_closure.
882 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
883 to allocate_piece_closure.
884 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
885
886 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
887
888 * probe.h (probe_ops_cp): Remove typedef.
889 (DEF_VEC_P (probe_ops_cp)): Remove.
890 (all_probe_ops): Change type to std::vector.
891 * probe.c (info_probes_for_ops): Adjust to vector change.
892 (probe_linespec_to_ops): Likewise.
893 (all_probe_ops): Change type to std::vector.
894 (_initialize_probe): Adjust to vector change.
895 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
896 * elfread.c (elf_get_probes): Likewise.
897 * stap-probe.c (_initialize_stap_probe): Likewise.
898
899 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
900
901 * probe.h (struct bound_probe): Define constructors.
902 * probe.c (bound_probe_s): Remove typedef.
903 (DEF_VEC_O (bound_probe_s)): Remove VEC.
904 (collect_probes): Change return type to std::vector, remove
905 cleanup.
906 (compare_probes): Return bool, change parameter type. Change
907 semantic to "less than".
908 (gen_ui_out_table_header_info): Change parameter to std::vector
909 and update.
910 (exists_probe_with_pops): Likewise.
911 (info_probes_for_ops): Update to std::vector change.
912 (enable_probes_command): Likewise.
913 (disable_probes_command): Likewise.
914
915 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
916
917 * probe.h (struct probe_ops) <get_probes>: Change parameter from
918 vec to std::vector.
919 * probe.c (parse_probes_in_pspace): Update.
920 (find_probes_in_objfile): Update.
921 (find_probe_by_pc): Update.
922 (collect_probes): Update.
923 (probe_any_get_probes): Update.
924 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
925 return type to reference to std::vector.
926 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
927 std::vector and update.
928 (dtrace_process_dof): Likewise.
929 (dtrace_get_probes): Likewise.
930 * elfread.c (elf_get_probes): Change return type to std::vector,
931 store an std::vector in bfd_data.
932 (probe_key_free): Update to std::vector.
933 * stap-probe.c (handle_stap_probe): Change parameter to
934 std::vector and update.
935 (stap_get_probes): Likewise.
936 * symfile-debug.c (debug_sym_get_probes): Change return type to
937 std::vector and update.
938
939 2017-09-11 Tom Tromey <tom@tromey.com>
940
941 * breakpoint.c (program_breakpoint_here_p): Update.
942 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
943 from make_show_memory_breakpoints_cleanup. Return a
944 scoped_restore_tmpl<int>.
945 (restore_show_memory_breakpoints): Remove.
946 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
947 * mem-break.c (memory_validate_breakpoint): Update.
948 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
949 (ia64_memory_remove_breakpoint): Update.
950 (ia64_breakpoint_from_pc): Update.
951 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
952 from make_show_memory_breakpoints_cleanup.
953
954 2017-09-11 Tom Tromey <tom@tromey.com>
955
956 * d-namespace.c (d_lookup_symbol): Use std::string.
957 (find_symbol_in_baseclass): Likewise.
958
959 2017-09-11 Tom Tromey <tom@tromey.com>
960
961 * ctf.c (ctf_start): Use std::string.
962
963 2017-09-11 Tom Tromey <tom@tromey.com>
964
965 * ada-lang.c (is_known_support_routine): Update.
966 (ada_unhandled_exception_name_addr_from_raise): Update.
967 * guile/scm-frame.c (gdbscm_frame_name): Update.
968 * python/py-frame.c (frapy_name): Update.
969 (frapy_function): Update.
970 * stack.h (find_frame_funname): Update.
971 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
972 (print_frame): Update.
973
974 2017-09-11 Tom Tromey <tom@tromey.com>
975
976 * findcmd.c (put_bits): Take a gdb::byte_vector.
977 (parse_find_args): Return gdb::byte_vector. "args" now const.
978 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
979 cleanups.
980 (find_command): Update.
981
982 2017-09-11 Tom Tromey <tom@tromey.com>
983
984 * cli/cli-script.c (class scoped_restore_hook_in): New.
985 (clear_hook_in_cleanup): Remove.
986 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
987 scoped_restore_hook_in.
988
989 2017-09-11 Tom Tromey <tom@tromey.com>
990
991 * cli/cli-script.c (restore_interp): Remove.
992 (read_command_lines): Use scoped_restore_interp.
993 * interps.c (scoped_restore_interp::set_temp): Rename from
994 interp_set_temp.
995 * interps.h (class scoped_restore_interp): New.
996 (interp_set_temp): Remove.
997
998 2017-09-11 Tom Tromey <tom@tromey.com>
999
1000 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1001 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1002 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1003 scoped_restore.
1004 (mi_cmd_break_insert_1): Update.
1005 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1006 scoped_restore.
1007
1008 2017-09-11 Tom Tromey <tom@tromey.com>
1009
1010 * demangle.c (demangle_command): Update.
1011 * breakpoint.c (disable_command): Update.
1012 (enable_command): Update.
1013 (find_location_by_number): Make "number" const. Use
1014 get_number_trailer.
1015 * cli/cli-utils.c (extract_arg): Return std::string.
1016 * probe.c (parse_probe_linespec): Update. Change types.
1017 (collect_probes): Take string arguments.
1018 (parse_probe_linespec): Likewise.
1019 (info_probes_for_ops): Update.
1020 (enable_probes_command): Update.
1021 (disable_probes_command): Update.
1022 * break-catch-sig.c (catch_signal_split_args): Update.
1023 * mi/mi-parse.c (mi_parse): Update.
1024
1025 2017-09-11 Tom Tromey <tom@tromey.com>
1026
1027 * language.h (language_enum): Make argument const.
1028 * language.c (language_enum): Make argument const.
1029
1030 2017-09-11 Tom Tromey <tom@tromey.com>
1031
1032 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1033 as function.
1034 (skip_to_space): Rename from skip_to_space_const.
1035 * common/common-utils.c (skip_to_space): New function.
1036 (skip_to_space): Rename from skip_to_space_const.
1037 * cli/cli-utils.h (get_number): Rename from get_number_const.
1038 (extract_arg): Rename from extract_arg_const.
1039 * cli/cli-utils.c (get_number): Rename from get_number_const.
1040 (extract_arg): Rename from extract_arg_const.
1041 (number_or_range_parser::get_number): Use ::get_number.
1042 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1043 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1044 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1045 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1046 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1047 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1048 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1049 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1050
1051 2017-09-11 Tom Tromey <tom@tromey.com>
1052
1053 * python/python.c (do_start_initialization): Use
1054 py-event-types.def to initialize types.
1055 Define all object type structures.
1056 * python/python-internal.h: Don't declare event initialization
1057 functions.
1058 * python/py-threadevent.c (thread_event_object_type): Don't
1059 define.
1060 * python/py-stopevent.c (stop_event_object_type): Don't define.
1061 * python/py-signalevent.c (signal_event_object_type): Don't
1062 declare or define.
1063 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1064 (clear_objfiles_event_object_type): Don't declare or define.
1065 * python/py-infevents.c (inferior_call_pre_event_object_type)
1066 (inferior_call_post_event_object_type)
1067 (register_changed_event_object_type)
1068 (memory_changed_event_object_type): Don't declare or define.
1069 * python/py-inferior.c (new_thread_event_object_type)
1070 (new_inferior_event_object_type)
1071 (inferior_deleted_event_object_type): Don't declare or define.
1072 * python/py-exitedevent.c (exited_event_object_type): Don't
1073 declare or define.
1074 * python/py-evts.c (gdbpy_initialize_py_events): Use
1075 py-all-events.def.
1076 * python/py-events.h (thread_event_object_type): Don't declare.
1077 (events_object): Use py-all-events.def.
1078 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1079 py-event-types.def.
1080 * python/py-event-types.def: New file.
1081 * python/py-continueevent.c (create_continue_event_object): Don't
1082 declare or define.
1083 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1084 declare or define.
1085 * python/py-all-events.def: New file.
1086
1087 2017-09-11 Tom Tromey <tom@tromey.com>
1088
1089 * python/py-threadevent.c (create_thread_event_object): Return
1090 gdbpy_ref.
1091 * python/py-stopevent.h (create_stop_event_object)
1092 (create_breakpoint_event_object, create_signal_event_object):
1093 Update.
1094 * python/py-stopevent.c (create_stop_event_object): Return
1095 gdbpy_ref.
1096 (emit_stop_event): Update.
1097 * python/py-signalevent.c (create_signal_event_object): Return
1098 gdbpy_ref.
1099 * python/py-infevents.c (create_inferior_call_event_object):
1100 Update.
1101 * python/py-event.h (create_event_object)
1102 (create_thread_event_object): Update.
1103 * python/py-event.c (create_event_object): Return gdbpy_ref.
1104 * python/py-continueevent.c: Return gdbpy_ref.
1105 * python/py-bpevent.c (create_breakpoint_event_object): Return
1106 gdbpy_ref.
1107
1108 2017-09-11 Tom Tromey <tom@tromey.com>
1109
1110 PR python/15622:
1111 * NEWS: Add entry.
1112 * python/python.c (do_start_initialization): Initialize new event
1113 types.
1114 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1115 (gdbpy_initialize_inferior_deleted_event)
1116 (gdbpy_initialize_new_thread_event): Declare.
1117 * python/py-threadevent.c (create_thread_event_object): Add option
1118 "thread" parameter.
1119 * python/py-inferior.c (new_thread_event_object_type)
1120 (new_inferior_event_object_type)
1121 (inferior_deleted_event_object_type): Declare.
1122 (python_new_inferior, python_inferior_deleted): New functions.
1123 (add_thread_object): Emit new_thread event.
1124 (gdbpy_initialize_inferior): Attach new functions to corresponding
1125 observers.
1126 (new_thread, new_inferior, inferior_deleted): Define new event
1127 types.
1128 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1129 registries.
1130 * python/py-events.h (events_object) <new_inferior,
1131 inferior_deleted, new_thread>: New fields.
1132 * python/py-event.h (create_thread_event_breakpoint): Add optional
1133 "thread" parameter.
1134
1135 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1136
1137 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1138 check current_ui instead.
1139 (internal_vproblem): Likewise.
1140
1141 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * thread.c (print_thread_info_1): Remove unnecessary calls to
1144 uiout->is_mi_like_p.
1145
1146 2017-09-09 Tom Tromey <tom@tromey.com>
1147
1148 * namespace.h (add_using_directive): Update.
1149 * namespace.c (add_using_directive): Change type of excludes to
1150 std::vector.
1151 * dwarf2read.c (read_import_statement): Use std::vector.
1152 (read_namespace): Update.
1153 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1154
1155 2017-09-09 Tom Tromey <tom@tromey.com>
1156
1157 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1158
1159 2017-09-09 Tom Tromey <tom@tromey.com>
1160
1161 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1162
1163 2017-09-09 Tom Tromey <tom@tromey.com>
1164
1165 * stack.c (func_command): Use gdb::def_vector.
1166
1167 2017-09-09 Tom Tromey <tom@tromey.com>
1168
1169 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1170 ui_out_emit_list, ui_out_emit_tuple.
1171 (mi_cmd_var_update): Likewise.
1172
1173 2017-09-09 Tom Tromey <tom@tromey.com>
1174
1175 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1176 ui_out_redirect_pop.
1177 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1178 ui_out_redirect_pop.
1179 * utils.c (do_ui_out_redirect_pop)
1180 (make_cleanup_ui_out_redirect_pop): Remove.
1181 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1182 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1183 * ui-out.h (ui_out_redirect_pop): New class.
1184
1185 2017-09-09 Tom Tromey <tom@tromey.com>
1186
1187 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1188 (list_available_thread_groups, mi_cmd_list_thread_groups)
1189 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1190 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1191 Likewise.
1192
1193 2017-09-09 Tom Tromey <tom@tromey.com>
1194
1195 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1196 ui_out_emit_tuple.
1197
1198 2017-09-09 Tom Tromey <tom@tromey.com>
1199
1200 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1201 * stack.c (print_frame): Use ui_out_emit_tuple.
1202 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1203 (info_spu_mailbox_command, info_spu_dma_command)
1204 (info_spu_proxydma_command): Likewise.
1205 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1206 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1207 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1208 ui_out_emit_tuple.
1209 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1210
1211 2017-09-09 Tom Tromey <tom@tromey.com>
1212
1213 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1214 (class ui_out_emit_table): Update comment.
1215 * ui-out.c (do_cleanup_table_end)
1216 (make_cleanup_ui_out_table_begin_end): Remove.
1217 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1218 (info_spu_dma_cmdlist): Likewise.
1219 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1220 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1221 ui_out_emit_table.
1222
1223 2017-09-09 Tom Tromey <tom@tromey.com>
1224
1225 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1226 ui_out_emit_list, gdb::optional.
1227
1228 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1229
1230 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1231 prototype.
1232 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1233 prototype.
1234 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1235 prototype.
1236 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1237 * ada-exp.y: Remove _initialize_ada_exp prototype.
1238 * ada-lang.c: Remove _initialize_ada_language prototype.
1239 * ada-tasks.c: Remove _initialize_tasks prototype.
1240 * addrmap.c: Remove _initialize_addrmap prototype.
1241 * agent.c: Remove _initialize_agent prototype.
1242 * aix-thread.c: Remove _initialize_aix_thread prototype.
1243 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1244 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1245 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1246 prototype.
1247 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1248 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1249 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1250 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1251 prototype.
1252 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1253 prototype.
1254 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1255 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1256 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1257 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1258 prototype.
1259 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1260 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1261 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1262 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1263 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1264 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1265 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1266 prototype.
1267 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1268 prototype.
1269 * annotate.c: Remove _initialize_annotate prototype.
1270 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1271 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1272 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1273 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1274 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1275 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1276 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1277 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1278 prototype.
1279 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1280 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1281 * auto-load.c: Remove _initialize_auto_load prototype.
1282 * auxv.c: Remove _initialize_auxv prototype.
1283 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1284 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1285 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1286 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1287 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1288 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1289 prototype.
1290 * break-catch-throw.c: Remove _initialize_break_catch_throw
1291 prototype.
1292 * breakpoint.c: Remove _initialize_breakpoint prototype.
1293 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1294 * btrace.c: Remove _initialize_btrace prototype.
1295 * charset.c: Remove _initialize_charset prototype.
1296 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1297 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1298 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1299 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1300 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1301 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1302 * coffread.c: Remove _initialize_coffread prototype.
1303 * compile/compile.c: Remove _initialize_compile prototype.
1304 * complaints.c: Remove _initialize_complaints prototype.
1305 * completer.c: Remove _initialize_completer prototype.
1306 * copying.awk: Remove _initialize_copying prototype.
1307 * copying.c: Regenerate.
1308 * core-regset.c: Remove _initialize_core_regset prototype.
1309 * corefile.c: Remove _initialize_core prototype.
1310 * corelow.c: Remove _initialize_corelow prototype.
1311 * cp-abi.c: Remove _initialize_cp_abi prototype.
1312 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1313 * cp-support.c: Remove _initialize_cp_support prototype.
1314 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1315 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1316 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1317 * ctf.c: Remove _initialize_ctf prototype.
1318 * d-lang.c: Remove _initialize_d_language prototype.
1319 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1320 prototype.
1321 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1322 * dbxread.c: Remove _initialize_dbxread prototype.
1323 * dcache.c: Remove _initialize_dcache prototype.
1324 * demangle.c: Remove _initialize_demangler prototype.
1325 * disasm-selftests.c: Remove _initialize_disasm_selftests
1326 prototype.
1327 * disasm.c: Remove _initialize_disasm prototype.
1328 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1329 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1330 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1331 prototype.
1332 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1333 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1334 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1335 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1336 * elfread.c: Remove _initialize_elfread prototype.
1337 * exec.c: Remove _initialize_exec prototype.
1338 * extension.c: Remove _initialize_extension prototype.
1339 * f-lang.c: Remove _initialize_f_language prototype.
1340 * f-valprint.c: Remove _initialize_f_valprint prototype.
1341 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1342 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1343 * filesystem.c: Remove _initialize_filesystem prototype.
1344 * findcmd.c: Remove _initialize_mem_search prototype.
1345 * fork-child.c: Remove _initialize_fork_child prototype.
1346 * frame-base.c: Remove _initialize_frame_base prototype.
1347 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1348 * frame.c: Remove _initialize_frame prototype.
1349 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1350 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1351 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1352 * gcore.c: Remove _initialize_gcore prototype.
1353 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1354 * gdbarch.c: Regenerate.
1355 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1356 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1357 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1358 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1359 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1360 * go-lang.c: Remove _initialize_go_language prototype.
1361 * go32-nat.c: Remove _initialize_go32_nat prototype.
1362 * guile/guile.c: Remove _initialize_guile prototype.
1363 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1364 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1365 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1366 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1367 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1368 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1369 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1370 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1371 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1372 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1373 prototype.
1374 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1375 prototype.
1376 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1377 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1378 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1379 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1380 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1381 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1382 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1383 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1384 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1385 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1386 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1387 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1388 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1389 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1390 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1391 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1392 prototype.
1393 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1394 prototype.
1395 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1396 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1397 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1398 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1399 * infcall.c: Remove _initialize_infcall prototype.
1400 * infcmd.c: Remove _initialize_infcmd prototype.
1401 * inferior.c: Remove _initialize_inferiors prototype.
1402 * inflow.c: Remove _initialize_inflow prototype.
1403 * infrun.c: Remove _initialize_infrun prototype.
1404 * interps.c: Remove _initialize_interpreter prototype.
1405 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1406 * jit.c: Remove _initialize_jit prototype.
1407 * language.c: Remove _initialize_language prototype.
1408 * linux-fork.c: Remove _initialize_linux_fork prototype.
1409 * linux-nat.c: Remove _initialize_linux_nat prototype.
1410 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1411 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1412 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1413 * m2-lang.c: Remove _initialize_m2_language prototype.
1414 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1415 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1416 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1417 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1418 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1419 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1420 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1421 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1422 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1423 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1424 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1425 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1426 * machoread.c: Remove _initialize_machoread prototype.
1427 * macrocmd.c: Remove _initialize_macrocmd prototype.
1428 * macroscope.c: Remove _initialize_macroscope prototype.
1429 * maint.c: Remove _initialize_maint_cmds prototype.
1430 * mdebugread.c: Remove _initialize_mdebugread prototype.
1431 * memattr.c: Remove _initialize_mem prototype.
1432 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1433 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1434 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1435 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1436 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1437 * microblaze-linux-tdep.c: Remove
1438 _initialize_microblaze_linux_tdep prototype.
1439 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1440 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1441 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1442 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1443 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1444 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1445 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1446 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1447 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1448 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1449 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1450 prototype.
1451 * mipsread.c: Remove _initialize_mipsread prototype.
1452 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1453 prototype.
1454 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1455 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1456 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1457 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1458 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1459 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1460 prototype.
1461 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1462 * nto-procfs.c: Remove _initialize_procfs prototype.
1463 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1464 * objc-lang.c: Remove _initialize_objc_language prototype.
1465 * objfiles.c: Remove _initialize_objfiles prototype.
1466 * observer.c: Remove observer_test_first_notification_function,
1467 observer_test_second_notification_function,
1468 observer_test_third_notification_function, and
1469 _initialize_observer prototypes.
1470 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1471 * osabi.c: Remove _initialize_gdb_osabi prototype.
1472 * osdata.c: Remove _initialize_osdata prototype.
1473 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1474 * parse.c: Remove _initialize_parse prototype.
1475 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1476 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1477 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1478 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1479 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1480 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1481 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1482 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1483 * printcmd.c: Remove _initialize_printcmd prototype.
1484 * probe.c: Remove _initialize_probe prototype.
1485 * proc-api.c: Remove _initialize_proc_api prototype.
1486 * proc-events.c: Remove _initialize_proc_events prototype.
1487 * proc-service.c: Remove _initialize_proc_service prototype.
1488 * procfs.c: Remove _initialize_procfs prototype.
1489 * psymtab.c: Remove _initialize_psymtab prototype.
1490 * python/python.c: Remove _initialize_python prototype.
1491 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1492 * record-btrace.c: Remove _initialize_record_btrace prototype.
1493 * record-full.c: Remove _initialize_record_full prototype.
1494 * record.c: Remove _initialize_record prototype.
1495 * regcache.c: Remove _initialize_regcache prototype.
1496 * reggroups.c: Remove _initialize_reggroup prototype.
1497 * remote-notif.c: Remove _initialize_notif prototype.
1498 * remote-sim.c: Remove _initialize_remote_sim prototype.
1499 * remote.c: Remove _initialize_remote prototype.
1500 * reverse.c: Remove _initialize_reverse prototype.
1501 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1502 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1503 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1504 prototype.
1505 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1506 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1507 * rust-exp.y: Remove _initialize_rust_exp prototype.
1508 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1509 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1510 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1511 * score-tdep.c: Remove _initialize_score_tdep prototype.
1512 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1513 prototype.
1514 * ser-go32.c: Remove _initialize_ser_dos prototype.
1515 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1516 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1517 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1518 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1519 * serial.c: Remove _initialize_serial prototype.
1520 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1521 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1522 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1523 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1524 * skip.c: Remove _initialize_step_skip prototype.
1525 * sol-thread.c: Remove _initialize_sol_thread prototype.
1526 * solib-aix.c: Remove _initialize_solib_aix prototype.
1527 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1528 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1529 * solib-frv.c: Remove _initialize_frv_solib prototype.
1530 * solib-spu.c: Remove _initialize_spu_solib prototype.
1531 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1532 * solib-target.c: Remove _initialize_solib_target prototype.
1533 * solib.c: Remove _initialize_solib prototype.
1534 * source.c: Remove _initialize_source prototype.
1535 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1536 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1537 prototype.
1538 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1539 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1540 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1541 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1542 prototype.
1543 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1544 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1545 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1546 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1547 prototype.
1548 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1549 prototype.
1550 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1551 prototype.
1552 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1553 prototype.
1554 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1555 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1556 prototype.
1557 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1558 prototype.
1559 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1560 prototype.
1561 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1562 prototype.
1563 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1564 prototype.
1565 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1566 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1567 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1568 * stabsread.c: Remove _initialize_stabsread prototype.
1569 * stack.c: Remove _initialize_stack prototype.
1570 * stap-probe.c: Remove _initialize_stap_probe prototype.
1571 * std-regs.c: Remove _initialize_frame_reg prototype.
1572 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1573 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1574 * symfile.c: Remove _initialize_symfile prototype.
1575 * symmisc.c: Remove _initialize_symmisc prototype.
1576 * symtab.c: Remove _initialize_symtab prototype.
1577 * target-dcache.c: Remove _initialize_target_dcache prototype.
1578 * target-descriptions.c: Remove _initialize_target_descriptions
1579 prototype.
1580 * thread.c: Remove _initialize_thread prototype.
1581 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1582 prototype.
1583 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1584 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1585 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1586 prototype.
1587 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1588 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1589 * tracefile.c: Remove _initialize_tracefile prototype.
1590 * tracepoint.c: Remove _initialize_tracepoint prototype.
1591 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1592 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1593 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1594 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1595 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1596 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1597 * tui/tui.c: Remove _initialize_tui prototype.
1598 * typeprint.c: Remove _initialize_typeprint prototype.
1599 * user-regs.c: Remove _initialize_user_regs prototype.
1600 * utils.c: Remove _initialize_utils prototype.
1601 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1602 * valarith.c: Remove _initialize_valarith prototype.
1603 * valops.c: Remove _initialize_valops prototype.
1604 * valprint.c: Remove _initialize_valprint prototype.
1605 * value.c: Remove _initialize_values prototype.
1606 * varobj.c: Remove _initialize_varobj prototype.
1607 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1608 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1609 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1610 * windows-nat.c: Remove _initialize_windows_nat,
1611 _initialize_check_for_gdb_ini, and _initialize_loadable
1612 prototypes.
1613 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1614 * xcoffread.c: Remove _initialize_xcoffread prototype.
1615 * xml-support.c: Remove _initialize_xml_support prototype.
1616 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1617 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1618 prototype.
1619 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1620 prototype.
1621 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1622
1623 2017-09-08 Keith Seitz <keiths@redhat.com>
1624
1625 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1626 field.
1627
1628 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1629
1630 * f-valprint.c (f_val_print): Remove check for one byte
1631 sized integers. Remove printing of character type.
1632
1633 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1634 Christoph Weinmann <christoph.t.weinmann@intel.com>
1635 Bernhard Heckel <bernhard.heckel@intel.com>
1636
1637 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1638 to maintain proper indentation when printing pointers/refs.
1639
1640 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1641
1642 GDB 8.0.1 released.
1643
1644 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1645
1646 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1647
1648 2017-09-05 Tom Tromey <tom@tromey.com>
1649
1650 * parse.c (funcall_chain): Now a std::vector.
1651 (start_arglist, end_arglist): Simplify.
1652 (free_funcalls): Remove.
1653 (parse_exp_in_context_1): Remove cleanup.
1654
1655 2017-09-05 Tom Tromey <tom@tromey.com>
1656
1657 * go-exp.y (go_parse): Don't create a cleanup.
1658
1659 2017-09-05 Tom Tromey <tom@tromey.com>
1660
1661 * d-exp.y (PrimaryExpression): Use std::string.
1662 (d_parse): Don't create a cleanup.
1663
1664 2017-09-05 Tom Tromey <tom@tromey.com>
1665
1666 * utils.c (do_clear_parser_state): Remove.
1667 (make_cleanup_clear_parser_state): Remove.
1668 * p-exp.y (pascal_parse): Use scoped_restore.
1669 * m2-exp.y (m2_parse): Use scoped_restore.
1670 * f-exp.y (f_parse): Use scoped_restore.
1671 * d-exp.y (d_parse): Use scoped_restore.
1672 * c-exp.y (c_parse): Use scoped_restore.
1673 * ada-exp.y (ada_parse): Use scoped_restore.
1674 * utils.h (make_cleanup_clear_parser_state): Remove.
1675
1676 2017-09-06 Keith Seitz <keiths@redhat.com>
1677
1678 * dwarf2read.c (dw2_linkage_name_attr): New function.
1679 (dw2_linkage_name): New function.
1680 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1681 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1682 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1683
1684 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1685
1686 * config/djgpp/djconfig.sh: Correct shell portability issue.
1687
1688 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1689
1690 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1691
1692 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1693
1694 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1695 * NEWS: Mention new FreeBSD/mips native configuration.
1696 * configure.host: Add aarch64*-*-freebsd*.
1697 * configure.nat: Likewise.
1698 * aarch64-fbsd-nat.c: New file.
1699
1700 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1701
1702 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1703 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1704 * NEWS: Mention new FreeBSD/aarch64 target.
1705 * configure.tgt: Add aarch64*-*-freebsd*.
1706 * aarch64-fbsd-tdep.c: New file.
1707 * aarch64-fbsd-tdep.h: New file.
1708
1709 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1710
1711 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1712
1713 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1714
1715 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1716 of TLS symbols.
1717
1718 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1719
1720 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1721 call.
1722
1723 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1724
1725 * infrun.c (follow_exec): Call add_thread after
1726 target_find_description.
1727
1728 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1729
1730 * infrun.c (handle_inferior_event_1): When exec'ing, read
1731 stop_pc after follow_exec.
1732
1733 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1734
1735 * remote.c (process_g_packet): Update error message.
1736
1737 2017-09-05 Yao Qi <yao.qi@linaro.org>
1738
1739 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1740 targets.
1741
1742 2017-09-05 Pedro Alves <palves@redhat.com>
1743
1744 * eval.c (eval_call, evaluate_funcall): New functions, factored
1745 out from ...
1746 (evaluate_subexp_standard): ... this.
1747
1748 2017-09-05 Yao Qi <yao.qi@linaro.org>
1749
1750 * amd64-tdep.c (amd64_target_description): Create target
1751 descriptions.
1752 (_initialize_amd64_tdep): Don't call functions
1753 initialize_tdesc_amd64_*. Add self tests.
1754 * arch/amd64.c (amd64_create_target_description): Add parameter
1755 is_linux. Call set_tdesc_osabi if is_linux is true.
1756 * arch/amd64.h (amd64_create_target_description): Update the
1757 declaration.
1758 * arch/i386.c (i386_create_target_description): Add parameter
1759 is_linux. Call set_tdesc_osabi if is_linux is true.
1760 * arch/i386.h (i386_create_target_description): Update
1761 declaration.
1762 * configure.tgt: Add i386.o to gdb_target_obs.
1763 * features/Makefile (XMLTOC): Remove i386/*.xml.
1764 * features/i386/amd64-avx-avx512.c: Remove.
1765 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1766 * features/i386/amd64-avx-mpx.c: Remove.
1767 * features/i386/amd64-avx.c: Remove.
1768 * features/i386/amd64-mpx.c: Remove.
1769 * features/i386/amd64.c: Remove.
1770 * features/i386/i386-avx-avx512.c: Remove.
1771 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1772 * features/i386/i386-avx-mpx.c: Remove.
1773 * features/i386/i386-avx.c: Remove.
1774 * features/i386/i386-mmx.c: Remove.
1775 * features/i386/i386-mpx.c: Remove.
1776 * features/i386/i386.c: Remove.
1777 * i386-tdep.c: Don't include features/i386/i386*.c., include
1778 target-descriptions.h and arch/i386.h.
1779 (i386_target_description): Create target descriptions.
1780 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1781 functions. Do self tests.
1782
1783 2017-09-05 Yao Qi <yao.qi@linaro.org>
1784
1785 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1786 * features/i386/amd64-avx-avx512-linux.c: Removed.
1787 * features/i386/amd64-avx-linux.c: Removed.
1788 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1789 * features/i386/amd64-avx-mpx-linux.c: Removed.
1790 * features/i386/amd64-linux.c: Removed.
1791 * features/i386/amd64-mpx-linux.c: Removed.
1792 * features/i386/x32-avx-avx512-linux.c: Removed.
1793 * features/i386/x32-avx-linux.c: Removed.
1794 * features/i386/x32-linux.c: Removed.
1795
1796 2017-09-05 Yao Qi <yao.qi@linaro.org>
1797
1798 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1799 features/i386/*.c.
1800 (amd64_linux_read_description): Call
1801 amd64_create_target_description.
1802 * arch/amd64.c: New file.
1803 * arch/amd64.h: New file.
1804 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1805 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1806
1807 2017-09-05 Yao Qi <yao.qi@linaro.org>
1808
1809 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1810 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1811 (amd64_linux_read_description): Create target descriptions.
1812 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1813 functions. Add unit tests.
1814 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1815 x32-core.xml.
1816 * features/i386/64bit-avx.c: Generated.
1817 * features/i386/64bit-avx512.c: Generated.
1818 * features/i386/64bit-core.c: Generated.
1819 * features/i386/64bit-linux.c: Generated.
1820 * features/i386/64bit-mpx.c: Generated.
1821 * features/i386/64bit-pkeys.c: Generated.
1822 * features/i386/64bit-segments.c: Generated.
1823 * features/i386/64bit-sse.c: Generated.
1824 * features/i386/x32-core.c: Generated.
1825 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1826 c files for amd64-linux and x32-linux.
1827
1828 2017-09-05 Yao Qi <yao.qi@linaro.org>
1829
1830 * amd64-linux-tdep.c (amd64_linux_read_description): New
1831 function.
1832 (amd64_linux_core_read_description): Call
1833 amd64_linux_read_description.
1834 (amd64_linux_init_abi): Likewise.
1835 (amd64_x32_linux_init_abi): Likewise.
1836 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1837 * x86-linux-nat.c (x86_linux_read_description): Call
1838 amd64_linux_read_description.
1839
1840 2017-09-05 Yao Qi <yao.qi@linaro.org>
1841
1842 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1843 comments.
1844
1845 2017-09-05 Yao Qi <yao.qi@linaro.org>
1846
1847 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1848 * features/i386/i386-avx-avx512-linux.c: Remove.
1849 * features/i386/i386-avx-linux.c: Remove.
1850 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1851 * features/i386/i386-avx-mpx-linux.c: Remove.
1852 * features/i386/i386-linux.c: Remove.
1853 * features/i386/i386-mmx-linux.c: Remove.
1854 * features/i386/i386-mpx-linux.c: Remove.
1855
1856 2017-09-05 Yao Qi <yao.qi@linaro.org>
1857
1858 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1859 (SFILES): Add arch/i386.c.
1860 (HFILES_NO_SRCDIR): Add arch/i386.h.
1861 * arch/i386.c: New file.
1862 * arch/i386.h: New file.
1863 * arch/tdesc.h (allocate_target_description): Declare.
1864 (set_tdesc_architecture): Declare.
1865 (set_tdesc_osabi): Declare.
1866 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1867 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1868 include arch/i386.h.
1869 (i386_linux_read_description): Remove code and call
1870 i386_create_target_description.
1871 (set_tdesc_architecture): New function.
1872 (set_tdesc_osabi): New function.
1873 * target-descriptions.h (allocate_target_description): Remove.
1874
1875 2017-09-05 Yao Qi <yao.qi@linaro.org>
1876
1877 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1878 * target-descriptions.c (tdesc_create_feature): Likewise, and
1879 adjust code.
1880 * features/i386/32bit-avx.c: Re-generated.
1881 * features/i386/32bit-avx512.c: Re-generated.
1882 * features/i386/32bit-core.c: Re-generated.
1883 * features/i386/32bit-linux.c: Re-generated.
1884 * features/i386/32bit-mpx.c: Re-generated.
1885 * features/i386/32bit-pkeys.c: Re-generated.
1886 * features/i386/32bit-sse.c: Re-generated.
1887
1888 2017-09-05 Yao Qi <yao.qi@linaro.org>
1889
1890 * regformats/regdef.h (struct reg): Override operator == and !=.
1891
1892 2017-09-05 Yao Qi <yao.qi@linaro.org>
1893
1894 * arch/tdesc.h: New file.
1895 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1896 * target-descriptions.c: Update comments.
1897 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1898 declarations.
1899 * features/i386/32bit-avx.c: Re-generated.
1900 * features/i386/32bit-avx512.c: Re-generated.
1901 * features/i386/32bit-core.c: Re-generated.
1902 * features/i386/32bit-linux.c: Re-generated.
1903 * features/i386/32bit-mpx.c: Re-generated.
1904 * features/i386/32bit-pkeys.c: Re-generated.
1905 * features/i386/32bit-sse.c: Re-generated.
1906
1907 2017-09-05 Yao Qi <yao.qi@linaro.org>
1908
1909 * regformats/regdat.sh: Update generated code.
1910
1911 2017-09-05 Yao Qi <yao.qi@linaro.org>
1912
1913 * regformats/regdat.sh: Adjust code order.
1914
1915 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1916
1917 * expprint.c (dump_subexp_body_standard): Use constant format
1918 string in fprintf_filtered call.
1919
1920 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1921
1922 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1923 NetBSD/i386.
1924 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1925
1926 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1927
1928 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1929
1930 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1931
1932 * bsd-kvm.o: Define _KMEMUSER.
1933 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1934 * configure: Regenerate.
1935
1936 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1937
1938 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1939 * i386-fbsd-nat.c: Likewise.
1940
1941 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1942
1943 * unittests/array-view-selftests.c: Add include of <array>.
1944
1945 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1946
1947 * spu-tdep.c (flush_ea_cache): Add missing argument to
1948 call_function_by_hand.
1949
1950 2017-09-04 Pedro Alves <palves@redhat.com>
1951
1952 * NEWS (Safer support for debugging with no debug info): New.
1953
1954 2017-09-04 Pedro Alves <palves@redhat.com>
1955
1956 * c-exp.y (function_method, function_method_void): Add current
1957 instance flags to TYPE_INSTANCE.
1958 * dwarf2read.c (check_modifier): New.
1959 (compute_delayed_physnames): Assert that only C++ adds delayed
1960 physnames. Mark fn_fields as const/volatile depending on
1961 physname.
1962 * eval.c (make_params): New type_instance_flags parameter. Use
1963 it as the new type's instance flags.
1964 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1965 flags element and pass it to make_params.
1966 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1967 instance flags element.
1968 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1969 * gdbtypes.h: Include "enum-flags.h".
1970 (type_instance_flags): New enum-flags type.
1971 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1972 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1973 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1974 (follow_type_instance_flags): New function.
1975 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1976 * parser-defs.h (follow_type_instance_flags): Declare.
1977 * valops.c (value_struct_elt_for_reference): const/volatile must
1978 match too.
1979
1980 2017-09-04 Pedro Alves <palves@redhat.com>
1981
1982 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1983 function/method scopes; lookup the nested name as a function local
1984 static variable.
1985
1986 2017-09-04 Pedro Alves <palves@redhat.com>
1987
1988 (%type <voidval>): Add function_method.
1989 * c-exp.y (exp): New production for calls with no arguments.
1990 (function_method, function_method_void_or_typelist): New
1991 productions.
1992 (exp): New production for "method()::static_var".
1993 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1994 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1995 Handle OP_FUNC_STATIC_VAR.
1996 * parse.c (operator_length_standard):
1997 Handle OP_FUNC_STATIC_VAR.
1998
1999 2017-09-04 Pedro Alves <palves@redhat.com>
2000
2001 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2002 handling.
2003 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2004 Ditto.
2005 * parse.c (operator_length_standard, operator_check_standard):
2006 Ditto.
2007 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2008
2009 2017-09-04 Pedro Alves <palves@redhat.com>
2010
2011 * ax-gdb.c: Include "typeprint.h".
2012 (gen_expr_for_cast): New function.
2013 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2014 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2015 type is unknown.
2016 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2017 nodebug_data_symbol.
2018 * eval.c: Include "typeprint.h".
2019 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2020 Error out if symbol has unknown type.
2021 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2022 evaluate_subexp_for_cast.
2023 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2024 OP_VAR_MSYM_VALUE.
2025 (evaluate_subexp_for_cast): New function.
2026 * gdbtypes.c (init_nodebug_var_type): New function.
2027 (objfile_type): Use it to initialize types of variables with no
2028 debug info.
2029 * typeprint.c (error_unknown_type): New.
2030 * typeprint.h (error_unknown_type): New declaration.
2031 * compile/compile-c-types.c (convert_type_basic): Handle
2032 TYPE_CODE_ERROR; warn and fallback to int for variables with
2033 unknown type.
2034
2035 2017-09-04 Pedro Alves <palves@redhat.com>
2036
2037 * eval.c (evaluate_var_value): New function, factored out from ...
2038 (evaluate_subexp_standard): ... here.
2039
2040 2017-09-04 Pedro Alves <palves@redhat.com>
2041
2042 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2043 Remove useless assignments to 'op'.
2044
2045 2017-09-04 Pedro Alves <palves@redhat.com>
2046
2047 * eval.c (eval_skip_value): New function.
2048 (evaluate_subexp_standard): Use it.
2049
2050 2017-09-04 Pedro Alves <palves@redhat.com>
2051
2052 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2053 function name from symbol/minsym and pass it to
2054 error_call_unknown_return_type.
2055
2056 2017-09-04 Pedro Alves <palves@redhat.com>
2057
2058 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2059 * ax-gdb.c (gen_msym_var_ref): New function.
2060 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2061 * eval.c (evaluate_var_msym_value): New function.
2062 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2063 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2064 to call_function_by_hand.
2065 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2066 Handle OP_VAR_MSYM_VALUE.
2067 (union exp_element) <msymbol>: New field.
2068 * minsyms.h (struct type): Forward declare.
2069 (find_minsym_type_and_address): Declare.
2070 * parse.c (write_exp_elt_msym): New function.
2071 (write_exp_msymbol): Delete, refactored as ...
2072 (find_minsym_type_and_address): ... this new function.
2073 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2074 (operator_length_standard, operator_check_standard): Handle
2075 OP_VAR_MSYM_VALUE.
2076 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2077
2078 2017-09-04 Pedro Alves <palves@redhat.com>
2079
2080 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2081 TYPE_GNU_IFUNC specially here. Throw error if return type is
2082 unknown.
2083 * ada-typeprint.c (print_func_type): Handle functions with unknown
2084 return type.
2085 * c-typeprint.c (c_type_print_base): Handle functions and methods
2086 with unknown return type.
2087 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2088 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2089 * compile/compile-c-types.c: Include "objfiles.h".
2090 (convert_func): For functions with unknown return type, warn and
2091 default to int.
2092 * compile/compile-object-run.c (compile_object_run): Adjust call
2093 to call_function_by_hand_dummy.
2094 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2095 call_function_by_hand.
2096 * eval.c (evaluate_subexp_standard): Adjust calls to
2097 call_function_by_hand. Handle functions and methods with unknown
2098 return type. Pass expect_type to call_function_by_hand.
2099 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2100 return type.
2101 * gcore.c (call_target_sbrk): Adjust call to
2102 call_function_by_hand.
2103 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2104 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2105 an integer address type instead of nodebug.
2106 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2107 call_function_by_hand.
2108 * infcall.c (error_call_unknown_return_type): New function.
2109 (call_function_by_hand): New "default_return_type" parameter.
2110 Pass it down.
2111 (call_function_by_hand_dummy): New "default_return_type"
2112 parameter. Use it instead of defaulting to int. If there's no
2113 default and the return type is unknown, throw an error. If
2114 there's a default return type, and the called function has no
2115 debug info, then assume the function is prototyped.
2116 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2117 New "default_return_type" parameter.
2118 (error_call_unknown_return_type): New declaration.
2119 * linux-fork.c (call_lseek): Cast return type of lseek.
2120 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2121 call_function_by_hand.
2122 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2123 calls to call_function_by_hand.
2124 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2125 return type.
2126 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2127 (value_nsstring, print_object_command): Adjust calls to
2128 call_function_by_hand.
2129 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2130 functions with unknown return type.
2131 (pascal_type_print_func_varspec_suffix): New function.
2132 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2133 TYPE_CODE_METHOD>: Use it.
2134 * python/py-value.c (valpy_call): Adjust call to
2135 call_function_by_hand.
2136 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2137 call_function_by_hand.
2138 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2139 call_function_by_hand.
2140 * valops.c (value_allocate_space_in_inferior): Adjust call to
2141 call_function_by_hand.
2142 * typeprint.c (type_print_unknown_return_type): New function.
2143 * typeprint.h (type_print_unknown_return_type): New declaration.
2144
2145 2017-09-04 Pedro Alves <palves@redhat.com>
2146
2147 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2148 types with more than one parameter as prototyped.
2149
2150 2017-09-04 Pedro Alves <palves@redhat.com>
2151
2152 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2153 (disassemble_command): Use gdb_disassembly_flags instead of bare
2154 int.
2155 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2156 (dump_insns, do_mixed_source_and_assembly_deprecated)
2157 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2158 Use gdb_disassembly_flags instead of bare int.
2159 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2160 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2161 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2162 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2163 (enum gdb_disassembly_flag): ... values of this new enumeration.
2164 (gdb_disassembly_flags): Define.
2165 (gdb_disassembly)
2166 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2167 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2168 gdb_disassembly_flags instead of bare int.
2169 * record-btrace.c (btrace_insn_history)
2170 (record_btrace_insn_history, record_btrace_insn_history_range)
2171 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2172 instead of bare int.
2173 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2174 Use gdb_disassembly_flags instead of bare int.
2175 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2176 Define.
2177 * target-delegates.c: Regenerate.
2178 * target.c (target_insn_history, target_insn_history_from)
2179 (target_insn_history_range): Use gdb_disassembly_flags instead of
2180 bare int.
2181 * target.h: Include "disasm.h".
2182 (struct target_ops) <to_insn_history, to_insn_history_from,
2183 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2184 int.
2185 (target_insn_history, target_insn_history_from)
2186 (target_insn_history_range): Use gdb_disassembly_flags instead of
2187 bare int.
2188
2189 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2190
2191 * cli/cli-script.c (build_command_line): For if/while commands,
2192 check whether args is empty.
2193
2194 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2195
2196 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2197 (enum command_control_type): Likewise.
2198 (struct command_line): Likewise.
2199 (free_command_lines): Likewise.
2200 (struct command_lines_deleter): Likewise.
2201 (command_line_up): Likewise.
2202 (read_command_lines): Likewise.
2203 (read_command_lines_1): Likewise.
2204 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2205 (enum command_control_type): Likewise.
2206 (struct command_line): Likewise.
2207 (free_command_lines): Likewise.
2208 (struct command_lines_deleter): Likewise.
2209 (command_line_up): Likewise.
2210 (read_command_lines): Likewise.
2211 (read_command_lines_1): Likewise.
2212 * breakpoint.h: Include cli/cli-script.h.
2213 * extension-priv.h: Likewise.
2214 * gdbcmd.h: Likewise.
2215
2216 2017-09-04 Pedro Alves <palves@redhat.com>
2217
2218 * ada-lang.c (is_known_support_routine): Move sal declaration to
2219 where it is initialized.
2220 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2221 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2222 (clear_command, update_static_tracepoint): Remove init_sal
2223 references. Move declarations closer to initializations.
2224 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2225 initializations.
2226 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2227 references. Move sal declarations closer to initializations.
2228 * frame.c (find_frame_sal): Return a symtab_and_line via function
2229 return instead of output parameter. Remove init_sal references.
2230 * frame.h (find_frame_sal): Return a symtab_and_line via function
2231 return instead of output parameter.
2232 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2233 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2234 instead of memset.
2235 (gdbscm_find_pc_line): Remove init_sal reference.
2236 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2237 references. Move declarations closer to initializations.
2238 * infcmd.c (set_step_frame): Update. Move declarations closer to
2239 initializations.
2240 (finish_backward): Remove init_sal references. Move declarations
2241 closer to initializations.
2242 * infrun.c (process_event_stop_test, handle_step_into_function)
2243 (insert_hp_step_resume_breakpoint_at_frame)
2244 (insert_step_resume_breakpoint_at_caller): Likewise.
2245 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2246 (symbol_to_sal): Likewise.
2247 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2248 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2249 to its initialization.
2250 * reverse.c (save_bookmark_command): Use new/delete. Remove
2251 init_sal references. Move declarations closer to initializations.
2252 * source.c (get_current_source_symtab_and_line): Remove brace
2253 initialization.
2254 (set_current_source_symtab_and_line): Now takes the sal by const
2255 reference. Remove brace initialization.
2256 (line_info): Remove init_sal reference.
2257 * source.h (set_current_source_symtab_and_line): Now takes a
2258 symtab_and_line via const reference.
2259 * stack.c (set_current_sal_from_frame): Adjust.
2260 (print_frame_info): Adjust.
2261 (get_last_displayed_sal): Return the sal via function return
2262 instead of via output parameter. Simplify.
2263 (frame_info): Adjust.
2264 * stack.h (get_last_displayed_sal): Return the sal via function
2265 return instead of via output parameter.
2266 * symtab.c (init_sal): Delete.
2267 (find_pc_sect_line): Remove init_sal references. Move
2268 declarations closer to initializations.
2269 (find_function_start_sal): Remove init_sal references. Move
2270 declarations closer to initializations.
2271 * symtab.h (struct symtab_and_line): In-class initialize all
2272 fields.
2273 * tracepoint.c (set_traceframe_context)
2274 (print_one_static_tracepoint_marker): Remove init_sal references.
2275 Move declarations closer to initializations.
2276 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2277 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2278 declarations closer to initializations.
2279 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2280 init_sal references. Adjust.
2281
2282 2017-09-04 Pedro Alves <palves@redhat.com>
2283
2284 * ax-gdb.c (agent_command_1): Use range-for.
2285 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2286 * breakpoint.c: Include "common/array-view.h".
2287 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2288 parameter from struct symtabs_and_lines to
2289 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2290 (breakpoint_sals_to_pc): Change sals parameter from struct
2291 symtabs_and_lines to std::vector reference.
2292 (check_fast_tracepoint_sals): Change sals parameter from struct
2293 symtabs_and_lines to std::array_view. Use range-for.
2294 (decode_static_tracepoint_spec): Return a std::vector instead of
2295 symtabs_and_lines. Update.
2296 (create_breakpoint): Update.
2297 (break_range_command, until_break_command, clear_command): Update.
2298 (base_breakpoint_decode_location, bkpt_decode_location)
2299 (bkpt_probe_create_sals_from_location)
2300 (bkpt_probe_decode_location, tracepoint_decode_location)
2301 (tracepoint_probe_decode_location)
2302 (strace_marker_create_sals_from_location): Return a std::vector
2303 instead of symtabs_and_lines.
2304 (strace_marker_create_breakpoints_sal): Update.
2305 (strace_marker_decode_location): Return a std::vector instead of
2306 symtabs_and_lines. Update.
2307 (update_breakpoint_locations): Change struct symtabs_and_lines
2308 parameters to gdb::array_view. Adjust.
2309 (location_to_sals): Return a std::vector instead of
2310 symtabs_and_lines. Update.
2311 (breakpoint_re_set_default): Use std::vector instead of struct
2312 symtabs_and_lines.
2313 (decode_location_default): Return a std::vector instead of
2314 symtabs_and_lines. Update.
2315 * breakpoint.h: Include "common/array-view.h".
2316 (struct breakpoint_ops) <decode_location>: Now returns a
2317 std::vector instead of returning a symtabs_and_lines via output
2318 parameter.
2319 (update_breakpoint_locations): Change sals parameters to use
2320 gdb::array_view.
2321 * cli/cli-cmds.c (edit_command, list_command): Update to use
2322 std::vector and gdb::array_view.
2323 (ambiguous_line_spec): Adjust to use gdb::array_view and
2324 range-for.
2325 (compare_symtabs): Rename to ...
2326 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2327 const reference and adjust.
2328 (filter_sals): Rewrite using std::vector and standard algorithms.
2329 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2330 (jump_command): Update to use std::vector.
2331 * linespec.c (struct linespec_state) <canonical_names>: Update
2332 comment.
2333 (add_sal_to_sals_basic): Delete.
2334 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2335 (decode_line_2, create_sals_line_offset)
2336 (convert_address_location_to_sals, convert_linespec_to_sals)
2337 (convert_explicit_location_to_sals, parse_linespec)
2338 (event_location_to_sals, decode_line_full, decode_line_1)
2339 (decode_line_with_current_source)
2340 (decode_line_with_last_displayed, decode_objc)
2341 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2342 (linespec_result::~linespec_result): Adjust to use std::vector
2343 instead of symtabs_and_lines.
2344 * linespec.h (linespec_sals::sals): Now a std::vector.
2345 (struct linespec_result): Use std::vector, bool, and in-class
2346 initialization.
2347 (decode_line_1, decode_line_with_current_source)
2348 (decode_line_with_last_displayed): Return std::vector.
2349 * macrocmd.c (info_macros_command): Use std::vector.
2350 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2351 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2352 std::vector.
2353 * probe.h (parse_probes): Return a std::vector.
2354 * python/python.c (gdbpy_decode_line): Use std::vector and
2355 gdb::array_view.
2356 * source.c (select_source_symtab, line_info): Use std::vector.
2357 * stack.c (func_command): Use std::vector.
2358 * symtab.h (struct symtabs_and_lines): Delete.
2359 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2360
2361 2017-09-04 Pedro Alves <palves@redhat.com>
2362
2363 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2364 unittests/array-view-selftests.c.
2365 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2366 * common/array-view.h: New file.
2367 * unittests/array-view-selftests.c: New file.
2368
2369 2017-09-04 Pedro Alves <palves@redhat.com>
2370
2371 * cli/cli-cmds.c (edit_command): Pass message to
2372 ambiguous_line_spec.
2373 (list_command): Pass message to ambiguous_line_spec. Say
2374 "first"/"last" instead of "start" and "end" to be consistent with
2375 the manual.
2376 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2377 them to print formatted message.
2378
2379 2017-09-04 Pedro Alves <palves@redhat.com>
2380
2381 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2382 ftrace_update_insns by reference instead of pointer.
2383
2384 2017-09-04 Yao Qi <yao.qi@linaro.org>
2385
2386 * i386-go32-tdep.c: Include x86-xstate.h.
2387 (i386_go32_init_abi): Call i386_target_description.
2388 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2389 if xcr0 is X86_XSTATE_X87_MASK.
2390 * i386-tdep.h (tdesc_i386): Remove the declaration.
2391 (tdesc_i386_mmx): Likewise.
2392
2393 2017-09-04 Yao Qi <yao.qi@linaro.org>
2394
2395 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2396 X86_XSTATE_SSE_MASK instead of 0.
2397
2398 2017-09-04 Yao Qi <yao.qi@linaro.org>
2399
2400 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2401 i386_target_description.
2402 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2403 i386_target_description.
2404 * i386-tdep.c (i386_gdbarch_init): Likewise.
2405
2406 2017-09-04 Yao Qi <yao.qi@linaro.org>
2407
2408 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2409 (x86_darwin_init_abi_64): Call amd64_target_description.
2410 * amd64-dicos-tdep.c: Likewise.
2411 * amd64-fbsd-nat.c: Likewise.
2412 * amd64-fbsd-tdep.c: Likewise.
2413 * amd64-nbsd-tdep.c: Likewise.
2414 * amd64-obsd-tdep.c: Likewise.
2415 * amd64-sol2-tdep.c: Likewise.
2416 * amd64-windows-tdep.c: Likewise.
2417 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2418
2419 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2420
2421 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2422 (btrace_function) <insn>: Change type to use std::vector.
2423 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2424 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2425 ftrace_update_insns, ftrace_compute_global_level_offset,
2426 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2427 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2428 change to std::vector.
2429 (ftrace_update_insns): Adjust to change to std::vector, change
2430 type of INSN parameter.
2431 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2432 * record-btrace.c (btrace_call_history_insn_range,
2433 btrace_compute_src_line_range,
2434 record_btrace_frame_prev_register): Adjust to change to
2435 std::vector.
2436 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2437 to change to std::vector.
2438
2439 2017-09-03 Tom Tromey <tom@tromey.com>
2440
2441 * corefile.c (reopen_exec_file): Use std::string.
2442
2443 2017-09-03 Tom Tromey <tom@tromey.com>
2444
2445 * compile/compile.c (compile_register_name_mangled): Return
2446 std::string.
2447 * compile/compile-loc2c.c (pushf_register_address): Update.
2448 (pushf_register): Update.
2449 * compile/compile-c-types.c (convert_array): Update.
2450 * compile/compile-c-symbols.c (generate_vla_size): Update.
2451 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2452 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2453 (convert_one_symbol): Update.
2454 (generate_c_for_for_one_variable): Update.
2455 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2456 std::string.
2457 (generate_register_struct): Update.
2458 * compile/compile-internal.h (c_get_range_decl_name): Return a
2459 std::string.
2460 (compile_register_name_mangled): Return std::string.
2461
2462 2017-09-03 Tom Tromey <tom@tromey.com>
2463
2464 * utils.c (perror_string): Return a std::string.
2465 (throw_perror_with_name, perror_warning_with_name): Update.
2466
2467 2017-09-03 Tom Tromey <tom@tromey.com>
2468
2469 * demangle.c (demangle_command): Use std::string,
2470 unique_xmalloc_ptr.
2471
2472 2017-09-03 Tom Tromey <tom@tromey.com>
2473
2474 * cli/cli-setshow.c (do_set_command): Use std::string.
2475
2476 2017-09-03 Tom Tromey <tom@tromey.com>
2477
2478 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2479
2480 2017-09-03 Tom Tromey <tom@tromey.com>
2481
2482 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2483
2484 2017-09-03 Tom Tromey <tom@tromey.com>
2485
2486 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2487 gdb::unique_xmalloc_ptr.
2488
2489 2017-09-03 Tom Tromey <tom@tromey.com>
2490
2491 * thread.c (print_thread_info_1): Use string_printf.
2492 (thread_apply_command, thread_apply_all_command): Use
2493 std::string.
2494
2495 2017-09-03 Tom Tromey <tom@tromey.com>
2496
2497 * valprint.c (val_print_string): Update.
2498 * gdbcore.h (memory_error_message): Return std::string.
2499 * corefile.c (memory_error_message): Return std::string.
2500 (memory_error): Update.
2501 * breakpoint.c (insert_bp_location): Update.
2502
2503 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2504
2505 * target/waitstatus.h (target_waitstatus_to_string): Change
2506 return type to std::string.
2507 * target/waitstatus.c (target_waitstatus_to_string): Return
2508 std::string.
2509 * target.h (target_waitstatus_to_string): Remove declaration.
2510 * infrun.c (resume, clear_proceed_status_thread,
2511 print_target_wait_results, do_target_wait, save_waitstatus,
2512 stop_all_threads): Adjust.
2513 * record-btrace.c (record_btrace_wait): Adjust.
2514 * target-debug.h
2515 (target_debug_print_struct_target_waitstatus_p): Adjust.
2516
2517 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2518
2519 PR gdb/22046
2520 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2521 detection.
2522
2523 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2524
2525 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2526 for setting/unsetting environment variables on the remote target.
2527 (New remote packets): Add entries for QEnvironmentHexEncoded,
2528 QEnvironmentUnset and QEnvironmentReset.
2529 * common/environ.c (gdb_environ::operator=): Extend method to
2530 handle m_user_set_env_list and m_user_unset_env_list.
2531 (gdb_environ::clear): Likewise.
2532 (match_var_in_string): Change type of first parameter from 'char
2533 *' to 'const char *'.
2534 (gdb_environ::set): Extend method to handle
2535 m_user_set_env_list and m_user_unset_env_list.
2536 (gdb_environ::unset): Likewise.
2537 (gdb_environ::clear_user_set_env): New method.
2538 (gdb_environ::user_set_envp): Likewise.
2539 (gdb_environ::user_unset_envp): Likewise.
2540 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2541 m_user_unset_env_list on move constructor/assignment.
2542 (unset): Add new default parameter 'update_unset_list = true'.
2543 (clear_user_set_env): New method.
2544 (user_set_envp): Likewise.
2545 (user_unset_envp): Likewise.
2546 (m_user_set_env_list): New std::set.
2547 (m_user_unset_env_list): Likewise.
2548 * common/rsp-low.c (hex2str): New function.
2549 (bin2hex): New overload for bin2hex function.
2550 * common/rsp-low.c (hex2str): New prototype.
2551 (str2hex): New overload prototype.
2552 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2553 QEnvironmentUnset and QEnvironmentReset.
2554 (remote_protocol_features): Add QEnvironmentHexEncoded,
2555 QEnvironmentUnset and QEnvironmentReset packets.
2556 (send_environment_packet): New function.
2557 (extended_remote_environment_support): Likewise.
2558 (extended_remote_create_inferior): Call
2559 extended_remote_environment_support.
2560 (_initialize_remote): Add QEnvironmentHexEncoded,
2561 QEnvironmentUnset and QEnvironmentReset packet configs.
2562 * unittests/environ-selftests.c (gdb_selftest_env_var):
2563 New variable.
2564 (test_vector_initialization): New function.
2565 (test_init_from_host_environ): Likewise.
2566 (test_reinit_from_host_environ): Likewise.
2567 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2568 Likewise.
2569 (test_unset_set_empty_vector): Likewise.
2570 (test_vector_clear): Likewise.
2571 (test_std_move): Likewise.
2572 (test_move_constructor):
2573 (test_self_move): Likewise.
2574 (test_set_unset_reset): Likewise.
2575 (run_tests): Rewrite in terms of the functions above.
2576
2577 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2578
2579 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2580 (adi_available): Use a temp variable of type CORE_ADDR as argument
2581 3 when calling target_auxv_search.
2582 (adi_normalize_address): Use masks and xor operators to calculate
2583 normalized address.
2584 (adi_read_versions, adi_write_versions, adi_print_versions)
2585 (do_examine, do_assign): Use paddress.
2586
2587 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2588
2589 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2590 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2591 out of loop and add supply of FIR.
2592 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2593 add collect of FIR.
2594
2595 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2596
2597 PR gdb/21827
2598 * cli/cli-script.c (define_command): Don't convert command name
2599 to lower case.
2600
2601 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2602
2603 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2604 Update all callers accordingly. Remove all code blocks handling
2605 the case where DISPP is not NULL.
2606
2607 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2608
2609 PR symtab/22003
2610 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2611 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2612 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2613
2614 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2615
2616 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2617 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2618 (read_comp_units_from_section): New parameter abbrev_section, use
2619 read_and_check_comp_unit_head, allocate signatured_type if needed.
2620 (create_all_comp_units): Update read_comp_units_from_section caller.
2621
2622 2017-08-23 Pedro Alves <palves@redhat.com>
2623
2624 PR remote/21852
2625 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2626 to null_ptid and switch to thread without reading the registers
2627 after adding the inferior.
2628
2629 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2630
2631 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2632 compile-gcc.
2633 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2634 (compile_to_object): Implement compile_gcc.
2635 (_initialize_compile): Install "set compile-gcc". Initialize
2636 compile_gcc.
2637
2638 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2639
2640 * compile/compile.c (compile_to_object): Conditionally call
2641 set_verbose. Conditionally call compile or compile_v0.
2642
2643 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2644
2645 * sparc64-tdep.h: (adi_normalize_address): New export.
2646 * sparc-nat.h: (open_adi_tag_fd): New export.
2647 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2648 * sparc64-linux-tdep.c:
2649 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2650 (sparc64_linux_handle_segmentation_fault): New function.
2651 (sparc64_linux_init_abi): Register
2652 sparc64_linux_handle_segmentation_fault
2653 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2654 (sparc64_addr_bits_remove): New function.
2655 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2656 (MAX_PROC_NAME_SIZE): New macro.
2657 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2658 (sparc64adilist): New variable.
2659 (adi_proc_list): New variable.
2660 (find_adi_info): New function.
2661 (add_adi_info): New function.
2662 (get_adi_info_proc): New function.
2663 (get_adi_info): New function.
2664 (info_adi_command): New function.
2665 (read_maps_entry): New function.
2666 (adi_available): New function.
2667 (adi_normalize_address): New function.
2668 (adi_align_address): New function.
2669 (adi_convert_byte_count): New function.
2670 (adi_tag_fd): New function.
2671 (adi_is_addr_mapped): New function.
2672 (adi_read_versions): New function.
2673 (adi_write_versions): New function.
2674 (adi_print_versions): New function.
2675 (do_examine): New function.
2676 (do_assign): New function.
2677 (adi_examine_command): New function.
2678 (adi_assign_command): New function.
2679 (_initialize_sparc64_adi_tdep): New function.
2680
2681 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2682
2683 * breakpoint.c (breakpoints_info): Rename to ...
2684 (info_breakpoints_command): ... this.
2685 (watchpoints_info): Rename to ...
2686 (info_watchpoints_command): ... this.
2687 (tracepoints_info): Rename to ...
2688 (info_tracepoints_command): ... this.
2689 (_initialize_breakpoint): Adjust.
2690 * dcache.c (dcache_info): Rename to ...
2691 (info_display_command): ... this.
2692 (_initialize_dcache): Adjust.
2693 * frame.h (args_info): Rename to ...
2694 (info_args_command): ... this.
2695 (locals_info): Rename to ...
2696 (info_locals_command): ... this.
2697 * infcmd.c (nofp_registers_info): Rename to ...
2698 (info_registers_command): ... this.
2699 (float_info): Rename to ...
2700 (info_float_command): ... this.
2701 (program_info): Rename to ...
2702 (info_program_command): ... this.
2703 (all_registers_info): Rename to ...
2704 (info_all_registers_command): ... this.
2705 (vector_info): Rename to ...
2706 (info_vector_command): ... this.
2707 (float_info): Rename to ...
2708 (info_float_command): ... this.
2709 (_initialize_infcmd): Adjust.
2710 * inferior.h (term_info): Rename to ...
2711 (info_terminal_command): ... this.
2712 * inflow.c (term_info): Rename to ...
2713 (info_terminal_command): ... this.
2714 (_initialize_inflow): Adjust.
2715 * infrun.c (signals_info): Rename to ...
2716 (info_signals_command): ... this.
2717 (_initialize_infrun): Adjust.
2718 * objc-lang.c (classes_info): Rename to ...
2719 (info_classes_command): ... this.
2720 (selectors_info): Rename to ...
2721 (info_selectors_command): ... this.
2722 (_initialize_objc_language): Adjust.
2723 * printcmd.c (sym_info): Rename to ...
2724 (info_symbol_command): ... this.
2725 (address_info): Rename to ...
2726 (info_address_command): ... this.
2727 (display_info): Rename to ...
2728 (info_display_command): ... this.
2729 (_initialize_printcmd): Adjust.
2730 * reverse.c (bookmarks_info): Rename to ...
2731 (info_breakpoints_command): ... this.
2732 (_initialize_reverse): Adjust.
2733 * ser-go32.c (dos_info): Rename to ...
2734 (info_serial_command): ... this.
2735 (_initialize_ser_dos): Adjust.
2736 * skip.c (skip_info): Rename to ...
2737 (info_skip_command): ... this.
2738 (_initialize_step_skip): Adjust.
2739 * source.c (line_info): Rename to ...
2740 (info_line_command): ... this.
2741 (source_info): Rename to ...
2742 (info_source_command)
2743 * stack.c (frame_info): Rename to ...
2744 (info_frame_command): ... this.
2745 (locals_info): Rename to ...
2746 (info_locals_command): ... this.
2747 (args_info): Rename to ...
2748 (info_args_command): ... this.
2749 (_initialize_stack): Adjust.
2750 * symtab.c (sources_info): Rename to ...
2751 (info_sources_command): ... this.
2752 (variables_info): Rename to ...
2753 (info_variables_command): ... this.
2754 (functions_info): Rename to ...
2755 (info_functions_command): ... this.
2756 (types_info): Rename to ...
2757 (info_types_command): ... this.
2758 (_initialize_symtab): Adjust.
2759 * target.c (target_info): Rename to ...
2760 (info_target_command): ... this.
2761 (initialize_targets): Adjust.
2762 * tracepoint.c (tvariables_info): Rename to ...
2763 (info_tvariables_command): ... this.
2764 (scope_info): Rename to ...
2765 (info_scope_command): ... this.
2766 (trace_dump_actions): Adjust.
2767 (_initialize_tracepoint): Adjust.
2768
2769 2017-08-22 Tom Tromey <tom@tromey.com>
2770
2771 * breakpoint.h (install_breakpoint): Update.
2772 * breakpoint.c (add_solib_catchpoint): Update.
2773 (install_breakpoint): Change argument to a std::unique_ptr.
2774 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2775 (create_breakpoint_sal, create_breakpoint): Update.
2776 (watch_command_1, catch_exec_command_1)
2777 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2778 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2779 Return the breakpoint.
2780 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2781 (new_single_step_breakpoint): Update.
2782 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2783 std::unique_ptr.
2784 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2785 std::unique_ptr.
2786 * break-catch-sig.c (create_signal_catchpoint): Use
2787 std::unique_ptr.
2788 * ada-lang.c (create_ada_exception_catchpoint): Use
2789 std::unique_ptr.
2790
2791 2017-08-22 Tom Tromey <tom@tromey.com>
2792
2793 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2794
2795 2017-08-22 Tom Tromey <tom@tromey.com>
2796
2797 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2798 (lookup_partial_symbol): Update.
2799
2800 2017-08-22 Tom Tromey <tom@tromey.com>
2801
2802 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2803 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2804 (find_and_open_source, symtab_to_fullname): Update.
2805 * psymtab.c (psymtab_to_fullname): Update.
2806
2807 2017-08-22 Tom Tromey <tom@tromey.com>
2808
2809 * exec.c (exec_file_attach): Update.
2810 * linux-thread-db.c (try_thread_db_load): Update.
2811 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2812 * utils.c (gdb_realpath): Change return type.
2813 (gdb_realpath_keepfile): Update.
2814 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2815 (_initialize_utils): Register the new self test.
2816 * source.c (openp): Update.
2817 (find_and_open_source): Update.
2818 * nto-tdep.c (nto_find_and_open_solib): Update.
2819 * main.c (set_gdb_data_directory): Update.
2820 (captured_main_1): Update.
2821 * dwarf2read.c (dwarf2_get_dwz_file): Update
2822 (dw2_map_symbol_filenames): Update.
2823 * auto-load.c (auto_load_safe_path_vec_update): Update.
2824 (filename_is_in_auto_load_safe_path_vec): Change type of
2825 "filename_realp".
2826 (auto_load_objfile_script): Update.
2827 (file_is_auto_load_safe): Update. Use std::string.
2828 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2829
2830 2017-08-22 Tom Tromey <tom@tromey.com>
2831
2832 * utils.c (gdb_realpath_keepfile): Return a
2833 gdb::unique_xmalloc_ptr.
2834 * exec.c (exec_file_attach): Update.
2835 * utils.h (gdb_realpath_keepfile): Return a
2836 gdb::unique_xmalloc_ptr.
2837
2838 2017-08-22 Tom Tromey <tom@tromey.com>
2839
2840 * compile/compile.c (compile_file_command): Use
2841 gdb::unique_xmalloc_ptr, std::string.
2842 * utils.c (gdb_abspath): Change return type.
2843 * source.c (openp): Update.
2844 * objfiles.c (allocate_objfile): Update.
2845 * main.c (set_gdb_data_directory): Update.
2846 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2847
2848 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2849
2850 * cli-cmds.c (list_commands): List actual code around more than
2851 one location.
2852
2853 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2854
2855 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2856
2857 2017-08-21 Pedro Alves <palves@redhat.com>
2858
2859 PR gdb/19487
2860 * c-exp.y (variable production): Handle function aliases.
2861 * minsyms.c (msymbol_is_text): New function.
2862 * minsyms.h (msymbol_is_text): Declare.
2863 * symtab.c (find_function_alias_target): New function.
2864 * symtab.h (find_function_alias_target): Declare.
2865
2866 2017-08-21 Pedro Alves <palves@redhat.com>
2867
2868 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2869 typedefs.
2870 * typeprint.c (whatis_exp): If handling "whatis", and expression
2871 is OP_TYPE, strip one typedef level. Otherwise don't strip
2872 typedefs here.
2873 * valops.c (value_cast): Save "to" type before resolving
2874 stubs/typedefs. Use that type as resulting value's type.
2875
2876 2017-08-18 Tom Tromey <tom@tromey.com>
2877 Pedro Alves <palves@redhat.com>
2878
2879 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2880 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2881 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2882 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2883 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2884 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2885 (linux_get_siginfo_data): Add "thread" argument. Use
2886 scoped_restore.
2887 * linux-nat.c (linux_child_follow_fork)
2888 (check_stopped_by_watchpoint): Use scoped_restore.
2889 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2890 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2891 (restore_inferior_ptid, save_inferior_ptid): Remove.
2892 * btrace.c (btrace_fetch): Use scoped_restore.
2893 * bsd-uthread.c (bsd_uthread_fetch_registers)
2894 (bsd_uthread_store_registers): Use scoped_restore.
2895 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2896 scoped_restore.
2897 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2898 (aix_thread_xfer_partial): Use scoped_restore.
2899 * inferior.h (save_inferior_ptid): Remove.
2900
2901 2017-08-18 Yao Qi <yao.qi@linaro.org>
2902
2903 PR tdep/21818
2904 * arm-tdep.c (gdb_print_insn_arm): Mark
2905 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2906
2907 2017-08-18 Yao Qi <yao.qi@linaro.org>
2908
2909 * NEWS: Mention GDBserver's new option "--selftest".
2910 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2911 * selftest.c: Move it to common/selftest.c.
2912 * selftest.h: Move it to common/selftest.h.
2913 * selftest-arch.c (reset): New function.
2914 (tests_with_arch): Call reset.
2915
2916 2017-08-18 Yao Qi <yao.qi@linaro.org>
2917
2918 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2919 instead of exception_fprintf and printf_filtered.
2920
2921 2017-08-18 Yao Qi <yao.qi@linaro.org>
2922
2923 * selftest.c (register_self_test): Rename it to
2924 selftests::register_test.
2925 (run_self_tests): selftest::run_tests.
2926 * selftest.h: Update declarations.
2927 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2928 selftests::register_test_foreach_arch.
2929 * selftest-arch.h: Update declaration.
2930 * aarch64-tdep.c: Update.
2931 * arm-tdep.c: Likewise.
2932 * disasm-selftests.c: Likewise.
2933 * dwarf2loc.c: Likewise.
2934 * dwarf2-frame.c: Likewise.
2935 * findvar.c: Likewise.
2936 * gdbarch-selftests.c: Likewise.
2937 * maint.c (maintenance_selftest): Likewise.
2938 * regcache.c: Likewise.
2939 * rust-exp.y: Likewise.
2940 * selftest-arch.c: Likewise.
2941 * unittests/environ-selftests.c: Likewise.
2942 * unittests/function-view-selftests.c: Likewise.
2943 * unittests/offset-type-selftests.c: Likewise.
2944 * unittests/optional-selftests.c: Likewise.
2945 * unittests/scoped_restore-selftests.c: Likewise.
2946 * utils-selftests.c: Likewise.
2947
2948 2017-08-17 Pedro Alves <palves@redhat.com>
2949
2950 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2951 local.
2952
2953 2017-08-17 Pedro Alves <palves@redhat.com>
2954
2955 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2956 field.
2957 (reset_die_in_process): Delete, replaced by ...
2958 (process_die_scope): ... this new class. Make it responsible for
2959 freeing cu->line_header too.
2960 (process_die): Use process_die_scope.
2961 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2962 cu->line_header_die_owner. Don't release the line header if it's
2963 owned by the CU.
2964 (setup_type_unit_groups): Make the CU/DIE own the line header.
2965 Don't release the line header here.
2966
2967 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2968
2969 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2970
2971 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2972
2973 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2974 Single-Key mode
2975
2976 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2977
2978 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2979 mode command list.
2980
2981 2017-08-15 Stafford Horne <shorne@gmail.com>
2982
2983 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2984
2985 2017-08-15 Stafford Horne <shorne@gmail.com>
2986
2987 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2988
2989 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2990
2991 PR gdb/21954
2992 * infcmd.c (unset_environment_command): Use the 'clear' method on
2993 the environment instead of resetting it.
2994
2995 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2996
2997 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2998 platforms.
2999
3000 2017-08-14 Tom Tromey <tom@tromey.com>
3001
3002 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3003 (print_binary_chars): Likewise.
3004 (BITS_IN_BYTES): Remove.
3005
3006 2017-08-14 Tom Tromey <tom@tromey.com>
3007
3008 PR gdb/21675
3009 * valprint.c (LOW_ZERO): Change value to 034.
3010 (print_octal_chars): Add static_asserts for octal constants.
3011 * printcmd.c (print_scalar_formatted): Add 'd' case.
3012
3013 2017-08-11 Tom Tromey <tom@tromey.com>
3014
3015 * symfile.c (add_symbol_file_command): Use std::vector.
3016
3017 2017-08-14 Tom Tromey <tom@tromey.com>
3018
3019 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3020 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3021 std::move.
3022 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3023
3024 2017-08-11 Pedro Alves <palves@redhat.com>
3025
3026 * infrun.c (process_event_stop_test): Adjust
3027 function_name_is_marked_for_skip call.
3028 * skip.c: Include <list>.
3029 (skiplist_entry): Make it a class with private fields, and
3030 getters/setters.
3031 (skiplist_entry_chain): Delete.
3032 (skiplist_entries): New.
3033 (skiplist_entry_count): Delete.
3034 (highest_skiplist_entry_num): New.
3035 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3036 (add_skiplist_entry): Delete.
3037 (skiplist_entry::skiplist_entry): New.
3038 (skiplist_entry::add_entry): New.
3039 (skip_file_command, skip_function): Adjust.
3040 (compile_skip_regexp): Delete.
3041 (skip_command): Don't compile regexp here. Adjust to use
3042 skiplist_entry::add_entry.
3043 (skip_info): Adjust to use range-for and getters.
3044 (skip_enable_command, skip_disable_command): Adjust to use
3045 range-for and setters.
3046 (skip_delete_command): Adjust to use std::list.
3047 (add_skiplist_entry): Delete.
3048 (skip_file_p): Delete, refactored as ...
3049 (skiplist_entry::do_skip_file_p): ... this new method.
3050 (skip_gfile_p): Delete, refactored as ...
3051 (skiplist_entry::do_gskip_file_p): ... this new method.
3052 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3053 (skiplist_entry::skip_function_p): ... this new method.
3054 (function_name_is_marked_for_skip): Now returns bool, and takes
3055 the function sal by const reference. Adjust to use range-for and
3056 skiplist_entry methods.
3057 (_initialize_step_skip): Remove references to
3058 skiplist_entry_chain, skiplist_entry_count.
3059 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3060 takes the function sal by const reference.
3061
3062 2017-08-11 Yao Qi <yao.qi@linaro.org>
3063
3064 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3065 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3066 (dwarf2_frame_cache):
3067 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3068 RETURN_MASK_ALL and set *this_case to NULL.
3069 * frame-unwind.h: Update comments.
3070
3071 2017-08-11 Yao Qi <yao.qi@linaro.org>
3072
3073 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3074 (dwarf2_frame_state_copy_regs): Remove.
3075 (dwarf2_frame_state_free_regs): Remove.
3076 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3077 (dwarf2_restore_rule): Call method .alloc_regs instead of
3078 dwarf2_frame_state_alloc_regs.
3079 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3080 constructor. Call std::move.
3081 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3082 (dwarf2_frame_cache): Likewise.
3083
3084 [GDB_SELF_TEST]: Include selftest.h and
3085 selftest-arch.h.
3086 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3087 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3088 execute_cfa_program_test.
3089
3090 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3091 copy ctor, assignment operator, move assignment.
3092 <alloc_regs>: New method.
3093 <swap>: New method.
3094 (struct dwarf2_frame_state): Delete dtor.
3095 (dwarf2_frame_state_alloc_regs): Remove declaration.
3096 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3097 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3098
3099 2017-08-11 Yao Qi <yao.qi@linaro.org>
3100
3101 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3102 (dwarf2_frame_state::dwarf2_frame_state): New.
3103 (dwarf2_frame_state::~dwarf2_frame_state): New.
3104 (dwarf2_fetch_cfa_info): Update.
3105 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3106 rather than a pointer. Update code.
3107 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3108 dtor.
3109 <data_align, code_align, retaddr_column>: Change them to const.
3110 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3111 to bool.
3112
3113 2017-08-11 Yao Qi <yao.qi@linaro.org>
3114
3115 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3116 <loc.exp>: New field.
3117 * dwarf2-frame.c (execute_cfa_program): Update.
3118 (dwarf2_frame_prev_register): Update.
3119
3120 2017-08-10 Pedro Alves <palves@redhat.com>
3121
3122 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3123
3124 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3125
3126 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3127 (fbsd_pending_children): Use std::list.
3128 (fbsd_remember_child): Likewise.
3129 (fbsd_is_child_pending): Likewise.
3130 (fbsd_pending_vfork_done): Use std::forward_list.
3131 (fbsd_add_vfork_done): Likewise.
3132 (fbsd_is_vfork_done_pending): Likewise.
3133 (fbsd_next_vfork_done): Likewise.
3134
3135 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3136
3137 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3138 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3139 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3140 for `mapfilename'.
3141 (fbsd_xfer_partial): Use gdb::byte_vector.
3142 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3143
3144 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3145
3146 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3147 "filestuff.h".
3148 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3149
3150 2017-08-09 Tom Tromey <tom@tromey.com>
3151
3152 * skip.c (skiplist_entry): New constructor.
3153 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3154 (skiplist_entry::file_is_glob): Now bool.
3155 (skiplist_entry::file, skiplist_entry::function): Now
3156 std::string.
3157 (make_skip_entry): Return a unique_ptr. Use new.
3158 (free_skiplist_entry, free_skiplist_entry_cleanup)
3159 (make_free_skiplist_entry_cleanup): Remove.
3160 (skip_command, skip_disable_command, add_skiplist_entry)
3161 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3162 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3163 (function_name_is_marked_for_skip): Update.
3164 (skip_delete_command): Update. Use delete.
3165
3166 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3167
3168 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3169 (aarch64_linux_core_read_description): New function.
3170 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3171
3172 2017-08-09 Pedro Alves <palves@redhat.com>
3173
3174 * cp-name-parser.y (cp_comp_to_string): Return a
3175 gdb::unique_xmalloc_ptr<char>.
3176 * cp-support.c (replace_typedefs_qualified_name)
3177 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3178 (cp_canonicalize_string_full): Use op= instead of explicit
3179 convertion.
3180 (cp_class_name_from_physname, method_name_from_physname)
3181 (cp_func_name, cp_remove_params): Adjust to use
3182 gdb::unique_xmalloc_ptr<char>.
3183 * cp-support.h (cp_comp_to_string): Return a
3184 gdb::unique_xmalloc_ptr<char>.
3185 * python/py-type.c (typy_lookup_type): Adjust to use
3186 gdb::unique_xmalloc_ptr<char>.
3187
3188 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3189
3190 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3191
3192 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3193 Yao Qi <yao.qi@linaro.org>
3194
3195 * cp-support.c (cp_canonicalize_string_full): Use
3196 gdb::unique_xmalloc_ptr<char>.
3197 (cp_canonicalize_string): Likewise.
3198
3199 2017-08-09 Yao Qi <yao.qi@linaro.org>
3200
3201 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3202 * regformats/i386/amd64-avx-avx512.dat: Remove.
3203 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3204 * regformats/i386/amd64-avx-mpx.dat:Remove.
3205 * regformats/i386/amd64-avx.dat: Remove.
3206 * regformats/i386/amd64-mpx.dat: Remove.
3207 * regformats/i386/i386-avx-avx512.dat: Remove.
3208 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3209 * regformats/i386/i386-avx-mpx.dat: Remove.
3210 * regformats/i386/i386-mmx.dat: Remove.
3211 * regformats/i386/i386-mpx.dat: Remove.
3212
3213 2017-08-09 Yao Qi <yao.qi@linaro.org>
3214
3215 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3216 * amd64-tdep.c: Don't include features/i386/x32*.c.
3217 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3218 functions.
3219 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3220 and i386/x32-avx-avx512.
3221 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3222 and i386/x32.xml.
3223 * features/i386/x32-avx-avx512.c: Removed.
3224 * features/i386/x32-avx-avx512.xml: Removed.
3225 * features/i386/x32-avx.c: Removed.
3226 * features/i386/x32-avx.xml: Removed.
3227 * features/i386/x32.c: Removed.
3228 * features/i386/x32.xml: Removed.
3229 * regformats/i386/x32-avx-avx512.dat: Removed.
3230 * regformats/i386/x32-avx.dat: Removed.
3231 * regformats/i386/x32.dat: Removed.
3232
3233 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3234
3235 PR breakpoints/21886
3236 * mem-break.c (default_memory_insert_breakpoint): Use
3237 `->placed_address' rather than `->reqstd_address' for the
3238 breakpoint location.
3239
3240 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3241
3242 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3243 assertions.
3244
3245 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3246
3247 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3248 a union of `tdep_info', `tdesc_data' and `id'.
3249 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3250 rather than `info.tdep_info'.
3251 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3252 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3253 * i386-tdep.c (i386_gdbarch_init): Likewise.
3254 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3255 * mips-tdep.c (mips_gdbarch_init): Likewise.
3256 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3257 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3258 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3259 `info.tdep_info'.
3260 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3261 `info.tdep_info'.
3262 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3263 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3264 `info.tdep_info'.
3265 * spu-tdep.c (spu_gdbarch_init): Likewise.
3266 * gdbarch.h: Regenerate.
3267
3268 2017-08-07 Leszek Swirski <leszeks@google.com>
3269
3270 PR symtab/20899
3271 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3272
3273 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3274
3275 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3276 (gdbsim_open): Rename gdb_argv args object to argv.
3277
3278 2017-08-05 Tom Tromey <tom@tromey.com>
3279
3280 * compile/compile-object-load.c (compile_object_load): Use
3281 gdb::unique_xmalloc_ptr.
3282 * cli/cli-dump.c (scan_filename): Rename from
3283 scan_filename_with_cleanup. Change return type.
3284 (scan_expression): Rename from scan_expression_with_cleanup.
3285 Change return type.
3286 (dump_memory_to_file, dump_value_to_file, restore_command):
3287 Use gdb::unique_xmalloc_ptr. Update.
3288 * cli/cli-cmds.c (find_and_open_script): Use
3289 gdb::unique_xmalloc_ptr.
3290 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3291 * symmisc.c (maintenance_print_symbols)
3292 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3293 * symfile.c (symfile_bfd_open, generic_load)
3294 (add_symbol_file_command, remove_symbol_file_command): Use
3295 gdb::unique_xmalloc_ptr.
3296 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3297 * psymtab.c (maintenance_print_psymbols): Use
3298 gdb::unique_xmalloc_ptr.
3299 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3300 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3301 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3302 (reload_shared_libraries_1): Likewise.
3303
3304 2017-08-05 Tom Tromey <tom@tromey.com>
3305
3306 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3307 (rust_op_vector, rust_set_vector): New typedefs.
3308 (current_parser): New global.
3309 (work_obstack): Change to pointer type. Update all users.
3310 (rust_ast, pstate): Remove globals.
3311 (struct rust_parser): New.
3312 (%union) <params, field_inits>: Change type.
3313 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3314 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3315 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3316 (convert_params_to_types, convert_params_to_expression): Change
3317 type of "params".
3318 (ast_string): Change type of "fields".
3319 (rust_parse): Make a rust_parser. Remove cleanups.
3320 (rust_lex_tests): Make and install an auto_obstack.
3321
3322 2017-08-04 Yao Qi <yao.qi@linaro.org>
3323
3324 * configure.srv (ipa_x32_linux_regobj): New.
3325 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3326 instead of X86_TDESC_AVX512.
3327 (initialize_low_tracepoint): Call
3328 init_registers_x32_avx_avx512_linux.
3329
3330 2017-08-04 Yao Qi <yao.qi@linaro.org>
3331
3332 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3333
3334 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3335
3336 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3337
3338 2017-08-03 Tom Tromey <tom@tromey.com>
3339
3340 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3341 Remove.
3342 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3343
3344 2017-08-03 Tom Tromey <tom@tromey.com>
3345
3346 * python/py-param.c (compute_enum_values): Use gdb_argv.
3347
3348 2017-08-03 Tom Tromey <tom@tromey.com>
3349
3350 * utils.h (struct gdb_argv_deleter): New.
3351 (gdb_argv): New class.
3352 * utils.c (gdb_argv::reset): New method.
3353 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3354 * tracefile.c (tsave_command): Use gdb_argv.
3355 * top.c (new_ui_command): Use gdb_argv.
3356 * symmisc.c (maintenance_print_symbols)
3357 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3358 * symfile.c (symbol_file_command, generic_load)
3359 (remove_symbol_file_command): Use gdb_argv.
3360 * stack.c (backtrace_command): Use gdb_argv.
3361 * source.c (add_path, show_substitute_path_command)
3362 (unset_substitute_path_command, set_substitute_path_command):
3363 Use gdb_argv.
3364 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3365 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3366 * remote.c (extended_remote_run, remote_put_command)
3367 (remote_get_command, remote_delete_command): Use gdb_argv.
3368 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3369 (gdbsim_open): Use gdb_argv.
3370 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3371 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3372 * procfs.c (procfs_info_proc): Use gdb_argv.
3373 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3374 * infrun.c (handle_command): Use gdb_argv.
3375 * inferior.c (add_inferior_command, clone_inferior_command):
3376 Use gdb_argv.
3377 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3378 * exec.c (exec_file_command): Use gdb_argv.
3379 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3380 * compile/compile.c (build_argc_argv): Use gdb_argv.
3381
3382 2017-08-03 Tom Tromey <tom@tromey.com>
3383
3384 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3385
3386 2017-08-03 Tom Tromey <tom@tromey.com>
3387
3388 * python/python.c (compute_python_string): Return std::string.
3389 (gdbpy_eval_from_control_command): Update.
3390 (do_start_initialization): Use std::string.
3391 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3392 xstrprintf.
3393 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3394 xstrprintf.
3395
3396 2017-08-03 Tom Tromey <tom@tromey.com>
3397
3398 * top.h (do_restore_instream_cleanup): Remove.
3399 * top.c (do_restore_instream_cleanup): Remove.
3400 (read_command_file): Use scoped_restore.
3401 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3402
3403 2017-08-03 Tom Tromey <tom@tromey.com>
3404
3405 * cli/cli-script.c (execute_user_command)
3406 (execute_control_command): Use scoped_restore.
3407
3408 2017-08-03 Tom Tromey <tom@tromey.com>
3409
3410 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3411 (execute_user_command): Remove user_call_depth; use
3412 user_args_stack's size instead.
3413
3414 2017-08-03 Tom Tromey <tom@tromey.com>
3415
3416 * top.h (in_user_command): Remove.
3417 * top.c (in_user_command): Remove.
3418 * cli/cli-script.c (do_restore_user_call_depth)
3419 (execute_user_command): Update.
3420
3421 2017-08-03 Tom Tromey <tom@tromey.com>
3422
3423 * valops.c (search_struct_method): Use gdb::byte_vector.
3424 * valarith.c (value_concat): Use std::vector.
3425 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3426 (simple_search_memory): Likewise.
3427 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3428 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3429 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3430 * elfread.c (elf_rel_plt_read): Use std::string.
3431 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3432 * cli/cli-dump.c (restore_section_callback): Use
3433 gdb::byte_vector.
3434
3435 2017-08-03 Tom Tromey <tom@tromey.com>
3436
3437 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3438
3439 2017-08-03 Tom Tromey <tom@tromey.com>
3440
3441 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3442 (tui_register_format): Use scoped_restore.
3443
3444 2017-08-03 Tom Tromey <tom@tromey.com>
3445
3446 * reverse.c (exec_direction_default): Remove.
3447 (exec_reverse_once): Use scoped_restore.
3448 * remote.c (restore_remote_timeout): Remove.
3449 (remote_flash_erase, remote_flash_write, remote_flash_done)
3450 (readchar, remote_serial_write): Use scoped_restore.
3451 * cli/cli-script.c (struct source_cleanup_lines_args)
3452 (source_cleanup_lines): Remove.
3453 (script_from_file): Use scoped_restore.
3454 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3455 (source_command): Use scoped_restore.
3456
3457 2017-08-03 Tom Tromey <tom@tromey.com>
3458
3459 * utils.h (make_cleanup_free_so): Remove.
3460 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3461 * solist.h (struct so_deleter): New.
3462 (so_list_up): New typedef.
3463 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3464
3465 2017-08-03 Tom Tromey <tom@tromey.com>
3466
3467 * utils.h (make_cleanup_restore_current_language): Remove.
3468 * utils.c (do_restore_current_language)
3469 (make_cleanup_restore_current_language): Remove.
3470 * parse.c (parse_exp_in_context_1)
3471 (parse_expression_with_language): Use
3472 scoped_restore_current_language.
3473 * mi/mi-main.c (mi_cmd_execute): Use
3474 scoped_restore_current_language.
3475 * language.h (scoped_restore_current_language): New class.
3476
3477 2017-08-03 Tom Tromey <tom@tromey.com>
3478
3479 * compile/compile.c (cleanup_unlink_file): Remove.
3480 (compile_to_object): Use gdb::unlinker.
3481 (eval_compile_command): Likewise.
3482
3483 2017-08-03 Tom Tromey <tom@tromey.com>
3484
3485 * utils.h (make_cleanup_fclose): Remove.
3486 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3487
3488 2017-08-03 Tom Tromey <tom@tromey.com>
3489
3490 * top.c (open_terminal_stream): Return gdb_file_up.
3491 (new_ui_command): Update.
3492
3493 2017-08-03 Tom Tromey <tom@tromey.com>
3494
3495 * source.c (print_source_lines_base, forward_search_command)
3496 (reverse_search_command): Use gdb_file_up.
3497
3498 2017-08-03 Tom Tromey <tom@tromey.com>
3499
3500 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3501
3502 2017-08-03 Tom Tromey <tom@tromey.com>
3503
3504 * cli/cli-cmds.c (find_and_open_script): Change return type.
3505 Remove "streamp" and "full_path" parameters.
3506 (source_script_with_search): Update.
3507 * auto-load.c (source_script_file): Update.
3508 * cli/cli-cmds.h (find_and_open_script): Change type.
3509 (open_script): New struct.
3510
3511 2017-08-03 Tom Tromey <tom@tromey.com>
3512
3513 * xml-support.c (xml_fetch_content_from_file): Update.
3514 * ui-file.c (stdio_file::open): Update.
3515 * tracefile-tfile.c (tfile_start): Update.
3516 * remote.c (remote_file_put, remote_file_get): Update.
3517 * nat/linux-procfs.c (linux_proc_get_int)
3518 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3519 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3520 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3521 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3522 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3523 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3524 * linux-nat.c (linux_proc_pending_signals): Update.
3525 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3526 (file_closer): Remove.
3527 * compile/compile.c (compile_to_object): Update.
3528 * common/filestuff.h (struct gdb_file_deleter): New.
3529 (gdb_file_up): New typedef.
3530 (gdb_fopen_cloexec): Change return type.
3531 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3532 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3533 (dump_binary_file, restore_binary_file): Update.
3534 * auto-load.c (auto_load_objfile_script_1): Update.
3535
3536 2017-08-03 Tom Tromey <tom@tromey.com>
3537
3538 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3539 (info_static_tracepoint_markers_command): Likewise.
3540 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3541 * skip.c (skip_info): Use ui_out_emit_table.
3542 * progspace.c (print_program_space): Use ui_out_emit_table.
3543 * osdata.c (info_osdata): Use ui_out_emit_table.
3544 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3545 ui_out_emit_table.
3546 * linux-thread-db.c (info_auto_load_libthread_db): Use
3547 ui_out_emit_table.
3548 * inferior.c (print_inferior): Use ui_out_emit_table.
3549 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3550 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3551 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3552 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3553 * ui-out.h (class ui_out_emit_table): New.
3554
3555 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3556
3557 * mips-tdep.c (mips_fpu_type_str): New function.
3558 (mips_dump_tdep): Call it.
3559
3560 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3561
3562 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3563 `->mips_fpu_type'.
3564
3565 2017-07-31 Xavier Roirand <roirand@adacore.com>
3566
3567 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3568
3569 2017-07-27 Xavier Roirand <roirand@adacore.com>
3570
3571 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3572
3573 2017-07-26 Yao Qi <yao.qi@linaro.org>
3574
3575 * cli/cli-cmds.c (maintenancechecklist): New variable.
3576 * gdbcmd.h (maintenancechecklist): Declare it.
3577 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3578 Call i386_linux_read_description with different masks.
3579 * maint.c (maintenance_check_command): New function.
3580 (_initialize_maint_cmds): Call add_prefix_cmd.
3581 * target-descriptions.c (tdesc_reg): override operator != and ==.
3582 (tdesc_type): Likewise.
3583 (tdesc_feature): Likewise.
3584 (target_desc): Likewise.
3585 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3586 (maintenance_check_xml_descriptions): New function.
3587 (_initialize_target_descriptions) Add command "xml-descriptions".
3588 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3589
3590 2017-07-26 Yao Qi <yao.qi@linaro.org>
3591
3592 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3593 Include features/i386/32bit-*.c.
3594 (i386_linux_read_description): Generate target description if it
3595 doesn't exist.
3596 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3597 functions.
3598 * features/i386/32bit-linux.c: Re-generated.
3599 * features/i386/32bit-sse.c: Likewise.
3600 * target-descriptions.c (print_c_feature::visit): Print code to
3601 set register number if needed.
3602 (print_c_feature) <m_next_regnum>: New field.
3603
3604 2017-07-26 Yao Qi <yao.qi@linaro.org>
3605
3606 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3607 (FEATURE_XMLFILES): New.
3608 (FEATURE_CFILES): New.
3609 New rules.
3610 (clean-cfiles): Remove generated c files.
3611 * features/i386/32bit-avx.c: Generated.
3612 * features/i386/32bit-avx512.c: Generated.
3613 * features/i386/32bit-core.c: Generated.
3614 * features/i386/32bit-linux.c: Generated.
3615 * features/i386/32bit-mpx.c: Generated.
3616 * features/i386/32bit-pkeys.c: Generated.
3617 * features/i386/32bit-sse.c: Generated.
3618 * target-descriptions.c: Include algorithm.
3619 (tdesc_element_visitor): Add method visit_end.
3620 (print_c_tdesc): Implement visit_end.
3621 (print_c_tdesc:: m_filename_after_features): Move it to
3622 protected.
3623 (print_c_feature): New class.
3624 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3625 name starts with "i386/32bit-".
3626
3627 2017-07-26 Yao Qi <yao.qi@linaro.org>
3628
3629 * target-descriptions.c (tdesc_element_visitor): New class.
3630 (tdesc_element): New class.
3631 (tdesc_reg): Inherit from tdesc_element.
3632 (tdesc_reg::accept): New function.
3633 (tdesc_type): Inherit from tdesc_element.
3634 (tdesc_type::accept): New function.
3635 (tdesc_feature): Inherit from tdesc_element.
3636 (tdesc_feature::accept): New function.
3637 (target_desc): Inherit from tdesc_element.
3638 (target_desc::target_desc): New.
3639 (target_desc::~target_desc): New.
3640 (target_desc::accept): New.
3641 (allocate_target_description): Use new.
3642 (free_target_description): Use delete.
3643 (print_c_tdesc): New class.
3644 (maint_print_c_tdesc_cmd): Adjust.
3645
3646 * features/aarch64.c: Re-generated.
3647 * features/arc-arcompact.c: Re-generated.
3648 * features/arc-v2.c: Re-generated.
3649 * features/arm/arm-with-iwmmxt.c: Re-generated.
3650 * features/arm/arm-with-m.c: Re-generated.
3651 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3652 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3653 * features/arm/arm-with-neon.c: Re-generated.
3654 * features/arm/arm-with-vfpv2.c: Re-generated.
3655 * features/arm/arm-with-vfpv3.c: Re-generated.
3656 * features/i386/amd64-avx-avx512.c: Re-generated.
3657 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3658 * features/i386/amd64-avx.c: Re-generated.
3659 * features/i386/amd64-avx-linux.c: Re-generated.
3660 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3661 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3662 * features/i386/amd64-avx-mpx.c: Re-generated.
3663 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3664 * features/i386/amd64.c: Re-generated.
3665 * features/i386/amd64-linux.c: Re-generated.
3666 * features/i386/amd64-mpx.c: Re-generated.
3667 * features/i386/amd64-mpx-linux.c: Re-generated.
3668 * features/i386/i386-avx-avx512.c: Re-generated.
3669 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3670 * features/i386/i386-avx.c: Re-generated.
3671 * features/i386/i386-avx-linux.c: Re-generated.
3672 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3673 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3674 * features/i386/i386-avx-mpx.c: Re-generated.
3675 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3676 * features/i386/i386.c: Re-generated.
3677 * features/i386/i386-linux.c: Re-generated.
3678 * features/i386/i386-mmx.c: Re-generated.
3679 * features/i386/i386-mmx-linux.c: Re-generated.
3680 * features/i386/i386-mpx.c: Re-generated.
3681 * features/i386/i386-mpx-linux.c: Re-generated.
3682 * features/i386/x32-avx-avx512.c: Re-generated.
3683 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3684 * features/i386/x32-avx.c: Re-generated.
3685 * features/i386/x32-avx-linux.c: Re-generated.
3686 * features/i386/x32.c: Re-generated.
3687 * features/i386/x32-linux.c: Re-generated.
3688 * features/microblaze.c: Re-generated.
3689 * features/microblaze-with-stack-protect.c: Re-generated.
3690 * features/mips64-dsp-linux.c: Re-generated.
3691 * features/mips64-linux.c: Re-generated.
3692 * features/mips-dsp-linux.c: Re-generated.
3693 * features/mips-linux.c: Re-generated.
3694 * features/nds32.c: Re-generated.
3695 * features/nios2.c: Re-generated.
3696 * features/nios2-linux.c: Re-generated.
3697 * features/rs6000/powerpc-32.c: Re-generated.
3698 * features/rs6000/powerpc-32l.c: Re-generated.
3699 * features/rs6000/powerpc-403.c: Re-generated.
3700 * features/rs6000/powerpc-403gc.c : Re-generated.
3701 * features/rs6000/powerpc-405.c: Re-generated.
3702 * features/rs6000/powerpc-505.c: Re-generated.
3703 * features/rs6000/powerpc-601.c: Re-generated.
3704 * features/rs6000/powerpc-602.c: Re-generated.
3705 * features/rs6000/powerpc-603.c: Re-generated.
3706 * features/rs6000/powerpc-604.c: Re-generated.
3707 * features/rs6000/powerpc-64.c: Re-generated.
3708 * features/rs6000/powerpc-64l.c: Re-generated.
3709 * features/rs6000/powerpc-7400.c: Re-generated.
3710 * features/rs6000/powerpc-750.c: Re-generated.
3711 * features/rs6000/powerpc-860.c: Re-generated.
3712 * features/rs6000/powerpc-altivec32.c: Re-generated.
3713 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3714 * features/rs6000/powerpc-altivec64.c: Re-generated.
3715 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3716 * features/rs6000/powerpc-cell32l.c: Re-generated.
3717 * features/rs6000/powerpc-cell64l.c: Re-generated.
3718 * features/rs6000/powerpc-e500.c: Re-generated.
3719 * features/rs6000/powerpc-e500l.c: Re-generated.
3720 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3721 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3722 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3723 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3724 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3725 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3726 * features/rs6000/powerpc-vsx32.c: Re-generated.
3727 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3728 * features/rs6000/powerpc-vsx64.c: Re-generated.
3729 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3730 * features/rs6000/rs6000.c: Re-generated.
3731 * features/s390-linux32.c: Re-generated.
3732 * features/s390-linux32v1.c: Re-generated.
3733 * features/s390-linux32v2.c: Re-generated.
3734 * features/s390-linux64.c: Re-generated.
3735 * features/s390-linux64v1.c: Re-generated.
3736 * features/s390-linux64v2.c: Re-generated.
3737 * features/s390-te-linux64.c: Re-generated.
3738 * features/s390-tevx-linux64.c: Re-generated.
3739 * features/s390-vx-linux64.c: Re-generated.
3740 * features/s390x-linux64.c: Re-generated.
3741 * features/s390x-linux64v1.c: Re-generated.
3742 * features/s390x-linux64v2.c: Re-generated.
3743 * features/s390x-te-linux64.c: Re-generated.
3744 * features/s390x-tevx-linux64.c: Re-generated.
3745 * features/s390x-vx-linux64.c: Re-generated.
3746 * features/sparc/sparc32-solaris.c: Re-generated.
3747 * features/sparc/sparc64-solaris.c: Re-generated.
3748 * features/tic6x-c62x.c: Re-generated.
3749 * features/tic6x-c62x-linux.c: Re-generated.
3750 * features/tic6x-c64x.c: Re-generated.
3751 * features/tic6x-c64x-linux.c: Re-generated.
3752 * features/tic6x-c64xp.c: Re-generated.
3753 * features/tic6x-c64xp-linux.c: Re-generated.
3754
3755 2017-07-26 Yao Qi <yao.qi@linaro.org>
3756
3757 * i386-linux-tdep.c (i386_linux_read_description): New function.
3758 (i386_linux_core_read_description): Call
3759 i386_linux_read_description.
3760 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3761 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3762 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3763 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3764 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3765 * x86-linux-nat.c (x86_linux_read_description): Call
3766 i386_linux_read_description.
3767
3768 2017-07-26 Yao Qi <yao.qi@linaro.org>
3769
3770 * NEWS: Mention it.
3771 * features/Makefile (%.c: %.xml): Pass the xml file name to
3772 command "maint print c-tdesc".
3773 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3774 name from 'arg'.
3775
3776 2017-07-26 Yao Qi <yao.qi@linaro.org>
3777
3778 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3779 in-class initialization.
3780 (tdesc_create_feature): Call new instead of XCNEW.
3781 (free_target_description): Ue delete.
3782
3783 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3784
3785 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3786
3787 2017-07-25 Yao Qi <yao.qi@linaro.org>
3788
3789 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3790 constant.
3791 (amd64_x32_init_abi): Likewise.
3792 * amd64-tdep.h (amd64_init_abi): Update declaration.
3793 (amd64_x32_init_abi): Likewise.
3794
3795 2017-07-25 Yao Qi <yao.qi@linaro.org>
3796
3797 PR tdep/21717
3798 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3799 condition for FPSCR.
3800 (arm_linux_store_inferior_registers): Likewise.
3801
3802 2017-07-22 Tom Tromey <tom@tromey.com>
3803
3804 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3805 <syscalls_counts>: Now a std::vector.
3806 (get_catch_syscall_inferior_data): Use "new".
3807 (catch_syscall_inferior_data_cleanup): Use "delete".
3808 (insert_catch_syscall, remove_catch_syscall)
3809 (clear_syscall_counts): Update.
3810
3811 2017-07-22 Tom Tromey <tom@tromey.com>
3812
3813 * break-catch-syscall.c (syscall_catchpoint)
3814 <syscalls_to_be_caught>: Now a std::vector<int>
3815 (~syscall_catchpoint): Remove.
3816 (insert_catch_syscall, remove_catch_syscall)
3817 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3818 (print_mention_catch_syscall, print_recreate_catch_syscall):
3819 Update.
3820 (create_syscall_event_catchpoint): Change type of "filter"
3821 parameter.
3822 (catch_syscall_split_args): Return a std::vector.
3823 (catch_syscall_command_1, catching_syscall_number_1): Update.
3824
3825 2017-07-22 Tom Tromey <tom@tromey.com>
3826
3827 * break-catch-throw.c (struct exception_catchpoint)
3828 <exception_rx>: Now a std::string.
3829 (~exception_catchpoint): Remove.
3830 (print_one_detail_exception_catchpoint): Update.
3831 (handle_gnu_v3_exceptions): Change type of except_rx.
3832 (extract_exception_regexp): Return a std::string.
3833 (catch_exception_command_1): Update.
3834
3835 2017-07-22 Tom Tromey <tom@tromey.com>
3836
3837 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3838 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3839 std::vector.
3840 <catch_all>: Now a bool.
3841 (~signal_catchpoint): Remove.
3842 (signal_catchpoint_insert_location)
3843 (signal_catchpoint_remove_location)
3844 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3845 (signal_catchpoint_print_mention)
3846 (signal_catchpoint_print_recreate)
3847 (signal_catchpoint_explains_signal): Update.
3848 (create_signal_catchpoint): Change type of "filter" and
3849 "catch_all".
3850 (catch_signal_split_args): Return a std::vector. Change type of
3851 "catch_all".
3852 (catch_signal_command): Update.
3853
3854 2017-07-20 Pedro Alves <palves@redhat.com>
3855
3856 * ada-lang.c (ada_language_defn): Make extern.
3857 (_initialize_ada_language): Remove add_language call.
3858 * c-lang.c (c_language_defn, cplus_language_defn)
3859 (asm_language_defn, minimal_language_defn): Make extern.
3860 (_initialize_c_language): Delete.
3861 * completer.c (compare_cstrings): Delete, moved to utils.h.
3862 * d-lang.c (d_language_defn): Make extern.
3863 (_initialize_d_language): Remove add_language calls.
3864 * defs.h (enum language): Add comment.
3865 * f-lang.c (f_language_defn): Make extern.
3866 (_initialize_f_language): Remove add_language call.
3867 * go-lang.c (go_language_defn): Make extern.
3868 (_initialize_go_language): Remove add_language call.
3869 * language.c: Include <algorithm>.
3870 (languages): Redefine as const array.
3871 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3872 (set_language_command): Handle "local". Use for-range loop.
3873 (set_language): Remove loop.
3874 (language_enum): Rewrite.
3875 (language_def, language_str): Remove loops.
3876 (add_language): Delete.
3877 (add_set_language_command): New, based on add_languages.
3878 (skip_language_trampoline): Adjust.
3879 (local_language_defn): Delete.
3880 (language_gdbarch_post_init): Adjust.
3881 (_initialize_language): Remove add_language calls. Call
3882 add_set_language_command.
3883 * language.h (add_language): Delete.
3884 (auto_language_defn)
3885 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3886 (asm_language_defn, c_language_defn, cplus_language_defn)
3887 (d_language_defn, f_language_defn, go_language_defn)
3888 (m2_language_defn, objc_language_defn, opencl_language_defn)
3889 (pascal_language_defn, rust_language_defn): Declare.
3890 * m2-lang.c (m2_language_defn): Make extern.
3891 (_initialize_m2_language): Remove add_language call.
3892 * objc-lang.c (objc_language_defn): Make extern.
3893 (_initialize_objc_language): Remove add_language call.
3894 * opencl-lang.c (opencl_language_defn): Make extern.
3895 (_initialize_opencl_language): Remove add_language call.
3896 * p-lang.c (pascal_language_defn): Make extern.
3897 (_initialize_pascal_language): Delete.
3898 * rust-lang.c (rust_language_defn): Make extern.
3899 (_initialize_rust_language): Delete.
3900 * utils.h (compare_cstrings): New static inline function.
3901
3902 2017-07-20 Pedro Alves <palves@redhat.com>
3903
3904 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3905 (get_var_value): Constify parameters.
3906 (get_int_var_value): Change prototype.
3907 (to_fixed_range_type): Adjust.
3908 * ada-lang.h (get_int_var_value): Change prototype.
3909
3910 2017-07-20 Pedro Alves <palves@redhat.com>
3911
3912 * dwarf2read.c (dw2_lookup_symbol): Use
3913 SYMBOL_MATCHES_SEARCH_NAME.
3914 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3915
3916 2017-07-20 Pedro Alves <palves@redhat.com>
3917
3918 * block.c (block_iter_name_step, block_iter_name_first)
3919 (block_iter_name_next): Delete.
3920 (block_lookup_symbol_primary): Adjust to use
3921 dict_iter_match_first/dict_iter_match_next.
3922 * block.h (block_iter_name_first, block_iter_name_next): Delete
3923 declarations.
3924 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3925 dict_iter_match_first/dict_iter_match_next.
3926
3927 2017-07-20 Pedro Alves <palves@redhat.com>
3928
3929 * cp-support.c (cp_find_first_component_aux): Add missing case for
3930 end of string.
3931
3932 2017-07-18 David Blaikie <dblaikie@gmail.com>
3933
3934 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3935 of dwo_cu's dwo_file.
3936
3937 2017-07-18 Yao Qi <yao.qi@linaro.org>
3938
3939 * remote.c (store_registers_using_G): Remove one line comment.
3940
3941 2017-07-18 Yao Qi <yao.qi@linaro.org>
3942
3943 * regcache.c (regcache_cpy): Simplify it.
3944 (regcache::cpy_no_passthrough): Remove it.
3945 * regcache.h (cpy_no_passthrough): Remove it.
3946 (regcache_dup, regcache_cpy): Update comments.
3947
3948 2017-07-18 Pedro Alves <palves@redhat.com>
3949
3950 * remote-sim.c (sim_command_completer): Adjust to work with a
3951 completion_tracker instead of a VEC.
3952
3953 2017-07-17 Pedro Alves <palves@redhat.com>
3954
3955 * completer.c (complete_source_filenames): New function.
3956 (complete_address_and_linespec_locations): New function.
3957 (location_completer): Use complete_address_and_linespec_locations.
3958 (completion_tracker::build_completion_result): Honor the tracker's
3959 request to suppress append.
3960 * completer.h (completion_tracker::suppress_append_ws)
3961 (completion_tracker::set_suppress_append_ws): New methods.
3962 (completion_tracker::m_suppress_append_ws): New field.
3963 (complete_source_filenames): New declaration.
3964 * linespec.c (linespec_complete_what): New.
3965 (struct ls_parser) <complete_what, completion_word,
3966 completion_quote_char, completion_quote_end, completion_tracker>:
3967 New fields.
3968 (string_find_incomplete_keyword_at_end): New.
3969 (linespec_lexer_lex_string): Record quote char. If in completion
3970 mode, don't throw.
3971 (linespec_lexer_consume_token): Advance the completion word point.
3972 (linespec_lexer_peek_token): Save/restore completion info.
3973 (save_stream_and_consume_token): New.
3974 (set_completion_after_number): New.
3975 (linespec_parse_basic): Set what to complete next depending on
3976 token. Handle function and label completions specially.
3977 (parse_linespec): Disable objc shortcut in completion mode. Set
3978 what to complete next depending on token type. Skip keyword if in
3979 completion mode.
3980 (complete_linespec_component, linespec_complete): New.
3981 * linespec.h (linespec_complete): Declare.
3982
3983 2017-07-17 Pedro Alves <palves@redhat.com>
3984
3985 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3986 Handle 'operator<' / 'operator<<'.
3987
3988 2017-07-17 Pedro Alves <palves@redhat.com>
3989
3990 * completer.c (collect_explicit_location_matches): Handle
3991 MATCH_LABEL.
3992 (convert_explicit_location_to_linespec): New, factored out from
3993 ...
3994 (convert_explicit_location_to_sals): ... this.
3995 (complete_label): New.
3996 (linespec_complete_label, find_label_symbols_in_block): New.
3997 (find_label_symbols): Add completion_mode parameter and adjust to
3998 call find_label_symbols_in_block.
3999 * linespec.h (linespec_complete_label): Declare.
4000
4001 2017-07-17 Pedro Alves <palves@redhat.com>
4002
4003 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4004 complete_symbol_mode parameter.
4005 * cli/cli-cmds.c (complete_command): Get the completion result out
4006 of the handle_brkchars tracker if used a custom word point.
4007 * completer.c: Include "linespec.h".
4008 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4009 (advance_to_expression_complete_word_point): New.
4010 (completion_tracker::completes_to_completion_word): New.
4011 (complete_files_symbols): Pass down
4012 complete_symbol_mode::EXPRESSION.
4013 (explicit_options, probe_options): New.
4014 (collect_explicit_location_matches): Complete on the
4015 explictit_loc->foo instead of word. Use
4016 linespec_complete_function. Handle MATCH_LINE. Handle offering
4017 keyword and options completions.
4018 (backup_text_ptr): Delete.
4019 (skip_keyword): New.
4020 (complete_explicit_location): Remove 'word' parameter. Add
4021 language, quoted_arg_start and quoted_arg_end parameters.
4022 Rewrite, parsing left to right.
4023 (location_completer): Rewrite.
4024 (location_completer_handle_brkchars): New function.
4025 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4026 (enum complete_line_internal_reason): Adjust comments.
4027 (completion_tracker::discard_completions): New.
4028 (completer_handle_brkchars_func_for_completer): Handle
4029 location_completer.
4030 (gdb_custom_word_point_brkchars)
4031 (gdb_org_rl_basic_quote_characters): New.
4032 (gdb_completion_word_break_characters_throw)
4033 (completion_find_completion_word): Handle trackers that use a
4034 custom word point.
4035 (completion_tracker::advance_custom_word_point_by): New.
4036 (completion_tracker::build_completion_result): Don't rely on
4037 readline appending the quote char.
4038 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4039 use a custom word point.
4040 (gdb_rl_attempted_completion_function): Restore
4041 rl_basic_quote_characters.
4042 * completer.h (class completion_tracker): Extend intro comment.
4043 (completion_tracker::set_quote_char)
4044 (completion_tracker::quote_char)
4045 (completion_tracker::set_use_custom_word_point)
4046 (completion_tracker::use_custom_word_point)
4047 (completion_tracker::custom_word_point)
4048 (completion_tracker::set_custom_word_point)
4049 (completion_tracker::advance_custom_word_point_by)
4050 (completion_tracker::completes_to_completion_word)
4051 (completion_tracker::discard_completions): New methods.
4052 (completion_tracker::m_quote_char)
4053 (completion_tracker::m_use_custom_word_point)
4054 (completion_tracker::m_custom_word_point): New fields.
4055 (advance_to_expression_complete_word_point): Declare.
4056 * f-lang.c (f_collect_symbol_completion_matches): Add
4057 complete_symbol_mode parameter.
4058 * language.h (struct language_defn)
4059 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4060 parameter.
4061 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4062 (linespec_complete_function): New function.
4063 (linespec_lexer_lex_keyword): Adjust.
4064 * linespec.h (linespec_keywords, linespec_complete_function): New
4065 declarations.
4066 * location.c (find_end_quote): New function.
4067 (explicit_location_lex_one): Add explicit_completion_info
4068 parameter. Save quoting info. Don't throw if being called for
4069 completion. Don't handle Ada operators here.
4070 (is_cp_operator, skip_op_false_positives, first_of)
4071 (explicit_location_lex_one_function): New function.
4072 (string_to_explicit_location): Replace 'dont_throw' parameter with
4073 an explicit_completion_info pointer parameter. Handle it. Don't
4074 use explicit_location_lex_one to lex function names. Use
4075 explicit_location_lex_one_function instead.
4076 * location.h (struct explicit_completion_info): New.
4077 (string_to_explicit_location): Replace 'dont_throw' parameter with
4078 an explicit_completion_info pointer parameter.
4079 * symtab.c (default_collect_symbol_completion_matches_break_on):
4080 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4081 (default_collect_symbol_completion_matches)
4082 (collect_symbol_completion_matches): Add complete_symbol_mode
4083 parameter.
4084 (collect_symbol_completion_matches_type): Pass down
4085 complete_symbol_mode::EXPRESSION.
4086 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4087 parameter. Handle LINESPEC mode.
4088 * symtab.h (complete_symbol_mode): New.
4089 (default_collect_symbol_completion_matches_break_on)
4090 (default_collect_symbol_completion_matches)
4091 (collect_symbol_completion_matches)
4092 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4093 parameter.
4094
4095 2017-07-17 Pedro Alves <palves@redhat.com>
4096
4097 * utils.c (enum class strncmp_iw_mode): New.
4098 (strcmp_iw): Rename to ...
4099 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4100 parameters. Handle them.
4101 (strncmp_iw): New.
4102 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4103 * utils.h (strncmp_iw): Declare.
4104 (strcmp_iw): Move describing comments here.
4105
4106 2017-07-17 Pedro Alves <palves@redhat.com>
4107
4108 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4109 CP_OPERATOR_STR.
4110 * c-typeprint.c (is_type_conversion_operator): Use
4111 CP_OPERATOR_STR.
4112 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4113 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4114 CP_OPERATOR_LEN.
4115 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4116 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4117 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4118 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4119 CP_OPERATOR_STR.
4120 * location.c: Include "cp-support.h".
4121 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4122 CP_OPERATOR_STR.
4123 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4124 CP_OPERATOR_LEN.
4125
4126 2017-07-17 Pedro Alves <palves@redhat.com>
4127
4128 * cli/cli-cmds.c (complete_command): Use a completion tracker
4129 along with completion_find_completion_word for handle_brkchars
4130 phase.
4131 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4132 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4133 (struct gdb_rl_completion_word_info): New.
4134 (gdb_rl_find_completion_word): New.
4135 (completion_find_completion_word): New.
4136 * completer.h (completion_find_completion_word): Declare.
4137
4138 2017-07-17 Pedro Alves <palves@redhat.com>
4139
4140 * ada-lang.c (symbol_completion_match): Adjust comments.
4141 (symbol_completion_add): Replace vector parameter with
4142 completion_tracker parameter. Use it.
4143 (ada_make_symbol_completion_list): Rename to...
4144 (ada_collect_symbol_completion_matches): ... this. Add
4145 completion_tracker parameter and use it.
4146 (ada_language_defn): Adjust.
4147 * break-catch-syscall.c (catch_syscall_completer): Adjust
4148 prototype and work with completion_tracker instead of VEC.
4149 * breakpoint.c (condition_completer): Adjust prototype and work
4150 with completion_tracker instead of VEC.
4151 * c-lang.c (c_language_defn, cplus_language_defn)
4152 (asm_language_defn, minimal_language_defn): Adjust to renames.
4153 * cli/cli-cmds.c (complete_command): Rework using
4154 completion_tracker. Catch exceptions when completing.
4155 * cli/cli-decode.c (integer_unlimited_completer)
4156 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4157 with completion_tracker instead of VEC.
4158 * command.h (struct completion_tracker): Forward declare.
4159 (completer_ftype, completer_handle_brkchars_ftype): Change
4160 types.
4161 (complete_on_cmdlist, complete_on_enum): Adjust.
4162 * completer.c: Include <algorithm>.
4163 (struct gdb_completer_state): New.
4164 (current_completion): New global.
4165 (readline_line_completion_function): Delete.
4166 (noop_completer, filename_completer)
4167 (filename_completer_handle_brkchars, complete_files_symbols)
4168 (linespec_location_completer): Adjust to work with a
4169 completion_tracker instead of a VEC.
4170 (string_or_empty): New.
4171 (collect_explicit_location_matches): Adjust to work with a
4172 completion_tracker instead of a VEC.
4173 (explicit_location_completer): Rename to ...
4174 (complete_explicit_location): ... this and adjust to work with a
4175 completion_tracker instead of a VEC.
4176 (location_completer): Adjust to work with a completion_tracker
4177 instead of a VEC.
4178 (add_struct_fields): Adjust to work with a completion_list instead
4179 of VEC.
4180 (expression_completer): Rename to ...
4181 (complete_expression): ... this and adjust to work with a
4182 completion_tracker instead of a VEC. Use complete_files_symbols.
4183 (expression_completer): Reimplement on top of complete_expression.
4184 (symbol_completer): Adjust to work with a completion_tracker
4185 instead of a VEC.
4186 (enum complete_line_internal_reason): Add describing comments.
4187 (complete_line_internal_normal_command): Adjust to work with a
4188 completion_tracker instead of a VEC.
4189 (complete_line_internal): Rename to ...
4190 (complete_line_internal_1): ... this and adjust to work with a
4191 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4192 handle_brkchars phase.
4193 (new_completion_tracker): Delete.
4194 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4195 complete_line_internal_1.
4196 (free_completion_tracker): Delete.
4197 (INITIAL_COMPLETION_HTAB_SIZE): New.
4198 (completion_tracker::completion_tracker)
4199 (completion_tracker::~completion_tracker): New.
4200 (maybe_add_completion): Delete.
4201 (completion_tracker::maybe_add_completion)
4202 (completion_tracker::add_completion)
4203 (completion_tracker::add_completions): New.
4204 (throw_max_completions_reached_error): Delete.
4205 (complete_line): Adjust to work with a completion_tracker instead
4206 of a VEC. Don't create a completion_tracker_t or check for max
4207 completions here.
4208 (command_completer, command_completer_handle_brkchars)
4209 (signal_completer, reg_or_group_completer_1)
4210 (reg_or_group_completer, default_completer_handle_brkchars):
4211 Adjust to work with a completion_tracker.
4212 (gdb_completion_word_break_characters_throw): New.
4213 (gdb_completion_word_break_characters): Reimplement.
4214 (line_completion_function): Delete.
4215 (completion_tracker::recompute_lowest_common_denominator)
4216 (expand_preserving_ws)
4217 (completion_tracker::build_completion_result)
4218 (completion_result::completion_result)
4219 (completion_result::completion_result)
4220 (completion_result::~completion_result)
4221 (completion_result::completion_result)
4222 (completion_result::release_match_list, compare_cstrings)
4223 (completion_result::sort_match_list)
4224 (completion_result::reset_match_list)
4225 (gdb_rl_attempted_completion_function_throw)
4226 (gdb_rl_attempted_completion_function): New.
4227 * completer.h (completion_list, struct completion_result)
4228 (class completion_tracker): New.
4229 (complete_line): Add completion_tracker parameter.
4230 (readline_line_completion_function): Delete.
4231 (gdb_rl_attempted_completion_function): New.
4232 (noop_completer, filename_completer, expression_completer)
4233 (location_completer, symbol_completer, command_completer)
4234 (signal_completer, reg_or_group_completer): Update prototypes.
4235 (completion_tracker_t, new_completion_tracker)
4236 (make_cleanup_free_completion_tracker): Delete.
4237 (enum maybe_add_completion_enum): Delete.
4238 (maybe_add_completion): Delete.
4239 (throw_max_completions_reached_error): Delete.
4240 * corefile.c (complete_set_gnutarget): Adjust to work with a
4241 completion_tracker instead of a VEC.
4242 * cp-abi.c (cp_abi_completer): Adjust to work with a
4243 completion_tracker instead of a VEC.
4244 * d-lang.c (d_language_defn): Adjust.
4245 * disasm.c (disassembler_options_completer): Adjust to work with a
4246 completion_tracker instead of a VEC.
4247 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4248 (f_collect_symbol_completion_matches): ... this. Adjust to work
4249 with a completion_tracker instead of a VEC.
4250 (f_language_defn): Adjust.
4251 * go-lang.c (go_language_defn): Adjust.
4252 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4253 Adjust to work with a completion_tracker instead of a VEC.
4254 * infrun.c (handle_completer): Likewise.
4255 * interps.c (interpreter_completer): Likewise.
4256 * interps.h (interpreter_completer): Likewise.
4257 * language.c (unknown_language_defn, auto_language_defn)
4258 (local_language_defn): Adjust.
4259 * language.h (language_defn::la_make_symbol_completion_list):
4260 Rename to ...
4261 (language_defn::la_collect_symbol_completion_matches): ... this
4262 and adjust to work with a completion_tracker instead of a VEC.
4263 * m2-lang.c (m2_language_defn): Adjust.
4264 * objc-lang.c (objc_language_defn): Adjust.
4265 * opencl-lang.c (opencl_language_defn): Adjust.
4266 * p-lang.c (pascal_language_defn): Adjust.
4267 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4268 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4269 with a completion_tracker.
4270 * rust-lang.c (rust_language_defn): Adjust.
4271 * symtab.c (free_completion_list, do_free_completion_list)
4272 (return_val, completion_tracker): Delete.
4273 (completion_list_add_name, completion_list_add_symbol)
4274 (completion_list_add_msymbol, completion_list_objc_symbol)
4275 (completion_list_add_fields, add_symtab_completions): Add
4276 completion_tracker parameter and use it.
4277 (default_make_symbol_completion_list_break_on_1): Rename to...
4278 (default_collect_symbol_completion_matches_break_on): ... this.
4279 Add completion_tracker parameter and use it instead of allocating
4280 a completion tracker here.
4281 (default_make_symbol_completion_list_break_on): Delete old
4282 implementation.
4283 (default_make_symbol_completion_list): Delete.
4284 (default_collect_symbol_completion_matches): New.
4285 (make_symbol_completion_list): Delete.
4286 (collect_symbol_completion_matches): New.
4287 (make_symbol_completion_type): Rename to ...
4288 (collect_symbol_completion_matches_type): ... this. Add
4289 completion_tracker parameter and use it instead of VEC.
4290 (make_file_symbol_completion_list_1): Rename to...
4291 (collect_file_symbol_completion_matches): ... this. Add
4292 completion_tracker parameter and use it instead of VEC.
4293 (make_file_symbol_completion_list): Delete.
4294 (add_filename_to_list): Use completion_list instead of a VEC.
4295 (add_partial_filename_data::list): Now a completion_list.
4296 (make_source_files_completion_list): Work with a completion_list
4297 instead of a VEC.
4298 * symtab.h: Include "completer.h".
4299 (default_make_symbol_completion_list_break_on)
4300 (default_make_symbol_completion_list, make_symbol_completion_list)
4301 (make_symbol_completion_type, make_file_symbol_completion_list)
4302 (make_source_files_completion_list): Delete.
4303 (default_collect_symbol_completion_matches_break_on)
4304 (default_collect_symbol_completion_matches)
4305 (collect_symbol_completion_matches)
4306 (collect_symbol_completion_matches_type)
4307 (collect_file_symbol_completion_matches)
4308 (make_source_files_completion_list): New.
4309 * top.c (init_main): Don't install a rl_completion_entry_function
4310 hook. Install a rl_attempted_completion_function hook instead.
4311 * tui/tui-layout.c (layout_completer): Adjust to work with a
4312 completion_tracker.
4313 * tui/tui-regs.c (tui_reggroup_completer):
4314 * tui/tui-win.c (window_name_completer, focus_completer)
4315 (winheight_completer): Adjust to work with a completion_tracker.
4316 * value.c: Include "completer.h".
4317 (complete_internalvar): Adjust to work with a completion_tracker.
4318 * value.h (complete_internalvar): Likewise.
4319
4320 2017-07-17 Pedro Alves <palves@redhat.com>
4321
4322 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4323 renames.
4324 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4325 comments to completer_ftype's declaration.
4326 <completer_handle_brkchars>: Change type to
4327 completer_handle_brkchars_ftype.
4328 * command.h (completer_ftype): Add describing comment and give
4329 names to parameters.
4330 (completer_ftype_void): Rename to ...
4331 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4332 (set_cmd_completer_handle_brkchars): Adjust.
4333 * completer.c (filename_completer_handle_brkchars): New function.
4334 (complete_line_internal_normal_command): New function, factored
4335 out from ...
4336 (complete_line_internal): ... here.
4337 (command_completer_handle_brkchars)
4338 (default_completer_handle_brkchars)
4339 (completer_handle_brkchars_func_for_completer): New functions.
4340 * completer.h (set_gdb_completion_word_break_characters): Delete
4341 declaration.
4342 (completer_handle_brkchars_func_for_completer): New declaration.
4343 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4344 completer_handle_brkchars_func_for_completer.
4345
4346 2017-07-17 Pedro Alves <palves@redhat.com>
4347
4348 * completer.c (symbol_completer): New function, based on
4349 make_symbol_completion_list_fn.
4350 * completer.h (symbol_completer): New declaration.
4351 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4352 * python/py-cmd.c (completers): Adjust.
4353 * symtab.c (make_symbol_completion_list_fn): Delete.
4354 * symtab.h (make_symbol_completion_list_fn): Delete.
4355 * cli/cli-decode.c (add_cmd): Adjust.
4356
4357 2017-07-17 Pedro Alves <palves@redhat.com>
4358
4359 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4360 * dwarf2read.c: Include "filename-seen-cache.h".
4361 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4362 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4363 * filename-seen-cache.c: New file.
4364 * filename-seen-cache.h: New file.
4365 * symtab.c: Include "filename-seen-cache.h".
4366 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4367 (create_filename_seen_cache, clear_filename_seen_cache)
4368 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4369 to filename-seen-cache.h/filename-seen-cache.c.
4370 (output_source_filename, sources_info)
4371 (maybe_add_partial_symtab_filename)
4372 (make_source_files_completion_list): Adjust to use
4373 filename_seen_cache.
4374
4375 2017-07-17 Pedro Alves <palves@redhat.com>
4376
4377 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4378 fields.
4379 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4380 dwarf2_debug_sections*)): New.
4381 (dwarf2_per_objfile::dwarf2_per_objfile(const
4382 dwarf2_per_objfile&)): Declare as deleted.
4383 (dwarf2_per_objfile::operator=): Declare as deleted.
4384 (dwarf2_per_objfile::dwarf2_per_objfile)
4385 (dwarf2_per_objfile::~dwarf2_per_objfile)
4386 (dwarf2_per_objfile::free_cached_comp_units): New.
4387 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4388 ctor. Call dwarf2_per_objfile's ctor manually.
4389 (dwarf2_locate_sections): Deleted/refactored as ...
4390 (dwarf2_per_objfile::locate_sections): ... this new method.
4391 (free_cached_comp_units): Defer to
4392 dwarf2_per_objfile::free_cached_comp_units.
4393 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4394
4395 2017-07-14 Tom Tromey <tom@tromey.com>
4396
4397 PR rust/21764:
4398 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4399 parameter.
4400 <UNOP_SIZEOF>: Split into separate case.
4401 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4402
4403 2017-07-14 Tom Tromey <tom@tromey.com>
4404
4405 PR rust/21763:
4406 * symtab.c (symbol_matches_domain): Add language_rust to special
4407 case.
4408 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4409 treat LOC_TYPEDEF symbols as variables.
4410
4411 2017-07-14 Pedro Alves <palves@redhat.com>
4412
4413 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4414 symtabs matching all symtabs with SRCFILE as file name instead of
4415 only considering the first hit, with lookup_symtab.
4416
4417 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4418
4419 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4420 operator_name parameters.
4421 (gen_expr): Update function call.
4422
4423 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4424
4425 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4426 parameter.
4427 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4428 Likewise.
4429 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4430 parameter, use agent_expr::gdbarch instead, update function
4431 calls.
4432 (locexpr_tracepoint_var_ref): Likewise.
4433 (loclist_tracepoint_var_ref): Likewise.
4434 * ax-gdb.c (gen_trace_static_fields): Likewise.
4435 (gen_traced_pop): Likewise.
4436 (gen_frame_args_address): Likewise.
4437 (gen_frame_locals_address): Likewise.
4438 (gen_var_ref): Likewise.
4439 (gen_struct_ref_recursive): Likewise.
4440 (gen_static_field): Likewise.
4441 (gen_maybe_namespace_elt): Likewise.
4442 (gen_expr): Likewise.
4443 (gen_trace_for_var): Likewise.
4444 (gen_trace_for_expr): Likewise.
4445 (gen_trace_for_return_address): Likewise.
4446
4447 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4448
4449 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4450 parameter.
4451 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4452
4453 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4454
4455 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4456 from ax, update calls.
4457 (gen_usual_arithmetic): Likewise.
4458 (gen_integral_promotions): Likewise.
4459 (gen_bitfield_ref): Likewise.
4460 (gen_primitive_field): Likewise.
4461 (gen_struct_ref_recursive): Likewise.
4462 (gen_struct_ref): Likewise.
4463 (gen_maybe_namespace_elt): Likewise.
4464 (gen_struct_elt_for_reference): Likewise.
4465 (gen_namespace_elt): Likewise.
4466 (gen_aggregate_elt_ref): Likewise.
4467 (gen_expr): Get gdbarch from ax, update calls.
4468 (gen_expr_binop_rest): Likewise.
4469
4470 2017-07-13 Pedro Alves <palves@redhat.com>
4471
4472 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4473 as default tdesc.
4474 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4475 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4476 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4477 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4478 tdep.
4479 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4480 Get final tdesc from the tdep.
4481 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4482 default tdesc.
4483 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4484 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4485 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4486 Use it as default tdesc.
4487 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4488 down to amd_init_abi. No longer handle fallback tdesc here.
4489 * amd64-tdep.h (tdesc_x32): Declare.
4490 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4491 parameter.
4492 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4493 as default tdesc.
4494
4495 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4496
4497 * s390-linux-tdep.c (s390_process_record): Add support for
4498 instructions new in arch12.
4499
4500 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4501
4502 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4503 PT_GETFSBASE and PT_GETGSBASE.
4504 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4505 PT_SETGSBASE.
4506
4507 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4508
4509 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4510 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4511 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4512 those rules.
4513 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4514 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4515 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4516 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4517 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4518 * features/i386/amd64.xml: Add 64bit-segments.xml.
4519 * features/i386/amd64-avx-avx512.c: Regenerated.
4520 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4521 * features/i386/amd64-avx-mpx.c: Regenerated.
4522 * features/i386/amd64-avx.c: Regenerated.
4523 * features/i386/amd64-mpx.c: Regenerated.
4524 * features/i386/amd64.c: Regenerated.
4525 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4526 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4527 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4528 * regformats/i386/amd64-avx.dat: Regenerated.
4529 * regformats/i386/amd64-mpx.dat: Regenerated.
4530 * regformats/i386/amd64.dat: Regenerated.
4531
4532 2017-07-10 Yao Qi <yao.qi@linaro.org>
4533
4534 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4535 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4536
4537 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4538
4539 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4540 unsetenv.
4541 * gnulib/aclocal.m4: Regenerate.
4542 * gnulib/config.in: Regenerate.
4543 * gnulib/configure: Regenerate.
4544 * gnulib/import/Makefile.am: Regenerate.
4545 * gnulib/import/Makefile.in: Regenerate.
4546 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4547 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4548 * gnulib/import/m4/environ.m4: New file.
4549 * gnulib/import/m4/setenv.m4: New file.
4550 * gnulib/import/setenv.c: New file.
4551 * gnulib/import/unsetenv.c: New file.
4552
4553 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4554
4555 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4556 address when op is DW_OP_addr.
4557
4558 2017-07-09 Tom Tromey <tom@tromey.com>
4559
4560 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4561 check and apply to outer type.
4562
4563 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4564
4565 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4566 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4567 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4568 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4569
4570 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4571
4572 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4573
4574 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4575
4576 * corelow.c (get_core_siginfo): Remove.
4577 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4578 instead of get_core_siginfo.
4579 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4580 * gdbarch.h: Re-generate.
4581 * gdbarch.c: Re-generate.
4582 * linux-tdep.c (linux_core_xfer_siginfo): New.
4583 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4584
4585 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4586
4587 * corelow.c (thread_section_name): Move to ...
4588 * gdbcore.h (thread_section_name): ... here.
4589
4590 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4591
4592 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4593 (struct siginfo32): New.
4594 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4595 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4596 via ptrace(PT_LWPINFO).
4597
4598 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4599
4600 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4601 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4602 (fbsd_get_siginfo_type): New.
4603 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4604 (_initialize_fbsd_tdep): New.
4605
4606 2017-07-06 David Blaikie <dblaikie@gmail.com>
4607
4608 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4609 a singular dwo_unit*) to support multiple CUs in the same way that
4610 multiple TUs are supported.
4611 (create_cus_hash_table): Replace create_dwo_cu with a function for
4612 parsing multiple CUs from a DWO file.
4613 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4614 create_dwo_cu.
4615 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4616 htab_find, rather than comparing the signature to a singleton CU in
4617 the dwo_file.
4618
4619 2017-07-06 Pedro Alves <palves@redhat.com>
4620
4621 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4622
4623 2017-07-04 Pedro Alves <palves@redhat.com>
4624
4625 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4626 * gdbtypes.h (TYPE_STATIC): Delete.
4627 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4628 is_synchronized, is_native>: Delete.
4629 <dummy>: Bump.
4630 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4631 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4632 (TYPE_FN_FIELD_ABSTRACT): Delete.
4633
4634 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4635
4636 * buffer.h (buffer_finish): Fix spelling mistakes.
4637
4638 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4639
4640 * .dir-locals.el: Automatically switch to C-style comments in
4641 versions of Emacs that support the feature.
4642
4643 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4644 Pedro Alves <palves@redhat.com>
4645
4646 PR cli/21688
4647 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4648 (process_next_line): New variable 'inline_cmd'.
4649 Adjust 'if' clauses for "python", "compile" and "guile" to use
4650 'command_name_equals' and check for '!inline_cmd'.
4651
4652 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4653
4654 PR cli/21688
4655 * cli/cli-script.c (command_name_equals_not_inline): New function.
4656 (process_next_line): Adjust 'if' clauses for "python", "compile"
4657 and "guile" to use command_name_equals_not_inline.
4658
4659 2017-06-29 Pedro Alves <palves@redhat.com>
4660
4661 * completer.c (expression_completer): Call
4662 linespec_location_completer instead of location_completer.
4663
4664 2017-06-29 Pedro Alves <palves@redhat.com>
4665
4666 * completer.c (expression_completer): Remove code that recomputes
4667 'text' from 'word'.
4668
4669 2017-06-29 Yao Qi <yao.qi@linaro.org>
4670
4671 * regformats/regdat.sh: Generate code with
4672 "ifndef IN_PROCESS_AGENT".
4673
4674 2017-06-28 Pedro Alves <palves@redhat.com>
4675
4676 * command.h: Include "common/scoped_restore.h".
4677
4678 2017-06-28 Yao Qi <yao.qi@linaro.org>
4679
4680 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4681 instead of obstack_grow.
4682
4683 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4684
4685 PR gdb/21337
4686 * symfile.c (reread_symbols): Call objfiles_changed just before
4687 read_symbols.
4688
4689 2017-06-27 Pedro Alves <palves@redhat.com>
4690
4691 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4692 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4693 (completion_list_add_symbol, completion_list_add_msymbol):
4694 ... these new functions.
4695 (add_symtab_completions)
4696 (default_make_symbol_completion_list_break_on_1): Adjust.
4697
4698 2017-06-27 Pedro Alves <palves@redhat.com>
4699
4700 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4701 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4702 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4703 dtor.
4704 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4705 'storage_obstack' field an auto_obstack. In-class initialize all
4706 non-bitfield fields. Make minsyms_read bool.
4707 * symfile.c (read_symbols): Adjust.
4708
4709 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4710
4711 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4712 (gdbsim_store_register): Likewise.
4713
4714 2017-06-27 Pedro Alves <palves@redhat.com>
4715
4716 * c-exp.y (name_obstack): Now an auto_obstack.
4717 (yylex): Use auto_obstack::clear.
4718 (c_parse): Use auto_obstack::clear instead of reinitializing and
4719 freeing the obstack.
4720 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4721 * d-exp.y (name_obstack): Now an auto_obstack.
4722 (yylex): Use auto_obstack::clear.
4723 (d_parse): Use auto_obstack::clear instead of reinitializing and
4724 freeing the obstack.
4725 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4726 auto_obstack.
4727 * dwarf2read.c (create_addrmap_from_index)
4728 (dwarf2_build_psymtabs_hard)
4729 (update_enumeration_type_from_children): Likewise.
4730 * gdb_obstack.h (auto_obstack): New type.
4731 * go-exp.y (name_obstack): Now an auto_obstack.
4732 (build_packaged_name): Use auto_obstack::clear.
4733 (go_parse): Use auto_obstack::clear instead of reinitializing and
4734 freeing the obstack.
4735 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4736 auto_obstack.
4737 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4738 * rust-exp.y (work_obstack): Now an auto_obstack.
4739 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4740 reinitializing and freeing the obstack.
4741 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4742 (host_char_to_target): Use auto_obstack.
4743 * utils.h (make_cleanup_obstack_free): Delete declaration.
4744 * valprint.c (generic_emit_char, generic_printstr): Use
4745 auto_obstack.
4746
4747 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4748
4749 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4750 thread.
4751 (darwin_init_thread_list): Don't update dummy thread.
4752 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4753
4754 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4755
4756 * record-full.c (netorder16): Remove.
4757
4758 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4759
4760 * common/diagnostics.h: Define macros for GCC.
4761 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4762 * common/vec.h: Include diagnostics.h.
4763 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4764 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4765 warning.
4766
4767 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4768
4769 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4770 New macro.
4771 * ada-lex.l: Ignore deprecated register warnings.
4772
4773 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4774
4775 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4776 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4777
4778 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4779
4780 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4781 its own line.
4782
4783 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4784
4785 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4786
4787 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4788
4789 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4790 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4791 (xtensa_register_read_masked): Likewise.
4792
4793 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4794
4795 * common/environ.c (gdb_environ::unset): Update comment.
4796
4797 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4798
4799 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4800 registers.
4801
4802 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4803
4804 * record-full.c (record_full_exec_insn): Use byte_vector.
4805
4806 2017-06-22 Yao Qi <yao.qi@linaro.org>
4807
4808 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4809 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4810
4811 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4812
4813 * remote.c (cached_reg): Move from here...
4814 * regcache.h (cached_reg): ...to here.
4815 * python/py-unwind.c (struct reg_info): Remove.
4816 (cached_frame_info): Use cached_reg_t.
4817 (pyuw_prev_register): Likewise.
4818 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4819 (pyuw_dealloc_cache): Free all registers.
4820
4821 2017-06-22 Pedro Alves <palves@redhat.com>
4822 Simon Marchi <simon.marchi@ericsson.com>
4823
4824 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4825 warning.
4826 * common/diagnostics.h: New file.
4827
4828 2017-06-22 Pedro Alves <palves@redhat.com>
4829
4830 * common/agent.h: Add include guards.
4831
4832 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4833
4834 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4835 talk about addressable units instead of bytes.
4836
4837 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4838
4839 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4840 of '::const_iterator'.
4841
4842 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4843
4844 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4845 'unittests/environ-selftests.c'.
4846 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4847 * charset.c (find_charset_names): Declare object 'iconv_env'.
4848 Update code to use 'iconv_env' object. Remove call to
4849 'free_environ'.
4850 * common/environ.c: Include <utility>.
4851 (make_environ): Delete function.
4852 (free_environ): Delete function.
4853 (gdb_environ::clear): New function.
4854 (gdb_environ::operator=): New function.
4855 (gdb_environ::get): Likewise.
4856 (environ_vector): Delete function.
4857 (set_in_environ): Delete function.
4858 (gdb_environ::set): New function.
4859 (unset_in_environ): Delete function.
4860 (gdb_environ::unset): New function.
4861 (gdb_environ::envp): Likewise.
4862 * common/environ.h: Include <vector>.
4863 (struct gdb_environ): Delete; transform into...
4864 (class gdb_environ): ... this class.
4865 (free_environ): Delete prototype.
4866 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4867 environ_vector): Likewise.
4868 * infcmd.c (run_command_1): Update code to call
4869 'envp' from 'gdb_environ' class.
4870 (environment_info): Update code to call methods from 'gdb_environ'
4871 class.
4872 (unset_environment_command): Likewise.
4873 (path_info): Likewise.
4874 (path_command): Likewise.
4875 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4876 (inferior::inferior): Initialize 'environment' using the host's
4877 information.
4878 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4879 Include "environ.h".
4880 (class inferior) <environment>: Change type from 'struct
4881 gdb_environ' to 'gdb_environ'.
4882 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4883 methods from 'gdb_environ' class.
4884 * solib.c (solib_find_1): Likewise
4885 * unittests/environ-selftests.c: New file.
4886
4887 2017-06-20 Yao Qi <yao.qi@linaro.org>
4888
4889 * features/i386/i386-linux.xml: Exchange the order of including
4890 32bit-linux.xml and 32bit-sse.xml.
4891 * features/i386/i386-linux.c: Regenerated.
4892
4893 2017-06-20 Yao Qi <yao.qi@linaro.org>
4894
4895 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4896 Delete copy ctor and assignment operator.
4897 (tdesc_type): Likewise.
4898 (tdesc_feature): Likewise.
4899 (tdesc_free_reg): Remove.
4900 (tdesc_create_reg): Use new.
4901 (tdesc_free_type): Remove.
4902 (tdesc_create_vector): Use new.
4903 (tdesc_create_union): Likewise.
4904 (tdesc_create_flags): Likewise.
4905 (tdesc_create_enum): Likewise.
4906 (tdesc_free_feature): Delete.
4907 (free_target_description): Use delete.
4908
4909 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4910
4911 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4912 registers.
4913
4914 2017-06-19 Pedro Alves <palves@redhat.com>
4915
4916 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4917 after gdb::unlinker.
4918
4919 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4920
4921 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4922 gdb_environ to access an environment variable.
4923
4924 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4925
4926 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4927 gdb_byte*.
4928
4929 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4930
4931 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4932
4933 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4934
4935 * configure: Re-generate.
4936 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4937
4938 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4939
4940 * configure: Re-generate.
4941 * warning.m4: Pass -Werror to compiler when checking for
4942 supported warning flags.
4943
4944 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4945
4946 * Makefile.in (COMPILE.pre): Add "-x c++".
4947
4948 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4949 Pedro Alves <palves@redhat.com>
4950 Yao Qi <yao.qi@linaro.org>
4951
4952 * defs.h (RequireLongest): New.
4953 (extract_integer): Declare function template.
4954 (extract_signed_integer): Remove the declaration, but define it
4955 static inline.
4956 (extract_unsigned_integer): Likewise.
4957 (store_integer): Declare function template.
4958 (store_signed_integer): Remove the declaration, but define it
4959 static inline.
4960 (store_unsigned_integer): Likewise.
4961 * findvar.c (extract_integer): New function template.
4962 (extract_signed_integer): Remove.
4963 (extract_unsigned_integer): Remove.
4964 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4965 instantiations.
4966 (store_integer): New function template.
4967 (store_signed_integer): Remove.
4968 (store_unsigned_integer): Remove.
4969 (store_integer): Explicit instantiations.
4970 * regcache.c (regcache_raw_read_signed): Update.
4971 (regcache::raw_read): New function.
4972 (regcache::raw_read_signed): Remove.
4973 (regcache::raw_read_unsigned): Remove.
4974 (regcache_raw_read_unsigned): Update.
4975 (regcache_raw_write_unsigned): Update.
4976 (regcache::raw_write_signed): Remove.
4977 (regcache::raw_write): New function.
4978 (regcache_cooked_read_signed): Update.
4979 (regcache::raw_write_unsigned): Remove.
4980 (regcache::cooked_read_signed): Remove.
4981 (regcache_cooked_read_unsigned): Update.
4982 (regcache::cooked_read_unsigned): Remove.
4983 (regcache_cooked_write_signed): Update.
4984 (regcache_cooked_write_unsigned): Update.
4985 * regcache.h (regcache) <raw_read_signed>: Remove.
4986 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4987 <raw_read, raw_write>: New.
4988 <cooked_read_signed, cooked_write_signed>: Remove.
4989 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4990 <cooked_read, cooked_write>: New.
4991 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4992 (sh64_pseudo_register_write): Update.
4993
4994 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4995
4996 * arc-tdep.c (arc_disassembler_options): New variable.
4997 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4998 of default_print_insn.
4999 (arc_delayed_print_insn): Set info->section when needed,
5000 use default_print_insn to retrieve a disassembler.
5001
5002 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5003
5004 PR gdb/21574
5005 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5006 to mention $SHELL and startup-with-shell.
5007
5008 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5009
5010 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5011
5012 2017-06-14 Yao Qi <yao.qi@linaro.org>
5013
5014 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5015 default_print_insn instead of print_insn_aarch64.
5016 * arm-tdep.c (gdb_print_insn_arm): Call
5017 default_print_insn instead of print_insn_big_arm
5018 and print_insn_little_arm.
5019 * i386-tdep.c (i386_print_insn): Call default_print_insn
5020 instead of print_insn_i386.
5021 * ia64-tdep.c (ia64_print_insn): Call
5022 default_print_insn instead of print_insn_ia64.
5023 * mips-tdep.c (gdb_print_insn_mips): Call
5024 default_print_insn instead of print_insn_big_mips
5025 and print_insn_little_mips.
5026 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5027 instead of print_insn_spu.
5028
5029 2017-06-14 Pedro Alves <palves@redhat.com>
5030
5031 * ada-lang.c: Include "common/byte-vector.h".
5032 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5033 * charset.c (wchar_iterator::iterate): Resize the vector instead
5034 of reserving it.
5035 * common/byte-vector.h: Include "common/def-vector.h".
5036 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5037 * cli/cli-dump.c: Include "common/byte-vector.h".
5038 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5039 * common/byte-vector.h: New file.
5040 * common/def-vector.h: New file.
5041 * common/default-init-alloc.h: New file.
5042 * dwarf2loc.c: Include "common/byte-vector.h".
5043 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5044 instead of reserving it.
5045 * dwarf2read.c: Include "common/byte-vector.h".
5046 (data_buf::m_vec): Now a gdb::byte_vector.
5047 * gdb_regex.c: Include "common/def-vector.h".
5048 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5049 * mi/mi-main.c: Include "common/byte-vector.h".
5050 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5051 * printcmd.c: Include "common/byte-vector.h".
5052 (print_scalar_formatted): Use gdb::byte_vector.
5053 * valprint.c: Include "common/byte-vector.h".
5054 (maybe_negate_by_bytes, print_decimal_chars): Use
5055 gdb::byte_vector.
5056
5057 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5058
5059 * darwin-nat.c: Include "nat/fork-inferior.h".
5060
5061 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5062
5063 * configure.nat: Factor out Darwin bits that are not
5064 architecture-specific. Add fork-inferior.o.
5065
5066 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5067
5068 * configure.nat: Factor out AIX bits that are not
5069 architecture-specific. Add fork-inferior.o.
5070
5071 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5072
5073 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5074 (read_pieced_value, write_pieced_value): ...here. Reduce to
5075 wrappers that just call rw_pieced_value.
5076
5077 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5078
5079 * dwarf2loc.c (write_pieced_value): When writing the data for a
5080 memory piece, use write_memory_with_notification instead of
5081 write_memory.
5082
5083 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5084
5085 * valops.c (read_value_memory): Change embedded_offset to
5086 represent a bit offset instead of a byte offset.
5087 * value.h (read_value_memory): Adjust comment.
5088
5089 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5090
5091 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5092 dest_offset_bits and source_offset_bits.
5093 (write_pieced_value): Likewise.
5094
5095 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5096
5097 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5098 given by DW_OP_bit_piece.
5099 (write_pieced_value): Likewise.
5100
5101 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5102
5103 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5104 some other preparations to the places where sufficient information
5105 is available.
5106 (write_pieced_value): Likewise.
5107
5108 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5109
5110 * dwarf2loc.c (bits_to_bytes): New function.
5111 (read_pieced_value): Fix offset calculations for register pieces
5112 on big-endian targets.
5113 (write_pieced_value): Likewise.
5114
5115 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5116
5117 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5118 (write_pieced_value): Likewise.
5119
5120 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5121
5122 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5123 transfer the source value's least significant bits, instead of its
5124 lowest-addressed ones. Rename type_len to max_offset.
5125 (read_pieced_value): Mirror above changes to write_pieced_value as
5126 applicable.
5127
5128 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5129
5130 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5131 truncate full bytes from dest_offset_bits before using it as an
5132 offset into the buffer.
5133
5134 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5135
5136 * dwarf2loc.c (write_pieced_value): Include transfer size in
5137 byte-wise check.
5138
5139 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5140
5141 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5142 calculation of this_size.
5143
5144 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5145
5146 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5147 when targeting a bit-field.
5148 (write_pieced_value): Likewise.
5149
5150 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5151
5152 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5153 (allocate_piece_closure): Drop addr_size parameter.
5154 (dwarf2_evaluate_loc_desc_full): Adjust call to
5155 allocate_piece_closure.
5156
5157 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5158
5159 PR gdb/21226
5160 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5161 the LSB end, independent of endianness.
5162
5163 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5164
5165 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5166 size capping.
5167
5168 2017-06-13 Yao Qi <yao.qi@linaro.org>
5169
5170 * mips-linux-nat.c: Move include features/mips*-linux.c to
5171 mips-linux-tdep.c.
5172 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5173 to mips-linux-tdep.c.
5174 * mips-linux-tdep.c: Include features/mips*-linux.c
5175 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5176 functions.
5177 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5178 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5179 (tdesc_mips64_dsp_linux): Declare.
5180
5181 2017-06-12 Tom Tromey <tom@tromey.com>
5182
5183 * valprint.h (val_print_type_code_int): Remove.
5184 * valprint.c (generic_val_print_int): Always call
5185 val_print_scalar_formatted.
5186 (val_print_type_code_int): Remove.
5187 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5188 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5189 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5190 * ada-valprint.c (ada_val_print_num): Use
5191 val_print_scalar_formatted.
5192
5193 2017-06-12 Tom Tromey <tom@tromey.com>
5194
5195 * printcmd.c (print_scalar_formatted): Unify the two switches.
5196 Don't convert scalars to LONGEST.
5197
5198 2017-06-12 Tom Tromey <tom@tromey.com>
5199
5200 PR exp/16225:
5201 * valprint.h (print_decimal_chars): Update.
5202 * valprint.c (maybe_negate_by_bytes): New function.
5203 (print_decimal_chars): Add "is_signed" argument.
5204 * printcmd.c (print_scalar_formatted): Update.
5205
5206 2017-06-12 Tom Tromey <tom@tromey.com>
5207
5208 PR exp/16225:
5209 * valprint.h (print_binary_chars, print_hex_chars): Update.
5210 * valprint.c (val_print_type_code_int): Update.
5211 (print_binary_chars): Add "zero_pad" argument.
5212 (emit_octal_digit): New function.
5213 (print_octal_chars): Don't zero-pad.
5214 (print_decimal_chars): Likewise.
5215 (print_hex_chars): Add "zero_pad" argument.
5216 * sh64-tdep.c (sh64_do_fp_register): Update.
5217 * regcache.c (regcache::dump): Update.
5218 * printcmd.c (print_scalar_formatted): Update.
5219 * infcmd.c (default_print_one_register_info): Update.
5220
5221 2017-06-12 Pedro Alves <palves@redhat.com>
5222 Alan Hayward <alan.hayward@arm.com>
5223
5224 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5225 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5226 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5227 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5228 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5229
5230 2017-06-12 Pedro Alves <palves@redhat.com>
5231
5232 * dwarf2read.c (mapped_symtab::data): Now a vector of
5233 symtab_index_entry instead of vector of
5234 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5235 whether an element's name is NULL instead of checking whether the
5236 element itself is NULL.
5237 (find_slot): Change return type. Adjust.
5238 (hash_expand, , add_index_entry, uniquify_cu_indices)
5239 (write_hash_table): Adjust.
5240
5241 2017-06-12 Pedro Alves <palves@redhat.com>
5242
5243 * dwarf2read.c (recursively_count_psymbols): New function.
5244 (write_psymtabs_to_index): Call it to compute number of psyms and
5245 pass estimate size of psyms_seen to unordered_set's ctor.
5246
5247 2017-06-12 Pedro Alves <palves@redhat.com>
5248
5249 * dwarf2read.c (write_hash_table): Check if key already exists
5250 before emplacing.
5251
5252 2017-06-12 Pedro Alves <palves@redhat.com>
5253
5254 * dwarf2read.c (data_buf::append_space): Rename to...
5255 (data_buf::grow): ... this, and make private. Adjust all callers.
5256 (data_buf::append_uint): New method.
5257 (add_address_entry, write_one_signatured_type)
5258 (write_psymtabs_to_index): Use it.
5259
5260 2017-06-12 Pedro Alves <palves@redhat.com>
5261
5262 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5263 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5264 (data_buf::file_write): Call ::fwrite directly.
5265
5266 2017-06-12 Pedro Alves <palves@redhat.com>
5267
5268 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5269 std::vector::erase.
5270
5271 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5272
5273 Code cleanup: C++ify .gdb_index producer.
5274 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5275 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5276 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5277 (create_strtab, add_string): Remove.
5278 (file_write, data_buf): New.
5279 (struct symtab_index_entry): Use std::vector for cu_indices.
5280 (struct mapped_symtab): Use std::vector for data.
5281 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5282 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5283 Remove.
5284 (find_slot): Change return type. Update it to the new data structures.
5285 (hash_expand, add_index_entry): Update it to the new data structures.
5286 (offset_type_compare): Remove.
5287 (uniquify_cu_indices): Update it to the new data structures.
5288 (c_str_view, c_str_view_hasher, vector_hasher): New.
5289 (add_indices_to_cpool): Remove.
5290 (write_hash_table): Update it to the new data structures.
5291 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5292 (eq_psymtab_cu_index): Remove.
5293 (psym_index_map): New typedef.
5294 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5295 reference and std::unordered_map for cu_index_htab.
5296 (add_address_entry, add_address_entry_worker, write_address_map)
5297 (write_psymbols): Update it to the new data structures.
5298 (write_obstack): Remove.
5299 (struct signatured_type_index_data): Change types_list to a data_buf
5300 reference and psyms_seen to a std::unordered_set reference.
5301 (write_one_signatured_type, recursively_write_psymbols)
5302 (write_psymtabs_to_index): Update it to the new data structures.
5303
5304 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5305
5306 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5307 separate-debug-file commands.
5308 * symfile.h (separate_debug_file_debug): New global.
5309 * symfile.c (separate_debug_file_debug): New global.
5310 (separate_debug_file_exists, find_separate_debug_file): Add
5311 debug output.
5312 (_initialize_symfile): Add "set debug separate-debug-file"
5313 command.
5314 * build-id.c (build_id_to_debug_bfd,
5315 find_separate_debug_file_by_buildid): Add debug output.
5316
5317 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5318
5319 * gdbarch.sh (displaced_step_free_closure): Remove.
5320 * gdbarch.h, gdbarch.c: Re-generate.
5321 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5322 displaced_step_free_closure.
5323 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5324 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5325 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5326 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5327 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5328 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5329 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5330 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5331 * infrun.c (displaced_step_clear): Call xfree instead of
5332 gdbarch_displaced_step_free_closure.
5333
5334 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5335
5336 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5337 NULL".
5338
5339 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5340
5341 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5342 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5343 (mn10300_push_dummy_call): Likewise.
5344
5345 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5346
5347 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5348
5349 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5350
5351 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5352
5353 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5354
5355 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5356 able to start inferiors using a shell.
5357 (New remote packets): Announce new packet "QStartupWithShell".
5358 * remote.c: Add PACKET_QStartupWithShell.
5359 (extended_remote_create_inferior): Handle new
5360 PACKET_QStartupWithShell.
5361 (remote_protocol_features) <QStartupWithShell>: New entry for
5362 PACKET_QStartupWithShell.
5363 (_initialize_remote): Call "add_packet_config_cmd" for
5364 QStartupShell.
5365
5366 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5367 Pedro Alves <palves@redhat.com>
5368
5369 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5370 and "nat/fork-inferior.h".
5371 * common/common-inferior.h: New file, with contents from
5372 "gdb/inferior.h".
5373 * commom/common-utils.c: Include "common-utils.h".
5374 (stringify_argv): New function.
5375 * common/common-utils.h (stringify_argv): New prototype.
5376 * configure.nat: Add "fork-inferior.o" as a dependency for
5377 "*linux*", "fbsd*" and "nbsd*" hosts.
5378 * corefile.c (get_exec_file): Update comment.
5379 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5380 instead of "startup_inferior".
5381 (darwin_create_inferior): Call "add_thread_silent" after
5382 "fork_inferior".
5383 * fork-child.c: Cleanup unnecessary includes.
5384 (SHELL_FILE): Move to "common/common-fork-child.c".
5385 (environ): Likewise.
5386 (exec_wrapper): Initialize.
5387 (get_exec_wrapper): New function.
5388 (breakup_args): Move to "common/common-fork-child.c"; rename to
5389 "breakup_args_for_exec".
5390 (escape_bang_in_quoted_argument): Move to
5391 "common/common-fork-child.c".
5392 (saved_ui): New variable.
5393 (prefork_hook): New function.
5394 (postfork_hook): Likewise.
5395 (postfork_child_hook): Likewise.
5396 (gdb_startup_inferior): Likewise.
5397 (fork_inferior): Move to "common/common-fork-child.c". Update
5398 function to support gdbserver.
5399 (startup_inferior): Likewise.
5400 * gdbcore.h (get_exec_file): Remove declaration.
5401 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5402 instead of "startup_inferior". Call "add_thread_silent" after
5403 "fork_inferior".
5404 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5405 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5406 instead of "startup_inferior". Call "add_thread_silent" after
5407 "fork_inferior".
5408 * inferior.h: Include "common-inferior.h".
5409 (trace_start_error): Move to "common/common-utils.h".
5410 (trace_start_error_with_name): Likewise.
5411 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5412 (startup_inferior): Likewise.
5413 (gdb_startup_inferior): New prototype.
5414 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5415 * nat/fork-inferior.h: New file.
5416 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5417 instead of "startup_inferior". Call "add_thread_silent" after
5418 "fork_inferior".
5419 * target.h (target_terminal_init): Move prototype to
5420 "target/target.h".
5421 (target_terminal_inferior): Likewise.
5422 (target_terminal_ours): Likewise.
5423 * target/target.h (target_terminal_init): New prototype, moved
5424 from "target.h".
5425 (target_terminal_inferior): Likewise.
5426 (target_terminal_ours): Likewise.
5427 * utils.c (gdb_flush_out_err): New function.
5428
5429 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5430
5431 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5432 * common/common-gdbthread.h: New file, with parts from
5433 "gdb/gdbthread.h".
5434 * gdbthread.h: Include "common-gdbthread.h".
5435 (switch_to_thread): Moved to "common/common-gdbthread.h".
5436
5437 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5438
5439 * Makefile.in (SFILES): Add "common/job-control.c".
5440 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5441 (COMMON_OBS): Add "job-control.o".
5442 * common/job-control.c: New file, with contents from
5443 "gdb/inflow.c".
5444 * common/job-control.h: New file, with contents from "terminal.h".
5445 * fork-child.c: Include "job-control.h".
5446 * inflow.c: Include "job-control.h".
5447 (gdb_setpgid): Move to "common/common-inflow.c".
5448 (_initialize_inflow): Move setting of "job_control" to
5449 "handle_job_control".
5450 * terminal.h (job_control): Moved to "common/common-terminal.h".
5451 (gdb_setpgid): Likewise.
5452 * top.c: Include "job_control.h".
5453 * utils.c: Likewise.
5454 (job_control): Moved to "job-control.c".
5455
5456 2017-06-07 Pedro Alves <palves@redhat.com>
5457
5458 * Makefile.in (SFILES): Add gdb_regex.c.
5459 (COMMON_OBS): Add gdb_regex.o.
5460 * ada-lang.c (ada_add_standard_exceptions)
5461 (ada_add_exceptions_from_frame, name_matches_regex)
5462 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5463 parameter type to compiled_regex. Adjust.
5464 (ada_exceptions_list): Use compiled_regex.
5465 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5466 std::unique_ptr<compiled_regex>.
5467 (exception_catchpoint::~exception_catchpoint): Remove regfree
5468 call.
5469 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5470 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5471 * breakpoint.c (solib_catchpoint::compiled): Now a
5472 std::unique_ptr<compiled_regex>.
5473 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5474 (check_status_catch_solib): Adjust to use compiled_regex.
5475 (add_solib_catchpoint): Adjust to use compiled_regex.
5476 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5477 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5478 compiled_regex reference. Adjust to use it.
5479 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5480 declaration. Include "gdb_regex.h".
5481 (apropos_cmd): Change regex parameter to compiled_regex reference.
5482 * gdb_regex.c: New file.
5483 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5484 declarations.
5485 (class compiled_regex): New.
5486 * linux-tdep.c: Include "common/gdb_optional.h".
5487 (struct mapping_regexes): New, factored out from
5488 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5489 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5490 gdb::optional and remove cleanups. Adjust to compiled_regex.
5491 * probe.c: Include "common/gdb_optional.h".
5492 (collect_probes): Use compiled_regex and gdb::optional and remove
5493 cleanups.
5494 * skip.c: Include "common/gdb_optional.h".
5495 (skiplist_entry::compiled_function_regexp): Now a
5496 gdb::optional<compiled_regex>.
5497 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5498 (free_skiplist_entry): Remove regfree call.
5499 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5500 compiled_regex and gdb::optional.
5501 * symtab.c: Include "common/gdb_optional.h".
5502 (search_symbols): Use compiled_regex and gdb::optional.
5503 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5504 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5505 to gdb_regex.c.
5506
5507 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5508
5509 * regcache.c (regcache::save): Avoid buffer use.
5510 (regcache::dump): Likewise.
5511
5512 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5513
5514 * sh-tdep.c (sh_pseudo_register_read): Remove
5515 MAX_REGISTER_SIZE.
5516 (sh_pseudo_register_write): Likewise.
5517 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5518 (sh64_pseudo_register_write): Likewise
5519
5520 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5521
5522 * aarch64-tdep.c (aarch64_store_return_value): Use
5523 V_REGISTER_SIZE.
5524 (aarch64_pseudo_read_value): Likewise.
5525 (aarch64_pseudo_write): Likewise.
5526
5527 2017-06-06 Yao Qi <yao.qi@linaro.org>
5528
5529 * regformats/regdef.h (set_register_cache): Remove the
5530 declaration.
5531
5532 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5533
5534 * frame.c (frame_unwind_register_signed): Use
5535 frame_unwind_register_value.
5536
5537 2017-06-06 Pedro Alves <palves@redhat.com>
5538
5539 PR breakpoints/21553
5540 * breakpoint.c (create_breakpoints_sal_default)
5541 (init_breakpoint_sal, create_breakpoint_sal): Use
5542 gdb::unique_xmalloc_ptr for string parameters.
5543 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5544 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5545 (base_breakpoint_create_breakpoints_sal)
5546 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5547 (strace_marker_create_breakpoints_sal)
5548 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5549 string parameters.
5550 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5551 gdb::unique_xmalloc_ptr for string parameters.
5552 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5553 parameters.
5554
5555 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5556
5557 * alpha-tdep.c (alpha_register_to_value): Use
5558 get_frame_register_value.
5559 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5560
5561 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5562
5563 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5564 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5565 (ia64_value_to_register): Likewise.
5566 (ia64_extract_return_value): Likewise.
5567 (ia64_store_return_value): Likewise.
5568 (ia64_push_dummy_call): Likewise.
5569
5570 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5571
5572 GDB 8.0 released.
5573
5574 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5575
5576 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5577
5578 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5579
5580 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5581 parameter.
5582 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5583
5584 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5585
5586 * event-loop.c (poll_timers): Unallocate timer using delete
5587 instead of xfree.
5588
5589 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5590
5591 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5592 (struct breakpoint) <~breakpoint>: New.
5593 (struct watchpoint): Inherit from breakpoint.
5594 <~watchpoint>: New.
5595 <base>: Remove.
5596 (struct tracepoint): Inherit from breakpoint.
5597 <base>: Remove.
5598 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5599 (struct longjmp_breakpoint): Inherit from breakpoint.
5600 <~longjmp_breakpoint>: New.
5601 <base>: Remove.
5602 (new_breakpoint_from_type): Remove casts.
5603 (watchpoint_in_thread_scope): Remove reference to base field.
5604 (watchpoint_del_at_next_stop): Likewise.
5605 (update_watchpoint): Likewise.
5606 (watchpoint_check): Likewise.
5607 (bpstat_check_watchpoint): Likewise.
5608 (set_longjmp_breakpoint): Likewise.
5609 (struct fork_catchpoint): Inherit from breakpoint.
5610 <base>: Remove.
5611 (struct solib_catchpoint): Inherit from breakpoint.
5612 <~solib_catchpoint>: New.
5613 <base>: Remove.
5614 (dtor_catch_solib): Change to ...
5615 (solib_catchpoint::~solib_catchpoint): ... this.
5616 (breakpoint_hit_catch_solib): Remove reference to base field.
5617 (add_solib_catchpoint): Likewise.
5618 (create_fork_vfork_event_catchpoint): Likewise.
5619 (struct exec_catchpoint): Inherit from breakpoint.
5620 <~exec_catchpoint>: New.
5621 <base>: Remove.
5622 (dtor_catch_exec): Change to ...
5623 (exec_catchpoint::~exec_catchpoint): ... this.
5624 (dtor_watchpoint): Change to ...
5625 (watchpoint::~watchpoint): ... this.
5626 (watch_command_1): Remove reference to base field.
5627 (catch_exec_command_1): Likewise.
5628 (base_breakpoint_dtor): Change to ...
5629 (breakpoint::~breakpoint): ... this.
5630 (base_breakpoint_ops): Remove dtor field value.
5631 (longjmp_bkpt_dtor): Change to ...
5632 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5633 (strace_marker_create_breakpoints_sal): Remove reference to base
5634 field.
5635 (delete_breakpoint): Don't manually call breakpoint destructor.
5636 (create_tracepoint_from_upload): Remove reference to base field.
5637 (trace_pass_set_count): Likewise.
5638 (initialize_breakpoint_ops): Don't initialize
5639 momentary_breakpoint_ops, don't set dtors.
5640 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5641 <~ada_catchpoint>: New.
5642 <base>: Remove.
5643 (create_excep_cond_exprs): Remove reference to base field.
5644 (dtor_exception): Change to ...
5645 (ada_catchpoint::~ada_catchpoint): ... this.
5646 (dtor_catch_exception): Remove.
5647 (dtor_catch_exception_unhandled): Remove.
5648 (dtor_catch_assert): Remove.
5649 (create_ada_exception_catchpoint): Remove reference to base
5650 field.
5651 (initialize_ada_catchpoint_ops): Don't set dtors.
5652 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5653 breakpoint.
5654 <~signal_catchpoint>: New.
5655 <base>: Remove.
5656 (signal_catchpoint_dtor): Change to ...
5657 (signal_catchpoint::~signal_catchpoint): ... this.
5658 (create_signal_catchpoint): Remove reference to base field.
5659 (initialize_signal_catchpoint_ops): Don't set dtor.
5660 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5661 from breakpoint.
5662 <~syscall_catchpoint>: New.
5663 <base>: Remove.
5664 (dtor_catch_syscall): Change to ...
5665 (syscall_catchpoint::~syscall_catchpoint): ... this.
5666 (create_syscall_event_catchpoint): Remove reference to base
5667 field.
5668 (initialize_syscall_catchpoint_ops): Don't set dtor.
5669 * break-catch-throw.c (struct exception_catchpoint): Inherit
5670 from breakpoint.
5671 <~exception_catchpoint>: New.
5672 <base>: Remove.
5673 (dtor_exception_catchpoint): Change to ...
5674 (exception_catchpoint::~exception_catchpoint): ... this.
5675 (handle_gnu_v3_exceptions): Remove reference to base field.
5676 (initialize_throw_catchpoint_ops): Don't set dtor.
5677 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5678 field.
5679 * remote.c (remote_get_tracepoint_status): Likewise.
5680 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5681 * tracefile.c (tracefile_fetch_registers): Likewise.
5682 * tracepoint.c (actions_command): Likewise.
5683 (validate_actionline): Likewise.
5684 (tfind_1): Likewise.
5685 (get_traceframe_location): Likewise.
5686 (find_matching_tracepoint_location): Likewise.
5687 (parse_tracepoint_status): Likewise.
5688 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5689
5690 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5691
5692 * breakpoint.c (struct longjmp_breakpoint): New struct.
5693 (is_tracepoint_type): Change return type to bool.
5694 (is_longjmp_type): New function.
5695 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5696 (set_raw_breakpoint_without_location): Use
5697 new_breakpoint_from_type.
5698 (set_raw_breakpoint): Likewise.
5699
5700 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5701
5702 * breakpoint.c (new_breakpoint_from_type): New function.
5703 (create_breakpoint_sal): Use new_breakpoint_from_type and
5704 unique_ptr.
5705 (create_breakpoint): Likewise.
5706
5707 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5708
5709 * memattr.c (mem_info_command): Rename to ...
5710 (info_mem_command): ... this.
5711 (mem_enable_command): Rename to ...
5712 (enable_mem_command): ... this.
5713 (mem_disable_command): Rename to ...
5714 (disable_mem_command): ... this.
5715 (mem_delete_command): Rename to ...
5716 (delete_mem_command): ... this.
5717 (_initialize_mem): Adjust function names.
5718
5719 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5720
5721 * btrace.c (handle_pt_insn_events): New.
5722 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5723 STATUS. Split into this and ...
5724 (handle_pt_insn_event_flags): ... this.
5725
5726 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5727
5728 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5729 and struct pt_insn.resynced.
5730 * configure: Regenerated.
5731 * config.in: Regenerated.
5732
5733 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5734
5735 * btrace.c (ftrace_find_call_by_number): New function.
5736 (ftrace_new_function): Store objects, not pointers.
5737 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5738 ftrace_new_gap, ftrace_update_function,
5739 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5740 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5741 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5742 btrace_ends_with_single_insn, btrace_call_get): Account for
5743 btrace_thread_info::functions now storing objects.
5744 * btrace.h (struct btrace_thread_info): Add constructor.
5745 (struct btrace_thread_info) <functions>: Make std::vector.
5746 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5747 Initialize with default values.
5748 * record-btrace.c (record_btrace_frame_sniffer): Account for
5749 btrace_thread_info::functions now storing objects.
5750
5751 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5752
5753 * btrace.c: Remove typedef bfun_s.
5754 (ftrace_new_gap): Directly add gaps to the list of gaps.
5755 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5756 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5757 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5758 instead of gdb VEC.
5759
5760 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5761
5762 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5763 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5764 with btrace_thread_info::next_segment and
5765 btrace_thread_info::prev_segment.
5766 * btrace.h: Remove struct btrace_func_link.
5767 (struct btrace_function): Replace pair of function segment pointers
5768 with pair of indices.
5769 * python/py-record-btrace.c (btpy_call_prev_sibling,
5770 btpy_call_next_sibling): Replace references to
5771 btrace_thread_info::segment with btrace_thread_info::next_segment and
5772 btrace_thread_info::prev_segment.
5773 * record-btrace.c (record_btrace_frame_this_id): Use
5774 btrace_find_call_by_number.
5775
5776 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5777
5778 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5779 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5780 btrace_insn_next, btrace_insn_prev): Remove references to
5781 btrace_thread_info::flow.
5782 * btrace.h (struct btrace_function): Remove FLOW.
5783
5784 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5785
5786 * btrace.c (ftrace_find_call_by_number): New function.
5787 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5788 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5789 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5790 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5791 index.
5792 * btrace.h (struct btrace_function): Turn UP into an index.
5793 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5794 as an index.
5795 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5796 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5797 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5798
5799 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5800
5801 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5802 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5803 ftrace_update_function, ftrace_compute_global_level_offset,
5804 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5805 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5806 btrace_insn_end, btrace_is_empty): Remove references to
5807 btrace_thread_info::begin and btrace_thread_info::end.
5808 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5809 (struct btrace_thread_info) <functions>: Adjust comment.
5810 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5811 btrace_thread_info::begin.
5812
5813 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5814
5815 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5816 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5817 ftrace_update_function): Remove arguments that implicitly were always
5818 BTINFO->END.
5819 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5820 Don't pass BTINFO->END.
5821
5822 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5823
5824 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5825 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5826 btrace_find_insn_by_number): Replace function segment pointer with
5827 index.
5828 (btrace_insn_cmp): Simplify.
5829 * btrace.h: (struct btrace_insn_iterator) Rename index to
5830 insn_index. Replace function segment pointer with index into function
5831 segment vector.
5832 * record-btrace.c (record_btrace_call_history): Replace function
5833 segment pointer use with index.
5834 (record_btrace_frame_sniffer): Retrieve function call segment through
5835 vector.
5836 (record_btrace_set_replay): Remove defunc't safety check.
5837
5838 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5839
5840 * btrace.c (btrace_ends_with_single_insn): New function.
5841 (btrace_call_get, btrace_call_number, btrace_call_begin,
5842 btrace_call_end, btrace_call_next, btrace_call_prev,
5843 btrace_find_call_by_number): Use index into call segment vector
5844 instead of pointer.
5845 (btrace_call_cmp): Simplify.
5846 * btrace.h (struct btrace_call_iterator): Replace function call segment
5847 pointer with index into vector.
5848 * record-btrace.c (record_btrace_call_history): Use index instead of
5849 pointer.
5850
5851 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5852
5853 * btrace.c (btrace_insn_begin, btrace_insn_end,
5854 btrace_find_insn_by_number): Add btinfo to iterator.
5855 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5856
5857 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5858
5859 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5860 and save pointers directly.
5861 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5862 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5863 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5864 changed signature of functions.
5865 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5866 (btrace_fetch): Remove code that adds btrace_function pointers to
5867 vector of btrace_functions.
5868 (btrace_clear): Simplify freeing vector of btrace_functions.
5869
5870 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5871
5872 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5873 Replace VEC_* with std::vector functions.
5874 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5875 (struct btrace_thread_info)<functions>: Change type to std::vector.
5876
5877 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5878
5879 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5880 "Removed targets and native configurations" up. Merge duplicate
5881 "New commands" sub-sections. Add "New options" sub-sections.
5882
5883 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5884
5885 * defs.h (copy_integer_to_size): New declaration.
5886 * findvar.c (copy_integer_to_size): New function.
5887 (do_cint_test): New selftest function.
5888 (copy_integer_to_size_test): Likewise.
5889 (_initialize_findvar): Likewise.
5890 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5891 (mips_fbsd_collect_reg): Use raw_collect_integer.
5892 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5893 (mips64_fill_gregset): Use raw_collect_integer
5894 (mips64_fill_fpregset): Use raw_supply_integer.
5895 * regcache.c (regcache::raw_supply_integer): New function.
5896 (regcache::raw_collect_integer): Likewise.
5897 * regcache.h: (regcache::raw_supply_integer): New declaration.
5898 (regcache::raw_collect_integer): Likewise.
5899
5900 2017-05-24 Yao Qi <yao.qi@linaro.org>
5901
5902 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5903 (COMMON_OBS): Add gdbarch-selftests.o.
5904 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5905 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5906 * gdbarch-selftests.c: New file.
5907 * regcache.h (regcache) <~regcache>: Mark it virtual if
5908 GDB_SELF_TEST.
5909 <raw_write>: Likewise.
5910
5911 2017-05-24 Yao Qi <yao.qi@linaro.org>
5912
5913 * regcache.c (current_regcache): Change it to
5914 regcache::current_regcache.
5915 (regcache_observer_target_changed): Update.
5916 (regcache_thread_ptid_changed): Make it a regcache static
5917 method.
5918 (regcache_thread_ptid_changed): Update.
5919 (class regcache_access): New.
5920 (current_regcache_test): Update.
5921 (_initialize_regcache): Update.
5922 * regcache.h: Include forward_list.
5923 (regcache): Declare regcache_thread_ptid_changed and declare
5924 registers_changed_ptid as friend.
5925
5926 2017-05-24 Yao Qi <yao.qi@linaro.org>
5927
5928 * i387-tdep.c (i387_register_to_value): Use register_size
5929 instead of TYPE_LENGTH.
5930 * m68k-tdep.c (m68k_register_to_value): Likewise.
5931
5932 2017-05-24 Yao Qi <yao.qi@linaro.org>
5933
5934 * i387-tdep.c (i387_convert_register_p): Return false if type
5935 code isn't TYPE_CODE_FLT.
5936
5937 2017-05-24 Yao Qi <yao.qi@linaro.org>
5938
5939 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5940 length is 4.
5941 (alpha_register_to_value): Remove type length check.
5942 (alpha_value_to_register): Likewise.
5943
5944 2017-05-24 Yao Qi <yao.qi@linaro.org>
5945
5946 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5947 TYPE_CODE_FLT.
5948
5949 2017-05-24 Yao Qi <yao.qi@linaro.org>
5950
5951 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5952 TYPE_CODE_FLT or not.
5953
5954 2017-05-24 Yao Qi <yao.qi@linaro.org>
5955
5956 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5957 * avr-tdep.c (avr_gdbarch_init): Likewise.
5958 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5959 * cris-tdep.c (cris_gdbarch_init): Likewise.
5960 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5961 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5962 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5963 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5964 * mep-tdep.c (mep_gdbarch_init): Likewise.
5965 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5966 * mips-tdep.c (mips_gdbarch_init): Likewise.
5967 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5968 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5969 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5970 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5971 * v850-tdep.c (v850_gdbarch_init): Likewise.
5972
5973 2017-05-24 Yao Qi <yao.qi@linaro.org>
5974
5975 * selftest-arch.c (tests_with_arch): Call registers_changed
5976 and reinit_frame_cache.
5977 * selftest.c (run_self_tests): Likewise.
5978
5979 2017-05-24 Yao Qi <yao.qi@linaro.org>
5980
5981 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5982 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5983
5984 2017-05-24 Yao Qi <yao.qi@linaro.org>
5985
5986 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5987 set_gdbarch_print_insn.
5988
5989 2017-05-24 Yao Qi <yao.qi@linaro.org>
5990
5991 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5992 set_gdbarch_print_insn.
5993
5994 2017-05-24 Yao Qi <yao.qi@linaro.org>
5995
5996 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5997 set_gdbarch_print_insn.
5998 * arc-tdep.c (arc_gdbarch_init): Likewise.
5999 * arch-utils.c: include dis-asm.h.
6000 (default_print_insn): New function.
6001 * arch-utils.h (default_print_insn): Declare.
6002 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6003 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6004 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6005 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6006 * frv-tdep.c (frv_gdbarch_init): Likewise.
6007 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6008 * gdbarch.sh (print_insn): Use default_print_insn.
6009 * gdbarch.c: Regenerated.
6010 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6011 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6012 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6013 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6014 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6015 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6016 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6017 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6018 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6019 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6020 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6021 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6022 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6023 * mt-tdep.c (mt_gdbarch_init): Likewise.
6024 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6025 * nios2-tdep.c (nios2_print_insn): Remove.
6026 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6027 * rx-tdep.c (rx_gdbarch_init): Likewise.
6028 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6029 * score-tdep.c (score_print_insn): Remove.
6030 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6031 * sh-tdep.c (sh_gdbarch_init): Likewise.
6032 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6033 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6034 * tic6x-tdep.c (tic6x_print_insn): Remove.
6035 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6036 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6037 * v850-tdep.c (v850_gdbarch_init): Likewise.
6038 * vax-tdep.c (vax_gdbarch_init): Likewise.
6039 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6040 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6041
6042 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6043
6044 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6045 (MIPS_FP0_REGNUM): Remove.
6046 (MIPS_FSR_REGNUM): Remove.
6047 (mips_fbsd_supply_fpregs): Use mips_regnum.
6048 (mips_fbsd_supply_gregs): Likewise.
6049 (mips_fbsd_collect_fpregs): Likewise.
6050 (mips_fbsd_collect_gregs): Likewise.
6051
6052 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6053
6054 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6055 (getpfpregs_supplies): New function.
6056 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6057 getfpregs_supplies.
6058 (mips_fbsd_store_inferior_registers): Likewise.
6059
6060 2017-05-22 Pedro Alves <palves@redhat.com>
6061
6062 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6063 maintainer.
6064
6065 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6066
6067 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6068 (store_register): Likewise.
6069 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6070 (get_decimal_float_return_value): Likewise.
6071 (do_ppc_sysv_return_value): Likewise.
6072 (ppc64_sysv_abi_push_integer): Likewise.
6073 (ppc64_sysv_abi_push_freg): Likewise.
6074 (ppc64_sysv_abi_return_value_base): Likewise.
6075 (ppc64_sysv_abi_return_value): Likewise.
6076 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6077 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6078 * rs6000-nat.c: Likewise.
6079 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6080 (rs6000_value_to_register): Likewise.
6081 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6082
6083 2017-05-21 Tom Tromey <tom@tromey.com>
6084
6085 PR rust/21466:
6086 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6087 arrays as "[T]", not "[T; ]".
6088
6089 2017-05-19 Tom Tromey <tom@tromey.com>
6090
6091 PR rust/21484:
6092 * rust-lang.c (exp_descriptor_rust): New function.
6093 (rust_language_defn): Use it.
6094 * p-lang.c (pascal_language_defn): Update.
6095 * opencl-lang.c (opencl_language_defn): Update.
6096 * objc-lang.c (objc_language_defn): Update.
6097 * m2-lang.c (m2_language_defn): Update.
6098 * language.h (struct language_defn)
6099 <la_watch_location_expression>: New member.
6100 * language.c (unknown_language_defn, auto_language_defn)
6101 (local_language_defn): Update.
6102 * go-lang.c (go_language_defn): Update.
6103 * f-lang.c (f_language_defn): Update.
6104 * d-lang.c (d_language_defn): Update.
6105 * c-lang.h (c_watch_location_expression): Declare.
6106 * c-lang.c (c_watch_location_expression): New function.
6107 (c_language_defn, cplus_language_defn, asm_language_defn)
6108 (minimal_language_defn): Use it.
6109 * breakpoint.c (watch_command_1): Call
6110 la_watch_location_expression.
6111 * ada-lang.c (ada_language_defn): Update.
6112
6113 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6114
6115 PR tui/21482
6116 * gdb_curses.h (NOMACROS): Define.
6117 (NCURSES_NOMACROS): Define.
6118
6119 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6120
6121 PR tui/21482
6122 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6123 arg to char *.
6124 * tui/tui-wingeneral.c (box_win): Likewise.
6125 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6126 (tui_show_source_line): Likewise.
6127 (tui_show_exec_info_content): Likewise.
6128
6129 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6130
6131 * sparc-tdep.c (sparc_structure_return_p)
6132 (sparc_arg_on_registers_p): New functions.
6133 (sparc32_store_arguments): Use them.
6134 * sparc64-tdep.c (sparc64_16_byte_align_p)
6135 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6136 Handle TYPE_CODE_ARRAY.
6137
6138 2017-05-17 Yao Qi <yao.qi@linaro.org>
6139
6140 * cli/cli-decode.c (add_alias_cmd): New function.
6141 * command.h (add_alias_cmd): Declare.
6142 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6143 instead call add_alias_cmd.
6144
6145 2017-05-17 Pedro Alves <palves@redhat.com>
6146
6147 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6148 (nat_makefile_frag): ... this. All references updated.
6149 * configure.ac: Likewise.
6150 * configure.nat: Likewise. Enhance comments.
6151 * configure: Regenerate.
6152
6153 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6154
6155 * procfs.c (procfs_create_inferior): Change prototype to match
6156 definition.
6157
6158 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6159
6160 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6161 C++ compiler warning.
6162
6163 2017-05-12 Tom Tromey <tom@tromey.com>
6164
6165 PR rust/21483:
6166 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6167 recurse, just call value_struct_elt directly.
6168
6169 2017-05-12 Tom Tromey <tom@tromey.com>
6170
6171 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6172 OP_RUST_ARRAY>: Fix.
6173
6174 2017-05-12 Tom Tromey <tom@tromey.com>
6175
6176 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6177
6178 2017-05-09 Yao Qi <yao.qi@linaro.org>
6179
6180 * regcache.c: Include <forward_list>.
6181 (struct regcache_list): Remove.
6182 (current_regcache): Update.
6183 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6184 (regcache_thread_ptid_changed): Likewise.
6185 (registers_changed_ptid): Likewise.
6186 (current_regcache_size): Likewise.
6187
6188 2017-05-09 Yao Qi <yao.qi@linaro.org>
6189
6190 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6191 (current_regcache_size): New function.
6192 (current_regcache_test): New function.
6193 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6194
6195 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6196
6197 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6198 (print_gp_register_row): Use get_frame_register_value.
6199
6200 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6201
6202 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6203 (mips_supply_fpregset): Likewise.
6204 (mips64_supply_gregset): Likewise.
6205
6206 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6207
6208 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6209 regcache->raw_supply_zeroed.
6210
6211 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6212
6213 * configure.nat: Rearrange 'case' statements to match
6214 host before cpu.
6215
6216 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6217
6218 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6219 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6220 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6221 "@nat_extra_makefile_frag@".
6222 (Makefile): Remove dependency on "@frags@".
6223 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6224 (data-directory/Makefile): Likewise.
6225 * config/aarch64/linux.mh: Deleted; moved contents to
6226 "gdb/configure.nat".
6227 * config/alpha/alpha-linux.mh: Likewise.
6228 * config/alpha/nbsd.mh: Likewise.
6229 * config/arm/linux.mh: Likewise.
6230 * config/arm/nbsdelf.mh: Likewise.
6231 * config/i386/cygwin.mh: Likewise.
6232 * config/i386/cygwin64.mh: Likewise.
6233 * config/i386/darwin.mh: Likewise.
6234 * config/i386/fbsd.mh: Likewise.
6235 * config/i386/fbsd64.mh: Likewise.
6236 * config/i386/go32.mh: Likewise.
6237 * config/i386/i386gnu.mh: Likewise.
6238 * config/i386/i386sol2.mh: Likewise.
6239 * config/i386/linux.mh: Likewise.
6240 * config/i386/linux64.mh: Likewise.
6241 * config/i386/mingw.mh: Likewise.
6242 * config/i386/mingw64.mh: Likewise.
6243 * config/i386/nbsd64.mh: Likewise.
6244 * config/i386/nbsdelf.mh: Likewise.
6245 * config/i386/nto.mh: Likewise.
6246 * config/i386/obsd.mh: Likewise.
6247 * config/i386/obsd64.mh: Likewise.
6248 * config/i386/sol2-64.mh: Likewise.
6249 * config/ia64/linux.mh: Likewise.
6250 * config/m32r/linux.mh: Likewise.
6251 * config/m68k/linux.mh: Likewise.
6252 * config/m68k/nbsdelf.mh: Likewise.
6253 * config/m68k/obsd.mh: Likewise.
6254 * config/m88k/obsd.mh: Likewise.
6255 * config/mips/fbsd.mh: Likewise.
6256 * config/mips/linux.mh: Likewise.
6257 * config/mips/nbsd.mh: Likewise.
6258 * config/mips/obsd64.mh: Likewise.
6259 * config/pa/linux.mh: Likewise.
6260 * config/pa/nbsd.mh: Likewise.
6261 * config/pa/obsd.mh: Likewise.
6262 * config/powerpc/aix.mh: Likewise.
6263 * config/powerpc/fbsd.mh: Likewise.
6264 * config/powerpc/linux.mh: Likewise.
6265 * config/powerpc/nbsd.mh: Likewise.
6266 * config/powerpc/obsd.mh: Likewise.
6267 * config/powerpc/ppc64-linux.mh: Likewise.
6268 * config/powerpc/spu-linux.mh: Likewise.
6269 * config/s390/linux.mh: Likewise.
6270 * config/sh/nbsd.mh: Likewise.
6271 * config/sparc/fbsd.mh: Likewise.
6272 * config/sparc/linux.mh: Likewise.
6273 * config/sparc/linux64.mh: Likewise.
6274 * config/sparc/nbsd64.mh: Likewise.
6275 * config/sparc/nbsdelf.mh: Likewise.
6276 * config/sparc/obsd64.mh: Likewise.
6277 * config/sparc/sol2.mh: Likewise.
6278 * config/tilegx/linux.mh: Likewise.
6279 * config/vax/nbsdelf.mh: Likewise.
6280 * config/vax/obsd.mh: Likewise.
6281 * config/xtensa/linux.mh: Likewise.
6282 * config/i386/i386gnu.mn: New file, with excerpts from
6283 "config/i386/i386gnu.mh".
6284 * configure: Regenerate.
6285 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6286 *.mh files under "gdb/config".
6287 * configure.nat: New file, with contents from the
6288 "gdb/config/*/*.mh" files.
6289
6290 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6291
6292 * btrace.c (btrace_clear): Free insn vector.
6293
6294 2017-05-05 Pedro Alves <palves@redhat.com>
6295
6296 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6297 * configure: Regenerate.
6298
6299 2017-05-04 Pedro Alves <palves@redhat.com>
6300
6301 * Makefile.in (SFILES): Add progspace-and-thread.c.
6302 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6303 (COMMON_OBS): Add progspace-and-thread.o.
6304 * breakpoint.c: Include "progspace-and-thread.h".
6305 (update_inserted_breakpoint_locations)
6306 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6307 Use scoped_restore_current_pspace_and_thread.
6308 (create_std_terminate_master_breakpoint): Use
6309 scoped_restore_current_program_space.
6310 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6311 (print_breakpoint_location): Use
6312 scoped_restore_current_program_space.
6313 (bp_loc_is_permanent): Use
6314 scoped_restore_current_pspace_and_thread.
6315 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6316 (download_tracepoint_locations): Use
6317 scoped_restore_current_pspace_and_thread.
6318 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6319 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6320 (enum step_over_calls_kind): Moved from inferior.h.
6321 (class scoped_restore_current_thread): New class.
6322 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6323 declaration.
6324 (scoped_restore_current_thread): New class.
6325 * infcmd.c: Include "common/gdb_optional.h".
6326 (continue_1, proceed_after_attach): Use
6327 scoped_restore_current_thread.
6328 (notice_new_inferior): Use scoped_restore_current_thread.
6329 * inferior.c: Include "progspace-and-thread.h".
6330 (restore_inferior, save_current_inferior): Delete.
6331 (add_inferior_command, clone_inferior_command): Use
6332 scoped_restore_current_pspace_and_thread.
6333 * inferior.h (scoped_restore_current_inferior): New class.
6334 * infrun.c: Include "progspace-and-thread.h" and
6335 "common/gdb_optional.h".
6336 (follow_fork_inferior): Use
6337 scoped_restore_current_pspace_and_thread.
6338 (scoped_restore_exited_inferior): New class.
6339 (handle_vfork_child_exec_or_exit): Use
6340 scoped_restore_exited_inferior,
6341 scoped_restore_current_pspace_and_thread,
6342 scoped_restore_current_thread and scoped_restore.
6343 (fetch_inferior_event): Use scoped_restore_current_thread.
6344 * linespec.c (decode_line_full, decode_line_1): Use
6345 scoped_restore_current_program_space.
6346 * mi/mi-main.c: Include "progspace-and-thread.h".
6347 (exec_continue): Use scoped_restore_current_thread.
6348 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6349 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6350 * proc-service.c (ps_pglobal_lookup): Use
6351 scoped_restore_current_program_space.
6352 * progspace-and-thread.c: New file.
6353 * progspace-and-thread.h: New file.
6354 * progspace.c (release_program_space, clone_program_space): Use
6355 scoped_restore_current_program_space.
6356 (restore_program_space, save_current_program_space)
6357 (save_current_space_and_thread): Delete.
6358 (switch_to_program_space_and_thread): Moved to
6359 progspace-and-thread.c.
6360 * progspace.h (save_current_program_space)
6361 (save_current_space_and_thread): Delete declarations.
6362 (scoped_restore_current_program_space): New class.
6363 * remote.c (remote_btrace_maybe_reopen): Use
6364 scoped_restore_current_thread.
6365 * symtab.c: Include "progspace-and-thread.h".
6366 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6367 * thread.c (print_thread_info_1): Use
6368 scoped_restore_current_thread.
6369 (struct current_thread_cleanup): Delete.
6370 (do_restore_current_thread_cleanup)
6371 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6372 (scoped_restore_current_thread::~scoped_restore_current_thread):
6373 ... this new dtor.
6374 (make_cleanup_restore_current_thread): Rename/convert to ...
6375 (scoped_restore_current_thread::scoped_restore_current_thread):
6376 ... this new ctor.
6377 (thread_apply_all_command): Use scoped_restore_current_thread.
6378 (thread_apply_command): Use scoped_restore_current_thread.
6379 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6380 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6381
6382 2017-05-04 Pedro Alves <palves@redhat.com>
6383
6384 * thread.c (make_cleanup_restore_current_thread): Move
6385 find_thread_ptid call before the is_stopped call. Assert that the
6386 thread is found. Replace is_stopped call by checking the thread's
6387 state directly. Remove unnecessary NULL-thread check.
6388
6389 2017-05-04 Pedro Alves <palves@redhat.com>
6390
6391 * corelow.c (thread_section_name): New class.
6392 (get_core_register_section, get_core_siginfo): Use it.
6393
6394 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6395
6396 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6397 (get_core_register_section): Remove xfree of NULL pointer.
6398
6399 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6400
6401 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6402 * regcache.c (regcache::raw_supply_zeroed): New function.
6403 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6404
6405 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6406
6407 * gdbarch.sh: Remove commented out definition of
6408 TARGET_CHAR_BIT.
6409 * gdbarch.h: Re-generate.
6410
6411 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6412
6413 * configure: Regenerate.
6414
6415 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6416
6417 * solib-target.c (solib_target_relocate_section_addresses):
6418 Remove num_section_bases, num_bases, segment_bases variables.
6419
6420 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6421
6422 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6423
6424 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6425
6426 * solib-target.c: Include <vector>
6427 (struct lm_info_target) <~lm_info_target>: Remove.
6428 <segment_bases, section_bases>: Change type to
6429 std::vector<CORE_ADDR>.
6430 (library_list_start_segment, library_list_start_section,
6431 library_list_end_library,
6432 solib_target_relocate_section_addresses): Adjust.
6433
6434 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6435
6436 * gdbarch.sh (software_single_step): Change return type to
6437 std::vector<CORE_ADDR>.
6438 * gdbarch.c, gdbarch.h: Re-generate.
6439 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6440 Adjust.
6441 (arm_deal_with_atomic_sequence_raw): Adjust.
6442 (thumb_get_next_pcs_raw): Adjust.
6443 (arm_get_next_pcs_raw): Adjust.
6444 (arm_get_next_pcs): Adjust.
6445 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6446 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6447 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6448 (alpha_software_single_step): Adjust.
6449 * alpha-tdep.h (alpha_software_single_step): Adjust.
6450 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6451 * arm-tdep.c (arm_software_single_step): Adjust.
6452 (arm_breakpoint_kind_from_current_state): Adjust.
6453 * arm-tdep.h (arm_software_single_step): Adjust.
6454 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6455 * cris-tdep.c (cris_software_single_step): Adjust.
6456 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6457 (micromips_deal_with_atomic_sequence): Adjust.
6458 (deal_with_atomic_sequence): Adjust.
6459 (mips_software_single_step): Adjust.
6460 * mips-tdep.h (mips_software_single_step): Adjust.
6461 * moxie-tdep.c (moxie_software_single_step): Adjust.
6462 * nios2-tdep.c (nios2_software_single_step): Adjust.
6463 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6464 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6465 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6466 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6467 * sparc-tdep.c (sparc_software_single_step): Adjust.
6468 * spu-tdep.c (spu_software_single_step): Adjust.
6469 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6470
6471 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6472
6473 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6474 * gdbarch.h: Re-generate.
6475
6476 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6477
6478 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6479 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6480 * python/py-instruction.c, python/py-instruction.h: New file.
6481 * python/py-record.c: Add py-instruction.h include.
6482 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6483 gdb.RecordInstruction.
6484 * python/python-internal.h: Add gdbpy_initialize_instruction
6485 declaration.
6486 * python/python.c (do_start_initialization): Add
6487 gdbpy_initialize_instruction.
6488
6489 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6490
6491 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6492 Remove.
6493 (btrace_func_from_recpy_func): New function.
6494 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6495 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6496 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6497 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6498 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6499 Also, use new helper functions.
6500 (btpy_list_item): Use new helper functions.
6501 (recpy_bt_function_call_history): Use new type name.
6502 (btpy_call_getset): Remove.
6503 (gdbpy_initialize_btrace): Remove code to initialize
6504 gdb.BtraceFunctionCall.
6505 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6506 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6507 recpy_bt_func_prev, recpy_bt_func_next): New export.
6508 * python/py-record.c (recpy_func_type): New static object.
6509 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6510 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6511 recpy_func_next): New function.
6512 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6513 (recpy_func_getset): New static object.
6514 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6515 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6516
6517 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6518
6519 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6520 (btpy_object, btpy_insn_type, btpy_new): Remove.
6521 (btpy_list_object): Use gdb.RecordInstruction type instead of
6522 gdb.BtraceInstruction type.
6523 (btrace_insn_from_recpy_insn): New function.
6524 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6525 btpy_new.
6526 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6527 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6528 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6529 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6530 instead of btpy_object.
6531 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6532 btpy_insn_data, btpy_insn_decode): Rename to ...
6533 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6534 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6535 recpy_bt_insn_decode): This. Also, use new helper functions.
6536 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6537 recpy_insn_type.
6538 (btpy_insn_getset): Remove.
6539 (gdbpy_initialize_btrace): Remove code to initialize
6540 gdb.BtraceInstruction. Use recpy_element_object.
6541 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6542 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6543 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6544 * python/py-record.c (recpy_insn_type): New static object.
6545 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6546 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6547 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6548 New function.
6549 (recpy_insn_getset): New static object.
6550 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6551 * python/py-record.h (recpy_element_object): New typedef.
6552 (recpy_insn_type, recpy_insn_new): New export.
6553
6554 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6555
6556 * py-record-btrace.c (btpy_insn_new): Removed.
6557 (btpy_insn_or_gap_new): New function.
6558 (btpy_insn_error): Removed.
6559 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6560 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6561 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6562 btpy_insn_or_gap_new instead of btpy_insn_new.
6563 (btpy_insn_getset): Remove btpy_insn_error.
6564 * py-record.c (recpy_gap_type): New static object.
6565 (recpy_gap_object): New typedef.
6566 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6567 recpy_gap_reason_string): New function.
6568 (recpy_gap_getset): New static object.
6569 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6570 * py-record.h (recpy_gap_new): New export.
6571
6572 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6573
6574 * python/py-record.c (recpy_ptid): Remove.
6575 (recpy_record_getset): Remove recpy_ptid.
6576
6577 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6578
6579 * btrace.c (btrace_fetch): Set inferior_ptid.
6580 * python/py-record-btrace.c: Add "py-record.h" include.
6581 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6582 recpy_bt_end, recpy_bt_instruction_history,
6583 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6584 in gdb.Record object instead of current ptid.
6585 * python/py-record.c: Include new "py-record.h" file.
6586 (recpy_record_object): Moved to py-record.h.
6587 * python/py-record.h: New file.
6588
6589 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6590
6591 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6592 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6593 indentation.
6594
6595 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6596
6597 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6598 the past maintainers section.
6599
6600 2017-04-28 Yao Qi <yao.qi@linaro.org>
6601
6602 * infcmd.c (get_return_value): Use regcache ctor, and remove
6603 cleanup.
6604
6605 2017-04-28 Yao Qi <yao.qi@linaro.org>
6606 Pedro Alves <palves@redhat.com>
6607
6608 * regcache.c (regcache::regcache): New tag dispatch ctor.
6609 (do_cooked_read): Moved above.
6610 (regcache_dup): Use the tag dispatch ctor..
6611 * regcache.h (regcache): Declare ctor, delete copy ctor and
6612 assignment operator, remove friend regcache_dup.
6613
6614 2017-04-28 Yao Qi <yao.qi@linaro.org>
6615
6616 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6617 call method save instead of regcache_cpy.
6618 * regcache.h (struct regcache): Make regcache_dup a friend.
6619
6620 2017-04-28 Yao Qi <yao.qi@linaro.org>
6621
6622 * regcache.c (struct regcache): Move to regcache.h
6623 (regcache::arch): New method.
6624 (regcache_get_ptid): Update.
6625 (get_regcache_arch): Call arch method.
6626 (get_regcache_aspace): Call method aspace.
6627 (register_buffer): Change it to method.
6628 (regcache_save): Change it to regcache::save.
6629 (regcache_restore): Likewise.
6630 (regcache_cpy_no_passthrough): Remove the declaration.
6631 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6632 (regcache_cpy_no_passthrough): Change it to method
6633 cpy_no_passthrough.
6634 (regcache_register_status): Change it to method
6635 get_register_status.
6636 (regcache_invalidate): Change it to method invalidate.
6637 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6638 (regcache_raw_update): Change it to method raw_update.
6639 (regcache_raw_read): Likewise.
6640 (regcache_raw_read_signed): Likewise.
6641 (regcache_raw_read_unsigned): Likewise.
6642 (regcache_raw_write_signed): Likewise.
6643 (regcache_raw_write_unsigned): Likewise.
6644 (regcache_cooked_read): Likewise.
6645 (regcache_cooked_read_value): Likewise.
6646 (regcache_cooked_read_signed): Likewise.
6647 (regcache_cooked_read_unsigned): Likewise.
6648 (regcache_cooked_write_signed): Likewise.
6649 (regcache_cooked_write_unsigned): Likewise.
6650 (regcache_raw_set_cached_value): Likewise.
6651 (regcache_raw_write): Likewise.
6652 (regcache_cooked_write): Likewise.
6653 (regcache_xfer_part): Likewise.
6654 (regcache_raw_read_part): Likewise.
6655 (regcache_raw_write_part): Likewise.
6656 (regcache_cooked_read_part): Likewise.
6657 (regcache_cooked_write_part): Likewise.
6658 (regcache_raw_supply): Likewise.
6659 (regcache_raw_collect): Likewise.
6660 (regcache_transfer_regset): Likewise.
6661 (regcache_supply_regset): Likewise.
6662 (regcache_collect_regset): Likewise.
6663 (regcache_debug_print_register): Likewise.
6664 (enum regcache_dump_what): Move it to regcache.h.
6665 (regcache_dump): Change it to method dump.
6666 * regcache.h (enum regcache_dump_what): New.
6667 (class regcache): New.
6668 * target.c (target_fetch_registers): Call method
6669 debug_print_register.
6670 (target_store_registers): Likewise.
6671
6672 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6673
6674 * windows-nat.c (struct lm_info_windows): Initialize field.
6675 (windows_make_so): Allocate lm_info_windows with new.
6676 (windows_free_so): Free lm_info_windows with delete.
6677
6678 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6679
6680 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6681 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6682 cleanup.
6683 (darwin_free_so): Free lm_info_darwin with delete.
6684
6685 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6686
6687 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6688 <l_addr_p>: Change type to bool.
6689 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6690 (svr4_free_so): Free lm_info_svr4 with delete.
6691 (svr4_copy_library_list): Replace memcpy with call to copy
6692 constructor.
6693 (library_list_start_library, svr4_default_sos): Allocate
6694 lm_info_svr4 with new.
6695
6696 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6697
6698 * solib-target.c (struct lm_info_target): Add destructor,
6699 initialize fields.
6700 <name>: Change type to std::string.
6701 (library_list_start_library): Allocate lm_info_target with new.
6702 (solib_target_free_library_list): Free lm_info_target with
6703 delete.
6704 (solib_target_current_sos): Adapt to std::string.
6705 (solib_target_free_so): Free lm_info_target with delete.
6706
6707 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6708
6709 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6710 fields.
6711 (frv_current_sos): Allocate lm_info_frv with new.
6712 (frv_relocate_main_executable): Free lm_info_frv with delete,
6713 allocate with new.
6714 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6715
6716 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6717
6718 * solib-frv.c (struct lm_info_frv): Fix indentation.
6719
6720 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6721
6722 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6723 map field.
6724 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6725 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6726 and allocate with new.
6727 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6728
6729 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6730
6731 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6732 <filename, member_name>: Change type to std::string.
6733 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6734 (library_list_start_library): Allocate lm_info_aix with new.
6735 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6736 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6737 with copy constructor.
6738
6739 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6740
6741 * solist.h (struct lm_info): Remove.
6742 (struct lm_info_base): New class.
6743 (struct so_list) <lm_info>: Change type to lm_info_base *.
6744 * nto-tdep.c (struct lm_info): Remove.
6745 (lm_addr): Adjust.
6746 * solib-aix.c (struct lm_info): Rename to ...
6747 (struct lm_info_aix): ... this. Extend lm_info_base.
6748 (lm_info_p): Rename to ...
6749 (lm_info_aix_p): ... this, and adjust.
6750 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6751 solib_aix_parse_libraries, library_list_start_library,
6752 solib_aix_free_library_list, solib_aix_parse_libraries,
6753 solib_aix_get_library_list,
6754 solib_aix_relocate_section_addresses, solib_aix_free_so,
6755 solib_aix_get_section_offsets,
6756 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6757 Adjust.
6758 (struct solib_aix_inferior_data) <library_list>: Adjust.
6759 * solib-darwin.c (struct lm_info): Rename to ...
6760 (struct lm_info_darwin): ... this. Extend lm_info_base.
6761 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6762 * solib-dsbt.c (struct lm_info): Rename to ...
6763 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6764 (struct dsbt_info) <main_executable_lm_info): Adjust.
6765 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6766 dsbt_relocate_section_addresses): Adjust.
6767 * solib-frv.c (struct lm_info): Rename to ...
6768 (struct lm_info_frv): ... this. Extend lm_info_base.
6769 (main_executable_lm_info): Adjust.
6770 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6771 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6772 find_canonical_descriptor_in_load_object,
6773 frv_fdpic_find_canonical_descriptor): Adjust.
6774 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6775 to lm_info_svr4.
6776 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6777 svr4_clear_so, svr4_copy_library_list,
6778 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6779 svr4_current_sos, svr4_fetch_objfile_link_map,
6780 solist_update_incremental): Adjust.
6781 * solib-svr4.h (struct lm_info_svr4): Move here from
6782 solib-svr4.c.
6783 * solib-target.c (struct lm_info): Rename to ...
6784 (struct lm_info_target): ... this. Extend lm_info_base.
6785 (lm_info_p): Rename to ...
6786 (lm_info_target_p): ... this.
6787 (solib_target_parse_libraries, library_list_start_segment,
6788 library_list_start_section, library_list_start_library,
6789 library_list_end_library, solib_target_free_library_list,
6790 solib_target_current_sos, solib_target_free_so,
6791 solib_target_relocate_section_addresses): Adjust.
6792 * windows-nat.c (struct lm_info): Rename to ...
6793 (struct lm_info_windows): ... this. Extend lm_info_base.
6794 (windows_make_so, handle_load_dll, handle_unload_dll,
6795 windows_xfer_shared_libraries): Adjust.
6796
6797 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6798
6799 * solib-darwin.c (struct darwin_so_list): Remove.
6800 (darwin_current_sos): Allocate an so_list object instead of a
6801 darwin_so_list, separately allocate an lm_info object.
6802 (darwin_free_so): Free lm_info.
6803
6804 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6805
6806 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6807 with fprintf_filtered.
6808
6809 2017-04-28 Yao Qi <yao.qi@linaro.org>
6810
6811 * regcache.c (regcache::regcache): New function.
6812 (regcache::~regcache): New function.
6813 (regcache_xmalloc_1): Remove.
6814 (regcache_xmalloc): Call new regcache.
6815 (regcache_xfree): Call delete regcache.
6816 (get_thread_arch_aspace_regcache): Call new regcache.
6817
6818 2017-04-28 Yao Qi <yao.qi@linaro.org>
6819
6820 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6821 lwp instead of ptid_get_lwp.
6822
6823 2017-04-28 Yao Qi <yao.qi@linaro.org>
6824
6825 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6826 lwp_info instead of getting from inferior_ptid.
6827
6828 2017-04-27 Keith Seitz <keiths@redhat.com>
6829
6830 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6831 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6832 (CV_CONVERSION_BADNESS): Define.
6833 (rank_one_type): Remove overly restrictive rvalue reference
6834 rank checks.
6835 Add cv-qualifier checks and subranks for type equality.
6836 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6837 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6838 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6839
6840 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6841
6842 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6843 count when creating the object.
6844
6845 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6846 Ulrich Weigand <uweigand@de.ibm.com>
6847
6848 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6849 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6850 is used in AIX.
6851 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6852 (process_xcoff_symbol): Likewise.
6853 (scan_xcoff_symtab): Likewise.
6854
6855 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6856
6857 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6858 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6859 (ia64_access_reg): Use get_frame_register_unsigned.
6860 (ia64_access_rse_reg): Likewise.
6861 (ia64_libunwind_frame_prev_register): Likewise.
6862
6863 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6864
6865 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6866 * gdbarch.c: Regenerated.
6867 * gdbarch.h: Regenerated.
6868 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6869 visibility external.
6870 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6871 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6872 (enum cfa_how_kind): Move to ...
6873 (struct dwarf2_frame_state_reg_info): Likewise.
6874 (struct dwarf2_frame_state): Likewise.
6875 * dwarf2-frame.h: ... here.
6876 (dwarf2_frame_state_alloc_regs): New declaration.
6877 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6878 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6879
6880 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6881
6882 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6883 regcache_raw_read_unsigned.
6884 (xtensa_pseudo_register_write): Likewise.
6885
6886 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6887
6888 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6889 (nds32_pseudo_register_write): Likewise.
6890
6891 2017-04-25 Yao Qi <yao.qi@linaro.org>
6892
6893 * regcache.c (struct regcache) <readonly_p>: Change its type
6894 to bool.
6895 (regcache_xmalloc_1): Update parameter type and callers update.
6896
6897 2017-04-25 Yao Qi <yao.qi@linaro.org>
6898
6899 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6900 set_gdbarch_wchar_bit.
6901 * arm-tdep.c (arm_gdbarch_init): Likewise.
6902
6903 2017-04-25 Pedro Alves <palves@redhat.com>
6904
6905 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6906 (BothAreRelocatable, memcopy, memmove): Don't define.
6907 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6908 macros.
6909
6910 2017-04-25 Pedro Alves <palves@redhat.com>
6911
6912 * common/common-defs.h: Include "common/poison.h".
6913 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6914 and adjust.
6915 * common/poison.h: New file.
6916 * common/traits.h: Include <type_traits>.
6917 (Not, Or, Requires): New, moved from common/function-view.h.
6918
6919 2017-04-25 Pedro Alves <palves@redhat.com>
6920
6921 * breakpoint.h (struct breakpoint): In-class initialize all
6922 fields. Make boolean fields "bool".
6923 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6924 memset call and initializations no longer necessary.
6925
6926 2017-04-25 Pedro Alves <palves@redhat.com>
6927
6928 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6929 reference.
6930 (pt_btrace_insn): New function.
6931 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6932
6933 2017-04-25 Pedro Alves <palves@redhat.com>
6934
6935 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6936 "base" field and inherit from "bp_location" instead. Add
6937 non-default ctor.
6938 (allocate_location_exception): Use new non-default ctor.
6939 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6940 (init_bp_location): Convert to ...
6941 (bp_location::bp_location): ... this new ctor, and remove memset
6942 call.
6943 (base_breakpoint_allocate_location): Use the new non-default ctor.
6944 * breakpoint.h (bp_location): Now a class. Declare default and
6945 non-default ctors. In-class initialize all members.
6946 (init_bp_location): Remove declaration.
6947
6948 2017-04-25 Pedro Alves <palves@redhat.com>
6949
6950 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6951 assignment operator.
6952
6953 2017-04-24 Yao Qi <yao.qi@linaro.org>
6954
6955 * doublest.c (convert_doublest_to_floatformat): Call
6956 floatformat_totalsize_bytes.
6957
6958 2017-04-22 Tom Tromey <tom@tromey.com>
6959
6960 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6961 ui_out_emit_list.
6962 * stack.c (print_frame): Use ui_out_emit_list.
6963 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6964 ui_out_emit_list.
6965 * mi/mi-main.c (print_one_inferior)
6966 (mi_cmd_data_list_register_names)
6967 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6968 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6969 ui_out_emit_list.
6970 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6971 (mi_output_solib_attribs): Use ui_out_emit_list,
6972 ui_out_emit_tuple.
6973 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6974 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6975 (mi_cmd_stack_list_args, list_args_or_locals): Use
6976 ui_out_emit_list.
6977 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6978 * breakpoint.c (print_solib_event, output_thread_groups): Use
6979 ui_out_emit_list.
6980
6981 2017-04-22 Tom Tromey <tom@tromey.com>
6982
6983 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6984 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6985 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6986
6987 2017-04-22 Tom Tromey <tom@tromey.com>
6988
6989 * tracepoint.c (tvariables_info_1)
6990 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6991
6992 2017-04-22 Tom Tromey <tom@tromey.com>
6993
6994 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6995 annotate_arg_emitter.
6996 * breakpoint.c (print_mention_watchpoint)
6997 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6998 * annotate.h (struct annotate_arg_emitter): New.
6999
7000 2017-04-22 Tom Tromey <tom@tromey.com>
7001
7002 * record-btrace.c (record_btrace_insn_history)
7003 (record_btrace_insn_history_range, record_btrace_call_history)
7004 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7005 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7006 ui_out_emit_tuple.
7007 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7008 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7009 * skip.c (skip_info): Use ui_out_emit_tuple.
7010 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7011 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7012 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7013 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7014 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7015 ui_out_emit_tuple.
7016 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7017 (output_register, mi_cmd_data_read_memory)
7018 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7019 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7020 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7021 Use ui_out_emit_tuple.
7022 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7023 ui_out_emit_tuple.
7024 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7025 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7026 * linux-thread-db.c (info_auto_load_libthread_db): Use
7027 ui_out_emit_tuple.
7028 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7029 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7030 * disasm.c (do_mixed_source_and_assembly_deprecated)
7031 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7032 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7033 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7034 * breakpoint.c (print_one_breakpoint_location)
7035 (print_one_breakpoint): Use ui_out_emit_tuple.
7036 * auto-load.c (print_script, info_auto_load_cmd): Use
7037 ui_out_emit_tuple.
7038 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7039
7040 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7041
7042 * thread.c (print_thread_info_1): Remove dead code.
7043
7044 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7045
7046 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7047 GDB_SELF_TEST.
7048 * arm-tdep.c (selftests::arm_record_test): Likewise.
7049
7050 2017-04-21 Yao Qi <yao.qi@linaro.org>
7051
7052 * regcache.c (regcache_restore): Remove argument 2. Replace
7053 argument 3 with regcache. Get register status from
7054 src->register_status and get register contents from
7055 register_buffer (src, regnum).
7056 (regcache_cpy): Update.
7057
7058 2017-04-19 Pedro Alves <palves@redhat.com>
7059
7060 * gdbthread.h (thread): Add missing closing parenthesis in
7061 comment.
7062
7063 2017-04-19 Pedro Alves <palves@redhat.com>
7064
7065 * common/refcounted-object.h: New file.
7066 * gdbthread.h: Include "common/refcounted-object.h".
7067 (thread_info): Inherit from refcounted_object and add comments.
7068 (thread_info::incref, thread_info::decref)
7069 (thread_info::m_refcount): Delete.
7070 (thread_info::deletable): Use the refcounted_object::refcount()
7071 method.
7072 * inferior.c (current_inferior_): Add comment.
7073 (set_current_inferior): Increment/decrement refcounts.
7074 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7075 not-deletable instead of comparing with the current inferior.
7076 (initialize_inferiors): Increment the initial inferior's refcount.
7077 * inferior.h (struct inferior): Forward declare.
7078 Include "common/refcounted-object.h".
7079 (current_inferior, set_current_inferior): Move declaration to
7080 before struct inferior's definition, and fix comment.
7081 (inferior): Inherit from refcounted_object. Add comments.
7082 * thread.c (switch_to_thread_no_regs): Reference the thread's
7083 inferior pointer directly instead of doing a ptid lookup.
7084 (switch_to_no_thread): New function.
7085 (switch_to_thread(thread_info *)): New function, factored out
7086 from ...
7087 (switch_to_thread(ptid_t)): ... this.
7088 (restore_current_thread): Delete.
7089 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7090 fields, and add 'inf' field.
7091 (do_restore_current_thread_cleanup): Check whether old->inf is
7092 alive instead of looking up an inferior by ptid. Use
7093 switch_to_thread and switch_to_no_thread.
7094 (restore_current_thread_cleanup_dtor): Use old->inf directly
7095 instead of lookup up an inferior by id. Decref the inferior.
7096 Don't restore 'removable'.
7097 (make_cleanup_restore_current_thread): Same the inferior pointer
7098 in old, instead of the inferior number. Incref the inferior.
7099 Don't save/clear 'removable'.
7100
7101 2017-04-19 Pedro Alves <palves@redhat.com>
7102
7103 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7104 unittests/scoped_restore-selftests.c.
7105 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7106 * common/scoped_restore.h (scoped_restore_base): Make "class".
7107 (scoped_restore_base::release): New public method.
7108 (scoped_restore_base::scoped_restore_base): New protected ctor.
7109 (scoped_restore_base::m_saved_var): New protected field.
7110 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7111 scoped_restore_base base class instead of m_saved_var directly.
7112 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7113 (scoped_restore_tmpl::scoped_restore_tmpl(const
7114 scoped_restore_tmpl<T>&)): Likewise.
7115 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7116 method.
7117 (scoped_restore_tmpl::saved_var): New method.
7118 (scoped_restore_tmpl::m_saved_var): Delete.
7119 * inferior.h (inferior::detaching): Now a bool.
7120 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7121 cleanup.
7122 * unittests/scoped_restore-selftests.c: New file.
7123
7124 2017-04-19 Pedro Alves <palves@redhat.com>
7125
7126 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7127 Re-sort in alphabetic order.
7128
7129 2017-04-18 Pedro Alves <palves@redhat.com>
7130
7131 * xml-support.c (obstack_xml_printf): Delete.
7132 * xml-support.h (obstack_xml_printf): Delete.
7133
7134 2017-04-18 Pedro Alves <palves@redhat.com>
7135
7136 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7137 vdebug, verror, body_text, start_element, end_element, name,
7138 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7139 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7140 is_xinclude>: Make private and add m_ prefix.
7141 (gdb_xml_parser::body_text): New method, based on ...
7142 (gdb_xml_body_text): ... this. Adjust.
7143 (gdb_xml_parser::vdebug): New method, based on ...
7144 (gdb_xml_debug): ... this. Adjust.
7145 (gdb_xml_parser::verror): New method, based on ...
7146 (gdb_xml_error): ... this. Adjust.
7147 (gdb_xml_parser::start_element): New method, based on ...
7148 (gdb_xml_start_element): ... this. Adjust.
7149 (gdb_xml_start_element_wrapper): Defer to
7150 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7151 (gdb_xml_parser::end_element): New method, based on ...
7152 (gdb_xml_end_element_wrapper): ... this. Adjust.
7153 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7154 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7155 (gdb_xml_parser::use_dtd): New method, based on ...
7156 (gdb_xml_use_dtd): ... this. Adjust.
7157 (gdb_xml_parser::parse): New method, based on ...
7158 (gdb_xml_parse): ... this. Adjust.
7159 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7160 (xinclude_start_include): Adjust to call the parser's name method.
7161 (xml_xinclude_default, xml_xinclude_start_doctype)
7162 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7163 method.
7164 (xml_process_xincludes): Adjust to call parser methods.
7165 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7166 declarations.
7167
7168 2017-04-18 Pedro Alves <palves@redhat.com>
7169
7170 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7171 gdb::optional<std::string>.
7172 * xml-support.c: Include <string>.
7173 (scope_level::scope_level(scope_level &&))
7174 (scope_level::~scope_level): Delete.
7175 (scope_level::body): Now a std::string.
7176 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7177 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7178 parameter.
7179 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7180 (xinclude_parsing_data::output): Now a std::string reference.
7181 (xinclude_start_include): Adjust.
7182 (xml_xinclude_default): Adjust.
7183 (xml_process_xincludes): Add 'output' parameter, and return bool.
7184 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7185 and return bool.
7186 * xml-tdesc.c: Include <unordered_map> and <string>.
7187 (tdesc_xml_cache): Delete.
7188 (tdesc_xml_cache_s): Delete.
7189 (xml_cache): Now an std::unordered_map.
7190 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7191 (target_fetch_description_xml): Change return type to
7192 gdb::optional<std::string>, and adjust.
7193 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7194 (target_fetch_description_xml): Change return type to
7195 gdb::optional<std::string>.
7196
7197 2017-04-18 Pedro Alves <palves@redhat.com>
7198
7199 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7200 unittests/optional-selftests.c.
7201 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7202 * unittests/optional-selftests.c: New file.
7203 * unittests/optional/assignment/1.cc: New file.
7204 * unittests/optional/assignment/2.cc: New file.
7205 * unittests/optional/assignment/3.cc: New file.
7206 * unittests/optional/assignment/4.cc: New file.
7207 * unittests/optional/assignment/5.cc: New file.
7208 * unittests/optional/assignment/6.cc: New file.
7209 * unittests/optional/assignment/7.cc: New file.
7210 * unittests/optional/cons/copy.cc: New file.
7211 * unittests/optional/cons/default.cc: New file.
7212 * unittests/optional/cons/move.cc: New file.
7213 * unittests/optional/cons/value.cc: New file.
7214 * unittests/optional/in_place.cc: New file.
7215 * unittests/optional/observers/1.cc: New file.
7216 * unittests/optional/observers/2.cc: New file.
7217
7218 2017-04-18 Pedro Alves <palves@redhat.com>
7219
7220 * common/gdb_optional.h: Include common/traits.h.
7221 (in_place_t): New type.
7222 (in_place): New constexpr variable.
7223 (optional::optional): Remove member initialization of
7224 m_instantiated.
7225 (optional::optional(in_place_t...)): New constructor.
7226 (optional::~optional): Use reset.
7227 (optional::optional(const optional&)): New.
7228 (optional::optional(const optional&&)): New.
7229 (optional::optional(T &)): New.
7230 (optional::optional(T &&)): New.
7231 (operator::operator=(const optional &)): New.
7232 (operator::operator=(optional &&)): New.
7233 (operator::operator= (const T &))
7234 (operator::operator= (T &&))
7235 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7236 (operator::reset): New.
7237 (operator::m_instantiated):: Add in-class initializer.
7238 * common/traits.h: Include <type_traits>.
7239 (struct And): New types.
7240
7241 2017-04-18 Pedro Alves <palves@redhat.com>
7242
7243 * xml-support.c: Include <vector>.
7244 (scope_level::scope_level(const gdb_xml_element *))
7245 (scope_level::scope_level(scope_level&&)): New.
7246 (scope_level::~scope_level): New.
7247 (scope_level_s): Delete.
7248 (gdb_xml_parser::scopes): Now a std::vector.
7249 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7250 Use std::vector.
7251 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7252 scope cleanup code.
7253 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7254 of the scopes member. Use std::vector::emplace_back.
7255
7256 2017-04-18 Pedro Alves <palves@redhat.com>
7257
7258 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7259 a bool.
7260 (gdb_xml_end_element): Change type of first parameter.
7261 (gdb_xml_cleanup): Rename to ...
7262 (gdb_xml_parser::~gdb_xml_parser): ... this.
7263 (gdb_xml_create_parser_and_cleanup): Delete with ...
7264 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7265 to this new ctor.
7266 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7267 using gdb_xml_create_parser_and_cleanup.
7268 (xinclude_parsing_data): Add ctor/dtor.
7269 (xml_xinclude_cleanup): Delete.
7270 (xml_process_xincludes): Create a local xinclude_parsing_data
7271 instead of heap-allocating one. Create a local gdb_xml_parser
7272 instead of heap-allocating one with
7273 gdb_xml_create_parser_and_cleanup.
7274
7275 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7276
7277 PR threads/20743
7278 * fbsd-nat.c (resume_one_thread_cb): Remove.
7279 (resume_all_threads_cb): Remove.
7280 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7281 iterate_over_threads.
7282
7283 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7284
7285 * NEWS: Create a new section for the next release branch.
7286 Rename the section of the current branch, now that it has
7287 been cut.
7288
7289 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7290
7291 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7292 * version.in: Bump version to 8.0.50.DATE-git.
7293
7294 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7295
7296 PR gdb/21385
7297 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7298 independently of the host, and fix build breakage on Cygwin.
7299
7300 2017-04-13 Pedro Alves <palves@redhat.com>
7301
7302 * inferior.c (free_inferior): Convert to ...
7303 (inferior::~inferior): ... this dtor.
7304 (inferior::inferior): New ctor, factored out from ...
7305 (add_inferior_silent): ... here. Allocate the inferior with a new
7306 expression.
7307 (delete_inferior): Call delete instead of free_inferior.
7308 * inferior.h (gdb_environ, continuation): Forward declare.
7309 (inferior): Now a class. Add in-class initialization to all
7310 members. Make boolean fields bool, except 'detaching'.
7311 (inferior::inferior): New explicit ctor.
7312 (inferior::~inferior): New.
7313
7314 2017-04-13 Pedro Alves <palves@redhat.com>
7315
7316 * inferior.c (init_inferior_list): Delete.
7317 * inferior.h (init_inferior_list): Delete.
7318
7319 2017-04-13 Pedro Alves <palves@redhat.com>
7320
7321 PR threads/13217
7322 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7323 (top level): Call it twice, with different thread sets.
7324
7325 2017-04-13 Pedro Alves <palves@redhat.com>
7326
7327 * thread.c: Include <algorithm>.
7328 (thread_array_cleanup): Delete.
7329 (scoped_inc_dec_ref): New class.
7330 (live_threads_count): New function.
7331 (set_thread_refcount): Delete.
7332 (tp_array_compar_ascending): Now a bool.
7333 (tp_array_compar): Convert to a std::sort comparison function.
7334 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7335 and live_threads_count.
7336
7337 2017-04-13 Pedro Alves <palves@redhat.com>
7338
7339 * infrun.c (follow_fork_inferior): Also switch the current
7340 inferior.
7341
7342 2017-04-13 Pedro Alves <palves@redhat.com>
7343
7344 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7345 before calling create_internal_breakpoint.
7346
7347 2017-04-13 Pedro Alves <palves@redhat.com>
7348
7349 * fork-child.c (execv_argv): New class.
7350 (breakup_args): Refactored as ...
7351 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7352 Copy arguments to storage and replace separators with NULL
7353 terminators in place.
7354 (escape_bang_in_quoted_argument): Adjust to return bool.
7355 (execv_argv::execv_argv): New ctor.
7356 (execv_argv::init_for_shell): New method, factored out from
7357 fork_inferior. Don't strdup strings into the vector.
7358 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7359 Remove free_vector_argv call.
7360
7361 2017-04-13 Yao Qi <yao.qi@linaro.org>
7362
7363 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7364 tdep->rx_psw_type.
7365
7366 2017-04-13 Yao Qi <yao.qi@linaro.org>
7367
7368 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7369 * rx-tdep.c (rx_gdbarch_init): Likewise.
7370
7371 2017-04-13 Pedro Alves <palves@redhat.com>
7372
7373 * breakpoint.h (struct breakpoint): Reindent.
7374
7375 2017-04-13 Pedro Alves <palves@redhat.com>
7376
7377 * breakpoint.c (bp_location): Rename to ...
7378 (bp_locations): ... this. All references updated.
7379 (bp_location_count): Rename to ...
7380 (bp_locations_count): ... this. All references updated.
7381 (bp_location_placed_address_before_address_max): Rename to ...
7382 (bp_locations_placed_address_before_address_max): ... this. All
7383 references updated.
7384 (bp_location_shadow_len_after_address_max): Rename to ...
7385 (bp_locations_shadow_len_after_address_max): ... this. All
7386 references updated.
7387 (bp_location_compare_addrs): Rename to ...
7388 (bp_locations_compare_addrs): ... this. All references updated.
7389 (bp_location_compare):Rename to ...
7390 (bp_locations_compare): ... this. All references updated.
7391 (bp_location_target_extensions_update): Rename to ...
7392 (bp_locations_target_extensions_update): ... this. All references
7393 updated.
7394
7395 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7396
7397 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7398 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7399 'sgtty.h'.
7400 * common/gdb_termios.h: New file, with parts of "terminal.h".
7401 * inflow.c: Include "gdb_termios.h".
7402 * ser-unix.c: Include "gdb_termios.h".
7403 * terminal.h: Move terminal-related defines to
7404 "common/gdb_termios.h".
7405
7406 2017-04-12 Tom Tromey <tom@tromey.com>
7407
7408 * probe.c (parse_probes): Update.
7409 * location.h (delete_event_location): Don't declare.
7410 (event_location_deleter::operator()): Update.
7411 * location.c (event_location_deleter::operator()): Rename from
7412 delete_event_location.
7413 * linespec.h (linespec_result) <location>: Change type to
7414 event_location_up.
7415 * linespec.c (canonicalize_linespec, event_location_to_sals)
7416 (decode_objc): Update.
7417 (linespec_result): Don't call delete_event_location.
7418 * breakpoint.c (create_breakpoints_sal)
7419 (bkpt_probe_create_sals_from_location)
7420 (strace_marker_create_sals_from_location): Update.
7421
7422 2017-04-12 Tom Tromey <tom@tromey.com>
7423
7424 * linespec.h (struct linespec_result): Add constructor and
7425 destructor.
7426 (init_linespec_result, destroy_linespec_result)
7427 (make_cleanup_destroy_linespec_result): Don't declare.
7428 * linespec.c (init_linespec_result): Remove.
7429 (linespec_result::~linespec_result): Rename from
7430 destroy_linespec_result. Update.
7431 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7432 Remove.
7433 * breakpoint.c (create_breakpoint, break_range_command)
7434 (decode_location_default): Update.
7435 * ax-gdb.c (agent_command_1): Update.
7436
7437 2017-04-12 Tom Tromey <tom@tromey.com>
7438
7439 * remote.c (remote_download_tracepoint): Update.
7440 * python/py-breakpoint.c (bppy_get_location): Update.
7441 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7442 (gdbscm_breakpoint_location): Update.
7443 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7444 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7445 Change type to event_location_up.
7446 * breakpoint.c (create_overlay_event_breakpoint)
7447 (create_longjmp_master_breakpoint)
7448 (create_std_terminate_master_breakpoint)
7449 (create_exception_master_breakpoint)
7450 (breakpoint_event_location_empty_p, print_breakpoint_location)
7451 (print_one_breakpoint_location, create_thread_event_breakpoint)
7452 (init_breakpoint_sal, create_breakpoint)
7453 (print_recreate_ranged_breakpoint, break_range_command)
7454 (init_ada_exception_breakpoint, say_where): Update.
7455 (base_breakpoint_dtor): Don't call delete_event_location.
7456 (bkpt_print_recreate, tracepoint_print_recreate)
7457 (dprintf_print_recreate, update_static_tracepoint)
7458 (breakpoint_re_set_default): Update.
7459
7460 2017-04-12 Tom Tromey <tom@tromey.com>
7461
7462 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7463 type of "to_do". Update.
7464 (compute_stack_depth): Use std::vector.
7465
7466 2017-04-12 Tom Tromey <tom@tromey.com>
7467
7468 * printcmd.c (find_instruction_backward): Use std::vector.
7469
7470 2017-04-12 Tom Tromey <tom@tromey.com>
7471
7472 * symfile.c (objfilep): Remove typedef.
7473 (reread_symbols): Use a std::vector.
7474
7475 2017-04-12 Tom Tromey <tom@tromey.com>
7476
7477 * mi/mi-main.c (exec_direction_forward): Remove.
7478 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7479 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7480 scoped_restore.
7481 * guile/guile.c (guile_repl_command, guile_command)
7482 (gdbscm_execute_gdb_command): Use scoped_restore.
7483 * go-exp.y (go_parse): Use scoped_restore.
7484 * d-exp.y (d_parse): Use scoped_restore.
7485 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7486 * c-exp.y (c_parse): Use scoped_restore.
7487
7488 2017-04-12 Tom Tromey <tom@tromey.com>
7489
7490 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7491 (mi_parse): Update return type.
7492 (mi_parse_free): Remove.
7493 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7494 (mi_parse::~mi_parse): Rename from mi_parse_free.
7495 (mi_parse_cleanup): Remove.
7496 (mi_parse): Return a unique_ptr. Use new.
7497 * mi/mi-main.c (mi_execute_command): Update.
7498
7499 2017-04-12 Tom Tromey <tom@tromey.com>
7500
7501 * location.c (explicit_location_lex_one): Return a
7502 unique_xmalloc_ptr.
7503 (string_to_explicit_location): Update. Remove cleanups.
7504
7505 2017-04-12 Tom Tromey <tom@tromey.com>
7506
7507 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7508 (compare_value_and_voffset): Change type. Update.
7509 (compute_vtable_size): Change type of "offset_vec".
7510 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7511 (gnuv3_get_typeid): Remove extraneous declaration.
7512
7513 2017-04-12 Tom Tromey <tom@tromey.com>
7514
7515 * charset.h (wchar_iterator): Fix comment.
7516
7517 2017-04-12 Tom Tromey <tom@tromey.com>
7518
7519 * charset.c (iconv_wrapper): New class.
7520 (cleanup_iconv): Remove.
7521 (convert_between_encodings): Use it.
7522
7523 2017-04-12 Tom Tromey <tom@tromey.com>
7524
7525 * symfile.h (increment_reading_symtab): Update type.
7526 * symfile.c (decrement_reading_symtab): Remove.
7527 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7528 * psymtab.c (psymtab_to_symtab): Update.
7529 * dwarf2read.c (dw2_instantiate_symtab): Update.
7530
7531 2017-04-12 Tom Tromey <tom@tromey.com>
7532
7533 * jit.c (struct jit_reader): Declare separately. Add constructor
7534 and destructor. Change type of "handle".
7535 (loaded_jit_reader): Define separately.
7536 (jit_reader_load): Update. New "new".
7537 (jit_reader_unload_command): Use "delete".
7538 * gdb-dlfcn.h (struct dlclose_deleter): New.
7539 (gdb_dlhandle_up): New typedef.
7540 (gdb_dlopen, gdb_dlsym): Update types.
7541 (gdb_dlclose): Remove.
7542 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7543 (gdb_dlsym): Change type of "handle".
7544 (make_cleanup_dlclose): Remove.
7545 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7546 * compile/compile-c-support.c (load_libcc): Update.
7547
7548 2017-04-12 Tom Tromey <tom@tromey.com>
7549
7550 * symtab.h (find_pcs_for_symtab_line): Change return type.
7551 * symtab.c (find_pcs_for_symtab_line): Change return type.
7552 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7553 type of "vec". Update.
7554 (ltpy_get_pcs_for_line): Update.
7555 * linespec.c (decode_digits_ordinary): Update.
7556
7557 2017-04-12 Tom Tromey <tom@tromey.com>
7558
7559 * tracepoint.c (actions_command): Update.
7560 * python/python.c (python_command, python_interactive_command):
7561 Update.
7562 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7563 * guile/guile.c (guile_command): Update.
7564 * defs.h (read_command_lines, read_command_lines_1): Return
7565 command_line_up.
7566 (command_lines_deleter): New struct.
7567 (command_line_up): New typedef.
7568 * compile/compile.c (compile_code_command)
7569 (compile_print_command): Update.
7570 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7571 command_line_up.
7572 (make_cleanup_free_command_lines): Remove.
7573 * cli/cli-script.c (get_command_line, read_command_lines_1)
7574 (copy_command_lines): Return command_line_up.
7575 (while_command, if_command, read_command_lines, define_command)
7576 (document_command): Update.
7577 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7578 Remove.
7579 * breakpoint.h (breakpoint_set_commands): Change type of
7580 "commands".
7581 * breakpoint.c (breakpoint_set_commands): Change type of
7582 "commands". Update.
7583 (do_map_commands_command, update_dprintf_command_list)
7584 (create_tracepoint_from_upload): Update.
7585
7586 2017-04-12 Tom Tromey <tom@tromey.com>
7587
7588 * tracepoint.c (scope_info): Update.
7589 * spu-tdep.c (spu_catch_start): Update.
7590 * python/python.c (gdbpy_decode_line): Update.
7591 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7592 * python/py-breakpoint.c (bppy_init): Update.
7593 * probe.c (parse_probes): Update.
7594 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7595 * location.h (event_location_deleter): New struct.
7596 (event_location_up): New typedef.
7597 (new_linespec_location, new_address_location, new_probe_location)
7598 (new_explicit_location, copy_event_location)
7599 (string_to_event_location, string_to_event_location_basic)
7600 (string_to_explicit_location): Update return type.
7601 (make_cleanup_delete_event_location): Remove.
7602 * location.c (new_linespec_location, new_address_location)
7603 (new_probe_location, new_explicit_location, copy_event_location):
7604 Return event_location_up.
7605 (delete_event_location_cleanup)
7606 (make_cleanup_delete_event_location): Remove.
7607 (string_to_explicit_location, string_to_event_location_basic)
7608 (string_to_event_location): Return event_location_up.
7609 * linespec.c (canonicalize_linespec, event_location_to_sals)
7610 (decode_line_with_current_source)
7611 (decode_line_with_last_displayed, decode_objc): Update.
7612 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7613 * completer.c (location_completer): Update.
7614 * cli/cli-cmds.c (edit_command, list_command): Update.
7615 * breakpoint.c (create_overlay_event_breakpoint)
7616 (create_longjmp_master_breakpoint)
7617 (create_std_terminate_master_breakpoint)
7618 (create_exception_master_breakpoint)
7619 (create_thread_event_breakpoint): Update.
7620 (init_breakpoint_sal): Update. Remove some dead code.
7621 (create_breakpoint_sal): Change type of "location". Update.
7622 (create_breakpoints_sal, create_breakpoint, break_command_1)
7623 (dprintf_command, break_range_command, until_break_command)
7624 (init_ada_exception_breakpoint)
7625 (strace_marker_create_sals_from_location)
7626 (update_static_tracepoint, trace_command, ftrace_command)
7627 (strace_command, create_tracepoint_from_upload): Update.
7628 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7629 * ax-gdb.c (agent_command_1): Update.
7630
7631 2017-04-12 Pedro Alves <palves@redhat.com>
7632
7633 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7634 * configure.tgt: Handle i[34567]86-*-go32* and
7635 i[34567]86-*-msdosdjgpp*.
7636 * i386-tdep.c (i386_svr4_reg_to_regnum):
7637 Make extern.
7638 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7639 i386-go32-tdep.c.
7640 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7641 * i386-go32-tdep.c: New file.
7642 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7643 declarations.
7644
7645 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7646
7647 * aix-thread.c (pd_status2str): Change return type to const char *.
7648
7649 2017-04-12 Pedro Alves <palves@redhat.com>
7650
7651 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7652 calls to set_gdbarch_gnu_triplet_regexp.
7653
7654 2017-04-12 Pedro Alves <palves@redhat.com>
7655
7656 PR gdb/21323
7657 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7658 New enum value.
7659 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7660 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7661 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7662 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7663 * gdbarch.h, gdbarch.c: Regenerate.
7664 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7665 gdbarch_wchar_bit and gdbarch_wchar_signed.
7666 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7667 * arm-tdep.c (arm_gdbarch_init): Likewise.
7668 * avr-tdep.c (avr_gdbarch_init): Likewise.
7669 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7670 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7671 * i386-tdep.c (i386_go32_init_abi): Likewise.
7672 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7673 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7674 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7675 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7676 * sh-tdep.c (sh_gdbarch_init): Likewise.
7677 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7678 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7679 * windows-tdep.c (windows_init_abi): Likewise.
7680 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7681
7682 2017-04-12 Pedro Alves <palves@redhat.com>
7683
7684 PR c++/21323
7685 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7686 cplus_primitive_type_char32_t>: New enum values.
7687 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7688 and cplus_primitive_type_char32_t.
7689 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7690 32, use the archtecture's built-in type for char16_t and char32_t,
7691 respectively. Otherwise, fallback to init_integer_type as before,
7692 but make the type unsigned, and issue a complaint.
7693 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7694
7695 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7696
7697 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7698 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7699
7700 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7701
7702 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7703 'const char *'.
7704
7705 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7706
7707 * common/common-utils.c (free_vector_argv): New function.
7708 * common/common-utils.h: Include <vector>.
7709 (free_vector_argv): New prototype.
7710 * darwin-nat.c (darwin_create_inferior): Rewrite function
7711 prototype in order to constify "exec_file" and accept a
7712 "std::string" for "allargs".
7713 * fork-child.c: Include <vector>.
7714 (breakup_args): Rewrite function, using C++.
7715 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7716 and accept "std::string" for "allargs". Update the code to
7717 calculate "argv" based on "allargs". Update calls to "exec_fun"
7718 and "execvp".
7719 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7720 order to constify "exec_file" and accept a "std::string" for
7721 "allargs".
7722 * go32-nat.c (go32_create_inferior): Likewise.
7723 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7724 * infcmd.c (run_command_1): Constify "exec_file". Use
7725 "std::string" for inferior arguments.
7726 * inferior.h (fork_inferior): Update prototype.
7727 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7728 prototype in order to constify "exec_file" and accept a
7729 "std::string" for "allargs".
7730 * nto-procfs.c (procfs_create_inferior): Likewise.
7731 * procfs.c (procfs_create_inferior): Likewise.
7732 * remote-sim.c (gdbsim_create_inferior): Likewise.
7733 * remote.c (extended_remote_run): Update code to accept
7734 "std::string" as argument.
7735 (extended_remote_create_inferior): Rewrite function prototype in
7736 order to constify "exec_file" and accept a "std::string" for
7737 "allargs".
7738 * rs6000-nat.c (super_create_inferior): Likewise.
7739 (rs6000_create_inferior): Likewise.
7740 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7741 * windows-nat.c (windows_create_inferior): Likewise.
7742
7743 2017-04-11 Pedro Alves <palves@redhat.com>
7744
7745 * thread.c: Fix whitespace throughout.
7746
7747 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7748
7749 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7750
7751 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7752
7753 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7754
7755 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7756
7757 PR gdb/21364
7758 * osdata.c (info_osdata): Check if 'type' is an empty string
7759 instead of NULL.
7760
7761 2017-04-10 Pedro Alves <palves@redhat.com>
7762
7763 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7764 (ptid_to_global_thread_id, in_thread_list)
7765 (do_captured_list_thread_ids, set_resumed, set_running)
7766 (set_executing, set_stop_requested, finish_thread_state)
7767 (validate_registers_access, can_access_registers_ptid)
7768 (print_thread_info_1, switch_to_thread)
7769 (do_restore_current_thread_cleanup)
7770 (make_cleanup_restore_current_thread, thread_command)
7771 (thread_name_command): Use operator== instead of ptid_equal.
7772
7773 2017-04-10 Pedro Alves <palves@redhat.com>
7774
7775 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7776 (current_thread_cleanup_chain): Delete.
7777 (restore_current_thread_cleanup_dtor)
7778 (make_cleanup_restore_current_thread): Remove references to
7779 current_thread_cleanup_chain.
7780
7781 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7782
7783 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7784 REG_UNKNOWN.
7785
7786 2017-04-10 Yao Qi <yao.qi@linaro.org>
7787
7788 PR gdb/19942
7789 * gdbthread.h (thread_info::deletable): New method.
7790 (thread_info::incref): New method.
7791 (thread_info::decref): New method.
7792 (thread_info::refcount): Move it to private.
7793 * infrun.c (save_stop_context): Call inc_refcount.
7794 (release_stop_context_cleanup): Likewise.
7795 * thread.c (set_thread_exited): New function.
7796 (init_thread_list): Delete "tp" only it is deletable, otherwise
7797 call set_thread_exited.
7798 (delete_thread_1): Call set_thread_exited.
7799 (current_thread_cleanup) <inferior_pid>: Remove.
7800 <thread>: New field.
7801 (restore_current_thread_ptid_changed): Removed.
7802 (do_restore_current_thread_cleanup): Adjust.
7803 (restore_current_thread_cleanup_dtor): Don't call
7804 find_thread_ptid.
7805 (set_thread_refcount): Use dec_refcount.
7806 (make_cleanup_restore_current_thread): Adjust.
7807 (thread_apply_all_command): Call inc_refcount.
7808 (_initialize_thread): Don't call
7809 observer_attach_thread_ptid_changed.
7810
7811 2017-04-10 Yao Qi <yao.qi@linaro.org>
7812
7813 * thread.c (delete_thread_1): Hoist code on marking thread as
7814 exited.
7815
7816 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7817
7818 * windows-nat.c (windows_detach): Initialize ptid with
7819 minus_one_ptid.
7820
7821 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7822
7823 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7824
7825 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7826
7827 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7828 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7829 (bfin_pseudo_register_write): Likewise
7830
7831 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7832
7833 * common/ptid.h (struct ptid): Change to...
7834 (class ptid_t): ... this.
7835 <ptid_t>: New constructors.
7836 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7837 matches>: New methods.
7838 <make_null, make_minus_one>: New static methods.
7839 <pid>: Rename to...
7840 <m_pid>: ...this.
7841 <lwp>: Rename to...
7842 <m_lwp>: ...this.
7843 <tid>: Rename to...
7844 <m_tid>: ...this.
7845 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7846 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7847 as references, move comment to class ptid_t.
7848 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7849 ptid_t static methods.
7850 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7851 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7852 Take ptid arguments as references, implement using ptid_t methods.
7853 * unittests/ptid-selftests.c: New file.
7854 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7855 unittests/ptid-selftests.c.
7856 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7857
7858 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7859
7860 * python/python.c (python_run_simple_file): Cast mode literal to
7861 non-const char pointer as expected by PyFile_FromString.
7862
7863 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7864
7865 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7866 minus_one_ptid and null_ptid.
7867
7868 2017-04-05 Pedro Alves <palves@redhat.com>
7869
7870 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7871 * configure: Regenerate.
7872
7873 2017-04-05 Pedro Alves <palves@redhat.com>
7874
7875 * ada-exp.y (yyerror): Constify.
7876 * ada-lang.c (bound_name, get_selections)
7877 (ada_variant_discrim_type)
7878 (ada_variant_discrim_name, ada_value_struct_elt)
7879 (ada_lookup_struct_elt_type, is_unchecked_variant)
7880 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7881 (catch_ada_exception_command_split)
7882 (catch_ada_assert_command_split, catch_assert_command)
7883 (ada_op_name): Constify.
7884 * ada-lang.h (ada_yyerror, get_selections)
7885 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7886 * arc-tdep.c (arc_print_frame_cache): Constify.
7887 * arm-tdep.c (arm_skip_stub): Constify.
7888 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7889 (gen_aggregate_elt_ref): Constify.
7890 * bcache.c (print_bcache_statistics): Constify.
7891 * bcache.h (print_bcache_statistics): Constify.
7892 * break-catch-throw.c (catch_exception_command_1):
7893 * breakpoint.c (struct ep_type_description::description):
7894 Constify.
7895 (add_solib_catchpoint): Constify.
7896 (catch_fork_command_1): Add cast.
7897 (add_catch_command): Constify.
7898 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7899 Constify.
7900 * bsd-uthread.c (bsd_uthread_state): Constify.
7901 * buildsym.c (patch_subfile_names): Constify.
7902 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7903 Constify.
7904 * c-exp.y (yyerror): Constify.
7905 (token::oper): Constify.
7906 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7907 * c-varobj.c (cplus_describe_child): Constify.
7908 * charset.c (find_charset_names): Add cast.
7909 (find_charset_names): Constify array and add const_cast.
7910 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7911 (edit_command): Constify.
7912 * cli/cli-decode.c (lookup_cmd): Constify.
7913 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7914 Constify.
7915 (struct dump_context): Constify.
7916 (add_dump_command, restore_command): Constify.
7917 * cli/cli-script.c (get_command_line): Constify.
7918 * cli/cli-script.h (get_command_line): Constify.
7919 * cli/cli-utils.c (check_for_argument): Constify.
7920 * cli/cli-utils.h (check_for_argument): Constify.
7921 * coff-pe-read.c (struct read_pe_section_data): Constify.
7922 * command.h (lookup_cmd): Constify.
7923 * common/print-utils.c (decimal2str): Constify.
7924 * completer.c (gdb_print_filename): Constify.
7925 * corefile.c (set_gnutarget): Constify.
7926 * cp-name-parser.y (yyerror): Constify.
7927 * cp-valprint.c (cp_print_class_member): Constify.
7928 * cris-tdep.c (cris_register_name, crisv32_register_name):
7929 Constify.
7930 * d-exp.y (yyerror): Constify.
7931 (struct token::oper): Constify.
7932 * d-lang.h (d_yyerror): Constify.
7933 * dbxread.c (struct header_file_location::name): Constify.
7934 (add_old_header_file, add_new_header_file, last_function_name)
7935 (dbx_next_symbol_text, add_bincl_to_list)
7936 (find_corresponding_bincl_psymtab, set_namestring)
7937 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7938 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7939 * defs.h (command_line_input, print_address_symbolic)
7940 (deprecated_readline_begin_hook): Constify.
7941 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7942 Constify.
7943 * event-top.c (handle_line_of_input): Constify and add cast.
7944 * exceptions.c (catch_errors): Constify.
7945 * exceptions.h (catch_errors): Constify.
7946 * expprint.c (print_subexp_standard, op_string, op_name)
7947 (op_name_standard, dump_raw_expression, dump_raw_expression):
7948 * expression.h (op_name, op_string, dump_raw_expression):
7949 Constify.
7950 * f-exp.y (yyerror): Constify.
7951 (struct token::oper): Constify.
7952 (struct f77_boolean_val::name): Constify.
7953 * f-lang.c (f_word_break_characters): Constify.
7954 * f-lang.h (f_yyerror): Constify.
7955 * fork-child.c (fork_inferior): Add cast.
7956 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7957 (new_variant): Constify.
7958 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7959 * gdbarch.c: Regenerate.
7960 * gdbcore.h (set_gnutarget): Constify.
7961 * go-exp.y (yyerror): Constify.
7962 (token::oper): Constify.
7963 * go-lang.h (go_yyerror): Constify.
7964 * go32-nat.c (go32_sysinfo): Constify.
7965 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7966 * guile/scm-cmd.c (cmdscm_function): Constify.
7967 * guile/scm-param.c (pascm_param_value): Constify.
7968 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7969 (h8300sx_register_name): Constify.
7970 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7971 Constify.
7972 * ia64-tdep.c (ia64_register_names): Constify.
7973 * infcmd.c (construct_inferior_arguments): Constify.
7974 (path_command, attach_post_wait): Constify.
7975 * language.c (show_range_command, show_case_command)
7976 (unk_lang_error): Constify.
7977 * language.h (language_defn::la_error)
7978 (language_defn::la_name_of_this): Constify.
7979 * linespec.c (decode_line_2): Constify.
7980 * linux-thread-db.c (thread_db_err_str): Constify.
7981 * lm32-tdep.c (lm32_register_name): Constify.
7982 * m2-exp.y (yyerror): Constify.
7983 * m2-lang.h (m2_yyerror): Constify.
7984 * m32r-tdep.c (m32r_register_names): Constify and make static.
7985 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7986 * m88k-tdep.c (m88k_register_name): Constify.
7987 * macroexp.c (appendmem): Constify.
7988 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7989 (upgrade_type, parse_external, parse_partial_symbols)
7990 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7991 (new_symbol): Constify.
7992 * memattr.c (mem_info_command): Constify.
7993 * mep-tdep.c (register_name_from_keyword): Constify.
7994 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7995 Constify.
7996 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7997 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7998 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7999 cast.
8000 (mi_execute_async_cli_command): Constify.
8001 * mips-tdep.c (mips_register_name): Constify.
8002 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8003 (am33_register_name, am33_2_register_name)
8004 * moxie-tdep.c (moxie_register_names): Constify.
8005 * nat/linux-osdata.c (osdata_type): Constify fields.
8006 * nto-tdep.c (nto_parse_redirection): Constify.
8007 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8008 (lookup_child_selector): Constify.
8009 (objc_methcall::name): Constify.
8010 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8011 (lookup_struct_typedef): Constify.
8012 * objfiles.c (pc_in_section): Constify.
8013 * objfiles.h (pc_in_section): Constify.
8014 * p-exp.y (struct token::oper): Constify.
8015 (yyerror): Constify.
8016 * p-lang.h (pascal_yyerror): Constify.
8017 * parser-defs.h (op_name_standard): Constify.
8018 (op_print::string): Constify.
8019 (exp_descriptor::op_name): Constify.
8020 * printcmd.c (print_address_symbolic): Constify.
8021 * psymtab.c (print_partial_symbols): Constify.
8022 * python/py-breakpoint.c (stop_func): Constify.
8023 (bppy_get_expression): Constify.
8024 * python/py-cmd.c (cmdpy_completer::name): Constify.
8025 (cmdpy_function): Constify.
8026 * python/py-event.c (evpy_add_attribute)
8027 (gdbpy_initialize_event_generic): Constify.
8028 * python/py-event.h (evpy_add_attribute)
8029 (gdbpy_initialize_event_generic): Constify.
8030 * python/py-evts.c (add_new_registry): Constify.
8031 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8032 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8033 * python/py-inferior.c (get_buffer): Add cast.
8034 * python/py-param.c (parm_constant::name): Constify.
8035 * python/py-unwind.c (fprint_frame_id): Constify.
8036 * python/python.c (gdbpy_parameter_value): Constify.
8037 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8038 * remote.c (memory_packet_config::name): Constify.
8039 (show_packet_config_cmd, remote_write_bytes)
8040 (remote_buffer_add_string):
8041 * reverse.c (exec_reverse_once): Constify.
8042 * rs6000-tdep.c (variant::name, variant::description): Constify.
8043 * rust-exp.y (rustyyerror): Constify.
8044 * rust-lang.c (rust_op_name): Constify.
8045 * rust-lang.h (rustyyerror): Constify.
8046 * serial.h (serial_ops::name): Constify.
8047 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8048 (sh_sh3e_register_name, sh_sh2e_register_name)
8049 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8050 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8051 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8052 (sh_sh4al_dsp_register_name): Constify.
8053 * sh64-tdep.c (sh64_register_name): Constify.
8054 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8055 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8056 * stabsread.c (patch_block_stabs, read_type_number)
8057 (ref_map::stabs, ref_add, process_reference)
8058 (symbol_reference_defined, define_symbol, define_symbol)
8059 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8060 (read_one_struct_field, read_struct_fields, read_baseclasses)
8061 (read_tilde_fields, read_struct_type, read_array_type)
8062 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8063 (read_huge_number, read_range_type, read_args, common_block_start)
8064 (find_name_end): Constify.
8065 * stabsread.h (common_block_start, define_symbol)
8066 (process_one_symbol, symbol_reference_defined, ref_add):
8067 * symfile.c (get_section_index, add_symbol_file_command):
8068 * symfile.h (get_section_index): Constify.
8069 * target-descriptions.c (tdesc_type::name): Constify.
8070 (tdesc_free_type): Add cast.
8071 * target.c (find_default_run_target):
8072 (add_deprecated_target_alias, find_default_run_target)
8073 (target_announce_detach): Constify.
8074 (do_option): Constify.
8075 * target.h (add_deprecated_target_alias): Constify.
8076 * thread.c (print_thread_info_1): Constify.
8077 * top.c (deprecated_readline_begin_hook, command_line_input):
8078 Constify.
8079 (init_main): Add casts.
8080 * top.h (handle_line_of_input): Constify.
8081 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8082 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8083 (tfind_command): Rename to ...
8084 (tfind_command_1): ... this and constify.
8085 (tfind_command): New function.
8086 (tfind_end_command, tfind_start_command): Adjust.
8087 (encode_source_string): Constify.
8088 * tracepoint.h (encode_source_string): Constify.
8089 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8090 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8091 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8092 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8093 * tui/tui-win.c (parse_scrolling_args): Constify.
8094 * tui/tui-windata.c (tui_erase_data_content): Constify.
8095 * tui/tui-windata.h (tui_erase_data_content): Constify.
8096 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8097 * tui/tui.c (tui_enable): Add cast.
8098 * utils.c (defaulted_query): Constify.
8099 (init_page_info): Add cast.
8100 (puts_debug, subset_compare): Constify.
8101 * utils.h (subset_compare): Constify.
8102 * varobj.c (varobj_format_string): Constify.
8103 * varobj.h (varobj_format_string): Constify.
8104 * vax-tdep.c (vax_register_name): Constify.
8105 * windows-nat.c (windows_detach): Constify.
8106 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8107 * xml-support.c (gdb_xml_end_element): Constify.
8108 * xml-tdesc.c (tdesc_start_reg): Constify.
8109 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8110 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8111 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8112
8113 2017-04-05 Pedro Alves <palves@redhat.com>
8114
8115 * proc-api.c (struct trans): Constify.
8116 (procfs_note): Constify.
8117 * proc-events.c (struct trans, syscall_table):
8118 * proc-flags.c (struct trans): Constify.
8119 * proc-utils.h (procfs_note): Constify.
8120 * proc-why.c (struct trans): Constify.
8121 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8122 (procfs_detach): Constify.
8123 * sol-thread.c (struct string_map): Constify.
8124 (td_err_string, td_state_string): Constify.
8125
8126 2017-04-05 Pedro Alves <palves@redhat.com>
8127
8128 * proc-api.c (procfs_filename): Don't initialize
8129 procfs_filename.
8130 (prepare_to_trace): Assume procfs_filename is non-NULL.
8131 (_initialize_proc_api): Give procfs_filename a default value here.
8132
8133 2017-04-05 Pedro Alves <palves@redhat.com>
8134
8135 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8136 'cond_string' parameter.
8137 (extract_exception_regexp): Constify 'string' parameter.
8138 (catch_exception_command_1): Constify.
8139 * breakpoint.c (init_catchpoint)
8140 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8141 parameter.
8142 (ep_parse_optional_if_clause, catch_fork_command_1)
8143 (catch_exec_command_1): Constify.
8144 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8145 parameter.
8146 (ep_parse_optional_if_clause): Constify.
8147 * cli/cli-utils.c (remove_trailing_whitespace)
8148 (check_for_argument): Constify.
8149 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8150 non-const overload.
8151 (check_for_argument): Likewise.
8152
8153 2017-04-05 Pedro Alves <palves@redhat.com>
8154
8155 * event-top.c (command_line_handler): Add cast to execute_command
8156 call.
8157 * record-btrace.c (cmd_record_btrace_bts_start)
8158 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8159 (cmd_record_btrace_start): Add cast to execute_command call.
8160 * record-full.c (record_full_goto_insn):
8161 * record.c (record_start, record_stop): Add cast to
8162 execute_command_to_string calls.
8163 (cmd_record_start): Add cast to execute_command calls.
8164
8165 2017-04-05 Pedro Alves <palves@redhat.com>
8166
8167 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8168 static inline function.
8169 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8170 array and use gdb_PyArg_ParseTupleAndKeywords.
8171 * python/py-cmd.c (cmdpy_init): Likewise.
8172 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8173 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8174 (infpy_search_memory): Likewise.
8175 * python/py-objfile.c (objfpy_add_separate_debug_file)
8176 (gdbpy_lookup_objfile): Likewise.
8177 * python/py-symbol.c (gdbpy_lookup_symbol)
8178 (gdbpy_lookup_global_symbol): Likewise.
8179 * python/py-type.c (gdbpy_lookup_type): Likewise.
8180 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8181 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8182 Likewise.
8183
8184 2017-04-05 Pedro Alves <palves@redhat.com>
8185
8186 * python/python-internal.h (gdb_PyGetSetDef): New type.
8187 * python/py-block.c (block_object_getset)
8188 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8189 * python/py-event.c (event_object_getset)
8190 (finish_breakpoint_object_getset): Likewise.
8191 * python/py-inferior.c (inferior_object_getset): Likewise.
8192 * python/py-infthread.c (thread_object_getset): Likewise.
8193 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8194 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8195 * python/py-objfile.c (objfile_getset): Likewise.
8196 * python/py-progspace.c (pspace_getset): Likewise.
8197 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8198 Likewise.
8199 * python/py-record.c (recpy_record_getset): Likewise.
8200 * python/py-symbol.c (symbol_object_getset): Likewise.
8201 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8202 Likewise.
8203 * python/py-type.c (type_object_getset, field_object_getset):
8204 Likewise.
8205 * python/py-value.c (value_object_getset): Likewise.
8206
8207 2017-04-05 Pedro Alves <palves@redhat.com>
8208
8209 * python/python-internal.h (gdb_PyObject_CallMethod)
8210 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8211 New functions.
8212 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8213 (PySys_GetObject, PySys_SetPath): New macros.
8214
8215 2017-04-05 Pedro Alves <palves@redhat.com>
8216
8217 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8218 info_osdata_command.
8219 * osdata.c (info_osdata_command): Rename to ...
8220 (info_osdata): ... this. Constify 'type' parameter, and remove
8221 the 'from_tty' parameter. Accept NULL TYPE.
8222 (info_osdata_command): New function.
8223 * osdata.h (info_osdata_command): Remove declaration.
8224 (info_osdata): New declaration.
8225
8226 2017-04-05 Pedro Alves <palves@redhat.com>
8227
8228 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8229 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8230 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8231 parameter.
8232 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8233 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8234 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8235 parameter.
8236 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8237 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8238 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8239 (mi_cmd_file_list_exec_source_files)
8240 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8241 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8242 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8243 parameter.
8244 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8245 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8246 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8247 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8248 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8249 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8250 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8251 'command' parameter.
8252 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8253 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8254 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8255 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8256 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8257 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8258 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8259 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8260 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8261 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8262 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8263 parameter.
8264 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8265 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8266 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8267 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8268 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8269 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8270 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8271 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8272 (mi_cmd_data_list_changed_registers)
8273 (mi_cmd_data_write_register_values)
8274 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8275 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8276 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8277 (mi_cmd_list_features, mi_cmd_list_target_features)
8278 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8279 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8280 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8281 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8282 (mi_cmd_trace_frame_collected): Constify 'command'
8283 parameter.
8284 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8285 'command' parameter.
8286
8287 2017-04-05 Pedro Alves <palves@redhat.com>
8288
8289 * ada-lang.c (ada_completer_word_break_characters): Now a const
8290 array.
8291 (ada_get_gdb_completer_word_break_characters): Constify.
8292 * completer.c (gdb_completer_command_word_break_characters)
8293 (gdb_completer_file_name_break_characters)
8294 (gdb_completer_quote_characters): Now const arrays.
8295 (get_gdb_completer_quote_characters): Constify.
8296 (set_rl_completer_word_break_characters): New function.
8297 (set_gdb_completion_word_break_characters)
8298 (complete_line_internal): Use it.
8299 * completer.h (get_gdb_completer_quote_characters): Constify.
8300 (set_rl_completer_word_break_characters): Declare.
8301 * f-lang.c (f_word_break_characters): Constify.
8302 * language.c (default_word_break_characters): Constify.
8303 * language.h (language_defn::la_word_break_characters): Constify.
8304 (default_word_break_characters): Constify.
8305 * top.c (init_main): Use set_rl_completer_word_break_characters.
8306
8307 2017-04-05 Pedro Alves <palves@redhat.com>
8308
8309 * aix-thread.c (aix_thread_pid_to_str)
8310 (aix_thread_extra_thread_info): Constify.
8311 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8312 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8313 (bsd_uthread_pid_to_str): Constify.
8314 * corelow.c (core_pid_to_str): Constify.
8315 * darwin-nat.c (darwin_pid_to_str): Constify.
8316 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8317 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8318 Constify.
8319 * gnu-nat.c (gnu_pid_to_str): Constify.
8320 * go32-nat.c (go32_pid_to_str): Constify.
8321 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8322 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8323 * inferior.c (inferior_pid_to_str): Constify.
8324 * linux-nat.c (linux_nat_pid_to_str): Constify.
8325 * linux-tdep.c (linux_core_pid_to_str): Constify.
8326 * linux-thread-db.c (thread_db_pid_to_str)
8327 (thread_db_extra_thread_info): Constify.
8328 * nto-tdep.c (nto_extra_thread_info): Constify.
8329 * nto-tdep.h (nto_extra_thread_info): Constify.
8330 * obsd-nat.c (obsd_pid_to_str): Constify.
8331 * procfs.c (procfs_pid_to_str): Constify.
8332 * ravenscar-thread.c (ravenscar_extra_thread_info)
8333 (ravenscar_pid_to_str): Constify.
8334 * remote-sim.c (gdbsim_pid_to_str): Constify.
8335 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8336 Constify.
8337 * sol-thread.c (solaris_pid_to_str): Constify.
8338 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8339 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8340 * target.c (default_pid_to_str, target_pid_to_str)
8341 (normal_pid_to_str, default_pid_to_str): Constify.
8342 * target.h (target_ops::to_pid_to_str)
8343 (target_ops::to_extra_thread_info): Constify.
8344 (target_pid_to_str, normal_pid_to_str): Constify.
8345 * windows-nat.c (windows_pid_to_str): Constify.
8346 * gdbarch.sh (core_pid_to_str): Constify.
8347 * target-delegates.c: Regenerate.
8348 * gdbarch.h, gdbarch.c: Regenerate.
8349
8350 2017-04-05 Pedro Alves <palves@redhat.com>
8351
8352 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8353 the memory of the temporary warning_pre_print override.
8354 * utils.c (warning_pre_print): Constify.
8355 * utils.h (warning_pre_print): Constify.
8356
8357 2017-04-05 Pedro Alves <palves@redhat.com>
8358
8359 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8360 (shell_command): New function.
8361 (make_command): Use std::string.
8362 (init_cli_cmds): Register shell_command instead of shell_escape.
8363
8364 2017-04-05 Pedro Alves <palves@redhat.com>
8365
8366 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8367 * tracepoint.c (default_collect): Don't initialize.
8368
8369 2017-04-05 Pedro Alves <palves@redhat.com>
8370
8371 * macroexp.c (macro_buffer::shared): Now a bool.
8372 (init_buffer): Update.
8373 (init_shared_buffer): Constify 'addr' parameter.
8374 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8375 casts.
8376
8377 2017-04-05 Pedro Alves <palves@redhat.com>
8378
8379 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8380 * disasm.c (set_disassembler_options): Constify local.
8381 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8382
8383 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8384
8385 PR gdb/21352
8386 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8387 option.
8388
8389 2017-04-05 Yao Qi <yao.qi@linaro.org>
8390
8391 * frame.c (frame_unwind_register_unsigned): Call
8392 frame_unwind_register_value.
8393
8394 2017-04-05 Yao Qi <yao.qi@linaro.org>
8395
8396 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8397 Use gdb_test_multiple, and don't match anchor.
8398
8399 2017-04-05 Pedro Alves <palves@redhat.com>
8400
8401 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8402 (Write After Approval): Remove Simon Marchi.
8403
8404 2017-04-05 Pedro Alves <palves@redhat.com>
8405
8406 * common/gdb_optional.h (optional::optional): Make constexpr and
8407 initialize m_dummy.
8408
8409 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8410
8411 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8412 (amd64fbsd_jmp_buf_reg_offset): Remove.
8413 (amd64fbsd_supply_uthread): Remove function.
8414 (amd64fbsd_collect_uthread): Remove function.
8415 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8416 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8417 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8418 (fbsd-nat.c): Update comment.
8419 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8420 (i386fbsd_jmp_buf_reg_offset): Remove.
8421 (i386fbsd_supply_uthread): Remove function.
8422 (i386fbsd_collect_uthread): Remove function.
8423 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8424
8425 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8426
8427 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8428 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8429 * NEWS: Mention that support for FreeBSD/alpha was removed.
8430 * alpha-fbsd-tdep.c: Delete file.
8431 * config/alpha/fbsd.mh: Delete file.
8432 * configure.host: Delete alpha*-*-freebsd* and
8433 alpha*-*-kfreebsd*-gnu.
8434 * configure.tgt: Delete alpha*-*-freebsd* and
8435 alpha*-*-kfreebsd*-gnu.
8436
8437 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8438
8439 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8440 amd64bsd_store_inferior_registers): Use ptid from regcache.
8441
8442 2017-04-04 Pedro Alves <palves@redhat.com>
8443
8444 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8445 data fields, make them private and add "m_" prefixes.
8446 (lnp_state_machine::lnp_state_machine): New ctor.
8447 (record_line, check_line_address, handle_set_discriminator)
8448 (handle_set_address, handle_advance_pc, handle_special_opcode)
8449 (handle_advance_line, handle_set_file, handle_negate_stmt)
8450 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8451 (end_sequence, advance_line): New methods.
8452 (m_gdbarch, m_record_lines_p): New fields.
8453 (lnp_reader_state): Delete.
8454 (dwarf_record_line): Rename to ...
8455 (lnp_state_machine::record_line): ... adjust.
8456 (init_lnp_state_machine): Delete.
8457 (lnp_state_machine::lnp_state_machine): New.
8458 (check_line_address): Rename to ...
8459 (lnp_state_machine::check_line_address): This.
8460 (dwarf_decode_lines_1): Remove reference to "reader_state".
8461 Adjust lnp_state_machine having a non-default ctor. Use bool.
8462 State machine internal state manipulation moved to
8463 lnp_state_machine methods.
8464
8465 2017-04-04 Pedro Alves <palves@redhat.com>
8466
8467 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8468 unittests/offset-type-selftests.c.
8469 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8470 * common/offset-type.h: New file.
8471 * common/preprocessor.h: New file.
8472 * common/traits.h: New file.
8473 * common/valid-expr.h: New file.
8474 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8475 sect_offset and cu_offset strong typedefs throughout.
8476 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8477 typedefs throughout.
8478 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8479 sect_offset and cu_offset strong typedefs throughout.
8480 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8481 typedefs throughout.
8482 * gdbtypes.h: Include "common/offset-type.h".
8483 (cu_offset): Now an offset type (strong typedef) instead of a
8484 struct.
8485 (sect_offset): Likewise.
8486 (union call_site_parameter_u): Rename "param_offset" field to
8487 "param_cu_off".
8488 * unittests/offset-type-selftests.c: New file.
8489
8490 2017-04-04 Pedro Alves <palves@redhat.com>
8491
8492 * common/underlying.h: New file.
8493 * dwarf2read.c: Include "common/gdb_optional.h" and
8494 "common/underlying.h".
8495 (dir_index, file_name_index): New types.
8496 (file_entry): Use them.
8497 (file_entry::include): Use to_underlying.
8498 (line_header::add_file_name): Use dir_index.
8499 (read_formatted_entries): Use gdb::optional. Read form before
8500 writting to file_entry.
8501 (dwarf_decode_line_header): Use dir_index.
8502 (lnp_state_machine::current_file): Use to_underlying.
8503 (lnp_state_machine::file): Change type to file_name_index.
8504 (dwarf_record_line): Use to_underlying.
8505 (init_lnp_state_machine): Use file_name_index.
8506 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8507
8508 2017-04-04 Pedro Alves <palves@redhat.com>
8509
8510 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8511 operator bool, has_value and get methods.
8512
8513 2017-04-04 Pedro Alves <palves@redhat.com>
8514
8515 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8516 fields.
8517 (line_header): Initialize all data fields. Change type of
8518 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8519 Change type of include_dirs to std::vector<const char *>. Remove
8520 num_include_dirs, include_dirs_size. Change type of file_names to
8521 std::vector<file_entry>. Remove num_file_names, file_names_size.
8522 (line_header::line_header): New.
8523 (line_header::add_include_dir, line_header::add_file_name): New
8524 methods.
8525 (line_header::include_dir_at): Remove NULL check.
8526 (line_header::file_name_at): Add const overload.
8527 (line_header_up): New unique_ptr typedef.
8528 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8529 std::vector. Remove free_line_header call.
8530 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8531 free_line_header call.
8532 (free_cu_line_header): Delete.
8533 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8534 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8535 Adjust to use std::vector.
8536 (free_line_header): Delete.
8537 (free_line_header_voidp): Use delete.
8538 (add_include_dir): Replace with ...
8539 (line_header::add_include_dir): ... this method. Use std::vector.
8540 (add_file_name): Replace with ...
8541 (line_header::add_file_name): ... this method. Use std::vector.
8542 (add_include_dir_stub): Delete.
8543 (read_formatted_entries): Remove memset.
8544 (dwarf_decode_line_header): Return a line_header_up instead of a
8545 raw pointer. Remove cleanup handling. Pass lambdas to
8546 read_formatted_entries. Adjust to use line_header methods.
8547 (dwarf_decode_lines_1): Adjust to use line_header methods.
8548 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8549 use std::vector.
8550
8551 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8552
8553 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8554 instead of struct ptid.
8555
8556 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8557
8558 * frame.c (get_frame_register_bytes): Unwind using value.
8559 (put_frame_register_bytes): Likewise.
8560
8561 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8562
8563 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8564 aggregate-like.
8565
8566 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8567
8568 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8569
8570 2017-03-29 Yao Qi <yao.qi@linaro.org>
8571
8572 * gdbthread.h (struct thread_info): Declare constructor and
8573 destructor. Add some in-class member initializers.
8574 * thread.c (free_thread): Remove.
8575 (init_thread_list): Call delete instead of free_thread.
8576 (new_thread): Call thread_info constructor.
8577 (thread_info::thread_info): New function.
8578 (thread_info::~thread_info): New function.
8579 (delete_thread_1): Call delete instead of free_thread.
8580 (make_cleanup_restore_current_thread): Move tp and frame to
8581 inner block.
8582
8583 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8584
8585 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8586 (arc_skip_prologue): Likewise.
8587 (arc_make_frame_cache): Likewise.
8588 (arc_pv_get_operand): New function.
8589 (arc_is_in_prologue): Likewise.
8590 (arc_analyze_prologue): Likewise.
8591 (arc_print_frame_cache): Likewise.
8592 (MAX_PROLOGUE_LENGTH): New constant.
8593
8594 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8595
8596 * configure.tgt: Add arc-insn.o.
8597 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8598 (dump_arc_instruction_command): New function.
8599 (arc_fprintf_disasm): Likewise.
8600 (arc_disassemble_info): Likewise.
8601 (arc_insn_get_operand_value): Likewise.
8602 (arc_insn_get_operand_value_signed): Likewise.
8603 (arc_insn_get_memory_base_reg): Likewise.
8604 (arc_insn_get_memory_offset): Likewise.
8605 (arc_insn_get_branch_target): Likewise.
8606 (arc_insn_dump): Likewise.
8607 (arc_insn_get_linear_next_pc): Likewise.
8608 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8609 (arc_disassemble_info): Likewise.
8610 (arc_insn_get_branch_target): Likewise.
8611 (arc_insn_get_linear_next_pc): Likewise.
8612 * NEWS: Mention new "maint print arc arc-instruction".
8613
8614 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8615
8616 * arc-tdep (maintenance_print_arc_list): New variable.
8617 (maintenance_print_arc_command): New function.
8618
8619 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8620
8621 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8622 Add "limm" and "reserved".
8623 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8624 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8625 * arc-tdep.h (arc_regnum): Likewise.
8626
8627 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8628
8629 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8630 for THREADPTR register.
8631 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8632 register.
8633 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8634 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8635 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8636
8637 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8638
8639 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8640 registers above gdbarch_num_regs (gdbarch) as privileged in
8641 call0 ABI.
8642
8643 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8644
8645 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8646 for a single specified register or for all registers in
8647 a0_base..a0_base + C0_NREGS range.
8648 (supply_gregset_reg): Call regcache_raw_supply for a single
8649 specified register or for all registers in a0_base..a0_base +
8650 C0_NREGS range.
8651
8652 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8653
8654 * arch/xtensa.h (C0_NREGS): Add definition.
8655 * xtensa-tdep.c (C0_NREGS): Remove definition.
8656
8657 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8658
8659 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8660 Drop xtensa_default_isa initialization.
8661 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8662
8663 2017-03-27 Pedro Alves <palves@redhat.com>
8664
8665 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8666 (file_entry::include_dir): New method.
8667 (line_header::include_dir_at, line_header::file_name_at): New
8668 methods.
8669 (setup_type_unit_groups, setup_type_unit_groups)
8670 (psymtab_include_file_name): Simplify using the new methods.
8671 (lnp_state_machine) <the_line_header>: New field.
8672 <file>: Add comment.
8673 (lnp_state_machine::current_file): New method.
8674 (dwarf_record_line): Simplify using the new methods.
8675 (init_lnp_state_machine): Initialize the "the_line_header" field.
8676 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8677 Simplify using the new methods.
8678
8679 2017-03-27 Pedro Alves <palves@redhat.com>
8680
8681 * cp-name-parser.y (make_empty): Delete.
8682 (demangler_special, nested_name, ptr_operator, array_indicator)
8683 (direct_declarator, declarator_1): Use fill_comp instead of
8684 make_empty.
8685
8686 2017-03-27 Pedro Alves <palves@redhat.com>
8687
8688 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8689 to ATTRIBUTE_PRINTF.
8690 * solib-target.c (library_list_start_list): Print "string" not
8691 "version".
8692 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8693 gdb_xml_error call.
8694
8695 2017-03-27 Pedro Alves <palves@redhat.com>
8696
8697 * dwarf2read.c (struct file_and_directory): New.
8698 (dwarf2_get_dwz_file): Adjust to use std::string.
8699 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8700 (find_file_and_directory): Adjust to return a file_and_directory
8701 object.
8702 (read_file_scope): Adjust to use file_and_directory. Remove
8703 make_cleanup/do_cleanups calls.
8704 (open_and_init_dwp_file): Adjust to use std::string. Remove
8705 make_cleanup/do_cleanups calls.
8706 * python/python.c (do_start_initialization): Adjust to ldirname
8707 returning a std::string.
8708 * utils.c (ldirname): Now returns a std::string.
8709 * utils.h (ldirname): Change return type to std::string.
8710 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8711 returning a std::string.
8712 * xml-tdesc.c (file_read_description_xml): Likewise.
8713
8714 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8715
8716 * regcache.c (regcache_debug_print_register): New function.
8717 * regcache.h (regcache_debug_print_register): New declaration.
8718 * target.c (debug_print_register): Remove.
8719 (target_fetch_registers): Call regcache_debug_print_register.
8720 (target_store_registers): Likewise.
8721
8722 2017-03-24 Pádraig Brady <pbrady@fb.com>
8723
8724 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8725 reference beyond the 'lh->include_dirs' array before accessing to
8726 it.
8727 (psymtab_include_file_name): Likewise.
8728 (dwarf_decode_lines_1): Likewise.
8729 (dwarf_decode_lines): Likewise.
8730 (file_file_name): Likewise.
8731
8732 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8733
8734 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8735 inferior_ptid.
8736 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8737 ps_lsetfpregs): Likewise.
8738 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8739 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8740 ps_lsetfpregs): Likewise.
8741 * target.c (target_fetch_registers, target_store_registers):
8742 Remove asserts.
8743
8744 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8745
8746 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8747
8748 2017-03-23 Yao Qi <yao.qi@linaro.org>
8749
8750 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8751 (_initialize_aarch64_tdep): Register it.
8752 (aarch64_record_load_store): Handle PRFM instruction.
8753 (aarch64_process_record_test): New function.
8754
8755 2017-03-23 Yao Qi <yao.qi@linaro.org>
8756
8757 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8758 indentation.
8759
8760 2017-03-23 Yao Qi <yao.qi@linaro.org>
8761
8762 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8763
8764 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8765
8766 python/python.c (do_start_initialization): Fix memory leak.
8767
8768 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8769
8770 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8771 using get_ptrace_pid.
8772 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8773 inferior_ptid.
8774 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8775 inferior_ptid instead of pid.
8776
8777 2017-03-22 Yao Qi <yao.qi@linaro.org>
8778
8779 * aarch64-tdep.c: Wrap locally used classes in anonymous
8780 namespace.
8781 * arm-tdep.c: Likewise.
8782 * linespec.c: Likewise.
8783 * ui-out.c: Likewise.
8784
8785 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8786
8787 PR gdb/19637
8788 * python/lib/gdb/printer/bound_registers.py: Import sys.
8789
8790 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8791
8792 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8793 windows_thread_info parameter and use it instead of
8794 current_thread.
8795 (windows_fetch_inferior_registers): Don't set current_thread,
8796 pass the thread to do_windows_fetch_inferior_registers. Use
8797 ptid from regcache instead of inferior_ptid.
8798 (do_windows_store_inferior_registers): Add windows_thread_info
8799 parameter and use it instead of current_thread.
8800 (windows_store_inferior_registers): Don't set current_thread,
8801 pass the thread to do_windows_store_inferior_registers. Use
8802 ptid from regcache instead of inferior_ptid.
8803
8804 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8805
8806 * ser-mingw.c (ser_windows_raw): Remove reference to
8807 struct serial::current_timeout.
8808
8809 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8810
8811 PR tdep/20928
8812 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8813 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8814 (sparc64_fsr_type): Fix %fsr decoding.
8815
8816 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8817
8818 * python/py-record-btrace.c (btpy_insn_data): Change return type
8819 for Python 2.
8820
8821 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8822
8823 * spu-linux-nat.c (spu_fetch_inferior_registers,
8824 spu_store_inferior_registers): Use ptid from regcache, set and
8825 restore inferior_ptid.
8826 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8827 Likewise.
8828
8829 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8830
8831 * i386-linux-nat.c (fetch_register, store_register,
8832 i386_linux_fetch_inferior_registers,
8833 i386_linux_store_inferior_registers): Use ptid from regcache.
8834 * ia64-linux-nat.c (ia64_linux_fetch_register,
8835 ia64_linux_store_register): Likewise.
8836 * inf-ptrace.c (inf_ptrace_fetch_register,
8837 inf_ptrace_store_register): Likewise.
8838 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8839 m32r_linux_store_inferior_registers): Likewise.
8840 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8841 m68kbsd_store_inferior_registers): Likewise.
8842 * m68k-linux-nat.c (fetch_register, store_register,
8843 m68k_linux_fetch_inferior_registers,
8844 m68k_linux_store_inferior_registers): Likewise.
8845 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8846 m88kbsd_store_inferior_registers): Likewise.
8847 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8848 mips_fbsd_store_inferior_registers): Likewise.
8849 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8850 mips64_linux_regsets_store_registers): Likewise.
8851 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8852 mipsnbsd_store_inferior_registers): Likewise.
8853 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8854 mips64obsd_store_inferior_registers): Likewise.
8855 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8856 Likewise.
8857 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8858 ppcfbsd_store_inferior_registers): Likewise.
8859 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8860 ppc_linux_store_inferior_registers): Likewise.
8861 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8862 ppcnbsd_store_inferior_registers): Likewise.
8863 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8864 ppcobsd_store_registers): Likewise.
8865 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8866 Likewise.
8867 * ravenscar-thread.c (ravenscar_fetch_registers,
8868 ravenscar_store_registers, ravenscar_prepare_to_store):
8869 Likewise.
8870 * record-btrace.c (record_btrace_fetch_registers,
8871 record_btrace_store_registers, record_btrace_prepare_to_store):
8872 Likewise.
8873 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8874 Lookup inferior using ptid from regcache, instead of
8875 current_inferior.
8876 * remote.c (remote_fetch_registers, remote_store_registers): Use
8877 ptid from regcache.
8878 * rs6000-nat.c (fetch_register, store_register): Likewise.
8879 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8880 s390_linux_store_inferior_registers): Likewise.
8881 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8882 shnbsd_store_inferior_registers): Likewise.
8883 * sol-thread.c (sol_thread_fetch_registers,
8884 sol_thread_store_registers): Likewise.
8885 * sparc-nat.c (sparc_fetch_inferior_registers,
8886 sparc_store_inferior_registers): Likewise.
8887 * tilegx-linux-nat.c (fetch_inferior_registers,
8888 store_inferior_registers): Likewise.
8889 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8890 vaxbsd_store_inferior_registers): Likewise.
8891 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8892 store_xtregs): Likewise.
8893
8894 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8895
8896 PR gdb/14441
8897 * NEWS: Mention support for rvalue references in GDB and python.
8898 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8899 supports both lvalue and rvalue references.
8900
8901 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8902
8903 PR gdb/14441
8904 * gdbtypes.c (rank_one_type): Implement overloading
8905 resolution rules regarding rvalue references.
8906
8907 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8908
8909 PR gdb/14441
8910 * aarch64-tdep.c (aarch64_type_align)
8911 (aarch64_extract_return_value, aarch64_store_return_value): Change
8912 lvalue reference type checks to general reference type checks.
8913 * amd64-tdep.c (amd64_classify): Likewise.
8914 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8915 Likewise.
8916 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8917 (arm_store_return_value): Likewise.
8918 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8919 * c-typeprint.c (c_print_type): Likewise.
8920 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8921 (cplus_number_of_children, cplus_describe_child): Likewise.
8922 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8923 * completer.c (expression_completer): Likewise.
8924 * cp-support.c (make_symbol_overload_list_adl_namespace):
8925 Likewise.
8926 * darwin-nat-info.c (info_mach_region_command): Likewise.
8927 * dwarf2loc.c (entry_data_value_coerce_ref)
8928 (value_of_dwarf_reg_entry): Likewise.
8929 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8930 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8931 Likewise.
8932 * findvar.c (extract_typed_address, store_typed_address):
8933 Likewise.
8934 * gdbtypes.c (rank_one_type): Likewise.
8935 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8936 * infcall.c (value_arg_coerce): Likewise.
8937 * language.c (pointer_type): Likewise.
8938 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8939 Likewise.
8940 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8941 * mn10300-tdep.c (mn10300_type_align): Likewise.
8942 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8943 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8944 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8945 Likewise.
8946 * printcmd.c (print_formatted, x_command): Likewise.
8947 * python/py-type.c (typy_get_composite, typy_template_argument):
8948 Likewise.
8949 * python/py-value.c (valpy_referenced_value)
8950 (valpy_get_dynamic_type, value_has_field): Likewise.
8951 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8952 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8953 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8954 * spu-tdep.c (spu_scalar_value_p): Likewise.
8955 * symtab.c (lookup_symbol_aux): Likewise.
8956 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8957 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8958 Likewise.
8959 * valops.c (value_cast_pointers, value_cast)
8960 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8961 (value_struct_elt, value_struct_elt_bitpos)
8962 (value_find_oload_method_list, find_overload_match)
8963 (value_rtti_indirect_type): Likewise.
8964 * valprint.c (val_print_scalar_type_p, generic_val_print):
8965 Likewise.
8966 * value.c (value_actual_type, value_as_address, unpack_long)
8967 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8968 (coerce_ref): Likewise.
8969 * varobj.c (varobj_get_value_type): Likewise.
8970
8971 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8972
8973 PR gdb/14441
8974 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8975 table of constants.
8976 * python/lib/gdb/command/explore.py: Support exploring values
8977 of rvalue reference types.
8978 * python/lib/gdb/types.py: Implement get_basic_type() for
8979 rvalue reference types.
8980 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8981 constant.
8982 * python/py-value.c (valpy_getitem): Add an rvalue reference
8983 check.
8984 (valpy_reference_value): Add new parameter "refcode".
8985 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8986 New wrappers for valpy_reference_value().
8987 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8988 (gdbpy_invoke_xmethod): Likewise.
8989
8990 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8991
8992 PR gdb/14441
8993 * dwarf2read.c (process_die, read_type_die_1): Handle the
8994 DW_TAG_rvalue_reference_type DIE.
8995 (read_tag_reference_type): Add new parameter "refcode".
8996
8997 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8998
8999 PR gdb/14441
9000 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9001 (c_type_print_modifier, c_type_print_varspec_suffix)
9002 (c_type_print_base): Support printing rvalue reference types.
9003 * c-valprint.c (c_val_print, c_value_print): Support printing
9004 rvalue reference values.
9005
9006 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9007
9008 PR gdb/14441
9009 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9010 typename.
9011 * cp-support.c (replace_typedefs): Handle
9012 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9013 * python/py-type.c (typy_lookup_type): Likewise.
9014
9015 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9016
9017 PR gdb/14441
9018 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9019 * parse.c (insert_type): Change assert statement.
9020 (follow_types): Handle rvalue reference types.
9021 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9022 constant.
9023
9024 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9025
9026 PR gdb/14441
9027 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9028 value_ref() interface.
9029 * c-valprint.c (c_value_print): Likewise.
9030 * infcall.c (value_arg_coerce): Likewise.
9031 * python/py-value.c (valpy_reference_value): Likewise.
9032 * valops.c (value_cast, value_reinterpret_cast)
9033 (value_dynamic_cast, typecmp): Likewise.
9034 (value_ref): Parameterize by kind of return value reference type.
9035 * value.h (value_ref): Add new parameter "refcode".
9036
9037 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9038
9039 PR gdb/14441
9040 * dwarf2read.c (read_tag_reference_type): Use
9041 lookup_lvalue_reference_type() instead of lookup_reference_type().
9042 * eval.c (evaluate_subexp_standard): Likewise.
9043 * f-exp.y: Likewise.
9044 * gdbtypes.c (make_reference_type, lookup_reference_type):
9045 Generalize with rvalue reference types.
9046 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9047 convenience wrappers for lookup_reference_type().
9048 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9049 reference kind parameter.
9050 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9051 wrappers for lookup_reference_type().
9052 * guile/scm-type.c (gdbscm_type_reference): Use
9053 lookup_lvalue_reference_type() instead of lookup_reference_type().
9054 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9055 * parse.c (follow_types): Likewise.
9056 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9057 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9058 Likewise.
9059 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9060 (gdbpy_invoke_xmethod): Likewise.
9061 * stabsread.c: Provide extra argument to make_reference_type()
9062 call.
9063 * valops.c (value_ref, value_rtti_indirect_type): Use
9064 lookup_lvalue_reference_type() instead of lookup_reference_type().
9065
9066 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9067
9068 PR gdb/14441
9069 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9070 (TYPE_IS_REFERENCE): New macro.
9071 (struct type): Add rvalue_reference_type field.
9072 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9073
9074 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9075
9076 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9077 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9078 New function definition.
9079 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9080 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9081 New function declaration.
9082 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9083 * mi/mi-interp.h: New file.
9084 * solib.c (info_sharedlibrary_command): Replace for loop with
9085 ALL_SO_LIBS macro
9086 * solib.h (update_solib_list): New function declaration.
9087 (so_list_head): Move macro.
9088 * solist.h (ALL_SO_LIBS): New macro.
9089
9090 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9091
9092 * infcmd.c (post_create_inferior): Remove unused argument in
9093 call to solib_add.
9094 * remote.c (remote_start_remote): Likewise.
9095 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9096 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9097 (enable_break): Likewise.
9098 * solib.c (update_solib_list): Remove unused target argument
9099 and its documentation.
9100 (solib_add): Remove unused target argument. Remove unused
9101 argument in call to update_solib_list.
9102 (info_sharedlibrary_command): Remove unused argument in call
9103 to update_solib_list.
9104 (sharedlibrary_command): Remove unused argument in call to
9105 solib_add.
9106 (handle_solib_event): Likewise.
9107 (reload_shared_libraries): Likewise.
9108 * solib.h (solib_add): Remove unused target argument.
9109
9110 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9111
9112 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9113 (s390_displaced_step_fixup): Cover relative branches with the
9114 default fixup handling. This fixes lack of support for some
9115 relative branch instructions.
9116
9117 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9118
9119 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9120 ptid from regcache.
9121
9122 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9123
9124 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9125 i386_darwin_store_inferior_registers): Use ptid from regcache.
9126
9127 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9128
9129 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9130 i386bsd_store_inferior_registers): Use ptid from regcache.
9131
9132 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9133
9134 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9135 hppaobsd_store_registers): Use ptid from regcache.
9136
9137 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9138
9139 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9140 hppanbsd_store_registers): Use ptid from regcache.
9141
9142 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9143
9144 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9145 from regcache. Use get_ptrace_pid.
9146
9147 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9148
9149 * corelow.c (get_core_register_section): Use ptid from regcache,
9150 update doc.
9151
9152 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9153
9154 * bsd-uthread.c (bsd_uthread_fetch_registers,
9155 bsd_uthread_store_registers): Use ptid from regcache, set and
9156 restore inferior_ptid.
9157
9158 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9159
9160 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9161 fetch_fp_regs, store_register, store_regs, store_fp_register,
9162 store_fp_regs): Use ptid from regcache.
9163
9164 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9165
9166 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9167 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9168 store_vfp_regs): Use ptid from regcache.
9169
9170 2017-03-17 Pedro Alves <palves@redhat.com>
9171
9172 PR remote/21188
9173 * ser-base.c (ser_base_wait_for): Add comment.
9174 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9175 version.
9176 * ser-unix.c (hardwire_raw): Remove reference to
9177 scb->current_timeout.
9178 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9179 (hardwire_ops): Install ser_base_readchar instead of
9180 hardwire_readchar.
9181 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9182 Remove fields.
9183
9184 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9185
9186 PR gdb/19637
9187 * python/lib/gdb/printer/bound_registers.py: Add support for
9188 Python 3.
9189
9190 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9191
9192 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9193 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9194 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9195 byte_offset to subobj_byte_offset. Fix the handling of
9196 DWARF_VALUE_STACK on big-endian targets when coming via an
9197 implicit pointer.
9198 (dwarf2_evaluate_loc_desc): Adjust call to
9199 dwarf2_evaluate_loc_desc_full.
9200 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9201 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9202
9203 2017-03-16 Yao Qi <yao.qi@linaro.org>
9204
9205 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9206 and REVSH instructions.
9207
9208 2017-03-16 Yao Qi <yao.qi@linaro.org>
9209
9210 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9211 (arm_record_test): Declare.
9212 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9213 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9214 align with the manual.
9215 (thumb_record_misc): Adjust the code order to align with the
9216 manual.
9217 (thumb2_record_decode_insn_handler): Fix instruction matching.
9218 (instruction_reader_thumb): New class.
9219 (arm_record_test): New function.
9220
9221 2017-03-16 Yao Qi <yao.qi@linaro.org>
9222
9223 * arm-tdep.c (abstract_memory_reader): New class.
9224 (instruction_reader): New class.
9225 (extract_arm_insn): Add argument 'reader'. Callers updated.
9226 (decode_insn): Likewise.
9227
9228 2017-03-16 Doug Evans <dje@google.com>
9229
9230 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9231 member. Change type of TYPE member to SCM. All uses updated.
9232 (lsscm_make_lazy_string_smob): Add assert.
9233 (lsscm_make_lazy_string): Flag bad length values.
9234 (lsscm_elt_type): New function.
9235 (gdbscm_lazy_string_to_value): Rewrite to use
9236 lsscm_safe_lazy_string_to_value.
9237 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9238 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9239 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9240 in incoming type.
9241 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9242 * guile/scm-type.c (tyscm_scm_to_type): New function.
9243
9244 2017-03-15 Doug Evans <dje@google.com>
9245
9246 PR python/17728, python/18439, python/18779
9247 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9248 member. Change type of TYPE member to PyObject *. All uses updated.
9249 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9250 (gdbpy_create_lazy_string_object): Flag bad length values.
9251 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9252 Handle typedefs in incoming type.
9253 (stpy_lazy_string_elt_type): New function.
9254 (gdbpy_extract_lazy_string): Call it.
9255 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9256 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9257 typedefs in incoming type.
9258
9259 2017-03-16 Doug Evans <dje@google.com>
9260
9261 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9262 * guile/scm-type.c (tyscm_scm_to_type): New function.
9263
9264 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9265
9266 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9267 "ULONGEST" for "skip".
9268
9269 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9270
9271 PR gdb/21220
9272 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9273 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9274 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9275 over ptrace peek/poke until end of buffer or error.
9276
9277 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9278
9279 * parse.c (length_of_subexp): Make static.
9280 * parser-defs.h (length_of_subexp): Remove.
9281
9282 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9283
9284 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9285 as well.
9286
9287 2017-03-14 Pedro Alves <palves@redhat.com>
9288
9289 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9290 (main): Use std::unique_ptr. Remove calls to
9291 cp_demangled_name_parse_free.
9292
9293 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9294
9295 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9296 alphabsd_store_inferior_registers): Use regcache->ptid instead
9297 of inferior_ptid.
9298
9299 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9300
9301 * aix-thread.c (aix_thread_fetch_registers,
9302 aix_thread_store_registers): Use regcache->ptid instead of
9303 inferior_ptid.
9304
9305 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9306
9307 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9308 store_gregs_to_thread, fetch_fpregs_from_thread,
9309 store_fpregs_to_thread): Use regcache->ptid instead of
9310 inferior_ptid.
9311
9312 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9313
9314 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9315 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9316 instead of inferior_ptid.
9317
9318 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9319
9320 * target.c (target_fetch_registers, target_store_registers): Add
9321 assert.
9322
9323 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9324
9325 * regcache.h (regcache_get_ptid): New function.
9326 * regcache.c (regcache_get_ptid): New function.
9327
9328 2017-03-13 Mark Wielaard <mark@klomp.org>
9329
9330 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9331
9332 2017-03-10 Keith Seitz <keiths@redhat.com>
9333
9334 PR c++/8218
9335 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9336
9337 2017-03-08 Pedro Alves <palves@redhat.com>
9338
9339 PR gdb/18360
9340 * infrun.c (start_step_over, do_target_resume, resume)
9341 (restart_threads): Assert we're not resuming a thread that is
9342 meant to be stopped.
9343 (infrun_thread_stop_requested_callback): Delete.
9344 (infrun_thread_stop_requested): If the thread is internally
9345 stopped, queue a pending stop event and clear the thread's
9346 inline-frame state.
9347 (handle_stop_requested): New function.
9348 (handle_syscall_event, handle_inferior_event_1): Use
9349 handle_stop_requested.
9350 (handle_stop_requested): New function.
9351 (handle_signal_stop): Set the thread's stop_signal here instead of
9352 at caller.
9353 (finish_step_over): Clear step over info unconditionally.
9354 (handle_signal_stop): If the user had interrupted the event
9355 thread, consider the stop a random signal.
9356 (handle_signal_stop) <signal arrived while stepping over
9357 breakpoint>: Don't restart threads here.
9358 (stop_waiting): Don't clear step-over info here.
9359
9360 2017-03-08 Pedro Alves <palves@redhat.com>
9361
9362 PR 21206
9363 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9364 goes to argument 2, not 1.
9365
9366 2017-03-08 Pedro Alves <palves@redhat.com>
9367
9368 PR cli/21218
9369 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9370 display_gdb_prompt.
9371 (command_line_input): Add comment.
9372
9373 2017-03-08 Pedro Alves <palves@redhat.com>
9374
9375 PR tui/21216
9376 * tui/tui-file.c (tui_file::write): New.
9377 * tui/tui-file.h (tui_file): Override "write".
9378 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9379 factored out from ...
9380 (tui_puts): ... here.
9381 (tui_putc): Use them.
9382 (tui_write): New function.
9383 * tui/tui-io.h (tui_write): Declare.
9384
9385 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9386
9387 * Makefile.in (SFILES): Replace "environ.c" with
9388 "common/environ.c".
9389 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9390 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9391 to...
9392 * common/environ.c: ... here.
9393 * environ.h: Moved to...
9394 * common/environ.h: ... here.
9395
9396 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9397
9398 * gdbarch.sh (pstring_ptr): New static function.
9399 (gdbarch_disassembler_options): Use it.
9400 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9401 not valid_disassembler_option->name.
9402 * gdbarch.c: Regenerate.
9403
9404 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9405
9406 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9407
9408 2017-03-07 Pedro Alves <palves@redhat.com>
9409
9410 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9411
9412 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9413
9414 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9415 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9416 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9417 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9418
9419 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9420
9421 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9422
9423 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9424
9425 * remote.c (remote_add_target_side_commands): Use range-based
9426 for loop.
9427
9428 2017-03-03 Yao Qi <yao.qi@linaro.org>
9429
9430 PR gdb/21165
9431 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9432 value is lazy.
9433 * valprint.c (common_val_print): Likewise.
9434
9435 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9436
9437 * NEWS: Mention new set/show disassembler-options commands.
9438 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9439 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9440 (prospective_options): New static variable.
9441 (gdb_disassembler::gdb_disassembler): Initialize
9442 m_di.disassembler_options.
9443 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9444 (get_disassembler_options): New function.
9445 (set_disassembler_options): Likewise.
9446 (set_disassembler_options_sfunc): Likewise.
9447 (show_disassembler_options_sfunc): Likewise.
9448 (disassembler_options_completer): Likewise.
9449 (_initialize_disasm): Likewise.
9450 * disasm.h (get_disassembler_options): New prototype.
9451 (set_disassembler_options): Likewise.
9452 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9453 (gdbarch_verify_disassembler_options): Likewise.
9454 * gdbarch.c: Regenerate.
9455 * gdbarch.h: Likewise.
9456 * arm-tdep.c (num_disassembly_options): Delete.
9457 (set_disassembly_style): Likewise.
9458 (arm_disassembler_options): New static variable.
9459 (set_disassembly_style_sfunc): Convert short style name into long
9460 option name. Call set_disassembler_options.
9461 (show_disassembly_style_sfunc): New function.
9462 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9463 set_gdbarch_verify_disassembler_options.
9464 (_initialize_arm_tdep): Delete regnames variable and update callers.
9465 (arm_disassembler_options): Initialize.
9466 (disasm_options): New variable.
9467 (num_disassembly_options): Rename from this...
9468 (num_disassembly_styles): ...to this. Compute by scanning through
9469 disasm_options.
9470 (valid_disassembly_styles): Initialize using disasm_options.
9471 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9472 set_arm_regname_option.
9473 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9474 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9475 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9476 set_gdbarch_verify_disassembler_options.
9477 * s390-tdep.c (s390_disassembler_options): New static variable.
9478 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9479 set_gdbarch_verify_disassembler_options.
9480
9481 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9482
9483 * remote.c (remote_add_target_side_condition): Remove "struct"
9484 keyword from range-based for loop.
9485
9486 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9487
9488 * remote.c (remote_add_target_side_condition): Use range-based
9489 for loop. Update comment.
9490
9491 2017-02-27 Yao Qi <yao.qi@linaro.org>
9492
9493 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9494
9495 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9496
9497 * regcache.c (regcache_raw_update): New function.
9498 (regcache_raw_read): Move code to regcache_raw_update.
9499 * regcache.h (regcache_raw_update): New declaration.
9500 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9501
9502 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9503
9504 * dwarf2read.c (create_debug_type_hash_table): Initialize
9505 header.signature and header.type_offset_in_tu.
9506
9507 2017-02-24 Pedro Alves <palves@redhat.com>
9508
9509 * symtab.c (make_file_symbol_completion_list_1): Use
9510 add_symtab_completions.
9511
9512 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9513
9514 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9515
9516 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9517
9518 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9519 I386_MAX_REGISTER_SIZE.
9520 (i386_pseudo_register_write): Likewise.
9521 (i386_process_record): Likewise.
9522 * i387-tdep.c (i387_supply_xsave): Likewise.
9523 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9524 (store_register): Likewise.
9525
9526 2017-02-23 Pedro Alves <palves@redhat.com>
9527
9528 * ada-lang.c: Include "common/function-view.h".
9529 (ada_iterate_over_symbols): Adjust to use function_view as
9530 callback type.
9531 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9532 (ada_make_symbol_completion_list): Use a lambda.
9533 (ada_exc_search_name_matches): Delete.
9534 (name_matches_regex): New.
9535 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9536 * compile/compile-c-support.c: Include "common/function-view.h".
9537 (print_one_macro): Change prototype to accept a ui_file pointer.
9538 (write_macro_definitions): Use a lambda.
9539 * dwarf2read.c: Include "common/function-view.h".
9540 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9541 (dw2_expand_symtabs_matching): Adjust to use function_view as
9542 callback type.
9543 * language.h: Include "common/function-view.h".
9544 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9545 function_view as callback type.
9546 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9547 * linespec.c: Include "common/function-view.h".
9548 (collect_info::add_symbol): New method.
9549 (struct symbol_and_data_callback, iterate_inline_only, struct
9550 symbol_matcher_data, iterate_name_matcher): Delete.
9551 (iterate_over_all_matching_symtabs): Adjust to use function_view
9552 as callback type and lambdas.
9553 (iterate_over_file_blocks): Adjust to use function_view as
9554 callback type.
9555 (decode_compound_collector): Now a class with private fields.
9556 (decode_compound_collector::release_symbols): New method.
9557 (collect_one_symbol): Rename to...
9558 (decode_compound_collector::operator()): ... this and adjust.
9559 (lookup_prefix_sym): decode_compound_collector construction bits
9560 move to decode_compound_collector ctor. Pass the
9561 decode_compound_collector object directly as callback. Remove
9562 cleanups and use decode_compound_collector::release_symbols
9563 instead.
9564 (symtab_collector): Now a class with private fields.
9565 (symtab_collector::release_symtabs): New method.
9566 (add_symtabs_to_list): Rename to...
9567 (symtab_collector::operator()): ... this and adjust.
9568 (collect_symtabs_from_filename): symtab_collector construction
9569 bits move to symtab_collector ctor. Pass the symtab_collector
9570 object directly as callback. Remove cleanups and use
9571 symtab_collector::release_symtabs instead.
9572 (collect_symbols): Delete.
9573 (add_matching_symbols_to_info): Use lambdas.
9574 * macrocmd.c (print_macro_callback): Delete.
9575 (info_macro_command): Use a lambda.
9576 (info_macros_command): Pass print_macro_definition as callable
9577 directly.
9578 (print_one_macro): Remove 'ignore' parameter.
9579 (macro_list_command): Adjust.
9580 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9581 (macro_for_each_data::user_data): Delete field.
9582 (foreach_macro): Adjust to call the function_view.
9583 (macro_for_each): Adjust to use function_view as callback type.
9584 (foreach_macro_in_scope): Adjust to call the function_view.
9585 (macro_for_each_in_scope): Adjust to use function_view as callback
9586 type.
9587 * macrotab.h: Include "common/function-view.h".
9588 (macro_callback_fn): Declare a prototype instead of a pointer.
9589 Remove "user_data" parameter.
9590 (macro_for_each, macro_for_each_in_scope): Adjust to use
9591 function_view as callback type.
9592 * psymtab.c (partial_map_expand_apply)
9593 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9594 Adjust to use function_view as callback type and to return bool.
9595 (psym_expand_symtabs_matching): Adjust to use function_view as
9596 callback types.
9597 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9598 to use function_view as callback type and to return bool.
9599 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9600 callback types.
9601 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9602 as callback types.
9603 * symfile.h: Include "common/function-view.h".
9604 (expand_symtabs_file_matcher_ftype)
9605 (expand_symtabs_symbol_matcher_ftype)
9606 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9607 return bool.
9608 (quick_symbol_functions::map_symtabs_matching_filename)
9609 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9610 function_view as callback type and return bool.
9611 (expand_symtabs_matching): Adjust to use function_view as callback
9612 type.
9613 (maintenance_expand_name_matcher)
9614 (maintenance_expand_file_matcher): Delete.
9615 (maintenance_expand_symtabs): Use lambdas.
9616 * symtab.c (iterate_over_some_symtabs): Adjust to use
9617 function_view as callback types and return bool.
9618 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9619 of a cleanup.
9620 (lookup_symtab_callback): Delete.
9621 (lookup_symtab): Use a lambda.
9622 (iterate_over_symbols): Adjust to use function_view as callback
9623 type.
9624 (struct search_symbols_data, search_symbols_file_matches)
9625 (search_symbols_name_matches): Delete.
9626 (search_symbols): Use a pair of lambdas.
9627 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9628 (symtab_expansion_callback): Delete.
9629 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9630 * symtab.h: Include "common/function-view.h".
9631 (iterate_over_some_symtabs): Adjust to use function_view as
9632 callback type and return bool.
9633 (iterate_over_symtabs): Adjust to use function_view as callback
9634 type.
9635 (symbol_found_callback_ftype): Remove 'data' parameter and return
9636 bool.
9637 (iterate_over_symbols): Adjust to use function_view as callback
9638 type.
9639
9640 2017-02-23 Pedro Alves <palves@redhat.com>
9641
9642 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9643 (%.o) <unittests/%.c>: New pattern.
9644 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9645 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9646 * common/function-view.h: New file.
9647 * unittests/function-view-selftests.c: New file.
9648 * configure: Regenerate.
9649
9650 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9651
9652 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9653 inferior_ptid.
9654 * go32-nat.c (go32_thread_alive): Likewise.
9655
9656 2017-02-23 Yao Qi <yao.qi@linaro.org>
9657
9658 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9659 delete.
9660
9661 2017-02-23 Yao Qi <yao.qi@linaro.org>
9662
9663 * varobj.c (varobj_clear_saved_item): Use delete instead of
9664 xfree.
9665 (update_dynamic_varobj_children): Likewise.
9666
9667 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9668
9669 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9670
9671 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9672
9673 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9674 m_enum_value to 0 in default constructor.
9675
9676 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9677
9678 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9679 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9680 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9681 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9682 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9683 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9684 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9685 IS_STORE_CONDITIONAL_INSN.
9686
9687 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9688
9689 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9690
9691 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9692
9693 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9694
9695 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9696
9697 * dwarf2read.c (skip_one_die, read_attribute_value)
9698 (dwarf2_const_value_attr, dump_die_shallow)
9699 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9700 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9701
9702 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9703
9704 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9705 (dwarf_parse_macro_header): Accept DWARF version 5.
9706 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9707
9708 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9709
9710 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9711 DW_AT_GNU_*.
9712 * common/common-exceptions.h (enum errors): Likewise.
9713 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9714 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9715 (dwarf_expr_context::execute_stack_op): Likewise.
9716 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9717 Likewise.
9718 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9719 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9720 (show_entry_values_debug, call_site_to_target_addr)
9721 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9722 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9723 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9724 (value_of_dwarf_block_entry, indirect_pieced_value)
9725 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9726 (disassemble_dwarf_expression): Likewise.
9727 * dwarf2read.c (process_die, inherit_abstract_dies)
9728 (read_call_site_scope): Likewise.
9729 * gdbtypes.h (struct func_type, struct call_site_parameter)
9730 (struct call_site): Likewise.
9731 * stack.c (read_frame_arg): Likewise.
9732 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9733
9734 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9735
9736 * defs.h (read_unsigned_leb128): New declaration.
9737 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9738 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9739 (dwarf2_find_location_expression): Call also
9740 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9741 * dwarf2loc.h (dwarf2_version): New declaration.
9742 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9743 rnglists.
9744 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9745 .debug_rnglists.
9746 (struct dwop_section_names): Add loclists_dwo.
9747 (dwop_section_names): Add .debug_loclists.dwo.
9748 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9749 (struct dwarf2_per_cu_data): Add dwarf_version.
9750 (struct dwo_sections): Add loclists.
9751 (struct attr_abbrev): Add implicit_const.
9752 (read_indirect_line_string): New declaration.
9753 (read_unsigned_leb128): Delete declaration.
9754 (rcuh_kind): New definition.
9755 (read_and_check_comp_unit_head): Change parameter
9756 is_debug_types_section to section_kind.
9757 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9758 (read_comp_unit_head): Change parameter abfd to section, add parameter
9759 section_kind. Handle DWARF-5.
9760 (error_check_comp_unit_head): Accept also DWARF version 5.
9761 (read_and_check_comp_unit_head): Change parameter
9762 is_debug_types_section to section_kind.
9763 (read_and_check_type_unit_head): Delete function.
9764 (read_abbrev_offset): Handle DWARF-5.
9765 (create_debug_type_hash_table): Add parameter section_kind. Process
9766 only DW_UT_type. Use signature and type_offset_in_tu from struct
9767 comp_unit_head.
9768 (create_debug_types_hash_table): Update create_debug_type_hash_table
9769 caller.
9770 (create_all_type_units): Call create_debug_type_hash_table.
9771 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9772 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9773 caller.
9774 (skip_one_die): Handle DW_FORM_implicit_const.
9775 (dwarf2_rnglists_process): New function.
9776 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9777 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9778 (read_attribute_value): Handle DW_FORM_implicit_const,
9779 DW_FORM_line_strp.
9780 (read_attribute): Handle DW_FORM_implicit_const.
9781 (read_indirect_string_at_offset_from): New function from
9782 read_indirect_string_at_offset.
9783 (read_indirect_string_at_offset): Call
9784 read_indirect_string_at_offset_from.
9785 (read_indirect_line_string_at_offset): New function.
9786 (read_indirect_string): New function comment.
9787 (read_indirect_line_string): New function.
9788 (read_unsigned_leb128): Make it global.
9789 (dwarf2_string_attr): Handle DWARF-5.
9790 (add_include_dir_stub, read_formatted_entries): New functions.
9791 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9792 Handle DWARF-5.
9793 (per_cu_header_read_in): Update read_comp_unit_head caller.
9794 (dwarf2_version): New function.
9795 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9796 rnglists.
9797 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9798 fields.
9799
9800 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9801
9802 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9803
9804 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9805
9806 * dwarf2read.c (dwarf2_ranges_process): New function from
9807 dwarf2_ranges_read.
9808 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9809 dwarf2_ranges_process.
9810
9811 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9812
9813 * dwarf2read.c (create_debug_type_hash_table): New function from
9814 create_debug_types_hash_table.
9815 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9816 (create_all_type_units, open_and_init_dwo_file): Update
9817 create_debug_types_hash_table callers.
9818
9819 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9820
9821 PR gdb/16188
9822 * fork-child.c (trace_start_error): Fix thinko. va_end should
9823 refer to 'ap', not 'args'.
9824
9825 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9826 Pedro Alves <palves@redhat.com>
9827
9828 PR gdb/16188
9829 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9830 calls succeeded.
9831 * fork-child.c (trace_start_error): New function.
9832 (trace_start_error_with_name): Likewise.
9833 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9834 * inf-ptrace.c (inf_ptrace_me): Likewise.
9835 * inferior.h (trace_start_error): New prototype.
9836 (trace_start_error_with_name): Likewise.
9837
9838 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9839
9840 PR gdb/21164
9841 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9842 NULL before using it.
9843 * symmisc.c (maintenance_print_symbols): Likewise.
9844 (maintenance_print_msymbols): Likewise.
9845
9846 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9847
9848 * NEWS: Add record Python bindings entry.
9849
9850 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9851
9852 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9853 py-record-full.o.
9854 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9855 * python/py-record-btrace.c, python/py-record-btrace.h,
9856 python/py-record-full.c, python/py-record-full.h: New file.
9857 * python/py-record.c: Add include for py-record-btrace.h and
9858 py-record-full.h.
9859 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9860 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9861 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9862 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9863 New definition.
9864 (gdbpy_initialize_btrace): New export.
9865 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9866
9867 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9868
9869 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9870 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9871 * python/py-record.c: New file.
9872 * python/python-internal.h (gdbpy_start_recording,
9873 gdbpy_current_recording, gdpy_stop_recording,
9874 gdbpy_initialize_record): New export.
9875 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9876 (python_GdbMethods): Add gdbpy_start_recording,
9877 gdbpy_current_recording and gdbpy_stop_recording.
9878
9879 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9880
9881 * record-btrace.c (record_btrace_record_method): New function.
9882 (init_record_btrace_ops): Initialize to_record_method.
9883 * record-full.c (record_full_record_method): New function.
9884 (init_record_full_ops, init_record_full_core_ops): Add
9885 record_full_record_method.
9886 * record.h (enum record_method): New enum.
9887 * target-debug.h (target_debug_print_enum_record_method: New define.
9888 * target-delegates.c: Regenerate.
9889 * target.c (target_record_method): New function.
9890 * target.h: Include record.h.
9891 (struct target_ops) <to_record_method>: New field.
9892 (target_record_method): New export.
9893
9894 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9895
9896 * record.h (record_start, record_stop): New export.
9897 * record.c (record_start, record_stop): New function.
9898
9899 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9900
9901 * btrace.c (btrace_fetch): Copy function call segments pointer
9902 into a vector.
9903 (btrace_clear): Clear the vector.
9904 (btrace_find_insn_by_number): Use binary search to find the correct
9905 function call segment.
9906 * btrace.h (brace_fun_p): New typedef.
9907 (struct btrace_thread_info) <functions>: New field.
9908
9909 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9910
9911 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9912 * btrace.c (btrace_decode_error): ... here. New function.
9913 * btrace.h (btrace_decode_error): New export.
9914
9915 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9916
9917 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9918 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9919 btrace_find_insn_by_number): Remove special case for gaps.
9920 * btrace.h (btrace_insn_get_error): New export.
9921 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9922 * record-btrace.c (btrace_insn_history): Print number for gaps.
9923 (record_btrace_info, record_btrace_goto): Handle gaps.
9924
9925 2017-02-14 Tom Tromey <tom@tromey.com>
9926
9927 PR python/13598:
9928 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9929 event.
9930 * python/py-evts.c (gdbpy_initialize_py_events): Add
9931 before_prompt registry.
9932 * python/py-events.h (events_object) <before_prompt>: New field.
9933
9934 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9935
9936 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9937
9938 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9939
9940 * symfile (_initialize_symfile): Add usage text to the load command's
9941 help text.
9942
9943 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9944
9945 * utils.c (defaulted_query): Don't query on secondary UIs.
9946
9947 2017-02-10 Tom Tromey <tom@tromey.com>
9948
9949 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9950
9951 2017-02-10 Tom Tromey <tom@tromey.com>
9952
9953 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9954 "cleanup" local.
9955 * python/py-type.c (typy_legacy_template_argument): Remove
9956 unnecessary "cleanup" local.
9957
9958 2017-02-10 Tom Tromey <tom@tromey.com>
9959
9960 * python/python.c (do_start_initialization): New function, from
9961 _initialize_python.
9962 (_initialize_python): Call do_start_initialization.
9963 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9964 goto.
9965
9966 2017-02-10 Tom Tromey <tom@tromey.com>
9967
9968 * python/py-prettyprint.c (pretty_print_one_value): Use
9969 gdbpy_ref.
9970
9971 2017-02-10 Tom Tromey <tom@tromey.com>
9972
9973 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9974 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9975 gdbpy_ref.
9976 * python/py-type.c (field_new): Use gdbpy_ref.
9977 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9978 gdbpy_ref.
9979 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9980 (py_free_pspace): Likewise.
9981 (pspace_to_pspace_object): Likewise.
9982 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9983 (py_free_objfile): Likewise.
9984 (objfile_to_objfile_object): Likewise.
9985 * python/py-inferior.c (delete_thread_object): Use
9986 gdbpy_ref.
9987 (infpy_read_memory): Likewise.
9988 (py_free_inferior): Likewise.
9989 * python/py-evtregistry.c (create_eventregistry_object): Use
9990 gdbpy_ref.
9991 * python/py-event.c (create_event_object): Use gdbpy_ref.
9992
9993 2017-02-10 Tom Tromey <tom@tromey.com>
9994
9995 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9996 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9997 used.
9998 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9999 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10000 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10001 python/py-framefilter.c, python/py-function.c,
10002 python/py-inferior.c, python/py-infevents.c,
10003 python/py-linetable.c, python/py-newobjfileevent.c,
10004 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10005 python/py-signalevent.c, python/py-stopevent.c,
10006 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10007 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10008 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10009 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10010
10011 2017-02-10 Tom Tromey <tom@tromey.com>
10012
10013 * ui-out.h (ui_out_emit_type): New class.
10014 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10015 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10016 and ui_out_emit_tuple.
10017 (enumerate_locals): Likewise.
10018 (py_mi_print_variables, py_print_locals, py_print_args): Use
10019 ui_out_emit_list.
10020 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10021 ui_out_emit_list.
10022 * common/gdb_optional.h: New file.
10023
10024 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10025
10026 * MAINTAINERS (Write After Approval): Update my e-mail address.
10027
10028 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10029
10030 PR gdb/21122
10031 * breakpoint.c (_initialize_breakpoint): Update the help description
10032 of the 'commands' command to indicate that it takes a list argument.
10033
10034 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10035
10036 * interps.c (current_interp_set_logging): Remove "return".
10037
10038 2017-02-09 Gary Benson <gbenson@redhat.com>
10039
10040 * symtab.c (add_symtab_completions): Prevent NULL pointer
10041 dereference.
10042
10043 2017-02-08 Pedro Alves <palves@redhat.com>
10044
10045 * interps.c (interp::interp): Remove reference to quiet_p.
10046 (interp_set): Make static. Remove dead "Switching to" output
10047 code.
10048 (interp_quiet_p, interp_set_quiet): Delete.
10049 (interpreter_exec_cmd): Don't set the interpreter quiet.
10050 * interps.h (interp_quiet_p): Make static.
10051 (class interp) <quiet_p>: Remove field
10052
10053 2017-02-08 Jerome Guitton <guitton@adacore.com>
10054
10055 * cli/cli-decode.c (find_command_name_length): Make it extern.
10056 * cli/cli-decode.h (find_command_name_length): Declare.
10057 * cli/cli-script.c (command_name_equals, line_first_arg):
10058 New functions.
10059 (process_next_line): Use cli-decode to parse command names.
10060 (build_command_line): Make args a constant pointer.
10061
10062 2017-02-08 Jerome Guitton <guitton@adacore.com>
10063
10064 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10065 Remove case-insensitive search.
10066
10067 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10068
10069 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10070 at the end of the line. Avoids an ARI warning.
10071
10072 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10073
10074 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10075 rdseed instructions.
10076 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10077
10078 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10079
10080 PR tdep/20936
10081 Provide and use sparc32 and sparc64 target description XML files.
10082 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10083 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10084 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10085 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10086 * features/sparc/sparc32-solaris.xml: New file.
10087 * features/sparc/sparc64-solaris.xml: New file.
10088 * features/sparc/sparc32-solaris.c: Generated.
10089 * features/sparc/sparc64-solaris.c: Generated.
10090 * sparc-tdep.h: Account for differences in target descriptions.
10091 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10092 (sparc32_register_type): Use target provided registers.
10093 (validate_tdesc_registers): New function.
10094 (sparc32_gdbarch_init): Use tdesc_has_registers.
10095 Set pseudoregister functions.
10096 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10097 (sparc64_register_type): Use target provided registers.
10098 (sparc64_init_abi): Set pseudoregister functions.
10099
10100 2017-02-03 Tom Tromey <tom@tromey.com>
10101
10102 PR rust/21097:
10103 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10104 with a single member.
10105
10106 2017-02-03 Pedro Alves <palves@redhat.com>
10107
10108 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10109 (cli_interp_base::~cli_interp_base): New.
10110 (cli_interp): New struct.
10111 (as_cli_interp): Cast the interp itself to cli_interp.
10112 (cli_interpreter_pre_command_loop): Rename to ...
10113 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10114 parameter.
10115 (cli_interpreter_init): Rename to ...
10116 (cli_interp::init): ... this. Remove 'self' parameter. Use
10117 boolean. Make extern.
10118 (cli_interpreter_resume): Rename to ...
10119 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10120 extern.
10121 (cli_interpreter_suspend): Rename to ...
10122 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10123 extern.
10124 (cli_interpreter_exec): Rename to ...
10125 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10126 extern.
10127 (cli_interpreter_supports_command_editing): Rename to ...
10128 (cli_interp_base::supports_command_editing): ... this. Remove
10129 'interp' parameter. Make extern.
10130 (cli_ui_out): Rename to ...
10131 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10132 Make extern.
10133 (cli_set_logging): Rename to ...
10134 (cli_interp_base::set_logging): ... this. Remove 'interp'
10135 parameter. Make extern.
10136 (cli_interp_procs): Delete.
10137 (cli_interp_factory): Adjust to use "new".
10138 * cli/cli-interp.h: Include "interps.h".
10139 (struct cli_interp_base): New struct.
10140 * interps.c (struct interp): Delete. Fields moved to interps.h.
10141 (interp_new): Delete.
10142 (interp::interp, interp::~interp): New.
10143 (interp_set): Use bool, and return void. Assume the interpreter
10144 has suspend, init and resume methods, and that the all return
10145 void.
10146 (set_top_level_interpreter): interp_set returns void.
10147 (interp_ui_out): Adapt.
10148 (current_interp_set_logging): Adapt.
10149 (interp_data): Delete.
10150 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10151 (interp_exec): Adapt.
10152 (top_level_interpreter_data): Delete.
10153 * interps.h (interp_init_ftype, interp_resume_ftype)
10154 (interp_suspend_ftype, interp_exec_ftype)
10155 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10156 (class interp): New.
10157 (interp_new): Delete.
10158 (interp_set): Now returns void. Use bool.
10159 (interp_data, top_level_interpreter_data): Delete.
10160 * mi/mi-common.h: Include interps.h.
10161 (class mi_interp): Inherit from interp. Define a ctor. Declare
10162 init, resume, suspect, exec, interp_ui_out, set_logging and
10163 pre_command_loop methods.
10164 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10165 (mi_interpreter_init): Rename to ...
10166 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10167 bool, return void and make extern. Adjust.
10168 (mi_interpreter_resume): ... Rename to ...
10169 (mi_interp::resume): ... this. Remove the 'data' parameter,
10170 return void and make extern. Adjust.
10171 (mi_interpreter_suspend): ... Rename to ...
10172 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10173 return void and make extern. Adjust.
10174 (mi_interpreter_exec): ... Rename to ...
10175 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10176 extern. Adjust.
10177 (mi_interpreter_pre_command_loop): ... Rename to ...
10178 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10179 parameter and make extern.
10180 (mi_on_normal_stop_1): Adjust.
10181 (mi_ui_out): Rename to ...
10182 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10183 parameter and make extern. Adjust.
10184 (mi_set_logging): Rename to ...
10185 (mi_interp::set_logging): ... this. Remove the 'interp'
10186 parameter and make extern. Adjust.
10187 (mi_interp_procs): Delete.
10188 (mi_interp_factory): Adjust to use 'new'.
10189 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10190 (mi_print_exception, mi_execute_command, mi_load_progress):
10191 Adjust.
10192 * tui/tui-interp.c (tui_interp): New class.
10193 (as_tui_interp): Return a tui_interp pointer.
10194 (tui_on_normal_stop, tui_on_signal_received)
10195 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10196 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10197 to use interp::interp_ui_out.
10198 (tui_init): Rename to ...
10199 (tui_interp::init): ... this. Remove the 'self' parameter, use
10200 bool, return void and make extern. Adjust.
10201 (tui_resume): Rename to ...
10202 (tui_interp::resume): ... this. Remove the 'data' parameter,
10203 return void and make extern. Adjust.
10204 (tui_suspend): Rename to ...
10205 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10206 return void and make extern. Adjust.
10207 (tui_ui_out): Rename to ...
10208 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10209 parameter, and make extern. Adjust.
10210 (tui_exec): Rename to ...
10211 (tui_interp::exec): ... this. Remove the 'data' parameter and
10212 make extern.
10213 (tui_interp_procs): Delete.
10214 (tui_interp_factory): Use "new".
10215
10216 2017-02-02 Tom Tromey <tom@tromey.com>
10217
10218 * rust-exp.y (ends_raw_string, space_then_number)
10219 (rust_identifier_start_p): Return bool.
10220 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10221 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10222 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10223 (rust_chartype_p): Return bool.
10224 (val_print_struct, rust_print_struct_def, rust_print_type):
10225 Update.
10226 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10227 Return bool.
10228
10229 2017-02-02 Tom Tromey <tom@tromey.com>
10230
10231 * rust-lang.c: Reindent.
10232
10233 2017-02-02 Tom Tromey <tom@tromey.com>
10234
10235 * rust-lang.h (rust_crate_for_block): Update.
10236 * rust-lang.c (rust_crate_for_block): Return std::string.
10237 (rust_get_disr_info): Use std:;string, not
10238 gdb::unique_xmalloc_ptr.
10239 * rust-exp.y (crate_name): Update.
10240
10241 2017-02-02 Pedro Alves <palves@redhat.com>
10242
10243 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10244 field out of gdb_disassembler_test and make it static.
10245
10246 2017-02-02 Pedro Alves <palves@redhat.com>
10247
10248 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10249 mi1_interp and mi_interp fields.
10250
10251 2017-02-02 Pedro Alves <palves@redhat.com>
10252
10253 * cli/cli-interp.c (struct saved_output_files, saved_output):
10254 Moved from cli/cli-logging.c.
10255 (cli_set_logging): New function.
10256 (cli_interp_procs): Install cli_set_logging.
10257 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10258 Declare.
10259 * cli/cli-logging.c (struct saved_output_files, saved_output):
10260 Moved to cli/cli-interp.c.
10261 (pop_output_files): Don't save outputs here.
10262 (make_logging_output): New function.
10263 (handle_redirections): Don't build tee nor save previous outputs
10264 here.
10265 * interps.c (current_interp_set_logging): Change prototype.
10266 Assume there's always a set_logging_proc method installed.
10267 * interps.h (interp_set_logging_ftype): Change prototype.
10268 (current_interp_set_logging): Change prototype and adjust comment.
10269 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10270 use make_logging_output.
10271 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10272 2017-02-02 Pedro Alves <palves@redhat.com>
10273
10274 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10275 from ...
10276 (set_logging_overwrite): ... here.
10277 (logging_no_redirect_file): Delete.
10278 (set_logging_redirect): Don't handle redirection on the fly.
10279 Instead warn that "logging off" / "logging on" is necessary.
10280 (pop_output_files): Delete references to logging_no_redirect_file.
10281 (show_logging_command): Always speak in terms of what will happen
10282 once logging is reenabled.
10283
10284 2017-02-02 Pedro Alves <palves@redhat.com>
10285
10286 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10287
10288 2017-02-02 Pedro Alves <palves@redhat.com>
10289
10290 * disasm.c (gdb_pretty_print_insn): Rename to ...
10291 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10292 Remove gdbarch parameter. Adapt to clear the object's buffers
10293 instead of allocating new buffers, and to print using the object's
10294 gdb_disassembler instead of calling gdb_print_insn.
10295 (dump_insns): Use gdb_pretty_print_disassembler.
10296 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10297 (gdb_pretty_print_disassembler): New class.
10298 * record-btrace.c (btrace_insn_history): Use
10299 gdb_pretty_print_disassembler.
10300
10301 2017-02-02 Pedro Alves <palves@redhat.com>
10302
10303 * ada-lang.c (type_as_string): Use string_file.
10304 * ada-valprint.c (ada_print_floating): Use string_file.
10305 * ada-varobj.c (ada_varobj_scalar_image)
10306 (ada_varobj_get_value_image): Use string_file.
10307 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10308 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10309 * breakpoint.c (update_inserted_breakpoint_locations)
10310 (insert_breakpoint_locations, reattach_breakpoints)
10311 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10312 (print_it_watchpoint): Use string_file.
10313 (save_breakpoints): Use stdio_file.
10314 * c-exp.y (oper): Use string_file.
10315 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10316 tee_file.
10317 (pop_output_files): Use delete.
10318 (handle_redirections): Use stdio_file and tee_file.
10319 * cli/cli-setshow.c (do_show_command): Use string_file.
10320 * compile/compile-c-support.c (c_compute_program): Use
10321 string_file.
10322 * compile/compile-c-symbols.c (generate_vla_size): Take a
10323 'string_file &' instead of a 'ui_file *'.
10324 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10325 of a 'ui_file *'. Use string_file.
10326 (generate_c_for_variable_locations): Take a 'string_file &'
10327 instead of a 'ui_file *'.
10328 * compile/compile-internal.h (generate_c_for_for_one_variable):
10329 Take a 'string_file &' instead of a 'ui_file *'.
10330 * compile/compile-loc2c.c (push, pushf, unary, binary)
10331 (print_label, pushf_register_address, pushf_register)
10332 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10333 'ui_file *'. Adjust.
10334 * compile/compile.c (compile_to_object): Use string_file.
10335 * compile/compile.h (compile_dwarf_expr_to_c)
10336 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10337 'ui_file *'.
10338 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10339 (replace_typedefs_qualified_name): Use string_file and
10340 obstack_copy0.
10341 * disasm.c (gdb_pretty_print_insn): Use string_file.
10342 (gdb_disassembly): Adjust reference the null_stream global.
10343 (do_ui_file_delete): Delete.
10344 (gdb_insn_length): Use null_stream.
10345 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10346 * dwarf2loc.c (dwarf2_compile_property_to_c)
10347 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10348 'string_file &' instead of a 'ui_file *'.
10349 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10350 * dwarf2read.c (do_ui_file_peek_last): Delete.
10351 (dwarf2_compute_name): Use string_file.
10352 * event-top.c (gdb_setup_readline): Use stdio_file.
10353 * gdbarch.sh (verify_gdbarch): Use string_file.
10354 * gdbtypes.c (safe_parse_type): Use null_stream.
10355 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10356 string_file.
10357 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10358 'string_file *' instead of a 'ui_file *'.
10359 (gdbscm_arch_disassemble): Use string_file.
10360 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10361 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10362 inherits from ui_file.
10363 (ioscm_file_port_delete, ioscm_file_port_rewind)
10364 (ioscm_file_port_put): Delete.
10365 (ioscm_file_port_write): Rename to ...
10366 (ioscm_file_port::write): ... this. Remove file_port_magic
10367 checks.
10368 (ioscm_file_port_new): Delete.
10369 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10370 ui_file_up.
10371 * guile/scm-type.c (tyscm_type_name): Use string_file.
10372 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10373 Use string_file.
10374 * infcmd.c (print_return_value_1): Use string_file.
10375 * infrun.c (print_target_wait_results): Use string_file.
10376 * language.c (add_language): Use string_file.
10377 * location.c (explicit_to_string_internal): Use string_file.
10378 * main.c (captured_main_1): Use null_file.
10379 * maint.c (maintenance_print_architecture): Use stdio_file.
10380 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10381 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10382 event_channel>: Change type to mi_console_file pointer.
10383 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10384 (mi_console_file_delete): Delete.
10385 (struct mi_console_file): Delete.
10386 (mi_console_file_magic): Delete.
10387 (mi_console_file_new): Delete.
10388 (mi_console_file::mi_console_file): New.
10389 (mi_console_file_delete): Delete.
10390 (mi_console_file_fputs): Delete.
10391 (mi_console_file::write): New.
10392 (mi_console_raw_packet): Delete.
10393 (mi_console_file::flush): New.
10394 (mi_console_file_flush): Delete.
10395 (mi_console_set_raw): Rename to ...
10396 (mi_console_file::set_raw): ... this.
10397 * mi/mi-console.h (class mi_console_file): New class.
10398 (mi_console_file_new, mi_console_set_raw): Delete.
10399 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10400 (mi_set_logging): Use delete and tee_file. Adjust.
10401 * mi/mi-main.c (output_register): Use string_file.
10402 (mi_cmd_data_evaluate_expression): Use string_file.
10403 (mi_cmd_data_read_memory): Use string_file.
10404 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10405 * mi/mi-out.c (mi_ui_out::main_stream): New.
10406 (mi_ui_out::rewind): Use main_stream and
10407 string_file.
10408 (mi_ui_out::put): Use main_stream and string_file.
10409 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10410 Allocate a 'string_file' instead.
10411 (mi_out_new): Don't allocate a mem_fileopen stream here.
10412 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10413 (mi_ui_out::main_stream): Declare method.
10414 * printcmd.c (eval_command): Use string_file.
10415 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10416 * python/py-arch.c (archpy_disassemble): Use string_file.
10417 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10418 * python/py-frame.c (frapy_str): Use string_file.
10419 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10420 Use string_file.
10421 * python/py-type.c (typy_str): Use string_file.
10422 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10423 * python/py-value.c (valpy_str): Use string_file.
10424 * record-btrace.c (btrace_insn_history): Use string_file.
10425 * regcache.c (regcache_print): Use stdio_file.
10426 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10427 * remote.c (escape_buffer): Use string_file.
10428 * rust-lang.c (rust_get_disr_info): Use string_file.
10429 * serial.c (serial_open_ops_1): Use stdio_file.
10430 (do_serial_close): Use delete.
10431 * stack.c (print_frame_arg): Use string_file.
10432 (print_frame_args): Remove local mem_fileopen stream, not used.
10433 (print_frame): Use string_file.
10434 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10435 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10436 Take a 'string_file *' instead of a 'ui_file *'.
10437 * top.c (new_ui): Use stdio_file and stderr_file.
10438 (free_ui): Use delete.
10439 (execute_command_to_string): Use string_file.
10440 (quit_confirm): Use string_file.
10441 * tracepoint.c (collection_list::append_exp): Use string_file.
10442 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10443 * tui/tui-file.c: Don't include "ui-file.h".
10444 (enum streamtype, struct tui_stream): Delete.
10445 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10446 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10447 (tui_file::tui_file): New method.
10448 (tui_file_fputs): Delete.
10449 (tui_file_get_strbuf): Delete.
10450 (tui_file::puts): New method.
10451 (tui_file_adjust_strbuf): Delete.
10452 (tui_file_flush): Delete.
10453 (tui_file::flush): New method.
10454 * tui/tui-file.h: Tweak intro comment.
10455 Include ui-file.h.
10456 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10457 (tui_file_adjust_strbuf): Delete declarations.
10458 (class tui_file): New class.
10459 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10460 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10461 (tui_register_format): Use string_stream.
10462 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10463 (tui_get_function_from_frame): Use string_file.
10464 * typeprint.c (type_to_string): Use string_file.
10465 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10466 (null_stream): New global.
10467 (ui_file_delete): Delete.
10468 (ui_file::ui_file): New.
10469 (null_file_isatty): Delete.
10470 (ui_file::~ui_file): New.
10471 (null_file_rewind): Delete.
10472 (ui_file::printf): New.
10473 (null_file_put): Delete.
10474 (null_file_flush): Delete.
10475 (ui_file::putstr): New.
10476 (null_file_write): Delete.
10477 (ui_file::putstrn): New.
10478 (null_file_read): Delete.
10479 (ui_file::putc): New.
10480 (null_file_fputs): Delete.
10481 (null_file_write_async_safe): Delete.
10482 (ui_file::vprintf): New.
10483 (null_file_delete): Delete.
10484 (null_file::write): New.
10485 (null_file_fseek): Delete.
10486 (null_file::puts): New.
10487 (ui_file_data): Delete.
10488 (null_file::write_async_safe): New.
10489 (gdb_flush, ui_file_isatty): Adjust.
10490 (ui_file_put, ui_file_rewind): Delete.
10491 (ui_file_write): Adjust.
10492 (ui_file_write_for_put): Delete.
10493 (ui_file_write_async_safe, ui_file_read): Adjust.
10494 (ui_file_fseek): Delete.
10495 (fputs_unfiltered): Adjust.
10496 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10497 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10498 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10499 (set_ui_file_data): Delete.
10500 (string_file::~string_file, string_file::write)
10501 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10502 (do_ui_file_as_string, ui_file_as_string): Delete.
10503 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10504 (struct mem_file): Delete.
10505 (mem_file_new): Delete.
10506 (stdio_file::stdio_file): New.
10507 (mem_file_delete): Delete.
10508 (stdio_file::stdio_file): New.
10509 (mem_fileopen): Delete.
10510 (stdio_file::~stdio_file): New.
10511 (mem_file_rewind): Delete.
10512 (stdio_file::set_stream): New.
10513 (mem_file_put): Delete.
10514 (stdio_file::open): New.
10515 (mem_file_write): Delete.
10516 (stdio_file_magic, struct stdio_file): Delete.
10517 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10518 (stdio_file::flush): New.
10519 (stdio_file_read): Rename to ...
10520 (stdio_file::read): ... this. Adjust.
10521 (stdio_file_write): Rename to ...
10522 (stdio_file::write): ... this. Adjust.
10523 (stdio_file_write_async_safe): Rename to ...
10524 (stdio_file::write_async_safe) ... this. Adjust.
10525 (stdio_file_fputs): Rename to ...
10526 (stdio_file::puts) ... this. Adjust.
10527 (stdio_file_isatty): Delete.
10528 (stdio_file_fseek): Delete.
10529 (stdio_file::isatty): New.
10530 (stderr_file_write): Rename to ...
10531 (stderr_file::write) ... this. Adjust.
10532 (stderr_file_fputs): Rename to ...
10533 (stderr_file::puts) ... this. Adjust.
10534 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10535 (stderr_file::stderr_file): New.
10536 (tee_file_magic): Delete.
10537 (struct tee_file): Delete.
10538 (tee_file::tee_file): New.
10539 (tee_file_new): Delete.
10540 (tee_file::~tee_file): New.
10541 (tee_file_delete): Delete.
10542 (tee_file_flush): Rename to ...
10543 (tee_file::flush): ... this. Adjust.
10544 (tee_file_write): Rename to ...
10545 (tee_file::write): ... this. Adjust.
10546 (tee_file::write_async_safe): New.
10547 (tee_file_fputs): Rename to ...
10548 (tee_file::puts): ... this. Adjust.
10549 (tee_file_isatty): Rename to ...
10550 (tee_file::isatty): ... this. Adjust.
10551 * ui-file.h (struct obstack, struct ui_file): Don't
10552 forward-declare.
10553 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10554 (ui_file_write_ftype)
10555 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10556 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10557 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10558 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10559 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10560 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10561 (set_ui_file_fseek): Delete.
10562 (ui_file_data, ui_file_delete, ui_file_rewind)
10563 (struct ui_file): New.
10564 (ui_file_up): New.
10565 (class null_file): New.
10566 (null_stream): Declare.
10567 (ui_file_write_for_put, ui_file_put): Delete.
10568 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10569 Delete.
10570 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10571 (gdb_fopen, tee_file_new): Delete.
10572 (struct string_file): New.
10573 (struct stdio_file): New.
10574 (stdio_file_up): New.
10575 (struct stderr_file): New.
10576 (class tee_file): New.
10577 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10578 of a 'ui_file *'. Adjust.
10579 * ui-out.h (class ui_out) <field_stream>: Likewise.
10580 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10581 (null_stream): Delete.
10582 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10583 Adjust.
10584 * utils.h (struct ui_file): Delete forward declaration..
10585 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10586 (error_stream): Take a 'string_file &' instead of a
10587 'ui_file *'.
10588 * varobj.c (varobj_value_get_print_value): Use string_file.
10589 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10590 * gdbarch.c: Regenerate.
10591
10592 2017-02-02 Pedro Alves <palves@redhat.com>
10593
10594 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10595 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10596 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10597 Adjust to call gdb_print_insn instead of
10598 gdb_disassembler::print_insn.
10599 (dump_insns, do_mixed_source_and_assembly_deprecated)
10600 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10601 'gdbarch' parameter. Remove gdb_disassembler parameter.
10602 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10603 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10604 declaration.
10605 (gdb_pretty_print_insn): Re-add declaration.
10606 * record-btrace.c (btrace_insn_history): Don't allocate a
10607 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10608
10609 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10610
10611 * disasm.h (gdb_disassembly): Remove file_string parameter.
10612 * disasm.c (gdb_disassembly): Likewise.
10613 * cli/cli-cmds.c (print_disassembly): Adapt.
10614 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10615 * stack.c (do_gdb_disassembly): Likewise.
10616
10617 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10618
10619 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10620 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10621 targets. And if the implicit value is longer than needed, extract
10622 the first bytes instead of the "least significant" ones.
10623
10624 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10625
10626 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10627 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10628 (btrace_fetch): Assert can_access_registers_ptid.
10629 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10630 validate_registers_access.
10631
10632 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10633
10634 * gdbthread.h (can_access_registers_ptid): New.
10635 * thread.c (can_access_registers_ptid): New.
10636
10637 2017-02-01 Pedro Alves <palves@redhat.com>
10638
10639 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10640
10641 2017-01-31 Pedro Alves <palves@redhat.com>
10642
10643 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10644 Fix typos.
10645
10646 2017-01-31 Pedro Alves <palves@redhat.com>
10647
10648 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10649 not used.
10650
10651 2017-01-31 Pedro Alves <palves@redhat.com>
10652
10653 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10654
10655 2017-01-31 Pedro Alves <palves@redhat.com>
10656
10657 * common/scoped_restore.h
10658 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10659 change the value's parameter type to T2.
10660 (make_scoped_restore): Likewise.
10661
10662 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10663 Richard Henderson <rth@redhat.com>
10664
10665 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10666 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10667 GS_BASE for older kernels.
10668 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10669 GS_BASE for older kernels.
10670 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10671 and GS_BASE to the offset table.
10672 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10673 system register group.
10674 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10675 for older kernels.
10676 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10677 amd64 ABI.
10678 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10679 AMD64_GSBASE_REGNUM.
10680 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10681 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10682 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10683 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10684 i386/64bit-segments.xml in those rules.
10685 * features/i386/64bit-segments.xml: New file.
10686 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10687 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10688 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10689 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10690 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10691 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10692 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10693 * features/i386/amd64-avx-linux.c: Regenerated.
10694 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10695 * features/i386/amd64-avx-mpx.c: Regenerated.
10696 * features/i386/amd64-avx512-linux.c: Regenerated.
10697 * features/i386/amd64-linux.c: Regenerated.
10698 * features/i386/amd64-mpx-linux.c: Regenerated.
10699 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10700 * features/i386/i386-avx-mpx.c: Regenerated.
10701 * features/i386/x32-avx-linux.c: Regenerated.
10702 * features/i386/x32-avx512-linux.c: Regenerated.
10703 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10704 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10705 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10706 * regformats/i386/amd64-linux.dat: Regenerated.
10707 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10708 * regformats/i386/x32-avx-linux.dat: Regenerated.
10709 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10710 * regformats/i386/x32-linux.dat: Regenerated.
10711
10712 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10713
10714 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10715 Set to AMD64_NUM_REGS.
10716
10717 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10718
10719 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10720 that checks validity of a register number.
10721
10722 2017-01-27 Kees Cook <keescook@google.com>
10723
10724 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10725 fetch_fpregs if target has fpa registers.
10726 (arm_linux_store_inferior_registers): Call store_fpregs if target
10727 has fpa registers.
10728
10729 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10730
10731 * cris-tdep.c (cris_gdbarch_init): Remove check for
10732 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10733
10734 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10735
10736 * corelow.c (get_core_register_section): Check for regset
10737 existence before checking for REGSET_VARIABLE_SIZE.
10738
10739 2017-01-26 Yao Qi <yao.qi@linaro.org>
10740 Pedro Alves <palves@redhat.com>
10741
10742 PR gdb/20939
10743 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10744 call memory_error, save memaddr instead.
10745 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10746 negative, cal memory_error.
10747 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10748
10749 2017-01-26 Yao Qi <yao.qi@linaro.org>
10750
10751 * disasm-selftests.c (memory_error_test): New function.
10752 (_initialize_disasm_selftests): Register memory_error_test.
10753
10754 2017-01-26 Yao Qi <yao.qi@linaro.org>
10755
10756 * Makefile.in (SFILES): Add disasm-selftests.c and
10757 selftest-arch.c.
10758 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10759 * disasm-selftests.c: New file.
10760 * selftest-arch.c: New file.
10761 * selftest-arch.h: New file.
10762
10763 2017-01-26 Yao Qi <yao.qi@linaro.org>
10764
10765 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10766 to bfd_arch_mep. Don't return 0 if section is not
10767 found. Call print_insn_mep.
10768
10769 2017-01-26 Pedro Alves <palves@redhat.com>
10770 Yao Qi <yao.qi@linaro.org>
10771
10772 * arm-tdep.c: Include "disasm.h".
10773 (gdb_print_insn_arm): Update code to get gdbarch.
10774 * disasm.c (dis_asm_read_memory): Change it to
10775 gdb_disassembler::dis_asm_read_memory.
10776 (dis_asm_memory_error): Likewise.
10777 (dis_asm_print_address): Likewise.
10778 (gdb_pretty_print_insn): Change it to
10779 gdb_disassembler::pretty_print_insn.
10780 (dump_insns): Add one argument gdb_disassemlber. All
10781 callers updated.
10782 (do_mixed_source_and_assembly_deprecated): Likewise.
10783 (do_mixed_source_and_assembly): Likewise.
10784 (do_assembly_only): Likewise.
10785 (gdb_disassembler::gdb_disassembler): New.
10786 (gdb_disassembler::print_insn): New.
10787 * disasm.h (class gdb_disassembler): New.
10788 (gdb_pretty_print_insn): Remove declaration.
10789 (gdb_disassemble_info): Likewise.
10790 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10791 (gdbscm_disasm_read_memory_worker): Update.
10792 (gdbscm_disasm_read_memory): Update.
10793 (gdbscm_disasm_memory_error): Remove.
10794 (gdbscm_disasm_print_address): Remove.
10795 (gdbscm_disassembler::gdbscm_disassembler): New.
10796 (gdbscm_print_insn_from_port): Update.
10797 * mips-tdep.c: Include disasm.h.
10798 (gdb_print_insn_mips): Update code to get gdbarch.
10799 * record-btrace.c (btrace_insn_history): Update.
10800 * spu-tdep.c: Include disasm.h.
10801 (struct spu_dis_asm_data): Remove.
10802 (struct spu_dis_asm_info): New.
10803 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10804 SPU id.
10805 (gdb_print_insn_spu): Cast disassemble_info to
10806 spu_dis_asm_info.
10807
10808 2017-01-26 Yao Qi <yao.qi@linaro.org>
10809
10810 * disasm.c (do_ui_file_delete): Delete.
10811 (gdb_insn_length): Move code creating stream to ...
10812 * utils.c (null_stream): ... here. New function.
10813 * utils.h (null_stream): Declare.
10814
10815 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10816
10817 * python/py-inferior.c (find_thread_object): Return directly
10818 from the loop. Remove "found" variable.
10819
10820 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10821
10822 GDB 7.12.1 released.
10823
10824 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10825
10826 * python/py-function.c (fnpy_call): Reorder declarations to have
10827 the gdbpy_enter object declared first.
10828 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10829
10830 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10831
10832 PR python/21068
10833 * python/python-internal.h (PyMem_RawMalloc): Define for
10834 Python < 3.4.
10835 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10836 PyMem_RawMalloc instead of PyMem_Malloc.
10837
10838 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10839 Luis Machado <lgustavo@codesourcery.com>
10840
10841 * NEWS (New commands): Mention flash-erase.
10842 (New MI commands): Mention target-flash-erase.
10843 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10844 command.
10845 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10846 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10847 * target.c (flash_erase_command): New function.
10848 (initialize_targets): Add new flash-erase command.
10849 * target.h (flash_erase_command): New declaration.
10850
10851 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10852
10853 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10854 HAVE_SYS_PROCFS_H is defined.
10855
10856 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10857
10858 * remote.c (struct cached_reg): Change data into a pointer.
10859 * (stop_reply_dtr): Free data pointers before deleting vector.
10860 (process_stop_reply): Likewise.
10861 (remote_parse_stop_reply): Allocate space for data
10862
10863 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10864
10865 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10866 MAX_REGISTER_SIZE.
10867 (amd64_pseudo_register_read_value): Likewise.
10868 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10869 (store_register_using_P): Likewise.
10870 * regcache.c (regcache_xfer_part): Likewise.
10871
10872 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10873
10874 Split real and pseudo registers.
10875 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10876 (sparc32_pseudo_regnum): New enum.
10877 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10878 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10879 (SPARC32_CP0_REGISTERS): New macro.
10880 (sparc32_pseudo_register_name): New function.
10881 (sparc32_register_name): Use sparc32_pseudo_register_name.
10882 (sparc32_pseudo_register_type): New function.
10883 (sparc32_register_type): Use sparc32_pseudo_register_type.
10884 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10885 pseudo register numbers.
10886 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10887 (SPARC64_CP0_REGISTERS): New macro.
10888 (sparc64_pseudo_register_name): New function.
10889 (sparc64_register_name): Use sparc64_pseudo_register_name.
10890 (sparc64_pseudo_register_type): New function.
10891 (sparc64_register_type): Use sparc64_pseudo_register_type.
10892 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10893 pseudo register numbers.
10894 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10895 sparc64_store_arguments): Handle pseudo register numbers.
10896
10897 2017-01-13 Yao Qi <yao.qi@linaro.org>
10898
10899 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10900 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10901 output.
10902 (getpkt_or_notif_sane_1): Likewise.
10903
10904 2017-01-13 Yao Qi <yao.qi@linaro.org>
10905
10906 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10907 of CC. Pass "-x c++-header" instead of "-x c".
10908
10909 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10910
10911 * remote.c (remote_can_async_p): Update comment.
10912
10913 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10914
10915 * linux-nat.c (linux_nat_can_async_p): Update comment.
10916
10917 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10918
10919 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10920
10921 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10922
10923 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10924
10925 2017-01-10 Tom Tromey <tom@tromey.com>
10926
10927 * python/py-type.c (typy_legacy_template_argument): Update.
10928 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10929 ~demangle_parse_info): Declare new members.
10930 (cp_demangled_name_to_comp): Return unique_ptr.
10931 (cp_demangled_name_parse_free)
10932 (make_cleanup_cp_demangled_name_parse_free)
10933 (cp_new_demangle_parse_info): Remove.
10934 * cp-support.c (do_demangled_name_parse_free_cleanup)
10935 (make_cleanup_cp_demangled_name_parse_free): Remove.
10936 (inspect_type, cp_canonicalize_string_full)
10937 (cp_canonicalize_string): Update.
10938 (mangled_name_to_comp): Change return type.
10939 (cp_class_name_from_physname, method_name_from_physname)
10940 (cp_func_name, cp_remove_params): Update.
10941 * cp-name-parser.y (demangle_parse_info): New constructor, from
10942 cp_new_demangle_parse_info.
10943 (~demangle_parse_info): New destructor, from
10944 cp_demangled_name_parse_free.
10945 (cp_merge_demangle_parse_infos): Update.
10946 (cp_demangled_name_to_comp): Change return type.
10947
10948 2017-01-10 Tom Tromey <tom@tromey.com>
10949
10950 * top.c (prevent_dont_repeat): Change return type.
10951 * python/python.c (execute_gdb_command): Use std::string.
10952 Update.
10953 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10954 * command.h (prevent_dont_repeat): Change return type.
10955 * breakpoint.c (bpstat_do_actions_1): Update.
10956
10957 2017-01-10 Tom Tromey <tom@tromey.com>
10958
10959 * value.h (scoped_value_mark::~scoped_value_mark): Call
10960 free_to_mark.
10961 (scoped_value_mark::free_to_mark): New method.
10962 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10963 scoped_value_mark.
10964
10965 2017-01-10 Tom Tromey <tom@tromey.com>
10966
10967 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10968 (valpy_reference_value, valpy_const_value, valpy_get_address)
10969 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10970 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10971 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10972 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10973 scoped_value_mark.
10974 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10975 * value.h (scoped_value_mark): New class.
10976
10977 2017-01-10 Tom Tromey <tom@tromey.com>
10978
10979 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10980 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10981 * psymtab.c (discard_psymtabs_upto): Remove.
10982 (make_cleanup_discard_psymtabs): Remove.
10983 (struct psymtab_state): Remove.
10984
10985 2017-01-10 Tom Tromey <tom@tromey.com>
10986
10987 * record-full.c (record_full_save_cleanups): Remove.
10988 (record_full_save): Use gdb::unlinker.
10989 * gcore.c (do_bfd_delete_cleanup): Remove.
10990 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10991 cleanups.
10992 * dwarf2read.c (unlink_if_set): Remove.
10993 (write_psymtabs_to_index): Use gdb::unlinker.
10994 * common/gdb_unlinker.h: New file.
10995
10996 2017-01-10 Tom Tromey <tom@tromey.com>
10997
10998 * windows-tdep.c (windows_xfer_shared_library): Update.
10999 * windows-nat.c (windows_make_so): Update.
11000 * utils.h (make_cleanup_bfd_unref): Remove.
11001 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11002 * symfile.h (symfile_bfd_open)
11003 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11004 * symfile.c (read_symbols, symbol_file_add)
11005 (separate_debug_file_exists): Update.
11006 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11007 (generic_load, reread_symbols): Update.
11008 * symfile-mem.c (symbol_file_add_from_memory): Update.
11009 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11010 (spu_symbol_file_add_from_memory): Update.
11011 * solist.h (struct target_so_ops) <bfd_open>: Return
11012 gdb_bfd_ref_ptr.
11013 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11014 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11015 gdb_bfd_ref_ptr.
11016 (solib_map_sections, reload_shared_libraries_1): Update.
11017 * solib-svr4.c (enable_break): Update.
11018 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11019 * solib-frv.c (enable_break2): Update.
11020 * solib-dsbt.c (enable_break): Update.
11021 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11022 gdb_bfd_ref_ptr.
11023 (darwin_solib_get_all_image_info_addr_at_init): Update.
11024 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11025 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11026 * record-full.c (record_full_save): Update.
11027 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11028 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11029 * minidebug.c (find_separate_debug_file_in_section): Return
11030 gdb_bfd_ref_ptr.
11031 * machoread.c (macho_add_oso_symfile): Change abfd to
11032 gdb_bfd_ref_ptr.
11033 (macho_symfile_read_all_oso): Update.
11034 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11035 (macho_symfile_read): Update.
11036 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11037 (jit_bfd_try_read_symtab): Update.
11038 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11039 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11040 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11041 gdb_bfd_ref_ptr.
11042 (gdb_bfd_ref_policy): New struct.
11043 (gdb_bfd_ref_ptr): New typedef.
11044 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11045 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11046 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11047 gdb_bfd_ref_ptr.
11048 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11049 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11050 (gcore_command): Update.
11051 * exec.c (exec_file_attach): Update.
11052 * elfread.c (elf_symfile_read): Update.
11053 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11054 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11055 (open_and_init_dwo_file): Update.
11056 (open_dwp_file): Return gdb_bfd_ref_ptr.
11057 (open_and_init_dwp_file): Update.
11058 * corelow.c (core_open): Update.
11059 * compile/compile-object-load.c (compile_object_load): Update.
11060 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11061 * coffread.c (coff_symfile_read): Update.
11062 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11063 gdb_bfd_ref_ptr. Rename.
11064 (dump_bfd_file, restore_command): Update.
11065 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11066 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11067 (find_separate_debug_file_by_buildid): Update.
11068
11069 2017-01-10 Tom Tromey <tom@tromey.com>
11070
11071 * common/gdb_ref_ptr.h: New file.
11072 * python/py-ref.h (struct gdbpy_ref_policy): New.
11073 (gdbpy_ref): Now a typedef.
11074
11075 2017-01-10 Tom Tromey <tom@tromey.com>
11076
11077 * utils.h (make_cleanup_htab_delete): Don't declare.
11078 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11079 Remove.
11080 * linespec.c (decode_compound_collector): Add constructor,
11081 destructor.
11082 (lookup_prefix_sym): Remove cleanup.
11083 (symtab_collector): Add constructor, destructor.
11084 (collect_symtabs_from_filename): Remove cleanup.
11085 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11086 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11087 Use htab_up.
11088 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11089 * dwarf2read.c (dw2_expand_symtabs_matching)
11090 (dw2_map_symbol_filenames, dwarf_decode_macros)
11091 (write_psymtabs_to_index): Use htab_up.
11092 * dwarf2loc.c (func_verify_no_selftailcall)
11093 (call_site_find_chain_1, func_verify_no_selftailcall)
11094 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11095 std::vector, gdb::unique_xmalloc_ptr.
11096 (call_sitep): Remove typedef.
11097 (dwarf2_locexpr_baton_eval): Remove unused variable.
11098
11099 2017-01-10 Tom Tromey <tom@tromey.com>
11100
11101 * python/python-internal.h (make_cleanup_py_decref)
11102 (make_cleanup_py_xdecref): Don't declare.
11103 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11104 (py_xdecref, make_cleanup_py_xdecref): Remove.
11105
11106 2017-01-10 Tom Tromey <tom@tromey.com>
11107
11108 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11109 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11110
11111 2017-01-10 Tom Tromey <tom@tromey.com>
11112
11113 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11114
11115 2017-01-10 Tom Tromey <tom@tromey.com>
11116
11117 * python/py-utils.c (unicode_to_encoded_string)
11118 (python_string_to_target_string)
11119 (python_string_to_target_python_string)
11120 (python_string_to_host_string, gdbpy_obj_to_string)
11121 (get_addr_from_python): Use gdbpy_ref.
11122
11123 2017-01-10 Tom Tromey <tom@tromey.com>
11124
11125 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11126 gdbpy_ref.
11127
11128 2017-01-10 Tom Tromey <tom@tromey.com>
11129
11130 * python/python.c (eval_python_command, gdbpy_decode_line)
11131 (gdbpy_run_events, gdbpy_start_type_printers)
11132 (gdbpy_apply_type_printers): Use gdbpy_ref.
11133
11134 2017-01-10 Tom Tromey <tom@tromey.com>
11135
11136 * python/py-param.c (get_doc_string, compute_enum_values): Use
11137 gdbpy_ref.
11138
11139 2017-01-10 Tom Tromey <tom@tromey.com>
11140
11141 * python/py-inferior.c (find_thread_object, build_inferior_list):
11142 Use gdbpy_ref.
11143
11144 2017-01-10 Tom Tromey <tom@tromey.com>
11145
11146 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11147
11148 2017-01-10 Tom Tromey <tom@tromey.com>
11149
11150 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11151 gdbpy_ref.
11152
11153 2017-01-10 Tom Tromey <tom@tromey.com>
11154
11155 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11156 extra incref.
11157 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11158 Use gdbpy_ref.
11159
11160 2017-01-10 Tom Tromey <tom@tromey.com>
11161
11162 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11163 gdbpy_ref.
11164
11165 2017-01-10 Tom Tromey <tom@tromey.com>
11166
11167 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11168 decref results of PyArg_ParseTupleAndKeywords.
11169
11170 2017-01-10 Tom Tromey <tom@tromey.com>
11171
11172 * python/python.c (python_run_simple_file): Use
11173 unique_xmalloc_ptr, gdbpy_ref.
11174
11175 2017-01-10 Tom Tromey <tom@tromey.com>
11176
11177 * python/py-prettyprint.c (print_stack_unless_memory_error)
11178 (print_string_repr, print_children): Use gdbpy_ref.
11179 (dummy_python_frame): New class.
11180 (dummy_python_frame::dummy_python_frame): Rename from
11181 push_dummy_python_frame.
11182 (py_restore_tstate): Remove.
11183
11184 2017-01-10 Tom Tromey <tom@tromey.com>
11185
11186 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11187
11188 2017-01-10 Tom Tromey <tom@tromey.com>
11189
11190 * python/python.c (ensure_python_env, restore_python_env):
11191 Remove.
11192 * python/python-internal.h (ensure_python_env): Don't declare.
11193 * varobj.h (varobj_ensure_python_env): Don't declare.
11194 * varobj.c (varobj_ensure_python_env): Remove.
11195
11196 2017-01-10 Tom Tromey <tom@tromey.com>
11197
11198 * varobj.c (varobj_value_get_print_value): Use
11199 gdbpy_enter_varobj.
11200
11201 2017-01-10 Tom Tromey <tom@tromey.com>
11202
11203 * python/py-prettyprint.c (print_string_repr, print_children):
11204 Update.
11205 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11206 of "encoding".
11207 * varobj.c (varobj_value_get_print_value): Update.
11208 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11209
11210 2017-01-10 Tom Tromey <tom@tromey.com>
11211
11212 * varobj.c (varobj_get_display_hint)
11213 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11214 (varobj_set_visualizer, free_variable): Use
11215 gdbpy_enter_varobj.
11216
11217 2017-01-10 Tom Tromey <tom@tromey.com>
11218
11219 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11220 (do_finish_initialization): New function. Use gdbpy_ref.
11221 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11222 do_finish_initialization.
11223
11224 2017-01-10 Tom Tromey <tom@tromey.com>
11225
11226 * python/py-param.c (get_set_value, get_show_value): Use
11227 gdbpy_enter, gdbpy_ref.
11228
11229 2017-01-10 Tom Tromey <tom@tromey.com>
11230
11231 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11232
11233 2017-01-10 Tom Tromey <tom@tromey.com>
11234
11235 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11236
11237 2017-01-10 Tom Tromey <tom@tromey.com>
11238
11239 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11240 Use gdbpy_enter_varobj.
11241
11242 2017-01-10 Tom Tromey <tom@tromey.com>
11243
11244 * varobj.c (gdbpy_enter_varobj): New constructor.
11245 * python/python-internal.h (gdbpy_enter_varobj): New class.
11246 * python/py-varobj.c (py_varobj_get_iterator): Use
11247 gdbpy_enter_varobj.
11248
11249 2017-01-10 Tom Tromey <tom@tromey.com>
11250
11251 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11252 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11253 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11254 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11255 unique_xmalloc_ptr.
11256 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11257
11258 2017-01-10 Tom Tromey <tom@tromey.com>
11259
11260 * python/py-xmethods.c (invoke_match_method): Use
11261 gdbpy_ref.
11262
11263 2017-01-10 Tom Tromey <tom@tromey.com>
11264
11265 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11266 gdbpy_enter, gdbpy_ref.
11267
11268 2017-01-10 Tom Tromey <tom@tromey.com>
11269
11270 * python/python.c (python_interactive_command): Use gdbpy_enter.
11271
11272 2017-01-10 Tom Tromey <tom@tromey.com>
11273
11274 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11275 gdbpy_ref.
11276
11277 2017-01-10 Tom Tromey <tom@tromey.com>
11278
11279 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11280 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11281
11282 2017-01-10 Tom Tromey <tom@tromey.com>
11283
11284 * utils.h (htab_deleter): New struct.
11285 (htab_up): New typedef.
11286 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11287 gdbpy_enter, gdbpy_ref, htab_up.
11288
11289 2017-01-10 Tom Tromey <tom@tromey.com>
11290
11291 * python/py-unwind.c (pending_frame_invalidate): Remove.
11292 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11293
11294 2017-01-10 Tom Tromey <tom@tromey.com>
11295
11296 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11297 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11298
11299 2017-01-10 Tom Tromey <tom@tromey.com>
11300
11301 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11302
11303 2017-01-10 Tom Tromey <tom@tromey.com>
11304
11305 * python/python.c (gdbpy_eval_from_control_command)
11306 (gdbpy_source_script, gdbpy_run_events)
11307 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11308 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11309 gdbpy_enter.
11310
11311 2017-01-10 Tom Tromey <tom@tromey.com>
11312
11313 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11314
11315 2017-01-10 Tom Tromey <tom@tromey.com>
11316
11317 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11318
11319 2017-01-10 Tom Tromey <tom@tromey.com>
11320
11321 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11322 (python_on_inferior_call_pre, python_on_inferior_call_post)
11323 (python_on_memory_change, python_on_register_change)
11324 (python_inferior_exit, python_new_objfile, add_thread_object)
11325 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11326
11327 2017-01-10 Tom Tromey <tom@tromey.com>
11328
11329 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11330 (bpfinishpy_handle_exit): Use gdbpy_enter.
11331
11332 2017-01-10 Tom Tromey <tom@tromey.com>
11333
11334 * python/py-cmd.c (cmdpy_destroyer)
11335 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11336 gdbpy_enter.
11337
11338 2017-01-10 Tom Tromey <tom@tromey.com>
11339
11340 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11341 gdbpy_enter.
11342 (gdbpy_breakpoint_has_cond): Likewise.
11343
11344 2017-01-10 Tom Tromey <tom@tromey.com>
11345
11346 * python/python.c (gdbpy_enter): New constructor.
11347 (~gdbpy_enter): New destructor.
11348 (restore_python_env, ensure_python_env): Rewrite.
11349 * python/python-internal.h (gdbpy_enter): New class.
11350
11351 2017-01-10 Tom Tromey <tom@tromey.com>
11352
11353 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11354
11355 2017-01-10 Tom Tromey <tom@tromey.com>
11356
11357 * python/py-value.c (value_has_field, get_field_flag)
11358 (get_field_type, valpy_getitem, convert_value_from_python): Use
11359 gdbpy_ref.
11360
11361 2017-01-10 Tom Tromey <tom@tromey.com>
11362
11363 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11364 gdbpy_ref.
11365
11366 2017-01-10 Tom Tromey <tom@tromey.com>
11367
11368 * python/py-prettyprint.c (search_pp_list)
11369 (find_pretty_printer_from_objfiles)
11370 (find_pretty_printer_from_progspace)
11371 (find_pretty_printer_from_gdb, find_pretty_printer)
11372 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11373 gdbpy_ref.
11374
11375 2017-01-10 Tom Tromey <tom@tromey.com>
11376
11377 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11378
11379 2017-01-10 Tom Tromey <tom@tromey.com>
11380
11381 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11382 (ltpy_get_all_source_lines): Use gdbpy_ref.
11383
11384 2017-01-10 Tom Tromey <tom@tromey.com>
11385
11386 * python/py-framefilter.c (extract_sym, extract_value)
11387 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11388 gdbpy_ref.
11389
11390 2017-01-10 Tom Tromey <tom@tromey.com>
11391
11392 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11393
11394 2017-01-10 Tom Tromey <tom@tromey.com>
11395
11396 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11397
11398 2017-01-10 Tom Tromey <tom@tromey.com>
11399
11400 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11401 gdbpy_ref.
11402
11403 2017-01-10 Tom Tromey <tom@tromey.com>
11404
11405 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11406
11407 2017-01-10 Tom Tromey <tom@tromey.com>
11408
11409 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11410 (typy_range): Use gdbpy_ref.
11411
11412 2017-01-10 Tom Tromey <tom@tromey.com>
11413
11414 * python/py-threadevent.c (create_thread_event_object): Use
11415 gdbpy_ref.
11416 * python/py-stopevent.c (create_stop_event_object): Simplify.
11417 (emit_stop_event): Use gdbpy_ref.
11418 * python/py-signalevent.c (create_signal_event_object): Use
11419 gdbpy_ref.
11420 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11421 (emit_new_objfile_event, create_clear_objfiles_event_object)
11422 (emit_clear_objfiles_event): Use gdbpy_ref.
11423 * python/py-infevents.c (create_inferior_call_event_object)
11424 (create_register_changed_event_object)
11425 (create_memory_changed_event_object, emit_inferior_call_event)
11426 (emit_memory_changed_event, emit_register_changed_event): Use
11427 gdbpy_ref.
11428 * python/py-exitedevent.c (create_exited_event_object)
11429 (emit_exited_event): Use gdbpy_ref.
11430 * python/py-event.h (evpy_emit_event): Remove
11431 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11432 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11433 * python/py-continueevent.c (emit_continue_event): Use
11434 gdbpy_ref.
11435 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11436 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11437 gdbpy_ref.
11438 * python/py-bpevent.c (create_breakpoint_event_object): Use
11439 gdbpy_ref.
11440
11441 2017-01-10 Tom Tromey <tom@tromey.com>
11442
11443 * python/py-ref.h: New file.
11444
11445 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11446
11447 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11448 void.
11449 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11450 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11451 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11452 * ui-out.c (ui_out::redirect): Likewise.
11453 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11454 * cli/cli-logging.c (set_logging_redirect): Update call site of
11455 ui_out::redirect.
11456 (handle_redirections): Likewise.
11457 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11458 * top.c (execute_command_to_string): Likewise.
11459 * utils.c (do_ui_out_redirect_pop): Likewise.
11460
11461 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11462
11463 * stack.c (_initialize_stack): Update "frame" command help message.
11464
11465 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11466
11467 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11468
11469 2017-01-06 Yao Qi <yao.qi@linaro.org>
11470
11471 * x86-linux-nat.h: Include gdb_proc_service.h.
11472
11473 2017-01-06 Yao Qi <yao.qi@linaro.org>
11474
11475 * ser-base.h: Include serial.h.
11476
11477 2017-01-06 Yao Qi <yao.qi@linaro.org>
11478
11479 * ppc-linux-tdep.h: Include ppc-tdep.h.
11480
11481 2017-01-06 Yao Qi <yao.qi@linaro.org>
11482
11483 * nat/amd64-linux-siginfo.h: Include signal.h.
11484
11485 2017-01-06 Yao Qi <yao.qi@linaro.org>
11486
11487 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11488
11489 2017-01-06 Yao Qi <yao.qi@linaro.org>
11490
11491 * mi/mi-parse.h: Include mi-cmds.h.
11492
11493 2017-01-06 Yao Qi <yao.qi@linaro.org>
11494
11495 * inf-loop.c: Don't include "target.h".
11496 * inf-loop.h: Include it here.
11497
11498 2017-01-06 Yao Qi <yao.qi@linaro.org>
11499
11500 * dfp.h: Include "dboulest.h" and "expression.h".
11501
11502 2017-01-06 Yao Qi <yao.qi@linaro.org>
11503
11504 * ax-gdb.h: Include "ax.h".
11505
11506 2017-01-06 Yao Qi <yao.qi@linaro.org>
11507
11508 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11509 with nat/gdb_ptrace.h.
11510
11511 2017-01-05 Yao Qi <yao.qi@linaro.org>
11512
11513 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11514 new line.
11515 (mips64_fbsd_sigframe_init): Likewise.
11516
11517 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11518
11519 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11520 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11521
11522 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11523
11524 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11525 * NEWS: Mention new FreeBSD/mips native configuration.
11526 * config/mips/fbsd.mh: New file.
11527 * configure.host: Add mips*-*-freebsd*.
11528 * mips-fbsd-nat.c: New file.
11529
11530 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11531
11532 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11533 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11534 * NEWS: Mention new FreeBSD/mips target.
11535 * configure.tgt: Add mips*-*-freebsd*.
11536 * mips-fbsd-tdep.c: New file.
11537 * mips-fbsd-tdep.h: New file.
11538
11539 2017-01-04 Yao Qi <yao.qi@linaro.org>
11540
11541 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11542 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11543
11544 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11545
11546 Update copyright year range in all GDB files.
11547
11548 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11549
11550 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11551
11552 For older changes see ChangeLog-2016.
11553 \f
11554 Local Variables:
11555 mode: change-log
11556 left-margin: 8
11557 fill-column: 74
11558 version-control: never
11559 coding: utf-8
11560 End:
This page took 0.251358 seconds and 5 git commands to generate.