]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Constify some commands in probes.c
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
67810076
TT
12017-09-27 Tom Tromey <tom@tromey.com>
2
3 * probe.c (enable_probes_command, disable_probes_command):
4 Constify.
5
1d8b34a7
TT
62017-09-27 Tom Tromey <tom@tromey.com>
7
8 * symfile.c (symbol_file_command): Constify.
9 * gdbcore.h (deprecated_file_changed_hook): Constify.
10 * exec.c (deprecated_file_changed_hook, exec_file_command)
11 (file_command): Constify.
12 * defs.h (symbol_file_command): Constify.
13
442019e1
TT
142017-09-27 Tom Tromey <tom@tromey.com>
15
16 * remote-fileio.c (set_system_call_allowed)
17 (show_system_call_allowed): Constify.
18
2983f7cb
TT
192017-09-27 Tom Tromey <tom@tromey.com>
20
21 * tracepoint.c (delete_trace_variable_command)
22 (tfind_end_command, tfind_start_command, tfind_pc_command)
23 (tfind_tracepoint_command, tfind_line_command)
24 (tfind_range_command, tfind_outside_command): Constify.
25
4fd41b24
TT
262017-09-27 Tom Tromey <tom@tromey.com>
27
28 * ax-gdb.c (maint_agent_printf_command, agent_command)
29 (agent_eval_command): Constify.
30
f2fc3015
TT
312017-09-27 Tom Tromey <tom@tromey.com>
32
33 * tracepoint.c (info_scope_command): Constify.
34 * python/python.c (gdbpy_decode_line): Constify.
35 * python/py-breakpoint.c (bppy_init): Constify.
36 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
37 * location.h: (new_linespec_location)
38 (string_to_event_location_basic, string_to_event_location):
39 Constify.
40 * location.c (new_linespec_location)
41 (string_to_event_location_basic, string_to_event_location):
42 Constify.
43 * linespec.h (decode_line_with_current_source)
44 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
45 * linespec.c (linespec_lex_to_end)
46 (decode_line_with_current_source)
47 (decode_line_with_last_displayed): Constify.
48 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
49 Constify.
50 * cli/cli-cmds.c (edit_command, list_command): Constify.
51 * breakpoint.h (until_break_command, watch_command_wrapper)
52 (awatch_command_wrapper, rwatch_command_wrapper)
53 (init_ada_exception_breakpoint): Constify.
54 * breakpoint.c (break_command_1, dprintf_command)
55 (break_range_command, watch_command_wrapper)
56 (rwatch_command_wrapper, awatch_command_wrapper)
57 (until_break_command, init_ada_exception_breakpoint)
58 (strace_marker_create_sals_from_location, trace_command)
59 (ftrace_command, strace_command, struct tracepoint): Constify.
60 * ax-gdb.c (agent_command_1): Constify.
61 * ada-lang.c (ada_exception_sal): Constify.
62
8c2f95f4
TT
632017-09-27 Tom Tromey <tom@tromey.com>
64
65 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
66 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
67 (get_context_size, no_chunk, get_insn_history_modifiers)
68 (cmd_record_insn_history, get_call_history_modifiers)
69 (cmd_record_call_history): Constify.
70
a0d65762
TT
712017-09-27 Tom Tromey <tom@tromey.com>
72
73 * source.c (show_substitute_path_command)
74 (unset_substitute_path_command, set_substitute_path_command):
75 Constify.
76
58971144
TT
772017-09-27 Tom Tromey <tom@tromey.com>
78
79 * typeprint.c (maintenance_print_type): Constify.
80 * maint.c (maintenance_dump_me, maintenance_demangle)
81 (maintenance_time_display, maintenance_info_sections)
82 (maintenance_print_statistics, maintenance_deprecate)
83 (maintenance_undeprecate): Constify.
84 (maintenance_do_deprecate): Constify. Use std::string.
85 (maintenance_selftest): Constify.
86 * gdbtypes.h (maintenance_print_type): Constify.
87
c482f52c
TT
882017-09-27 Tom Tromey <tom@tromey.com>
89
90 * hppa-tdep.c (unwind_command): Constify.
91
e100df1a
TT
922017-09-27 Tom Tromey <tom@tromey.com>
93
94 * target-descriptions.c (unset_tdesc_filename_cmd)
95 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
96 Constify.
97
31d56ade
TT
982017-09-27 Tom Tromey <tom@tromey.com>
99
100 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
101
b961da0b
TT
1022017-09-27 Tom Tromey <tom@tromey.com>
103
104 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
105
e2d8ae16
TT
1062017-09-27 Tom Tromey <tom@tromey.com>
107
108 * tui/tui-regs.c (tui_reg_command): Constify.
109
863779b0
TT
1102017-09-27 Tom Tromey <tom@tromey.com>
111
112 * skip.c (skip_file_command, skip_function_command)
113 (skip_enable_command, skip_disable_command, skip_delete_command):
114 Constify.
115
cdb34d4a
TT
1162017-09-27 Tom Tromey <tom@tromey.com>
117
118 * record-btrace.c (cmd_record_btrace_bts_start)
119 (cmd_record_btrace_pt_start): Constify.
120
e99c83e7
TT
1212017-09-27 Tom Tromey <tom@tromey.com>
122
123 * symmisc.c (maintenance_print_symbols)
124 (maintenance_print_msymbols, maintenance_print_objfiles)
125 (maintenance_info_symtabs, maintenance_check_symtabs)
126 (maintenance_expand_symtabs, maintenance_info_line_tables):
127 Constify.
128
32faf971
TT
1292017-09-27 Tom Tromey <tom@tromey.com>
130
131 * top.c (new_ui_command): Constify.
132
2cf311eb
TT
1332017-09-27 Tom Tromey <tom@tromey.com>
134
135 * symfile.c (add_symbol_file_command)
136 (remove_symbol_file_command, list_overlays_command)
137 (map_overlay_command, unmap_overlay_command)
138 (overlay_auto_command, overlay_manual_command)
139 (overlay_off_command, overlay_load_command): Constify.
140
e6738699
TT
1412017-09-27 Tom Tromey <tom@tromey.com>
142
143 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
144 (info_spu_mailbox_command, info_spu_dma_command)
145 (info_spu_proxydma_command): Constify.
146
aa360cd5
TT
1472017-09-27 Tom Tromey <tom@tromey.com>
148
149 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
150
898241a5
TT
1512017-09-27 Tom Tromey <tom@tromey.com>
152
153 * cli/cli-script.c (user_defined_command): Constify.
154
2d0ac106
TT
1552017-09-27 Tom Tromey <tom@tromey.com>
156
157 * cli/cli-dump.c (dump_memory_command, dump_value_command)
158 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
159 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
160 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
161 (dump_binary_value, append_binary_memory, append_binary_value):
162 Constify.
163 (struct dump_context) <func>: Constify.
164 (add_dump_command): Update.
165
dede02ce
TT
1662017-09-27 Tom Tromey <tom@tromey.com>
167
168 * cli/cli-cmds.c (show_version, show_configuration)
169 (source_command, show_user): Constify.
170
d3cb6b99
TT
1712017-09-27 Tom Tromey <tom@tromey.com>
172
173 * target.c (maintenance_print_target_stack): Constify.
174
1970a12f
TT
1752017-09-27 Tom Tromey <tom@tromey.com>
176
177 * interps.c (interpreter_exec_cmd): Constify.
178
41243651
TT
1792017-09-27 Tom Tromey <tom@tromey.com>
180
181 * record-full.c (cmd_record_full_restore): Constify.
182
4465d9db
TT
1832017-09-27 Tom Tromey <tom@tromey.com>
184
185 * memattr.c (enable_mem_command, disable_mem_command)
186 (delete_mem_command): Constify.
187
ad25e423
TT
1882017-09-27 Tom Tromey <tom@tromey.com>
189
190 * value.c (show_convenience): Constify.
191
d64097b1
TT
1922017-09-27 Tom Tromey <tom@tromey.com>
193
194 * gdbcore.h (core_file_command): Update.
195 * corefile.c (core_file_command): Constify.
196
4d4589ef
TT
1972017-09-27 Tom Tromey <tom@tromey.com>
198
199 * user-regs.c (maintenance_print_user_registers): Constify.
200
32a7bf17
TT
2012017-09-27 Tom Tromey <tom@tromey.com>
202
203 * cp-namespace.c (maintenance_cplus_namespace): Constify.
204
4a475551
TT
2052017-09-27 Tom Tromey <tom@tromey.com>
206
207 * cp-support.c (first_component_command): Constify.
208
990b9f9f
TT
2092017-09-27 Tom Tromey <tom@tromey.com>
210
211 * psymtab.c (maintenance_print_psymbols)
212 (maintenance_info_psymtabs, maintenance_check_psymtabs):
213 Constify.
214
c281872e
TT
2152017-09-27 Tom Tromey <tom@tromey.com>
216
217 * windows-tdep.c (display_tib): Constify.
218
5b64bf74
TT
2192017-09-27 Tom Tromey <tom@tromey.com>
220
221 * linux-fork.c (delete_checkpoint_command)
222 (detach_checkpoint_command): Constify.
223
4ada038f
TT
2242017-09-27 Tom Tromey <tom@tromey.com>
225
226 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
227
57f5a81b
TT
2282017-09-27 Tom Tromey <tom@tromey.com>
229
230 * arc-tdep.c (dump_arc_instruction_command): Constify.
231
b0a8e6c4
TT
2322017-09-27 Tom Tromey <tom@tromey.com>
233
234 * valprint.c (set_radix, show_radix): Constify.
235
8d97dc1c
TT
2362017-09-27 Tom Tromey <tom@tromey.com>
237
238 * dtrace-probe.c (info_probes_dtrace_command): Constify.
239
eb7c454d
TT
2402017-09-27 Tom Tromey <tom@tromey.com>
241
242 * command.h (not_just_help_class_command): Update.
243 * cli/cli-decode.h (not_just_help_class_command): Update.
244 * cli/cli-decode.c (not_just_help_class_command): Constify.
245
e4e33335
TT
2462017-09-27 Tom Tromey <tom@tromey.com>
247
248 * gdb_bfd.c (maintenance_info_bfds): Constify.
249
0450cc4c
TT
2502017-09-27 Tom Tromey <tom@tromey.com>
251
252 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
253 overloads.
254 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
255 (do_const_cfunc): New function.
256 (cmd_cfunc_eq): New overload.
257 (cli_user_command_p): Check do_const_cfunc.
258 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
259 const_cfunc.
260 * command.h (add_cmd): Add const overload and no-function
261 overload.
262 (set_cmd_cfunc): Add const overload.
263 (cmd_const_cfunc_ftype): Declare.
264 (cmd_cfunc_eq): Add const overload.
265 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
266 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
267 overload.
268
a9bbfbd8
TT
2692017-09-27 Tom Tromey <tom@tromey.com>
270
271 * macroexp.c (get_next_token_for_substitution): New function.
272 (substitute_args): Call it. Check for __VA_OPT__.
273
5230b05a
WT
2742017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
275 Pedro Alves <palves@redhat.com>
276
277 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
278 producer_is_icc_lt_14.
279 (producer_is_icc_lt_14): New function.
280 (check_producer): Add code for checking version of ICC.
281 (producer_is_icc): Move to producer.c.
282 (read_structure_type): Restrict ICC workaround to ICC<14.
283 * producer.c: Include selftest.h.
284 (producer_is_icc, producer_parsing_tests, _initialize_producer):
285 New functions.
286 * producer.h (producer_is_icc): New declaration.
287
b32b108a
WT
2882017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
289
290 * Makefile.in (SFILES): Add producer.c.
291 (COMMON_OBS): Add producer.o
292 * amd64-tdep.c (producer.h): Add new include.
293 * dwarf2read.c (producer.h): Add new include.
294 * producer.c: New file.
295 * producer.h: New file.
296 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
297 producer.c.
298 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
299 producer.h.
300
5007d765
MK
3012017-09-26 Matthias Klose <doko@ubuntu.com>
302
303 * configure.ac: Search ncursesw before ncurses.
304 Check ncursesw/ncurses.h before ncurses/ncurses.h.
305 * gdb_curses.h: Include <ncursesw/ncurses.h>
306 * config.in, configure: Regenerate.
307
281c4447
RO
3082017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
309
310 PR gdb/22185
311 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
312 obsolete.
313 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
314 Remove i386sol2 support.
315 * configure.nat <i386sol2>: Remove.
316 <sol2-64>: Fold into ...
317 <sol2>: ... this.
318 Move common settings to default section.
319 Add sol-thread.o.
320 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
321 x86_64-*-solaris2.1[0-9]*>: Rename to ...
322 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
323 <i[34567]86-*-solaris*>: Remove.
324 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
325
326 * configure.ac: Remove wctype in libw check.
327 (_MSE_INT_H): Don't define on Solaris 7-9.
328 <solaris*>: Remove libthread_db.so.1 check.
329 * configure: Regenerate.
330 * config.in: Regenerate.
331
332 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
333 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
334 (gdb_ps_size_t): Remove.
335 Use base types in users.
336 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
337
338 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
339
39b06c20
RO
3402017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
341
342 PR build/22206
343 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
344 (adi_is_addr_mapped): Likewise.
345 (PSR_ICC): Don't redefine.
346 (PSR_IMPL): Likewise.
347
6c3e20f1
TT
3482017-09-25 Tom Tromey <tom@tromey.com>
349
350 * regcache.c (regcache::dump): Use string_printf.
351
b292235f
TT
3522017-09-25 Tom Tromey <tom@tromey.com>
353
354 * regcache.c (class regcache_invalidator): New.
355 (struct register_to_invalidate): Remove.
356 (make_cleanup_regcache_invalidate): Remove.
357 (regcache::raw_write): Use regcache_invalidator.
358
9ac86b52
TT
3592017-09-25 Tom Tromey <tom@tromey.com>
360
361 * spu-tdep.c (spu2ppu_sniffer): Update.
362 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
363 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
364 Remove.
365 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
366 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
367 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
368 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
369 (frame_pop): Update.
370
c0e383c6
TT
3712017-09-25 Tom Tromey <tom@tromey.com>
372
373 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
374 * regcache.h (regcache_xfree): Don't declare.
375 * regcache.c (regcache_xfree): Remove.
376 (do_regcache_xfree): Use delete.
377 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
378 * linux-fork.c (free_fork): Use delete.
379 (fork_save_infrun_state): Likewise.
380 * jit.c (jit_dealloc_cache): Use delete.
381 * infrun.c (discard_infcall_suspend_state): Use delete.
382
791199cc
TT
3832017-09-25 Tom Tromey <tom@tromey.com>
384
385 * regcache.h (regcache_xmalloc): Don't declare.
386 (regcache_raw_set_cached_value): Update comment.
387 * regcache.c (regcache_xmalloc): Remove.
388 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
389 * jit.c (jit_frame_sniffer): Use new.
390 * frame.c (frame_save_as_regcache): Use new.
391
289e23aa
AA
3922017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
393
394 * NEWS: Advertise support for guarded-storage registers on IBM z.
395
1b63490c
AA
3962017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
397
398 * s390-linux-nat.c (have_regset_gs): New static variable.
399 (s390_linux_fetch_inferior_registers): Handle guarded-storage
400 control block and guarded-storage broadcast control regsets.
401 (s390_read_description): Detect whether the target has
402 guarded-storage support, return appropriate tdesc.
403 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
404 (features/s390x-gs-linux64.c): Likewise.
405 (struct gdbarch_tdep) <have_gs>: New field.
406 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
407 (s390_gsbc_regset): New variables.
408 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
409 and s390_gsbc_regset, if applicable.
410 (s390_core_read_description): Check whether core file was from a
411 target with guarded-storage support; include appropriate regsets.
412 (s390_gdbarch_init): Add registers for guarded-storage support.
413 (_initialize_s390_tdep): Initialize new target descriptions that
414 include registers for guarded-storage support.
415 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
416 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
417 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
418 (S390_NUM_REGS): Adjust macro definition.
419 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
420 (tdesc_s390x_gs_linux64): New declarations.
421
96235dc1
AA
4222017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
423
424 * features/s390-gs-linux64.xml: New file.
425 * features/s390-gs.xml: New file.
426 * features/s390-gsbc.xml: New file.
427 * features/s390x-gs-linux64.xml: New file.
428 * features/Makefile (WHICH): Add s390-gs-linux64 and
429 s390x-gs-linux64.
430 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
431 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
432 * features/s390-gs-linux64.c: New generated file.
433 * features/s390x-gs-linux64.c: New file.
434 * regformats/s390-gs-linux64.dat: New file.
435 * regformats/s390x-gs-linux64.dat: New file.
436
b4a7c699
TT
4372017-09-23 Tom Tromey <tom@tromey.com>
438
439 * defs.h (make_cleanup_override_quit_handler): Don't declare.
440
c2f97536
TT
4412017-09-22 Tom Tromey <tom@tromey.com>
442
443 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
444 type to scoped_restore_tmpl.
445 <scoped_input_handler>: Initialize m_quit_handler directly.
446
43573013
SDJ
4472017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
448
449 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
450 (cd_command): Likewise. Free "current_directory" before
451 assigning to it.
452 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
453 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
454 * top.c (gdb_dirbuf): Remove global declaration.
455 * top.h (gdb_dirbuf): Likewise.
456
6ec2e0f5
SDJ
4572017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
458
459 * gnulib/aclocal.m4: Regenerate.
460 * gnulib/config.in: Regenerate.
461 * gnulib/configure: Regenerate.
462 * gnulib/import/Makefile.am: Regenerate.
463 * gnulib/import/Makefile.in: Regenerate.
464 * gnulib/import/assure.h: New file.
465 * gnulib/import/at-func.c: Likewise
466 * gnulib/import/chdir-long.c: New file.
467 * gnulib/import/chdir-long.h: New file.
468 * gnulib/import/cloexec.c: New file.
469 * gnulib/import/cloexec.h: New file.
470 * gnulib/import/close.c: New file.
471 * gnulib/import/closedir.c: New file.
472 * gnulib/import/dirent-private.h: New file.
473 * gnulib/import/dup-safer.c: New file.
474 * gnulib/import/dup.c: New file.
475 * gnulib/import/dup2.c: New file.
476 * gnulib/import/error.c: New file.
477 * gnulib/import/error.h: New file.
478 * gnulib/import/exitfail.c: New file.
479 * gnulib/import/exitfail.h: New file.
480 * gnulib/import/fchdir.c: New file.
481 * gnulib/import/fcntl.c: New file.
482 * gnulib/import/fcntl.in.h: New file.
483 * gnulib/import/fd-hook.c: New file.
484 * gnulib/import/fd-hook.h: New file.
485 * gnulib/import/fd-safer.c: New file.
486 * gnulib/import/fdopendir.c: New file.
487 * gnulib/import/filename.h: New file.
488 * gnulib/import/filenamecat-lgpl.c: New file.
489 * gnulib/import/filenamecat.h: New file.
490 * gnulib/import/fstat.c: New file.
491 * gnulib/import/fstatat.c: New file.
492 * gnulib/import/getcwd-lgpl.c: New file.
493 * gnulib/import/getcwd.c: New file.
494 * gnulib/import/getdtablesize.c: New file.
495 * gnulib/import/getlogin_r.c: New file.
496 * gnulib/import/getprogname.c: New file.
497 * gnulib/import/getprogname.h: New file.
498 * gnulib/import/gettext.h: New file.
499 * gnulib/import/glob-libc.h: New file.
500 * gnulib/import/glob.c: New file.
501 * gnulib/import/glob.in.h: New file.
502 * gnulib/import/intprops.h: New file.
503 * gnulib/import/m4/chdir-long.m4: New file.
504 * gnulib/import/m4/close.m4: New file.
505 * gnulib/import/m4/closedir.m4: New file.
506 * gnulib/import/m4/d-ino.m4: New file.
507 * gnulib/import/m4/d-type.m4: New file.
508 * gnulib/import/m4/dup.m4: New file.
509 * gnulib/import/m4/dup2.m4: New file.
510 * gnulib/import/m4/error.m4: New file.
511 * gnulib/import/m4/fchdir.m4: New file.
512 * gnulib/import/m4/fcntl.m4: New file.
513 * gnulib/import/m4/fcntl_h.m4: New file.
514 * gnulib/import/m4/fdopendir.m4: New file.
515 * gnulib/import/m4/filenamecat.m4: New file.
516 * gnulib/import/m4/fstat.m4: New file.
517 * gnulib/import/m4/fstatat.m4: New file.
518 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
519 * gnulib/import/m4/getcwd-path-max.m4: New file.
520 * gnulib/import/m4/getcwd.m4: New file.
521 * gnulib/import/m4/getdtablesize.m4: New file.
522 * gnulib/import/m4/getlogin_r.m4: New file.
523 * gnulib/import/m4/getprogname.m4: New file.
524 * gnulib/import/m4/glob.m4: New file.
525 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
526 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
527 * gnulib/import/m4/mempcpy.m4: New file.
528 * gnulib/import/m4/memrchr.m4: New file.
529 * gnulib/import/m4/mode_t.m4: New file.
530 * gnulib/import/m4/msvc-inval.m4: New file.
531 * gnulib/import/m4/msvc-nothrow.m4: New file.
532 * gnulib/import/m4/open.m4: New file.
533 * gnulib/import/m4/openat.m4: New file.
534 * gnulib/import/m4/opendir.m4: New file.
535 * gnulib/import/m4/readdir.m4: New file.
536 * gnulib/import/m4/realloc.m4: New file.
537 * gnulib/import/m4/rewinddir.m4: New file.
538 * gnulib/import/m4/save-cwd.m4: New file.
539 * gnulib/import/m4/strdup.m4: New file.
540 * gnulib/import/m4/strerror.m4: New file.
541 * gnulib/import/m4/unistd-safer.m4: New file.
542 * gnulib/import/mempcpy.c: New file.
543 * gnulib/import/memrchr.c: New file.
544 * gnulib/import/msvc-inval.c: New file.
545 * gnulib/import/msvc-inval.h: New file.
546 * gnulib/import/msvc-nothrow.c: New file.
547 * gnulib/import/msvc-nothrow.h: New file.
548 * gnulib/import/open.c: New file.
549 * gnulib/import/openat-die.c: New file.
550 * gnulib/import/openat-priv.h: New file.
551 * gnulib/import/openat-proc.c: New file.
552 * gnulib/import/openat.c: New file.
553 * gnulib/import/openat.h: New file.
554 * gnulib/import/opendir.c: New file.
555 * gnulib/import/pipe-safer.c: New file.
556 * gnulib/import/readdir.c: New file.
557 * gnulib/import/realloc.c: New file.
558 * gnulib/import/rewinddir.c: New file.
559 * gnulib/import/save-cwd.c: New file.
560 * gnulib/import/save-cwd.h: New file.
561 * gnulib/import/strdup.c: New file.
562 * gnulib/import/strerror-override.c: New file.
563 * gnulib/import/strerror-override.h: New file.
564 * gnulib/import/strerror.c: New file.
565 * gnulib/import/unistd--.h: New file.
566 * gnulib/import/unistd-safer.h: New file.
567 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
568 "getcwd" and "glob".
569 * ser-tcp.c: Undefine "close" before redefining it.
570
432ae719
SM
5712017-09-21 Simon Marchi <simon.marchi@ericsson.com>
572
573 * guile/scm-value.c (gdbscm_value_address): Initialize address,
574 get rid of res_val.
575
4fa7574e
RO
5762017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
577
578 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
579 <sol2,sparc>: Likewise.
580 <sol2-64,i386>: Likewise.
581
582 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
583 -Wdeprecated-declarations on *-*-solaris*.
584 * configure: Regenerate.
585
586 * procfs.c: Include "nat/inferior.h".
587 (procfs_info_proc): Fix typo.
588
f6327dcb
KB
5892017-09-21 Kevin Buettner <kevinb@redhat.com>
590
591 * remote.c (vector): Include.
592 (struct private_thread_info): Add field, thread_handle.
593 (free_private_thread_info): Deallocate storage associated with
594 thread handle.
595 (get_private_info_thread): Initialize `thread_handle' field.
596 (struct thread_item): Add field, thread_handle.
597 (clear_threads_listing_context): Deallocate storage associated
598 with thread handle.
599 (start_thread): Add support for "handle" attribute.
600 (thread_attributes): Add "handle".
601 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
602 field.
603 (remote_update_thread_list): Update thread_handle.
604 (remote_thread_handle_to_thread_info): New function.
605 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
606
fbbe5337
KB
6072017-09-21 Kevin Buettner <kevinb@redhat.com>
608
609 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
610 function.
611 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
612 * python/python-internal.h (thread_object_type): Declare.
613
e04ee09e
KB
6142017-09-21 Kevin Buettner <kevinb@redhat.com>
615
616 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
617 (target_thread_handle_to_thread_info): Declare.
618 * target.c (target_thread_handle_to_thread_info): New function.
619 * target-delegates.c: Regenerate.
620 * gdbthread.h (find_thread_by_handle): Declare.
621 * thread.c (find_thread_by_handle): New function.
622 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
623 function.
624 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
625
1e5b66ed
SM
6262017-09-21 Simon Marchi <simon.marchi@ericsson.com>
627
628 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
629
ebe48ba0
SM
6302017-09-21 Simon Marchi <simon.marchi@ericsson.com>
631
632 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
633
0a0bf5dc
YQ
6342017-09-21 Yao Qi <yao.qi@linaro.org>
635
636 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
637 to gdb_target_obs.
638
d1b0a7bf
TT
6392017-09-20 Tom Tromey <tom@tromey.com>
640
641 * breakpoint.c (struct counted_command_line): Remove.
642 (breakpoint_commands): Update.
643 (alloc_counted_command_line, incref_counted_command_line)
644 (decref_counted_command_line, do_cleanup_counted_command_line)
645 (make_cleanup_decref_counted_command_line): Remove.
646 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
647 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
648 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
649 (save_breakpoints): Update.
650 * breakpoint.h (counted_command_line): Now a typedef to
651 shared_ptr.
652 (struct breakpoint) <commands>: Now a counted_command_line.
653 (struct bpstats) <command>: Likewise.
654
48649e1b
TT
6552017-09-20 Tom Tromey <tom@tromey.com>
656
657 * breakpoint.c (struct commands_info, do_map_commands_command):
658 Remove.
659 (commands_command_1): Update.
660 (iterate_over_related_breakpoints): Take a function_view.
661 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
662 (delete_command): Update.
663 (map_breakpoint_numbers): Take a function_view.
664 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
665 (disable_command): Update.
666 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
667 (enable_command): Update.
668 (struct disp_data, do_enable_breakpoint_disp)
669 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
670 (do_map_enable_delete_breakpoint): Remove.
671 (enable_once_command, enable_count_command, enable_delete_command)
672 (delete_trace_variable_command): Update.
673
04afa70c
TT
6742017-09-20 Tom Tromey <tom@tromey.com>
675
676 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
677 (bpstat_clear): Use delete.
678 (bpstats): New constructors.
679 (bpstat_copy, bpstat_stop_status): Use new.
680 (dprintf_after_condition_true): Update.
681 * breakpoint.h (bpstats::bpstats): Add constructors.
682 (bpstats::~bpstats): Add destructor.
683
c83833f4
PA
6842017-09-20 Pedro Alves <palves@redhat.com>
685
686 * eval.c (make_params): Delete, refactored as ...
687 (class fake_method): ... this new type's ctor.
688 (fake_method::~fake_method): New.
689 (evaluate_subexp_standard): Use 'fake_method'.
690
223ffa71
TT
6912017-09-20 Tom Tromey <tom@tromey.com>
692
693 * windows-nat.c (get_windows_debug_event, windows_wait)
694 (do_initial_windows_stuff, windows_attach): Update.
695 * utils.c (vwarning, internal_vproblem): Update.
696 (ui_unregister_input_event_handler_cleanup)
697 (prepare_to_handle_input): Remove.
698 (class scoped_input_handler): New.
699 (defaulted_query, prompt_for_continue): Update.
700 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
701 Update.
702 * top.c (undo_terminal_modifications_before_exit): Update.
703 * target/target.h (target_terminal_init, target_terminal_inferior)
704 (target_terminal_ours): Don't declare.
705 (class target_terminal): New.
706 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
707 (target_terminal_ours_for_output)
708 (make_cleanup_restore_target_terminal): Don't declare.
709 (target_terminal_info): Remove.
710 * target.c (enum terminal_state, terminal_state): Remove.
711 (target_terminal::terminal_state): Define.
712 (target_terminal::init): Rename from target_terminal_init.
713 (target_terminal::inferior): Rename from
714 target_terminal_inferior.
715 (target_terminal::ours): Rename from target_terminal_ours.
716 (target_terminal::ours_for_output): Rename from
717 target_terminal_ours_for_output.
718 (target_terminal::info): New method.
719 (cleanup_restore_target_terminal)
720 (make_cleanup_restore_target_terminal): Remove.
721 * solib.c (handle_solib_event): Update.
722 * remote.c (remote_serial_quit_handler): Update.
723 (remote_terminal_inferior, remote_wait_as): Update.
724 * record-full.c (record_full_wait_1): Update.
725 * nto-procfs.c (procfs_create_inferior): Update.
726 * nat/fork-inferior.c (startup_inferior): Update.
727 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
728 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
729 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
730 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
731 (mi_breakpoint_created, mi_breakpoint_deleted)
732 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
733 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
734 (mi_user_selected_context_changed, report_initial_inferior):
735 Update.
736 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
737 (linux_nat_terminal_inferior): Update.
738 * infrun.c (follow_fork_inferior)
739 (handle_vfork_child_exec_or_exit, do_target_resume)
740 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
741 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
742 Update.
743 * inflow.c (child_terminal_init, info_terminal_command): Update.
744 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
745 (attach_command): Update.
746 * infcall.c (call_thread_fsm_should_stop): Update.
747 * gnu-nat.c (gnu_attach): Update.
748 * extension.c (struct active_ext_lang_state)
749 (restore_active_ext_lang): Update.
750 * exceptions.c (print_flush): Update.
751 * event-top.c (async_enable_stdin, default_quit_handler): Update.
752 (struct quit_handler_cleanup_data, restore_quit_handler)
753 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
754 Remove.
755 * cp-support.c (gdb_demangle): Update.
756 * breakpoint.c (update_inserted_breakpoint_locations)
757 (insert_breakpoint_locations, handle_jit_event)
758 (disable_breakpoints_in_unloaded_shlib): Update.
759 * annotate.c (annotate_breakpoints_invalid)
760 (annotate_frames_invalid): Update.
761
013af3fc
TT
7622017-09-20 Tom Tromey <tom@tromey.com>
763
764 * main.c (catch_command_errors): Rename from
765 catch_command_errors_const.
766 (captured_main_1): Update.
767
06871ae8
PA
7682017-09-20 Pedro Alves <palves@redhat.com>
769
770 * cli/cli-cmds.c (list_command): Use print_sal_location.
771 (print_sal_location): New function.
772 (ambiguous_line_spec): Use print_sal_location.
773 * linespec.c (symbol_to_sal): Record the symbol in the sal.
774 * symtab.c (find_function_start_sal): Likewise.
775 * symtab.h (symtab_and_line::symbol): New field.
776
e5f25bc5
PA
7772017-09-20 Pedro Alves <palves@redhat.com>
778
779 * linespec.c (minsym_found): Handle non-text minsyms.
780 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
781
1b7fa39e
WT
7822017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
783
784 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
785 backslash.
786
37dd0825
WT
7872017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
788
789 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
790 vmovups instead vmovaps.
791 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
792
4e5a4f58
JB
7932017-09-19 John Baldwin <jhb@FreeBSD.org>
794
795 * NEWS (Changes since GDB 8.0): Add starti.
796 * infcmd.c (enum run_break): New.
797 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
798 case.
799 (run_command): Use enum run_how.
800 (start_command): Likewise.
801 (starti_command): New function.
802 (RUN_ARGS_HELP): New macro.
803 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
804 commands. Add starti command.
805
aa70c9f1
YQ
8062017-09-19 Yao Qi <yao.qi@linaro.org>
807
808 * Makefile.in (monitor.o): Remove the rule.
809
d6541620
YQ
8102017-09-19 Yao Qi <yao.qi@linaro.org>
811
812 * annotate.h (struct annotate_arg_emitter): Use
813 DISABLE_COPY_AND_ASSIGN.
814 * common/refcounted-object.h (refcounted_object): Likewise.
815 * completer.h (struct completion_result): Likewise.
816 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
817 * filename-seen-cache.h (filename_seen_cache): Likewise.
818 * gdbcore.h (thread_section_name): Likewise.
819 * gdb_regex.h (compiled_regex): Likewise.
820 * gdbthread.h (scoped_restore_current_thread): Likewise.
821 * inferior.h (scoped_restore_current_inferior): Likewise.
822 * jit.c (jit_reader): Likewise.
823 * linespec.h (struct linespec_result): Likewise.
824 * mi/mi-parse.h (struct mi_parse): Likewise.
825 * nat/fork-inferior.c (execv_argv): Likewise.
826 * progspace.h (scoped_restore_current_program_space): Likewise.
827 * python/python-internal.h (class gdbpy_enter): Likewise.
828 * regcache.h (regcache): Likewise.
829 * target-descriptions.c (struct tdesc_reg): Likewise.
830 (struct tdesc_type): Likewise.
831 (struct tdesc_feature): Likewise.
832 * ui-out.h (ui_out_emit_type): Likewise.
833
0615127c
SM
8342017-09-18 Simon Marchi <simon.marchi@ericsson.com>
835
836 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
837 label abort_expression.
838
5e187554
SM
8392017-09-16 Simon Marchi <simon.marchi@ericsson.com>
840
841 * common/buffer.c (buffer_xml_printf): Adjust.
842 * common/xml-utils.c (xml_escape_text): Change return type to
843 std::string, update code accordingly.
844 * common/xml-utils.h (xml_escape_text): Change return type to
845 std::string.
846 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
847 * windows-tdep.c (windows_xfer_shared_library): Adjust.
848 * unittests/xml-utils-selftests.c (test_xml_escape_text):
849 Adjust.
850
c3d7b541
SM
8512017-09-16 Simon Marchi <simon.marchi@ericsson.com>
852
853 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
854 (SUBDIR_UNITTESTS_OBS): Add new object file.
855 * unittests/xml-utils-selftests.c: New file.
856
1526853e
SM
8572017-09-16 Simon Marchi <simon.marchi@ericsson.com>
858
859 * common/selftest.h (selftest): New struct/interface.
860 (register_test): Add name parameter, add new overload.
861 (run_tests): Add filter parameter.
862 (for_each_selftest_ftype): New typedef.
863 (for_each_selftest): New declaration.
864 * common/selftest.c (tests): Change type to
865 map<string, unique_ptr<selftest>>.
866 (simple_selftest): New struct.
867 (register_test): New function.
868 (register_test): Add name parameter and use it.
869 (run_tests): Add filter parameter and use it. Add prints.
870 Adjust to vector -> map change.
871 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
872 registering selftests.
873 * arm-tdep.c (_initialize_arm_tdep): Likewise.
874 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
875 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
876 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
877 * findvar.c (_initialize_findvar): Likewise.
878 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
879 * maint.c (maintenance_selftest): Update call to run_tests.
880 (maintenance_info_selftests): New function.
881 (_initialize_maint_cmds): Register "maintenance info selftests"
882 command. Update "maintenance selftest" doc.
883 * regcache.c (_initialize_regcache): Add names when registering
884 selftests.
885 * rust-exp.y (_initialize_rust_exp): Likewise.
886 * selftest-arch.c (gdbarch_selftest): New struct.
887 (gdbarch_tests): Remove.
888 (register_test_foreach_arch): Add name parameter. Call
889 register_test.
890 (tests_with_arch): Remove, move most content to
891 gdbarch_selftest::operator().
892 (_initialize_selftests_foreach_arch): Remove.
893 * selftest-arch.h (register_test_foreach_arch): Add name
894 parameter.
895 (run_tests_with_arch): New declaration.
896 * utils-selftests.c (_initialize_utils_selftests): Add names
897 when registering selftests.
898 * utils.c (_initialize_utils): Likewise.
899 * unittests/array-view-selftests.c
900 (_initialize_array_view_selftests): Likewise.
901 * unittests/environ-selftests.c (_initialize_environ_selftests):
902 Likewise.
903 * unittests/function-view-selftests.c
904 (_initialize_function_view_selftests): Likewise.
905 * unittests/offset-type-selftests.c
906 (_initialize_offset_type_selftests): Likewise.
907 * unittests/optional-selftests.c
908 (_initialize_optional_selftests): Likewise.
909 * unittests/scoped_restore-selftests.c
910 (_initialize_scoped_restore_selftests): Likewise.
911 * NEWS: Document "maintenance selftest" and "maint info
912 selftests".
913
5846367a
SM
9142017-09-16 Simon Marchi <simon.marchi@ericsson.com>
915
916 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
917 scoped_restore.
918
bd77e8ff
SM
9192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
920
921 * mi/mi-main.c (mi_load_progress): Make uiout variable
922 a unique_ptr.
923
26a67918
PA
9242017-09-15 Pedro Alves <palves@redhat.com>
925
926 * compile/compile-c-types.c (convert_enum, convert_int)
927 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
928
3f8a7804
SM
9292017-09-15 Simon Marchi <simon.marchi@ericsson.com>
930
931 * dwarf2read.c (copy_string): Remove.
932 (parse_macro_definition): Replace copy_string with savestring.
933
8d200706
YQ
9342017-09-15 Yao Qi <yao.qi@linaro.org>
935
936 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
937 gdb_target_obs.
938 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
939 Likewise.
940 (i[34567]86-*-linux*): Likewise.
941
d185219d
SM
9422017-09-14 Simon Marchi <simon.marchi@ericsson.com>
943
944 * dwarf2expr.h (dwarf_stack_value): Add constructor.
945 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
946 <stack>: Change type to std::vector.
947 <stack_len, stack_allocated>: Remove.
948 <grow_stack>: Remove.
949 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
950 (dwarf_expr_context::~dwarf_expr_context): Remove.
951 (dwarf_expr_context::grow_stack): Remove.
952 (dwarf_expr_context::push): Adjust.
953 (dwarf_expr_context::pop): Adjust.
954 (dwarf_expr_context::fetch): Adjust.
955 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
956 (dwarf_expr_context::stack_empty_p): Adjust.
957 (dwarf_expr_context::execute_stack_op): Adjust.
958
eccd80d6
SM
9592017-09-14 Simon Marchi <simon.marchi@ericsson.com>
960
961 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
962 return type to bool.
963 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
964
69009882
SM
9652017-09-14 Simon Marchi <simon.marchi@ericsson.com>
966
967 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
968 Change type to bool.
969 (dwarf_stack_value) <in_stack_memory>: Likewise.
970 (dwarf_expr_context) <push_address>: Change parameter type to
971 bool.
972 <fetch_in_stack_memory>: Change return type to bool.
973 <push>: Change parameter type to bool.
974 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
975 to bool.
976 (dwarf_expr_context::push_address): Likewise.
977 (dwarf_expr_context::fetch_in_stack_memory): Change return type
978 to bool.
979 (dwarf_expr_context::execute_stack_op): Adjust.
980 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
981
1e467161
SM
9822017-09-14 Simon Marchi <simon.marchi@ericsson.com>
983
984 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
985 (struct dwarf_expr_context) <n_pieces>: Remove.
986 <pieces>: Change type to std::vector.
987 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
988 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
989 pieces.
990 (dwarf_expr_context::add_piece): Adjust.
991 * dwarf2loc.c (struct piece_closure): Initialize fields.
992 <n_pieces>: Remove.
993 <pieces>: Change type to std::vector.
994 (allocate_piece_closure): Adjust, change parameter to
995 std::vector rvalue and std::move it to piece_closure.
996 (rw_pieced_value): Adjust.
997 (check_pieced_synthetic_pointer): Adjust.
998 (indirect_synthetic_pointer): Adjust.
999 (coerce_pieced_ref): Adjust.
1000 (free_pieced_value_closure): Adjust. Use delete to free
1001 piece_closure.
1002 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1003 to allocate_piece_closure.
1004 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1005
0782db84
SM
10062017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1007
1008 * probe.h (probe_ops_cp): Remove typedef.
1009 (DEF_VEC_P (probe_ops_cp)): Remove.
1010 (all_probe_ops): Change type to std::vector.
1011 * probe.c (info_probes_for_ops): Adjust to vector change.
1012 (probe_linespec_to_ops): Likewise.
1013 (all_probe_ops): Change type to std::vector.
1014 (_initialize_probe): Adjust to vector change.
1015 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1016 * elfread.c (elf_get_probes): Likewise.
1017 * stap-probe.c (_initialize_stap_probe): Likewise.
1018
1eac6bea
SM
10192017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1020
1021 * probe.h (struct bound_probe): Define constructors.
1022 * probe.c (bound_probe_s): Remove typedef.
1023 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1024 (collect_probes): Change return type to std::vector, remove
1025 cleanup.
1026 (compare_probes): Return bool, change parameter type. Change
1027 semantic to "less than".
1028 (gen_ui_out_table_header_info): Change parameter to std::vector
1029 and update.
1030 (exists_probe_with_pops): Likewise.
1031 (info_probes_for_ops): Update to std::vector change.
1032 (enable_probes_command): Likewise.
1033 (disable_probes_command): Likewise.
1034
aaa63a31
SM
10352017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1036
1037 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1038 vec to std::vector.
1039 * probe.c (parse_probes_in_pspace): Update.
1040 (find_probes_in_objfile): Update.
1041 (find_probe_by_pc): Update.
1042 (collect_probes): Update.
1043 (probe_any_get_probes): Update.
1044 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1045 return type to reference to std::vector.
1046 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1047 std::vector and update.
1048 (dtrace_process_dof): Likewise.
1049 (dtrace_get_probes): Likewise.
1050 * elfread.c (elf_get_probes): Change return type to std::vector,
1051 store an std::vector in bfd_data.
1052 (probe_key_free): Update to std::vector.
1053 * stap-probe.c (handle_stap_probe): Change parameter to
1054 std::vector and update.
1055 (stap_get_probes): Likewise.
1056 * symfile-debug.c (debug_sym_get_probes): Change return type to
1057 std::vector and update.
1058
cb85b21b
TT
10592017-09-11 Tom Tromey <tom@tromey.com>
1060
1061 * breakpoint.c (program_breakpoint_here_p): Update.
1062 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1063 from make_show_memory_breakpoints_cleanup. Return a
1064 scoped_restore_tmpl<int>.
1065 (restore_show_memory_breakpoints): Remove.
1066 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1067 * mem-break.c (memory_validate_breakpoint): Update.
1068 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1069 (ia64_memory_remove_breakpoint): Update.
1070 (ia64_breakpoint_from_pc): Update.
1071 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1072 from make_show_memory_breakpoints_cleanup.
1073
8fbc99ef
TT
10742017-09-11 Tom Tromey <tom@tromey.com>
1075
1076 * d-namespace.c (d_lookup_symbol): Use std::string.
1077 (find_symbol_in_baseclass): Likewise.
1078
50feb4bd
TT
10792017-09-11 Tom Tromey <tom@tromey.com>
1080
1081 * ctf.c (ctf_start): Use std::string.
1082
c6dc63a1
TT
10832017-09-11 Tom Tromey <tom@tromey.com>
1084
1085 * ada-lang.c (is_known_support_routine): Update.
1086 (ada_unhandled_exception_name_addr_from_raise): Update.
1087 * guile/scm-frame.c (gdbscm_frame_name): Update.
1088 * python/py-frame.c (frapy_name): Update.
1089 (frapy_function): Update.
1090 * stack.h (find_frame_funname): Update.
1091 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1092 (print_frame): Update.
1093
d6b9b80f
TT
10942017-09-11 Tom Tromey <tom@tromey.com>
1095
1096 * findcmd.c (put_bits): Take a gdb::byte_vector.
1097 (parse_find_args): Return gdb::byte_vector. "args" now const.
1098 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1099 cleanups.
1100 (find_command): Update.
1101
a9921622
TT
11022017-09-11 Tom Tromey <tom@tromey.com>
1103
1104 * cli/cli-script.c (class scoped_restore_hook_in): New.
1105 (clear_hook_in_cleanup): Remove.
1106 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1107 scoped_restore_hook_in.
1108
be0d7abb
TT
11092017-09-11 Tom Tromey <tom@tromey.com>
1110
1111 * cli/cli-script.c (restore_interp): Remove.
1112 (read_command_lines): Use scoped_restore_interp.
1113 * interps.c (scoped_restore_interp::set_temp): Rename from
1114 interp_set_temp.
1115 * interps.h (class scoped_restore_interp): New.
1116 (interp_set_temp): Remove.
1117
00f675ff
TT
11182017-09-11 Tom Tromey <tom@tromey.com>
1119
1120 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1121 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1122 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1123 scoped_restore.
1124 (mi_cmd_break_insert_1): Update.
1125 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1126 scoped_restore.
1127
cb791d59
TT
11282017-09-11 Tom Tromey <tom@tromey.com>
1129
1130 * demangle.c (demangle_command): Update.
1131 * breakpoint.c (disable_command): Update.
1132 (enable_command): Update.
1133 (find_location_by_number): Make "number" const. Use
1134 get_number_trailer.
1135 * cli/cli-utils.c (extract_arg): Return std::string.
1136 * probe.c (parse_probe_linespec): Update. Change types.
1137 (collect_probes): Take string arguments.
1138 (parse_probe_linespec): Likewise.
1139 (info_probes_for_ops): Update.
1140 (enable_probes_command): Update.
1141 (disable_probes_command): Update.
1142 * break-catch-sig.c (catch_signal_split_args): Update.
1143 * mi/mi-parse.c (mi_parse): Update.
1144
2039bd9f
TT
11452017-09-11 Tom Tromey <tom@tromey.com>
1146
1147 * language.h (language_enum): Make argument const.
1148 * language.c (language_enum): Make argument const.
1149
f1735a53
TT
11502017-09-11 Tom Tromey <tom@tromey.com>
1151
1152 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1153 as function.
1154 (skip_to_space): Rename from skip_to_space_const.
1155 * common/common-utils.c (skip_to_space): New function.
1156 (skip_to_space): Rename from skip_to_space_const.
1157 * cli/cli-utils.h (get_number): Rename from get_number_const.
1158 (extract_arg): Rename from extract_arg_const.
1159 * cli/cli-utils.c (get_number): Rename from get_number_const.
1160 (extract_arg): Rename from extract_arg_const.
1161 (number_or_range_parser::get_number): Use ::get_number.
1162 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1163 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1164 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1165 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1166 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1167 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1168 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1169 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1170
7d221d74
TT
11712017-09-11 Tom Tromey <tom@tromey.com>
1172
1173 * python/python.c (do_start_initialization): Use
1174 py-event-types.def to initialize types.
1175 Define all object type structures.
1176 * python/python-internal.h: Don't declare event initialization
1177 functions.
1178 * python/py-threadevent.c (thread_event_object_type): Don't
1179 define.
1180 * python/py-stopevent.c (stop_event_object_type): Don't define.
1181 * python/py-signalevent.c (signal_event_object_type): Don't
1182 declare or define.
1183 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1184 (clear_objfiles_event_object_type): Don't declare or define.
1185 * python/py-infevents.c (inferior_call_pre_event_object_type)
1186 (inferior_call_post_event_object_type)
1187 (register_changed_event_object_type)
1188 (memory_changed_event_object_type): Don't declare or define.
1189 * python/py-inferior.c (new_thread_event_object_type)
1190 (new_inferior_event_object_type)
1191 (inferior_deleted_event_object_type): Don't declare or define.
1192 * python/py-exitedevent.c (exited_event_object_type): Don't
1193 declare or define.
1194 * python/py-evts.c (gdbpy_initialize_py_events): Use
1195 py-all-events.def.
1196 * python/py-events.h (thread_event_object_type): Don't declare.
1197 (events_object): Use py-all-events.def.
1198 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1199 py-event-types.def.
1200 * python/py-event-types.def: New file.
1201 * python/py-continueevent.c (create_continue_event_object): Don't
1202 declare or define.
1203 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1204 declare or define.
1205 * python/py-all-events.def: New file.
1206
35c61a1d
TT
12072017-09-11 Tom Tromey <tom@tromey.com>
1208
1209 * python/py-threadevent.c (create_thread_event_object): Return
1210 gdbpy_ref.
1211 * python/py-stopevent.h (create_stop_event_object)
1212 (create_breakpoint_event_object, create_signal_event_object):
1213 Update.
1214 * python/py-stopevent.c (create_stop_event_object): Return
1215 gdbpy_ref.
1216 (emit_stop_event): Update.
1217 * python/py-signalevent.c (create_signal_event_object): Return
1218 gdbpy_ref.
1219 * python/py-infevents.c (create_inferior_call_event_object):
1220 Update.
1221 * python/py-event.h (create_event_object)
1222 (create_thread_event_object): Update.
1223 * python/py-event.c (create_event_object): Return gdbpy_ref.
1224 * python/py-continueevent.c: Return gdbpy_ref.
1225 * python/py-bpevent.c (create_breakpoint_event_object): Return
1226 gdbpy_ref.
1227
7c96f8c1
TT
12282017-09-11 Tom Tromey <tom@tromey.com>
1229
1230 PR python/15622:
1231 * NEWS: Add entry.
1232 * python/python.c (do_start_initialization): Initialize new event
1233 types.
1234 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1235 (gdbpy_initialize_inferior_deleted_event)
1236 (gdbpy_initialize_new_thread_event): Declare.
1237 * python/py-threadevent.c (create_thread_event_object): Add option
1238 "thread" parameter.
1239 * python/py-inferior.c (new_thread_event_object_type)
1240 (new_inferior_event_object_type)
1241 (inferior_deleted_event_object_type): Declare.
1242 (python_new_inferior, python_inferior_deleted): New functions.
1243 (add_thread_object): Emit new_thread event.
1244 (gdbpy_initialize_inferior): Attach new functions to corresponding
1245 observers.
1246 (new_thread, new_inferior, inferior_deleted): Define new event
1247 types.
1248 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1249 registries.
1250 * python/py-events.h (events_object) <new_inferior,
1251 inferior_deleted, new_thread>: New fields.
1252 * python/py-event.h (create_thread_event_breakpoint): Add optional
1253 "thread" parameter.
1254
72542b8e
AB
12552017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1256
1257 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1258 check current_ui instead.
1259 (internal_vproblem): Likewise.
1260
0d64823e
SM
12612017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1262
1263 * thread.c (print_thread_info_1): Remove unnecessary calls to
1264 uiout->is_mi_like_p.
1265
eb1e02fd
TT
12662017-09-09 Tom Tromey <tom@tromey.com>
1267
1268 * namespace.h (add_using_directive): Update.
1269 * namespace.c (add_using_directive): Change type of excludes to
1270 std::vector.
1271 * dwarf2read.c (read_import_statement): Use std::vector.
1272 (read_namespace): Update.
1273 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1274
0fc21fd8
TT
12752017-09-09 Tom Tromey <tom@tromey.com>
1276
1277 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1278
49663d05
TT
12792017-09-09 Tom Tromey <tom@tromey.com>
1280
1281 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1282
0b868b60
TT
12832017-09-09 Tom Tromey <tom@tromey.com>
1284
1285 * stack.c (func_command): Use gdb::def_vector.
1286
c0470d48
TT
12872017-09-09 Tom Tromey <tom@tromey.com>
1288
1289 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1290 ui_out_emit_list, ui_out_emit_tuple.
1291 (mi_cmd_var_update): Likewise.
1292
ca5909c7
TT
12932017-09-09 Tom Tromey <tom@tromey.com>
1294
1295 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1296 ui_out_redirect_pop.
1297 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1298 ui_out_redirect_pop.
1299 * utils.c (do_ui_out_redirect_pop)
1300 (make_cleanup_ui_out_redirect_pop): Remove.
1301 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1302 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1303 * ui-out.h (ui_out_redirect_pop): New class.
1304
e6a2252a
TT
13052017-09-09 Tom Tromey <tom@tromey.com>
1306
1307 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1308 (list_available_thread_groups, mi_cmd_list_thread_groups)
1309 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1310 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1311 Likewise.
1312
393702cd
TT
13132017-09-09 Tom Tromey <tom@tromey.com>
1314
1315 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1316 ui_out_emit_tuple.
1317
76f9c9cf
TT
13182017-09-09 Tom Tromey <tom@tromey.com>
1319
1320 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1321 * stack.c (print_frame): Use ui_out_emit_tuple.
1322 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1323 (info_spu_mailbox_command, info_spu_dma_command)
1324 (info_spu_proxydma_command): Likewise.
1325 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1326 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1327 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1328 ui_out_emit_tuple.
1329 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1330
dc9fe180
TT
13312017-09-09 Tom Tromey <tom@tromey.com>
1332
1333 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1334 (class ui_out_emit_table): Update comment.
1335 * ui-out.c (do_cleanup_table_end)
1336 (make_cleanup_ui_out_table_begin_end): Remove.
1337 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1338 (info_spu_dma_cmdlist): Likewise.
1339 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1340 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1341 ui_out_emit_table.
1342
f8cc3da6
TT
13432017-09-09 Tom Tromey <tom@tromey.com>
1344
1345 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1346 ui_out_emit_list, gdb::optional.
1347
481695ed
JB
13482017-09-09 John Baldwin <jhb@FreeBSD.org>
1349
1350 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1351 prototype.
1352 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1353 prototype.
1354 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1355 prototype.
1356 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1357 * ada-exp.y: Remove _initialize_ada_exp prototype.
1358 * ada-lang.c: Remove _initialize_ada_language prototype.
1359 * ada-tasks.c: Remove _initialize_tasks prototype.
1360 * addrmap.c: Remove _initialize_addrmap prototype.
1361 * agent.c: Remove _initialize_agent prototype.
1362 * aix-thread.c: Remove _initialize_aix_thread prototype.
1363 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1364 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1365 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1366 prototype.
1367 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1368 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1369 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1370 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1371 prototype.
1372 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1373 prototype.
1374 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1375 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1376 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1377 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1378 prototype.
1379 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1380 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1381 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1382 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1383 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1384 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1385 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1386 prototype.
1387 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1388 prototype.
1389 * annotate.c: Remove _initialize_annotate prototype.
1390 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1391 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1392 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1393 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1394 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1395 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1396 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1397 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1398 prototype.
1399 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1400 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1401 * auto-load.c: Remove _initialize_auto_load prototype.
1402 * auxv.c: Remove _initialize_auxv prototype.
1403 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1404 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1405 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1406 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1407 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1408 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1409 prototype.
1410 * break-catch-throw.c: Remove _initialize_break_catch_throw
1411 prototype.
1412 * breakpoint.c: Remove _initialize_breakpoint prototype.
1413 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1414 * btrace.c: Remove _initialize_btrace prototype.
1415 * charset.c: Remove _initialize_charset prototype.
1416 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1417 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1418 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1419 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1420 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1421 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1422 * coffread.c: Remove _initialize_coffread prototype.
1423 * compile/compile.c: Remove _initialize_compile prototype.
1424 * complaints.c: Remove _initialize_complaints prototype.
1425 * completer.c: Remove _initialize_completer prototype.
1426 * copying.awk: Remove _initialize_copying prototype.
1427 * copying.c: Regenerate.
1428 * core-regset.c: Remove _initialize_core_regset prototype.
1429 * corefile.c: Remove _initialize_core prototype.
1430 * corelow.c: Remove _initialize_corelow prototype.
1431 * cp-abi.c: Remove _initialize_cp_abi prototype.
1432 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1433 * cp-support.c: Remove _initialize_cp_support prototype.
1434 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1435 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1436 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1437 * ctf.c: Remove _initialize_ctf prototype.
1438 * d-lang.c: Remove _initialize_d_language prototype.
1439 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1440 prototype.
1441 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1442 * dbxread.c: Remove _initialize_dbxread prototype.
1443 * dcache.c: Remove _initialize_dcache prototype.
1444 * demangle.c: Remove _initialize_demangler prototype.
1445 * disasm-selftests.c: Remove _initialize_disasm_selftests
1446 prototype.
1447 * disasm.c: Remove _initialize_disasm prototype.
1448 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1449 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1450 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1451 prototype.
1452 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1453 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1454 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1455 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1456 * elfread.c: Remove _initialize_elfread prototype.
1457 * exec.c: Remove _initialize_exec prototype.
1458 * extension.c: Remove _initialize_extension prototype.
1459 * f-lang.c: Remove _initialize_f_language prototype.
1460 * f-valprint.c: Remove _initialize_f_valprint prototype.
1461 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1462 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1463 * filesystem.c: Remove _initialize_filesystem prototype.
1464 * findcmd.c: Remove _initialize_mem_search prototype.
1465 * fork-child.c: Remove _initialize_fork_child prototype.
1466 * frame-base.c: Remove _initialize_frame_base prototype.
1467 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1468 * frame.c: Remove _initialize_frame prototype.
1469 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1470 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1471 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1472 * gcore.c: Remove _initialize_gcore prototype.
1473 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1474 * gdbarch.c: Regenerate.
1475 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1476 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1477 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1478 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1479 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1480 * go-lang.c: Remove _initialize_go_language prototype.
1481 * go32-nat.c: Remove _initialize_go32_nat prototype.
1482 * guile/guile.c: Remove _initialize_guile prototype.
1483 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1484 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1485 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1486 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1487 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1488 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1489 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1490 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1491 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1492 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1493 prototype.
1494 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1495 prototype.
1496 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1497 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1498 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1499 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1500 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1501 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1502 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1503 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1504 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1505 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1506 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1507 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1508 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1509 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1510 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1511 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1512 prototype.
1513 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1514 prototype.
1515 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1516 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1517 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1518 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1519 * infcall.c: Remove _initialize_infcall prototype.
1520 * infcmd.c: Remove _initialize_infcmd prototype.
1521 * inferior.c: Remove _initialize_inferiors prototype.
1522 * inflow.c: Remove _initialize_inflow prototype.
1523 * infrun.c: Remove _initialize_infrun prototype.
1524 * interps.c: Remove _initialize_interpreter prototype.
1525 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1526 * jit.c: Remove _initialize_jit prototype.
1527 * language.c: Remove _initialize_language prototype.
1528 * linux-fork.c: Remove _initialize_linux_fork prototype.
1529 * linux-nat.c: Remove _initialize_linux_nat prototype.
1530 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1531 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1532 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1533 * m2-lang.c: Remove _initialize_m2_language prototype.
1534 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1535 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1536 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1537 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1538 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1539 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1540 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1541 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1542 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1543 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1544 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1545 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1546 * machoread.c: Remove _initialize_machoread prototype.
1547 * macrocmd.c: Remove _initialize_macrocmd prototype.
1548 * macroscope.c: Remove _initialize_macroscope prototype.
1549 * maint.c: Remove _initialize_maint_cmds prototype.
1550 * mdebugread.c: Remove _initialize_mdebugread prototype.
1551 * memattr.c: Remove _initialize_mem prototype.
1552 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1553 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1554 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1555 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1556 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1557 * microblaze-linux-tdep.c: Remove
1558 _initialize_microblaze_linux_tdep prototype.
1559 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1560 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1561 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1562 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1563 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1564 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1565 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1566 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1567 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1568 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1569 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1570 prototype.
1571 * mipsread.c: Remove _initialize_mipsread prototype.
1572 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1573 prototype.
1574 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1575 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1576 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1577 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1578 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1579 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1580 prototype.
1581 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1582 * nto-procfs.c: Remove _initialize_procfs prototype.
1583 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1584 * objc-lang.c: Remove _initialize_objc_language prototype.
1585 * objfiles.c: Remove _initialize_objfiles prototype.
1586 * observer.c: Remove observer_test_first_notification_function,
1587 observer_test_second_notification_function,
1588 observer_test_third_notification_function, and
1589 _initialize_observer prototypes.
1590 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1591 * osabi.c: Remove _initialize_gdb_osabi prototype.
1592 * osdata.c: Remove _initialize_osdata prototype.
1593 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1594 * parse.c: Remove _initialize_parse prototype.
1595 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1596 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1597 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1598 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1599 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1600 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1601 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1602 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1603 * printcmd.c: Remove _initialize_printcmd prototype.
1604 * probe.c: Remove _initialize_probe prototype.
1605 * proc-api.c: Remove _initialize_proc_api prototype.
1606 * proc-events.c: Remove _initialize_proc_events prototype.
1607 * proc-service.c: Remove _initialize_proc_service prototype.
1608 * procfs.c: Remove _initialize_procfs prototype.
1609 * psymtab.c: Remove _initialize_psymtab prototype.
1610 * python/python.c: Remove _initialize_python prototype.
1611 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1612 * record-btrace.c: Remove _initialize_record_btrace prototype.
1613 * record-full.c: Remove _initialize_record_full prototype.
1614 * record.c: Remove _initialize_record prototype.
1615 * regcache.c: Remove _initialize_regcache prototype.
1616 * reggroups.c: Remove _initialize_reggroup prototype.
1617 * remote-notif.c: Remove _initialize_notif prototype.
1618 * remote-sim.c: Remove _initialize_remote_sim prototype.
1619 * remote.c: Remove _initialize_remote prototype.
1620 * reverse.c: Remove _initialize_reverse prototype.
1621 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1622 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1623 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1624 prototype.
1625 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1626 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1627 * rust-exp.y: Remove _initialize_rust_exp prototype.
1628 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1629 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1630 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1631 * score-tdep.c: Remove _initialize_score_tdep prototype.
1632 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1633 prototype.
1634 * ser-go32.c: Remove _initialize_ser_dos prototype.
1635 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1636 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1637 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1638 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1639 * serial.c: Remove _initialize_serial prototype.
1640 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1641 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1642 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1643 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1644 * skip.c: Remove _initialize_step_skip prototype.
1645 * sol-thread.c: Remove _initialize_sol_thread prototype.
1646 * solib-aix.c: Remove _initialize_solib_aix prototype.
1647 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1648 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1649 * solib-frv.c: Remove _initialize_frv_solib prototype.
1650 * solib-spu.c: Remove _initialize_spu_solib prototype.
1651 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1652 * solib-target.c: Remove _initialize_solib_target prototype.
1653 * solib.c: Remove _initialize_solib prototype.
1654 * source.c: Remove _initialize_source prototype.
1655 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1656 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1657 prototype.
1658 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1659 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1660 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1661 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1662 prototype.
1663 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1664 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1665 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1666 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1667 prototype.
1668 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1669 prototype.
1670 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1671 prototype.
1672 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1673 prototype.
1674 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1675 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1676 prototype.
1677 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1678 prototype.
1679 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1680 prototype.
1681 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1682 prototype.
1683 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1684 prototype.
1685 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1686 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1687 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1688 * stabsread.c: Remove _initialize_stabsread prototype.
1689 * stack.c: Remove _initialize_stack prototype.
1690 * stap-probe.c: Remove _initialize_stap_probe prototype.
1691 * std-regs.c: Remove _initialize_frame_reg prototype.
1692 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1693 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1694 * symfile.c: Remove _initialize_symfile prototype.
1695 * symmisc.c: Remove _initialize_symmisc prototype.
1696 * symtab.c: Remove _initialize_symtab prototype.
1697 * target-dcache.c: Remove _initialize_target_dcache prototype.
1698 * target-descriptions.c: Remove _initialize_target_descriptions
1699 prototype.
1700 * thread.c: Remove _initialize_thread prototype.
1701 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1702 prototype.
1703 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1704 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1705 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1706 prototype.
1707 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1708 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1709 * tracefile.c: Remove _initialize_tracefile prototype.
1710 * tracepoint.c: Remove _initialize_tracepoint prototype.
1711 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1712 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1713 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1714 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1715 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1716 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1717 * tui/tui.c: Remove _initialize_tui prototype.
1718 * typeprint.c: Remove _initialize_typeprint prototype.
1719 * user-regs.c: Remove _initialize_user_regs prototype.
1720 * utils.c: Remove _initialize_utils prototype.
1721 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1722 * valarith.c: Remove _initialize_valarith prototype.
1723 * valops.c: Remove _initialize_valops prototype.
1724 * valprint.c: Remove _initialize_valprint prototype.
1725 * value.c: Remove _initialize_values prototype.
1726 * varobj.c: Remove _initialize_varobj prototype.
1727 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1728 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1729 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1730 * windows-nat.c: Remove _initialize_windows_nat,
1731 _initialize_check_for_gdb_ini, and _initialize_loadable
1732 prototypes.
1733 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1734 * xcoffread.c: Remove _initialize_xcoffread prototype.
1735 * xml-support.c: Remove _initialize_xml_support prototype.
1736 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1737 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1738 prototype.
1739 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1740 prototype.
1741 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1742
a611b5cb
KS
17432017-09-08 Keith Seitz <keiths@redhat.com>
1744
1745 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1746 field.
1747
469412dd
CW
17482017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1749
1750 * f-valprint.c (f_val_print): Remove check for one byte
1751 sized integers. Remove printing of character type.
1752
a5ad232b
FP
17532017-09-08 Frank Penczek <frank.penczek@intel.com>
1754 Christoph Weinmann <christoph.t.weinmann@intel.com>
1755 Bernhard Heckel <bernhard.heckel@intel.com>
1756
1757 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1758 to maintain proper indentation when printing pointers/refs.
1759
e5014227
JB
17602017-09-07 Joel Brobecker <brobecker@adacore.com>
1761
1762 GDB 8.0.1 released.
1763
63c99141
JB
17642017-09-07 Joel Brobecker <brobecker@adacore.com>
1765
1766 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1767
69c1e056
TT
17682017-09-05 Tom Tromey <tom@tromey.com>
1769
1770 * parse.c (funcall_chain): Now a std::vector.
1771 (start_arglist, end_arglist): Simplify.
1772 (free_funcalls): Remove.
1773 (parse_exp_in_context_1): Remove cleanup.
1774
fef704bf
TT
17752017-09-05 Tom Tromey <tom@tromey.com>
1776
1777 * go-exp.y (go_parse): Don't create a cleanup.
1778
5613c585
TT
17792017-09-05 Tom Tromey <tom@tromey.com>
1780
1781 * d-exp.y (PrimaryExpression): Use std::string.
1782 (d_parse): Don't create a cleanup.
1783
eae49211
TT
17842017-09-05 Tom Tromey <tom@tromey.com>
1785
1786 * utils.c (do_clear_parser_state): Remove.
1787 (make_cleanup_clear_parser_state): Remove.
1788 * p-exp.y (pascal_parse): Use scoped_restore.
1789 * m2-exp.y (m2_parse): Use scoped_restore.
1790 * f-exp.y (f_parse): Use scoped_restore.
1791 * d-exp.y (d_parse): Use scoped_restore.
1792 * c-exp.y (c_parse): Use scoped_restore.
1793 * ada-exp.y (ada_parse): Use scoped_restore.
1794 * utils.h (make_cleanup_clear_parser_state): Remove.
1795
73b9be8b
KS
17962017-09-06 Keith Seitz <keiths@redhat.com>
1797
1798 * dwarf2read.c (dw2_linkage_name_attr): New function.
1799 (dw2_linkage_name): New function.
1800 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1801 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1802 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1803
a102602b
KR
18042017-09-06 Kamil Rytarowski <n54@gmx.com>
1805
1806 * config/djgpp/djconfig.sh: Correct shell portability issue.
1807
28ad437d
KR
18082017-09-06 Kamil Rytarowski <n54@gmx.com>
1809
1810 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1811
351787dd
JB
18122017-09-06 John Baldwin <jhb@FreeBSD.org>
1813
1814 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1815 * NEWS: Mention new FreeBSD/mips native configuration.
1816 * configure.host: Add aarch64*-*-freebsd*.
1817 * configure.nat: Likewise.
1818 * aarch64-fbsd-nat.c: New file.
1819
c0f84956
JB
18202017-09-06 John Baldwin <jhb@FreeBSD.org>
1821
1822 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1823 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1824 * NEWS: Mention new FreeBSD/aarch64 target.
1825 * configure.tgt: Add aarch64*-*-freebsd*.
1826 * aarch64-fbsd-tdep.c: New file.
1827 * aarch64-fbsd-tdep.h: New file.
1828
7610297a
KR
18292017-09-06 Kamil Rytarowski <n54@gmx.com>
1830
1831 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1832
fbd1b771
JK
18332017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1834
1835 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1836 of TLS symbols.
1837
5ca79eae
PW
18382017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1839
1840 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1841 call.
1842
bf93d7ba
SM
18432017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 * infrun.c (follow_exec): Call add_thread after
1846 target_find_description.
1847
1bb7c059
SM
18482017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1849
1850 * infrun.c (handle_inferior_event_1): When exec'ing, read
1851 stop_pc after follow_exec.
1852
fc809827
SM
18532017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1854
1855 * remote.c (process_g_packet): Update error message.
1856
d2fcdd85
YQ
18572017-09-05 Yao Qi <yao.qi@linaro.org>
1858
1859 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1860 targets.
1861
e69570ee
PA
18622017-09-05 Pedro Alves <palves@redhat.com>
1863
1864 * eval.c (eval_call, evaluate_funcall): New functions, factored
1865 out from ...
1866 (evaluate_subexp_standard): ... this.
1867
22916b07
YQ
18682017-09-05 Yao Qi <yao.qi@linaro.org>
1869
1870 * amd64-tdep.c (amd64_target_description): Create target
1871 descriptions.
1872 (_initialize_amd64_tdep): Don't call functions
1873 initialize_tdesc_amd64_*. Add self tests.
1874 * arch/amd64.c (amd64_create_target_description): Add parameter
1875 is_linux. Call set_tdesc_osabi if is_linux is true.
1876 * arch/amd64.h (amd64_create_target_description): Update the
1877 declaration.
1878 * arch/i386.c (i386_create_target_description): Add parameter
1879 is_linux. Call set_tdesc_osabi if is_linux is true.
1880 * arch/i386.h (i386_create_target_description): Update
1881 declaration.
1882 * configure.tgt: Add i386.o to gdb_target_obs.
1883 * features/Makefile (XMLTOC): Remove i386/*.xml.
1884 * features/i386/amd64-avx-avx512.c: Remove.
1885 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1886 * features/i386/amd64-avx-mpx.c: Remove.
1887 * features/i386/amd64-avx.c: Remove.
1888 * features/i386/amd64-mpx.c: Remove.
1889 * features/i386/amd64.c: Remove.
1890 * features/i386/i386-avx-avx512.c: Remove.
1891 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1892 * features/i386/i386-avx-mpx.c: Remove.
1893 * features/i386/i386-avx.c: Remove.
1894 * features/i386/i386-mmx.c: Remove.
1895 * features/i386/i386-mpx.c: Remove.
1896 * features/i386/i386.c: Remove.
1897 * i386-tdep.c: Don't include features/i386/i386*.c., include
1898 target-descriptions.h and arch/i386.h.
1899 (i386_target_description): Create target descriptions.
1900 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1901 functions. Do self tests.
1902
0854b7b1
YQ
19032017-09-05 Yao Qi <yao.qi@linaro.org>
1904
1905 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1906 * features/i386/amd64-avx-avx512-linux.c: Removed.
1907 * features/i386/amd64-avx-linux.c: Removed.
1908 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1909 * features/i386/amd64-avx-mpx-linux.c: Removed.
1910 * features/i386/amd64-linux.c: Removed.
1911 * features/i386/amd64-mpx-linux.c: Removed.
1912 * features/i386/x32-avx-avx512-linux.c: Removed.
1913 * features/i386/x32-avx-linux.c: Removed.
1914 * features/i386/x32-linux.c: Removed.
1915
b4570e4b
YQ
19162017-09-05 Yao Qi <yao.qi@linaro.org>
1917
1918 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1919 features/i386/*.c.
1920 (amd64_linux_read_description): Call
1921 amd64_create_target_description.
1922 * arch/amd64.c: New file.
1923 * arch/amd64.h: New file.
1924 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1925 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1926
6c73f67f
YQ
19272017-09-05 Yao Qi <yao.qi@linaro.org>
1928
1929 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1930 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1931 (amd64_linux_read_description): Create target descriptions.
1932 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1933 functions. Add unit tests.
1934 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1935 x32-core.xml.
1936 * features/i386/64bit-avx.c: Generated.
1937 * features/i386/64bit-avx512.c: Generated.
1938 * features/i386/64bit-core.c: Generated.
1939 * features/i386/64bit-linux.c: Generated.
1940 * features/i386/64bit-mpx.c: Generated.
1941 * features/i386/64bit-pkeys.c: Generated.
1942 * features/i386/64bit-segments.c: Generated.
1943 * features/i386/64bit-sse.c: Generated.
1944 * features/i386/x32-core.c: Generated.
1945 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1946 c files for amd64-linux and x32-linux.
1947
9d3d478b
YQ
19482017-09-05 Yao Qi <yao.qi@linaro.org>
1949
1950 * amd64-linux-tdep.c (amd64_linux_read_description): New
1951 function.
1952 (amd64_linux_core_read_description): Call
1953 amd64_linux_read_description.
1954 (amd64_linux_init_abi): Likewise.
1955 (amd64_x32_linux_init_abi): Likewise.
1956 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1957 * x86-linux-nat.c (x86_linux_read_description): Call
1958 amd64_linux_read_description.
1959
b9f1d50f
YQ
19602017-09-05 Yao Qi <yao.qi@linaro.org>
1961
1962 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1963 comments.
1964
188c9e6d
YQ
19652017-09-05 Yao Qi <yao.qi@linaro.org>
1966
1967 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1968 * features/i386/i386-avx-avx512-linux.c: Remove.
1969 * features/i386/i386-avx-linux.c: Remove.
1970 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1971 * features/i386/i386-avx-mpx-linux.c: Remove.
1972 * features/i386/i386-linux.c: Remove.
1973 * features/i386/i386-mmx-linux.c: Remove.
1974 * features/i386/i386-mpx-linux.c: Remove.
1975
5f035c07
YQ
19762017-09-05 Yao Qi <yao.qi@linaro.org>
1977
1978 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1979 (SFILES): Add arch/i386.c.
1980 (HFILES_NO_SRCDIR): Add arch/i386.h.
1981 * arch/i386.c: New file.
1982 * arch/i386.h: New file.
1983 * arch/tdesc.h (allocate_target_description): Declare.
1984 (set_tdesc_architecture): Declare.
1985 (set_tdesc_osabi): Declare.
1986 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1987 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1988 include arch/i386.h.
1989 (i386_linux_read_description): Remove code and call
1990 i386_create_target_description.
1991 (set_tdesc_architecture): New function.
1992 (set_tdesc_osabi): New function.
1993 * target-descriptions.h (allocate_target_description): Remove.
1994
0abe8a89
YQ
19952017-09-05 Yao Qi <yao.qi@linaro.org>
1996
1997 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1998 * target-descriptions.c (tdesc_create_feature): Likewise, and
1999 adjust code.
2000 * features/i386/32bit-avx.c: Re-generated.
2001 * features/i386/32bit-avx512.c: Re-generated.
2002 * features/i386/32bit-core.c: Re-generated.
2003 * features/i386/32bit-linux.c: Re-generated.
2004 * features/i386/32bit-mpx.c: Re-generated.
2005 * features/i386/32bit-pkeys.c: Re-generated.
2006 * features/i386/32bit-sse.c: Re-generated.
2007
0a188386
YQ
20082017-09-05 Yao Qi <yao.qi@linaro.org>
2009
2010 * regformats/regdef.h (struct reg): Override operator == and !=.
2011
f49ff000
YQ
20122017-09-05 Yao Qi <yao.qi@linaro.org>
2013
2014 * arch/tdesc.h: New file.
2015 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2016 * target-descriptions.c: Update comments.
2017 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2018 declarations.
2019 * features/i386/32bit-avx.c: Re-generated.
2020 * features/i386/32bit-avx512.c: Re-generated.
2021 * features/i386/32bit-core.c: Re-generated.
2022 * features/i386/32bit-linux.c: Re-generated.
2023 * features/i386/32bit-mpx.c: Re-generated.
2024 * features/i386/32bit-pkeys.c: Re-generated.
2025 * features/i386/32bit-sse.c: Re-generated.
2026
f7000548
YQ
20272017-09-05 Yao Qi <yao.qi@linaro.org>
2028
2029 * regformats/regdat.sh: Update generated code.
2030
c9a5e2a5
YQ
20312017-09-05 Yao Qi <yao.qi@linaro.org>
2032
2033 * regformats/regdat.sh: Adjust code order.
2034
d6b687ac
SM
20352017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2036
2037 * expprint.c (dump_subexp_body_standard): Use constant format
2038 string in fprintf_filtered call.
2039
a379bfd0
JB
20402017-09-04 John Baldwin <jhb@FreeBSD.org>
2041
2042 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2043 NetBSD/i386.
2044 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2045
f7efc967
JB
20462017-09-04 John Baldwin <jhb@FreeBSD.org>
2047
2048 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2049
c49fbc6c
JB
20502017-09-04 John Baldwin <jhb@FreeBSD.org>
2051
2052 * bsd-kvm.o: Define _KMEMUSER.
2053 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2054 * configure: Regenerate.
2055
26562e73
JB
20562017-09-04 John Baldwin <jhb@FreeBSD.org>
2057
2058 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2059 * i386-fbsd-nat.c: Likewise.
2060
31cf1487
JB
20612017-09-04 John Baldwin <jhb@FreeBSD.org>
2062
2063 * unittests/array-view-selftests.c: Add include of <array>.
2064
5b9f8a7c
JB
20652017-09-04 John Baldwin <jhb@FreeBSD.org>
2066
2067 * spu-tdep.c (flush_ea_cache): Add missing argument to
2068 call_function_by_hand.
2069
d69cf9b2
PA
20702017-09-04 Pedro Alves <palves@redhat.com>
2071
2072 * NEWS (Safer support for debugging with no debug info): New.
2073
3693fdb3
PA
20742017-09-04 Pedro Alves <palves@redhat.com>
2075
2076 * c-exp.y (function_method, function_method_void): Add current
2077 instance flags to TYPE_INSTANCE.
2078 * dwarf2read.c (check_modifier): New.
2079 (compute_delayed_physnames): Assert that only C++ adds delayed
2080 physnames. Mark fn_fields as const/volatile depending on
2081 physname.
2082 * eval.c (make_params): New type_instance_flags parameter. Use
2083 it as the new type's instance flags.
2084 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2085 flags element and pass it to make_params.
2086 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2087 instance flags element.
2088 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2089 * gdbtypes.h: Include "enum-flags.h".
2090 (type_instance_flags): New enum-flags type.
2091 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2092 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2093 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2094 (follow_type_instance_flags): New function.
2095 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2096 * parser-defs.h (follow_type_instance_flags): Declare.
2097 * valops.c (value_struct_elt_for_reference): const/volatile must
2098 match too.
2099
e68cb8e0
PA
21002017-09-04 Pedro Alves <palves@redhat.com>
2101
2102 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2103 function/method scopes; lookup the nested name as a function local
2104 static variable.
2105
858be34c
PA
21062017-09-04 Pedro Alves <palves@redhat.com>
2107
2108 (%type <voidval>): Add function_method.
2109 * c-exp.y (exp): New production for calls with no arguments.
2110 (function_method, function_method_void_or_typelist): New
2111 productions.
2112 (exp): New production for "method()::static_var".
2113 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2114 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2115 Handle OP_FUNC_STATIC_VAR.
2116 * parse.c (operator_length_standard):
2117 Handle OP_FUNC_STATIC_VAR.
2118
dd5901a6
PA
21192017-09-04 Pedro Alves <palves@redhat.com>
2120
2121 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2122 handling.
2123 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2124 Ditto.
2125 * parse.c (operator_length_standard, operator_check_standard):
2126 Ditto.
2127 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2128
46a4882b
PA
21292017-09-04 Pedro Alves <palves@redhat.com>
2130
2131 * ax-gdb.c: Include "typeprint.h".
2132 (gen_expr_for_cast): New function.
2133 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2134 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2135 type is unknown.
2136 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2137 nodebug_data_symbol.
2138 * eval.c: Include "typeprint.h".
2139 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2140 Error out if symbol has unknown type.
2141 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2142 evaluate_subexp_for_cast.
2143 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2144 OP_VAR_MSYM_VALUE.
2145 (evaluate_subexp_for_cast): New function.
2146 * gdbtypes.c (init_nodebug_var_type): New function.
2147 (objfile_type): Use it to initialize types of variables with no
2148 debug info.
2149 * typeprint.c (error_unknown_type): New.
2150 * typeprint.h (error_unknown_type): New declaration.
2151 * compile/compile-c-types.c (convert_type_basic): Handle
2152 TYPE_CODE_ERROR; warn and fallback to int for variables with
2153 unknown type.
2154
fe13dfec
PA
21552017-09-04 Pedro Alves <palves@redhat.com>
2156
2157 * eval.c (evaluate_var_value): New function, factored out from ...
2158 (evaluate_subexp_standard): ... here.
2159
d008ee21
PA
21602017-09-04 Pedro Alves <palves@redhat.com>
2161
2162 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2163 Remove useless assignments to 'op'.
2164
827d0c51
PA
21652017-09-04 Pedro Alves <palves@redhat.com>
2166
2167 * eval.c (eval_skip_value): New function.
2168 (evaluate_subexp_standard): Use it.
2169
2c5a2be1
PA
21702017-09-04 Pedro Alves <palves@redhat.com>
2171
2172 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2173 function name from symbol/minsym and pass it to
2174 error_call_unknown_return_type.
2175
74ea4be4
PA
21762017-09-04 Pedro Alves <palves@redhat.com>
2177
2178 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2179 * ax-gdb.c (gen_msym_var_ref): New function.
2180 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2181 * eval.c (evaluate_var_msym_value): New function.
2182 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2183 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2184 to call_function_by_hand.
2185 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2186 Handle OP_VAR_MSYM_VALUE.
2187 (union exp_element) <msymbol>: New field.
2188 * minsyms.h (struct type): Forward declare.
2189 (find_minsym_type_and_address): Declare.
2190 * parse.c (write_exp_elt_msym): New function.
2191 (write_exp_msymbol): Delete, refactored as ...
2192 (find_minsym_type_and_address): ... this new function.
2193 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2194 (operator_length_standard, operator_check_standard): Handle
2195 OP_VAR_MSYM_VALUE.
2196 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2197
7022349d
PA
21982017-09-04 Pedro Alves <palves@redhat.com>
2199
2200 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2201 TYPE_GNU_IFUNC specially here. Throw error if return type is
2202 unknown.
2203 * ada-typeprint.c (print_func_type): Handle functions with unknown
2204 return type.
2205 * c-typeprint.c (c_type_print_base): Handle functions and methods
2206 with unknown return type.
2207 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2208 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2209 * compile/compile-c-types.c: Include "objfiles.h".
2210 (convert_func): For functions with unknown return type, warn and
2211 default to int.
2212 * compile/compile-object-run.c (compile_object_run): Adjust call
2213 to call_function_by_hand_dummy.
2214 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2215 call_function_by_hand.
2216 * eval.c (evaluate_subexp_standard): Adjust calls to
2217 call_function_by_hand. Handle functions and methods with unknown
2218 return type. Pass expect_type to call_function_by_hand.
2219 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2220 return type.
2221 * gcore.c (call_target_sbrk): Adjust call to
2222 call_function_by_hand.
2223 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2224 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2225 an integer address type instead of nodebug.
2226 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2227 call_function_by_hand.
2228 * infcall.c (error_call_unknown_return_type): New function.
2229 (call_function_by_hand): New "default_return_type" parameter.
2230 Pass it down.
2231 (call_function_by_hand_dummy): New "default_return_type"
2232 parameter. Use it instead of defaulting to int. If there's no
2233 default and the return type is unknown, throw an error. If
2234 there's a default return type, and the called function has no
2235 debug info, then assume the function is prototyped.
2236 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2237 New "default_return_type" parameter.
2238 (error_call_unknown_return_type): New declaration.
2239 * linux-fork.c (call_lseek): Cast return type of lseek.
2240 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2241 call_function_by_hand.
2242 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2243 calls to call_function_by_hand.
2244 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2245 return type.
2246 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2247 (value_nsstring, print_object_command): Adjust calls to
2248 call_function_by_hand.
2249 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2250 functions with unknown return type.
2251 (pascal_type_print_func_varspec_suffix): New function.
2252 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2253 TYPE_CODE_METHOD>: Use it.
2254 * python/py-value.c (valpy_call): Adjust call to
2255 call_function_by_hand.
2256 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2257 call_function_by_hand.
2258 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2259 call_function_by_hand.
2260 * valops.c (value_allocate_space_in_inferior): Adjust call to
2261 call_function_by_hand.
2262 * typeprint.c (type_print_unknown_return_type): New function.
2263 * typeprint.h (type_print_unknown_return_type): New declaration.
2264
54990598
PA
22652017-09-04 Pedro Alves <palves@redhat.com>
2266
2267 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2268 types with more than one parameter as prototyped.
2269
9a24775b
PA
22702017-09-04 Pedro Alves <palves@redhat.com>
2271
2272 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2273 (disassemble_command): Use gdb_disassembly_flags instead of bare
2274 int.
2275 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2276 (dump_insns, do_mixed_source_and_assembly_deprecated)
2277 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2278 Use gdb_disassembly_flags instead of bare int.
2279 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2280 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2281 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2282 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2283 (enum gdb_disassembly_flag): ... values of this new enumeration.
2284 (gdb_disassembly_flags): Define.
2285 (gdb_disassembly)
2286 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2287 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2288 gdb_disassembly_flags instead of bare int.
2289 * record-btrace.c (btrace_insn_history)
2290 (record_btrace_insn_history, record_btrace_insn_history_range)
2291 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2292 instead of bare int.
2293 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2294 Use gdb_disassembly_flags instead of bare int.
2295 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2296 Define.
2297 * target-delegates.c: Regenerate.
2298 * target.c (target_insn_history, target_insn_history_from)
2299 (target_insn_history_range): Use gdb_disassembly_flags instead of
2300 bare int.
2301 * target.h: Include "disasm.h".
2302 (struct target_ops) <to_insn_history, to_insn_history_from,
2303 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2304 int.
2305 (target_insn_history, target_insn_history_from)
2306 (target_insn_history_range): Use gdb_disassembly_flags instead of
2307 bare int.
2308
80a65e9b
SM
23092017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2310
2311 * cli/cli-script.c (build_command_line): For if/while commands,
2312 check whether args is empty.
2313
6b66338c
SM
23142017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2315
2316 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2317 (enum command_control_type): Likewise.
2318 (struct command_line): Likewise.
2319 (free_command_lines): Likewise.
2320 (struct command_lines_deleter): Likewise.
2321 (command_line_up): Likewise.
2322 (read_command_lines): Likewise.
2323 (read_command_lines_1): Likewise.
2324 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2325 (enum command_control_type): Likewise.
2326 (struct command_line): Likewise.
2327 (free_command_lines): Likewise.
2328 (struct command_lines_deleter): Likewise.
2329 (command_line_up): Likewise.
2330 (read_command_lines): Likewise.
2331 (read_command_lines_1): Likewise.
2332 * breakpoint.h: Include cli/cli-script.h.
2333 * extension-priv.h: Likewise.
2334 * gdbcmd.h: Likewise.
2335
51abb421
PA
23362017-09-04 Pedro Alves <palves@redhat.com>
2337
2338 * ada-lang.c (is_known_support_routine): Move sal declaration to
2339 where it is initialized.
2340 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2341 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2342 (clear_command, update_static_tracepoint): Remove init_sal
2343 references. Move declarations closer to initializations.
2344 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2345 initializations.
2346 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2347 references. Move sal declarations closer to initializations.
2348 * frame.c (find_frame_sal): Return a symtab_and_line via function
2349 return instead of output parameter. Remove init_sal references.
2350 * frame.h (find_frame_sal): Return a symtab_and_line via function
2351 return instead of output parameter.
2352 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2353 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2354 instead of memset.
2355 (gdbscm_find_pc_line): Remove init_sal reference.
2356 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2357 references. Move declarations closer to initializations.
2358 * infcmd.c (set_step_frame): Update. Move declarations closer to
2359 initializations.
2360 (finish_backward): Remove init_sal references. Move declarations
2361 closer to initializations.
2362 * infrun.c (process_event_stop_test, handle_step_into_function)
2363 (insert_hp_step_resume_breakpoint_at_frame)
2364 (insert_step_resume_breakpoint_at_caller): Likewise.
2365 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2366 (symbol_to_sal): Likewise.
2367 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2368 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2369 to its initialization.
2370 * reverse.c (save_bookmark_command): Use new/delete. Remove
2371 init_sal references. Move declarations closer to initializations.
2372 * source.c (get_current_source_symtab_and_line): Remove brace
2373 initialization.
2374 (set_current_source_symtab_and_line): Now takes the sal by const
2375 reference. Remove brace initialization.
2376 (line_info): Remove init_sal reference.
2377 * source.h (set_current_source_symtab_and_line): Now takes a
2378 symtab_and_line via const reference.
2379 * stack.c (set_current_sal_from_frame): Adjust.
2380 (print_frame_info): Adjust.
2381 (get_last_displayed_sal): Return the sal via function return
2382 instead of via output parameter. Simplify.
2383 (frame_info): Adjust.
2384 * stack.h (get_last_displayed_sal): Return the sal via function
2385 return instead of via output parameter.
2386 * symtab.c (init_sal): Delete.
2387 (find_pc_sect_line): Remove init_sal references. Move
2388 declarations closer to initializations.
2389 (find_function_start_sal): Remove init_sal references. Move
2390 declarations closer to initializations.
2391 * symtab.h (struct symtab_and_line): In-class initialize all
2392 fields.
2393 * tracepoint.c (set_traceframe_context)
2394 (print_one_static_tracepoint_marker): Remove init_sal references.
2395 Move declarations closer to initializations.
2396 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2397 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2398 declarations closer to initializations.
2399 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2400 init_sal references. Adjust.
2401
6c5b2ebe
PA
24022017-09-04 Pedro Alves <palves@redhat.com>
2403
2404 * ax-gdb.c (agent_command_1): Use range-for.
2405 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2406 * breakpoint.c: Include "common/array-view.h".
2407 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2408 parameter from struct symtabs_and_lines to
2409 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2410 (breakpoint_sals_to_pc): Change sals parameter from struct
2411 symtabs_and_lines to std::vector reference.
2412 (check_fast_tracepoint_sals): Change sals parameter from struct
2413 symtabs_and_lines to std::array_view. Use range-for.
2414 (decode_static_tracepoint_spec): Return a std::vector instead of
2415 symtabs_and_lines. Update.
2416 (create_breakpoint): Update.
2417 (break_range_command, until_break_command, clear_command): Update.
2418 (base_breakpoint_decode_location, bkpt_decode_location)
2419 (bkpt_probe_create_sals_from_location)
2420 (bkpt_probe_decode_location, tracepoint_decode_location)
2421 (tracepoint_probe_decode_location)
2422 (strace_marker_create_sals_from_location): Return a std::vector
2423 instead of symtabs_and_lines.
2424 (strace_marker_create_breakpoints_sal): Update.
2425 (strace_marker_decode_location): Return a std::vector instead of
2426 symtabs_and_lines. Update.
2427 (update_breakpoint_locations): Change struct symtabs_and_lines
2428 parameters to gdb::array_view. Adjust.
2429 (location_to_sals): Return a std::vector instead of
2430 symtabs_and_lines. Update.
2431 (breakpoint_re_set_default): Use std::vector instead of struct
2432 symtabs_and_lines.
2433 (decode_location_default): Return a std::vector instead of
2434 symtabs_and_lines. Update.
2435 * breakpoint.h: Include "common/array-view.h".
2436 (struct breakpoint_ops) <decode_location>: Now returns a
2437 std::vector instead of returning a symtabs_and_lines via output
2438 parameter.
2439 (update_breakpoint_locations): Change sals parameters to use
2440 gdb::array_view.
2441 * cli/cli-cmds.c (edit_command, list_command): Update to use
2442 std::vector and gdb::array_view.
2443 (ambiguous_line_spec): Adjust to use gdb::array_view and
2444 range-for.
2445 (compare_symtabs): Rename to ...
2446 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2447 const reference and adjust.
2448 (filter_sals): Rewrite using std::vector and standard algorithms.
2449 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2450 (jump_command): Update to use std::vector.
2451 * linespec.c (struct linespec_state) <canonical_names>: Update
2452 comment.
2453 (add_sal_to_sals_basic): Delete.
2454 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2455 (decode_line_2, create_sals_line_offset)
2456 (convert_address_location_to_sals, convert_linespec_to_sals)
2457 (convert_explicit_location_to_sals, parse_linespec)
2458 (event_location_to_sals, decode_line_full, decode_line_1)
2459 (decode_line_with_current_source)
2460 (decode_line_with_last_displayed, decode_objc)
2461 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2462 (linespec_result::~linespec_result): Adjust to use std::vector
2463 instead of symtabs_and_lines.
2464 * linespec.h (linespec_sals::sals): Now a std::vector.
2465 (struct linespec_result): Use std::vector, bool, and in-class
2466 initialization.
2467 (decode_line_1, decode_line_with_current_source)
2468 (decode_line_with_last_displayed): Return std::vector.
2469 * macrocmd.c (info_macros_command): Use std::vector.
2470 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2471 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2472 std::vector.
2473 * probe.h (parse_probes): Return a std::vector.
2474 * python/python.c (gdbpy_decode_line): Use std::vector and
2475 gdb::array_view.
2476 * source.c (select_source_symtab, line_info): Use std::vector.
2477 * stack.c (func_command): Use std::vector.
2478 * symtab.h (struct symtabs_and_lines): Delete.
2479 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2480
7c44b49c
PA
24812017-09-04 Pedro Alves <palves@redhat.com>
2482
2483 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2484 unittests/array-view-selftests.c.
2485 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2486 * common/array-view.h: New file.
2487 * unittests/array-view-selftests.c: New file.
2488
e439fa14
PA
24892017-09-04 Pedro Alves <palves@redhat.com>
2490
2491 * cli/cli-cmds.c (edit_command): Pass message to
2492 ambiguous_line_spec.
2493 (list_command): Pass message to ambiguous_line_spec. Say
2494 "first"/"last" instead of "start" and "end" to be consistent with
2495 the manual.
2496 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2497 them to print formatted message.
2498
7525b645
PA
24992017-09-04 Pedro Alves <palves@redhat.com>
2500
2501 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2502 ftrace_update_insns by reference instead of pointer.
2503
badc0020
YQ
25042017-09-04 Yao Qi <yao.qi@linaro.org>
2505
2506 * i386-go32-tdep.c: Include x86-xstate.h.
2507 (i386_go32_init_abi): Call i386_target_description.
2508 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2509 if xcr0 is X86_XSTATE_X87_MASK.
2510 * i386-tdep.h (tdesc_i386): Remove the declaration.
2511 (tdesc_i386_mmx): Likewise.
2512
d78bdb54
YQ
25132017-09-04 Yao Qi <yao.qi@linaro.org>
2514
2515 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2516 X86_XSTATE_SSE_MASK instead of 0.
2517
ca1fa5ee
YQ
25182017-09-04 Yao Qi <yao.qi@linaro.org>
2519
2520 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2521 i386_target_description.
2522 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2523 i386_target_description.
2524 * i386-tdep.c (i386_gdbarch_init): Likewise.
2525
2434b019
YQ
25262017-09-04 Yao Qi <yao.qi@linaro.org>
2527
2528 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2529 (x86_darwin_init_abi_64): Call amd64_target_description.
2530 * amd64-dicos-tdep.c: Likewise.
2531 * amd64-fbsd-nat.c: Likewise.
2532 * amd64-fbsd-tdep.c: Likewise.
2533 * amd64-nbsd-tdep.c: Likewise.
2534 * amd64-obsd-tdep.c: Likewise.
2535 * amd64-sol2-tdep.c: Likewise.
2536 * amd64-windows-tdep.c: Likewise.
2537 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2538
0860c437
SM
25392017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2540
2541 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2542 (btrace_function) <insn>: Change type to use std::vector.
2543 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2544 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2545 ftrace_update_insns, ftrace_compute_global_level_offset,
2546 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2547 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2548 change to std::vector.
2549 (ftrace_update_insns): Adjust to change to std::vector, change
2550 type of INSN parameter.
2551 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2552 * record-btrace.c (btrace_call_history_insn_range,
2553 btrace_compute_src_line_range,
2554 record_btrace_frame_prev_register): Adjust to change to
2555 std::vector.
2556 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2557 to change to std::vector.
2558
0638b7f9
TT
25592017-09-03 Tom Tromey <tom@tromey.com>
2560
2561 * corefile.c (reopen_exec_file): Use std::string.
2562
8f84fb0e
TT
25632017-09-03 Tom Tromey <tom@tromey.com>
2564
2565 * compile/compile.c (compile_register_name_mangled): Return
2566 std::string.
2567 * compile/compile-loc2c.c (pushf_register_address): Update.
2568 (pushf_register): Update.
2569 * compile/compile-c-types.c (convert_array): Update.
2570 * compile/compile-c-symbols.c (generate_vla_size): Update.
2571 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2572 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2573 (convert_one_symbol): Update.
2574 (generate_c_for_for_one_variable): Update.
2575 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2576 std::string.
2577 (generate_register_struct): Update.
2578 * compile/compile-internal.h (c_get_range_decl_name): Return a
2579 std::string.
2580 (compile_register_name_mangled): Return std::string.
2581
18e9961f
TT
25822017-09-03 Tom Tromey <tom@tromey.com>
2583
2584 * utils.c (perror_string): Return a std::string.
2585 (throw_perror_with_name, perror_warning_with_name): Update.
2586
45343786
TT
25872017-09-03 Tom Tromey <tom@tromey.com>
2588
2589 * demangle.c (demangle_command): Use std::string,
2590 unique_xmalloc_ptr.
2591
b57af503
TT
25922017-09-03 Tom Tromey <tom@tromey.com>
2593
2594 * cli/cli-setshow.c (do_set_command): Use std::string.
2595
6eecf35f
TT
25962017-09-03 Tom Tromey <tom@tromey.com>
2597
2598 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2599
56496dd4
TT
26002017-09-03 Tom Tromey <tom@tromey.com>
2601
2602 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2603
e91a1fa7
TT
26042017-09-03 Tom Tromey <tom@tromey.com>
2605
2606 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2607 gdb::unique_xmalloc_ptr.
2608
7ffd83d7
TT
26092017-09-03 Tom Tromey <tom@tromey.com>
2610
2611 * thread.c (print_thread_info_1): Use string_printf.
2612 (thread_apply_command, thread_apply_all_command): Use
2613 std::string.
2614
1ccbe998
TT
26152017-09-03 Tom Tromey <tom@tromey.com>
2616
2617 * valprint.c (val_print_string): Update.
2618 * gdbcore.h (memory_error_message): Return std::string.
2619 * corefile.c (memory_error_message): Return std::string.
2620 (memory_error): Update.
2621 * breakpoint.c (insert_bp_location): Update.
2622
23fdd69e
SM
26232017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2624
2625 * target/waitstatus.h (target_waitstatus_to_string): Change
2626 return type to std::string.
2627 * target/waitstatus.c (target_waitstatus_to_string): Return
2628 std::string.
2629 * target.h (target_waitstatus_to_string): Remove declaration.
2630 * infrun.c (resume, clear_proceed_status_thread,
2631 print_target_wait_results, do_target_wait, save_waitstatus,
2632 stop_all_threads): Adjust.
2633 * record-btrace.c (record_btrace_wait): Adjust.
2634 * target-debug.h
2635 (target_debug_print_struct_target_waitstatus_p): Adjust.
2636
5c811d30
JK
26372017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2638
2639 PR gdb/22046
2640 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2641 detection.
2642
0a2dde4a
SDJ
26432017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2644
2645 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2646 for setting/unsetting environment variables on the remote target.
2647 (New remote packets): Add entries for QEnvironmentHexEncoded,
2648 QEnvironmentUnset and QEnvironmentReset.
2649 * common/environ.c (gdb_environ::operator=): Extend method to
2650 handle m_user_set_env_list and m_user_unset_env_list.
2651 (gdb_environ::clear): Likewise.
2652 (match_var_in_string): Change type of first parameter from 'char
2653 *' to 'const char *'.
2654 (gdb_environ::set): Extend method to handle
2655 m_user_set_env_list and m_user_unset_env_list.
2656 (gdb_environ::unset): Likewise.
2657 (gdb_environ::clear_user_set_env): New method.
2658 (gdb_environ::user_set_envp): Likewise.
2659 (gdb_environ::user_unset_envp): Likewise.
2660 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2661 m_user_unset_env_list on move constructor/assignment.
2662 (unset): Add new default parameter 'update_unset_list = true'.
2663 (clear_user_set_env): New method.
2664 (user_set_envp): Likewise.
2665 (user_unset_envp): Likewise.
2666 (m_user_set_env_list): New std::set.
2667 (m_user_unset_env_list): Likewise.
2668 * common/rsp-low.c (hex2str): New function.
2669 (bin2hex): New overload for bin2hex function.
2670 * common/rsp-low.c (hex2str): New prototype.
2671 (str2hex): New overload prototype.
2672 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2673 QEnvironmentUnset and QEnvironmentReset.
2674 (remote_protocol_features): Add QEnvironmentHexEncoded,
2675 QEnvironmentUnset and QEnvironmentReset packets.
2676 (send_environment_packet): New function.
2677 (extended_remote_environment_support): Likewise.
2678 (extended_remote_create_inferior): Call
2679 extended_remote_environment_support.
2680 (_initialize_remote): Add QEnvironmentHexEncoded,
2681 QEnvironmentUnset and QEnvironmentReset packet configs.
2682 * unittests/environ-selftests.c (gdb_selftest_env_var):
2683 New variable.
2684 (test_vector_initialization): New function.
2685 (test_init_from_host_environ): Likewise.
2686 (test_reinit_from_host_environ): Likewise.
2687 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2688 Likewise.
2689 (test_unset_set_empty_vector): Likewise.
2690 (test_vector_clear): Likewise.
2691 (test_std_move): Likewise.
2692 (test_move_constructor):
2693 (test_self_move): Likewise.
2694 (test_set_unset_reset): Likewise.
2695 (run_tests): Rewrite in terms of the functions above.
2696
654670a4
WP
26972017-08-31 Weimin Pan <weimin.pan@oracle.com>
2698
2699 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2700 (adi_available): Use a temp variable of type CORE_ADDR as argument
2701 3 when calling target_auxv_search.
2702 (adi_normalize_address): Use masks and xor operators to calculate
2703 normalized address.
2704 (adi_read_versions, adi_write_versions, adi_print_versions)
2705 (do_examine, do_assign): Use paddress.
2706
7755ddb7
JB
27072017-08-29 John Baldwin <jhb@FreeBSD.org>
2708
2709 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2710 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2711 out of loop and add supply of FIR.
2712 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2713 add collect of FIR.
2714
fd437cbc
SM
27152017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2716
3804a343 2717 PR gdb/21827
fd437cbc
SM
2718 * cli/cli-script.c (define_command): Don't convert command name
2719 to lower case.
2720
988f6b3d
JB
27212017-08-25 Joel Brobecker <brobecker@adacore.com>
2722
2723 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2724 Update all callers accordingly. Remove all code blocks handling
2725 the case where DISPP is not NULL.
2726
663c44ac
JK
27272017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2728
2729 PR symtab/22003
2730 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2731 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2732 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2733
f1902523
JK
27342017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2735
2736 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2737 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2738 (read_comp_units_from_section): New parameter abbrev_section, use
2739 read_and_check_comp_unit_head, allocate signatured_type if needed.
2740 (create_all_comp_units): Update read_comp_units_from_section caller.
2741
87215ad1
SDJ
27422017-08-23 Pedro Alves <palves@redhat.com>
2743
2744 PR remote/21852
2745 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2746 to null_ptid and switch to thread without reading the registers
2747 after adding the inferior.
2748
6e41ddec
JK
27492017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2750
2751 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2752 compile-gcc.
2753 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2754 (compile_to_object): Implement compile_gcc.
2755 (_initialize_compile): Install "set compile-gcc". Initialize
2756 compile_gcc.
2757
e68c32d5
JK
27582017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2759
2760 * compile/compile.c (compile_to_object): Conditionally call
2761 set_verbose. Conditionally call compile or compile_v0.
2762
58afddc6
WP
27632017-08-07 Weimin Pan <weimin.pan@oracle.com>
2764
2765 * sparc64-tdep.h: (adi_normalize_address): New export.
2766 * sparc-nat.h: (open_adi_tag_fd): New export.
2767 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2768 * sparc64-linux-tdep.c:
2769 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2770 (sparc64_linux_handle_segmentation_fault): New function.
2771 (sparc64_linux_init_abi): Register
2772 sparc64_linux_handle_segmentation_fault
2773 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2774 (sparc64_addr_bits_remove): New function.
2775 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2776 (MAX_PROC_NAME_SIZE): New macro.
2777 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2778 (sparc64adilist): New variable.
2779 (adi_proc_list): New variable.
2780 (find_adi_info): New function.
2781 (add_adi_info): New function.
2782 (get_adi_info_proc): New function.
2783 (get_adi_info): New function.
2784 (info_adi_command): New function.
2785 (read_maps_entry): New function.
2786 (adi_available): New function.
2787 (adi_normalize_address): New function.
2788 (adi_align_address): New function.
2789 (adi_convert_byte_count): New function.
2790 (adi_tag_fd): New function.
2791 (adi_is_addr_mapped): New function.
2792 (adi_read_versions): New function.
2793 (adi_write_versions): New function.
2794 (adi_print_versions): New function.
2795 (do_examine): New function.
2796 (do_assign): New function.
2797 (adi_examine_command): New function.
2798 (adi_assign_command): New function.
2799 (_initialize_sparc64_adi_tdep): New function.
2800
11db9430
SM
28012017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2802
2803 * breakpoint.c (breakpoints_info): Rename to ...
2804 (info_breakpoints_command): ... this.
2805 (watchpoints_info): Rename to ...
2806 (info_watchpoints_command): ... this.
2807 (tracepoints_info): Rename to ...
2808 (info_tracepoints_command): ... this.
2809 (_initialize_breakpoint): Adjust.
2810 * dcache.c (dcache_info): Rename to ...
2811 (info_display_command): ... this.
2812 (_initialize_dcache): Adjust.
2813 * frame.h (args_info): Rename to ...
2814 (info_args_command): ... this.
2815 (locals_info): Rename to ...
2816 (info_locals_command): ... this.
2817 * infcmd.c (nofp_registers_info): Rename to ...
2818 (info_registers_command): ... this.
2819 (float_info): Rename to ...
2820 (info_float_command): ... this.
2821 (program_info): Rename to ...
2822 (info_program_command): ... this.
2823 (all_registers_info): Rename to ...
2824 (info_all_registers_command): ... this.
2825 (vector_info): Rename to ...
2826 (info_vector_command): ... this.
2827 (float_info): Rename to ...
2828 (info_float_command): ... this.
2829 (_initialize_infcmd): Adjust.
2830 * inferior.h (term_info): Rename to ...
2831 (info_terminal_command): ... this.
2832 * inflow.c (term_info): Rename to ...
2833 (info_terminal_command): ... this.
2834 (_initialize_inflow): Adjust.
2835 * infrun.c (signals_info): Rename to ...
2836 (info_signals_command): ... this.
2837 (_initialize_infrun): Adjust.
2838 * objc-lang.c (classes_info): Rename to ...
2839 (info_classes_command): ... this.
2840 (selectors_info): Rename to ...
2841 (info_selectors_command): ... this.
2842 (_initialize_objc_language): Adjust.
2843 * printcmd.c (sym_info): Rename to ...
2844 (info_symbol_command): ... this.
2845 (address_info): Rename to ...
2846 (info_address_command): ... this.
2847 (display_info): Rename to ...
2848 (info_display_command): ... this.
2849 (_initialize_printcmd): Adjust.
2850 * reverse.c (bookmarks_info): Rename to ...
2851 (info_breakpoints_command): ... this.
2852 (_initialize_reverse): Adjust.
2853 * ser-go32.c (dos_info): Rename to ...
2854 (info_serial_command): ... this.
2855 (_initialize_ser_dos): Adjust.
2856 * skip.c (skip_info): Rename to ...
2857 (info_skip_command): ... this.
2858 (_initialize_step_skip): Adjust.
2859 * source.c (line_info): Rename to ...
2860 (info_line_command): ... this.
2861 (source_info): Rename to ...
2862 (info_source_command)
2863 * stack.c (frame_info): Rename to ...
2864 (info_frame_command): ... this.
2865 (locals_info): Rename to ...
2866 (info_locals_command): ... this.
2867 (args_info): Rename to ...
2868 (info_args_command): ... this.
2869 (_initialize_stack): Adjust.
2870 * symtab.c (sources_info): Rename to ...
2871 (info_sources_command): ... this.
2872 (variables_info): Rename to ...
2873 (info_variables_command): ... this.
2874 (functions_info): Rename to ...
2875 (info_functions_command): ... this.
2876 (types_info): Rename to ...
2877 (info_types_command): ... this.
2878 (_initialize_symtab): Adjust.
2879 * target.c (target_info): Rename to ...
2880 (info_target_command): ... this.
2881 (initialize_targets): Adjust.
2882 * tracepoint.c (tvariables_info): Rename to ...
2883 (info_tvariables_command): ... this.
2884 (scope_info): Rename to ...
2885 (info_scope_command): ... this.
2886 (trace_dump_actions): Adjust.
2887 (_initialize_tracepoint): Adjust.
2888
b270e6f9
TT
28892017-08-22 Tom Tromey <tom@tromey.com>
2890
2891 * breakpoint.h (install_breakpoint): Update.
2892 * breakpoint.c (add_solib_catchpoint): Update.
2893 (install_breakpoint): Change argument to a std::unique_ptr.
2894 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2895 (create_breakpoint_sal, create_breakpoint): Update.
2896 (watch_command_1, catch_exec_command_1)
2897 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2898 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2899 Return the breakpoint.
2900 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2901 (new_single_step_breakpoint): Update.
2902 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2903 std::unique_ptr.
2904 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2905 std::unique_ptr.
2906 * break-catch-sig.c (create_signal_catchpoint): Use
2907 std::unique_ptr.
2908 * ada-lang.c (create_ada_exception_catchpoint): Use
2909 std::unique_ptr.
2910
36bd8eaa
TT
29112017-08-22 Tom Tromey <tom@tromey.com>
2912
2913 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2914
56f37645
TT
29152017-08-22 Tom Tromey <tom@tromey.com>
2916
2917 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2918 (lookup_partial_symbol): Update.
2919
0b581c69
TT
29202017-08-22 Tom Tromey <tom@tromey.com>
2921
2922 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2923 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2924 (find_and_open_source, symtab_to_fullname): Update.
2925 * psymtab.c (psymtab_to_fullname): Update.
2926
14278e1f
TT
29272017-08-22 Tom Tromey <tom@tromey.com>
2928
2929 * exec.c (exec_file_attach): Update.
2930 * linux-thread-db.c (try_thread_db_load): Update.
2931 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2932 * utils.c (gdb_realpath): Change return type.
2933 (gdb_realpath_keepfile): Update.
2934 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2935 (_initialize_utils): Register the new self test.
2936 * source.c (openp): Update.
2937 (find_and_open_source): Update.
2938 * nto-tdep.c (nto_find_and_open_solib): Update.
2939 * main.c (set_gdb_data_directory): Update.
2940 (captured_main_1): Update.
2941 * dwarf2read.c (dwarf2_get_dwz_file): Update
2942 (dw2_map_symbol_filenames): Update.
2943 * auto-load.c (auto_load_safe_path_vec_update): Update.
2944 (filename_is_in_auto_load_safe_path_vec): Change type of
2945 "filename_realp".
2946 (auto_load_objfile_script): Update.
2947 (file_is_auto_load_safe): Update. Use std::string.
2948 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2949
4971c9a7
TT
29502017-08-22 Tom Tromey <tom@tromey.com>
2951
2952 * utils.c (gdb_realpath_keepfile): Return a
2953 gdb::unique_xmalloc_ptr.
2954 * exec.c (exec_file_attach): Update.
2955 * utils.h (gdb_realpath_keepfile): Return a
2956 gdb::unique_xmalloc_ptr.
2957
e3e41d58
TT
29582017-08-22 Tom Tromey <tom@tromey.com>
2959
2960 * compile/compile.c (compile_file_command): Use
2961 gdb::unique_xmalloc_ptr, std::string.
2962 * utils.c (gdb_abspath): Change return type.
2963 * source.c (openp): Update.
2964 * objfiles.c (allocate_objfile): Update.
2965 * main.c (set_gdb_data_directory): Update.
2966 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2967
0d999a6e
ZZ
29682017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2969
2970 * cli-cmds.c (list_commands): List actual code around more than
2971 one location.
2972
329d5e7e
JB
29732017-08-21 John Baldwin <jhb@FreeBSD.org>
2974
2975 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2976
bf223d3e
PA
29772017-08-21 Pedro Alves <palves@redhat.com>
2978
2979 PR gdb/19487
2980 * c-exp.y (variable production): Handle function aliases.
2981 * minsyms.c (msymbol_is_text): New function.
2982 * minsyms.h (msymbol_is_text): Declare.
2983 * symtab.c (find_function_alias_target): New function.
2984 * symtab.h (find_function_alias_target): Declare.
2985
c973d0aa
PA
29862017-08-21 Pedro Alves <palves@redhat.com>
2987
2988 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2989 typedefs.
2990 * typeprint.c (whatis_exp): If handling "whatis", and expression
2991 is OP_TYPE, strip one typedef level. Otherwise don't strip
2992 typedefs here.
2993 * valops.c (value_cast): Save "to" type before resolving
2994 stubs/typedefs. Use that type as resulting value's type.
2995
2989a365
TT
29962017-08-18 Tom Tromey <tom@tromey.com>
2997 Pedro Alves <palves@redhat.com>
2998
2999 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3000 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3001 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3002 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3003 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3004 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3005 (linux_get_siginfo_data): Add "thread" argument. Use
3006 scoped_restore.
3007 * linux-nat.c (linux_child_follow_fork)
3008 (check_stopped_by_watchpoint): Use scoped_restore.
3009 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3010 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3011 (restore_inferior_ptid, save_inferior_ptid): Remove.
3012 * btrace.c (btrace_fetch): Use scoped_restore.
3013 * bsd-uthread.c (bsd_uthread_fetch_registers)
3014 (bsd_uthread_store_registers): Use scoped_restore.
3015 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3016 scoped_restore.
3017 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3018 (aix_thread_xfer_partial): Use scoped_restore.
3019 * inferior.h (save_inferior_ptid): Remove.
3020
e60eb288
YQ
30212017-08-18 Yao Qi <yao.qi@linaro.org>
3022
3023 PR tdep/21818
3024 * arm-tdep.c (gdb_print_insn_arm): Mark
3025 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3026
6d580b63
YQ
30272017-08-18 Yao Qi <yao.qi@linaro.org>
3028
3029 * NEWS: Mention GDBserver's new option "--selftest".
3030 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3031 * selftest.c: Move it to common/selftest.c.
3032 * selftest.h: Move it to common/selftest.h.
3033 * selftest-arch.c (reset): New function.
3034 (tests_with_arch): Call reset.
3035
86dcbf50
YQ
30362017-08-18 Yao Qi <yao.qi@linaro.org>
3037
3038 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3039 instead of exception_fprintf and printf_filtered.
3040
7649770c
YQ
30412017-08-18 Yao Qi <yao.qi@linaro.org>
3042
3043 * selftest.c (register_self_test): Rename it to
3044 selftests::register_test.
3045 (run_self_tests): selftest::run_tests.
3046 * selftest.h: Update declarations.
3047 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3048 selftests::register_test_foreach_arch.
3049 * selftest-arch.h: Update declaration.
3050 * aarch64-tdep.c: Update.
3051 * arm-tdep.c: Likewise.
3052 * disasm-selftests.c: Likewise.
3053 * dwarf2loc.c: Likewise.
3054 * dwarf2-frame.c: Likewise.
3055 * findvar.c: Likewise.
3056 * gdbarch-selftests.c: Likewise.
3057 * maint.c (maintenance_selftest): Likewise.
3058 * regcache.c: Likewise.
3059 * rust-exp.y: Likewise.
3060 * selftest-arch.c: Likewise.
3061 * unittests/environ-selftests.c: Likewise.
3062 * unittests/function-view-selftests.c: Likewise.
3063 * unittests/offset-type-selftests.c: Likewise.
3064 * unittests/optional-selftests.c: Likewise.
3065 * unittests/scoped_restore-selftests.c: Likewise.
3066 * utils-selftests.c: Likewise.
3067
b0cba12e
PA
30682017-08-17 Pedro Alves <palves@redhat.com>
3069
3070 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3071 local.
3072
4c8aa72d
PA
30732017-08-17 Pedro Alves <palves@redhat.com>
3074
3075 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3076 field.
3077 (reset_die_in_process): Delete, replaced by ...
3078 (process_die_scope): ... this new class. Make it responsible for
3079 freeing cu->line_header too.
3080 (process_die): Use process_die_scope.
3081 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3082 cu->line_header_die_owner. Don't release the line header if it's
3083 owned by the CU.
3084 (setup_type_unit_groups): Make the CU/DIE own the line header.
3085 Don't release the line header here.
3086
ba713918
AL
30872017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3088
3089 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3090
44d0fb3a
RK
30912017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3092
3093 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3094 Single-Key mode
3095
a5afdb16
RK
30962017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3097
3098 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3099 mode command list.
3100
47613aeb
SH
31012017-08-15 Stafford Horne <shorne@gmail.com>
3102
3103 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3104
9c3cc999
SH
31052017-08-15 Stafford Horne <shorne@gmail.com>
3106
3107 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3108
206726fb
SDJ
31092017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3110
3111 PR gdb/21954
3112 * infcmd.c (unset_environment_command): Use the 'clear' method on
3113 the environment instead of resetting it.
3114
0335ac6d
JB
31152017-08-15 John Baldwin <jhb@FreeBSD.org>
3116
3117 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3118 platforms.
3119
d3abe1c8
TT
31202017-08-14 Tom Tromey <tom@tromey.com>
3121
3122 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3123 (print_binary_chars): Likewise.
3124 (BITS_IN_BYTES): Remove.
3125
d6382fff
TT
31262017-08-14 Tom Tromey <tom@tromey.com>
3127
3128 PR gdb/21675
3129 * valprint.c (LOW_ZERO): Change value to 034.
3130 (print_octal_chars): Add static_asserts for octal constants.
3131 * printcmd.c (print_scalar_formatted): Add 'd' case.
3132
f978cb06
TT
31332017-08-11 Tom Tromey <tom@tromey.com>
3134
3135 * symfile.c (add_symbol_file_command): Use std::vector.
3136
2f5404b3
TT
31372017-08-14 Tom Tromey <tom@tromey.com>
3138
3139 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3140 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3141 std::move.
3142 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3143
de7985c3
PA
31442017-08-11 Pedro Alves <palves@redhat.com>
3145
3146 * infrun.c (process_event_stop_test): Adjust
3147 function_name_is_marked_for_skip call.
3148 * skip.c: Include <list>.
3149 (skiplist_entry): Make it a class with private fields, and
3150 getters/setters.
3151 (skiplist_entry_chain): Delete.
3152 (skiplist_entries): New.
3153 (skiplist_entry_count): Delete.
3154 (highest_skiplist_entry_num): New.
3155 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3156 (add_skiplist_entry): Delete.
3157 (skiplist_entry::skiplist_entry): New.
3158 (skiplist_entry::add_entry): New.
3159 (skip_file_command, skip_function): Adjust.
3160 (compile_skip_regexp): Delete.
3161 (skip_command): Don't compile regexp here. Adjust to use
3162 skiplist_entry::add_entry.
3163 (skip_info): Adjust to use range-for and getters.
3164 (skip_enable_command, skip_disable_command): Adjust to use
3165 range-for and setters.
3166 (skip_delete_command): Adjust to use std::list.
3167 (add_skiplist_entry): Delete.
3168 (skip_file_p): Delete, refactored as ...
3169 (skiplist_entry::do_skip_file_p): ... this new method.
3170 (skip_gfile_p): Delete, refactored as ...
3171 (skiplist_entry::do_gskip_file_p): ... this new method.
3172 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3173 (skiplist_entry::skip_function_p): ... this new method.
3174 (function_name_is_marked_for_skip): Now returns bool, and takes
3175 the function sal by const reference. Adjust to use range-for and
3176 skiplist_entry methods.
3177 (_initialize_step_skip): Remove references to
3178 skiplist_entry_chain, skiplist_entry_count.
3179 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3180 takes the function sal by const reference.
3181
be7d3cd5
YQ
31822017-08-11 Yao Qi <yao.qi@linaro.org>
3183
3184 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3185 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3186 (dwarf2_frame_cache):
3187 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3188 RETURN_MASK_ALL and set *this_case to NULL.
3189 * frame-unwind.h: Update comments.
3190
1c90d9f0
YQ
31912017-08-11 Yao Qi <yao.qi@linaro.org>
3192
3193 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3194 (dwarf2_frame_state_copy_regs): Remove.
3195 (dwarf2_frame_state_free_regs): Remove.
3196 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3197 (dwarf2_restore_rule): Call method .alloc_regs instead of
3198 dwarf2_frame_state_alloc_regs.
3199 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3200 constructor. Call std::move.
3201 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3202 (dwarf2_frame_cache): Likewise.
3203
3204 [GDB_SELF_TEST]: Include selftest.h and
3205 selftest-arch.h.
3206 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3207 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3208 execute_cfa_program_test.
3209
3210 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3211 copy ctor, assignment operator, move assignment.
3212 <alloc_regs>: New method.
3213 <swap>: New method.
3214 (struct dwarf2_frame_state): Delete dtor.
3215 (dwarf2_frame_state_alloc_regs): Remove declaration.
3216 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3217 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3218
afe37d6b
YQ
32192017-08-11 Yao Qi <yao.qi@linaro.org>
3220
3221 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3222 (dwarf2_frame_state::dwarf2_frame_state): New.
3223 (dwarf2_frame_state::~dwarf2_frame_state): New.
3224 (dwarf2_fetch_cfa_info): Update.
3225 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3226 rather than a pointer. Update code.
3227 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3228 dtor.
3229 <data_align, code_align, retaddr_column>: Change them to const.
3230 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3231 to bool.
3232
b348037f
YQ
32332017-08-11 Yao Qi <yao.qi@linaro.org>
3234
3235 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3236 <loc.exp>: New field.
3237 * dwarf2-frame.c (execute_cfa_program): Update.
3238 (dwarf2_frame_prev_register): Update.
3239
e7c9de26
PA
32402017-08-10 Pedro Alves <palves@redhat.com>
3241
3242 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3243
e8c6b620
JB
32442017-08-09 John Baldwin <jhb@FreeBSD.org>
3245
3246 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3247 (fbsd_pending_children): Use std::list.
3248 (fbsd_remember_child): Likewise.
3249 (fbsd_is_child_pending): Likewise.
3250 (fbsd_pending_vfork_done): Use std::forward_list.
3251 (fbsd_add_vfork_done): Likewise.
3252 (fbsd_is_vfork_done_pending): Likewise.
3253 (fbsd_next_vfork_done): Likewise.
3254
e4a26669
JB
32552017-08-09 John Baldwin <jhb@FreeBSD.org>
3256
3257 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3258 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3259 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3260 for `mapfilename'.
3261 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3262 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3263
142311d3
JB
32642017-08-09 John Baldwin <jhb@FreeBSD.org>
3265
3266 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3267 "filestuff.h".
3268 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3269
42fa2e0e
TT
32702017-08-09 Tom Tromey <tom@tromey.com>
3271
3272 * skip.c (skiplist_entry): New constructor.
3273 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3274 (skiplist_entry::file_is_glob): Now bool.
3275 (skiplist_entry::file, skiplist_entry::function): Now
3276 std::string.
3277 (make_skip_entry): Return a unique_ptr. Use new.
3278 (free_skiplist_entry, free_skiplist_entry_cleanup)
3279 (make_free_skiplist_entry_cleanup): Remove.
3280 (skip_command, skip_disable_command, add_skiplist_entry)
3281 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3282 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3283 (function_name_is_marked_for_skip): Update.
3284 (skip_delete_command): Update. Use delete.
3285
cd3af38d
JW
32862017-08-09 Jiong Wang <jiong.wang@arm.com>
3287
3288 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3289 (aarch64_linux_core_read_description): New function.
3290 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3291
29592bde
PA
32922017-08-09 Pedro Alves <palves@redhat.com>
3293
3294 * cp-name-parser.y (cp_comp_to_string): Return a
3295 gdb::unique_xmalloc_ptr<char>.
3296 * cp-support.c (replace_typedefs_qualified_name)
3297 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3298 (cp_canonicalize_string_full): Use op= instead of explicit
3299 convertion.
3300 (cp_class_name_from_physname, method_name_from_physname)
3301 (cp_func_name, cp_remove_params): Adjust to use
3302 gdb::unique_xmalloc_ptr<char>.
3303 * cp-support.h (cp_comp_to_string): Return a
3304 gdb::unique_xmalloc_ptr<char>.
3305 * python/py-type.c (typy_lookup_type): Adjust to use
3306 gdb::unique_xmalloc_ptr<char>.
3307
b3340438
L
33082017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3309
3310 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3311
e88e8651
YQ
33122017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3313 Yao Qi <yao.qi@linaro.org>
3314
3315 * cp-support.c (cp_canonicalize_string_full): Use
3316 gdb::unique_xmalloc_ptr<char>.
3317 (cp_canonicalize_string): Likewise.
3318
f5a29eb0
YQ
33192017-08-09 Yao Qi <yao.qi@linaro.org>
3320
3321 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3322 * regformats/i386/amd64-avx-avx512.dat: Remove.
3323 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3324 * regformats/i386/amd64-avx-mpx.dat:Remove.
3325 * regformats/i386/amd64-avx.dat: Remove.
3326 * regformats/i386/amd64-mpx.dat: Remove.
3327 * regformats/i386/i386-avx-avx512.dat: Remove.
3328 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3329 * regformats/i386/i386-avx-mpx.dat: Remove.
3330 * regformats/i386/i386-mmx.dat: Remove.
3331 * regformats/i386/i386-mpx.dat: Remove.
3332
57757c2f
YQ
33332017-08-09 Yao Qi <yao.qi@linaro.org>
3334
3335 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3336 * amd64-tdep.c: Don't include features/i386/x32*.c.
3337 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3338 functions.
3339 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3340 and i386/x32-avx-avx512.
3341 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3342 and i386/x32.xml.
3343 * features/i386/x32-avx-avx512.c: Removed.
3344 * features/i386/x32-avx-avx512.xml: Removed.
3345 * features/i386/x32-avx.c: Removed.
3346 * features/i386/x32-avx.xml: Removed.
3347 * features/i386/x32.c: Removed.
3348 * features/i386/x32.xml: Removed.
3349 * regformats/i386/x32-avx-avx512.dat: Removed.
3350 * regformats/i386/x32-avx.dat: Removed.
3351 * regformats/i386/x32.dat: Removed.
3352
ba7b109b
MR
33532017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3354
3355 PR breakpoints/21886
3356 * mem-break.c (default_memory_insert_breakpoint): Use
3357 `->placed_address' rather than `->reqstd_address' for the
3358 breakpoint location.
3359
e347efc3
MR
33602017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3361
3362 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3363 assertions.
3364
0dba2a6c
MR
33652017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3366
3367 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3368 a union of `tdep_info', `tdesc_data' and `id'.
3369 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3370 rather than `info.tdep_info'.
3371 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3372 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3373 * i386-tdep.c (i386_gdbarch_init): Likewise.
3374 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3375 * mips-tdep.c (mips_gdbarch_init): Likewise.
3376 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3377 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3378 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3379 `info.tdep_info'.
3380 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3381 `info.tdep_info'.
3382 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3383 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3384 `info.tdep_info'.
3385 * spu-tdep.c (spu_gdbarch_init): Likewise.
3386 * gdbarch.h: Regenerate.
3387
16eb6b2d
LS
33882017-08-07 Leszek Swirski <leszeks@google.com>
3389
7b005726 3390 PR symtab/20899
16eb6b2d
LS
3391 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3392
74cbb09e
SM
33932017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3394
3395 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3396 (gdbsim_open): Rename gdb_argv args object to argv.
3397
ee0c3293
TT
33982017-08-05 Tom Tromey <tom@tromey.com>
3399
3400 * compile/compile-object-load.c (compile_object_load): Use
3401 gdb::unique_xmalloc_ptr.
3402 * cli/cli-dump.c (scan_filename): Rename from
3403 scan_filename_with_cleanup. Change return type.
3404 (scan_expression): Rename from scan_expression_with_cleanup.
3405 Change return type.
3406 (dump_memory_to_file, dump_value_to_file, restore_command):
3407 Use gdb::unique_xmalloc_ptr. Update.
3408 * cli/cli-cmds.c (find_and_open_script): Use
3409 gdb::unique_xmalloc_ptr.
3410 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3411 * symmisc.c (maintenance_print_symbols)
3412 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3413 * symfile.c (symfile_bfd_open, generic_load)
3414 (add_symbol_file_command, remove_symbol_file_command): Use
3415 gdb::unique_xmalloc_ptr.
3416 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3417 * psymtab.c (maintenance_print_psymbols): Use
3418 gdb::unique_xmalloc_ptr.
3419 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3420 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3421 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3422 (reload_shared_libraries_1): Likewise.
3423
3232fabd
TT
34242017-08-05 Tom Tromey <tom@tromey.com>
3425
3426 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3427 (rust_op_vector, rust_set_vector): New typedefs.
3428 (current_parser): New global.
3429 (work_obstack): Change to pointer type. Update all users.
3430 (rust_ast, pstate): Remove globals.
3431 (struct rust_parser): New.
3432 (%union) <params, field_inits>: Change type.
3433 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3434 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3435 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3436 (convert_params_to_types, convert_params_to_expression): Change
3437 type of "params".
3438 (ast_string): Change type of "fields".
3439 (rust_parse): Make a rust_parser. Remove cleanups.
3440 (rust_lex_tests): Make and install an auto_obstack.
3441
f02fd774
YQ
34422017-08-04 Yao Qi <yao.qi@linaro.org>
3443
3444 * configure.srv (ipa_x32_linux_regobj): New.
3445 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3446 instead of X86_TDESC_AVX512.
3447 (initialize_low_tracepoint): Call
3448 init_registers_x32_avx_avx512_linux.
3449
91975afd
YQ
34502017-08-04 Yao Qi <yao.qi@linaro.org>
3451
3452 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3453
2331fa3a
RK
34542017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3455
3456 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3457
744e4fe1
TT
34582017-08-03 Tom Tromey <tom@tromey.com>
3459
3460 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3461 Remove.
3462 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3463
1c034b67
TT
34642017-08-03 Tom Tromey <tom@tromey.com>
3465
3466 * python/py-param.c (compute_enum_values): Use gdb_argv.
3467
773a1edc
TT
34682017-08-03 Tom Tromey <tom@tromey.com>
3469
3470 * utils.h (struct gdb_argv_deleter): New.
3471 (gdb_argv): New class.
3472 * utils.c (gdb_argv::reset): New method.
3473 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3474 * tracefile.c (tsave_command): Use gdb_argv.
3475 * top.c (new_ui_command): Use gdb_argv.
3476 * symmisc.c (maintenance_print_symbols)
3477 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3478 * symfile.c (symbol_file_command, generic_load)
3479 (remove_symbol_file_command): Use gdb_argv.
3480 * stack.c (backtrace_command): Use gdb_argv.
3481 * source.c (add_path, show_substitute_path_command)
3482 (unset_substitute_path_command, set_substitute_path_command):
3483 Use gdb_argv.
3484 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3485 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3486 * remote.c (extended_remote_run, remote_put_command)
3487 (remote_get_command, remote_delete_command): Use gdb_argv.
3488 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3489 (gdbsim_open): Use gdb_argv.
3490 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3491 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3492 * procfs.c (procfs_info_proc): Use gdb_argv.
3493 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3494 * infrun.c (handle_command): Use gdb_argv.
3495 * inferior.c (add_inferior_command, clone_inferior_command):
3496 Use gdb_argv.
3497 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3498 * exec.c (exec_file_command): Use gdb_argv.
3499 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3500 * compile/compile.c (build_argc_argv): Use gdb_argv.
3501
0d50bde3
TT
35022017-08-03 Tom Tromey <tom@tromey.com>
3503
3504 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3505
7f968c89
TT
35062017-08-03 Tom Tromey <tom@tromey.com>
3507
3508 * python/python.c (compute_python_string): Return std::string.
3509 (gdbpy_eval_from_control_command): Update.
3510 (do_start_initialization): Use std::string.
3511 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3512 xstrprintf.
3513 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3514 xstrprintf.
3515
3c9ebddd
TT
35162017-08-03 Tom Tromey <tom@tromey.com>
3517
3518 * top.h (do_restore_instream_cleanup): Remove.
3519 * top.c (do_restore_instream_cleanup): Remove.
3520 (read_command_file): Use scoped_restore.
3521 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3522
b51b225e
TT
35232017-08-03 Tom Tromey <tom@tromey.com>
3524
3525 * cli/cli-script.c (execute_user_command)
3526 (execute_control_command): Use scoped_restore.
3527
ac991630
TT
35282017-08-03 Tom Tromey <tom@tromey.com>
3529
3530 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3531 (execute_user_command): Remove user_call_depth; use
3532 user_args_stack's size instead.
3533
898e0c8e
TT
35342017-08-03 Tom Tromey <tom@tromey.com>
3535
3536 * top.h (in_user_command): Remove.
3537 * top.c (in_user_command): Remove.
3538 * cli/cli-script.c (do_restore_user_call_depth)
3539 (execute_user_command): Update.
3540
26fcd5d7
TT
35412017-08-03 Tom Tromey <tom@tromey.com>
3542
3543 * valops.c (search_struct_method): Use gdb::byte_vector.
3544 * valarith.c (value_concat): Use std::vector.
3545 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3546 (simple_search_memory): Likewise.
3547 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3548 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3549 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3550 * elfread.c (elf_rel_plt_read): Use std::string.
3551 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3552 * cli/cli-dump.c (restore_section_callback): Use
3553 gdb::byte_vector.
3554
7c218e6c
TT
35552017-08-03 Tom Tromey <tom@tromey.com>
3556
3557 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3558
31b68d4a
TT
35592017-08-03 Tom Tromey <tom@tromey.com>
3560
3561 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3562 (tui_register_format): Use scoped_restore.
3563
2ec845e7
TT
35642017-08-03 Tom Tromey <tom@tromey.com>
3565
3566 * reverse.c (exec_direction_default): Remove.
3567 (exec_reverse_once): Use scoped_restore.
3568 * remote.c (restore_remote_timeout): Remove.
3569 (remote_flash_erase, remote_flash_write, remote_flash_done)
3570 (readchar, remote_serial_write): Use scoped_restore.
3571 * cli/cli-script.c (struct source_cleanup_lines_args)
3572 (source_cleanup_lines): Remove.
3573 (script_from_file): Use scoped_restore.
3574 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3575 (source_command): Use scoped_restore.
3576
b3bc8453
TT
35772017-08-03 Tom Tromey <tom@tromey.com>
3578
3579 * utils.h (make_cleanup_free_so): Remove.
3580 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3581 * solist.h (struct so_deleter): New.
3582 (so_list_up): New typedef.
3583 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3584
e3ad2841
TT
35852017-08-03 Tom Tromey <tom@tromey.com>
3586
3587 * utils.h (make_cleanup_restore_current_language): Remove.
3588 * utils.c (do_restore_current_language)
3589 (make_cleanup_restore_current_language): Remove.
3590 * parse.c (parse_exp_in_context_1)
3591 (parse_expression_with_language): Use
3592 scoped_restore_current_language.
3593 * mi/mi-main.c (mi_cmd_execute): Use
3594 scoped_restore_current_language.
3595 * language.h (scoped_restore_current_language): New class.
3596
b80cf838
TT
35972017-08-03 Tom Tromey <tom@tromey.com>
3598
3599 * compile/compile.c (cleanup_unlink_file): Remove.
3600 (compile_to_object): Use gdb::unlinker.
3601 (eval_compile_command): Likewise.
3602
fad0444a
TT
36032017-08-03 Tom Tromey <tom@tromey.com>
3604
3605 * utils.h (make_cleanup_fclose): Remove.
3606 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3607
6e7bc05c
TT
36082017-08-03 Tom Tromey <tom@tromey.com>
3609
3610 * top.c (open_terminal_stream): Return gdb_file_up.
3611 (new_ui_command): Update.
3612
4a45905b
TT
36132017-08-03 Tom Tromey <tom@tromey.com>
3614
3615 * source.c (print_source_lines_base, forward_search_command)
3616 (reverse_search_command): Use gdb_file_up.
3617
7cd06d6e
TT
36182017-08-03 Tom Tromey <tom@tromey.com>
3619
3620 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3621
ed166945
TT
36222017-08-03 Tom Tromey <tom@tromey.com>
3623
3624 * cli/cli-cmds.c (find_and_open_script): Change return type.
3625 Remove "streamp" and "full_path" parameters.
3626 (source_script_with_search): Update.
3627 * auto-load.c (source_script_file): Update.
3628 * cli/cli-cmds.h (find_and_open_script): Change type.
3629 (open_script): New struct.
3630
d419f42d
TT
36312017-08-03 Tom Tromey <tom@tromey.com>
3632
3633 * xml-support.c (xml_fetch_content_from_file): Update.
3634 * ui-file.c (stdio_file::open): Update.
3635 * tracefile-tfile.c (tfile_start): Update.
3636 * remote.c (remote_file_put, remote_file_get): Update.
3637 * nat/linux-procfs.c (linux_proc_get_int)
3638 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3639 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3640 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3641 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3642 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3643 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3644 * linux-nat.c (linux_proc_pending_signals): Update.
3645 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3646 (file_closer): Remove.
3647 * compile/compile.c (compile_to_object): Update.
3648 * common/filestuff.h (struct gdb_file_deleter): New.
3649 (gdb_file_up): New typedef.
3650 (gdb_fopen_cloexec): Change return type.
3651 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3652 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3653 (dump_binary_file, restore_binary_file): Update.
3654 * auto-load.c (auto_load_objfile_script_1): Update.
3655
4a2b031d
TT
36562017-08-03 Tom Tromey <tom@tromey.com>
3657
3658 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3659 (info_static_tracepoint_markers_command): Likewise.
3660 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3661 * skip.c (skip_info): Use ui_out_emit_table.
3662 * progspace.c (print_program_space): Use ui_out_emit_table.
3663 * osdata.c (info_osdata): Use ui_out_emit_table.
3664 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3665 ui_out_emit_table.
3666 * linux-thread-db.c (info_auto_load_libthread_db): Use
3667 ui_out_emit_table.
3668 * inferior.c (print_inferior): Use ui_out_emit_table.
3669 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3670 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3671 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3672 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3673 * ui-out.h (class ui_out_emit_table): New.
3674
a4f320fd
MR
36752017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3676
3677 * mips-tdep.c (mips_fpu_type_str): New function.
3678 (mips_dump_tdep): Call it.
3679
a2f1f308
MR
36802017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3681
3682 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3683 `->mips_fpu_type'.
3684
7e5ed83b
XR
36852017-07-31 Xavier Roirand <roirand@adacore.com>
3686
3687 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3688
4c9dc811
XR
36892017-07-27 Xavier Roirand <roirand@adacore.com>
3690
3691 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3692
27d41eac
YQ
36932017-07-26 Yao Qi <yao.qi@linaro.org>
3694
3695 * cli/cli-cmds.c (maintenancechecklist): New variable.
3696 * gdbcmd.h (maintenancechecklist): Declare it.
3697 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3698 Call i386_linux_read_description with different masks.
3699 * maint.c (maintenance_check_command): New function.
3700 (_initialize_maint_cmds): Call add_prefix_cmd.
3701 * target-descriptions.c (tdesc_reg): override operator != and ==.
3702 (tdesc_type): Likewise.
3703 (tdesc_feature): Likewise.
3704 (target_desc): Likewise.
3705 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3706 (maintenance_check_xml_descriptions): New function.
3707 (_initialize_target_descriptions) Add command "xml-descriptions".
3708 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3709
ea03d0d3
YQ
37102017-07-26 Yao Qi <yao.qi@linaro.org>
3711
3712 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3713 Include features/i386/32bit-*.c.
3714 (i386_linux_read_description): Generate target description if it
3715 doesn't exist.
3716 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3717 functions.
3718 * features/i386/32bit-linux.c: Re-generated.
3719 * features/i386/32bit-sse.c: Likewise.
3720 * target-descriptions.c (print_c_feature::visit): Print code to
3721 set register number if needed.
3722 (print_c_feature) <m_next_regnum>: New field.
3723
25aa13e5
YQ
37242017-07-26 Yao Qi <yao.qi@linaro.org>
3725
3726 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3727 (FEATURE_XMLFILES): New.
3728 (FEATURE_CFILES): New.
3729 New rules.
3730 (clean-cfiles): Remove generated c files.
3731 * features/i386/32bit-avx.c: Generated.
3732 * features/i386/32bit-avx512.c: Generated.
3733 * features/i386/32bit-core.c: Generated.
3734 * features/i386/32bit-linux.c: Generated.
3735 * features/i386/32bit-mpx.c: Generated.
3736 * features/i386/32bit-pkeys.c: Generated.
3737 * features/i386/32bit-sse.c: Generated.
3738 * target-descriptions.c: Include algorithm.
3739 (tdesc_element_visitor): Add method visit_end.
3740 (print_c_tdesc): Implement visit_end.
3741 (print_c_tdesc:: m_filename_after_features): Move it to
3742 protected.
3743 (print_c_feature): New class.
3744 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3745 name starts with "i386/32bit-".
3746
6eb1e6a8
YQ
37472017-07-26 Yao Qi <yao.qi@linaro.org>
3748
3749 * target-descriptions.c (tdesc_element_visitor): New class.
3750 (tdesc_element): New class.
3751 (tdesc_reg): Inherit from tdesc_element.
3752 (tdesc_reg::accept): New function.
3753 (tdesc_type): Inherit from tdesc_element.
3754 (tdesc_type::accept): New function.
3755 (tdesc_feature): Inherit from tdesc_element.
3756 (tdesc_feature::accept): New function.
3757 (target_desc): Inherit from tdesc_element.
3758 (target_desc::target_desc): New.
3759 (target_desc::~target_desc): New.
3760 (target_desc::accept): New.
3761 (allocate_target_description): Use new.
3762 (free_target_description): Use delete.
3763 (print_c_tdesc): New class.
3764 (maint_print_c_tdesc_cmd): Adjust.
3765
3766 * features/aarch64.c: Re-generated.
3767 * features/arc-arcompact.c: Re-generated.
3768 * features/arc-v2.c: Re-generated.
3769 * features/arm/arm-with-iwmmxt.c: Re-generated.
3770 * features/arm/arm-with-m.c: Re-generated.
3771 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3772 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3773 * features/arm/arm-with-neon.c: Re-generated.
3774 * features/arm/arm-with-vfpv2.c: Re-generated.
3775 * features/arm/arm-with-vfpv3.c: Re-generated.
3776 * features/i386/amd64-avx-avx512.c: Re-generated.
3777 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3778 * features/i386/amd64-avx.c: Re-generated.
3779 * features/i386/amd64-avx-linux.c: Re-generated.
3780 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3781 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3782 * features/i386/amd64-avx-mpx.c: Re-generated.
3783 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3784 * features/i386/amd64.c: Re-generated.
3785 * features/i386/amd64-linux.c: Re-generated.
3786 * features/i386/amd64-mpx.c: Re-generated.
3787 * features/i386/amd64-mpx-linux.c: Re-generated.
3788 * features/i386/i386-avx-avx512.c: Re-generated.
3789 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3790 * features/i386/i386-avx.c: Re-generated.
3791 * features/i386/i386-avx-linux.c: Re-generated.
3792 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3793 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3794 * features/i386/i386-avx-mpx.c: Re-generated.
3795 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3796 * features/i386/i386.c: Re-generated.
3797 * features/i386/i386-linux.c: Re-generated.
3798 * features/i386/i386-mmx.c: Re-generated.
3799 * features/i386/i386-mmx-linux.c: Re-generated.
3800 * features/i386/i386-mpx.c: Re-generated.
3801 * features/i386/i386-mpx-linux.c: Re-generated.
3802 * features/i386/x32-avx-avx512.c: Re-generated.
3803 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3804 * features/i386/x32-avx.c: Re-generated.
3805 * features/i386/x32-avx-linux.c: Re-generated.
3806 * features/i386/x32.c: Re-generated.
3807 * features/i386/x32-linux.c: Re-generated.
3808 * features/microblaze.c: Re-generated.
3809 * features/microblaze-with-stack-protect.c: Re-generated.
3810 * features/mips64-dsp-linux.c: Re-generated.
3811 * features/mips64-linux.c: Re-generated.
3812 * features/mips-dsp-linux.c: Re-generated.
3813 * features/mips-linux.c: Re-generated.
3814 * features/nds32.c: Re-generated.
3815 * features/nios2.c: Re-generated.
3816 * features/nios2-linux.c: Re-generated.
3817 * features/rs6000/powerpc-32.c: Re-generated.
3818 * features/rs6000/powerpc-32l.c: Re-generated.
3819 * features/rs6000/powerpc-403.c: Re-generated.
3820 * features/rs6000/powerpc-403gc.c : Re-generated.
3821 * features/rs6000/powerpc-405.c: Re-generated.
3822 * features/rs6000/powerpc-505.c: Re-generated.
3823 * features/rs6000/powerpc-601.c: Re-generated.
3824 * features/rs6000/powerpc-602.c: Re-generated.
3825 * features/rs6000/powerpc-603.c: Re-generated.
3826 * features/rs6000/powerpc-604.c: Re-generated.
3827 * features/rs6000/powerpc-64.c: Re-generated.
3828 * features/rs6000/powerpc-64l.c: Re-generated.
3829 * features/rs6000/powerpc-7400.c: Re-generated.
3830 * features/rs6000/powerpc-750.c: Re-generated.
3831 * features/rs6000/powerpc-860.c: Re-generated.
3832 * features/rs6000/powerpc-altivec32.c: Re-generated.
3833 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3834 * features/rs6000/powerpc-altivec64.c: Re-generated.
3835 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3836 * features/rs6000/powerpc-cell32l.c: Re-generated.
3837 * features/rs6000/powerpc-cell64l.c: Re-generated.
3838 * features/rs6000/powerpc-e500.c: Re-generated.
3839 * features/rs6000/powerpc-e500l.c: Re-generated.
3840 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3841 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3842 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3843 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3844 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3845 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3846 * features/rs6000/powerpc-vsx32.c: Re-generated.
3847 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3848 * features/rs6000/powerpc-vsx64.c: Re-generated.
3849 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3850 * features/rs6000/rs6000.c: Re-generated.
3851 * features/s390-linux32.c: Re-generated.
3852 * features/s390-linux32v1.c: Re-generated.
3853 * features/s390-linux32v2.c: Re-generated.
3854 * features/s390-linux64.c: Re-generated.
3855 * features/s390-linux64v1.c: Re-generated.
3856 * features/s390-linux64v2.c: Re-generated.
3857 * features/s390-te-linux64.c: Re-generated.
3858 * features/s390-tevx-linux64.c: Re-generated.
3859 * features/s390-vx-linux64.c: Re-generated.
3860 * features/s390x-linux64.c: Re-generated.
3861 * features/s390x-linux64v1.c: Re-generated.
3862 * features/s390x-linux64v2.c: Re-generated.
3863 * features/s390x-te-linux64.c: Re-generated.
3864 * features/s390x-tevx-linux64.c: Re-generated.
3865 * features/s390x-vx-linux64.c: Re-generated.
3866 * features/sparc/sparc32-solaris.c: Re-generated.
3867 * features/sparc/sparc64-solaris.c: Re-generated.
3868 * features/tic6x-c62x.c: Re-generated.
3869 * features/tic6x-c62x-linux.c: Re-generated.
3870 * features/tic6x-c64x.c: Re-generated.
3871 * features/tic6x-c64x-linux.c: Re-generated.
3872 * features/tic6x-c64xp.c: Re-generated.
3873 * features/tic6x-c64xp-linux.c: Re-generated.
3874
35b4818d
YQ
38752017-07-26 Yao Qi <yao.qi@linaro.org>
3876
3877 * i386-linux-tdep.c (i386_linux_read_description): New function.
3878 (i386_linux_core_read_description): Call
3879 i386_linux_read_description.
3880 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3881 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3882 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3883 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3884 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3885 * x86-linux-nat.c (x86_linux_read_description): Call
3886 i386_linux_read_description.
3887
8e2141c6
YQ
38882017-07-26 Yao Qi <yao.qi@linaro.org>
3889
3890 * NEWS: Mention it.
3891 * features/Makefile (%.c: %.xml): Pass the xml file name to
3892 command "maint print c-tdesc".
3893 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3894 name from 'arg'.
3895
b468ff4c
YQ
38962017-07-26 Yao Qi <yao.qi@linaro.org>
3897
3898 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3899 in-class initialization.
3900 (tdesc_create_feature): Call new instead of XCNEW.
3901 (free_target_description): Ue delete.
3902
b9c0e1b4
JB
39032017-07-25 John Baldwin <jhb@FreeBSD.org>
3904
3905 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3906
a04b5337
YQ
39072017-07-25 Yao Qi <yao.qi@linaro.org>
3908
3909 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3910 constant.
3911 (amd64_x32_init_abi): Likewise.
3912 * amd64-tdep.h (amd64_init_abi): Update declaration.
3913 (amd64_x32_init_abi): Likewise.
3914
02ad7fc2
YQ
39152017-07-25 Yao Qi <yao.qi@linaro.org>
3916
3917 PR tdep/21717
3918 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3919 condition for FPSCR.
3920 (arm_linux_store_inferior_registers): Likewise.
3921
b6f48cb0
TT
39222017-07-22 Tom Tromey <tom@tromey.com>
3923
3924 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3925 <syscalls_counts>: Now a std::vector.
3926 (get_catch_syscall_inferior_data): Use "new".
3927 (catch_syscall_inferior_data_cleanup): Use "delete".
3928 (insert_catch_syscall, remove_catch_syscall)
3929 (clear_syscall_counts): Update.
3930
e12c9b7a
TT
39312017-07-22 Tom Tromey <tom@tromey.com>
3932
3933 * break-catch-syscall.c (syscall_catchpoint)
3934 <syscalls_to_be_caught>: Now a std::vector<int>
3935 (~syscall_catchpoint): Remove.
3936 (insert_catch_syscall, remove_catch_syscall)
3937 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3938 (print_mention_catch_syscall, print_recreate_catch_syscall):
3939 Update.
3940 (create_syscall_event_catchpoint): Change type of "filter"
3941 parameter.
3942 (catch_syscall_split_args): Return a std::vector.
3943 (catch_syscall_command_1, catching_syscall_number_1): Update.
3944
4fa8aeac
TT
39452017-07-22 Tom Tromey <tom@tromey.com>
3946
3947 * break-catch-throw.c (struct exception_catchpoint)
3948 <exception_rx>: Now a std::string.
3949 (~exception_catchpoint): Remove.
3950 (print_one_detail_exception_catchpoint): Update.
3951 (handle_gnu_v3_exceptions): Change type of except_rx.
3952 (extract_exception_regexp): Return a std::string.
3953 (catch_exception_command_1): Update.
3954
f746a154
TT
39552017-07-22 Tom Tromey <tom@tromey.com>
3956
3957 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3958 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3959 std::vector.
3960 <catch_all>: Now a bool.
3961 (~signal_catchpoint): Remove.
3962 (signal_catchpoint_insert_location)
3963 (signal_catchpoint_remove_location)
3964 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3965 (signal_catchpoint_print_mention)
3966 (signal_catchpoint_print_recreate)
3967 (signal_catchpoint_explains_signal): Update.
3968 (create_signal_catchpoint): Change type of "filter" and
3969 "catch_all".
3970 (catch_signal_split_args): Return a std::vector. Change type of
3971 "catch_all".
3972 (catch_signal_command): Update.
3973
47e77640
PA
39742017-07-20 Pedro Alves <palves@redhat.com>
3975
3976 * ada-lang.c (ada_language_defn): Make extern.
3977 (_initialize_ada_language): Remove add_language call.
3978 * c-lang.c (c_language_defn, cplus_language_defn)
3979 (asm_language_defn, minimal_language_defn): Make extern.
3980 (_initialize_c_language): Delete.
3981 * completer.c (compare_cstrings): Delete, moved to utils.h.
3982 * d-lang.c (d_language_defn): Make extern.
3983 (_initialize_d_language): Remove add_language calls.
3984 * defs.h (enum language): Add comment.
3985 * f-lang.c (f_language_defn): Make extern.
3986 (_initialize_f_language): Remove add_language call.
3987 * go-lang.c (go_language_defn): Make extern.
3988 (_initialize_go_language): Remove add_language call.
3989 * language.c: Include <algorithm>.
3990 (languages): Redefine as const array.
3991 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3992 (set_language_command): Handle "local". Use for-range loop.
3993 (set_language): Remove loop.
3994 (language_enum): Rewrite.
3995 (language_def, language_str): Remove loops.
3996 (add_language): Delete.
3997 (add_set_language_command): New, based on add_languages.
3998 (skip_language_trampoline): Adjust.
3999 (local_language_defn): Delete.
4000 (language_gdbarch_post_init): Adjust.
4001 (_initialize_language): Remove add_language calls. Call
4002 add_set_language_command.
4003 * language.h (add_language): Delete.
4004 (auto_language_defn)
4005 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4006 (asm_language_defn, c_language_defn, cplus_language_defn)
4007 (d_language_defn, f_language_defn, go_language_defn)
4008 (m2_language_defn, objc_language_defn, opencl_language_defn)
4009 (pascal_language_defn, rust_language_defn): Declare.
4010 * m2-lang.c (m2_language_defn): Make extern.
4011 (_initialize_m2_language): Remove add_language call.
4012 * objc-lang.c (objc_language_defn): Make extern.
4013 (_initialize_objc_language): Remove add_language call.
4014 * opencl-lang.c (opencl_language_defn): Make extern.
4015 (_initialize_opencl_language): Remove add_language call.
4016 * p-lang.c (pascal_language_defn): Make extern.
4017 (_initialize_pascal_language): Delete.
4018 * rust-lang.c (rust_language_defn): Make extern.
4019 (_initialize_rust_language): Delete.
4020 * utils.h (compare_cstrings): New static inline function.
4021
edb0c9cb
PA
40222017-07-20 Pedro Alves <palves@redhat.com>
4023
4024 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4025 (get_var_value): Constify parameters.
4026 (get_int_var_value): Change prototype.
4027 (to_fixed_range_type): Adjust.
4028 * ada-lang.h (get_int_var_value): Change prototype.
4029
a778f165
PA
40302017-07-20 Pedro Alves <palves@redhat.com>
4031
4032 * dwarf2read.c (dw2_lookup_symbol): Use
4033 SYMBOL_MATCHES_SEARCH_NAME.
4034 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4035
42edd901
PA
40362017-07-20 Pedro Alves <palves@redhat.com>
4037
4038 * block.c (block_iter_name_step, block_iter_name_first)
4039 (block_iter_name_next): Delete.
4040 (block_lookup_symbol_primary): Adjust to use
4041 dict_iter_match_first/dict_iter_match_next.
4042 * block.h (block_iter_name_first, block_iter_name_next): Delete
4043 declarations.
4044 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4045 dict_iter_match_first/dict_iter_match_next.
4046
cf325299
PA
40472017-07-20 Pedro Alves <palves@redhat.com>
4048
4049 * cp-support.c (cp_find_first_component_aux): Add missing case for
4050 end of string.
4051
c5ed0576
DB
40522017-07-18 David Blaikie <dblaikie@gmail.com>
4053
4054 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4055 of dwo_cu's dwo_file.
4056
27841e76
YQ
40572017-07-18 Yao Qi <yao.qi@linaro.org>
4058
4059 * remote.c (store_registers_using_G): Remove one line comment.
4060
cfb7e58b
YQ
40612017-07-18 Yao Qi <yao.qi@linaro.org>
4062
4063 * regcache.c (regcache_cpy): Simplify it.
4064 (regcache::cpy_no_passthrough): Remove it.
4065 * regcache.h (cpy_no_passthrough): Remove it.
4066 (regcache_dup, regcache_cpy): Update comments.
4067
386535dd
PA
40682017-07-18 Pedro Alves <palves@redhat.com>
4069
4070 * remote-sim.c (sim_command_completer): Adjust to work with a
4071 completion_tracker instead of a VEC.
4072
c45ec17c
PA
40732017-07-17 Pedro Alves <palves@redhat.com>
4074
4075 * completer.c (complete_source_filenames): New function.
4076 (complete_address_and_linespec_locations): New function.
4077 (location_completer): Use complete_address_and_linespec_locations.
4078 (completion_tracker::build_completion_result): Honor the tracker's
4079 request to suppress append.
4080 * completer.h (completion_tracker::suppress_append_ws)
4081 (completion_tracker::set_suppress_append_ws): New methods.
4082 (completion_tracker::m_suppress_append_ws): New field.
4083 (complete_source_filenames): New declaration.
4084 * linespec.c (linespec_complete_what): New.
4085 (struct ls_parser) <complete_what, completion_word,
4086 completion_quote_char, completion_quote_end, completion_tracker>:
4087 New fields.
4088 (string_find_incomplete_keyword_at_end): New.
4089 (linespec_lexer_lex_string): Record quote char. If in completion
4090 mode, don't throw.
4091 (linespec_lexer_consume_token): Advance the completion word point.
4092 (linespec_lexer_peek_token): Save/restore completion info.
4093 (save_stream_and_consume_token): New.
4094 (set_completion_after_number): New.
4095 (linespec_parse_basic): Set what to complete next depending on
4096 token. Handle function and label completions specially.
4097 (parse_linespec): Disable objc shortcut in completion mode. Set
4098 what to complete next depending on token type. Skip keyword if in
4099 completion mode.
4100 (complete_linespec_component, linespec_complete): New.
4101 * linespec.h (linespec_complete): Declare.
4102
be966d42
PA
41032017-07-17 Pedro Alves <palves@redhat.com>
4104
4105 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4106 Handle 'operator<' / 'operator<<'.
4107
a2459270
PA
41082017-07-17 Pedro Alves <palves@redhat.com>
4109
4110 * completer.c (collect_explicit_location_matches): Handle
4111 MATCH_LABEL.
4112 (convert_explicit_location_to_linespec): New, factored out from
4113 ...
4114 (convert_explicit_location_to_sals): ... this.
4115 (complete_label): New.
4116 (linespec_complete_label, find_label_symbols_in_block): New.
4117 (find_label_symbols): Add completion_mode parameter and adjust to
4118 call find_label_symbols_in_block.
4119 * linespec.h (linespec_complete_label): Declare.
4120
c6756f62
PA
41212017-07-17 Pedro Alves <palves@redhat.com>
4122
4123 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4124 complete_symbol_mode parameter.
4125 * cli/cli-cmds.c (complete_command): Get the completion result out
4126 of the handle_brkchars tracker if used a custom word point.
4127 * completer.c: Include "linespec.h".
4128 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4129 (advance_to_expression_complete_word_point): New.
4130 (completion_tracker::completes_to_completion_word): New.
4131 (complete_files_symbols): Pass down
4132 complete_symbol_mode::EXPRESSION.
4133 (explicit_options, probe_options): New.
4134 (collect_explicit_location_matches): Complete on the
4135 explictit_loc->foo instead of word. Use
4136 linespec_complete_function. Handle MATCH_LINE. Handle offering
4137 keyword and options completions.
4138 (backup_text_ptr): Delete.
4139 (skip_keyword): New.
4140 (complete_explicit_location): Remove 'word' parameter. Add
4141 language, quoted_arg_start and quoted_arg_end parameters.
4142 Rewrite, parsing left to right.
4143 (location_completer): Rewrite.
4144 (location_completer_handle_brkchars): New function.
4145 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4146 (enum complete_line_internal_reason): Adjust comments.
4147 (completion_tracker::discard_completions): New.
4148 (completer_handle_brkchars_func_for_completer): Handle
4149 location_completer.
4150 (gdb_custom_word_point_brkchars)
4151 (gdb_org_rl_basic_quote_characters): New.
4152 (gdb_completion_word_break_characters_throw)
4153 (completion_find_completion_word): Handle trackers that use a
4154 custom word point.
4155 (completion_tracker::advance_custom_word_point_by): New.
4156 (completion_tracker::build_completion_result): Don't rely on
4157 readline appending the quote char.
4158 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4159 use a custom word point.
4160 (gdb_rl_attempted_completion_function): Restore
4161 rl_basic_quote_characters.
4162 * completer.h (class completion_tracker): Extend intro comment.
4163 (completion_tracker::set_quote_char)
4164 (completion_tracker::quote_char)
4165 (completion_tracker::set_use_custom_word_point)
4166 (completion_tracker::use_custom_word_point)
4167 (completion_tracker::custom_word_point)
4168 (completion_tracker::set_custom_word_point)
4169 (completion_tracker::advance_custom_word_point_by)
4170 (completion_tracker::completes_to_completion_word)
4171 (completion_tracker::discard_completions): New methods.
4172 (completion_tracker::m_quote_char)
4173 (completion_tracker::m_use_custom_word_point)
4174 (completion_tracker::m_custom_word_point): New fields.
4175 (advance_to_expression_complete_word_point): Declare.
4176 * f-lang.c (f_collect_symbol_completion_matches): Add
4177 complete_symbol_mode parameter.
4178 * language.h (struct language_defn)
4179 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4180 parameter.
4181 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4182 (linespec_complete_function): New function.
4183 (linespec_lexer_lex_keyword): Adjust.
4184 * linespec.h (linespec_keywords, linespec_complete_function): New
4185 declarations.
4186 * location.c (find_end_quote): New function.
4187 (explicit_location_lex_one): Add explicit_completion_info
4188 parameter. Save quoting info. Don't throw if being called for
4189 completion. Don't handle Ada operators here.
4190 (is_cp_operator, skip_op_false_positives, first_of)
4191 (explicit_location_lex_one_function): New function.
4192 (string_to_explicit_location): Replace 'dont_throw' parameter with
4193 an explicit_completion_info pointer parameter. Handle it. Don't
4194 use explicit_location_lex_one to lex function names. Use
4195 explicit_location_lex_one_function instead.
4196 * location.h (struct explicit_completion_info): New.
4197 (string_to_explicit_location): Replace 'dont_throw' parameter with
4198 an explicit_completion_info pointer parameter.
4199 * symtab.c (default_collect_symbol_completion_matches_break_on):
4200 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4201 (default_collect_symbol_completion_matches)
4202 (collect_symbol_completion_matches): Add complete_symbol_mode
4203 parameter.
4204 (collect_symbol_completion_matches_type): Pass down
4205 complete_symbol_mode::EXPRESSION.
4206 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4207 parameter. Handle LINESPEC mode.
4208 * symtab.h (complete_symbol_mode): New.
4209 (default_collect_symbol_completion_matches_break_on)
4210 (default_collect_symbol_completion_matches)
4211 (collect_symbol_completion_matches)
4212 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4213 parameter.
4214
1d550c82
PA
42152017-07-17 Pedro Alves <palves@redhat.com>
4216
4217 * utils.c (enum class strncmp_iw_mode): New.
4218 (strcmp_iw): Rename to ...
4219 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4220 parameters. Handle them.
4221 (strncmp_iw): New.
4222 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4223 * utils.h (strncmp_iw): Declare.
4224 (strcmp_iw): Move describing comments here.
4225
8090b426
PA
42262017-07-17 Pedro Alves <palves@redhat.com>
4227
4228 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4229 CP_OPERATOR_STR.
4230 * c-typeprint.c (is_type_conversion_operator): Use
4231 CP_OPERATOR_STR.
4232 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4233 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4234 CP_OPERATOR_LEN.
4235 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4236 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4237 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4238 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4239 CP_OPERATOR_STR.
4240 * location.c: Include "cp-support.h".
4241 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4242 CP_OPERATOR_STR.
4243 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4244 CP_OPERATOR_LEN.
4245
6a2c1b87
PA
42462017-07-17 Pedro Alves <palves@redhat.com>
4247
4248 * cli/cli-cmds.c (complete_command): Use a completion tracker
4249 along with completion_find_completion_word for handle_brkchars
4250 phase.
4251 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4252 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4253 (struct gdb_rl_completion_word_info): New.
4254 (gdb_rl_find_completion_word): New.
4255 (completion_find_completion_word): New.
4256 * completer.h (completion_find_completion_word): Declare.
4257
eb3ff9a5
PA
42582017-07-17 Pedro Alves <palves@redhat.com>
4259
4260 * ada-lang.c (symbol_completion_match): Adjust comments.
4261 (symbol_completion_add): Replace vector parameter with
4262 completion_tracker parameter. Use it.
4263 (ada_make_symbol_completion_list): Rename to...
4264 (ada_collect_symbol_completion_matches): ... this. Add
4265 completion_tracker parameter and use it.
4266 (ada_language_defn): Adjust.
4267 * break-catch-syscall.c (catch_syscall_completer): Adjust
4268 prototype and work with completion_tracker instead of VEC.
4269 * breakpoint.c (condition_completer): Adjust prototype and work
4270 with completion_tracker instead of VEC.
4271 * c-lang.c (c_language_defn, cplus_language_defn)
4272 (asm_language_defn, minimal_language_defn): Adjust to renames.
4273 * cli/cli-cmds.c (complete_command): Rework using
4274 completion_tracker. Catch exceptions when completing.
4275 * cli/cli-decode.c (integer_unlimited_completer)
4276 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4277 with completion_tracker instead of VEC.
4278 * command.h (struct completion_tracker): Forward declare.
4279 (completer_ftype, completer_handle_brkchars_ftype): Change
4280 types.
4281 (complete_on_cmdlist, complete_on_enum): Adjust.
4282 * completer.c: Include <algorithm>.
4283 (struct gdb_completer_state): New.
4284 (current_completion): New global.
4285 (readline_line_completion_function): Delete.
4286 (noop_completer, filename_completer)
4287 (filename_completer_handle_brkchars, complete_files_symbols)
4288 (linespec_location_completer): Adjust to work with a
4289 completion_tracker instead of a VEC.
4290 (string_or_empty): New.
4291 (collect_explicit_location_matches): Adjust to work with a
4292 completion_tracker instead of a VEC.
4293 (explicit_location_completer): Rename to ...
4294 (complete_explicit_location): ... this and adjust to work with a
4295 completion_tracker instead of a VEC.
4296 (location_completer): Adjust to work with a completion_tracker
4297 instead of a VEC.
4298 (add_struct_fields): Adjust to work with a completion_list instead
4299 of VEC.
4300 (expression_completer): Rename to ...
4301 (complete_expression): ... this and adjust to work with a
4302 completion_tracker instead of a VEC. Use complete_files_symbols.
4303 (expression_completer): Reimplement on top of complete_expression.
4304 (symbol_completer): Adjust to work with a completion_tracker
4305 instead of a VEC.
4306 (enum complete_line_internal_reason): Add describing comments.
4307 (complete_line_internal_normal_command): Adjust to work with a
4308 completion_tracker instead of a VEC.
4309 (complete_line_internal): Rename to ...
4310 (complete_line_internal_1): ... this and adjust to work with a
4311 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4312 handle_brkchars phase.
4313 (new_completion_tracker): Delete.
4314 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4315 complete_line_internal_1.
4316 (free_completion_tracker): Delete.
4317 (INITIAL_COMPLETION_HTAB_SIZE): New.
4318 (completion_tracker::completion_tracker)
4319 (completion_tracker::~completion_tracker): New.
4320 (maybe_add_completion): Delete.
4321 (completion_tracker::maybe_add_completion)
4322 (completion_tracker::add_completion)
4323 (completion_tracker::add_completions): New.
4324 (throw_max_completions_reached_error): Delete.
4325 (complete_line): Adjust to work with a completion_tracker instead
4326 of a VEC. Don't create a completion_tracker_t or check for max
4327 completions here.
4328 (command_completer, command_completer_handle_brkchars)
4329 (signal_completer, reg_or_group_completer_1)
4330 (reg_or_group_completer, default_completer_handle_brkchars):
4331 Adjust to work with a completion_tracker.
4332 (gdb_completion_word_break_characters_throw): New.
4333 (gdb_completion_word_break_characters): Reimplement.
4334 (line_completion_function): Delete.
4335 (completion_tracker::recompute_lowest_common_denominator)
4336 (expand_preserving_ws)
4337 (completion_tracker::build_completion_result)
4338 (completion_result::completion_result)
4339 (completion_result::completion_result)
4340 (completion_result::~completion_result)
4341 (completion_result::completion_result)
4342 (completion_result::release_match_list, compare_cstrings)
4343 (completion_result::sort_match_list)
4344 (completion_result::reset_match_list)
4345 (gdb_rl_attempted_completion_function_throw)
4346 (gdb_rl_attempted_completion_function): New.
4347 * completer.h (completion_list, struct completion_result)
4348 (class completion_tracker): New.
4349 (complete_line): Add completion_tracker parameter.
4350 (readline_line_completion_function): Delete.
4351 (gdb_rl_attempted_completion_function): New.
4352 (noop_completer, filename_completer, expression_completer)
4353 (location_completer, symbol_completer, command_completer)
4354 (signal_completer, reg_or_group_completer): Update prototypes.
4355 (completion_tracker_t, new_completion_tracker)
4356 (make_cleanup_free_completion_tracker): Delete.
4357 (enum maybe_add_completion_enum): Delete.
4358 (maybe_add_completion): Delete.
4359 (throw_max_completions_reached_error): Delete.
4360 * corefile.c (complete_set_gnutarget): Adjust to work with a
4361 completion_tracker instead of a VEC.
4362 * cp-abi.c (cp_abi_completer): Adjust to work with a
4363 completion_tracker instead of a VEC.
4364 * d-lang.c (d_language_defn): Adjust.
4365 * disasm.c (disassembler_options_completer): Adjust to work with a
4366 completion_tracker instead of a VEC.
4367 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4368 (f_collect_symbol_completion_matches): ... this. Adjust to work
4369 with a completion_tracker instead of a VEC.
4370 (f_language_defn): Adjust.
4371 * go-lang.c (go_language_defn): Adjust.
4372 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4373 Adjust to work with a completion_tracker instead of a VEC.
4374 * infrun.c (handle_completer): Likewise.
4375 * interps.c (interpreter_completer): Likewise.
4376 * interps.h (interpreter_completer): Likewise.
4377 * language.c (unknown_language_defn, auto_language_defn)
4378 (local_language_defn): Adjust.
4379 * language.h (language_defn::la_make_symbol_completion_list):
4380 Rename to ...
4381 (language_defn::la_collect_symbol_completion_matches): ... this
4382 and adjust to work with a completion_tracker instead of a VEC.
4383 * m2-lang.c (m2_language_defn): Adjust.
4384 * objc-lang.c (objc_language_defn): Adjust.
4385 * opencl-lang.c (opencl_language_defn): Adjust.
4386 * p-lang.c (pascal_language_defn): Adjust.
4387 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4388 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4389 with a completion_tracker.
4390 * rust-lang.c (rust_language_defn): Adjust.
4391 * symtab.c (free_completion_list, do_free_completion_list)
4392 (return_val, completion_tracker): Delete.
4393 (completion_list_add_name, completion_list_add_symbol)
4394 (completion_list_add_msymbol, completion_list_objc_symbol)
4395 (completion_list_add_fields, add_symtab_completions): Add
4396 completion_tracker parameter and use it.
4397 (default_make_symbol_completion_list_break_on_1): Rename to...
4398 (default_collect_symbol_completion_matches_break_on): ... this.
4399 Add completion_tracker parameter and use it instead of allocating
4400 a completion tracker here.
4401 (default_make_symbol_completion_list_break_on): Delete old
4402 implementation.
4403 (default_make_symbol_completion_list): Delete.
4404 (default_collect_symbol_completion_matches): New.
4405 (make_symbol_completion_list): Delete.
4406 (collect_symbol_completion_matches): New.
4407 (make_symbol_completion_type): Rename to ...
4408 (collect_symbol_completion_matches_type): ... this. Add
4409 completion_tracker parameter and use it instead of VEC.
4410 (make_file_symbol_completion_list_1): Rename to...
4411 (collect_file_symbol_completion_matches): ... this. Add
4412 completion_tracker parameter and use it instead of VEC.
4413 (make_file_symbol_completion_list): Delete.
4414 (add_filename_to_list): Use completion_list instead of a VEC.
4415 (add_partial_filename_data::list): Now a completion_list.
4416 (make_source_files_completion_list): Work with a completion_list
4417 instead of a VEC.
4418 * symtab.h: Include "completer.h".
4419 (default_make_symbol_completion_list_break_on)
4420 (default_make_symbol_completion_list, make_symbol_completion_list)
4421 (make_symbol_completion_type, make_file_symbol_completion_list)
4422 (make_source_files_completion_list): Delete.
4423 (default_collect_symbol_completion_matches_break_on)
4424 (default_collect_symbol_completion_matches)
4425 (collect_symbol_completion_matches)
4426 (collect_symbol_completion_matches_type)
4427 (collect_file_symbol_completion_matches)
4428 (make_source_files_completion_list): New.
4429 * top.c (init_main): Don't install a rl_completion_entry_function
4430 hook. Install a rl_attempted_completion_function hook instead.
4431 * tui/tui-layout.c (layout_completer): Adjust to work with a
4432 completion_tracker.
4433 * tui/tui-regs.c (tui_reggroup_completer):
4434 * tui/tui-win.c (window_name_completer, focus_completer)
4435 (winheight_completer): Adjust to work with a completion_tracker.
4436 * value.c: Include "completer.h".
4437 (complete_internalvar): Adjust to work with a completion_tracker.
4438 * value.h (complete_internalvar): Likewise.
4439
6e1dbf8c
PA
44402017-07-17 Pedro Alves <palves@redhat.com>
4441
4442 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4443 renames.
4444 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4445 comments to completer_ftype's declaration.
4446 <completer_handle_brkchars>: Change type to
4447 completer_handle_brkchars_ftype.
4448 * command.h (completer_ftype): Add describing comment and give
4449 names to parameters.
4450 (completer_ftype_void): Rename to ...
4451 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4452 (set_cmd_completer_handle_brkchars): Adjust.
4453 * completer.c (filename_completer_handle_brkchars): New function.
4454 (complete_line_internal_normal_command): New function, factored
4455 out from ...
4456 (complete_line_internal): ... here.
4457 (command_completer_handle_brkchars)
4458 (default_completer_handle_brkchars)
4459 (completer_handle_brkchars_func_for_completer): New functions.
4460 * completer.h (set_gdb_completion_word_break_characters): Delete
4461 declaration.
4462 (completer_handle_brkchars_func_for_completer): New declaration.
4463 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4464 completer_handle_brkchars_func_for_completer.
4465
78b13106
PA
44662017-07-17 Pedro Alves <palves@redhat.com>
4467
4468 * completer.c (symbol_completer): New function, based on
4469 make_symbol_completion_list_fn.
4470 * completer.h (symbol_completer): New declaration.
4471 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4472 * python/py-cmd.c (completers): Adjust.
4473 * symtab.c (make_symbol_completion_list_fn): Delete.
4474 * symtab.h (make_symbol_completion_list_fn): Delete.
4475 * cli/cli-decode.c (add_cmd): Adjust.
4476
bbf2f4df
PA
44772017-07-17 Pedro Alves <palves@redhat.com>
4478
4479 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4480 * dwarf2read.c: Include "filename-seen-cache.h".
4481 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4482 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4483 * filename-seen-cache.c: New file.
4484 * filename-seen-cache.h: New file.
4485 * symtab.c: Include "filename-seen-cache.h".
4486 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4487 (create_filename_seen_cache, clear_filename_seen_cache)
4488 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4489 to filename-seen-cache.h/filename-seen-cache.c.
4490 (output_source_filename, sources_info)
4491 (maybe_add_partial_symtab_filename)
4492 (make_source_files_completion_list): Adjust to use
4493 filename_seen_cache.
4494
330cdd98
PA
44952017-07-17 Pedro Alves <palves@redhat.com>
4496
4497 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4498 fields.
4499 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4500 dwarf2_debug_sections*)): New.
4501 (dwarf2_per_objfile::dwarf2_per_objfile(const
4502 dwarf2_per_objfile&)): Declare as deleted.
4503 (dwarf2_per_objfile::operator=): Declare as deleted.
4504 (dwarf2_per_objfile::dwarf2_per_objfile)
4505 (dwarf2_per_objfile::~dwarf2_per_objfile)
4506 (dwarf2_per_objfile::free_cached_comp_units): New.
4507 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4508 ctor. Call dwarf2_per_objfile's ctor manually.
4509 (dwarf2_locate_sections): Deleted/refactored as ...
4510 (dwarf2_per_objfile::locate_sections): ... this new method.
4511 (free_cached_comp_units): Defer to
4512 dwarf2_per_objfile::free_cached_comp_units.
4513 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4514
8880f2a9
TT
45152017-07-14 Tom Tromey <tom@tromey.com>
4516
4517 PR rust/21764:
4518 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4519 parameter.
4520 <UNOP_SIZEOF>: Split into separate case.
4521 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4522
65547233
TT
45232017-07-14 Tom Tromey <tom@tromey.com>
4524
4525 PR rust/21763:
4526 * symtab.c (symbol_matches_domain): Add language_rust to special
4527 case.
4528 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4529 treat LOC_TYPEDEF symbols as variables.
4530
8f14146e
PA
45312017-07-14 Pedro Alves <palves@redhat.com>
4532
4533 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4534 symtabs matching all symtabs with SRCFILE as file name instead of
4535 only considering the first hit, with lookup_symtab.
4536
2347965c
SM
45372017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4538
4539 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4540 operator_name parameters.
4541 (gen_expr): Update function call.
4542
40f4af28
SM
45432017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4544
4545 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4546 parameter.
4547 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4548 Likewise.
4549 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4550 parameter, use agent_expr::gdbarch instead, update function
4551 calls.
4552 (locexpr_tracepoint_var_ref): Likewise.
4553 (loclist_tracepoint_var_ref): Likewise.
4554 * ax-gdb.c (gen_trace_static_fields): Likewise.
4555 (gen_traced_pop): Likewise.
4556 (gen_frame_args_address): Likewise.
4557 (gen_frame_locals_address): Likewise.
4558 (gen_var_ref): Likewise.
4559 (gen_struct_ref_recursive): Likewise.
4560 (gen_static_field): Likewise.
4561 (gen_maybe_namespace_elt): Likewise.
4562 (gen_expr): Likewise.
4563 (gen_trace_for_var): Likewise.
4564 (gen_trace_for_expr): Likewise.
4565 (gen_trace_for_return_address): Likewise.
4566
053f8057
SM
45672017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4568
4569 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4570 parameter.
4571 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4572
6661ad48
SM
45732017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4574
4575 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4576 from ax, update calls.
4577 (gen_usual_arithmetic): Likewise.
4578 (gen_integral_promotions): Likewise.
4579 (gen_bitfield_ref): Likewise.
4580 (gen_primitive_field): Likewise.
4581 (gen_struct_ref_recursive): Likewise.
4582 (gen_struct_ref): Likewise.
4583 (gen_maybe_namespace_elt): Likewise.
4584 (gen_struct_elt_for_reference): Likewise.
4585 (gen_namespace_elt): Likewise.
4586 (gen_aggregate_elt_ref): Likewise.
4587 (gen_expr): Get gdbarch from ax, update calls.
4588 (gen_expr_binop_rest): Likewise.
4589
c55a47e7
PA
45902017-07-13 Pedro Alves <palves@redhat.com>
4591
4592 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4593 as default tdesc.
4594 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4595 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4596 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4597 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4598 tdep.
4599 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4600 Get final tdesc from the tdep.
4601 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4602 default tdesc.
4603 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4604 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4605 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4606 Use it as default tdesc.
4607 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4608 down to amd_init_abi. No longer handle fallback tdesc here.
4609 * amd64-tdep.h (tdesc_x32): Declare.
4610 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4611 parameter.
4612 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4613 as default tdesc.
4614
55efceab
AA
46152017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4616
4617 * s390-linux-tdep.c (s390_process_record): Add support for
4618 instructions new in arch12.
4619
0aa37b65
JB
46202017-07-11 John Baldwin <jhb@FreeBSD.org>
4621
4622 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4623 PT_GETFSBASE and PT_GETGSBASE.
4624 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4625 PT_SETGSBASE.
4626
48aeef91
JB
46272017-07-11 John Baldwin <jhb@FreeBSD.org>
4628
4629 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4630 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4631 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4632 those rules.
4633 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4634 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4635 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4636 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4637 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4638 * features/i386/amd64.xml: Add 64bit-segments.xml.
4639 * features/i386/amd64-avx-avx512.c: Regenerated.
4640 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4641 * features/i386/amd64-avx-mpx.c: Regenerated.
4642 * features/i386/amd64-avx.c: Regenerated.
4643 * features/i386/amd64-mpx.c: Regenerated.
4644 * features/i386/amd64.c: Regenerated.
4645 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4646 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4647 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4648 * regformats/i386/amd64-avx.dat: Regenerated.
4649 * regformats/i386/amd64-mpx.dat: Regenerated.
4650 * regformats/i386/amd64.dat: Regenerated.
4651
77c501bc
YQ
46522017-07-10 Yao Qi <yao.qi@linaro.org>
4653
4654 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4655 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4656
6dc8d757
AK
46572017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4658
4659 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4660 unsetenv.
4661 * gnulib/aclocal.m4: Regenerate.
4662 * gnulib/config.in: Regenerate.
4663 * gnulib/configure: Regenerate.
4664 * gnulib/import/Makefile.am: Regenerate.
4665 * gnulib/import/Makefile.in: Regenerate.
4666 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4667 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4668 * gnulib/import/m4/environ.m4: New file.
4669 * gnulib/import/m4/setenv.m4: New file.
4670 * gnulib/import/setenv.c: New file.
4671 * gnulib/import/unsetenv.c: New file.
4672
266934d1
SM
46732017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4674
4675 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4676 address when op is DW_OP_addr.
4677
03278692
TT
46782017-07-09 Tom Tromey <tom@tromey.com>
4679
4680 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4681 check and apply to outer type.
4682
4b654465
JB
46832017-07-07 John Baldwin <jhb@FreeBSD.org>
4684
4685 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4686 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4687 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4688 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4689
2af9fc44
JB
46902017-07-07 John Baldwin <jhb@FreeBSD.org>
4691
4692 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4693
382b69bb
JB
46942017-07-07 John Baldwin <jhb@FreeBSD.org>
4695
4696 * corelow.c (get_core_siginfo): Remove.
4697 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4698 instead of get_core_siginfo.
4699 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4700 * gdbarch.h: Re-generate.
4701 * gdbarch.c: Re-generate.
4702 * linux-tdep.c (linux_core_xfer_siginfo): New.
4703 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4704
6e5eab33
JB
47052017-07-07 John Baldwin <jhb@FreeBSD.org>
4706
4707 * corelow.c (thread_section_name): Move to ...
4708 * gdbcore.h (thread_section_name): ... here.
4709
929edea9
JB
47102017-07-07 John Baldwin <jhb@FreeBSD.org>
4711
4712 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4713 (struct siginfo32): New.
4714 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4715 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4716 via ptrace(PT_LWPINFO).
4717
762c974a
JB
47182017-07-07 John Baldwin <jhb@FreeBSD.org>
4719
4720 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4721 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4722 (fbsd_get_siginfo_type): New.
4723 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4724 (_initialize_fbsd_tdep): New.
4725
33c5cd75
DB
47262017-07-06 David Blaikie <dblaikie@gmail.com>
4727
4728 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4729 a singular dwo_unit*) to support multiple CUs in the same way that
4730 multiple TUs are supported.
4731 (create_cus_hash_table): Replace create_dwo_cu with a function for
4732 parsing multiple CUs from a DWO file.
4733 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4734 create_dwo_cu.
4735 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4736 htab_find, rather than comparing the signature to a singleton CU in
4737 the dwo_file.
4738
8455d262
PA
47392017-07-06 Pedro Alves <palves@redhat.com>
4740
4741 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4742
4da3eb35
PA
47432017-07-04 Pedro Alves <palves@redhat.com>
4744
4745 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4746 * gdbtypes.h (TYPE_STATIC): Delete.
4747 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4748 is_synchronized, is_native>: Delete.
4749 <dummy>: Bump.
4750 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4751 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4752 (TYPE_FN_FIELD_ABSTRACT): Delete.
4753
5bfd255c
SM
47542017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4755
4756 * buffer.h (buffer_finish): Fix spelling mistakes.
4757
25c54127
EZ
47582017-07-01 Eli Zaretskii <eliz@gnu.org>
4759
4760 * .dir-locals.el: Automatically switch to C-style comments in
4761 versions of Emacs that support the feature.
4762
dc4bde35
SDJ
47632017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4764 Pedro Alves <palves@redhat.com>
4765
4766 PR cli/21688
4767 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4768 (process_next_line): New variable 'inline_cmd'.
4769 Adjust 'if' clauses for "python", "compile" and "guile" to use
4770 'command_name_equals' and check for '!inline_cmd'.
4771
51ed89aa
SDJ
47722017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4773
4774 PR cli/21688
4775 * cli/cli-script.c (command_name_equals_not_inline): New function.
4776 (process_next_line): Adjust 'if' clauses for "python", "compile"
4777 and "guile" to use command_name_equals_not_inline.
4778
eb17d413
PA
47792017-06-29 Pedro Alves <palves@redhat.com>
4780
4781 * completer.c (expression_completer): Call
4782 linespec_location_completer instead of location_completer.
4783
195bcdd5
PA
47842017-06-29 Pedro Alves <palves@redhat.com>
4785
4786 * completer.c (expression_completer): Remove code that recomputes
4787 'text' from 'word'.
4788
adc764e7
YQ
47892017-06-29 Yao Qi <yao.qi@linaro.org>
4790
4791 * regformats/regdat.sh: Generate code with
4792 "ifndef IN_PROCESS_AGENT".
4793
6e75794e
PA
47942017-06-28 Pedro Alves <palves@redhat.com>
4795
4796 * command.h: Include "common/scoped_restore.h".
4797
bc491f2e
YQ
47982017-06-28 Yao Qi <yao.qi@linaro.org>
4799
4800 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4801 instead of obstack_grow.
4802
41664b45
DG
48032017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4804
4805 PR gdb/21337
4806 * symfile.c (reread_symbols): Call objfiles_changed just before
4807 read_symbols.
4808
6da67eb1
PA
48092017-06-27 Pedro Alves <palves@redhat.com>
4810
4811 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4812 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4813 (completion_list_add_symbol, completion_list_add_msymbol):
4814 ... these new functions.
4815 (add_symtab_completions)
4816 (default_make_symbol_completion_list_break_on_1): Adjust.
4817
23732b1e
PA
48182017-06-27 Pedro Alves <palves@redhat.com>
4819
4820 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4821 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4822 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4823 dtor.
4824 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4825 'storage_obstack' field an auto_obstack. In-class initialize all
4826 non-bitfield fields. Make minsyms_read bool.
4827 * symfile.c (read_symbols): Adjust.
4828
a4d1e79a
AH
48292017-06-27 Alan Hayward <alan.hayward@arm.com>
4830
4831 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4832 (gdbsim_store_register): Likewise.
4833
8268c778
PA
48342017-06-27 Pedro Alves <palves@redhat.com>
4835
4836 * c-exp.y (name_obstack): Now an auto_obstack.
4837 (yylex): Use auto_obstack::clear.
4838 (c_parse): Use auto_obstack::clear instead of reinitializing and
4839 freeing the obstack.
4840 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4841 * d-exp.y (name_obstack): Now an auto_obstack.
4842 (yylex): Use auto_obstack::clear.
4843 (d_parse): Use auto_obstack::clear instead of reinitializing and
4844 freeing the obstack.
4845 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4846 auto_obstack.
4847 * dwarf2read.c (create_addrmap_from_index)
4848 (dwarf2_build_psymtabs_hard)
4849 (update_enumeration_type_from_children): Likewise.
4850 * gdb_obstack.h (auto_obstack): New type.
4851 * go-exp.y (name_obstack): Now an auto_obstack.
4852 (build_packaged_name): Use auto_obstack::clear.
4853 (go_parse): Use auto_obstack::clear instead of reinitializing and
4854 freeing the obstack.
4855 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4856 auto_obstack.
4857 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4858 * rust-exp.y (work_obstack): Now an auto_obstack.
4859 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4860 reinitializing and freeing the obstack.
4861 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4862 (host_char_to_target): Use auto_obstack.
4863 * utils.h (make_cleanup_obstack_free): Delete declaration.
4864 * valprint.c (generic_emit_char, generic_printstr): Use
4865 auto_obstack.
4866
db665f42
SM
48672017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4868
4869 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4870 thread.
4871 (darwin_init_thread_list): Don't update dummy thread.
4872 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4873
873c0814
SM
48742017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4875
4876 * record-full.c (netorder16): Remove.
4877
8b5a7a6e
SM
48782017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4879
4880 * common/diagnostics.h: Define macros for GCC.
4881 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4882 * common/vec.h: Include diagnostics.h.
4883 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4884 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4885 warning.
4886
d1435379
SM
48872017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4888
4889 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4890 New macro.
4891 * ada-lex.l: Ignore deprecated register warnings.
4892
cc75e0fd
SM
48932017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4896 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4897
07809eaf
SM
48982017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4899
4900 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4901 its own line.
4902
f076f034
SM
49032017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4904
4905 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4906
0dd5cbc5
AH
49072017-06-23 Alan Hayward <alan.hayward@arm.com>
4908
4909 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4910 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4911 (xtensa_register_read_masked): Likewise.
4912
d4c6ce5b
SDJ
49132017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4914
4915 * common/environ.c (gdb_environ::unset): Update comment.
4916
16892a03
AH
49172017-06-22 Alan Hayward <alan.hayward@arm.com>
4918
4919 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4920 registers.
4921
d7dcbefc
AH
49222017-06-22 Alan Hayward <alan.hayward@arm.com>
4923
4924 * record-full.c (record_full_exec_insn): Use byte_vector.
4925
b30ff123
YQ
49262017-06-22 Yao Qi <yao.qi@linaro.org>
4927
4928 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4929 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4930
4fa847d7
AH
49312017-06-22 Alan Hayward <alan.hayward@arm.com>
4932
4933 * remote.c (cached_reg): Move from here...
4934 * regcache.h (cached_reg): ...to here.
4935 * python/py-unwind.c (struct reg_info): Remove.
4936 (cached_frame_info): Use cached_reg_t.
4937 (pyuw_prev_register): Likewise.
4938 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4939 (pyuw_dealloc_cache): Free all registers.
4940
f4906a9a
PA
49412017-06-22 Pedro Alves <palves@redhat.com>
4942 Simon Marchi <simon.marchi@ericsson.com>
4943
4944 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4945 warning.
4946 * common/diagnostics.h: New file.
4947
b45a1208
PA
49482017-06-22 Pedro Alves <palves@redhat.com>
4949
4950 * common/agent.h: Add include guards.
4951
e4da2c61
SM
49522017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4953
4954 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4955 talk about addressable units instead of bytes.
4956
96160d60
SDJ
49572017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4958
4959 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4960 of '::const_iterator'.
4961
9a6c7d9c
SDJ
49622017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4963
4964 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4965 'unittests/environ-selftests.c'.
4966 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4967 * charset.c (find_charset_names): Declare object 'iconv_env'.
4968 Update code to use 'iconv_env' object. Remove call to
4969 'free_environ'.
4970 * common/environ.c: Include <utility>.
4971 (make_environ): Delete function.
4972 (free_environ): Delete function.
4973 (gdb_environ::clear): New function.
4974 (gdb_environ::operator=): New function.
4975 (gdb_environ::get): Likewise.
4976 (environ_vector): Delete function.
4977 (set_in_environ): Delete function.
4978 (gdb_environ::set): New function.
4979 (unset_in_environ): Delete function.
4980 (gdb_environ::unset): New function.
4981 (gdb_environ::envp): Likewise.
4982 * common/environ.h: Include <vector>.
4983 (struct gdb_environ): Delete; transform into...
4984 (class gdb_environ): ... this class.
4985 (free_environ): Delete prototype.
4986 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4987 environ_vector): Likewise.
4988 * infcmd.c (run_command_1): Update code to call
4989 'envp' from 'gdb_environ' class.
4990 (environment_info): Update code to call methods from 'gdb_environ'
4991 class.
4992 (unset_environment_command): Likewise.
4993 (path_info): Likewise.
4994 (path_command): Likewise.
4995 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4996 (inferior::inferior): Initialize 'environment' using the host's
4997 information.
4998 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4999 Include "environ.h".
5000 (class inferior) <environment>: Change type from 'struct
5001 gdb_environ' to 'gdb_environ'.
5002 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5003 methods from 'gdb_environ' class.
5004 * solib.c (solib_find_1): Likewise
5005 * unittests/environ-selftests.c: New file.
5006
75c554cf
YQ
50072017-06-20 Yao Qi <yao.qi@linaro.org>
5008
5009 * features/i386/i386-linux.xml: Exchange the order of including
5010 32bit-linux.xml and 32bit-sse.xml.
5011 * features/i386/i386-linux.c: Regenerated.
5012
72ddacb7
YQ
50132017-06-20 Yao Qi <yao.qi@linaro.org>
5014
5015 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5016 Delete copy ctor and assignment operator.
5017 (tdesc_type): Likewise.
5018 (tdesc_feature): Likewise.
5019 (tdesc_free_reg): Remove.
5020 (tdesc_create_reg): Use new.
5021 (tdesc_free_type): Remove.
5022 (tdesc_create_vector): Use new.
5023 (tdesc_create_union): Likewise.
5024 (tdesc_create_flags): Likewise.
5025 (tdesc_create_enum): Likewise.
5026 (tdesc_free_feature): Delete.
5027 (free_target_description): Use delete.
5028
325c9fd4
JB
50292017-06-19 John Baldwin <jhb@FreeBSD.org>
5030
5031 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5032 registers.
5033
16b7a719
PA
50342017-06-19 Pedro Alves <palves@redhat.com>
5035
5036 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5037 after gdb::unlinker.
5038
1c8e01c9
SDJ
50392017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5040
5041 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5042 gdb_environ to access an environment variable.
5043
ffce45d2
TP
50442017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5045
5046 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5047 gdb_byte*.
5048
1d4fbac9
SM
50492017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5050
5051 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5052
8465943a
SM
50532017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5054
5055 * configure: Re-generate.
5056 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5057
3e019bdc
SM
50582017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5059
5060 * configure: Re-generate.
5061 * warning.m4: Pass -Werror to compiler when checking for
5062 supported warning flags.
5063
cf0dd6f0
SM
50642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5065
5066 * Makefile.in (COMPILE.pre): Add "-x c++".
5067
6f98355c
YQ
50682017-06-16 Alan Hayward <alan.hayward@arm.com>
5069 Pedro Alves <palves@redhat.com>
5070 Yao Qi <yao.qi@linaro.org>
5071
5072 * defs.h (RequireLongest): New.
5073 (extract_integer): Declare function template.
5074 (extract_signed_integer): Remove the declaration, but define it
5075 static inline.
5076 (extract_unsigned_integer): Likewise.
5077 (store_integer): Declare function template.
5078 (store_signed_integer): Remove the declaration, but define it
5079 static inline.
5080 (store_unsigned_integer): Likewise.
5081 * findvar.c (extract_integer): New function template.
5082 (extract_signed_integer): Remove.
5083 (extract_unsigned_integer): Remove.
5084 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5085 instantiations.
5086 (store_integer): New function template.
5087 (store_signed_integer): Remove.
5088 (store_unsigned_integer): Remove.
5089 (store_integer): Explicit instantiations.
5090 * regcache.c (regcache_raw_read_signed): Update.
5091 (regcache::raw_read): New function.
5092 (regcache::raw_read_signed): Remove.
5093 (regcache::raw_read_unsigned): Remove.
5094 (regcache_raw_read_unsigned): Update.
5095 (regcache_raw_write_unsigned): Update.
5096 (regcache::raw_write_signed): Remove.
5097 (regcache::raw_write): New function.
5098 (regcache_cooked_read_signed): Update.
5099 (regcache::raw_write_unsigned): Remove.
5100 (regcache::cooked_read_signed): Remove.
5101 (regcache_cooked_read_unsigned): Update.
5102 (regcache::cooked_read_unsigned): Remove.
5103 (regcache_cooked_write_signed): Update.
5104 (regcache_cooked_write_unsigned): Update.
5105 * regcache.h (regcache) <raw_read_signed>: Remove.
5106 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5107 <raw_read, raw_write>: New.
5108 <cooked_read_signed, cooked_write_signed>: Remove.
5109 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5110 <cooked_read, cooked_write>: New.
5111 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5112 (sh64_pseudo_register_write): Update.
5113
a87dc45a
AK
51142017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5115
5116 * arc-tdep.c (arc_disassembler_options): New variable.
5117 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5118 of default_print_insn.
5119 (arc_delayed_print_insn): Set info->section when needed,
5120 use default_print_insn to retrieve a disassembler.
5121
45159d6a
SDJ
51222017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5123
5124 PR gdb/21574
5125 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5126 to mention $SHELL and startup-with-shell.
5127
b46c4cf0
MF
51282017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5129
5130 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5131
6394c606
YQ
51322017-06-14 Yao Qi <yao.qi@linaro.org>
5133
5134 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5135 default_print_insn instead of print_insn_aarch64.
5136 * arm-tdep.c (gdb_print_insn_arm): Call
5137 default_print_insn instead of print_insn_big_arm
5138 and print_insn_little_arm.
5139 * i386-tdep.c (i386_print_insn): Call default_print_insn
5140 instead of print_insn_i386.
5141 * ia64-tdep.c (ia64_print_insn): Call
5142 default_print_insn instead of print_insn_ia64.
5143 * mips-tdep.c (gdb_print_insn_mips): Call
5144 default_print_insn instead of print_insn_big_mips
5145 and print_insn_little_mips.
5146 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5147 instead of print_insn_spu.
5148
d5722aa2
PA
51492017-06-14 Pedro Alves <palves@redhat.com>
5150
5151 * ada-lang.c: Include "common/byte-vector.h".
5152 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5153 * charset.c (wchar_iterator::iterate): Resize the vector instead
5154 of reserving it.
5155 * common/byte-vector.h: Include "common/def-vector.h".
5156 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5157 * cli/cli-dump.c: Include "common/byte-vector.h".
5158 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5159 * common/byte-vector.h: New file.
5160 * common/def-vector.h: New file.
5161 * common/default-init-alloc.h: New file.
5162 * dwarf2loc.c: Include "common/byte-vector.h".
5163 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5164 instead of reserving it.
5165 * dwarf2read.c: Include "common/byte-vector.h".
5166 (data_buf::m_vec): Now a gdb::byte_vector.
5167 * gdb_regex.c: Include "common/def-vector.h".
5168 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5169 * mi/mi-main.c: Include "common/byte-vector.h".
5170 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5171 * printcmd.c: Include "common/byte-vector.h".
5172 (print_scalar_formatted): Use gdb::byte_vector.
5173 * valprint.c: Include "common/byte-vector.h".
5174 (maybe_negate_by_bytes, print_decimal_chars): Use
5175 gdb::byte_vector.
5176
01ec7a27
SM
51772017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5178
5179 * darwin-nat.c: Include "nat/fork-inferior.h".
5180
848d9074
SM
51812017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5182
5183 * configure.nat: Factor out Darwin bits that are not
5184 architecture-specific. Add fork-inferior.o.
5185
3b912944
SM
51862017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5187
5188 * configure.nat: Factor out AIX bits that are not
5189 architecture-specific. Add fork-inferior.o.
5190
55acdf22
AA
51912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5192
5193 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5194 (read_pieced_value, write_pieced_value): ...here. Reduce to
5195 wrappers that just call rw_pieced_value.
5196
f65e2044
AA
51972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5198
5199 * dwarf2loc.c (write_pieced_value): When writing the data for a
5200 memory piece, use write_memory_with_notification instead of
5201 write_memory.
5202
23f945bf
AA
52032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5204
5205 * valops.c (read_value_memory): Change embedded_offset to
5206 represent a bit offset instead of a byte offset.
5207 * value.h (read_value_memory): Adjust comment.
5208
f236533e
AA
52092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5210
5211 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5212 dest_offset_bits and source_offset_bits.
5213 (write_pieced_value): Likewise.
5214
65d84b76
AA
52152017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5216
5217 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5218 given by DW_OP_bit_piece.
5219 (write_pieced_value): Likewise.
5220
242d31ab
AA
52212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5222
5223 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5224 some other preparations to the places where sufficient information
5225 is available.
5226 (write_pieced_value): Likewise.
5227
03c8af18
AA
52282017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5229
5230 * dwarf2loc.c (bits_to_bytes): New function.
5231 (read_pieced_value): Fix offset calculations for register pieces
5232 on big-endian targets.
5233 (write_pieced_value): Likewise.
5234
840989c1
AA
52352017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5236
5237 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5238 (write_pieced_value): Likewise.
5239
359b19bb
AA
52402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5241
5242 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5243 transfer the source value's least significant bits, instead of its
5244 lowest-addressed ones. Rename type_len to max_offset.
5245 (read_pieced_value): Mirror above changes to write_pieced_value as
5246 applicable.
5247
07c9ca3b
AA
52482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5249
5250 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5251 truncate full bytes from dest_offset_bits before using it as an
5252 offset into the buffer.
5253
f1cc9874
AA
52542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5255
5256 * dwarf2loc.c (write_pieced_value): Include transfer size in
5257 byte-wise check.
5258
cdaac320
AA
52592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5260
5261 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5262 calculation of this_size.
5263
af547a96
AA
52642017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5265
5266 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5267 when targeting a bit-field.
5268 (write_pieced_value): Likewise.
5269
ddd7882a
AA
52702017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5271
5272 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5273 (allocate_piece_closure): Drop addr_size parameter.
5274 (dwarf2_evaluate_loc_desc_full): Adjust call to
5275 allocate_piece_closure.
5276
e9352324
AA
52772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5278
5279 PR gdb/21226
5280 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5281 the LSB end, independent of endianness.
5282
d5d1163e
AA
52832017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5284
5285 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5286 size capping.
5287
032bb6ea
YQ
52882017-06-13 Yao Qi <yao.qi@linaro.org>
5289
5290 * mips-linux-nat.c: Move include features/mips*-linux.c to
5291 mips-linux-tdep.c.
5292 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5293 to mips-linux-tdep.c.
5294 * mips-linux-tdep.c: Include features/mips*-linux.c
5295 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5296 functions.
5297 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5298 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5299 (tdesc_mips64_dsp_linux): Declare.
5300
f12f6bad
TT
53012017-06-12 Tom Tromey <tom@tromey.com>
5302
5303 * valprint.h (val_print_type_code_int): Remove.
5304 * valprint.c (generic_val_print_int): Always call
5305 val_print_scalar_formatted.
5306 (val_print_type_code_int): Remove.
5307 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5308 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5309 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5310 * ada-valprint.c (ada_val_print_num): Use
5311 val_print_scalar_formatted.
5312
d9109c80
TT
53132017-06-12 Tom Tromey <tom@tromey.com>
5314
5315 * printcmd.c (print_scalar_formatted): Unify the two switches.
5316 Don't convert scalars to LONGEST.
5317
4ac0cb1c
TT
53182017-06-12 Tom Tromey <tom@tromey.com>
5319
5320 PR exp/16225:
5321 * valprint.h (print_decimal_chars): Update.
5322 * valprint.c (maybe_negate_by_bytes): New function.
5323 (print_decimal_chars): Add "is_signed" argument.
5324 * printcmd.c (print_scalar_formatted): Update.
5325
30a25466
TT
53262017-06-12 Tom Tromey <tom@tromey.com>
5327
5328 PR exp/16225:
5329 * valprint.h (print_binary_chars, print_hex_chars): Update.
5330 * valprint.c (val_print_type_code_int): Update.
5331 (print_binary_chars): Add "zero_pad" argument.
5332 (emit_octal_digit): New function.
5333 (print_octal_chars): Don't zero-pad.
5334 (print_decimal_chars): Likewise.
5335 (print_hex_chars): Add "zero_pad" argument.
5336 * sh64-tdep.c (sh64_do_fp_register): Update.
5337 * regcache.c (regcache::dump): Update.
5338 * printcmd.c (print_scalar_formatted): Update.
5339 * infcmd.c (default_print_one_register_info): Update.
5340
b3464d03
PA
53412017-06-12 Pedro Alves <palves@redhat.com>
5342 Alan Hayward <alan.hayward@arm.com>
5343
5344 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5345 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5346 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5347 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5348 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5349
4b76cda9
PA
53502017-06-12 Pedro Alves <palves@redhat.com>
5351
5352 * dwarf2read.c (mapped_symtab::data): Now a vector of
5353 symtab_index_entry instead of vector of
5354 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5355 whether an element's name is NULL instead of checking whether the
5356 element itself is NULL.
5357 (find_slot): Change return type. Adjust.
5358 (hash_expand, , add_index_entry, uniquify_cu_indices)
5359 (write_hash_table): Adjust.
5360
e8f8bcb3
PA
53612017-06-12 Pedro Alves <palves@redhat.com>
5362
5363 * dwarf2read.c (recursively_count_psymbols): New function.
5364 (write_psymtabs_to_index): Call it to compute number of psyms and
5365 pass estimate size of psyms_seen to unordered_set's ctor.
5366
70a1152b
PA
53672017-06-12 Pedro Alves <palves@redhat.com>
5368
5369 * dwarf2read.c (write_hash_table): Check if key already exists
5370 before emplacing.
5371
c2f134ac
PA
53722017-06-12 Pedro Alves <palves@redhat.com>
5373
5374 * dwarf2read.c (data_buf::append_space): Rename to...
5375 (data_buf::grow): ... this, and make private. Adjust all callers.
5376 (data_buf::append_uint): New method.
5377 (add_address_entry, write_one_signatured_type)
5378 (write_psymtabs_to_index): Use it.
5379
a81e6d4d
PA
53802017-06-12 Pedro Alves <palves@redhat.com>
5381
5382 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5383 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5384 (data_buf::file_write): Call ::fwrite directly.
5385
6fd931f2
PA
53862017-06-12 Pedro Alves <palves@redhat.com>
5387
5388 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5389 std::vector::erase.
5390
bc8f2430
JK
53912017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5392
5393 Code cleanup: C++ify .gdb_index producer.
5394 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5395 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5396 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5397 (create_strtab, add_string): Remove.
5398 (file_write, data_buf): New.
5399 (struct symtab_index_entry): Use std::vector for cu_indices.
5400 (struct mapped_symtab): Use std::vector for data.
5401 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5402 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5403 Remove.
5404 (find_slot): Change return type. Update it to the new data structures.
5405 (hash_expand, add_index_entry): Update it to the new data structures.
5406 (offset_type_compare): Remove.
5407 (uniquify_cu_indices): Update it to the new data structures.
5408 (c_str_view, c_str_view_hasher, vector_hasher): New.
5409 (add_indices_to_cpool): Remove.
5410 (write_hash_table): Update it to the new data structures.
5411 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5412 (eq_psymtab_cu_index): Remove.
5413 (psym_index_map): New typedef.
5414 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5415 reference and std::unordered_map for cu_index_htab.
5416 (add_address_entry, add_address_entry_worker, write_address_map)
5417 (write_psymbols): Update it to the new data structures.
5418 (write_obstack): Remove.
5419 (struct signatured_type_index_data): Change types_list to a data_buf
5420 reference and psyms_seen to a std::unordered_set reference.
5421 (write_one_signatured_type, recursively_write_psymbols)
5422 (write_psymtabs_to_index): Update it to the new data structures.
5423
c4dcb155
SM
54242017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5425
5426 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5427 separate-debug-file commands.
5428 * symfile.h (separate_debug_file_debug): New global.
5429 * symfile.c (separate_debug_file_debug): New global.
5430 (separate_debug_file_exists, find_separate_debug_file): Add
5431 debug output.
5432 (_initialize_symfile): Add "set debug separate-debug-file"
5433 command.
5434 * build-id.c (build_id_to_debug_bfd,
5435 find_separate_debug_file_by_buildid): Add debug output.
5436
6d45d4b4
SM
54372017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5438
5439 * gdbarch.sh (displaced_step_free_closure): Remove.
5440 * gdbarch.h, gdbarch.c: Re-generate.
5441 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5442 displaced_step_free_closure.
5443 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5444 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5445 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5446 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5447 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5448 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5449 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5450 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5451 * infrun.c (displaced_step_clear): Call xfree instead of
5452 gdbarch_displaced_step_free_closure.
5453
2f91880f
SDJ
54542017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5455
5456 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5457 NULL".
5458
b8b6e72f
AH
54592017-06-08 Alan Hayward <alan.hayward@arm.com>
5460
5461 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5462 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5463 (mn10300_push_dummy_call): Likewise.
5464
5369082e
AH
54652017-06-08 Alan Hayward <alan.hayward@arm.com>
5466
5467 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5468
ff4ca5ac
AH
54692017-06-08 Alan Hayward <alan.hayward@arm.com>
5470
5471 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5472
aefd8b33
SDJ
54732017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5474
5475 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5476 able to start inferiors using a shell.
5477 (New remote packets): Announce new packet "QStartupWithShell".
5478 * remote.c: Add PACKET_QStartupWithShell.
5479 (extended_remote_create_inferior): Handle new
5480 PACKET_QStartupWithShell.
5481 (remote_protocol_features) <QStartupWithShell>: New entry for
5482 PACKET_QStartupWithShell.
5483 (_initialize_remote): Call "add_packet_config_cmd" for
5484 QStartupShell.
5485
2090129c
SDJ
54862017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5487 Pedro Alves <palves@redhat.com>
5488
5489 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5490 and "nat/fork-inferior.h".
5491 * common/common-inferior.h: New file, with contents from
5492 "gdb/inferior.h".
5493 * commom/common-utils.c: Include "common-utils.h".
5494 (stringify_argv): New function.
5495 * common/common-utils.h (stringify_argv): New prototype.
5496 * configure.nat: Add "fork-inferior.o" as a dependency for
5497 "*linux*", "fbsd*" and "nbsd*" hosts.
5498 * corefile.c (get_exec_file): Update comment.
5499 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5500 instead of "startup_inferior".
5501 (darwin_create_inferior): Call "add_thread_silent" after
5502 "fork_inferior".
5503 * fork-child.c: Cleanup unnecessary includes.
5504 (SHELL_FILE): Move to "common/common-fork-child.c".
5505 (environ): Likewise.
5506 (exec_wrapper): Initialize.
5507 (get_exec_wrapper): New function.
5508 (breakup_args): Move to "common/common-fork-child.c"; rename to
5509 "breakup_args_for_exec".
5510 (escape_bang_in_quoted_argument): Move to
5511 "common/common-fork-child.c".
5512 (saved_ui): New variable.
5513 (prefork_hook): New function.
5514 (postfork_hook): Likewise.
5515 (postfork_child_hook): Likewise.
5516 (gdb_startup_inferior): Likewise.
5517 (fork_inferior): Move to "common/common-fork-child.c". Update
5518 function to support gdbserver.
5519 (startup_inferior): Likewise.
5520 * gdbcore.h (get_exec_file): Remove declaration.
5521 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5522 instead of "startup_inferior". Call "add_thread_silent" after
5523 "fork_inferior".
5524 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5525 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5526 instead of "startup_inferior". Call "add_thread_silent" after
5527 "fork_inferior".
5528 * inferior.h: Include "common-inferior.h".
5529 (trace_start_error): Move to "common/common-utils.h".
5530 (trace_start_error_with_name): Likewise.
5531 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5532 (startup_inferior): Likewise.
5533 (gdb_startup_inferior): New prototype.
5534 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5535 * nat/fork-inferior.h: New file.
5536 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5537 instead of "startup_inferior". Call "add_thread_silent" after
5538 "fork_inferior".
5539 * target.h (target_terminal_init): Move prototype to
5540 "target/target.h".
5541 (target_terminal_inferior): Likewise.
5542 (target_terminal_ours): Likewise.
5543 * target/target.h (target_terminal_init): New prototype, moved
5544 from "target.h".
5545 (target_terminal_inferior): Likewise.
5546 (target_terminal_ours): Likewise.
5547 * utils.c (gdb_flush_out_err): New function.
5548
043a4934
SDJ
55492017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5550
5551 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5552 * common/common-gdbthread.h: New file, with parts from
5553 "gdb/gdbthread.h".
5554 * gdbthread.h: Include "common-gdbthread.h".
5555 (switch_to_thread): Moved to "common/common-gdbthread.h".
5556
15652511
SDJ
55572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5558
5559 * Makefile.in (SFILES): Add "common/job-control.c".
5560 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5561 (COMMON_OBS): Add "job-control.o".
5562 * common/job-control.c: New file, with contents from
5563 "gdb/inflow.c".
5564 * common/job-control.h: New file, with contents from "terminal.h".
5565 * fork-child.c: Include "job-control.h".
5566 * inflow.c: Include "job-control.h".
5567 (gdb_setpgid): Move to "common/common-inflow.c".
5568 (_initialize_inflow): Move setting of "job_control" to
5569 "handle_job_control".
5570 * terminal.h (job_control): Moved to "common/common-terminal.h".
5571 (gdb_setpgid): Likewise.
5572 * top.c: Include "job_control.h".
5573 * utils.c: Likewise.
5574 (job_control): Moved to "job-control.c".
5575
2d7cc5c7
PA
55762017-06-07 Pedro Alves <palves@redhat.com>
5577
5578 * Makefile.in (SFILES): Add gdb_regex.c.
5579 (COMMON_OBS): Add gdb_regex.o.
5580 * ada-lang.c (ada_add_standard_exceptions)
5581 (ada_add_exceptions_from_frame, name_matches_regex)
5582 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5583 parameter type to compiled_regex. Adjust.
5584 (ada_exceptions_list): Use compiled_regex.
5585 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5586 std::unique_ptr<compiled_regex>.
5587 (exception_catchpoint::~exception_catchpoint): Remove regfree
5588 call.
5589 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5590 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5591 * breakpoint.c (solib_catchpoint::compiled): Now a
5592 std::unique_ptr<compiled_regex>.
5593 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5594 (check_status_catch_solib): Adjust to use compiled_regex.
5595 (add_solib_catchpoint): Adjust to use compiled_regex.
5596 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5597 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5598 compiled_regex reference. Adjust to use it.
5599 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5600 declaration. Include "gdb_regex.h".
5601 (apropos_cmd): Change regex parameter to compiled_regex reference.
5602 * gdb_regex.c: New file.
5603 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5604 declarations.
5605 (class compiled_regex): New.
5606 * linux-tdep.c: Include "common/gdb_optional.h".
5607 (struct mapping_regexes): New, factored out from
5608 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5609 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5610 gdb::optional and remove cleanups. Adjust to compiled_regex.
5611 * probe.c: Include "common/gdb_optional.h".
5612 (collect_probes): Use compiled_regex and gdb::optional and remove
5613 cleanups.
5614 * skip.c: Include "common/gdb_optional.h".
5615 (skiplist_entry::compiled_function_regexp): Now a
5616 gdb::optional<compiled_regex>.
5617 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5618 (free_skiplist_entry): Remove regfree call.
5619 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5620 compiled_regex and gdb::optional.
5621 * symtab.c: Include "common/gdb_optional.h".
5622 (search_symbols): Use compiled_regex and gdb::optional.
5623 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5624 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5625 to gdb_regex.c.
5626
50d6adef
AH
56272017-06-07 Alan Hayward <alan.hayward@arm.com>
5628
5629 * regcache.c (regcache::save): Avoid buffer use.
5630 (regcache::dump): Likewise.
5631
4a8a33c8
AH
56322017-06-07 Alan Hayward <alan.hayward@arm.com>
5633
5634 * sh-tdep.c (sh_pseudo_register_read): Remove
5635 MAX_REGISTER_SIZE.
5636 (sh_pseudo_register_write): Likewise.
5637 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5638 (sh64_pseudo_register_write): Likewise
5639
d1be909e
AH
56402017-06-07 Alan Hayward <alan.hayward@arm.com>
5641
5642 * aarch64-tdep.c (aarch64_store_return_value): Use
5643 V_REGISTER_SIZE.
5644 (aarch64_pseudo_read_value): Likewise.
5645 (aarch64_pseudo_write): Likewise.
5646
f4a65042
YQ
56472017-06-06 Yao Qi <yao.qi@linaro.org>
5648
5649 * regformats/regdef.h (set_register_cache): Remove the
5650 declaration.
5651
9f7fb0aa
AH
56522017-06-06 Alan Hayward <alan.hayward@arm.com>
5653
5654 * frame.c (frame_unwind_register_signed): Use
5655 frame_unwind_register_value.
5656
e1e01040
PA
56572017-06-06 Pedro Alves <palves@redhat.com>
5658
5659 PR breakpoints/21553
5660 * breakpoint.c (create_breakpoints_sal_default)
5661 (init_breakpoint_sal, create_breakpoint_sal): Use
5662 gdb::unique_xmalloc_ptr for string parameters.
5663 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5664 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5665 (base_breakpoint_create_breakpoints_sal)
5666 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5667 (strace_marker_create_breakpoints_sal)
5668 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5669 string parameters.
5670 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5671 gdb::unique_xmalloc_ptr for string parameters.
5672 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5673 parameters.
5674
fbe654c8
AH
56752017-06-06 Alan Hayward <alan.hayward@arm.com>
5676
5677 * alpha-tdep.c (alpha_register_to_value): Use
5678 get_frame_register_value.
5679 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5680
ae0d01d6
AH
56812017-06-06 Alan Hayward <alan.hayward@arm.com>
5682
5683 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5684 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5685 (ia64_value_to_register): Likewise.
5686 (ia64_extract_return_value): Likewise.
5687 (ia64_store_return_value): Likewise.
5688 (ia64_push_dummy_call): Likewise.
5689
49cf576c
JB
56902017-06-04 Joel Brobecker <brobecker@adacore.com>
5691
5692 GDB 8.0 released.
5693
26b6a6ab
SM
56942017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5695
5696 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5697
22827c51
SM
56982017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5699
5700 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5701 parameter.
5702 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5703
0e05cf3a
SM
57042017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * event-loop.c (poll_timers): Unallocate timer using delete
5707 instead of xfree.
5708
c1fc2657
SM
57092017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5710
5711 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5712 (struct breakpoint) <~breakpoint>: New.
5713 (struct watchpoint): Inherit from breakpoint.
5714 <~watchpoint>: New.
5715 <base>: Remove.
5716 (struct tracepoint): Inherit from breakpoint.
5717 <base>: Remove.
5718 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5719 (struct longjmp_breakpoint): Inherit from breakpoint.
5720 <~longjmp_breakpoint>: New.
5721 <base>: Remove.
5722 (new_breakpoint_from_type): Remove casts.
5723 (watchpoint_in_thread_scope): Remove reference to base field.
5724 (watchpoint_del_at_next_stop): Likewise.
5725 (update_watchpoint): Likewise.
5726 (watchpoint_check): Likewise.
5727 (bpstat_check_watchpoint): Likewise.
5728 (set_longjmp_breakpoint): Likewise.
5729 (struct fork_catchpoint): Inherit from breakpoint.
5730 <base>: Remove.
5731 (struct solib_catchpoint): Inherit from breakpoint.
5732 <~solib_catchpoint>: New.
5733 <base>: Remove.
5734 (dtor_catch_solib): Change to ...
5735 (solib_catchpoint::~solib_catchpoint): ... this.
5736 (breakpoint_hit_catch_solib): Remove reference to base field.
5737 (add_solib_catchpoint): Likewise.
5738 (create_fork_vfork_event_catchpoint): Likewise.
5739 (struct exec_catchpoint): Inherit from breakpoint.
5740 <~exec_catchpoint>: New.
5741 <base>: Remove.
5742 (dtor_catch_exec): Change to ...
5743 (exec_catchpoint::~exec_catchpoint): ... this.
5744 (dtor_watchpoint): Change to ...
5745 (watchpoint::~watchpoint): ... this.
5746 (watch_command_1): Remove reference to base field.
5747 (catch_exec_command_1): Likewise.
5748 (base_breakpoint_dtor): Change to ...
5749 (breakpoint::~breakpoint): ... this.
5750 (base_breakpoint_ops): Remove dtor field value.
5751 (longjmp_bkpt_dtor): Change to ...
5752 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5753 (strace_marker_create_breakpoints_sal): Remove reference to base
5754 field.
5755 (delete_breakpoint): Don't manually call breakpoint destructor.
5756 (create_tracepoint_from_upload): Remove reference to base field.
5757 (trace_pass_set_count): Likewise.
5758 (initialize_breakpoint_ops): Don't initialize
5759 momentary_breakpoint_ops, don't set dtors.
5760 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5761 <~ada_catchpoint>: New.
5762 <base>: Remove.
5763 (create_excep_cond_exprs): Remove reference to base field.
5764 (dtor_exception): Change to ...
5765 (ada_catchpoint::~ada_catchpoint): ... this.
5766 (dtor_catch_exception): Remove.
5767 (dtor_catch_exception_unhandled): Remove.
5768 (dtor_catch_assert): Remove.
5769 (create_ada_exception_catchpoint): Remove reference to base
5770 field.
5771 (initialize_ada_catchpoint_ops): Don't set dtors.
5772 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5773 breakpoint.
5774 <~signal_catchpoint>: New.
5775 <base>: Remove.
5776 (signal_catchpoint_dtor): Change to ...
5777 (signal_catchpoint::~signal_catchpoint): ... this.
5778 (create_signal_catchpoint): Remove reference to base field.
5779 (initialize_signal_catchpoint_ops): Don't set dtor.
5780 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5781 from breakpoint.
5782 <~syscall_catchpoint>: New.
5783 <base>: Remove.
5784 (dtor_catch_syscall): Change to ...
5785 (syscall_catchpoint::~syscall_catchpoint): ... this.
5786 (create_syscall_event_catchpoint): Remove reference to base
5787 field.
5788 (initialize_syscall_catchpoint_ops): Don't set dtor.
5789 * break-catch-throw.c (struct exception_catchpoint): Inherit
5790 from breakpoint.
5791 <~exception_catchpoint>: New.
5792 <base>: Remove.
5793 (dtor_exception_catchpoint): Change to ...
5794 (exception_catchpoint::~exception_catchpoint): ... this.
5795 (handle_gnu_v3_exceptions): Remove reference to base field.
5796 (initialize_throw_catchpoint_ops): Don't set dtor.
5797 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5798 field.
5799 * remote.c (remote_get_tracepoint_status): Likewise.
5800 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5801 * tracefile.c (tracefile_fetch_registers): Likewise.
5802 * tracepoint.c (actions_command): Likewise.
5803 (validate_actionline): Likewise.
5804 (tfind_1): Likewise.
5805 (get_traceframe_location): Likewise.
5806 (find_matching_tracepoint_location): Likewise.
5807 (parse_tracepoint_status): Likewise.
5808 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5809
3b0871f4
SM
58102017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5811
5812 * breakpoint.c (struct longjmp_breakpoint): New struct.
5813 (is_tracepoint_type): Change return type to bool.
5814 (is_longjmp_type): New function.
5815 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5816 (set_raw_breakpoint_without_location): Use
5817 new_breakpoint_from_type.
5818 (set_raw_breakpoint): Likewise.
5819
a5e364af
SM
58202017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5821
5822 * breakpoint.c (new_breakpoint_from_type): New function.
5823 (create_breakpoint_sal): Use new_breakpoint_from_type and
5824 unique_ptr.
5825 (create_breakpoint): Likewise.
5826
ae3b3f34
SM
58272017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * memattr.c (mem_info_command): Rename to ...
5830 (info_mem_command): ... this.
5831 (mem_enable_command): Rename to ...
5832 (enable_mem_command): ... this.
5833 (mem_disable_command): Rename to ...
5834 (disable_mem_command): ... this.
5835 (mem_delete_command): Rename to ...
5836 (delete_mem_command): ... this.
5837 (_initialize_mem): Adjust function names.
5838
13ace077
MM
58392017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5840
5841 * btrace.c (handle_pt_insn_events): New.
5842 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5843 STATUS. Split into this and ...
5844 (handle_pt_insn_event_flags): ... this.
5845
c56ccc05
MM
58462017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5847
5848 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5849 and struct pt_insn.resynced.
5850 * configure: Regenerated.
5851 * config.in: Regenerated.
5852
08c3f6d2
TW
58532017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5854
5855 * btrace.c (ftrace_find_call_by_number): New function.
5856 (ftrace_new_function): Store objects, not pointers.
5857 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5858 ftrace_new_gap, ftrace_update_function,
5859 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5860 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5861 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5862 btrace_ends_with_single_insn, btrace_call_get): Account for
5863 btrace_thread_info::functions now storing objects.
5864 * btrace.h (struct btrace_thread_info): Add constructor.
5865 (struct btrace_thread_info) <functions>: Make std::vector.
5866 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5867 Initialize with default values.
5868 * record-btrace.c (record_btrace_frame_sniffer): Account for
5869 btrace_thread_info::functions now storing objects.
5870
8ffd39f2
TW
58712017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5872
5873 * btrace.c: Remove typedef bfun_s.
5874 (ftrace_new_gap): Directly add gaps to the list of gaps.
5875 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5876 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5877 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5878 instead of gdb VEC.
5879
4aeb0dfc
TW
58802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5881
5882 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5883 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5884 with btrace_thread_info::next_segment and
5885 btrace_thread_info::prev_segment.
5886 * btrace.h: Remove struct btrace_func_link.
5887 (struct btrace_function): Replace pair of function segment pointers
5888 with pair of indices.
5889 * python/py-record-btrace.c (btpy_call_prev_sibling,
5890 btpy_call_next_sibling): Replace references to
5891 btrace_thread_info::segment with btrace_thread_info::next_segment and
5892 btrace_thread_info::prev_segment.
5893 * record-btrace.c (record_btrace_frame_this_id): Use
5894 btrace_find_call_by_number.
5895
eb8f2b9c
TW
58962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5897
5898 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5899 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5900 btrace_insn_next, btrace_insn_prev): Remove references to
5901 btrace_thread_info::flow.
5902 * btrace.h (struct btrace_function): Remove FLOW.
5903
42bfe59e
TW
59042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5905
5906 * btrace.c (ftrace_find_call_by_number): New function.
5907 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5908 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5909 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5910 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5911 index.
5912 * btrace.h (struct btrace_function): Turn UP into an index.
5913 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5914 as an index.
5915 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5916 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5917 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5918
b54b03bd
TW
59192017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5920
5921 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5922 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5923 ftrace_update_function, ftrace_compute_global_level_offset,
5924 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5925 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5926 btrace_insn_end, btrace_is_empty): Remove references to
5927 btrace_thread_info::begin and btrace_thread_info::end.
5928 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5929 (struct btrace_thread_info) <functions>: Adjust comment.
5930 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5931 btrace_thread_info::begin.
5932
8286623c
TW
59332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5934
5935 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5936 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5937 ftrace_update_function): Remove arguments that implicitly were always
5938 BTINFO->END.
5939 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5940 Don't pass BTINFO->END.
5941
a0f1b963
TW
59422017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5943
5944 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5945 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5946 btrace_find_insn_by_number): Replace function segment pointer with
5947 index.
5948 (btrace_insn_cmp): Simplify.
5949 * btrace.h: (struct btrace_insn_iterator) Rename index to
5950 insn_index. Replace function segment pointer with index into function
5951 segment vector.
5952 * record-btrace.c (record_btrace_call_history): Replace function
5953 segment pointer use with index.
5954 (record_btrace_frame_sniffer): Retrieve function call segment through
5955 vector.
5956 (record_btrace_set_replay): Remove defunc't safety check.
5957
f158f208
TW
59582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5959
5960 * btrace.c (btrace_ends_with_single_insn): New function.
5961 (btrace_call_get, btrace_call_number, btrace_call_begin,
5962 btrace_call_end, btrace_call_next, btrace_call_prev,
5963 btrace_find_call_by_number): Use index into call segment vector
5964 instead of pointer.
5965 (btrace_call_cmp): Simplify.
5966 * btrace.h (struct btrace_call_iterator): Replace function call segment
5967 pointer with index into vector.
5968 * record-btrace.c (record_btrace_call_history): Use index instead of
5969 pointer.
5970
521103fd
TW
59712017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5972
5973 * btrace.c (btrace_insn_begin, btrace_insn_end,
5974 btrace_find_insn_by_number): Add btinfo to iterator.
5975 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5976
17b89b34
TW
59772017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5978
5979 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5980 and save pointers directly.
5981 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5982 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5983 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5984 changed signature of functions.
5985 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5986 (btrace_fetch): Remove code that adds btrace_function pointers to
5987 vector of btrace_functions.
5988 (btrace_clear): Simplify freeing vector of btrace_functions.
5989
2b51eddc
TW
59902017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5991
5992 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5993 Replace VEC_* with std::vector functions.
5994 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5995 (struct btrace_thread_info)<functions>: Change type to std::vector.
5996
db6be0d5
SM
59972017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5998
5999 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6000 "Removed targets and native configurations" up. Merge duplicate
6001 "New commands" sub-sections. Add "New options" sub-sections.
6002
b057297a
AH
60032017-05-26 Alan Hayward <alan.hayward@arm.com>
6004
6005 * defs.h (copy_integer_to_size): New declaration.
6006 * findvar.c (copy_integer_to_size): New function.
6007 (do_cint_test): New selftest function.
6008 (copy_integer_to_size_test): Likewise.
6009 (_initialize_findvar): Likewise.
6010 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6011 (mips_fbsd_collect_reg): Use raw_collect_integer.
6012 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6013 (mips64_fill_gregset): Use raw_collect_integer
6014 (mips64_fill_fpregset): Use raw_supply_integer.
6015 * regcache.c (regcache::raw_supply_integer): New function.
6016 (regcache::raw_collect_integer): Likewise.
6017 * regcache.h: (regcache::raw_supply_integer): New declaration.
6018 (regcache::raw_collect_integer): Likewise.
6019
b77b02a5
YQ
60202017-05-24 Yao Qi <yao.qi@linaro.org>
6021
6022 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6023 (COMMON_OBS): Add gdbarch-selftests.o.
6024 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6025 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6026 * gdbarch-selftests.c: New file.
6027 * regcache.h (regcache) <~regcache>: Mark it virtual if
6028 GDB_SELF_TEST.
6029 <raw_write>: Likewise.
6030
e521e87e
YQ
60312017-05-24 Yao Qi <yao.qi@linaro.org>
6032
6033 * regcache.c (current_regcache): Change it to
6034 regcache::current_regcache.
6035 (regcache_observer_target_changed): Update.
6036 (regcache_thread_ptid_changed): Make it a regcache static
6037 method.
6038 (regcache_thread_ptid_changed): Update.
6039 (class regcache_access): New.
6040 (current_regcache_test): Update.
6041 (_initialize_regcache): Update.
6042 * regcache.h: Include forward_list.
6043 (regcache): Declare regcache_thread_ptid_changed and declare
6044 registers_changed_ptid as friend.
6045
d8e07dda
YQ
60462017-05-24 Yao Qi <yao.qi@linaro.org>
6047
6048 * i387-tdep.c (i387_register_to_value): Use register_size
6049 instead of TYPE_LENGTH.
6050 * m68k-tdep.c (m68k_register_to_value): Likewise.
6051
8c8f9122
YQ
60522017-05-24 Yao Qi <yao.qi@linaro.org>
6053
6054 * i387-tdep.c (i387_convert_register_p): Return false if type
6055 code isn't TYPE_CODE_FLT.
6056
68fce50f
YQ
60572017-05-24 Yao Qi <yao.qi@linaro.org>
6058
6059 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6060 length is 4.
6061 (alpha_register_to_value): Remove type length check.
6062 (alpha_value_to_register): Likewise.
6063
88954b49
YQ
60642017-05-24 Yao Qi <yao.qi@linaro.org>
6065
6066 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6067 TYPE_CODE_FLT.
6068
e3ec9b69
YQ
60692017-05-24 Yao Qi <yao.qi@linaro.org>
6070
6071 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6072 TYPE_CODE_FLT or not.
6073
cdd238da
YQ
60742017-05-24 Yao Qi <yao.qi@linaro.org>
6075
6076 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6077 * avr-tdep.c (avr_gdbarch_init): Likewise.
6078 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6079 * cris-tdep.c (cris_gdbarch_init): Likewise.
6080 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6081 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6082 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6083 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6084 * mep-tdep.c (mep_gdbarch_init): Likewise.
6085 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6086 * mips-tdep.c (mips_gdbarch_init): Likewise.
6087 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6088 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6089 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6090 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6091 * v850-tdep.c (v850_gdbarch_init): Likewise.
6092
7a3929c4
YQ
60932017-05-24 Yao Qi <yao.qi@linaro.org>
6094
6095 * selftest-arch.c (tests_with_arch): Call registers_changed
6096 and reinit_frame_cache.
6097 * selftest.c (run_self_tests): Likewise.
6098
f4985dba
YQ
60992017-05-24 Yao Qi <yao.qi@linaro.org>
6100
6101 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6102 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6103
ab20fa4a
YQ
61042017-05-24 Yao Qi <yao.qi@linaro.org>
6105
6106 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6107 set_gdbarch_print_insn.
6108
f532ab94
YQ
61092017-05-24 Yao Qi <yao.qi@linaro.org>
6110
6111 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6112 set_gdbarch_print_insn.
6113
39503f82
YQ
61142017-05-24 Yao Qi <yao.qi@linaro.org>
6115
6116 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6117 set_gdbarch_print_insn.
6118 * arc-tdep.c (arc_gdbarch_init): Likewise.
6119 * arch-utils.c: include dis-asm.h.
6120 (default_print_insn): New function.
6121 * arch-utils.h (default_print_insn): Declare.
6122 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6123 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6124 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6125 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6126 * frv-tdep.c (frv_gdbarch_init): Likewise.
6127 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6128 * gdbarch.sh (print_insn): Use default_print_insn.
6129 * gdbarch.c: Regenerated.
6130 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6131 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6132 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6133 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6134 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6135 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6136 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6137 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6138 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6139 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6140 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6141 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6142 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6143 * mt-tdep.c (mt_gdbarch_init): Likewise.
6144 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6145 * nios2-tdep.c (nios2_print_insn): Remove.
6146 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6147 * rx-tdep.c (rx_gdbarch_init): Likewise.
6148 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6149 * score-tdep.c (score_print_insn): Remove.
6150 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6151 * sh-tdep.c (sh_gdbarch_init): Likewise.
6152 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6153 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6154 * tic6x-tdep.c (tic6x_print_insn): Remove.
6155 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6156 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6157 * v850-tdep.c (v850_gdbarch_init): Likewise.
6158 * vax-tdep.c (vax_gdbarch_init): Likewise.
6159 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6160 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6161
f7241d4f
JB
61622017-05-23 John Baldwin <jhb@FreeBSD.org>
6163
6164 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6165 (MIPS_FP0_REGNUM): Remove.
6166 (MIPS_FSR_REGNUM): Remove.
6167 (mips_fbsd_supply_fpregs): Use mips_regnum.
6168 (mips_fbsd_supply_gregs): Likewise.
6169 (mips_fbsd_collect_fpregs): Likewise.
6170 (mips_fbsd_collect_gregs): Likewise.
6171
d489d81d
JB
61722017-05-23 John Baldwin <jhb@FreeBSD.org>
6173
6174 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6175 (getpfpregs_supplies): New function.
6176 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6177 getfpregs_supplies.
6178 (mips_fbsd_store_inferior_registers): Likewise.
6179
e11b3cdc
PA
61802017-05-22 Pedro Alves <palves@redhat.com>
6181
6182 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6183 maintainer.
6184
0f068fb5
AH
61852017-05-22 Alan Hayward <alan.hayward@arm.com>
6186
6187 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6188 (store_register): Likewise.
6189 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6190 (get_decimal_float_return_value): Likewise.
6191 (do_ppc_sysv_return_value): Likewise.
6192 (ppc64_sysv_abi_push_integer): Likewise.
6193 (ppc64_sysv_abi_push_freg): Likewise.
6194 (ppc64_sysv_abi_return_value_base): Likewise.
6195 (ppc64_sysv_abi_return_value): Likewise.
6196 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6197 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6198 * rs6000-nat.c: Likewise.
6199 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6200 (rs6000_value_to_register): Likewise.
6201 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6202
e6cf65f2
TT
62032017-05-21 Tom Tromey <tom@tromey.com>
6204
6205 PR rust/21466:
6206 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6207 arrays as "[T]", not "[T; ]".
6208
43cc5389
TT
62092017-05-19 Tom Tromey <tom@tromey.com>
6210
6211 PR rust/21484:
6212 * rust-lang.c (exp_descriptor_rust): New function.
6213 (rust_language_defn): Use it.
6214 * p-lang.c (pascal_language_defn): Update.
6215 * opencl-lang.c (opencl_language_defn): Update.
6216 * objc-lang.c (objc_language_defn): Update.
6217 * m2-lang.c (m2_language_defn): Update.
6218 * language.h (struct language_defn)
6219 <la_watch_location_expression>: New member.
6220 * language.c (unknown_language_defn, auto_language_defn)
6221 (local_language_defn): Update.
6222 * go-lang.c (go_language_defn): Update.
6223 * f-lang.c (f_language_defn): Update.
6224 * d-lang.c (d_language_defn): Update.
6225 * c-lang.h (c_watch_location_expression): Declare.
6226 * c-lang.c (c_watch_location_expression): New function.
6227 (c_language_defn, cplus_language_defn, asm_language_defn)
6228 (minimal_language_defn): Use it.
6229 * breakpoint.c (watch_command_1): Call
6230 la_watch_location_expression.
6231 * ada-lang.c (ada_language_defn): Update.
6232
7a6e7fcc
RO
62332017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6234
6e7e1744
RO
6235 PR tui/21482
6236 * gdb_curses.h (NOMACROS): Define.
6237 (NCURSES_NOMACROS): Define.
6238
62392017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6240
6241 PR tui/21482
7a6e7fcc
RO
6242 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6243 arg to char *.
6244 * tui/tui-wingeneral.c (box_win): Likewise.
6245 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6246 (tui_show_source_line): Likewise.
6247 (tui_show_exec_info_content): Likewise.
6248
1933fd8e
VM
62492017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6250
6251 * sparc-tdep.c (sparc_structure_return_p)
6252 (sparc_arg_on_registers_p): New functions.
6253 (sparc32_store_arguments): Use them.
6254 * sparc64-tdep.c (sparc64_16_byte_align_p)
6255 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6256 Handle TYPE_CODE_ARRAY.
6257
21873064
YQ
62582017-05-17 Yao Qi <yao.qi@linaro.org>
6259
6260 * cli/cli-decode.c (add_alias_cmd): New function.
6261 * command.h (add_alias_cmd): Declare.
6262 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6263 instead call add_alias_cmd.
6264
2b351b19
PA
62652017-05-17 Pedro Alves <palves@redhat.com>
6266
6267 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6268 (nat_makefile_frag): ... this. All references updated.
6269 * configure.ac: Likewise.
6270 * configure.nat: Likewise. Enhance comments.
6271 * configure: Regenerate.
6272
5f2ad7a3
RO
62732017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6274
6275 * procfs.c (procfs_create_inferior): Change prototype to match
6276 definition.
6277
adf3dde5
EZ
62782017-05-13 Eli Zaretskii <eliz@gnu.org>
6279
6280 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6281 C++ compiler warning.
6282
6830f270
TT
62832017-05-12 Tom Tromey <tom@tromey.com>
6284
6285 PR rust/21483:
6286 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6287 recurse, just call value_struct_elt directly.
6288
68f2f2e3
TT
62892017-05-12 Tom Tromey <tom@tromey.com>
6290
6291 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6292 OP_RUST_ARRAY>: Fix.
6293
256afbc2
TT
62942017-05-12 Tom Tromey <tom@tromey.com>
6295
6296 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6297
94bb8dfe
YQ
62982017-05-09 Yao Qi <yao.qi@linaro.org>
6299
6300 * regcache.c: Include <forward_list>.
6301 (struct regcache_list): Remove.
6302 (current_regcache): Update.
6303 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6304 (regcache_thread_ptid_changed): Likewise.
6305 (registers_changed_ptid): Likewise.
6306 (current_regcache_size): Likewise.
6307
8248946c
YQ
63082017-05-09 Yao Qi <yao.qi@linaro.org>
6309
6310 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6311 (current_regcache_size): New function.
6312 (current_regcache_test): New function.
6313 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6314
313c5961
AH
63152017-05-08 Alan Hayward <alan.hayward@arm.com>
6316
6317 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6318 (print_gp_register_row): Use get_frame_register_value.
6319
27bfc1d1
AH
63202017-05-08 Alan Hayward <alan.hayward@arm.com>
6321
6322 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6323 (mips_supply_fpregset): Likewise.
6324 (mips64_supply_gregset): Likewise.
6325
146e6c5c
AH
63262017-05-08 Alan Hayward <alan.hayward@arm.com>
6327
6328 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6329 regcache->raw_supply_zeroed.
6330
e50f25ec
SDJ
63312017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6332
6333 * configure.nat: Rearrange 'case' statements to match
6334 host before cpu.
6335
21ea5acd
SDJ
63362017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6337
6338 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6339 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6340 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6341 "@nat_extra_makefile_frag@".
6342 (Makefile): Remove dependency on "@frags@".
6343 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6344 (data-directory/Makefile): Likewise.
6345 * config/aarch64/linux.mh: Deleted; moved contents to
6346 "gdb/configure.nat".
6347 * config/alpha/alpha-linux.mh: Likewise.
6348 * config/alpha/nbsd.mh: Likewise.
6349 * config/arm/linux.mh: Likewise.
6350 * config/arm/nbsdelf.mh: Likewise.
6351 * config/i386/cygwin.mh: Likewise.
6352 * config/i386/cygwin64.mh: Likewise.
6353 * config/i386/darwin.mh: Likewise.
6354 * config/i386/fbsd.mh: Likewise.
6355 * config/i386/fbsd64.mh: Likewise.
6356 * config/i386/go32.mh: Likewise.
6357 * config/i386/i386gnu.mh: Likewise.
6358 * config/i386/i386sol2.mh: Likewise.
6359 * config/i386/linux.mh: Likewise.
6360 * config/i386/linux64.mh: Likewise.
6361 * config/i386/mingw.mh: Likewise.
6362 * config/i386/mingw64.mh: Likewise.
6363 * config/i386/nbsd64.mh: Likewise.
6364 * config/i386/nbsdelf.mh: Likewise.
6365 * config/i386/nto.mh: Likewise.
6366 * config/i386/obsd.mh: Likewise.
6367 * config/i386/obsd64.mh: Likewise.
6368 * config/i386/sol2-64.mh: Likewise.
6369 * config/ia64/linux.mh: Likewise.
6370 * config/m32r/linux.mh: Likewise.
6371 * config/m68k/linux.mh: Likewise.
6372 * config/m68k/nbsdelf.mh: Likewise.
6373 * config/m68k/obsd.mh: Likewise.
6374 * config/m88k/obsd.mh: Likewise.
6375 * config/mips/fbsd.mh: Likewise.
6376 * config/mips/linux.mh: Likewise.
6377 * config/mips/nbsd.mh: Likewise.
6378 * config/mips/obsd64.mh: Likewise.
6379 * config/pa/linux.mh: Likewise.
6380 * config/pa/nbsd.mh: Likewise.
6381 * config/pa/obsd.mh: Likewise.
6382 * config/powerpc/aix.mh: Likewise.
6383 * config/powerpc/fbsd.mh: Likewise.
6384 * config/powerpc/linux.mh: Likewise.
6385 * config/powerpc/nbsd.mh: Likewise.
6386 * config/powerpc/obsd.mh: Likewise.
6387 * config/powerpc/ppc64-linux.mh: Likewise.
6388 * config/powerpc/spu-linux.mh: Likewise.
6389 * config/s390/linux.mh: Likewise.
6390 * config/sh/nbsd.mh: Likewise.
6391 * config/sparc/fbsd.mh: Likewise.
6392 * config/sparc/linux.mh: Likewise.
6393 * config/sparc/linux64.mh: Likewise.
6394 * config/sparc/nbsd64.mh: Likewise.
6395 * config/sparc/nbsdelf.mh: Likewise.
6396 * config/sparc/obsd64.mh: Likewise.
6397 * config/sparc/sol2.mh: Likewise.
6398 * config/tilegx/linux.mh: Likewise.
6399 * config/vax/nbsdelf.mh: Likewise.
6400 * config/vax/obsd.mh: Likewise.
6401 * config/xtensa/linux.mh: Likewise.
6402 * config/i386/i386gnu.mn: New file, with excerpts from
6403 "config/i386/i386gnu.mh".
6404 * configure: Regenerate.
6405 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6406 *.mh files under "gdb/config".
6407 * configure.nat: New file, with contents from the
6408 "gdb/config/*/*.mh" files.
6409
7ed1acaf
TW
64102017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6411
6412 * btrace.c (btrace_clear): Free insn vector.
6413
e13cb306
PA
64142017-05-05 Pedro Alves <palves@redhat.com>
6415
6416 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6417 * configure: Regenerate.
6418
5ed8105e
PA
64192017-05-04 Pedro Alves <palves@redhat.com>
6420
6421 * Makefile.in (SFILES): Add progspace-and-thread.c.
6422 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6423 (COMMON_OBS): Add progspace-and-thread.o.
6424 * breakpoint.c: Include "progspace-and-thread.h".
6425 (update_inserted_breakpoint_locations)
6426 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6427 Use scoped_restore_current_pspace_and_thread.
6428 (create_std_terminate_master_breakpoint): Use
6429 scoped_restore_current_program_space.
6430 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6431 (print_breakpoint_location): Use
6432 scoped_restore_current_program_space.
6433 (bp_loc_is_permanent): Use
6434 scoped_restore_current_pspace_and_thread.
6435 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6436 (download_tracepoint_locations): Use
6437 scoped_restore_current_pspace_and_thread.
6438 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6439 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6440 (enum step_over_calls_kind): Moved from inferior.h.
6441 (class scoped_restore_current_thread): New class.
6442 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6443 declaration.
6444 (scoped_restore_current_thread): New class.
6445 * infcmd.c: Include "common/gdb_optional.h".
6446 (continue_1, proceed_after_attach): Use
6447 scoped_restore_current_thread.
6448 (notice_new_inferior): Use scoped_restore_current_thread.
6449 * inferior.c: Include "progspace-and-thread.h".
6450 (restore_inferior, save_current_inferior): Delete.
6451 (add_inferior_command, clone_inferior_command): Use
6452 scoped_restore_current_pspace_and_thread.
6453 * inferior.h (scoped_restore_current_inferior): New class.
6454 * infrun.c: Include "progspace-and-thread.h" and
6455 "common/gdb_optional.h".
6456 (follow_fork_inferior): Use
6457 scoped_restore_current_pspace_and_thread.
6458 (scoped_restore_exited_inferior): New class.
6459 (handle_vfork_child_exec_or_exit): Use
6460 scoped_restore_exited_inferior,
6461 scoped_restore_current_pspace_and_thread,
6462 scoped_restore_current_thread and scoped_restore.
6463 (fetch_inferior_event): Use scoped_restore_current_thread.
6464 * linespec.c (decode_line_full, decode_line_1): Use
6465 scoped_restore_current_program_space.
6466 * mi/mi-main.c: Include "progspace-and-thread.h".
6467 (exec_continue): Use scoped_restore_current_thread.
6468 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6469 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6470 * proc-service.c (ps_pglobal_lookup): Use
6471 scoped_restore_current_program_space.
6472 * progspace-and-thread.c: New file.
6473 * progspace-and-thread.h: New file.
6474 * progspace.c (release_program_space, clone_program_space): Use
6475 scoped_restore_current_program_space.
6476 (restore_program_space, save_current_program_space)
6477 (save_current_space_and_thread): Delete.
6478 (switch_to_program_space_and_thread): Moved to
6479 progspace-and-thread.c.
6480 * progspace.h (save_current_program_space)
6481 (save_current_space_and_thread): Delete declarations.
6482 (scoped_restore_current_program_space): New class.
6483 * remote.c (remote_btrace_maybe_reopen): Use
6484 scoped_restore_current_thread.
6485 * symtab.c: Include "progspace-and-thread.h".
6486 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6487 * thread.c (print_thread_info_1): Use
6488 scoped_restore_current_thread.
6489 (struct current_thread_cleanup): Delete.
6490 (do_restore_current_thread_cleanup)
6491 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6492 (scoped_restore_current_thread::~scoped_restore_current_thread):
6493 ... this new dtor.
6494 (make_cleanup_restore_current_thread): Rename/convert to ...
6495 (scoped_restore_current_thread::scoped_restore_current_thread):
6496 ... this new ctor.
6497 (thread_apply_all_command): Use scoped_restore_current_thread.
6498 (thread_apply_command): Use scoped_restore_current_thread.
6499 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6500 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6501
f6223dbb
PA
65022017-05-04 Pedro Alves <palves@redhat.com>
6503
6504 * thread.c (make_cleanup_restore_current_thread): Move
6505 find_thread_ptid call before the is_stopped call. Assert that the
6506 thread is found. Replace is_stopped call by checking the thread's
6507 state directly. Remove unnecessary NULL-thread check.
6508
3c3ae77e
PA
65092017-05-04 Pedro Alves <palves@redhat.com>
6510
6511 * corelow.c (thread_section_name): New class.
6512 (get_core_register_section, get_core_siginfo): Use it.
6513
45eba0ab
AA
65142017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6515
6516 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6517 (get_core_register_section): Remove xfree of NULL pointer.
6518
f81fdd35
AH
65192017-05-03 Alan Hayward <alan.hayward@arm.com>
6520
6521 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6522 * regcache.c (regcache::raw_supply_zeroed): New function.
6523 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6524
35837774
SM
65252017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6526
6527 * gdbarch.sh: Remove commented out definition of
6528 TARGET_CHAR_BIT.
6529 * gdbarch.h: Re-generate.
6530
c94fee56
SDJ
65312017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6532
6533 * configure: Regenerate.
6534
d17f7b36
SM
65352017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6536
6537 * solib-target.c (solib_target_relocate_section_addresses):
6538 Remove num_section_bases, num_bases, segment_bases variables.
6539
b560ebd6
SM
65402017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6541
6542 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6543
f2f46dfc
SM
65442017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6545
6546 * solib-target.c: Include <vector>
6547 (struct lm_info_target) <~lm_info_target>: Remove.
6548 <segment_bases, section_bases>: Change type to
6549 std::vector<CORE_ADDR>.
6550 (library_list_start_segment, library_list_start_section,
6551 library_list_end_library,
6552 solib_target_relocate_section_addresses): Adjust.
6553
a0ff9e1a
SM
65542017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6555
6556 * gdbarch.sh (software_single_step): Change return type to
6557 std::vector<CORE_ADDR>.
6558 * gdbarch.c, gdbarch.h: Re-generate.
6559 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6560 Adjust.
6561 (arm_deal_with_atomic_sequence_raw): Adjust.
6562 (thumb_get_next_pcs_raw): Adjust.
6563 (arm_get_next_pcs_raw): Adjust.
6564 (arm_get_next_pcs): Adjust.
6565 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6566 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6567 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6568 (alpha_software_single_step): Adjust.
6569 * alpha-tdep.h (alpha_software_single_step): Adjust.
6570 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6571 * arm-tdep.c (arm_software_single_step): Adjust.
6572 (arm_breakpoint_kind_from_current_state): Adjust.
6573 * arm-tdep.h (arm_software_single_step): Adjust.
6574 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6575 * cris-tdep.c (cris_software_single_step): Adjust.
6576 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6577 (micromips_deal_with_atomic_sequence): Adjust.
6578 (deal_with_atomic_sequence): Adjust.
6579 (mips_software_single_step): Adjust.
6580 * mips-tdep.h (mips_software_single_step): Adjust.
6581 * moxie-tdep.c (moxie_software_single_step): Adjust.
6582 * nios2-tdep.c (nios2_software_single_step): Adjust.
6583 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6584 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6585 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6586 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6587 * sparc-tdep.c (sparc_software_single_step): Adjust.
6588 * spu-tdep.c (spu_software_single_step): Adjust.
6589 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6590
ea480a30
SM
65912017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6592
6593 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6594 * gdbarch.h: Re-generate.
6595
d050f7d7
TW
65962017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6597
6598 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6599 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6600 * python/py-instruction.c, python/py-instruction.h: New file.
6601 * python/py-record.c: Add py-instruction.h include.
6602 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6603 gdb.RecordInstruction.
6604 * python/python-internal.h: Add gdbpy_initialize_instruction
6605 declaration.
6606 * python/python.c (do_start_initialization): Add
6607 gdbpy_initialize_instruction.
6608
14f819c8
TW
66092017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6610
6611 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6612 Remove.
6613 (btrace_func_from_recpy_func): New function.
6614 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6615 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6616 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6617 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6618 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6619 Also, use new helper functions.
6620 (btpy_list_item): Use new helper functions.
6621 (recpy_bt_function_call_history): Use new type name.
6622 (btpy_call_getset): Remove.
6623 (gdbpy_initialize_btrace): Remove code to initialize
6624 gdb.BtraceFunctionCall.
6625 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6626 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6627 recpy_bt_func_prev, recpy_bt_func_next): New export.
6628 * python/py-record.c (recpy_func_type): New static object.
6629 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6630 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6631 recpy_func_next): New function.
6632 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6633 (recpy_func_getset): New static object.
6634 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6635 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6636
0ed5da75
TW
66372017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6638
6639 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6640 (btpy_object, btpy_insn_type, btpy_new): Remove.
6641 (btpy_list_object): Use gdb.RecordInstruction type instead of
6642 gdb.BtraceInstruction type.
6643 (btrace_insn_from_recpy_insn): New function.
6644 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6645 btpy_new.
6646 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6647 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6648 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6649 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6650 instead of btpy_object.
6651 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6652 btpy_insn_data, btpy_insn_decode): Rename to ...
6653 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6654 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6655 recpy_bt_insn_decode): This. Also, use new helper functions.
6656 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6657 recpy_insn_type.
6658 (btpy_insn_getset): Remove.
6659 (gdbpy_initialize_btrace): Remove code to initialize
6660 gdb.BtraceInstruction. Use recpy_element_object.
6661 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6662 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6663 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6664 * python/py-record.c (recpy_insn_type): New static object.
6665 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6666 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6667 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6668 New function.
6669 (recpy_insn_getset): New static object.
6670 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6671 * python/py-record.h (recpy_element_object): New typedef.
6672 (recpy_insn_type, recpy_insn_new): New export.
6673
913aeadd
TW
66742017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6675
6676 * py-record-btrace.c (btpy_insn_new): Removed.
6677 (btpy_insn_or_gap_new): New function.
6678 (btpy_insn_error): Removed.
6679 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6680 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6681 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6682 btpy_insn_or_gap_new instead of btpy_insn_new.
6683 (btpy_insn_getset): Remove btpy_insn_error.
6684 * py-record.c (recpy_gap_type): New static object.
6685 (recpy_gap_object): New typedef.
6686 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6687 recpy_gap_reason_string): New function.
6688 (recpy_gap_getset): New static object.
6689 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6690 * py-record.h (recpy_gap_new): New export.
6691
a3be24ad
TW
66922017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6693
6694 * python/py-record.c (recpy_ptid): Remove.
6695 (recpy_record_getset): Remove recpy_ptid.
6696
ae20e79a
TW
66972017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6698
6699 * btrace.c (btrace_fetch): Set inferior_ptid.
6700 * python/py-record-btrace.c: Add "py-record.h" include.
6701 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6702 recpy_bt_end, recpy_bt_instruction_history,
6703 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6704 in gdb.Record object instead of current ptid.
6705 * python/py-record.c: Include new "py-record.h" file.
6706 (recpy_record_object): Moved to py-record.h.
6707 * python/py-record.h: New file.
6708
8d0050ea
TW
67092017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6710
6711 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6712 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6713 indentation.
6714
3f380b50
JB
67152017-05-01 Joel Brobecker <brobecker@adacore.com>
6716
6717 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6718 the past maintainers section.
6719
07495424
YQ
67202017-04-28 Yao Qi <yao.qi@linaro.org>
6721
6722 * infcmd.c (get_return_value): Use regcache ctor, and remove
6723 cleanup.
6724
deb1fa3e
YQ
67252017-04-28 Yao Qi <yao.qi@linaro.org>
6726 Pedro Alves <palves@redhat.com>
6727
6728 * regcache.c (regcache::regcache): New tag dispatch ctor.
6729 (do_cooked_read): Moved above.
6730 (regcache_dup): Use the tag dispatch ctor..
6731 * regcache.h (regcache): Declare ctor, delete copy ctor and
6732 assignment operator, remove friend regcache_dup.
6733
b421c83c
YQ
67342017-04-28 Yao Qi <yao.qi@linaro.org>
6735
6736 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6737 call method save instead of regcache_cpy.
6738 * regcache.h (struct regcache): Make regcache_dup a friend.
6739
ef79d9a3
YQ
67402017-04-28 Yao Qi <yao.qi@linaro.org>
6741
6742 * regcache.c (struct regcache): Move to regcache.h
6743 (regcache::arch): New method.
6744 (regcache_get_ptid): Update.
6745 (get_regcache_arch): Call arch method.
6746 (get_regcache_aspace): Call method aspace.
6747 (register_buffer): Change it to method.
6748 (regcache_save): Change it to regcache::save.
6749 (regcache_restore): Likewise.
6750 (regcache_cpy_no_passthrough): Remove the declaration.
6751 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6752 (regcache_cpy_no_passthrough): Change it to method
6753 cpy_no_passthrough.
6754 (regcache_register_status): Change it to method
6755 get_register_status.
6756 (regcache_invalidate): Change it to method invalidate.
6757 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6758 (regcache_raw_update): Change it to method raw_update.
6759 (regcache_raw_read): Likewise.
6760 (regcache_raw_read_signed): Likewise.
6761 (regcache_raw_read_unsigned): Likewise.
6762 (regcache_raw_write_signed): Likewise.
6763 (regcache_raw_write_unsigned): Likewise.
6764 (regcache_cooked_read): Likewise.
6765 (regcache_cooked_read_value): Likewise.
6766 (regcache_cooked_read_signed): Likewise.
6767 (regcache_cooked_read_unsigned): Likewise.
6768 (regcache_cooked_write_signed): Likewise.
6769 (regcache_cooked_write_unsigned): Likewise.
6770 (regcache_raw_set_cached_value): Likewise.
6771 (regcache_raw_write): Likewise.
6772 (regcache_cooked_write): Likewise.
6773 (regcache_xfer_part): Likewise.
6774 (regcache_raw_read_part): Likewise.
6775 (regcache_raw_write_part): Likewise.
6776 (regcache_cooked_read_part): Likewise.
6777 (regcache_cooked_write_part): Likewise.
6778 (regcache_raw_supply): Likewise.
6779 (regcache_raw_collect): Likewise.
6780 (regcache_transfer_regset): Likewise.
6781 (regcache_supply_regset): Likewise.
6782 (regcache_collect_regset): Likewise.
6783 (regcache_debug_print_register): Likewise.
6784 (enum regcache_dump_what): Move it to regcache.h.
6785 (regcache_dump): Change it to method dump.
6786 * regcache.h (enum regcache_dump_what): New.
6787 (class regcache): New.
6788 * target.c (target_fetch_registers): Call method
6789 debug_print_register.
6790 (target_store_registers): Likewise.
6791
f8fdb78e
SM
67922017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6793
6794 * windows-nat.c (struct lm_info_windows): Initialize field.
6795 (windows_make_so): Allocate lm_info_windows with new.
6796 (windows_free_so): Free lm_info_windows with delete.
6797
9ccbfd7b
SM
67982017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6799
6800 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6801 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6802 cleanup.
6803 (darwin_free_so): Free lm_info_darwin with delete.
6804
76e75227
SM
68052017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6806
6807 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6808 <l_addr_p>: Change type to bool.
6809 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6810 (svr4_free_so): Free lm_info_svr4 with delete.
6811 (svr4_copy_library_list): Replace memcpy with call to copy
6812 constructor.
6813 (library_list_start_library, svr4_default_sos): Allocate
6814 lm_info_svr4 with new.
6815
51046d9e
SM
68162017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6817
6818 * solib-target.c (struct lm_info_target): Add destructor,
6819 initialize fields.
6820 <name>: Change type to std::string.
6821 (library_list_start_library): Allocate lm_info_target with new.
6822 (solib_target_free_library_list): Free lm_info_target with
6823 delete.
6824 (solib_target_current_sos): Adapt to std::string.
6825 (solib_target_free_so): Free lm_info_target with delete.
6826
4023ae76
SM
68272017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6828
6829 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6830 fields.
6831 (frv_current_sos): Allocate lm_info_frv with new.
6832 (frv_relocate_main_executable): Free lm_info_frv with delete,
6833 allocate with new.
6834 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6835
af43057b
SM
68362017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6837
6838 * solib-frv.c (struct lm_info_frv): Fix indentation.
6839
b0911207
SM
68402017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6841
6842 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6843 map field.
6844 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6845 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6846 and allocate with new.
6847 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6848
6c401f72
SM
68492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6850
6851 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6852 <filename, member_name>: Change type to std::string.
6853 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6854 (library_list_start_library): Allocate lm_info_aix with new.
6855 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6856 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6857 with copy constructor.
6858
d0e449a1
SM
68592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6860
6861 * solist.h (struct lm_info): Remove.
6862 (struct lm_info_base): New class.
6863 (struct so_list) <lm_info>: Change type to lm_info_base *.
6864 * nto-tdep.c (struct lm_info): Remove.
6865 (lm_addr): Adjust.
6866 * solib-aix.c (struct lm_info): Rename to ...
6867 (struct lm_info_aix): ... this. Extend lm_info_base.
6868 (lm_info_p): Rename to ...
6869 (lm_info_aix_p): ... this, and adjust.
6870 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6871 solib_aix_parse_libraries, library_list_start_library,
6872 solib_aix_free_library_list, solib_aix_parse_libraries,
6873 solib_aix_get_library_list,
6874 solib_aix_relocate_section_addresses, solib_aix_free_so,
6875 solib_aix_get_section_offsets,
6876 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6877 Adjust.
6878 (struct solib_aix_inferior_data) <library_list>: Adjust.
6879 * solib-darwin.c (struct lm_info): Rename to ...
6880 (struct lm_info_darwin): ... this. Extend lm_info_base.
6881 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6882 * solib-dsbt.c (struct lm_info): Rename to ...
6883 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6884 (struct dsbt_info) <main_executable_lm_info): Adjust.
6885 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6886 dsbt_relocate_section_addresses): Adjust.
6887 * solib-frv.c (struct lm_info): Rename to ...
6888 (struct lm_info_frv): ... this. Extend lm_info_base.
6889 (main_executable_lm_info): Adjust.
6890 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6891 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6892 find_canonical_descriptor_in_load_object,
6893 frv_fdpic_find_canonical_descriptor): Adjust.
6894 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6895 to lm_info_svr4.
6896 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6897 svr4_clear_so, svr4_copy_library_list,
6898 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6899 svr4_current_sos, svr4_fetch_objfile_link_map,
6900 solist_update_incremental): Adjust.
6901 * solib-svr4.h (struct lm_info_svr4): Move here from
6902 solib-svr4.c.
6903 * solib-target.c (struct lm_info): Rename to ...
6904 (struct lm_info_target): ... this. Extend lm_info_base.
6905 (lm_info_p): Rename to ...
6906 (lm_info_target_p): ... this.
6907 (solib_target_parse_libraries, library_list_start_segment,
6908 library_list_start_section, library_list_start_library,
6909 library_list_end_library, solib_target_free_library_list,
6910 solib_target_current_sos, solib_target_free_so,
6911 solib_target_relocate_section_addresses): Adjust.
6912 * windows-nat.c (struct lm_info): Rename to ...
6913 (struct lm_info_windows): ... this. Extend lm_info_base.
6914 (windows_make_so, handle_load_dll, handle_unload_dll,
6915 windows_xfer_shared_libraries): Adjust.
6916
434a4023
SM
69172017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6918
6919 * solib-darwin.c (struct darwin_so_list): Remove.
6920 (darwin_current_sos): Allocate an so_list object instead of a
6921 darwin_so_list, separately allocate an lm_info object.
6922 (darwin_free_so): Free lm_info.
6923
428544e8
JB
69242017-04-28 John Baldwin <jhb@FreeBSD.org>
6925
6926 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6927 with fprintf_filtered.
6928
4621115f
YQ
69292017-04-28 Yao Qi <yao.qi@linaro.org>
6930
6931 * regcache.c (regcache::regcache): New function.
6932 (regcache::~regcache): New function.
6933 (regcache_xmalloc_1): Remove.
6934 (regcache_xmalloc): Call new regcache.
6935 (regcache_xfree): Call delete regcache.
6936 (get_thread_arch_aspace_regcache): Call new regcache.
6937
339053c2
YQ
69382017-04-28 Yao Qi <yao.qi@linaro.org>
6939
6940 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6941 lwp instead of ptid_get_lwp.
6942
7974a605
YQ
69432017-04-28 Yao Qi <yao.qi@linaro.org>
6944
6945 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6946 lwp_info instead of getting from inferior_ptid.
6947
e15c3eb4
KS
69482017-04-27 Keith Seitz <keiths@redhat.com>
6949
6950 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6951 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6952 (CV_CONVERSION_BADNESS): Define.
6953 (rank_one_type): Remove overly restrictive rvalue reference
6954 rank checks.
6955 Add cv-qualifier checks and subranks for type equality.
6956 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6957 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6958 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6959
72bc1d24
SM
69602017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6961
6962 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6963 count when creating the object.
6964
55bcecda
UW
69652017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6966 Ulrich Weigand <uweigand@de.ibm.com>
6967
6968 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6969 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6970 is used in AIX.
6971 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6972 (process_xcoff_symbol): Likewise.
6973 (scan_xcoff_symtab): Likewise.
6974
5c99fcf8
AH
69752017-04-26 Alan Hayward <alan.hayward@arm.com>
6976
6977 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6978 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6979 (ia64_access_reg): Use get_frame_register_unsigned.
6980 (ia64_access_rse_reg): Likewise.
6981 (ia64_libunwind_frame_prev_register): Likewise.
6982
b41c5a85
JW
69832017-04-26 Jiong Wang <jiong.wang@arm.com>
6984
6985 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6986 * gdbarch.c: Regenerated.
6987 * gdbarch.h: Regenerated.
6988 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6989 visibility external.
6990 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6991 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6992 (enum cfa_how_kind): Move to ...
6993 (struct dwarf2_frame_state_reg_info): Likewise.
6994 (struct dwarf2_frame_state): Likewise.
6995 * dwarf2-frame.h: ... here.
6996 (dwarf2_frame_state_alloc_regs): New declaration.
6997 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6998 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6999
c185f580
AH
70002017-04-26 Alan Hayward <alan.hayward@arm.com>
7001
7002 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7003 regcache_raw_read_unsigned.
7004 (xtensa_pseudo_register_write): Likewise.
7005
19c45594
AH
70062017-04-26 Alan Hayward <alan.hayward@arm.com>
7007
7008 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7009 (nds32_pseudo_register_write): Likewise.
7010
4658f12e
YQ
70112017-04-25 Yao Qi <yao.qi@linaro.org>
7012
7013 * regcache.c (struct regcache) <readonly_p>: Change its type
7014 to bool.
7015 (regcache_xmalloc_1): Update parameter type and callers update.
7016
d581dda8
YQ
70172017-04-25 Yao Qi <yao.qi@linaro.org>
7018
7019 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7020 set_gdbarch_wchar_bit.
7021 * arm-tdep.c (arm_gdbarch_init): Likewise.
7022
debed3db
PA
70232017-04-25 Pedro Alves <palves@redhat.com>
7024
7025 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7026 (BothAreRelocatable, memcopy, memmove): Don't define.
7027 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7028 macros.
7029
b0b92aeb
PA
70302017-04-25 Pedro Alves <palves@redhat.com>
7031
7032 * common/common-defs.h: Include "common/poison.h".
7033 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7034 and adjust.
7035 * common/poison.h: New file.
7036 * common/traits.h: Include <type_traits>.
7037 (Not, Or, Requires): New, moved from common/function-view.h.
7038
16c4d54a
PA
70392017-04-25 Pedro Alves <palves@redhat.com>
7040
7041 * breakpoint.h (struct breakpoint): In-class initialize all
7042 fields. Make boolean fields "bool".
7043 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7044 memset call and initializations no longer necessary.
7045
b5c36682
PA
70462017-04-25 Pedro Alves <palves@redhat.com>
7047
7048 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7049 reference.
7050 (pt_btrace_insn): New function.
7051 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7052
5625a286
PA
70532017-04-25 Pedro Alves <palves@redhat.com>
7054
7055 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7056 "base" field and inherit from "bp_location" instead. Add
7057 non-default ctor.
7058 (allocate_location_exception): Use new non-default ctor.
7059 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7060 (init_bp_location): Convert to ...
7061 (bp_location::bp_location): ... this new ctor, and remove memset
7062 call.
7063 (base_breakpoint_allocate_location): Use the new non-default ctor.
7064 * breakpoint.h (bp_location): Now a class. Declare default and
7065 non-default ctors. In-class initialize all members.
7066 (init_bp_location): Remove declaration.
7067
23bcc18f
PA
70682017-04-25 Pedro Alves <palves@redhat.com>
7069
7070 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7071 assignment operator.
7072
e1ba3053
YQ
70732017-04-24 Yao Qi <yao.qi@linaro.org>
7074
7075 * doublest.c (convert_doublest_to_floatformat): Call
7076 floatformat_totalsize_bytes.
7077
10f489e5
TT
70782017-04-22 Tom Tromey <tom@tromey.com>
7079
7080 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7081 ui_out_emit_list.
7082 * stack.c (print_frame): Use ui_out_emit_list.
7083 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7084 ui_out_emit_list.
7085 * mi/mi-main.c (print_one_inferior)
7086 (mi_cmd_data_list_register_names)
7087 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7088 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7089 ui_out_emit_list.
7090 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7091 (mi_output_solib_attribs): Use ui_out_emit_list,
7092 ui_out_emit_tuple.
7093 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7094 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7095 (mi_cmd_stack_list_args, list_args_or_locals): Use
7096 ui_out_emit_list.
7097 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7098 * breakpoint.c (print_solib_event, output_thread_groups): Use
7099 ui_out_emit_list.
7100
0092b74d
TT
71012017-04-22 Tom Tromey <tom@tromey.com>
7102
7103 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7104 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7105 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7106
a14a62dd
TT
71072017-04-22 Tom Tromey <tom@tromey.com>
7108
7109 * tracepoint.c (tvariables_info_1)
7110 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7111
46b9c129
TT
71122017-04-22 Tom Tromey <tom@tromey.com>
7113
7114 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7115 annotate_arg_emitter.
7116 * breakpoint.c (print_mention_watchpoint)
7117 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7118 * annotate.h (struct annotate_arg_emitter): New.
7119
2e783024
TT
71202017-04-22 Tom Tromey <tom@tromey.com>
7121
7122 * record-btrace.c (record_btrace_insn_history)
7123 (record_btrace_insn_history_range, record_btrace_call_history)
7124 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7125 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7126 ui_out_emit_tuple.
7127 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7128 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7129 * skip.c (skip_info): Use ui_out_emit_tuple.
7130 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7131 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7132 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7133 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7134 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7135 ui_out_emit_tuple.
7136 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7137 (output_register, mi_cmd_data_read_memory)
7138 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7139 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7140 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7141 Use ui_out_emit_tuple.
7142 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7143 ui_out_emit_tuple.
7144 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7145 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7146 * linux-thread-db.c (info_auto_load_libthread_db): Use
7147 ui_out_emit_tuple.
7148 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7149 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7150 * disasm.c (do_mixed_source_and_assembly_deprecated)
7151 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7152 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7153 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7154 * breakpoint.c (print_one_breakpoint_location)
7155 (print_one_breakpoint): Use ui_out_emit_tuple.
7156 * auto-load.c (print_script, info_auto_load_cmd): Use
7157 ui_out_emit_tuple.
7158 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7159
9be21bb4
SM
71602017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7161
7162 * thread.c (print_thread_info_1): Remove dead code.
7163
0d4c07af
JK
71642017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7165
7166 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7167 GDB_SELF_TEST.
7168 * arm-tdep.c (selftests::arm_record_test): Likewise.
7169
4daf993d
YQ
71702017-04-21 Yao Qi <yao.qi@linaro.org>
7171
7172 * regcache.c (regcache_restore): Remove argument 2. Replace
7173 argument 3 with regcache. Get register status from
7174 src->register_status and get register contents from
7175 register_buffer (src, regnum).
7176 (regcache_cpy): Update.
7177
a6c21d4a
PA
71782017-04-19 Pedro Alves <palves@redhat.com>
7179
7180 * gdbthread.h (thread): Add missing closing parenthesis in
7181 comment.
7182
3a3fd0fd
PA
71832017-04-19 Pedro Alves <palves@redhat.com>
7184
7185 * common/refcounted-object.h: New file.
7186 * gdbthread.h: Include "common/refcounted-object.h".
7187 (thread_info): Inherit from refcounted_object and add comments.
7188 (thread_info::incref, thread_info::decref)
7189 (thread_info::m_refcount): Delete.
7190 (thread_info::deletable): Use the refcounted_object::refcount()
7191 method.
7192 * inferior.c (current_inferior_): Add comment.
7193 (set_current_inferior): Increment/decrement refcounts.
7194 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7195 not-deletable instead of comparing with the current inferior.
7196 (initialize_inferiors): Increment the initial inferior's refcount.
7197 * inferior.h (struct inferior): Forward declare.
7198 Include "common/refcounted-object.h".
7199 (current_inferior, set_current_inferior): Move declaration to
7200 before struct inferior's definition, and fix comment.
7201 (inferior): Inherit from refcounted_object. Add comments.
7202 * thread.c (switch_to_thread_no_regs): Reference the thread's
7203 inferior pointer directly instead of doing a ptid lookup.
7204 (switch_to_no_thread): New function.
7205 (switch_to_thread(thread_info *)): New function, factored out
7206 from ...
7207 (switch_to_thread(ptid_t)): ... this.
7208 (restore_current_thread): Delete.
7209 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7210 fields, and add 'inf' field.
7211 (do_restore_current_thread_cleanup): Check whether old->inf is
7212 alive instead of looking up an inferior by ptid. Use
7213 switch_to_thread and switch_to_no_thread.
7214 (restore_current_thread_cleanup_dtor): Use old->inf directly
7215 instead of lookup up an inferior by id. Decref the inferior.
7216 Don't restore 'removable'.
7217 (make_cleanup_restore_current_thread): Same the inferior pointer
7218 in old, instead of the inferior number. Incref the inferior.
7219 Don't save/clear 'removable'.
7220
9bcb1f16
PA
72212017-04-19 Pedro Alves <palves@redhat.com>
7222
7223 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7224 unittests/scoped_restore-selftests.c.
7225 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7226 * common/scoped_restore.h (scoped_restore_base): Make "class".
7227 (scoped_restore_base::release): New public method.
7228 (scoped_restore_base::scoped_restore_base): New protected ctor.
7229 (scoped_restore_base::m_saved_var): New protected field.
7230 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7231 scoped_restore_base base class instead of m_saved_var directly.
7232 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7233 (scoped_restore_tmpl::scoped_restore_tmpl(const
7234 scoped_restore_tmpl<T>&)): Likewise.
7235 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7236 method.
7237 (scoped_restore_tmpl::saved_var): New method.
7238 (scoped_restore_tmpl::m_saved_var): Delete.
7239 * inferior.h (inferior::detaching): Now a bool.
7240 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7241 cleanup.
7242 * unittests/scoped_restore-selftests.c: New file.
7243
26fcd539
PA
72442017-04-19 Pedro Alves <palves@redhat.com>
7245
7246 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7247 Re-sort in alphabetic order.
7248
fdd243b0
PA
72492017-04-18 Pedro Alves <palves@redhat.com>
7250
7251 * xml-support.c (obstack_xml_printf): Delete.
7252 * xml-support.h (obstack_xml_printf): Delete.
7253
4895cde2
PA
72542017-04-18 Pedro Alves <palves@redhat.com>
7255
7256 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7257 vdebug, verror, body_text, start_element, end_element, name,
7258 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7259 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7260 is_xinclude>: Make private and add m_ prefix.
7261 (gdb_xml_parser::body_text): New method, based on ...
7262 (gdb_xml_body_text): ... this. Adjust.
7263 (gdb_xml_parser::vdebug): New method, based on ...
7264 (gdb_xml_debug): ... this. Adjust.
7265 (gdb_xml_parser::verror): New method, based on ...
7266 (gdb_xml_error): ... this. Adjust.
7267 (gdb_xml_parser::start_element): New method, based on ...
7268 (gdb_xml_start_element): ... this. Adjust.
7269 (gdb_xml_start_element_wrapper): Defer to
7270 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7271 (gdb_xml_parser::end_element): New method, based on ...
7272 (gdb_xml_end_element_wrapper): ... this. Adjust.
7273 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7274 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7275 (gdb_xml_parser::use_dtd): New method, based on ...
7276 (gdb_xml_use_dtd): ... this. Adjust.
7277 (gdb_xml_parser::parse): New method, based on ...
7278 (gdb_xml_parse): ... this. Adjust.
7279 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7280 (xinclude_start_include): Adjust to call the parser's name method.
7281 (xml_xinclude_default, xml_xinclude_start_doctype)
7282 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7283 method.
7284 (xml_process_xincludes): Adjust to call parser methods.
7285 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7286 declarations.
7287
bd8a901f
PA
72882017-04-18 Pedro Alves <palves@redhat.com>
7289
7290 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7291 gdb::optional<std::string>.
7292 * xml-support.c: Include <string>.
7293 (scope_level::scope_level(scope_level &&))
7294 (scope_level::~scope_level): Delete.
7295 (scope_level::body): Now a std::string.
7296 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7297 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7298 parameter.
7299 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7300 (xinclude_parsing_data::output): Now a std::string reference.
7301 (xinclude_start_include): Adjust.
7302 (xml_xinclude_default): Adjust.
7303 (xml_process_xincludes): Add 'output' parameter, and return bool.
7304 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7305 and return bool.
7306 * xml-tdesc.c: Include <unordered_map> and <string>.
7307 (tdesc_xml_cache): Delete.
7308 (tdesc_xml_cache_s): Delete.
7309 (xml_cache): Now an std::unordered_map.
7310 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7311 (target_fetch_description_xml): Change return type to
7312 gdb::optional<std::string>, and adjust.
7313 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7314 (target_fetch_description_xml): Change return type to
7315 gdb::optional<std::string>.
7316
d35d1958
PA
73172017-04-18 Pedro Alves <palves@redhat.com>
7318
7319 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7320 unittests/optional-selftests.c.
7321 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7322 * unittests/optional-selftests.c: New file.
7323 * unittests/optional/assignment/1.cc: New file.
7324 * unittests/optional/assignment/2.cc: New file.
7325 * unittests/optional/assignment/3.cc: New file.
7326 * unittests/optional/assignment/4.cc: New file.
7327 * unittests/optional/assignment/5.cc: New file.
7328 * unittests/optional/assignment/6.cc: New file.
7329 * unittests/optional/assignment/7.cc: New file.
7330 * unittests/optional/cons/copy.cc: New file.
7331 * unittests/optional/cons/default.cc: New file.
7332 * unittests/optional/cons/move.cc: New file.
7333 * unittests/optional/cons/value.cc: New file.
7334 * unittests/optional/in_place.cc: New file.
7335 * unittests/optional/observers/1.cc: New file.
7336 * unittests/optional/observers/2.cc: New file.
7337
22796e97
PA
73382017-04-18 Pedro Alves <palves@redhat.com>
7339
7340 * common/gdb_optional.h: Include common/traits.h.
7341 (in_place_t): New type.
7342 (in_place): New constexpr variable.
7343 (optional::optional): Remove member initialization of
7344 m_instantiated.
7345 (optional::optional(in_place_t...)): New constructor.
7346 (optional::~optional): Use reset.
7347 (optional::optional(const optional&)): New.
7348 (optional::optional(const optional&&)): New.
7349 (optional::optional(T &)): New.
7350 (optional::optional(T &&)): New.
7351 (operator::operator=(const optional &)): New.
7352 (operator::operator=(optional &&)): New.
7353 (operator::operator= (const T &))
7354 (operator::operator= (T &&))
7355 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7356 (operator::reset): New.
7357 (operator::m_instantiated):: Add in-class initializer.
7358 * common/traits.h: Include <type_traits>.
7359 (struct And): New types.
7360
a7fc9b61
PA
73612017-04-18 Pedro Alves <palves@redhat.com>
7362
7363 * xml-support.c: Include <vector>.
7364 (scope_level::scope_level(const gdb_xml_element *))
7365 (scope_level::scope_level(scope_level&&)): New.
7366 (scope_level::~scope_level): New.
7367 (scope_level_s): Delete.
7368 (gdb_xml_parser::scopes): Now a std::vector.
7369 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7370 Use std::vector.
7371 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7372 scope cleanup code.
7373 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7374 of the scopes member. Use std::vector::emplace_back.
7375
010151c9
PA
73762017-04-18 Pedro Alves <palves@redhat.com>
7377
7378 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7379 a bool.
7380 (gdb_xml_end_element): Change type of first parameter.
7381 (gdb_xml_cleanup): Rename to ...
7382 (gdb_xml_parser::~gdb_xml_parser): ... this.
7383 (gdb_xml_create_parser_and_cleanup): Delete with ...
7384 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7385 to this new ctor.
7386 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7387 using gdb_xml_create_parser_and_cleanup.
7388 (xinclude_parsing_data): Add ctor/dtor.
7389 (xml_xinclude_cleanup): Delete.
7390 (xml_process_xincludes): Create a local xinclude_parsing_data
7391 instead of heap-allocating one. Create a local gdb_xml_parser
7392 instead of heap-allocating one with
7393 gdb_xml_create_parser_and_cleanup.
7394
d56060f0
JB
73952017-04-18 John Baldwin <jhb@FreeBSD.org>
7396
7397 PR threads/20743
7398 * fbsd-nat.c (resume_one_thread_cb): Remove.
7399 (resume_all_threads_cb): Remove.
7400 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7401 iterate_over_threads.
7402
305d16a9
JB
74032017-04-17 Joel Brobecker <brobecker@adacore.com>
7404
7405 * NEWS: Create a new section for the next release branch.
7406 Rename the section of the current branch, now that it has
7407 been cut.
7408
8bb57231
JB
74092017-04-17 Joel Brobecker <brobecker@adacore.com>
7410
7411 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7412 * version.in: Bump version to 8.0.50.DATE-git.
7413
096c92dd
SDJ
74142017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7415
7416 PR gdb/21385
7417 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7418 independently of the host, and fix build breakage on Cygwin.
7419
0550c955
PA
74202017-04-13 Pedro Alves <palves@redhat.com>
7421
7422 * inferior.c (free_inferior): Convert to ...
7423 (inferior::~inferior): ... this dtor.
7424 (inferior::inferior): New ctor, factored out from ...
7425 (add_inferior_silent): ... here. Allocate the inferior with a new
7426 expression.
7427 (delete_inferior): Call delete instead of free_inferior.
7428 * inferior.h (gdb_environ, continuation): Forward declare.
7429 (inferior): Now a class. Add in-class initialization to all
7430 members. Make boolean fields bool, except 'detaching'.
7431 (inferior::inferior): New explicit ctor.
7432 (inferior::~inferior): New.
7433
e3d60dfc
PA
74342017-04-13 Pedro Alves <palves@redhat.com>
7435
7436 * inferior.c (init_inferior_list): Delete.
7437 * inferior.h (init_inferior_list): Delete.
7438
5fd69d0a
PA
74392017-04-13 Pedro Alves <palves@redhat.com>
7440
7441 PR threads/13217
7442 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7443 (top level): Call it twice, with different thread sets.
7444
c6609450
PA
74452017-04-13 Pedro Alves <palves@redhat.com>
7446
7447 * thread.c: Include <algorithm>.
7448 (thread_array_cleanup): Delete.
7449 (scoped_inc_dec_ref): New class.
7450 (live_threads_count): New function.
7451 (set_thread_refcount): Delete.
7452 (tp_array_compar_ascending): Now a bool.
7453 (tp_array_compar): Convert to a std::sort comparison function.
7454 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7455 and live_threads_count.
7456
2a00d7ce
PA
74572017-04-13 Pedro Alves <palves@redhat.com>
7458
7459 * infrun.c (follow_fork_inferior): Also switch the current
7460 inferior.
7461
441d7c93
PA
74622017-04-13 Pedro Alves <palves@redhat.com>
7463
7464 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7465 before calling create_internal_breakpoint.
7466
808480f6
PA
74672017-04-13 Pedro Alves <palves@redhat.com>
7468
7469 * fork-child.c (execv_argv): New class.
7470 (breakup_args): Refactored as ...
7471 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7472 Copy arguments to storage and replace separators with NULL
7473 terminators in place.
7474 (escape_bang_in_quoted_argument): Adjust to return bool.
7475 (execv_argv::execv_argv): New ctor.
7476 (execv_argv::init_for_shell): New method, factored out from
7477 fork_inferior. Don't strdup strings into the vector.
7478 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7479 Remove free_vector_argv call.
7480
ad3d022a
YQ
74812017-04-13 Yao Qi <yao.qi@linaro.org>
7482
7483 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7484 tdep->rx_psw_type.
7485
e6ddc3bf
YQ
74862017-04-13 Yao Qi <yao.qi@linaro.org>
7487
7488 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7489 * rx-tdep.c (rx_gdbarch_init): Likewise.
7490
bfb8cf90
PA
74912017-04-13 Pedro Alves <palves@redhat.com>
7492
7493 * breakpoint.h (struct breakpoint): Reindent.
7494
f5336ca5
PA
74952017-04-13 Pedro Alves <palves@redhat.com>
7496
7497 * breakpoint.c (bp_location): Rename to ...
7498 (bp_locations): ... this. All references updated.
7499 (bp_location_count): Rename to ...
7500 (bp_locations_count): ... this. All references updated.
7501 (bp_location_placed_address_before_address_max): Rename to ...
7502 (bp_locations_placed_address_before_address_max): ... this. All
7503 references updated.
7504 (bp_location_shadow_len_after_address_max): Rename to ...
7505 (bp_locations_shadow_len_after_address_max): ... this. All
7506 references updated.
7507 (bp_location_compare_addrs): Rename to ...
7508 (bp_locations_compare_addrs): ... this. All references updated.
7509 (bp_location_compare):Rename to ...
7510 (bp_locations_compare): ... this. All references updated.
7511 (bp_location_target_extensions_update): Rename to ...
7512 (bp_locations_target_extensions_update): ... this. All references
7513 updated.
7514
be628ab8
SDJ
75152017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7516
7517 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7518 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7519 'sgtty.h'.
7520 * common/gdb_termios.h: New file, with parts of "terminal.h".
7521 * inflow.c: Include "gdb_termios.h".
7522 * ser-unix.c: Include "gdb_termios.h".
7523 * terminal.h: Move terminal-related defines to
7524 "common/gdb_termios.h".
7525
8e9e35b1
TT
75262017-04-12 Tom Tromey <tom@tromey.com>
7527
7528 * probe.c (parse_probes): Update.
7529 * location.h (delete_event_location): Don't declare.
7530 (event_location_deleter::operator()): Update.
7531 * location.c (event_location_deleter::operator()): Rename from
7532 delete_event_location.
7533 * linespec.h (linespec_result) <location>: Change type to
7534 event_location_up.
7535 * linespec.c (canonicalize_linespec, event_location_to_sals)
7536 (decode_objc): Update.
7537 (linespec_result): Don't call delete_event_location.
7538 * breakpoint.c (create_breakpoints_sal)
7539 (bkpt_probe_create_sals_from_location)
7540 (strace_marker_create_sals_from_location): Update.
7541
16e802b9
TT
75422017-04-12 Tom Tromey <tom@tromey.com>
7543
7544 * linespec.h (struct linespec_result): Add constructor and
7545 destructor.
7546 (init_linespec_result, destroy_linespec_result)
7547 (make_cleanup_destroy_linespec_result): Don't declare.
7548 * linespec.c (init_linespec_result): Remove.
7549 (linespec_result::~linespec_result): Rename from
7550 destroy_linespec_result. Update.
7551 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7552 Remove.
7553 * breakpoint.c (create_breakpoint, break_range_command)
7554 (decode_location_default): Update.
7555 * ax-gdb.c (agent_command_1): Update.
7556
d28cd78a
TT
75572017-04-12 Tom Tromey <tom@tromey.com>
7558
7559 * remote.c (remote_download_tracepoint): Update.
7560 * python/py-breakpoint.c (bppy_get_location): Update.
7561 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7562 (gdbscm_breakpoint_location): Update.
7563 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7564 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7565 Change type to event_location_up.
7566 * breakpoint.c (create_overlay_event_breakpoint)
7567 (create_longjmp_master_breakpoint)
7568 (create_std_terminate_master_breakpoint)
7569 (create_exception_master_breakpoint)
7570 (breakpoint_event_location_empty_p, print_breakpoint_location)
7571 (print_one_breakpoint_location, create_thread_event_breakpoint)
7572 (init_breakpoint_sal, create_breakpoint)
7573 (print_recreate_ranged_breakpoint, break_range_command)
7574 (init_ada_exception_breakpoint, say_where): Update.
7575 (base_breakpoint_dtor): Don't call delete_event_location.
7576 (bkpt_print_recreate, tracepoint_print_recreate)
7577 (dprintf_print_recreate, update_static_tracepoint)
7578 (breakpoint_re_set_default): Update.
7579
711799d5
TT
75802017-04-12 Tom Tromey <tom@tromey.com>
7581
7582 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7583 type of "to_do". Update.
7584 (compute_stack_depth): Use std::vector.
7585
52d214d3
TT
75862017-04-12 Tom Tromey <tom@tromey.com>
7587
7588 * printcmd.c (find_instruction_backward): Use std::vector.
7589
4c404b8b
TT
75902017-04-12 Tom Tromey <tom@tromey.com>
7591
7592 * symfile.c (objfilep): Remove typedef.
7593 (reread_symbols): Use a std::vector.
7594
156d9eab
TT
75952017-04-12 Tom Tromey <tom@tromey.com>
7596
7597 * mi/mi-main.c (exec_direction_forward): Remove.
7598 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7599 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7600 scoped_restore.
7601 * guile/guile.c (guile_repl_command, guile_command)
7602 (gdbscm_execute_gdb_command): Use scoped_restore.
7603 * go-exp.y (go_parse): Use scoped_restore.
7604 * d-exp.y (d_parse): Use scoped_restore.
7605 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7606 * c-exp.y (c_parse): Use scoped_restore.
7607
4d89769a
TT
76082017-04-12 Tom Tromey <tom@tromey.com>
7609
7610 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7611 (mi_parse): Update return type.
7612 (mi_parse_free): Remove.
7613 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7614 (mi_parse::~mi_parse): Rename from mi_parse_free.
7615 (mi_parse_cleanup): Remove.
7616 (mi_parse): Return a unique_ptr. Use new.
7617 * mi/mi-main.c (mi_execute_command): Update.
7618
4b217cc7
TT
76192017-04-12 Tom Tromey <tom@tromey.com>
7620
7621 * location.c (explicit_location_lex_one): Return a
7622 unique_xmalloc_ptr.
7623 (string_to_explicit_location): Update. Remove cleanups.
7624
59d3651b
TT
76252017-04-12 Tom Tromey <tom@tromey.com>
7626
7627 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7628 (compare_value_and_voffset): Change type. Update.
7629 (compute_vtable_size): Change type of "offset_vec".
7630 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7631 (gnuv3_get_typeid): Remove extraneous declaration.
7632
b24b0d6c
TT
76332017-04-12 Tom Tromey <tom@tromey.com>
7634
7635 * charset.h (wchar_iterator): Fix comment.
7636
80a3b8c5
TT
76372017-04-12 Tom Tromey <tom@tromey.com>
7638
7639 * charset.c (iconv_wrapper): New class.
7640 (cleanup_iconv): Remove.
7641 (convert_between_encodings): Use it.
7642
c83dd867
TT
76432017-04-12 Tom Tromey <tom@tromey.com>
7644
7645 * symfile.h (increment_reading_symtab): Update type.
7646 * symfile.c (decrement_reading_symtab): Remove.
7647 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7648 * psymtab.c (psymtab_to_symtab): Update.
7649 * dwarf2read.c (dw2_instantiate_symtab): Update.
7650
0e8621a0
TT
76512017-04-12 Tom Tromey <tom@tromey.com>
7652
7653 * jit.c (struct jit_reader): Declare separately. Add constructor
7654 and destructor. Change type of "handle".
7655 (loaded_jit_reader): Define separately.
7656 (jit_reader_load): Update. New "new".
7657 (jit_reader_unload_command): Use "delete".
7658 * gdb-dlfcn.h (struct dlclose_deleter): New.
7659 (gdb_dlhandle_up): New typedef.
7660 (gdb_dlopen, gdb_dlsym): Update types.
7661 (gdb_dlclose): Remove.
7662 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7663 (gdb_dlsym): Change type of "handle".
7664 (make_cleanup_dlclose): Remove.
7665 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7666 * compile/compile-c-support.c (load_libcc): Update.
7667
67d89901
TT
76682017-04-12 Tom Tromey <tom@tromey.com>
7669
7670 * symtab.h (find_pcs_for_symtab_line): Change return type.
7671 * symtab.c (find_pcs_for_symtab_line): Change return type.
7672 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7673 type of "vec". Update.
7674 (ltpy_get_pcs_for_line): Update.
7675 * linespec.c (decode_digits_ordinary): Update.
7676
93921405
TT
76772017-04-12 Tom Tromey <tom@tromey.com>
7678
7679 * tracepoint.c (actions_command): Update.
7680 * python/python.c (python_command, python_interactive_command):
7681 Update.
7682 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7683 * guile/guile.c (guile_command): Update.
7684 * defs.h (read_command_lines, read_command_lines_1): Return
7685 command_line_up.
7686 (command_lines_deleter): New struct.
7687 (command_line_up): New typedef.
7688 * compile/compile.c (compile_code_command)
7689 (compile_print_command): Update.
7690 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7691 command_line_up.
7692 (make_cleanup_free_command_lines): Remove.
7693 * cli/cli-script.c (get_command_line, read_command_lines_1)
7694 (copy_command_lines): Return command_line_up.
7695 (while_command, if_command, read_command_lines, define_command)
7696 (document_command): Update.
7697 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7698 Remove.
7699 * breakpoint.h (breakpoint_set_commands): Change type of
7700 "commands".
7701 * breakpoint.c (breakpoint_set_commands): Change type of
7702 "commands". Update.
7703 (do_map_commands_command, update_dprintf_command_list)
7704 (create_tracepoint_from_upload): Update.
7705
ffc2605c
TT
77062017-04-12 Tom Tromey <tom@tromey.com>
7707
7708 * tracepoint.c (scope_info): Update.
7709 * spu-tdep.c (spu_catch_start): Update.
7710 * python/python.c (gdbpy_decode_line): Update.
7711 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7712 * python/py-breakpoint.c (bppy_init): Update.
7713 * probe.c (parse_probes): Update.
7714 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7715 * location.h (event_location_deleter): New struct.
7716 (event_location_up): New typedef.
7717 (new_linespec_location, new_address_location, new_probe_location)
7718 (new_explicit_location, copy_event_location)
7719 (string_to_event_location, string_to_event_location_basic)
7720 (string_to_explicit_location): Update return type.
7721 (make_cleanup_delete_event_location): Remove.
7722 * location.c (new_linespec_location, new_address_location)
7723 (new_probe_location, new_explicit_location, copy_event_location):
7724 Return event_location_up.
7725 (delete_event_location_cleanup)
7726 (make_cleanup_delete_event_location): Remove.
7727 (string_to_explicit_location, string_to_event_location_basic)
7728 (string_to_event_location): Return event_location_up.
7729 * linespec.c (canonicalize_linespec, event_location_to_sals)
7730 (decode_line_with_current_source)
7731 (decode_line_with_last_displayed, decode_objc): Update.
7732 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7733 * completer.c (location_completer): Update.
7734 * cli/cli-cmds.c (edit_command, list_command): Update.
7735 * breakpoint.c (create_overlay_event_breakpoint)
7736 (create_longjmp_master_breakpoint)
7737 (create_std_terminate_master_breakpoint)
7738 (create_exception_master_breakpoint)
7739 (create_thread_event_breakpoint): Update.
7740 (init_breakpoint_sal): Update. Remove some dead code.
7741 (create_breakpoint_sal): Change type of "location". Update.
7742 (create_breakpoints_sal, create_breakpoint, break_command_1)
7743 (dprintf_command, break_range_command, until_break_command)
7744 (init_ada_exception_breakpoint)
7745 (strace_marker_create_sals_from_location)
7746 (update_static_tracepoint, trace_command, ftrace_command)
7747 (strace_command, create_tracepoint_from_upload): Update.
7748 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7749 * ax-gdb.c (agent_command_1): Update.
7750
8f10c932
PA
77512017-04-12 Pedro Alves <palves@redhat.com>
7752
7753 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7754 * configure.tgt: Handle i[34567]86-*-go32* and
7755 i[34567]86-*-msdosdjgpp*.
7756 * i386-tdep.c (i386_svr4_reg_to_regnum):
7757 Make extern.
7758 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7759 i386-go32-tdep.c.
7760 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7761 * i386-go32-tdep.c: New file.
7762 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7763 declarations.
7764
0a31ccfb
SM
77652017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7766
7767 * aix-thread.c (pd_status2str): Change return type to const char *.
7768
e9bb3fbb
PA
77692017-04-12 Pedro Alves <palves@redhat.com>
7770
7771 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7772 calls to set_gdbarch_gnu_triplet_regexp.
7773
53375380
PA
77742017-04-12 Pedro Alves <palves@redhat.com>
7775
7776 PR gdb/21323
7777 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7778 New enum value.
7779 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7780 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7781 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7782 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7783 * gdbarch.h, gdbarch.c: Regenerate.
7784 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7785 gdbarch_wchar_bit and gdbarch_wchar_signed.
7786 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7787 * arm-tdep.c (arm_gdbarch_init): Likewise.
7788 * avr-tdep.c (avr_gdbarch_init): Likewise.
7789 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7790 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7791 * i386-tdep.c (i386_go32_init_abi): Likewise.
7792 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7793 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7794 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7795 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7796 * sh-tdep.c (sh_gdbarch_init): Likewise.
7797 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7798 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7799 * windows-tdep.c (windows_init_abi): Likewise.
7800 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7801
53e710ac
PA
78022017-04-12 Pedro Alves <palves@redhat.com>
7803
7804 PR c++/21323
7805 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7806 cplus_primitive_type_char32_t>: New enum values.
7807 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7808 and cplus_primitive_type_char32_t.
7809 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7810 32, use the archtecture's built-in type for char16_t and char32_t,
7811 respectively. Otherwise, fallback to init_integer_type as before,
7812 but make the type unsigned, and issue a complaint.
7813 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7814
ab0538b8
AH
78152017-04-12 Alan Hayward <alan.hayward@arm.com>
7816
5e0e0422 7817 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
7818 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7819
5430098f
SDJ
78202017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7821
7822 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7823 'const char *'.
7824
7c5ded6a
SDJ
78252017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7826
7827 * common/common-utils.c (free_vector_argv): New function.
7828 * common/common-utils.h: Include <vector>.
7829 (free_vector_argv): New prototype.
7830 * darwin-nat.c (darwin_create_inferior): Rewrite function
7831 prototype in order to constify "exec_file" and accept a
7832 "std::string" for "allargs".
7833 * fork-child.c: Include <vector>.
7834 (breakup_args): Rewrite function, using C++.
7835 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7836 and accept "std::string" for "allargs". Update the code to
7837 calculate "argv" based on "allargs". Update calls to "exec_fun"
7838 and "execvp".
7839 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7840 order to constify "exec_file" and accept a "std::string" for
7841 "allargs".
7842 * go32-nat.c (go32_create_inferior): Likewise.
7843 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7844 * infcmd.c (run_command_1): Constify "exec_file". Use
7845 "std::string" for inferior arguments.
7846 * inferior.h (fork_inferior): Update prototype.
7847 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7848 prototype in order to constify "exec_file" and accept a
7849 "std::string" for "allargs".
7850 * nto-procfs.c (procfs_create_inferior): Likewise.
7851 * procfs.c (procfs_create_inferior): Likewise.
7852 * remote-sim.c (gdbsim_create_inferior): Likewise.
7853 * remote.c (extended_remote_run): Update code to accept
7854 "std::string" as argument.
7855 (extended_remote_create_inferior): Rewrite function prototype in
7856 order to constify "exec_file" and accept a "std::string" for
7857 "allargs".
7858 * rs6000-nat.c (super_create_inferior): Likewise.
7859 (rs6000_create_inferior): Likewise.
7860 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7861 * windows-nat.c (windows_create_inferior): Likewise.
7862
ae0eee42
PA
78632017-04-11 Pedro Alves <palves@redhat.com>
7864
7865 * thread.c: Fix whitespace throughout.
7866
a6acac06
PR
78672017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7868
7869 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7870
64403bd1
AH
78712017-04-11 Alan Hayward <alan.hayward@arm.com>
7872
7873 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7874
a5bef50f
SDJ
78752017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7876
7877 PR gdb/21364
7878 * osdata.c (info_osdata): Check if 'type' is an empty string
7879 instead of NULL.
7880
9295a5a9
PA
78812017-04-10 Pedro Alves <palves@redhat.com>
7882
7883 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7884 (ptid_to_global_thread_id, in_thread_list)
7885 (do_captured_list_thread_ids, set_resumed, set_running)
7886 (set_executing, set_stop_requested, finish_thread_state)
7887 (validate_registers_access, can_access_registers_ptid)
7888 (print_thread_info_1, switch_to_thread)
7889 (do_restore_current_thread_cleanup)
7890 (make_cleanup_restore_current_thread, thread_command)
7891 (thread_name_command): Use operator== instead of ptid_equal.
7892
996812e3
PA
78932017-04-10 Pedro Alves <palves@redhat.com>
7894
7895 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7896 (current_thread_cleanup_chain): Delete.
7897 (restore_current_thread_cleanup_dtor)
7898 (make_cleanup_restore_current_thread): Remove references to
7899 current_thread_cleanup_chain.
7900
845b344f
AH
79012017-04-10 Alan Hayward <alan.hayward@arm.com>
7902
7903 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7904 REG_UNKNOWN.
7905
803bdfe4
YQ
79062017-04-10 Yao Qi <yao.qi@linaro.org>
7907
7908 PR gdb/19942
7909 * gdbthread.h (thread_info::deletable): New method.
7910 (thread_info::incref): New method.
7911 (thread_info::decref): New method.
7912 (thread_info::refcount): Move it to private.
7913 * infrun.c (save_stop_context): Call inc_refcount.
7914 (release_stop_context_cleanup): Likewise.
7915 * thread.c (set_thread_exited): New function.
7916 (init_thread_list): Delete "tp" only it is deletable, otherwise
7917 call set_thread_exited.
7918 (delete_thread_1): Call set_thread_exited.
7919 (current_thread_cleanup) <inferior_pid>: Remove.
7920 <thread>: New field.
7921 (restore_current_thread_ptid_changed): Removed.
7922 (do_restore_current_thread_cleanup): Adjust.
7923 (restore_current_thread_cleanup_dtor): Don't call
7924 find_thread_ptid.
7925 (set_thread_refcount): Use dec_refcount.
7926 (make_cleanup_restore_current_thread): Adjust.
7927 (thread_apply_all_command): Call inc_refcount.
7928 (_initialize_thread): Don't call
7929 observer_attach_thread_ptid_changed.
7930
8c25b497
YQ
79312017-04-10 Yao Qi <yao.qi@linaro.org>
7932
7933 * thread.c (delete_thread_1): Hoist code on marking thread as
7934 exited.
7935
8473b447
SM
79362017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7937
7938 * windows-nat.c (windows_detach): Initialize ptid with
7939 minus_one_ptid.
7940
6670ec13
SM
79412017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7942
7943 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7944
ba2f91bb
AH
79452017-04-07 Alan Hayward <alan.hayward@arm.com>
7946
7947 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7948 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7949 (bfin_pseudo_register_write): Likewise
7950
436252de
SM
79512017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7952
7953 * common/ptid.h (struct ptid): Change to...
7954 (class ptid_t): ... this.
7955 <ptid_t>: New constructors.
7956 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7957 matches>: New methods.
7958 <make_null, make_minus_one>: New static methods.
7959 <pid>: Rename to...
7960 <m_pid>: ...this.
7961 <lwp>: Rename to...
7962 <m_lwp>: ...this.
7963 <tid>: Rename to...
7964 <m_tid>: ...this.
7965 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7966 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7967 as references, move comment to class ptid_t.
7968 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7969 ptid_t static methods.
7970 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7971 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7972 Take ptid arguments as references, implement using ptid_t methods.
7973 * unittests/ptid-selftests.c: New file.
7974 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7975 unittests/ptid-selftests.c.
7976 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7977
0dedf377
TP
79782017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7979
7980 * python/python.c (python_run_simple_file): Cast mode literal to
7981 non-const char pointer as expected by PyFile_FromString.
7982
4e9868d4
SM
79832017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7984
7985 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7986 minus_one_ptid and null_ptid.
7987
9bf2a700
PA
79882017-04-05 Pedro Alves <palves@redhat.com>
7989
7990 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7991 * configure: Regenerate.
7992
a121b7c1
PA
79932017-04-05 Pedro Alves <palves@redhat.com>
7994
7995 * ada-exp.y (yyerror): Constify.
7996 * ada-lang.c (bound_name, get_selections)
7997 (ada_variant_discrim_type)
7998 (ada_variant_discrim_name, ada_value_struct_elt)
7999 (ada_lookup_struct_elt_type, is_unchecked_variant)
8000 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8001 (catch_ada_exception_command_split)
8002 (catch_ada_assert_command_split, catch_assert_command)
8003 (ada_op_name): Constify.
8004 * ada-lang.h (ada_yyerror, get_selections)
8005 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8006 * arc-tdep.c (arc_print_frame_cache): Constify.
8007 * arm-tdep.c (arm_skip_stub): Constify.
8008 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8009 (gen_aggregate_elt_ref): Constify.
8010 * bcache.c (print_bcache_statistics): Constify.
8011 * bcache.h (print_bcache_statistics): Constify.
8012 * break-catch-throw.c (catch_exception_command_1):
8013 * breakpoint.c (struct ep_type_description::description):
8014 Constify.
8015 (add_solib_catchpoint): Constify.
8016 (catch_fork_command_1): Add cast.
8017 (add_catch_command): Constify.
8018 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8019 Constify.
8020 * bsd-uthread.c (bsd_uthread_state): Constify.
8021 * buildsym.c (patch_subfile_names): Constify.
8022 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8023 Constify.
8024 * c-exp.y (yyerror): Constify.
8025 (token::oper): Constify.
8026 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8027 * c-varobj.c (cplus_describe_child): Constify.
8028 * charset.c (find_charset_names): Add cast.
8029 (find_charset_names): Constify array and add const_cast.
8030 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8031 (edit_command): Constify.
8032 * cli/cli-decode.c (lookup_cmd): Constify.
8033 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8034 Constify.
8035 (struct dump_context): Constify.
8036 (add_dump_command, restore_command): Constify.
8037 * cli/cli-script.c (get_command_line): Constify.
8038 * cli/cli-script.h (get_command_line): Constify.
8039 * cli/cli-utils.c (check_for_argument): Constify.
8040 * cli/cli-utils.h (check_for_argument): Constify.
8041 * coff-pe-read.c (struct read_pe_section_data): Constify.
8042 * command.h (lookup_cmd): Constify.
8043 * common/print-utils.c (decimal2str): Constify.
8044 * completer.c (gdb_print_filename): Constify.
8045 * corefile.c (set_gnutarget): Constify.
8046 * cp-name-parser.y (yyerror): Constify.
8047 * cp-valprint.c (cp_print_class_member): Constify.
8048 * cris-tdep.c (cris_register_name, crisv32_register_name):
8049 Constify.
8050 * d-exp.y (yyerror): Constify.
8051 (struct token::oper): Constify.
8052 * d-lang.h (d_yyerror): Constify.
8053 * dbxread.c (struct header_file_location::name): Constify.
8054 (add_old_header_file, add_new_header_file, last_function_name)
8055 (dbx_next_symbol_text, add_bincl_to_list)
8056 (find_corresponding_bincl_psymtab, set_namestring)
8057 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8058 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8059 * defs.h (command_line_input, print_address_symbolic)
8060 (deprecated_readline_begin_hook): Constify.
8061 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8062 Constify.
8063 * event-top.c (handle_line_of_input): Constify and add cast.
8064 * exceptions.c (catch_errors): Constify.
8065 * exceptions.h (catch_errors): Constify.
8066 * expprint.c (print_subexp_standard, op_string, op_name)
8067 (op_name_standard, dump_raw_expression, dump_raw_expression):
8068 * expression.h (op_name, op_string, dump_raw_expression):
8069 Constify.
8070 * f-exp.y (yyerror): Constify.
8071 (struct token::oper): Constify.
8072 (struct f77_boolean_val::name): Constify.
8073 * f-lang.c (f_word_break_characters): Constify.
8074 * f-lang.h (f_yyerror): Constify.
8075 * fork-child.c (fork_inferior): Add cast.
8076 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8077 (new_variant): Constify.
8078 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8079 * gdbarch.c: Regenerate.
8080 * gdbcore.h (set_gnutarget): Constify.
8081 * go-exp.y (yyerror): Constify.
8082 (token::oper): Constify.
8083 * go-lang.h (go_yyerror): Constify.
8084 * go32-nat.c (go32_sysinfo): Constify.
8085 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8086 * guile/scm-cmd.c (cmdscm_function): Constify.
8087 * guile/scm-param.c (pascm_param_value): Constify.
8088 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8089 (h8300sx_register_name): Constify.
8090 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8091 Constify.
8092 * ia64-tdep.c (ia64_register_names): Constify.
8093 * infcmd.c (construct_inferior_arguments): Constify.
8094 (path_command, attach_post_wait): Constify.
8095 * language.c (show_range_command, show_case_command)
8096 (unk_lang_error): Constify.
8097 * language.h (language_defn::la_error)
8098 (language_defn::la_name_of_this): Constify.
8099 * linespec.c (decode_line_2): Constify.
8100 * linux-thread-db.c (thread_db_err_str): Constify.
8101 * lm32-tdep.c (lm32_register_name): Constify.
8102 * m2-exp.y (yyerror): Constify.
8103 * m2-lang.h (m2_yyerror): Constify.
8104 * m32r-tdep.c (m32r_register_names): Constify and make static.
8105 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8106 * m88k-tdep.c (m88k_register_name): Constify.
8107 * macroexp.c (appendmem): Constify.
8108 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8109 (upgrade_type, parse_external, parse_partial_symbols)
8110 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8111 (new_symbol): Constify.
8112 * memattr.c (mem_info_command): Constify.
8113 * mep-tdep.c (register_name_from_keyword): Constify.
8114 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8115 Constify.
8116 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8117 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8118 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8119 cast.
8120 (mi_execute_async_cli_command): Constify.
8121 * mips-tdep.c (mips_register_name): Constify.
8122 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8123 (am33_register_name, am33_2_register_name)
8124 * moxie-tdep.c (moxie_register_names): Constify.
8125 * nat/linux-osdata.c (osdata_type): Constify fields.
8126 * nto-tdep.c (nto_parse_redirection): Constify.
8127 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8128 (lookup_child_selector): Constify.
8129 (objc_methcall::name): Constify.
8130 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8131 (lookup_struct_typedef): Constify.
8132 * objfiles.c (pc_in_section): Constify.
8133 * objfiles.h (pc_in_section): Constify.
8134 * p-exp.y (struct token::oper): Constify.
8135 (yyerror): Constify.
8136 * p-lang.h (pascal_yyerror): Constify.
8137 * parser-defs.h (op_name_standard): Constify.
8138 (op_print::string): Constify.
8139 (exp_descriptor::op_name): Constify.
8140 * printcmd.c (print_address_symbolic): Constify.
8141 * psymtab.c (print_partial_symbols): Constify.
8142 * python/py-breakpoint.c (stop_func): Constify.
8143 (bppy_get_expression): Constify.
8144 * python/py-cmd.c (cmdpy_completer::name): Constify.
8145 (cmdpy_function): Constify.
8146 * python/py-event.c (evpy_add_attribute)
8147 (gdbpy_initialize_event_generic): Constify.
8148 * python/py-event.h (evpy_add_attribute)
8149 (gdbpy_initialize_event_generic): Constify.
8150 * python/py-evts.c (add_new_registry): Constify.
8151 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8152 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8153 * python/py-inferior.c (get_buffer): Add cast.
8154 * python/py-param.c (parm_constant::name): Constify.
8155 * python/py-unwind.c (fprint_frame_id): Constify.
8156 * python/python.c (gdbpy_parameter_value): Constify.
8157 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8158 * remote.c (memory_packet_config::name): Constify.
8159 (show_packet_config_cmd, remote_write_bytes)
8160 (remote_buffer_add_string):
8161 * reverse.c (exec_reverse_once): Constify.
8162 * rs6000-tdep.c (variant::name, variant::description): Constify.
8163 * rust-exp.y (rustyyerror): Constify.
8164 * rust-lang.c (rust_op_name): Constify.
8165 * rust-lang.h (rustyyerror): Constify.
8166 * serial.h (serial_ops::name): Constify.
8167 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8168 (sh_sh3e_register_name, sh_sh2e_register_name)
8169 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8170 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8171 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8172 (sh_sh4al_dsp_register_name): Constify.
8173 * sh64-tdep.c (sh64_register_name): Constify.
8174 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8175 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8176 * stabsread.c (patch_block_stabs, read_type_number)
8177 (ref_map::stabs, ref_add, process_reference)
8178 (symbol_reference_defined, define_symbol, define_symbol)
8179 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8180 (read_one_struct_field, read_struct_fields, read_baseclasses)
8181 (read_tilde_fields, read_struct_type, read_array_type)
8182 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8183 (read_huge_number, read_range_type, read_args, common_block_start)
8184 (find_name_end): Constify.
8185 * stabsread.h (common_block_start, define_symbol)
8186 (process_one_symbol, symbol_reference_defined, ref_add):
8187 * symfile.c (get_section_index, add_symbol_file_command):
8188 * symfile.h (get_section_index): Constify.
8189 * target-descriptions.c (tdesc_type::name): Constify.
8190 (tdesc_free_type): Add cast.
8191 * target.c (find_default_run_target):
8192 (add_deprecated_target_alias, find_default_run_target)
8193 (target_announce_detach): Constify.
8194 (do_option): Constify.
8195 * target.h (add_deprecated_target_alias): Constify.
8196 * thread.c (print_thread_info_1): Constify.
8197 * top.c (deprecated_readline_begin_hook, command_line_input):
8198 Constify.
8199 (init_main): Add casts.
8200 * top.h (handle_line_of_input): Constify.
8201 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8202 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8203 (tfind_command): Rename to ...
8204 (tfind_command_1): ... this and constify.
8205 (tfind_command): New function.
8206 (tfind_end_command, tfind_start_command): Adjust.
8207 (encode_source_string): Constify.
8208 * tracepoint.h (encode_source_string): Constify.
8209 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8210 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8211 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8212 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8213 * tui/tui-win.c (parse_scrolling_args): Constify.
8214 * tui/tui-windata.c (tui_erase_data_content): Constify.
8215 * tui/tui-windata.h (tui_erase_data_content): Constify.
8216 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8217 * tui/tui.c (tui_enable): Add cast.
8218 * utils.c (defaulted_query): Constify.
8219 (init_page_info): Add cast.
8220 (puts_debug, subset_compare): Constify.
8221 * utils.h (subset_compare): Constify.
8222 * varobj.c (varobj_format_string): Constify.
8223 * varobj.h (varobj_format_string): Constify.
8224 * vax-tdep.c (vax_register_name): Constify.
8225 * windows-nat.c (windows_detach): Constify.
8226 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8227 * xml-support.c (gdb_xml_end_element): Constify.
8228 * xml-tdesc.c (tdesc_start_reg): Constify.
8229 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8230 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8231 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8232
995816ba
PA
82332017-04-05 Pedro Alves <palves@redhat.com>
8234
8235 * proc-api.c (struct trans): Constify.
8236 (procfs_note): Constify.
8237 * proc-events.c (struct trans, syscall_table):
8238 * proc-flags.c (struct trans): Constify.
8239 * proc-utils.h (procfs_note): Constify.
8240 * proc-why.c (struct trans): Constify.
8241 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8242 (procfs_detach): Constify.
8243 * sol-thread.c (struct string_map): Constify.
8244 (td_err_string, td_state_string): Constify.
8245
3e83a920
PA
82462017-04-05 Pedro Alves <palves@redhat.com>
8247
8248 * proc-api.c (procfs_filename): Don't initialize
8249 procfs_filename.
8250 (prepare_to_trace): Assume procfs_filename is non-NULL.
8251 (_initialize_proc_api): Give procfs_filename a default value here.
8252
63160a43
PA
82532017-04-05 Pedro Alves <palves@redhat.com>
8254
8255 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8256 'cond_string' parameter.
8257 (extract_exception_regexp): Constify 'string' parameter.
8258 (catch_exception_command_1): Constify.
8259 * breakpoint.c (init_catchpoint)
8260 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8261 parameter.
8262 (ep_parse_optional_if_clause, catch_fork_command_1)
8263 (catch_exec_command_1): Constify.
8264 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8265 parameter.
8266 (ep_parse_optional_if_clause): Constify.
8267 * cli/cli-utils.c (remove_trailing_whitespace)
8268 (check_for_argument): Constify.
8269 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8270 non-const overload.
8271 (check_for_argument): Likewise.
8272
9b2eba3d
PA
82732017-04-05 Pedro Alves <palves@redhat.com>
8274
8275 * event-top.c (command_line_handler): Add cast to execute_command
8276 call.
8277 * record-btrace.c (cmd_record_btrace_bts_start)
8278 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8279 (cmd_record_btrace_start): Add cast to execute_command call.
8280 * record-full.c (record_full_goto_insn):
8281 * record.c (record_start, record_stop): Add cast to
8282 execute_command_to_string calls.
8283 (cmd_record_start): Add cast to execute_command calls.
8284
2adadf51
PA
82852017-04-05 Pedro Alves <palves@redhat.com>
8286
8287 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8288 static inline function.
8289 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8290 array and use gdb_PyArg_ParseTupleAndKeywords.
8291 * python/py-cmd.c (cmdpy_init): Likewise.
8292 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8293 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8294 (infpy_search_memory): Likewise.
8295 * python/py-objfile.c (objfpy_add_separate_debug_file)
8296 (gdbpy_lookup_objfile): Likewise.
8297 * python/py-symbol.c (gdbpy_lookup_symbol)
8298 (gdbpy_lookup_global_symbol): Likewise.
8299 * python/py-type.c (gdbpy_lookup_type): Likewise.
8300 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8301 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8302 Likewise.
8303
0d1f4ceb
PA
83042017-04-05 Pedro Alves <palves@redhat.com>
8305
8306 * python/python-internal.h (gdb_PyGetSetDef): New type.
8307 * python/py-block.c (block_object_getset)
8308 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8309 * python/py-event.c (event_object_getset)
8310 (finish_breakpoint_object_getset): Likewise.
8311 * python/py-inferior.c (inferior_object_getset): Likewise.
8312 * python/py-infthread.c (thread_object_getset): Likewise.
8313 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8314 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8315 * python/py-objfile.c (objfile_getset): Likewise.
8316 * python/py-progspace.c (pspace_getset): Likewise.
8317 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8318 Likewise.
8319 * python/py-record.c (recpy_record_getset): Likewise.
8320 * python/py-symbol.c (symbol_object_getset): Likewise.
8321 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8322 Likewise.
8323 * python/py-type.c (type_object_getset, field_object_getset):
8324 Likewise.
8325 * python/py-value.c (value_object_getset): Likewise.
8326
4d759979
PA
83272017-04-05 Pedro Alves <palves@redhat.com>
8328
8329 * python/python-internal.h (gdb_PyObject_CallMethod)
8330 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8331 New functions.
8332 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8333 (PySys_GetObject, PySys_SetPath): New macros.
8334
fdf9e36f
PA
83352017-04-05 Pedro Alves <palves@redhat.com>
8336
8337 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8338 info_osdata_command.
8339 * osdata.c (info_osdata_command): Rename to ...
8340 (info_osdata): ... this. Constify 'type' parameter, and remove
8341 the 'from_tty' parameter. Accept NULL TYPE.
8342 (info_osdata_command): New function.
8343 * osdata.h (info_osdata_command): Remove declaration.
8344 (info_osdata): New declaration.
8345
9f33b8b7
PA
83462017-04-05 Pedro Alves <palves@redhat.com>
8347
8348 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8349 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8350 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8351 parameter.
8352 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8353 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8354 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8355 parameter.
8356 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8357 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8358 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8359 (mi_cmd_file_list_exec_source_files)
8360 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8361 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8362 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8363 parameter.
8364 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8365 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8366 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8367 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8368 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8369 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8370 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8371 'command' parameter.
8372 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8373 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8374 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8375 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8376 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8377 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8378 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8379 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8380 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8381 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8382 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8383 parameter.
8384 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8385 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8386 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8387 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8388 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8389 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8390 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8391 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8392 (mi_cmd_data_list_changed_registers)
8393 (mi_cmd_data_write_register_values)
8394 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8395 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8396 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8397 (mi_cmd_list_features, mi_cmd_list_target_features)
8398 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8399 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8400 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8401 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8402 (mi_cmd_trace_frame_collected): Constify 'command'
8403 parameter.
8404 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8405 'command' parameter.
8406
67cb5b2d
PA
84072017-04-05 Pedro Alves <palves@redhat.com>
8408
8409 * ada-lang.c (ada_completer_word_break_characters): Now a const
8410 array.
8411 (ada_get_gdb_completer_word_break_characters): Constify.
8412 * completer.c (gdb_completer_command_word_break_characters)
8413 (gdb_completer_file_name_break_characters)
8414 (gdb_completer_quote_characters): Now const arrays.
8415 (get_gdb_completer_quote_characters): Constify.
8416 (set_rl_completer_word_break_characters): New function.
8417 (set_gdb_completion_word_break_characters)
8418 (complete_line_internal): Use it.
8419 * completer.h (get_gdb_completer_quote_characters): Constify.
8420 (set_rl_completer_word_break_characters): Declare.
8421 * f-lang.c (f_word_break_characters): Constify.
8422 * language.c (default_word_break_characters): Constify.
8423 * language.h (language_defn::la_word_break_characters): Constify.
8424 (default_word_break_characters): Constify.
8425 * top.c (init_main): Use set_rl_completer_word_break_characters.
8426
7a114964
PA
84272017-04-05 Pedro Alves <palves@redhat.com>
8428
8429 * aix-thread.c (aix_thread_pid_to_str)
8430 (aix_thread_extra_thread_info): Constify.
8431 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8432 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8433 (bsd_uthread_pid_to_str): Constify.
8434 * corelow.c (core_pid_to_str): Constify.
8435 * darwin-nat.c (darwin_pid_to_str): Constify.
8436 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8437 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8438 Constify.
8439 * gnu-nat.c (gnu_pid_to_str): Constify.
8440 * go32-nat.c (go32_pid_to_str): Constify.
8441 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8442 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8443 * inferior.c (inferior_pid_to_str): Constify.
8444 * linux-nat.c (linux_nat_pid_to_str): Constify.
8445 * linux-tdep.c (linux_core_pid_to_str): Constify.
8446 * linux-thread-db.c (thread_db_pid_to_str)
8447 (thread_db_extra_thread_info): Constify.
8448 * nto-tdep.c (nto_extra_thread_info): Constify.
8449 * nto-tdep.h (nto_extra_thread_info): Constify.
8450 * obsd-nat.c (obsd_pid_to_str): Constify.
8451 * procfs.c (procfs_pid_to_str): Constify.
8452 * ravenscar-thread.c (ravenscar_extra_thread_info)
8453 (ravenscar_pid_to_str): Constify.
8454 * remote-sim.c (gdbsim_pid_to_str): Constify.
8455 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8456 Constify.
8457 * sol-thread.c (solaris_pid_to_str): Constify.
8458 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8459 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8460 * target.c (default_pid_to_str, target_pid_to_str)
8461 (normal_pid_to_str, default_pid_to_str): Constify.
8462 * target.h (target_ops::to_pid_to_str)
8463 (target_ops::to_extra_thread_info): Constify.
8464 (target_pid_to_str, normal_pid_to_str): Constify.
8465 * windows-nat.c (windows_pid_to_str): Constify.
8466 * gdbarch.sh (core_pid_to_str): Constify.
8467 * target-delegates.c: Regenerate.
8468 * gdbarch.h, gdbarch.c: Regenerate.
8469
69bbf465
PA
84702017-04-05 Pedro Alves <palves@redhat.com>
8471
8472 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8473 the memory of the temporary warning_pre_print override.
8474 * utils.c (warning_pre_print): Constify.
8475 * utils.h (warning_pre_print): Constify.
8476
be47f9e8
PA
84772017-04-05 Pedro Alves <palves@redhat.com>
8478
8479 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8480 (shell_command): New function.
8481 (make_command): Use std::string.
8482 (init_cli_cmds): Register shell_command instead of shell_escape.
8483
bde6261a
PA
84842017-04-05 Pedro Alves <palves@redhat.com>
8485
8486 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8487 * tracepoint.c (default_collect): Don't initialize.
8488
b38ef47f
PA
84892017-04-05 Pedro Alves <palves@redhat.com>
8490
8491 * macroexp.c (macro_buffer::shared): Now a bool.
8492 (init_buffer): Update.
8493 (init_shared_buffer): Constify 'addr' parameter.
8494 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8495 casts.
8496
f995bbe8
PA
84972017-04-05 Pedro Alves <palves@redhat.com>
8498
8499 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8500 * disasm.c (set_disassembler_options): Constify local.
8501 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8502
4a596fe2
SDJ
85032017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8504
8505 PR gdb/21352
8506 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8507 option.
8508
2cad08ea
YQ
85092017-04-05 Yao Qi <yao.qi@linaro.org>
8510
8511 * frame.c (frame_unwind_register_unsigned): Call
8512 frame_unwind_register_value.
8513
55a98976
YQ
85142017-04-05 Yao Qi <yao.qi@linaro.org>
8515
8516 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8517 Use gdb_test_multiple, and don't match anchor.
8518
4ac40124
PA
85192017-04-05 Pedro Alves <palves@redhat.com>
8520
8521 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8522 (Write After Approval): Remove Simon Marchi.
8523
c053b654
PA
85242017-04-05 Pedro Alves <palves@redhat.com>
8525
8526 * common/gdb_optional.h (optional::optional): Make constexpr and
8527 initialize m_dummy.
8528
4c7bf4f9
JB
85292017-04-04 John Baldwin <jhb@FreeBSD.org>
8530
8531 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8532 (amd64fbsd_jmp_buf_reg_offset): Remove.
8533 (amd64fbsd_supply_uthread): Remove function.
8534 (amd64fbsd_collect_uthread): Remove function.
8535 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8536 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8537 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8538 (fbsd-nat.c): Update comment.
8539 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8540 (i386fbsd_jmp_buf_reg_offset): Remove.
8541 (i386fbsd_supply_uthread): Remove function.
8542 (i386fbsd_collect_uthread): Remove function.
8543 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8544
1e1a8bef
JB
85452017-04-04 John Baldwin <jhb@FreeBSD.org>
8546
8547 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8548 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8549 * NEWS: Mention that support for FreeBSD/alpha was removed.
8550 * alpha-fbsd-tdep.c: Delete file.
8551 * config/alpha/fbsd.mh: Delete file.
8552 * configure.host: Delete alpha*-*-freebsd* and
8553 alpha*-*-kfreebsd*-gnu.
8554 * configure.tgt: Delete alpha*-*-freebsd* and
8555 alpha*-*-kfreebsd*-gnu.
8556
49907934
JB
85572017-04-04 John Baldwin <jhb@FreeBSD.org>
8558
8559 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8560 amd64bsd_store_inferior_registers): Use ptid from regcache.
8561
6f77053d
PA
85622017-04-04 Pedro Alves <palves@redhat.com>
8563
8564 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8565 data fields, make them private and add "m_" prefixes.
8566 (lnp_state_machine::lnp_state_machine): New ctor.
8567 (record_line, check_line_address, handle_set_discriminator)
8568 (handle_set_address, handle_advance_pc, handle_special_opcode)
8569 (handle_advance_line, handle_set_file, handle_negate_stmt)
8570 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8571 (end_sequence, advance_line): New methods.
8572 (m_gdbarch, m_record_lines_p): New fields.
8573 (lnp_reader_state): Delete.
8574 (dwarf_record_line): Rename to ...
8575 (lnp_state_machine::record_line): ... adjust.
8576 (init_lnp_state_machine): Delete.
8577 (lnp_state_machine::lnp_state_machine): New.
8578 (check_line_address): Rename to ...
8579 (lnp_state_machine::check_line_address): This.
8580 (dwarf_decode_lines_1): Remove reference to "reader_state".
8581 Adjust lnp_state_machine having a non-default ctor. Use bool.
8582 State machine internal state manipulation moved to
8583 lnp_state_machine methods.
8584
9c541725
PA
85852017-04-04 Pedro Alves <palves@redhat.com>
8586
8587 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8588 unittests/offset-type-selftests.c.
8589 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8590 * common/offset-type.h: New file.
8591 * common/preprocessor.h: New file.
8592 * common/traits.h: New file.
8593 * common/valid-expr.h: New file.
8594 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8595 sect_offset and cu_offset strong typedefs throughout.
8596 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8597 typedefs throughout.
8598 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8599 sect_offset and cu_offset strong typedefs throughout.
8600 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8601 typedefs throughout.
8602 * gdbtypes.h: Include "common/offset-type.h".
8603 (cu_offset): Now an offset type (strong typedef) instead of a
8604 struct.
8605 (sect_offset): Likewise.
8606 (union call_site_parameter_u): Rename "param_offset" field to
8607 "param_cu_off".
8608 * unittests/offset-type-selftests.c: New file.
8609
ecfb656c
PA
86102017-04-04 Pedro Alves <palves@redhat.com>
8611
8612 * common/underlying.h: New file.
8613 * dwarf2read.c: Include "common/gdb_optional.h" and
8614 "common/underlying.h".
8615 (dir_index, file_name_index): New types.
8616 (file_entry): Use them.
8617 (file_entry::include): Use to_underlying.
8618 (line_header::add_file_name): Use dir_index.
8619 (read_formatted_entries): Use gdb::optional. Read form before
8620 writting to file_entry.
8621 (dwarf_decode_line_header): Use dir_index.
8622 (lnp_state_machine::current_file): Use to_underlying.
8623 (lnp_state_machine::file): Change type to file_name_index.
8624 (dwarf_record_line): Use to_underlying.
8625 (init_lnp_state_machine): Use file_name_index.
8626 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8627
d194f1fe
PA
86282017-04-04 Pedro Alves <palves@redhat.com>
8629
8630 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8631 operator bool, has_value and get methods.
8632
fff8551c
PA
86332017-04-04 Pedro Alves <palves@redhat.com>
8634
8635 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8636 fields.
8637 (line_header): Initialize all data fields. Change type of
8638 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8639 Change type of include_dirs to std::vector<const char *>. Remove
8640 num_include_dirs, include_dirs_size. Change type of file_names to
8641 std::vector<file_entry>. Remove num_file_names, file_names_size.
8642 (line_header::line_header): New.
8643 (line_header::add_include_dir, line_header::add_file_name): New
8644 methods.
8645 (line_header::include_dir_at): Remove NULL check.
8646 (line_header::file_name_at): Add const overload.
8647 (line_header_up): New unique_ptr typedef.
8648 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8649 std::vector. Remove free_line_header call.
8650 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8651 free_line_header call.
8652 (free_cu_line_header): Delete.
8653 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8654 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8655 Adjust to use std::vector.
8656 (free_line_header): Delete.
8657 (free_line_header_voidp): Use delete.
8658 (add_include_dir): Replace with ...
8659 (line_header::add_include_dir): ... this method. Use std::vector.
8660 (add_file_name): Replace with ...
8661 (line_header::add_file_name): ... this method. Use std::vector.
8662 (add_include_dir_stub): Delete.
8663 (read_formatted_entries): Remove memset.
8664 (dwarf_decode_line_header): Return a line_header_up instead of a
8665 raw pointer. Remove cleanup handling. Pass lambdas to
8666 read_formatted_entries. Adjust to use line_header methods.
8667 (dwarf_decode_lines_1): Adjust to use line_header methods.
8668 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8669 use std::vector.
8670
d62a8ae2
SM
86712017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8672
8673 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8674 instead of struct ptid.
8675
db3a1dc7
AH
86762017-05-04 Alan Hayward <alan.hayward@arm.com>
8677
8678 * frame.c (get_frame_register_bytes): Unwind using value.
8679 (put_frame_register_bytes): Likewise.
8680
b1b45502
IB
86812017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8682
8683 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8684 aggregate-like.
8685
ec13808e
JK
86862017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8687
8688 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8689
12316564
YQ
86902017-03-29 Yao Qi <yao.qi@linaro.org>
8691
8692 * gdbthread.h (struct thread_info): Declare constructor and
8693 destructor. Add some in-class member initializers.
8694 * thread.c (free_thread): Remove.
8695 (init_thread_list): Call delete instead of free_thread.
8696 (new_thread): Call thread_info constructor.
8697 (thread_info::thread_info): New function.
8698 (thread_info::~thread_info): New function.
8699 (delete_thread_1): Call delete instead of free_thread.
8700 (make_cleanup_restore_current_thread): Move tp and frame to
8701 inner block.
8702
fe5f7374
AK
87032017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8704
8705 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8706 (arc_skip_prologue): Likewise.
8707 (arc_make_frame_cache): Likewise.
8708 (arc_pv_get_operand): New function.
8709 (arc_is_in_prologue): Likewise.
8710 (arc_analyze_prologue): Likewise.
8711 (arc_print_frame_cache): Likewise.
8712 (MAX_PROLOGUE_LENGTH): New constant.
8713
eea78757
AK
87142017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8715
8716 * configure.tgt: Add arc-insn.o.
8717 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8718 (dump_arc_instruction_command): New function.
8719 (arc_fprintf_disasm): Likewise.
8720 (arc_disassemble_info): Likewise.
8721 (arc_insn_get_operand_value): Likewise.
8722 (arc_insn_get_operand_value_signed): Likewise.
8723 (arc_insn_get_memory_base_reg): Likewise.
8724 (arc_insn_get_memory_offset): Likewise.
8725 (arc_insn_get_branch_target): Likewise.
8726 (arc_insn_dump): Likewise.
8727 (arc_insn_get_linear_next_pc): Likewise.
8728 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8729 (arc_disassemble_info): Likewise.
8730 (arc_insn_get_branch_target): Likewise.
8731 (arc_insn_get_linear_next_pc): Likewise.
8732 * NEWS: Mention new "maint print arc arc-instruction".
8733
3be78afd
AK
87342017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8735
8736 * arc-tdep (maintenance_print_arc_list): New variable.
8737 (maintenance_print_arc_command): New function.
8738
296ec4fa
AK
87392017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8740
8741 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8742 Add "limm" and "reserved".
8743 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8744 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8745 * arc-tdep.h (arc_regnum): Likewise.
8746
f74f865e
MF
87472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8748
8749 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8750 for THREADPTR register.
8751 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8752 register.
8753 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8754 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8755 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8756
0d0bf81a
MF
87572017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8758
8759 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8760 registers above gdbarch_num_regs (gdbarch) as privileged in
8761 call0 ABI.
8762
0ce4291e
MF
87632017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8764
8765 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8766 for a single specified register or for all registers in
8767 a0_base..a0_base + C0_NREGS range.
8768 (supply_gregset_reg): Call regcache_raw_supply for a single
8769 specified register or for all registers in a0_base..a0_base +
8770 C0_NREGS range.
8771
c56054f9
MF
87722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8773
8774 * arch/xtensa.h (C0_NREGS): Add definition.
8775 * xtensa-tdep.c (C0_NREGS): Remove definition.
8776
a4398628
MF
87772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8778
8779 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8780 Drop xtensa_default_isa initialization.
8781 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8782
8c43009f
PA
87832017-03-27 Pedro Alves <palves@redhat.com>
8784
8785 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8786 (file_entry::include_dir): New method.
8787 (line_header::include_dir_at, line_header::file_name_at): New
8788 methods.
8789 (setup_type_unit_groups, setup_type_unit_groups)
8790 (psymtab_include_file_name): Simplify using the new methods.
8791 (lnp_state_machine) <the_line_header>: New field.
8792 <file>: Add comment.
8793 (lnp_state_machine::current_file): New method.
8794 (dwarf_record_line): Simplify using the new methods.
8795 (init_lnp_state_machine): Initialize the "the_line_header" field.
8796 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8797 Simplify using the new methods.
8798
a7e80b9e
PA
87992017-03-27 Pedro Alves <palves@redhat.com>
8800
8801 * cp-name-parser.y (make_empty): Delete.
8802 (demangler_special, nested_name, ptr_operator, array_indicator)
8803 (direct_declarator, declarator_1): Use fill_comp instead of
8804 make_empty.
8805
21047726
PA
88062017-03-27 Pedro Alves <palves@redhat.com>
8807
8808 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8809 to ATTRIBUTE_PRINTF.
8810 * solib-target.c (library_list_start_list): Print "string" not
8811 "version".
8812 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8813 gdb_xml_error call.
8814
d721ba37
PA
88152017-03-27 Pedro Alves <palves@redhat.com>
8816
8817 * dwarf2read.c (struct file_and_directory): New.
8818 (dwarf2_get_dwz_file): Adjust to use std::string.
8819 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8820 (find_file_and_directory): Adjust to return a file_and_directory
8821 object.
8822 (read_file_scope): Adjust to use file_and_directory. Remove
8823 make_cleanup/do_cleanups calls.
8824 (open_and_init_dwp_file): Adjust to use std::string. Remove
8825 make_cleanup/do_cleanups calls.
8826 * python/python.c (do_start_initialization): Adjust to ldirname
8827 returning a std::string.
8828 * utils.c (ldirname): Now returns a std::string.
8829 * utils.h (ldirname): Change return type to std::string.
8830 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8831 returning a std::string.
8832 * xml-tdesc.c (file_read_description_xml): Likewise.
8833
ed771251
AH
88342017-03-24 Alan Hayward <alan.hayward@arm.com>
8835
8836 * regcache.c (regcache_debug_print_register): New function.
8837 * regcache.h (regcache_debug_print_register): New declaration.
8838 * target.c (debug_print_register): Remove.
8839 (target_fetch_registers): Call regcache_debug_print_register.
8840 (target_store_registers): Likewise.
8841
568c1b9f
PB
88422017-03-24 Pádraig Brady <pbrady@fb.com>
8843
8844 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8845 reference beyond the 'lh->include_dirs' array before accessing to
8846 it.
8847 (psymtab_include_file_name): Likewise.
8848 (dwarf_decode_lines_1): Likewise.
8849 (dwarf_decode_lines): Likewise.
8850 (file_file_name): Likewise.
8851
3e00d44f
SM
88522017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8853
8854 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8855 inferior_ptid.
8856 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8857 ps_lsetfpregs): Likewise.
8858 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8859 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8860 ps_lsetfpregs): Likewise.
8861 * target.c (target_fetch_registers, target_store_registers):
8862 Remove asserts.
8863
077ae656
AH
88642017-03-23 Alan Hayward <alan.hayward@arm.com>
8865
8866 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8867
1e2b521d
YQ
88682017-03-23 Yao Qi <yao.qi@linaro.org>
8869
8870 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8871 (_initialize_aarch64_tdep): Register it.
8872 (aarch64_record_load_store): Handle PRFM instruction.
8873 (aarch64_process_record_test): New function.
8874
33877125
YQ
88752017-03-23 Yao Qi <yao.qi@linaro.org>
8876
8877 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8878 indentation.
8879
a0eef940
YQ
88802017-03-23 Yao Qi <yao.qi@linaro.org>
8881
8882 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8883
3f2a3564
PR
88842017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8885
8886 python/python.c (do_start_initialization): Fix memory leak.
8887
b67aeab0
SM
88882017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8889
8890 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8891 using get_ptrace_pid.
8892 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8893 inferior_ptid.
8894 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8895 inferior_ptid instead of pid.
8896
ffdbe864
YQ
88972017-03-22 Yao Qi <yao.qi@linaro.org>
8898
8899 * aarch64-tdep.c: Wrap locally used classes in anonymous
8900 namespace.
8901 * arm-tdep.c: Likewise.
8902 * linespec.c: Likewise.
8903 * ui-out.c: Likewise.
8904
9d736fbf
JG
89052017-03-22 Jonah Graham <jonah@kichwacoders.com>
8906
8907 PR gdb/19637
8908 * python/lib/gdb/printer/bound_registers.py: Import sys.
8909
3de88e9a
SM
89102017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8911
8912 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8913 windows_thread_info parameter and use it instead of
8914 current_thread.
8915 (windows_fetch_inferior_registers): Don't set current_thread,
8916 pass the thread to do_windows_fetch_inferior_registers. Use
8917 ptid from regcache instead of inferior_ptid.
8918 (do_windows_store_inferior_registers): Add windows_thread_info
8919 parameter and use it instead of current_thread.
8920 (windows_store_inferior_registers): Don't set current_thread,
8921 pass the thread to do_windows_store_inferior_registers. Use
8922 ptid from regcache instead of inferior_ptid.
8923
0e7b8f61
SM
89242017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8925
8926 * ser-mingw.c (ser_windows_raw): Remove reference to
8927 struct serial::current_timeout.
8928
5badf10a
IR
89292017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8930
8931 PR tdep/20928
8932 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8933 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8934 (sparc64_fsr_type): Fix %fsr decoding.
8935
cee59b3f
TW
89362017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8937
8938 * python/py-record-btrace.c (btpy_insn_data): Change return type
8939 for Python 2.
8940
639a9038
SM
89412017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8942
8943 * spu-linux-nat.c (spu_fetch_inferior_registers,
8944 spu_store_inferior_registers): Use ptid from regcache, set and
8945 restore inferior_ptid.
8946 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8947 Likewise.
8948
bcc0c096
SM
89492017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8950
8951 * i386-linux-nat.c (fetch_register, store_register,
8952 i386_linux_fetch_inferior_registers,
8953 i386_linux_store_inferior_registers): Use ptid from regcache.
8954 * ia64-linux-nat.c (ia64_linux_fetch_register,
8955 ia64_linux_store_register): Likewise.
8956 * inf-ptrace.c (inf_ptrace_fetch_register,
8957 inf_ptrace_store_register): Likewise.
8958 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8959 m32r_linux_store_inferior_registers): Likewise.
8960 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8961 m68kbsd_store_inferior_registers): Likewise.
8962 * m68k-linux-nat.c (fetch_register, store_register,
8963 m68k_linux_fetch_inferior_registers,
8964 m68k_linux_store_inferior_registers): Likewise.
8965 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8966 m88kbsd_store_inferior_registers): Likewise.
8967 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8968 mips_fbsd_store_inferior_registers): Likewise.
8969 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8970 mips64_linux_regsets_store_registers): Likewise.
8971 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8972 mipsnbsd_store_inferior_registers): Likewise.
8973 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8974 mips64obsd_store_inferior_registers): Likewise.
8975 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8976 Likewise.
8977 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8978 ppcfbsd_store_inferior_registers): Likewise.
8979 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8980 ppc_linux_store_inferior_registers): Likewise.
8981 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8982 ppcnbsd_store_inferior_registers): Likewise.
8983 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8984 ppcobsd_store_registers): Likewise.
8985 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8986 Likewise.
8987 * ravenscar-thread.c (ravenscar_fetch_registers,
8988 ravenscar_store_registers, ravenscar_prepare_to_store):
8989 Likewise.
8990 * record-btrace.c (record_btrace_fetch_registers,
8991 record_btrace_store_registers, record_btrace_prepare_to_store):
8992 Likewise.
8993 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8994 Lookup inferior using ptid from regcache, instead of
8995 current_inferior.
8996 * remote.c (remote_fetch_registers, remote_store_registers): Use
8997 ptid from regcache.
8998 * rs6000-nat.c (fetch_register, store_register): Likewise.
8999 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9000 s390_linux_store_inferior_registers): Likewise.
9001 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9002 shnbsd_store_inferior_registers): Likewise.
9003 * sol-thread.c (sol_thread_fetch_registers,
9004 sol_thread_store_registers): Likewise.
9005 * sparc-nat.c (sparc_fetch_inferior_registers,
9006 sparc_store_inferior_registers): Likewise.
9007 * tilegx-linux-nat.c (fetch_inferior_registers,
9008 store_inferior_registers): Likewise.
9009 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9010 vaxbsd_store_inferior_registers): Likewise.
9011 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9012 store_xtregs): Likewise.
9013
c0f55cc6
AV
90142017-03-20 Artemiy Volkov <artemiyv@acm.org>
9015
9016 PR gdb/14441
9017 * NEWS: Mention support for rvalue references in GDB and python.
9018 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9019 supports both lvalue and rvalue references.
9020
15c0a2a9
AV
90212017-03-20 Artemiy Volkov <artemiyv@acm.org>
9022
9023 PR gdb/14441
9024 * gdbtypes.c (rank_one_type): Implement overloading
9025 resolution rules regarding rvalue references.
9026
aa006118
AV
90272017-03-20 Artemiy Volkov <artemiyv@acm.org>
9028
9029 PR gdb/14441
9030 * aarch64-tdep.c (aarch64_type_align)
9031 (aarch64_extract_return_value, aarch64_store_return_value): Change
9032 lvalue reference type checks to general reference type checks.
9033 * amd64-tdep.c (amd64_classify): Likewise.
9034 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9035 Likewise.
9036 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9037 (arm_store_return_value): Likewise.
9038 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9039 * c-typeprint.c (c_print_type): Likewise.
9040 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9041 (cplus_number_of_children, cplus_describe_child): Likewise.
9042 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9043 * completer.c (expression_completer): Likewise.
9044 * cp-support.c (make_symbol_overload_list_adl_namespace):
9045 Likewise.
9046 * darwin-nat-info.c (info_mach_region_command): Likewise.
9047 * dwarf2loc.c (entry_data_value_coerce_ref)
9048 (value_of_dwarf_reg_entry): Likewise.
9049 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9050 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9051 Likewise.
9052 * findvar.c (extract_typed_address, store_typed_address):
9053 Likewise.
9054 * gdbtypes.c (rank_one_type): Likewise.
9055 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9056 * infcall.c (value_arg_coerce): Likewise.
9057 * language.c (pointer_type): Likewise.
9058 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9059 Likewise.
9060 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9061 * mn10300-tdep.c (mn10300_type_align): Likewise.
9062 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9063 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9064 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9065 Likewise.
9066 * printcmd.c (print_formatted, x_command): Likewise.
9067 * python/py-type.c (typy_get_composite, typy_template_argument):
9068 Likewise.
9069 * python/py-value.c (valpy_referenced_value)
9070 (valpy_get_dynamic_type, value_has_field): Likewise.
9071 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9072 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9073 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9074 * spu-tdep.c (spu_scalar_value_p): Likewise.
9075 * symtab.c (lookup_symbol_aux): Likewise.
9076 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9077 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9078 Likewise.
9079 * valops.c (value_cast_pointers, value_cast)
9080 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9081 (value_struct_elt, value_struct_elt_bitpos)
9082 (value_find_oload_method_list, find_overload_match)
9083 (value_rtti_indirect_type): Likewise.
9084 * valprint.c (val_print_scalar_type_p, generic_val_print):
9085 Likewise.
9086 * value.c (value_actual_type, value_as_address, unpack_long)
9087 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9088 (coerce_ref): Likewise.
9089 * varobj.c (varobj_get_value_type): Likewise.
9090
3fcf899d
AV
90912017-03-20 Artemiy Volkov <artemiyv@acm.org>
9092
9093 PR gdb/14441
9094 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9095 table of constants.
9096 * python/lib/gdb/command/explore.py: Support exploring values
9097 of rvalue reference types.
9098 * python/lib/gdb/types.py: Implement get_basic_type() for
9099 rvalue reference types.
9100 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9101 constant.
9102 * python/py-value.c (valpy_getitem): Add an rvalue reference
9103 check.
9104 (valpy_reference_value): Add new parameter "refcode".
9105 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9106 New wrappers for valpy_reference_value().
9107 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9108 (gdbpy_invoke_xmethod): Likewise.
9109
4297a3f0
AV
91102017-03-20 Artemiy Volkov <artemiyv@acm.org>
9111
9112 PR gdb/14441
9113 * dwarf2read.c (process_die, read_type_die_1): Handle the
9114 DW_TAG_rvalue_reference_type DIE.
9115 (read_tag_reference_type): Add new parameter "refcode".
9116
e1cb3213
AV
91172017-03-20 Artemiy Volkov <artemiyv@acm.org>
9118
9119 PR gdb/14441
9120 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9121 (c_type_print_modifier, c_type_print_varspec_suffix)
9122 (c_type_print_base): Support printing rvalue reference types.
9123 * c-valprint.c (c_val_print, c_value_print): Support printing
9124 rvalue reference values.
9125
e4347c89
AV
91262017-03-20 Artemiy Volkov <artemiyv@acm.org>
9127
9128 PR gdb/14441
9129 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9130 typename.
9131 * cp-support.c (replace_typedefs): Handle
9132 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9133 * python/py-type.c (typy_lookup_type): Likewise.
9134
53cc15f5
AV
91352017-03-20 Artemiy Volkov <artemiyv@acm.org>
9136
9137 PR gdb/14441
9138 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9139 * parse.c (insert_type): Change assert statement.
9140 (follow_types): Handle rvalue reference types.
9141 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9142 constant.
9143
a65cfae5
AV
91442017-03-20 Artemiy Volkov <artemiyv@acm.org>
9145
9146 PR gdb/14441
9147 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9148 value_ref() interface.
9149 * c-valprint.c (c_value_print): Likewise.
9150 * infcall.c (value_arg_coerce): Likewise.
9151 * python/py-value.c (valpy_reference_value): Likewise.
9152 * valops.c (value_cast, value_reinterpret_cast)
9153 (value_dynamic_cast, typecmp): Likewise.
9154 (value_ref): Parameterize by kind of return value reference type.
9155 * value.h (value_ref): Add new parameter "refcode".
9156
3b224330
AV
91572017-03-20 Artemiy Volkov <artemiyv@acm.org>
9158
9159 PR gdb/14441
9160 * dwarf2read.c (read_tag_reference_type): Use
9161 lookup_lvalue_reference_type() instead of lookup_reference_type().
9162 * eval.c (evaluate_subexp_standard): Likewise.
9163 * f-exp.y: Likewise.
9164 * gdbtypes.c (make_reference_type, lookup_reference_type):
9165 Generalize with rvalue reference types.
9166 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9167 convenience wrappers for lookup_reference_type().
9168 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9169 reference kind parameter.
9170 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9171 wrappers for lookup_reference_type().
9172 * guile/scm-type.c (gdbscm_type_reference): Use
9173 lookup_lvalue_reference_type() instead of lookup_reference_type().
9174 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9175 * parse.c (follow_types): Likewise.
9176 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9177 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9178 Likewise.
9179 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9180 (gdbpy_invoke_xmethod): Likewise.
9181 * stabsread.c: Provide extra argument to make_reference_type()
9182 call.
9183 * valops.c (value_ref, value_rtti_indirect_type): Use
9184 lookup_lvalue_reference_type() instead of lookup_reference_type().
9185
f9aeb8d4
AV
91862017-03-20 Artemiy Volkov <artemiyv@acm.org>
9187
9188 PR gdb/14441
9189 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9190 (TYPE_IS_REFERENCE): New macro.
9191 (struct type): Add rvalue_reference_type field.
9192 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9193
51457a05
MAL
91942017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9195
9196 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9197 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9198 New function definition.
9199 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9200 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9201 New function declaration.
9202 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9203 * mi/mi-interp.h: New file.
9204 * solib.c (info_sharedlibrary_command): Replace for loop with
9205 ALL_SO_LIBS macro
9206 * solib.h (update_solib_list): New function declaration.
9207 (so_list_head): Move macro.
9208 * solist.h (ALL_SO_LIBS): New macro.
9209
e696b3ad
MAL
92102017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9211
9212 * infcmd.c (post_create_inferior): Remove unused argument in
9213 call to solib_add.
9214 * remote.c (remote_start_remote): Likewise.
9215 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9216 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9217 (enable_break): Likewise.
9218 * solib.c (update_solib_list): Remove unused target argument
9219 and its documentation.
9220 (solib_add): Remove unused target argument. Remove unused
9221 argument in call to update_solib_list.
9222 (info_sharedlibrary_command): Remove unused argument in call
9223 to update_solib_list.
9224 (sharedlibrary_command): Remove unused argument in call to
9225 solib_add.
9226 (handle_solib_event): Likewise.
9227 (reload_shared_libraries): Likewise.
9228 * solib.h (solib_add): Remove unused target argument.
9229
dcb84eda
AA
92302017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9231
9232 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9233 (s390_displaced_step_fixup): Cover relative branches with the
9234 default fixup handling. This fixes lack of support for some
9235 relative branch instructions.
9236
d9cb6cdc
SM
92372017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9238
9239 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9240 ptid from regcache.
9241
1afaf9f4
SM
92422017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9243
9244 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9245 i386_darwin_store_inferior_registers): Use ptid from regcache.
9246
aac12e24
SM
92472017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9248
9249 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9250 i386bsd_store_inferior_registers): Use ptid from regcache.
9251
bbe1eef1
SM
92522017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9253
9254 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9255 hppaobsd_store_registers): Use ptid from regcache.
9256
10799020
SM
92572017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9258
9259 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9260 hppanbsd_store_registers): Use ptid from regcache.
9261
00204cf7
SM
92622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9263
9264 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9265 from regcache. Use get_ptrace_pid.
9266
11a33714
SM
92672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9268
9269 * corelow.c (get_core_register_section): Use ptid from regcache,
9270 update doc.
9271
317cd492
SM
92722017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9273
9274 * bsd-uthread.c (bsd_uthread_fetch_registers,
9275 bsd_uthread_store_registers): Use ptid from regcache, set and
9276 restore inferior_ptid.
9277
9ac8a7c2
SM
92782017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9279
9280 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9281 fetch_fp_regs, store_register, store_regs, store_fp_register,
9282 store_fp_regs): Use ptid from regcache.
9283
4ac4bb6a
SM
92842017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9285
9286 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9287 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9288 store_vfp_regs): Use ptid from regcache.
9289
9bcbdca8
PA
92902017-03-17 Pedro Alves <palves@redhat.com>
9291
9292 PR remote/21188
9293 * ser-base.c (ser_base_wait_for): Add comment.
9294 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9295 version.
9296 * ser-unix.c (hardwire_raw): Remove reference to
9297 scb->current_timeout.
9298 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9299 (hardwire_ops): Install ser_base_readchar instead of
9300 hardwire_readchar.
9301 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9302 Remove fields.
9303
7503099f
JG
93042017-03-17 Jonah Graham <jonah@kichwacoders.com>
9305
9306 PR gdb/19637
9307 * python/lib/gdb/printer/bound_registers.py: Add support for
9308 Python 3.
9309
7942e96e
AA
93102017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9311
9312 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9313 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9314 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9315 byte_offset to subobj_byte_offset. Fix the handling of
9316 DWARF_VALUE_STACK on big-endian targets when coming via an
9317 implicit pointer.
9318 (dwarf2_evaluate_loc_desc): Adjust call to
9319 dwarf2_evaluate_loc_desc_full.
9320 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9321 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9322
ba14f379
YQ
93232017-03-16 Yao Qi <yao.qi@linaro.org>
9324
9325 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9326 and REVSH instructions.
9327
b121eeb9
YQ
93282017-03-16 Yao Qi <yao.qi@linaro.org>
9329
9330 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9331 (arm_record_test): Declare.
9332 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9333 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9334 align with the manual.
9335 (thumb_record_misc): Adjust the code order to align with the
9336 manual.
9337 (thumb2_record_decode_insn_handler): Fix instruction matching.
9338 (instruction_reader_thumb): New class.
9339 (arm_record_test): New function.
9340
728a7913
YQ
93412017-03-16 Yao Qi <yao.qi@linaro.org>
9342
9343 * arm-tdep.c (abstract_memory_reader): New class.
9344 (instruction_reader): New class.
9345 (extract_arm_insn): Add argument 'reader'. Callers updated.
9346 (decode_insn): Likewise.
9347
34b43320
DE
93482017-03-16 Doug Evans <dje@google.com>
9349
a7c0469f
DE
9350 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9351 member. Change type of TYPE member to SCM. All uses updated.
9352 (lsscm_make_lazy_string_smob): Add assert.
9353 (lsscm_make_lazy_string): Flag bad length values.
9354 (lsscm_elt_type): New function.
9355 (gdbscm_lazy_string_to_value): Rewrite to use
9356 lsscm_safe_lazy_string_to_value.
9357 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9358 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9359 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9360 in incoming type.
9361 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9362 * guile/scm-type.c (tyscm_scm_to_type): New function.
9363
93642017-03-15 Doug Evans <dje@google.com>
9365
34b43320
DE
9366 PR python/17728, python/18439, python/18779
9367 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9368 member. Change type of TYPE member to PyObject *. All uses updated.
9369 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9370 (gdbpy_create_lazy_string_object): Flag bad length values.
9371 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9372 Handle typedefs in incoming type.
9373 (stpy_lazy_string_elt_type): New function.
9374 (gdbpy_extract_lazy_string): Call it.
9375 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9376 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9377 typedefs in incoming type.
9378
a3a5fecc
DE
93792017-03-16 Doug Evans <dje@google.com>
9380
9381 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9382 * guile/scm-type.c (tyscm_scm_to_type): New function.
9383
28f1c605
JW
93842017-03-16 Jiong Wang <jiong.wang@arm.com>
9385
9386 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9387 "ULONGEST" for "skip".
9388
87c336f6
AA
93892017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9390
9391 PR gdb/21220
9392 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9393 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9394 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9395 over ptrace peek/poke until end of buffer or error.
9396
cf81cf60
SM
93972017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9398
9399 * parse.c (length_of_subexp): Make static.
9400 * parser-defs.h (length_of_subexp): Remove.
9401
a379284a
AA
94022017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9403
9404 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9405 as well.
9406
8a6200ba
PA
94072017-03-14 Pedro Alves <palves@redhat.com>
9408
9409 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9410 (main): Use std::unique_ptr. Remove calls to
9411 cp_demangled_name_parse_free.
9412
f79ec206
SM
94132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9414
9415 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9416 alphabsd_store_inferior_registers): Use regcache->ptid instead
9417 of inferior_ptid.
9418
edb5fb00
SM
94192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9420
9421 * aix-thread.c (aix_thread_fetch_registers,
9422 aix_thread_store_registers): Use regcache->ptid instead of
9423 inferior_ptid.
9424
55119686
SM
94252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9426
9427 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9428 store_gregs_to_thread, fetch_fpregs_from_thread,
9429 store_fpregs_to_thread): Use regcache->ptid instead of
9430 inferior_ptid.
9431
6a06fbb7
SM
94322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9433
9434 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9435 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9436 instead of inferior_ptid.
9437
c6386875
SM
94382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9439
9440 * target.c (target_fetch_registers, target_store_registers): Add
9441 assert.
9442
ddaaf0fb
SM
94432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9444
9445 * regcache.h (regcache_get_ptid): New function.
9446 * regcache.c (regcache_get_ptid): New function.
9447
b9da89d1 94482017-03-13 Mark Wielaard <mark@klomp.org>
9449
9450 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9451
5f4d1085
KS
94522017-03-10 Keith Seitz <keiths@redhat.com>
9453
9454 PR c++/8218
9455 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9456
c65d6b55
PA
94572017-03-08 Pedro Alves <palves@redhat.com>
9458
9459 PR gdb/18360
9460 * infrun.c (start_step_over, do_target_resume, resume)
9461 (restart_threads): Assert we're not resuming a thread that is
9462 meant to be stopped.
9463 (infrun_thread_stop_requested_callback): Delete.
9464 (infrun_thread_stop_requested): If the thread is internally
9465 stopped, queue a pending stop event and clear the thread's
9466 inline-frame state.
9467 (handle_stop_requested): New function.
9468 (handle_syscall_event, handle_inferior_event_1): Use
9469 handle_stop_requested.
9470 (handle_stop_requested): New function.
9471 (handle_signal_stop): Set the thread's stop_signal here instead of
9472 at caller.
9473 (finish_step_over): Clear step over info unconditionally.
9474 (handle_signal_stop): If the user had interrupted the event
9475 thread, consider the stop a random signal.
9476 (handle_signal_stop) <signal arrived while stepping over
9477 breakpoint>: Don't restart threads here.
9478 (stop_waiting): Don't clear step-over info here.
9479
15c22686
PA
94802017-03-08 Pedro Alves <palves@redhat.com>
9481
9482 PR 21206
9483 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9484 goes to argument 2, not 1.
9485
6e5d74e7
PA
94862017-03-08 Pedro Alves <palves@redhat.com>
9487
9488 PR cli/21218
9489 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9490 display_gdb_prompt.
9491 (command_line_input): Add comment.
9492
9753a2f6
PA
94932017-03-08 Pedro Alves <palves@redhat.com>
9494
9495 PR tui/21216
9496 * tui/tui-file.c (tui_file::write): New.
9497 * tui/tui-file.h (tui_file): Override "write".
9498 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9499 factored out from ...
9500 (tui_puts): ... here.
9501 (tui_putc): Use them.
9502 (tui_write): New function.
9503 * tui/tui-io.h (tui_write): Declare.
9504
1672e0d9
SDJ
95052017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9506
9507 * Makefile.in (SFILES): Replace "environ.c" with
9508 "common/environ.c".
9509 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9510 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9511 to...
9512 * common/environ.c: ... here.
9513 * environ.h: Moved to...
9514 * common/environ.h: ... here.
9515
f7bb4e3a
PB
95162017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9517
9518 * gdbarch.sh (pstring_ptr): New static function.
9519 (gdbarch_disassembler_options): Use it.
9520 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9521 not valid_disassembler_option->name.
9522 * gdbarch.c: Regenerate.
9523
e45ced6c
PB
95242017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9525
9526 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9527
5f6fd321
PA
95282017-03-07 Pedro Alves <palves@redhat.com>
9529
9530 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9531
6dbb839a 95322017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9533
9534 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9535 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9536 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9537 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9538
d274ecf4
SM
95392017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9540
9541 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9542
df97be55
SM
95432017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9544
9545 * remote.c (remote_add_target_side_commands): Use range-based
9546 for loop.
9547
7d45f3df
YQ
95482017-03-03 Yao Qi <yao.qi@linaro.org>
9549
9550 PR gdb/21165
9551 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9552 value is lazy.
9553 * valprint.c (common_val_print): Likewise.
9554
65b48a81
PB
95552017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9556
9557 * NEWS: Mention new set/show disassembler-options commands.
9558 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9559 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9560 (prospective_options): New static variable.
9561 (gdb_disassembler::gdb_disassembler): Initialize
9562 m_di.disassembler_options.
9563 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9564 (get_disassembler_options): New function.
9565 (set_disassembler_options): Likewise.
9566 (set_disassembler_options_sfunc): Likewise.
9567 (show_disassembler_options_sfunc): Likewise.
9568 (disassembler_options_completer): Likewise.
9569 (_initialize_disasm): Likewise.
9570 * disasm.h (get_disassembler_options): New prototype.
9571 (set_disassembler_options): Likewise.
9572 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9573 (gdbarch_verify_disassembler_options): Likewise.
9574 * gdbarch.c: Regenerate.
9575 * gdbarch.h: Likewise.
9576 * arm-tdep.c (num_disassembly_options): Delete.
9577 (set_disassembly_style): Likewise.
9578 (arm_disassembler_options): New static variable.
9579 (set_disassembly_style_sfunc): Convert short style name into long
9580 option name. Call set_disassembler_options.
9581 (show_disassembly_style_sfunc): New function.
9582 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9583 set_gdbarch_verify_disassembler_options.
9584 (_initialize_arm_tdep): Delete regnames variable and update callers.
9585 (arm_disassembler_options): Initialize.
9586 (disasm_options): New variable.
9587 (num_disassembly_options): Rename from this...
9588 (num_disassembly_styles): ...to this. Compute by scanning through
9589 disasm_options.
9590 (valid_disassembly_styles): Initialize using disasm_options.
9591 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9592 set_arm_regname_option.
9593 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9594 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9595 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9596 set_gdbarch_verify_disassembler_options.
9597 * s390-tdep.c (s390_disassembler_options): New static variable.
9598 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9599 set_gdbarch_verify_disassembler_options.
9600
d538e36d
SM
96012017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9602
9603 * remote.c (remote_add_target_side_condition): Remove "struct"
9604 keyword from range-based for loop.
9605
83621223
SM
96062017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9607
9608 * remote.c (remote_add_target_side_condition): Use range-based
9609 for loop. Update comment.
9610
2123df0e
YQ
96112017-02-27 Yao Qi <yao.qi@linaro.org>
9612
9613 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9614
8e368124
AH
96152017-02-26 Alan Hayward <alan.hayward@arm.com>
9616
9617 * regcache.c (regcache_raw_update): New function.
9618 (regcache_raw_read): Move code to regcache_raw_update.
9619 * regcache.h (regcache_raw_update): New declaration.
9620 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9621
a49dd8dd
JK
96222017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9623
9624 * dwarf2read.c (create_debug_type_hash_table): Initialize
9625 header.signature and header.type_offset_in_tu.
9626
34e4bae9
PA
96272017-02-24 Pedro Alves <palves@redhat.com>
9628
9629 * symtab.c (make_file_symbol_completion_list_1): Use
9630 add_symtab_completions.
9631
b0e4b369
AH
96322017-02-24 Alan Hayward <alan.hayward@arm.com>
9633
9634 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9635
975c21ab
AH
96362017-02-24 Alan Hayward <alan.hayward@arm.com>
9637
9638 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9639 I386_MAX_REGISTER_SIZE.
9640 (i386_pseudo_register_write): Likewise.
9641 (i386_process_record): Likewise.
9642 * i387-tdep.c (i387_supply_xsave): Likewise.
9643 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9644 (store_register): Likewise.
9645
14bc53a8
PA
96462017-02-23 Pedro Alves <palves@redhat.com>
9647
9648 * ada-lang.c: Include "common/function-view.h".
9649 (ada_iterate_over_symbols): Adjust to use function_view as
9650 callback type.
9651 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9652 (ada_make_symbol_completion_list): Use a lambda.
9653 (ada_exc_search_name_matches): Delete.
9654 (name_matches_regex): New.
9655 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9656 * compile/compile-c-support.c: Include "common/function-view.h".
9657 (print_one_macro): Change prototype to accept a ui_file pointer.
9658 (write_macro_definitions): Use a lambda.
9659 * dwarf2read.c: Include "common/function-view.h".
9660 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9661 (dw2_expand_symtabs_matching): Adjust to use function_view as
9662 callback type.
9663 * language.h: Include "common/function-view.h".
9664 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9665 function_view as callback type.
9666 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9667 * linespec.c: Include "common/function-view.h".
9668 (collect_info::add_symbol): New method.
9669 (struct symbol_and_data_callback, iterate_inline_only, struct
9670 symbol_matcher_data, iterate_name_matcher): Delete.
9671 (iterate_over_all_matching_symtabs): Adjust to use function_view
9672 as callback type and lambdas.
9673 (iterate_over_file_blocks): Adjust to use function_view as
9674 callback type.
9675 (decode_compound_collector): Now a class with private fields.
9676 (decode_compound_collector::release_symbols): New method.
9677 (collect_one_symbol): Rename to...
9678 (decode_compound_collector::operator()): ... this and adjust.
9679 (lookup_prefix_sym): decode_compound_collector construction bits
9680 move to decode_compound_collector ctor. Pass the
9681 decode_compound_collector object directly as callback. Remove
9682 cleanups and use decode_compound_collector::release_symbols
9683 instead.
9684 (symtab_collector): Now a class with private fields.
9685 (symtab_collector::release_symtabs): New method.
9686 (add_symtabs_to_list): Rename to...
9687 (symtab_collector::operator()): ... this and adjust.
9688 (collect_symtabs_from_filename): symtab_collector construction
9689 bits move to symtab_collector ctor. Pass the symtab_collector
9690 object directly as callback. Remove cleanups and use
9691 symtab_collector::release_symtabs instead.
9692 (collect_symbols): Delete.
9693 (add_matching_symbols_to_info): Use lambdas.
9694 * macrocmd.c (print_macro_callback): Delete.
9695 (info_macro_command): Use a lambda.
9696 (info_macros_command): Pass print_macro_definition as callable
9697 directly.
9698 (print_one_macro): Remove 'ignore' parameter.
9699 (macro_list_command): Adjust.
9700 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9701 (macro_for_each_data::user_data): Delete field.
9702 (foreach_macro): Adjust to call the function_view.
9703 (macro_for_each): Adjust to use function_view as callback type.
9704 (foreach_macro_in_scope): Adjust to call the function_view.
9705 (macro_for_each_in_scope): Adjust to use function_view as callback
9706 type.
9707 * macrotab.h: Include "common/function-view.h".
9708 (macro_callback_fn): Declare a prototype instead of a pointer.
9709 Remove "user_data" parameter.
9710 (macro_for_each, macro_for_each_in_scope): Adjust to use
9711 function_view as callback type.
9712 * psymtab.c (partial_map_expand_apply)
9713 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9714 Adjust to use function_view as callback type and to return bool.
9715 (psym_expand_symtabs_matching): Adjust to use function_view as
9716 callback types.
9717 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9718 to use function_view as callback type and to return bool.
9719 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9720 callback types.
9721 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9722 as callback types.
9723 * symfile.h: Include "common/function-view.h".
9724 (expand_symtabs_file_matcher_ftype)
9725 (expand_symtabs_symbol_matcher_ftype)
9726 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9727 return bool.
9728 (quick_symbol_functions::map_symtabs_matching_filename)
9729 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9730 function_view as callback type and return bool.
9731 (expand_symtabs_matching): Adjust to use function_view as callback
9732 type.
9733 (maintenance_expand_name_matcher)
9734 (maintenance_expand_file_matcher): Delete.
9735 (maintenance_expand_symtabs): Use lambdas.
9736 * symtab.c (iterate_over_some_symtabs): Adjust to use
9737 function_view as callback types and return bool.
9738 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9739 of a cleanup.
9740 (lookup_symtab_callback): Delete.
9741 (lookup_symtab): Use a lambda.
9742 (iterate_over_symbols): Adjust to use function_view as callback
9743 type.
9744 (struct search_symbols_data, search_symbols_file_matches)
9745 (search_symbols_name_matches): Delete.
9746 (search_symbols): Use a pair of lambdas.
9747 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9748 (symtab_expansion_callback): Delete.
9749 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9750 * symtab.h: Include "common/function-view.h".
9751 (iterate_over_some_symtabs): Adjust to use function_view as
9752 callback type and return bool.
9753 (iterate_over_symtabs): Adjust to use function_view as callback
9754 type.
9755 (symbol_found_callback_ftype): Remove 'data' parameter and return
9756 bool.
9757 (iterate_over_symbols): Adjust to use function_view as callback
9758 type.
9759
07e253aa
PA
97602017-02-23 Pedro Alves <palves@redhat.com>
9761
9762 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9763 (%.o) <unittests/%.c>: New pattern.
9764 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9765 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9766 * common/function-view.h: New file.
9767 * unittests/function-view-selftests.c: New file.
9768 * configure: Regenerate.
9769
8eaf5320
SM
97702017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9771
9772 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9773 inferior_ptid.
9774 * go32-nat.c (go32_thread_alive): Likewise.
9775
38768751
YQ
97762017-02-23 Yao Qi <yao.qi@linaro.org>
9777
9778 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9779 delete.
9780
0a8beaba
YQ
97812017-02-23 Yao Qi <yao.qi@linaro.org>
9782
9783 * varobj.c (varobj_clear_saved_item): Use delete instead of
9784 xfree.
9785 (update_dynamic_varobj_children): Likewise.
9786
58fdfd2c
JK
97872017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9788
9789 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9790
1b90b139
SM
97912017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9792
9793 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9794 m_enum_value to 0 in default constructor.
9795
2039d74e
EBM
97962017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9797
9798 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9799 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9800 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9801 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9802 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9803 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9804 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9805 IS_STORE_CONDITIONAL_INSN.
9806
7814882a
JK
98072017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9808
9809 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9810
0ae60b63
JK
98112017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9812
9813 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9814
0224619f
JK
98152017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9816
9817 * dwarf2read.c (skip_one_die, read_attribute_value)
9818 (dwarf2_const_value_attr, dump_die_shallow)
9819 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9820 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9821
0af92d60
JK
98222017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9823
9824 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9825 (dwarf_parse_macro_header): Accept DWARF version 5.
9826 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9827
216f72a1
JK
98282017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9829
9830 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9831 DW_AT_GNU_*.
9832 * common/common-exceptions.h (enum errors): Likewise.
9833 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9834 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9835 (dwarf_expr_context::execute_stack_op): Likewise.
9836 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9837 Likewise.
9838 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9839 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9840 (show_entry_values_debug, call_site_to_target_addr)
9841 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9842 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9843 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9844 (value_of_dwarf_block_entry, indirect_pieced_value)
9845 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9846 (disassemble_dwarf_expression): Likewise.
9847 * dwarf2read.c (process_die, inherit_abstract_dies)
9848 (read_call_site_scope): Likewise.
9849 * gdbtypes.h (struct func_type, struct call_site_parameter)
9850 (struct call_site): Likewise.
9851 * stack.c (read_frame_arg): Likewise.
9852 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9853
43988095
JK
98542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9855
9856 * defs.h (read_unsigned_leb128): New declaration.
9857 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9858 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9859 (dwarf2_find_location_expression): Call also
9860 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9861 * dwarf2loc.h (dwarf2_version): New declaration.
9862 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9863 rnglists.
9864 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9865 .debug_rnglists.
9866 (struct dwop_section_names): Add loclists_dwo.
9867 (dwop_section_names): Add .debug_loclists.dwo.
9868 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9869 (struct dwarf2_per_cu_data): Add dwarf_version.
9870 (struct dwo_sections): Add loclists.
9871 (struct attr_abbrev): Add implicit_const.
9872 (read_indirect_line_string): New declaration.
9873 (read_unsigned_leb128): Delete declaration.
9874 (rcuh_kind): New definition.
9875 (read_and_check_comp_unit_head): Change parameter
9876 is_debug_types_section to section_kind.
9877 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9878 (read_comp_unit_head): Change parameter abfd to section, add parameter
9879 section_kind. Handle DWARF-5.
9880 (error_check_comp_unit_head): Accept also DWARF version 5.
9881 (read_and_check_comp_unit_head): Change parameter
9882 is_debug_types_section to section_kind.
9883 (read_and_check_type_unit_head): Delete function.
9884 (read_abbrev_offset): Handle DWARF-5.
9885 (create_debug_type_hash_table): Add parameter section_kind. Process
9886 only DW_UT_type. Use signature and type_offset_in_tu from struct
9887 comp_unit_head.
9888 (create_debug_types_hash_table): Update create_debug_type_hash_table
9889 caller.
9890 (create_all_type_units): Call create_debug_type_hash_table.
9891 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9892 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9893 caller.
9894 (skip_one_die): Handle DW_FORM_implicit_const.
9895 (dwarf2_rnglists_process): New function.
9896 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9897 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9898 (read_attribute_value): Handle DW_FORM_implicit_const,
9899 DW_FORM_line_strp.
9900 (read_attribute): Handle DW_FORM_implicit_const.
9901 (read_indirect_string_at_offset_from): New function from
9902 read_indirect_string_at_offset.
9903 (read_indirect_string_at_offset): Call
9904 read_indirect_string_at_offset_from.
9905 (read_indirect_line_string_at_offset): New function.
9906 (read_indirect_string): New function comment.
9907 (read_indirect_line_string): New function.
9908 (read_unsigned_leb128): Make it global.
9909 (dwarf2_string_attr): Handle DWARF-5.
9910 (add_include_dir_stub, read_formatted_entries): New functions.
9911 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9912 Handle DWARF-5.
9913 (per_cu_header_read_in): Update read_comp_unit_head caller.
9914 (dwarf2_version): New function.
9915 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9916 rnglists.
9917 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9918 fields.
9919
22d2f3ab
JK
99202017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9921
9922 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9923
5f46c5a5
JK
99242017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9925
9926 * dwarf2read.c (dwarf2_ranges_process): New function from
9927 dwarf2_ranges_read.
9928 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9929 dwarf2_ranges_process.
9930
78d4d2c5
JK
99312017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9932
9933 * dwarf2read.c (create_debug_type_hash_table): New function from
9934 create_debug_types_hash_table.
9935 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9936 (create_all_type_units, open_and_init_dwo_file): Update
9937 create_debug_types_hash_table callers.
9938
1b076f25
SDJ
99392017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9940
9941 PR gdb/16188
9942 * fork-child.c (trace_start_error): Fix thinko. va_end should
9943 refer to 'ap', not 'args'.
9944
0db8980c
SDJ
99452017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9946 Pedro Alves <palves@redhat.com>
9947
9948 PR gdb/16188
9949 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9950 calls succeeded.
9951 * fork-child.c (trace_start_error): New function.
9952 (trace_start_error_with_name): Likewise.
9953 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9954 * inf-ptrace.c (inf_ptrace_me): Likewise.
9955 * inferior.h (trace_start_error): New prototype.
9956 (trace_start_error_with_name): Likewise.
9957
99e8a4f9
SDJ
99582017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9959
9960 PR gdb/21164
9961 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9962 NULL before using it.
9963 * symmisc.c (maintenance_print_symbols): Likewise.
9964 (maintenance_print_msymbols): Likewise.
9965
4e746bb6
TW
99662017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9967
9968 * NEWS: Add record Python bindings entry.
9969
99702017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9971
9972 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9973 py-record-full.o.
9974 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9975 * python/py-record-btrace.c, python/py-record-btrace.h,
9976 python/py-record-full.c, python/py-record-full.h: New file.
9977 * python/py-record.c: Add include for py-record-btrace.h and
9978 py-record-full.h.
9979 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9980 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9981 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9982 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9983 New definition.
9984 (gdbpy_initialize_btrace): New export.
9985 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9986
99872017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9988
9989 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9990 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9991 * python/py-record.c: New file.
9992 * python/python-internal.h (gdbpy_start_recording,
9993 gdbpy_current_recording, gdpy_stop_recording,
9994 gdbpy_initialize_record): New export.
9995 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9996 (python_GdbMethods): Add gdbpy_start_recording,
9997 gdbpy_current_recording and gdbpy_stop_recording.
9998
99992017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10000
10001 * record-btrace.c (record_btrace_record_method): New function.
10002 (init_record_btrace_ops): Initialize to_record_method.
10003 * record-full.c (record_full_record_method): New function.
10004 (init_record_full_ops, init_record_full_core_ops): Add
10005 record_full_record_method.
10006 * record.h (enum record_method): New enum.
10007 * target-debug.h (target_debug_print_enum_record_method: New define.
10008 * target-delegates.c: Regenerate.
10009 * target.c (target_record_method): New function.
10010 * target.h: Include record.h.
10011 (struct target_ops) <to_record_method>: New field.
10012 (target_record_method): New export.
10013
100142017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10015
10016 * record.h (record_start, record_stop): New export.
10017 * record.c (record_start, record_stop): New function.
10018
100192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10020
10021 * btrace.c (btrace_fetch): Copy function call segments pointer
10022 into a vector.
10023 (btrace_clear): Clear the vector.
10024 (btrace_find_insn_by_number): Use binary search to find the correct
10025 function call segment.
10026 * btrace.h (brace_fun_p): New typedef.
10027 (struct btrace_thread_info) <functions>: New field.
10028
100292017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10030
10031 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10032 * btrace.c (btrace_decode_error): ... here. New function.
10033 * btrace.h (btrace_decode_error): New export.
10034
100352017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10036
10037 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10038 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10039 btrace_find_insn_by_number): Remove special case for gaps.
10040 * btrace.h (btrace_insn_get_error): New export.
10041 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10042 * record-btrace.c (btrace_insn_history): Print number for gaps.
10043 (record_btrace_info, record_btrace_goto): Handle gaps.
10044
3f77c769
TT
100452017-02-14 Tom Tromey <tom@tromey.com>
10046
10047 PR python/13598:
10048 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10049 event.
10050 * python/py-evts.c (gdbpy_initialize_py_events): Add
10051 before_prompt registry.
10052 * python/py-events.h (events_object) <before_prompt>: New field.
10053
4c2c7ac6
MM
100542017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10055
10056 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10057
5cf30ebf
LM
100582017-02-13 Luis Machado <lgustavo@codesourcery.com>
10059
10060 * symfile (_initialize_symfile): Add usage text to the load command's
10061 help text.
10062
26a06916
SM
100632017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10064
10065 * utils.c (defaulted_query): Don't query on secondary UIs.
10066
0b145e37
TT
100672017-02-10 Tom Tromey <tom@tromey.com>
10068
10069 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10070
2d8365c4
TT
100712017-02-10 Tom Tromey <tom@tromey.com>
10072
10073 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10074 "cleanup" local.
10075 * python/py-type.c (typy_legacy_template_argument): Remove
10076 unnecessary "cleanup" local.
10077
2bb8f231
TT
100782017-02-10 Tom Tromey <tom@tromey.com>
10079
10080 * python/python.c (do_start_initialization): New function, from
10081 _initialize_python.
10082 (_initialize_python): Call do_start_initialization.
10083 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10084 goto.
10085
1bdfaf42
TT
100862017-02-10 Tom Tromey <tom@tromey.com>
10087
10088 * python/py-prettyprint.c (pretty_print_one_value): Use
10089 gdbpy_ref.
10090
88b6faea
TT
100912017-02-10 Tom Tromey <tom@tromey.com>
10092
10093 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10094 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10095 gdbpy_ref.
10096 * python/py-type.c (field_new): Use gdbpy_ref.
10097 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10098 gdbpy_ref.
10099 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10100 (py_free_pspace): Likewise.
10101 (pspace_to_pspace_object): Likewise.
10102 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10103 (py_free_objfile): Likewise.
10104 (objfile_to_objfile_object): Likewise.
10105 * python/py-inferior.c (delete_thread_object): Use
10106 gdbpy_ref.
10107 (infpy_read_memory): Likewise.
10108 (py_free_inferior): Likewise.
10109 * python/py-evtregistry.c (create_eventregistry_object): Use
10110 gdbpy_ref.
10111 * python/py-event.c (create_event_object): Use gdbpy_ref.
10112
7780f186
TT
101132017-02-10 Tom Tromey <tom@tromey.com>
10114
10115 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10116 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10117 used.
10118 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10119 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10120 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10121 python/py-framefilter.c, python/py-function.c,
10122 python/py-inferior.c, python/py-infevents.c,
10123 python/py-linetable.c, python/py-newobjfileevent.c,
10124 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10125 python/py-signalevent.c, python/py-stopevent.c,
10126 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10127 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10128 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10129 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10130
d4b0bb18
TT
101312017-02-10 Tom Tromey <tom@tromey.com>
10132
10133 * ui-out.h (ui_out_emit_type): New class.
10134 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10135 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10136 and ui_out_emit_tuple.
10137 (enumerate_locals): Likewise.
10138 (py_mi_print_variables, py_print_locals, py_print_args): Use
10139 ui_out_emit_list.
10140 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10141 ui_out_emit_list.
10142 * common/gdb_optional.h: New file.
10143
f67f945c
MG
101442017-02-10 Martin Galvan <martingalvan@sourceware.org>
10145
10146 * MAINTAINERS (Write After Approval): Update my e-mail address.
10147
18da0c51
MG
101482017-02-10 Martin Galvan <martingalvan@sourceware.org>
10149
10150 PR gdb/21122
10151 * breakpoint.c (_initialize_breakpoint): Update the help description
10152 of the 'commands' command to indicate that it takes a list argument.
10153
62c14536
SM
101542017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10155
10156 * interps.c (current_interp_set_logging): Remove "return".
10157
ff6fa247
GB
101582017-02-09 Gary Benson <gbenson@redhat.com>
10159
10160 * symtab.c (add_symtab_completions): Prevent NULL pointer
10161 dereference.
10162
a474bd8e
PA
101632017-02-08 Pedro Alves <palves@redhat.com>
10164
10165 * interps.c (interp::interp): Remove reference to quiet_p.
10166 (interp_set): Make static. Remove dead "Switching to" output
10167 code.
10168 (interp_quiet_p, interp_set_quiet): Delete.
10169 (interpreter_exec_cmd): Don't set the interpreter quiet.
10170 * interps.h (interp_quiet_p): Make static.
10171 (class interp) <quiet_p>: Remove field
10172
3d7b173c
JG
101732017-02-08 Jerome Guitton <guitton@adacore.com>
10174
604c4576
JG
10175 * cli/cli-decode.c (find_command_name_length): Make it extern.
10176 * cli/cli-decode.h (find_command_name_length): Declare.
10177 * cli/cli-script.c (command_name_equals, line_first_arg):
10178 New functions.
10179 (process_next_line): Use cli-decode to parse command names.
10180 (build_command_line): Make args a constant pointer.
10181
101822017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10183
3d7b173c
JG
10184 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10185 Remove case-insensitive search.
10186
1291063d
JM
101872017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10188
10189 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10190 at the end of the line. Avoids an ARI warning.
10191
20b477a7
LM
101922017-02-06 Luis Machado <lgustavo@codesourcery.com>
10193
10194 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10195 rdseed instructions.
10196 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10197
3f7b46f2
IR
101982017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10199
10200 PR tdep/20936
10201 Provide and use sparc32 and sparc64 target description XML files.
10202 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10203 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10204 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10205 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10206 * features/sparc/sparc32-solaris.xml: New file.
10207 * features/sparc/sparc64-solaris.xml: New file.
10208 * features/sparc/sparc32-solaris.c: Generated.
10209 * features/sparc/sparc64-solaris.c: Generated.
10210 * sparc-tdep.h: Account for differences in target descriptions.
10211 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10212 (sparc32_register_type): Use target provided registers.
10213 (validate_tdesc_registers): New function.
10214 (sparc32_gdbarch_init): Use tdesc_has_registers.
10215 Set pseudoregister functions.
10216 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10217 (sparc64_register_type): Use target provided registers.
10218 (sparc64_init_abi): Set pseudoregister functions.
10219
f0fd41c1
TT
102202017-02-03 Tom Tromey <tom@tromey.com>
10221
10222 PR rust/21097:
10223 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10224 with a single member.
10225
d6f9b0fb
PA
102262017-02-03 Pedro Alves <palves@redhat.com>
10227
10228 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10229 (cli_interp_base::~cli_interp_base): New.
10230 (cli_interp): New struct.
10231 (as_cli_interp): Cast the interp itself to cli_interp.
10232 (cli_interpreter_pre_command_loop): Rename to ...
10233 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10234 parameter.
10235 (cli_interpreter_init): Rename to ...
10236 (cli_interp::init): ... this. Remove 'self' parameter. Use
10237 boolean. Make extern.
10238 (cli_interpreter_resume): Rename to ...
10239 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10240 extern.
10241 (cli_interpreter_suspend): Rename to ...
10242 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10243 extern.
10244 (cli_interpreter_exec): Rename to ...
10245 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10246 extern.
10247 (cli_interpreter_supports_command_editing): Rename to ...
10248 (cli_interp_base::supports_command_editing): ... this. Remove
10249 'interp' parameter. Make extern.
10250 (cli_ui_out): Rename to ...
10251 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10252 Make extern.
10253 (cli_set_logging): Rename to ...
10254 (cli_interp_base::set_logging): ... this. Remove 'interp'
10255 parameter. Make extern.
10256 (cli_interp_procs): Delete.
10257 (cli_interp_factory): Adjust to use "new".
10258 * cli/cli-interp.h: Include "interps.h".
10259 (struct cli_interp_base): New struct.
10260 * interps.c (struct interp): Delete. Fields moved to interps.h.
10261 (interp_new): Delete.
10262 (interp::interp, interp::~interp): New.
10263 (interp_set): Use bool, and return void. Assume the interpreter
10264 has suspend, init and resume methods, and that the all return
10265 void.
10266 (set_top_level_interpreter): interp_set returns void.
10267 (interp_ui_out): Adapt.
10268 (current_interp_set_logging): Adapt.
10269 (interp_data): Delete.
10270 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10271 (interp_exec): Adapt.
10272 (top_level_interpreter_data): Delete.
10273 * interps.h (interp_init_ftype, interp_resume_ftype)
10274 (interp_suspend_ftype, interp_exec_ftype)
10275 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10276 (class interp): New.
10277 (interp_new): Delete.
10278 (interp_set): Now returns void. Use bool.
10279 (interp_data, top_level_interpreter_data): Delete.
10280 * mi/mi-common.h: Include interps.h.
10281 (class mi_interp): Inherit from interp. Define a ctor. Declare
10282 init, resume, suspect, exec, interp_ui_out, set_logging and
10283 pre_command_loop methods.
10284 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10285 (mi_interpreter_init): Rename to ...
10286 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10287 bool, return void and make extern. Adjust.
10288 (mi_interpreter_resume): ... Rename to ...
10289 (mi_interp::resume): ... this. Remove the 'data' parameter,
10290 return void and make extern. Adjust.
10291 (mi_interpreter_suspend): ... Rename to ...
10292 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10293 return void and make extern. Adjust.
10294 (mi_interpreter_exec): ... Rename to ...
10295 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10296 extern. Adjust.
10297 (mi_interpreter_pre_command_loop): ... Rename to ...
10298 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10299 parameter and make extern.
10300 (mi_on_normal_stop_1): Adjust.
10301 (mi_ui_out): Rename to ...
10302 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10303 parameter and make extern. Adjust.
10304 (mi_set_logging): Rename to ...
10305 (mi_interp::set_logging): ... this. Remove the 'interp'
10306 parameter and make extern. Adjust.
10307 (mi_interp_procs): Delete.
10308 (mi_interp_factory): Adjust to use 'new'.
10309 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10310 (mi_print_exception, mi_execute_command, mi_load_progress):
10311 Adjust.
10312 * tui/tui-interp.c (tui_interp): New class.
10313 (as_tui_interp): Return a tui_interp pointer.
10314 (tui_on_normal_stop, tui_on_signal_received)
10315 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10316 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10317 to use interp::interp_ui_out.
10318 (tui_init): Rename to ...
10319 (tui_interp::init): ... this. Remove the 'self' parameter, use
10320 bool, return void and make extern. Adjust.
10321 (tui_resume): Rename to ...
10322 (tui_interp::resume): ... this. Remove the 'data' parameter,
10323 return void and make extern. Adjust.
10324 (tui_suspend): Rename to ...
10325 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10326 return void and make extern. Adjust.
10327 (tui_ui_out): Rename to ...
10328 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10329 parameter, and make extern. Adjust.
10330 (tui_exec): Rename to ...
10331 (tui_interp::exec): ... this. Remove the 'data' parameter and
10332 make extern.
10333 (tui_interp_procs): Delete.
10334 (tui_interp_factory): Use "new".
10335
65c40c95
TT
103362017-02-02 Tom Tromey <tom@tromey.com>
10337
10338 * rust-exp.y (ends_raw_string, space_then_number)
10339 (rust_identifier_start_p): Return bool.
10340 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10341 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10342 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10343 (rust_chartype_p): Return bool.
10344 (val_print_struct, rust_print_struct_def, rust_print_type):
10345 Update.
10346 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10347 Return bool.
10348
b50f188d
TT
103492017-02-02 Tom Tromey <tom@tromey.com>
10350
10351 * rust-lang.c: Reindent.
10352
03c85b11
TT
103532017-02-02 Tom Tromey <tom@tromey.com>
10354
10355 * rust-lang.h (rust_crate_for_block): Update.
10356 * rust-lang.c (rust_crate_for_block): Return std::string.
10357 (rust_get_disr_info): Use std:;string, not
10358 gdb::unique_xmalloc_ptr.
10359 * rust-exp.y (crate_name): Update.
10360
9b6da501
PA
103612017-02-02 Pedro Alves <palves@redhat.com>
10362
10363 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10364 field out of gdb_disassembler_test and make it static.
10365
ec4cb20b
PA
103662017-02-02 Pedro Alves <palves@redhat.com>
10367
10368 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10369 mi1_interp and mi_interp fields.
10370
5be5dbf0
PA
103712017-02-02 Pedro Alves <palves@redhat.com>
10372
616268b6
PA
10373 * cli/cli-interp.c (struct saved_output_files, saved_output):
10374 Moved from cli/cli-logging.c.
10375 (cli_set_logging): New function.
10376 (cli_interp_procs): Install cli_set_logging.
10377 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10378 Declare.
10379 * cli/cli-logging.c (struct saved_output_files, saved_output):
10380 Moved to cli/cli-interp.c.
10381 (pop_output_files): Don't save outputs here.
10382 (make_logging_output): New function.
10383 (handle_redirections): Don't build tee nor save previous outputs
10384 here.
10385 * interps.c (current_interp_set_logging): Change prototype.
10386 Assume there's always a set_logging_proc method installed.
10387 * interps.h (interp_set_logging_ftype): Change prototype.
10388 (current_interp_set_logging): Change prototype and adjust comment.
10389 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10390 use make_logging_output.
10391 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
103922017-02-02 Pedro Alves <palves@redhat.com>
10393
5be5dbf0
PA
10394 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10395 from ...
10396 (set_logging_overwrite): ... here.
10397 (logging_no_redirect_file): Delete.
10398 (set_logging_redirect): Don't handle redirection on the fly.
10399 Instead warn that "logging off" / "logging on" is necessary.
10400 (pop_output_files): Delete references to logging_no_redirect_file.
10401 (show_logging_command): Always speak in terms of what will happen
10402 once logging is reenabled.
10403
c99cc448
PA
104042017-02-02 Pedro Alves <palves@redhat.com>
10405
10406 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10407
8b172ce7
PA
104082017-02-02 Pedro Alves <palves@redhat.com>
10409
10410 * disasm.c (gdb_pretty_print_insn): Rename to ...
10411 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10412 Remove gdbarch parameter. Adapt to clear the object's buffers
10413 instead of allocating new buffers, and to print using the object's
10414 gdb_disassembler instead of calling gdb_print_insn.
10415 (dump_insns): Use gdb_pretty_print_disassembler.
10416 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10417 (gdb_pretty_print_disassembler): New class.
10418 * record-btrace.c (btrace_insn_history): Use
10419 gdb_pretty_print_disassembler.
10420
d7e74731
PA
104212017-02-02 Pedro Alves <palves@redhat.com>
10422
10423 * ada-lang.c (type_as_string): Use string_file.
10424 * ada-valprint.c (ada_print_floating): Use string_file.
10425 * ada-varobj.c (ada_varobj_scalar_image)
10426 (ada_varobj_get_value_image): Use string_file.
10427 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10428 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10429 * breakpoint.c (update_inserted_breakpoint_locations)
10430 (insert_breakpoint_locations, reattach_breakpoints)
10431 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10432 (print_it_watchpoint): Use string_file.
10433 (save_breakpoints): Use stdio_file.
10434 * c-exp.y (oper): Use string_file.
10435 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10436 tee_file.
10437 (pop_output_files): Use delete.
10438 (handle_redirections): Use stdio_file and tee_file.
10439 * cli/cli-setshow.c (do_show_command): Use string_file.
10440 * compile/compile-c-support.c (c_compute_program): Use
10441 string_file.
10442 * compile/compile-c-symbols.c (generate_vla_size): Take a
10443 'string_file &' instead of a 'ui_file *'.
10444 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10445 of a 'ui_file *'. Use string_file.
10446 (generate_c_for_variable_locations): Take a 'string_file &'
10447 instead of a 'ui_file *'.
10448 * compile/compile-internal.h (generate_c_for_for_one_variable):
10449 Take a 'string_file &' instead of a 'ui_file *'.
10450 * compile/compile-loc2c.c (push, pushf, unary, binary)
10451 (print_label, pushf_register_address, pushf_register)
10452 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10453 'ui_file *'. Adjust.
10454 * compile/compile.c (compile_to_object): Use string_file.
10455 * compile/compile.h (compile_dwarf_expr_to_c)
10456 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10457 'ui_file *'.
10458 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10459 (replace_typedefs_qualified_name): Use string_file and
10460 obstack_copy0.
10461 * disasm.c (gdb_pretty_print_insn): Use string_file.
10462 (gdb_disassembly): Adjust reference the null_stream global.
10463 (do_ui_file_delete): Delete.
10464 (gdb_insn_length): Use null_stream.
10465 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10466 * dwarf2loc.c (dwarf2_compile_property_to_c)
10467 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10468 'string_file &' instead of a 'ui_file *'.
10469 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10470 * dwarf2read.c (do_ui_file_peek_last): Delete.
10471 (dwarf2_compute_name): Use string_file.
10472 * event-top.c (gdb_setup_readline): Use stdio_file.
10473 * gdbarch.sh (verify_gdbarch): Use string_file.
10474 * gdbtypes.c (safe_parse_type): Use null_stream.
10475 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10476 string_file.
10477 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10478 'string_file *' instead of a 'ui_file *'.
10479 (gdbscm_arch_disassemble): Use string_file.
10480 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10481 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10482 inherits from ui_file.
10483 (ioscm_file_port_delete, ioscm_file_port_rewind)
10484 (ioscm_file_port_put): Delete.
10485 (ioscm_file_port_write): Rename to ...
10486 (ioscm_file_port::write): ... this. Remove file_port_magic
10487 checks.
10488 (ioscm_file_port_new): Delete.
10489 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10490 ui_file_up.
10491 * guile/scm-type.c (tyscm_type_name): Use string_file.
10492 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10493 Use string_file.
10494 * infcmd.c (print_return_value_1): Use string_file.
10495 * infrun.c (print_target_wait_results): Use string_file.
10496 * language.c (add_language): Use string_file.
10497 * location.c (explicit_to_string_internal): Use string_file.
10498 * main.c (captured_main_1): Use null_file.
10499 * maint.c (maintenance_print_architecture): Use stdio_file.
10500 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10501 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10502 event_channel>: Change type to mi_console_file pointer.
10503 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10504 (mi_console_file_delete): Delete.
10505 (struct mi_console_file): Delete.
10506 (mi_console_file_magic): Delete.
10507 (mi_console_file_new): Delete.
10508 (mi_console_file::mi_console_file): New.
10509 (mi_console_file_delete): Delete.
10510 (mi_console_file_fputs): Delete.
10511 (mi_console_file::write): New.
10512 (mi_console_raw_packet): Delete.
10513 (mi_console_file::flush): New.
10514 (mi_console_file_flush): Delete.
10515 (mi_console_set_raw): Rename to ...
10516 (mi_console_file::set_raw): ... this.
10517 * mi/mi-console.h (class mi_console_file): New class.
10518 (mi_console_file_new, mi_console_set_raw): Delete.
10519 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10520 (mi_set_logging): Use delete and tee_file. Adjust.
10521 * mi/mi-main.c (output_register): Use string_file.
10522 (mi_cmd_data_evaluate_expression): Use string_file.
10523 (mi_cmd_data_read_memory): Use string_file.
10524 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10525 * mi/mi-out.c (mi_ui_out::main_stream): New.
10526 (mi_ui_out::rewind): Use main_stream and
10527 string_file.
10528 (mi_ui_out::put): Use main_stream and string_file.
10529 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10530 Allocate a 'string_file' instead.
10531 (mi_out_new): Don't allocate a mem_fileopen stream here.
10532 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10533 (mi_ui_out::main_stream): Declare method.
10534 * printcmd.c (eval_command): Use string_file.
10535 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10536 * python/py-arch.c (archpy_disassemble): Use string_file.
10537 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10538 * python/py-frame.c (frapy_str): Use string_file.
10539 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10540 Use string_file.
10541 * python/py-type.c (typy_str): Use string_file.
10542 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10543 * python/py-value.c (valpy_str): Use string_file.
10544 * record-btrace.c (btrace_insn_history): Use string_file.
10545 * regcache.c (regcache_print): Use stdio_file.
10546 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10547 * remote.c (escape_buffer): Use string_file.
10548 * rust-lang.c (rust_get_disr_info): Use string_file.
10549 * serial.c (serial_open_ops_1): Use stdio_file.
10550 (do_serial_close): Use delete.
10551 * stack.c (print_frame_arg): Use string_file.
10552 (print_frame_args): Remove local mem_fileopen stream, not used.
10553 (print_frame): Use string_file.
10554 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10555 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10556 Take a 'string_file *' instead of a 'ui_file *'.
10557 * top.c (new_ui): Use stdio_file and stderr_file.
10558 (free_ui): Use delete.
10559 (execute_command_to_string): Use string_file.
10560 (quit_confirm): Use string_file.
10561 * tracepoint.c (collection_list::append_exp): Use string_file.
10562 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10563 * tui/tui-file.c: Don't include "ui-file.h".
10564 (enum streamtype, struct tui_stream): Delete.
10565 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10566 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10567 (tui_file::tui_file): New method.
10568 (tui_file_fputs): Delete.
10569 (tui_file_get_strbuf): Delete.
10570 (tui_file::puts): New method.
10571 (tui_file_adjust_strbuf): Delete.
10572 (tui_file_flush): Delete.
10573 (tui_file::flush): New method.
10574 * tui/tui-file.h: Tweak intro comment.
10575 Include ui-file.h.
10576 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10577 (tui_file_adjust_strbuf): Delete declarations.
10578 (class tui_file): New class.
10579 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10580 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10581 (tui_register_format): Use string_stream.
10582 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10583 (tui_get_function_from_frame): Use string_file.
10584 * typeprint.c (type_to_string): Use string_file.
10585 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10586 (null_stream): New global.
10587 (ui_file_delete): Delete.
10588 (ui_file::ui_file): New.
10589 (null_file_isatty): Delete.
10590 (ui_file::~ui_file): New.
10591 (null_file_rewind): Delete.
10592 (ui_file::printf): New.
10593 (null_file_put): Delete.
10594 (null_file_flush): Delete.
10595 (ui_file::putstr): New.
10596 (null_file_write): Delete.
10597 (ui_file::putstrn): New.
10598 (null_file_read): Delete.
10599 (ui_file::putc): New.
10600 (null_file_fputs): Delete.
10601 (null_file_write_async_safe): Delete.
10602 (ui_file::vprintf): New.
10603 (null_file_delete): Delete.
10604 (null_file::write): New.
10605 (null_file_fseek): Delete.
10606 (null_file::puts): New.
10607 (ui_file_data): Delete.
10608 (null_file::write_async_safe): New.
10609 (gdb_flush, ui_file_isatty): Adjust.
10610 (ui_file_put, ui_file_rewind): Delete.
10611 (ui_file_write): Adjust.
10612 (ui_file_write_for_put): Delete.
10613 (ui_file_write_async_safe, ui_file_read): Adjust.
10614 (ui_file_fseek): Delete.
10615 (fputs_unfiltered): Adjust.
10616 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10617 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10618 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10619 (set_ui_file_data): Delete.
10620 (string_file::~string_file, string_file::write)
10621 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10622 (do_ui_file_as_string, ui_file_as_string): Delete.
10623 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10624 (struct mem_file): Delete.
10625 (mem_file_new): Delete.
10626 (stdio_file::stdio_file): New.
10627 (mem_file_delete): Delete.
10628 (stdio_file::stdio_file): New.
10629 (mem_fileopen): Delete.
10630 (stdio_file::~stdio_file): New.
10631 (mem_file_rewind): Delete.
10632 (stdio_file::set_stream): New.
10633 (mem_file_put): Delete.
10634 (stdio_file::open): New.
10635 (mem_file_write): Delete.
10636 (stdio_file_magic, struct stdio_file): Delete.
10637 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10638 (stdio_file::flush): New.
10639 (stdio_file_read): Rename to ...
10640 (stdio_file::read): ... this. Adjust.
10641 (stdio_file_write): Rename to ...
10642 (stdio_file::write): ... this. Adjust.
10643 (stdio_file_write_async_safe): Rename to ...
10644 (stdio_file::write_async_safe) ... this. Adjust.
10645 (stdio_file_fputs): Rename to ...
10646 (stdio_file::puts) ... this. Adjust.
10647 (stdio_file_isatty): Delete.
10648 (stdio_file_fseek): Delete.
10649 (stdio_file::isatty): New.
10650 (stderr_file_write): Rename to ...
10651 (stderr_file::write) ... this. Adjust.
10652 (stderr_file_fputs): Rename to ...
10653 (stderr_file::puts) ... this. Adjust.
10654 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10655 (stderr_file::stderr_file): New.
10656 (tee_file_magic): Delete.
10657 (struct tee_file): Delete.
10658 (tee_file::tee_file): New.
10659 (tee_file_new): Delete.
10660 (tee_file::~tee_file): New.
10661 (tee_file_delete): Delete.
10662 (tee_file_flush): Rename to ...
10663 (tee_file::flush): ... this. Adjust.
10664 (tee_file_write): Rename to ...
10665 (tee_file::write): ... this. Adjust.
10666 (tee_file::write_async_safe): New.
10667 (tee_file_fputs): Rename to ...
10668 (tee_file::puts): ... this. Adjust.
10669 (tee_file_isatty): Rename to ...
10670 (tee_file::isatty): ... this. Adjust.
10671 * ui-file.h (struct obstack, struct ui_file): Don't
10672 forward-declare.
10673 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10674 (ui_file_write_ftype)
10675 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10676 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10677 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10678 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10679 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10680 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10681 (set_ui_file_fseek): Delete.
10682 (ui_file_data, ui_file_delete, ui_file_rewind)
10683 (struct ui_file): New.
10684 (ui_file_up): New.
10685 (class null_file): New.
10686 (null_stream): Declare.
10687 (ui_file_write_for_put, ui_file_put): Delete.
10688 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10689 Delete.
10690 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10691 (gdb_fopen, tee_file_new): Delete.
10692 (struct string_file): New.
10693 (struct stdio_file): New.
10694 (stdio_file_up): New.
10695 (struct stderr_file): New.
10696 (class tee_file): New.
10697 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10698 of a 'ui_file *'. Adjust.
10699 * ui-out.h (class ui_out) <field_stream>: Likewise.
10700 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10701 (null_stream): Delete.
10702 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10703 Adjust.
10704 * utils.h (struct ui_file): Delete forward declaration..
10705 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10706 (error_stream): Take a 'string_file &' instead of a
10707 'ui_file *'.
10708 * varobj.c (varobj_value_get_print_value): Use string_file.
10709 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10710 * gdbarch.c: Regenerate.
10711
187808b0
PA
107122017-02-02 Pedro Alves <palves@redhat.com>
10713
10714 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10715 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10716 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10717 Adjust to call gdb_print_insn instead of
10718 gdb_disassembler::print_insn.
10719 (dump_insns, do_mixed_source_and_assembly_deprecated)
10720 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10721 'gdbarch' parameter. Remove gdb_disassembler parameter.
10722 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10723 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10724 declaration.
10725 (gdb_pretty_print_insn): Re-add declaration.
10726 * record-btrace.c (btrace_insn_history): Don't allocate a
10727 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10728
7a8eb317
SM
107292017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10730
10731 * disasm.h (gdb_disassembly): Remove file_string parameter.
10732 * disasm.c (gdb_disassembly): Likewise.
10733 * cli/cli-cmds.c (print_disassembly): Adapt.
10734 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10735 * stack.c (do_gdb_disassembly): Likewise.
10736
7346ef59
AA
107372017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10738
10739 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10740 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10741 targets. And if the implicit value is longer than needed, extract
10742 the first bytes instead of the "least significant" ones.
10743
cd4007e4
MM
107442017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10745
10746 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10747 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10748 (btrace_fetch): Assert can_access_registers_ptid.
10749 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10750 validate_registers_access.
10751
cf77c34e
MM
107522017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10753
10754 * gdbthread.h (can_access_registers_ptid): New.
10755 * thread.c (can_access_registers_ptid): New.
10756
be85ce7d
PA
107572017-02-01 Pedro Alves <palves@redhat.com>
10758
10759 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10760
29b0b251
PA
107612017-01-31 Pedro Alves <palves@redhat.com>
10762
10763 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10764 Fix typos.
10765
289b5b24
PA
107662017-01-31 Pedro Alves <palves@redhat.com>
10767
10768 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10769 not used.
10770
b47413b4
PA
107712017-01-31 Pedro Alves <palves@redhat.com>
10772
10773 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10774
60adb36c
PA
107752017-01-31 Pedro Alves <palves@redhat.com>
10776
10777 * common/scoped_restore.h
10778 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10779 change the value's parameter type to T2.
10780 (make_scoped_restore): Likewise.
10781
2735833d
WT
107822017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10783 Richard Henderson <rth@redhat.com>
10784
10785 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10786 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10787 GS_BASE for older kernels.
10788 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10789 GS_BASE for older kernels.
10790 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10791 and GS_BASE to the offset table.
10792 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10793 system register group.
10794 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10795 for older kernels.
10796 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10797 amd64 ABI.
10798 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10799 AMD64_GSBASE_REGNUM.
10800 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10801 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10802 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10803 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10804 i386/64bit-segments.xml in those rules.
10805 * features/i386/64bit-segments.xml: New file.
10806 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10807 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10808 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10809 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10810 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10811 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10812 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10813 * features/i386/amd64-avx-linux.c: Regenerated.
10814 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10815 * features/i386/amd64-avx-mpx.c: Regenerated.
10816 * features/i386/amd64-avx512-linux.c: Regenerated.
10817 * features/i386/amd64-linux.c: Regenerated.
10818 * features/i386/amd64-mpx-linux.c: Regenerated.
10819 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10820 * features/i386/i386-avx-mpx.c: Regenerated.
10821 * features/i386/x32-avx-linux.c: Regenerated.
10822 * features/i386/x32-avx512-linux.c: Regenerated.
10823 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10824 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10825 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10826 * regformats/i386/amd64-linux.dat: Regenerated.
10827 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10828 * regformats/i386/x32-avx-linux.dat: Regenerated.
10829 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10830 * regformats/i386/x32-linux.dat: Regenerated.
10831
8884e97e
WT
108322017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10833
10834 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10835 Set to AMD64_NUM_REGS.
10836
7005d26a
WT
108372017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10838
10839 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10840 that checks validity of a register number.
10841
4bd2e1b2
KC
108422017-01-27 Kees Cook <keescook@google.com>
10843
10844 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10845 fetch_fpregs if target has fpa registers.
10846 (arm_linux_store_inferior_registers): Call store_fpregs if target
10847 has fpa registers.
10848
7cf1de6c
AA
108492017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10850
10851 * cris-tdep.c (cris_gdbarch_init): Remove check for
10852 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10853
874a1c8c
AT
108542017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10855
10856 * corelow.c (get_core_register_section): Check for regset
10857 existence before checking for REGSET_VARIABLE_SIZE.
10858
d8b49cf0
YQ
108592017-01-26 Yao Qi <yao.qi@linaro.org>
10860 Pedro Alves <palves@redhat.com>
10861
10862 PR gdb/20939
10863 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10864 call memory_error, save memaddr instead.
10865 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10866 negative, cal memory_error.
10867 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10868
658ca58c
YQ
108692017-01-26 Yao Qi <yao.qi@linaro.org>
10870
10871 * disasm-selftests.c (memory_error_test): New function.
10872 (_initialize_disasm_selftests): Register memory_error_test.
10873
79843d45
YQ
108742017-01-26 Yao Qi <yao.qi@linaro.org>
10875
10876 * Makefile.in (SFILES): Add disasm-selftests.c and
10877 selftest-arch.c.
10878 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10879 * disasm-selftests.c: New file.
10880 * selftest-arch.c: New file.
10881 * selftest-arch.h: New file.
10882
8cafda32
YQ
108832017-01-26 Yao Qi <yao.qi@linaro.org>
10884
10885 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10886 to bfd_arch_mep. Don't return 0 if section is not
10887 found. Call print_insn_mep.
10888
e47ad6c0
YQ
108892017-01-26 Pedro Alves <palves@redhat.com>
10890 Yao Qi <yao.qi@linaro.org>
10891
10892 * arm-tdep.c: Include "disasm.h".
10893 (gdb_print_insn_arm): Update code to get gdbarch.
10894 * disasm.c (dis_asm_read_memory): Change it to
10895 gdb_disassembler::dis_asm_read_memory.
10896 (dis_asm_memory_error): Likewise.
10897 (dis_asm_print_address): Likewise.
10898 (gdb_pretty_print_insn): Change it to
10899 gdb_disassembler::pretty_print_insn.
10900 (dump_insns): Add one argument gdb_disassemlber. All
10901 callers updated.
10902 (do_mixed_source_and_assembly_deprecated): Likewise.
10903 (do_mixed_source_and_assembly): Likewise.
10904 (do_assembly_only): Likewise.
10905 (gdb_disassembler::gdb_disassembler): New.
10906 (gdb_disassembler::print_insn): New.
10907 * disasm.h (class gdb_disassembler): New.
10908 (gdb_pretty_print_insn): Remove declaration.
10909 (gdb_disassemble_info): Likewise.
10910 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10911 (gdbscm_disasm_read_memory_worker): Update.
10912 (gdbscm_disasm_read_memory): Update.
10913 (gdbscm_disasm_memory_error): Remove.
10914 (gdbscm_disasm_print_address): Remove.
10915 (gdbscm_disassembler::gdbscm_disassembler): New.
10916 (gdbscm_print_insn_from_port): Update.
10917 * mips-tdep.c: Include disasm.h.
10918 (gdb_print_insn_mips): Update code to get gdbarch.
10919 * record-btrace.c (btrace_insn_history): Update.
10920 * spu-tdep.c: Include disasm.h.
10921 (struct spu_dis_asm_data): Remove.
10922 (struct spu_dis_asm_info): New.
10923 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10924 SPU id.
10925 (gdb_print_insn_spu): Cast disassemble_info to
10926 spu_dis_asm_info.
10927
80d75874
YQ
109282017-01-26 Yao Qi <yao.qi@linaro.org>
10929
10930 * disasm.c (do_ui_file_delete): Delete.
10931 (gdb_insn_length): Move code creating stream to ...
10932 * utils.c (null_stream): ... here. New function.
10933 * utils.h (null_stream): Declare.
10934
60685cd0
SM
109352017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10936
10937 * python/py-inferior.c (find_thread_object): Return directly
10938 from the loop. Remove "found" variable.
10939
eb1cdb62
JB
109402017-01-21 Joel Brobecker <brobecker@adacore.com>
10941
10942 GDB 7.12.1 released.
10943
b1ce6568
SM
109442017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10945
10946 * python/py-function.c (fnpy_call): Reorder declarations to have
10947 the gdbpy_enter object declared first.
10948 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10949
6f8b0407
SM
109502017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10951
fec93fb1 10952 PR python/21068
6f8b0407
SM
10953 * python/python-internal.h (PyMem_RawMalloc): Define for
10954 Python < 3.4.
10955 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10956 PyMem_RawMalloc instead of PyMem_Malloc.
10957
78cbbba8
LM
109582017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10959 Luis Machado <lgustavo@codesourcery.com>
10960
10961 * NEWS (New commands): Mention flash-erase.
10962 (New MI commands): Mention target-flash-erase.
10963 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10964 command.
10965 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10966 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10967 * target.c (flash_erase_command): New function.
10968 (initialize_targets): Add new flash-erase command.
10969 * target.h (flash_erase_command): New declaration.
10970
2132fe85
JB
109712017-01-20 Joel Brobecker <brobecker@adacore.com>
10972
10973 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10974 HAVE_SYS_PROCFS_H is defined.
10975
d1dff226
AH
109762017-01-18 Alan Hayward <alan.hayward@arm.com>
10977
10978 * remote.c (struct cached_reg): Change data into a pointer.
10979 * (stop_reply_dtr): Free data pointers before deleting vector.
10980 (process_stop_reply): Likewise.
10981 (remote_parse_stop_reply): Allocate space for data
10982
9890e433
AH
109832017-01-18 Alan Hayward <alan.hayward@arm.com>
10984
10985 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10986 MAX_REGISTER_SIZE.
10987 (amd64_pseudo_register_read_value): Likewise.
10988 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10989 (store_register_using_P): Likewise.
10990 * regcache.c (regcache_xfer_part): Likewise.
10991
7a36499a
IR
109922017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10993
10994 Split real and pseudo registers.
10995 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10996 (sparc32_pseudo_regnum): New enum.
10997 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10998 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10999 (SPARC32_CP0_REGISTERS): New macro.
11000 (sparc32_pseudo_register_name): New function.
11001 (sparc32_register_name): Use sparc32_pseudo_register_name.
11002 (sparc32_pseudo_register_type): New function.
11003 (sparc32_register_type): Use sparc32_pseudo_register_type.
11004 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11005 pseudo register numbers.
11006 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11007 (SPARC64_CP0_REGISTERS): New macro.
11008 (sparc64_pseudo_register_name): New function.
11009 (sparc64_register_name): Use sparc64_pseudo_register_name.
11010 (sparc64_pseudo_register_type): New function.
11011 (sparc64_register_type): Use sparc64_pseudo_register_type.
11012 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11013 pseudo register numbers.
11014 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11015 sparc64_store_arguments): Handle pseudo register numbers.
11016
6f8976bf
YQ
110172017-01-13 Yao Qi <yao.qi@linaro.org>
11018
11019 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11020 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11021 output.
11022 (getpkt_or_notif_sane_1): Likewise.
11023
e4241ace
YQ
110242017-01-13 Yao Qi <yao.qi@linaro.org>
11025
11026 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11027 of CC. Pass "-x c++-header" instead of "-x c".
11028
3015c064
SM
110292017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11030
11031 * remote.c (remote_can_async_p): Update comment.
11032
fde1b17d
SM
110332017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11034
11035 * linux-nat.c (linux_nat_can_async_p): Update comment.
11036
ca1ca08b
SM
110372017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11038
11039 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11040
4ad2da73
SM
110412017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11042
11043 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11044
c8b23b3f
TT
110452017-01-10 Tom Tromey <tom@tromey.com>
11046
11047 * python/py-type.c (typy_legacy_template_argument): Update.
11048 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11049 ~demangle_parse_info): Declare new members.
11050 (cp_demangled_name_to_comp): Return unique_ptr.
11051 (cp_demangled_name_parse_free)
11052 (make_cleanup_cp_demangled_name_parse_free)
11053 (cp_new_demangle_parse_info): Remove.
11054 * cp-support.c (do_demangled_name_parse_free_cleanup)
11055 (make_cleanup_cp_demangled_name_parse_free): Remove.
11056 (inspect_type, cp_canonicalize_string_full)
11057 (cp_canonicalize_string): Update.
11058 (mangled_name_to_comp): Change return type.
11059 (cp_class_name_from_physname, method_name_from_physname)
11060 (cp_func_name, cp_remove_params): Update.
11061 * cp-name-parser.y (demangle_parse_info): New constructor, from
11062 cp_new_demangle_parse_info.
11063 (~demangle_parse_info): New destructor, from
11064 cp_demangled_name_parse_free.
11065 (cp_merge_demangle_parse_infos): Update.
11066 (cp_demangled_name_to_comp): Change return type.
11067
1ac32117
TT
110682017-01-10 Tom Tromey <tom@tromey.com>
11069
11070 * top.c (prevent_dont_repeat): Change return type.
11071 * python/python.c (execute_gdb_command): Use std::string.
11072 Update.
11073 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11074 * command.h (prevent_dont_repeat): Change return type.
11075 * breakpoint.c (bpstat_do_actions_1): Update.
11076
0cf08227
TT
110772017-01-10 Tom Tromey <tom@tromey.com>
11078
11079 * value.h (scoped_value_mark::~scoped_value_mark): Call
11080 free_to_mark.
11081 (scoped_value_mark::free_to_mark): New method.
11082 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11083 scoped_value_mark.
11084
eb115069
TT
110852017-01-10 Tom Tromey <tom@tromey.com>
11086
11087 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11088 (valpy_reference_value, valpy_const_value, valpy_get_address)
11089 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11090 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11091 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11092 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11093 scoped_value_mark.
11094 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11095 * value.h (scoped_value_mark): New class.
11096
906768f9
TT
110972017-01-10 Tom Tromey <tom@tromey.com>
11098
11099 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11100 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11101 * psymtab.c (discard_psymtabs_upto): Remove.
11102 (make_cleanup_discard_psymtabs): Remove.
11103 (struct psymtab_state): Remove.
11104
bef155c3
TT
111052017-01-10 Tom Tromey <tom@tromey.com>
11106
11107 * record-full.c (record_full_save_cleanups): Remove.
11108 (record_full_save): Use gdb::unlinker.
11109 * gcore.c (do_bfd_delete_cleanup): Remove.
11110 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11111 cleanups.
11112 * dwarf2read.c (unlink_if_set): Remove.
11113 (write_psymtabs_to_index): Use gdb::unlinker.
11114 * common/gdb_unlinker.h: New file.
11115
192b62ce
TT
111162017-01-10 Tom Tromey <tom@tromey.com>
11117
11118 * windows-tdep.c (windows_xfer_shared_library): Update.
11119 * windows-nat.c (windows_make_so): Update.
11120 * utils.h (make_cleanup_bfd_unref): Remove.
11121 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11122 * symfile.h (symfile_bfd_open)
11123 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11124 * symfile.c (read_symbols, symbol_file_add)
11125 (separate_debug_file_exists): Update.
11126 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11127 (generic_load, reread_symbols): Update.
11128 * symfile-mem.c (symbol_file_add_from_memory): Update.
11129 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11130 (spu_symbol_file_add_from_memory): Update.
11131 * solist.h (struct target_so_ops) <bfd_open>: Return
11132 gdb_bfd_ref_ptr.
11133 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11134 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11135 gdb_bfd_ref_ptr.
11136 (solib_map_sections, reload_shared_libraries_1): Update.
11137 * solib-svr4.c (enable_break): Update.
11138 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11139 * solib-frv.c (enable_break2): Update.
11140 * solib-dsbt.c (enable_break): Update.
11141 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11142 gdb_bfd_ref_ptr.
11143 (darwin_solib_get_all_image_info_addr_at_init): Update.
11144 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11145 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11146 * record-full.c (record_full_save): Update.
11147 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11148 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11149 * minidebug.c (find_separate_debug_file_in_section): Return
11150 gdb_bfd_ref_ptr.
11151 * machoread.c (macho_add_oso_symfile): Change abfd to
11152 gdb_bfd_ref_ptr.
11153 (macho_symfile_read_all_oso): Update.
11154 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11155 (macho_symfile_read): Update.
11156 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11157 (jit_bfd_try_read_symtab): Update.
11158 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11159 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11160 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11161 gdb_bfd_ref_ptr.
11162 (gdb_bfd_ref_policy): New struct.
11163 (gdb_bfd_ref_ptr): New typedef.
11164 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11165 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11166 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11167 gdb_bfd_ref_ptr.
11168 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11169 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11170 (gcore_command): Update.
11171 * exec.c (exec_file_attach): Update.
11172 * elfread.c (elf_symfile_read): Update.
11173 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11174 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11175 (open_and_init_dwo_file): Update.
11176 (open_dwp_file): Return gdb_bfd_ref_ptr.
11177 (open_and_init_dwp_file): Update.
11178 * corelow.c (core_open): Update.
11179 * compile/compile-object-load.c (compile_object_load): Update.
11180 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11181 * coffread.c (coff_symfile_read): Update.
11182 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11183 gdb_bfd_ref_ptr. Rename.
11184 (dump_bfd_file, restore_command): Update.
11185 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11186 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11187 (find_separate_debug_file_by_buildid): Update.
11188
50315b21
TT
111892017-01-10 Tom Tromey <tom@tromey.com>
11190
11191 * common/gdb_ref_ptr.h: New file.
11192 * python/py-ref.h (struct gdbpy_ref_policy): New.
11193 (gdbpy_ref): Now a typedef.
11194
fc4007c9
TT
111952017-01-10 Tom Tromey <tom@tromey.com>
11196
11197 * utils.h (make_cleanup_htab_delete): Don't declare.
11198 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11199 Remove.
11200 * linespec.c (decode_compound_collector): Add constructor,
11201 destructor.
11202 (lookup_prefix_sym): Remove cleanup.
11203 (symtab_collector): Add constructor, destructor.
11204 (collect_symtabs_from_filename): Remove cleanup.
11205 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11206 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11207 Use htab_up.
11208 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11209 * dwarf2read.c (dw2_expand_symtabs_matching)
11210 (dw2_map_symbol_filenames, dwarf_decode_macros)
11211 (write_psymtabs_to_index): Use htab_up.
11212 * dwarf2loc.c (func_verify_no_selftailcall)
11213 (call_site_find_chain_1, func_verify_no_selftailcall)
11214 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11215 std::vector, gdb::unique_xmalloc_ptr.
11216 (call_sitep): Remove typedef.
11217 (dwarf2_locexpr_baton_eval): Remove unused variable.
11218
8dbcee67
TT
112192017-01-10 Tom Tromey <tom@tromey.com>
11220
11221 * python/python-internal.h (make_cleanup_py_decref)
11222 (make_cleanup_py_xdecref): Don't declare.
11223 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11224 (py_xdecref, make_cleanup_py_xdecref): Remove.
11225
13df46cc
TT
112262017-01-10 Tom Tromey <tom@tromey.com>
11227
11228 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11229 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11230
06fc9bf7
TT
112312017-01-10 Tom Tromey <tom@tromey.com>
11232
11233 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11234
830a4934
TT
112352017-01-10 Tom Tromey <tom@tromey.com>
11236
11237 * python/py-utils.c (unicode_to_encoded_string)
11238 (python_string_to_target_string)
11239 (python_string_to_target_python_string)
11240 (python_string_to_host_string, gdbpy_obj_to_string)
11241 (get_addr_from_python): Use gdbpy_ref.
11242
4586d543
TT
112432017-01-10 Tom Tromey <tom@tromey.com>
11244
11245 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11246 gdbpy_ref.
11247
59876f8f
TT
112482017-01-10 Tom Tromey <tom@tromey.com>
11249
11250 * python/python.c (eval_python_command, gdbpy_decode_line)
11251 (gdbpy_run_events, gdbpy_start_type_printers)
11252 (gdbpy_apply_type_printers): Use gdbpy_ref.
11253
97d83487
TT
112542017-01-10 Tom Tromey <tom@tromey.com>
11255
11256 * python/py-param.c (get_doc_string, compute_enum_values): Use
11257 gdbpy_ref.
11258
9205649a
TT
112592017-01-10 Tom Tromey <tom@tromey.com>
11260
11261 * python/py-inferior.c (find_thread_object, build_inferior_list):
11262 Use gdbpy_ref.
11263
74c49d45
TT
112642017-01-10 Tom Tromey <tom@tromey.com>
11265
11266 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11267
16361ffb
TT
112682017-01-10 Tom Tromey <tom@tromey.com>
11269
11270 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11271 gdbpy_ref.
11272
905f2cca
TT
112732017-01-10 Tom Tromey <tom@tromey.com>
11274
11275 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11276 extra incref.
11277 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11278 Use gdbpy_ref.
11279
64081434
TT
112802017-01-10 Tom Tromey <tom@tromey.com>
11281
11282 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11283 gdbpy_ref.
11284
59e9e831
TT
112852017-01-10 Tom Tromey <tom@tromey.com>
11286
11287 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11288 decref results of PyArg_ParseTupleAndKeywords.
11289
9de10f6d
TT
112902017-01-10 Tom Tromey <tom@tromey.com>
11291
11292 * python/python.c (python_run_simple_file): Use
11293 unique_xmalloc_ptr, gdbpy_ref.
11294
2bd5759d
TT
112952017-01-10 Tom Tromey <tom@tromey.com>
11296
11297 * python/py-prettyprint.c (print_stack_unless_memory_error)
11298 (print_string_repr, print_children): Use gdbpy_ref.
11299 (dummy_python_frame): New class.
11300 (dummy_python_frame::dummy_python_frame): Rename from
11301 push_dummy_python_frame.
11302 (py_restore_tstate): Remove.
11303
3b4e0e01
TT
113042017-01-10 Tom Tromey <tom@tromey.com>
11305
11306 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11307
17a22718
TT
113082017-01-10 Tom Tromey <tom@tromey.com>
11309
11310 * python/python.c (ensure_python_env, restore_python_env):
11311 Remove.
11312 * python/python-internal.h (ensure_python_env): Don't declare.
11313 * varobj.h (varobj_ensure_python_env): Don't declare.
11314 * varobj.c (varobj_ensure_python_env): Remove.
11315
68cdc557
TT
113162017-01-10 Tom Tromey <tom@tromey.com>
11317
11318 * varobj.c (varobj_value_get_print_value): Use
11319 gdbpy_enter_varobj.
11320
1eba6383
TT
113212017-01-10 Tom Tromey <tom@tromey.com>
11322
11323 * python/py-prettyprint.c (print_string_repr, print_children):
11324 Update.
11325 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11326 of "encoding".
11327 * varobj.c (varobj_value_get_print_value): Update.
11328 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11329
bde7b3e3
TT
113302017-01-10 Tom Tromey <tom@tromey.com>
11331
11332 * varobj.c (varobj_get_display_hint)
11333 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11334 (varobj_set_visualizer, free_variable): Use
11335 gdbpy_enter_varobj.
11336
a7785f8c
TT
113372017-01-10 Tom Tromey <tom@tromey.com>
11338
11339 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11340 (do_finish_initialization): New function. Use gdbpy_ref.
11341 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11342 do_finish_initialization.
11343
2865bfce
TT
113442017-01-10 Tom Tromey <tom@tromey.com>
11345
11346 * python/py-param.c (get_set_value, get_show_value): Use
11347 gdbpy_enter, gdbpy_ref.
11348
0e9dcc75
TT
113492017-01-10 Tom Tromey <tom@tromey.com>
11350
11351 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11352
12a5cedd
TT
113532017-01-10 Tom Tromey <tom@tromey.com>
11354
11355 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11356
788f2586
TT
113572017-01-10 Tom Tromey <tom@tromey.com>
11358
11359 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11360 Use gdbpy_enter_varobj.
11361
6cd67bea
TT
113622017-01-10 Tom Tromey <tom@tromey.com>
11363
11364 * varobj.c (gdbpy_enter_varobj): New constructor.
11365 * python/python-internal.h (gdbpy_enter_varobj): New class.
11366 * python/py-varobj.c (py_varobj_get_iterator): Use
11367 gdbpy_enter_varobj.
11368
14b122bf
TT
113692017-01-10 Tom Tromey <tom@tromey.com>
11370
11371 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11372 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11373 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11374 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11375 unique_xmalloc_ptr.
11376 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11377
bf1ca3b9
TT
113782017-01-10 Tom Tromey <tom@tromey.com>
11379
11380 * python/py-xmethods.c (invoke_match_method): Use
11381 gdbpy_ref.
11382
572a5524
TT
113832017-01-10 Tom Tromey <tom@tromey.com>
11384
11385 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11386 gdbpy_enter, gdbpy_ref.
11387
396a78b6
TT
113882017-01-10 Tom Tromey <tom@tromey.com>
11389
11390 * python/python.c (python_interactive_command): Use gdbpy_enter.
11391
a88b13c7
TT
113922017-01-10 Tom Tromey <tom@tromey.com>
11393
11394 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11395 gdbpy_ref.
11396
e9f0c363
TT
113972017-01-10 Tom Tromey <tom@tromey.com>
11398
11399 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11400 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11401
6349f452
TT
114022017-01-10 Tom Tromey <tom@tromey.com>
11403
11404 * utils.h (htab_deleter): New struct.
11405 (htab_up): New typedef.
11406 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11407 gdbpy_enter, gdbpy_ref, htab_up.
11408
c0171de6
TT
114092017-01-10 Tom Tromey <tom@tromey.com>
11410
11411 * python/py-unwind.c (pending_frame_invalidate): Remove.
11412 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11413
f18e226f
TT
114142017-01-10 Tom Tromey <tom@tromey.com>
11415
11416 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11417 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11418
c57af3f1
TT
114192017-01-10 Tom Tromey <tom@tromey.com>
11420
11421 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11422
60e600ec
TT
114232017-01-10 Tom Tromey <tom@tromey.com>
11424
11425 * python/python.c (gdbpy_eval_from_control_command)
11426 (gdbpy_source_script, gdbpy_run_events)
11427 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11428 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11429 gdbpy_enter.
11430
bf7da5b0
TT
114312017-01-10 Tom Tromey <tom@tromey.com>
11432
11433 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11434
2d38bced
TT
114352017-01-10 Tom Tromey <tom@tromey.com>
11436
11437 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11438
07bc7329
TT
114392017-01-10 Tom Tromey <tom@tromey.com>
11440
11441 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11442 (python_on_inferior_call_pre, python_on_inferior_call_post)
11443 (python_on_memory_change, python_on_register_change)
11444 (python_inferior_exit, python_new_objfile, add_thread_object)
11445 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11446
6e7c365e
TT
114472017-01-10 Tom Tromey <tom@tromey.com>
11448
11449 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11450 (bpfinishpy_handle_exit): Use gdbpy_enter.
11451
6ba0cd40
TT
114522017-01-10 Tom Tromey <tom@tromey.com>
11453
11454 * python/py-cmd.c (cmdpy_destroyer)
11455 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11456 gdbpy_enter.
11457
de2dc875
TT
114582017-01-10 Tom Tromey <tom@tromey.com>
11459
11460 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11461 gdbpy_enter.
11462 (gdbpy_breakpoint_has_cond): Likewise.
11463
4ecee2c4
TT
114642017-01-10 Tom Tromey <tom@tromey.com>
11465
11466 * python/python.c (gdbpy_enter): New constructor.
11467 (~gdbpy_enter): New destructor.
11468 (restore_python_env, ensure_python_env): Rewrite.
11469 * python/python-internal.h (gdbpy_enter): New class.
11470
37fce74f
TT
114712017-01-10 Tom Tromey <tom@tromey.com>
11472
11473 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11474
53a0cca3
TT
114752017-01-10 Tom Tromey <tom@tromey.com>
11476
11477 * python/py-value.c (value_has_field, get_field_flag)
11478 (get_field_type, valpy_getitem, convert_value_from_python): Use
11479 gdbpy_ref.
11480
ff3724f5
TT
114812017-01-10 Tom Tromey <tom@tromey.com>
11482
11483 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11484 gdbpy_ref.
11485
0700aea5
TT
114862017-01-10 Tom Tromey <tom@tromey.com>
11487
11488 * python/py-prettyprint.c (search_pp_list)
11489 (find_pretty_printer_from_objfiles)
11490 (find_pretty_printer_from_progspace)
11491 (find_pretty_printer_from_gdb, find_pretty_printer)
11492 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11493 gdbpy_ref.
11494
1bb44c9f
TT
114952017-01-10 Tom Tromey <tom@tromey.com>
11496
11497 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11498
87ce03fd
TT
114992017-01-10 Tom Tromey <tom@tromey.com>
11500
11501 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11502 (ltpy_get_all_source_lines): Use gdbpy_ref.
11503
ee0a3fb8
TT
115042017-01-10 Tom Tromey <tom@tromey.com>
11505
11506 * python/py-framefilter.c (extract_sym, extract_value)
11507 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11508 gdbpy_ref.
11509
bf2a52fa
TT
115102017-01-10 Tom Tromey <tom@tromey.com>
11511
11512 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11513
f59fe7f8
TT
115142017-01-10 Tom Tromey <tom@tromey.com>
11515
11516 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11517
80bd970a
TT
115182017-01-10 Tom Tromey <tom@tromey.com>
11519
11520 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11521 gdbpy_ref.
11522
d1b3de2e
TT
115232017-01-10 Tom Tromey <tom@tromey.com>
11524
11525 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11526
3bb43384
TT
115272017-01-10 Tom Tromey <tom@tromey.com>
11528
11529 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11530 (typy_range): Use gdbpy_ref.
11531
abf5651e
TT
115322017-01-10 Tom Tromey <tom@tromey.com>
11533
11534 * python/py-threadevent.c (create_thread_event_object): Use
11535 gdbpy_ref.
11536 * python/py-stopevent.c (create_stop_event_object): Simplify.
11537 (emit_stop_event): Use gdbpy_ref.
11538 * python/py-signalevent.c (create_signal_event_object): Use
11539 gdbpy_ref.
11540 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11541 (emit_new_objfile_event, create_clear_objfiles_event_object)
11542 (emit_clear_objfiles_event): Use gdbpy_ref.
11543 * python/py-infevents.c (create_inferior_call_event_object)
11544 (create_register_changed_event_object)
11545 (create_memory_changed_event_object, emit_inferior_call_event)
11546 (emit_memory_changed_event, emit_register_changed_event): Use
11547 gdbpy_ref.
11548 * python/py-exitedevent.c (create_exited_event_object)
11549 (emit_exited_event): Use gdbpy_ref.
11550 * python/py-event.h (evpy_emit_event): Remove
11551 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11552 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11553 * python/py-continueevent.c (emit_continue_event): Use
11554 gdbpy_ref.
11555 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11556 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11557 gdbpy_ref.
11558 * python/py-bpevent.c (create_breakpoint_event_object): Use
11559 gdbpy_ref.
11560
a68ff33e
TT
115612017-01-10 Tom Tromey <tom@tromey.com>
11562
11563 * python/py-ref.h: New file.
11564
7becfd03
SM
115652017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11566
11567 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11568 void.
11569 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11570 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11571 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11572 * ui-out.c (ui_out::redirect): Likewise.
11573 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11574 * cli/cli-logging.c (set_logging_redirect): Update call site of
11575 ui_out::redirect.
11576 (handle_redirections): Likewise.
11577 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11578 * top.c (execute_command_to_string): Likewise.
11579 * utils.c (do_ui_out_redirect_pop): Likewise.
11580
df294654
SM
115812017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11582
11583 * stack.c (_initialize_stack): Update "frame" command help message.
11584
f5e6296e
IB
115852017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11586
11587 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11588
0e2d6fa6
YQ
115892017-01-06 Yao Qi <yao.qi@linaro.org>
11590
11591 * x86-linux-nat.h: Include gdb_proc_service.h.
11592
44d6d3f9
YQ
115932017-01-06 Yao Qi <yao.qi@linaro.org>
11594
11595 * ser-base.h: Include serial.h.
11596
656731fe
YQ
115972017-01-06 Yao Qi <yao.qi@linaro.org>
11598
11599 * ppc-linux-tdep.h: Include ppc-tdep.h.
11600
1ca8f924
YQ
116012017-01-06 Yao Qi <yao.qi@linaro.org>
11602
11603 * nat/amd64-linux-siginfo.h: Include signal.h.
11604
bc3008c4
YQ
116052017-01-06 Yao Qi <yao.qi@linaro.org>
11606
11607 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11608
66c80d03
YQ
116092017-01-06 Yao Qi <yao.qi@linaro.org>
11610
11611 * mi/mi-parse.h: Include mi-cmds.h.
11612
051d2dda
YQ
116132017-01-06 Yao Qi <yao.qi@linaro.org>
11614
11615 * inf-loop.c: Don't include "target.h".
11616 * inf-loop.h: Include it here.
11617
8018d34f
YQ
116182017-01-06 Yao Qi <yao.qi@linaro.org>
11619
11620 * dfp.h: Include "dboulest.h" and "expression.h".
11621
c0b8369c
YQ
116222017-01-06 Yao Qi <yao.qi@linaro.org>
11623
11624 * ax-gdb.h: Include "ax.h".
11625
ad5cba2a
YQ
116262017-01-06 Yao Qi <yao.qi@linaro.org>
11627
11628 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11629 with nat/gdb_ptrace.h.
11630
1c33cd7f
YQ
116312017-01-05 Yao Qi <yao.qi@linaro.org>
11632
11633 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11634 new line.
11635 (mips64_fbsd_sigframe_init): Likewise.
11636
c988ac1d
JB
116372017-01-04 John Baldwin <jhb@FreeBSD.org>
11638
11639 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11640 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11641
b268007c
JB
116422017-01-04 John Baldwin <jhb@FreeBSD.org>
11643
11644 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11645 * NEWS: Mention new FreeBSD/mips native configuration.
11646 * config/mips/fbsd.mh: New file.
11647 * configure.host: Add mips*-*-freebsd*.
11648 * mips-fbsd-nat.c: New file.
11649
387360da
JB
116502017-01-04 John Baldwin <jhb@FreeBSD.org>
11651
11652 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11653 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11654 * NEWS: Mention new FreeBSD/mips target.
11655 * configure.tgt: Add mips*-*-freebsd*.
11656 * mips-fbsd-tdep.c: New file.
11657 * mips-fbsd-tdep.h: New file.
11658
2aaaf250
YQ
116592017-01-04 Yao Qi <yao.qi@linaro.org>
11660
11661 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11662 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11663
61baf725
JB
116642017-01-01 Joel Brobecker <brobecker@adacore.com>
11665
6dbb839a 11666 Update copyright year range in all GDB files.
61baf725 11667
c113e7ff 116682017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 11669
c113e7ff 11670 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 11671
c113e7ff 11672For older changes see ChangeLog-2016.
c906108c
SS
11673\f
11674Local Variables:
11675mode: change-log
11676left-margin: 8
11677fill-column: 74
11678version-control: never
57da7796 11679coding: utf-8
c906108c 11680End: