Constify some commands in exec.c, plus symbol_file_command
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-27 Tom Tromey <tom@tromey.com>
2
3 * symfile.c (symbol_file_command): Constify.
4 * gdbcore.h (deprecated_file_changed_hook): Constify.
5 * exec.c (deprecated_file_changed_hook, exec_file_command)
6 (file_command): Constify.
7 * defs.h (symbol_file_command): Constify.
8
9 2017-09-27 Tom Tromey <tom@tromey.com>
10
11 * remote-fileio.c (set_system_call_allowed)
12 (show_system_call_allowed): Constify.
13
14 2017-09-27 Tom Tromey <tom@tromey.com>
15
16 * tracepoint.c (delete_trace_variable_command)
17 (tfind_end_command, tfind_start_command, tfind_pc_command)
18 (tfind_tracepoint_command, tfind_line_command)
19 (tfind_range_command, tfind_outside_command): Constify.
20
21 2017-09-27 Tom Tromey <tom@tromey.com>
22
23 * ax-gdb.c (maint_agent_printf_command, agent_command)
24 (agent_eval_command): Constify.
25
26 2017-09-27 Tom Tromey <tom@tromey.com>
27
28 * tracepoint.c (info_scope_command): Constify.
29 * python/python.c (gdbpy_decode_line): Constify.
30 * python/py-breakpoint.c (bppy_init): Constify.
31 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
32 * location.h: (new_linespec_location)
33 (string_to_event_location_basic, string_to_event_location):
34 Constify.
35 * location.c (new_linespec_location)
36 (string_to_event_location_basic, string_to_event_location):
37 Constify.
38 * linespec.h (decode_line_with_current_source)
39 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
40 * linespec.c (linespec_lex_to_end)
41 (decode_line_with_current_source)
42 (decode_line_with_last_displayed): Constify.
43 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
44 Constify.
45 * cli/cli-cmds.c (edit_command, list_command): Constify.
46 * breakpoint.h (until_break_command, watch_command_wrapper)
47 (awatch_command_wrapper, rwatch_command_wrapper)
48 (init_ada_exception_breakpoint): Constify.
49 * breakpoint.c (break_command_1, dprintf_command)
50 (break_range_command, watch_command_wrapper)
51 (rwatch_command_wrapper, awatch_command_wrapper)
52 (until_break_command, init_ada_exception_breakpoint)
53 (strace_marker_create_sals_from_location, trace_command)
54 (ftrace_command, strace_command, struct tracepoint): Constify.
55 * ax-gdb.c (agent_command_1): Constify.
56 * ada-lang.c (ada_exception_sal): Constify.
57
58 2017-09-27 Tom Tromey <tom@tromey.com>
59
60 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
61 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
62 (get_context_size, no_chunk, get_insn_history_modifiers)
63 (cmd_record_insn_history, get_call_history_modifiers)
64 (cmd_record_call_history): Constify.
65
66 2017-09-27 Tom Tromey <tom@tromey.com>
67
68 * source.c (show_substitute_path_command)
69 (unset_substitute_path_command, set_substitute_path_command):
70 Constify.
71
72 2017-09-27 Tom Tromey <tom@tromey.com>
73
74 * typeprint.c (maintenance_print_type): Constify.
75 * maint.c (maintenance_dump_me, maintenance_demangle)
76 (maintenance_time_display, maintenance_info_sections)
77 (maintenance_print_statistics, maintenance_deprecate)
78 (maintenance_undeprecate): Constify.
79 (maintenance_do_deprecate): Constify. Use std::string.
80 (maintenance_selftest): Constify.
81 * gdbtypes.h (maintenance_print_type): Constify.
82
83 2017-09-27 Tom Tromey <tom@tromey.com>
84
85 * hppa-tdep.c (unwind_command): Constify.
86
87 2017-09-27 Tom Tromey <tom@tromey.com>
88
89 * target-descriptions.c (unset_tdesc_filename_cmd)
90 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
91 Constify.
92
93 2017-09-27 Tom Tromey <tom@tromey.com>
94
95 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
96
97 2017-09-27 Tom Tromey <tom@tromey.com>
98
99 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
100
101 2017-09-27 Tom Tromey <tom@tromey.com>
102
103 * tui/tui-regs.c (tui_reg_command): Constify.
104
105 2017-09-27 Tom Tromey <tom@tromey.com>
106
107 * skip.c (skip_file_command, skip_function_command)
108 (skip_enable_command, skip_disable_command, skip_delete_command):
109 Constify.
110
111 2017-09-27 Tom Tromey <tom@tromey.com>
112
113 * record-btrace.c (cmd_record_btrace_bts_start)
114 (cmd_record_btrace_pt_start): Constify.
115
116 2017-09-27 Tom Tromey <tom@tromey.com>
117
118 * symmisc.c (maintenance_print_symbols)
119 (maintenance_print_msymbols, maintenance_print_objfiles)
120 (maintenance_info_symtabs, maintenance_check_symtabs)
121 (maintenance_expand_symtabs, maintenance_info_line_tables):
122 Constify.
123
124 2017-09-27 Tom Tromey <tom@tromey.com>
125
126 * top.c (new_ui_command): Constify.
127
128 2017-09-27 Tom Tromey <tom@tromey.com>
129
130 * symfile.c (add_symbol_file_command)
131 (remove_symbol_file_command, list_overlays_command)
132 (map_overlay_command, unmap_overlay_command)
133 (overlay_auto_command, overlay_manual_command)
134 (overlay_off_command, overlay_load_command): Constify.
135
136 2017-09-27 Tom Tromey <tom@tromey.com>
137
138 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
139 (info_spu_mailbox_command, info_spu_dma_command)
140 (info_spu_proxydma_command): Constify.
141
142 2017-09-27 Tom Tromey <tom@tromey.com>
143
144 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
145
146 2017-09-27 Tom Tromey <tom@tromey.com>
147
148 * cli/cli-script.c (user_defined_command): Constify.
149
150 2017-09-27 Tom Tromey <tom@tromey.com>
151
152 * cli/cli-dump.c (dump_memory_command, dump_value_command)
153 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
154 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
155 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
156 (dump_binary_value, append_binary_memory, append_binary_value):
157 Constify.
158 (struct dump_context) <func>: Constify.
159 (add_dump_command): Update.
160
161 2017-09-27 Tom Tromey <tom@tromey.com>
162
163 * cli/cli-cmds.c (show_version, show_configuration)
164 (source_command, show_user): Constify.
165
166 2017-09-27 Tom Tromey <tom@tromey.com>
167
168 * target.c (maintenance_print_target_stack): Constify.
169
170 2017-09-27 Tom Tromey <tom@tromey.com>
171
172 * interps.c (interpreter_exec_cmd): Constify.
173
174 2017-09-27 Tom Tromey <tom@tromey.com>
175
176 * record-full.c (cmd_record_full_restore): Constify.
177
178 2017-09-27 Tom Tromey <tom@tromey.com>
179
180 * memattr.c (enable_mem_command, disable_mem_command)
181 (delete_mem_command): Constify.
182
183 2017-09-27 Tom Tromey <tom@tromey.com>
184
185 * value.c (show_convenience): Constify.
186
187 2017-09-27 Tom Tromey <tom@tromey.com>
188
189 * gdbcore.h (core_file_command): Update.
190 * corefile.c (core_file_command): Constify.
191
192 2017-09-27 Tom Tromey <tom@tromey.com>
193
194 * user-regs.c (maintenance_print_user_registers): Constify.
195
196 2017-09-27 Tom Tromey <tom@tromey.com>
197
198 * cp-namespace.c (maintenance_cplus_namespace): Constify.
199
200 2017-09-27 Tom Tromey <tom@tromey.com>
201
202 * cp-support.c (first_component_command): Constify.
203
204 2017-09-27 Tom Tromey <tom@tromey.com>
205
206 * psymtab.c (maintenance_print_psymbols)
207 (maintenance_info_psymtabs, maintenance_check_psymtabs):
208 Constify.
209
210 2017-09-27 Tom Tromey <tom@tromey.com>
211
212 * windows-tdep.c (display_tib): Constify.
213
214 2017-09-27 Tom Tromey <tom@tromey.com>
215
216 * linux-fork.c (delete_checkpoint_command)
217 (detach_checkpoint_command): Constify.
218
219 2017-09-27 Tom Tromey <tom@tromey.com>
220
221 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
222
223 2017-09-27 Tom Tromey <tom@tromey.com>
224
225 * arc-tdep.c (dump_arc_instruction_command): Constify.
226
227 2017-09-27 Tom Tromey <tom@tromey.com>
228
229 * valprint.c (set_radix, show_radix): Constify.
230
231 2017-09-27 Tom Tromey <tom@tromey.com>
232
233 * dtrace-probe.c (info_probes_dtrace_command): Constify.
234
235 2017-09-27 Tom Tromey <tom@tromey.com>
236
237 * command.h (not_just_help_class_command): Update.
238 * cli/cli-decode.h (not_just_help_class_command): Update.
239 * cli/cli-decode.c (not_just_help_class_command): Constify.
240
241 2017-09-27 Tom Tromey <tom@tromey.com>
242
243 * gdb_bfd.c (maintenance_info_bfds): Constify.
244
245 2017-09-27 Tom Tromey <tom@tromey.com>
246
247 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
248 overloads.
249 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
250 (do_const_cfunc): New function.
251 (cmd_cfunc_eq): New overload.
252 (cli_user_command_p): Check do_const_cfunc.
253 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
254 const_cfunc.
255 * command.h (add_cmd): Add const overload and no-function
256 overload.
257 (set_cmd_cfunc): Add const overload.
258 (cmd_const_cfunc_ftype): Declare.
259 (cmd_cfunc_eq): Add const overload.
260 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
261 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
262 overload.
263
264 2017-09-27 Tom Tromey <tom@tromey.com>
265
266 * macroexp.c (get_next_token_for_substitution): New function.
267 (substitute_args): Call it. Check for __VA_OPT__.
268
269 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
270 Pedro Alves <palves@redhat.com>
271
272 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
273 producer_is_icc_lt_14.
274 (producer_is_icc_lt_14): New function.
275 (check_producer): Add code for checking version of ICC.
276 (producer_is_icc): Move to producer.c.
277 (read_structure_type): Restrict ICC workaround to ICC<14.
278 * producer.c: Include selftest.h.
279 (producer_is_icc, producer_parsing_tests, _initialize_producer):
280 New functions.
281 * producer.h (producer_is_icc): New declaration.
282
283 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
284
285 * Makefile.in (SFILES): Add producer.c.
286 (COMMON_OBS): Add producer.o
287 * amd64-tdep.c (producer.h): Add new include.
288 * dwarf2read.c (producer.h): Add new include.
289 * producer.c: New file.
290 * producer.h: New file.
291 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
292 producer.c.
293 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
294 producer.h.
295
296 2017-09-26 Matthias Klose <doko@ubuntu.com>
297
298 * configure.ac: Search ncursesw before ncurses.
299 Check ncursesw/ncurses.h before ncurses/ncurses.h.
300 * gdb_curses.h: Include <ncursesw/ncurses.h>
301 * config.in, configure: Regenerate.
302
303 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
304
305 PR gdb/22185
306 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
307 obsolete.
308 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
309 Remove i386sol2 support.
310 * configure.nat <i386sol2>: Remove.
311 <sol2-64>: Fold into ...
312 <sol2>: ... this.
313 Move common settings to default section.
314 Add sol-thread.o.
315 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
316 x86_64-*-solaris2.1[0-9]*>: Rename to ...
317 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
318 <i[34567]86-*-solaris*>: Remove.
319 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
320
321 * configure.ac: Remove wctype in libw check.
322 (_MSE_INT_H): Don't define on Solaris 7-9.
323 <solaris*>: Remove libthread_db.so.1 check.
324 * configure: Regenerate.
325 * config.in: Regenerate.
326
327 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
328 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
329 (gdb_ps_size_t): Remove.
330 Use base types in users.
331 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
332
333 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
334
335 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
336
337 PR build/22206
338 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
339 (adi_is_addr_mapped): Likewise.
340 (PSR_ICC): Don't redefine.
341 (PSR_IMPL): Likewise.
342
343 2017-09-25 Tom Tromey <tom@tromey.com>
344
345 * regcache.c (regcache::dump): Use string_printf.
346
347 2017-09-25 Tom Tromey <tom@tromey.com>
348
349 * regcache.c (class regcache_invalidator): New.
350 (struct register_to_invalidate): Remove.
351 (make_cleanup_regcache_invalidate): Remove.
352 (regcache::raw_write): Use regcache_invalidator.
353
354 2017-09-25 Tom Tromey <tom@tromey.com>
355
356 * spu-tdep.c (spu2ppu_sniffer): Update.
357 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
358 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
359 Remove.
360 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
361 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
362 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
363 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
364 (frame_pop): Update.
365
366 2017-09-25 Tom Tromey <tom@tromey.com>
367
368 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
369 * regcache.h (regcache_xfree): Don't declare.
370 * regcache.c (regcache_xfree): Remove.
371 (do_regcache_xfree): Use delete.
372 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
373 * linux-fork.c (free_fork): Use delete.
374 (fork_save_infrun_state): Likewise.
375 * jit.c (jit_dealloc_cache): Use delete.
376 * infrun.c (discard_infcall_suspend_state): Use delete.
377
378 2017-09-25 Tom Tromey <tom@tromey.com>
379
380 * regcache.h (regcache_xmalloc): Don't declare.
381 (regcache_raw_set_cached_value): Update comment.
382 * regcache.c (regcache_xmalloc): Remove.
383 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
384 * jit.c (jit_frame_sniffer): Use new.
385 * frame.c (frame_save_as_regcache): Use new.
386
387 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
388
389 * NEWS: Advertise support for guarded-storage registers on IBM z.
390
391 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
392
393 * s390-linux-nat.c (have_regset_gs): New static variable.
394 (s390_linux_fetch_inferior_registers): Handle guarded-storage
395 control block and guarded-storage broadcast control regsets.
396 (s390_read_description): Detect whether the target has
397 guarded-storage support, return appropriate tdesc.
398 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
399 (features/s390x-gs-linux64.c): Likewise.
400 (struct gdbarch_tdep) <have_gs>: New field.
401 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
402 (s390_gsbc_regset): New variables.
403 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
404 and s390_gsbc_regset, if applicable.
405 (s390_core_read_description): Check whether core file was from a
406 target with guarded-storage support; include appropriate regsets.
407 (s390_gdbarch_init): Add registers for guarded-storage support.
408 (_initialize_s390_tdep): Initialize new target descriptions that
409 include registers for guarded-storage support.
410 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
411 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
412 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
413 (S390_NUM_REGS): Adjust macro definition.
414 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
415 (tdesc_s390x_gs_linux64): New declarations.
416
417 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
418
419 * features/s390-gs-linux64.xml: New file.
420 * features/s390-gs.xml: New file.
421 * features/s390-gsbc.xml: New file.
422 * features/s390x-gs-linux64.xml: New file.
423 * features/Makefile (WHICH): Add s390-gs-linux64 and
424 s390x-gs-linux64.
425 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
426 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
427 * features/s390-gs-linux64.c: New generated file.
428 * features/s390x-gs-linux64.c: New file.
429 * regformats/s390-gs-linux64.dat: New file.
430 * regformats/s390x-gs-linux64.dat: New file.
431
432 2017-09-23 Tom Tromey <tom@tromey.com>
433
434 * defs.h (make_cleanup_override_quit_handler): Don't declare.
435
436 2017-09-22 Tom Tromey <tom@tromey.com>
437
438 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
439 type to scoped_restore_tmpl.
440 <scoped_input_handler>: Initialize m_quit_handler directly.
441
442 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
443
444 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
445 (cd_command): Likewise. Free "current_directory" before
446 assigning to it.
447 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
448 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
449 * top.c (gdb_dirbuf): Remove global declaration.
450 * top.h (gdb_dirbuf): Likewise.
451
452 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
453
454 * gnulib/aclocal.m4: Regenerate.
455 * gnulib/config.in: Regenerate.
456 * gnulib/configure: Regenerate.
457 * gnulib/import/Makefile.am: Regenerate.
458 * gnulib/import/Makefile.in: Regenerate.
459 * gnulib/import/assure.h: New file.
460 * gnulib/import/at-func.c: Likewise
461 * gnulib/import/chdir-long.c: New file.
462 * gnulib/import/chdir-long.h: New file.
463 * gnulib/import/cloexec.c: New file.
464 * gnulib/import/cloexec.h: New file.
465 * gnulib/import/close.c: New file.
466 * gnulib/import/closedir.c: New file.
467 * gnulib/import/dirent-private.h: New file.
468 * gnulib/import/dup-safer.c: New file.
469 * gnulib/import/dup.c: New file.
470 * gnulib/import/dup2.c: New file.
471 * gnulib/import/error.c: New file.
472 * gnulib/import/error.h: New file.
473 * gnulib/import/exitfail.c: New file.
474 * gnulib/import/exitfail.h: New file.
475 * gnulib/import/fchdir.c: New file.
476 * gnulib/import/fcntl.c: New file.
477 * gnulib/import/fcntl.in.h: New file.
478 * gnulib/import/fd-hook.c: New file.
479 * gnulib/import/fd-hook.h: New file.
480 * gnulib/import/fd-safer.c: New file.
481 * gnulib/import/fdopendir.c: New file.
482 * gnulib/import/filename.h: New file.
483 * gnulib/import/filenamecat-lgpl.c: New file.
484 * gnulib/import/filenamecat.h: New file.
485 * gnulib/import/fstat.c: New file.
486 * gnulib/import/fstatat.c: New file.
487 * gnulib/import/getcwd-lgpl.c: New file.
488 * gnulib/import/getcwd.c: New file.
489 * gnulib/import/getdtablesize.c: New file.
490 * gnulib/import/getlogin_r.c: New file.
491 * gnulib/import/getprogname.c: New file.
492 * gnulib/import/getprogname.h: New file.
493 * gnulib/import/gettext.h: New file.
494 * gnulib/import/glob-libc.h: New file.
495 * gnulib/import/glob.c: New file.
496 * gnulib/import/glob.in.h: New file.
497 * gnulib/import/intprops.h: New file.
498 * gnulib/import/m4/chdir-long.m4: New file.
499 * gnulib/import/m4/close.m4: New file.
500 * gnulib/import/m4/closedir.m4: New file.
501 * gnulib/import/m4/d-ino.m4: New file.
502 * gnulib/import/m4/d-type.m4: New file.
503 * gnulib/import/m4/dup.m4: New file.
504 * gnulib/import/m4/dup2.m4: New file.
505 * gnulib/import/m4/error.m4: New file.
506 * gnulib/import/m4/fchdir.m4: New file.
507 * gnulib/import/m4/fcntl.m4: New file.
508 * gnulib/import/m4/fcntl_h.m4: New file.
509 * gnulib/import/m4/fdopendir.m4: New file.
510 * gnulib/import/m4/filenamecat.m4: New file.
511 * gnulib/import/m4/fstat.m4: New file.
512 * gnulib/import/m4/fstatat.m4: New file.
513 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
514 * gnulib/import/m4/getcwd-path-max.m4: New file.
515 * gnulib/import/m4/getcwd.m4: New file.
516 * gnulib/import/m4/getdtablesize.m4: New file.
517 * gnulib/import/m4/getlogin_r.m4: New file.
518 * gnulib/import/m4/getprogname.m4: New file.
519 * gnulib/import/m4/glob.m4: New file.
520 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
521 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
522 * gnulib/import/m4/mempcpy.m4: New file.
523 * gnulib/import/m4/memrchr.m4: New file.
524 * gnulib/import/m4/mode_t.m4: New file.
525 * gnulib/import/m4/msvc-inval.m4: New file.
526 * gnulib/import/m4/msvc-nothrow.m4: New file.
527 * gnulib/import/m4/open.m4: New file.
528 * gnulib/import/m4/openat.m4: New file.
529 * gnulib/import/m4/opendir.m4: New file.
530 * gnulib/import/m4/readdir.m4: New file.
531 * gnulib/import/m4/realloc.m4: New file.
532 * gnulib/import/m4/rewinddir.m4: New file.
533 * gnulib/import/m4/save-cwd.m4: New file.
534 * gnulib/import/m4/strdup.m4: New file.
535 * gnulib/import/m4/strerror.m4: New file.
536 * gnulib/import/m4/unistd-safer.m4: New file.
537 * gnulib/import/mempcpy.c: New file.
538 * gnulib/import/memrchr.c: New file.
539 * gnulib/import/msvc-inval.c: New file.
540 * gnulib/import/msvc-inval.h: New file.
541 * gnulib/import/msvc-nothrow.c: New file.
542 * gnulib/import/msvc-nothrow.h: New file.
543 * gnulib/import/open.c: New file.
544 * gnulib/import/openat-die.c: New file.
545 * gnulib/import/openat-priv.h: New file.
546 * gnulib/import/openat-proc.c: New file.
547 * gnulib/import/openat.c: New file.
548 * gnulib/import/openat.h: New file.
549 * gnulib/import/opendir.c: New file.
550 * gnulib/import/pipe-safer.c: New file.
551 * gnulib/import/readdir.c: New file.
552 * gnulib/import/realloc.c: New file.
553 * gnulib/import/rewinddir.c: New file.
554 * gnulib/import/save-cwd.c: New file.
555 * gnulib/import/save-cwd.h: New file.
556 * gnulib/import/strdup.c: New file.
557 * gnulib/import/strerror-override.c: New file.
558 * gnulib/import/strerror-override.h: New file.
559 * gnulib/import/strerror.c: New file.
560 * gnulib/import/unistd--.h: New file.
561 * gnulib/import/unistd-safer.h: New file.
562 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
563 "getcwd" and "glob".
564 * ser-tcp.c: Undefine "close" before redefining it.
565
566 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
567
568 * guile/scm-value.c (gdbscm_value_address): Initialize address,
569 get rid of res_val.
570
571 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
572
573 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
574 <sol2,sparc>: Likewise.
575 <sol2-64,i386>: Likewise.
576
577 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
578 -Wdeprecated-declarations on *-*-solaris*.
579 * configure: Regenerate.
580
581 * procfs.c: Include "nat/inferior.h".
582 (procfs_info_proc): Fix typo.
583
584 2017-09-21 Kevin Buettner <kevinb@redhat.com>
585
586 * remote.c (vector): Include.
587 (struct private_thread_info): Add field, thread_handle.
588 (free_private_thread_info): Deallocate storage associated with
589 thread handle.
590 (get_private_info_thread): Initialize `thread_handle' field.
591 (struct thread_item): Add field, thread_handle.
592 (clear_threads_listing_context): Deallocate storage associated
593 with thread handle.
594 (start_thread): Add support for "handle" attribute.
595 (thread_attributes): Add "handle".
596 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
597 field.
598 (remote_update_thread_list): Update thread_handle.
599 (remote_thread_handle_to_thread_info): New function.
600 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
601
602 2017-09-21 Kevin Buettner <kevinb@redhat.com>
603
604 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
605 function.
606 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
607 * python/python-internal.h (thread_object_type): Declare.
608
609 2017-09-21 Kevin Buettner <kevinb@redhat.com>
610
611 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
612 (target_thread_handle_to_thread_info): Declare.
613 * target.c (target_thread_handle_to_thread_info): New function.
614 * target-delegates.c: Regenerate.
615 * gdbthread.h (find_thread_by_handle): Declare.
616 * thread.c (find_thread_by_handle): New function.
617 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
618 function.
619 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
620
621 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
622
623 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
624
625 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
626
627 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
628
629 2017-09-21 Yao Qi <yao.qi@linaro.org>
630
631 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
632 to gdb_target_obs.
633
634 2017-09-20 Tom Tromey <tom@tromey.com>
635
636 * breakpoint.c (struct counted_command_line): Remove.
637 (breakpoint_commands): Update.
638 (alloc_counted_command_line, incref_counted_command_line)
639 (decref_counted_command_line, do_cleanup_counted_command_line)
640 (make_cleanup_decref_counted_command_line): Remove.
641 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
642 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
643 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
644 (save_breakpoints): Update.
645 * breakpoint.h (counted_command_line): Now a typedef to
646 shared_ptr.
647 (struct breakpoint) <commands>: Now a counted_command_line.
648 (struct bpstats) <command>: Likewise.
649
650 2017-09-20 Tom Tromey <tom@tromey.com>
651
652 * breakpoint.c (struct commands_info, do_map_commands_command):
653 Remove.
654 (commands_command_1): Update.
655 (iterate_over_related_breakpoints): Take a function_view.
656 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
657 (delete_command): Update.
658 (map_breakpoint_numbers): Take a function_view.
659 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
660 (disable_command): Update.
661 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
662 (enable_command): Update.
663 (struct disp_data, do_enable_breakpoint_disp)
664 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
665 (do_map_enable_delete_breakpoint): Remove.
666 (enable_once_command, enable_count_command, enable_delete_command)
667 (delete_trace_variable_command): Update.
668
669 2017-09-20 Tom Tromey <tom@tromey.com>
670
671 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
672 (bpstat_clear): Use delete.
673 (bpstats): New constructors.
674 (bpstat_copy, bpstat_stop_status): Use new.
675 (dprintf_after_condition_true): Update.
676 * breakpoint.h (bpstats::bpstats): Add constructors.
677 (bpstats::~bpstats): Add destructor.
678
679 2017-09-20 Pedro Alves <palves@redhat.com>
680
681 * eval.c (make_params): Delete, refactored as ...
682 (class fake_method): ... this new type's ctor.
683 (fake_method::~fake_method): New.
684 (evaluate_subexp_standard): Use 'fake_method'.
685
686 2017-09-20 Tom Tromey <tom@tromey.com>
687
688 * windows-nat.c (get_windows_debug_event, windows_wait)
689 (do_initial_windows_stuff, windows_attach): Update.
690 * utils.c (vwarning, internal_vproblem): Update.
691 (ui_unregister_input_event_handler_cleanup)
692 (prepare_to_handle_input): Remove.
693 (class scoped_input_handler): New.
694 (defaulted_query, prompt_for_continue): Update.
695 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
696 Update.
697 * top.c (undo_terminal_modifications_before_exit): Update.
698 * target/target.h (target_terminal_init, target_terminal_inferior)
699 (target_terminal_ours): Don't declare.
700 (class target_terminal): New.
701 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
702 (target_terminal_ours_for_output)
703 (make_cleanup_restore_target_terminal): Don't declare.
704 (target_terminal_info): Remove.
705 * target.c (enum terminal_state, terminal_state): Remove.
706 (target_terminal::terminal_state): Define.
707 (target_terminal::init): Rename from target_terminal_init.
708 (target_terminal::inferior): Rename from
709 target_terminal_inferior.
710 (target_terminal::ours): Rename from target_terminal_ours.
711 (target_terminal::ours_for_output): Rename from
712 target_terminal_ours_for_output.
713 (target_terminal::info): New method.
714 (cleanup_restore_target_terminal)
715 (make_cleanup_restore_target_terminal): Remove.
716 * solib.c (handle_solib_event): Update.
717 * remote.c (remote_serial_quit_handler): Update.
718 (remote_terminal_inferior, remote_wait_as): Update.
719 * record-full.c (record_full_wait_1): Update.
720 * nto-procfs.c (procfs_create_inferior): Update.
721 * nat/fork-inferior.c (startup_inferior): Update.
722 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
723 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
724 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
725 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
726 (mi_breakpoint_created, mi_breakpoint_deleted)
727 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
728 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
729 (mi_user_selected_context_changed, report_initial_inferior):
730 Update.
731 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
732 (linux_nat_terminal_inferior): Update.
733 * infrun.c (follow_fork_inferior)
734 (handle_vfork_child_exec_or_exit, do_target_resume)
735 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
736 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
737 Update.
738 * inflow.c (child_terminal_init, info_terminal_command): Update.
739 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
740 (attach_command): Update.
741 * infcall.c (call_thread_fsm_should_stop): Update.
742 * gnu-nat.c (gnu_attach): Update.
743 * extension.c (struct active_ext_lang_state)
744 (restore_active_ext_lang): Update.
745 * exceptions.c (print_flush): Update.
746 * event-top.c (async_enable_stdin, default_quit_handler): Update.
747 (struct quit_handler_cleanup_data, restore_quit_handler)
748 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
749 Remove.
750 * cp-support.c (gdb_demangle): Update.
751 * breakpoint.c (update_inserted_breakpoint_locations)
752 (insert_breakpoint_locations, handle_jit_event)
753 (disable_breakpoints_in_unloaded_shlib): Update.
754 * annotate.c (annotate_breakpoints_invalid)
755 (annotate_frames_invalid): Update.
756
757 2017-09-20 Tom Tromey <tom@tromey.com>
758
759 * main.c (catch_command_errors): Rename from
760 catch_command_errors_const.
761 (captured_main_1): Update.
762
763 2017-09-20 Pedro Alves <palves@redhat.com>
764
765 * cli/cli-cmds.c (list_command): Use print_sal_location.
766 (print_sal_location): New function.
767 (ambiguous_line_spec): Use print_sal_location.
768 * linespec.c (symbol_to_sal): Record the symbol in the sal.
769 * symtab.c (find_function_start_sal): Likewise.
770 * symtab.h (symtab_and_line::symbol): New field.
771
772 2017-09-20 Pedro Alves <palves@redhat.com>
773
774 * linespec.c (minsym_found): Handle non-text minsyms.
775 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
776
777 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
778
779 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
780 backslash.
781
782 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
783
784 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
785 vmovups instead vmovaps.
786 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
787
788 2017-09-19 John Baldwin <jhb@FreeBSD.org>
789
790 * NEWS (Changes since GDB 8.0): Add starti.
791 * infcmd.c (enum run_break): New.
792 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
793 case.
794 (run_command): Use enum run_how.
795 (start_command): Likewise.
796 (starti_command): New function.
797 (RUN_ARGS_HELP): New macro.
798 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
799 commands. Add starti command.
800
801 2017-09-19 Yao Qi <yao.qi@linaro.org>
802
803 * Makefile.in (monitor.o): Remove the rule.
804
805 2017-09-19 Yao Qi <yao.qi@linaro.org>
806
807 * annotate.h (struct annotate_arg_emitter): Use
808 DISABLE_COPY_AND_ASSIGN.
809 * common/refcounted-object.h (refcounted_object): Likewise.
810 * completer.h (struct completion_result): Likewise.
811 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
812 * filename-seen-cache.h (filename_seen_cache): Likewise.
813 * gdbcore.h (thread_section_name): Likewise.
814 * gdb_regex.h (compiled_regex): Likewise.
815 * gdbthread.h (scoped_restore_current_thread): Likewise.
816 * inferior.h (scoped_restore_current_inferior): Likewise.
817 * jit.c (jit_reader): Likewise.
818 * linespec.h (struct linespec_result): Likewise.
819 * mi/mi-parse.h (struct mi_parse): Likewise.
820 * nat/fork-inferior.c (execv_argv): Likewise.
821 * progspace.h (scoped_restore_current_program_space): Likewise.
822 * python/python-internal.h (class gdbpy_enter): Likewise.
823 * regcache.h (regcache): Likewise.
824 * target-descriptions.c (struct tdesc_reg): Likewise.
825 (struct tdesc_type): Likewise.
826 (struct tdesc_feature): Likewise.
827 * ui-out.h (ui_out_emit_type): Likewise.
828
829 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
830
831 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
832 label abort_expression.
833
834 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
835
836 * common/buffer.c (buffer_xml_printf): Adjust.
837 * common/xml-utils.c (xml_escape_text): Change return type to
838 std::string, update code accordingly.
839 * common/xml-utils.h (xml_escape_text): Change return type to
840 std::string.
841 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
842 * windows-tdep.c (windows_xfer_shared_library): Adjust.
843 * unittests/xml-utils-selftests.c (test_xml_escape_text):
844 Adjust.
845
846 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
847
848 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
849 (SUBDIR_UNITTESTS_OBS): Add new object file.
850 * unittests/xml-utils-selftests.c: New file.
851
852 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
853
854 * common/selftest.h (selftest): New struct/interface.
855 (register_test): Add name parameter, add new overload.
856 (run_tests): Add filter parameter.
857 (for_each_selftest_ftype): New typedef.
858 (for_each_selftest): New declaration.
859 * common/selftest.c (tests): Change type to
860 map<string, unique_ptr<selftest>>.
861 (simple_selftest): New struct.
862 (register_test): New function.
863 (register_test): Add name parameter and use it.
864 (run_tests): Add filter parameter and use it. Add prints.
865 Adjust to vector -> map change.
866 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
867 registering selftests.
868 * arm-tdep.c (_initialize_arm_tdep): Likewise.
869 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
870 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
871 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
872 * findvar.c (_initialize_findvar): Likewise.
873 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
874 * maint.c (maintenance_selftest): Update call to run_tests.
875 (maintenance_info_selftests): New function.
876 (_initialize_maint_cmds): Register "maintenance info selftests"
877 command. Update "maintenance selftest" doc.
878 * regcache.c (_initialize_regcache): Add names when registering
879 selftests.
880 * rust-exp.y (_initialize_rust_exp): Likewise.
881 * selftest-arch.c (gdbarch_selftest): New struct.
882 (gdbarch_tests): Remove.
883 (register_test_foreach_arch): Add name parameter. Call
884 register_test.
885 (tests_with_arch): Remove, move most content to
886 gdbarch_selftest::operator().
887 (_initialize_selftests_foreach_arch): Remove.
888 * selftest-arch.h (register_test_foreach_arch): Add name
889 parameter.
890 (run_tests_with_arch): New declaration.
891 * utils-selftests.c (_initialize_utils_selftests): Add names
892 when registering selftests.
893 * utils.c (_initialize_utils): Likewise.
894 * unittests/array-view-selftests.c
895 (_initialize_array_view_selftests): Likewise.
896 * unittests/environ-selftests.c (_initialize_environ_selftests):
897 Likewise.
898 * unittests/function-view-selftests.c
899 (_initialize_function_view_selftests): Likewise.
900 * unittests/offset-type-selftests.c
901 (_initialize_offset_type_selftests): Likewise.
902 * unittests/optional-selftests.c
903 (_initialize_optional_selftests): Likewise.
904 * unittests/scoped_restore-selftests.c
905 (_initialize_scoped_restore_selftests): Likewise.
906 * NEWS: Document "maintenance selftest" and "maint info
907 selftests".
908
909 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
910
911 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
912 scoped_restore.
913
914 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
915
916 * mi/mi-main.c (mi_load_progress): Make uiout variable
917 a unique_ptr.
918
919 2017-09-15 Pedro Alves <palves@redhat.com>
920
921 * compile/compile-c-types.c (convert_enum, convert_int)
922 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
923
924 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
925
926 * dwarf2read.c (copy_string): Remove.
927 (parse_macro_definition): Replace copy_string with savestring.
928
929 2017-09-15 Yao Qi <yao.qi@linaro.org>
930
931 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
932 gdb_target_obs.
933 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
934 Likewise.
935 (i[34567]86-*-linux*): Likewise.
936
937 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
938
939 * dwarf2expr.h (dwarf_stack_value): Add constructor.
940 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
941 <stack>: Change type to std::vector.
942 <stack_len, stack_allocated>: Remove.
943 <grow_stack>: Remove.
944 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
945 (dwarf_expr_context::~dwarf_expr_context): Remove.
946 (dwarf_expr_context::grow_stack): Remove.
947 (dwarf_expr_context::push): Adjust.
948 (dwarf_expr_context::pop): Adjust.
949 (dwarf_expr_context::fetch): Adjust.
950 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
951 (dwarf_expr_context::stack_empty_p): Adjust.
952 (dwarf_expr_context::execute_stack_op): Adjust.
953
954 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
955
956 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
957 return type to bool.
958 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
959
960 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
961
962 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
963 Change type to bool.
964 (dwarf_stack_value) <in_stack_memory>: Likewise.
965 (dwarf_expr_context) <push_address>: Change parameter type to
966 bool.
967 <fetch_in_stack_memory>: Change return type to bool.
968 <push>: Change parameter type to bool.
969 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
970 to bool.
971 (dwarf_expr_context::push_address): Likewise.
972 (dwarf_expr_context::fetch_in_stack_memory): Change return type
973 to bool.
974 (dwarf_expr_context::execute_stack_op): Adjust.
975 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
976
977 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
978
979 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
980 (struct dwarf_expr_context) <n_pieces>: Remove.
981 <pieces>: Change type to std::vector.
982 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
983 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
984 pieces.
985 (dwarf_expr_context::add_piece): Adjust.
986 * dwarf2loc.c (struct piece_closure): Initialize fields.
987 <n_pieces>: Remove.
988 <pieces>: Change type to std::vector.
989 (allocate_piece_closure): Adjust, change parameter to
990 std::vector rvalue and std::move it to piece_closure.
991 (rw_pieced_value): Adjust.
992 (check_pieced_synthetic_pointer): Adjust.
993 (indirect_synthetic_pointer): Adjust.
994 (coerce_pieced_ref): Adjust.
995 (free_pieced_value_closure): Adjust. Use delete to free
996 piece_closure.
997 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
998 to allocate_piece_closure.
999 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1000
1001 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1002
1003 * probe.h (probe_ops_cp): Remove typedef.
1004 (DEF_VEC_P (probe_ops_cp)): Remove.
1005 (all_probe_ops): Change type to std::vector.
1006 * probe.c (info_probes_for_ops): Adjust to vector change.
1007 (probe_linespec_to_ops): Likewise.
1008 (all_probe_ops): Change type to std::vector.
1009 (_initialize_probe): Adjust to vector change.
1010 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1011 * elfread.c (elf_get_probes): Likewise.
1012 * stap-probe.c (_initialize_stap_probe): Likewise.
1013
1014 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1015
1016 * probe.h (struct bound_probe): Define constructors.
1017 * probe.c (bound_probe_s): Remove typedef.
1018 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1019 (collect_probes): Change return type to std::vector, remove
1020 cleanup.
1021 (compare_probes): Return bool, change parameter type. Change
1022 semantic to "less than".
1023 (gen_ui_out_table_header_info): Change parameter to std::vector
1024 and update.
1025 (exists_probe_with_pops): Likewise.
1026 (info_probes_for_ops): Update to std::vector change.
1027 (enable_probes_command): Likewise.
1028 (disable_probes_command): Likewise.
1029
1030 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1031
1032 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1033 vec to std::vector.
1034 * probe.c (parse_probes_in_pspace): Update.
1035 (find_probes_in_objfile): Update.
1036 (find_probe_by_pc): Update.
1037 (collect_probes): Update.
1038 (probe_any_get_probes): Update.
1039 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1040 return type to reference to std::vector.
1041 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1042 std::vector and update.
1043 (dtrace_process_dof): Likewise.
1044 (dtrace_get_probes): Likewise.
1045 * elfread.c (elf_get_probes): Change return type to std::vector,
1046 store an std::vector in bfd_data.
1047 (probe_key_free): Update to std::vector.
1048 * stap-probe.c (handle_stap_probe): Change parameter to
1049 std::vector and update.
1050 (stap_get_probes): Likewise.
1051 * symfile-debug.c (debug_sym_get_probes): Change return type to
1052 std::vector and update.
1053
1054 2017-09-11 Tom Tromey <tom@tromey.com>
1055
1056 * breakpoint.c (program_breakpoint_here_p): Update.
1057 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1058 from make_show_memory_breakpoints_cleanup. Return a
1059 scoped_restore_tmpl<int>.
1060 (restore_show_memory_breakpoints): Remove.
1061 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1062 * mem-break.c (memory_validate_breakpoint): Update.
1063 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1064 (ia64_memory_remove_breakpoint): Update.
1065 (ia64_breakpoint_from_pc): Update.
1066 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1067 from make_show_memory_breakpoints_cleanup.
1068
1069 2017-09-11 Tom Tromey <tom@tromey.com>
1070
1071 * d-namespace.c (d_lookup_symbol): Use std::string.
1072 (find_symbol_in_baseclass): Likewise.
1073
1074 2017-09-11 Tom Tromey <tom@tromey.com>
1075
1076 * ctf.c (ctf_start): Use std::string.
1077
1078 2017-09-11 Tom Tromey <tom@tromey.com>
1079
1080 * ada-lang.c (is_known_support_routine): Update.
1081 (ada_unhandled_exception_name_addr_from_raise): Update.
1082 * guile/scm-frame.c (gdbscm_frame_name): Update.
1083 * python/py-frame.c (frapy_name): Update.
1084 (frapy_function): Update.
1085 * stack.h (find_frame_funname): Update.
1086 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1087 (print_frame): Update.
1088
1089 2017-09-11 Tom Tromey <tom@tromey.com>
1090
1091 * findcmd.c (put_bits): Take a gdb::byte_vector.
1092 (parse_find_args): Return gdb::byte_vector. "args" now const.
1093 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1094 cleanups.
1095 (find_command): Update.
1096
1097 2017-09-11 Tom Tromey <tom@tromey.com>
1098
1099 * cli/cli-script.c (class scoped_restore_hook_in): New.
1100 (clear_hook_in_cleanup): Remove.
1101 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1102 scoped_restore_hook_in.
1103
1104 2017-09-11 Tom Tromey <tom@tromey.com>
1105
1106 * cli/cli-script.c (restore_interp): Remove.
1107 (read_command_lines): Use scoped_restore_interp.
1108 * interps.c (scoped_restore_interp::set_temp): Rename from
1109 interp_set_temp.
1110 * interps.h (class scoped_restore_interp): New.
1111 (interp_set_temp): Remove.
1112
1113 2017-09-11 Tom Tromey <tom@tromey.com>
1114
1115 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1116 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1117 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1118 scoped_restore.
1119 (mi_cmd_break_insert_1): Update.
1120 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1121 scoped_restore.
1122
1123 2017-09-11 Tom Tromey <tom@tromey.com>
1124
1125 * demangle.c (demangle_command): Update.
1126 * breakpoint.c (disable_command): Update.
1127 (enable_command): Update.
1128 (find_location_by_number): Make "number" const. Use
1129 get_number_trailer.
1130 * cli/cli-utils.c (extract_arg): Return std::string.
1131 * probe.c (parse_probe_linespec): Update. Change types.
1132 (collect_probes): Take string arguments.
1133 (parse_probe_linespec): Likewise.
1134 (info_probes_for_ops): Update.
1135 (enable_probes_command): Update.
1136 (disable_probes_command): Update.
1137 * break-catch-sig.c (catch_signal_split_args): Update.
1138 * mi/mi-parse.c (mi_parse): Update.
1139
1140 2017-09-11 Tom Tromey <tom@tromey.com>
1141
1142 * language.h (language_enum): Make argument const.
1143 * language.c (language_enum): Make argument const.
1144
1145 2017-09-11 Tom Tromey <tom@tromey.com>
1146
1147 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1148 as function.
1149 (skip_to_space): Rename from skip_to_space_const.
1150 * common/common-utils.c (skip_to_space): New function.
1151 (skip_to_space): Rename from skip_to_space_const.
1152 * cli/cli-utils.h (get_number): Rename from get_number_const.
1153 (extract_arg): Rename from extract_arg_const.
1154 * cli/cli-utils.c (get_number): Rename from get_number_const.
1155 (extract_arg): Rename from extract_arg_const.
1156 (number_or_range_parser::get_number): Use ::get_number.
1157 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1158 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1159 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1160 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1161 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1162 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1163 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1164 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1165
1166 2017-09-11 Tom Tromey <tom@tromey.com>
1167
1168 * python/python.c (do_start_initialization): Use
1169 py-event-types.def to initialize types.
1170 Define all object type structures.
1171 * python/python-internal.h: Don't declare event initialization
1172 functions.
1173 * python/py-threadevent.c (thread_event_object_type): Don't
1174 define.
1175 * python/py-stopevent.c (stop_event_object_type): Don't define.
1176 * python/py-signalevent.c (signal_event_object_type): Don't
1177 declare or define.
1178 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1179 (clear_objfiles_event_object_type): Don't declare or define.
1180 * python/py-infevents.c (inferior_call_pre_event_object_type)
1181 (inferior_call_post_event_object_type)
1182 (register_changed_event_object_type)
1183 (memory_changed_event_object_type): Don't declare or define.
1184 * python/py-inferior.c (new_thread_event_object_type)
1185 (new_inferior_event_object_type)
1186 (inferior_deleted_event_object_type): Don't declare or define.
1187 * python/py-exitedevent.c (exited_event_object_type): Don't
1188 declare or define.
1189 * python/py-evts.c (gdbpy_initialize_py_events): Use
1190 py-all-events.def.
1191 * python/py-events.h (thread_event_object_type): Don't declare.
1192 (events_object): Use py-all-events.def.
1193 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1194 py-event-types.def.
1195 * python/py-event-types.def: New file.
1196 * python/py-continueevent.c (create_continue_event_object): Don't
1197 declare or define.
1198 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1199 declare or define.
1200 * python/py-all-events.def: New file.
1201
1202 2017-09-11 Tom Tromey <tom@tromey.com>
1203
1204 * python/py-threadevent.c (create_thread_event_object): Return
1205 gdbpy_ref.
1206 * python/py-stopevent.h (create_stop_event_object)
1207 (create_breakpoint_event_object, create_signal_event_object):
1208 Update.
1209 * python/py-stopevent.c (create_stop_event_object): Return
1210 gdbpy_ref.
1211 (emit_stop_event): Update.
1212 * python/py-signalevent.c (create_signal_event_object): Return
1213 gdbpy_ref.
1214 * python/py-infevents.c (create_inferior_call_event_object):
1215 Update.
1216 * python/py-event.h (create_event_object)
1217 (create_thread_event_object): Update.
1218 * python/py-event.c (create_event_object): Return gdbpy_ref.
1219 * python/py-continueevent.c: Return gdbpy_ref.
1220 * python/py-bpevent.c (create_breakpoint_event_object): Return
1221 gdbpy_ref.
1222
1223 2017-09-11 Tom Tromey <tom@tromey.com>
1224
1225 PR python/15622:
1226 * NEWS: Add entry.
1227 * python/python.c (do_start_initialization): Initialize new event
1228 types.
1229 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1230 (gdbpy_initialize_inferior_deleted_event)
1231 (gdbpy_initialize_new_thread_event): Declare.
1232 * python/py-threadevent.c (create_thread_event_object): Add option
1233 "thread" parameter.
1234 * python/py-inferior.c (new_thread_event_object_type)
1235 (new_inferior_event_object_type)
1236 (inferior_deleted_event_object_type): Declare.
1237 (python_new_inferior, python_inferior_deleted): New functions.
1238 (add_thread_object): Emit new_thread event.
1239 (gdbpy_initialize_inferior): Attach new functions to corresponding
1240 observers.
1241 (new_thread, new_inferior, inferior_deleted): Define new event
1242 types.
1243 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1244 registries.
1245 * python/py-events.h (events_object) <new_inferior,
1246 inferior_deleted, new_thread>: New fields.
1247 * python/py-event.h (create_thread_event_breakpoint): Add optional
1248 "thread" parameter.
1249
1250 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1251
1252 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1253 check current_ui instead.
1254 (internal_vproblem): Likewise.
1255
1256 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1257
1258 * thread.c (print_thread_info_1): Remove unnecessary calls to
1259 uiout->is_mi_like_p.
1260
1261 2017-09-09 Tom Tromey <tom@tromey.com>
1262
1263 * namespace.h (add_using_directive): Update.
1264 * namespace.c (add_using_directive): Change type of excludes to
1265 std::vector.
1266 * dwarf2read.c (read_import_statement): Use std::vector.
1267 (read_namespace): Update.
1268 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1269
1270 2017-09-09 Tom Tromey <tom@tromey.com>
1271
1272 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1273
1274 2017-09-09 Tom Tromey <tom@tromey.com>
1275
1276 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1277
1278 2017-09-09 Tom Tromey <tom@tromey.com>
1279
1280 * stack.c (func_command): Use gdb::def_vector.
1281
1282 2017-09-09 Tom Tromey <tom@tromey.com>
1283
1284 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1285 ui_out_emit_list, ui_out_emit_tuple.
1286 (mi_cmd_var_update): Likewise.
1287
1288 2017-09-09 Tom Tromey <tom@tromey.com>
1289
1290 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1291 ui_out_redirect_pop.
1292 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1293 ui_out_redirect_pop.
1294 * utils.c (do_ui_out_redirect_pop)
1295 (make_cleanup_ui_out_redirect_pop): Remove.
1296 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1297 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1298 * ui-out.h (ui_out_redirect_pop): New class.
1299
1300 2017-09-09 Tom Tromey <tom@tromey.com>
1301
1302 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1303 (list_available_thread_groups, mi_cmd_list_thread_groups)
1304 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1305 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1306 Likewise.
1307
1308 2017-09-09 Tom Tromey <tom@tromey.com>
1309
1310 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1311 ui_out_emit_tuple.
1312
1313 2017-09-09 Tom Tromey <tom@tromey.com>
1314
1315 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1316 * stack.c (print_frame): Use ui_out_emit_tuple.
1317 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1318 (info_spu_mailbox_command, info_spu_dma_command)
1319 (info_spu_proxydma_command): Likewise.
1320 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1321 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1322 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1323 ui_out_emit_tuple.
1324 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1325
1326 2017-09-09 Tom Tromey <tom@tromey.com>
1327
1328 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1329 (class ui_out_emit_table): Update comment.
1330 * ui-out.c (do_cleanup_table_end)
1331 (make_cleanup_ui_out_table_begin_end): Remove.
1332 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1333 (info_spu_dma_cmdlist): Likewise.
1334 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1335 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1336 ui_out_emit_table.
1337
1338 2017-09-09 Tom Tromey <tom@tromey.com>
1339
1340 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1341 ui_out_emit_list, gdb::optional.
1342
1343 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1344
1345 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1346 prototype.
1347 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1348 prototype.
1349 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1350 prototype.
1351 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1352 * ada-exp.y: Remove _initialize_ada_exp prototype.
1353 * ada-lang.c: Remove _initialize_ada_language prototype.
1354 * ada-tasks.c: Remove _initialize_tasks prototype.
1355 * addrmap.c: Remove _initialize_addrmap prototype.
1356 * agent.c: Remove _initialize_agent prototype.
1357 * aix-thread.c: Remove _initialize_aix_thread prototype.
1358 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1359 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1360 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1361 prototype.
1362 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1363 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1364 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1365 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1366 prototype.
1367 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1368 prototype.
1369 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1370 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1371 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1372 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1373 prototype.
1374 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1375 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1376 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1377 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1378 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1379 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1380 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1381 prototype.
1382 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1383 prototype.
1384 * annotate.c: Remove _initialize_annotate prototype.
1385 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1386 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1387 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1388 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1389 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1390 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1391 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1392 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1393 prototype.
1394 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1395 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1396 * auto-load.c: Remove _initialize_auto_load prototype.
1397 * auxv.c: Remove _initialize_auxv prototype.
1398 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1399 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1400 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1401 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1402 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1403 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1404 prototype.
1405 * break-catch-throw.c: Remove _initialize_break_catch_throw
1406 prototype.
1407 * breakpoint.c: Remove _initialize_breakpoint prototype.
1408 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1409 * btrace.c: Remove _initialize_btrace prototype.
1410 * charset.c: Remove _initialize_charset prototype.
1411 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1412 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1413 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1414 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1415 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1416 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1417 * coffread.c: Remove _initialize_coffread prototype.
1418 * compile/compile.c: Remove _initialize_compile prototype.
1419 * complaints.c: Remove _initialize_complaints prototype.
1420 * completer.c: Remove _initialize_completer prototype.
1421 * copying.awk: Remove _initialize_copying prototype.
1422 * copying.c: Regenerate.
1423 * core-regset.c: Remove _initialize_core_regset prototype.
1424 * corefile.c: Remove _initialize_core prototype.
1425 * corelow.c: Remove _initialize_corelow prototype.
1426 * cp-abi.c: Remove _initialize_cp_abi prototype.
1427 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1428 * cp-support.c: Remove _initialize_cp_support prototype.
1429 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1430 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1431 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1432 * ctf.c: Remove _initialize_ctf prototype.
1433 * d-lang.c: Remove _initialize_d_language prototype.
1434 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1435 prototype.
1436 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1437 * dbxread.c: Remove _initialize_dbxread prototype.
1438 * dcache.c: Remove _initialize_dcache prototype.
1439 * demangle.c: Remove _initialize_demangler prototype.
1440 * disasm-selftests.c: Remove _initialize_disasm_selftests
1441 prototype.
1442 * disasm.c: Remove _initialize_disasm prototype.
1443 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1444 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1445 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1446 prototype.
1447 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1448 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1449 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1450 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1451 * elfread.c: Remove _initialize_elfread prototype.
1452 * exec.c: Remove _initialize_exec prototype.
1453 * extension.c: Remove _initialize_extension prototype.
1454 * f-lang.c: Remove _initialize_f_language prototype.
1455 * f-valprint.c: Remove _initialize_f_valprint prototype.
1456 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1457 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1458 * filesystem.c: Remove _initialize_filesystem prototype.
1459 * findcmd.c: Remove _initialize_mem_search prototype.
1460 * fork-child.c: Remove _initialize_fork_child prototype.
1461 * frame-base.c: Remove _initialize_frame_base prototype.
1462 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1463 * frame.c: Remove _initialize_frame prototype.
1464 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1465 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1466 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1467 * gcore.c: Remove _initialize_gcore prototype.
1468 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1469 * gdbarch.c: Regenerate.
1470 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1471 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1472 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1473 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1474 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1475 * go-lang.c: Remove _initialize_go_language prototype.
1476 * go32-nat.c: Remove _initialize_go32_nat prototype.
1477 * guile/guile.c: Remove _initialize_guile prototype.
1478 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1479 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1480 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1481 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1482 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1483 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1484 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1485 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1486 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1487 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1488 prototype.
1489 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1490 prototype.
1491 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1492 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1493 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1494 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1495 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1496 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1497 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1498 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1499 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1500 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1501 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1502 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1503 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1504 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1505 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1506 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1507 prototype.
1508 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1509 prototype.
1510 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1511 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1512 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1513 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1514 * infcall.c: Remove _initialize_infcall prototype.
1515 * infcmd.c: Remove _initialize_infcmd prototype.
1516 * inferior.c: Remove _initialize_inferiors prototype.
1517 * inflow.c: Remove _initialize_inflow prototype.
1518 * infrun.c: Remove _initialize_infrun prototype.
1519 * interps.c: Remove _initialize_interpreter prototype.
1520 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1521 * jit.c: Remove _initialize_jit prototype.
1522 * language.c: Remove _initialize_language prototype.
1523 * linux-fork.c: Remove _initialize_linux_fork prototype.
1524 * linux-nat.c: Remove _initialize_linux_nat prototype.
1525 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1526 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1527 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1528 * m2-lang.c: Remove _initialize_m2_language prototype.
1529 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1530 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1531 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1532 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1533 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1534 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1535 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1536 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1537 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1538 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1539 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1540 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1541 * machoread.c: Remove _initialize_machoread prototype.
1542 * macrocmd.c: Remove _initialize_macrocmd prototype.
1543 * macroscope.c: Remove _initialize_macroscope prototype.
1544 * maint.c: Remove _initialize_maint_cmds prototype.
1545 * mdebugread.c: Remove _initialize_mdebugread prototype.
1546 * memattr.c: Remove _initialize_mem prototype.
1547 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1548 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1549 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1550 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1551 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1552 * microblaze-linux-tdep.c: Remove
1553 _initialize_microblaze_linux_tdep prototype.
1554 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1555 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1556 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1557 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1558 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1559 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1560 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1561 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1562 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1563 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1564 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1565 prototype.
1566 * mipsread.c: Remove _initialize_mipsread prototype.
1567 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1568 prototype.
1569 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1570 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1571 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1572 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1573 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1574 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1575 prototype.
1576 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1577 * nto-procfs.c: Remove _initialize_procfs prototype.
1578 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1579 * objc-lang.c: Remove _initialize_objc_language prototype.
1580 * objfiles.c: Remove _initialize_objfiles prototype.
1581 * observer.c: Remove observer_test_first_notification_function,
1582 observer_test_second_notification_function,
1583 observer_test_third_notification_function, and
1584 _initialize_observer prototypes.
1585 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1586 * osabi.c: Remove _initialize_gdb_osabi prototype.
1587 * osdata.c: Remove _initialize_osdata prototype.
1588 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1589 * parse.c: Remove _initialize_parse prototype.
1590 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1591 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1592 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1593 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1594 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1595 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1596 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1597 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1598 * printcmd.c: Remove _initialize_printcmd prototype.
1599 * probe.c: Remove _initialize_probe prototype.
1600 * proc-api.c: Remove _initialize_proc_api prototype.
1601 * proc-events.c: Remove _initialize_proc_events prototype.
1602 * proc-service.c: Remove _initialize_proc_service prototype.
1603 * procfs.c: Remove _initialize_procfs prototype.
1604 * psymtab.c: Remove _initialize_psymtab prototype.
1605 * python/python.c: Remove _initialize_python prototype.
1606 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1607 * record-btrace.c: Remove _initialize_record_btrace prototype.
1608 * record-full.c: Remove _initialize_record_full prototype.
1609 * record.c: Remove _initialize_record prototype.
1610 * regcache.c: Remove _initialize_regcache prototype.
1611 * reggroups.c: Remove _initialize_reggroup prototype.
1612 * remote-notif.c: Remove _initialize_notif prototype.
1613 * remote-sim.c: Remove _initialize_remote_sim prototype.
1614 * remote.c: Remove _initialize_remote prototype.
1615 * reverse.c: Remove _initialize_reverse prototype.
1616 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1617 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1618 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1619 prototype.
1620 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1621 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1622 * rust-exp.y: Remove _initialize_rust_exp prototype.
1623 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1624 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1625 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1626 * score-tdep.c: Remove _initialize_score_tdep prototype.
1627 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1628 prototype.
1629 * ser-go32.c: Remove _initialize_ser_dos prototype.
1630 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1631 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1632 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1633 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1634 * serial.c: Remove _initialize_serial prototype.
1635 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1636 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1637 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1638 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1639 * skip.c: Remove _initialize_step_skip prototype.
1640 * sol-thread.c: Remove _initialize_sol_thread prototype.
1641 * solib-aix.c: Remove _initialize_solib_aix prototype.
1642 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1643 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1644 * solib-frv.c: Remove _initialize_frv_solib prototype.
1645 * solib-spu.c: Remove _initialize_spu_solib prototype.
1646 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1647 * solib-target.c: Remove _initialize_solib_target prototype.
1648 * solib.c: Remove _initialize_solib prototype.
1649 * source.c: Remove _initialize_source prototype.
1650 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1651 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1652 prototype.
1653 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1654 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1655 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1656 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1657 prototype.
1658 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1659 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1660 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1661 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1662 prototype.
1663 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1664 prototype.
1665 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1666 prototype.
1667 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1668 prototype.
1669 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1670 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1671 prototype.
1672 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1673 prototype.
1674 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1675 prototype.
1676 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1677 prototype.
1678 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1679 prototype.
1680 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1681 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1682 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1683 * stabsread.c: Remove _initialize_stabsread prototype.
1684 * stack.c: Remove _initialize_stack prototype.
1685 * stap-probe.c: Remove _initialize_stap_probe prototype.
1686 * std-regs.c: Remove _initialize_frame_reg prototype.
1687 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1688 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1689 * symfile.c: Remove _initialize_symfile prototype.
1690 * symmisc.c: Remove _initialize_symmisc prototype.
1691 * symtab.c: Remove _initialize_symtab prototype.
1692 * target-dcache.c: Remove _initialize_target_dcache prototype.
1693 * target-descriptions.c: Remove _initialize_target_descriptions
1694 prototype.
1695 * thread.c: Remove _initialize_thread prototype.
1696 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1697 prototype.
1698 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1699 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1700 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1701 prototype.
1702 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1703 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1704 * tracefile.c: Remove _initialize_tracefile prototype.
1705 * tracepoint.c: Remove _initialize_tracepoint prototype.
1706 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1707 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1708 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1709 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1710 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1711 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1712 * tui/tui.c: Remove _initialize_tui prototype.
1713 * typeprint.c: Remove _initialize_typeprint prototype.
1714 * user-regs.c: Remove _initialize_user_regs prototype.
1715 * utils.c: Remove _initialize_utils prototype.
1716 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1717 * valarith.c: Remove _initialize_valarith prototype.
1718 * valops.c: Remove _initialize_valops prototype.
1719 * valprint.c: Remove _initialize_valprint prototype.
1720 * value.c: Remove _initialize_values prototype.
1721 * varobj.c: Remove _initialize_varobj prototype.
1722 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1723 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1724 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1725 * windows-nat.c: Remove _initialize_windows_nat,
1726 _initialize_check_for_gdb_ini, and _initialize_loadable
1727 prototypes.
1728 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1729 * xcoffread.c: Remove _initialize_xcoffread prototype.
1730 * xml-support.c: Remove _initialize_xml_support prototype.
1731 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1732 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1733 prototype.
1734 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1735 prototype.
1736 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1737
1738 2017-09-08 Keith Seitz <keiths@redhat.com>
1739
1740 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1741 field.
1742
1743 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1744
1745 * f-valprint.c (f_val_print): Remove check for one byte
1746 sized integers. Remove printing of character type.
1747
1748 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1749 Christoph Weinmann <christoph.t.weinmann@intel.com>
1750 Bernhard Heckel <bernhard.heckel@intel.com>
1751
1752 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1753 to maintain proper indentation when printing pointers/refs.
1754
1755 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1756
1757 GDB 8.0.1 released.
1758
1759 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1760
1761 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1762
1763 2017-09-05 Tom Tromey <tom@tromey.com>
1764
1765 * parse.c (funcall_chain): Now a std::vector.
1766 (start_arglist, end_arglist): Simplify.
1767 (free_funcalls): Remove.
1768 (parse_exp_in_context_1): Remove cleanup.
1769
1770 2017-09-05 Tom Tromey <tom@tromey.com>
1771
1772 * go-exp.y (go_parse): Don't create a cleanup.
1773
1774 2017-09-05 Tom Tromey <tom@tromey.com>
1775
1776 * d-exp.y (PrimaryExpression): Use std::string.
1777 (d_parse): Don't create a cleanup.
1778
1779 2017-09-05 Tom Tromey <tom@tromey.com>
1780
1781 * utils.c (do_clear_parser_state): Remove.
1782 (make_cleanup_clear_parser_state): Remove.
1783 * p-exp.y (pascal_parse): Use scoped_restore.
1784 * m2-exp.y (m2_parse): Use scoped_restore.
1785 * f-exp.y (f_parse): Use scoped_restore.
1786 * d-exp.y (d_parse): Use scoped_restore.
1787 * c-exp.y (c_parse): Use scoped_restore.
1788 * ada-exp.y (ada_parse): Use scoped_restore.
1789 * utils.h (make_cleanup_clear_parser_state): Remove.
1790
1791 2017-09-06 Keith Seitz <keiths@redhat.com>
1792
1793 * dwarf2read.c (dw2_linkage_name_attr): New function.
1794 (dw2_linkage_name): New function.
1795 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1796 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1797 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1798
1799 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1800
1801 * config/djgpp/djconfig.sh: Correct shell portability issue.
1802
1803 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1804
1805 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1806
1807 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1808
1809 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1810 * NEWS: Mention new FreeBSD/mips native configuration.
1811 * configure.host: Add aarch64*-*-freebsd*.
1812 * configure.nat: Likewise.
1813 * aarch64-fbsd-nat.c: New file.
1814
1815 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1816
1817 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1818 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1819 * NEWS: Mention new FreeBSD/aarch64 target.
1820 * configure.tgt: Add aarch64*-*-freebsd*.
1821 * aarch64-fbsd-tdep.c: New file.
1822 * aarch64-fbsd-tdep.h: New file.
1823
1824 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1825
1826 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1827
1828 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1829
1830 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1831 of TLS symbols.
1832
1833 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1834
1835 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1836 call.
1837
1838 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1839
1840 * infrun.c (follow_exec): Call add_thread after
1841 target_find_description.
1842
1843 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 * infrun.c (handle_inferior_event_1): When exec'ing, read
1846 stop_pc after follow_exec.
1847
1848 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1849
1850 * remote.c (process_g_packet): Update error message.
1851
1852 2017-09-05 Yao Qi <yao.qi@linaro.org>
1853
1854 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1855 targets.
1856
1857 2017-09-05 Pedro Alves <palves@redhat.com>
1858
1859 * eval.c (eval_call, evaluate_funcall): New functions, factored
1860 out from ...
1861 (evaluate_subexp_standard): ... this.
1862
1863 2017-09-05 Yao Qi <yao.qi@linaro.org>
1864
1865 * amd64-tdep.c (amd64_target_description): Create target
1866 descriptions.
1867 (_initialize_amd64_tdep): Don't call functions
1868 initialize_tdesc_amd64_*. Add self tests.
1869 * arch/amd64.c (amd64_create_target_description): Add parameter
1870 is_linux. Call set_tdesc_osabi if is_linux is true.
1871 * arch/amd64.h (amd64_create_target_description): Update the
1872 declaration.
1873 * arch/i386.c (i386_create_target_description): Add parameter
1874 is_linux. Call set_tdesc_osabi if is_linux is true.
1875 * arch/i386.h (i386_create_target_description): Update
1876 declaration.
1877 * configure.tgt: Add i386.o to gdb_target_obs.
1878 * features/Makefile (XMLTOC): Remove i386/*.xml.
1879 * features/i386/amd64-avx-avx512.c: Remove.
1880 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1881 * features/i386/amd64-avx-mpx.c: Remove.
1882 * features/i386/amd64-avx.c: Remove.
1883 * features/i386/amd64-mpx.c: Remove.
1884 * features/i386/amd64.c: Remove.
1885 * features/i386/i386-avx-avx512.c: Remove.
1886 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1887 * features/i386/i386-avx-mpx.c: Remove.
1888 * features/i386/i386-avx.c: Remove.
1889 * features/i386/i386-mmx.c: Remove.
1890 * features/i386/i386-mpx.c: Remove.
1891 * features/i386/i386.c: Remove.
1892 * i386-tdep.c: Don't include features/i386/i386*.c., include
1893 target-descriptions.h and arch/i386.h.
1894 (i386_target_description): Create target descriptions.
1895 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1896 functions. Do self tests.
1897
1898 2017-09-05 Yao Qi <yao.qi@linaro.org>
1899
1900 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1901 * features/i386/amd64-avx-avx512-linux.c: Removed.
1902 * features/i386/amd64-avx-linux.c: Removed.
1903 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1904 * features/i386/amd64-avx-mpx-linux.c: Removed.
1905 * features/i386/amd64-linux.c: Removed.
1906 * features/i386/amd64-mpx-linux.c: Removed.
1907 * features/i386/x32-avx-avx512-linux.c: Removed.
1908 * features/i386/x32-avx-linux.c: Removed.
1909 * features/i386/x32-linux.c: Removed.
1910
1911 2017-09-05 Yao Qi <yao.qi@linaro.org>
1912
1913 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1914 features/i386/*.c.
1915 (amd64_linux_read_description): Call
1916 amd64_create_target_description.
1917 * arch/amd64.c: New file.
1918 * arch/amd64.h: New file.
1919 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1920 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1921
1922 2017-09-05 Yao Qi <yao.qi@linaro.org>
1923
1924 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1925 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1926 (amd64_linux_read_description): Create target descriptions.
1927 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1928 functions. Add unit tests.
1929 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1930 x32-core.xml.
1931 * features/i386/64bit-avx.c: Generated.
1932 * features/i386/64bit-avx512.c: Generated.
1933 * features/i386/64bit-core.c: Generated.
1934 * features/i386/64bit-linux.c: Generated.
1935 * features/i386/64bit-mpx.c: Generated.
1936 * features/i386/64bit-pkeys.c: Generated.
1937 * features/i386/64bit-segments.c: Generated.
1938 * features/i386/64bit-sse.c: Generated.
1939 * features/i386/x32-core.c: Generated.
1940 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1941 c files for amd64-linux and x32-linux.
1942
1943 2017-09-05 Yao Qi <yao.qi@linaro.org>
1944
1945 * amd64-linux-tdep.c (amd64_linux_read_description): New
1946 function.
1947 (amd64_linux_core_read_description): Call
1948 amd64_linux_read_description.
1949 (amd64_linux_init_abi): Likewise.
1950 (amd64_x32_linux_init_abi): Likewise.
1951 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1952 * x86-linux-nat.c (x86_linux_read_description): Call
1953 amd64_linux_read_description.
1954
1955 2017-09-05 Yao Qi <yao.qi@linaro.org>
1956
1957 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1958 comments.
1959
1960 2017-09-05 Yao Qi <yao.qi@linaro.org>
1961
1962 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1963 * features/i386/i386-avx-avx512-linux.c: Remove.
1964 * features/i386/i386-avx-linux.c: Remove.
1965 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1966 * features/i386/i386-avx-mpx-linux.c: Remove.
1967 * features/i386/i386-linux.c: Remove.
1968 * features/i386/i386-mmx-linux.c: Remove.
1969 * features/i386/i386-mpx-linux.c: Remove.
1970
1971 2017-09-05 Yao Qi <yao.qi@linaro.org>
1972
1973 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1974 (SFILES): Add arch/i386.c.
1975 (HFILES_NO_SRCDIR): Add arch/i386.h.
1976 * arch/i386.c: New file.
1977 * arch/i386.h: New file.
1978 * arch/tdesc.h (allocate_target_description): Declare.
1979 (set_tdesc_architecture): Declare.
1980 (set_tdesc_osabi): Declare.
1981 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1982 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1983 include arch/i386.h.
1984 (i386_linux_read_description): Remove code and call
1985 i386_create_target_description.
1986 (set_tdesc_architecture): New function.
1987 (set_tdesc_osabi): New function.
1988 * target-descriptions.h (allocate_target_description): Remove.
1989
1990 2017-09-05 Yao Qi <yao.qi@linaro.org>
1991
1992 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1993 * target-descriptions.c (tdesc_create_feature): Likewise, and
1994 adjust code.
1995 * features/i386/32bit-avx.c: Re-generated.
1996 * features/i386/32bit-avx512.c: Re-generated.
1997 * features/i386/32bit-core.c: Re-generated.
1998 * features/i386/32bit-linux.c: Re-generated.
1999 * features/i386/32bit-mpx.c: Re-generated.
2000 * features/i386/32bit-pkeys.c: Re-generated.
2001 * features/i386/32bit-sse.c: Re-generated.
2002
2003 2017-09-05 Yao Qi <yao.qi@linaro.org>
2004
2005 * regformats/regdef.h (struct reg): Override operator == and !=.
2006
2007 2017-09-05 Yao Qi <yao.qi@linaro.org>
2008
2009 * arch/tdesc.h: New file.
2010 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2011 * target-descriptions.c: Update comments.
2012 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2013 declarations.
2014 * features/i386/32bit-avx.c: Re-generated.
2015 * features/i386/32bit-avx512.c: Re-generated.
2016 * features/i386/32bit-core.c: Re-generated.
2017 * features/i386/32bit-linux.c: Re-generated.
2018 * features/i386/32bit-mpx.c: Re-generated.
2019 * features/i386/32bit-pkeys.c: Re-generated.
2020 * features/i386/32bit-sse.c: Re-generated.
2021
2022 2017-09-05 Yao Qi <yao.qi@linaro.org>
2023
2024 * regformats/regdat.sh: Update generated code.
2025
2026 2017-09-05 Yao Qi <yao.qi@linaro.org>
2027
2028 * regformats/regdat.sh: Adjust code order.
2029
2030 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2031
2032 * expprint.c (dump_subexp_body_standard): Use constant format
2033 string in fprintf_filtered call.
2034
2035 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2036
2037 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2038 NetBSD/i386.
2039 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2040
2041 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2042
2043 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2044
2045 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2046
2047 * bsd-kvm.o: Define _KMEMUSER.
2048 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2049 * configure: Regenerate.
2050
2051 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2052
2053 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2054 * i386-fbsd-nat.c: Likewise.
2055
2056 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2057
2058 * unittests/array-view-selftests.c: Add include of <array>.
2059
2060 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2061
2062 * spu-tdep.c (flush_ea_cache): Add missing argument to
2063 call_function_by_hand.
2064
2065 2017-09-04 Pedro Alves <palves@redhat.com>
2066
2067 * NEWS (Safer support for debugging with no debug info): New.
2068
2069 2017-09-04 Pedro Alves <palves@redhat.com>
2070
2071 * c-exp.y (function_method, function_method_void): Add current
2072 instance flags to TYPE_INSTANCE.
2073 * dwarf2read.c (check_modifier): New.
2074 (compute_delayed_physnames): Assert that only C++ adds delayed
2075 physnames. Mark fn_fields as const/volatile depending on
2076 physname.
2077 * eval.c (make_params): New type_instance_flags parameter. Use
2078 it as the new type's instance flags.
2079 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2080 flags element and pass it to make_params.
2081 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2082 instance flags element.
2083 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2084 * gdbtypes.h: Include "enum-flags.h".
2085 (type_instance_flags): New enum-flags type.
2086 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2087 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2088 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2089 (follow_type_instance_flags): New function.
2090 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2091 * parser-defs.h (follow_type_instance_flags): Declare.
2092 * valops.c (value_struct_elt_for_reference): const/volatile must
2093 match too.
2094
2095 2017-09-04 Pedro Alves <palves@redhat.com>
2096
2097 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2098 function/method scopes; lookup the nested name as a function local
2099 static variable.
2100
2101 2017-09-04 Pedro Alves <palves@redhat.com>
2102
2103 (%type <voidval>): Add function_method.
2104 * c-exp.y (exp): New production for calls with no arguments.
2105 (function_method, function_method_void_or_typelist): New
2106 productions.
2107 (exp): New production for "method()::static_var".
2108 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2109 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2110 Handle OP_FUNC_STATIC_VAR.
2111 * parse.c (operator_length_standard):
2112 Handle OP_FUNC_STATIC_VAR.
2113
2114 2017-09-04 Pedro Alves <palves@redhat.com>
2115
2116 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2117 handling.
2118 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2119 Ditto.
2120 * parse.c (operator_length_standard, operator_check_standard):
2121 Ditto.
2122 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2123
2124 2017-09-04 Pedro Alves <palves@redhat.com>
2125
2126 * ax-gdb.c: Include "typeprint.h".
2127 (gen_expr_for_cast): New function.
2128 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2129 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2130 type is unknown.
2131 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2132 nodebug_data_symbol.
2133 * eval.c: Include "typeprint.h".
2134 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2135 Error out if symbol has unknown type.
2136 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2137 evaluate_subexp_for_cast.
2138 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2139 OP_VAR_MSYM_VALUE.
2140 (evaluate_subexp_for_cast): New function.
2141 * gdbtypes.c (init_nodebug_var_type): New function.
2142 (objfile_type): Use it to initialize types of variables with no
2143 debug info.
2144 * typeprint.c (error_unknown_type): New.
2145 * typeprint.h (error_unknown_type): New declaration.
2146 * compile/compile-c-types.c (convert_type_basic): Handle
2147 TYPE_CODE_ERROR; warn and fallback to int for variables with
2148 unknown type.
2149
2150 2017-09-04 Pedro Alves <palves@redhat.com>
2151
2152 * eval.c (evaluate_var_value): New function, factored out from ...
2153 (evaluate_subexp_standard): ... here.
2154
2155 2017-09-04 Pedro Alves <palves@redhat.com>
2156
2157 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2158 Remove useless assignments to 'op'.
2159
2160 2017-09-04 Pedro Alves <palves@redhat.com>
2161
2162 * eval.c (eval_skip_value): New function.
2163 (evaluate_subexp_standard): Use it.
2164
2165 2017-09-04 Pedro Alves <palves@redhat.com>
2166
2167 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2168 function name from symbol/minsym and pass it to
2169 error_call_unknown_return_type.
2170
2171 2017-09-04 Pedro Alves <palves@redhat.com>
2172
2173 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2174 * ax-gdb.c (gen_msym_var_ref): New function.
2175 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2176 * eval.c (evaluate_var_msym_value): New function.
2177 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2178 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2179 to call_function_by_hand.
2180 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2181 Handle OP_VAR_MSYM_VALUE.
2182 (union exp_element) <msymbol>: New field.
2183 * minsyms.h (struct type): Forward declare.
2184 (find_minsym_type_and_address): Declare.
2185 * parse.c (write_exp_elt_msym): New function.
2186 (write_exp_msymbol): Delete, refactored as ...
2187 (find_minsym_type_and_address): ... this new function.
2188 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2189 (operator_length_standard, operator_check_standard): Handle
2190 OP_VAR_MSYM_VALUE.
2191 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2192
2193 2017-09-04 Pedro Alves <palves@redhat.com>
2194
2195 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2196 TYPE_GNU_IFUNC specially here. Throw error if return type is
2197 unknown.
2198 * ada-typeprint.c (print_func_type): Handle functions with unknown
2199 return type.
2200 * c-typeprint.c (c_type_print_base): Handle functions and methods
2201 with unknown return type.
2202 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2203 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2204 * compile/compile-c-types.c: Include "objfiles.h".
2205 (convert_func): For functions with unknown return type, warn and
2206 default to int.
2207 * compile/compile-object-run.c (compile_object_run): Adjust call
2208 to call_function_by_hand_dummy.
2209 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2210 call_function_by_hand.
2211 * eval.c (evaluate_subexp_standard): Adjust calls to
2212 call_function_by_hand. Handle functions and methods with unknown
2213 return type. Pass expect_type to call_function_by_hand.
2214 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2215 return type.
2216 * gcore.c (call_target_sbrk): Adjust call to
2217 call_function_by_hand.
2218 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2219 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2220 an integer address type instead of nodebug.
2221 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2222 call_function_by_hand.
2223 * infcall.c (error_call_unknown_return_type): New function.
2224 (call_function_by_hand): New "default_return_type" parameter.
2225 Pass it down.
2226 (call_function_by_hand_dummy): New "default_return_type"
2227 parameter. Use it instead of defaulting to int. If there's no
2228 default and the return type is unknown, throw an error. If
2229 there's a default return type, and the called function has no
2230 debug info, then assume the function is prototyped.
2231 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2232 New "default_return_type" parameter.
2233 (error_call_unknown_return_type): New declaration.
2234 * linux-fork.c (call_lseek): Cast return type of lseek.
2235 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2236 call_function_by_hand.
2237 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2238 calls to call_function_by_hand.
2239 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2240 return type.
2241 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2242 (value_nsstring, print_object_command): Adjust calls to
2243 call_function_by_hand.
2244 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2245 functions with unknown return type.
2246 (pascal_type_print_func_varspec_suffix): New function.
2247 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2248 TYPE_CODE_METHOD>: Use it.
2249 * python/py-value.c (valpy_call): Adjust call to
2250 call_function_by_hand.
2251 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2252 call_function_by_hand.
2253 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2254 call_function_by_hand.
2255 * valops.c (value_allocate_space_in_inferior): Adjust call to
2256 call_function_by_hand.
2257 * typeprint.c (type_print_unknown_return_type): New function.
2258 * typeprint.h (type_print_unknown_return_type): New declaration.
2259
2260 2017-09-04 Pedro Alves <palves@redhat.com>
2261
2262 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2263 types with more than one parameter as prototyped.
2264
2265 2017-09-04 Pedro Alves <palves@redhat.com>
2266
2267 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2268 (disassemble_command): Use gdb_disassembly_flags instead of bare
2269 int.
2270 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2271 (dump_insns, do_mixed_source_and_assembly_deprecated)
2272 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2273 Use gdb_disassembly_flags instead of bare int.
2274 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2275 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2276 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2277 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2278 (enum gdb_disassembly_flag): ... values of this new enumeration.
2279 (gdb_disassembly_flags): Define.
2280 (gdb_disassembly)
2281 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2282 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2283 gdb_disassembly_flags instead of bare int.
2284 * record-btrace.c (btrace_insn_history)
2285 (record_btrace_insn_history, record_btrace_insn_history_range)
2286 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2287 instead of bare int.
2288 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2289 Use gdb_disassembly_flags instead of bare int.
2290 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2291 Define.
2292 * target-delegates.c: Regenerate.
2293 * target.c (target_insn_history, target_insn_history_from)
2294 (target_insn_history_range): Use gdb_disassembly_flags instead of
2295 bare int.
2296 * target.h: Include "disasm.h".
2297 (struct target_ops) <to_insn_history, to_insn_history_from,
2298 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2299 int.
2300 (target_insn_history, target_insn_history_from)
2301 (target_insn_history_range): Use gdb_disassembly_flags instead of
2302 bare int.
2303
2304 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2305
2306 * cli/cli-script.c (build_command_line): For if/while commands,
2307 check whether args is empty.
2308
2309 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2310
2311 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2312 (enum command_control_type): Likewise.
2313 (struct command_line): Likewise.
2314 (free_command_lines): Likewise.
2315 (struct command_lines_deleter): Likewise.
2316 (command_line_up): Likewise.
2317 (read_command_lines): Likewise.
2318 (read_command_lines_1): Likewise.
2319 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2320 (enum command_control_type): Likewise.
2321 (struct command_line): Likewise.
2322 (free_command_lines): Likewise.
2323 (struct command_lines_deleter): Likewise.
2324 (command_line_up): Likewise.
2325 (read_command_lines): Likewise.
2326 (read_command_lines_1): Likewise.
2327 * breakpoint.h: Include cli/cli-script.h.
2328 * extension-priv.h: Likewise.
2329 * gdbcmd.h: Likewise.
2330
2331 2017-09-04 Pedro Alves <palves@redhat.com>
2332
2333 * ada-lang.c (is_known_support_routine): Move sal declaration to
2334 where it is initialized.
2335 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2336 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2337 (clear_command, update_static_tracepoint): Remove init_sal
2338 references. Move declarations closer to initializations.
2339 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2340 initializations.
2341 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2342 references. Move sal declarations closer to initializations.
2343 * frame.c (find_frame_sal): Return a symtab_and_line via function
2344 return instead of output parameter. Remove init_sal references.
2345 * frame.h (find_frame_sal): Return a symtab_and_line via function
2346 return instead of output parameter.
2347 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2348 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2349 instead of memset.
2350 (gdbscm_find_pc_line): Remove init_sal reference.
2351 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2352 references. Move declarations closer to initializations.
2353 * infcmd.c (set_step_frame): Update. Move declarations closer to
2354 initializations.
2355 (finish_backward): Remove init_sal references. Move declarations
2356 closer to initializations.
2357 * infrun.c (process_event_stop_test, handle_step_into_function)
2358 (insert_hp_step_resume_breakpoint_at_frame)
2359 (insert_step_resume_breakpoint_at_caller): Likewise.
2360 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2361 (symbol_to_sal): Likewise.
2362 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2363 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2364 to its initialization.
2365 * reverse.c (save_bookmark_command): Use new/delete. Remove
2366 init_sal references. Move declarations closer to initializations.
2367 * source.c (get_current_source_symtab_and_line): Remove brace
2368 initialization.
2369 (set_current_source_symtab_and_line): Now takes the sal by const
2370 reference. Remove brace initialization.
2371 (line_info): Remove init_sal reference.
2372 * source.h (set_current_source_symtab_and_line): Now takes a
2373 symtab_and_line via const reference.
2374 * stack.c (set_current_sal_from_frame): Adjust.
2375 (print_frame_info): Adjust.
2376 (get_last_displayed_sal): Return the sal via function return
2377 instead of via output parameter. Simplify.
2378 (frame_info): Adjust.
2379 * stack.h (get_last_displayed_sal): Return the sal via function
2380 return instead of via output parameter.
2381 * symtab.c (init_sal): Delete.
2382 (find_pc_sect_line): Remove init_sal references. Move
2383 declarations closer to initializations.
2384 (find_function_start_sal): Remove init_sal references. Move
2385 declarations closer to initializations.
2386 * symtab.h (struct symtab_and_line): In-class initialize all
2387 fields.
2388 * tracepoint.c (set_traceframe_context)
2389 (print_one_static_tracepoint_marker): Remove init_sal references.
2390 Move declarations closer to initializations.
2391 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2392 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2393 declarations closer to initializations.
2394 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2395 init_sal references. Adjust.
2396
2397 2017-09-04 Pedro Alves <palves@redhat.com>
2398
2399 * ax-gdb.c (agent_command_1): Use range-for.
2400 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2401 * breakpoint.c: Include "common/array-view.h".
2402 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2403 parameter from struct symtabs_and_lines to
2404 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2405 (breakpoint_sals_to_pc): Change sals parameter from struct
2406 symtabs_and_lines to std::vector reference.
2407 (check_fast_tracepoint_sals): Change sals parameter from struct
2408 symtabs_and_lines to std::array_view. Use range-for.
2409 (decode_static_tracepoint_spec): Return a std::vector instead of
2410 symtabs_and_lines. Update.
2411 (create_breakpoint): Update.
2412 (break_range_command, until_break_command, clear_command): Update.
2413 (base_breakpoint_decode_location, bkpt_decode_location)
2414 (bkpt_probe_create_sals_from_location)
2415 (bkpt_probe_decode_location, tracepoint_decode_location)
2416 (tracepoint_probe_decode_location)
2417 (strace_marker_create_sals_from_location): Return a std::vector
2418 instead of symtabs_and_lines.
2419 (strace_marker_create_breakpoints_sal): Update.
2420 (strace_marker_decode_location): Return a std::vector instead of
2421 symtabs_and_lines. Update.
2422 (update_breakpoint_locations): Change struct symtabs_and_lines
2423 parameters to gdb::array_view. Adjust.
2424 (location_to_sals): Return a std::vector instead of
2425 symtabs_and_lines. Update.
2426 (breakpoint_re_set_default): Use std::vector instead of struct
2427 symtabs_and_lines.
2428 (decode_location_default): Return a std::vector instead of
2429 symtabs_and_lines. Update.
2430 * breakpoint.h: Include "common/array-view.h".
2431 (struct breakpoint_ops) <decode_location>: Now returns a
2432 std::vector instead of returning a symtabs_and_lines via output
2433 parameter.
2434 (update_breakpoint_locations): Change sals parameters to use
2435 gdb::array_view.
2436 * cli/cli-cmds.c (edit_command, list_command): Update to use
2437 std::vector and gdb::array_view.
2438 (ambiguous_line_spec): Adjust to use gdb::array_view and
2439 range-for.
2440 (compare_symtabs): Rename to ...
2441 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2442 const reference and adjust.
2443 (filter_sals): Rewrite using std::vector and standard algorithms.
2444 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2445 (jump_command): Update to use std::vector.
2446 * linespec.c (struct linespec_state) <canonical_names>: Update
2447 comment.
2448 (add_sal_to_sals_basic): Delete.
2449 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2450 (decode_line_2, create_sals_line_offset)
2451 (convert_address_location_to_sals, convert_linespec_to_sals)
2452 (convert_explicit_location_to_sals, parse_linespec)
2453 (event_location_to_sals, decode_line_full, decode_line_1)
2454 (decode_line_with_current_source)
2455 (decode_line_with_last_displayed, decode_objc)
2456 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2457 (linespec_result::~linespec_result): Adjust to use std::vector
2458 instead of symtabs_and_lines.
2459 * linespec.h (linespec_sals::sals): Now a std::vector.
2460 (struct linespec_result): Use std::vector, bool, and in-class
2461 initialization.
2462 (decode_line_1, decode_line_with_current_source)
2463 (decode_line_with_last_displayed): Return std::vector.
2464 * macrocmd.c (info_macros_command): Use std::vector.
2465 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2466 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2467 std::vector.
2468 * probe.h (parse_probes): Return a std::vector.
2469 * python/python.c (gdbpy_decode_line): Use std::vector and
2470 gdb::array_view.
2471 * source.c (select_source_symtab, line_info): Use std::vector.
2472 * stack.c (func_command): Use std::vector.
2473 * symtab.h (struct symtabs_and_lines): Delete.
2474 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2475
2476 2017-09-04 Pedro Alves <palves@redhat.com>
2477
2478 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2479 unittests/array-view-selftests.c.
2480 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2481 * common/array-view.h: New file.
2482 * unittests/array-view-selftests.c: New file.
2483
2484 2017-09-04 Pedro Alves <palves@redhat.com>
2485
2486 * cli/cli-cmds.c (edit_command): Pass message to
2487 ambiguous_line_spec.
2488 (list_command): Pass message to ambiguous_line_spec. Say
2489 "first"/"last" instead of "start" and "end" to be consistent with
2490 the manual.
2491 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2492 them to print formatted message.
2493
2494 2017-09-04 Pedro Alves <palves@redhat.com>
2495
2496 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2497 ftrace_update_insns by reference instead of pointer.
2498
2499 2017-09-04 Yao Qi <yao.qi@linaro.org>
2500
2501 * i386-go32-tdep.c: Include x86-xstate.h.
2502 (i386_go32_init_abi): Call i386_target_description.
2503 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2504 if xcr0 is X86_XSTATE_X87_MASK.
2505 * i386-tdep.h (tdesc_i386): Remove the declaration.
2506 (tdesc_i386_mmx): Likewise.
2507
2508 2017-09-04 Yao Qi <yao.qi@linaro.org>
2509
2510 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2511 X86_XSTATE_SSE_MASK instead of 0.
2512
2513 2017-09-04 Yao Qi <yao.qi@linaro.org>
2514
2515 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2516 i386_target_description.
2517 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2518 i386_target_description.
2519 * i386-tdep.c (i386_gdbarch_init): Likewise.
2520
2521 2017-09-04 Yao Qi <yao.qi@linaro.org>
2522
2523 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2524 (x86_darwin_init_abi_64): Call amd64_target_description.
2525 * amd64-dicos-tdep.c: Likewise.
2526 * amd64-fbsd-nat.c: Likewise.
2527 * amd64-fbsd-tdep.c: Likewise.
2528 * amd64-nbsd-tdep.c: Likewise.
2529 * amd64-obsd-tdep.c: Likewise.
2530 * amd64-sol2-tdep.c: Likewise.
2531 * amd64-windows-tdep.c: Likewise.
2532 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2533
2534 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2535
2536 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2537 (btrace_function) <insn>: Change type to use std::vector.
2538 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2539 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2540 ftrace_update_insns, ftrace_compute_global_level_offset,
2541 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2542 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2543 change to std::vector.
2544 (ftrace_update_insns): Adjust to change to std::vector, change
2545 type of INSN parameter.
2546 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2547 * record-btrace.c (btrace_call_history_insn_range,
2548 btrace_compute_src_line_range,
2549 record_btrace_frame_prev_register): Adjust to change to
2550 std::vector.
2551 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2552 to change to std::vector.
2553
2554 2017-09-03 Tom Tromey <tom@tromey.com>
2555
2556 * corefile.c (reopen_exec_file): Use std::string.
2557
2558 2017-09-03 Tom Tromey <tom@tromey.com>
2559
2560 * compile/compile.c (compile_register_name_mangled): Return
2561 std::string.
2562 * compile/compile-loc2c.c (pushf_register_address): Update.
2563 (pushf_register): Update.
2564 * compile/compile-c-types.c (convert_array): Update.
2565 * compile/compile-c-symbols.c (generate_vla_size): Update.
2566 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2567 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2568 (convert_one_symbol): Update.
2569 (generate_c_for_for_one_variable): Update.
2570 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2571 std::string.
2572 (generate_register_struct): Update.
2573 * compile/compile-internal.h (c_get_range_decl_name): Return a
2574 std::string.
2575 (compile_register_name_mangled): Return std::string.
2576
2577 2017-09-03 Tom Tromey <tom@tromey.com>
2578
2579 * utils.c (perror_string): Return a std::string.
2580 (throw_perror_with_name, perror_warning_with_name): Update.
2581
2582 2017-09-03 Tom Tromey <tom@tromey.com>
2583
2584 * demangle.c (demangle_command): Use std::string,
2585 unique_xmalloc_ptr.
2586
2587 2017-09-03 Tom Tromey <tom@tromey.com>
2588
2589 * cli/cli-setshow.c (do_set_command): Use std::string.
2590
2591 2017-09-03 Tom Tromey <tom@tromey.com>
2592
2593 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2594
2595 2017-09-03 Tom Tromey <tom@tromey.com>
2596
2597 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2598
2599 2017-09-03 Tom Tromey <tom@tromey.com>
2600
2601 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2602 gdb::unique_xmalloc_ptr.
2603
2604 2017-09-03 Tom Tromey <tom@tromey.com>
2605
2606 * thread.c (print_thread_info_1): Use string_printf.
2607 (thread_apply_command, thread_apply_all_command): Use
2608 std::string.
2609
2610 2017-09-03 Tom Tromey <tom@tromey.com>
2611
2612 * valprint.c (val_print_string): Update.
2613 * gdbcore.h (memory_error_message): Return std::string.
2614 * corefile.c (memory_error_message): Return std::string.
2615 (memory_error): Update.
2616 * breakpoint.c (insert_bp_location): Update.
2617
2618 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2619
2620 * target/waitstatus.h (target_waitstatus_to_string): Change
2621 return type to std::string.
2622 * target/waitstatus.c (target_waitstatus_to_string): Return
2623 std::string.
2624 * target.h (target_waitstatus_to_string): Remove declaration.
2625 * infrun.c (resume, clear_proceed_status_thread,
2626 print_target_wait_results, do_target_wait, save_waitstatus,
2627 stop_all_threads): Adjust.
2628 * record-btrace.c (record_btrace_wait): Adjust.
2629 * target-debug.h
2630 (target_debug_print_struct_target_waitstatus_p): Adjust.
2631
2632 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2633
2634 PR gdb/22046
2635 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2636 detection.
2637
2638 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2639
2640 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2641 for setting/unsetting environment variables on the remote target.
2642 (New remote packets): Add entries for QEnvironmentHexEncoded,
2643 QEnvironmentUnset and QEnvironmentReset.
2644 * common/environ.c (gdb_environ::operator=): Extend method to
2645 handle m_user_set_env_list and m_user_unset_env_list.
2646 (gdb_environ::clear): Likewise.
2647 (match_var_in_string): Change type of first parameter from 'char
2648 *' to 'const char *'.
2649 (gdb_environ::set): Extend method to handle
2650 m_user_set_env_list and m_user_unset_env_list.
2651 (gdb_environ::unset): Likewise.
2652 (gdb_environ::clear_user_set_env): New method.
2653 (gdb_environ::user_set_envp): Likewise.
2654 (gdb_environ::user_unset_envp): Likewise.
2655 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2656 m_user_unset_env_list on move constructor/assignment.
2657 (unset): Add new default parameter 'update_unset_list = true'.
2658 (clear_user_set_env): New method.
2659 (user_set_envp): Likewise.
2660 (user_unset_envp): Likewise.
2661 (m_user_set_env_list): New std::set.
2662 (m_user_unset_env_list): Likewise.
2663 * common/rsp-low.c (hex2str): New function.
2664 (bin2hex): New overload for bin2hex function.
2665 * common/rsp-low.c (hex2str): New prototype.
2666 (str2hex): New overload prototype.
2667 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2668 QEnvironmentUnset and QEnvironmentReset.
2669 (remote_protocol_features): Add QEnvironmentHexEncoded,
2670 QEnvironmentUnset and QEnvironmentReset packets.
2671 (send_environment_packet): New function.
2672 (extended_remote_environment_support): Likewise.
2673 (extended_remote_create_inferior): Call
2674 extended_remote_environment_support.
2675 (_initialize_remote): Add QEnvironmentHexEncoded,
2676 QEnvironmentUnset and QEnvironmentReset packet configs.
2677 * unittests/environ-selftests.c (gdb_selftest_env_var):
2678 New variable.
2679 (test_vector_initialization): New function.
2680 (test_init_from_host_environ): Likewise.
2681 (test_reinit_from_host_environ): Likewise.
2682 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2683 Likewise.
2684 (test_unset_set_empty_vector): Likewise.
2685 (test_vector_clear): Likewise.
2686 (test_std_move): Likewise.
2687 (test_move_constructor):
2688 (test_self_move): Likewise.
2689 (test_set_unset_reset): Likewise.
2690 (run_tests): Rewrite in terms of the functions above.
2691
2692 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2693
2694 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2695 (adi_available): Use a temp variable of type CORE_ADDR as argument
2696 3 when calling target_auxv_search.
2697 (adi_normalize_address): Use masks and xor operators to calculate
2698 normalized address.
2699 (adi_read_versions, adi_write_versions, adi_print_versions)
2700 (do_examine, do_assign): Use paddress.
2701
2702 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2703
2704 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2705 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2706 out of loop and add supply of FIR.
2707 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2708 add collect of FIR.
2709
2710 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2711
2712 PR gdb/21827
2713 * cli/cli-script.c (define_command): Don't convert command name
2714 to lower case.
2715
2716 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2717
2718 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2719 Update all callers accordingly. Remove all code blocks handling
2720 the case where DISPP is not NULL.
2721
2722 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2723
2724 PR symtab/22003
2725 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2726 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2727 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2728
2729 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2730
2731 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2732 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2733 (read_comp_units_from_section): New parameter abbrev_section, use
2734 read_and_check_comp_unit_head, allocate signatured_type if needed.
2735 (create_all_comp_units): Update read_comp_units_from_section caller.
2736
2737 2017-08-23 Pedro Alves <palves@redhat.com>
2738
2739 PR remote/21852
2740 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2741 to null_ptid and switch to thread without reading the registers
2742 after adding the inferior.
2743
2744 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2745
2746 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2747 compile-gcc.
2748 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2749 (compile_to_object): Implement compile_gcc.
2750 (_initialize_compile): Install "set compile-gcc". Initialize
2751 compile_gcc.
2752
2753 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2754
2755 * compile/compile.c (compile_to_object): Conditionally call
2756 set_verbose. Conditionally call compile or compile_v0.
2757
2758 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2759
2760 * sparc64-tdep.h: (adi_normalize_address): New export.
2761 * sparc-nat.h: (open_adi_tag_fd): New export.
2762 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2763 * sparc64-linux-tdep.c:
2764 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2765 (sparc64_linux_handle_segmentation_fault): New function.
2766 (sparc64_linux_init_abi): Register
2767 sparc64_linux_handle_segmentation_fault
2768 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2769 (sparc64_addr_bits_remove): New function.
2770 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2771 (MAX_PROC_NAME_SIZE): New macro.
2772 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2773 (sparc64adilist): New variable.
2774 (adi_proc_list): New variable.
2775 (find_adi_info): New function.
2776 (add_adi_info): New function.
2777 (get_adi_info_proc): New function.
2778 (get_adi_info): New function.
2779 (info_adi_command): New function.
2780 (read_maps_entry): New function.
2781 (adi_available): New function.
2782 (adi_normalize_address): New function.
2783 (adi_align_address): New function.
2784 (adi_convert_byte_count): New function.
2785 (adi_tag_fd): New function.
2786 (adi_is_addr_mapped): New function.
2787 (adi_read_versions): New function.
2788 (adi_write_versions): New function.
2789 (adi_print_versions): New function.
2790 (do_examine): New function.
2791 (do_assign): New function.
2792 (adi_examine_command): New function.
2793 (adi_assign_command): New function.
2794 (_initialize_sparc64_adi_tdep): New function.
2795
2796 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2797
2798 * breakpoint.c (breakpoints_info): Rename to ...
2799 (info_breakpoints_command): ... this.
2800 (watchpoints_info): Rename to ...
2801 (info_watchpoints_command): ... this.
2802 (tracepoints_info): Rename to ...
2803 (info_tracepoints_command): ... this.
2804 (_initialize_breakpoint): Adjust.
2805 * dcache.c (dcache_info): Rename to ...
2806 (info_display_command): ... this.
2807 (_initialize_dcache): Adjust.
2808 * frame.h (args_info): Rename to ...
2809 (info_args_command): ... this.
2810 (locals_info): Rename to ...
2811 (info_locals_command): ... this.
2812 * infcmd.c (nofp_registers_info): Rename to ...
2813 (info_registers_command): ... this.
2814 (float_info): Rename to ...
2815 (info_float_command): ... this.
2816 (program_info): Rename to ...
2817 (info_program_command): ... this.
2818 (all_registers_info): Rename to ...
2819 (info_all_registers_command): ... this.
2820 (vector_info): Rename to ...
2821 (info_vector_command): ... this.
2822 (float_info): Rename to ...
2823 (info_float_command): ... this.
2824 (_initialize_infcmd): Adjust.
2825 * inferior.h (term_info): Rename to ...
2826 (info_terminal_command): ... this.
2827 * inflow.c (term_info): Rename to ...
2828 (info_terminal_command): ... this.
2829 (_initialize_inflow): Adjust.
2830 * infrun.c (signals_info): Rename to ...
2831 (info_signals_command): ... this.
2832 (_initialize_infrun): Adjust.
2833 * objc-lang.c (classes_info): Rename to ...
2834 (info_classes_command): ... this.
2835 (selectors_info): Rename to ...
2836 (info_selectors_command): ... this.
2837 (_initialize_objc_language): Adjust.
2838 * printcmd.c (sym_info): Rename to ...
2839 (info_symbol_command): ... this.
2840 (address_info): Rename to ...
2841 (info_address_command): ... this.
2842 (display_info): Rename to ...
2843 (info_display_command): ... this.
2844 (_initialize_printcmd): Adjust.
2845 * reverse.c (bookmarks_info): Rename to ...
2846 (info_breakpoints_command): ... this.
2847 (_initialize_reverse): Adjust.
2848 * ser-go32.c (dos_info): Rename to ...
2849 (info_serial_command): ... this.
2850 (_initialize_ser_dos): Adjust.
2851 * skip.c (skip_info): Rename to ...
2852 (info_skip_command): ... this.
2853 (_initialize_step_skip): Adjust.
2854 * source.c (line_info): Rename to ...
2855 (info_line_command): ... this.
2856 (source_info): Rename to ...
2857 (info_source_command)
2858 * stack.c (frame_info): Rename to ...
2859 (info_frame_command): ... this.
2860 (locals_info): Rename to ...
2861 (info_locals_command): ... this.
2862 (args_info): Rename to ...
2863 (info_args_command): ... this.
2864 (_initialize_stack): Adjust.
2865 * symtab.c (sources_info): Rename to ...
2866 (info_sources_command): ... this.
2867 (variables_info): Rename to ...
2868 (info_variables_command): ... this.
2869 (functions_info): Rename to ...
2870 (info_functions_command): ... this.
2871 (types_info): Rename to ...
2872 (info_types_command): ... this.
2873 (_initialize_symtab): Adjust.
2874 * target.c (target_info): Rename to ...
2875 (info_target_command): ... this.
2876 (initialize_targets): Adjust.
2877 * tracepoint.c (tvariables_info): Rename to ...
2878 (info_tvariables_command): ... this.
2879 (scope_info): Rename to ...
2880 (info_scope_command): ... this.
2881 (trace_dump_actions): Adjust.
2882 (_initialize_tracepoint): Adjust.
2883
2884 2017-08-22 Tom Tromey <tom@tromey.com>
2885
2886 * breakpoint.h (install_breakpoint): Update.
2887 * breakpoint.c (add_solib_catchpoint): Update.
2888 (install_breakpoint): Change argument to a std::unique_ptr.
2889 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2890 (create_breakpoint_sal, create_breakpoint): Update.
2891 (watch_command_1, catch_exec_command_1)
2892 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2893 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2894 Return the breakpoint.
2895 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2896 (new_single_step_breakpoint): Update.
2897 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2898 std::unique_ptr.
2899 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2900 std::unique_ptr.
2901 * break-catch-sig.c (create_signal_catchpoint): Use
2902 std::unique_ptr.
2903 * ada-lang.c (create_ada_exception_catchpoint): Use
2904 std::unique_ptr.
2905
2906 2017-08-22 Tom Tromey <tom@tromey.com>
2907
2908 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2909
2910 2017-08-22 Tom Tromey <tom@tromey.com>
2911
2912 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2913 (lookup_partial_symbol): Update.
2914
2915 2017-08-22 Tom Tromey <tom@tromey.com>
2916
2917 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2918 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2919 (find_and_open_source, symtab_to_fullname): Update.
2920 * psymtab.c (psymtab_to_fullname): Update.
2921
2922 2017-08-22 Tom Tromey <tom@tromey.com>
2923
2924 * exec.c (exec_file_attach): Update.
2925 * linux-thread-db.c (try_thread_db_load): Update.
2926 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2927 * utils.c (gdb_realpath): Change return type.
2928 (gdb_realpath_keepfile): Update.
2929 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2930 (_initialize_utils): Register the new self test.
2931 * source.c (openp): Update.
2932 (find_and_open_source): Update.
2933 * nto-tdep.c (nto_find_and_open_solib): Update.
2934 * main.c (set_gdb_data_directory): Update.
2935 (captured_main_1): Update.
2936 * dwarf2read.c (dwarf2_get_dwz_file): Update
2937 (dw2_map_symbol_filenames): Update.
2938 * auto-load.c (auto_load_safe_path_vec_update): Update.
2939 (filename_is_in_auto_load_safe_path_vec): Change type of
2940 "filename_realp".
2941 (auto_load_objfile_script): Update.
2942 (file_is_auto_load_safe): Update. Use std::string.
2943 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2944
2945 2017-08-22 Tom Tromey <tom@tromey.com>
2946
2947 * utils.c (gdb_realpath_keepfile): Return a
2948 gdb::unique_xmalloc_ptr.
2949 * exec.c (exec_file_attach): Update.
2950 * utils.h (gdb_realpath_keepfile): Return a
2951 gdb::unique_xmalloc_ptr.
2952
2953 2017-08-22 Tom Tromey <tom@tromey.com>
2954
2955 * compile/compile.c (compile_file_command): Use
2956 gdb::unique_xmalloc_ptr, std::string.
2957 * utils.c (gdb_abspath): Change return type.
2958 * source.c (openp): Update.
2959 * objfiles.c (allocate_objfile): Update.
2960 * main.c (set_gdb_data_directory): Update.
2961 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2962
2963 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2964
2965 * cli-cmds.c (list_commands): List actual code around more than
2966 one location.
2967
2968 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2969
2970 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2971
2972 2017-08-21 Pedro Alves <palves@redhat.com>
2973
2974 PR gdb/19487
2975 * c-exp.y (variable production): Handle function aliases.
2976 * minsyms.c (msymbol_is_text): New function.
2977 * minsyms.h (msymbol_is_text): Declare.
2978 * symtab.c (find_function_alias_target): New function.
2979 * symtab.h (find_function_alias_target): Declare.
2980
2981 2017-08-21 Pedro Alves <palves@redhat.com>
2982
2983 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2984 typedefs.
2985 * typeprint.c (whatis_exp): If handling "whatis", and expression
2986 is OP_TYPE, strip one typedef level. Otherwise don't strip
2987 typedefs here.
2988 * valops.c (value_cast): Save "to" type before resolving
2989 stubs/typedefs. Use that type as resulting value's type.
2990
2991 2017-08-18 Tom Tromey <tom@tromey.com>
2992 Pedro Alves <palves@redhat.com>
2993
2994 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2995 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2996 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2997 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2998 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2999 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3000 (linux_get_siginfo_data): Add "thread" argument. Use
3001 scoped_restore.
3002 * linux-nat.c (linux_child_follow_fork)
3003 (check_stopped_by_watchpoint): Use scoped_restore.
3004 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3005 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3006 (restore_inferior_ptid, save_inferior_ptid): Remove.
3007 * btrace.c (btrace_fetch): Use scoped_restore.
3008 * bsd-uthread.c (bsd_uthread_fetch_registers)
3009 (bsd_uthread_store_registers): Use scoped_restore.
3010 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3011 scoped_restore.
3012 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3013 (aix_thread_xfer_partial): Use scoped_restore.
3014 * inferior.h (save_inferior_ptid): Remove.
3015
3016 2017-08-18 Yao Qi <yao.qi@linaro.org>
3017
3018 PR tdep/21818
3019 * arm-tdep.c (gdb_print_insn_arm): Mark
3020 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3021
3022 2017-08-18 Yao Qi <yao.qi@linaro.org>
3023
3024 * NEWS: Mention GDBserver's new option "--selftest".
3025 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3026 * selftest.c: Move it to common/selftest.c.
3027 * selftest.h: Move it to common/selftest.h.
3028 * selftest-arch.c (reset): New function.
3029 (tests_with_arch): Call reset.
3030
3031 2017-08-18 Yao Qi <yao.qi@linaro.org>
3032
3033 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3034 instead of exception_fprintf and printf_filtered.
3035
3036 2017-08-18 Yao Qi <yao.qi@linaro.org>
3037
3038 * selftest.c (register_self_test): Rename it to
3039 selftests::register_test.
3040 (run_self_tests): selftest::run_tests.
3041 * selftest.h: Update declarations.
3042 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3043 selftests::register_test_foreach_arch.
3044 * selftest-arch.h: Update declaration.
3045 * aarch64-tdep.c: Update.
3046 * arm-tdep.c: Likewise.
3047 * disasm-selftests.c: Likewise.
3048 * dwarf2loc.c: Likewise.
3049 * dwarf2-frame.c: Likewise.
3050 * findvar.c: Likewise.
3051 * gdbarch-selftests.c: Likewise.
3052 * maint.c (maintenance_selftest): Likewise.
3053 * regcache.c: Likewise.
3054 * rust-exp.y: Likewise.
3055 * selftest-arch.c: Likewise.
3056 * unittests/environ-selftests.c: Likewise.
3057 * unittests/function-view-selftests.c: Likewise.
3058 * unittests/offset-type-selftests.c: Likewise.
3059 * unittests/optional-selftests.c: Likewise.
3060 * unittests/scoped_restore-selftests.c: Likewise.
3061 * utils-selftests.c: Likewise.
3062
3063 2017-08-17 Pedro Alves <palves@redhat.com>
3064
3065 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3066 local.
3067
3068 2017-08-17 Pedro Alves <palves@redhat.com>
3069
3070 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3071 field.
3072 (reset_die_in_process): Delete, replaced by ...
3073 (process_die_scope): ... this new class. Make it responsible for
3074 freeing cu->line_header too.
3075 (process_die): Use process_die_scope.
3076 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3077 cu->line_header_die_owner. Don't release the line header if it's
3078 owned by the CU.
3079 (setup_type_unit_groups): Make the CU/DIE own the line header.
3080 Don't release the line header here.
3081
3082 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3083
3084 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3085
3086 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3087
3088 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3089 Single-Key mode
3090
3091 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3092
3093 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3094 mode command list.
3095
3096 2017-08-15 Stafford Horne <shorne@gmail.com>
3097
3098 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3099
3100 2017-08-15 Stafford Horne <shorne@gmail.com>
3101
3102 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3103
3104 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3105
3106 PR gdb/21954
3107 * infcmd.c (unset_environment_command): Use the 'clear' method on
3108 the environment instead of resetting it.
3109
3110 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3111
3112 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3113 platforms.
3114
3115 2017-08-14 Tom Tromey <tom@tromey.com>
3116
3117 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3118 (print_binary_chars): Likewise.
3119 (BITS_IN_BYTES): Remove.
3120
3121 2017-08-14 Tom Tromey <tom@tromey.com>
3122
3123 PR gdb/21675
3124 * valprint.c (LOW_ZERO): Change value to 034.
3125 (print_octal_chars): Add static_asserts for octal constants.
3126 * printcmd.c (print_scalar_formatted): Add 'd' case.
3127
3128 2017-08-11 Tom Tromey <tom@tromey.com>
3129
3130 * symfile.c (add_symbol_file_command): Use std::vector.
3131
3132 2017-08-14 Tom Tromey <tom@tromey.com>
3133
3134 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3135 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3136 std::move.
3137 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3138
3139 2017-08-11 Pedro Alves <palves@redhat.com>
3140
3141 * infrun.c (process_event_stop_test): Adjust
3142 function_name_is_marked_for_skip call.
3143 * skip.c: Include <list>.
3144 (skiplist_entry): Make it a class with private fields, and
3145 getters/setters.
3146 (skiplist_entry_chain): Delete.
3147 (skiplist_entries): New.
3148 (skiplist_entry_count): Delete.
3149 (highest_skiplist_entry_num): New.
3150 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3151 (add_skiplist_entry): Delete.
3152 (skiplist_entry::skiplist_entry): New.
3153 (skiplist_entry::add_entry): New.
3154 (skip_file_command, skip_function): Adjust.
3155 (compile_skip_regexp): Delete.
3156 (skip_command): Don't compile regexp here. Adjust to use
3157 skiplist_entry::add_entry.
3158 (skip_info): Adjust to use range-for and getters.
3159 (skip_enable_command, skip_disable_command): Adjust to use
3160 range-for and setters.
3161 (skip_delete_command): Adjust to use std::list.
3162 (add_skiplist_entry): Delete.
3163 (skip_file_p): Delete, refactored as ...
3164 (skiplist_entry::do_skip_file_p): ... this new method.
3165 (skip_gfile_p): Delete, refactored as ...
3166 (skiplist_entry::do_gskip_file_p): ... this new method.
3167 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3168 (skiplist_entry::skip_function_p): ... this new method.
3169 (function_name_is_marked_for_skip): Now returns bool, and takes
3170 the function sal by const reference. Adjust to use range-for and
3171 skiplist_entry methods.
3172 (_initialize_step_skip): Remove references to
3173 skiplist_entry_chain, skiplist_entry_count.
3174 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3175 takes the function sal by const reference.
3176
3177 2017-08-11 Yao Qi <yao.qi@linaro.org>
3178
3179 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3180 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3181 (dwarf2_frame_cache):
3182 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3183 RETURN_MASK_ALL and set *this_case to NULL.
3184 * frame-unwind.h: Update comments.
3185
3186 2017-08-11 Yao Qi <yao.qi@linaro.org>
3187
3188 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3189 (dwarf2_frame_state_copy_regs): Remove.
3190 (dwarf2_frame_state_free_regs): Remove.
3191 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3192 (dwarf2_restore_rule): Call method .alloc_regs instead of
3193 dwarf2_frame_state_alloc_regs.
3194 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3195 constructor. Call std::move.
3196 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3197 (dwarf2_frame_cache): Likewise.
3198
3199 [GDB_SELF_TEST]: Include selftest.h and
3200 selftest-arch.h.
3201 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3202 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3203 execute_cfa_program_test.
3204
3205 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3206 copy ctor, assignment operator, move assignment.
3207 <alloc_regs>: New method.
3208 <swap>: New method.
3209 (struct dwarf2_frame_state): Delete dtor.
3210 (dwarf2_frame_state_alloc_regs): Remove declaration.
3211 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3212 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3213
3214 2017-08-11 Yao Qi <yao.qi@linaro.org>
3215
3216 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3217 (dwarf2_frame_state::dwarf2_frame_state): New.
3218 (dwarf2_frame_state::~dwarf2_frame_state): New.
3219 (dwarf2_fetch_cfa_info): Update.
3220 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3221 rather than a pointer. Update code.
3222 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3223 dtor.
3224 <data_align, code_align, retaddr_column>: Change them to const.
3225 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3226 to bool.
3227
3228 2017-08-11 Yao Qi <yao.qi@linaro.org>
3229
3230 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3231 <loc.exp>: New field.
3232 * dwarf2-frame.c (execute_cfa_program): Update.
3233 (dwarf2_frame_prev_register): Update.
3234
3235 2017-08-10 Pedro Alves <palves@redhat.com>
3236
3237 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3238
3239 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3240
3241 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3242 (fbsd_pending_children): Use std::list.
3243 (fbsd_remember_child): Likewise.
3244 (fbsd_is_child_pending): Likewise.
3245 (fbsd_pending_vfork_done): Use std::forward_list.
3246 (fbsd_add_vfork_done): Likewise.
3247 (fbsd_is_vfork_done_pending): Likewise.
3248 (fbsd_next_vfork_done): Likewise.
3249
3250 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3251
3252 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3253 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3254 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3255 for `mapfilename'.
3256 (fbsd_xfer_partial): Use gdb::byte_vector.
3257 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3258
3259 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3260
3261 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3262 "filestuff.h".
3263 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3264
3265 2017-08-09 Tom Tromey <tom@tromey.com>
3266
3267 * skip.c (skiplist_entry): New constructor.
3268 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3269 (skiplist_entry::file_is_glob): Now bool.
3270 (skiplist_entry::file, skiplist_entry::function): Now
3271 std::string.
3272 (make_skip_entry): Return a unique_ptr. Use new.
3273 (free_skiplist_entry, free_skiplist_entry_cleanup)
3274 (make_free_skiplist_entry_cleanup): Remove.
3275 (skip_command, skip_disable_command, add_skiplist_entry)
3276 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3277 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3278 (function_name_is_marked_for_skip): Update.
3279 (skip_delete_command): Update. Use delete.
3280
3281 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3282
3283 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3284 (aarch64_linux_core_read_description): New function.
3285 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3286
3287 2017-08-09 Pedro Alves <palves@redhat.com>
3288
3289 * cp-name-parser.y (cp_comp_to_string): Return a
3290 gdb::unique_xmalloc_ptr<char>.
3291 * cp-support.c (replace_typedefs_qualified_name)
3292 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3293 (cp_canonicalize_string_full): Use op= instead of explicit
3294 convertion.
3295 (cp_class_name_from_physname, method_name_from_physname)
3296 (cp_func_name, cp_remove_params): Adjust to use
3297 gdb::unique_xmalloc_ptr<char>.
3298 * cp-support.h (cp_comp_to_string): Return a
3299 gdb::unique_xmalloc_ptr<char>.
3300 * python/py-type.c (typy_lookup_type): Adjust to use
3301 gdb::unique_xmalloc_ptr<char>.
3302
3303 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3304
3305 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3306
3307 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3308 Yao Qi <yao.qi@linaro.org>
3309
3310 * cp-support.c (cp_canonicalize_string_full): Use
3311 gdb::unique_xmalloc_ptr<char>.
3312 (cp_canonicalize_string): Likewise.
3313
3314 2017-08-09 Yao Qi <yao.qi@linaro.org>
3315
3316 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3317 * regformats/i386/amd64-avx-avx512.dat: Remove.
3318 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3319 * regformats/i386/amd64-avx-mpx.dat:Remove.
3320 * regformats/i386/amd64-avx.dat: Remove.
3321 * regformats/i386/amd64-mpx.dat: Remove.
3322 * regformats/i386/i386-avx-avx512.dat: Remove.
3323 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3324 * regformats/i386/i386-avx-mpx.dat: Remove.
3325 * regformats/i386/i386-mmx.dat: Remove.
3326 * regformats/i386/i386-mpx.dat: Remove.
3327
3328 2017-08-09 Yao Qi <yao.qi@linaro.org>
3329
3330 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3331 * amd64-tdep.c: Don't include features/i386/x32*.c.
3332 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3333 functions.
3334 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3335 and i386/x32-avx-avx512.
3336 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3337 and i386/x32.xml.
3338 * features/i386/x32-avx-avx512.c: Removed.
3339 * features/i386/x32-avx-avx512.xml: Removed.
3340 * features/i386/x32-avx.c: Removed.
3341 * features/i386/x32-avx.xml: Removed.
3342 * features/i386/x32.c: Removed.
3343 * features/i386/x32.xml: Removed.
3344 * regformats/i386/x32-avx-avx512.dat: Removed.
3345 * regformats/i386/x32-avx.dat: Removed.
3346 * regformats/i386/x32.dat: Removed.
3347
3348 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3349
3350 PR breakpoints/21886
3351 * mem-break.c (default_memory_insert_breakpoint): Use
3352 `->placed_address' rather than `->reqstd_address' for the
3353 breakpoint location.
3354
3355 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3356
3357 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3358 assertions.
3359
3360 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3361
3362 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3363 a union of `tdep_info', `tdesc_data' and `id'.
3364 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3365 rather than `info.tdep_info'.
3366 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3367 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3368 * i386-tdep.c (i386_gdbarch_init): Likewise.
3369 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3370 * mips-tdep.c (mips_gdbarch_init): Likewise.
3371 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3372 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3373 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3374 `info.tdep_info'.
3375 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3376 `info.tdep_info'.
3377 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3378 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3379 `info.tdep_info'.
3380 * spu-tdep.c (spu_gdbarch_init): Likewise.
3381 * gdbarch.h: Regenerate.
3382
3383 2017-08-07 Leszek Swirski <leszeks@google.com>
3384
3385 PR symtab/20899
3386 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3387
3388 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3389
3390 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3391 (gdbsim_open): Rename gdb_argv args object to argv.
3392
3393 2017-08-05 Tom Tromey <tom@tromey.com>
3394
3395 * compile/compile-object-load.c (compile_object_load): Use
3396 gdb::unique_xmalloc_ptr.
3397 * cli/cli-dump.c (scan_filename): Rename from
3398 scan_filename_with_cleanup. Change return type.
3399 (scan_expression): Rename from scan_expression_with_cleanup.
3400 Change return type.
3401 (dump_memory_to_file, dump_value_to_file, restore_command):
3402 Use gdb::unique_xmalloc_ptr. Update.
3403 * cli/cli-cmds.c (find_and_open_script): Use
3404 gdb::unique_xmalloc_ptr.
3405 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3406 * symmisc.c (maintenance_print_symbols)
3407 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3408 * symfile.c (symfile_bfd_open, generic_load)
3409 (add_symbol_file_command, remove_symbol_file_command): Use
3410 gdb::unique_xmalloc_ptr.
3411 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3412 * psymtab.c (maintenance_print_psymbols): Use
3413 gdb::unique_xmalloc_ptr.
3414 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3415 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3416 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3417 (reload_shared_libraries_1): Likewise.
3418
3419 2017-08-05 Tom Tromey <tom@tromey.com>
3420
3421 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3422 (rust_op_vector, rust_set_vector): New typedefs.
3423 (current_parser): New global.
3424 (work_obstack): Change to pointer type. Update all users.
3425 (rust_ast, pstate): Remove globals.
3426 (struct rust_parser): New.
3427 (%union) <params, field_inits>: Change type.
3428 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3429 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3430 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3431 (convert_params_to_types, convert_params_to_expression): Change
3432 type of "params".
3433 (ast_string): Change type of "fields".
3434 (rust_parse): Make a rust_parser. Remove cleanups.
3435 (rust_lex_tests): Make and install an auto_obstack.
3436
3437 2017-08-04 Yao Qi <yao.qi@linaro.org>
3438
3439 * configure.srv (ipa_x32_linux_regobj): New.
3440 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3441 instead of X86_TDESC_AVX512.
3442 (initialize_low_tracepoint): Call
3443 init_registers_x32_avx_avx512_linux.
3444
3445 2017-08-04 Yao Qi <yao.qi@linaro.org>
3446
3447 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3448
3449 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3450
3451 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3452
3453 2017-08-03 Tom Tromey <tom@tromey.com>
3454
3455 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3456 Remove.
3457 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3458
3459 2017-08-03 Tom Tromey <tom@tromey.com>
3460
3461 * python/py-param.c (compute_enum_values): Use gdb_argv.
3462
3463 2017-08-03 Tom Tromey <tom@tromey.com>
3464
3465 * utils.h (struct gdb_argv_deleter): New.
3466 (gdb_argv): New class.
3467 * utils.c (gdb_argv::reset): New method.
3468 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3469 * tracefile.c (tsave_command): Use gdb_argv.
3470 * top.c (new_ui_command): Use gdb_argv.
3471 * symmisc.c (maintenance_print_symbols)
3472 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3473 * symfile.c (symbol_file_command, generic_load)
3474 (remove_symbol_file_command): Use gdb_argv.
3475 * stack.c (backtrace_command): Use gdb_argv.
3476 * source.c (add_path, show_substitute_path_command)
3477 (unset_substitute_path_command, set_substitute_path_command):
3478 Use gdb_argv.
3479 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3480 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3481 * remote.c (extended_remote_run, remote_put_command)
3482 (remote_get_command, remote_delete_command): Use gdb_argv.
3483 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3484 (gdbsim_open): Use gdb_argv.
3485 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3486 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3487 * procfs.c (procfs_info_proc): Use gdb_argv.
3488 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3489 * infrun.c (handle_command): Use gdb_argv.
3490 * inferior.c (add_inferior_command, clone_inferior_command):
3491 Use gdb_argv.
3492 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3493 * exec.c (exec_file_command): Use gdb_argv.
3494 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3495 * compile/compile.c (build_argc_argv): Use gdb_argv.
3496
3497 2017-08-03 Tom Tromey <tom@tromey.com>
3498
3499 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3500
3501 2017-08-03 Tom Tromey <tom@tromey.com>
3502
3503 * python/python.c (compute_python_string): Return std::string.
3504 (gdbpy_eval_from_control_command): Update.
3505 (do_start_initialization): Use std::string.
3506 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3507 xstrprintf.
3508 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3509 xstrprintf.
3510
3511 2017-08-03 Tom Tromey <tom@tromey.com>
3512
3513 * top.h (do_restore_instream_cleanup): Remove.
3514 * top.c (do_restore_instream_cleanup): Remove.
3515 (read_command_file): Use scoped_restore.
3516 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3517
3518 2017-08-03 Tom Tromey <tom@tromey.com>
3519
3520 * cli/cli-script.c (execute_user_command)
3521 (execute_control_command): Use scoped_restore.
3522
3523 2017-08-03 Tom Tromey <tom@tromey.com>
3524
3525 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3526 (execute_user_command): Remove user_call_depth; use
3527 user_args_stack's size instead.
3528
3529 2017-08-03 Tom Tromey <tom@tromey.com>
3530
3531 * top.h (in_user_command): Remove.
3532 * top.c (in_user_command): Remove.
3533 * cli/cli-script.c (do_restore_user_call_depth)
3534 (execute_user_command): Update.
3535
3536 2017-08-03 Tom Tromey <tom@tromey.com>
3537
3538 * valops.c (search_struct_method): Use gdb::byte_vector.
3539 * valarith.c (value_concat): Use std::vector.
3540 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3541 (simple_search_memory): Likewise.
3542 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3543 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3544 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3545 * elfread.c (elf_rel_plt_read): Use std::string.
3546 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3547 * cli/cli-dump.c (restore_section_callback): Use
3548 gdb::byte_vector.
3549
3550 2017-08-03 Tom Tromey <tom@tromey.com>
3551
3552 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3553
3554 2017-08-03 Tom Tromey <tom@tromey.com>
3555
3556 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3557 (tui_register_format): Use scoped_restore.
3558
3559 2017-08-03 Tom Tromey <tom@tromey.com>
3560
3561 * reverse.c (exec_direction_default): Remove.
3562 (exec_reverse_once): Use scoped_restore.
3563 * remote.c (restore_remote_timeout): Remove.
3564 (remote_flash_erase, remote_flash_write, remote_flash_done)
3565 (readchar, remote_serial_write): Use scoped_restore.
3566 * cli/cli-script.c (struct source_cleanup_lines_args)
3567 (source_cleanup_lines): Remove.
3568 (script_from_file): Use scoped_restore.
3569 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3570 (source_command): Use scoped_restore.
3571
3572 2017-08-03 Tom Tromey <tom@tromey.com>
3573
3574 * utils.h (make_cleanup_free_so): Remove.
3575 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3576 * solist.h (struct so_deleter): New.
3577 (so_list_up): New typedef.
3578 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3579
3580 2017-08-03 Tom Tromey <tom@tromey.com>
3581
3582 * utils.h (make_cleanup_restore_current_language): Remove.
3583 * utils.c (do_restore_current_language)
3584 (make_cleanup_restore_current_language): Remove.
3585 * parse.c (parse_exp_in_context_1)
3586 (parse_expression_with_language): Use
3587 scoped_restore_current_language.
3588 * mi/mi-main.c (mi_cmd_execute): Use
3589 scoped_restore_current_language.
3590 * language.h (scoped_restore_current_language): New class.
3591
3592 2017-08-03 Tom Tromey <tom@tromey.com>
3593
3594 * compile/compile.c (cleanup_unlink_file): Remove.
3595 (compile_to_object): Use gdb::unlinker.
3596 (eval_compile_command): Likewise.
3597
3598 2017-08-03 Tom Tromey <tom@tromey.com>
3599
3600 * utils.h (make_cleanup_fclose): Remove.
3601 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3602
3603 2017-08-03 Tom Tromey <tom@tromey.com>
3604
3605 * top.c (open_terminal_stream): Return gdb_file_up.
3606 (new_ui_command): Update.
3607
3608 2017-08-03 Tom Tromey <tom@tromey.com>
3609
3610 * source.c (print_source_lines_base, forward_search_command)
3611 (reverse_search_command): Use gdb_file_up.
3612
3613 2017-08-03 Tom Tromey <tom@tromey.com>
3614
3615 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3616
3617 2017-08-03 Tom Tromey <tom@tromey.com>
3618
3619 * cli/cli-cmds.c (find_and_open_script): Change return type.
3620 Remove "streamp" and "full_path" parameters.
3621 (source_script_with_search): Update.
3622 * auto-load.c (source_script_file): Update.
3623 * cli/cli-cmds.h (find_and_open_script): Change type.
3624 (open_script): New struct.
3625
3626 2017-08-03 Tom Tromey <tom@tromey.com>
3627
3628 * xml-support.c (xml_fetch_content_from_file): Update.
3629 * ui-file.c (stdio_file::open): Update.
3630 * tracefile-tfile.c (tfile_start): Update.
3631 * remote.c (remote_file_put, remote_file_get): Update.
3632 * nat/linux-procfs.c (linux_proc_get_int)
3633 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3634 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3635 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3636 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3637 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3638 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3639 * linux-nat.c (linux_proc_pending_signals): Update.
3640 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3641 (file_closer): Remove.
3642 * compile/compile.c (compile_to_object): Update.
3643 * common/filestuff.h (struct gdb_file_deleter): New.
3644 (gdb_file_up): New typedef.
3645 (gdb_fopen_cloexec): Change return type.
3646 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3647 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3648 (dump_binary_file, restore_binary_file): Update.
3649 * auto-load.c (auto_load_objfile_script_1): Update.
3650
3651 2017-08-03 Tom Tromey <tom@tromey.com>
3652
3653 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3654 (info_static_tracepoint_markers_command): Likewise.
3655 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3656 * skip.c (skip_info): Use ui_out_emit_table.
3657 * progspace.c (print_program_space): Use ui_out_emit_table.
3658 * osdata.c (info_osdata): Use ui_out_emit_table.
3659 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3660 ui_out_emit_table.
3661 * linux-thread-db.c (info_auto_load_libthread_db): Use
3662 ui_out_emit_table.
3663 * inferior.c (print_inferior): Use ui_out_emit_table.
3664 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3665 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3666 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3667 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3668 * ui-out.h (class ui_out_emit_table): New.
3669
3670 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3671
3672 * mips-tdep.c (mips_fpu_type_str): New function.
3673 (mips_dump_tdep): Call it.
3674
3675 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3676
3677 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3678 `->mips_fpu_type'.
3679
3680 2017-07-31 Xavier Roirand <roirand@adacore.com>
3681
3682 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3683
3684 2017-07-27 Xavier Roirand <roirand@adacore.com>
3685
3686 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3687
3688 2017-07-26 Yao Qi <yao.qi@linaro.org>
3689
3690 * cli/cli-cmds.c (maintenancechecklist): New variable.
3691 * gdbcmd.h (maintenancechecklist): Declare it.
3692 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3693 Call i386_linux_read_description with different masks.
3694 * maint.c (maintenance_check_command): New function.
3695 (_initialize_maint_cmds): Call add_prefix_cmd.
3696 * target-descriptions.c (tdesc_reg): override operator != and ==.
3697 (tdesc_type): Likewise.
3698 (tdesc_feature): Likewise.
3699 (target_desc): Likewise.
3700 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3701 (maintenance_check_xml_descriptions): New function.
3702 (_initialize_target_descriptions) Add command "xml-descriptions".
3703 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3704
3705 2017-07-26 Yao Qi <yao.qi@linaro.org>
3706
3707 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3708 Include features/i386/32bit-*.c.
3709 (i386_linux_read_description): Generate target description if it
3710 doesn't exist.
3711 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3712 functions.
3713 * features/i386/32bit-linux.c: Re-generated.
3714 * features/i386/32bit-sse.c: Likewise.
3715 * target-descriptions.c (print_c_feature::visit): Print code to
3716 set register number if needed.
3717 (print_c_feature) <m_next_regnum>: New field.
3718
3719 2017-07-26 Yao Qi <yao.qi@linaro.org>
3720
3721 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3722 (FEATURE_XMLFILES): New.
3723 (FEATURE_CFILES): New.
3724 New rules.
3725 (clean-cfiles): Remove generated c files.
3726 * features/i386/32bit-avx.c: Generated.
3727 * features/i386/32bit-avx512.c: Generated.
3728 * features/i386/32bit-core.c: Generated.
3729 * features/i386/32bit-linux.c: Generated.
3730 * features/i386/32bit-mpx.c: Generated.
3731 * features/i386/32bit-pkeys.c: Generated.
3732 * features/i386/32bit-sse.c: Generated.
3733 * target-descriptions.c: Include algorithm.
3734 (tdesc_element_visitor): Add method visit_end.
3735 (print_c_tdesc): Implement visit_end.
3736 (print_c_tdesc:: m_filename_after_features): Move it to
3737 protected.
3738 (print_c_feature): New class.
3739 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3740 name starts with "i386/32bit-".
3741
3742 2017-07-26 Yao Qi <yao.qi@linaro.org>
3743
3744 * target-descriptions.c (tdesc_element_visitor): New class.
3745 (tdesc_element): New class.
3746 (tdesc_reg): Inherit from tdesc_element.
3747 (tdesc_reg::accept): New function.
3748 (tdesc_type): Inherit from tdesc_element.
3749 (tdesc_type::accept): New function.
3750 (tdesc_feature): Inherit from tdesc_element.
3751 (tdesc_feature::accept): New function.
3752 (target_desc): Inherit from tdesc_element.
3753 (target_desc::target_desc): New.
3754 (target_desc::~target_desc): New.
3755 (target_desc::accept): New.
3756 (allocate_target_description): Use new.
3757 (free_target_description): Use delete.
3758 (print_c_tdesc): New class.
3759 (maint_print_c_tdesc_cmd): Adjust.
3760
3761 * features/aarch64.c: Re-generated.
3762 * features/arc-arcompact.c: Re-generated.
3763 * features/arc-v2.c: Re-generated.
3764 * features/arm/arm-with-iwmmxt.c: Re-generated.
3765 * features/arm/arm-with-m.c: Re-generated.
3766 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3767 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3768 * features/arm/arm-with-neon.c: Re-generated.
3769 * features/arm/arm-with-vfpv2.c: Re-generated.
3770 * features/arm/arm-with-vfpv3.c: Re-generated.
3771 * features/i386/amd64-avx-avx512.c: Re-generated.
3772 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3773 * features/i386/amd64-avx.c: Re-generated.
3774 * features/i386/amd64-avx-linux.c: Re-generated.
3775 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3776 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3777 * features/i386/amd64-avx-mpx.c: Re-generated.
3778 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3779 * features/i386/amd64.c: Re-generated.
3780 * features/i386/amd64-linux.c: Re-generated.
3781 * features/i386/amd64-mpx.c: Re-generated.
3782 * features/i386/amd64-mpx-linux.c: Re-generated.
3783 * features/i386/i386-avx-avx512.c: Re-generated.
3784 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3785 * features/i386/i386-avx.c: Re-generated.
3786 * features/i386/i386-avx-linux.c: Re-generated.
3787 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3788 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3789 * features/i386/i386-avx-mpx.c: Re-generated.
3790 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3791 * features/i386/i386.c: Re-generated.
3792 * features/i386/i386-linux.c: Re-generated.
3793 * features/i386/i386-mmx.c: Re-generated.
3794 * features/i386/i386-mmx-linux.c: Re-generated.
3795 * features/i386/i386-mpx.c: Re-generated.
3796 * features/i386/i386-mpx-linux.c: Re-generated.
3797 * features/i386/x32-avx-avx512.c: Re-generated.
3798 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3799 * features/i386/x32-avx.c: Re-generated.
3800 * features/i386/x32-avx-linux.c: Re-generated.
3801 * features/i386/x32.c: Re-generated.
3802 * features/i386/x32-linux.c: Re-generated.
3803 * features/microblaze.c: Re-generated.
3804 * features/microblaze-with-stack-protect.c: Re-generated.
3805 * features/mips64-dsp-linux.c: Re-generated.
3806 * features/mips64-linux.c: Re-generated.
3807 * features/mips-dsp-linux.c: Re-generated.
3808 * features/mips-linux.c: Re-generated.
3809 * features/nds32.c: Re-generated.
3810 * features/nios2.c: Re-generated.
3811 * features/nios2-linux.c: Re-generated.
3812 * features/rs6000/powerpc-32.c: Re-generated.
3813 * features/rs6000/powerpc-32l.c: Re-generated.
3814 * features/rs6000/powerpc-403.c: Re-generated.
3815 * features/rs6000/powerpc-403gc.c : Re-generated.
3816 * features/rs6000/powerpc-405.c: Re-generated.
3817 * features/rs6000/powerpc-505.c: Re-generated.
3818 * features/rs6000/powerpc-601.c: Re-generated.
3819 * features/rs6000/powerpc-602.c: Re-generated.
3820 * features/rs6000/powerpc-603.c: Re-generated.
3821 * features/rs6000/powerpc-604.c: Re-generated.
3822 * features/rs6000/powerpc-64.c: Re-generated.
3823 * features/rs6000/powerpc-64l.c: Re-generated.
3824 * features/rs6000/powerpc-7400.c: Re-generated.
3825 * features/rs6000/powerpc-750.c: Re-generated.
3826 * features/rs6000/powerpc-860.c: Re-generated.
3827 * features/rs6000/powerpc-altivec32.c: Re-generated.
3828 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3829 * features/rs6000/powerpc-altivec64.c: Re-generated.
3830 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3831 * features/rs6000/powerpc-cell32l.c: Re-generated.
3832 * features/rs6000/powerpc-cell64l.c: Re-generated.
3833 * features/rs6000/powerpc-e500.c: Re-generated.
3834 * features/rs6000/powerpc-e500l.c: Re-generated.
3835 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3836 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3837 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3838 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3839 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3840 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3841 * features/rs6000/powerpc-vsx32.c: Re-generated.
3842 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3843 * features/rs6000/powerpc-vsx64.c: Re-generated.
3844 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3845 * features/rs6000/rs6000.c: Re-generated.
3846 * features/s390-linux32.c: Re-generated.
3847 * features/s390-linux32v1.c: Re-generated.
3848 * features/s390-linux32v2.c: Re-generated.
3849 * features/s390-linux64.c: Re-generated.
3850 * features/s390-linux64v1.c: Re-generated.
3851 * features/s390-linux64v2.c: Re-generated.
3852 * features/s390-te-linux64.c: Re-generated.
3853 * features/s390-tevx-linux64.c: Re-generated.
3854 * features/s390-vx-linux64.c: Re-generated.
3855 * features/s390x-linux64.c: Re-generated.
3856 * features/s390x-linux64v1.c: Re-generated.
3857 * features/s390x-linux64v2.c: Re-generated.
3858 * features/s390x-te-linux64.c: Re-generated.
3859 * features/s390x-tevx-linux64.c: Re-generated.
3860 * features/s390x-vx-linux64.c: Re-generated.
3861 * features/sparc/sparc32-solaris.c: Re-generated.
3862 * features/sparc/sparc64-solaris.c: Re-generated.
3863 * features/tic6x-c62x.c: Re-generated.
3864 * features/tic6x-c62x-linux.c: Re-generated.
3865 * features/tic6x-c64x.c: Re-generated.
3866 * features/tic6x-c64x-linux.c: Re-generated.
3867 * features/tic6x-c64xp.c: Re-generated.
3868 * features/tic6x-c64xp-linux.c: Re-generated.
3869
3870 2017-07-26 Yao Qi <yao.qi@linaro.org>
3871
3872 * i386-linux-tdep.c (i386_linux_read_description): New function.
3873 (i386_linux_core_read_description): Call
3874 i386_linux_read_description.
3875 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3876 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3877 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3878 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3879 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3880 * x86-linux-nat.c (x86_linux_read_description): Call
3881 i386_linux_read_description.
3882
3883 2017-07-26 Yao Qi <yao.qi@linaro.org>
3884
3885 * NEWS: Mention it.
3886 * features/Makefile (%.c: %.xml): Pass the xml file name to
3887 command "maint print c-tdesc".
3888 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3889 name from 'arg'.
3890
3891 2017-07-26 Yao Qi <yao.qi@linaro.org>
3892
3893 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3894 in-class initialization.
3895 (tdesc_create_feature): Call new instead of XCNEW.
3896 (free_target_description): Ue delete.
3897
3898 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3899
3900 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3901
3902 2017-07-25 Yao Qi <yao.qi@linaro.org>
3903
3904 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3905 constant.
3906 (amd64_x32_init_abi): Likewise.
3907 * amd64-tdep.h (amd64_init_abi): Update declaration.
3908 (amd64_x32_init_abi): Likewise.
3909
3910 2017-07-25 Yao Qi <yao.qi@linaro.org>
3911
3912 PR tdep/21717
3913 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3914 condition for FPSCR.
3915 (arm_linux_store_inferior_registers): Likewise.
3916
3917 2017-07-22 Tom Tromey <tom@tromey.com>
3918
3919 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3920 <syscalls_counts>: Now a std::vector.
3921 (get_catch_syscall_inferior_data): Use "new".
3922 (catch_syscall_inferior_data_cleanup): Use "delete".
3923 (insert_catch_syscall, remove_catch_syscall)
3924 (clear_syscall_counts): Update.
3925
3926 2017-07-22 Tom Tromey <tom@tromey.com>
3927
3928 * break-catch-syscall.c (syscall_catchpoint)
3929 <syscalls_to_be_caught>: Now a std::vector<int>
3930 (~syscall_catchpoint): Remove.
3931 (insert_catch_syscall, remove_catch_syscall)
3932 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3933 (print_mention_catch_syscall, print_recreate_catch_syscall):
3934 Update.
3935 (create_syscall_event_catchpoint): Change type of "filter"
3936 parameter.
3937 (catch_syscall_split_args): Return a std::vector.
3938 (catch_syscall_command_1, catching_syscall_number_1): Update.
3939
3940 2017-07-22 Tom Tromey <tom@tromey.com>
3941
3942 * break-catch-throw.c (struct exception_catchpoint)
3943 <exception_rx>: Now a std::string.
3944 (~exception_catchpoint): Remove.
3945 (print_one_detail_exception_catchpoint): Update.
3946 (handle_gnu_v3_exceptions): Change type of except_rx.
3947 (extract_exception_regexp): Return a std::string.
3948 (catch_exception_command_1): Update.
3949
3950 2017-07-22 Tom Tromey <tom@tromey.com>
3951
3952 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3953 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3954 std::vector.
3955 <catch_all>: Now a bool.
3956 (~signal_catchpoint): Remove.
3957 (signal_catchpoint_insert_location)
3958 (signal_catchpoint_remove_location)
3959 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3960 (signal_catchpoint_print_mention)
3961 (signal_catchpoint_print_recreate)
3962 (signal_catchpoint_explains_signal): Update.
3963 (create_signal_catchpoint): Change type of "filter" and
3964 "catch_all".
3965 (catch_signal_split_args): Return a std::vector. Change type of
3966 "catch_all".
3967 (catch_signal_command): Update.
3968
3969 2017-07-20 Pedro Alves <palves@redhat.com>
3970
3971 * ada-lang.c (ada_language_defn): Make extern.
3972 (_initialize_ada_language): Remove add_language call.
3973 * c-lang.c (c_language_defn, cplus_language_defn)
3974 (asm_language_defn, minimal_language_defn): Make extern.
3975 (_initialize_c_language): Delete.
3976 * completer.c (compare_cstrings): Delete, moved to utils.h.
3977 * d-lang.c (d_language_defn): Make extern.
3978 (_initialize_d_language): Remove add_language calls.
3979 * defs.h (enum language): Add comment.
3980 * f-lang.c (f_language_defn): Make extern.
3981 (_initialize_f_language): Remove add_language call.
3982 * go-lang.c (go_language_defn): Make extern.
3983 (_initialize_go_language): Remove add_language call.
3984 * language.c: Include <algorithm>.
3985 (languages): Redefine as const array.
3986 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3987 (set_language_command): Handle "local". Use for-range loop.
3988 (set_language): Remove loop.
3989 (language_enum): Rewrite.
3990 (language_def, language_str): Remove loops.
3991 (add_language): Delete.
3992 (add_set_language_command): New, based on add_languages.
3993 (skip_language_trampoline): Adjust.
3994 (local_language_defn): Delete.
3995 (language_gdbarch_post_init): Adjust.
3996 (_initialize_language): Remove add_language calls. Call
3997 add_set_language_command.
3998 * language.h (add_language): Delete.
3999 (auto_language_defn)
4000 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4001 (asm_language_defn, c_language_defn, cplus_language_defn)
4002 (d_language_defn, f_language_defn, go_language_defn)
4003 (m2_language_defn, objc_language_defn, opencl_language_defn)
4004 (pascal_language_defn, rust_language_defn): Declare.
4005 * m2-lang.c (m2_language_defn): Make extern.
4006 (_initialize_m2_language): Remove add_language call.
4007 * objc-lang.c (objc_language_defn): Make extern.
4008 (_initialize_objc_language): Remove add_language call.
4009 * opencl-lang.c (opencl_language_defn): Make extern.
4010 (_initialize_opencl_language): Remove add_language call.
4011 * p-lang.c (pascal_language_defn): Make extern.
4012 (_initialize_pascal_language): Delete.
4013 * rust-lang.c (rust_language_defn): Make extern.
4014 (_initialize_rust_language): Delete.
4015 * utils.h (compare_cstrings): New static inline function.
4016
4017 2017-07-20 Pedro Alves <palves@redhat.com>
4018
4019 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4020 (get_var_value): Constify parameters.
4021 (get_int_var_value): Change prototype.
4022 (to_fixed_range_type): Adjust.
4023 * ada-lang.h (get_int_var_value): Change prototype.
4024
4025 2017-07-20 Pedro Alves <palves@redhat.com>
4026
4027 * dwarf2read.c (dw2_lookup_symbol): Use
4028 SYMBOL_MATCHES_SEARCH_NAME.
4029 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4030
4031 2017-07-20 Pedro Alves <palves@redhat.com>
4032
4033 * block.c (block_iter_name_step, block_iter_name_first)
4034 (block_iter_name_next): Delete.
4035 (block_lookup_symbol_primary): Adjust to use
4036 dict_iter_match_first/dict_iter_match_next.
4037 * block.h (block_iter_name_first, block_iter_name_next): Delete
4038 declarations.
4039 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4040 dict_iter_match_first/dict_iter_match_next.
4041
4042 2017-07-20 Pedro Alves <palves@redhat.com>
4043
4044 * cp-support.c (cp_find_first_component_aux): Add missing case for
4045 end of string.
4046
4047 2017-07-18 David Blaikie <dblaikie@gmail.com>
4048
4049 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4050 of dwo_cu's dwo_file.
4051
4052 2017-07-18 Yao Qi <yao.qi@linaro.org>
4053
4054 * remote.c (store_registers_using_G): Remove one line comment.
4055
4056 2017-07-18 Yao Qi <yao.qi@linaro.org>
4057
4058 * regcache.c (regcache_cpy): Simplify it.
4059 (regcache::cpy_no_passthrough): Remove it.
4060 * regcache.h (cpy_no_passthrough): Remove it.
4061 (regcache_dup, regcache_cpy): Update comments.
4062
4063 2017-07-18 Pedro Alves <palves@redhat.com>
4064
4065 * remote-sim.c (sim_command_completer): Adjust to work with a
4066 completion_tracker instead of a VEC.
4067
4068 2017-07-17 Pedro Alves <palves@redhat.com>
4069
4070 * completer.c (complete_source_filenames): New function.
4071 (complete_address_and_linespec_locations): New function.
4072 (location_completer): Use complete_address_and_linespec_locations.
4073 (completion_tracker::build_completion_result): Honor the tracker's
4074 request to suppress append.
4075 * completer.h (completion_tracker::suppress_append_ws)
4076 (completion_tracker::set_suppress_append_ws): New methods.
4077 (completion_tracker::m_suppress_append_ws): New field.
4078 (complete_source_filenames): New declaration.
4079 * linespec.c (linespec_complete_what): New.
4080 (struct ls_parser) <complete_what, completion_word,
4081 completion_quote_char, completion_quote_end, completion_tracker>:
4082 New fields.
4083 (string_find_incomplete_keyword_at_end): New.
4084 (linespec_lexer_lex_string): Record quote char. If in completion
4085 mode, don't throw.
4086 (linespec_lexer_consume_token): Advance the completion word point.
4087 (linespec_lexer_peek_token): Save/restore completion info.
4088 (save_stream_and_consume_token): New.
4089 (set_completion_after_number): New.
4090 (linespec_parse_basic): Set what to complete next depending on
4091 token. Handle function and label completions specially.
4092 (parse_linespec): Disable objc shortcut in completion mode. Set
4093 what to complete next depending on token type. Skip keyword if in
4094 completion mode.
4095 (complete_linespec_component, linespec_complete): New.
4096 * linespec.h (linespec_complete): Declare.
4097
4098 2017-07-17 Pedro Alves <palves@redhat.com>
4099
4100 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4101 Handle 'operator<' / 'operator<<'.
4102
4103 2017-07-17 Pedro Alves <palves@redhat.com>
4104
4105 * completer.c (collect_explicit_location_matches): Handle
4106 MATCH_LABEL.
4107 (convert_explicit_location_to_linespec): New, factored out from
4108 ...
4109 (convert_explicit_location_to_sals): ... this.
4110 (complete_label): New.
4111 (linespec_complete_label, find_label_symbols_in_block): New.
4112 (find_label_symbols): Add completion_mode parameter and adjust to
4113 call find_label_symbols_in_block.
4114 * linespec.h (linespec_complete_label): Declare.
4115
4116 2017-07-17 Pedro Alves <palves@redhat.com>
4117
4118 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4119 complete_symbol_mode parameter.
4120 * cli/cli-cmds.c (complete_command): Get the completion result out
4121 of the handle_brkchars tracker if used a custom word point.
4122 * completer.c: Include "linespec.h".
4123 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4124 (advance_to_expression_complete_word_point): New.
4125 (completion_tracker::completes_to_completion_word): New.
4126 (complete_files_symbols): Pass down
4127 complete_symbol_mode::EXPRESSION.
4128 (explicit_options, probe_options): New.
4129 (collect_explicit_location_matches): Complete on the
4130 explictit_loc->foo instead of word. Use
4131 linespec_complete_function. Handle MATCH_LINE. Handle offering
4132 keyword and options completions.
4133 (backup_text_ptr): Delete.
4134 (skip_keyword): New.
4135 (complete_explicit_location): Remove 'word' parameter. Add
4136 language, quoted_arg_start and quoted_arg_end parameters.
4137 Rewrite, parsing left to right.
4138 (location_completer): Rewrite.
4139 (location_completer_handle_brkchars): New function.
4140 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4141 (enum complete_line_internal_reason): Adjust comments.
4142 (completion_tracker::discard_completions): New.
4143 (completer_handle_brkchars_func_for_completer): Handle
4144 location_completer.
4145 (gdb_custom_word_point_brkchars)
4146 (gdb_org_rl_basic_quote_characters): New.
4147 (gdb_completion_word_break_characters_throw)
4148 (completion_find_completion_word): Handle trackers that use a
4149 custom word point.
4150 (completion_tracker::advance_custom_word_point_by): New.
4151 (completion_tracker::build_completion_result): Don't rely on
4152 readline appending the quote char.
4153 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4154 use a custom word point.
4155 (gdb_rl_attempted_completion_function): Restore
4156 rl_basic_quote_characters.
4157 * completer.h (class completion_tracker): Extend intro comment.
4158 (completion_tracker::set_quote_char)
4159 (completion_tracker::quote_char)
4160 (completion_tracker::set_use_custom_word_point)
4161 (completion_tracker::use_custom_word_point)
4162 (completion_tracker::custom_word_point)
4163 (completion_tracker::set_custom_word_point)
4164 (completion_tracker::advance_custom_word_point_by)
4165 (completion_tracker::completes_to_completion_word)
4166 (completion_tracker::discard_completions): New methods.
4167 (completion_tracker::m_quote_char)
4168 (completion_tracker::m_use_custom_word_point)
4169 (completion_tracker::m_custom_word_point): New fields.
4170 (advance_to_expression_complete_word_point): Declare.
4171 * f-lang.c (f_collect_symbol_completion_matches): Add
4172 complete_symbol_mode parameter.
4173 * language.h (struct language_defn)
4174 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4175 parameter.
4176 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4177 (linespec_complete_function): New function.
4178 (linespec_lexer_lex_keyword): Adjust.
4179 * linespec.h (linespec_keywords, linespec_complete_function): New
4180 declarations.
4181 * location.c (find_end_quote): New function.
4182 (explicit_location_lex_one): Add explicit_completion_info
4183 parameter. Save quoting info. Don't throw if being called for
4184 completion. Don't handle Ada operators here.
4185 (is_cp_operator, skip_op_false_positives, first_of)
4186 (explicit_location_lex_one_function): New function.
4187 (string_to_explicit_location): Replace 'dont_throw' parameter with
4188 an explicit_completion_info pointer parameter. Handle it. Don't
4189 use explicit_location_lex_one to lex function names. Use
4190 explicit_location_lex_one_function instead.
4191 * location.h (struct explicit_completion_info): New.
4192 (string_to_explicit_location): Replace 'dont_throw' parameter with
4193 an explicit_completion_info pointer parameter.
4194 * symtab.c (default_collect_symbol_completion_matches_break_on):
4195 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4196 (default_collect_symbol_completion_matches)
4197 (collect_symbol_completion_matches): Add complete_symbol_mode
4198 parameter.
4199 (collect_symbol_completion_matches_type): Pass down
4200 complete_symbol_mode::EXPRESSION.
4201 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4202 parameter. Handle LINESPEC mode.
4203 * symtab.h (complete_symbol_mode): New.
4204 (default_collect_symbol_completion_matches_break_on)
4205 (default_collect_symbol_completion_matches)
4206 (collect_symbol_completion_matches)
4207 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4208 parameter.
4209
4210 2017-07-17 Pedro Alves <palves@redhat.com>
4211
4212 * utils.c (enum class strncmp_iw_mode): New.
4213 (strcmp_iw): Rename to ...
4214 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4215 parameters. Handle them.
4216 (strncmp_iw): New.
4217 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4218 * utils.h (strncmp_iw): Declare.
4219 (strcmp_iw): Move describing comments here.
4220
4221 2017-07-17 Pedro Alves <palves@redhat.com>
4222
4223 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4224 CP_OPERATOR_STR.
4225 * c-typeprint.c (is_type_conversion_operator): Use
4226 CP_OPERATOR_STR.
4227 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4228 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4229 CP_OPERATOR_LEN.
4230 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4231 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4232 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4233 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4234 CP_OPERATOR_STR.
4235 * location.c: Include "cp-support.h".
4236 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4237 CP_OPERATOR_STR.
4238 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4239 CP_OPERATOR_LEN.
4240
4241 2017-07-17 Pedro Alves <palves@redhat.com>
4242
4243 * cli/cli-cmds.c (complete_command): Use a completion tracker
4244 along with completion_find_completion_word for handle_brkchars
4245 phase.
4246 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4247 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4248 (struct gdb_rl_completion_word_info): New.
4249 (gdb_rl_find_completion_word): New.
4250 (completion_find_completion_word): New.
4251 * completer.h (completion_find_completion_word): Declare.
4252
4253 2017-07-17 Pedro Alves <palves@redhat.com>
4254
4255 * ada-lang.c (symbol_completion_match): Adjust comments.
4256 (symbol_completion_add): Replace vector parameter with
4257 completion_tracker parameter. Use it.
4258 (ada_make_symbol_completion_list): Rename to...
4259 (ada_collect_symbol_completion_matches): ... this. Add
4260 completion_tracker parameter and use it.
4261 (ada_language_defn): Adjust.
4262 * break-catch-syscall.c (catch_syscall_completer): Adjust
4263 prototype and work with completion_tracker instead of VEC.
4264 * breakpoint.c (condition_completer): Adjust prototype and work
4265 with completion_tracker instead of VEC.
4266 * c-lang.c (c_language_defn, cplus_language_defn)
4267 (asm_language_defn, minimal_language_defn): Adjust to renames.
4268 * cli/cli-cmds.c (complete_command): Rework using
4269 completion_tracker. Catch exceptions when completing.
4270 * cli/cli-decode.c (integer_unlimited_completer)
4271 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4272 with completion_tracker instead of VEC.
4273 * command.h (struct completion_tracker): Forward declare.
4274 (completer_ftype, completer_handle_brkchars_ftype): Change
4275 types.
4276 (complete_on_cmdlist, complete_on_enum): Adjust.
4277 * completer.c: Include <algorithm>.
4278 (struct gdb_completer_state): New.
4279 (current_completion): New global.
4280 (readline_line_completion_function): Delete.
4281 (noop_completer, filename_completer)
4282 (filename_completer_handle_brkchars, complete_files_symbols)
4283 (linespec_location_completer): Adjust to work with a
4284 completion_tracker instead of a VEC.
4285 (string_or_empty): New.
4286 (collect_explicit_location_matches): Adjust to work with a
4287 completion_tracker instead of a VEC.
4288 (explicit_location_completer): Rename to ...
4289 (complete_explicit_location): ... this and adjust to work with a
4290 completion_tracker instead of a VEC.
4291 (location_completer): Adjust to work with a completion_tracker
4292 instead of a VEC.
4293 (add_struct_fields): Adjust to work with a completion_list instead
4294 of VEC.
4295 (expression_completer): Rename to ...
4296 (complete_expression): ... this and adjust to work with a
4297 completion_tracker instead of a VEC. Use complete_files_symbols.
4298 (expression_completer): Reimplement on top of complete_expression.
4299 (symbol_completer): Adjust to work with a completion_tracker
4300 instead of a VEC.
4301 (enum complete_line_internal_reason): Add describing comments.
4302 (complete_line_internal_normal_command): Adjust to work with a
4303 completion_tracker instead of a VEC.
4304 (complete_line_internal): Rename to ...
4305 (complete_line_internal_1): ... this and adjust to work with a
4306 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4307 handle_brkchars phase.
4308 (new_completion_tracker): Delete.
4309 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4310 complete_line_internal_1.
4311 (free_completion_tracker): Delete.
4312 (INITIAL_COMPLETION_HTAB_SIZE): New.
4313 (completion_tracker::completion_tracker)
4314 (completion_tracker::~completion_tracker): New.
4315 (maybe_add_completion): Delete.
4316 (completion_tracker::maybe_add_completion)
4317 (completion_tracker::add_completion)
4318 (completion_tracker::add_completions): New.
4319 (throw_max_completions_reached_error): Delete.
4320 (complete_line): Adjust to work with a completion_tracker instead
4321 of a VEC. Don't create a completion_tracker_t or check for max
4322 completions here.
4323 (command_completer, command_completer_handle_brkchars)
4324 (signal_completer, reg_or_group_completer_1)
4325 (reg_or_group_completer, default_completer_handle_brkchars):
4326 Adjust to work with a completion_tracker.
4327 (gdb_completion_word_break_characters_throw): New.
4328 (gdb_completion_word_break_characters): Reimplement.
4329 (line_completion_function): Delete.
4330 (completion_tracker::recompute_lowest_common_denominator)
4331 (expand_preserving_ws)
4332 (completion_tracker::build_completion_result)
4333 (completion_result::completion_result)
4334 (completion_result::completion_result)
4335 (completion_result::~completion_result)
4336 (completion_result::completion_result)
4337 (completion_result::release_match_list, compare_cstrings)
4338 (completion_result::sort_match_list)
4339 (completion_result::reset_match_list)
4340 (gdb_rl_attempted_completion_function_throw)
4341 (gdb_rl_attempted_completion_function): New.
4342 * completer.h (completion_list, struct completion_result)
4343 (class completion_tracker): New.
4344 (complete_line): Add completion_tracker parameter.
4345 (readline_line_completion_function): Delete.
4346 (gdb_rl_attempted_completion_function): New.
4347 (noop_completer, filename_completer, expression_completer)
4348 (location_completer, symbol_completer, command_completer)
4349 (signal_completer, reg_or_group_completer): Update prototypes.
4350 (completion_tracker_t, new_completion_tracker)
4351 (make_cleanup_free_completion_tracker): Delete.
4352 (enum maybe_add_completion_enum): Delete.
4353 (maybe_add_completion): Delete.
4354 (throw_max_completions_reached_error): Delete.
4355 * corefile.c (complete_set_gnutarget): Adjust to work with a
4356 completion_tracker instead of a VEC.
4357 * cp-abi.c (cp_abi_completer): Adjust to work with a
4358 completion_tracker instead of a VEC.
4359 * d-lang.c (d_language_defn): Adjust.
4360 * disasm.c (disassembler_options_completer): Adjust to work with a
4361 completion_tracker instead of a VEC.
4362 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4363 (f_collect_symbol_completion_matches): ... this. Adjust to work
4364 with a completion_tracker instead of a VEC.
4365 (f_language_defn): Adjust.
4366 * go-lang.c (go_language_defn): Adjust.
4367 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4368 Adjust to work with a completion_tracker instead of a VEC.
4369 * infrun.c (handle_completer): Likewise.
4370 * interps.c (interpreter_completer): Likewise.
4371 * interps.h (interpreter_completer): Likewise.
4372 * language.c (unknown_language_defn, auto_language_defn)
4373 (local_language_defn): Adjust.
4374 * language.h (language_defn::la_make_symbol_completion_list):
4375 Rename to ...
4376 (language_defn::la_collect_symbol_completion_matches): ... this
4377 and adjust to work with a completion_tracker instead of a VEC.
4378 * m2-lang.c (m2_language_defn): Adjust.
4379 * objc-lang.c (objc_language_defn): Adjust.
4380 * opencl-lang.c (opencl_language_defn): Adjust.
4381 * p-lang.c (pascal_language_defn): Adjust.
4382 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4383 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4384 with a completion_tracker.
4385 * rust-lang.c (rust_language_defn): Adjust.
4386 * symtab.c (free_completion_list, do_free_completion_list)
4387 (return_val, completion_tracker): Delete.
4388 (completion_list_add_name, completion_list_add_symbol)
4389 (completion_list_add_msymbol, completion_list_objc_symbol)
4390 (completion_list_add_fields, add_symtab_completions): Add
4391 completion_tracker parameter and use it.
4392 (default_make_symbol_completion_list_break_on_1): Rename to...
4393 (default_collect_symbol_completion_matches_break_on): ... this.
4394 Add completion_tracker parameter and use it instead of allocating
4395 a completion tracker here.
4396 (default_make_symbol_completion_list_break_on): Delete old
4397 implementation.
4398 (default_make_symbol_completion_list): Delete.
4399 (default_collect_symbol_completion_matches): New.
4400 (make_symbol_completion_list): Delete.
4401 (collect_symbol_completion_matches): New.
4402 (make_symbol_completion_type): Rename to ...
4403 (collect_symbol_completion_matches_type): ... this. Add
4404 completion_tracker parameter and use it instead of VEC.
4405 (make_file_symbol_completion_list_1): Rename to...
4406 (collect_file_symbol_completion_matches): ... this. Add
4407 completion_tracker parameter and use it instead of VEC.
4408 (make_file_symbol_completion_list): Delete.
4409 (add_filename_to_list): Use completion_list instead of a VEC.
4410 (add_partial_filename_data::list): Now a completion_list.
4411 (make_source_files_completion_list): Work with a completion_list
4412 instead of a VEC.
4413 * symtab.h: Include "completer.h".
4414 (default_make_symbol_completion_list_break_on)
4415 (default_make_symbol_completion_list, make_symbol_completion_list)
4416 (make_symbol_completion_type, make_file_symbol_completion_list)
4417 (make_source_files_completion_list): Delete.
4418 (default_collect_symbol_completion_matches_break_on)
4419 (default_collect_symbol_completion_matches)
4420 (collect_symbol_completion_matches)
4421 (collect_symbol_completion_matches_type)
4422 (collect_file_symbol_completion_matches)
4423 (make_source_files_completion_list): New.
4424 * top.c (init_main): Don't install a rl_completion_entry_function
4425 hook. Install a rl_attempted_completion_function hook instead.
4426 * tui/tui-layout.c (layout_completer): Adjust to work with a
4427 completion_tracker.
4428 * tui/tui-regs.c (tui_reggroup_completer):
4429 * tui/tui-win.c (window_name_completer, focus_completer)
4430 (winheight_completer): Adjust to work with a completion_tracker.
4431 * value.c: Include "completer.h".
4432 (complete_internalvar): Adjust to work with a completion_tracker.
4433 * value.h (complete_internalvar): Likewise.
4434
4435 2017-07-17 Pedro Alves <palves@redhat.com>
4436
4437 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4438 renames.
4439 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4440 comments to completer_ftype's declaration.
4441 <completer_handle_brkchars>: Change type to
4442 completer_handle_brkchars_ftype.
4443 * command.h (completer_ftype): Add describing comment and give
4444 names to parameters.
4445 (completer_ftype_void): Rename to ...
4446 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4447 (set_cmd_completer_handle_brkchars): Adjust.
4448 * completer.c (filename_completer_handle_brkchars): New function.
4449 (complete_line_internal_normal_command): New function, factored
4450 out from ...
4451 (complete_line_internal): ... here.
4452 (command_completer_handle_brkchars)
4453 (default_completer_handle_brkchars)
4454 (completer_handle_brkchars_func_for_completer): New functions.
4455 * completer.h (set_gdb_completion_word_break_characters): Delete
4456 declaration.
4457 (completer_handle_brkchars_func_for_completer): New declaration.
4458 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4459 completer_handle_brkchars_func_for_completer.
4460
4461 2017-07-17 Pedro Alves <palves@redhat.com>
4462
4463 * completer.c (symbol_completer): New function, based on
4464 make_symbol_completion_list_fn.
4465 * completer.h (symbol_completer): New declaration.
4466 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4467 * python/py-cmd.c (completers): Adjust.
4468 * symtab.c (make_symbol_completion_list_fn): Delete.
4469 * symtab.h (make_symbol_completion_list_fn): Delete.
4470 * cli/cli-decode.c (add_cmd): Adjust.
4471
4472 2017-07-17 Pedro Alves <palves@redhat.com>
4473
4474 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4475 * dwarf2read.c: Include "filename-seen-cache.h".
4476 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4477 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4478 * filename-seen-cache.c: New file.
4479 * filename-seen-cache.h: New file.
4480 * symtab.c: Include "filename-seen-cache.h".
4481 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4482 (create_filename_seen_cache, clear_filename_seen_cache)
4483 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4484 to filename-seen-cache.h/filename-seen-cache.c.
4485 (output_source_filename, sources_info)
4486 (maybe_add_partial_symtab_filename)
4487 (make_source_files_completion_list): Adjust to use
4488 filename_seen_cache.
4489
4490 2017-07-17 Pedro Alves <palves@redhat.com>
4491
4492 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4493 fields.
4494 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4495 dwarf2_debug_sections*)): New.
4496 (dwarf2_per_objfile::dwarf2_per_objfile(const
4497 dwarf2_per_objfile&)): Declare as deleted.
4498 (dwarf2_per_objfile::operator=): Declare as deleted.
4499 (dwarf2_per_objfile::dwarf2_per_objfile)
4500 (dwarf2_per_objfile::~dwarf2_per_objfile)
4501 (dwarf2_per_objfile::free_cached_comp_units): New.
4502 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4503 ctor. Call dwarf2_per_objfile's ctor manually.
4504 (dwarf2_locate_sections): Deleted/refactored as ...
4505 (dwarf2_per_objfile::locate_sections): ... this new method.
4506 (free_cached_comp_units): Defer to
4507 dwarf2_per_objfile::free_cached_comp_units.
4508 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4509
4510 2017-07-14 Tom Tromey <tom@tromey.com>
4511
4512 PR rust/21764:
4513 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4514 parameter.
4515 <UNOP_SIZEOF>: Split into separate case.
4516 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4517
4518 2017-07-14 Tom Tromey <tom@tromey.com>
4519
4520 PR rust/21763:
4521 * symtab.c (symbol_matches_domain): Add language_rust to special
4522 case.
4523 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4524 treat LOC_TYPEDEF symbols as variables.
4525
4526 2017-07-14 Pedro Alves <palves@redhat.com>
4527
4528 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4529 symtabs matching all symtabs with SRCFILE as file name instead of
4530 only considering the first hit, with lookup_symtab.
4531
4532 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4533
4534 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4535 operator_name parameters.
4536 (gen_expr): Update function call.
4537
4538 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4539
4540 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4541 parameter.
4542 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4543 Likewise.
4544 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4545 parameter, use agent_expr::gdbarch instead, update function
4546 calls.
4547 (locexpr_tracepoint_var_ref): Likewise.
4548 (loclist_tracepoint_var_ref): Likewise.
4549 * ax-gdb.c (gen_trace_static_fields): Likewise.
4550 (gen_traced_pop): Likewise.
4551 (gen_frame_args_address): Likewise.
4552 (gen_frame_locals_address): Likewise.
4553 (gen_var_ref): Likewise.
4554 (gen_struct_ref_recursive): Likewise.
4555 (gen_static_field): Likewise.
4556 (gen_maybe_namespace_elt): Likewise.
4557 (gen_expr): Likewise.
4558 (gen_trace_for_var): Likewise.
4559 (gen_trace_for_expr): Likewise.
4560 (gen_trace_for_return_address): Likewise.
4561
4562 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4563
4564 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4565 parameter.
4566 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4567
4568 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4569
4570 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4571 from ax, update calls.
4572 (gen_usual_arithmetic): Likewise.
4573 (gen_integral_promotions): Likewise.
4574 (gen_bitfield_ref): Likewise.
4575 (gen_primitive_field): Likewise.
4576 (gen_struct_ref_recursive): Likewise.
4577 (gen_struct_ref): Likewise.
4578 (gen_maybe_namespace_elt): Likewise.
4579 (gen_struct_elt_for_reference): Likewise.
4580 (gen_namespace_elt): Likewise.
4581 (gen_aggregate_elt_ref): Likewise.
4582 (gen_expr): Get gdbarch from ax, update calls.
4583 (gen_expr_binop_rest): Likewise.
4584
4585 2017-07-13 Pedro Alves <palves@redhat.com>
4586
4587 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4588 as default tdesc.
4589 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4590 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4591 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4592 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4593 tdep.
4594 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4595 Get final tdesc from the tdep.
4596 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4597 default tdesc.
4598 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4599 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4600 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4601 Use it as default tdesc.
4602 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4603 down to amd_init_abi. No longer handle fallback tdesc here.
4604 * amd64-tdep.h (tdesc_x32): Declare.
4605 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4606 parameter.
4607 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4608 as default tdesc.
4609
4610 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4611
4612 * s390-linux-tdep.c (s390_process_record): Add support for
4613 instructions new in arch12.
4614
4615 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4616
4617 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4618 PT_GETFSBASE and PT_GETGSBASE.
4619 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4620 PT_SETGSBASE.
4621
4622 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4623
4624 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4625 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4626 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4627 those rules.
4628 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4629 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4630 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4631 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4632 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4633 * features/i386/amd64.xml: Add 64bit-segments.xml.
4634 * features/i386/amd64-avx-avx512.c: Regenerated.
4635 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4636 * features/i386/amd64-avx-mpx.c: Regenerated.
4637 * features/i386/amd64-avx.c: Regenerated.
4638 * features/i386/amd64-mpx.c: Regenerated.
4639 * features/i386/amd64.c: Regenerated.
4640 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4641 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4642 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4643 * regformats/i386/amd64-avx.dat: Regenerated.
4644 * regformats/i386/amd64-mpx.dat: Regenerated.
4645 * regformats/i386/amd64.dat: Regenerated.
4646
4647 2017-07-10 Yao Qi <yao.qi@linaro.org>
4648
4649 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4650 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4651
4652 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4653
4654 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4655 unsetenv.
4656 * gnulib/aclocal.m4: Regenerate.
4657 * gnulib/config.in: Regenerate.
4658 * gnulib/configure: Regenerate.
4659 * gnulib/import/Makefile.am: Regenerate.
4660 * gnulib/import/Makefile.in: Regenerate.
4661 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4662 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4663 * gnulib/import/m4/environ.m4: New file.
4664 * gnulib/import/m4/setenv.m4: New file.
4665 * gnulib/import/setenv.c: New file.
4666 * gnulib/import/unsetenv.c: New file.
4667
4668 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4669
4670 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4671 address when op is DW_OP_addr.
4672
4673 2017-07-09 Tom Tromey <tom@tromey.com>
4674
4675 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4676 check and apply to outer type.
4677
4678 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4679
4680 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4681 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4682 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4683 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4684
4685 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4686
4687 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4688
4689 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4690
4691 * corelow.c (get_core_siginfo): Remove.
4692 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4693 instead of get_core_siginfo.
4694 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4695 * gdbarch.h: Re-generate.
4696 * gdbarch.c: Re-generate.
4697 * linux-tdep.c (linux_core_xfer_siginfo): New.
4698 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4699
4700 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4701
4702 * corelow.c (thread_section_name): Move to ...
4703 * gdbcore.h (thread_section_name): ... here.
4704
4705 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4706
4707 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4708 (struct siginfo32): New.
4709 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4710 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4711 via ptrace(PT_LWPINFO).
4712
4713 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4714
4715 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4716 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4717 (fbsd_get_siginfo_type): New.
4718 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4719 (_initialize_fbsd_tdep): New.
4720
4721 2017-07-06 David Blaikie <dblaikie@gmail.com>
4722
4723 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4724 a singular dwo_unit*) to support multiple CUs in the same way that
4725 multiple TUs are supported.
4726 (create_cus_hash_table): Replace create_dwo_cu with a function for
4727 parsing multiple CUs from a DWO file.
4728 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4729 create_dwo_cu.
4730 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4731 htab_find, rather than comparing the signature to a singleton CU in
4732 the dwo_file.
4733
4734 2017-07-06 Pedro Alves <palves@redhat.com>
4735
4736 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4737
4738 2017-07-04 Pedro Alves <palves@redhat.com>
4739
4740 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4741 * gdbtypes.h (TYPE_STATIC): Delete.
4742 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4743 is_synchronized, is_native>: Delete.
4744 <dummy>: Bump.
4745 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4746 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4747 (TYPE_FN_FIELD_ABSTRACT): Delete.
4748
4749 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4750
4751 * buffer.h (buffer_finish): Fix spelling mistakes.
4752
4753 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4754
4755 * .dir-locals.el: Automatically switch to C-style comments in
4756 versions of Emacs that support the feature.
4757
4758 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4759 Pedro Alves <palves@redhat.com>
4760
4761 PR cli/21688
4762 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4763 (process_next_line): New variable 'inline_cmd'.
4764 Adjust 'if' clauses for "python", "compile" and "guile" to use
4765 'command_name_equals' and check for '!inline_cmd'.
4766
4767 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4768
4769 PR cli/21688
4770 * cli/cli-script.c (command_name_equals_not_inline): New function.
4771 (process_next_line): Adjust 'if' clauses for "python", "compile"
4772 and "guile" to use command_name_equals_not_inline.
4773
4774 2017-06-29 Pedro Alves <palves@redhat.com>
4775
4776 * completer.c (expression_completer): Call
4777 linespec_location_completer instead of location_completer.
4778
4779 2017-06-29 Pedro Alves <palves@redhat.com>
4780
4781 * completer.c (expression_completer): Remove code that recomputes
4782 'text' from 'word'.
4783
4784 2017-06-29 Yao Qi <yao.qi@linaro.org>
4785
4786 * regformats/regdat.sh: Generate code with
4787 "ifndef IN_PROCESS_AGENT".
4788
4789 2017-06-28 Pedro Alves <palves@redhat.com>
4790
4791 * command.h: Include "common/scoped_restore.h".
4792
4793 2017-06-28 Yao Qi <yao.qi@linaro.org>
4794
4795 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4796 instead of obstack_grow.
4797
4798 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4799
4800 PR gdb/21337
4801 * symfile.c (reread_symbols): Call objfiles_changed just before
4802 read_symbols.
4803
4804 2017-06-27 Pedro Alves <palves@redhat.com>
4805
4806 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4807 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4808 (completion_list_add_symbol, completion_list_add_msymbol):
4809 ... these new functions.
4810 (add_symtab_completions)
4811 (default_make_symbol_completion_list_break_on_1): Adjust.
4812
4813 2017-06-27 Pedro Alves <palves@redhat.com>
4814
4815 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4816 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4817 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4818 dtor.
4819 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4820 'storage_obstack' field an auto_obstack. In-class initialize all
4821 non-bitfield fields. Make minsyms_read bool.
4822 * symfile.c (read_symbols): Adjust.
4823
4824 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4825
4826 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4827 (gdbsim_store_register): Likewise.
4828
4829 2017-06-27 Pedro Alves <palves@redhat.com>
4830
4831 * c-exp.y (name_obstack): Now an auto_obstack.
4832 (yylex): Use auto_obstack::clear.
4833 (c_parse): Use auto_obstack::clear instead of reinitializing and
4834 freeing the obstack.
4835 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4836 * d-exp.y (name_obstack): Now an auto_obstack.
4837 (yylex): Use auto_obstack::clear.
4838 (d_parse): Use auto_obstack::clear instead of reinitializing and
4839 freeing the obstack.
4840 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4841 auto_obstack.
4842 * dwarf2read.c (create_addrmap_from_index)
4843 (dwarf2_build_psymtabs_hard)
4844 (update_enumeration_type_from_children): Likewise.
4845 * gdb_obstack.h (auto_obstack): New type.
4846 * go-exp.y (name_obstack): Now an auto_obstack.
4847 (build_packaged_name): Use auto_obstack::clear.
4848 (go_parse): Use auto_obstack::clear instead of reinitializing and
4849 freeing the obstack.
4850 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4851 auto_obstack.
4852 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4853 * rust-exp.y (work_obstack): Now an auto_obstack.
4854 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4855 reinitializing and freeing the obstack.
4856 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4857 (host_char_to_target): Use auto_obstack.
4858 * utils.h (make_cleanup_obstack_free): Delete declaration.
4859 * valprint.c (generic_emit_char, generic_printstr): Use
4860 auto_obstack.
4861
4862 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4863
4864 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4865 thread.
4866 (darwin_init_thread_list): Don't update dummy thread.
4867 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4868
4869 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4870
4871 * record-full.c (netorder16): Remove.
4872
4873 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4874
4875 * common/diagnostics.h: Define macros for GCC.
4876 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4877 * common/vec.h: Include diagnostics.h.
4878 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4879 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4880 warning.
4881
4882 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4883
4884 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4885 New macro.
4886 * ada-lex.l: Ignore deprecated register warnings.
4887
4888 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4889
4890 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4891 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4892
4893 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4896 its own line.
4897
4898 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4899
4900 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4901
4902 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4903
4904 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4905 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4906 (xtensa_register_read_masked): Likewise.
4907
4908 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4909
4910 * common/environ.c (gdb_environ::unset): Update comment.
4911
4912 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4913
4914 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4915 registers.
4916
4917 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4918
4919 * record-full.c (record_full_exec_insn): Use byte_vector.
4920
4921 2017-06-22 Yao Qi <yao.qi@linaro.org>
4922
4923 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4924 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4925
4926 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4927
4928 * remote.c (cached_reg): Move from here...
4929 * regcache.h (cached_reg): ...to here.
4930 * python/py-unwind.c (struct reg_info): Remove.
4931 (cached_frame_info): Use cached_reg_t.
4932 (pyuw_prev_register): Likewise.
4933 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4934 (pyuw_dealloc_cache): Free all registers.
4935
4936 2017-06-22 Pedro Alves <palves@redhat.com>
4937 Simon Marchi <simon.marchi@ericsson.com>
4938
4939 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4940 warning.
4941 * common/diagnostics.h: New file.
4942
4943 2017-06-22 Pedro Alves <palves@redhat.com>
4944
4945 * common/agent.h: Add include guards.
4946
4947 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4948
4949 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4950 talk about addressable units instead of bytes.
4951
4952 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4953
4954 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4955 of '::const_iterator'.
4956
4957 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4958
4959 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4960 'unittests/environ-selftests.c'.
4961 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4962 * charset.c (find_charset_names): Declare object 'iconv_env'.
4963 Update code to use 'iconv_env' object. Remove call to
4964 'free_environ'.
4965 * common/environ.c: Include <utility>.
4966 (make_environ): Delete function.
4967 (free_environ): Delete function.
4968 (gdb_environ::clear): New function.
4969 (gdb_environ::operator=): New function.
4970 (gdb_environ::get): Likewise.
4971 (environ_vector): Delete function.
4972 (set_in_environ): Delete function.
4973 (gdb_environ::set): New function.
4974 (unset_in_environ): Delete function.
4975 (gdb_environ::unset): New function.
4976 (gdb_environ::envp): Likewise.
4977 * common/environ.h: Include <vector>.
4978 (struct gdb_environ): Delete; transform into...
4979 (class gdb_environ): ... this class.
4980 (free_environ): Delete prototype.
4981 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4982 environ_vector): Likewise.
4983 * infcmd.c (run_command_1): Update code to call
4984 'envp' from 'gdb_environ' class.
4985 (environment_info): Update code to call methods from 'gdb_environ'
4986 class.
4987 (unset_environment_command): Likewise.
4988 (path_info): Likewise.
4989 (path_command): Likewise.
4990 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4991 (inferior::inferior): Initialize 'environment' using the host's
4992 information.
4993 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4994 Include "environ.h".
4995 (class inferior) <environment>: Change type from 'struct
4996 gdb_environ' to 'gdb_environ'.
4997 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4998 methods from 'gdb_environ' class.
4999 * solib.c (solib_find_1): Likewise
5000 * unittests/environ-selftests.c: New file.
5001
5002 2017-06-20 Yao Qi <yao.qi@linaro.org>
5003
5004 * features/i386/i386-linux.xml: Exchange the order of including
5005 32bit-linux.xml and 32bit-sse.xml.
5006 * features/i386/i386-linux.c: Regenerated.
5007
5008 2017-06-20 Yao Qi <yao.qi@linaro.org>
5009
5010 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5011 Delete copy ctor and assignment operator.
5012 (tdesc_type): Likewise.
5013 (tdesc_feature): Likewise.
5014 (tdesc_free_reg): Remove.
5015 (tdesc_create_reg): Use new.
5016 (tdesc_free_type): Remove.
5017 (tdesc_create_vector): Use new.
5018 (tdesc_create_union): Likewise.
5019 (tdesc_create_flags): Likewise.
5020 (tdesc_create_enum): Likewise.
5021 (tdesc_free_feature): Delete.
5022 (free_target_description): Use delete.
5023
5024 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5025
5026 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5027 registers.
5028
5029 2017-06-19 Pedro Alves <palves@redhat.com>
5030
5031 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5032 after gdb::unlinker.
5033
5034 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5035
5036 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5037 gdb_environ to access an environment variable.
5038
5039 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5040
5041 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5042 gdb_byte*.
5043
5044 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5045
5046 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5047
5048 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5049
5050 * configure: Re-generate.
5051 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5052
5053 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5054
5055 * configure: Re-generate.
5056 * warning.m4: Pass -Werror to compiler when checking for
5057 supported warning flags.
5058
5059 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5060
5061 * Makefile.in (COMPILE.pre): Add "-x c++".
5062
5063 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5064 Pedro Alves <palves@redhat.com>
5065 Yao Qi <yao.qi@linaro.org>
5066
5067 * defs.h (RequireLongest): New.
5068 (extract_integer): Declare function template.
5069 (extract_signed_integer): Remove the declaration, but define it
5070 static inline.
5071 (extract_unsigned_integer): Likewise.
5072 (store_integer): Declare function template.
5073 (store_signed_integer): Remove the declaration, but define it
5074 static inline.
5075 (store_unsigned_integer): Likewise.
5076 * findvar.c (extract_integer): New function template.
5077 (extract_signed_integer): Remove.
5078 (extract_unsigned_integer): Remove.
5079 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5080 instantiations.
5081 (store_integer): New function template.
5082 (store_signed_integer): Remove.
5083 (store_unsigned_integer): Remove.
5084 (store_integer): Explicit instantiations.
5085 * regcache.c (regcache_raw_read_signed): Update.
5086 (regcache::raw_read): New function.
5087 (regcache::raw_read_signed): Remove.
5088 (regcache::raw_read_unsigned): Remove.
5089 (regcache_raw_read_unsigned): Update.
5090 (regcache_raw_write_unsigned): Update.
5091 (regcache::raw_write_signed): Remove.
5092 (regcache::raw_write): New function.
5093 (regcache_cooked_read_signed): Update.
5094 (regcache::raw_write_unsigned): Remove.
5095 (regcache::cooked_read_signed): Remove.
5096 (regcache_cooked_read_unsigned): Update.
5097 (regcache::cooked_read_unsigned): Remove.
5098 (regcache_cooked_write_signed): Update.
5099 (regcache_cooked_write_unsigned): Update.
5100 * regcache.h (regcache) <raw_read_signed>: Remove.
5101 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5102 <raw_read, raw_write>: New.
5103 <cooked_read_signed, cooked_write_signed>: Remove.
5104 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5105 <cooked_read, cooked_write>: New.
5106 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5107 (sh64_pseudo_register_write): Update.
5108
5109 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5110
5111 * arc-tdep.c (arc_disassembler_options): New variable.
5112 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5113 of default_print_insn.
5114 (arc_delayed_print_insn): Set info->section when needed,
5115 use default_print_insn to retrieve a disassembler.
5116
5117 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5118
5119 PR gdb/21574
5120 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5121 to mention $SHELL and startup-with-shell.
5122
5123 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5124
5125 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5126
5127 2017-06-14 Yao Qi <yao.qi@linaro.org>
5128
5129 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5130 default_print_insn instead of print_insn_aarch64.
5131 * arm-tdep.c (gdb_print_insn_arm): Call
5132 default_print_insn instead of print_insn_big_arm
5133 and print_insn_little_arm.
5134 * i386-tdep.c (i386_print_insn): Call default_print_insn
5135 instead of print_insn_i386.
5136 * ia64-tdep.c (ia64_print_insn): Call
5137 default_print_insn instead of print_insn_ia64.
5138 * mips-tdep.c (gdb_print_insn_mips): Call
5139 default_print_insn instead of print_insn_big_mips
5140 and print_insn_little_mips.
5141 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5142 instead of print_insn_spu.
5143
5144 2017-06-14 Pedro Alves <palves@redhat.com>
5145
5146 * ada-lang.c: Include "common/byte-vector.h".
5147 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5148 * charset.c (wchar_iterator::iterate): Resize the vector instead
5149 of reserving it.
5150 * common/byte-vector.h: Include "common/def-vector.h".
5151 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5152 * cli/cli-dump.c: Include "common/byte-vector.h".
5153 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5154 * common/byte-vector.h: New file.
5155 * common/def-vector.h: New file.
5156 * common/default-init-alloc.h: New file.
5157 * dwarf2loc.c: Include "common/byte-vector.h".
5158 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5159 instead of reserving it.
5160 * dwarf2read.c: Include "common/byte-vector.h".
5161 (data_buf::m_vec): Now a gdb::byte_vector.
5162 * gdb_regex.c: Include "common/def-vector.h".
5163 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5164 * mi/mi-main.c: Include "common/byte-vector.h".
5165 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5166 * printcmd.c: Include "common/byte-vector.h".
5167 (print_scalar_formatted): Use gdb::byte_vector.
5168 * valprint.c: Include "common/byte-vector.h".
5169 (maybe_negate_by_bytes, print_decimal_chars): Use
5170 gdb::byte_vector.
5171
5172 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5173
5174 * darwin-nat.c: Include "nat/fork-inferior.h".
5175
5176 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5177
5178 * configure.nat: Factor out Darwin bits that are not
5179 architecture-specific. Add fork-inferior.o.
5180
5181 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5182
5183 * configure.nat: Factor out AIX bits that are not
5184 architecture-specific. Add fork-inferior.o.
5185
5186 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5187
5188 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5189 (read_pieced_value, write_pieced_value): ...here. Reduce to
5190 wrappers that just call rw_pieced_value.
5191
5192 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5193
5194 * dwarf2loc.c (write_pieced_value): When writing the data for a
5195 memory piece, use write_memory_with_notification instead of
5196 write_memory.
5197
5198 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5199
5200 * valops.c (read_value_memory): Change embedded_offset to
5201 represent a bit offset instead of a byte offset.
5202 * value.h (read_value_memory): Adjust comment.
5203
5204 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5205
5206 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5207 dest_offset_bits and source_offset_bits.
5208 (write_pieced_value): Likewise.
5209
5210 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5211
5212 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5213 given by DW_OP_bit_piece.
5214 (write_pieced_value): Likewise.
5215
5216 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5217
5218 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5219 some other preparations to the places where sufficient information
5220 is available.
5221 (write_pieced_value): Likewise.
5222
5223 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5224
5225 * dwarf2loc.c (bits_to_bytes): New function.
5226 (read_pieced_value): Fix offset calculations for register pieces
5227 on big-endian targets.
5228 (write_pieced_value): Likewise.
5229
5230 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5231
5232 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5233 (write_pieced_value): Likewise.
5234
5235 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5236
5237 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5238 transfer the source value's least significant bits, instead of its
5239 lowest-addressed ones. Rename type_len to max_offset.
5240 (read_pieced_value): Mirror above changes to write_pieced_value as
5241 applicable.
5242
5243 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5244
5245 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5246 truncate full bytes from dest_offset_bits before using it as an
5247 offset into the buffer.
5248
5249 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5250
5251 * dwarf2loc.c (write_pieced_value): Include transfer size in
5252 byte-wise check.
5253
5254 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5255
5256 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5257 calculation of this_size.
5258
5259 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5260
5261 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5262 when targeting a bit-field.
5263 (write_pieced_value): Likewise.
5264
5265 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5266
5267 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5268 (allocate_piece_closure): Drop addr_size parameter.
5269 (dwarf2_evaluate_loc_desc_full): Adjust call to
5270 allocate_piece_closure.
5271
5272 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5273
5274 PR gdb/21226
5275 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5276 the LSB end, independent of endianness.
5277
5278 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5279
5280 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5281 size capping.
5282
5283 2017-06-13 Yao Qi <yao.qi@linaro.org>
5284
5285 * mips-linux-nat.c: Move include features/mips*-linux.c to
5286 mips-linux-tdep.c.
5287 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5288 to mips-linux-tdep.c.
5289 * mips-linux-tdep.c: Include features/mips*-linux.c
5290 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5291 functions.
5292 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5293 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5294 (tdesc_mips64_dsp_linux): Declare.
5295
5296 2017-06-12 Tom Tromey <tom@tromey.com>
5297
5298 * valprint.h (val_print_type_code_int): Remove.
5299 * valprint.c (generic_val_print_int): Always call
5300 val_print_scalar_formatted.
5301 (val_print_type_code_int): Remove.
5302 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5303 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5304 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5305 * ada-valprint.c (ada_val_print_num): Use
5306 val_print_scalar_formatted.
5307
5308 2017-06-12 Tom Tromey <tom@tromey.com>
5309
5310 * printcmd.c (print_scalar_formatted): Unify the two switches.
5311 Don't convert scalars to LONGEST.
5312
5313 2017-06-12 Tom Tromey <tom@tromey.com>
5314
5315 PR exp/16225:
5316 * valprint.h (print_decimal_chars): Update.
5317 * valprint.c (maybe_negate_by_bytes): New function.
5318 (print_decimal_chars): Add "is_signed" argument.
5319 * printcmd.c (print_scalar_formatted): Update.
5320
5321 2017-06-12 Tom Tromey <tom@tromey.com>
5322
5323 PR exp/16225:
5324 * valprint.h (print_binary_chars, print_hex_chars): Update.
5325 * valprint.c (val_print_type_code_int): Update.
5326 (print_binary_chars): Add "zero_pad" argument.
5327 (emit_octal_digit): New function.
5328 (print_octal_chars): Don't zero-pad.
5329 (print_decimal_chars): Likewise.
5330 (print_hex_chars): Add "zero_pad" argument.
5331 * sh64-tdep.c (sh64_do_fp_register): Update.
5332 * regcache.c (regcache::dump): Update.
5333 * printcmd.c (print_scalar_formatted): Update.
5334 * infcmd.c (default_print_one_register_info): Update.
5335
5336 2017-06-12 Pedro Alves <palves@redhat.com>
5337 Alan Hayward <alan.hayward@arm.com>
5338
5339 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5340 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5341 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5342 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5343 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5344
5345 2017-06-12 Pedro Alves <palves@redhat.com>
5346
5347 * dwarf2read.c (mapped_symtab::data): Now a vector of
5348 symtab_index_entry instead of vector of
5349 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5350 whether an element's name is NULL instead of checking whether the
5351 element itself is NULL.
5352 (find_slot): Change return type. Adjust.
5353 (hash_expand, , add_index_entry, uniquify_cu_indices)
5354 (write_hash_table): Adjust.
5355
5356 2017-06-12 Pedro Alves <palves@redhat.com>
5357
5358 * dwarf2read.c (recursively_count_psymbols): New function.
5359 (write_psymtabs_to_index): Call it to compute number of psyms and
5360 pass estimate size of psyms_seen to unordered_set's ctor.
5361
5362 2017-06-12 Pedro Alves <palves@redhat.com>
5363
5364 * dwarf2read.c (write_hash_table): Check if key already exists
5365 before emplacing.
5366
5367 2017-06-12 Pedro Alves <palves@redhat.com>
5368
5369 * dwarf2read.c (data_buf::append_space): Rename to...
5370 (data_buf::grow): ... this, and make private. Adjust all callers.
5371 (data_buf::append_uint): New method.
5372 (add_address_entry, write_one_signatured_type)
5373 (write_psymtabs_to_index): Use it.
5374
5375 2017-06-12 Pedro Alves <palves@redhat.com>
5376
5377 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5378 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5379 (data_buf::file_write): Call ::fwrite directly.
5380
5381 2017-06-12 Pedro Alves <palves@redhat.com>
5382
5383 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5384 std::vector::erase.
5385
5386 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5387
5388 Code cleanup: C++ify .gdb_index producer.
5389 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5390 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5391 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5392 (create_strtab, add_string): Remove.
5393 (file_write, data_buf): New.
5394 (struct symtab_index_entry): Use std::vector for cu_indices.
5395 (struct mapped_symtab): Use std::vector for data.
5396 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5397 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5398 Remove.
5399 (find_slot): Change return type. Update it to the new data structures.
5400 (hash_expand, add_index_entry): Update it to the new data structures.
5401 (offset_type_compare): Remove.
5402 (uniquify_cu_indices): Update it to the new data structures.
5403 (c_str_view, c_str_view_hasher, vector_hasher): New.
5404 (add_indices_to_cpool): Remove.
5405 (write_hash_table): Update it to the new data structures.
5406 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5407 (eq_psymtab_cu_index): Remove.
5408 (psym_index_map): New typedef.
5409 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5410 reference and std::unordered_map for cu_index_htab.
5411 (add_address_entry, add_address_entry_worker, write_address_map)
5412 (write_psymbols): Update it to the new data structures.
5413 (write_obstack): Remove.
5414 (struct signatured_type_index_data): Change types_list to a data_buf
5415 reference and psyms_seen to a std::unordered_set reference.
5416 (write_one_signatured_type, recursively_write_psymbols)
5417 (write_psymtabs_to_index): Update it to the new data structures.
5418
5419 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5420
5421 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5422 separate-debug-file commands.
5423 * symfile.h (separate_debug_file_debug): New global.
5424 * symfile.c (separate_debug_file_debug): New global.
5425 (separate_debug_file_exists, find_separate_debug_file): Add
5426 debug output.
5427 (_initialize_symfile): Add "set debug separate-debug-file"
5428 command.
5429 * build-id.c (build_id_to_debug_bfd,
5430 find_separate_debug_file_by_buildid): Add debug output.
5431
5432 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5433
5434 * gdbarch.sh (displaced_step_free_closure): Remove.
5435 * gdbarch.h, gdbarch.c: Re-generate.
5436 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5437 displaced_step_free_closure.
5438 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5439 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5440 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5441 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5442 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5443 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5444 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5445 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5446 * infrun.c (displaced_step_clear): Call xfree instead of
5447 gdbarch_displaced_step_free_closure.
5448
5449 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5450
5451 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5452 NULL".
5453
5454 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5455
5456 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5457 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5458 (mn10300_push_dummy_call): Likewise.
5459
5460 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5461
5462 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5463
5464 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5465
5466 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5467
5468 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5469
5470 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5471 able to start inferiors using a shell.
5472 (New remote packets): Announce new packet "QStartupWithShell".
5473 * remote.c: Add PACKET_QStartupWithShell.
5474 (extended_remote_create_inferior): Handle new
5475 PACKET_QStartupWithShell.
5476 (remote_protocol_features) <QStartupWithShell>: New entry for
5477 PACKET_QStartupWithShell.
5478 (_initialize_remote): Call "add_packet_config_cmd" for
5479 QStartupShell.
5480
5481 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5482 Pedro Alves <palves@redhat.com>
5483
5484 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5485 and "nat/fork-inferior.h".
5486 * common/common-inferior.h: New file, with contents from
5487 "gdb/inferior.h".
5488 * commom/common-utils.c: Include "common-utils.h".
5489 (stringify_argv): New function.
5490 * common/common-utils.h (stringify_argv): New prototype.
5491 * configure.nat: Add "fork-inferior.o" as a dependency for
5492 "*linux*", "fbsd*" and "nbsd*" hosts.
5493 * corefile.c (get_exec_file): Update comment.
5494 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5495 instead of "startup_inferior".
5496 (darwin_create_inferior): Call "add_thread_silent" after
5497 "fork_inferior".
5498 * fork-child.c: Cleanup unnecessary includes.
5499 (SHELL_FILE): Move to "common/common-fork-child.c".
5500 (environ): Likewise.
5501 (exec_wrapper): Initialize.
5502 (get_exec_wrapper): New function.
5503 (breakup_args): Move to "common/common-fork-child.c"; rename to
5504 "breakup_args_for_exec".
5505 (escape_bang_in_quoted_argument): Move to
5506 "common/common-fork-child.c".
5507 (saved_ui): New variable.
5508 (prefork_hook): New function.
5509 (postfork_hook): Likewise.
5510 (postfork_child_hook): Likewise.
5511 (gdb_startup_inferior): Likewise.
5512 (fork_inferior): Move to "common/common-fork-child.c". Update
5513 function to support gdbserver.
5514 (startup_inferior): Likewise.
5515 * gdbcore.h (get_exec_file): Remove declaration.
5516 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5517 instead of "startup_inferior". Call "add_thread_silent" after
5518 "fork_inferior".
5519 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5520 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5521 instead of "startup_inferior". Call "add_thread_silent" after
5522 "fork_inferior".
5523 * inferior.h: Include "common-inferior.h".
5524 (trace_start_error): Move to "common/common-utils.h".
5525 (trace_start_error_with_name): Likewise.
5526 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5527 (startup_inferior): Likewise.
5528 (gdb_startup_inferior): New prototype.
5529 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5530 * nat/fork-inferior.h: New file.
5531 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5532 instead of "startup_inferior". Call "add_thread_silent" after
5533 "fork_inferior".
5534 * target.h (target_terminal_init): Move prototype to
5535 "target/target.h".
5536 (target_terminal_inferior): Likewise.
5537 (target_terminal_ours): Likewise.
5538 * target/target.h (target_terminal_init): New prototype, moved
5539 from "target.h".
5540 (target_terminal_inferior): Likewise.
5541 (target_terminal_ours): Likewise.
5542 * utils.c (gdb_flush_out_err): New function.
5543
5544 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5545
5546 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5547 * common/common-gdbthread.h: New file, with parts from
5548 "gdb/gdbthread.h".
5549 * gdbthread.h: Include "common-gdbthread.h".
5550 (switch_to_thread): Moved to "common/common-gdbthread.h".
5551
5552 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5553
5554 * Makefile.in (SFILES): Add "common/job-control.c".
5555 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5556 (COMMON_OBS): Add "job-control.o".
5557 * common/job-control.c: New file, with contents from
5558 "gdb/inflow.c".
5559 * common/job-control.h: New file, with contents from "terminal.h".
5560 * fork-child.c: Include "job-control.h".
5561 * inflow.c: Include "job-control.h".
5562 (gdb_setpgid): Move to "common/common-inflow.c".
5563 (_initialize_inflow): Move setting of "job_control" to
5564 "handle_job_control".
5565 * terminal.h (job_control): Moved to "common/common-terminal.h".
5566 (gdb_setpgid): Likewise.
5567 * top.c: Include "job_control.h".
5568 * utils.c: Likewise.
5569 (job_control): Moved to "job-control.c".
5570
5571 2017-06-07 Pedro Alves <palves@redhat.com>
5572
5573 * Makefile.in (SFILES): Add gdb_regex.c.
5574 (COMMON_OBS): Add gdb_regex.o.
5575 * ada-lang.c (ada_add_standard_exceptions)
5576 (ada_add_exceptions_from_frame, name_matches_regex)
5577 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5578 parameter type to compiled_regex. Adjust.
5579 (ada_exceptions_list): Use compiled_regex.
5580 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5581 std::unique_ptr<compiled_regex>.
5582 (exception_catchpoint::~exception_catchpoint): Remove regfree
5583 call.
5584 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5585 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5586 * breakpoint.c (solib_catchpoint::compiled): Now a
5587 std::unique_ptr<compiled_regex>.
5588 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5589 (check_status_catch_solib): Adjust to use compiled_regex.
5590 (add_solib_catchpoint): Adjust to use compiled_regex.
5591 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5592 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5593 compiled_regex reference. Adjust to use it.
5594 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5595 declaration. Include "gdb_regex.h".
5596 (apropos_cmd): Change regex parameter to compiled_regex reference.
5597 * gdb_regex.c: New file.
5598 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5599 declarations.
5600 (class compiled_regex): New.
5601 * linux-tdep.c: Include "common/gdb_optional.h".
5602 (struct mapping_regexes): New, factored out from
5603 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5604 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5605 gdb::optional and remove cleanups. Adjust to compiled_regex.
5606 * probe.c: Include "common/gdb_optional.h".
5607 (collect_probes): Use compiled_regex and gdb::optional and remove
5608 cleanups.
5609 * skip.c: Include "common/gdb_optional.h".
5610 (skiplist_entry::compiled_function_regexp): Now a
5611 gdb::optional<compiled_regex>.
5612 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5613 (free_skiplist_entry): Remove regfree call.
5614 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5615 compiled_regex and gdb::optional.
5616 * symtab.c: Include "common/gdb_optional.h".
5617 (search_symbols): Use compiled_regex and gdb::optional.
5618 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5619 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5620 to gdb_regex.c.
5621
5622 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5623
5624 * regcache.c (regcache::save): Avoid buffer use.
5625 (regcache::dump): Likewise.
5626
5627 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5628
5629 * sh-tdep.c (sh_pseudo_register_read): Remove
5630 MAX_REGISTER_SIZE.
5631 (sh_pseudo_register_write): Likewise.
5632 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5633 (sh64_pseudo_register_write): Likewise
5634
5635 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5636
5637 * aarch64-tdep.c (aarch64_store_return_value): Use
5638 V_REGISTER_SIZE.
5639 (aarch64_pseudo_read_value): Likewise.
5640 (aarch64_pseudo_write): Likewise.
5641
5642 2017-06-06 Yao Qi <yao.qi@linaro.org>
5643
5644 * regformats/regdef.h (set_register_cache): Remove the
5645 declaration.
5646
5647 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5648
5649 * frame.c (frame_unwind_register_signed): Use
5650 frame_unwind_register_value.
5651
5652 2017-06-06 Pedro Alves <palves@redhat.com>
5653
5654 PR breakpoints/21553
5655 * breakpoint.c (create_breakpoints_sal_default)
5656 (init_breakpoint_sal, create_breakpoint_sal): Use
5657 gdb::unique_xmalloc_ptr for string parameters.
5658 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5659 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5660 (base_breakpoint_create_breakpoints_sal)
5661 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5662 (strace_marker_create_breakpoints_sal)
5663 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5664 string parameters.
5665 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5666 gdb::unique_xmalloc_ptr for string parameters.
5667 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5668 parameters.
5669
5670 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5671
5672 * alpha-tdep.c (alpha_register_to_value): Use
5673 get_frame_register_value.
5674 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5675
5676 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5677
5678 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5679 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5680 (ia64_value_to_register): Likewise.
5681 (ia64_extract_return_value): Likewise.
5682 (ia64_store_return_value): Likewise.
5683 (ia64_push_dummy_call): Likewise.
5684
5685 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5686
5687 GDB 8.0 released.
5688
5689 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5690
5691 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5692
5693 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5694
5695 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5696 parameter.
5697 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5698
5699 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5700
5701 * event-loop.c (poll_timers): Unallocate timer using delete
5702 instead of xfree.
5703
5704 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5705
5706 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5707 (struct breakpoint) <~breakpoint>: New.
5708 (struct watchpoint): Inherit from breakpoint.
5709 <~watchpoint>: New.
5710 <base>: Remove.
5711 (struct tracepoint): Inherit from breakpoint.
5712 <base>: Remove.
5713 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5714 (struct longjmp_breakpoint): Inherit from breakpoint.
5715 <~longjmp_breakpoint>: New.
5716 <base>: Remove.
5717 (new_breakpoint_from_type): Remove casts.
5718 (watchpoint_in_thread_scope): Remove reference to base field.
5719 (watchpoint_del_at_next_stop): Likewise.
5720 (update_watchpoint): Likewise.
5721 (watchpoint_check): Likewise.
5722 (bpstat_check_watchpoint): Likewise.
5723 (set_longjmp_breakpoint): Likewise.
5724 (struct fork_catchpoint): Inherit from breakpoint.
5725 <base>: Remove.
5726 (struct solib_catchpoint): Inherit from breakpoint.
5727 <~solib_catchpoint>: New.
5728 <base>: Remove.
5729 (dtor_catch_solib): Change to ...
5730 (solib_catchpoint::~solib_catchpoint): ... this.
5731 (breakpoint_hit_catch_solib): Remove reference to base field.
5732 (add_solib_catchpoint): Likewise.
5733 (create_fork_vfork_event_catchpoint): Likewise.
5734 (struct exec_catchpoint): Inherit from breakpoint.
5735 <~exec_catchpoint>: New.
5736 <base>: Remove.
5737 (dtor_catch_exec): Change to ...
5738 (exec_catchpoint::~exec_catchpoint): ... this.
5739 (dtor_watchpoint): Change to ...
5740 (watchpoint::~watchpoint): ... this.
5741 (watch_command_1): Remove reference to base field.
5742 (catch_exec_command_1): Likewise.
5743 (base_breakpoint_dtor): Change to ...
5744 (breakpoint::~breakpoint): ... this.
5745 (base_breakpoint_ops): Remove dtor field value.
5746 (longjmp_bkpt_dtor): Change to ...
5747 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5748 (strace_marker_create_breakpoints_sal): Remove reference to base
5749 field.
5750 (delete_breakpoint): Don't manually call breakpoint destructor.
5751 (create_tracepoint_from_upload): Remove reference to base field.
5752 (trace_pass_set_count): Likewise.
5753 (initialize_breakpoint_ops): Don't initialize
5754 momentary_breakpoint_ops, don't set dtors.
5755 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5756 <~ada_catchpoint>: New.
5757 <base>: Remove.
5758 (create_excep_cond_exprs): Remove reference to base field.
5759 (dtor_exception): Change to ...
5760 (ada_catchpoint::~ada_catchpoint): ... this.
5761 (dtor_catch_exception): Remove.
5762 (dtor_catch_exception_unhandled): Remove.
5763 (dtor_catch_assert): Remove.
5764 (create_ada_exception_catchpoint): Remove reference to base
5765 field.
5766 (initialize_ada_catchpoint_ops): Don't set dtors.
5767 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5768 breakpoint.
5769 <~signal_catchpoint>: New.
5770 <base>: Remove.
5771 (signal_catchpoint_dtor): Change to ...
5772 (signal_catchpoint::~signal_catchpoint): ... this.
5773 (create_signal_catchpoint): Remove reference to base field.
5774 (initialize_signal_catchpoint_ops): Don't set dtor.
5775 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5776 from breakpoint.
5777 <~syscall_catchpoint>: New.
5778 <base>: Remove.
5779 (dtor_catch_syscall): Change to ...
5780 (syscall_catchpoint::~syscall_catchpoint): ... this.
5781 (create_syscall_event_catchpoint): Remove reference to base
5782 field.
5783 (initialize_syscall_catchpoint_ops): Don't set dtor.
5784 * break-catch-throw.c (struct exception_catchpoint): Inherit
5785 from breakpoint.
5786 <~exception_catchpoint>: New.
5787 <base>: Remove.
5788 (dtor_exception_catchpoint): Change to ...
5789 (exception_catchpoint::~exception_catchpoint): ... this.
5790 (handle_gnu_v3_exceptions): Remove reference to base field.
5791 (initialize_throw_catchpoint_ops): Don't set dtor.
5792 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5793 field.
5794 * remote.c (remote_get_tracepoint_status): Likewise.
5795 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5796 * tracefile.c (tracefile_fetch_registers): Likewise.
5797 * tracepoint.c (actions_command): Likewise.
5798 (validate_actionline): Likewise.
5799 (tfind_1): Likewise.
5800 (get_traceframe_location): Likewise.
5801 (find_matching_tracepoint_location): Likewise.
5802 (parse_tracepoint_status): Likewise.
5803 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5804
5805 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5806
5807 * breakpoint.c (struct longjmp_breakpoint): New struct.
5808 (is_tracepoint_type): Change return type to bool.
5809 (is_longjmp_type): New function.
5810 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5811 (set_raw_breakpoint_without_location): Use
5812 new_breakpoint_from_type.
5813 (set_raw_breakpoint): Likewise.
5814
5815 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5816
5817 * breakpoint.c (new_breakpoint_from_type): New function.
5818 (create_breakpoint_sal): Use new_breakpoint_from_type and
5819 unique_ptr.
5820 (create_breakpoint): Likewise.
5821
5822 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5823
5824 * memattr.c (mem_info_command): Rename to ...
5825 (info_mem_command): ... this.
5826 (mem_enable_command): Rename to ...
5827 (enable_mem_command): ... this.
5828 (mem_disable_command): Rename to ...
5829 (disable_mem_command): ... this.
5830 (mem_delete_command): Rename to ...
5831 (delete_mem_command): ... this.
5832 (_initialize_mem): Adjust function names.
5833
5834 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5835
5836 * btrace.c (handle_pt_insn_events): New.
5837 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5838 STATUS. Split into this and ...
5839 (handle_pt_insn_event_flags): ... this.
5840
5841 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5842
5843 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5844 and struct pt_insn.resynced.
5845 * configure: Regenerated.
5846 * config.in: Regenerated.
5847
5848 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5849
5850 * btrace.c (ftrace_find_call_by_number): New function.
5851 (ftrace_new_function): Store objects, not pointers.
5852 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5853 ftrace_new_gap, ftrace_update_function,
5854 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5855 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5856 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5857 btrace_ends_with_single_insn, btrace_call_get): Account for
5858 btrace_thread_info::functions now storing objects.
5859 * btrace.h (struct btrace_thread_info): Add constructor.
5860 (struct btrace_thread_info) <functions>: Make std::vector.
5861 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5862 Initialize with default values.
5863 * record-btrace.c (record_btrace_frame_sniffer): Account for
5864 btrace_thread_info::functions now storing objects.
5865
5866 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5867
5868 * btrace.c: Remove typedef bfun_s.
5869 (ftrace_new_gap): Directly add gaps to the list of gaps.
5870 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5871 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5872 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5873 instead of gdb VEC.
5874
5875 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5876
5877 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5878 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5879 with btrace_thread_info::next_segment and
5880 btrace_thread_info::prev_segment.
5881 * btrace.h: Remove struct btrace_func_link.
5882 (struct btrace_function): Replace pair of function segment pointers
5883 with pair of indices.
5884 * python/py-record-btrace.c (btpy_call_prev_sibling,
5885 btpy_call_next_sibling): Replace references to
5886 btrace_thread_info::segment with btrace_thread_info::next_segment and
5887 btrace_thread_info::prev_segment.
5888 * record-btrace.c (record_btrace_frame_this_id): Use
5889 btrace_find_call_by_number.
5890
5891 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5892
5893 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5894 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5895 btrace_insn_next, btrace_insn_prev): Remove references to
5896 btrace_thread_info::flow.
5897 * btrace.h (struct btrace_function): Remove FLOW.
5898
5899 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5900
5901 * btrace.c (ftrace_find_call_by_number): New function.
5902 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5903 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5904 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5905 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5906 index.
5907 * btrace.h (struct btrace_function): Turn UP into an index.
5908 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5909 as an index.
5910 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5911 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5912 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5913
5914 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5915
5916 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5917 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5918 ftrace_update_function, ftrace_compute_global_level_offset,
5919 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5920 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5921 btrace_insn_end, btrace_is_empty): Remove references to
5922 btrace_thread_info::begin and btrace_thread_info::end.
5923 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5924 (struct btrace_thread_info) <functions>: Adjust comment.
5925 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5926 btrace_thread_info::begin.
5927
5928 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5929
5930 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5931 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5932 ftrace_update_function): Remove arguments that implicitly were always
5933 BTINFO->END.
5934 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5935 Don't pass BTINFO->END.
5936
5937 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5938
5939 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5940 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5941 btrace_find_insn_by_number): Replace function segment pointer with
5942 index.
5943 (btrace_insn_cmp): Simplify.
5944 * btrace.h: (struct btrace_insn_iterator) Rename index to
5945 insn_index. Replace function segment pointer with index into function
5946 segment vector.
5947 * record-btrace.c (record_btrace_call_history): Replace function
5948 segment pointer use with index.
5949 (record_btrace_frame_sniffer): Retrieve function call segment through
5950 vector.
5951 (record_btrace_set_replay): Remove defunc't safety check.
5952
5953 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5954
5955 * btrace.c (btrace_ends_with_single_insn): New function.
5956 (btrace_call_get, btrace_call_number, btrace_call_begin,
5957 btrace_call_end, btrace_call_next, btrace_call_prev,
5958 btrace_find_call_by_number): Use index into call segment vector
5959 instead of pointer.
5960 (btrace_call_cmp): Simplify.
5961 * btrace.h (struct btrace_call_iterator): Replace function call segment
5962 pointer with index into vector.
5963 * record-btrace.c (record_btrace_call_history): Use index instead of
5964 pointer.
5965
5966 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5967
5968 * btrace.c (btrace_insn_begin, btrace_insn_end,
5969 btrace_find_insn_by_number): Add btinfo to iterator.
5970 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5971
5972 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5973
5974 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5975 and save pointers directly.
5976 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5977 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5978 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5979 changed signature of functions.
5980 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5981 (btrace_fetch): Remove code that adds btrace_function pointers to
5982 vector of btrace_functions.
5983 (btrace_clear): Simplify freeing vector of btrace_functions.
5984
5985 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5986
5987 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5988 Replace VEC_* with std::vector functions.
5989 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5990 (struct btrace_thread_info)<functions>: Change type to std::vector.
5991
5992 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5993
5994 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5995 "Removed targets and native configurations" up. Merge duplicate
5996 "New commands" sub-sections. Add "New options" sub-sections.
5997
5998 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5999
6000 * defs.h (copy_integer_to_size): New declaration.
6001 * findvar.c (copy_integer_to_size): New function.
6002 (do_cint_test): New selftest function.
6003 (copy_integer_to_size_test): Likewise.
6004 (_initialize_findvar): Likewise.
6005 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6006 (mips_fbsd_collect_reg): Use raw_collect_integer.
6007 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6008 (mips64_fill_gregset): Use raw_collect_integer
6009 (mips64_fill_fpregset): Use raw_supply_integer.
6010 * regcache.c (regcache::raw_supply_integer): New function.
6011 (regcache::raw_collect_integer): Likewise.
6012 * regcache.h: (regcache::raw_supply_integer): New declaration.
6013 (regcache::raw_collect_integer): Likewise.
6014
6015 2017-05-24 Yao Qi <yao.qi@linaro.org>
6016
6017 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6018 (COMMON_OBS): Add gdbarch-selftests.o.
6019 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6020 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6021 * gdbarch-selftests.c: New file.
6022 * regcache.h (regcache) <~regcache>: Mark it virtual if
6023 GDB_SELF_TEST.
6024 <raw_write>: Likewise.
6025
6026 2017-05-24 Yao Qi <yao.qi@linaro.org>
6027
6028 * regcache.c (current_regcache): Change it to
6029 regcache::current_regcache.
6030 (regcache_observer_target_changed): Update.
6031 (regcache_thread_ptid_changed): Make it a regcache static
6032 method.
6033 (regcache_thread_ptid_changed): Update.
6034 (class regcache_access): New.
6035 (current_regcache_test): Update.
6036 (_initialize_regcache): Update.
6037 * regcache.h: Include forward_list.
6038 (regcache): Declare regcache_thread_ptid_changed and declare
6039 registers_changed_ptid as friend.
6040
6041 2017-05-24 Yao Qi <yao.qi@linaro.org>
6042
6043 * i387-tdep.c (i387_register_to_value): Use register_size
6044 instead of TYPE_LENGTH.
6045 * m68k-tdep.c (m68k_register_to_value): Likewise.
6046
6047 2017-05-24 Yao Qi <yao.qi@linaro.org>
6048
6049 * i387-tdep.c (i387_convert_register_p): Return false if type
6050 code isn't TYPE_CODE_FLT.
6051
6052 2017-05-24 Yao Qi <yao.qi@linaro.org>
6053
6054 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6055 length is 4.
6056 (alpha_register_to_value): Remove type length check.
6057 (alpha_value_to_register): Likewise.
6058
6059 2017-05-24 Yao Qi <yao.qi@linaro.org>
6060
6061 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6062 TYPE_CODE_FLT.
6063
6064 2017-05-24 Yao Qi <yao.qi@linaro.org>
6065
6066 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6067 TYPE_CODE_FLT or not.
6068
6069 2017-05-24 Yao Qi <yao.qi@linaro.org>
6070
6071 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6072 * avr-tdep.c (avr_gdbarch_init): Likewise.
6073 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6074 * cris-tdep.c (cris_gdbarch_init): Likewise.
6075 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6076 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6077 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6078 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6079 * mep-tdep.c (mep_gdbarch_init): Likewise.
6080 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6081 * mips-tdep.c (mips_gdbarch_init): Likewise.
6082 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6083 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6084 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6085 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6086 * v850-tdep.c (v850_gdbarch_init): Likewise.
6087
6088 2017-05-24 Yao Qi <yao.qi@linaro.org>
6089
6090 * selftest-arch.c (tests_with_arch): Call registers_changed
6091 and reinit_frame_cache.
6092 * selftest.c (run_self_tests): Likewise.
6093
6094 2017-05-24 Yao Qi <yao.qi@linaro.org>
6095
6096 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6097 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6098
6099 2017-05-24 Yao Qi <yao.qi@linaro.org>
6100
6101 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6102 set_gdbarch_print_insn.
6103
6104 2017-05-24 Yao Qi <yao.qi@linaro.org>
6105
6106 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6107 set_gdbarch_print_insn.
6108
6109 2017-05-24 Yao Qi <yao.qi@linaro.org>
6110
6111 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6112 set_gdbarch_print_insn.
6113 * arc-tdep.c (arc_gdbarch_init): Likewise.
6114 * arch-utils.c: include dis-asm.h.
6115 (default_print_insn): New function.
6116 * arch-utils.h (default_print_insn): Declare.
6117 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6118 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6119 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6120 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6121 * frv-tdep.c (frv_gdbarch_init): Likewise.
6122 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6123 * gdbarch.sh (print_insn): Use default_print_insn.
6124 * gdbarch.c: Regenerated.
6125 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6126 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6127 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6128 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6129 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6130 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6131 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6132 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6133 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6134 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6135 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6136 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6137 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6138 * mt-tdep.c (mt_gdbarch_init): Likewise.
6139 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6140 * nios2-tdep.c (nios2_print_insn): Remove.
6141 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6142 * rx-tdep.c (rx_gdbarch_init): Likewise.
6143 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6144 * score-tdep.c (score_print_insn): Remove.
6145 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6146 * sh-tdep.c (sh_gdbarch_init): Likewise.
6147 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6148 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6149 * tic6x-tdep.c (tic6x_print_insn): Remove.
6150 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6151 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6152 * v850-tdep.c (v850_gdbarch_init): Likewise.
6153 * vax-tdep.c (vax_gdbarch_init): Likewise.
6154 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6155 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6156
6157 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6158
6159 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6160 (MIPS_FP0_REGNUM): Remove.
6161 (MIPS_FSR_REGNUM): Remove.
6162 (mips_fbsd_supply_fpregs): Use mips_regnum.
6163 (mips_fbsd_supply_gregs): Likewise.
6164 (mips_fbsd_collect_fpregs): Likewise.
6165 (mips_fbsd_collect_gregs): Likewise.
6166
6167 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6168
6169 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6170 (getpfpregs_supplies): New function.
6171 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6172 getfpregs_supplies.
6173 (mips_fbsd_store_inferior_registers): Likewise.
6174
6175 2017-05-22 Pedro Alves <palves@redhat.com>
6176
6177 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6178 maintainer.
6179
6180 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6181
6182 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6183 (store_register): Likewise.
6184 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6185 (get_decimal_float_return_value): Likewise.
6186 (do_ppc_sysv_return_value): Likewise.
6187 (ppc64_sysv_abi_push_integer): Likewise.
6188 (ppc64_sysv_abi_push_freg): Likewise.
6189 (ppc64_sysv_abi_return_value_base): Likewise.
6190 (ppc64_sysv_abi_return_value): Likewise.
6191 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6192 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6193 * rs6000-nat.c: Likewise.
6194 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6195 (rs6000_value_to_register): Likewise.
6196 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6197
6198 2017-05-21 Tom Tromey <tom@tromey.com>
6199
6200 PR rust/21466:
6201 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6202 arrays as "[T]", not "[T; ]".
6203
6204 2017-05-19 Tom Tromey <tom@tromey.com>
6205
6206 PR rust/21484:
6207 * rust-lang.c (exp_descriptor_rust): New function.
6208 (rust_language_defn): Use it.
6209 * p-lang.c (pascal_language_defn): Update.
6210 * opencl-lang.c (opencl_language_defn): Update.
6211 * objc-lang.c (objc_language_defn): Update.
6212 * m2-lang.c (m2_language_defn): Update.
6213 * language.h (struct language_defn)
6214 <la_watch_location_expression>: New member.
6215 * language.c (unknown_language_defn, auto_language_defn)
6216 (local_language_defn): Update.
6217 * go-lang.c (go_language_defn): Update.
6218 * f-lang.c (f_language_defn): Update.
6219 * d-lang.c (d_language_defn): Update.
6220 * c-lang.h (c_watch_location_expression): Declare.
6221 * c-lang.c (c_watch_location_expression): New function.
6222 (c_language_defn, cplus_language_defn, asm_language_defn)
6223 (minimal_language_defn): Use it.
6224 * breakpoint.c (watch_command_1): Call
6225 la_watch_location_expression.
6226 * ada-lang.c (ada_language_defn): Update.
6227
6228 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6229
6230 PR tui/21482
6231 * gdb_curses.h (NOMACROS): Define.
6232 (NCURSES_NOMACROS): Define.
6233
6234 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6235
6236 PR tui/21482
6237 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6238 arg to char *.
6239 * tui/tui-wingeneral.c (box_win): Likewise.
6240 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6241 (tui_show_source_line): Likewise.
6242 (tui_show_exec_info_content): Likewise.
6243
6244 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6245
6246 * sparc-tdep.c (sparc_structure_return_p)
6247 (sparc_arg_on_registers_p): New functions.
6248 (sparc32_store_arguments): Use them.
6249 * sparc64-tdep.c (sparc64_16_byte_align_p)
6250 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6251 Handle TYPE_CODE_ARRAY.
6252
6253 2017-05-17 Yao Qi <yao.qi@linaro.org>
6254
6255 * cli/cli-decode.c (add_alias_cmd): New function.
6256 * command.h (add_alias_cmd): Declare.
6257 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6258 instead call add_alias_cmd.
6259
6260 2017-05-17 Pedro Alves <palves@redhat.com>
6261
6262 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6263 (nat_makefile_frag): ... this. All references updated.
6264 * configure.ac: Likewise.
6265 * configure.nat: Likewise. Enhance comments.
6266 * configure: Regenerate.
6267
6268 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6269
6270 * procfs.c (procfs_create_inferior): Change prototype to match
6271 definition.
6272
6273 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6274
6275 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6276 C++ compiler warning.
6277
6278 2017-05-12 Tom Tromey <tom@tromey.com>
6279
6280 PR rust/21483:
6281 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6282 recurse, just call value_struct_elt directly.
6283
6284 2017-05-12 Tom Tromey <tom@tromey.com>
6285
6286 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6287 OP_RUST_ARRAY>: Fix.
6288
6289 2017-05-12 Tom Tromey <tom@tromey.com>
6290
6291 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6292
6293 2017-05-09 Yao Qi <yao.qi@linaro.org>
6294
6295 * regcache.c: Include <forward_list>.
6296 (struct regcache_list): Remove.
6297 (current_regcache): Update.
6298 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6299 (regcache_thread_ptid_changed): Likewise.
6300 (registers_changed_ptid): Likewise.
6301 (current_regcache_size): Likewise.
6302
6303 2017-05-09 Yao Qi <yao.qi@linaro.org>
6304
6305 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6306 (current_regcache_size): New function.
6307 (current_regcache_test): New function.
6308 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6309
6310 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6311
6312 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6313 (print_gp_register_row): Use get_frame_register_value.
6314
6315 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6316
6317 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6318 (mips_supply_fpregset): Likewise.
6319 (mips64_supply_gregset): Likewise.
6320
6321 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6322
6323 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6324 regcache->raw_supply_zeroed.
6325
6326 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6327
6328 * configure.nat: Rearrange 'case' statements to match
6329 host before cpu.
6330
6331 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6332
6333 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6334 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6335 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6336 "@nat_extra_makefile_frag@".
6337 (Makefile): Remove dependency on "@frags@".
6338 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6339 (data-directory/Makefile): Likewise.
6340 * config/aarch64/linux.mh: Deleted; moved contents to
6341 "gdb/configure.nat".
6342 * config/alpha/alpha-linux.mh: Likewise.
6343 * config/alpha/nbsd.mh: Likewise.
6344 * config/arm/linux.mh: Likewise.
6345 * config/arm/nbsdelf.mh: Likewise.
6346 * config/i386/cygwin.mh: Likewise.
6347 * config/i386/cygwin64.mh: Likewise.
6348 * config/i386/darwin.mh: Likewise.
6349 * config/i386/fbsd.mh: Likewise.
6350 * config/i386/fbsd64.mh: Likewise.
6351 * config/i386/go32.mh: Likewise.
6352 * config/i386/i386gnu.mh: Likewise.
6353 * config/i386/i386sol2.mh: Likewise.
6354 * config/i386/linux.mh: Likewise.
6355 * config/i386/linux64.mh: Likewise.
6356 * config/i386/mingw.mh: Likewise.
6357 * config/i386/mingw64.mh: Likewise.
6358 * config/i386/nbsd64.mh: Likewise.
6359 * config/i386/nbsdelf.mh: Likewise.
6360 * config/i386/nto.mh: Likewise.
6361 * config/i386/obsd.mh: Likewise.
6362 * config/i386/obsd64.mh: Likewise.
6363 * config/i386/sol2-64.mh: Likewise.
6364 * config/ia64/linux.mh: Likewise.
6365 * config/m32r/linux.mh: Likewise.
6366 * config/m68k/linux.mh: Likewise.
6367 * config/m68k/nbsdelf.mh: Likewise.
6368 * config/m68k/obsd.mh: Likewise.
6369 * config/m88k/obsd.mh: Likewise.
6370 * config/mips/fbsd.mh: Likewise.
6371 * config/mips/linux.mh: Likewise.
6372 * config/mips/nbsd.mh: Likewise.
6373 * config/mips/obsd64.mh: Likewise.
6374 * config/pa/linux.mh: Likewise.
6375 * config/pa/nbsd.mh: Likewise.
6376 * config/pa/obsd.mh: Likewise.
6377 * config/powerpc/aix.mh: Likewise.
6378 * config/powerpc/fbsd.mh: Likewise.
6379 * config/powerpc/linux.mh: Likewise.
6380 * config/powerpc/nbsd.mh: Likewise.
6381 * config/powerpc/obsd.mh: Likewise.
6382 * config/powerpc/ppc64-linux.mh: Likewise.
6383 * config/powerpc/spu-linux.mh: Likewise.
6384 * config/s390/linux.mh: Likewise.
6385 * config/sh/nbsd.mh: Likewise.
6386 * config/sparc/fbsd.mh: Likewise.
6387 * config/sparc/linux.mh: Likewise.
6388 * config/sparc/linux64.mh: Likewise.
6389 * config/sparc/nbsd64.mh: Likewise.
6390 * config/sparc/nbsdelf.mh: Likewise.
6391 * config/sparc/obsd64.mh: Likewise.
6392 * config/sparc/sol2.mh: Likewise.
6393 * config/tilegx/linux.mh: Likewise.
6394 * config/vax/nbsdelf.mh: Likewise.
6395 * config/vax/obsd.mh: Likewise.
6396 * config/xtensa/linux.mh: Likewise.
6397 * config/i386/i386gnu.mn: New file, with excerpts from
6398 "config/i386/i386gnu.mh".
6399 * configure: Regenerate.
6400 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6401 *.mh files under "gdb/config".
6402 * configure.nat: New file, with contents from the
6403 "gdb/config/*/*.mh" files.
6404
6405 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6406
6407 * btrace.c (btrace_clear): Free insn vector.
6408
6409 2017-05-05 Pedro Alves <palves@redhat.com>
6410
6411 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6412 * configure: Regenerate.
6413
6414 2017-05-04 Pedro Alves <palves@redhat.com>
6415
6416 * Makefile.in (SFILES): Add progspace-and-thread.c.
6417 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6418 (COMMON_OBS): Add progspace-and-thread.o.
6419 * breakpoint.c: Include "progspace-and-thread.h".
6420 (update_inserted_breakpoint_locations)
6421 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6422 Use scoped_restore_current_pspace_and_thread.
6423 (create_std_terminate_master_breakpoint): Use
6424 scoped_restore_current_program_space.
6425 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6426 (print_breakpoint_location): Use
6427 scoped_restore_current_program_space.
6428 (bp_loc_is_permanent): Use
6429 scoped_restore_current_pspace_and_thread.
6430 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6431 (download_tracepoint_locations): Use
6432 scoped_restore_current_pspace_and_thread.
6433 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6434 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6435 (enum step_over_calls_kind): Moved from inferior.h.
6436 (class scoped_restore_current_thread): New class.
6437 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6438 declaration.
6439 (scoped_restore_current_thread): New class.
6440 * infcmd.c: Include "common/gdb_optional.h".
6441 (continue_1, proceed_after_attach): Use
6442 scoped_restore_current_thread.
6443 (notice_new_inferior): Use scoped_restore_current_thread.
6444 * inferior.c: Include "progspace-and-thread.h".
6445 (restore_inferior, save_current_inferior): Delete.
6446 (add_inferior_command, clone_inferior_command): Use
6447 scoped_restore_current_pspace_and_thread.
6448 * inferior.h (scoped_restore_current_inferior): New class.
6449 * infrun.c: Include "progspace-and-thread.h" and
6450 "common/gdb_optional.h".
6451 (follow_fork_inferior): Use
6452 scoped_restore_current_pspace_and_thread.
6453 (scoped_restore_exited_inferior): New class.
6454 (handle_vfork_child_exec_or_exit): Use
6455 scoped_restore_exited_inferior,
6456 scoped_restore_current_pspace_and_thread,
6457 scoped_restore_current_thread and scoped_restore.
6458 (fetch_inferior_event): Use scoped_restore_current_thread.
6459 * linespec.c (decode_line_full, decode_line_1): Use
6460 scoped_restore_current_program_space.
6461 * mi/mi-main.c: Include "progspace-and-thread.h".
6462 (exec_continue): Use scoped_restore_current_thread.
6463 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6464 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6465 * proc-service.c (ps_pglobal_lookup): Use
6466 scoped_restore_current_program_space.
6467 * progspace-and-thread.c: New file.
6468 * progspace-and-thread.h: New file.
6469 * progspace.c (release_program_space, clone_program_space): Use
6470 scoped_restore_current_program_space.
6471 (restore_program_space, save_current_program_space)
6472 (save_current_space_and_thread): Delete.
6473 (switch_to_program_space_and_thread): Moved to
6474 progspace-and-thread.c.
6475 * progspace.h (save_current_program_space)
6476 (save_current_space_and_thread): Delete declarations.
6477 (scoped_restore_current_program_space): New class.
6478 * remote.c (remote_btrace_maybe_reopen): Use
6479 scoped_restore_current_thread.
6480 * symtab.c: Include "progspace-and-thread.h".
6481 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6482 * thread.c (print_thread_info_1): Use
6483 scoped_restore_current_thread.
6484 (struct current_thread_cleanup): Delete.
6485 (do_restore_current_thread_cleanup)
6486 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6487 (scoped_restore_current_thread::~scoped_restore_current_thread):
6488 ... this new dtor.
6489 (make_cleanup_restore_current_thread): Rename/convert to ...
6490 (scoped_restore_current_thread::scoped_restore_current_thread):
6491 ... this new ctor.
6492 (thread_apply_all_command): Use scoped_restore_current_thread.
6493 (thread_apply_command): Use scoped_restore_current_thread.
6494 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6495 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6496
6497 2017-05-04 Pedro Alves <palves@redhat.com>
6498
6499 * thread.c (make_cleanup_restore_current_thread): Move
6500 find_thread_ptid call before the is_stopped call. Assert that the
6501 thread is found. Replace is_stopped call by checking the thread's
6502 state directly. Remove unnecessary NULL-thread check.
6503
6504 2017-05-04 Pedro Alves <palves@redhat.com>
6505
6506 * corelow.c (thread_section_name): New class.
6507 (get_core_register_section, get_core_siginfo): Use it.
6508
6509 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6510
6511 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6512 (get_core_register_section): Remove xfree of NULL pointer.
6513
6514 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6515
6516 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6517 * regcache.c (regcache::raw_supply_zeroed): New function.
6518 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6519
6520 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6521
6522 * gdbarch.sh: Remove commented out definition of
6523 TARGET_CHAR_BIT.
6524 * gdbarch.h: Re-generate.
6525
6526 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6527
6528 * configure: Regenerate.
6529
6530 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6531
6532 * solib-target.c (solib_target_relocate_section_addresses):
6533 Remove num_section_bases, num_bases, segment_bases variables.
6534
6535 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6536
6537 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6538
6539 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6540
6541 * solib-target.c: Include <vector>
6542 (struct lm_info_target) <~lm_info_target>: Remove.
6543 <segment_bases, section_bases>: Change type to
6544 std::vector<CORE_ADDR>.
6545 (library_list_start_segment, library_list_start_section,
6546 library_list_end_library,
6547 solib_target_relocate_section_addresses): Adjust.
6548
6549 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6550
6551 * gdbarch.sh (software_single_step): Change return type to
6552 std::vector<CORE_ADDR>.
6553 * gdbarch.c, gdbarch.h: Re-generate.
6554 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6555 Adjust.
6556 (arm_deal_with_atomic_sequence_raw): Adjust.
6557 (thumb_get_next_pcs_raw): Adjust.
6558 (arm_get_next_pcs_raw): Adjust.
6559 (arm_get_next_pcs): Adjust.
6560 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6561 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6562 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6563 (alpha_software_single_step): Adjust.
6564 * alpha-tdep.h (alpha_software_single_step): Adjust.
6565 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6566 * arm-tdep.c (arm_software_single_step): Adjust.
6567 (arm_breakpoint_kind_from_current_state): Adjust.
6568 * arm-tdep.h (arm_software_single_step): Adjust.
6569 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6570 * cris-tdep.c (cris_software_single_step): Adjust.
6571 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6572 (micromips_deal_with_atomic_sequence): Adjust.
6573 (deal_with_atomic_sequence): Adjust.
6574 (mips_software_single_step): Adjust.
6575 * mips-tdep.h (mips_software_single_step): Adjust.
6576 * moxie-tdep.c (moxie_software_single_step): Adjust.
6577 * nios2-tdep.c (nios2_software_single_step): Adjust.
6578 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6579 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6580 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6581 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6582 * sparc-tdep.c (sparc_software_single_step): Adjust.
6583 * spu-tdep.c (spu_software_single_step): Adjust.
6584 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6585
6586 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6587
6588 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6589 * gdbarch.h: Re-generate.
6590
6591 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6592
6593 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6594 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6595 * python/py-instruction.c, python/py-instruction.h: New file.
6596 * python/py-record.c: Add py-instruction.h include.
6597 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6598 gdb.RecordInstruction.
6599 * python/python-internal.h: Add gdbpy_initialize_instruction
6600 declaration.
6601 * python/python.c (do_start_initialization): Add
6602 gdbpy_initialize_instruction.
6603
6604 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6605
6606 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6607 Remove.
6608 (btrace_func_from_recpy_func): New function.
6609 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6610 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6611 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6612 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6613 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6614 Also, use new helper functions.
6615 (btpy_list_item): Use new helper functions.
6616 (recpy_bt_function_call_history): Use new type name.
6617 (btpy_call_getset): Remove.
6618 (gdbpy_initialize_btrace): Remove code to initialize
6619 gdb.BtraceFunctionCall.
6620 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6621 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6622 recpy_bt_func_prev, recpy_bt_func_next): New export.
6623 * python/py-record.c (recpy_func_type): New static object.
6624 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6625 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6626 recpy_func_next): New function.
6627 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6628 (recpy_func_getset): New static object.
6629 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6630 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6631
6632 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6633
6634 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6635 (btpy_object, btpy_insn_type, btpy_new): Remove.
6636 (btpy_list_object): Use gdb.RecordInstruction type instead of
6637 gdb.BtraceInstruction type.
6638 (btrace_insn_from_recpy_insn): New function.
6639 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6640 btpy_new.
6641 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6642 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6643 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6644 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6645 instead of btpy_object.
6646 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6647 btpy_insn_data, btpy_insn_decode): Rename to ...
6648 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6649 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6650 recpy_bt_insn_decode): This. Also, use new helper functions.
6651 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6652 recpy_insn_type.
6653 (btpy_insn_getset): Remove.
6654 (gdbpy_initialize_btrace): Remove code to initialize
6655 gdb.BtraceInstruction. Use recpy_element_object.
6656 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6657 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6658 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6659 * python/py-record.c (recpy_insn_type): New static object.
6660 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6661 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6662 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6663 New function.
6664 (recpy_insn_getset): New static object.
6665 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6666 * python/py-record.h (recpy_element_object): New typedef.
6667 (recpy_insn_type, recpy_insn_new): New export.
6668
6669 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6670
6671 * py-record-btrace.c (btpy_insn_new): Removed.
6672 (btpy_insn_or_gap_new): New function.
6673 (btpy_insn_error): Removed.
6674 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6675 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6676 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6677 btpy_insn_or_gap_new instead of btpy_insn_new.
6678 (btpy_insn_getset): Remove btpy_insn_error.
6679 * py-record.c (recpy_gap_type): New static object.
6680 (recpy_gap_object): New typedef.
6681 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6682 recpy_gap_reason_string): New function.
6683 (recpy_gap_getset): New static object.
6684 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6685 * py-record.h (recpy_gap_new): New export.
6686
6687 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6688
6689 * python/py-record.c (recpy_ptid): Remove.
6690 (recpy_record_getset): Remove recpy_ptid.
6691
6692 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6693
6694 * btrace.c (btrace_fetch): Set inferior_ptid.
6695 * python/py-record-btrace.c: Add "py-record.h" include.
6696 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6697 recpy_bt_end, recpy_bt_instruction_history,
6698 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6699 in gdb.Record object instead of current ptid.
6700 * python/py-record.c: Include new "py-record.h" file.
6701 (recpy_record_object): Moved to py-record.h.
6702 * python/py-record.h: New file.
6703
6704 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6705
6706 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6707 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6708 indentation.
6709
6710 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6711
6712 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6713 the past maintainers section.
6714
6715 2017-04-28 Yao Qi <yao.qi@linaro.org>
6716
6717 * infcmd.c (get_return_value): Use regcache ctor, and remove
6718 cleanup.
6719
6720 2017-04-28 Yao Qi <yao.qi@linaro.org>
6721 Pedro Alves <palves@redhat.com>
6722
6723 * regcache.c (regcache::regcache): New tag dispatch ctor.
6724 (do_cooked_read): Moved above.
6725 (regcache_dup): Use the tag dispatch ctor..
6726 * regcache.h (regcache): Declare ctor, delete copy ctor and
6727 assignment operator, remove friend regcache_dup.
6728
6729 2017-04-28 Yao Qi <yao.qi@linaro.org>
6730
6731 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6732 call method save instead of regcache_cpy.
6733 * regcache.h (struct regcache): Make regcache_dup a friend.
6734
6735 2017-04-28 Yao Qi <yao.qi@linaro.org>
6736
6737 * regcache.c (struct regcache): Move to regcache.h
6738 (regcache::arch): New method.
6739 (regcache_get_ptid): Update.
6740 (get_regcache_arch): Call arch method.
6741 (get_regcache_aspace): Call method aspace.
6742 (register_buffer): Change it to method.
6743 (regcache_save): Change it to regcache::save.
6744 (regcache_restore): Likewise.
6745 (regcache_cpy_no_passthrough): Remove the declaration.
6746 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6747 (regcache_cpy_no_passthrough): Change it to method
6748 cpy_no_passthrough.
6749 (regcache_register_status): Change it to method
6750 get_register_status.
6751 (regcache_invalidate): Change it to method invalidate.
6752 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6753 (regcache_raw_update): Change it to method raw_update.
6754 (regcache_raw_read): Likewise.
6755 (regcache_raw_read_signed): Likewise.
6756 (regcache_raw_read_unsigned): Likewise.
6757 (regcache_raw_write_signed): Likewise.
6758 (regcache_raw_write_unsigned): Likewise.
6759 (regcache_cooked_read): Likewise.
6760 (regcache_cooked_read_value): Likewise.
6761 (regcache_cooked_read_signed): Likewise.
6762 (regcache_cooked_read_unsigned): Likewise.
6763 (regcache_cooked_write_signed): Likewise.
6764 (regcache_cooked_write_unsigned): Likewise.
6765 (regcache_raw_set_cached_value): Likewise.
6766 (regcache_raw_write): Likewise.
6767 (regcache_cooked_write): Likewise.
6768 (regcache_xfer_part): Likewise.
6769 (regcache_raw_read_part): Likewise.
6770 (regcache_raw_write_part): Likewise.
6771 (regcache_cooked_read_part): Likewise.
6772 (regcache_cooked_write_part): Likewise.
6773 (regcache_raw_supply): Likewise.
6774 (regcache_raw_collect): Likewise.
6775 (regcache_transfer_regset): Likewise.
6776 (regcache_supply_regset): Likewise.
6777 (regcache_collect_regset): Likewise.
6778 (regcache_debug_print_register): Likewise.
6779 (enum regcache_dump_what): Move it to regcache.h.
6780 (regcache_dump): Change it to method dump.
6781 * regcache.h (enum regcache_dump_what): New.
6782 (class regcache): New.
6783 * target.c (target_fetch_registers): Call method
6784 debug_print_register.
6785 (target_store_registers): Likewise.
6786
6787 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6788
6789 * windows-nat.c (struct lm_info_windows): Initialize field.
6790 (windows_make_so): Allocate lm_info_windows with new.
6791 (windows_free_so): Free lm_info_windows with delete.
6792
6793 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6794
6795 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6796 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6797 cleanup.
6798 (darwin_free_so): Free lm_info_darwin with delete.
6799
6800 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6801
6802 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6803 <l_addr_p>: Change type to bool.
6804 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6805 (svr4_free_so): Free lm_info_svr4 with delete.
6806 (svr4_copy_library_list): Replace memcpy with call to copy
6807 constructor.
6808 (library_list_start_library, svr4_default_sos): Allocate
6809 lm_info_svr4 with new.
6810
6811 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6812
6813 * solib-target.c (struct lm_info_target): Add destructor,
6814 initialize fields.
6815 <name>: Change type to std::string.
6816 (library_list_start_library): Allocate lm_info_target with new.
6817 (solib_target_free_library_list): Free lm_info_target with
6818 delete.
6819 (solib_target_current_sos): Adapt to std::string.
6820 (solib_target_free_so): Free lm_info_target with delete.
6821
6822 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6823
6824 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6825 fields.
6826 (frv_current_sos): Allocate lm_info_frv with new.
6827 (frv_relocate_main_executable): Free lm_info_frv with delete,
6828 allocate with new.
6829 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6830
6831 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6832
6833 * solib-frv.c (struct lm_info_frv): Fix indentation.
6834
6835 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6836
6837 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6838 map field.
6839 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6840 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6841 and allocate with new.
6842 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6843
6844 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6845
6846 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6847 <filename, member_name>: Change type to std::string.
6848 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6849 (library_list_start_library): Allocate lm_info_aix with new.
6850 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6851 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6852 with copy constructor.
6853
6854 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6855
6856 * solist.h (struct lm_info): Remove.
6857 (struct lm_info_base): New class.
6858 (struct so_list) <lm_info>: Change type to lm_info_base *.
6859 * nto-tdep.c (struct lm_info): Remove.
6860 (lm_addr): Adjust.
6861 * solib-aix.c (struct lm_info): Rename to ...
6862 (struct lm_info_aix): ... this. Extend lm_info_base.
6863 (lm_info_p): Rename to ...
6864 (lm_info_aix_p): ... this, and adjust.
6865 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6866 solib_aix_parse_libraries, library_list_start_library,
6867 solib_aix_free_library_list, solib_aix_parse_libraries,
6868 solib_aix_get_library_list,
6869 solib_aix_relocate_section_addresses, solib_aix_free_so,
6870 solib_aix_get_section_offsets,
6871 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6872 Adjust.
6873 (struct solib_aix_inferior_data) <library_list>: Adjust.
6874 * solib-darwin.c (struct lm_info): Rename to ...
6875 (struct lm_info_darwin): ... this. Extend lm_info_base.
6876 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6877 * solib-dsbt.c (struct lm_info): Rename to ...
6878 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6879 (struct dsbt_info) <main_executable_lm_info): Adjust.
6880 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6881 dsbt_relocate_section_addresses): Adjust.
6882 * solib-frv.c (struct lm_info): Rename to ...
6883 (struct lm_info_frv): ... this. Extend lm_info_base.
6884 (main_executable_lm_info): Adjust.
6885 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6886 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6887 find_canonical_descriptor_in_load_object,
6888 frv_fdpic_find_canonical_descriptor): Adjust.
6889 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6890 to lm_info_svr4.
6891 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6892 svr4_clear_so, svr4_copy_library_list,
6893 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6894 svr4_current_sos, svr4_fetch_objfile_link_map,
6895 solist_update_incremental): Adjust.
6896 * solib-svr4.h (struct lm_info_svr4): Move here from
6897 solib-svr4.c.
6898 * solib-target.c (struct lm_info): Rename to ...
6899 (struct lm_info_target): ... this. Extend lm_info_base.
6900 (lm_info_p): Rename to ...
6901 (lm_info_target_p): ... this.
6902 (solib_target_parse_libraries, library_list_start_segment,
6903 library_list_start_section, library_list_start_library,
6904 library_list_end_library, solib_target_free_library_list,
6905 solib_target_current_sos, solib_target_free_so,
6906 solib_target_relocate_section_addresses): Adjust.
6907 * windows-nat.c (struct lm_info): Rename to ...
6908 (struct lm_info_windows): ... this. Extend lm_info_base.
6909 (windows_make_so, handle_load_dll, handle_unload_dll,
6910 windows_xfer_shared_libraries): Adjust.
6911
6912 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6913
6914 * solib-darwin.c (struct darwin_so_list): Remove.
6915 (darwin_current_sos): Allocate an so_list object instead of a
6916 darwin_so_list, separately allocate an lm_info object.
6917 (darwin_free_so): Free lm_info.
6918
6919 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6920
6921 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6922 with fprintf_filtered.
6923
6924 2017-04-28 Yao Qi <yao.qi@linaro.org>
6925
6926 * regcache.c (regcache::regcache): New function.
6927 (regcache::~regcache): New function.
6928 (regcache_xmalloc_1): Remove.
6929 (regcache_xmalloc): Call new regcache.
6930 (regcache_xfree): Call delete regcache.
6931 (get_thread_arch_aspace_regcache): Call new regcache.
6932
6933 2017-04-28 Yao Qi <yao.qi@linaro.org>
6934
6935 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6936 lwp instead of ptid_get_lwp.
6937
6938 2017-04-28 Yao Qi <yao.qi@linaro.org>
6939
6940 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6941 lwp_info instead of getting from inferior_ptid.
6942
6943 2017-04-27 Keith Seitz <keiths@redhat.com>
6944
6945 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6946 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6947 (CV_CONVERSION_BADNESS): Define.
6948 (rank_one_type): Remove overly restrictive rvalue reference
6949 rank checks.
6950 Add cv-qualifier checks and subranks for type equality.
6951 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6952 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6953 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6954
6955 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6956
6957 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6958 count when creating the object.
6959
6960 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6961 Ulrich Weigand <uweigand@de.ibm.com>
6962
6963 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6964 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6965 is used in AIX.
6966 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6967 (process_xcoff_symbol): Likewise.
6968 (scan_xcoff_symtab): Likewise.
6969
6970 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6971
6972 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6973 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6974 (ia64_access_reg): Use get_frame_register_unsigned.
6975 (ia64_access_rse_reg): Likewise.
6976 (ia64_libunwind_frame_prev_register): Likewise.
6977
6978 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6979
6980 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6981 * gdbarch.c: Regenerated.
6982 * gdbarch.h: Regenerated.
6983 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6984 visibility external.
6985 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6986 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6987 (enum cfa_how_kind): Move to ...
6988 (struct dwarf2_frame_state_reg_info): Likewise.
6989 (struct dwarf2_frame_state): Likewise.
6990 * dwarf2-frame.h: ... here.
6991 (dwarf2_frame_state_alloc_regs): New declaration.
6992 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6993 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6994
6995 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6996
6997 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6998 regcache_raw_read_unsigned.
6999 (xtensa_pseudo_register_write): Likewise.
7000
7001 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7002
7003 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7004 (nds32_pseudo_register_write): Likewise.
7005
7006 2017-04-25 Yao Qi <yao.qi@linaro.org>
7007
7008 * regcache.c (struct regcache) <readonly_p>: Change its type
7009 to bool.
7010 (regcache_xmalloc_1): Update parameter type and callers update.
7011
7012 2017-04-25 Yao Qi <yao.qi@linaro.org>
7013
7014 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7015 set_gdbarch_wchar_bit.
7016 * arm-tdep.c (arm_gdbarch_init): Likewise.
7017
7018 2017-04-25 Pedro Alves <palves@redhat.com>
7019
7020 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7021 (BothAreRelocatable, memcopy, memmove): Don't define.
7022 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7023 macros.
7024
7025 2017-04-25 Pedro Alves <palves@redhat.com>
7026
7027 * common/common-defs.h: Include "common/poison.h".
7028 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7029 and adjust.
7030 * common/poison.h: New file.
7031 * common/traits.h: Include <type_traits>.
7032 (Not, Or, Requires): New, moved from common/function-view.h.
7033
7034 2017-04-25 Pedro Alves <palves@redhat.com>
7035
7036 * breakpoint.h (struct breakpoint): In-class initialize all
7037 fields. Make boolean fields "bool".
7038 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7039 memset call and initializations no longer necessary.
7040
7041 2017-04-25 Pedro Alves <palves@redhat.com>
7042
7043 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7044 reference.
7045 (pt_btrace_insn): New function.
7046 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7047
7048 2017-04-25 Pedro Alves <palves@redhat.com>
7049
7050 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7051 "base" field and inherit from "bp_location" instead. Add
7052 non-default ctor.
7053 (allocate_location_exception): Use new non-default ctor.
7054 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7055 (init_bp_location): Convert to ...
7056 (bp_location::bp_location): ... this new ctor, and remove memset
7057 call.
7058 (base_breakpoint_allocate_location): Use the new non-default ctor.
7059 * breakpoint.h (bp_location): Now a class. Declare default and
7060 non-default ctors. In-class initialize all members.
7061 (init_bp_location): Remove declaration.
7062
7063 2017-04-25 Pedro Alves <palves@redhat.com>
7064
7065 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7066 assignment operator.
7067
7068 2017-04-24 Yao Qi <yao.qi@linaro.org>
7069
7070 * doublest.c (convert_doublest_to_floatformat): Call
7071 floatformat_totalsize_bytes.
7072
7073 2017-04-22 Tom Tromey <tom@tromey.com>
7074
7075 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7076 ui_out_emit_list.
7077 * stack.c (print_frame): Use ui_out_emit_list.
7078 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7079 ui_out_emit_list.
7080 * mi/mi-main.c (print_one_inferior)
7081 (mi_cmd_data_list_register_names)
7082 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7083 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7084 ui_out_emit_list.
7085 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7086 (mi_output_solib_attribs): Use ui_out_emit_list,
7087 ui_out_emit_tuple.
7088 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7089 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7090 (mi_cmd_stack_list_args, list_args_or_locals): Use
7091 ui_out_emit_list.
7092 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7093 * breakpoint.c (print_solib_event, output_thread_groups): Use
7094 ui_out_emit_list.
7095
7096 2017-04-22 Tom Tromey <tom@tromey.com>
7097
7098 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7099 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7100 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7101
7102 2017-04-22 Tom Tromey <tom@tromey.com>
7103
7104 * tracepoint.c (tvariables_info_1)
7105 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7106
7107 2017-04-22 Tom Tromey <tom@tromey.com>
7108
7109 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7110 annotate_arg_emitter.
7111 * breakpoint.c (print_mention_watchpoint)
7112 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7113 * annotate.h (struct annotate_arg_emitter): New.
7114
7115 2017-04-22 Tom Tromey <tom@tromey.com>
7116
7117 * record-btrace.c (record_btrace_insn_history)
7118 (record_btrace_insn_history_range, record_btrace_call_history)
7119 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7120 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7121 ui_out_emit_tuple.
7122 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7123 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7124 * skip.c (skip_info): Use ui_out_emit_tuple.
7125 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7126 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7127 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7128 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7129 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7130 ui_out_emit_tuple.
7131 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7132 (output_register, mi_cmd_data_read_memory)
7133 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7134 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7135 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7136 Use ui_out_emit_tuple.
7137 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7138 ui_out_emit_tuple.
7139 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7140 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7141 * linux-thread-db.c (info_auto_load_libthread_db): Use
7142 ui_out_emit_tuple.
7143 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7144 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7145 * disasm.c (do_mixed_source_and_assembly_deprecated)
7146 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7147 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7148 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7149 * breakpoint.c (print_one_breakpoint_location)
7150 (print_one_breakpoint): Use ui_out_emit_tuple.
7151 * auto-load.c (print_script, info_auto_load_cmd): Use
7152 ui_out_emit_tuple.
7153 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7154
7155 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7156
7157 * thread.c (print_thread_info_1): Remove dead code.
7158
7159 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7160
7161 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7162 GDB_SELF_TEST.
7163 * arm-tdep.c (selftests::arm_record_test): Likewise.
7164
7165 2017-04-21 Yao Qi <yao.qi@linaro.org>
7166
7167 * regcache.c (regcache_restore): Remove argument 2. Replace
7168 argument 3 with regcache. Get register status from
7169 src->register_status and get register contents from
7170 register_buffer (src, regnum).
7171 (regcache_cpy): Update.
7172
7173 2017-04-19 Pedro Alves <palves@redhat.com>
7174
7175 * gdbthread.h (thread): Add missing closing parenthesis in
7176 comment.
7177
7178 2017-04-19 Pedro Alves <palves@redhat.com>
7179
7180 * common/refcounted-object.h: New file.
7181 * gdbthread.h: Include "common/refcounted-object.h".
7182 (thread_info): Inherit from refcounted_object and add comments.
7183 (thread_info::incref, thread_info::decref)
7184 (thread_info::m_refcount): Delete.
7185 (thread_info::deletable): Use the refcounted_object::refcount()
7186 method.
7187 * inferior.c (current_inferior_): Add comment.
7188 (set_current_inferior): Increment/decrement refcounts.
7189 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7190 not-deletable instead of comparing with the current inferior.
7191 (initialize_inferiors): Increment the initial inferior's refcount.
7192 * inferior.h (struct inferior): Forward declare.
7193 Include "common/refcounted-object.h".
7194 (current_inferior, set_current_inferior): Move declaration to
7195 before struct inferior's definition, and fix comment.
7196 (inferior): Inherit from refcounted_object. Add comments.
7197 * thread.c (switch_to_thread_no_regs): Reference the thread's
7198 inferior pointer directly instead of doing a ptid lookup.
7199 (switch_to_no_thread): New function.
7200 (switch_to_thread(thread_info *)): New function, factored out
7201 from ...
7202 (switch_to_thread(ptid_t)): ... this.
7203 (restore_current_thread): Delete.
7204 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7205 fields, and add 'inf' field.
7206 (do_restore_current_thread_cleanup): Check whether old->inf is
7207 alive instead of looking up an inferior by ptid. Use
7208 switch_to_thread and switch_to_no_thread.
7209 (restore_current_thread_cleanup_dtor): Use old->inf directly
7210 instead of lookup up an inferior by id. Decref the inferior.
7211 Don't restore 'removable'.
7212 (make_cleanup_restore_current_thread): Same the inferior pointer
7213 in old, instead of the inferior number. Incref the inferior.
7214 Don't save/clear 'removable'.
7215
7216 2017-04-19 Pedro Alves <palves@redhat.com>
7217
7218 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7219 unittests/scoped_restore-selftests.c.
7220 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7221 * common/scoped_restore.h (scoped_restore_base): Make "class".
7222 (scoped_restore_base::release): New public method.
7223 (scoped_restore_base::scoped_restore_base): New protected ctor.
7224 (scoped_restore_base::m_saved_var): New protected field.
7225 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7226 scoped_restore_base base class instead of m_saved_var directly.
7227 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7228 (scoped_restore_tmpl::scoped_restore_tmpl(const
7229 scoped_restore_tmpl<T>&)): Likewise.
7230 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7231 method.
7232 (scoped_restore_tmpl::saved_var): New method.
7233 (scoped_restore_tmpl::m_saved_var): Delete.
7234 * inferior.h (inferior::detaching): Now a bool.
7235 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7236 cleanup.
7237 * unittests/scoped_restore-selftests.c: New file.
7238
7239 2017-04-19 Pedro Alves <palves@redhat.com>
7240
7241 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7242 Re-sort in alphabetic order.
7243
7244 2017-04-18 Pedro Alves <palves@redhat.com>
7245
7246 * xml-support.c (obstack_xml_printf): Delete.
7247 * xml-support.h (obstack_xml_printf): Delete.
7248
7249 2017-04-18 Pedro Alves <palves@redhat.com>
7250
7251 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7252 vdebug, verror, body_text, start_element, end_element, name,
7253 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7254 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7255 is_xinclude>: Make private and add m_ prefix.
7256 (gdb_xml_parser::body_text): New method, based on ...
7257 (gdb_xml_body_text): ... this. Adjust.
7258 (gdb_xml_parser::vdebug): New method, based on ...
7259 (gdb_xml_debug): ... this. Adjust.
7260 (gdb_xml_parser::verror): New method, based on ...
7261 (gdb_xml_error): ... this. Adjust.
7262 (gdb_xml_parser::start_element): New method, based on ...
7263 (gdb_xml_start_element): ... this. Adjust.
7264 (gdb_xml_start_element_wrapper): Defer to
7265 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7266 (gdb_xml_parser::end_element): New method, based on ...
7267 (gdb_xml_end_element_wrapper): ... this. Adjust.
7268 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7269 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7270 (gdb_xml_parser::use_dtd): New method, based on ...
7271 (gdb_xml_use_dtd): ... this. Adjust.
7272 (gdb_xml_parser::parse): New method, based on ...
7273 (gdb_xml_parse): ... this. Adjust.
7274 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7275 (xinclude_start_include): Adjust to call the parser's name method.
7276 (xml_xinclude_default, xml_xinclude_start_doctype)
7277 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7278 method.
7279 (xml_process_xincludes): Adjust to call parser methods.
7280 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7281 declarations.
7282
7283 2017-04-18 Pedro Alves <palves@redhat.com>
7284
7285 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7286 gdb::optional<std::string>.
7287 * xml-support.c: Include <string>.
7288 (scope_level::scope_level(scope_level &&))
7289 (scope_level::~scope_level): Delete.
7290 (scope_level::body): Now a std::string.
7291 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7292 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7293 parameter.
7294 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7295 (xinclude_parsing_data::output): Now a std::string reference.
7296 (xinclude_start_include): Adjust.
7297 (xml_xinclude_default): Adjust.
7298 (xml_process_xincludes): Add 'output' parameter, and return bool.
7299 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7300 and return bool.
7301 * xml-tdesc.c: Include <unordered_map> and <string>.
7302 (tdesc_xml_cache): Delete.
7303 (tdesc_xml_cache_s): Delete.
7304 (xml_cache): Now an std::unordered_map.
7305 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7306 (target_fetch_description_xml): Change return type to
7307 gdb::optional<std::string>, and adjust.
7308 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7309 (target_fetch_description_xml): Change return type to
7310 gdb::optional<std::string>.
7311
7312 2017-04-18 Pedro Alves <palves@redhat.com>
7313
7314 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7315 unittests/optional-selftests.c.
7316 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7317 * unittests/optional-selftests.c: New file.
7318 * unittests/optional/assignment/1.cc: New file.
7319 * unittests/optional/assignment/2.cc: New file.
7320 * unittests/optional/assignment/3.cc: New file.
7321 * unittests/optional/assignment/4.cc: New file.
7322 * unittests/optional/assignment/5.cc: New file.
7323 * unittests/optional/assignment/6.cc: New file.
7324 * unittests/optional/assignment/7.cc: New file.
7325 * unittests/optional/cons/copy.cc: New file.
7326 * unittests/optional/cons/default.cc: New file.
7327 * unittests/optional/cons/move.cc: New file.
7328 * unittests/optional/cons/value.cc: New file.
7329 * unittests/optional/in_place.cc: New file.
7330 * unittests/optional/observers/1.cc: New file.
7331 * unittests/optional/observers/2.cc: New file.
7332
7333 2017-04-18 Pedro Alves <palves@redhat.com>
7334
7335 * common/gdb_optional.h: Include common/traits.h.
7336 (in_place_t): New type.
7337 (in_place): New constexpr variable.
7338 (optional::optional): Remove member initialization of
7339 m_instantiated.
7340 (optional::optional(in_place_t...)): New constructor.
7341 (optional::~optional): Use reset.
7342 (optional::optional(const optional&)): New.
7343 (optional::optional(const optional&&)): New.
7344 (optional::optional(T &)): New.
7345 (optional::optional(T &&)): New.
7346 (operator::operator=(const optional &)): New.
7347 (operator::operator=(optional &&)): New.
7348 (operator::operator= (const T &))
7349 (operator::operator= (T &&))
7350 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7351 (operator::reset): New.
7352 (operator::m_instantiated):: Add in-class initializer.
7353 * common/traits.h: Include <type_traits>.
7354 (struct And): New types.
7355
7356 2017-04-18 Pedro Alves <palves@redhat.com>
7357
7358 * xml-support.c: Include <vector>.
7359 (scope_level::scope_level(const gdb_xml_element *))
7360 (scope_level::scope_level(scope_level&&)): New.
7361 (scope_level::~scope_level): New.
7362 (scope_level_s): Delete.
7363 (gdb_xml_parser::scopes): Now a std::vector.
7364 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7365 Use std::vector.
7366 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7367 scope cleanup code.
7368 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7369 of the scopes member. Use std::vector::emplace_back.
7370
7371 2017-04-18 Pedro Alves <palves@redhat.com>
7372
7373 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7374 a bool.
7375 (gdb_xml_end_element): Change type of first parameter.
7376 (gdb_xml_cleanup): Rename to ...
7377 (gdb_xml_parser::~gdb_xml_parser): ... this.
7378 (gdb_xml_create_parser_and_cleanup): Delete with ...
7379 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7380 to this new ctor.
7381 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7382 using gdb_xml_create_parser_and_cleanup.
7383 (xinclude_parsing_data): Add ctor/dtor.
7384 (xml_xinclude_cleanup): Delete.
7385 (xml_process_xincludes): Create a local xinclude_parsing_data
7386 instead of heap-allocating one. Create a local gdb_xml_parser
7387 instead of heap-allocating one with
7388 gdb_xml_create_parser_and_cleanup.
7389
7390 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7391
7392 PR threads/20743
7393 * fbsd-nat.c (resume_one_thread_cb): Remove.
7394 (resume_all_threads_cb): Remove.
7395 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7396 iterate_over_threads.
7397
7398 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7399
7400 * NEWS: Create a new section for the next release branch.
7401 Rename the section of the current branch, now that it has
7402 been cut.
7403
7404 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7405
7406 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7407 * version.in: Bump version to 8.0.50.DATE-git.
7408
7409 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7410
7411 PR gdb/21385
7412 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7413 independently of the host, and fix build breakage on Cygwin.
7414
7415 2017-04-13 Pedro Alves <palves@redhat.com>
7416
7417 * inferior.c (free_inferior): Convert to ...
7418 (inferior::~inferior): ... this dtor.
7419 (inferior::inferior): New ctor, factored out from ...
7420 (add_inferior_silent): ... here. Allocate the inferior with a new
7421 expression.
7422 (delete_inferior): Call delete instead of free_inferior.
7423 * inferior.h (gdb_environ, continuation): Forward declare.
7424 (inferior): Now a class. Add in-class initialization to all
7425 members. Make boolean fields bool, except 'detaching'.
7426 (inferior::inferior): New explicit ctor.
7427 (inferior::~inferior): New.
7428
7429 2017-04-13 Pedro Alves <palves@redhat.com>
7430
7431 * inferior.c (init_inferior_list): Delete.
7432 * inferior.h (init_inferior_list): Delete.
7433
7434 2017-04-13 Pedro Alves <palves@redhat.com>
7435
7436 PR threads/13217
7437 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7438 (top level): Call it twice, with different thread sets.
7439
7440 2017-04-13 Pedro Alves <palves@redhat.com>
7441
7442 * thread.c: Include <algorithm>.
7443 (thread_array_cleanup): Delete.
7444 (scoped_inc_dec_ref): New class.
7445 (live_threads_count): New function.
7446 (set_thread_refcount): Delete.
7447 (tp_array_compar_ascending): Now a bool.
7448 (tp_array_compar): Convert to a std::sort comparison function.
7449 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7450 and live_threads_count.
7451
7452 2017-04-13 Pedro Alves <palves@redhat.com>
7453
7454 * infrun.c (follow_fork_inferior): Also switch the current
7455 inferior.
7456
7457 2017-04-13 Pedro Alves <palves@redhat.com>
7458
7459 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7460 before calling create_internal_breakpoint.
7461
7462 2017-04-13 Pedro Alves <palves@redhat.com>
7463
7464 * fork-child.c (execv_argv): New class.
7465 (breakup_args): Refactored as ...
7466 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7467 Copy arguments to storage and replace separators with NULL
7468 terminators in place.
7469 (escape_bang_in_quoted_argument): Adjust to return bool.
7470 (execv_argv::execv_argv): New ctor.
7471 (execv_argv::init_for_shell): New method, factored out from
7472 fork_inferior. Don't strdup strings into the vector.
7473 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7474 Remove free_vector_argv call.
7475
7476 2017-04-13 Yao Qi <yao.qi@linaro.org>
7477
7478 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7479 tdep->rx_psw_type.
7480
7481 2017-04-13 Yao Qi <yao.qi@linaro.org>
7482
7483 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7484 * rx-tdep.c (rx_gdbarch_init): Likewise.
7485
7486 2017-04-13 Pedro Alves <palves@redhat.com>
7487
7488 * breakpoint.h (struct breakpoint): Reindent.
7489
7490 2017-04-13 Pedro Alves <palves@redhat.com>
7491
7492 * breakpoint.c (bp_location): Rename to ...
7493 (bp_locations): ... this. All references updated.
7494 (bp_location_count): Rename to ...
7495 (bp_locations_count): ... this. All references updated.
7496 (bp_location_placed_address_before_address_max): Rename to ...
7497 (bp_locations_placed_address_before_address_max): ... this. All
7498 references updated.
7499 (bp_location_shadow_len_after_address_max): Rename to ...
7500 (bp_locations_shadow_len_after_address_max): ... this. All
7501 references updated.
7502 (bp_location_compare_addrs): Rename to ...
7503 (bp_locations_compare_addrs): ... this. All references updated.
7504 (bp_location_compare):Rename to ...
7505 (bp_locations_compare): ... this. All references updated.
7506 (bp_location_target_extensions_update): Rename to ...
7507 (bp_locations_target_extensions_update): ... this. All references
7508 updated.
7509
7510 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7511
7512 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7513 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7514 'sgtty.h'.
7515 * common/gdb_termios.h: New file, with parts of "terminal.h".
7516 * inflow.c: Include "gdb_termios.h".
7517 * ser-unix.c: Include "gdb_termios.h".
7518 * terminal.h: Move terminal-related defines to
7519 "common/gdb_termios.h".
7520
7521 2017-04-12 Tom Tromey <tom@tromey.com>
7522
7523 * probe.c (parse_probes): Update.
7524 * location.h (delete_event_location): Don't declare.
7525 (event_location_deleter::operator()): Update.
7526 * location.c (event_location_deleter::operator()): Rename from
7527 delete_event_location.
7528 * linespec.h (linespec_result) <location>: Change type to
7529 event_location_up.
7530 * linespec.c (canonicalize_linespec, event_location_to_sals)
7531 (decode_objc): Update.
7532 (linespec_result): Don't call delete_event_location.
7533 * breakpoint.c (create_breakpoints_sal)
7534 (bkpt_probe_create_sals_from_location)
7535 (strace_marker_create_sals_from_location): Update.
7536
7537 2017-04-12 Tom Tromey <tom@tromey.com>
7538
7539 * linespec.h (struct linespec_result): Add constructor and
7540 destructor.
7541 (init_linespec_result, destroy_linespec_result)
7542 (make_cleanup_destroy_linespec_result): Don't declare.
7543 * linespec.c (init_linespec_result): Remove.
7544 (linespec_result::~linespec_result): Rename from
7545 destroy_linespec_result. Update.
7546 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7547 Remove.
7548 * breakpoint.c (create_breakpoint, break_range_command)
7549 (decode_location_default): Update.
7550 * ax-gdb.c (agent_command_1): Update.
7551
7552 2017-04-12 Tom Tromey <tom@tromey.com>
7553
7554 * remote.c (remote_download_tracepoint): Update.
7555 * python/py-breakpoint.c (bppy_get_location): Update.
7556 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7557 (gdbscm_breakpoint_location): Update.
7558 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7559 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7560 Change type to event_location_up.
7561 * breakpoint.c (create_overlay_event_breakpoint)
7562 (create_longjmp_master_breakpoint)
7563 (create_std_terminate_master_breakpoint)
7564 (create_exception_master_breakpoint)
7565 (breakpoint_event_location_empty_p, print_breakpoint_location)
7566 (print_one_breakpoint_location, create_thread_event_breakpoint)
7567 (init_breakpoint_sal, create_breakpoint)
7568 (print_recreate_ranged_breakpoint, break_range_command)
7569 (init_ada_exception_breakpoint, say_where): Update.
7570 (base_breakpoint_dtor): Don't call delete_event_location.
7571 (bkpt_print_recreate, tracepoint_print_recreate)
7572 (dprintf_print_recreate, update_static_tracepoint)
7573 (breakpoint_re_set_default): Update.
7574
7575 2017-04-12 Tom Tromey <tom@tromey.com>
7576
7577 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7578 type of "to_do". Update.
7579 (compute_stack_depth): Use std::vector.
7580
7581 2017-04-12 Tom Tromey <tom@tromey.com>
7582
7583 * printcmd.c (find_instruction_backward): Use std::vector.
7584
7585 2017-04-12 Tom Tromey <tom@tromey.com>
7586
7587 * symfile.c (objfilep): Remove typedef.
7588 (reread_symbols): Use a std::vector.
7589
7590 2017-04-12 Tom Tromey <tom@tromey.com>
7591
7592 * mi/mi-main.c (exec_direction_forward): Remove.
7593 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7594 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7595 scoped_restore.
7596 * guile/guile.c (guile_repl_command, guile_command)
7597 (gdbscm_execute_gdb_command): Use scoped_restore.
7598 * go-exp.y (go_parse): Use scoped_restore.
7599 * d-exp.y (d_parse): Use scoped_restore.
7600 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7601 * c-exp.y (c_parse): Use scoped_restore.
7602
7603 2017-04-12 Tom Tromey <tom@tromey.com>
7604
7605 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7606 (mi_parse): Update return type.
7607 (mi_parse_free): Remove.
7608 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7609 (mi_parse::~mi_parse): Rename from mi_parse_free.
7610 (mi_parse_cleanup): Remove.
7611 (mi_parse): Return a unique_ptr. Use new.
7612 * mi/mi-main.c (mi_execute_command): Update.
7613
7614 2017-04-12 Tom Tromey <tom@tromey.com>
7615
7616 * location.c (explicit_location_lex_one): Return a
7617 unique_xmalloc_ptr.
7618 (string_to_explicit_location): Update. Remove cleanups.
7619
7620 2017-04-12 Tom Tromey <tom@tromey.com>
7621
7622 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7623 (compare_value_and_voffset): Change type. Update.
7624 (compute_vtable_size): Change type of "offset_vec".
7625 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7626 (gnuv3_get_typeid): Remove extraneous declaration.
7627
7628 2017-04-12 Tom Tromey <tom@tromey.com>
7629
7630 * charset.h (wchar_iterator): Fix comment.
7631
7632 2017-04-12 Tom Tromey <tom@tromey.com>
7633
7634 * charset.c (iconv_wrapper): New class.
7635 (cleanup_iconv): Remove.
7636 (convert_between_encodings): Use it.
7637
7638 2017-04-12 Tom Tromey <tom@tromey.com>
7639
7640 * symfile.h (increment_reading_symtab): Update type.
7641 * symfile.c (decrement_reading_symtab): Remove.
7642 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7643 * psymtab.c (psymtab_to_symtab): Update.
7644 * dwarf2read.c (dw2_instantiate_symtab): Update.
7645
7646 2017-04-12 Tom Tromey <tom@tromey.com>
7647
7648 * jit.c (struct jit_reader): Declare separately. Add constructor
7649 and destructor. Change type of "handle".
7650 (loaded_jit_reader): Define separately.
7651 (jit_reader_load): Update. New "new".
7652 (jit_reader_unload_command): Use "delete".
7653 * gdb-dlfcn.h (struct dlclose_deleter): New.
7654 (gdb_dlhandle_up): New typedef.
7655 (gdb_dlopen, gdb_dlsym): Update types.
7656 (gdb_dlclose): Remove.
7657 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7658 (gdb_dlsym): Change type of "handle".
7659 (make_cleanup_dlclose): Remove.
7660 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7661 * compile/compile-c-support.c (load_libcc): Update.
7662
7663 2017-04-12 Tom Tromey <tom@tromey.com>
7664
7665 * symtab.h (find_pcs_for_symtab_line): Change return type.
7666 * symtab.c (find_pcs_for_symtab_line): Change return type.
7667 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7668 type of "vec". Update.
7669 (ltpy_get_pcs_for_line): Update.
7670 * linespec.c (decode_digits_ordinary): Update.
7671
7672 2017-04-12 Tom Tromey <tom@tromey.com>
7673
7674 * tracepoint.c (actions_command): Update.
7675 * python/python.c (python_command, python_interactive_command):
7676 Update.
7677 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7678 * guile/guile.c (guile_command): Update.
7679 * defs.h (read_command_lines, read_command_lines_1): Return
7680 command_line_up.
7681 (command_lines_deleter): New struct.
7682 (command_line_up): New typedef.
7683 * compile/compile.c (compile_code_command)
7684 (compile_print_command): Update.
7685 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7686 command_line_up.
7687 (make_cleanup_free_command_lines): Remove.
7688 * cli/cli-script.c (get_command_line, read_command_lines_1)
7689 (copy_command_lines): Return command_line_up.
7690 (while_command, if_command, read_command_lines, define_command)
7691 (document_command): Update.
7692 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7693 Remove.
7694 * breakpoint.h (breakpoint_set_commands): Change type of
7695 "commands".
7696 * breakpoint.c (breakpoint_set_commands): Change type of
7697 "commands". Update.
7698 (do_map_commands_command, update_dprintf_command_list)
7699 (create_tracepoint_from_upload): Update.
7700
7701 2017-04-12 Tom Tromey <tom@tromey.com>
7702
7703 * tracepoint.c (scope_info): Update.
7704 * spu-tdep.c (spu_catch_start): Update.
7705 * python/python.c (gdbpy_decode_line): Update.
7706 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7707 * python/py-breakpoint.c (bppy_init): Update.
7708 * probe.c (parse_probes): Update.
7709 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7710 * location.h (event_location_deleter): New struct.
7711 (event_location_up): New typedef.
7712 (new_linespec_location, new_address_location, new_probe_location)
7713 (new_explicit_location, copy_event_location)
7714 (string_to_event_location, string_to_event_location_basic)
7715 (string_to_explicit_location): Update return type.
7716 (make_cleanup_delete_event_location): Remove.
7717 * location.c (new_linespec_location, new_address_location)
7718 (new_probe_location, new_explicit_location, copy_event_location):
7719 Return event_location_up.
7720 (delete_event_location_cleanup)
7721 (make_cleanup_delete_event_location): Remove.
7722 (string_to_explicit_location, string_to_event_location_basic)
7723 (string_to_event_location): Return event_location_up.
7724 * linespec.c (canonicalize_linespec, event_location_to_sals)
7725 (decode_line_with_current_source)
7726 (decode_line_with_last_displayed, decode_objc): Update.
7727 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7728 * completer.c (location_completer): Update.
7729 * cli/cli-cmds.c (edit_command, list_command): Update.
7730 * breakpoint.c (create_overlay_event_breakpoint)
7731 (create_longjmp_master_breakpoint)
7732 (create_std_terminate_master_breakpoint)
7733 (create_exception_master_breakpoint)
7734 (create_thread_event_breakpoint): Update.
7735 (init_breakpoint_sal): Update. Remove some dead code.
7736 (create_breakpoint_sal): Change type of "location". Update.
7737 (create_breakpoints_sal, create_breakpoint, break_command_1)
7738 (dprintf_command, break_range_command, until_break_command)
7739 (init_ada_exception_breakpoint)
7740 (strace_marker_create_sals_from_location)
7741 (update_static_tracepoint, trace_command, ftrace_command)
7742 (strace_command, create_tracepoint_from_upload): Update.
7743 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7744 * ax-gdb.c (agent_command_1): Update.
7745
7746 2017-04-12 Pedro Alves <palves@redhat.com>
7747
7748 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7749 * configure.tgt: Handle i[34567]86-*-go32* and
7750 i[34567]86-*-msdosdjgpp*.
7751 * i386-tdep.c (i386_svr4_reg_to_regnum):
7752 Make extern.
7753 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7754 i386-go32-tdep.c.
7755 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7756 * i386-go32-tdep.c: New file.
7757 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7758 declarations.
7759
7760 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7761
7762 * aix-thread.c (pd_status2str): Change return type to const char *.
7763
7764 2017-04-12 Pedro Alves <palves@redhat.com>
7765
7766 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7767 calls to set_gdbarch_gnu_triplet_regexp.
7768
7769 2017-04-12 Pedro Alves <palves@redhat.com>
7770
7771 PR gdb/21323
7772 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7773 New enum value.
7774 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7775 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7776 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7777 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7778 * gdbarch.h, gdbarch.c: Regenerate.
7779 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7780 gdbarch_wchar_bit and gdbarch_wchar_signed.
7781 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7782 * arm-tdep.c (arm_gdbarch_init): Likewise.
7783 * avr-tdep.c (avr_gdbarch_init): Likewise.
7784 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7785 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7786 * i386-tdep.c (i386_go32_init_abi): Likewise.
7787 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7788 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7789 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7790 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7791 * sh-tdep.c (sh_gdbarch_init): Likewise.
7792 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7793 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7794 * windows-tdep.c (windows_init_abi): Likewise.
7795 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7796
7797 2017-04-12 Pedro Alves <palves@redhat.com>
7798
7799 PR c++/21323
7800 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7801 cplus_primitive_type_char32_t>: New enum values.
7802 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7803 and cplus_primitive_type_char32_t.
7804 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7805 32, use the archtecture's built-in type for char16_t and char32_t,
7806 respectively. Otherwise, fallback to init_integer_type as before,
7807 but make the type unsigned, and issue a complaint.
7808 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7809
7810 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7811
7812 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7813 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7814
7815 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7816
7817 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7818 'const char *'.
7819
7820 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7821
7822 * common/common-utils.c (free_vector_argv): New function.
7823 * common/common-utils.h: Include <vector>.
7824 (free_vector_argv): New prototype.
7825 * darwin-nat.c (darwin_create_inferior): Rewrite function
7826 prototype in order to constify "exec_file" and accept a
7827 "std::string" for "allargs".
7828 * fork-child.c: Include <vector>.
7829 (breakup_args): Rewrite function, using C++.
7830 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7831 and accept "std::string" for "allargs". Update the code to
7832 calculate "argv" based on "allargs". Update calls to "exec_fun"
7833 and "execvp".
7834 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7835 order to constify "exec_file" and accept a "std::string" for
7836 "allargs".
7837 * go32-nat.c (go32_create_inferior): Likewise.
7838 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7839 * infcmd.c (run_command_1): Constify "exec_file". Use
7840 "std::string" for inferior arguments.
7841 * inferior.h (fork_inferior): Update prototype.
7842 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7843 prototype in order to constify "exec_file" and accept a
7844 "std::string" for "allargs".
7845 * nto-procfs.c (procfs_create_inferior): Likewise.
7846 * procfs.c (procfs_create_inferior): Likewise.
7847 * remote-sim.c (gdbsim_create_inferior): Likewise.
7848 * remote.c (extended_remote_run): Update code to accept
7849 "std::string" as argument.
7850 (extended_remote_create_inferior): Rewrite function prototype in
7851 order to constify "exec_file" and accept a "std::string" for
7852 "allargs".
7853 * rs6000-nat.c (super_create_inferior): Likewise.
7854 (rs6000_create_inferior): Likewise.
7855 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7856 * windows-nat.c (windows_create_inferior): Likewise.
7857
7858 2017-04-11 Pedro Alves <palves@redhat.com>
7859
7860 * thread.c: Fix whitespace throughout.
7861
7862 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7863
7864 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7865
7866 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7867
7868 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7869
7870 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7871
7872 PR gdb/21364
7873 * osdata.c (info_osdata): Check if 'type' is an empty string
7874 instead of NULL.
7875
7876 2017-04-10 Pedro Alves <palves@redhat.com>
7877
7878 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7879 (ptid_to_global_thread_id, in_thread_list)
7880 (do_captured_list_thread_ids, set_resumed, set_running)
7881 (set_executing, set_stop_requested, finish_thread_state)
7882 (validate_registers_access, can_access_registers_ptid)
7883 (print_thread_info_1, switch_to_thread)
7884 (do_restore_current_thread_cleanup)
7885 (make_cleanup_restore_current_thread, thread_command)
7886 (thread_name_command): Use operator== instead of ptid_equal.
7887
7888 2017-04-10 Pedro Alves <palves@redhat.com>
7889
7890 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7891 (current_thread_cleanup_chain): Delete.
7892 (restore_current_thread_cleanup_dtor)
7893 (make_cleanup_restore_current_thread): Remove references to
7894 current_thread_cleanup_chain.
7895
7896 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7897
7898 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7899 REG_UNKNOWN.
7900
7901 2017-04-10 Yao Qi <yao.qi@linaro.org>
7902
7903 PR gdb/19942
7904 * gdbthread.h (thread_info::deletable): New method.
7905 (thread_info::incref): New method.
7906 (thread_info::decref): New method.
7907 (thread_info::refcount): Move it to private.
7908 * infrun.c (save_stop_context): Call inc_refcount.
7909 (release_stop_context_cleanup): Likewise.
7910 * thread.c (set_thread_exited): New function.
7911 (init_thread_list): Delete "tp" only it is deletable, otherwise
7912 call set_thread_exited.
7913 (delete_thread_1): Call set_thread_exited.
7914 (current_thread_cleanup) <inferior_pid>: Remove.
7915 <thread>: New field.
7916 (restore_current_thread_ptid_changed): Removed.
7917 (do_restore_current_thread_cleanup): Adjust.
7918 (restore_current_thread_cleanup_dtor): Don't call
7919 find_thread_ptid.
7920 (set_thread_refcount): Use dec_refcount.
7921 (make_cleanup_restore_current_thread): Adjust.
7922 (thread_apply_all_command): Call inc_refcount.
7923 (_initialize_thread): Don't call
7924 observer_attach_thread_ptid_changed.
7925
7926 2017-04-10 Yao Qi <yao.qi@linaro.org>
7927
7928 * thread.c (delete_thread_1): Hoist code on marking thread as
7929 exited.
7930
7931 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7932
7933 * windows-nat.c (windows_detach): Initialize ptid with
7934 minus_one_ptid.
7935
7936 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7937
7938 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7939
7940 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7941
7942 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7943 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7944 (bfin_pseudo_register_write): Likewise
7945
7946 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7947
7948 * common/ptid.h (struct ptid): Change to...
7949 (class ptid_t): ... this.
7950 <ptid_t>: New constructors.
7951 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7952 matches>: New methods.
7953 <make_null, make_minus_one>: New static methods.
7954 <pid>: Rename to...
7955 <m_pid>: ...this.
7956 <lwp>: Rename to...
7957 <m_lwp>: ...this.
7958 <tid>: Rename to...
7959 <m_tid>: ...this.
7960 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7961 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7962 as references, move comment to class ptid_t.
7963 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7964 ptid_t static methods.
7965 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7966 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7967 Take ptid arguments as references, implement using ptid_t methods.
7968 * unittests/ptid-selftests.c: New file.
7969 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7970 unittests/ptid-selftests.c.
7971 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7972
7973 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7974
7975 * python/python.c (python_run_simple_file): Cast mode literal to
7976 non-const char pointer as expected by PyFile_FromString.
7977
7978 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7979
7980 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7981 minus_one_ptid and null_ptid.
7982
7983 2017-04-05 Pedro Alves <palves@redhat.com>
7984
7985 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7986 * configure: Regenerate.
7987
7988 2017-04-05 Pedro Alves <palves@redhat.com>
7989
7990 * ada-exp.y (yyerror): Constify.
7991 * ada-lang.c (bound_name, get_selections)
7992 (ada_variant_discrim_type)
7993 (ada_variant_discrim_name, ada_value_struct_elt)
7994 (ada_lookup_struct_elt_type, is_unchecked_variant)
7995 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7996 (catch_ada_exception_command_split)
7997 (catch_ada_assert_command_split, catch_assert_command)
7998 (ada_op_name): Constify.
7999 * ada-lang.h (ada_yyerror, get_selections)
8000 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8001 * arc-tdep.c (arc_print_frame_cache): Constify.
8002 * arm-tdep.c (arm_skip_stub): Constify.
8003 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8004 (gen_aggregate_elt_ref): Constify.
8005 * bcache.c (print_bcache_statistics): Constify.
8006 * bcache.h (print_bcache_statistics): Constify.
8007 * break-catch-throw.c (catch_exception_command_1):
8008 * breakpoint.c (struct ep_type_description::description):
8009 Constify.
8010 (add_solib_catchpoint): Constify.
8011 (catch_fork_command_1): Add cast.
8012 (add_catch_command): Constify.
8013 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8014 Constify.
8015 * bsd-uthread.c (bsd_uthread_state): Constify.
8016 * buildsym.c (patch_subfile_names): Constify.
8017 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8018 Constify.
8019 * c-exp.y (yyerror): Constify.
8020 (token::oper): Constify.
8021 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8022 * c-varobj.c (cplus_describe_child): Constify.
8023 * charset.c (find_charset_names): Add cast.
8024 (find_charset_names): Constify array and add const_cast.
8025 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8026 (edit_command): Constify.
8027 * cli/cli-decode.c (lookup_cmd): Constify.
8028 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8029 Constify.
8030 (struct dump_context): Constify.
8031 (add_dump_command, restore_command): Constify.
8032 * cli/cli-script.c (get_command_line): Constify.
8033 * cli/cli-script.h (get_command_line): Constify.
8034 * cli/cli-utils.c (check_for_argument): Constify.
8035 * cli/cli-utils.h (check_for_argument): Constify.
8036 * coff-pe-read.c (struct read_pe_section_data): Constify.
8037 * command.h (lookup_cmd): Constify.
8038 * common/print-utils.c (decimal2str): Constify.
8039 * completer.c (gdb_print_filename): Constify.
8040 * corefile.c (set_gnutarget): Constify.
8041 * cp-name-parser.y (yyerror): Constify.
8042 * cp-valprint.c (cp_print_class_member): Constify.
8043 * cris-tdep.c (cris_register_name, crisv32_register_name):
8044 Constify.
8045 * d-exp.y (yyerror): Constify.
8046 (struct token::oper): Constify.
8047 * d-lang.h (d_yyerror): Constify.
8048 * dbxread.c (struct header_file_location::name): Constify.
8049 (add_old_header_file, add_new_header_file, last_function_name)
8050 (dbx_next_symbol_text, add_bincl_to_list)
8051 (find_corresponding_bincl_psymtab, set_namestring)
8052 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8053 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8054 * defs.h (command_line_input, print_address_symbolic)
8055 (deprecated_readline_begin_hook): Constify.
8056 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8057 Constify.
8058 * event-top.c (handle_line_of_input): Constify and add cast.
8059 * exceptions.c (catch_errors): Constify.
8060 * exceptions.h (catch_errors): Constify.
8061 * expprint.c (print_subexp_standard, op_string, op_name)
8062 (op_name_standard, dump_raw_expression, dump_raw_expression):
8063 * expression.h (op_name, op_string, dump_raw_expression):
8064 Constify.
8065 * f-exp.y (yyerror): Constify.
8066 (struct token::oper): Constify.
8067 (struct f77_boolean_val::name): Constify.
8068 * f-lang.c (f_word_break_characters): Constify.
8069 * f-lang.h (f_yyerror): Constify.
8070 * fork-child.c (fork_inferior): Add cast.
8071 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8072 (new_variant): Constify.
8073 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8074 * gdbarch.c: Regenerate.
8075 * gdbcore.h (set_gnutarget): Constify.
8076 * go-exp.y (yyerror): Constify.
8077 (token::oper): Constify.
8078 * go-lang.h (go_yyerror): Constify.
8079 * go32-nat.c (go32_sysinfo): Constify.
8080 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8081 * guile/scm-cmd.c (cmdscm_function): Constify.
8082 * guile/scm-param.c (pascm_param_value): Constify.
8083 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8084 (h8300sx_register_name): Constify.
8085 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8086 Constify.
8087 * ia64-tdep.c (ia64_register_names): Constify.
8088 * infcmd.c (construct_inferior_arguments): Constify.
8089 (path_command, attach_post_wait): Constify.
8090 * language.c (show_range_command, show_case_command)
8091 (unk_lang_error): Constify.
8092 * language.h (language_defn::la_error)
8093 (language_defn::la_name_of_this): Constify.
8094 * linespec.c (decode_line_2): Constify.
8095 * linux-thread-db.c (thread_db_err_str): Constify.
8096 * lm32-tdep.c (lm32_register_name): Constify.
8097 * m2-exp.y (yyerror): Constify.
8098 * m2-lang.h (m2_yyerror): Constify.
8099 * m32r-tdep.c (m32r_register_names): Constify and make static.
8100 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8101 * m88k-tdep.c (m88k_register_name): Constify.
8102 * macroexp.c (appendmem): Constify.
8103 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8104 (upgrade_type, parse_external, parse_partial_symbols)
8105 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8106 (new_symbol): Constify.
8107 * memattr.c (mem_info_command): Constify.
8108 * mep-tdep.c (register_name_from_keyword): Constify.
8109 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8110 Constify.
8111 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8112 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8113 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8114 cast.
8115 (mi_execute_async_cli_command): Constify.
8116 * mips-tdep.c (mips_register_name): Constify.
8117 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8118 (am33_register_name, am33_2_register_name)
8119 * moxie-tdep.c (moxie_register_names): Constify.
8120 * nat/linux-osdata.c (osdata_type): Constify fields.
8121 * nto-tdep.c (nto_parse_redirection): Constify.
8122 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8123 (lookup_child_selector): Constify.
8124 (objc_methcall::name): Constify.
8125 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8126 (lookup_struct_typedef): Constify.
8127 * objfiles.c (pc_in_section): Constify.
8128 * objfiles.h (pc_in_section): Constify.
8129 * p-exp.y (struct token::oper): Constify.
8130 (yyerror): Constify.
8131 * p-lang.h (pascal_yyerror): Constify.
8132 * parser-defs.h (op_name_standard): Constify.
8133 (op_print::string): Constify.
8134 (exp_descriptor::op_name): Constify.
8135 * printcmd.c (print_address_symbolic): Constify.
8136 * psymtab.c (print_partial_symbols): Constify.
8137 * python/py-breakpoint.c (stop_func): Constify.
8138 (bppy_get_expression): Constify.
8139 * python/py-cmd.c (cmdpy_completer::name): Constify.
8140 (cmdpy_function): Constify.
8141 * python/py-event.c (evpy_add_attribute)
8142 (gdbpy_initialize_event_generic): Constify.
8143 * python/py-event.h (evpy_add_attribute)
8144 (gdbpy_initialize_event_generic): Constify.
8145 * python/py-evts.c (add_new_registry): Constify.
8146 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8147 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8148 * python/py-inferior.c (get_buffer): Add cast.
8149 * python/py-param.c (parm_constant::name): Constify.
8150 * python/py-unwind.c (fprint_frame_id): Constify.
8151 * python/python.c (gdbpy_parameter_value): Constify.
8152 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8153 * remote.c (memory_packet_config::name): Constify.
8154 (show_packet_config_cmd, remote_write_bytes)
8155 (remote_buffer_add_string):
8156 * reverse.c (exec_reverse_once): Constify.
8157 * rs6000-tdep.c (variant::name, variant::description): Constify.
8158 * rust-exp.y (rustyyerror): Constify.
8159 * rust-lang.c (rust_op_name): Constify.
8160 * rust-lang.h (rustyyerror): Constify.
8161 * serial.h (serial_ops::name): Constify.
8162 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8163 (sh_sh3e_register_name, sh_sh2e_register_name)
8164 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8165 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8166 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8167 (sh_sh4al_dsp_register_name): Constify.
8168 * sh64-tdep.c (sh64_register_name): Constify.
8169 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8170 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8171 * stabsread.c (patch_block_stabs, read_type_number)
8172 (ref_map::stabs, ref_add, process_reference)
8173 (symbol_reference_defined, define_symbol, define_symbol)
8174 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8175 (read_one_struct_field, read_struct_fields, read_baseclasses)
8176 (read_tilde_fields, read_struct_type, read_array_type)
8177 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8178 (read_huge_number, read_range_type, read_args, common_block_start)
8179 (find_name_end): Constify.
8180 * stabsread.h (common_block_start, define_symbol)
8181 (process_one_symbol, symbol_reference_defined, ref_add):
8182 * symfile.c (get_section_index, add_symbol_file_command):
8183 * symfile.h (get_section_index): Constify.
8184 * target-descriptions.c (tdesc_type::name): Constify.
8185 (tdesc_free_type): Add cast.
8186 * target.c (find_default_run_target):
8187 (add_deprecated_target_alias, find_default_run_target)
8188 (target_announce_detach): Constify.
8189 (do_option): Constify.
8190 * target.h (add_deprecated_target_alias): Constify.
8191 * thread.c (print_thread_info_1): Constify.
8192 * top.c (deprecated_readline_begin_hook, command_line_input):
8193 Constify.
8194 (init_main): Add casts.
8195 * top.h (handle_line_of_input): Constify.
8196 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8197 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8198 (tfind_command): Rename to ...
8199 (tfind_command_1): ... this and constify.
8200 (tfind_command): New function.
8201 (tfind_end_command, tfind_start_command): Adjust.
8202 (encode_source_string): Constify.
8203 * tracepoint.h (encode_source_string): Constify.
8204 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8205 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8206 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8207 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8208 * tui/tui-win.c (parse_scrolling_args): Constify.
8209 * tui/tui-windata.c (tui_erase_data_content): Constify.
8210 * tui/tui-windata.h (tui_erase_data_content): Constify.
8211 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8212 * tui/tui.c (tui_enable): Add cast.
8213 * utils.c (defaulted_query): Constify.
8214 (init_page_info): Add cast.
8215 (puts_debug, subset_compare): Constify.
8216 * utils.h (subset_compare): Constify.
8217 * varobj.c (varobj_format_string): Constify.
8218 * varobj.h (varobj_format_string): Constify.
8219 * vax-tdep.c (vax_register_name): Constify.
8220 * windows-nat.c (windows_detach): Constify.
8221 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8222 * xml-support.c (gdb_xml_end_element): Constify.
8223 * xml-tdesc.c (tdesc_start_reg): Constify.
8224 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8225 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8226 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8227
8228 2017-04-05 Pedro Alves <palves@redhat.com>
8229
8230 * proc-api.c (struct trans): Constify.
8231 (procfs_note): Constify.
8232 * proc-events.c (struct trans, syscall_table):
8233 * proc-flags.c (struct trans): Constify.
8234 * proc-utils.h (procfs_note): Constify.
8235 * proc-why.c (struct trans): Constify.
8236 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8237 (procfs_detach): Constify.
8238 * sol-thread.c (struct string_map): Constify.
8239 (td_err_string, td_state_string): Constify.
8240
8241 2017-04-05 Pedro Alves <palves@redhat.com>
8242
8243 * proc-api.c (procfs_filename): Don't initialize
8244 procfs_filename.
8245 (prepare_to_trace): Assume procfs_filename is non-NULL.
8246 (_initialize_proc_api): Give procfs_filename a default value here.
8247
8248 2017-04-05 Pedro Alves <palves@redhat.com>
8249
8250 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8251 'cond_string' parameter.
8252 (extract_exception_regexp): Constify 'string' parameter.
8253 (catch_exception_command_1): Constify.
8254 * breakpoint.c (init_catchpoint)
8255 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8256 parameter.
8257 (ep_parse_optional_if_clause, catch_fork_command_1)
8258 (catch_exec_command_1): Constify.
8259 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8260 parameter.
8261 (ep_parse_optional_if_clause): Constify.
8262 * cli/cli-utils.c (remove_trailing_whitespace)
8263 (check_for_argument): Constify.
8264 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8265 non-const overload.
8266 (check_for_argument): Likewise.
8267
8268 2017-04-05 Pedro Alves <palves@redhat.com>
8269
8270 * event-top.c (command_line_handler): Add cast to execute_command
8271 call.
8272 * record-btrace.c (cmd_record_btrace_bts_start)
8273 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8274 (cmd_record_btrace_start): Add cast to execute_command call.
8275 * record-full.c (record_full_goto_insn):
8276 * record.c (record_start, record_stop): Add cast to
8277 execute_command_to_string calls.
8278 (cmd_record_start): Add cast to execute_command calls.
8279
8280 2017-04-05 Pedro Alves <palves@redhat.com>
8281
8282 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8283 static inline function.
8284 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8285 array and use gdb_PyArg_ParseTupleAndKeywords.
8286 * python/py-cmd.c (cmdpy_init): Likewise.
8287 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8288 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8289 (infpy_search_memory): Likewise.
8290 * python/py-objfile.c (objfpy_add_separate_debug_file)
8291 (gdbpy_lookup_objfile): Likewise.
8292 * python/py-symbol.c (gdbpy_lookup_symbol)
8293 (gdbpy_lookup_global_symbol): Likewise.
8294 * python/py-type.c (gdbpy_lookup_type): Likewise.
8295 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8296 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8297 Likewise.
8298
8299 2017-04-05 Pedro Alves <palves@redhat.com>
8300
8301 * python/python-internal.h (gdb_PyGetSetDef): New type.
8302 * python/py-block.c (block_object_getset)
8303 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8304 * python/py-event.c (event_object_getset)
8305 (finish_breakpoint_object_getset): Likewise.
8306 * python/py-inferior.c (inferior_object_getset): Likewise.
8307 * python/py-infthread.c (thread_object_getset): Likewise.
8308 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8309 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8310 * python/py-objfile.c (objfile_getset): Likewise.
8311 * python/py-progspace.c (pspace_getset): Likewise.
8312 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8313 Likewise.
8314 * python/py-record.c (recpy_record_getset): Likewise.
8315 * python/py-symbol.c (symbol_object_getset): Likewise.
8316 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8317 Likewise.
8318 * python/py-type.c (type_object_getset, field_object_getset):
8319 Likewise.
8320 * python/py-value.c (value_object_getset): Likewise.
8321
8322 2017-04-05 Pedro Alves <palves@redhat.com>
8323
8324 * python/python-internal.h (gdb_PyObject_CallMethod)
8325 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8326 New functions.
8327 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8328 (PySys_GetObject, PySys_SetPath): New macros.
8329
8330 2017-04-05 Pedro Alves <palves@redhat.com>
8331
8332 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8333 info_osdata_command.
8334 * osdata.c (info_osdata_command): Rename to ...
8335 (info_osdata): ... this. Constify 'type' parameter, and remove
8336 the 'from_tty' parameter. Accept NULL TYPE.
8337 (info_osdata_command): New function.
8338 * osdata.h (info_osdata_command): Remove declaration.
8339 (info_osdata): New declaration.
8340
8341 2017-04-05 Pedro Alves <palves@redhat.com>
8342
8343 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8344 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8345 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8346 parameter.
8347 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8348 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8349 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8350 parameter.
8351 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8352 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8353 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8354 (mi_cmd_file_list_exec_source_files)
8355 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8356 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8357 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8358 parameter.
8359 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8360 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8361 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8362 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8363 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8364 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8365 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8366 'command' parameter.
8367 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8368 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8369 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8370 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8371 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8372 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8373 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8374 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8375 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8376 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8377 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8378 parameter.
8379 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8380 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8381 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8382 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8383 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8384 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8385 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8386 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8387 (mi_cmd_data_list_changed_registers)
8388 (mi_cmd_data_write_register_values)
8389 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8390 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8391 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8392 (mi_cmd_list_features, mi_cmd_list_target_features)
8393 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8394 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8395 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8396 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8397 (mi_cmd_trace_frame_collected): Constify 'command'
8398 parameter.
8399 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8400 'command' parameter.
8401
8402 2017-04-05 Pedro Alves <palves@redhat.com>
8403
8404 * ada-lang.c (ada_completer_word_break_characters): Now a const
8405 array.
8406 (ada_get_gdb_completer_word_break_characters): Constify.
8407 * completer.c (gdb_completer_command_word_break_characters)
8408 (gdb_completer_file_name_break_characters)
8409 (gdb_completer_quote_characters): Now const arrays.
8410 (get_gdb_completer_quote_characters): Constify.
8411 (set_rl_completer_word_break_characters): New function.
8412 (set_gdb_completion_word_break_characters)
8413 (complete_line_internal): Use it.
8414 * completer.h (get_gdb_completer_quote_characters): Constify.
8415 (set_rl_completer_word_break_characters): Declare.
8416 * f-lang.c (f_word_break_characters): Constify.
8417 * language.c (default_word_break_characters): Constify.
8418 * language.h (language_defn::la_word_break_characters): Constify.
8419 (default_word_break_characters): Constify.
8420 * top.c (init_main): Use set_rl_completer_word_break_characters.
8421
8422 2017-04-05 Pedro Alves <palves@redhat.com>
8423
8424 * aix-thread.c (aix_thread_pid_to_str)
8425 (aix_thread_extra_thread_info): Constify.
8426 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8427 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8428 (bsd_uthread_pid_to_str): Constify.
8429 * corelow.c (core_pid_to_str): Constify.
8430 * darwin-nat.c (darwin_pid_to_str): Constify.
8431 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8432 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8433 Constify.
8434 * gnu-nat.c (gnu_pid_to_str): Constify.
8435 * go32-nat.c (go32_pid_to_str): Constify.
8436 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8437 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8438 * inferior.c (inferior_pid_to_str): Constify.
8439 * linux-nat.c (linux_nat_pid_to_str): Constify.
8440 * linux-tdep.c (linux_core_pid_to_str): Constify.
8441 * linux-thread-db.c (thread_db_pid_to_str)
8442 (thread_db_extra_thread_info): Constify.
8443 * nto-tdep.c (nto_extra_thread_info): Constify.
8444 * nto-tdep.h (nto_extra_thread_info): Constify.
8445 * obsd-nat.c (obsd_pid_to_str): Constify.
8446 * procfs.c (procfs_pid_to_str): Constify.
8447 * ravenscar-thread.c (ravenscar_extra_thread_info)
8448 (ravenscar_pid_to_str): Constify.
8449 * remote-sim.c (gdbsim_pid_to_str): Constify.
8450 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8451 Constify.
8452 * sol-thread.c (solaris_pid_to_str): Constify.
8453 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8454 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8455 * target.c (default_pid_to_str, target_pid_to_str)
8456 (normal_pid_to_str, default_pid_to_str): Constify.
8457 * target.h (target_ops::to_pid_to_str)
8458 (target_ops::to_extra_thread_info): Constify.
8459 (target_pid_to_str, normal_pid_to_str): Constify.
8460 * windows-nat.c (windows_pid_to_str): Constify.
8461 * gdbarch.sh (core_pid_to_str): Constify.
8462 * target-delegates.c: Regenerate.
8463 * gdbarch.h, gdbarch.c: Regenerate.
8464
8465 2017-04-05 Pedro Alves <palves@redhat.com>
8466
8467 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8468 the memory of the temporary warning_pre_print override.
8469 * utils.c (warning_pre_print): Constify.
8470 * utils.h (warning_pre_print): Constify.
8471
8472 2017-04-05 Pedro Alves <palves@redhat.com>
8473
8474 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8475 (shell_command): New function.
8476 (make_command): Use std::string.
8477 (init_cli_cmds): Register shell_command instead of shell_escape.
8478
8479 2017-04-05 Pedro Alves <palves@redhat.com>
8480
8481 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8482 * tracepoint.c (default_collect): Don't initialize.
8483
8484 2017-04-05 Pedro Alves <palves@redhat.com>
8485
8486 * macroexp.c (macro_buffer::shared): Now a bool.
8487 (init_buffer): Update.
8488 (init_shared_buffer): Constify 'addr' parameter.
8489 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8490 casts.
8491
8492 2017-04-05 Pedro Alves <palves@redhat.com>
8493
8494 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8495 * disasm.c (set_disassembler_options): Constify local.
8496 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8497
8498 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8499
8500 PR gdb/21352
8501 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8502 option.
8503
8504 2017-04-05 Yao Qi <yao.qi@linaro.org>
8505
8506 * frame.c (frame_unwind_register_unsigned): Call
8507 frame_unwind_register_value.
8508
8509 2017-04-05 Yao Qi <yao.qi@linaro.org>
8510
8511 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8512 Use gdb_test_multiple, and don't match anchor.
8513
8514 2017-04-05 Pedro Alves <palves@redhat.com>
8515
8516 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8517 (Write After Approval): Remove Simon Marchi.
8518
8519 2017-04-05 Pedro Alves <palves@redhat.com>
8520
8521 * common/gdb_optional.h (optional::optional): Make constexpr and
8522 initialize m_dummy.
8523
8524 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8525
8526 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8527 (amd64fbsd_jmp_buf_reg_offset): Remove.
8528 (amd64fbsd_supply_uthread): Remove function.
8529 (amd64fbsd_collect_uthread): Remove function.
8530 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8531 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8532 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8533 (fbsd-nat.c): Update comment.
8534 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8535 (i386fbsd_jmp_buf_reg_offset): Remove.
8536 (i386fbsd_supply_uthread): Remove function.
8537 (i386fbsd_collect_uthread): Remove function.
8538 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8539
8540 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8541
8542 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8543 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8544 * NEWS: Mention that support for FreeBSD/alpha was removed.
8545 * alpha-fbsd-tdep.c: Delete file.
8546 * config/alpha/fbsd.mh: Delete file.
8547 * configure.host: Delete alpha*-*-freebsd* and
8548 alpha*-*-kfreebsd*-gnu.
8549 * configure.tgt: Delete alpha*-*-freebsd* and
8550 alpha*-*-kfreebsd*-gnu.
8551
8552 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8553
8554 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8555 amd64bsd_store_inferior_registers): Use ptid from regcache.
8556
8557 2017-04-04 Pedro Alves <palves@redhat.com>
8558
8559 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8560 data fields, make them private and add "m_" prefixes.
8561 (lnp_state_machine::lnp_state_machine): New ctor.
8562 (record_line, check_line_address, handle_set_discriminator)
8563 (handle_set_address, handle_advance_pc, handle_special_opcode)
8564 (handle_advance_line, handle_set_file, handle_negate_stmt)
8565 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8566 (end_sequence, advance_line): New methods.
8567 (m_gdbarch, m_record_lines_p): New fields.
8568 (lnp_reader_state): Delete.
8569 (dwarf_record_line): Rename to ...
8570 (lnp_state_machine::record_line): ... adjust.
8571 (init_lnp_state_machine): Delete.
8572 (lnp_state_machine::lnp_state_machine): New.
8573 (check_line_address): Rename to ...
8574 (lnp_state_machine::check_line_address): This.
8575 (dwarf_decode_lines_1): Remove reference to "reader_state".
8576 Adjust lnp_state_machine having a non-default ctor. Use bool.
8577 State machine internal state manipulation moved to
8578 lnp_state_machine methods.
8579
8580 2017-04-04 Pedro Alves <palves@redhat.com>
8581
8582 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8583 unittests/offset-type-selftests.c.
8584 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8585 * common/offset-type.h: New file.
8586 * common/preprocessor.h: New file.
8587 * common/traits.h: New file.
8588 * common/valid-expr.h: New file.
8589 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8590 sect_offset and cu_offset strong typedefs throughout.
8591 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8592 typedefs throughout.
8593 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8594 sect_offset and cu_offset strong typedefs throughout.
8595 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8596 typedefs throughout.
8597 * gdbtypes.h: Include "common/offset-type.h".
8598 (cu_offset): Now an offset type (strong typedef) instead of a
8599 struct.
8600 (sect_offset): Likewise.
8601 (union call_site_parameter_u): Rename "param_offset" field to
8602 "param_cu_off".
8603 * unittests/offset-type-selftests.c: New file.
8604
8605 2017-04-04 Pedro Alves <palves@redhat.com>
8606
8607 * common/underlying.h: New file.
8608 * dwarf2read.c: Include "common/gdb_optional.h" and
8609 "common/underlying.h".
8610 (dir_index, file_name_index): New types.
8611 (file_entry): Use them.
8612 (file_entry::include): Use to_underlying.
8613 (line_header::add_file_name): Use dir_index.
8614 (read_formatted_entries): Use gdb::optional. Read form before
8615 writting to file_entry.
8616 (dwarf_decode_line_header): Use dir_index.
8617 (lnp_state_machine::current_file): Use to_underlying.
8618 (lnp_state_machine::file): Change type to file_name_index.
8619 (dwarf_record_line): Use to_underlying.
8620 (init_lnp_state_machine): Use file_name_index.
8621 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8622
8623 2017-04-04 Pedro Alves <palves@redhat.com>
8624
8625 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8626 operator bool, has_value and get methods.
8627
8628 2017-04-04 Pedro Alves <palves@redhat.com>
8629
8630 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8631 fields.
8632 (line_header): Initialize all data fields. Change type of
8633 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8634 Change type of include_dirs to std::vector<const char *>. Remove
8635 num_include_dirs, include_dirs_size. Change type of file_names to
8636 std::vector<file_entry>. Remove num_file_names, file_names_size.
8637 (line_header::line_header): New.
8638 (line_header::add_include_dir, line_header::add_file_name): New
8639 methods.
8640 (line_header::include_dir_at): Remove NULL check.
8641 (line_header::file_name_at): Add const overload.
8642 (line_header_up): New unique_ptr typedef.
8643 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8644 std::vector. Remove free_line_header call.
8645 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8646 free_line_header call.
8647 (free_cu_line_header): Delete.
8648 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8649 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8650 Adjust to use std::vector.
8651 (free_line_header): Delete.
8652 (free_line_header_voidp): Use delete.
8653 (add_include_dir): Replace with ...
8654 (line_header::add_include_dir): ... this method. Use std::vector.
8655 (add_file_name): Replace with ...
8656 (line_header::add_file_name): ... this method. Use std::vector.
8657 (add_include_dir_stub): Delete.
8658 (read_formatted_entries): Remove memset.
8659 (dwarf_decode_line_header): Return a line_header_up instead of a
8660 raw pointer. Remove cleanup handling. Pass lambdas to
8661 read_formatted_entries. Adjust to use line_header methods.
8662 (dwarf_decode_lines_1): Adjust to use line_header methods.
8663 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8664 use std::vector.
8665
8666 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8667
8668 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8669 instead of struct ptid.
8670
8671 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8672
8673 * frame.c (get_frame_register_bytes): Unwind using value.
8674 (put_frame_register_bytes): Likewise.
8675
8676 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8677
8678 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8679 aggregate-like.
8680
8681 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8682
8683 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8684
8685 2017-03-29 Yao Qi <yao.qi@linaro.org>
8686
8687 * gdbthread.h (struct thread_info): Declare constructor and
8688 destructor. Add some in-class member initializers.
8689 * thread.c (free_thread): Remove.
8690 (init_thread_list): Call delete instead of free_thread.
8691 (new_thread): Call thread_info constructor.
8692 (thread_info::thread_info): New function.
8693 (thread_info::~thread_info): New function.
8694 (delete_thread_1): Call delete instead of free_thread.
8695 (make_cleanup_restore_current_thread): Move tp and frame to
8696 inner block.
8697
8698 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8699
8700 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8701 (arc_skip_prologue): Likewise.
8702 (arc_make_frame_cache): Likewise.
8703 (arc_pv_get_operand): New function.
8704 (arc_is_in_prologue): Likewise.
8705 (arc_analyze_prologue): Likewise.
8706 (arc_print_frame_cache): Likewise.
8707 (MAX_PROLOGUE_LENGTH): New constant.
8708
8709 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8710
8711 * configure.tgt: Add arc-insn.o.
8712 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8713 (dump_arc_instruction_command): New function.
8714 (arc_fprintf_disasm): Likewise.
8715 (arc_disassemble_info): Likewise.
8716 (arc_insn_get_operand_value): Likewise.
8717 (arc_insn_get_operand_value_signed): Likewise.
8718 (arc_insn_get_memory_base_reg): Likewise.
8719 (arc_insn_get_memory_offset): Likewise.
8720 (arc_insn_get_branch_target): Likewise.
8721 (arc_insn_dump): Likewise.
8722 (arc_insn_get_linear_next_pc): Likewise.
8723 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8724 (arc_disassemble_info): Likewise.
8725 (arc_insn_get_branch_target): Likewise.
8726 (arc_insn_get_linear_next_pc): Likewise.
8727 * NEWS: Mention new "maint print arc arc-instruction".
8728
8729 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8730
8731 * arc-tdep (maintenance_print_arc_list): New variable.
8732 (maintenance_print_arc_command): New function.
8733
8734 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8735
8736 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8737 Add "limm" and "reserved".
8738 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8739 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8740 * arc-tdep.h (arc_regnum): Likewise.
8741
8742 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8743
8744 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8745 for THREADPTR register.
8746 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8747 register.
8748 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8749 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8750 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8751
8752 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8753
8754 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8755 registers above gdbarch_num_regs (gdbarch) as privileged in
8756 call0 ABI.
8757
8758 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8759
8760 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8761 for a single specified register or for all registers in
8762 a0_base..a0_base + C0_NREGS range.
8763 (supply_gregset_reg): Call regcache_raw_supply for a single
8764 specified register or for all registers in a0_base..a0_base +
8765 C0_NREGS range.
8766
8767 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8768
8769 * arch/xtensa.h (C0_NREGS): Add definition.
8770 * xtensa-tdep.c (C0_NREGS): Remove definition.
8771
8772 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8773
8774 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8775 Drop xtensa_default_isa initialization.
8776 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8777
8778 2017-03-27 Pedro Alves <palves@redhat.com>
8779
8780 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8781 (file_entry::include_dir): New method.
8782 (line_header::include_dir_at, line_header::file_name_at): New
8783 methods.
8784 (setup_type_unit_groups, setup_type_unit_groups)
8785 (psymtab_include_file_name): Simplify using the new methods.
8786 (lnp_state_machine) <the_line_header>: New field.
8787 <file>: Add comment.
8788 (lnp_state_machine::current_file): New method.
8789 (dwarf_record_line): Simplify using the new methods.
8790 (init_lnp_state_machine): Initialize the "the_line_header" field.
8791 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8792 Simplify using the new methods.
8793
8794 2017-03-27 Pedro Alves <palves@redhat.com>
8795
8796 * cp-name-parser.y (make_empty): Delete.
8797 (demangler_special, nested_name, ptr_operator, array_indicator)
8798 (direct_declarator, declarator_1): Use fill_comp instead of
8799 make_empty.
8800
8801 2017-03-27 Pedro Alves <palves@redhat.com>
8802
8803 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8804 to ATTRIBUTE_PRINTF.
8805 * solib-target.c (library_list_start_list): Print "string" not
8806 "version".
8807 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8808 gdb_xml_error call.
8809
8810 2017-03-27 Pedro Alves <palves@redhat.com>
8811
8812 * dwarf2read.c (struct file_and_directory): New.
8813 (dwarf2_get_dwz_file): Adjust to use std::string.
8814 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8815 (find_file_and_directory): Adjust to return a file_and_directory
8816 object.
8817 (read_file_scope): Adjust to use file_and_directory. Remove
8818 make_cleanup/do_cleanups calls.
8819 (open_and_init_dwp_file): Adjust to use std::string. Remove
8820 make_cleanup/do_cleanups calls.
8821 * python/python.c (do_start_initialization): Adjust to ldirname
8822 returning a std::string.
8823 * utils.c (ldirname): Now returns a std::string.
8824 * utils.h (ldirname): Change return type to std::string.
8825 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8826 returning a std::string.
8827 * xml-tdesc.c (file_read_description_xml): Likewise.
8828
8829 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8830
8831 * regcache.c (regcache_debug_print_register): New function.
8832 * regcache.h (regcache_debug_print_register): New declaration.
8833 * target.c (debug_print_register): Remove.
8834 (target_fetch_registers): Call regcache_debug_print_register.
8835 (target_store_registers): Likewise.
8836
8837 2017-03-24 Pádraig Brady <pbrady@fb.com>
8838
8839 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8840 reference beyond the 'lh->include_dirs' array before accessing to
8841 it.
8842 (psymtab_include_file_name): Likewise.
8843 (dwarf_decode_lines_1): Likewise.
8844 (dwarf_decode_lines): Likewise.
8845 (file_file_name): Likewise.
8846
8847 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8848
8849 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8850 inferior_ptid.
8851 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8852 ps_lsetfpregs): Likewise.
8853 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8854 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8855 ps_lsetfpregs): Likewise.
8856 * target.c (target_fetch_registers, target_store_registers):
8857 Remove asserts.
8858
8859 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8860
8861 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8862
8863 2017-03-23 Yao Qi <yao.qi@linaro.org>
8864
8865 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8866 (_initialize_aarch64_tdep): Register it.
8867 (aarch64_record_load_store): Handle PRFM instruction.
8868 (aarch64_process_record_test): New function.
8869
8870 2017-03-23 Yao Qi <yao.qi@linaro.org>
8871
8872 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8873 indentation.
8874
8875 2017-03-23 Yao Qi <yao.qi@linaro.org>
8876
8877 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8878
8879 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8880
8881 python/python.c (do_start_initialization): Fix memory leak.
8882
8883 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8884
8885 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8886 using get_ptrace_pid.
8887 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8888 inferior_ptid.
8889 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8890 inferior_ptid instead of pid.
8891
8892 2017-03-22 Yao Qi <yao.qi@linaro.org>
8893
8894 * aarch64-tdep.c: Wrap locally used classes in anonymous
8895 namespace.
8896 * arm-tdep.c: Likewise.
8897 * linespec.c: Likewise.
8898 * ui-out.c: Likewise.
8899
8900 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8901
8902 PR gdb/19637
8903 * python/lib/gdb/printer/bound_registers.py: Import sys.
8904
8905 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8906
8907 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8908 windows_thread_info parameter and use it instead of
8909 current_thread.
8910 (windows_fetch_inferior_registers): Don't set current_thread,
8911 pass the thread to do_windows_fetch_inferior_registers. Use
8912 ptid from regcache instead of inferior_ptid.
8913 (do_windows_store_inferior_registers): Add windows_thread_info
8914 parameter and use it instead of current_thread.
8915 (windows_store_inferior_registers): Don't set current_thread,
8916 pass the thread to do_windows_store_inferior_registers. Use
8917 ptid from regcache instead of inferior_ptid.
8918
8919 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8920
8921 * ser-mingw.c (ser_windows_raw): Remove reference to
8922 struct serial::current_timeout.
8923
8924 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8925
8926 PR tdep/20928
8927 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8928 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8929 (sparc64_fsr_type): Fix %fsr decoding.
8930
8931 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8932
8933 * python/py-record-btrace.c (btpy_insn_data): Change return type
8934 for Python 2.
8935
8936 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8937
8938 * spu-linux-nat.c (spu_fetch_inferior_registers,
8939 spu_store_inferior_registers): Use ptid from regcache, set and
8940 restore inferior_ptid.
8941 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8942 Likewise.
8943
8944 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8945
8946 * i386-linux-nat.c (fetch_register, store_register,
8947 i386_linux_fetch_inferior_registers,
8948 i386_linux_store_inferior_registers): Use ptid from regcache.
8949 * ia64-linux-nat.c (ia64_linux_fetch_register,
8950 ia64_linux_store_register): Likewise.
8951 * inf-ptrace.c (inf_ptrace_fetch_register,
8952 inf_ptrace_store_register): Likewise.
8953 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8954 m32r_linux_store_inferior_registers): Likewise.
8955 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8956 m68kbsd_store_inferior_registers): Likewise.
8957 * m68k-linux-nat.c (fetch_register, store_register,
8958 m68k_linux_fetch_inferior_registers,
8959 m68k_linux_store_inferior_registers): Likewise.
8960 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8961 m88kbsd_store_inferior_registers): Likewise.
8962 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8963 mips_fbsd_store_inferior_registers): Likewise.
8964 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8965 mips64_linux_regsets_store_registers): Likewise.
8966 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8967 mipsnbsd_store_inferior_registers): Likewise.
8968 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8969 mips64obsd_store_inferior_registers): Likewise.
8970 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8971 Likewise.
8972 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8973 ppcfbsd_store_inferior_registers): Likewise.
8974 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8975 ppc_linux_store_inferior_registers): Likewise.
8976 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8977 ppcnbsd_store_inferior_registers): Likewise.
8978 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8979 ppcobsd_store_registers): Likewise.
8980 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8981 Likewise.
8982 * ravenscar-thread.c (ravenscar_fetch_registers,
8983 ravenscar_store_registers, ravenscar_prepare_to_store):
8984 Likewise.
8985 * record-btrace.c (record_btrace_fetch_registers,
8986 record_btrace_store_registers, record_btrace_prepare_to_store):
8987 Likewise.
8988 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8989 Lookup inferior using ptid from regcache, instead of
8990 current_inferior.
8991 * remote.c (remote_fetch_registers, remote_store_registers): Use
8992 ptid from regcache.
8993 * rs6000-nat.c (fetch_register, store_register): Likewise.
8994 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8995 s390_linux_store_inferior_registers): Likewise.
8996 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8997 shnbsd_store_inferior_registers): Likewise.
8998 * sol-thread.c (sol_thread_fetch_registers,
8999 sol_thread_store_registers): Likewise.
9000 * sparc-nat.c (sparc_fetch_inferior_registers,
9001 sparc_store_inferior_registers): Likewise.
9002 * tilegx-linux-nat.c (fetch_inferior_registers,
9003 store_inferior_registers): Likewise.
9004 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9005 vaxbsd_store_inferior_registers): Likewise.
9006 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9007 store_xtregs): Likewise.
9008
9009 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9010
9011 PR gdb/14441
9012 * NEWS: Mention support for rvalue references in GDB and python.
9013 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9014 supports both lvalue and rvalue references.
9015
9016 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9017
9018 PR gdb/14441
9019 * gdbtypes.c (rank_one_type): Implement overloading
9020 resolution rules regarding rvalue references.
9021
9022 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9023
9024 PR gdb/14441
9025 * aarch64-tdep.c (aarch64_type_align)
9026 (aarch64_extract_return_value, aarch64_store_return_value): Change
9027 lvalue reference type checks to general reference type checks.
9028 * amd64-tdep.c (amd64_classify): Likewise.
9029 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9030 Likewise.
9031 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9032 (arm_store_return_value): Likewise.
9033 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9034 * c-typeprint.c (c_print_type): Likewise.
9035 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9036 (cplus_number_of_children, cplus_describe_child): Likewise.
9037 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9038 * completer.c (expression_completer): Likewise.
9039 * cp-support.c (make_symbol_overload_list_adl_namespace):
9040 Likewise.
9041 * darwin-nat-info.c (info_mach_region_command): Likewise.
9042 * dwarf2loc.c (entry_data_value_coerce_ref)
9043 (value_of_dwarf_reg_entry): Likewise.
9044 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9045 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9046 Likewise.
9047 * findvar.c (extract_typed_address, store_typed_address):
9048 Likewise.
9049 * gdbtypes.c (rank_one_type): Likewise.
9050 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9051 * infcall.c (value_arg_coerce): Likewise.
9052 * language.c (pointer_type): Likewise.
9053 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9054 Likewise.
9055 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9056 * mn10300-tdep.c (mn10300_type_align): Likewise.
9057 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9058 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9059 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9060 Likewise.
9061 * printcmd.c (print_formatted, x_command): Likewise.
9062 * python/py-type.c (typy_get_composite, typy_template_argument):
9063 Likewise.
9064 * python/py-value.c (valpy_referenced_value)
9065 (valpy_get_dynamic_type, value_has_field): Likewise.
9066 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9067 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9068 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9069 * spu-tdep.c (spu_scalar_value_p): Likewise.
9070 * symtab.c (lookup_symbol_aux): Likewise.
9071 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9072 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9073 Likewise.
9074 * valops.c (value_cast_pointers, value_cast)
9075 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9076 (value_struct_elt, value_struct_elt_bitpos)
9077 (value_find_oload_method_list, find_overload_match)
9078 (value_rtti_indirect_type): Likewise.
9079 * valprint.c (val_print_scalar_type_p, generic_val_print):
9080 Likewise.
9081 * value.c (value_actual_type, value_as_address, unpack_long)
9082 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9083 (coerce_ref): Likewise.
9084 * varobj.c (varobj_get_value_type): Likewise.
9085
9086 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9087
9088 PR gdb/14441
9089 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9090 table of constants.
9091 * python/lib/gdb/command/explore.py: Support exploring values
9092 of rvalue reference types.
9093 * python/lib/gdb/types.py: Implement get_basic_type() for
9094 rvalue reference types.
9095 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9096 constant.
9097 * python/py-value.c (valpy_getitem): Add an rvalue reference
9098 check.
9099 (valpy_reference_value): Add new parameter "refcode".
9100 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9101 New wrappers for valpy_reference_value().
9102 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9103 (gdbpy_invoke_xmethod): Likewise.
9104
9105 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9106
9107 PR gdb/14441
9108 * dwarf2read.c (process_die, read_type_die_1): Handle the
9109 DW_TAG_rvalue_reference_type DIE.
9110 (read_tag_reference_type): Add new parameter "refcode".
9111
9112 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9113
9114 PR gdb/14441
9115 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9116 (c_type_print_modifier, c_type_print_varspec_suffix)
9117 (c_type_print_base): Support printing rvalue reference types.
9118 * c-valprint.c (c_val_print, c_value_print): Support printing
9119 rvalue reference values.
9120
9121 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9122
9123 PR gdb/14441
9124 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9125 typename.
9126 * cp-support.c (replace_typedefs): Handle
9127 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9128 * python/py-type.c (typy_lookup_type): Likewise.
9129
9130 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9131
9132 PR gdb/14441
9133 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9134 * parse.c (insert_type): Change assert statement.
9135 (follow_types): Handle rvalue reference types.
9136 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9137 constant.
9138
9139 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9140
9141 PR gdb/14441
9142 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9143 value_ref() interface.
9144 * c-valprint.c (c_value_print): Likewise.
9145 * infcall.c (value_arg_coerce): Likewise.
9146 * python/py-value.c (valpy_reference_value): Likewise.
9147 * valops.c (value_cast, value_reinterpret_cast)
9148 (value_dynamic_cast, typecmp): Likewise.
9149 (value_ref): Parameterize by kind of return value reference type.
9150 * value.h (value_ref): Add new parameter "refcode".
9151
9152 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9153
9154 PR gdb/14441
9155 * dwarf2read.c (read_tag_reference_type): Use
9156 lookup_lvalue_reference_type() instead of lookup_reference_type().
9157 * eval.c (evaluate_subexp_standard): Likewise.
9158 * f-exp.y: Likewise.
9159 * gdbtypes.c (make_reference_type, lookup_reference_type):
9160 Generalize with rvalue reference types.
9161 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9162 convenience wrappers for lookup_reference_type().
9163 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9164 reference kind parameter.
9165 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9166 wrappers for lookup_reference_type().
9167 * guile/scm-type.c (gdbscm_type_reference): Use
9168 lookup_lvalue_reference_type() instead of lookup_reference_type().
9169 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9170 * parse.c (follow_types): Likewise.
9171 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9172 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9173 Likewise.
9174 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9175 (gdbpy_invoke_xmethod): Likewise.
9176 * stabsread.c: Provide extra argument to make_reference_type()
9177 call.
9178 * valops.c (value_ref, value_rtti_indirect_type): Use
9179 lookup_lvalue_reference_type() instead of lookup_reference_type().
9180
9181 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9182
9183 PR gdb/14441
9184 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9185 (TYPE_IS_REFERENCE): New macro.
9186 (struct type): Add rvalue_reference_type field.
9187 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9188
9189 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9190
9191 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9192 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9193 New function definition.
9194 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9195 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9196 New function declaration.
9197 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9198 * mi/mi-interp.h: New file.
9199 * solib.c (info_sharedlibrary_command): Replace for loop with
9200 ALL_SO_LIBS macro
9201 * solib.h (update_solib_list): New function declaration.
9202 (so_list_head): Move macro.
9203 * solist.h (ALL_SO_LIBS): New macro.
9204
9205 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9206
9207 * infcmd.c (post_create_inferior): Remove unused argument in
9208 call to solib_add.
9209 * remote.c (remote_start_remote): Likewise.
9210 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9211 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9212 (enable_break): Likewise.
9213 * solib.c (update_solib_list): Remove unused target argument
9214 and its documentation.
9215 (solib_add): Remove unused target argument. Remove unused
9216 argument in call to update_solib_list.
9217 (info_sharedlibrary_command): Remove unused argument in call
9218 to update_solib_list.
9219 (sharedlibrary_command): Remove unused argument in call to
9220 solib_add.
9221 (handle_solib_event): Likewise.
9222 (reload_shared_libraries): Likewise.
9223 * solib.h (solib_add): Remove unused target argument.
9224
9225 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9226
9227 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9228 (s390_displaced_step_fixup): Cover relative branches with the
9229 default fixup handling. This fixes lack of support for some
9230 relative branch instructions.
9231
9232 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9233
9234 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9235 ptid from regcache.
9236
9237 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9238
9239 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9240 i386_darwin_store_inferior_registers): Use ptid from regcache.
9241
9242 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9243
9244 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9245 i386bsd_store_inferior_registers): Use ptid from regcache.
9246
9247 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9248
9249 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9250 hppaobsd_store_registers): Use ptid from regcache.
9251
9252 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9253
9254 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9255 hppanbsd_store_registers): Use ptid from regcache.
9256
9257 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9258
9259 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9260 from regcache. Use get_ptrace_pid.
9261
9262 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9263
9264 * corelow.c (get_core_register_section): Use ptid from regcache,
9265 update doc.
9266
9267 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9268
9269 * bsd-uthread.c (bsd_uthread_fetch_registers,
9270 bsd_uthread_store_registers): Use ptid from regcache, set and
9271 restore inferior_ptid.
9272
9273 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9274
9275 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9276 fetch_fp_regs, store_register, store_regs, store_fp_register,
9277 store_fp_regs): Use ptid from regcache.
9278
9279 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9280
9281 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9282 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9283 store_vfp_regs): Use ptid from regcache.
9284
9285 2017-03-17 Pedro Alves <palves@redhat.com>
9286
9287 PR remote/21188
9288 * ser-base.c (ser_base_wait_for): Add comment.
9289 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9290 version.
9291 * ser-unix.c (hardwire_raw): Remove reference to
9292 scb->current_timeout.
9293 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9294 (hardwire_ops): Install ser_base_readchar instead of
9295 hardwire_readchar.
9296 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9297 Remove fields.
9298
9299 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9300
9301 PR gdb/19637
9302 * python/lib/gdb/printer/bound_registers.py: Add support for
9303 Python 3.
9304
9305 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9306
9307 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9308 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9309 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9310 byte_offset to subobj_byte_offset. Fix the handling of
9311 DWARF_VALUE_STACK on big-endian targets when coming via an
9312 implicit pointer.
9313 (dwarf2_evaluate_loc_desc): Adjust call to
9314 dwarf2_evaluate_loc_desc_full.
9315 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9316 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9317
9318 2017-03-16 Yao Qi <yao.qi@linaro.org>
9319
9320 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9321 and REVSH instructions.
9322
9323 2017-03-16 Yao Qi <yao.qi@linaro.org>
9324
9325 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9326 (arm_record_test): Declare.
9327 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9328 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9329 align with the manual.
9330 (thumb_record_misc): Adjust the code order to align with the
9331 manual.
9332 (thumb2_record_decode_insn_handler): Fix instruction matching.
9333 (instruction_reader_thumb): New class.
9334 (arm_record_test): New function.
9335
9336 2017-03-16 Yao Qi <yao.qi@linaro.org>
9337
9338 * arm-tdep.c (abstract_memory_reader): New class.
9339 (instruction_reader): New class.
9340 (extract_arm_insn): Add argument 'reader'. Callers updated.
9341 (decode_insn): Likewise.
9342
9343 2017-03-16 Doug Evans <dje@google.com>
9344
9345 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9346 member. Change type of TYPE member to SCM. All uses updated.
9347 (lsscm_make_lazy_string_smob): Add assert.
9348 (lsscm_make_lazy_string): Flag bad length values.
9349 (lsscm_elt_type): New function.
9350 (gdbscm_lazy_string_to_value): Rewrite to use
9351 lsscm_safe_lazy_string_to_value.
9352 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9353 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9354 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9355 in incoming type.
9356 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9357 * guile/scm-type.c (tyscm_scm_to_type): New function.
9358
9359 2017-03-15 Doug Evans <dje@google.com>
9360
9361 PR python/17728, python/18439, python/18779
9362 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9363 member. Change type of TYPE member to PyObject *. All uses updated.
9364 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9365 (gdbpy_create_lazy_string_object): Flag bad length values.
9366 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9367 Handle typedefs in incoming type.
9368 (stpy_lazy_string_elt_type): New function.
9369 (gdbpy_extract_lazy_string): Call it.
9370 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9371 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9372 typedefs in incoming type.
9373
9374 2017-03-16 Doug Evans <dje@google.com>
9375
9376 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9377 * guile/scm-type.c (tyscm_scm_to_type): New function.
9378
9379 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9380
9381 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9382 "ULONGEST" for "skip".
9383
9384 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9385
9386 PR gdb/21220
9387 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9388 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9389 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9390 over ptrace peek/poke until end of buffer or error.
9391
9392 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9393
9394 * parse.c (length_of_subexp): Make static.
9395 * parser-defs.h (length_of_subexp): Remove.
9396
9397 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9398
9399 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9400 as well.
9401
9402 2017-03-14 Pedro Alves <palves@redhat.com>
9403
9404 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9405 (main): Use std::unique_ptr. Remove calls to
9406 cp_demangled_name_parse_free.
9407
9408 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9409
9410 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9411 alphabsd_store_inferior_registers): Use regcache->ptid instead
9412 of inferior_ptid.
9413
9414 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9415
9416 * aix-thread.c (aix_thread_fetch_registers,
9417 aix_thread_store_registers): Use regcache->ptid instead of
9418 inferior_ptid.
9419
9420 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9421
9422 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9423 store_gregs_to_thread, fetch_fpregs_from_thread,
9424 store_fpregs_to_thread): Use regcache->ptid instead of
9425 inferior_ptid.
9426
9427 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9428
9429 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9430 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9431 instead of inferior_ptid.
9432
9433 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9434
9435 * target.c (target_fetch_registers, target_store_registers): Add
9436 assert.
9437
9438 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9439
9440 * regcache.h (regcache_get_ptid): New function.
9441 * regcache.c (regcache_get_ptid): New function.
9442
9443 2017-03-13 Mark Wielaard <mark@klomp.org>
9444
9445 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9446
9447 2017-03-10 Keith Seitz <keiths@redhat.com>
9448
9449 PR c++/8218
9450 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9451
9452 2017-03-08 Pedro Alves <palves@redhat.com>
9453
9454 PR gdb/18360
9455 * infrun.c (start_step_over, do_target_resume, resume)
9456 (restart_threads): Assert we're not resuming a thread that is
9457 meant to be stopped.
9458 (infrun_thread_stop_requested_callback): Delete.
9459 (infrun_thread_stop_requested): If the thread is internally
9460 stopped, queue a pending stop event and clear the thread's
9461 inline-frame state.
9462 (handle_stop_requested): New function.
9463 (handle_syscall_event, handle_inferior_event_1): Use
9464 handle_stop_requested.
9465 (handle_stop_requested): New function.
9466 (handle_signal_stop): Set the thread's stop_signal here instead of
9467 at caller.
9468 (finish_step_over): Clear step over info unconditionally.
9469 (handle_signal_stop): If the user had interrupted the event
9470 thread, consider the stop a random signal.
9471 (handle_signal_stop) <signal arrived while stepping over
9472 breakpoint>: Don't restart threads here.
9473 (stop_waiting): Don't clear step-over info here.
9474
9475 2017-03-08 Pedro Alves <palves@redhat.com>
9476
9477 PR 21206
9478 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9479 goes to argument 2, not 1.
9480
9481 2017-03-08 Pedro Alves <palves@redhat.com>
9482
9483 PR cli/21218
9484 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9485 display_gdb_prompt.
9486 (command_line_input): Add comment.
9487
9488 2017-03-08 Pedro Alves <palves@redhat.com>
9489
9490 PR tui/21216
9491 * tui/tui-file.c (tui_file::write): New.
9492 * tui/tui-file.h (tui_file): Override "write".
9493 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9494 factored out from ...
9495 (tui_puts): ... here.
9496 (tui_putc): Use them.
9497 (tui_write): New function.
9498 * tui/tui-io.h (tui_write): Declare.
9499
9500 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9501
9502 * Makefile.in (SFILES): Replace "environ.c" with
9503 "common/environ.c".
9504 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9505 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9506 to...
9507 * common/environ.c: ... here.
9508 * environ.h: Moved to...
9509 * common/environ.h: ... here.
9510
9511 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9512
9513 * gdbarch.sh (pstring_ptr): New static function.
9514 (gdbarch_disassembler_options): Use it.
9515 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9516 not valid_disassembler_option->name.
9517 * gdbarch.c: Regenerate.
9518
9519 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9520
9521 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9522
9523 2017-03-07 Pedro Alves <palves@redhat.com>
9524
9525 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9526
9527 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9528
9529 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9530 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9531 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9532 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9533
9534 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9535
9536 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9537
9538 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9539
9540 * remote.c (remote_add_target_side_commands): Use range-based
9541 for loop.
9542
9543 2017-03-03 Yao Qi <yao.qi@linaro.org>
9544
9545 PR gdb/21165
9546 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9547 value is lazy.
9548 * valprint.c (common_val_print): Likewise.
9549
9550 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9551
9552 * NEWS: Mention new set/show disassembler-options commands.
9553 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9554 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9555 (prospective_options): New static variable.
9556 (gdb_disassembler::gdb_disassembler): Initialize
9557 m_di.disassembler_options.
9558 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9559 (get_disassembler_options): New function.
9560 (set_disassembler_options): Likewise.
9561 (set_disassembler_options_sfunc): Likewise.
9562 (show_disassembler_options_sfunc): Likewise.
9563 (disassembler_options_completer): Likewise.
9564 (_initialize_disasm): Likewise.
9565 * disasm.h (get_disassembler_options): New prototype.
9566 (set_disassembler_options): Likewise.
9567 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9568 (gdbarch_verify_disassembler_options): Likewise.
9569 * gdbarch.c: Regenerate.
9570 * gdbarch.h: Likewise.
9571 * arm-tdep.c (num_disassembly_options): Delete.
9572 (set_disassembly_style): Likewise.
9573 (arm_disassembler_options): New static variable.
9574 (set_disassembly_style_sfunc): Convert short style name into long
9575 option name. Call set_disassembler_options.
9576 (show_disassembly_style_sfunc): New function.
9577 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9578 set_gdbarch_verify_disassembler_options.
9579 (_initialize_arm_tdep): Delete regnames variable and update callers.
9580 (arm_disassembler_options): Initialize.
9581 (disasm_options): New variable.
9582 (num_disassembly_options): Rename from this...
9583 (num_disassembly_styles): ...to this. Compute by scanning through
9584 disasm_options.
9585 (valid_disassembly_styles): Initialize using disasm_options.
9586 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9587 set_arm_regname_option.
9588 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9589 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9590 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9591 set_gdbarch_verify_disassembler_options.
9592 * s390-tdep.c (s390_disassembler_options): New static variable.
9593 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9594 set_gdbarch_verify_disassembler_options.
9595
9596 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9597
9598 * remote.c (remote_add_target_side_condition): Remove "struct"
9599 keyword from range-based for loop.
9600
9601 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9602
9603 * remote.c (remote_add_target_side_condition): Use range-based
9604 for loop. Update comment.
9605
9606 2017-02-27 Yao Qi <yao.qi@linaro.org>
9607
9608 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9609
9610 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9611
9612 * regcache.c (regcache_raw_update): New function.
9613 (regcache_raw_read): Move code to regcache_raw_update.
9614 * regcache.h (regcache_raw_update): New declaration.
9615 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9616
9617 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9618
9619 * dwarf2read.c (create_debug_type_hash_table): Initialize
9620 header.signature and header.type_offset_in_tu.
9621
9622 2017-02-24 Pedro Alves <palves@redhat.com>
9623
9624 * symtab.c (make_file_symbol_completion_list_1): Use
9625 add_symtab_completions.
9626
9627 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9628
9629 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9630
9631 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9632
9633 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9634 I386_MAX_REGISTER_SIZE.
9635 (i386_pseudo_register_write): Likewise.
9636 (i386_process_record): Likewise.
9637 * i387-tdep.c (i387_supply_xsave): Likewise.
9638 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9639 (store_register): Likewise.
9640
9641 2017-02-23 Pedro Alves <palves@redhat.com>
9642
9643 * ada-lang.c: Include "common/function-view.h".
9644 (ada_iterate_over_symbols): Adjust to use function_view as
9645 callback type.
9646 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9647 (ada_make_symbol_completion_list): Use a lambda.
9648 (ada_exc_search_name_matches): Delete.
9649 (name_matches_regex): New.
9650 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9651 * compile/compile-c-support.c: Include "common/function-view.h".
9652 (print_one_macro): Change prototype to accept a ui_file pointer.
9653 (write_macro_definitions): Use a lambda.
9654 * dwarf2read.c: Include "common/function-view.h".
9655 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9656 (dw2_expand_symtabs_matching): Adjust to use function_view as
9657 callback type.
9658 * language.h: Include "common/function-view.h".
9659 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9660 function_view as callback type.
9661 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9662 * linespec.c: Include "common/function-view.h".
9663 (collect_info::add_symbol): New method.
9664 (struct symbol_and_data_callback, iterate_inline_only, struct
9665 symbol_matcher_data, iterate_name_matcher): Delete.
9666 (iterate_over_all_matching_symtabs): Adjust to use function_view
9667 as callback type and lambdas.
9668 (iterate_over_file_blocks): Adjust to use function_view as
9669 callback type.
9670 (decode_compound_collector): Now a class with private fields.
9671 (decode_compound_collector::release_symbols): New method.
9672 (collect_one_symbol): Rename to...
9673 (decode_compound_collector::operator()): ... this and adjust.
9674 (lookup_prefix_sym): decode_compound_collector construction bits
9675 move to decode_compound_collector ctor. Pass the
9676 decode_compound_collector object directly as callback. Remove
9677 cleanups and use decode_compound_collector::release_symbols
9678 instead.
9679 (symtab_collector): Now a class with private fields.
9680 (symtab_collector::release_symtabs): New method.
9681 (add_symtabs_to_list): Rename to...
9682 (symtab_collector::operator()): ... this and adjust.
9683 (collect_symtabs_from_filename): symtab_collector construction
9684 bits move to symtab_collector ctor. Pass the symtab_collector
9685 object directly as callback. Remove cleanups and use
9686 symtab_collector::release_symtabs instead.
9687 (collect_symbols): Delete.
9688 (add_matching_symbols_to_info): Use lambdas.
9689 * macrocmd.c (print_macro_callback): Delete.
9690 (info_macro_command): Use a lambda.
9691 (info_macros_command): Pass print_macro_definition as callable
9692 directly.
9693 (print_one_macro): Remove 'ignore' parameter.
9694 (macro_list_command): Adjust.
9695 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9696 (macro_for_each_data::user_data): Delete field.
9697 (foreach_macro): Adjust to call the function_view.
9698 (macro_for_each): Adjust to use function_view as callback type.
9699 (foreach_macro_in_scope): Adjust to call the function_view.
9700 (macro_for_each_in_scope): Adjust to use function_view as callback
9701 type.
9702 * macrotab.h: Include "common/function-view.h".
9703 (macro_callback_fn): Declare a prototype instead of a pointer.
9704 Remove "user_data" parameter.
9705 (macro_for_each, macro_for_each_in_scope): Adjust to use
9706 function_view as callback type.
9707 * psymtab.c (partial_map_expand_apply)
9708 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9709 Adjust to use function_view as callback type and to return bool.
9710 (psym_expand_symtabs_matching): Adjust to use function_view as
9711 callback types.
9712 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9713 to use function_view as callback type and to return bool.
9714 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9715 callback types.
9716 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9717 as callback types.
9718 * symfile.h: Include "common/function-view.h".
9719 (expand_symtabs_file_matcher_ftype)
9720 (expand_symtabs_symbol_matcher_ftype)
9721 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9722 return bool.
9723 (quick_symbol_functions::map_symtabs_matching_filename)
9724 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9725 function_view as callback type and return bool.
9726 (expand_symtabs_matching): Adjust to use function_view as callback
9727 type.
9728 (maintenance_expand_name_matcher)
9729 (maintenance_expand_file_matcher): Delete.
9730 (maintenance_expand_symtabs): Use lambdas.
9731 * symtab.c (iterate_over_some_symtabs): Adjust to use
9732 function_view as callback types and return bool.
9733 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9734 of a cleanup.
9735 (lookup_symtab_callback): Delete.
9736 (lookup_symtab): Use a lambda.
9737 (iterate_over_symbols): Adjust to use function_view as callback
9738 type.
9739 (struct search_symbols_data, search_symbols_file_matches)
9740 (search_symbols_name_matches): Delete.
9741 (search_symbols): Use a pair of lambdas.
9742 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9743 (symtab_expansion_callback): Delete.
9744 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9745 * symtab.h: Include "common/function-view.h".
9746 (iterate_over_some_symtabs): Adjust to use function_view as
9747 callback type and return bool.
9748 (iterate_over_symtabs): Adjust to use function_view as callback
9749 type.
9750 (symbol_found_callback_ftype): Remove 'data' parameter and return
9751 bool.
9752 (iterate_over_symbols): Adjust to use function_view as callback
9753 type.
9754
9755 2017-02-23 Pedro Alves <palves@redhat.com>
9756
9757 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9758 (%.o) <unittests/%.c>: New pattern.
9759 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9760 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9761 * common/function-view.h: New file.
9762 * unittests/function-view-selftests.c: New file.
9763 * configure: Regenerate.
9764
9765 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9766
9767 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9768 inferior_ptid.
9769 * go32-nat.c (go32_thread_alive): Likewise.
9770
9771 2017-02-23 Yao Qi <yao.qi@linaro.org>
9772
9773 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9774 delete.
9775
9776 2017-02-23 Yao Qi <yao.qi@linaro.org>
9777
9778 * varobj.c (varobj_clear_saved_item): Use delete instead of
9779 xfree.
9780 (update_dynamic_varobj_children): Likewise.
9781
9782 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9783
9784 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9785
9786 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9787
9788 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9789 m_enum_value to 0 in default constructor.
9790
9791 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9792
9793 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9794 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9795 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9796 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9797 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9798 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9799 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9800 IS_STORE_CONDITIONAL_INSN.
9801
9802 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9803
9804 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9805
9806 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9807
9808 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9809
9810 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9811
9812 * dwarf2read.c (skip_one_die, read_attribute_value)
9813 (dwarf2_const_value_attr, dump_die_shallow)
9814 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9815 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9816
9817 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9818
9819 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9820 (dwarf_parse_macro_header): Accept DWARF version 5.
9821 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9822
9823 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9824
9825 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9826 DW_AT_GNU_*.
9827 * common/common-exceptions.h (enum errors): Likewise.
9828 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9829 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9830 (dwarf_expr_context::execute_stack_op): Likewise.
9831 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9832 Likewise.
9833 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9834 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9835 (show_entry_values_debug, call_site_to_target_addr)
9836 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9837 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9838 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9839 (value_of_dwarf_block_entry, indirect_pieced_value)
9840 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9841 (disassemble_dwarf_expression): Likewise.
9842 * dwarf2read.c (process_die, inherit_abstract_dies)
9843 (read_call_site_scope): Likewise.
9844 * gdbtypes.h (struct func_type, struct call_site_parameter)
9845 (struct call_site): Likewise.
9846 * stack.c (read_frame_arg): Likewise.
9847 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9848
9849 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9850
9851 * defs.h (read_unsigned_leb128): New declaration.
9852 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9853 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9854 (dwarf2_find_location_expression): Call also
9855 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9856 * dwarf2loc.h (dwarf2_version): New declaration.
9857 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9858 rnglists.
9859 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9860 .debug_rnglists.
9861 (struct dwop_section_names): Add loclists_dwo.
9862 (dwop_section_names): Add .debug_loclists.dwo.
9863 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9864 (struct dwarf2_per_cu_data): Add dwarf_version.
9865 (struct dwo_sections): Add loclists.
9866 (struct attr_abbrev): Add implicit_const.
9867 (read_indirect_line_string): New declaration.
9868 (read_unsigned_leb128): Delete declaration.
9869 (rcuh_kind): New definition.
9870 (read_and_check_comp_unit_head): Change parameter
9871 is_debug_types_section to section_kind.
9872 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9873 (read_comp_unit_head): Change parameter abfd to section, add parameter
9874 section_kind. Handle DWARF-5.
9875 (error_check_comp_unit_head): Accept also DWARF version 5.
9876 (read_and_check_comp_unit_head): Change parameter
9877 is_debug_types_section to section_kind.
9878 (read_and_check_type_unit_head): Delete function.
9879 (read_abbrev_offset): Handle DWARF-5.
9880 (create_debug_type_hash_table): Add parameter section_kind. Process
9881 only DW_UT_type. Use signature and type_offset_in_tu from struct
9882 comp_unit_head.
9883 (create_debug_types_hash_table): Update create_debug_type_hash_table
9884 caller.
9885 (create_all_type_units): Call create_debug_type_hash_table.
9886 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9887 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9888 caller.
9889 (skip_one_die): Handle DW_FORM_implicit_const.
9890 (dwarf2_rnglists_process): New function.
9891 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9892 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9893 (read_attribute_value): Handle DW_FORM_implicit_const,
9894 DW_FORM_line_strp.
9895 (read_attribute): Handle DW_FORM_implicit_const.
9896 (read_indirect_string_at_offset_from): New function from
9897 read_indirect_string_at_offset.
9898 (read_indirect_string_at_offset): Call
9899 read_indirect_string_at_offset_from.
9900 (read_indirect_line_string_at_offset): New function.
9901 (read_indirect_string): New function comment.
9902 (read_indirect_line_string): New function.
9903 (read_unsigned_leb128): Make it global.
9904 (dwarf2_string_attr): Handle DWARF-5.
9905 (add_include_dir_stub, read_formatted_entries): New functions.
9906 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9907 Handle DWARF-5.
9908 (per_cu_header_read_in): Update read_comp_unit_head caller.
9909 (dwarf2_version): New function.
9910 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9911 rnglists.
9912 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9913 fields.
9914
9915 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9916
9917 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9918
9919 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9920
9921 * dwarf2read.c (dwarf2_ranges_process): New function from
9922 dwarf2_ranges_read.
9923 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9924 dwarf2_ranges_process.
9925
9926 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9927
9928 * dwarf2read.c (create_debug_type_hash_table): New function from
9929 create_debug_types_hash_table.
9930 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9931 (create_all_type_units, open_and_init_dwo_file): Update
9932 create_debug_types_hash_table callers.
9933
9934 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9935
9936 PR gdb/16188
9937 * fork-child.c (trace_start_error): Fix thinko. va_end should
9938 refer to 'ap', not 'args'.
9939
9940 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9941 Pedro Alves <palves@redhat.com>
9942
9943 PR gdb/16188
9944 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9945 calls succeeded.
9946 * fork-child.c (trace_start_error): New function.
9947 (trace_start_error_with_name): Likewise.
9948 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9949 * inf-ptrace.c (inf_ptrace_me): Likewise.
9950 * inferior.h (trace_start_error): New prototype.
9951 (trace_start_error_with_name): Likewise.
9952
9953 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9954
9955 PR gdb/21164
9956 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9957 NULL before using it.
9958 * symmisc.c (maintenance_print_symbols): Likewise.
9959 (maintenance_print_msymbols): Likewise.
9960
9961 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9962
9963 * NEWS: Add record Python bindings entry.
9964
9965 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9966
9967 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9968 py-record-full.o.
9969 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9970 * python/py-record-btrace.c, python/py-record-btrace.h,
9971 python/py-record-full.c, python/py-record-full.h: New file.
9972 * python/py-record.c: Add include for py-record-btrace.h and
9973 py-record-full.h.
9974 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9975 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9976 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9977 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9978 New definition.
9979 (gdbpy_initialize_btrace): New export.
9980 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9981
9982 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9983
9984 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9985 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9986 * python/py-record.c: New file.
9987 * python/python-internal.h (gdbpy_start_recording,
9988 gdbpy_current_recording, gdpy_stop_recording,
9989 gdbpy_initialize_record): New export.
9990 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9991 (python_GdbMethods): Add gdbpy_start_recording,
9992 gdbpy_current_recording and gdbpy_stop_recording.
9993
9994 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9995
9996 * record-btrace.c (record_btrace_record_method): New function.
9997 (init_record_btrace_ops): Initialize to_record_method.
9998 * record-full.c (record_full_record_method): New function.
9999 (init_record_full_ops, init_record_full_core_ops): Add
10000 record_full_record_method.
10001 * record.h (enum record_method): New enum.
10002 * target-debug.h (target_debug_print_enum_record_method: New define.
10003 * target-delegates.c: Regenerate.
10004 * target.c (target_record_method): New function.
10005 * target.h: Include record.h.
10006 (struct target_ops) <to_record_method>: New field.
10007 (target_record_method): New export.
10008
10009 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10010
10011 * record.h (record_start, record_stop): New export.
10012 * record.c (record_start, record_stop): New function.
10013
10014 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10015
10016 * btrace.c (btrace_fetch): Copy function call segments pointer
10017 into a vector.
10018 (btrace_clear): Clear the vector.
10019 (btrace_find_insn_by_number): Use binary search to find the correct
10020 function call segment.
10021 * btrace.h (brace_fun_p): New typedef.
10022 (struct btrace_thread_info) <functions>: New field.
10023
10024 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10025
10026 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10027 * btrace.c (btrace_decode_error): ... here. New function.
10028 * btrace.h (btrace_decode_error): New export.
10029
10030 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10031
10032 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10033 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10034 btrace_find_insn_by_number): Remove special case for gaps.
10035 * btrace.h (btrace_insn_get_error): New export.
10036 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10037 * record-btrace.c (btrace_insn_history): Print number for gaps.
10038 (record_btrace_info, record_btrace_goto): Handle gaps.
10039
10040 2017-02-14 Tom Tromey <tom@tromey.com>
10041
10042 PR python/13598:
10043 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10044 event.
10045 * python/py-evts.c (gdbpy_initialize_py_events): Add
10046 before_prompt registry.
10047 * python/py-events.h (events_object) <before_prompt>: New field.
10048
10049 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10050
10051 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10052
10053 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10054
10055 * symfile (_initialize_symfile): Add usage text to the load command's
10056 help text.
10057
10058 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10059
10060 * utils.c (defaulted_query): Don't query on secondary UIs.
10061
10062 2017-02-10 Tom Tromey <tom@tromey.com>
10063
10064 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10065
10066 2017-02-10 Tom Tromey <tom@tromey.com>
10067
10068 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10069 "cleanup" local.
10070 * python/py-type.c (typy_legacy_template_argument): Remove
10071 unnecessary "cleanup" local.
10072
10073 2017-02-10 Tom Tromey <tom@tromey.com>
10074
10075 * python/python.c (do_start_initialization): New function, from
10076 _initialize_python.
10077 (_initialize_python): Call do_start_initialization.
10078 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10079 goto.
10080
10081 2017-02-10 Tom Tromey <tom@tromey.com>
10082
10083 * python/py-prettyprint.c (pretty_print_one_value): Use
10084 gdbpy_ref.
10085
10086 2017-02-10 Tom Tromey <tom@tromey.com>
10087
10088 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10089 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10090 gdbpy_ref.
10091 * python/py-type.c (field_new): Use gdbpy_ref.
10092 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10093 gdbpy_ref.
10094 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10095 (py_free_pspace): Likewise.
10096 (pspace_to_pspace_object): Likewise.
10097 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10098 (py_free_objfile): Likewise.
10099 (objfile_to_objfile_object): Likewise.
10100 * python/py-inferior.c (delete_thread_object): Use
10101 gdbpy_ref.
10102 (infpy_read_memory): Likewise.
10103 (py_free_inferior): Likewise.
10104 * python/py-evtregistry.c (create_eventregistry_object): Use
10105 gdbpy_ref.
10106 * python/py-event.c (create_event_object): Use gdbpy_ref.
10107
10108 2017-02-10 Tom Tromey <tom@tromey.com>
10109
10110 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10111 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10112 used.
10113 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10114 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10115 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10116 python/py-framefilter.c, python/py-function.c,
10117 python/py-inferior.c, python/py-infevents.c,
10118 python/py-linetable.c, python/py-newobjfileevent.c,
10119 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10120 python/py-signalevent.c, python/py-stopevent.c,
10121 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10122 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10123 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10124 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10125
10126 2017-02-10 Tom Tromey <tom@tromey.com>
10127
10128 * ui-out.h (ui_out_emit_type): New class.
10129 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10130 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10131 and ui_out_emit_tuple.
10132 (enumerate_locals): Likewise.
10133 (py_mi_print_variables, py_print_locals, py_print_args): Use
10134 ui_out_emit_list.
10135 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10136 ui_out_emit_list.
10137 * common/gdb_optional.h: New file.
10138
10139 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10140
10141 * MAINTAINERS (Write After Approval): Update my e-mail address.
10142
10143 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10144
10145 PR gdb/21122
10146 * breakpoint.c (_initialize_breakpoint): Update the help description
10147 of the 'commands' command to indicate that it takes a list argument.
10148
10149 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10150
10151 * interps.c (current_interp_set_logging): Remove "return".
10152
10153 2017-02-09 Gary Benson <gbenson@redhat.com>
10154
10155 * symtab.c (add_symtab_completions): Prevent NULL pointer
10156 dereference.
10157
10158 2017-02-08 Pedro Alves <palves@redhat.com>
10159
10160 * interps.c (interp::interp): Remove reference to quiet_p.
10161 (interp_set): Make static. Remove dead "Switching to" output
10162 code.
10163 (interp_quiet_p, interp_set_quiet): Delete.
10164 (interpreter_exec_cmd): Don't set the interpreter quiet.
10165 * interps.h (interp_quiet_p): Make static.
10166 (class interp) <quiet_p>: Remove field
10167
10168 2017-02-08 Jerome Guitton <guitton@adacore.com>
10169
10170 * cli/cli-decode.c (find_command_name_length): Make it extern.
10171 * cli/cli-decode.h (find_command_name_length): Declare.
10172 * cli/cli-script.c (command_name_equals, line_first_arg):
10173 New functions.
10174 (process_next_line): Use cli-decode to parse command names.
10175 (build_command_line): Make args a constant pointer.
10176
10177 2017-02-08 Jerome Guitton <guitton@adacore.com>
10178
10179 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10180 Remove case-insensitive search.
10181
10182 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10183
10184 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10185 at the end of the line. Avoids an ARI warning.
10186
10187 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10188
10189 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10190 rdseed instructions.
10191 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10192
10193 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10194
10195 PR tdep/20936
10196 Provide and use sparc32 and sparc64 target description XML files.
10197 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10198 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10199 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10200 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10201 * features/sparc/sparc32-solaris.xml: New file.
10202 * features/sparc/sparc64-solaris.xml: New file.
10203 * features/sparc/sparc32-solaris.c: Generated.
10204 * features/sparc/sparc64-solaris.c: Generated.
10205 * sparc-tdep.h: Account for differences in target descriptions.
10206 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10207 (sparc32_register_type): Use target provided registers.
10208 (validate_tdesc_registers): New function.
10209 (sparc32_gdbarch_init): Use tdesc_has_registers.
10210 Set pseudoregister functions.
10211 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10212 (sparc64_register_type): Use target provided registers.
10213 (sparc64_init_abi): Set pseudoregister functions.
10214
10215 2017-02-03 Tom Tromey <tom@tromey.com>
10216
10217 PR rust/21097:
10218 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10219 with a single member.
10220
10221 2017-02-03 Pedro Alves <palves@redhat.com>
10222
10223 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10224 (cli_interp_base::~cli_interp_base): New.
10225 (cli_interp): New struct.
10226 (as_cli_interp): Cast the interp itself to cli_interp.
10227 (cli_interpreter_pre_command_loop): Rename to ...
10228 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10229 parameter.
10230 (cli_interpreter_init): Rename to ...
10231 (cli_interp::init): ... this. Remove 'self' parameter. Use
10232 boolean. Make extern.
10233 (cli_interpreter_resume): Rename to ...
10234 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10235 extern.
10236 (cli_interpreter_suspend): Rename to ...
10237 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10238 extern.
10239 (cli_interpreter_exec): Rename to ...
10240 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10241 extern.
10242 (cli_interpreter_supports_command_editing): Rename to ...
10243 (cli_interp_base::supports_command_editing): ... this. Remove
10244 'interp' parameter. Make extern.
10245 (cli_ui_out): Rename to ...
10246 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10247 Make extern.
10248 (cli_set_logging): Rename to ...
10249 (cli_interp_base::set_logging): ... this. Remove 'interp'
10250 parameter. Make extern.
10251 (cli_interp_procs): Delete.
10252 (cli_interp_factory): Adjust to use "new".
10253 * cli/cli-interp.h: Include "interps.h".
10254 (struct cli_interp_base): New struct.
10255 * interps.c (struct interp): Delete. Fields moved to interps.h.
10256 (interp_new): Delete.
10257 (interp::interp, interp::~interp): New.
10258 (interp_set): Use bool, and return void. Assume the interpreter
10259 has suspend, init and resume methods, and that the all return
10260 void.
10261 (set_top_level_interpreter): interp_set returns void.
10262 (interp_ui_out): Adapt.
10263 (current_interp_set_logging): Adapt.
10264 (interp_data): Delete.
10265 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10266 (interp_exec): Adapt.
10267 (top_level_interpreter_data): Delete.
10268 * interps.h (interp_init_ftype, interp_resume_ftype)
10269 (interp_suspend_ftype, interp_exec_ftype)
10270 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10271 (class interp): New.
10272 (interp_new): Delete.
10273 (interp_set): Now returns void. Use bool.
10274 (interp_data, top_level_interpreter_data): Delete.
10275 * mi/mi-common.h: Include interps.h.
10276 (class mi_interp): Inherit from interp. Define a ctor. Declare
10277 init, resume, suspect, exec, interp_ui_out, set_logging and
10278 pre_command_loop methods.
10279 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10280 (mi_interpreter_init): Rename to ...
10281 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10282 bool, return void and make extern. Adjust.
10283 (mi_interpreter_resume): ... Rename to ...
10284 (mi_interp::resume): ... this. Remove the 'data' parameter,
10285 return void and make extern. Adjust.
10286 (mi_interpreter_suspend): ... Rename to ...
10287 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10288 return void and make extern. Adjust.
10289 (mi_interpreter_exec): ... Rename to ...
10290 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10291 extern. Adjust.
10292 (mi_interpreter_pre_command_loop): ... Rename to ...
10293 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10294 parameter and make extern.
10295 (mi_on_normal_stop_1): Adjust.
10296 (mi_ui_out): Rename to ...
10297 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10298 parameter and make extern. Adjust.
10299 (mi_set_logging): Rename to ...
10300 (mi_interp::set_logging): ... this. Remove the 'interp'
10301 parameter and make extern. Adjust.
10302 (mi_interp_procs): Delete.
10303 (mi_interp_factory): Adjust to use 'new'.
10304 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10305 (mi_print_exception, mi_execute_command, mi_load_progress):
10306 Adjust.
10307 * tui/tui-interp.c (tui_interp): New class.
10308 (as_tui_interp): Return a tui_interp pointer.
10309 (tui_on_normal_stop, tui_on_signal_received)
10310 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10311 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10312 to use interp::interp_ui_out.
10313 (tui_init): Rename to ...
10314 (tui_interp::init): ... this. Remove the 'self' parameter, use
10315 bool, return void and make extern. Adjust.
10316 (tui_resume): Rename to ...
10317 (tui_interp::resume): ... this. Remove the 'data' parameter,
10318 return void and make extern. Adjust.
10319 (tui_suspend): Rename to ...
10320 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10321 return void and make extern. Adjust.
10322 (tui_ui_out): Rename to ...
10323 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10324 parameter, and make extern. Adjust.
10325 (tui_exec): Rename to ...
10326 (tui_interp::exec): ... this. Remove the 'data' parameter and
10327 make extern.
10328 (tui_interp_procs): Delete.
10329 (tui_interp_factory): Use "new".
10330
10331 2017-02-02 Tom Tromey <tom@tromey.com>
10332
10333 * rust-exp.y (ends_raw_string, space_then_number)
10334 (rust_identifier_start_p): Return bool.
10335 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10336 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10337 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10338 (rust_chartype_p): Return bool.
10339 (val_print_struct, rust_print_struct_def, rust_print_type):
10340 Update.
10341 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10342 Return bool.
10343
10344 2017-02-02 Tom Tromey <tom@tromey.com>
10345
10346 * rust-lang.c: Reindent.
10347
10348 2017-02-02 Tom Tromey <tom@tromey.com>
10349
10350 * rust-lang.h (rust_crate_for_block): Update.
10351 * rust-lang.c (rust_crate_for_block): Return std::string.
10352 (rust_get_disr_info): Use std:;string, not
10353 gdb::unique_xmalloc_ptr.
10354 * rust-exp.y (crate_name): Update.
10355
10356 2017-02-02 Pedro Alves <palves@redhat.com>
10357
10358 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10359 field out of gdb_disassembler_test and make it static.
10360
10361 2017-02-02 Pedro Alves <palves@redhat.com>
10362
10363 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10364 mi1_interp and mi_interp fields.
10365
10366 2017-02-02 Pedro Alves <palves@redhat.com>
10367
10368 * cli/cli-interp.c (struct saved_output_files, saved_output):
10369 Moved from cli/cli-logging.c.
10370 (cli_set_logging): New function.
10371 (cli_interp_procs): Install cli_set_logging.
10372 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10373 Declare.
10374 * cli/cli-logging.c (struct saved_output_files, saved_output):
10375 Moved to cli/cli-interp.c.
10376 (pop_output_files): Don't save outputs here.
10377 (make_logging_output): New function.
10378 (handle_redirections): Don't build tee nor save previous outputs
10379 here.
10380 * interps.c (current_interp_set_logging): Change prototype.
10381 Assume there's always a set_logging_proc method installed.
10382 * interps.h (interp_set_logging_ftype): Change prototype.
10383 (current_interp_set_logging): Change prototype and adjust comment.
10384 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10385 use make_logging_output.
10386 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10387 2017-02-02 Pedro Alves <palves@redhat.com>
10388
10389 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10390 from ...
10391 (set_logging_overwrite): ... here.
10392 (logging_no_redirect_file): Delete.
10393 (set_logging_redirect): Don't handle redirection on the fly.
10394 Instead warn that "logging off" / "logging on" is necessary.
10395 (pop_output_files): Delete references to logging_no_redirect_file.
10396 (show_logging_command): Always speak in terms of what will happen
10397 once logging is reenabled.
10398
10399 2017-02-02 Pedro Alves <palves@redhat.com>
10400
10401 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10402
10403 2017-02-02 Pedro Alves <palves@redhat.com>
10404
10405 * disasm.c (gdb_pretty_print_insn): Rename to ...
10406 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10407 Remove gdbarch parameter. Adapt to clear the object's buffers
10408 instead of allocating new buffers, and to print using the object's
10409 gdb_disassembler instead of calling gdb_print_insn.
10410 (dump_insns): Use gdb_pretty_print_disassembler.
10411 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10412 (gdb_pretty_print_disassembler): New class.
10413 * record-btrace.c (btrace_insn_history): Use
10414 gdb_pretty_print_disassembler.
10415
10416 2017-02-02 Pedro Alves <palves@redhat.com>
10417
10418 * ada-lang.c (type_as_string): Use string_file.
10419 * ada-valprint.c (ada_print_floating): Use string_file.
10420 * ada-varobj.c (ada_varobj_scalar_image)
10421 (ada_varobj_get_value_image): Use string_file.
10422 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10423 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10424 * breakpoint.c (update_inserted_breakpoint_locations)
10425 (insert_breakpoint_locations, reattach_breakpoints)
10426 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10427 (print_it_watchpoint): Use string_file.
10428 (save_breakpoints): Use stdio_file.
10429 * c-exp.y (oper): Use string_file.
10430 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10431 tee_file.
10432 (pop_output_files): Use delete.
10433 (handle_redirections): Use stdio_file and tee_file.
10434 * cli/cli-setshow.c (do_show_command): Use string_file.
10435 * compile/compile-c-support.c (c_compute_program): Use
10436 string_file.
10437 * compile/compile-c-symbols.c (generate_vla_size): Take a
10438 'string_file &' instead of a 'ui_file *'.
10439 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10440 of a 'ui_file *'. Use string_file.
10441 (generate_c_for_variable_locations): Take a 'string_file &'
10442 instead of a 'ui_file *'.
10443 * compile/compile-internal.h (generate_c_for_for_one_variable):
10444 Take a 'string_file &' instead of a 'ui_file *'.
10445 * compile/compile-loc2c.c (push, pushf, unary, binary)
10446 (print_label, pushf_register_address, pushf_register)
10447 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10448 'ui_file *'. Adjust.
10449 * compile/compile.c (compile_to_object): Use string_file.
10450 * compile/compile.h (compile_dwarf_expr_to_c)
10451 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10452 'ui_file *'.
10453 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10454 (replace_typedefs_qualified_name): Use string_file and
10455 obstack_copy0.
10456 * disasm.c (gdb_pretty_print_insn): Use string_file.
10457 (gdb_disassembly): Adjust reference the null_stream global.
10458 (do_ui_file_delete): Delete.
10459 (gdb_insn_length): Use null_stream.
10460 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10461 * dwarf2loc.c (dwarf2_compile_property_to_c)
10462 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10463 'string_file &' instead of a 'ui_file *'.
10464 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10465 * dwarf2read.c (do_ui_file_peek_last): Delete.
10466 (dwarf2_compute_name): Use string_file.
10467 * event-top.c (gdb_setup_readline): Use stdio_file.
10468 * gdbarch.sh (verify_gdbarch): Use string_file.
10469 * gdbtypes.c (safe_parse_type): Use null_stream.
10470 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10471 string_file.
10472 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10473 'string_file *' instead of a 'ui_file *'.
10474 (gdbscm_arch_disassemble): Use string_file.
10475 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10476 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10477 inherits from ui_file.
10478 (ioscm_file_port_delete, ioscm_file_port_rewind)
10479 (ioscm_file_port_put): Delete.
10480 (ioscm_file_port_write): Rename to ...
10481 (ioscm_file_port::write): ... this. Remove file_port_magic
10482 checks.
10483 (ioscm_file_port_new): Delete.
10484 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10485 ui_file_up.
10486 * guile/scm-type.c (tyscm_type_name): Use string_file.
10487 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10488 Use string_file.
10489 * infcmd.c (print_return_value_1): Use string_file.
10490 * infrun.c (print_target_wait_results): Use string_file.
10491 * language.c (add_language): Use string_file.
10492 * location.c (explicit_to_string_internal): Use string_file.
10493 * main.c (captured_main_1): Use null_file.
10494 * maint.c (maintenance_print_architecture): Use stdio_file.
10495 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10496 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10497 event_channel>: Change type to mi_console_file pointer.
10498 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10499 (mi_console_file_delete): Delete.
10500 (struct mi_console_file): Delete.
10501 (mi_console_file_magic): Delete.
10502 (mi_console_file_new): Delete.
10503 (mi_console_file::mi_console_file): New.
10504 (mi_console_file_delete): Delete.
10505 (mi_console_file_fputs): Delete.
10506 (mi_console_file::write): New.
10507 (mi_console_raw_packet): Delete.
10508 (mi_console_file::flush): New.
10509 (mi_console_file_flush): Delete.
10510 (mi_console_set_raw): Rename to ...
10511 (mi_console_file::set_raw): ... this.
10512 * mi/mi-console.h (class mi_console_file): New class.
10513 (mi_console_file_new, mi_console_set_raw): Delete.
10514 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10515 (mi_set_logging): Use delete and tee_file. Adjust.
10516 * mi/mi-main.c (output_register): Use string_file.
10517 (mi_cmd_data_evaluate_expression): Use string_file.
10518 (mi_cmd_data_read_memory): Use string_file.
10519 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10520 * mi/mi-out.c (mi_ui_out::main_stream): New.
10521 (mi_ui_out::rewind): Use main_stream and
10522 string_file.
10523 (mi_ui_out::put): Use main_stream and string_file.
10524 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10525 Allocate a 'string_file' instead.
10526 (mi_out_new): Don't allocate a mem_fileopen stream here.
10527 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10528 (mi_ui_out::main_stream): Declare method.
10529 * printcmd.c (eval_command): Use string_file.
10530 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10531 * python/py-arch.c (archpy_disassemble): Use string_file.
10532 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10533 * python/py-frame.c (frapy_str): Use string_file.
10534 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10535 Use string_file.
10536 * python/py-type.c (typy_str): Use string_file.
10537 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10538 * python/py-value.c (valpy_str): Use string_file.
10539 * record-btrace.c (btrace_insn_history): Use string_file.
10540 * regcache.c (regcache_print): Use stdio_file.
10541 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10542 * remote.c (escape_buffer): Use string_file.
10543 * rust-lang.c (rust_get_disr_info): Use string_file.
10544 * serial.c (serial_open_ops_1): Use stdio_file.
10545 (do_serial_close): Use delete.
10546 * stack.c (print_frame_arg): Use string_file.
10547 (print_frame_args): Remove local mem_fileopen stream, not used.
10548 (print_frame): Use string_file.
10549 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10550 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10551 Take a 'string_file *' instead of a 'ui_file *'.
10552 * top.c (new_ui): Use stdio_file and stderr_file.
10553 (free_ui): Use delete.
10554 (execute_command_to_string): Use string_file.
10555 (quit_confirm): Use string_file.
10556 * tracepoint.c (collection_list::append_exp): Use string_file.
10557 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10558 * tui/tui-file.c: Don't include "ui-file.h".
10559 (enum streamtype, struct tui_stream): Delete.
10560 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10561 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10562 (tui_file::tui_file): New method.
10563 (tui_file_fputs): Delete.
10564 (tui_file_get_strbuf): Delete.
10565 (tui_file::puts): New method.
10566 (tui_file_adjust_strbuf): Delete.
10567 (tui_file_flush): Delete.
10568 (tui_file::flush): New method.
10569 * tui/tui-file.h: Tweak intro comment.
10570 Include ui-file.h.
10571 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10572 (tui_file_adjust_strbuf): Delete declarations.
10573 (class tui_file): New class.
10574 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10575 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10576 (tui_register_format): Use string_stream.
10577 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10578 (tui_get_function_from_frame): Use string_file.
10579 * typeprint.c (type_to_string): Use string_file.
10580 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10581 (null_stream): New global.
10582 (ui_file_delete): Delete.
10583 (ui_file::ui_file): New.
10584 (null_file_isatty): Delete.
10585 (ui_file::~ui_file): New.
10586 (null_file_rewind): Delete.
10587 (ui_file::printf): New.
10588 (null_file_put): Delete.
10589 (null_file_flush): Delete.
10590 (ui_file::putstr): New.
10591 (null_file_write): Delete.
10592 (ui_file::putstrn): New.
10593 (null_file_read): Delete.
10594 (ui_file::putc): New.
10595 (null_file_fputs): Delete.
10596 (null_file_write_async_safe): Delete.
10597 (ui_file::vprintf): New.
10598 (null_file_delete): Delete.
10599 (null_file::write): New.
10600 (null_file_fseek): Delete.
10601 (null_file::puts): New.
10602 (ui_file_data): Delete.
10603 (null_file::write_async_safe): New.
10604 (gdb_flush, ui_file_isatty): Adjust.
10605 (ui_file_put, ui_file_rewind): Delete.
10606 (ui_file_write): Adjust.
10607 (ui_file_write_for_put): Delete.
10608 (ui_file_write_async_safe, ui_file_read): Adjust.
10609 (ui_file_fseek): Delete.
10610 (fputs_unfiltered): Adjust.
10611 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10612 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10613 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10614 (set_ui_file_data): Delete.
10615 (string_file::~string_file, string_file::write)
10616 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10617 (do_ui_file_as_string, ui_file_as_string): Delete.
10618 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10619 (struct mem_file): Delete.
10620 (mem_file_new): Delete.
10621 (stdio_file::stdio_file): New.
10622 (mem_file_delete): Delete.
10623 (stdio_file::stdio_file): New.
10624 (mem_fileopen): Delete.
10625 (stdio_file::~stdio_file): New.
10626 (mem_file_rewind): Delete.
10627 (stdio_file::set_stream): New.
10628 (mem_file_put): Delete.
10629 (stdio_file::open): New.
10630 (mem_file_write): Delete.
10631 (stdio_file_magic, struct stdio_file): Delete.
10632 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10633 (stdio_file::flush): New.
10634 (stdio_file_read): Rename to ...
10635 (stdio_file::read): ... this. Adjust.
10636 (stdio_file_write): Rename to ...
10637 (stdio_file::write): ... this. Adjust.
10638 (stdio_file_write_async_safe): Rename to ...
10639 (stdio_file::write_async_safe) ... this. Adjust.
10640 (stdio_file_fputs): Rename to ...
10641 (stdio_file::puts) ... this. Adjust.
10642 (stdio_file_isatty): Delete.
10643 (stdio_file_fseek): Delete.
10644 (stdio_file::isatty): New.
10645 (stderr_file_write): Rename to ...
10646 (stderr_file::write) ... this. Adjust.
10647 (stderr_file_fputs): Rename to ...
10648 (stderr_file::puts) ... this. Adjust.
10649 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10650 (stderr_file::stderr_file): New.
10651 (tee_file_magic): Delete.
10652 (struct tee_file): Delete.
10653 (tee_file::tee_file): New.
10654 (tee_file_new): Delete.
10655 (tee_file::~tee_file): New.
10656 (tee_file_delete): Delete.
10657 (tee_file_flush): Rename to ...
10658 (tee_file::flush): ... this. Adjust.
10659 (tee_file_write): Rename to ...
10660 (tee_file::write): ... this. Adjust.
10661 (tee_file::write_async_safe): New.
10662 (tee_file_fputs): Rename to ...
10663 (tee_file::puts): ... this. Adjust.
10664 (tee_file_isatty): Rename to ...
10665 (tee_file::isatty): ... this. Adjust.
10666 * ui-file.h (struct obstack, struct ui_file): Don't
10667 forward-declare.
10668 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10669 (ui_file_write_ftype)
10670 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10671 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10672 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10673 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10674 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10675 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10676 (set_ui_file_fseek): Delete.
10677 (ui_file_data, ui_file_delete, ui_file_rewind)
10678 (struct ui_file): New.
10679 (ui_file_up): New.
10680 (class null_file): New.
10681 (null_stream): Declare.
10682 (ui_file_write_for_put, ui_file_put): Delete.
10683 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10684 Delete.
10685 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10686 (gdb_fopen, tee_file_new): Delete.
10687 (struct string_file): New.
10688 (struct stdio_file): New.
10689 (stdio_file_up): New.
10690 (struct stderr_file): New.
10691 (class tee_file): New.
10692 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10693 of a 'ui_file *'. Adjust.
10694 * ui-out.h (class ui_out) <field_stream>: Likewise.
10695 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10696 (null_stream): Delete.
10697 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10698 Adjust.
10699 * utils.h (struct ui_file): Delete forward declaration..
10700 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10701 (error_stream): Take a 'string_file &' instead of a
10702 'ui_file *'.
10703 * varobj.c (varobj_value_get_print_value): Use string_file.
10704 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10705 * gdbarch.c: Regenerate.
10706
10707 2017-02-02 Pedro Alves <palves@redhat.com>
10708
10709 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10710 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10711 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10712 Adjust to call gdb_print_insn instead of
10713 gdb_disassembler::print_insn.
10714 (dump_insns, do_mixed_source_and_assembly_deprecated)
10715 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10716 'gdbarch' parameter. Remove gdb_disassembler parameter.
10717 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10718 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10719 declaration.
10720 (gdb_pretty_print_insn): Re-add declaration.
10721 * record-btrace.c (btrace_insn_history): Don't allocate a
10722 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10723
10724 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10725
10726 * disasm.h (gdb_disassembly): Remove file_string parameter.
10727 * disasm.c (gdb_disassembly): Likewise.
10728 * cli/cli-cmds.c (print_disassembly): Adapt.
10729 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10730 * stack.c (do_gdb_disassembly): Likewise.
10731
10732 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10733
10734 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10735 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10736 targets. And if the implicit value is longer than needed, extract
10737 the first bytes instead of the "least significant" ones.
10738
10739 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10740
10741 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10742 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10743 (btrace_fetch): Assert can_access_registers_ptid.
10744 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10745 validate_registers_access.
10746
10747 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10748
10749 * gdbthread.h (can_access_registers_ptid): New.
10750 * thread.c (can_access_registers_ptid): New.
10751
10752 2017-02-01 Pedro Alves <palves@redhat.com>
10753
10754 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10755
10756 2017-01-31 Pedro Alves <palves@redhat.com>
10757
10758 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10759 Fix typos.
10760
10761 2017-01-31 Pedro Alves <palves@redhat.com>
10762
10763 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10764 not used.
10765
10766 2017-01-31 Pedro Alves <palves@redhat.com>
10767
10768 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10769
10770 2017-01-31 Pedro Alves <palves@redhat.com>
10771
10772 * common/scoped_restore.h
10773 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10774 change the value's parameter type to T2.
10775 (make_scoped_restore): Likewise.
10776
10777 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10778 Richard Henderson <rth@redhat.com>
10779
10780 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10781 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10782 GS_BASE for older kernels.
10783 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10784 GS_BASE for older kernels.
10785 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10786 and GS_BASE to the offset table.
10787 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10788 system register group.
10789 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10790 for older kernels.
10791 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10792 amd64 ABI.
10793 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10794 AMD64_GSBASE_REGNUM.
10795 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10796 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10797 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10798 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10799 i386/64bit-segments.xml in those rules.
10800 * features/i386/64bit-segments.xml: New file.
10801 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10802 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10803 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10804 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10805 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10806 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10807 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10808 * features/i386/amd64-avx-linux.c: Regenerated.
10809 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10810 * features/i386/amd64-avx-mpx.c: Regenerated.
10811 * features/i386/amd64-avx512-linux.c: Regenerated.
10812 * features/i386/amd64-linux.c: Regenerated.
10813 * features/i386/amd64-mpx-linux.c: Regenerated.
10814 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10815 * features/i386/i386-avx-mpx.c: Regenerated.
10816 * features/i386/x32-avx-linux.c: Regenerated.
10817 * features/i386/x32-avx512-linux.c: Regenerated.
10818 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10819 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10820 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10821 * regformats/i386/amd64-linux.dat: Regenerated.
10822 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10823 * regformats/i386/x32-avx-linux.dat: Regenerated.
10824 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10825 * regformats/i386/x32-linux.dat: Regenerated.
10826
10827 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10828
10829 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10830 Set to AMD64_NUM_REGS.
10831
10832 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10833
10834 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10835 that checks validity of a register number.
10836
10837 2017-01-27 Kees Cook <keescook@google.com>
10838
10839 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10840 fetch_fpregs if target has fpa registers.
10841 (arm_linux_store_inferior_registers): Call store_fpregs if target
10842 has fpa registers.
10843
10844 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10845
10846 * cris-tdep.c (cris_gdbarch_init): Remove check for
10847 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10848
10849 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10850
10851 * corelow.c (get_core_register_section): Check for regset
10852 existence before checking for REGSET_VARIABLE_SIZE.
10853
10854 2017-01-26 Yao Qi <yao.qi@linaro.org>
10855 Pedro Alves <palves@redhat.com>
10856
10857 PR gdb/20939
10858 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10859 call memory_error, save memaddr instead.
10860 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10861 negative, cal memory_error.
10862 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10863
10864 2017-01-26 Yao Qi <yao.qi@linaro.org>
10865
10866 * disasm-selftests.c (memory_error_test): New function.
10867 (_initialize_disasm_selftests): Register memory_error_test.
10868
10869 2017-01-26 Yao Qi <yao.qi@linaro.org>
10870
10871 * Makefile.in (SFILES): Add disasm-selftests.c and
10872 selftest-arch.c.
10873 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10874 * disasm-selftests.c: New file.
10875 * selftest-arch.c: New file.
10876 * selftest-arch.h: New file.
10877
10878 2017-01-26 Yao Qi <yao.qi@linaro.org>
10879
10880 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10881 to bfd_arch_mep. Don't return 0 if section is not
10882 found. Call print_insn_mep.
10883
10884 2017-01-26 Pedro Alves <palves@redhat.com>
10885 Yao Qi <yao.qi@linaro.org>
10886
10887 * arm-tdep.c: Include "disasm.h".
10888 (gdb_print_insn_arm): Update code to get gdbarch.
10889 * disasm.c (dis_asm_read_memory): Change it to
10890 gdb_disassembler::dis_asm_read_memory.
10891 (dis_asm_memory_error): Likewise.
10892 (dis_asm_print_address): Likewise.
10893 (gdb_pretty_print_insn): Change it to
10894 gdb_disassembler::pretty_print_insn.
10895 (dump_insns): Add one argument gdb_disassemlber. All
10896 callers updated.
10897 (do_mixed_source_and_assembly_deprecated): Likewise.
10898 (do_mixed_source_and_assembly): Likewise.
10899 (do_assembly_only): Likewise.
10900 (gdb_disassembler::gdb_disassembler): New.
10901 (gdb_disassembler::print_insn): New.
10902 * disasm.h (class gdb_disassembler): New.
10903 (gdb_pretty_print_insn): Remove declaration.
10904 (gdb_disassemble_info): Likewise.
10905 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10906 (gdbscm_disasm_read_memory_worker): Update.
10907 (gdbscm_disasm_read_memory): Update.
10908 (gdbscm_disasm_memory_error): Remove.
10909 (gdbscm_disasm_print_address): Remove.
10910 (gdbscm_disassembler::gdbscm_disassembler): New.
10911 (gdbscm_print_insn_from_port): Update.
10912 * mips-tdep.c: Include disasm.h.
10913 (gdb_print_insn_mips): Update code to get gdbarch.
10914 * record-btrace.c (btrace_insn_history): Update.
10915 * spu-tdep.c: Include disasm.h.
10916 (struct spu_dis_asm_data): Remove.
10917 (struct spu_dis_asm_info): New.
10918 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10919 SPU id.
10920 (gdb_print_insn_spu): Cast disassemble_info to
10921 spu_dis_asm_info.
10922
10923 2017-01-26 Yao Qi <yao.qi@linaro.org>
10924
10925 * disasm.c (do_ui_file_delete): Delete.
10926 (gdb_insn_length): Move code creating stream to ...
10927 * utils.c (null_stream): ... here. New function.
10928 * utils.h (null_stream): Declare.
10929
10930 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10931
10932 * python/py-inferior.c (find_thread_object): Return directly
10933 from the loop. Remove "found" variable.
10934
10935 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10936
10937 GDB 7.12.1 released.
10938
10939 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10940
10941 * python/py-function.c (fnpy_call): Reorder declarations to have
10942 the gdbpy_enter object declared first.
10943 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10944
10945 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10946
10947 PR python/21068
10948 * python/python-internal.h (PyMem_RawMalloc): Define for
10949 Python < 3.4.
10950 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10951 PyMem_RawMalloc instead of PyMem_Malloc.
10952
10953 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10954 Luis Machado <lgustavo@codesourcery.com>
10955
10956 * NEWS (New commands): Mention flash-erase.
10957 (New MI commands): Mention target-flash-erase.
10958 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10959 command.
10960 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10961 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10962 * target.c (flash_erase_command): New function.
10963 (initialize_targets): Add new flash-erase command.
10964 * target.h (flash_erase_command): New declaration.
10965
10966 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10967
10968 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10969 HAVE_SYS_PROCFS_H is defined.
10970
10971 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10972
10973 * remote.c (struct cached_reg): Change data into a pointer.
10974 * (stop_reply_dtr): Free data pointers before deleting vector.
10975 (process_stop_reply): Likewise.
10976 (remote_parse_stop_reply): Allocate space for data
10977
10978 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10979
10980 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10981 MAX_REGISTER_SIZE.
10982 (amd64_pseudo_register_read_value): Likewise.
10983 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10984 (store_register_using_P): Likewise.
10985 * regcache.c (regcache_xfer_part): Likewise.
10986
10987 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10988
10989 Split real and pseudo registers.
10990 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10991 (sparc32_pseudo_regnum): New enum.
10992 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10993 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10994 (SPARC32_CP0_REGISTERS): New macro.
10995 (sparc32_pseudo_register_name): New function.
10996 (sparc32_register_name): Use sparc32_pseudo_register_name.
10997 (sparc32_pseudo_register_type): New function.
10998 (sparc32_register_type): Use sparc32_pseudo_register_type.
10999 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11000 pseudo register numbers.
11001 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11002 (SPARC64_CP0_REGISTERS): New macro.
11003 (sparc64_pseudo_register_name): New function.
11004 (sparc64_register_name): Use sparc64_pseudo_register_name.
11005 (sparc64_pseudo_register_type): New function.
11006 (sparc64_register_type): Use sparc64_pseudo_register_type.
11007 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11008 pseudo register numbers.
11009 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11010 sparc64_store_arguments): Handle pseudo register numbers.
11011
11012 2017-01-13 Yao Qi <yao.qi@linaro.org>
11013
11014 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11015 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11016 output.
11017 (getpkt_or_notif_sane_1): Likewise.
11018
11019 2017-01-13 Yao Qi <yao.qi@linaro.org>
11020
11021 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11022 of CC. Pass "-x c++-header" instead of "-x c".
11023
11024 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11025
11026 * remote.c (remote_can_async_p): Update comment.
11027
11028 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11029
11030 * linux-nat.c (linux_nat_can_async_p): Update comment.
11031
11032 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11033
11034 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11035
11036 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11037
11038 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11039
11040 2017-01-10 Tom Tromey <tom@tromey.com>
11041
11042 * python/py-type.c (typy_legacy_template_argument): Update.
11043 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11044 ~demangle_parse_info): Declare new members.
11045 (cp_demangled_name_to_comp): Return unique_ptr.
11046 (cp_demangled_name_parse_free)
11047 (make_cleanup_cp_demangled_name_parse_free)
11048 (cp_new_demangle_parse_info): Remove.
11049 * cp-support.c (do_demangled_name_parse_free_cleanup)
11050 (make_cleanup_cp_demangled_name_parse_free): Remove.
11051 (inspect_type, cp_canonicalize_string_full)
11052 (cp_canonicalize_string): Update.
11053 (mangled_name_to_comp): Change return type.
11054 (cp_class_name_from_physname, method_name_from_physname)
11055 (cp_func_name, cp_remove_params): Update.
11056 * cp-name-parser.y (demangle_parse_info): New constructor, from
11057 cp_new_demangle_parse_info.
11058 (~demangle_parse_info): New destructor, from
11059 cp_demangled_name_parse_free.
11060 (cp_merge_demangle_parse_infos): Update.
11061 (cp_demangled_name_to_comp): Change return type.
11062
11063 2017-01-10 Tom Tromey <tom@tromey.com>
11064
11065 * top.c (prevent_dont_repeat): Change return type.
11066 * python/python.c (execute_gdb_command): Use std::string.
11067 Update.
11068 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11069 * command.h (prevent_dont_repeat): Change return type.
11070 * breakpoint.c (bpstat_do_actions_1): Update.
11071
11072 2017-01-10 Tom Tromey <tom@tromey.com>
11073
11074 * value.h (scoped_value_mark::~scoped_value_mark): Call
11075 free_to_mark.
11076 (scoped_value_mark::free_to_mark): New method.
11077 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11078 scoped_value_mark.
11079
11080 2017-01-10 Tom Tromey <tom@tromey.com>
11081
11082 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11083 (valpy_reference_value, valpy_const_value, valpy_get_address)
11084 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11085 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11086 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11087 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11088 scoped_value_mark.
11089 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11090 * value.h (scoped_value_mark): New class.
11091
11092 2017-01-10 Tom Tromey <tom@tromey.com>
11093
11094 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11095 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11096 * psymtab.c (discard_psymtabs_upto): Remove.
11097 (make_cleanup_discard_psymtabs): Remove.
11098 (struct psymtab_state): Remove.
11099
11100 2017-01-10 Tom Tromey <tom@tromey.com>
11101
11102 * record-full.c (record_full_save_cleanups): Remove.
11103 (record_full_save): Use gdb::unlinker.
11104 * gcore.c (do_bfd_delete_cleanup): Remove.
11105 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11106 cleanups.
11107 * dwarf2read.c (unlink_if_set): Remove.
11108 (write_psymtabs_to_index): Use gdb::unlinker.
11109 * common/gdb_unlinker.h: New file.
11110
11111 2017-01-10 Tom Tromey <tom@tromey.com>
11112
11113 * windows-tdep.c (windows_xfer_shared_library): Update.
11114 * windows-nat.c (windows_make_so): Update.
11115 * utils.h (make_cleanup_bfd_unref): Remove.
11116 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11117 * symfile.h (symfile_bfd_open)
11118 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11119 * symfile.c (read_symbols, symbol_file_add)
11120 (separate_debug_file_exists): Update.
11121 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11122 (generic_load, reread_symbols): Update.
11123 * symfile-mem.c (symbol_file_add_from_memory): Update.
11124 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11125 (spu_symbol_file_add_from_memory): Update.
11126 * solist.h (struct target_so_ops) <bfd_open>: Return
11127 gdb_bfd_ref_ptr.
11128 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11129 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11130 gdb_bfd_ref_ptr.
11131 (solib_map_sections, reload_shared_libraries_1): Update.
11132 * solib-svr4.c (enable_break): Update.
11133 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11134 * solib-frv.c (enable_break2): Update.
11135 * solib-dsbt.c (enable_break): Update.
11136 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11137 gdb_bfd_ref_ptr.
11138 (darwin_solib_get_all_image_info_addr_at_init): Update.
11139 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11140 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11141 * record-full.c (record_full_save): Update.
11142 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11143 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11144 * minidebug.c (find_separate_debug_file_in_section): Return
11145 gdb_bfd_ref_ptr.
11146 * machoread.c (macho_add_oso_symfile): Change abfd to
11147 gdb_bfd_ref_ptr.
11148 (macho_symfile_read_all_oso): Update.
11149 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11150 (macho_symfile_read): Update.
11151 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11152 (jit_bfd_try_read_symtab): Update.
11153 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11154 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11155 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11156 gdb_bfd_ref_ptr.
11157 (gdb_bfd_ref_policy): New struct.
11158 (gdb_bfd_ref_ptr): New typedef.
11159 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11160 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11161 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11162 gdb_bfd_ref_ptr.
11163 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11164 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11165 (gcore_command): Update.
11166 * exec.c (exec_file_attach): Update.
11167 * elfread.c (elf_symfile_read): Update.
11168 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11169 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11170 (open_and_init_dwo_file): Update.
11171 (open_dwp_file): Return gdb_bfd_ref_ptr.
11172 (open_and_init_dwp_file): Update.
11173 * corelow.c (core_open): Update.
11174 * compile/compile-object-load.c (compile_object_load): Update.
11175 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11176 * coffread.c (coff_symfile_read): Update.
11177 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11178 gdb_bfd_ref_ptr. Rename.
11179 (dump_bfd_file, restore_command): Update.
11180 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11181 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11182 (find_separate_debug_file_by_buildid): Update.
11183
11184 2017-01-10 Tom Tromey <tom@tromey.com>
11185
11186 * common/gdb_ref_ptr.h: New file.
11187 * python/py-ref.h (struct gdbpy_ref_policy): New.
11188 (gdbpy_ref): Now a typedef.
11189
11190 2017-01-10 Tom Tromey <tom@tromey.com>
11191
11192 * utils.h (make_cleanup_htab_delete): Don't declare.
11193 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11194 Remove.
11195 * linespec.c (decode_compound_collector): Add constructor,
11196 destructor.
11197 (lookup_prefix_sym): Remove cleanup.
11198 (symtab_collector): Add constructor, destructor.
11199 (collect_symtabs_from_filename): Remove cleanup.
11200 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11201 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11202 Use htab_up.
11203 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11204 * dwarf2read.c (dw2_expand_symtabs_matching)
11205 (dw2_map_symbol_filenames, dwarf_decode_macros)
11206 (write_psymtabs_to_index): Use htab_up.
11207 * dwarf2loc.c (func_verify_no_selftailcall)
11208 (call_site_find_chain_1, func_verify_no_selftailcall)
11209 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11210 std::vector, gdb::unique_xmalloc_ptr.
11211 (call_sitep): Remove typedef.
11212 (dwarf2_locexpr_baton_eval): Remove unused variable.
11213
11214 2017-01-10 Tom Tromey <tom@tromey.com>
11215
11216 * python/python-internal.h (make_cleanup_py_decref)
11217 (make_cleanup_py_xdecref): Don't declare.
11218 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11219 (py_xdecref, make_cleanup_py_xdecref): Remove.
11220
11221 2017-01-10 Tom Tromey <tom@tromey.com>
11222
11223 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11224 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11225
11226 2017-01-10 Tom Tromey <tom@tromey.com>
11227
11228 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11229
11230 2017-01-10 Tom Tromey <tom@tromey.com>
11231
11232 * python/py-utils.c (unicode_to_encoded_string)
11233 (python_string_to_target_string)
11234 (python_string_to_target_python_string)
11235 (python_string_to_host_string, gdbpy_obj_to_string)
11236 (get_addr_from_python): Use gdbpy_ref.
11237
11238 2017-01-10 Tom Tromey <tom@tromey.com>
11239
11240 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11241 gdbpy_ref.
11242
11243 2017-01-10 Tom Tromey <tom@tromey.com>
11244
11245 * python/python.c (eval_python_command, gdbpy_decode_line)
11246 (gdbpy_run_events, gdbpy_start_type_printers)
11247 (gdbpy_apply_type_printers): Use gdbpy_ref.
11248
11249 2017-01-10 Tom Tromey <tom@tromey.com>
11250
11251 * python/py-param.c (get_doc_string, compute_enum_values): Use
11252 gdbpy_ref.
11253
11254 2017-01-10 Tom Tromey <tom@tromey.com>
11255
11256 * python/py-inferior.c (find_thread_object, build_inferior_list):
11257 Use gdbpy_ref.
11258
11259 2017-01-10 Tom Tromey <tom@tromey.com>
11260
11261 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11262
11263 2017-01-10 Tom Tromey <tom@tromey.com>
11264
11265 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11266 gdbpy_ref.
11267
11268 2017-01-10 Tom Tromey <tom@tromey.com>
11269
11270 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11271 extra incref.
11272 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11273 Use gdbpy_ref.
11274
11275 2017-01-10 Tom Tromey <tom@tromey.com>
11276
11277 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11278 gdbpy_ref.
11279
11280 2017-01-10 Tom Tromey <tom@tromey.com>
11281
11282 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11283 decref results of PyArg_ParseTupleAndKeywords.
11284
11285 2017-01-10 Tom Tromey <tom@tromey.com>
11286
11287 * python/python.c (python_run_simple_file): Use
11288 unique_xmalloc_ptr, gdbpy_ref.
11289
11290 2017-01-10 Tom Tromey <tom@tromey.com>
11291
11292 * python/py-prettyprint.c (print_stack_unless_memory_error)
11293 (print_string_repr, print_children): Use gdbpy_ref.
11294 (dummy_python_frame): New class.
11295 (dummy_python_frame::dummy_python_frame): Rename from
11296 push_dummy_python_frame.
11297 (py_restore_tstate): Remove.
11298
11299 2017-01-10 Tom Tromey <tom@tromey.com>
11300
11301 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11302
11303 2017-01-10 Tom Tromey <tom@tromey.com>
11304
11305 * python/python.c (ensure_python_env, restore_python_env):
11306 Remove.
11307 * python/python-internal.h (ensure_python_env): Don't declare.
11308 * varobj.h (varobj_ensure_python_env): Don't declare.
11309 * varobj.c (varobj_ensure_python_env): Remove.
11310
11311 2017-01-10 Tom Tromey <tom@tromey.com>
11312
11313 * varobj.c (varobj_value_get_print_value): Use
11314 gdbpy_enter_varobj.
11315
11316 2017-01-10 Tom Tromey <tom@tromey.com>
11317
11318 * python/py-prettyprint.c (print_string_repr, print_children):
11319 Update.
11320 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11321 of "encoding".
11322 * varobj.c (varobj_value_get_print_value): Update.
11323 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11324
11325 2017-01-10 Tom Tromey <tom@tromey.com>
11326
11327 * varobj.c (varobj_get_display_hint)
11328 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11329 (varobj_set_visualizer, free_variable): Use
11330 gdbpy_enter_varobj.
11331
11332 2017-01-10 Tom Tromey <tom@tromey.com>
11333
11334 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11335 (do_finish_initialization): New function. Use gdbpy_ref.
11336 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11337 do_finish_initialization.
11338
11339 2017-01-10 Tom Tromey <tom@tromey.com>
11340
11341 * python/py-param.c (get_set_value, get_show_value): Use
11342 gdbpy_enter, gdbpy_ref.
11343
11344 2017-01-10 Tom Tromey <tom@tromey.com>
11345
11346 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11347
11348 2017-01-10 Tom Tromey <tom@tromey.com>
11349
11350 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11351
11352 2017-01-10 Tom Tromey <tom@tromey.com>
11353
11354 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11355 Use gdbpy_enter_varobj.
11356
11357 2017-01-10 Tom Tromey <tom@tromey.com>
11358
11359 * varobj.c (gdbpy_enter_varobj): New constructor.
11360 * python/python-internal.h (gdbpy_enter_varobj): New class.
11361 * python/py-varobj.c (py_varobj_get_iterator): Use
11362 gdbpy_enter_varobj.
11363
11364 2017-01-10 Tom Tromey <tom@tromey.com>
11365
11366 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11367 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11368 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11369 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11370 unique_xmalloc_ptr.
11371 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11372
11373 2017-01-10 Tom Tromey <tom@tromey.com>
11374
11375 * python/py-xmethods.c (invoke_match_method): Use
11376 gdbpy_ref.
11377
11378 2017-01-10 Tom Tromey <tom@tromey.com>
11379
11380 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11381 gdbpy_enter, gdbpy_ref.
11382
11383 2017-01-10 Tom Tromey <tom@tromey.com>
11384
11385 * python/python.c (python_interactive_command): Use gdbpy_enter.
11386
11387 2017-01-10 Tom Tromey <tom@tromey.com>
11388
11389 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11390 gdbpy_ref.
11391
11392 2017-01-10 Tom Tromey <tom@tromey.com>
11393
11394 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11395 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11396
11397 2017-01-10 Tom Tromey <tom@tromey.com>
11398
11399 * utils.h (htab_deleter): New struct.
11400 (htab_up): New typedef.
11401 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11402 gdbpy_enter, gdbpy_ref, htab_up.
11403
11404 2017-01-10 Tom Tromey <tom@tromey.com>
11405
11406 * python/py-unwind.c (pending_frame_invalidate): Remove.
11407 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11408
11409 2017-01-10 Tom Tromey <tom@tromey.com>
11410
11411 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11412 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11413
11414 2017-01-10 Tom Tromey <tom@tromey.com>
11415
11416 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11417
11418 2017-01-10 Tom Tromey <tom@tromey.com>
11419
11420 * python/python.c (gdbpy_eval_from_control_command)
11421 (gdbpy_source_script, gdbpy_run_events)
11422 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11423 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11424 gdbpy_enter.
11425
11426 2017-01-10 Tom Tromey <tom@tromey.com>
11427
11428 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11429
11430 2017-01-10 Tom Tromey <tom@tromey.com>
11431
11432 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11433
11434 2017-01-10 Tom Tromey <tom@tromey.com>
11435
11436 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11437 (python_on_inferior_call_pre, python_on_inferior_call_post)
11438 (python_on_memory_change, python_on_register_change)
11439 (python_inferior_exit, python_new_objfile, add_thread_object)
11440 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11441
11442 2017-01-10 Tom Tromey <tom@tromey.com>
11443
11444 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11445 (bpfinishpy_handle_exit): Use gdbpy_enter.
11446
11447 2017-01-10 Tom Tromey <tom@tromey.com>
11448
11449 * python/py-cmd.c (cmdpy_destroyer)
11450 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11451 gdbpy_enter.
11452
11453 2017-01-10 Tom Tromey <tom@tromey.com>
11454
11455 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11456 gdbpy_enter.
11457 (gdbpy_breakpoint_has_cond): Likewise.
11458
11459 2017-01-10 Tom Tromey <tom@tromey.com>
11460
11461 * python/python.c (gdbpy_enter): New constructor.
11462 (~gdbpy_enter): New destructor.
11463 (restore_python_env, ensure_python_env): Rewrite.
11464 * python/python-internal.h (gdbpy_enter): New class.
11465
11466 2017-01-10 Tom Tromey <tom@tromey.com>
11467
11468 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11469
11470 2017-01-10 Tom Tromey <tom@tromey.com>
11471
11472 * python/py-value.c (value_has_field, get_field_flag)
11473 (get_field_type, valpy_getitem, convert_value_from_python): Use
11474 gdbpy_ref.
11475
11476 2017-01-10 Tom Tromey <tom@tromey.com>
11477
11478 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11479 gdbpy_ref.
11480
11481 2017-01-10 Tom Tromey <tom@tromey.com>
11482
11483 * python/py-prettyprint.c (search_pp_list)
11484 (find_pretty_printer_from_objfiles)
11485 (find_pretty_printer_from_progspace)
11486 (find_pretty_printer_from_gdb, find_pretty_printer)
11487 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11488 gdbpy_ref.
11489
11490 2017-01-10 Tom Tromey <tom@tromey.com>
11491
11492 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11493
11494 2017-01-10 Tom Tromey <tom@tromey.com>
11495
11496 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11497 (ltpy_get_all_source_lines): Use gdbpy_ref.
11498
11499 2017-01-10 Tom Tromey <tom@tromey.com>
11500
11501 * python/py-framefilter.c (extract_sym, extract_value)
11502 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11503 gdbpy_ref.
11504
11505 2017-01-10 Tom Tromey <tom@tromey.com>
11506
11507 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11508
11509 2017-01-10 Tom Tromey <tom@tromey.com>
11510
11511 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11512
11513 2017-01-10 Tom Tromey <tom@tromey.com>
11514
11515 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11516 gdbpy_ref.
11517
11518 2017-01-10 Tom Tromey <tom@tromey.com>
11519
11520 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11521
11522 2017-01-10 Tom Tromey <tom@tromey.com>
11523
11524 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11525 (typy_range): Use gdbpy_ref.
11526
11527 2017-01-10 Tom Tromey <tom@tromey.com>
11528
11529 * python/py-threadevent.c (create_thread_event_object): Use
11530 gdbpy_ref.
11531 * python/py-stopevent.c (create_stop_event_object): Simplify.
11532 (emit_stop_event): Use gdbpy_ref.
11533 * python/py-signalevent.c (create_signal_event_object): Use
11534 gdbpy_ref.
11535 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11536 (emit_new_objfile_event, create_clear_objfiles_event_object)
11537 (emit_clear_objfiles_event): Use gdbpy_ref.
11538 * python/py-infevents.c (create_inferior_call_event_object)
11539 (create_register_changed_event_object)
11540 (create_memory_changed_event_object, emit_inferior_call_event)
11541 (emit_memory_changed_event, emit_register_changed_event): Use
11542 gdbpy_ref.
11543 * python/py-exitedevent.c (create_exited_event_object)
11544 (emit_exited_event): Use gdbpy_ref.
11545 * python/py-event.h (evpy_emit_event): Remove
11546 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11547 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11548 * python/py-continueevent.c (emit_continue_event): Use
11549 gdbpy_ref.
11550 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11551 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11552 gdbpy_ref.
11553 * python/py-bpevent.c (create_breakpoint_event_object): Use
11554 gdbpy_ref.
11555
11556 2017-01-10 Tom Tromey <tom@tromey.com>
11557
11558 * python/py-ref.h: New file.
11559
11560 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11561
11562 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11563 void.
11564 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11565 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11566 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11567 * ui-out.c (ui_out::redirect): Likewise.
11568 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11569 * cli/cli-logging.c (set_logging_redirect): Update call site of
11570 ui_out::redirect.
11571 (handle_redirections): Likewise.
11572 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11573 * top.c (execute_command_to_string): Likewise.
11574 * utils.c (do_ui_out_redirect_pop): Likewise.
11575
11576 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11577
11578 * stack.c (_initialize_stack): Update "frame" command help message.
11579
11580 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11581
11582 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11583
11584 2017-01-06 Yao Qi <yao.qi@linaro.org>
11585
11586 * x86-linux-nat.h: Include gdb_proc_service.h.
11587
11588 2017-01-06 Yao Qi <yao.qi@linaro.org>
11589
11590 * ser-base.h: Include serial.h.
11591
11592 2017-01-06 Yao Qi <yao.qi@linaro.org>
11593
11594 * ppc-linux-tdep.h: Include ppc-tdep.h.
11595
11596 2017-01-06 Yao Qi <yao.qi@linaro.org>
11597
11598 * nat/amd64-linux-siginfo.h: Include signal.h.
11599
11600 2017-01-06 Yao Qi <yao.qi@linaro.org>
11601
11602 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11603
11604 2017-01-06 Yao Qi <yao.qi@linaro.org>
11605
11606 * mi/mi-parse.h: Include mi-cmds.h.
11607
11608 2017-01-06 Yao Qi <yao.qi@linaro.org>
11609
11610 * inf-loop.c: Don't include "target.h".
11611 * inf-loop.h: Include it here.
11612
11613 2017-01-06 Yao Qi <yao.qi@linaro.org>
11614
11615 * dfp.h: Include "dboulest.h" and "expression.h".
11616
11617 2017-01-06 Yao Qi <yao.qi@linaro.org>
11618
11619 * ax-gdb.h: Include "ax.h".
11620
11621 2017-01-06 Yao Qi <yao.qi@linaro.org>
11622
11623 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11624 with nat/gdb_ptrace.h.
11625
11626 2017-01-05 Yao Qi <yao.qi@linaro.org>
11627
11628 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11629 new line.
11630 (mips64_fbsd_sigframe_init): Likewise.
11631
11632 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11633
11634 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11635 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11636
11637 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11638
11639 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11640 * NEWS: Mention new FreeBSD/mips native configuration.
11641 * config/mips/fbsd.mh: New file.
11642 * configure.host: Add mips*-*-freebsd*.
11643 * mips-fbsd-nat.c: New file.
11644
11645 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11646
11647 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11648 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11649 * NEWS: Mention new FreeBSD/mips target.
11650 * configure.tgt: Add mips*-*-freebsd*.
11651 * mips-fbsd-tdep.c: New file.
11652 * mips-fbsd-tdep.h: New file.
11653
11654 2017-01-04 Yao Qi <yao.qi@linaro.org>
11655
11656 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11657 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11658
11659 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11660
11661 Update copyright year range in all GDB files.
11662
11663 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11664
11665 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11666
11667 For older changes see ChangeLog-2016.
11668 \f
11669 Local Variables:
11670 mode: change-log
11671 left-margin: 8
11672 fill-column: 74
11673 version-control: never
11674 coding: utf-8
11675 End:
This page took 0.253353 seconds and 5 git commands to generate.