Remove leftover declarations in interps.h
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
b392b304
SM
12017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4 Remove declarations.
5
d5833c62
TT
62017-10-20 Tom Tromey <tom@tromey.com>
7
8 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
9 std::vector.
10 (gdb_bfd_record_inclusion): Update.
11 (bfdp): Remove typedef.
12
06d5bbc8
TT
132017-10-20 Tom Tromey <tom@tromey.com>
14
15 * gdb_bfd.c (gdb_bfd_ref): Use new.
16 (struct gdb_bfd_data): Add constructor, destructor, and member
17 initializers.
18 (gdb_bfd_unref): Use delete.
19
2712ce2e
TT
202017-10-20 Tom Tromey <tom@tromey.com>
21
22 * exec.c (exec_file_attach): Use new_bfd_ref.
23 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
24 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
25 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
26 new_bfd_ref.
27 * gdb_bfd.h (new_bfd_ref): New function.
28
fcc8fb2f
PA
292017-10-20 Pedro Alves <palves@redhat.com>
30
31 * main.c (captured_command_loop): Add attribute noinline.
32
4c2287b0
SM
332017-10-19 Simon Marchi <simon.marchi@ericsson.com>
34
35 * interps.c (struct interp_factory): Add constructor.
36 (interp_factory_p): Remove typedef.
37 (DEF_VEC_P(interp_factory_p)): Remove.
38 (interpreter_factories): Change type to std::vector.
39 (interp_factory_register): Adjust.
40 (interp_lookup): Adjust.
41 (interpreter_completer): Adjust.
42
3d415c26
TT
432017-10-19 Tom Tromey <tom@tromey.com>
44
45 * break-catch-syscall.c (catch_syscall_completer): Use
46 std::string, gdb::unique_xmalloc_ptr.
47
395423c4
TT
482017-10-19 Tom Tromey <tom@tromey.com>
49
50 * infcall.c (call_function_by_hand_dummy): Use std::string.
51
54f70bc1
TT
522017-10-19 Tom Tromey <tom@tromey.com>
53
54 * mi/mi-main.c (mi_cmd_execute): Update.
55 * top.h (prepare_execute_command): Return scoped_value_mark.
56 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
57 Add move constructor.
58 * top.c (prepare_execute_command): Return scoped_value_mark.
59 (execute_command): Update.
60
63929e84
PA
612017-10-19 Pedro Alves <palves@redhat.com>
62
63 * xml-support.c (xml_fetch_content_from_file): Check fread's
64 return.
65
a75868f5
PA
662017-10-19 Pedro Alves <palves@redhat.com>
67
68 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
69 async.
70 (handle_error_fd): New function.
71 (ser_base_async): Add/delete an event loop file handler for
72 error_fd.
73
2edf834e
PA
742017-10-19 Pedro Alves <palves@redhat.com>
75
76 * xml-support.c (xml_fetch_content_from_file): Don't read in
77 chunks. Instead use fseek to determine the file's size, and read
78 it in one go.
79
c8ba13ad
KS
802017-11-18 Keith Seitz <keiths@redhat.com>
81
82 * c-exp.y (oper): Canonicalize conversion operators of user-defined
83 types.
84 Add whitespace to front of type name.
85
37534686
KS
862017-10-18 Keith Seitz <keiths@redhat.com>
87
88 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
89 DW_AT_accessibility.
90
28c7c158
YQ
912017-10-18 Yao Qi <yao.qi@linaro.org>
92
93 * features/tic6x-c62x-linux.c: Remove.
94
30f0b101
TT
952017-10-17 Tom Tromey <tom@tromey.com>
96
97 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
98 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
99 (do_mixed_source_and_assembly): Likewise.
100
57e12da9
TT
1012017-10-17 Tom Tromey <tom@tromey.com>
102
103 * regcache.c (regcache::xfer_part): Remove assertion.
104
7b700999
PA
1052017-10-17 Pedro Alves <palves@redhat.com>
106
107 * xml-support.c (xml_fetch_content_from_file): Call
108 unique_ptr::release() instead unique_ptr::get() when passing
109 through xrealloc.
110
d3037ba6
YQ
1112017-10-17 Yao Qi <yao.qi@linaro.org>
112
113 * regcache.c (regcache::xfer_part): Remove parameters read and
114 write, add parameter is_raw. All callers are updated.
115
83d5a34d
KS
1162017-10-16 Keith Seitz <keiths@redhat.com>
117
118 * c-typeprint.c (enum access_specifier): Moved here from
119 c_type_print_base.
120 (output_access_specifier): New function.
121 (c_type_print_base): Consider typedefs when assessing
122 whether access labels are needed.
123 Use output_access_specifier as needed.
124 Output access specifier for typedefs, if needed.
125 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
126 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
127 fields.
128 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
129 accessor macros.
130
87028b87
TT
1312017-10-16 Tom Tromey <tom@tromey.com>
132
133 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
134 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
135 * target.c (target_fileio_read_stralloc): Update.
136 * sparc64-tdep.c (adi_is_addr_mapped): Update.
137 * target.h (target_fileio_read_stralloc): Return
138 unique_xmalloc_ptr.
139
b7b030ad
TT
1402017-10-16 Tom Tromey <tom@tromey.com>
141
142 * xml-syscall.c (xml_init_syscalls_info): Update.
143 * xml-support.c (xinclude_start_include): Update.
144 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
145 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
146 (xml_fetch_content_from_file): Likewise.
147 * osdata.c (get_osdata): Update.
148 * target.h (target_read_stralloc, target_get_osdata): Return
149 unique_xmalloc_ptr.
150 * solib-aix.c (solib_aix_get_library_list): Update.
151 * solib-target.c (solib_target_current_sos): Update.
152 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
153 * xml-tdesc.c (fetch_available_features_from_target): Update.
154 (target_fetch_description_xml): Update.
155 (file_read_description_xml): Update.
156 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
157 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
158 (remote_pid_to_exec_file): Update.
159 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
160 (target_get_osdata): Likewise.
161
b80406ac
TT
1622017-10-16 Tom Tromey <tom@tromey.com>
163
164 * remote.c (remote_register_number_and_offset): Use std::vector.
165 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
166 (putpkt_binary): Use gdb::def_vector.
167 (compare_sections_command): Use gdb::byte_vector.
168
a90ecff8
TT
1692017-10-16 Tom Tromey <tom@tromey.com>
170
171 * ppc-linux-nat.c (hwdebug_insert_point): Use
172 gdb::unique_xmalloc_ptr, XDUP.
173
2dc0e219
TT
1742017-10-16 Tom Tromey <tom@tromey.com>
175
176 * probe.c (parse_probes): Use std::string.
177 (info_probes_for_ops, enable_probes_command)
178 (disable_probes_command): Remove cleanups.
179
b05628f0
TT
1802017-10-16 Tom Tromey <tom@tromey.com>
181
182 * buildsym.c (block_compar): Remove.
183 (end_symtab_get_static_block): Use std::vector.
184
a79b1bc6
SM
1852017-10-16 Simon Marchi <simon.marchi@ericsson.com>
186
187 * memrange.h (struct mem_range): Define operator< and operator==.
188 (mem_range_s): Remove.
189 (DEF_VEC_O (mem_range_s)): Remove.
190 (normalize_mem_ranges): Change parameter type to std::vector.
191 * memrange.c (compare_mem_ranges): Remove.
192 (normalize_mem_ranges): Change parameter type to std::vector,
193 adjust to vector change.
194 * exec.c (section_table_available_memory): Return vector, remove
195 parameter.
196 (section_table_read_available_memory): Adjust to std::vector
197 change.
198 * remote.c (remote_read_bytes): Adjust to std::vector
199 change.
200 * tracepoint.h (traceframe_available_memory): Change parameter
201 type to std::vector.
202 * tracepoint.c (traceframe_available_memory): Change parameter
203 type to std::vector, adjust.
204 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
205 std::vector change.
206 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
207 unittests/memrange-selftests.c.
208 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
209 * gdb/unittests/memrange-selftests.c: New file.
210
63f0e930
PA
2112017-10-16 Pedro Alves <palves@redhat.com>
212
213 * elfread.c (probe_key_free): Rename range-for variable.
214 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
215 (find_probe_by_pc, collect_probes): Rename range-for variable.
216
c40c7bfc
YQ
2172017-10-16 Yao Qi <yao.qi@linaro.org>
218
219 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
220 * features/tic6x-c62x.c: Remove.
221 * features/tic6x-c64x-linux.c: Remove.
222 * features/tic6x-c64x.c: Remove.
223 * features/tic6x-c64xp-linux.c: Remove.
224 * features/tic6x-c64xp.c: Remove.
225 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
226 initialize_tdesc_tic6x_*_linux functions.
227 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
228 initialize_tdesc_tic6x_* functions.
229
df27ae6a
YQ
2302017-10-16 Yao Qi <yao.qi@linaro.org>
231
232 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
233 tic6x-c62x.
234 * regformats/tic6x-c62x.dat: Remove.
235 * regformats/tic6x-c64x.dat: Remove.
236 * regformats/tic6x-c64xp.dat: Remove.
237
86766165
SM
2382017-10-15 Simon Marchi <simon.marchi@ericsson.com>
239
240 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
241 (the !HAVE_LIBEXPAT version).
242
824dfcc3
SM
2432017-10-14 Simon Marchi <simon.marchi@ericsson.com>
244
245 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
246 const.
247
2098b393
SM
2482017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
249
250 * target.h: Include tracepoint.h.
251 (enum trace_find_type): Move to tracepoint.h.
252 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
253 * tracepoint.h: Don't include target.h
254 (enum trace_find_type): Move from target.h.
255 (parse_traceframe_info): Return a unique ptr.
256 * tracepoint.c (current_traceframe_info): Change type to unique
257 ptr.
258 (free_traceframe_info): Remove.
259 (clear_traceframe_info): Don't manually free
260 current_traceframe_info.
261 (free_result): Remove.
262 (parse_traceframe_info): Return a unique ptr.
263 (get_traceframe_info): Adjust to unique ptr.
264 * ctf.c (ctf_traceframe_info): Return a unique ptr.
265 * remote.c (remote_traceframe_info): Return a unique ptr.
266 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
267 ptr.
268 * target-debug.h (target_debug_print_traceframe_info_up): New
269 macro.
270 * target-delegates.c: Regenerate.
271
4cdd21a8
SM
2722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * memrange.h (struct mem_range): Add constructors.
275 * tracepoint.h (struct traceframe_info) <memory>: Change type to
276 std::vector<mem_range>.
277 * tracepoint.c (free_traceframe_info): Don't manually free
278 vector.
279 (traceframe_info_start_memory): Adjust to vector change.
280 (traceframe_available_memory): Likewise.
281 * tracefile-tfile.c (build_traceframe_info): Likewise.
282 * ctf.c (ctf_traceframe_info): Likewise.
283
d0d292a2
SM
2842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
287 std::vector<int>.
288 * tracepoint.c (free_traceframe_info): Deallocate with delete.
289 (traceframe_info_start_tvar): Adjust to vector change.
290 (parse_traceframe_info): Allocate with new.
291 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
292 vector change.
293 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
294 change.
295 tfile_traceframe_info): Allocate with new.
296 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
297 change.
298
8d3c73ef
SM
2992017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * tracepoint.c (traceframe_info): Rename to...
302 (current_traceframe_info): ...this.
303 (clear_traceframe_info): Adjust.
304 (get_traceframe_info): Adjust.
305
b129dcac
SM
3062017-10-14 Simon Marchi <simon.marchi@ericsson.com>
307
308 * nat/linux-osdata.c: Include algorithm.
309 (compare_processes): Remove.
310 (struct pid_pgid_entry): New struct.
311 (linux_xfer_osdata_processgroups): Use std::vector instead of
312 XNEWVEC.
313
af5bf4ad
SM
3142017-10-14 Simon Marchi <simon.marchi@ericsson.com>
315
316 * objfiles.h: Don't include symfile.h.
317 (struct partial_symbol): Remove forward-declaration.
318 (struct objfile) <global_psymbols, static_psymbols>: Change type
319 to std::vector<partial_symbol *>.
320 * objfiles.c (objfile::objfile): Don't memset those fields.
321 (objfile::~objfile): Don't free those fields.
322 * psympriv.h (struct psymbol_allocation_list): Remove
323 forward-declaration.
324 (add_psymbol_to_list): Change psymbol_allocation_list parameter
325 to std::vector.
326 (start_psymtab_common): Change parameters to std::vector.
327 * psymtab.c: Include algorithm.
328 (require_partial_symbols): Call shrink_to_fit.
329 (find_pc_sect_psymbol): Adjust to vector change.
330 (match_partial_symbol): Likewise.
331 (lookup_partial_symbol): Likewise.
332 (psym_relocate): Likewise.
333 (dump_psymtab): Likewise.
334 (recursively_search_psymtabs): Likewise.
335 (compare_psymbols): Remove.
336 (sort_pst_symbols): Adjust to vector change.
337 (start_psymtab_common): Likewise.
338 (end_psymtab_common): Likewise.
339 (psymbol_bcache_full): De-constify return value.
340 (add_psymbol_to_bcache): Likewise.
341 (extend_psymbol_list): Remove.
342 (append_psymbol_to_list): Adjust to vector change.
343 (add_psymbol_to_list): Likewise.
344 (init_psymbol_list): Likewise.
345 (maintenance_info_psymtabs): Likewise.
346 (maintenance_check_psymtabs): Likewise.
347 * symfile.h (struct psymbol_allocation_list): Remove.
348 * symfile.c (reread_symbols): Adjust to vector change.
349 * dbxread.c (start_psymtab): Change type of parameters.
350 (dbx_symfile_read): Adjust to vector change.
351 (read_dbx_symtab): Likewise.
352 (start_psymtab): Change type of parameters.
353 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
354 (create_partial_symtab): Likewise.
355 (add_partial_symbol): Likewise.
356 (write_one_signatured_type): Likewise.
357 (recursively_write_psymbols): Likewise.
358 * mdebugread.c (parse_partial_symbols): Likewise.
359 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
360 (scan_xcoff_symtab): Adjust to vector change.
361 (xcoff_initial_scan): Likewise.
362
3ec5942f
SM
3632017-10-13 Simon Marchi <simon.marchi@ericsson.com>
364
365 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
366
2399fe6a
YQ
3672017-10-13 Yao Qi <yao.qi@linaro.org>
368
369 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
370 Remove s390x-*-expedite, add s390x-expedite.
371
4bf3f4a8
YQ
3722017-10-13 Yao Qi <yao.qi@linaro.org>
373
374 * features/s390-gs-linux64.c: Regenerated.
375 * features/s390x-gs-linux64.c: Regenerated.
376
9e86da07
TT
3772017-10-13 Tom Tromey <tom@tromey.com>
378
379 * compile/compile-object-run.c (do_module_cleanup): Use delete.
380 * solib.c (update_solib_list, reload_shared_libraries_1): Use
381 delete.
382 * symfile.c (symbol_file_add_with_addrs): Use new.
383 (symbol_file_add_separate): Update comment.
384 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
385 * jit.c (jit_object_close_impl): Use new.
386 (jit_unregister_code): Use delete.
387 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
388 (~objfile): Rename from free_objfile.
389 (free_objfile_separate_debug, do_free_objfile_cleanup)
390 (free_all_objfiles, objfile_purge_solibs): Use delete.
391 * objfiles.h (struct objfile): Add constructor and destructor.
392 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
393 (allocate_objfile, free_objfile): Don't declare.
394 (struct objstats): Add initializers.
395
c2508e90
SM
3962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
397
398 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
399 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
400 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
401 * gdbarch.h: Regenerate.
402 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
403 Adjust comment.
404 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
405 (i386_displaced_step_fixup): Adjust comment.
406 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
407
a900ff72
TT
4082017-10-12 Tom Tromey <tom@tromey.com>
409
410 * prologue-value.h (pv_area::store_would_trash): Return bool.
411 (pv_area::find_reg): Likewise.
412 * prologue-value.c (pv_area::store_would_trash): Return bool.
413 (pv_area::find_reg): Likewise.
414
f7b7ed97
TT
4152017-10-12 Tom Tromey <tom@tromey.com>
416
417 * s390-linux-tdep.c (s390_store, s390_load)
418 (s390_check_for_saved, s390_analyze_prologue): Update.
419 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
420 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
421 * prologue-value.h (class pv_area): Move from prologue-value.c.
422 Change names of members. Add constructor, destructor, member
423 functions.
424 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
425 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
426 (pv_area_fetch, pv_area_scan): Don't declare.
427 * prologue-value.c (struct pv_area::area_entry): Now member of
428 pv_area.
429 (struct pv_area): Move to prologue-value.h.
430 (pv_area::pv_area): Rename from make_pv_area.
431 (pv_area::~pv_area): Rename from free_pv_area.
432 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
433 (clear_entries, find_entry, overlaps, store_would_trash, store)
434 (fetch, find_reg, scan): Now member of pv_area.
435 Remove "area" argument. Update.
436 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
437 Update.
438 * mn10300-tdep.c (push_reg, check_for_saved)
439 (mn10300_analyze_prologue): Update.
440 * mep-tdep.c (is_arg_spill, check_for_saved)
441 (mep_analyze_prologue): Update.
442 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
443 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
444 (m32c_is_struct_return, m32c_analyze_prologue): Update.
445 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
446 Update.
447 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
448 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
449
466eecee
SM
4502017-10-12 Simon Marchi <simon.marchi@ericsson.com>
451
452 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
453 * linux-nat.c (linux_nat_delete_thread): New variable.
454 (lwp_free): Invoke linux_nat_delete_thread if set.
455 (linux_nat_set_delete_thread): New function.
456 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
457 thread delete callback.
458 * arm-linux-nat.c (arm_linux_delete_thread): New function.
459 (_initialize_arm_linux_nat): Assign thread delete callback.
460 * s390-linux-nat.c (s390_delete_thread): New function.
461 (_initialize_s390_nat): Assign thread delete callback.
462 * x86-linux-nat.c (x86_linux_add_target): Likewise.
463 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
464 function.
465 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
466 declaration.
467 * nat/x86-linux.c (x86_linux_delete_thread): New function.
468 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
469
f71c8822
TT
4702017-10-09 Tom Tromey <tom@tromey.com>
471
472 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
473 std::string.
474 * tui/tui-layout.c (enum tui_status): Use std::string.
475
981a3fb3
TT
4762017-10-11 Tom Tromey <tom@tromey.com>
477
478 * gdbthread.h (thread_command): Constify.
479 * inferior.h (detach_command): Constify.
480 * top.h (set_history, show_history): Constify.
481 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
482 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
483 * bsd-kvm.c (bsd_kvm_cmd): Constify.
484 * printcmd.c (set_command): Constify.
485 (non_const_set_command): New function.
486 * dcache.c (set_dcache_command, show_dcache_command): Constify.
487 * breakpoint.c (enable_command, disable_command, delete_command)
488 (catch_command, tcatch_command, set_breakpoint_cmd)
489 (show_breakpoint_cmd): Constify.
490 * macrocmd.c (macro_command): Constify.
491 * infcmd.c (unset_command, kill_command, detach_command)
492 (info_proc_cmd): Constify.
493 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
494 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
495 (info_auto_load_cmd): Constify.
496 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
497 (unset_tdesc_cmd): Constify.
498 * ada-lang.c (set_ada_command, show_ada_command)
499 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
500 * guile/guile.c (set_guile_command, show_guile_command)
501 (info_guile_command): Constify.
502 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
503 Constify.
504 * skip.c (skip_command): Constify.
505 * compile/compile.c (_initialize_compile): Constify.
506 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
507 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
508 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
509 (maint_btrace_pt_show_cmd): Constify.
510 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
511 Constify.
512 * python/python.c (user_show_python, user_set_python): Constify.
513 * mips-tdep.c (set_mips_command, show_mips_command)
514 (set_mipsfpu_command): Constify.
515 * record-btrace.c (cmd_record_btrace_start)
516 (cmd_set_record_btrace, cmd_show_record_btrace)
517 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
518 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
519 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
520 Constify.
521 * symfile.c (overlay_command): Constify.
522 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
523 * cli/cli-logging.c (set_logging_command, show_logging_command):
524 Constify.
525 * cli/cli-dump.c (dump_command, append_command)
526 (srec_dump_command, ihex_dump_command, verilog_dump_command)
527 (tekhex_dump_command, binary_dump_command)
528 (binary_append_command): Constify.
529 * cli/cli-decode.c (struct cmd_list_element): Change type of
530 "fun".
531 * cli/cli-cmds.c (info_command, show_command, set_debug)
532 (show_debug): Constify.
533 (show_command): Add non-const overload.
534 * top.c (set_history, show_history): Constify.
535 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
536 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
537 * target.c (target_command): Constify.
538 * sparc64-tdep.c (info_adi_command): Constify.
539 * record-full.c (cmd_record_full_start): Constify.
540 (set_record_full_command): Constify. Fix typo.
541 (show_record_full_command): Constify.
542 * thread.c (thread_command, thread_apply_command): Constify.
543 * memattr.c (dummy_cmd): Constify.
544 * value.c (function_command): Constify.
545 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
546 * probe.c (info_probes_command): Constify.
547 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
548 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
549 (show_thread_cmd, set_thread_default_cmd)
550 (show_thread_default_cmd): Constify.
551 (check_empty): Constify.
552 * tracepoint.c (tfind_command): Constify.
553 * cp-support.c (maint_cplus_command): Constify.
554 * windows-tdep.c (info_w32_command): Constify.
555 * record.c (cmd_record_start, set_record_command)
556 (show_record_command, info_record_command, cmd_record_goto):
557 Constify.
558 * ravenscar-thread.c (set_ravenscar_command)
559 (show_ravenscar_command): Constify.
560 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
561 Constify.
562 (add_internal_problem_command): Remove casts.
563 * arc-tdep.c (maintenance_print_arc_command): Constify.
564 * valprint.c (set_print, show_print, set_print_raw)
565 (show_print_raw): Constify.
566 * maint.c (maintenance_command, maintenance_info_command)
567 (maintenance_print_command, maintenance_set_cmd)
568 (maintenance_show_cmd, set_per_command_cmd)
569 (show_per_command_cmd, maintenance_check_command): Constify.
570 * language.c (set_check, show_check): Constify.
571 * typeprint.c (show_print_type, set_print_type): Constify.
572 * go32-nat.c (go32_info_dos_command): Constify.
573
fdf44873
TT
5742017-10-11 Tom Tromey <tom@tromey.com>
575
576 * breakpoint.c (prepare_re_set_context): Remove.
577 (breakpoint_re_set_one): Update. Don't use cleanups.
578 (breakpoint_re_set): Use scoped_restore, std::string, and
579 scoped_restore_current_language.
580
81b1e71c
TT
5812017-10-11 Tom Tromey <tom@tromey.com>
582
583 * breakpoint.c (commands_command_1): Use std::string.
584 (cleanup_executing_breakpoints): Remove.
585 (bpstat_do_actions_1): Use scoped_restore.
586 (bpstat_check_watchpoint): Use std::string.
587 (decode_static_tracepoint_spec): Likewise.
588 (break_range_command): Likewise.
589 (watch_command_1): Likewise.
590 (compare_breakpoints): Change argument types.
591 (clear_command): Use std::vector.
592 (cleanup_executing_breakpoints): Remove.
593 (update_global_location_list): Use unique_xmalloc_ptr.
594 (strace_command): Remove unused declaration.
595
4f9d9906
JB
5962017-10-11 John Baldwin <jhb@FreeBSD.org>
597
598 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
599 * NEWS: Mention new FreeBSD/arm native configuration.
600 * configure.host: Add arm*-*-freebsd*.
601 * configure.nat: Likewise.
602 * arm-fbsd-nat.c: New file.
603
7176dfd2
JB
6042017-10-11 John Baldwin <jhb@FreeBSD.org>
605
606 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
607 (ALLDEPFILES): Add arm-fbsd-tdep.c.
608 * NEWS: Mention new FreeBSD/arm target.
609 * configure.tgt: Add arm*-*-freebsd*.
610 * arm-fbsd-tdep.c: New file.
611 * arm-fbsd-tdep.h: New file.
612
fe220226
MR
6132017-10-11 Maciej W. Rozycki <macro@imgtec.com>
614
615 * linux-tdep.c (linux_make_corefile_notes): Remove call to
616 `gdbarch_elfcore_write_linux_prpsinfo'.
617 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
618 method.
619 (elf_internal_linux_prpsinfo): Remove declaration.
620 * gdbarch.h: Regenerate.
621 * gdbarch.c: Regenerate.
622
a2f63b2e
MR
6232017-10-11 Maciej W. Rozycki <macro@imgtec.com>
624
625 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
626 `set_gdbarch_elfcore_write_linux_prpsinfo'.
627
458ca1d0
PA
6282017-10-11 Pedro Alves <palves@redhat.com>
629
630 * breakpoint.c (reattach_breakpoints): Delete.
631 * breakpoint.h (reattach_breakpoints): Delete.
632
905014d7
SM
6332017-10-11 Simon Marchi <simon.marchi@ericsson.com>
634
635 * symfile.c (registered_sym_fns): Make struct, not typedef.
636 (DEF_VEC_O (registered_sym_fns)): Remove.
637 (symtab_fns): Change type to std::vector.
638 (add_symtab_fns): Adjust.
639 (find_sym_fns): Adjust.
640
56d704da
AK
6412017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
642
643 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
644 * arc-tdep.h (arc_arch_is_em): New function.
645 (arc_arch_is_hs): Likewise.
646
7fa29be9
EB
6472017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
648
649 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
650 parentheses in the declaration.
651 (macro_lookup_inclusion): Likewise.
652 (macro_lookup_definition): Likewise.
653 * p-lang.h (pascal_builtin_types): Likewise.
654 * tui/tui-data.c (tui_win_list): Likewise.
655 * tui/tui-data.h (tui_win_list): Likewise.
656 * utils.h (make_cleanup_free_section_addr_info): Likewise.
657
d9b477e3
KB
6582017-10-11 Mark Rages <markrages@gmail.com>
659
660 * target-memory.c (block_boundaries): Fix for block address not
661 aligned on block size.
662
65630365
PA
6632017-10-10 Pedro Alves <palves@redhat.com>
664 Tom Tromey <tom@tromey.com>
665
666 * breakpoint.c (struct captured_breakpoint_query_args)
667 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
668 (print_breakpoint): New.
669 * breakpoint.h (print_breakpoint): Declare.
670 * common/common-exceptions.h (enum return_reason): Remove
671 references to catch_exceptions.
672 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
673 Delete.
674 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
675 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
676 * gdb.h: Delete.
677 * gdbthread.h (thread_select): Declare.
678 * mi/mi-cmd-break.c: Don't include gdb.h.
679 (breakpoint_notify): Use print_breakpoint.
680 * mi/mi-cmd-catch.c: Don't include gdb.h.
681 * mi/mi-interp.c: Don't include gdb.h.
682 (mi_print_breakpoint_for_event): New.
683 (mi_breakpoint_created, mi_breakpoint_modified): Use
684 mi_print_breakpoint_for_event.
685 * mi/mi-main.c: Don't include gdb.h.
686 (mi_cmd_thread_select): Parse the global thread ID here. Use
687 thread_select instead of gdb_thread_select.
688 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
689 of using gdb_list_thread_ids.
690 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
691 FILEIO_ENOSYS here.
692 (remote_fileio_request): Use TRY/CATCH instead of
693 catch_exceptions.
694 * symfile-mem.c (struct symbol_file_add_from_memory_args)
695 (symbol_file_add_from_memory_wrapper): Delete.
696 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
697 * thread.c: Don't include gdb.h.
698 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
699 (thread_alive): Use thread_select.
700 (do_captured_thread_select): Delete, parts salvaged as ...
701 (thread_select): ... this new function.
702 (gdb_thread_select): Delete.
703
bf469271
PA
7042017-10-10 Pedro Alves <palves@redhat.com>
705 Tom Tromey <tom@tromey.com>
706
707 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
708 and reverse logic.
709 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
710 No longer macros. Instead ...
711 (enum wp_check_result): They're now values of this new
712 enumeration.
713 (watchpoint_check): Change return type to wp_check_result and
714 parameter type to bpstat.
715 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
716 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
717 catch_errors. Reverse logic of watchpoint_check call.
718 (breakpoint_re_set_one): Now returns void and takes a breakpoint
719 pointer as parameter.
720 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
721 * common/common-exceptions.c (throw_exception_sjlj): Update
722 comments to avoid mentioning catch_errors.
723 * exceptions.c (catch_errors): Delete.
724 * exceptions.h: Update comments to avoid mentioning catch_errors.
725 (catch_errors_ftype, catch_errors): Delete.
726 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
727 (hook_stop_stub): Delete.
728 (restore_selected_frame): Change return type to void, and
729 parameter type to const frame_id &.
730 (restore_infcall_control_state): Use TRY/CATCH instead of
731 catch_errors.
732 * main.c (captured_command_loop): Return void and remove
733 parameter. Remove references to catch_errors.
734 (captured_main): Use TRY/CATCH instead of catch_errors.
735 * objc-lang.c (objc_submethod_helper_data)
736 (find_objc_msgcall_submethod_helper): Delete.
737 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
738 catch_errors.
739 * record-full.c (record_full_message): Return void.
740 (record_full_message_args, record_full_message_wrapper): Delete.
741 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
742 instead of catch_errors.
743 * solib-aix.c (solib_aix_open_symbol_file_object): Change
744 parameter type to int.
745 * solib-darwin.c (open_symbol_file_object): Ditto.
746 * solib-dsbt.c (open_symbol_file_object): Ditto.
747 * solib-frv.c (open_symbol_file_object): Ditto.
748 * solib-svr4.c (open_symbol_file_object): Ditto.
749 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
750 * solib.c (update_solib_list): Use TRY/CATCH instead of
751 catch_errors.
752 * solist.h (struct target_so_ops) <open_symbol_file_object>:
753 Change type.
754 * symmisc.c (struct print_symbol_args): Remove.
755 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
756 (print_symbol): Change type.
757 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
758 and remove parameters.
759 (catch_errors): New.
760 (get_windows_debug_event): Adjust.
761
1a56bfa5
TT
7622017-10-09 Tom Tromey <tom@tromey.com>
763
764 * mi/mi-main.c (free_splay_tree): Remove.
765 (list_available_thread_groups): Use splay_tree_up.
766 * common/gdb_splay_tree.h: New file.
767
0c478e2d
TT
7682017-10-09 Tom Tromey <tom@tromey.com>
769
770 * mi/mi-main.c (do_nothing): Remove.
771 (list_available_thread_groups): Update.
772
cbd2b4e3
PA
7732017-10-09 Pedro Alves <palves@redhat.com>
774
775 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
776 reading registers when switching context.
777
a181c0bf
JB
7782017-10-09 John Baldwin <jhb@FreeBSD.org>
779
780 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
781 (fbsd_convert_siginfo): Likewise.
782 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
783
6e66f753
SM
7842017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
785
786 * configure.ac (try_guile_versions): Remove guile-2.2.
787 * configure: Regenerate.
788
890e9790
TT
7892017-10-09 Tom Tromey <tom@tromey.com>
790
791 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
792 (COMPILE.pre): Use $(CXX).
793
109483d9
PA
7942017-10-09 Pedro Alves <palves@redhat.com>
795
796 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
797 Use bool.
798 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
799 * cp-support.h (cp_remove_params): Now returns a
800 gdb::unique_xmalloc_ptr.
801 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
802 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
803 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
804 returning a gdb::unique_xmalloc_ptr.
805 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
806 * stack.c (find_frame_funname): Adjust to cp_remove_params
807 returning a gdb::unique_xmalloc_ptr.
808
791afaa2
TT
8092017-10-08 Tom Tromey <tom@tromey.com>
810
811 * dwarf2read.c (dwarf2_get_dwz_file): Use
812 gdb::unique_xmalloc_ptr.
813 (find_slot_in_mapped_hash): Likewise.
814 (dwarf2_physname): Likewise.
815 (create_dwo_unit_in_dwp_v1): Use std::string.
816 (create_dwo_unit_in_dwp_v2): Likewise.
817 (lookup_dwo_cutu): Likewise.
818 (inherit_abstract_dies): Use std::vector.
819 (read_array_type): Likewise.
820 (dwarf_decode_macros): Remove unused declaration.
821 (unsigned_int_compar): Remove.
822 (dwarf2_build_psymtabs_hard): Use scoped_restore.
823 (psymtabs_addrmap_cleanup): Remove.
824
30a9c02f
TT
8252017-10-08 Tom Tromey <tom@tromey.com>
826
827 * frame-unwind.c (frame_unwind_try_unwinder): Update.
828 * frame.h (frame_cleanup_after_sniffer): Declare.
829 (frame_prepare_for_sniffer): Return void.
830 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
831 type of argument.
832 (frame_prepare_for_sniffer): Return void.
833
757325a3
TT
8342017-10-08 Tom Tromey <tom@tromey.com>
835
836 * utils.h (make_cleanup_value_free): Remove.
837 * utils.c (do_value_free, struct cleanup): Remove.
838 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
839 Use gdb_value_up.
840 * value.h (struct value_deleter): New.
841 (gdb_value_up): New typedef.
842
b9c04fb2
TT
8432017-10-08 Tom Tromey <tom@tromey.com>
844
845 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
846 (make_cleanup_free_search_symbols): Remove.
847 (search_symbols): Return std::vector.
848 (symbol_search::compare_search_syms): Now member of
849 symbol_search. Change arguments.
850 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
851 (symtab_symbol_info, rbreak_command): Update.
852 * symtab.h (struct symbol_search) <next>: Remove.
853 Add constructors.
854 (symbol_search::operator<): New function.
855 (symbol_search::operator==): New function.
856 (search_symbols): Remove std::vector.
857 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
858 (symbol_search::compare_search_syms): Declare.
859
0d28b0a5
YQ
8602017-10-06 Yao Qi <yao.qi@linaro.org>
861
862 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
863 arch/aarch64-insn.o.
864 Remove one rule.
865 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
866
71917808
YQ
8672017-10-06 Yao Qi <yao.qi@linaro.org>
868
869 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
870 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
871 arch/arm-linux.o respectively.
872 * configure.tgt: Likewise.
873
2081b2b2
YQ
8742017-10-06 Yao Qi <yao.qi@linaro.org>
875
876 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
877 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
878
a1b85d28
PA
8792017-10-06 Pedro Alves <palves@redhat.com>
880
881 * windows-nat.c: Include <algorithm>.
882
d97987e2
YQ
8832017-10-06 Yao Qi <yao.qi@linaro.org>
884
885 * configure.tgt (i386_tobjs): New variable.
886 (amd64_tobjs): New variable.
887 Set $cpu_obs and $os_obs.
888
f38307f5
YQ
8892017-10-06 Yao Qi <yao.qi@linaro.org>
890
891 * Makefile.in (CONFIG_SRC_SUBDIR): New.
892 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
893 (clean): Remove object files and dependency files.
894 (distclean): Remove the directory.
895 * configure.ac: Invoke AC_CONFIG_COMMANDS.
896 * configure: Re-generated.
897 * configure.tgt: Replace amd64.o with arch/amd64.o.
898
2f924de6
JM
8992017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
900
901 PR build/22188
902 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
903 and SETEND.
904
2fd9d7ca
PA
9052017-10-05 Pedro Alves <palves@redhat.com>
906
907 * linux-nat.c (linux_child_follow_fork): When following the parent
908 and detaching the child, consult the parent thread's architecture
909 instead of the child's.
910
d13b8493
UW
9112017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
912
913 * ax.h: Do not include "doublest.h".
914 (union agent_val): Remove.
915
3b4b2f16
UW
9162017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
917
918 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
919 (decimal_to_string): Return std::string object.
920 (decimal_from_string): Accept std::string object. Return bool.
921 (decimal_from_integral, decimal_from_doublest): Remove.
922 (decimal_from_longest): Add prototype.
923 (decimal_from_ulongest): Likewise.
924 (decimal_to_longest): Likewise.
925 (decimal_from_doublest): Likewise.
926 * dfp.c: Do not include "gdbtypes.h" or "value.h".
927 (MAX_DECIMAL_STRING): Move here.
928 (decimal_to_string): Return std::string object.
929 (decimal_from_string): Accept std::string object. Return bool.
930 (decimal_from_integral): Remove, replace by ...
931 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
932 (decimal_to_longest): New function.
933 (decimal_from_floating): Remove, replace by ...
934 (decimal_from_doublest): ... this new function.
935 (decimal_to_doublest): Update to new decimal_to_string interface.
936
937 * value.c (unpack_long): Use decimal_to_longest.
938 * valops.c (value_cast): Use decimal_from_doublest instead of
939 decimal_from_floating. Use decimal_from_[u]longest isntead of
940 decimal_from_integral.
941 * valarith.c (value_args_as_decimal): Likewise.
942 * valprint.c (print_decimal_floating): Update to new
943 decimal_to_string interface.
944 * printcmd.c (printf_decfloat): Likewise.
945 * c-exp.y (parse_number): Update to new decimal_from_string interface.
946
1841ee5d
UW
9472017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
948
949 * doublest.h: Do not include "floatformat.h". Remove stale comments.
950 * gdbtypes.c: Include "floatformat.h".
951 * value.c: Likewise.
952 * m68k-tdep.c: Likewise.
953
954 * findvar.c: Do not include "floatformat.h".
955 * amd64-darwin-tdep.c: Likewise.
956 * arm-linux-tdep.c: Likewise.
957 * i386-darwin-tdep.c: Likewise.
958 * i387-tdep.c: Likewise.
959 * m68k-linux-tdep.c: Likewise.
960 * mep-tdep.c: Likewise.
961 * mips-tdep.c: Likewise.
962 * nios2-tdep.c: Likewise.
963 * s390-linux-tdep.c: Likewise.
964 * sparc-obsd-tdep.c: Likewise.
965 * sparc-tdep.c: Likewise.
966 * sparc64-tdep.c: Likewise.
967 * spu-tdep.c: Likewise.
968 * tic6x-tdep.c: Likewise.
969 * tilegx-tdep.c: Likewise.
970 * vax-tdep.c: Likewise.
971 * xstormy16-tdep.c: Likewise.
972 * xtensa-tdep.c: Likewise.
973
974 * top.c: Do not include "doublest.h".
975 * aarch64-tdep.c: Likewise.
976 * alpha-tdep.c: Likewise.
977 * arm-linux-tdep.c: Likewise.
978 * m68k-linux-tdep.c: Likewise.
979 * tilegx-tdep.c: Likewise.
980 * xstormy16-tdep.c: Likewise.
981
a80a6471
JB
9822017-10-05 John Baldwin <jhb@FreeBSD.org>
983
984 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
985 (mipsn32_fbsd_sigframe): Define.
986 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
987 for FreeBSD/mipsn32.
988
12c4bd7f
JB
9892017-10-05 John Baldwin <jhb@FreeBSD.org>
990
991 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
992 AT_HWCAP.
993
c91933e9
TG
9942017-10-05 Tristan Gingold <tgingold@free.fr>
995
996 * MAINTAINERS (Misc): Update my email address.
997
5cd63fda
PA
9982017-10-04 Pedro Alves <palves@redhat.com>
999
1000 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1001 it instead of target_gdbarch.
1002 (get_remote_state, get_remote_packet_size): Adjust
1003 get_remote_arch_state calls, passing down target_gdbarch
1004 explicitly.
1005 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1006 'gdbarch' and use it instead of target_gdbarch.
1007 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1008 passing down target_gdbarch explicitly.
1009 (struct stop_reply) <arch>: New field.
1010 (remote_parse_stop_reply): Use the stopped thread's architecture,
1011 not the current inferior's. Save the architecture in the
1012 stop_reply.
1013 (process_stop_reply): Use the stop reply's architecture.
1014 (process_g_packet, remote_fetch_registers)
1015 (remote_prepare_to_store, store_registers_using_G)
1016 (remote_store_registers): Adjust get_remote_arch_state calls,
1017 using the regcache's architecture.
1018 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1019 passing down target_gdbarch explicitly.
1020 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1021 beneath instead of calling target_gdbarch.
1022 * target.c (default_thread_architecture): Use the specified
1023 inferior's architecture, instead of the current inferior's
1024 architecture (via target_gdbarch).
1025
ed4227b7
PA
10262017-10-04 Pedro Alves <palves@redhat.com>
1027
1028 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1029 case.
1030 (regcache_print): Handle !target_has_registers here instead.
1031
55b11ddf
PA
10322017-10-04 Pedro Alves <palves@redhat.com>
1033
1034 * frame.c (create_test_frame): Delete.
1035 * frame.h (create_test_frame): Delete.
1036 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1037 (class regcache_test): Delete.
1038 (test_target_has_registers, test_target_has_stack)
1039 (test_target_has_memory, test_target_prepare_to_store)
1040 (test_target_store_registers): New functions.
1041 (test_target_ops): New class.
1042 (register_to_value_test): Error out if there's already a
1043 process_stratum (or higher) target pushed. Create a fuller mock
1044 environment, with mock target_ops, inferior, address space, thread
1045 and inferior_ptid.
1046 * progspace.c (struct address_space): Move to ...
1047 * progspace.h (struct address_space): ... here.
1048 * regcache.h (regcache::~regcache, regcache::raw_write)
1049 [GDB_SELF_TEST]: No longer virtual.
1050
4c71c105
SM
10512017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1052
1053 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1054
73dcd72d
PA
10552017-10-04 Pedro Alves <palves@redhat.com>
1056
1057 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1058 out of 'between TRY and CATCH'.
1059
44704526
PA
10602017-10-04 Pedro Alves <palves@redhat.com>
1061
1062 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1063 * common/common-exceptions.h (TRY): Open an outermost scope.
1064 Expand intro comment.
1065 (CATCH): Reindent.
1066 (END_CATCH): Close the outermost scope.
1067 * completer.c (complete_line_internal): Add missing END_CATCH.
1068
bc3b087d
SDJ
10692017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1070
1071 * NEWS (Changes since GDB 8.0): Add entry about new
1072 'set-cwd-on-gdbserver' feature.
1073 (New remote packets): Add entry for QSetWorkingDir.
1074 * common/common-inferior.h (set_inferior_cwd): New prototype.
1075 * infcmd.c (set_inferior_cwd): Remove "static".
1076 (show_cwd_command): Expand text to include remote debugging.
1077 * remote.c: Add PACKET_QSetWorkingDir.
1078 (remote_protocol_features) <QSetWorkingDir>: New entry for
1079 PACKET_QSetWorkingDir.
1080 (extended_remote_set_inferior_cwd): New function.
1081 (extended_remote_create_inferior): Call
1082 "extended_remote_set_inferior_cwd".
1083 (_initialize_remote): Call "add_packet_config_cmd" for
1084 QSetWorkingDir.
1085
d092c5a2
SDJ
10862017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1087
1088 * NEWS (New commands): Mention "set/show cwd".
1089 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1090 "cd" command's help text.
1091 * common/common-inferior.h (get_inferior_cwd): New prototype.
1092 * infcmd.c (inferior_cwd_scratch): New global variable.
1093 (set_inferior_cwd): New function.
1094 (get_inferior_cwd): Likewise.
1095 (set_cwd_command): Likewise.
1096 (show_cwd_command): Likewise.
1097 (_initialize_infcmd): Add "set/show cwd" commands.
1098 * inferior.h (class inferior) <cwd>: New field.
1099 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1100 (fork_inferior): Change inferior's cwd before its execution.
1101 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1102 to CreateProcess.
1103
7da0a886
SDJ
11042017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1105
1106 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1107 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1108 (COMMON_OBS): Add gdb_tilde_expand.o.
1109 * common/gdb_tilde_expand.c: New file.
1110 * common/gdb_tilde_expand.h: Likewise.
1111
db8dd160
MR
11122017-10-03 Maciej W. Rozycki <macro@imgtec.com>
1113
1114 * gdbarch.sh (objfile): Remove duplicate declaration.
1115 * gdbarch.h: Regenerate.
1116
f8bfbf22
TT
11172017-10-03 Tom Tromey <tom@tromey.com>
1118
1119 * utils.c (internal_vproblem): Use string_vprintf.
1120
5178ed48
TT
11212017-10-03 Tom Tromey <tom@tromey.com>
1122
1123 * printcmd.c (info_symbol_command): Use std::string.
1124
8cff8730
TT
11252017-10-03 Tom Tromey <tom@tromey.com>
1126
1127 * top.c (gdb_safe_append_history): Use std::string.
1128
895b8f30
TT
11292017-10-03 Tom Tromey <tom@tromey.com>
1130
1131 * event-top.c (stdin_event_handler): Update.
1132 * main.c (captured_main_1): Update.
1133 * top.h (make_delete_ui_cleanup): Remove.
1134 (struct ui): Add constructor and destructor.
1135 (new_ui, delete_ui): Remove.
1136 * top.c (make_delete_ui_cleanup): Remove.
1137 (new_ui_command): Use std::unique_ptr.
1138 (delete_ui_cleanup): Remove.
1139 (ui::ui): Rename from new_ui. Update.
1140 (free_ui): Remove.
1141 (ui::~ui): Rename from delete_ui. Update.
1142
0efef640
TT
11432017-10-03 Tom Tromey <tom@tromey.com>
1144
1145 * symfile.c (load_progress): Use gdb::byte_vector.
1146
245ad7d3
TT
11472017-10-03 Tom Tromey <tom@tromey.com>
1148
1149 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1150 declaration.
1151 * printcmd.c (x_command): Remove unused declaration.
1152 * symfile.c (symbol_file_command): Remove unused declaration.
1153
e05550d7
TT
11542017-10-03 Tom Tromey <tom@tromey.com>
1155
1156 * utils.c (internal_vproblem): Use std::string.
1157 (defaulted_query): Likewise.
1158
b95de2b7
TT
11592017-10-03 Tom Tromey <tom@tromey.com>
1160
1161 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1162 * top.c (execute_command_to_string): Update.
1163 * utils.c (make_cleanup_restore_page_info): Remove.
1164 (do_restore_page_info_cleanup): Remove.
1165 (set_batch_flag_and_restore_page_info):
1166 New.
1167 (make_cleanup_restore_page_info): Remove.
1168 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1169 (~set_batch_flag_and_restore_page_info): New
1170 (make_cleanup_restore_uinteger): Remove.
1171 (make_cleanup_restore_integer): Remove.
1172 (struct restore_integer_closure): Remove.
1173 (restore_integer): Remove.
1174 * utils.h (struct set_batch_flag_and_restore_page_info): New
1175 class.
1176 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1177 (make_cleanup_restore_page_info): Remove.
1178 (make_cleanup_restore_uinteger) Remove.
1179 (make_cleanup_restore_integer) Remove.
1180
07036511
TT
11812017-10-03 Tom Tromey <tom@tromey.com>
1182
1183 * record-full.h (record_full_gdb_operation_disable_set): Return
1184 scoped_restore_tmpl<int>.
1185 * infrun.c (adjust_pc_after_break): Update.
1186 (handle_signal_stop): Update.
1187 * record-full.c (record_full_gdb_operation_disable_set): Return
1188 scoped_restore_tmpl<int>.
1189 (record_full_wait_1, record_full_insert_breakpoint)
1190 (record_full_remove_breakpoint, record_full_save)
1191 (record_full_goto_insn): Update.
1192
45320ffa
TT
11932017-10-02 Tom Tromey <tom@tromey.com>
1194
1195 PR rust/22236:
1196 * rust-lang.c (rust_val_print_str): New function.
1197 (val_print_struct): Call it.
1198 (rust_subscript): Preserve name of slice type.
1199
b3e3859b
TT
12002017-10-02 Tom Tromey <tom@tromey.com>
1201
1202 * rust-lang.c (rust_subscript): Handle slices in
1203 EVAL_AVOID_SIDE_EFFECTS case.
1204
01af5e0d
TT
12052017-10-02 Tom Tromey <tom@tromey.com>
1206
1207 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1208
888e3ddb
TT
12092017-10-02 Tom Tromey <tom@tromey.com>
1210
1211 * rust-lang.h (rust_slice_type): Add "extern".
1212
cc536b21
PA
12132017-10-02 Tom Tromey <tom@tromey.com>
1214 Pedro Alves <palves@redhat.com>
1215
1216 * ada-lang.h (ada_exc_info::operator<): Make const.
1217 (ada_exc_info::operator==): Make const.
1218 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1219 Make const.
1220
386c8614
TT
12212017-09-29 Tom Tromey <tom@tromey.com>
1222
1223 * target.c (read_whatever_is_readable): Change type of "result".
1224 Update.
1225 (free_memory_read_result_vector): Remove.
1226 (read_memory_robust): Change return type. Update.
1227 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
1228 bin2hex, std::string.
1229 * target.h (memory_read_result_s): Remove typedef.
1230 (free_memory_read_result_vector): Remove.
1231 (read_memory_robust): Return std::vector.
1232
789c4b5e
TT
12332017-09-29 Tom Tromey <tom@tromey.com>
1234
1235 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1236
ab816a27
TT
12372017-09-29 Tom Tromey <tom@tromey.com>
1238
1239 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1240 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
1241 operator< and operator==.
1242 (ada_exceptions_list): Return a std::vector.
1243 * ada-lang.c (ada_exc_info::operator<): Rename from
1244 compare_ada_exception_info.
1245 (ada_exc_info::operator==): New.
1246 (sort_remove_dups_ada_exceptions_list): Change type of
1247 "exceptions".
1248 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1249 (ada_add_global_exceptions): Likewise.
1250 (ada_exceptions_list_1): Return a std::vector.
1251 (ada_exceptions_list): Likewise.
1252
52f9abe4
TT
12532017-09-29 Tom Tromey <tom@tromey.com>
1254
1255 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1256 'std::set *'.
1257 (print_one_inferior): Update.
1258 (free_vector_of_ints): Remove.
1259 (list_available_thread_groups): Change "ids" to std::set.
1260 (mi_cmd_list_thread_groups): Update.
1261 (struct collect_cores_data) <core>: Now a std::set.
1262 (collect_cores): Update.
1263 (unique): Remove.
1264 (print_one_inferior): Update.
1265
dcd5ddcc
TT
12662017-09-29 Tom Tromey <tom@tromey.com>
1267
1268 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1269 (mi_execute_async_cli_command): Likewise.
1270 (mi_cmd_trace_frame_collected): Use field_fmt.
1271
45d288cc
TT
12722017-09-29 Tom Tromey <tom@tromey.com>
1273
1274 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1275 gdb::byte_vector.
1276
6afe2f4a
TT
12772017-09-29 Tom Tromey <tom@tromey.com>
1278
1279 * mi/mi-parse.c (mi_parse): Remove unused declaration.
1280
9813429a
TT
12812017-09-29 Tom Tromey <tom@tromey.com>
1282
1283 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1284
2d6960b4
TT
12852017-09-29 Tom Tromey <tom@tromey.com>
1286
1287 * varobj.h (varobj_gen_name): Return std::string.
1288 * varobj.c (varobj_gen_name): Return std::string.
1289 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1290 (mi_cmd_var_delete): Don't copy "name".
1291
784c453a
TT
12922017-09-29 Tom Tromey <tom@tromey.com>
1293
1294 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1295 (mi_cmd_break_insert_1): Update.
1296
a9bc57b9
TT
12972017-09-29 Tom Tromey <tom@tromey.com>
1298
1299 * target.h (make_scoped_defer_target_commit_resume): Update.
1300 * target.c (make_scoped_defer_target_commit_resume): Rename from
1301 make_cleanup_defer_target_commit_resume. Return a
1302 scoped_restore.
1303 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1304
9754d8c4
TT
13052017-09-29 Tom Tromey <tom@tromey.com>
1306
1307 * main.c (captured_main_1): Remove unused declaration.
1308 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1309
99ef965c
TT
13102017-09-29 Tom Tromey <tom@tromey.com>
1311
1312 * symtab.c (search_symbols): Remove unused outer cleanup.
1313 (make_source_files_completion_list): Remove unused declaration.
1314
42518ba7
TT
13152017-09-29 Tom Tromey <tom@tromey.com>
1316
1317 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1318
726b2169
TT
13192017-09-29 Tom Tromey <tom@tromey.com>
1320
1321 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1322 gdb::byte_vector.
1323
55b06432
TT
13242017-09-29 Tom Tromey <tom@tromey.com>
1325
1326 * complaints.c (vcomplaint): Use std::string.
1327
8abcee91
TT
13282017-09-29 Tom Tromey <tom@tromey.com>
1329
1330 * tracepoint.c (trace_variable_command): Use std::string.
1331 (encode_actions_1): Remove unused declarations.
1332 (create_tsv_from_upload): Use std::string.
1333
6ad94bc7
TT
13342017-09-29 Tom Tromey <tom@tromey.com>
1335
1336 * cp-support.c (gdb_demangle): Use std::string.
1337
2003f3d8
TT
13382017-09-29 Tom Tromey <tom@tromey.com>
1339
1340 * stack.c (parse_frame_specification): Use std::string
1341 (info_frame_command): Use gdb::unique_xmalloc_ptr.
1342
8f8accb5
TT
13432017-09-29 Tom Tromey <tom@tromey.com>
1344
1345 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1346
200aa7b1
TT
13472017-09-29 Tom Tromey <tom@tromey.com>
1348
1349 * utils.c (vfprintf_maybe_filtered): Use std::string.
1350 (vfprintf_unfiltered): Likewise.
1351
606aae8a
TT
13522017-09-29 Tom Tromey <tom@tromey.com>
1353
1354 * event-top.c (top_level_prompt): Return std::string.
1355 (display_gdb_prompt): Update.
1356
bd413795
TT
13572017-09-29 Tom Tromey <tom@tromey.com>
1358
1359 * unittests/common-utils-selftests.c (format): New function.
1360 (string_vprintf_tests): New function.
1361 (_initialize_common_utils_selftests): Register new tests.
1362 * common/common-utils.c (string_vprintf): New function.
1363 * common/common-utils.h (string_vprintf): Declare.
1364
256642e8
PA
13652017-09-29 Pedro Alves <palves@redhat.com>
1366
1367 * common/rsp-low.c (unpack_varlen_hex): Constify.
1368 * common/rsp-low.h (unpack_varlen_hex): Constify.
1369 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1370 Constify.
1371 * remote.c (remote_set_permissions, read_ptid)
1372 (remote_current_thread, remote_get_threads_with_qthreadinfo)
1373 (remote_static_tracepoint_marker_at)
1374 (remote_static_tracepoint_markers_by_strid)
1375 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1376 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1377 (parse_tracepoint_definition, parse_tsv_definition)
1378 (parse_static_tracepoint_marker_definition): Constify.
1379 * tracepoint.h (parse_static_tracepoint_marker_definition)
1380 (parse_trace_status, parse_tracepoint_status)
1381 (parse_tracepoint_definition, parse_tsv_definition): Constify.
1382
b6bb3468
PA
13832017-09-29 Pedro Alves <palves@redhat.com>
1384
1385 * remote.c (target_buf, target_buf_size): Delete.
1386 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1387 Use the connection's packet buffer instead.
1388 All callers adjusted.
1389 (_initialize_remote): Remove references to target_buf and
1390 target_buf_size.
1391
b2f8eb7a
PA
13922017-09-28 Pedro Alves <palves@redhat.com>
1393
1394 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1395 unittests/common-utils-selftests.c.
1396 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1397 (COMMON_OBS): Remove utils-selftests.o.
1398 * utils-selftests.c: Move to ...
1399 * unittests/common-utils-selftests.c: ... here and rename self
1400 test to "string_printf".
1401
08302ed2
DE
14022017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1403
1404 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1405 having NULL cus or tus.
1406
96a5a1d3
UW
14072017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1408
1409 * arm-tdep.c: (convert_from_extended): Remove.
1410 (convert_to_extended): Likewise.
1411 (arm_extract_return_value): Use convert_typed_floating.
1412 (arm_store_return_value): Likewise.
1413
1414 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1415 * sh-tdep.c: Do not include "floatformat.h".
1416 (sh_littlebyte_bigword_type): New function.
1417 (sh_register_convert_to_virtual): Use convert_typed_floating.
1418 (sh_register_convert_to_raw): Likewise.
1419 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1420 (sh64_littlebyte_bigword_type): New function.
1421 (sh64_extract_return_value): Use convert_typed_floating.
1422 (sh64_register_convert_to_virtual): Likewise.
1423 (sh64_register_convert_to_raw): Likewise.
1424
0db7851f
UW
14252017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1426
1427 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1428 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1429
1430 * gdbtypes.h (union type_specific): Make field floatformat hold
1431 just a single struct floatformat, not an array.
1432 (floatformat_from_type): Move here.
1433 * gdbtypes.c (floatformat_from_type): Move here. Update to
1434 changed TYPE_FLOATFORMAT definition.
1435 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1436 (recursive_dump_type): Likewise.
1437 (init_float_type): Install correct floatformat for byte order.
1438 (arch_float_type): Likewise.
1439
77b7c781
UW
14402017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1441
1442 * gdbtypes.c (init_type): Change incoming argument from
1443 length-in-bytes to length-in-bits. Assert length is a
1444 multiple of TARGET_CHAR_BITS.
1445 (arch_type, arch_flags_type): Likewise.
1446 (init_integer_type): Update call to init_type.
1447 (init_character_type): Likewise.
1448 (init_boolean_type): Likewise.
1449 (init_float_type): Likewise.
1450 (init_decfloat_type): Likewise.
1451 (init_complex_type): Likewise.
1452 (init_pointer_type): Likewise.
1453 (objfile_type): Likewise.
1454 (arch_integer_type): Update call to arch_type.
1455 (arch_character_type): Likewise.
1456 (arch_boolean_type): Likewise.
1457 (arch_float_type): Likewise.
1458 (arch_decfloat_type): Likewise.
1459 (arch_complex_type): Likewise.
1460 (arch_pointer_type): Likewise.
1461 (gdbtypes_post_init): Likewise.
1462
1463 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1464 (read_base_type): Likewise.
1465 * mdebugread.c (basic_type): Likewise.
1466 * stabsread.c (dbx_init_float_type): Likewise.
1467 (rs6000_builtin_type): Likewise.
1468 (read_range_type): Likewise. Also, fix call to init_integer_type
1469 with erroneous length argument.
1470
1471 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1472 * d-lang.c (build_d_types): Likewise.
1473 * f-lang.c (build_fortran_types): Likewise.
1474 * go-lang.c (build_go_types): Likewise.
1475 * opencl-lang.c (build_opencl_types): Likewise.
1476 * jit.c (finalize_symtab): Likewise.
1477 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1478 (build_std_type_info_type): Likewise.
1479 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
1480 update call to arch_flags_type.
1481
1482 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1483 arch_type.
1484 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1485 * windows-tdep.c (windows_get_tlb_type): Likewise.
1486
1487 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1488 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1489 * m32c-tdep.c (make_types): Likewise.
1490 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1491 (rl78_psw_type): Update call to arch_flags_type.
1492 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1493 * rx-tdep.c (rx_psw_type): Likewise.
1494 (rx_fpsw_type): Likewise.
1495 * sparc-tdep.c (sparc_psr_type): Likewise.
1496 (sparc_fsr_type): Likewise.
1497 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1498 (sparc64_ccr_type): Likewise.
1499 (sparc64_fsr_type): Likewise.
1500 (sparc64_fprs_type): Likewise.
1501
f21b4d5c
TT
15022017-09-27 Tom Tromey <tom@tromey.com>
1503
1504 * findcmd.c (find_command): Constify.
1505
643c2ffa
TT
15062017-09-27 Tom Tromey <tom@tromey.com>
1507
1508 * ada-tasks.c (task_command_1, task_command): Constify.
1509
510e5e56
TT
15102017-09-27 Tom Tromey <tom@tromey.com>
1511
1512 * symtab.c (maintenance_print_symbol_cache)
1513 (maintenance_flush_symbol_cache)
1514 (maintenance_print_symbol_cache_statistics): Constify.
1515
e503b191
TT
15162017-09-27 Tom Tromey <tom@tromey.com>
1517
1518 * inferior.c (detach_inferior_command, kill_inferior_command)
1519 (inferior_command): Constify.
1520
4e001312
TT
15212017-09-27 Tom Tromey <tom@tromey.com>
1522
1523 * regcache.c (regcache_print, maintenance_print_registers)
1524 (maintenance_print_raw_registers)
1525 (maintenance_print_cooked_registers)
1526 (maintenance_print_register_groups)
1527 (maintenance_print_remote_registers): Constify.
1528
77763700
TT
15292017-09-27 Tom Tromey <tom@tromey.com>
1530
1531 * printcmd.c (map_display_numbers, undisplay_command)
1532 (enable_disable_display_command, enable_display_command)
1533 (disable_display_command): Constify.
1534
4495129a
TT
15352017-09-27 Tom Tromey <tom@tromey.com>
1536
1537 * breakpoint.h (delete_command): Don't declare.
1538 * breakpoint.c (delete_command, enable_once_command)
1539 (enable_count_command, enable_delete_command, breakpoint_1)
1540 (maintenance_info_breakpoints, stopin_command, stopat_command)
1541 (delete_command, delete_trace_command, save_breakpoints)
1542 (save_breakpoints_command, save_tracepoints_command): Constify.
1543
3088cf40
TT
15442017-09-27 Tom Tromey <tom@tromey.com>
1545
1546 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1547 (skip_ws, extract_identifier, macro_define_command)
1548 (macro_undef_command, macro_list_command): Constify.
1549
69f476a3
TT
15502017-09-27 Tom Tromey <tom@tromey.com>
1551
1552 * infcmd.c (environment_info, set_environment_command)
1553 (unset_environment_command, path_info, info_proc_cmd_1)
1554 (info_proc_cmd_mappings, info_proc_cmd_stat)
1555 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1556 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1557
c4a3e68e
TT
15582017-09-27 Tom Tromey <tom@tromey.com>
1559
1560 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1561 Constify.
1562
c9d31bd6
TT
15632017-09-27 Tom Tromey <tom@tromey.com>
1564
1565 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1566
1f3f85eb
TT
15672017-09-27 Tom Tromey <tom@tromey.com>
1568
1569 * demangle.c (demangle_command): Constify.
1570
9c504b5d
TT
15712017-09-27 Tom Tromey <tom@tromey.com>
1572
1573 * progspace.c (maintenance_info_program_spaces_command):
1574 Constify.
1575
6663cf91
TT
15762017-09-27 Tom Tromey <tom@tromey.com>
1577
1578 * compile/compile.c (check_raw_argument, compile_file_command)
1579 (compile_code_command, compile_print_command): Constify.
1580
34e5fa26
TT
15812017-09-27 Tom Tromey <tom@tromey.com>
1582
1583 * reggroups.c (maintenance_print_reggroups): Constify.
1584
8384c356
TT
15852017-09-27 Tom Tromey <tom@tromey.com>
1586
1587 * dwarf2read.c (save_gdb_index_command): Constify.
1588
884beb0c
TT
15892017-09-27 Tom Tromey <tom@tromey.com>
1590
1591 * stap-probe.c (info_probes_stap_command): Constify.
1592
e0b2930c
TT
15932017-09-27 Tom Tromey <tom@tromey.com>
1594
1595 * fork-child.c (unset_exec_wrapper_command): Constify.
1596
f938677d
TT
15972017-09-27 Tom Tromey <tom@tromey.com>
1598
1599 * btrace.c (get_uint, get_context_size, no_chunk)
1600 (maint_btrace_packet_history_cmd)
1601 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1602 (maint_info_btrace_cmd): Constify.
1603
8949cb87
TT
16042017-09-27 Tom Tromey <tom@tromey.com>
1605
1606 * reverse.c (delete_bookmark_command): Constify.
1607
ac88e2de
TT
16082017-09-27 Tom Tromey <tom@tromey.com>
1609
1610 * remote.c (set_memory_packet_size)
1611 (set_memory_write_packet_size, show_memory_write_packet_size)
1612 (set_memory_read_packet_size, show_memory_read_packet_size)
1613 (compare_sections_command, packet_command, remote_put_command)
1614 (remote_get_command, remote_delete_command): Constify.
1615
bd4c9dfe
TT
16162017-09-27 Tom Tromey <tom@tromey.com>
1617
1618 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1619 (set_mipsfpu_double_command, set_mipsfpu_none_command)
1620 (set_mipsfpu_auto_command): Constify.
1621
5e93d4c6
TT
16222017-09-27 Tom Tromey <tom@tromey.com>
1623
1624 * cli/cli-cmds.h (cd_command): Constify.
1625 * cli/cli-cmds.c (cd_command): Constify.
1626
fc41a75b
TT
16272017-09-27 Tom Tromey <tom@tromey.com>
1628
1629 * thread.c (thread_name_command, thread_find_command): Constify.
1630
67810076
TT
16312017-09-27 Tom Tromey <tom@tromey.com>
1632
1633 * probe.c (enable_probes_command, disable_probes_command):
1634 Constify.
1635
1d8b34a7
TT
16362017-09-27 Tom Tromey <tom@tromey.com>
1637
1638 * symfile.c (symbol_file_command): Constify.
1639 * gdbcore.h (deprecated_file_changed_hook): Constify.
1640 * exec.c (deprecated_file_changed_hook, exec_file_command)
1641 (file_command): Constify.
1642 * defs.h (symbol_file_command): Constify.
1643
442019e1
TT
16442017-09-27 Tom Tromey <tom@tromey.com>
1645
1646 * remote-fileio.c (set_system_call_allowed)
1647 (show_system_call_allowed): Constify.
1648
2983f7cb
TT
16492017-09-27 Tom Tromey <tom@tromey.com>
1650
1651 * tracepoint.c (delete_trace_variable_command)
1652 (tfind_end_command, tfind_start_command, tfind_pc_command)
1653 (tfind_tracepoint_command, tfind_line_command)
1654 (tfind_range_command, tfind_outside_command): Constify.
1655
4fd41b24
TT
16562017-09-27 Tom Tromey <tom@tromey.com>
1657
1658 * ax-gdb.c (maint_agent_printf_command, agent_command)
1659 (agent_eval_command): Constify.
1660
f2fc3015
TT
16612017-09-27 Tom Tromey <tom@tromey.com>
1662
1663 * tracepoint.c (info_scope_command): Constify.
1664 * python/python.c (gdbpy_decode_line): Constify.
1665 * python/py-breakpoint.c (bppy_init): Constify.
1666 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1667 * location.h: (new_linespec_location)
1668 (string_to_event_location_basic, string_to_event_location):
1669 Constify.
1670 * location.c (new_linespec_location)
1671 (string_to_event_location_basic, string_to_event_location):
1672 Constify.
1673 * linespec.h (decode_line_with_current_source)
1674 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1675 * linespec.c (linespec_lex_to_end)
1676 (decode_line_with_current_source)
1677 (decode_line_with_last_displayed): Constify.
1678 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1679 Constify.
1680 * cli/cli-cmds.c (edit_command, list_command): Constify.
1681 * breakpoint.h (until_break_command, watch_command_wrapper)
1682 (awatch_command_wrapper, rwatch_command_wrapper)
1683 (init_ada_exception_breakpoint): Constify.
1684 * breakpoint.c (break_command_1, dprintf_command)
1685 (break_range_command, watch_command_wrapper)
1686 (rwatch_command_wrapper, awatch_command_wrapper)
1687 (until_break_command, init_ada_exception_breakpoint)
1688 (strace_marker_create_sals_from_location, trace_command)
1689 (ftrace_command, strace_command, struct tracepoint): Constify.
1690 * ax-gdb.c (agent_command_1): Constify.
1691 * ada-lang.c (ada_exception_sal): Constify.
1692
8c2f95f4
TT
16932017-09-27 Tom Tromey <tom@tromey.com>
1694
1695 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1696 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1697 (get_context_size, no_chunk, get_insn_history_modifiers)
1698 (cmd_record_insn_history, get_call_history_modifiers)
1699 (cmd_record_call_history): Constify.
1700
a0d65762
TT
17012017-09-27 Tom Tromey <tom@tromey.com>
1702
1703 * source.c (show_substitute_path_command)
1704 (unset_substitute_path_command, set_substitute_path_command):
1705 Constify.
1706
58971144
TT
17072017-09-27 Tom Tromey <tom@tromey.com>
1708
1709 * typeprint.c (maintenance_print_type): Constify.
1710 * maint.c (maintenance_dump_me, maintenance_demangle)
1711 (maintenance_time_display, maintenance_info_sections)
1712 (maintenance_print_statistics, maintenance_deprecate)
1713 (maintenance_undeprecate): Constify.
1714 (maintenance_do_deprecate): Constify. Use std::string.
1715 (maintenance_selftest): Constify.
1716 * gdbtypes.h (maintenance_print_type): Constify.
1717
c482f52c
TT
17182017-09-27 Tom Tromey <tom@tromey.com>
1719
1720 * hppa-tdep.c (unwind_command): Constify.
1721
e100df1a
TT
17222017-09-27 Tom Tromey <tom@tromey.com>
1723
1724 * target-descriptions.c (unset_tdesc_filename_cmd)
1725 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1726 Constify.
1727
31d56ade
TT
17282017-09-27 Tom Tromey <tom@tromey.com>
1729
1730 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1731
b961da0b
TT
17322017-09-27 Tom Tromey <tom@tromey.com>
1733
1734 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1735
e2d8ae16
TT
17362017-09-27 Tom Tromey <tom@tromey.com>
1737
1738 * tui/tui-regs.c (tui_reg_command): Constify.
1739
863779b0
TT
17402017-09-27 Tom Tromey <tom@tromey.com>
1741
1742 * skip.c (skip_file_command, skip_function_command)
1743 (skip_enable_command, skip_disable_command, skip_delete_command):
1744 Constify.
1745
cdb34d4a
TT
17462017-09-27 Tom Tromey <tom@tromey.com>
1747
1748 * record-btrace.c (cmd_record_btrace_bts_start)
1749 (cmd_record_btrace_pt_start): Constify.
1750
e99c83e7
TT
17512017-09-27 Tom Tromey <tom@tromey.com>
1752
1753 * symmisc.c (maintenance_print_symbols)
1754 (maintenance_print_msymbols, maintenance_print_objfiles)
1755 (maintenance_info_symtabs, maintenance_check_symtabs)
1756 (maintenance_expand_symtabs, maintenance_info_line_tables):
1757 Constify.
1758
32faf971
TT
17592017-09-27 Tom Tromey <tom@tromey.com>
1760
1761 * top.c (new_ui_command): Constify.
1762
2cf311eb
TT
17632017-09-27 Tom Tromey <tom@tromey.com>
1764
1765 * symfile.c (add_symbol_file_command)
1766 (remove_symbol_file_command, list_overlays_command)
1767 (map_overlay_command, unmap_overlay_command)
1768 (overlay_auto_command, overlay_manual_command)
1769 (overlay_off_command, overlay_load_command): Constify.
1770
e6738699
TT
17712017-09-27 Tom Tromey <tom@tromey.com>
1772
1773 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1774 (info_spu_mailbox_command, info_spu_dma_command)
1775 (info_spu_proxydma_command): Constify.
1776
aa360cd5
TT
17772017-09-27 Tom Tromey <tom@tromey.com>
1778
1779 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1780
898241a5
TT
17812017-09-27 Tom Tromey <tom@tromey.com>
1782
1783 * cli/cli-script.c (user_defined_command): Constify.
1784
2d0ac106
TT
17852017-09-27 Tom Tromey <tom@tromey.com>
1786
1787 * cli/cli-dump.c (dump_memory_command, dump_value_command)
1788 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1789 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1790 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1791 (dump_binary_value, append_binary_memory, append_binary_value):
1792 Constify.
1793 (struct dump_context) <func>: Constify.
1794 (add_dump_command): Update.
1795
dede02ce
TT
17962017-09-27 Tom Tromey <tom@tromey.com>
1797
1798 * cli/cli-cmds.c (show_version, show_configuration)
1799 (source_command, show_user): Constify.
1800
d3cb6b99
TT
18012017-09-27 Tom Tromey <tom@tromey.com>
1802
1803 * target.c (maintenance_print_target_stack): Constify.
1804
1970a12f
TT
18052017-09-27 Tom Tromey <tom@tromey.com>
1806
1807 * interps.c (interpreter_exec_cmd): Constify.
1808
41243651
TT
18092017-09-27 Tom Tromey <tom@tromey.com>
1810
1811 * record-full.c (cmd_record_full_restore): Constify.
1812
4465d9db
TT
18132017-09-27 Tom Tromey <tom@tromey.com>
1814
1815 * memattr.c (enable_mem_command, disable_mem_command)
1816 (delete_mem_command): Constify.
1817
ad25e423
TT
18182017-09-27 Tom Tromey <tom@tromey.com>
1819
1820 * value.c (show_convenience): Constify.
1821
d64097b1
TT
18222017-09-27 Tom Tromey <tom@tromey.com>
1823
1824 * gdbcore.h (core_file_command): Update.
1825 * corefile.c (core_file_command): Constify.
1826
4d4589ef
TT
18272017-09-27 Tom Tromey <tom@tromey.com>
1828
1829 * user-regs.c (maintenance_print_user_registers): Constify.
1830
32a7bf17
TT
18312017-09-27 Tom Tromey <tom@tromey.com>
1832
1833 * cp-namespace.c (maintenance_cplus_namespace): Constify.
1834
4a475551
TT
18352017-09-27 Tom Tromey <tom@tromey.com>
1836
1837 * cp-support.c (first_component_command): Constify.
1838
990b9f9f
TT
18392017-09-27 Tom Tromey <tom@tromey.com>
1840
1841 * psymtab.c (maintenance_print_psymbols)
1842 (maintenance_info_psymtabs, maintenance_check_psymtabs):
1843 Constify.
1844
c281872e
TT
18452017-09-27 Tom Tromey <tom@tromey.com>
1846
1847 * windows-tdep.c (display_tib): Constify.
1848
5b64bf74
TT
18492017-09-27 Tom Tromey <tom@tromey.com>
1850
1851 * linux-fork.c (delete_checkpoint_command)
1852 (detach_checkpoint_command): Constify.
1853
4ada038f
TT
18542017-09-27 Tom Tromey <tom@tromey.com>
1855
1856 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1857
57f5a81b
TT
18582017-09-27 Tom Tromey <tom@tromey.com>
1859
1860 * arc-tdep.c (dump_arc_instruction_command): Constify.
1861
b0a8e6c4
TT
18622017-09-27 Tom Tromey <tom@tromey.com>
1863
1864 * valprint.c (set_radix, show_radix): Constify.
1865
8d97dc1c
TT
18662017-09-27 Tom Tromey <tom@tromey.com>
1867
1868 * dtrace-probe.c (info_probes_dtrace_command): Constify.
1869
eb7c454d
TT
18702017-09-27 Tom Tromey <tom@tromey.com>
1871
1872 * command.h (not_just_help_class_command): Update.
1873 * cli/cli-decode.h (not_just_help_class_command): Update.
1874 * cli/cli-decode.c (not_just_help_class_command): Constify.
1875
e4e33335
TT
18762017-09-27 Tom Tromey <tom@tromey.com>
1877
1878 * gdb_bfd.c (maintenance_info_bfds): Constify.
1879
0450cc4c
TT
18802017-09-27 Tom Tromey <tom@tromey.com>
1881
1882 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1883 overloads.
1884 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
1885 (do_const_cfunc): New function.
1886 (cmd_cfunc_eq): New overload.
1887 (cli_user_command_p): Check do_const_cfunc.
1888 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1889 const_cfunc.
1890 * command.h (add_cmd): Add const overload and no-function
1891 overload.
1892 (set_cmd_cfunc): Add const overload.
1893 (cmd_const_cfunc_ftype): Declare.
1894 (cmd_cfunc_eq): Add const overload.
1895 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1896 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1897 overload.
1898
a9bbfbd8
TT
18992017-09-27 Tom Tromey <tom@tromey.com>
1900
1901 * macroexp.c (get_next_token_for_substitution): New function.
1902 (substitute_args): Call it. Check for __VA_OPT__.
1903
5230b05a
WT
19042017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1905 Pedro Alves <palves@redhat.com>
1906
1907 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1908 producer_is_icc_lt_14.
1909 (producer_is_icc_lt_14): New function.
1910 (check_producer): Add code for checking version of ICC.
1911 (producer_is_icc): Move to producer.c.
1912 (read_structure_type): Restrict ICC workaround to ICC<14.
1913 * producer.c: Include selftest.h.
1914 (producer_is_icc, producer_parsing_tests, _initialize_producer):
1915 New functions.
1916 * producer.h (producer_is_icc): New declaration.
1917
b32b108a
WT
19182017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1919
1920 * Makefile.in (SFILES): Add producer.c.
1921 (COMMON_OBS): Add producer.o
1922 * amd64-tdep.c (producer.h): Add new include.
1923 * dwarf2read.c (producer.h): Add new include.
1924 * producer.c: New file.
1925 * producer.h: New file.
1926 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1927 producer.c.
1928 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1929 producer.h.
1930
5007d765
MK
19312017-09-26 Matthias Klose <doko@ubuntu.com>
1932
1933 * configure.ac: Search ncursesw before ncurses.
1934 Check ncursesw/ncurses.h before ncurses/ncurses.h.
1935 * gdb_curses.h: Include <ncursesw/ncurses.h>
1936 * config.in, configure: Regenerate.
1937
281c4447
RO
19382017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1939
1940 PR gdb/22185
1941 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1942 obsolete.
1943 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1944 Remove i386sol2 support.
1945 * configure.nat <i386sol2>: Remove.
1946 <sol2-64>: Fold into ...
1947 <sol2>: ... this.
1948 Move common settings to default section.
1949 Add sol-thread.o.
1950 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1951 x86_64-*-solaris2.1[0-9]*>: Rename to ...
1952 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1953 <i[34567]86-*-solaris*>: Remove.
1954 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1955
1956 * configure.ac: Remove wctype in libw check.
1957 (_MSE_INT_H): Don't define on Solaris 7-9.
1958 <solaris*>: Remove libthread_db.so.1 check.
1959 * configure: Regenerate.
1960 * config.in: Regenerate.
1961
1962 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1963 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1964 (gdb_ps_size_t): Remove.
1965 Use base types in users.
1966 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1967
1968 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1969
39b06c20
RO
19702017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1971
1972 PR build/22206
1973 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1974 (adi_is_addr_mapped): Likewise.
1975 (PSR_ICC): Don't redefine.
1976 (PSR_IMPL): Likewise.
1977
6c3e20f1
TT
19782017-09-25 Tom Tromey <tom@tromey.com>
1979
1980 * regcache.c (regcache::dump): Use string_printf.
1981
b292235f
TT
19822017-09-25 Tom Tromey <tom@tromey.com>
1983
1984 * regcache.c (class regcache_invalidator): New.
1985 (struct register_to_invalidate): Remove.
1986 (make_cleanup_regcache_invalidate): Remove.
1987 (regcache::raw_write): Use regcache_invalidator.
1988
9ac86b52
TT
19892017-09-25 Tom Tromey <tom@tromey.com>
1990
1991 * spu-tdep.c (spu2ppu_sniffer): Update.
1992 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1993 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1994 Remove.
1995 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1996 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1997 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1998 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1999 (frame_pop): Update.
2000
c0e383c6
TT
20012017-09-25 Tom Tromey <tom@tromey.com>
2002
2003 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2004 * regcache.h (regcache_xfree): Don't declare.
2005 * regcache.c (regcache_xfree): Remove.
2006 (do_regcache_xfree): Use delete.
2007 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2008 * linux-fork.c (free_fork): Use delete.
2009 (fork_save_infrun_state): Likewise.
2010 * jit.c (jit_dealloc_cache): Use delete.
2011 * infrun.c (discard_infcall_suspend_state): Use delete.
2012
791199cc
TT
20132017-09-25 Tom Tromey <tom@tromey.com>
2014
2015 * regcache.h (regcache_xmalloc): Don't declare.
2016 (regcache_raw_set_cached_value): Update comment.
2017 * regcache.c (regcache_xmalloc): Remove.
2018 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2019 * jit.c (jit_frame_sniffer): Use new.
2020 * frame.c (frame_save_as_regcache): Use new.
2021
289e23aa
AA
20222017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2023
2024 * NEWS: Advertise support for guarded-storage registers on IBM z.
2025
1b63490c
AA
20262017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2027
2028 * s390-linux-nat.c (have_regset_gs): New static variable.
2029 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2030 control block and guarded-storage broadcast control regsets.
2031 (s390_read_description): Detect whether the target has
2032 guarded-storage support, return appropriate tdesc.
2033 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2034 (features/s390x-gs-linux64.c): Likewise.
2035 (struct gdbarch_tdep) <have_gs>: New field.
2036 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2037 (s390_gsbc_regset): New variables.
2038 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2039 and s390_gsbc_regset, if applicable.
2040 (s390_core_read_description): Check whether core file was from a
2041 target with guarded-storage support; include appropriate regsets.
2042 (s390_gdbarch_init): Add registers for guarded-storage support.
2043 (_initialize_s390_tdep): Initialize new target descriptions that
2044 include registers for guarded-storage support.
2045 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2046 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2047 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2048 (S390_NUM_REGS): Adjust macro definition.
2049 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2050 (tdesc_s390x_gs_linux64): New declarations.
2051
96235dc1
AA
20522017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2053
2054 * features/s390-gs-linux64.xml: New file.
2055 * features/s390-gs.xml: New file.
2056 * features/s390-gsbc.xml: New file.
2057 * features/s390x-gs-linux64.xml: New file.
2058 * features/Makefile (WHICH): Add s390-gs-linux64 and
2059 s390x-gs-linux64.
2060 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2061 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2062 * features/s390-gs-linux64.c: New generated file.
2063 * features/s390x-gs-linux64.c: New file.
2064 * regformats/s390-gs-linux64.dat: New file.
2065 * regformats/s390x-gs-linux64.dat: New file.
2066
b4a7c699
TT
20672017-09-23 Tom Tromey <tom@tromey.com>
2068
2069 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2070
c2f97536
TT
20712017-09-22 Tom Tromey <tom@tromey.com>
2072
2073 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2074 type to scoped_restore_tmpl.
2075 <scoped_input_handler>: Initialize m_quit_handler directly.
2076
43573013
SDJ
20772017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2078
2079 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2080 (cd_command): Likewise. Free "current_directory" before
2081 assigning to it.
2082 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2083 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2084 * top.c (gdb_dirbuf): Remove global declaration.
2085 * top.h (gdb_dirbuf): Likewise.
2086
6ec2e0f5
SDJ
20872017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2088
2089 * gnulib/aclocal.m4: Regenerate.
2090 * gnulib/config.in: Regenerate.
2091 * gnulib/configure: Regenerate.
2092 * gnulib/import/Makefile.am: Regenerate.
2093 * gnulib/import/Makefile.in: Regenerate.
2094 * gnulib/import/assure.h: New file.
2095 * gnulib/import/at-func.c: Likewise
2096 * gnulib/import/chdir-long.c: New file.
2097 * gnulib/import/chdir-long.h: New file.
2098 * gnulib/import/cloexec.c: New file.
2099 * gnulib/import/cloexec.h: New file.
2100 * gnulib/import/close.c: New file.
2101 * gnulib/import/closedir.c: New file.
2102 * gnulib/import/dirent-private.h: New file.
2103 * gnulib/import/dup-safer.c: New file.
2104 * gnulib/import/dup.c: New file.
2105 * gnulib/import/dup2.c: New file.
2106 * gnulib/import/error.c: New file.
2107 * gnulib/import/error.h: New file.
2108 * gnulib/import/exitfail.c: New file.
2109 * gnulib/import/exitfail.h: New file.
2110 * gnulib/import/fchdir.c: New file.
2111 * gnulib/import/fcntl.c: New file.
2112 * gnulib/import/fcntl.in.h: New file.
2113 * gnulib/import/fd-hook.c: New file.
2114 * gnulib/import/fd-hook.h: New file.
2115 * gnulib/import/fd-safer.c: New file.
2116 * gnulib/import/fdopendir.c: New file.
2117 * gnulib/import/filename.h: New file.
2118 * gnulib/import/filenamecat-lgpl.c: New file.
2119 * gnulib/import/filenamecat.h: New file.
2120 * gnulib/import/fstat.c: New file.
2121 * gnulib/import/fstatat.c: New file.
2122 * gnulib/import/getcwd-lgpl.c: New file.
2123 * gnulib/import/getcwd.c: New file.
2124 * gnulib/import/getdtablesize.c: New file.
2125 * gnulib/import/getlogin_r.c: New file.
2126 * gnulib/import/getprogname.c: New file.
2127 * gnulib/import/getprogname.h: New file.
2128 * gnulib/import/gettext.h: New file.
2129 * gnulib/import/glob-libc.h: New file.
2130 * gnulib/import/glob.c: New file.
2131 * gnulib/import/glob.in.h: New file.
2132 * gnulib/import/intprops.h: New file.
2133 * gnulib/import/m4/chdir-long.m4: New file.
2134 * gnulib/import/m4/close.m4: New file.
2135 * gnulib/import/m4/closedir.m4: New file.
2136 * gnulib/import/m4/d-ino.m4: New file.
2137 * gnulib/import/m4/d-type.m4: New file.
2138 * gnulib/import/m4/dup.m4: New file.
2139 * gnulib/import/m4/dup2.m4: New file.
2140 * gnulib/import/m4/error.m4: New file.
2141 * gnulib/import/m4/fchdir.m4: New file.
2142 * gnulib/import/m4/fcntl.m4: New file.
2143 * gnulib/import/m4/fcntl_h.m4: New file.
2144 * gnulib/import/m4/fdopendir.m4: New file.
2145 * gnulib/import/m4/filenamecat.m4: New file.
2146 * gnulib/import/m4/fstat.m4: New file.
2147 * gnulib/import/m4/fstatat.m4: New file.
2148 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2149 * gnulib/import/m4/getcwd-path-max.m4: New file.
2150 * gnulib/import/m4/getcwd.m4: New file.
2151 * gnulib/import/m4/getdtablesize.m4: New file.
2152 * gnulib/import/m4/getlogin_r.m4: New file.
2153 * gnulib/import/m4/getprogname.m4: New file.
2154 * gnulib/import/m4/glob.m4: New file.
2155 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2156 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2157 * gnulib/import/m4/mempcpy.m4: New file.
2158 * gnulib/import/m4/memrchr.m4: New file.
2159 * gnulib/import/m4/mode_t.m4: New file.
2160 * gnulib/import/m4/msvc-inval.m4: New file.
2161 * gnulib/import/m4/msvc-nothrow.m4: New file.
2162 * gnulib/import/m4/open.m4: New file.
2163 * gnulib/import/m4/openat.m4: New file.
2164 * gnulib/import/m4/opendir.m4: New file.
2165 * gnulib/import/m4/readdir.m4: New file.
2166 * gnulib/import/m4/realloc.m4: New file.
2167 * gnulib/import/m4/rewinddir.m4: New file.
2168 * gnulib/import/m4/save-cwd.m4: New file.
2169 * gnulib/import/m4/strdup.m4: New file.
2170 * gnulib/import/m4/strerror.m4: New file.
2171 * gnulib/import/m4/unistd-safer.m4: New file.
2172 * gnulib/import/mempcpy.c: New file.
2173 * gnulib/import/memrchr.c: New file.
2174 * gnulib/import/msvc-inval.c: New file.
2175 * gnulib/import/msvc-inval.h: New file.
2176 * gnulib/import/msvc-nothrow.c: New file.
2177 * gnulib/import/msvc-nothrow.h: New file.
2178 * gnulib/import/open.c: New file.
2179 * gnulib/import/openat-die.c: New file.
2180 * gnulib/import/openat-priv.h: New file.
2181 * gnulib/import/openat-proc.c: New file.
2182 * gnulib/import/openat.c: New file.
2183 * gnulib/import/openat.h: New file.
2184 * gnulib/import/opendir.c: New file.
2185 * gnulib/import/pipe-safer.c: New file.
2186 * gnulib/import/readdir.c: New file.
2187 * gnulib/import/realloc.c: New file.
2188 * gnulib/import/rewinddir.c: New file.
2189 * gnulib/import/save-cwd.c: New file.
2190 * gnulib/import/save-cwd.h: New file.
2191 * gnulib/import/strdup.c: New file.
2192 * gnulib/import/strerror-override.c: New file.
2193 * gnulib/import/strerror-override.h: New file.
2194 * gnulib/import/strerror.c: New file.
2195 * gnulib/import/unistd--.h: New file.
2196 * gnulib/import/unistd-safer.h: New file.
2197 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2198 "getcwd" and "glob".
2199 * ser-tcp.c: Undefine "close" before redefining it.
2200
432ae719
SM
22012017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2202
2203 * guile/scm-value.c (gdbscm_value_address): Initialize address,
2204 get rid of res_val.
2205
4fa7574e
RO
22062017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2207
2208 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2209 <sol2,sparc>: Likewise.
2210 <sol2-64,i386>: Likewise.
2211
2212 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2213 -Wdeprecated-declarations on *-*-solaris*.
2214 * configure: Regenerate.
2215
2216 * procfs.c: Include "nat/inferior.h".
2217 (procfs_info_proc): Fix typo.
2218
f6327dcb
KB
22192017-09-21 Kevin Buettner <kevinb@redhat.com>
2220
2221 * remote.c (vector): Include.
2222 (struct private_thread_info): Add field, thread_handle.
2223 (free_private_thread_info): Deallocate storage associated with
2224 thread handle.
2225 (get_private_info_thread): Initialize `thread_handle' field.
2226 (struct thread_item): Add field, thread_handle.
2227 (clear_threads_listing_context): Deallocate storage associated
2228 with thread handle.
2229 (start_thread): Add support for "handle" attribute.
2230 (thread_attributes): Add "handle".
2231 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2232 field.
2233 (remote_update_thread_list): Update thread_handle.
2234 (remote_thread_handle_to_thread_info): New function.
2235 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2236
fbbe5337
KB
22372017-09-21 Kevin Buettner <kevinb@redhat.com>
2238
2239 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2240 function.
2241 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2242 * python/python-internal.h (thread_object_type): Declare.
2243
e04ee09e
KB
22442017-09-21 Kevin Buettner <kevinb@redhat.com>
2245
2246 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2247 (target_thread_handle_to_thread_info): Declare.
2248 * target.c (target_thread_handle_to_thread_info): New function.
2249 * target-delegates.c: Regenerate.
2250 * gdbthread.h (find_thread_by_handle): Declare.
2251 * thread.c (find_thread_by_handle): New function.
2252 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2253 function.
2254 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2255
1e5b66ed
SM
22562017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2259
ebe48ba0
SM
22602017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2261
2262 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2263
0a0bf5dc
YQ
22642017-09-21 Yao Qi <yao.qi@linaro.org>
2265
2266 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2267 to gdb_target_obs.
2268
d1b0a7bf
TT
22692017-09-20 Tom Tromey <tom@tromey.com>
2270
2271 * breakpoint.c (struct counted_command_line): Remove.
2272 (breakpoint_commands): Update.
2273 (alloc_counted_command_line, incref_counted_command_line)
2274 (decref_counted_command_line, do_cleanup_counted_command_line)
2275 (make_cleanup_decref_counted_command_line): Remove.
2276 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2277 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2278 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2279 (save_breakpoints): Update.
2280 * breakpoint.h (counted_command_line): Now a typedef to
2281 shared_ptr.
2282 (struct breakpoint) <commands>: Now a counted_command_line.
2283 (struct bpstats) <command>: Likewise.
2284
48649e1b
TT
22852017-09-20 Tom Tromey <tom@tromey.com>
2286
2287 * breakpoint.c (struct commands_info, do_map_commands_command):
2288 Remove.
2289 (commands_command_1): Update.
2290 (iterate_over_related_breakpoints): Take a function_view.
2291 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2292 (delete_command): Update.
2293 (map_breakpoint_numbers): Take a function_view.
2294 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2295 (disable_command): Update.
2296 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2297 (enable_command): Update.
2298 (struct disp_data, do_enable_breakpoint_disp)
2299 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2300 (do_map_enable_delete_breakpoint): Remove.
2301 (enable_once_command, enable_count_command, enable_delete_command)
2302 (delete_trace_variable_command): Update.
2303
04afa70c
TT
23042017-09-20 Tom Tromey <tom@tromey.com>
2305
2306 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
2307 (bpstat_clear): Use delete.
2308 (bpstats): New constructors.
2309 (bpstat_copy, bpstat_stop_status): Use new.
2310 (dprintf_after_condition_true): Update.
2311 * breakpoint.h (bpstats::bpstats): Add constructors.
2312 (bpstats::~bpstats): Add destructor.
2313
c83833f4
PA
23142017-09-20 Pedro Alves <palves@redhat.com>
2315
2316 * eval.c (make_params): Delete, refactored as ...
2317 (class fake_method): ... this new type's ctor.
2318 (fake_method::~fake_method): New.
2319 (evaluate_subexp_standard): Use 'fake_method'.
2320
223ffa71
TT
23212017-09-20 Tom Tromey <tom@tromey.com>
2322
2323 * windows-nat.c (get_windows_debug_event, windows_wait)
2324 (do_initial_windows_stuff, windows_attach): Update.
2325 * utils.c (vwarning, internal_vproblem): Update.
2326 (ui_unregister_input_event_handler_cleanup)
2327 (prepare_to_handle_input): Remove.
2328 (class scoped_input_handler): New.
2329 (defaulted_query, prompt_for_continue): Update.
2330 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2331 Update.
2332 * top.c (undo_terminal_modifications_before_exit): Update.
2333 * target/target.h (target_terminal_init, target_terminal_inferior)
2334 (target_terminal_ours): Don't declare.
2335 (class target_terminal): New.
2336 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2337 (target_terminal_ours_for_output)
2338 (make_cleanup_restore_target_terminal): Don't declare.
2339 (target_terminal_info): Remove.
2340 * target.c (enum terminal_state, terminal_state): Remove.
2341 (target_terminal::terminal_state): Define.
2342 (target_terminal::init): Rename from target_terminal_init.
2343 (target_terminal::inferior): Rename from
2344 target_terminal_inferior.
2345 (target_terminal::ours): Rename from target_terminal_ours.
2346 (target_terminal::ours_for_output): Rename from
2347 target_terminal_ours_for_output.
2348 (target_terminal::info): New method.
2349 (cleanup_restore_target_terminal)
2350 (make_cleanup_restore_target_terminal): Remove.
2351 * solib.c (handle_solib_event): Update.
2352 * remote.c (remote_serial_quit_handler): Update.
2353 (remote_terminal_inferior, remote_wait_as): Update.
2354 * record-full.c (record_full_wait_1): Update.
2355 * nto-procfs.c (procfs_create_inferior): Update.
2356 * nat/fork-inferior.c (startup_inferior): Update.
2357 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2358 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2359 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2360 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2361 (mi_breakpoint_created, mi_breakpoint_deleted)
2362 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2363 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2364 (mi_user_selected_context_changed, report_initial_inferior):
2365 Update.
2366 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2367 (linux_nat_terminal_inferior): Update.
2368 * infrun.c (follow_fork_inferior)
2369 (handle_vfork_child_exec_or_exit, do_target_resume)
2370 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2371 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2372 Update.
2373 * inflow.c (child_terminal_init, info_terminal_command): Update.
2374 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2375 (attach_command): Update.
2376 * infcall.c (call_thread_fsm_should_stop): Update.
2377 * gnu-nat.c (gnu_attach): Update.
2378 * extension.c (struct active_ext_lang_state)
2379 (restore_active_ext_lang): Update.
2380 * exceptions.c (print_flush): Update.
2381 * event-top.c (async_enable_stdin, default_quit_handler): Update.
2382 (struct quit_handler_cleanup_data, restore_quit_handler)
2383 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2384 Remove.
2385 * cp-support.c (gdb_demangle): Update.
2386 * breakpoint.c (update_inserted_breakpoint_locations)
2387 (insert_breakpoint_locations, handle_jit_event)
2388 (disable_breakpoints_in_unloaded_shlib): Update.
2389 * annotate.c (annotate_breakpoints_invalid)
2390 (annotate_frames_invalid): Update.
2391
013af3fc
TT
23922017-09-20 Tom Tromey <tom@tromey.com>
2393
2394 * main.c (catch_command_errors): Rename from
2395 catch_command_errors_const.
2396 (captured_main_1): Update.
2397
06871ae8
PA
23982017-09-20 Pedro Alves <palves@redhat.com>
2399
2400 * cli/cli-cmds.c (list_command): Use print_sal_location.
2401 (print_sal_location): New function.
2402 (ambiguous_line_spec): Use print_sal_location.
2403 * linespec.c (symbol_to_sal): Record the symbol in the sal.
2404 * symtab.c (find_function_start_sal): Likewise.
2405 * symtab.h (symtab_and_line::symbol): New field.
2406
e5f25bc5
PA
24072017-09-20 Pedro Alves <palves@redhat.com>
2408
2409 * linespec.c (minsym_found): Handle non-text minsyms.
2410 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2411
1b7fa39e
WT
24122017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2413
2414 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2415 backslash.
2416
37dd0825
WT
24172017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2418
2419 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2420 vmovups instead vmovaps.
2421 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2422
4e5a4f58
JB
24232017-09-19 John Baldwin <jhb@FreeBSD.org>
2424
2425 * NEWS (Changes since GDB 8.0): Add starti.
2426 * infcmd.c (enum run_break): New.
2427 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2428 case.
2429 (run_command): Use enum run_how.
2430 (start_command): Likewise.
2431 (starti_command): New function.
2432 (RUN_ARGS_HELP): New macro.
2433 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2434 commands. Add starti command.
2435
aa70c9f1
YQ
24362017-09-19 Yao Qi <yao.qi@linaro.org>
2437
2438 * Makefile.in (monitor.o): Remove the rule.
2439
d6541620
YQ
24402017-09-19 Yao Qi <yao.qi@linaro.org>
2441
2442 * annotate.h (struct annotate_arg_emitter): Use
2443 DISABLE_COPY_AND_ASSIGN.
2444 * common/refcounted-object.h (refcounted_object): Likewise.
2445 * completer.h (struct completion_result): Likewise.
2446 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2447 * filename-seen-cache.h (filename_seen_cache): Likewise.
2448 * gdbcore.h (thread_section_name): Likewise.
2449 * gdb_regex.h (compiled_regex): Likewise.
2450 * gdbthread.h (scoped_restore_current_thread): Likewise.
2451 * inferior.h (scoped_restore_current_inferior): Likewise.
2452 * jit.c (jit_reader): Likewise.
2453 * linespec.h (struct linespec_result): Likewise.
2454 * mi/mi-parse.h (struct mi_parse): Likewise.
2455 * nat/fork-inferior.c (execv_argv): Likewise.
2456 * progspace.h (scoped_restore_current_program_space): Likewise.
2457 * python/python-internal.h (class gdbpy_enter): Likewise.
2458 * regcache.h (regcache): Likewise.
2459 * target-descriptions.c (struct tdesc_reg): Likewise.
2460 (struct tdesc_type): Likewise.
2461 (struct tdesc_feature): Likewise.
2462 * ui-out.h (ui_out_emit_type): Likewise.
2463
0615127c
SM
24642017-09-18 Simon Marchi <simon.marchi@ericsson.com>
2465
2466 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2467 label abort_expression.
2468
5e187554
SM
24692017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2470
2471 * common/buffer.c (buffer_xml_printf): Adjust.
2472 * common/xml-utils.c (xml_escape_text): Change return type to
2473 std::string, update code accordingly.
2474 * common/xml-utils.h (xml_escape_text): Change return type to
2475 std::string.
2476 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2477 * windows-tdep.c (windows_xfer_shared_library): Adjust.
2478 * unittests/xml-utils-selftests.c (test_xml_escape_text):
2479 Adjust.
2480
c3d7b541
SM
24812017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2482
2483 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2484 (SUBDIR_UNITTESTS_OBS): Add new object file.
2485 * unittests/xml-utils-selftests.c: New file.
2486
1526853e
SM
24872017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2488
2489 * common/selftest.h (selftest): New struct/interface.
2490 (register_test): Add name parameter, add new overload.
2491 (run_tests): Add filter parameter.
2492 (for_each_selftest_ftype): New typedef.
2493 (for_each_selftest): New declaration.
2494 * common/selftest.c (tests): Change type to
2495 map<string, unique_ptr<selftest>>.
2496 (simple_selftest): New struct.
2497 (register_test): New function.
2498 (register_test): Add name parameter and use it.
2499 (run_tests): Add filter parameter and use it. Add prints.
2500 Adjust to vector -> map change.
2501 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2502 registering selftests.
2503 * arm-tdep.c (_initialize_arm_tdep): Likewise.
2504 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2505 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2506 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2507 * findvar.c (_initialize_findvar): Likewise.
2508 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2509 * maint.c (maintenance_selftest): Update call to run_tests.
2510 (maintenance_info_selftests): New function.
2511 (_initialize_maint_cmds): Register "maintenance info selftests"
2512 command. Update "maintenance selftest" doc.
2513 * regcache.c (_initialize_regcache): Add names when registering
2514 selftests.
2515 * rust-exp.y (_initialize_rust_exp): Likewise.
2516 * selftest-arch.c (gdbarch_selftest): New struct.
2517 (gdbarch_tests): Remove.
2518 (register_test_foreach_arch): Add name parameter. Call
2519 register_test.
2520 (tests_with_arch): Remove, move most content to
2521 gdbarch_selftest::operator().
2522 (_initialize_selftests_foreach_arch): Remove.
2523 * selftest-arch.h (register_test_foreach_arch): Add name
2524 parameter.
2525 (run_tests_with_arch): New declaration.
2526 * utils-selftests.c (_initialize_utils_selftests): Add names
2527 when registering selftests.
2528 * utils.c (_initialize_utils): Likewise.
2529 * unittests/array-view-selftests.c
2530 (_initialize_array_view_selftests): Likewise.
2531 * unittests/environ-selftests.c (_initialize_environ_selftests):
2532 Likewise.
2533 * unittests/function-view-selftests.c
2534 (_initialize_function_view_selftests): Likewise.
2535 * unittests/offset-type-selftests.c
2536 (_initialize_offset_type_selftests): Likewise.
2537 * unittests/optional-selftests.c
2538 (_initialize_optional_selftests): Likewise.
2539 * unittests/scoped_restore-selftests.c
2540 (_initialize_scoped_restore_selftests): Likewise.
2541 * NEWS: Document "maintenance selftest" and "maint info
2542 selftests".
2543
5846367a
SM
25442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2545
2546 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2547 scoped_restore.
2548
bd77e8ff
SM
25492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2550
2551 * mi/mi-main.c (mi_load_progress): Make uiout variable
2552 a unique_ptr.
2553
26a67918
PA
25542017-09-15 Pedro Alves <palves@redhat.com>
2555
2556 * compile/compile-c-types.c (convert_enum, convert_int)
2557 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2558
3f8a7804
SM
25592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2560
2561 * dwarf2read.c (copy_string): Remove.
2562 (parse_macro_definition): Replace copy_string with savestring.
2563
8d200706
YQ
25642017-09-15 Yao Qi <yao.qi@linaro.org>
2565
2566 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2567 gdb_target_obs.
2568 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2569 Likewise.
2570 (i[34567]86-*-linux*): Likewise.
2571
d185219d
SM
25722017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2573
2574 * dwarf2expr.h (dwarf_stack_value): Add constructor.
2575 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2576 <stack>: Change type to std::vector.
2577 <stack_len, stack_allocated>: Remove.
2578 <grow_stack>: Remove.
2579 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2580 (dwarf_expr_context::~dwarf_expr_context): Remove.
2581 (dwarf_expr_context::grow_stack): Remove.
2582 (dwarf_expr_context::push): Adjust.
2583 (dwarf_expr_context::pop): Adjust.
2584 (dwarf_expr_context::fetch): Adjust.
2585 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2586 (dwarf_expr_context::stack_empty_p): Adjust.
2587 (dwarf_expr_context::execute_stack_op): Adjust.
2588
eccd80d6
SM
25892017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2590
2591 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2592 return type to bool.
2593 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2594
69009882
SM
25952017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2596
2597 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2598 Change type to bool.
2599 (dwarf_stack_value) <in_stack_memory>: Likewise.
2600 (dwarf_expr_context) <push_address>: Change parameter type to
2601 bool.
2602 <fetch_in_stack_memory>: Change return type to bool.
2603 <push>: Change parameter type to bool.
2604 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2605 to bool.
2606 (dwarf_expr_context::push_address): Likewise.
2607 (dwarf_expr_context::fetch_in_stack_memory): Change return type
2608 to bool.
2609 (dwarf_expr_context::execute_stack_op): Adjust.
2610 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2611
1e467161
SM
26122017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2613
2614 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2615 (struct dwarf_expr_context) <n_pieces>: Remove.
2616 <pieces>: Change type to std::vector.
2617 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2618 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2619 pieces.
2620 (dwarf_expr_context::add_piece): Adjust.
2621 * dwarf2loc.c (struct piece_closure): Initialize fields.
2622 <n_pieces>: Remove.
2623 <pieces>: Change type to std::vector.
2624 (allocate_piece_closure): Adjust, change parameter to
2625 std::vector rvalue and std::move it to piece_closure.
2626 (rw_pieced_value): Adjust.
2627 (check_pieced_synthetic_pointer): Adjust.
2628 (indirect_synthetic_pointer): Adjust.
2629 (coerce_pieced_ref): Adjust.
2630 (free_pieced_value_closure): Adjust. Use delete to free
2631 piece_closure.
2632 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
2633 to allocate_piece_closure.
2634 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2635
0782db84
SM
26362017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2637
2638 * probe.h (probe_ops_cp): Remove typedef.
2639 (DEF_VEC_P (probe_ops_cp)): Remove.
2640 (all_probe_ops): Change type to std::vector.
2641 * probe.c (info_probes_for_ops): Adjust to vector change.
2642 (probe_linespec_to_ops): Likewise.
2643 (all_probe_ops): Change type to std::vector.
2644 (_initialize_probe): Adjust to vector change.
2645 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2646 * elfread.c (elf_get_probes): Likewise.
2647 * stap-probe.c (_initialize_stap_probe): Likewise.
2648
1eac6bea
SM
26492017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2650
2651 * probe.h (struct bound_probe): Define constructors.
2652 * probe.c (bound_probe_s): Remove typedef.
2653 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2654 (collect_probes): Change return type to std::vector, remove
2655 cleanup.
2656 (compare_probes): Return bool, change parameter type. Change
2657 semantic to "less than".
2658 (gen_ui_out_table_header_info): Change parameter to std::vector
2659 and update.
2660 (exists_probe_with_pops): Likewise.
2661 (info_probes_for_ops): Update to std::vector change.
2662 (enable_probes_command): Likewise.
2663 (disable_probes_command): Likewise.
2664
aaa63a31
SM
26652017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2666
2667 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2668 vec to std::vector.
2669 * probe.c (parse_probes_in_pspace): Update.
2670 (find_probes_in_objfile): Update.
2671 (find_probe_by_pc): Update.
2672 (collect_probes): Update.
2673 (probe_any_get_probes): Update.
2674 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2675 return type to reference to std::vector.
2676 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2677 std::vector and update.
2678 (dtrace_process_dof): Likewise.
2679 (dtrace_get_probes): Likewise.
2680 * elfread.c (elf_get_probes): Change return type to std::vector,
2681 store an std::vector in bfd_data.
2682 (probe_key_free): Update to std::vector.
2683 * stap-probe.c (handle_stap_probe): Change parameter to
2684 std::vector and update.
2685 (stap_get_probes): Likewise.
2686 * symfile-debug.c (debug_sym_get_probes): Change return type to
2687 std::vector and update.
2688
cb85b21b
TT
26892017-09-11 Tom Tromey <tom@tromey.com>
2690
2691 * breakpoint.c (program_breakpoint_here_p): Update.
2692 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2693 from make_show_memory_breakpoints_cleanup. Return a
2694 scoped_restore_tmpl<int>.
2695 (restore_show_memory_breakpoints): Remove.
2696 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2697 * mem-break.c (memory_validate_breakpoint): Update.
2698 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2699 (ia64_memory_remove_breakpoint): Update.
2700 (ia64_breakpoint_from_pc): Update.
2701 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2702 from make_show_memory_breakpoints_cleanup.
2703
8fbc99ef
TT
27042017-09-11 Tom Tromey <tom@tromey.com>
2705
2706 * d-namespace.c (d_lookup_symbol): Use std::string.
2707 (find_symbol_in_baseclass): Likewise.
2708
50feb4bd
TT
27092017-09-11 Tom Tromey <tom@tromey.com>
2710
2711 * ctf.c (ctf_start): Use std::string.
2712
c6dc63a1
TT
27132017-09-11 Tom Tromey <tom@tromey.com>
2714
2715 * ada-lang.c (is_known_support_routine): Update.
2716 (ada_unhandled_exception_name_addr_from_raise): Update.
2717 * guile/scm-frame.c (gdbscm_frame_name): Update.
2718 * python/py-frame.c (frapy_name): Update.
2719 (frapy_function): Update.
2720 * stack.h (find_frame_funname): Update.
2721 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2722 (print_frame): Update.
2723
d6b9b80f
TT
27242017-09-11 Tom Tromey <tom@tromey.com>
2725
2726 * findcmd.c (put_bits): Take a gdb::byte_vector.
2727 (parse_find_args): Return gdb::byte_vector. "args" now const.
2728 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2729 cleanups.
2730 (find_command): Update.
2731
a9921622
TT
27322017-09-11 Tom Tromey <tom@tromey.com>
2733
2734 * cli/cli-script.c (class scoped_restore_hook_in): New.
2735 (clear_hook_in_cleanup): Remove.
2736 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2737 scoped_restore_hook_in.
2738
be0d7abb
TT
27392017-09-11 Tom Tromey <tom@tromey.com>
2740
2741 * cli/cli-script.c (restore_interp): Remove.
2742 (read_command_lines): Use scoped_restore_interp.
2743 * interps.c (scoped_restore_interp::set_temp): Rename from
2744 interp_set_temp.
2745 * interps.h (class scoped_restore_interp): New.
2746 (interp_set_temp): Remove.
2747
00f675ff
TT
27482017-09-11 Tom Tromey <tom@tromey.com>
2749
2750 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2751 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2752 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2753 scoped_restore.
2754 (mi_cmd_break_insert_1): Update.
2755 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2756 scoped_restore.
2757
cb791d59
TT
27582017-09-11 Tom Tromey <tom@tromey.com>
2759
2760 * demangle.c (demangle_command): Update.
2761 * breakpoint.c (disable_command): Update.
2762 (enable_command): Update.
2763 (find_location_by_number): Make "number" const. Use
2764 get_number_trailer.
2765 * cli/cli-utils.c (extract_arg): Return std::string.
2766 * probe.c (parse_probe_linespec): Update. Change types.
2767 (collect_probes): Take string arguments.
2768 (parse_probe_linespec): Likewise.
2769 (info_probes_for_ops): Update.
2770 (enable_probes_command): Update.
2771 (disable_probes_command): Update.
2772 * break-catch-sig.c (catch_signal_split_args): Update.
2773 * mi/mi-parse.c (mi_parse): Update.
2774
2039bd9f
TT
27752017-09-11 Tom Tromey <tom@tromey.com>
2776
2777 * language.h (language_enum): Make argument const.
2778 * language.c (language_enum): Make argument const.
2779
f1735a53
TT
27802017-09-11 Tom Tromey <tom@tromey.com>
2781
2782 * common/common-utils.h (skip_to_space): Remove macro, redeclare
2783 as function.
2784 (skip_to_space): Rename from skip_to_space_const.
2785 * common/common-utils.c (skip_to_space): New function.
2786 (skip_to_space): Rename from skip_to_space_const.
2787 * cli/cli-utils.h (get_number): Rename from get_number_const.
2788 (extract_arg): Rename from extract_arg_const.
2789 * cli/cli-utils.c (get_number): Rename from get_number_const.
2790 (extract_arg): Rename from extract_arg_const.
2791 (number_or_range_parser::get_number): Use ::get_number.
2792 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2793 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2794 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2795 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2796 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2797 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2798 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2799 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2800
7d221d74
TT
28012017-09-11 Tom Tromey <tom@tromey.com>
2802
2803 * python/python.c (do_start_initialization): Use
2804 py-event-types.def to initialize types.
2805 Define all object type structures.
2806 * python/python-internal.h: Don't declare event initialization
2807 functions.
2808 * python/py-threadevent.c (thread_event_object_type): Don't
2809 define.
2810 * python/py-stopevent.c (stop_event_object_type): Don't define.
2811 * python/py-signalevent.c (signal_event_object_type): Don't
2812 declare or define.
2813 * python/py-newobjfileevent.c (new_objfile_event_object_type)
2814 (clear_objfiles_event_object_type): Don't declare or define.
2815 * python/py-infevents.c (inferior_call_pre_event_object_type)
2816 (inferior_call_post_event_object_type)
2817 (register_changed_event_object_type)
2818 (memory_changed_event_object_type): Don't declare or define.
2819 * python/py-inferior.c (new_thread_event_object_type)
2820 (new_inferior_event_object_type)
2821 (inferior_deleted_event_object_type): Don't declare or define.
2822 * python/py-exitedevent.c (exited_event_object_type): Don't
2823 declare or define.
2824 * python/py-evts.c (gdbpy_initialize_py_events): Use
2825 py-all-events.def.
2826 * python/py-events.h (thread_event_object_type): Don't declare.
2827 (events_object): Use py-all-events.def.
2828 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
2829 py-event-types.def.
2830 * python/py-event-types.def: New file.
2831 * python/py-continueevent.c (create_continue_event_object): Don't
2832 declare or define.
2833 * python/py-bpevent.c (breakpoint_event_object_type): Don't
2834 declare or define.
2835 * python/py-all-events.def: New file.
2836
35c61a1d
TT
28372017-09-11 Tom Tromey <tom@tromey.com>
2838
2839 * python/py-threadevent.c (create_thread_event_object): Return
2840 gdbpy_ref.
2841 * python/py-stopevent.h (create_stop_event_object)
2842 (create_breakpoint_event_object, create_signal_event_object):
2843 Update.
2844 * python/py-stopevent.c (create_stop_event_object): Return
2845 gdbpy_ref.
2846 (emit_stop_event): Update.
2847 * python/py-signalevent.c (create_signal_event_object): Return
2848 gdbpy_ref.
2849 * python/py-infevents.c (create_inferior_call_event_object):
2850 Update.
2851 * python/py-event.h (create_event_object)
2852 (create_thread_event_object): Update.
2853 * python/py-event.c (create_event_object): Return gdbpy_ref.
2854 * python/py-continueevent.c: Return gdbpy_ref.
2855 * python/py-bpevent.c (create_breakpoint_event_object): Return
2856 gdbpy_ref.
2857
7c96f8c1
TT
28582017-09-11 Tom Tromey <tom@tromey.com>
2859
2860 PR python/15622:
2861 * NEWS: Add entry.
2862 * python/python.c (do_start_initialization): Initialize new event
2863 types.
2864 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2865 (gdbpy_initialize_inferior_deleted_event)
2866 (gdbpy_initialize_new_thread_event): Declare.
2867 * python/py-threadevent.c (create_thread_event_object): Add option
2868 "thread" parameter.
2869 * python/py-inferior.c (new_thread_event_object_type)
2870 (new_inferior_event_object_type)
2871 (inferior_deleted_event_object_type): Declare.
2872 (python_new_inferior, python_inferior_deleted): New functions.
2873 (add_thread_object): Emit new_thread event.
2874 (gdbpy_initialize_inferior): Attach new functions to corresponding
2875 observers.
2876 (new_thread, new_inferior, inferior_deleted): Define new event
2877 types.
2878 * python/py-evts.c (gdbpy_initialize_py_events): Add new
2879 registries.
2880 * python/py-events.h (events_object) <new_inferior,
2881 inferior_deleted, new_thread>: New fields.
2882 * python/py-event.h (create_thread_event_breakpoint): Add optional
2883 "thread" parameter.
2884
72542b8e
AB
28852017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2886
2887 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2888 check current_ui instead.
2889 (internal_vproblem): Likewise.
2890
0d64823e
SM
28912017-09-09 Simon Marchi <simon.marchi@ericsson.com>
2892
2893 * thread.c (print_thread_info_1): Remove unnecessary calls to
2894 uiout->is_mi_like_p.
2895
eb1e02fd
TT
28962017-09-09 Tom Tromey <tom@tromey.com>
2897
2898 * namespace.h (add_using_directive): Update.
2899 * namespace.c (add_using_directive): Change type of excludes to
2900 std::vector.
2901 * dwarf2read.c (read_import_statement): Use std::vector.
2902 (read_namespace): Update.
2903 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2904
0fc21fd8
TT
29052017-09-09 Tom Tromey <tom@tromey.com>
2906
2907 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2908
49663d05
TT
29092017-09-09 Tom Tromey <tom@tromey.com>
2910
2911 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2912
0b868b60
TT
29132017-09-09 Tom Tromey <tom@tromey.com>
2914
2915 * stack.c (func_command): Use gdb::def_vector.
2916
c0470d48
TT
29172017-09-09 Tom Tromey <tom@tromey.com>
2918
2919 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2920 ui_out_emit_list, ui_out_emit_tuple.
2921 (mi_cmd_var_update): Likewise.
2922
ca5909c7
TT
29232017-09-09 Tom Tromey <tom@tromey.com>
2924
2925 * mi/mi-interp.c (mi_user_selected_context_changed): Use
2926 ui_out_redirect_pop.
2927 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2928 ui_out_redirect_pop.
2929 * utils.c (do_ui_out_redirect_pop)
2930 (make_cleanup_ui_out_redirect_pop): Remove.
2931 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2932 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2933 * ui-out.h (ui_out_redirect_pop): New class.
2934
e6a2252a
TT
29352017-09-09 Tom Tromey <tom@tromey.com>
2936
2937 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2938 (list_available_thread_groups, mi_cmd_list_thread_groups)
2939 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2940 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2941 Likewise.
2942
393702cd
TT
29432017-09-09 Tom Tromey <tom@tromey.com>
2944
2945 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2946 ui_out_emit_tuple.
2947
76f9c9cf
TT
29482017-09-09 Tom Tromey <tom@tromey.com>
2949
2950 * target.c (flash_erase_command): Use ui_out_emit_tuple.
2951 * stack.c (print_frame): Use ui_out_emit_tuple.
2952 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2953 (info_spu_mailbox_command, info_spu_dma_command)
2954 (info_spu_proxydma_command): Likewise.
2955 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2956 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2957 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2958 ui_out_emit_tuple.
2959 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2960
dc9fe180
TT
29612017-09-09 Tom Tromey <tom@tromey.com>
2962
2963 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2964 (class ui_out_emit_table): Update comment.
2965 * ui-out.c (do_cleanup_table_end)
2966 (make_cleanup_ui_out_table_begin_end): Remove.
2967 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2968 (info_spu_dma_cmdlist): Likewise.
2969 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2970 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2971 ui_out_emit_table.
2972
f8cc3da6
TT
29732017-09-09 Tom Tromey <tom@tromey.com>
2974
2975 * thread.c (print_thread_info_1): Use ui_out_emit_table,
2976 ui_out_emit_list, gdb::optional.
2977
481695ed
JB
29782017-09-09 John Baldwin <jhb@FreeBSD.org>
2979
2980 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2981 prototype.
2982 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2983 prototype.
2984 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2985 prototype.
2986 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2987 * ada-exp.y: Remove _initialize_ada_exp prototype.
2988 * ada-lang.c: Remove _initialize_ada_language prototype.
2989 * ada-tasks.c: Remove _initialize_tasks prototype.
2990 * addrmap.c: Remove _initialize_addrmap prototype.
2991 * agent.c: Remove _initialize_agent prototype.
2992 * aix-thread.c: Remove _initialize_aix_thread prototype.
2993 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2994 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2995 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2996 prototype.
2997 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2998 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2999 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3000 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3001 prototype.
3002 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3003 prototype.
3004 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3005 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3006 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3007 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3008 prototype.
3009 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3010 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3011 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3012 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3013 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3014 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3015 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3016 prototype.
3017 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3018 prototype.
3019 * annotate.c: Remove _initialize_annotate prototype.
3020 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3021 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3022 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3023 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3024 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3025 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3026 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3027 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3028 prototype.
3029 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3030 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3031 * auto-load.c: Remove _initialize_auto_load prototype.
3032 * auxv.c: Remove _initialize_auxv prototype.
3033 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3034 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3035 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3036 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3037 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3038 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3039 prototype.
3040 * break-catch-throw.c: Remove _initialize_break_catch_throw
3041 prototype.
3042 * breakpoint.c: Remove _initialize_breakpoint prototype.
3043 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3044 * btrace.c: Remove _initialize_btrace prototype.
3045 * charset.c: Remove _initialize_charset prototype.
3046 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3047 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3048 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3049 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3050 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3051 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3052 * coffread.c: Remove _initialize_coffread prototype.
3053 * compile/compile.c: Remove _initialize_compile prototype.
3054 * complaints.c: Remove _initialize_complaints prototype.
3055 * completer.c: Remove _initialize_completer prototype.
3056 * copying.awk: Remove _initialize_copying prototype.
3057 * copying.c: Regenerate.
3058 * core-regset.c: Remove _initialize_core_regset prototype.
3059 * corefile.c: Remove _initialize_core prototype.
3060 * corelow.c: Remove _initialize_corelow prototype.
3061 * cp-abi.c: Remove _initialize_cp_abi prototype.
3062 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3063 * cp-support.c: Remove _initialize_cp_support prototype.
3064 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3065 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3066 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3067 * ctf.c: Remove _initialize_ctf prototype.
3068 * d-lang.c: Remove _initialize_d_language prototype.
3069 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3070 prototype.
3071 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3072 * dbxread.c: Remove _initialize_dbxread prototype.
3073 * dcache.c: Remove _initialize_dcache prototype.
3074 * demangle.c: Remove _initialize_demangler prototype.
3075 * disasm-selftests.c: Remove _initialize_disasm_selftests
3076 prototype.
3077 * disasm.c: Remove _initialize_disasm prototype.
3078 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3079 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3080 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3081 prototype.
3082 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3083 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3084 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3085 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3086 * elfread.c: Remove _initialize_elfread prototype.
3087 * exec.c: Remove _initialize_exec prototype.
3088 * extension.c: Remove _initialize_extension prototype.
3089 * f-lang.c: Remove _initialize_f_language prototype.
3090 * f-valprint.c: Remove _initialize_f_valprint prototype.
3091 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3092 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3093 * filesystem.c: Remove _initialize_filesystem prototype.
3094 * findcmd.c: Remove _initialize_mem_search prototype.
3095 * fork-child.c: Remove _initialize_fork_child prototype.
3096 * frame-base.c: Remove _initialize_frame_base prototype.
3097 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3098 * frame.c: Remove _initialize_frame prototype.
3099 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3100 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3101 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3102 * gcore.c: Remove _initialize_gcore prototype.
3103 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3104 * gdbarch.c: Regenerate.
3105 * gdbarch.sh: Remove _initialize_gdbarch prototype.
3106 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3107 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3108 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3109 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3110 * go-lang.c: Remove _initialize_go_language prototype.
3111 * go32-nat.c: Remove _initialize_go32_nat prototype.
3112 * guile/guile.c: Remove _initialize_guile prototype.
3113 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3114 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3115 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3116 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3117 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3118 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3119 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3120 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3121 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3122 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3123 prototype.
3124 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3125 prototype.
3126 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3127 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3128 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3129 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3130 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3131 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3132 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3133 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3134 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3135 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3136 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3137 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3138 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3139 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3140 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3141 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3142 prototype.
3143 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3144 prototype.
3145 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3146 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3147 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3148 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3149 * infcall.c: Remove _initialize_infcall prototype.
3150 * infcmd.c: Remove _initialize_infcmd prototype.
3151 * inferior.c: Remove _initialize_inferiors prototype.
3152 * inflow.c: Remove _initialize_inflow prototype.
3153 * infrun.c: Remove _initialize_infrun prototype.
3154 * interps.c: Remove _initialize_interpreter prototype.
3155 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3156 * jit.c: Remove _initialize_jit prototype.
3157 * language.c: Remove _initialize_language prototype.
3158 * linux-fork.c: Remove _initialize_linux_fork prototype.
3159 * linux-nat.c: Remove _initialize_linux_nat prototype.
3160 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3161 * linux-thread-db.c: Remove _initialize_thread_db prototype.
3162 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3163 * m2-lang.c: Remove _initialize_m2_language prototype.
3164 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3165 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3166 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3167 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3168 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3169 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3170 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3171 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3172 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3173 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3174 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3175 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3176 * machoread.c: Remove _initialize_machoread prototype.
3177 * macrocmd.c: Remove _initialize_macrocmd prototype.
3178 * macroscope.c: Remove _initialize_macroscope prototype.
3179 * maint.c: Remove _initialize_maint_cmds prototype.
3180 * mdebugread.c: Remove _initialize_mdebugread prototype.
3181 * memattr.c: Remove _initialize_mem prototype.
3182 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3183 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3184 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3185 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3186 * mi/mi-main.c: Remove _initialize_mi_main prototype.
3187 * microblaze-linux-tdep.c: Remove
3188 _initialize_microblaze_linux_tdep prototype.
3189 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3190 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3191 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3192 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3193 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3194 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3195 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3196 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3197 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3198 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3199 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3200 prototype.
3201 * mipsread.c: Remove _initialize_mipsread prototype.
3202 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3203 prototype.
3204 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3205 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3206 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3207 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3208 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3209 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3210 prototype.
3211 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3212 * nto-procfs.c: Remove _initialize_procfs prototype.
3213 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3214 * objc-lang.c: Remove _initialize_objc_language prototype.
3215 * objfiles.c: Remove _initialize_objfiles prototype.
3216 * observer.c: Remove observer_test_first_notification_function,
3217 observer_test_second_notification_function,
3218 observer_test_third_notification_function, and
3219 _initialize_observer prototypes.
3220 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3221 * osabi.c: Remove _initialize_gdb_osabi prototype.
3222 * osdata.c: Remove _initialize_osdata prototype.
3223 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3224 * parse.c: Remove _initialize_parse prototype.
3225 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3226 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3227 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3228 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3229 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3230 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3231 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3232 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3233 * printcmd.c: Remove _initialize_printcmd prototype.
3234 * probe.c: Remove _initialize_probe prototype.
3235 * proc-api.c: Remove _initialize_proc_api prototype.
3236 * proc-events.c: Remove _initialize_proc_events prototype.
3237 * proc-service.c: Remove _initialize_proc_service prototype.
3238 * procfs.c: Remove _initialize_procfs prototype.
3239 * psymtab.c: Remove _initialize_psymtab prototype.
3240 * python/python.c: Remove _initialize_python prototype.
3241 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3242 * record-btrace.c: Remove _initialize_record_btrace prototype.
3243 * record-full.c: Remove _initialize_record_full prototype.
3244 * record.c: Remove _initialize_record prototype.
3245 * regcache.c: Remove _initialize_regcache prototype.
3246 * reggroups.c: Remove _initialize_reggroup prototype.
3247 * remote-notif.c: Remove _initialize_notif prototype.
3248 * remote-sim.c: Remove _initialize_remote_sim prototype.
3249 * remote.c: Remove _initialize_remote prototype.
3250 * reverse.c: Remove _initialize_reverse prototype.
3251 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3252 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3253 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3254 prototype.
3255 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3256 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3257 * rust-exp.y: Remove _initialize_rust_exp prototype.
3258 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3259 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3260 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3261 * score-tdep.c: Remove _initialize_score_tdep prototype.
3262 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3263 prototype.
3264 * ser-go32.c: Remove _initialize_ser_dos prototype.
3265 * ser-mingw.c: Remove _initialize_ser_windows prototype.
3266 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3267 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3268 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3269 * serial.c: Remove _initialize_serial prototype.
3270 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3271 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3272 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3273 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3274 * skip.c: Remove _initialize_step_skip prototype.
3275 * sol-thread.c: Remove _initialize_sol_thread prototype.
3276 * solib-aix.c: Remove _initialize_solib_aix prototype.
3277 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3278 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3279 * solib-frv.c: Remove _initialize_frv_solib prototype.
3280 * solib-spu.c: Remove _initialize_spu_solib prototype.
3281 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3282 * solib-target.c: Remove _initialize_solib_target prototype.
3283 * solib.c: Remove _initialize_solib prototype.
3284 * source.c: Remove _initialize_source prototype.
3285 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3286 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3287 prototype.
3288 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3289 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3290 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3291 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3292 prototype.
3293 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3294 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3295 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3296 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3297 prototype.
3298 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3299 prototype.
3300 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3301 prototype.
3302 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3303 prototype.
3304 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3305 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3306 prototype.
3307 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3308 prototype.
3309 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3310 prototype.
3311 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3312 prototype.
3313 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3314 prototype.
3315 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3316 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3317 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3318 * stabsread.c: Remove _initialize_stabsread prototype.
3319 * stack.c: Remove _initialize_stack prototype.
3320 * stap-probe.c: Remove _initialize_stap_probe prototype.
3321 * std-regs.c: Remove _initialize_frame_reg prototype.
3322 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3323 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3324 * symfile.c: Remove _initialize_symfile prototype.
3325 * symmisc.c: Remove _initialize_symmisc prototype.
3326 * symtab.c: Remove _initialize_symtab prototype.
3327 * target-dcache.c: Remove _initialize_target_dcache prototype.
3328 * target-descriptions.c: Remove _initialize_target_descriptions
3329 prototype.
3330 * thread.c: Remove _initialize_thread prototype.
3331 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3332 prototype.
3333 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3334 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3335 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3336 prototype.
3337 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3338 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3339 * tracefile.c: Remove _initialize_tracefile prototype.
3340 * tracepoint.c: Remove _initialize_tracepoint prototype.
3341 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3342 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3343 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3344 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3345 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3346 * tui/tui-win.c: Remove _initialize_tui_win prototype.
3347 * tui/tui.c: Remove _initialize_tui prototype.
3348 * typeprint.c: Remove _initialize_typeprint prototype.
3349 * user-regs.c: Remove _initialize_user_regs prototype.
3350 * utils.c: Remove _initialize_utils prototype.
3351 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3352 * valarith.c: Remove _initialize_valarith prototype.
3353 * valops.c: Remove _initialize_valops prototype.
3354 * valprint.c: Remove _initialize_valprint prototype.
3355 * value.c: Remove _initialize_values prototype.
3356 * varobj.c: Remove _initialize_varobj prototype.
3357 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3358 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3359 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3360 * windows-nat.c: Remove _initialize_windows_nat,
3361 _initialize_check_for_gdb_ini, and _initialize_loadable
3362 prototypes.
3363 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3364 * xcoffread.c: Remove _initialize_xcoffread prototype.
3365 * xml-support.c: Remove _initialize_xml_support prototype.
3366 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3367 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3368 prototype.
3369 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3370 prototype.
3371 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3372
a611b5cb
KS
33732017-09-08 Keith Seitz <keiths@redhat.com>
3374
3375 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3376 field.
3377
469412dd
CW
33782017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
3379
3380 * f-valprint.c (f_val_print): Remove check for one byte
3381 sized integers. Remove printing of character type.
3382
a5ad232b
FP
33832017-09-08 Frank Penczek <frank.penczek@intel.com>
3384 Christoph Weinmann <christoph.t.weinmann@intel.com>
3385 Bernhard Heckel <bernhard.heckel@intel.com>
3386
3387 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3388 to maintain proper indentation when printing pointers/refs.
3389
e5014227
JB
33902017-09-07 Joel Brobecker <brobecker@adacore.com>
3391
3392 GDB 8.0.1 released.
3393
63c99141
JB
33942017-09-07 Joel Brobecker <brobecker@adacore.com>
3395
3396 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3397
69c1e056
TT
33982017-09-05 Tom Tromey <tom@tromey.com>
3399
3400 * parse.c (funcall_chain): Now a std::vector.
3401 (start_arglist, end_arglist): Simplify.
3402 (free_funcalls): Remove.
3403 (parse_exp_in_context_1): Remove cleanup.
3404
fef704bf
TT
34052017-09-05 Tom Tromey <tom@tromey.com>
3406
3407 * go-exp.y (go_parse): Don't create a cleanup.
3408
5613c585
TT
34092017-09-05 Tom Tromey <tom@tromey.com>
3410
3411 * d-exp.y (PrimaryExpression): Use std::string.
3412 (d_parse): Don't create a cleanup.
3413
eae49211
TT
34142017-09-05 Tom Tromey <tom@tromey.com>
3415
3416 * utils.c (do_clear_parser_state): Remove.
3417 (make_cleanup_clear_parser_state): Remove.
3418 * p-exp.y (pascal_parse): Use scoped_restore.
3419 * m2-exp.y (m2_parse): Use scoped_restore.
3420 * f-exp.y (f_parse): Use scoped_restore.
3421 * d-exp.y (d_parse): Use scoped_restore.
3422 * c-exp.y (c_parse): Use scoped_restore.
3423 * ada-exp.y (ada_parse): Use scoped_restore.
3424 * utils.h (make_cleanup_clear_parser_state): Remove.
3425
73b9be8b
KS
34262017-09-06 Keith Seitz <keiths@redhat.com>
3427
3428 * dwarf2read.c (dw2_linkage_name_attr): New function.
3429 (dw2_linkage_name): New function.
3430 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3431 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3432 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3433
a102602b
KR
34342017-09-06 Kamil Rytarowski <n54@gmx.com>
3435
3436 * config/djgpp/djconfig.sh: Correct shell portability issue.
3437
28ad437d
KR
34382017-09-06 Kamil Rytarowski <n54@gmx.com>
3439
3440 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3441
351787dd
JB
34422017-09-06 John Baldwin <jhb@FreeBSD.org>
3443
3444 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3445 * NEWS: Mention new FreeBSD/mips native configuration.
3446 * configure.host: Add aarch64*-*-freebsd*.
3447 * configure.nat: Likewise.
3448 * aarch64-fbsd-nat.c: New file.
3449
c0f84956
JB
34502017-09-06 John Baldwin <jhb@FreeBSD.org>
3451
3452 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3453 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3454 * NEWS: Mention new FreeBSD/aarch64 target.
3455 * configure.tgt: Add aarch64*-*-freebsd*.
3456 * aarch64-fbsd-tdep.c: New file.
3457 * aarch64-fbsd-tdep.h: New file.
3458
7610297a
KR
34592017-09-06 Kamil Rytarowski <n54@gmx.com>
3460
3461 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3462
fbd1b771
JK
34632017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3464
3465 * parse.c (find_minsym_type_and_address): Don't relocate addresses
3466 of TLS symbols.
3467
5ca79eae
PW
34682017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3469
3470 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3471 call.
3472
bf93d7ba
SM
34732017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3474
3475 * infrun.c (follow_exec): Call add_thread after
3476 target_find_description.
3477
1bb7c059
SM
34782017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3479
3480 * infrun.c (handle_inferior_event_1): When exec'ing, read
3481 stop_pc after follow_exec.
3482
fc809827
SM
34832017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3484
3485 * remote.c (process_g_packet): Update error message.
3486
d2fcdd85
YQ
34872017-09-05 Yao Qi <yao.qi@linaro.org>
3488
3489 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3490 targets.
3491
e69570ee
PA
34922017-09-05 Pedro Alves <palves@redhat.com>
3493
3494 * eval.c (eval_call, evaluate_funcall): New functions, factored
3495 out from ...
3496 (evaluate_subexp_standard): ... this.
3497
22916b07
YQ
34982017-09-05 Yao Qi <yao.qi@linaro.org>
3499
3500 * amd64-tdep.c (amd64_target_description): Create target
3501 descriptions.
3502 (_initialize_amd64_tdep): Don't call functions
3503 initialize_tdesc_amd64_*. Add self tests.
3504 * arch/amd64.c (amd64_create_target_description): Add parameter
3505 is_linux. Call set_tdesc_osabi if is_linux is true.
3506 * arch/amd64.h (amd64_create_target_description): Update the
3507 declaration.
3508 * arch/i386.c (i386_create_target_description): Add parameter
3509 is_linux. Call set_tdesc_osabi if is_linux is true.
3510 * arch/i386.h (i386_create_target_description): Update
3511 declaration.
3512 * configure.tgt: Add i386.o to gdb_target_obs.
3513 * features/Makefile (XMLTOC): Remove i386/*.xml.
3514 * features/i386/amd64-avx-avx512.c: Remove.
3515 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3516 * features/i386/amd64-avx-mpx.c: Remove.
3517 * features/i386/amd64-avx.c: Remove.
3518 * features/i386/amd64-mpx.c: Remove.
3519 * features/i386/amd64.c: Remove.
3520 * features/i386/i386-avx-avx512.c: Remove.
3521 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3522 * features/i386/i386-avx-mpx.c: Remove.
3523 * features/i386/i386-avx.c: Remove.
3524 * features/i386/i386-mmx.c: Remove.
3525 * features/i386/i386-mpx.c: Remove.
3526 * features/i386/i386.c: Remove.
3527 * i386-tdep.c: Don't include features/i386/i386*.c., include
3528 target-descriptions.h and arch/i386.h.
3529 (i386_target_description): Create target descriptions.
3530 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3531 functions. Do self tests.
3532
0854b7b1
YQ
35332017-09-05 Yao Qi <yao.qi@linaro.org>
3534
3535 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3536 * features/i386/amd64-avx-avx512-linux.c: Removed.
3537 * features/i386/amd64-avx-linux.c: Removed.
3538 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3539 * features/i386/amd64-avx-mpx-linux.c: Removed.
3540 * features/i386/amd64-linux.c: Removed.
3541 * features/i386/amd64-mpx-linux.c: Removed.
3542 * features/i386/x32-avx-avx512-linux.c: Removed.
3543 * features/i386/x32-avx-linux.c: Removed.
3544 * features/i386/x32-linux.c: Removed.
3545
b4570e4b
YQ
35462017-09-05 Yao Qi <yao.qi@linaro.org>
3547
3548 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
3549 features/i386/*.c.
3550 (amd64_linux_read_description): Call
3551 amd64_create_target_description.
3552 * arch/amd64.c: New file.
3553 * arch/amd64.h: New file.
3554 * configure.tgt (x86_64-*-linux*): Append amd64.o.
3555 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3556
6c73f67f
YQ
35572017-09-05 Yao Qi <yao.qi@linaro.org>
3558
3559 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3560 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
3561 (amd64_linux_read_description): Create target descriptions.
3562 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3563 functions. Add unit tests.
3564 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3565 x32-core.xml.
3566 * features/i386/64bit-avx.c: Generated.
3567 * features/i386/64bit-avx512.c: Generated.
3568 * features/i386/64bit-core.c: Generated.
3569 * features/i386/64bit-linux.c: Generated.
3570 * features/i386/64bit-mpx.c: Generated.
3571 * features/i386/64bit-pkeys.c: Generated.
3572 * features/i386/64bit-segments.c: Generated.
3573 * features/i386/64bit-sse.c: Generated.
3574 * features/i386/x32-core.c: Generated.
3575 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3576 c files for amd64-linux and x32-linux.
3577
9d3d478b
YQ
35782017-09-05 Yao Qi <yao.qi@linaro.org>
3579
3580 * amd64-linux-tdep.c (amd64_linux_read_description): New
3581 function.
3582 (amd64_linux_core_read_description): Call
3583 amd64_linux_read_description.
3584 (amd64_linux_init_abi): Likewise.
3585 (amd64_x32_linux_init_abi): Likewise.
3586 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3587 * x86-linux-nat.c (x86_linux_read_description): Call
3588 amd64_linux_read_description.
3589
b9f1d50f
YQ
35902017-09-05 Yao Qi <yao.qi@linaro.org>
3591
3592 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3593 comments.
3594
188c9e6d
YQ
35952017-09-05 Yao Qi <yao.qi@linaro.org>
3596
3597 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3598 * features/i386/i386-avx-avx512-linux.c: Remove.
3599 * features/i386/i386-avx-linux.c: Remove.
3600 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3601 * features/i386/i386-avx-mpx-linux.c: Remove.
3602 * features/i386/i386-linux.c: Remove.
3603 * features/i386/i386-mmx-linux.c: Remove.
3604 * features/i386/i386-mpx-linux.c: Remove.
3605
5f035c07
YQ
36062017-09-05 Yao Qi <yao.qi@linaro.org>
3607
3608 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3609 (SFILES): Add arch/i386.c.
3610 (HFILES_NO_SRCDIR): Add arch/i386.h.
3611 * arch/i386.c: New file.
3612 * arch/i386.h: New file.
3613 * arch/tdesc.h (allocate_target_description): Declare.
3614 (set_tdesc_architecture): Declare.
3615 (set_tdesc_osabi): Declare.
3616 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3617 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3618 include arch/i386.h.
3619 (i386_linux_read_description): Remove code and call
3620 i386_create_target_description.
3621 (set_tdesc_architecture): New function.
3622 (set_tdesc_osabi): New function.
3623 * target-descriptions.h (allocate_target_description): Remove.
3624
0abe8a89
YQ
36252017-09-05 Yao Qi <yao.qi@linaro.org>
3626
3627 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3628 * target-descriptions.c (tdesc_create_feature): Likewise, and
3629 adjust code.
3630 * features/i386/32bit-avx.c: Re-generated.
3631 * features/i386/32bit-avx512.c: Re-generated.
3632 * features/i386/32bit-core.c: Re-generated.
3633 * features/i386/32bit-linux.c: Re-generated.
3634 * features/i386/32bit-mpx.c: Re-generated.
3635 * features/i386/32bit-pkeys.c: Re-generated.
3636 * features/i386/32bit-sse.c: Re-generated.
3637
0a188386
YQ
36382017-09-05 Yao Qi <yao.qi@linaro.org>
3639
3640 * regformats/regdef.h (struct reg): Override operator == and !=.
3641
f49ff000
YQ
36422017-09-05 Yao Qi <yao.qi@linaro.org>
3643
3644 * arch/tdesc.h: New file.
3645 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3646 * target-descriptions.c: Update comments.
3647 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3648 declarations.
3649 * features/i386/32bit-avx.c: Re-generated.
3650 * features/i386/32bit-avx512.c: Re-generated.
3651 * features/i386/32bit-core.c: Re-generated.
3652 * features/i386/32bit-linux.c: Re-generated.
3653 * features/i386/32bit-mpx.c: Re-generated.
3654 * features/i386/32bit-pkeys.c: Re-generated.
3655 * features/i386/32bit-sse.c: Re-generated.
3656
f7000548
YQ
36572017-09-05 Yao Qi <yao.qi@linaro.org>
3658
3659 * regformats/regdat.sh: Update generated code.
3660
c9a5e2a5
YQ
36612017-09-05 Yao Qi <yao.qi@linaro.org>
3662
3663 * regformats/regdat.sh: Adjust code order.
3664
d6b687ac
SM
36652017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3666
3667 * expprint.c (dump_subexp_body_standard): Use constant format
3668 string in fprintf_filtered call.
3669
a379bfd0
JB
36702017-09-04 John Baldwin <jhb@FreeBSD.org>
3671
3672 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3673 NetBSD/i386.
3674 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3675
f7efc967
JB
36762017-09-04 John Baldwin <jhb@FreeBSD.org>
3677
3678 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3679
c49fbc6c
JB
36802017-09-04 John Baldwin <jhb@FreeBSD.org>
3681
3682 * bsd-kvm.o: Define _KMEMUSER.
3683 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3684 * configure: Regenerate.
3685
26562e73
JB
36862017-09-04 John Baldwin <jhb@FreeBSD.org>
3687
3688 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3689 * i386-fbsd-nat.c: Likewise.
3690
31cf1487
JB
36912017-09-04 John Baldwin <jhb@FreeBSD.org>
3692
3693 * unittests/array-view-selftests.c: Add include of <array>.
3694
5b9f8a7c
JB
36952017-09-04 John Baldwin <jhb@FreeBSD.org>
3696
3697 * spu-tdep.c (flush_ea_cache): Add missing argument to
3698 call_function_by_hand.
3699
d69cf9b2
PA
37002017-09-04 Pedro Alves <palves@redhat.com>
3701
3702 * NEWS (Safer support for debugging with no debug info): New.
3703
3693fdb3
PA
37042017-09-04 Pedro Alves <palves@redhat.com>
3705
3706 * c-exp.y (function_method, function_method_void): Add current
3707 instance flags to TYPE_INSTANCE.
3708 * dwarf2read.c (check_modifier): New.
3709 (compute_delayed_physnames): Assert that only C++ adds delayed
3710 physnames. Mark fn_fields as const/volatile depending on
3711 physname.
3712 * eval.c (make_params): New type_instance_flags parameter. Use
3713 it as the new type's instance flags.
3714 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3715 flags element and pass it to make_params.
3716 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3717 instance flags element.
3718 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3719 * gdbtypes.h: Include "enum-flags.h".
3720 (type_instance_flags): New enum-flags type.
3721 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3722 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3723 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3724 (follow_type_instance_flags): New function.
3725 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3726 * parser-defs.h (follow_type_instance_flags): Declare.
3727 * valops.c (value_struct_elt_for_reference): const/volatile must
3728 match too.
3729
e68cb8e0
PA
37302017-09-04 Pedro Alves <palves@redhat.com>
3731
3732 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3733 function/method scopes; lookup the nested name as a function local
3734 static variable.
3735
858be34c
PA
37362017-09-04 Pedro Alves <palves@redhat.com>
3737
3738 (%type <voidval>): Add function_method.
3739 * c-exp.y (exp): New production for calls with no arguments.
3740 (function_method, function_method_void_or_typelist): New
3741 productions.
3742 (exp): New production for "method()::static_var".
3743 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3744 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3745 Handle OP_FUNC_STATIC_VAR.
3746 * parse.c (operator_length_standard):
3747 Handle OP_FUNC_STATIC_VAR.
3748
dd5901a6
PA
37492017-09-04 Pedro Alves <palves@redhat.com>
3750
3751 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3752 handling.
3753 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3754 Ditto.
3755 * parse.c (operator_length_standard, operator_check_standard):
3756 Ditto.
3757 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3758
46a4882b
PA
37592017-09-04 Pedro Alves <palves@redhat.com>
3760
3761 * ax-gdb.c: Include "typeprint.h".
3762 (gen_expr_for_cast): New function.
3763 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3764 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3765 type is unknown.
3766 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3767 nodebug_data_symbol.
3768 * eval.c: Include "typeprint.h".
3769 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3770 Error out if symbol has unknown type.
3771 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3772 evaluate_subexp_for_cast.
3773 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3774 OP_VAR_MSYM_VALUE.
3775 (evaluate_subexp_for_cast): New function.
3776 * gdbtypes.c (init_nodebug_var_type): New function.
3777 (objfile_type): Use it to initialize types of variables with no
3778 debug info.
3779 * typeprint.c (error_unknown_type): New.
3780 * typeprint.h (error_unknown_type): New declaration.
3781 * compile/compile-c-types.c (convert_type_basic): Handle
3782 TYPE_CODE_ERROR; warn and fallback to int for variables with
3783 unknown type.
3784
fe13dfec
PA
37852017-09-04 Pedro Alves <palves@redhat.com>
3786
3787 * eval.c (evaluate_var_value): New function, factored out from ...
3788 (evaluate_subexp_standard): ... here.
3789
d008ee21
PA
37902017-09-04 Pedro Alves <palves@redhat.com>
3791
3792 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3793 Remove useless assignments to 'op'.
3794
827d0c51
PA
37952017-09-04 Pedro Alves <palves@redhat.com>
3796
3797 * eval.c (eval_skip_value): New function.
3798 (evaluate_subexp_standard): Use it.
3799
2c5a2be1
PA
38002017-09-04 Pedro Alves <palves@redhat.com>
3801
3802 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3803 function name from symbol/minsym and pass it to
3804 error_call_unknown_return_type.
3805
74ea4be4
PA
38062017-09-04 Pedro Alves <palves@redhat.com>
3807
3808 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3809 * ax-gdb.c (gen_msym_var_ref): New function.
3810 (gen_expr): Handle OP_VAR_MSYM_VALUE.
3811 * eval.c (evaluate_var_msym_value): New function.
3812 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3813 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3814 to call_function_by_hand.
3815 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3816 Handle OP_VAR_MSYM_VALUE.
3817 (union exp_element) <msymbol>: New field.
3818 * minsyms.h (struct type): Forward declare.
3819 (find_minsym_type_and_address): Declare.
3820 * parse.c (write_exp_elt_msym): New function.
3821 (write_exp_msymbol): Delete, refactored as ...
3822 (find_minsym_type_and_address): ... this new function.
3823 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3824 (operator_length_standard, operator_check_standard): Handle
3825 OP_VAR_MSYM_VALUE.
3826 * std-operator.def (OP_VAR_MSYM_VALUE): New.
3827
7022349d
PA
38282017-09-04 Pedro Alves <palves@redhat.com>
3829
3830 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3831 TYPE_GNU_IFUNC specially here. Throw error if return type is
3832 unknown.
3833 * ada-typeprint.c (print_func_type): Handle functions with unknown
3834 return type.
3835 * c-typeprint.c (c_type_print_base): Handle functions and methods
3836 with unknown return type.
3837 * compile/compile-c-symbols.c (convert_symbol_bmsym)
3838 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3839 * compile/compile-c-types.c: Include "objfiles.h".
3840 (convert_func): For functions with unknown return type, warn and
3841 default to int.
3842 * compile/compile-object-run.c (compile_object_run): Adjust call
3843 to call_function_by_hand_dummy.
3844 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3845 call_function_by_hand.
3846 * eval.c (evaluate_subexp_standard): Adjust calls to
3847 call_function_by_hand. Handle functions and methods with unknown
3848 return type. Pass expect_type to call_function_by_hand.
3849 * f-typeprint.c (f_type_print_base): Handle functions with unknown
3850 return type.
3851 * gcore.c (call_target_sbrk): Adjust call to
3852 call_function_by_hand.
3853 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3854 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
3855 an integer address type instead of nodebug.
3856 * guile/scm-value.c (gdbscm_value_call): Adjust call to
3857 call_function_by_hand.
3858 * infcall.c (error_call_unknown_return_type): New function.
3859 (call_function_by_hand): New "default_return_type" parameter.
3860 Pass it down.
3861 (call_function_by_hand_dummy): New "default_return_type"
3862 parameter. Use it instead of defaulting to int. If there's no
3863 default and the return type is unknown, throw an error. If
3864 there's a default return type, and the called function has no
3865 debug info, then assume the function is prototyped.
3866 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3867 New "default_return_type" parameter.
3868 (error_call_unknown_return_type): New declaration.
3869 * linux-fork.c (call_lseek): Cast return type of lseek.
3870 (inferior_call_waitpid, checkpoint_command): Adjust calls to
3871 call_function_by_hand.
3872 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3873 calls to call_function_by_hand.
3874 * m2-typeprint.c (m2_procedure): Handle functions with unknown
3875 return type.
3876 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3877 (value_nsstring, print_object_command): Adjust calls to
3878 call_function_by_hand.
3879 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3880 functions with unknown return type.
3881 (pascal_type_print_func_varspec_suffix): New function.
3882 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3883 TYPE_CODE_METHOD>: Use it.
3884 * python/py-value.c (valpy_call): Adjust call to
3885 call_function_by_hand.
3886 * rust-lang.c (rust_evaluate_funcall): Adjust call to
3887 call_function_by_hand.
3888 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3889 call_function_by_hand.
3890 * valops.c (value_allocate_space_in_inferior): Adjust call to
3891 call_function_by_hand.
3892 * typeprint.c (type_print_unknown_return_type): New function.
3893 * typeprint.h (type_print_unknown_return_type): New declaration.
3894
54990598
PA
38952017-09-04 Pedro Alves <palves@redhat.com>
3896
3897 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3898 types with more than one parameter as prototyped.
3899
9a24775b
PA
39002017-09-04 Pedro Alves <palves@redhat.com>
3901
3902 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3903 (disassemble_command): Use gdb_disassembly_flags instead of bare
3904 int.
3905 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3906 (dump_insns, do_mixed_source_and_assembly_deprecated)
3907 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3908 Use gdb_disassembly_flags instead of bare int.
3909 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3910 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3911 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3912 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
3913 (enum gdb_disassembly_flag): ... values of this new enumeration.
3914 (gdb_disassembly_flags): Define.
3915 (gdb_disassembly)
3916 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3917 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3918 gdb_disassembly_flags instead of bare int.
3919 * record-btrace.c (btrace_insn_history)
3920 (record_btrace_insn_history, record_btrace_insn_history_range)
3921 (record_btrace_insn_history_from): Use gdb_disassembly_flags
3922 instead of bare int.
3923 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3924 Use gdb_disassembly_flags instead of bare int.
3925 * target-debug.h (target_debug_print_gdb_disassembly_flags):
3926 Define.
3927 * target-delegates.c: Regenerate.
3928 * target.c (target_insn_history, target_insn_history_from)
3929 (target_insn_history_range): Use gdb_disassembly_flags instead of
3930 bare int.
3931 * target.h: Include "disasm.h".
3932 (struct target_ops) <to_insn_history, to_insn_history_from,
3933 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3934 int.
3935 (target_insn_history, target_insn_history_from)
3936 (target_insn_history_range): Use gdb_disassembly_flags instead of
3937 bare int.
3938
80a65e9b
SM
39392017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3940
3941 * cli/cli-script.c (build_command_line): For if/while commands,
3942 check whether args is empty.
3943
6b66338c
SM
39442017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3945
3946 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3947 (enum command_control_type): Likewise.
3948 (struct command_line): Likewise.
3949 (free_command_lines): Likewise.
3950 (struct command_lines_deleter): Likewise.
3951 (command_line_up): Likewise.
3952 (read_command_lines): Likewise.
3953 (read_command_lines_1): Likewise.
3954 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3955 (enum command_control_type): Likewise.
3956 (struct command_line): Likewise.
3957 (free_command_lines): Likewise.
3958 (struct command_lines_deleter): Likewise.
3959 (command_line_up): Likewise.
3960 (read_command_lines): Likewise.
3961 (read_command_lines_1): Likewise.
3962 * breakpoint.h: Include cli/cli-script.h.
3963 * extension-priv.h: Likewise.
3964 * gdbcmd.h: Likewise.
3965
51abb421
PA
39662017-09-04 Pedro Alves <palves@redhat.com>
3967
3968 * ada-lang.c (is_known_support_routine): Move sal declaration to
3969 where it is initialized.
3970 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3971 (parse_breakpoint_sals, decode_static_tracepoint_spec)
3972 (clear_command, update_static_tracepoint): Remove init_sal
3973 references. Move declarations closer to initializations.
3974 * cli/cli-cmds.c (list_command): Move sal declarations closer to
3975 initializations.
3976 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3977 references. Move sal declarations closer to initializations.
3978 * frame.c (find_frame_sal): Return a symtab_and_line via function
3979 return instead of output parameter. Remove init_sal references.
3980 * frame.h (find_frame_sal): Return a symtab_and_line via function
3981 return instead of output parameter.
3982 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3983 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3984 instead of memset.
3985 (gdbscm_find_pc_line): Remove init_sal reference.
3986 * infcall.c (call_function_by_hand_dummy): Remove init_sal
3987 references. Move declarations closer to initializations.
3988 * infcmd.c (set_step_frame): Update. Move declarations closer to
3989 initializations.
3990 (finish_backward): Remove init_sal references. Move declarations
3991 closer to initializations.
3992 * infrun.c (process_event_stop_test, handle_step_into_function)
3993 (insert_hp_step_resume_breakpoint_at_frame)
3994 (insert_step_resume_breakpoint_at_caller): Likewise.
3995 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3996 (symbol_to_sal): Likewise.
3997 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3998 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3999 to its initialization.
4000 * reverse.c (save_bookmark_command): Use new/delete. Remove
4001 init_sal references. Move declarations closer to initializations.
4002 * source.c (get_current_source_symtab_and_line): Remove brace
4003 initialization.
4004 (set_current_source_symtab_and_line): Now takes the sal by const
4005 reference. Remove brace initialization.
4006 (line_info): Remove init_sal reference.
4007 * source.h (set_current_source_symtab_and_line): Now takes a
4008 symtab_and_line via const reference.
4009 * stack.c (set_current_sal_from_frame): Adjust.
4010 (print_frame_info): Adjust.
4011 (get_last_displayed_sal): Return the sal via function return
4012 instead of via output parameter. Simplify.
4013 (frame_info): Adjust.
4014 * stack.h (get_last_displayed_sal): Return the sal via function
4015 return instead of via output parameter.
4016 * symtab.c (init_sal): Delete.
4017 (find_pc_sect_line): Remove init_sal references. Move
4018 declarations closer to initializations.
4019 (find_function_start_sal): Remove init_sal references. Move
4020 declarations closer to initializations.
4021 * symtab.h (struct symtab_and_line): In-class initialize all
4022 fields.
4023 * tracepoint.c (set_traceframe_context)
4024 (print_one_static_tracepoint_marker): Remove init_sal references.
4025 Move declarations closer to initializations.
4026 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4027 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4028 declarations closer to initializations.
4029 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4030 init_sal references. Adjust.
4031
6c5b2ebe
PA
40322017-09-04 Pedro Alves <palves@redhat.com>
4033
4034 * ax-gdb.c (agent_command_1): Use range-for.
4035 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4036 * breakpoint.c: Include "common/array-view.h".
4037 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4038 parameter from struct symtabs_and_lines to
4039 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4040 (breakpoint_sals_to_pc): Change sals parameter from struct
4041 symtabs_and_lines to std::vector reference.
4042 (check_fast_tracepoint_sals): Change sals parameter from struct
4043 symtabs_and_lines to std::array_view. Use range-for.
4044 (decode_static_tracepoint_spec): Return a std::vector instead of
4045 symtabs_and_lines. Update.
4046 (create_breakpoint): Update.
4047 (break_range_command, until_break_command, clear_command): Update.
4048 (base_breakpoint_decode_location, bkpt_decode_location)
4049 (bkpt_probe_create_sals_from_location)
4050 (bkpt_probe_decode_location, tracepoint_decode_location)
4051 (tracepoint_probe_decode_location)
4052 (strace_marker_create_sals_from_location): Return a std::vector
4053 instead of symtabs_and_lines.
4054 (strace_marker_create_breakpoints_sal): Update.
4055 (strace_marker_decode_location): Return a std::vector instead of
4056 symtabs_and_lines. Update.
4057 (update_breakpoint_locations): Change struct symtabs_and_lines
4058 parameters to gdb::array_view. Adjust.
4059 (location_to_sals): Return a std::vector instead of
4060 symtabs_and_lines. Update.
4061 (breakpoint_re_set_default): Use std::vector instead of struct
4062 symtabs_and_lines.
4063 (decode_location_default): Return a std::vector instead of
4064 symtabs_and_lines. Update.
4065 * breakpoint.h: Include "common/array-view.h".
4066 (struct breakpoint_ops) <decode_location>: Now returns a
4067 std::vector instead of returning a symtabs_and_lines via output
4068 parameter.
4069 (update_breakpoint_locations): Change sals parameters to use
4070 gdb::array_view.
4071 * cli/cli-cmds.c (edit_command, list_command): Update to use
4072 std::vector and gdb::array_view.
4073 (ambiguous_line_spec): Adjust to use gdb::array_view and
4074 range-for.
4075 (compare_symtabs): Rename to ...
4076 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4077 const reference and adjust.
4078 (filter_sals): Rewrite using std::vector and standard algorithms.
4079 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4080 (jump_command): Update to use std::vector.
4081 * linespec.c (struct linespec_state) <canonical_names>: Update
4082 comment.
4083 (add_sal_to_sals_basic): Delete.
4084 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4085 (decode_line_2, create_sals_line_offset)
4086 (convert_address_location_to_sals, convert_linespec_to_sals)
4087 (convert_explicit_location_to_sals, parse_linespec)
4088 (event_location_to_sals, decode_line_full, decode_line_1)
4089 (decode_line_with_current_source)
4090 (decode_line_with_last_displayed, decode_objc)
4091 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4092 (linespec_result::~linespec_result): Adjust to use std::vector
4093 instead of symtabs_and_lines.
4094 * linespec.h (linespec_sals::sals): Now a std::vector.
4095 (struct linespec_result): Use std::vector, bool, and in-class
4096 initialization.
4097 (decode_line_1, decode_line_with_current_source)
4098 (decode_line_with_last_displayed): Return std::vector.
4099 * macrocmd.c (info_macros_command): Use std::vector.
4100 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4101 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4102 std::vector.
4103 * probe.h (parse_probes): Return a std::vector.
4104 * python/python.c (gdbpy_decode_line): Use std::vector and
4105 gdb::array_view.
4106 * source.c (select_source_symtab, line_info): Use std::vector.
4107 * stack.c (func_command): Use std::vector.
4108 * symtab.h (struct symtabs_and_lines): Delete.
4109 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4110
7c44b49c
PA
41112017-09-04 Pedro Alves <palves@redhat.com>
4112
4113 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4114 unittests/array-view-selftests.c.
4115 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4116 * common/array-view.h: New file.
4117 * unittests/array-view-selftests.c: New file.
4118
e439fa14
PA
41192017-09-04 Pedro Alves <palves@redhat.com>
4120
4121 * cli/cli-cmds.c (edit_command): Pass message to
4122 ambiguous_line_spec.
4123 (list_command): Pass message to ambiguous_line_spec. Say
4124 "first"/"last" instead of "start" and "end" to be consistent with
4125 the manual.
4126 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
4127 them to print formatted message.
4128
7525b645
PA
41292017-09-04 Pedro Alves <palves@redhat.com>
4130
4131 * btrace.c (ftrace_add_pt): Pass btrace_insn to
4132 ftrace_update_insns by reference instead of pointer.
4133
badc0020
YQ
41342017-09-04 Yao Qi <yao.qi@linaro.org>
4135
4136 * i386-go32-tdep.c: Include x86-xstate.h.
4137 (i386_go32_init_abi): Call i386_target_description.
4138 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4139 if xcr0 is X86_XSTATE_X87_MASK.
4140 * i386-tdep.h (tdesc_i386): Remove the declaration.
4141 (tdesc_i386_mmx): Likewise.
4142
d78bdb54
YQ
41432017-09-04 Yao Qi <yao.qi@linaro.org>
4144
4145 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4146 X86_XSTATE_SSE_MASK instead of 0.
4147
ca1fa5ee
YQ
41482017-09-04 Yao Qi <yao.qi@linaro.org>
4149
4150 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4151 i386_target_description.
4152 * i386-fbsd-nat.c (i386fbsd_read_description): Call
4153 i386_target_description.
4154 * i386-tdep.c (i386_gdbarch_init): Likewise.
4155
2434b019
YQ
41562017-09-04 Yao Qi <yao.qi@linaro.org>
4157
4158 * amd64-darwin-tdep.c: Include "x86-xstate.h".
4159 (x86_darwin_init_abi_64): Call amd64_target_description.
4160 * amd64-dicos-tdep.c: Likewise.
4161 * amd64-fbsd-nat.c: Likewise.
4162 * amd64-fbsd-tdep.c: Likewise.
4163 * amd64-nbsd-tdep.c: Likewise.
4164 * amd64-obsd-tdep.c: Likewise.
4165 * amd64-sol2-tdep.c: Likewise.
4166 * amd64-windows-tdep.c: Likewise.
4167 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4168
0860c437
SM
41692017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4170
4171 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4172 (btrace_function) <insn>: Change type to use std::vector.
4173 * btrace.c (ftrace_debug, ftrace_call_num_insn,
4174 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4175 ftrace_update_insns, ftrace_compute_global_level_offset,
4176 btrace_stitch_bts, btrace_clear, btrace_insn_get,
4177 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4178 change to std::vector.
4179 (ftrace_update_insns): Adjust to change to std::vector, change
4180 type of INSN parameter.
4181 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4182 * record-btrace.c (btrace_call_history_insn_range,
4183 btrace_compute_src_line_range,
4184 record_btrace_frame_prev_register): Adjust to change to
4185 std::vector.
4186 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4187 to change to std::vector.
4188
0638b7f9
TT
41892017-09-03 Tom Tromey <tom@tromey.com>
4190
4191 * corefile.c (reopen_exec_file): Use std::string.
4192
8f84fb0e
TT
41932017-09-03 Tom Tromey <tom@tromey.com>
4194
4195 * compile/compile.c (compile_register_name_mangled): Return
4196 std::string.
4197 * compile/compile-loc2c.c (pushf_register_address): Update.
4198 (pushf_register): Update.
4199 * compile/compile-c-types.c (convert_array): Update.
4200 * compile/compile-c-symbols.c (generate_vla_size): Update.
4201 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4202 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4203 (convert_one_symbol): Update.
4204 (generate_c_for_for_one_variable): Update.
4205 * compile/compile-c-support.c (c_get_range_decl_name): Return a
4206 std::string.
4207 (generate_register_struct): Update.
4208 * compile/compile-internal.h (c_get_range_decl_name): Return a
4209 std::string.
4210 (compile_register_name_mangled): Return std::string.
4211
18e9961f
TT
42122017-09-03 Tom Tromey <tom@tromey.com>
4213
4214 * utils.c (perror_string): Return a std::string.
4215 (throw_perror_with_name, perror_warning_with_name): Update.
4216
45343786
TT
42172017-09-03 Tom Tromey <tom@tromey.com>
4218
4219 * demangle.c (demangle_command): Use std::string,
4220 unique_xmalloc_ptr.
4221
b57af503
TT
42222017-09-03 Tom Tromey <tom@tromey.com>
4223
4224 * cli/cli-setshow.c (do_set_command): Use std::string.
4225
6eecf35f
TT
42262017-09-03 Tom Tromey <tom@tromey.com>
4227
4228 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4229
56496dd4
TT
42302017-09-03 Tom Tromey <tom@tromey.com>
4231
4232 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4233
e91a1fa7
TT
42342017-09-03 Tom Tromey <tom@tromey.com>
4235
4236 * mi/mi-cmd-env.c (env_execute_cli_command): Use
4237 gdb::unique_xmalloc_ptr.
4238
7ffd83d7
TT
42392017-09-03 Tom Tromey <tom@tromey.com>
4240
4241 * thread.c (print_thread_info_1): Use string_printf.
4242 (thread_apply_command, thread_apply_all_command): Use
4243 std::string.
4244
1ccbe998
TT
42452017-09-03 Tom Tromey <tom@tromey.com>
4246
4247 * valprint.c (val_print_string): Update.
4248 * gdbcore.h (memory_error_message): Return std::string.
4249 * corefile.c (memory_error_message): Return std::string.
4250 (memory_error): Update.
4251 * breakpoint.c (insert_bp_location): Update.
4252
23fdd69e
SM
42532017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4254
4255 * target/waitstatus.h (target_waitstatus_to_string): Change
4256 return type to std::string.
4257 * target/waitstatus.c (target_waitstatus_to_string): Return
4258 std::string.
4259 * target.h (target_waitstatus_to_string): Remove declaration.
4260 * infrun.c (resume, clear_proceed_status_thread,
4261 print_target_wait_results, do_target_wait, save_waitstatus,
4262 stop_all_threads): Adjust.
4263 * record-btrace.c (record_btrace_wait): Adjust.
4264 * target-debug.h
4265 (target_debug_print_struct_target_waitstatus_p): Adjust.
4266
5c811d30
JK
42672017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4268
4269 PR gdb/22046
4270 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4271 detection.
4272
0a2dde4a
SDJ
42732017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4274
4275 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4276 for setting/unsetting environment variables on the remote target.
4277 (New remote packets): Add entries for QEnvironmentHexEncoded,
4278 QEnvironmentUnset and QEnvironmentReset.
4279 * common/environ.c (gdb_environ::operator=): Extend method to
4280 handle m_user_set_env_list and m_user_unset_env_list.
4281 (gdb_environ::clear): Likewise.
4282 (match_var_in_string): Change type of first parameter from 'char
4283 *' to 'const char *'.
4284 (gdb_environ::set): Extend method to handle
4285 m_user_set_env_list and m_user_unset_env_list.
4286 (gdb_environ::unset): Likewise.
4287 (gdb_environ::clear_user_set_env): New method.
4288 (gdb_environ::user_set_envp): Likewise.
4289 (gdb_environ::user_unset_envp): Likewise.
4290 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4291 m_user_unset_env_list on move constructor/assignment.
4292 (unset): Add new default parameter 'update_unset_list = true'.
4293 (clear_user_set_env): New method.
4294 (user_set_envp): Likewise.
4295 (user_unset_envp): Likewise.
4296 (m_user_set_env_list): New std::set.
4297 (m_user_unset_env_list): Likewise.
4298 * common/rsp-low.c (hex2str): New function.
4299 (bin2hex): New overload for bin2hex function.
4300 * common/rsp-low.c (hex2str): New prototype.
4301 (str2hex): New overload prototype.
4302 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4303 QEnvironmentUnset and QEnvironmentReset.
4304 (remote_protocol_features): Add QEnvironmentHexEncoded,
4305 QEnvironmentUnset and QEnvironmentReset packets.
4306 (send_environment_packet): New function.
4307 (extended_remote_environment_support): Likewise.
4308 (extended_remote_create_inferior): Call
4309 extended_remote_environment_support.
4310 (_initialize_remote): Add QEnvironmentHexEncoded,
4311 QEnvironmentUnset and QEnvironmentReset packet configs.
4312 * unittests/environ-selftests.c (gdb_selftest_env_var):
4313 New variable.
4314 (test_vector_initialization): New function.
4315 (test_init_from_host_environ): Likewise.
4316 (test_reinit_from_host_environ): Likewise.
4317 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4318 Likewise.
4319 (test_unset_set_empty_vector): Likewise.
4320 (test_vector_clear): Likewise.
4321 (test_std_move): Likewise.
4322 (test_move_constructor):
4323 (test_self_move): Likewise.
4324 (test_set_unset_reset): Likewise.
4325 (run_tests): Rewrite in terms of the functions above.
4326
654670a4
WP
43272017-08-31 Weimin Pan <weimin.pan@oracle.com>
4328
4329 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4330 (adi_available): Use a temp variable of type CORE_ADDR as argument
4331 3 when calling target_auxv_search.
4332 (adi_normalize_address): Use masks and xor operators to calculate
4333 normalized address.
4334 (adi_read_versions, adi_write_versions, adi_print_versions)
4335 (do_examine, do_assign): Use paddress.
4336
7755ddb7
JB
43372017-08-29 John Baldwin <jhb@FreeBSD.org>
4338
4339 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4340 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4341 out of loop and add supply of FIR.
4342 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4343 add collect of FIR.
4344
fd437cbc
SM
43452017-08-28 Simon Marchi <simon.marchi@ericsson.com>
4346
3804a343 4347 PR gdb/21827
fd437cbc
SM
4348 * cli/cli-script.c (define_command): Don't convert command name
4349 to lower case.
4350
988f6b3d
JB
43512017-08-25 Joel Brobecker <brobecker@adacore.com>
4352
4353 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4354 Update all callers accordingly. Remove all code blocks handling
4355 the case where DISPP is not NULL.
4356
663c44ac
JK
43572017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4358
4359 PR symtab/22003
4360 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4361 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4362 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4363
f1902523
JK
43642017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4365
4366 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4367 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4368 (read_comp_units_from_section): New parameter abbrev_section, use
4369 read_and_check_comp_unit_head, allocate signatured_type if needed.
4370 (create_all_comp_units): Update read_comp_units_from_section caller.
4371
87215ad1
SDJ
43722017-08-23 Pedro Alves <palves@redhat.com>
4373
4374 PR remote/21852
4375 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4376 to null_ptid and switch to thread without reading the registers
4377 after adding the inferior.
4378
6e41ddec
JK
43792017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4380
4381 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4382 compile-gcc.
4383 * compile/compile.c (compile_gcc, show_compile_gcc): New.
4384 (compile_to_object): Implement compile_gcc.
4385 (_initialize_compile): Install "set compile-gcc". Initialize
4386 compile_gcc.
4387
e68c32d5
JK
43882017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4389
4390 * compile/compile.c (compile_to_object): Conditionally call
4391 set_verbose. Conditionally call compile or compile_v0.
4392
58afddc6
WP
43932017-08-07 Weimin Pan <weimin.pan@oracle.com>
4394
4395 * sparc64-tdep.h: (adi_normalize_address): New export.
4396 * sparc-nat.h: (open_adi_tag_fd): New export.
4397 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4398 * sparc64-linux-tdep.c:
4399 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4400 (sparc64_linux_handle_segmentation_fault): New function.
4401 (sparc64_linux_init_abi): Register
4402 sparc64_linux_handle_segmentation_fault
4403 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4404 (sparc64_addr_bits_remove): New function.
4405 (sparc64_init_abi): Register sparc64_addr_bits_remove.
4406 (MAX_PROC_NAME_SIZE): New macro.
4407 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4408 (sparc64adilist): New variable.
4409 (adi_proc_list): New variable.
4410 (find_adi_info): New function.
4411 (add_adi_info): New function.
4412 (get_adi_info_proc): New function.
4413 (get_adi_info): New function.
4414 (info_adi_command): New function.
4415 (read_maps_entry): New function.
4416 (adi_available): New function.
4417 (adi_normalize_address): New function.
4418 (adi_align_address): New function.
4419 (adi_convert_byte_count): New function.
4420 (adi_tag_fd): New function.
4421 (adi_is_addr_mapped): New function.
4422 (adi_read_versions): New function.
4423 (adi_write_versions): New function.
4424 (adi_print_versions): New function.
4425 (do_examine): New function.
4426 (do_assign): New function.
4427 (adi_examine_command): New function.
4428 (adi_assign_command): New function.
4429 (_initialize_sparc64_adi_tdep): New function.
4430
11db9430
SM
44312017-08-22 Simon Marchi <simon.marchi@ericsson.com>
4432
4433 * breakpoint.c (breakpoints_info): Rename to ...
4434 (info_breakpoints_command): ... this.
4435 (watchpoints_info): Rename to ...
4436 (info_watchpoints_command): ... this.
4437 (tracepoints_info): Rename to ...
4438 (info_tracepoints_command): ... this.
4439 (_initialize_breakpoint): Adjust.
4440 * dcache.c (dcache_info): Rename to ...
4441 (info_display_command): ... this.
4442 (_initialize_dcache): Adjust.
4443 * frame.h (args_info): Rename to ...
4444 (info_args_command): ... this.
4445 (locals_info): Rename to ...
4446 (info_locals_command): ... this.
4447 * infcmd.c (nofp_registers_info): Rename to ...
4448 (info_registers_command): ... this.
4449 (float_info): Rename to ...
4450 (info_float_command): ... this.
4451 (program_info): Rename to ...
4452 (info_program_command): ... this.
4453 (all_registers_info): Rename to ...
4454 (info_all_registers_command): ... this.
4455 (vector_info): Rename to ...
4456 (info_vector_command): ... this.
4457 (float_info): Rename to ...
4458 (info_float_command): ... this.
4459 (_initialize_infcmd): Adjust.
4460 * inferior.h (term_info): Rename to ...
4461 (info_terminal_command): ... this.
4462 * inflow.c (term_info): Rename to ...
4463 (info_terminal_command): ... this.
4464 (_initialize_inflow): Adjust.
4465 * infrun.c (signals_info): Rename to ...
4466 (info_signals_command): ... this.
4467 (_initialize_infrun): Adjust.
4468 * objc-lang.c (classes_info): Rename to ...
4469 (info_classes_command): ... this.
4470 (selectors_info): Rename to ...
4471 (info_selectors_command): ... this.
4472 (_initialize_objc_language): Adjust.
4473 * printcmd.c (sym_info): Rename to ...
4474 (info_symbol_command): ... this.
4475 (address_info): Rename to ...
4476 (info_address_command): ... this.
4477 (display_info): Rename to ...
4478 (info_display_command): ... this.
4479 (_initialize_printcmd): Adjust.
4480 * reverse.c (bookmarks_info): Rename to ...
4481 (info_breakpoints_command): ... this.
4482 (_initialize_reverse): Adjust.
4483 * ser-go32.c (dos_info): Rename to ...
4484 (info_serial_command): ... this.
4485 (_initialize_ser_dos): Adjust.
4486 * skip.c (skip_info): Rename to ...
4487 (info_skip_command): ... this.
4488 (_initialize_step_skip): Adjust.
4489 * source.c (line_info): Rename to ...
4490 (info_line_command): ... this.
4491 (source_info): Rename to ...
4492 (info_source_command)
4493 * stack.c (frame_info): Rename to ...
4494 (info_frame_command): ... this.
4495 (locals_info): Rename to ...
4496 (info_locals_command): ... this.
4497 (args_info): Rename to ...
4498 (info_args_command): ... this.
4499 (_initialize_stack): Adjust.
4500 * symtab.c (sources_info): Rename to ...
4501 (info_sources_command): ... this.
4502 (variables_info): Rename to ...
4503 (info_variables_command): ... this.
4504 (functions_info): Rename to ...
4505 (info_functions_command): ... this.
4506 (types_info): Rename to ...
4507 (info_types_command): ... this.
4508 (_initialize_symtab): Adjust.
4509 * target.c (target_info): Rename to ...
4510 (info_target_command): ... this.
4511 (initialize_targets): Adjust.
4512 * tracepoint.c (tvariables_info): Rename to ...
4513 (info_tvariables_command): ... this.
4514 (scope_info): Rename to ...
4515 (info_scope_command): ... this.
4516 (trace_dump_actions): Adjust.
4517 (_initialize_tracepoint): Adjust.
4518
b270e6f9
TT
45192017-08-22 Tom Tromey <tom@tromey.com>
4520
4521 * breakpoint.h (install_breakpoint): Update.
4522 * breakpoint.c (add_solib_catchpoint): Update.
4523 (install_breakpoint): Change argument to a std::unique_ptr.
4524 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4525 (create_breakpoint_sal, create_breakpoint): Update.
4526 (watch_command_1, catch_exec_command_1)
4527 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4528 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4529 Return the breakpoint.
4530 (set_raw_breakpoint_without_location, set_raw_breakpoint)
4531 (new_single_step_breakpoint): Update.
4532 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4533 std::unique_ptr.
4534 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4535 std::unique_ptr.
4536 * break-catch-sig.c (create_signal_catchpoint): Use
4537 std::unique_ptr.
4538 * ada-lang.c (create_ada_exception_catchpoint): Use
4539 std::unique_ptr.
4540
36bd8eaa
TT
45412017-08-22 Tom Tromey <tom@tromey.com>
4542
4543 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4544
56f37645
TT
45452017-08-22 Tom Tromey <tom@tromey.com>
4546
4547 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4548 (lookup_partial_symbol): Update.
4549
0b581c69
TT
45502017-08-22 Tom Tromey <tom@tromey.com>
4551
4552 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4553 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4554 (find_and_open_source, symtab_to_fullname): Update.
4555 * psymtab.c (psymtab_to_fullname): Update.
4556
14278e1f
TT
45572017-08-22 Tom Tromey <tom@tromey.com>
4558
4559 * exec.c (exec_file_attach): Update.
4560 * linux-thread-db.c (try_thread_db_load): Update.
4561 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4562 * utils.c (gdb_realpath): Change return type.
4563 (gdb_realpath_keepfile): Update.
4564 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4565 (_initialize_utils): Register the new self test.
4566 * source.c (openp): Update.
4567 (find_and_open_source): Update.
4568 * nto-tdep.c (nto_find_and_open_solib): Update.
4569 * main.c (set_gdb_data_directory): Update.
4570 (captured_main_1): Update.
4571 * dwarf2read.c (dwarf2_get_dwz_file): Update
4572 (dw2_map_symbol_filenames): Update.
4573 * auto-load.c (auto_load_safe_path_vec_update): Update.
4574 (filename_is_in_auto_load_safe_path_vec): Change type of
4575 "filename_realp".
4576 (auto_load_objfile_script): Update.
4577 (file_is_auto_load_safe): Update. Use std::string.
4578 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4579
4971c9a7
TT
45802017-08-22 Tom Tromey <tom@tromey.com>
4581
4582 * utils.c (gdb_realpath_keepfile): Return a
4583 gdb::unique_xmalloc_ptr.
4584 * exec.c (exec_file_attach): Update.
4585 * utils.h (gdb_realpath_keepfile): Return a
4586 gdb::unique_xmalloc_ptr.
4587
e3e41d58
TT
45882017-08-22 Tom Tromey <tom@tromey.com>
4589
4590 * compile/compile.c (compile_file_command): Use
4591 gdb::unique_xmalloc_ptr, std::string.
4592 * utils.c (gdb_abspath): Change return type.
4593 * source.c (openp): Update.
4594 * objfiles.c (allocate_objfile): Update.
4595 * main.c (set_gdb_data_directory): Update.
4596 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4597
0d999a6e
ZZ
45982017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
4599
4600 * cli-cmds.c (list_commands): List actual code around more than
4601 one location.
4602
329d5e7e
JB
46032017-08-21 John Baldwin <jhb@FreeBSD.org>
4604
4605 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4606
bf223d3e
PA
46072017-08-21 Pedro Alves <palves@redhat.com>
4608
4609 PR gdb/19487
4610 * c-exp.y (variable production): Handle function aliases.
4611 * minsyms.c (msymbol_is_text): New function.
4612 * minsyms.h (msymbol_is_text): Declare.
4613 * symtab.c (find_function_alias_target): New function.
4614 * symtab.h (find_function_alias_target): Declare.
4615
c973d0aa
PA
46162017-08-21 Pedro Alves <palves@redhat.com>
4617
4618 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4619 typedefs.
4620 * typeprint.c (whatis_exp): If handling "whatis", and expression
4621 is OP_TYPE, strip one typedef level. Otherwise don't strip
4622 typedefs here.
4623 * valops.c (value_cast): Save "to" type before resolving
4624 stubs/typedefs. Use that type as resulting value's type.
4625
2989a365
TT
46262017-08-18 Tom Tromey <tom@tromey.com>
4627 Pedro Alves <palves@redhat.com>
4628
4629 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4630 * sol-thread.c (sol_thread_resume, sol_thread_wait)
4631 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4632 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4633 * proc-service.c (ps_xfer_memory): Use scoped_restore.
4634 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4635 (linux_get_siginfo_data): Add "thread" argument. Use
4636 scoped_restore.
4637 * linux-nat.c (linux_child_follow_fork)
4638 (check_stopped_by_watchpoint): Use scoped_restore.
4639 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4640 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4641 (restore_inferior_ptid, save_inferior_ptid): Remove.
4642 * btrace.c (btrace_fetch): Use scoped_restore.
4643 * bsd-uthread.c (bsd_uthread_fetch_registers)
4644 (bsd_uthread_store_registers): Use scoped_restore.
4645 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4646 scoped_restore.
4647 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4648 (aix_thread_xfer_partial): Use scoped_restore.
4649 * inferior.h (save_inferior_ptid): Remove.
4650
e60eb288
YQ
46512017-08-18 Yao Qi <yao.qi@linaro.org>
4652
4653 PR tdep/21818
4654 * arm-tdep.c (gdb_print_insn_arm): Mark
4655 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4656
6d580b63
YQ
46572017-08-18 Yao Qi <yao.qi@linaro.org>
4658
4659 * NEWS: Mention GDBserver's new option "--selftest".
4660 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4661 * selftest.c: Move it to common/selftest.c.
4662 * selftest.h: Move it to common/selftest.h.
4663 * selftest-arch.c (reset): New function.
4664 (tests_with_arch): Call reset.
4665
86dcbf50
YQ
46662017-08-18 Yao Qi <yao.qi@linaro.org>
4667
4668 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4669 instead of exception_fprintf and printf_filtered.
4670
7649770c
YQ
46712017-08-18 Yao Qi <yao.qi@linaro.org>
4672
4673 * selftest.c (register_self_test): Rename it to
4674 selftests::register_test.
4675 (run_self_tests): selftest::run_tests.
4676 * selftest.h: Update declarations.
4677 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4678 selftests::register_test_foreach_arch.
4679 * selftest-arch.h: Update declaration.
4680 * aarch64-tdep.c: Update.
4681 * arm-tdep.c: Likewise.
4682 * disasm-selftests.c: Likewise.
4683 * dwarf2loc.c: Likewise.
4684 * dwarf2-frame.c: Likewise.
4685 * findvar.c: Likewise.
4686 * gdbarch-selftests.c: Likewise.
4687 * maint.c (maintenance_selftest): Likewise.
4688 * regcache.c: Likewise.
4689 * rust-exp.y: Likewise.
4690 * selftest-arch.c: Likewise.
4691 * unittests/environ-selftests.c: Likewise.
4692 * unittests/function-view-selftests.c: Likewise.
4693 * unittests/offset-type-selftests.c: Likewise.
4694 * unittests/optional-selftests.c: Likewise.
4695 * unittests/scoped_restore-selftests.c: Likewise.
4696 * utils-selftests.c: Likewise.
4697
b0cba12e
PA
46982017-08-17 Pedro Alves <palves@redhat.com>
4699
4700 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4701 local.
4702
4c8aa72d
PA
47032017-08-17 Pedro Alves <palves@redhat.com>
4704
4705 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4706 field.
4707 (reset_die_in_process): Delete, replaced by ...
4708 (process_die_scope): ... this new class. Make it responsible for
4709 freeing cu->line_header too.
4710 (process_die): Use process_die_scope.
4711 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4712 cu->line_header_die_owner. Don't release the line header if it's
4713 owned by the CU.
4714 (setup_type_unit_groups): Make the CU/DIE own the line header.
4715 Don't release the line header here.
4716
ba713918
AL
47172017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4718
4719 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4720
44d0fb3a
RK
47212017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4722
4723 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4724 Single-Key mode
4725
a5afdb16
RK
47262017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4727
4728 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4729 mode command list.
4730
47613aeb
SH
47312017-08-15 Stafford Horne <shorne@gmail.com>
4732
4733 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4734
9c3cc999
SH
47352017-08-15 Stafford Horne <shorne@gmail.com>
4736
4737 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4738
206726fb
SDJ
47392017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4740
4741 PR gdb/21954
4742 * infcmd.c (unset_environment_command): Use the 'clear' method on
4743 the environment instead of resetting it.
4744
0335ac6d
JB
47452017-08-15 John Baldwin <jhb@FreeBSD.org>
4746
4747 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4748 platforms.
4749
d3abe1c8
TT
47502017-08-14 Tom Tromey <tom@tromey.com>
4751
4752 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4753 (print_binary_chars): Likewise.
4754 (BITS_IN_BYTES): Remove.
4755
d6382fff
TT
47562017-08-14 Tom Tromey <tom@tromey.com>
4757
4758 PR gdb/21675
4759 * valprint.c (LOW_ZERO): Change value to 034.
4760 (print_octal_chars): Add static_asserts for octal constants.
4761 * printcmd.c (print_scalar_formatted): Add 'd' case.
4762
f978cb06
TT
47632017-08-11 Tom Tromey <tom@tromey.com>
4764
4765 * symfile.c (add_symbol_file_command): Use std::vector.
4766
2f5404b3
TT
47672017-08-14 Tom Tromey <tom@tromey.com>
4768
4769 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4770 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4771 std::move.
4772 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4773
de7985c3
PA
47742017-08-11 Pedro Alves <palves@redhat.com>
4775
4776 * infrun.c (process_event_stop_test): Adjust
4777 function_name_is_marked_for_skip call.
4778 * skip.c: Include <list>.
4779 (skiplist_entry): Make it a class with private fields, and
4780 getters/setters.
4781 (skiplist_entry_chain): Delete.
4782 (skiplist_entries): New.
4783 (skiplist_entry_count): Delete.
4784 (highest_skiplist_entry_num): New.
4785 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4786 (add_skiplist_entry): Delete.
4787 (skiplist_entry::skiplist_entry): New.
4788 (skiplist_entry::add_entry): New.
4789 (skip_file_command, skip_function): Adjust.
4790 (compile_skip_regexp): Delete.
4791 (skip_command): Don't compile regexp here. Adjust to use
4792 skiplist_entry::add_entry.
4793 (skip_info): Adjust to use range-for and getters.
4794 (skip_enable_command, skip_disable_command): Adjust to use
4795 range-for and setters.
4796 (skip_delete_command): Adjust to use std::list.
4797 (add_skiplist_entry): Delete.
4798 (skip_file_p): Delete, refactored as ...
4799 (skiplist_entry::do_skip_file_p): ... this new method.
4800 (skip_gfile_p): Delete, refactored as ...
4801 (skiplist_entry::do_gskip_file_p): ... this new method.
4802 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4803 (skiplist_entry::skip_function_p): ... this new method.
4804 (function_name_is_marked_for_skip): Now returns bool, and takes
4805 the function sal by const reference. Adjust to use range-for and
4806 skiplist_entry methods.
4807 (_initialize_step_skip): Remove references to
4808 skiplist_entry_chain, skiplist_entry_count.
4809 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4810 takes the function sal by const reference.
4811
be7d3cd5
YQ
48122017-08-11 Yao Qi <yao.qi@linaro.org>
4813
4814 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4815 (dwarf2_frame_cache): Remove reset_cache_cleanup.
4816 (dwarf2_frame_cache):
4817 * frame-unwind.c (frame_unwind_try_unwinder): Catch
4818 RETURN_MASK_ALL and set *this_case to NULL.
4819 * frame-unwind.h: Update comments.
4820
1c90d9f0
YQ
48212017-08-11 Yao Qi <yao.qi@linaro.org>
4822
4823 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4824 (dwarf2_frame_state_copy_regs): Remove.
4825 (dwarf2_frame_state_free_regs): Remove.
4826 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4827 (dwarf2_restore_rule): Call method .alloc_regs instead of
4828 dwarf2_frame_state_alloc_regs.
4829 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
4830 constructor. Call std::move.
4831 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4832 (dwarf2_frame_cache): Likewise.
4833
4834 [GDB_SELF_TEST]: Include selftest.h and
4835 selftest-arch.h.
4836 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4837 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4838 execute_cfa_program_test.
4839
4840 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4841 copy ctor, assignment operator, move assignment.
4842 <alloc_regs>: New method.
4843 <swap>: New method.
4844 (struct dwarf2_frame_state): Delete dtor.
4845 (dwarf2_frame_state_alloc_regs): Remove declaration.
4846 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4847 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4848
afe37d6b
YQ
48492017-08-11 Yao Qi <yao.qi@linaro.org>
4850
4851 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4852 (dwarf2_frame_state::dwarf2_frame_state): New.
4853 (dwarf2_frame_state::~dwarf2_frame_state): New.
4854 (dwarf2_fetch_cfa_info): Update.
4855 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
4856 rather than a pointer. Update code.
4857 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4858 dtor.
4859 <data_align, code_align, retaddr_column>: Change them to const.
4860 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4861 to bool.
4862
b348037f
YQ
48632017-08-11 Yao Qi <yao.qi@linaro.org>
4864
4865 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4866 <loc.exp>: New field.
4867 * dwarf2-frame.c (execute_cfa_program): Update.
4868 (dwarf2_frame_prev_register): Update.
4869
e7c9de26
PA
48702017-08-10 Pedro Alves <palves@redhat.com>
4871
4872 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4873
e8c6b620
JB
48742017-08-09 John Baldwin <jhb@FreeBSD.org>
4875
4876 * fbsd-nat.c (struct fbsd_fork_info): Remove.
4877 (fbsd_pending_children): Use std::list.
4878 (fbsd_remember_child): Likewise.
4879 (fbsd_is_child_pending): Likewise.
4880 (fbsd_pending_vfork_done): Use std::forward_list.
4881 (fbsd_add_vfork_done): Likewise.
4882 (fbsd_is_vfork_done_pending): Likewise.
4883 (fbsd_next_vfork_done): Likewise.
4884
e4a26669
JB
48852017-08-09 John Baldwin <jhb@FreeBSD.org>
4886
4887 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4888 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4889 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4890 for `mapfilename'.
4891 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 4892 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 4893
142311d3
JB
48942017-08-09 John Baldwin <jhb@FreeBSD.org>
4895
4896 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4897 "filestuff.h".
4898 (fbsd_find_memory_regions): Fix `mapfile' initialization.
4899
42fa2e0e
TT
49002017-08-09 Tom Tromey <tom@tromey.com>
4901
4902 * skip.c (skiplist_entry): New constructor.
4903 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4904 (skiplist_entry::file_is_glob): Now bool.
4905 (skiplist_entry::file, skiplist_entry::function): Now
4906 std::string.
4907 (make_skip_entry): Return a unique_ptr. Use new.
4908 (free_skiplist_entry, free_skiplist_entry_cleanup)
4909 (make_free_skiplist_entry_cleanup): Remove.
4910 (skip_command, skip_disable_command, add_skiplist_entry)
4911 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4912 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4913 (function_name_is_marked_for_skip): Update.
4914 (skip_delete_command): Update. Use delete.
4915
cd3af38d
JW
49162017-08-09 Jiong Wang <jiong.wang@arm.com>
4917
4918 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4919 (aarch64_linux_core_read_description): New function.
4920 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4921
29592bde
PA
49222017-08-09 Pedro Alves <palves@redhat.com>
4923
4924 * cp-name-parser.y (cp_comp_to_string): Return a
4925 gdb::unique_xmalloc_ptr<char>.
4926 * cp-support.c (replace_typedefs_qualified_name)
4927 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4928 (cp_canonicalize_string_full): Use op= instead of explicit
4929 convertion.
4930 (cp_class_name_from_physname, method_name_from_physname)
4931 (cp_func_name, cp_remove_params): Adjust to use
4932 gdb::unique_xmalloc_ptr<char>.
4933 * cp-support.h (cp_comp_to_string): Return a
4934 gdb::unique_xmalloc_ptr<char>.
4935 * python/py-type.c (typy_lookup_type): Adjust to use
4936 gdb::unique_xmalloc_ptr<char>.
4937
b3340438
L
49382017-08-09 H.J. Lu <hongjiu.lu@intel.com>
4939
4940 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4941
e88e8651
YQ
49422017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
4943 Yao Qi <yao.qi@linaro.org>
4944
4945 * cp-support.c (cp_canonicalize_string_full): Use
4946 gdb::unique_xmalloc_ptr<char>.
4947 (cp_canonicalize_string): Likewise.
4948
f5a29eb0
YQ
49492017-08-09 Yao Qi <yao.qi@linaro.org>
4950
4951 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4952 * regformats/i386/amd64-avx-avx512.dat: Remove.
4953 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4954 * regformats/i386/amd64-avx-mpx.dat:Remove.
4955 * regformats/i386/amd64-avx.dat: Remove.
4956 * regformats/i386/amd64-mpx.dat: Remove.
4957 * regformats/i386/i386-avx-avx512.dat: Remove.
4958 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4959 * regformats/i386/i386-avx-mpx.dat: Remove.
4960 * regformats/i386/i386-mmx.dat: Remove.
4961 * regformats/i386/i386-mpx.dat: Remove.
4962
57757c2f
YQ
49632017-08-09 Yao Qi <yao.qi@linaro.org>
4964
4965 * amd64-tdep.h (tdesc_x32): Remove the declaration.
4966 * amd64-tdep.c: Don't include features/i386/x32*.c.
4967 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4968 functions.
4969 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4970 and i386/x32-avx-avx512.
4971 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4972 and i386/x32.xml.
4973 * features/i386/x32-avx-avx512.c: Removed.
4974 * features/i386/x32-avx-avx512.xml: Removed.
4975 * features/i386/x32-avx.c: Removed.
4976 * features/i386/x32-avx.xml: Removed.
4977 * features/i386/x32.c: Removed.
4978 * features/i386/x32.xml: Removed.
4979 * regformats/i386/x32-avx-avx512.dat: Removed.
4980 * regformats/i386/x32-avx.dat: Removed.
4981 * regformats/i386/x32.dat: Removed.
4982
ba7b109b
MR
49832017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4984
4985 PR breakpoints/21886
4986 * mem-break.c (default_memory_insert_breakpoint): Use
4987 `->placed_address' rather than `->reqstd_address' for the
4988 breakpoint location.
4989
e347efc3
MR
49902017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4991
4992 * arch-utils.c (default_print_insn): Remove arch/mach/endian
4993 assertions.
4994
0dba2a6c
MR
49952017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4996
4997 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4998 a union of `tdep_info', `tdesc_data' and `id'.
4999 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5000 rather than `info.tdep_info'.
5001 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5002 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5003 * i386-tdep.c (i386_gdbarch_init): Likewise.
5004 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5005 * mips-tdep.c (mips_gdbarch_init): Likewise.
5006 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5007 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5008 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5009 `info.tdep_info'.
5010 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5011 `info.tdep_info'.
5012 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5013 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5014 `info.tdep_info'.
5015 * spu-tdep.c (spu_gdbarch_init): Likewise.
5016 * gdbarch.h: Regenerate.
5017
16eb6b2d
LS
50182017-08-07 Leszek Swirski <leszeks@google.com>
5019
7b005726 5020 PR symtab/20899
16eb6b2d
LS
5021 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5022
74cbb09e
SM
50232017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5024
5025 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5026 (gdbsim_open): Rename gdb_argv args object to argv.
5027
ee0c3293
TT
50282017-08-05 Tom Tromey <tom@tromey.com>
5029
5030 * compile/compile-object-load.c (compile_object_load): Use
5031 gdb::unique_xmalloc_ptr.
5032 * cli/cli-dump.c (scan_filename): Rename from
5033 scan_filename_with_cleanup. Change return type.
5034 (scan_expression): Rename from scan_expression_with_cleanup.
5035 Change return type.
5036 (dump_memory_to_file, dump_value_to_file, restore_command):
5037 Use gdb::unique_xmalloc_ptr. Update.
5038 * cli/cli-cmds.c (find_and_open_script): Use
5039 gdb::unique_xmalloc_ptr.
5040 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5041 * symmisc.c (maintenance_print_symbols)
5042 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5043 * symfile.c (symfile_bfd_open, generic_load)
5044 (add_symbol_file_command, remove_symbol_file_command): Use
5045 gdb::unique_xmalloc_ptr.
5046 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5047 * psymtab.c (maintenance_print_psymbols): Use
5048 gdb::unique_xmalloc_ptr.
5049 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5050 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5051 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5052 (reload_shared_libraries_1): Likewise.
5053
3232fabd
TT
50542017-08-05 Tom Tromey <tom@tromey.com>
5055
5056 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5057 (rust_op_vector, rust_set_vector): New typedefs.
5058 (current_parser): New global.
5059 (work_obstack): Change to pointer type. Update all users.
5060 (rust_ast, pstate): Remove globals.
5061 (struct rust_parser): New.
5062 (%union) <params, field_inits>: Change type.
5063 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5064 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5065 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5066 (convert_params_to_types, convert_params_to_expression): Change
5067 type of "params".
5068 (ast_string): Change type of "fields".
5069 (rust_parse): Make a rust_parser. Remove cleanups.
5070 (rust_lex_tests): Make and install an auto_obstack.
5071
f02fd774
YQ
50722017-08-04 Yao Qi <yao.qi@linaro.org>
5073
5074 * configure.srv (ipa_x32_linux_regobj): New.
5075 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5076 instead of X86_TDESC_AVX512.
5077 (initialize_low_tracepoint): Call
5078 init_registers_x32_avx_avx512_linux.
5079
91975afd
YQ
50802017-08-04 Yao Qi <yao.qi@linaro.org>
5081
5082 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5083
2331fa3a
RK
50842017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5085
5086 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5087
744e4fe1
TT
50882017-08-03 Tom Tromey <tom@tromey.com>
5089
5090 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5091 Remove.
5092 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5093
1c034b67
TT
50942017-08-03 Tom Tromey <tom@tromey.com>
5095
5096 * python/py-param.c (compute_enum_values): Use gdb_argv.
5097
773a1edc
TT
50982017-08-03 Tom Tromey <tom@tromey.com>
5099
5100 * utils.h (struct gdb_argv_deleter): New.
5101 (gdb_argv): New class.
5102 * utils.c (gdb_argv::reset): New method.
5103 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5104 * tracefile.c (tsave_command): Use gdb_argv.
5105 * top.c (new_ui_command): Use gdb_argv.
5106 * symmisc.c (maintenance_print_symbols)
5107 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5108 * symfile.c (symbol_file_command, generic_load)
5109 (remove_symbol_file_command): Use gdb_argv.
5110 * stack.c (backtrace_command): Use gdb_argv.
5111 * source.c (add_path, show_substitute_path_command)
5112 (unset_substitute_path_command, set_substitute_path_command):
5113 Use gdb_argv.
5114 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
5115 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5116 * remote.c (extended_remote_run, remote_put_command)
5117 (remote_get_command, remote_delete_command): Use gdb_argv.
5118 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5119 (gdbsim_open): Use gdb_argv.
5120 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5121 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5122 * procfs.c (procfs_info_proc): Use gdb_argv.
5123 * interps.c (interpreter_exec_cmd): Use gdb_argv.
5124 * infrun.c (handle_command): Use gdb_argv.
5125 * inferior.c (add_inferior_command, clone_inferior_command):
5126 Use gdb_argv.
5127 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5128 * exec.c (exec_file_command): Use gdb_argv.
5129 * cli/cli-cmds.c (alias_command): Use gdb_argv.
5130 * compile/compile.c (build_argc_argv): Use gdb_argv.
5131
0d50bde3
TT
51322017-08-03 Tom Tromey <tom@tromey.com>
5133
5134 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5135
7f968c89
TT
51362017-08-03 Tom Tromey <tom@tromey.com>
5137
5138 * python/python.c (compute_python_string): Return std::string.
5139 (gdbpy_eval_from_control_command): Update.
5140 (do_start_initialization): Use std::string.
5141 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5142 xstrprintf.
5143 * python/py-breakpoint.c (local_setattro): Use string_printf, not
5144 xstrprintf.
5145
3c9ebddd
TT
51462017-08-03 Tom Tromey <tom@tromey.com>
5147
5148 * top.h (do_restore_instream_cleanup): Remove.
5149 * top.c (do_restore_instream_cleanup): Remove.
5150 (read_command_file): Use scoped_restore.
5151 * cli/cli-script.c (execute_user_command): Use scoped_restore.
5152
b51b225e
TT
51532017-08-03 Tom Tromey <tom@tromey.com>
5154
5155 * cli/cli-script.c (execute_user_command)
5156 (execute_control_command): Use scoped_restore.
5157
ac991630
TT
51582017-08-03 Tom Tromey <tom@tromey.com>
5159
5160 * cli/cli-script.c (do_restore_user_call_depth): Remove.
5161 (execute_user_command): Remove user_call_depth; use
5162 user_args_stack's size instead.
5163
898e0c8e
TT
51642017-08-03 Tom Tromey <tom@tromey.com>
5165
5166 * top.h (in_user_command): Remove.
5167 * top.c (in_user_command): Remove.
5168 * cli/cli-script.c (do_restore_user_call_depth)
5169 (execute_user_command): Update.
5170
26fcd5d7
TT
51712017-08-03 Tom Tromey <tom@tromey.com>
5172
5173 * valops.c (search_struct_method): Use gdb::byte_vector.
5174 * valarith.c (value_concat): Use std::vector.
5175 * target.c (memory_xfer_partial): Use gdb::byte_vector.
5176 (simple_search_memory): Likewise.
5177 * printcmd.c (find_string_backward): Use gdb::byte_vector.
5178 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5179 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5180 * elfread.c (elf_rel_plt_read): Use std::string.
5181 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5182 * cli/cli-dump.c (restore_section_callback): Use
5183 gdb::byte_vector.
5184
7c218e6c
TT
51852017-08-03 Tom Tromey <tom@tromey.com>
5186
5187 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5188
31b68d4a
TT
51892017-08-03 Tom Tromey <tom@tromey.com>
5190
5191 * tui/tui-regs.c (tui_restore_gdbout): Remove.
5192 (tui_register_format): Use scoped_restore.
5193
2ec845e7
TT
51942017-08-03 Tom Tromey <tom@tromey.com>
5195
5196 * reverse.c (exec_direction_default): Remove.
5197 (exec_reverse_once): Use scoped_restore.
5198 * remote.c (restore_remote_timeout): Remove.
5199 (remote_flash_erase, remote_flash_write, remote_flash_done)
5200 (readchar, remote_serial_write): Use scoped_restore.
5201 * cli/cli-script.c (struct source_cleanup_lines_args)
5202 (source_cleanup_lines): Remove.
5203 (script_from_file): Use scoped_restore.
5204 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5205 (source_command): Use scoped_restore.
5206
b3bc8453
TT
52072017-08-03 Tom Tromey <tom@tromey.com>
5208
5209 * utils.h (make_cleanup_free_so): Remove.
5210 * utils.c (do_free_so, make_cleanup_free_so): Remove.
5211 * solist.h (struct so_deleter): New.
5212 (so_list_up): New typedef.
5213 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5214
e3ad2841
TT
52152017-08-03 Tom Tromey <tom@tromey.com>
5216
5217 * utils.h (make_cleanup_restore_current_language): Remove.
5218 * utils.c (do_restore_current_language)
5219 (make_cleanup_restore_current_language): Remove.
5220 * parse.c (parse_exp_in_context_1)
5221 (parse_expression_with_language): Use
5222 scoped_restore_current_language.
5223 * mi/mi-main.c (mi_cmd_execute): Use
5224 scoped_restore_current_language.
5225 * language.h (scoped_restore_current_language): New class.
5226
b80cf838
TT
52272017-08-03 Tom Tromey <tom@tromey.com>
5228
5229 * compile/compile.c (cleanup_unlink_file): Remove.
5230 (compile_to_object): Use gdb::unlinker.
5231 (eval_compile_command): Likewise.
5232
fad0444a
TT
52332017-08-03 Tom Tromey <tom@tromey.com>
5234
5235 * utils.h (make_cleanup_fclose): Remove.
5236 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5237
6e7bc05c
TT
52382017-08-03 Tom Tromey <tom@tromey.com>
5239
5240 * top.c (open_terminal_stream): Return gdb_file_up.
5241 (new_ui_command): Update.
5242
4a45905b
TT
52432017-08-03 Tom Tromey <tom@tromey.com>
5244
5245 * source.c (print_source_lines_base, forward_search_command)
5246 (reverse_search_command): Use gdb_file_up.
5247
7cd06d6e
TT
52482017-08-03 Tom Tromey <tom@tromey.com>
5249
5250 * fbsd-nat.c (fbsd_find_memory_regions): Update.
5251
ed166945
TT
52522017-08-03 Tom Tromey <tom@tromey.com>
5253
5254 * cli/cli-cmds.c (find_and_open_script): Change return type.
5255 Remove "streamp" and "full_path" parameters.
5256 (source_script_with_search): Update.
5257 * auto-load.c (source_script_file): Update.
5258 * cli/cli-cmds.h (find_and_open_script): Change type.
5259 (open_script): New struct.
5260
d419f42d
TT
52612017-08-03 Tom Tromey <tom@tromey.com>
5262
5263 * xml-support.c (xml_fetch_content_from_file): Update.
5264 * ui-file.c (stdio_file::open): Update.
5265 * tracefile-tfile.c (tfile_start): Update.
5266 * remote.c (remote_file_put, remote_file_get): Update.
5267 * nat/linux-procfs.c (linux_proc_get_int)
5268 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5269 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5270 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5271 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5272 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5273 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5274 * linux-nat.c (linux_proc_pending_signals): Update.
5275 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5276 (file_closer): Remove.
5277 * compile/compile.c (compile_to_object): Update.
5278 * common/filestuff.h (struct gdb_file_deleter): New.
5279 (gdb_file_up): New typedef.
5280 (gdb_fopen_cloexec): Change return type.
5281 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5282 * cli/cli-dump.c (fopen_with_cleanup): Remove.
5283 (dump_binary_file, restore_binary_file): Update.
5284 * auto-load.c (auto_load_objfile_script_1): Update.
5285
4a2b031d
TT
52862017-08-03 Tom Tromey <tom@tromey.com>
5287
5288 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5289 (info_static_tracepoint_markers_command): Likewise.
5290 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5291 * skip.c (skip_info): Use ui_out_emit_table.
5292 * progspace.c (print_program_space): Use ui_out_emit_table.
5293 * osdata.c (info_osdata): Use ui_out_emit_table.
5294 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5295 ui_out_emit_table.
5296 * linux-thread-db.c (info_auto_load_libthread_db): Use
5297 ui_out_emit_table.
5298 * inferior.c (print_inferior): Use ui_out_emit_table.
5299 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5300 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5301 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5302 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5303 * ui-out.h (class ui_out_emit_table): New.
5304
a4f320fd
MR
53052017-08-02 Maciej W. Rozycki <macro@imgtec.com>
5306
5307 * mips-tdep.c (mips_fpu_type_str): New function.
5308 (mips_dump_tdep): Call it.
5309
a2f1f308
MR
53102017-08-01 Maciej W. Rozycki <macro@imgtec.com>
5311
5312 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5313 `->mips_fpu_type'.
5314
7e5ed83b
XR
53152017-07-31 Xavier Roirand <roirand@adacore.com>
5316
5317 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5318
4c9dc811
XR
53192017-07-27 Xavier Roirand <roirand@adacore.com>
5320
5321 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5322
27d41eac
YQ
53232017-07-26 Yao Qi <yao.qi@linaro.org>
5324
5325 * cli/cli-cmds.c (maintenancechecklist): New variable.
5326 * gdbcmd.h (maintenancechecklist): Declare it.
5327 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5328 Call i386_linux_read_description with different masks.
5329 * maint.c (maintenance_check_command): New function.
5330 (_initialize_maint_cmds): Call add_prefix_cmd.
5331 * target-descriptions.c (tdesc_reg): override operator != and ==.
5332 (tdesc_type): Likewise.
5333 (tdesc_feature): Likewise.
5334 (target_desc): Likewise.
5335 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5336 (maintenance_check_xml_descriptions): New function.
5337 (_initialize_target_descriptions) Add command "xml-descriptions".
5338 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5339
ea03d0d3
YQ
53402017-07-26 Yao Qi <yao.qi@linaro.org>
5341
5342 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5343 Include features/i386/32bit-*.c.
5344 (i386_linux_read_description): Generate target description if it
5345 doesn't exist.
5346 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5347 functions.
5348 * features/i386/32bit-linux.c: Re-generated.
5349 * features/i386/32bit-sse.c: Likewise.
5350 * target-descriptions.c (print_c_feature::visit): Print code to
5351 set register number if needed.
5352 (print_c_feature) <m_next_regnum>: New field.
5353
25aa13e5
YQ
53542017-07-26 Yao Qi <yao.qi@linaro.org>
5355
5356 * features/Makefile (CFILES): Rename with TDESC_CFILES.
5357 (FEATURE_XMLFILES): New.
5358 (FEATURE_CFILES): New.
5359 New rules.
5360 (clean-cfiles): Remove generated c files.
5361 * features/i386/32bit-avx.c: Generated.
5362 * features/i386/32bit-avx512.c: Generated.
5363 * features/i386/32bit-core.c: Generated.
5364 * features/i386/32bit-linux.c: Generated.
5365 * features/i386/32bit-mpx.c: Generated.
5366 * features/i386/32bit-pkeys.c: Generated.
5367 * features/i386/32bit-sse.c: Generated.
5368 * target-descriptions.c: Include algorithm.
5369 (tdesc_element_visitor): Add method visit_end.
5370 (print_c_tdesc): Implement visit_end.
5371 (print_c_tdesc:: m_filename_after_features): Move it to
5372 protected.
5373 (print_c_feature): New class.
5374 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5375 name starts with "i386/32bit-".
5376
6eb1e6a8
YQ
53772017-07-26 Yao Qi <yao.qi@linaro.org>
5378
5379 * target-descriptions.c (tdesc_element_visitor): New class.
5380 (tdesc_element): New class.
5381 (tdesc_reg): Inherit from tdesc_element.
5382 (tdesc_reg::accept): New function.
5383 (tdesc_type): Inherit from tdesc_element.
5384 (tdesc_type::accept): New function.
5385 (tdesc_feature): Inherit from tdesc_element.
5386 (tdesc_feature::accept): New function.
5387 (target_desc): Inherit from tdesc_element.
5388 (target_desc::target_desc): New.
5389 (target_desc::~target_desc): New.
5390 (target_desc::accept): New.
5391 (allocate_target_description): Use new.
5392 (free_target_description): Use delete.
5393 (print_c_tdesc): New class.
5394 (maint_print_c_tdesc_cmd): Adjust.
5395
5396 * features/aarch64.c: Re-generated.
5397 * features/arc-arcompact.c: Re-generated.
5398 * features/arc-v2.c: Re-generated.
5399 * features/arm/arm-with-iwmmxt.c: Re-generated.
5400 * features/arm/arm-with-m.c: Re-generated.
5401 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5402 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5403 * features/arm/arm-with-neon.c: Re-generated.
5404 * features/arm/arm-with-vfpv2.c: Re-generated.
5405 * features/arm/arm-with-vfpv3.c: Re-generated.
5406 * features/i386/amd64-avx-avx512.c: Re-generated.
5407 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5408 * features/i386/amd64-avx.c: Re-generated.
5409 * features/i386/amd64-avx-linux.c: Re-generated.
5410 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5411 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5412 * features/i386/amd64-avx-mpx.c: Re-generated.
5413 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5414 * features/i386/amd64.c: Re-generated.
5415 * features/i386/amd64-linux.c: Re-generated.
5416 * features/i386/amd64-mpx.c: Re-generated.
5417 * features/i386/amd64-mpx-linux.c: Re-generated.
5418 * features/i386/i386-avx-avx512.c: Re-generated.
5419 * features/i386/i386-avx-avx512-linux.c: Re-generated.
5420 * features/i386/i386-avx.c: Re-generated.
5421 * features/i386/i386-avx-linux.c: Re-generated.
5422 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5423 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5424 * features/i386/i386-avx-mpx.c: Re-generated.
5425 * features/i386/i386-avx-mpx-linux.c: Re-generated.
5426 * features/i386/i386.c: Re-generated.
5427 * features/i386/i386-linux.c: Re-generated.
5428 * features/i386/i386-mmx.c: Re-generated.
5429 * features/i386/i386-mmx-linux.c: Re-generated.
5430 * features/i386/i386-mpx.c: Re-generated.
5431 * features/i386/i386-mpx-linux.c: Re-generated.
5432 * features/i386/x32-avx-avx512.c: Re-generated.
5433 * features/i386/x32-avx-avx512-linux.c: Re-generated.
5434 * features/i386/x32-avx.c: Re-generated.
5435 * features/i386/x32-avx-linux.c: Re-generated.
5436 * features/i386/x32.c: Re-generated.
5437 * features/i386/x32-linux.c: Re-generated.
5438 * features/microblaze.c: Re-generated.
5439 * features/microblaze-with-stack-protect.c: Re-generated.
5440 * features/mips64-dsp-linux.c: Re-generated.
5441 * features/mips64-linux.c: Re-generated.
5442 * features/mips-dsp-linux.c: Re-generated.
5443 * features/mips-linux.c: Re-generated.
5444 * features/nds32.c: Re-generated.
5445 * features/nios2.c: Re-generated.
5446 * features/nios2-linux.c: Re-generated.
5447 * features/rs6000/powerpc-32.c: Re-generated.
5448 * features/rs6000/powerpc-32l.c: Re-generated.
5449 * features/rs6000/powerpc-403.c: Re-generated.
5450 * features/rs6000/powerpc-403gc.c : Re-generated.
5451 * features/rs6000/powerpc-405.c: Re-generated.
5452 * features/rs6000/powerpc-505.c: Re-generated.
5453 * features/rs6000/powerpc-601.c: Re-generated.
5454 * features/rs6000/powerpc-602.c: Re-generated.
5455 * features/rs6000/powerpc-603.c: Re-generated.
5456 * features/rs6000/powerpc-604.c: Re-generated.
5457 * features/rs6000/powerpc-64.c: Re-generated.
5458 * features/rs6000/powerpc-64l.c: Re-generated.
5459 * features/rs6000/powerpc-7400.c: Re-generated.
5460 * features/rs6000/powerpc-750.c: Re-generated.
5461 * features/rs6000/powerpc-860.c: Re-generated.
5462 * features/rs6000/powerpc-altivec32.c: Re-generated.
5463 * features/rs6000/powerpc-altivec32l.c: Re-generated.
5464 * features/rs6000/powerpc-altivec64.c: Re-generated.
5465 * features/rs6000/powerpc-altivec64l.c: Re-generated.
5466 * features/rs6000/powerpc-cell32l.c: Re-generated.
5467 * features/rs6000/powerpc-cell64l.c: Re-generated.
5468 * features/rs6000/powerpc-e500.c: Re-generated.
5469 * features/rs6000/powerpc-e500l.c: Re-generated.
5470 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5471 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5472 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5473 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5474 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5475 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5476 * features/rs6000/powerpc-vsx32.c: Re-generated.
5477 * features/rs6000/powerpc-vsx32l.c: Re-generated.
5478 * features/rs6000/powerpc-vsx64.c: Re-generated.
5479 * features/rs6000/powerpc-vsx64l.c: Re-generated.
5480 * features/rs6000/rs6000.c: Re-generated.
5481 * features/s390-linux32.c: Re-generated.
5482 * features/s390-linux32v1.c: Re-generated.
5483 * features/s390-linux32v2.c: Re-generated.
5484 * features/s390-linux64.c: Re-generated.
5485 * features/s390-linux64v1.c: Re-generated.
5486 * features/s390-linux64v2.c: Re-generated.
5487 * features/s390-te-linux64.c: Re-generated.
5488 * features/s390-tevx-linux64.c: Re-generated.
5489 * features/s390-vx-linux64.c: Re-generated.
5490 * features/s390x-linux64.c: Re-generated.
5491 * features/s390x-linux64v1.c: Re-generated.
5492 * features/s390x-linux64v2.c: Re-generated.
5493 * features/s390x-te-linux64.c: Re-generated.
5494 * features/s390x-tevx-linux64.c: Re-generated.
5495 * features/s390x-vx-linux64.c: Re-generated.
5496 * features/sparc/sparc32-solaris.c: Re-generated.
5497 * features/sparc/sparc64-solaris.c: Re-generated.
5498 * features/tic6x-c62x.c: Re-generated.
5499 * features/tic6x-c62x-linux.c: Re-generated.
5500 * features/tic6x-c64x.c: Re-generated.
5501 * features/tic6x-c64x-linux.c: Re-generated.
5502 * features/tic6x-c64xp.c: Re-generated.
5503 * features/tic6x-c64xp-linux.c: Re-generated.
5504
35b4818d
YQ
55052017-07-26 Yao Qi <yao.qi@linaro.org>
5506
5507 * i386-linux-tdep.c (i386_linux_read_description): New function.
5508 (i386_linux_core_read_description): Call
5509 i386_linux_read_description.
5510 * i386-linux-tdep.h (i386_linux_read_description): Declare.
5511 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5512 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5513 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5514 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5515 * x86-linux-nat.c (x86_linux_read_description): Call
5516 i386_linux_read_description.
5517
8e2141c6
YQ
55182017-07-26 Yao Qi <yao.qi@linaro.org>
5519
5520 * NEWS: Mention it.
5521 * features/Makefile (%.c: %.xml): Pass the xml file name to
5522 command "maint print c-tdesc".
5523 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5524 name from 'arg'.
5525
b468ff4c
YQ
55262017-07-26 Yao Qi <yao.qi@linaro.org>
5527
5528 * target-descriptions.c (target_desc): Add ctor and dtor. Do
5529 in-class initialization.
5530 (tdesc_create_feature): Call new instead of XCNEW.
5531 (free_target_description): Ue delete.
5532
b9c0e1b4
JB
55332017-07-25 John Baldwin <jhb@FreeBSD.org>
5534
5535 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5536
a04b5337
YQ
55372017-07-25 Yao Qi <yao.qi@linaro.org>
5538
5539 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5540 constant.
5541 (amd64_x32_init_abi): Likewise.
5542 * amd64-tdep.h (amd64_init_abi): Update declaration.
5543 (amd64_x32_init_abi): Likewise.
5544
02ad7fc2
YQ
55452017-07-25 Yao Qi <yao.qi@linaro.org>
5546
5547 PR tdep/21717
5548 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5549 condition for FPSCR.
5550 (arm_linux_store_inferior_registers): Likewise.
5551
b6f48cb0
TT
55522017-07-22 Tom Tromey <tom@tromey.com>
5553
5554 * break-catch-syscall.c (struct catch_syscall_inferior_data)
5555 <syscalls_counts>: Now a std::vector.
5556 (get_catch_syscall_inferior_data): Use "new".
5557 (catch_syscall_inferior_data_cleanup): Use "delete".
5558 (insert_catch_syscall, remove_catch_syscall)
5559 (clear_syscall_counts): Update.
5560
e12c9b7a
TT
55612017-07-22 Tom Tromey <tom@tromey.com>
5562
5563 * break-catch-syscall.c (syscall_catchpoint)
5564 <syscalls_to_be_caught>: Now a std::vector<int>
5565 (~syscall_catchpoint): Remove.
5566 (insert_catch_syscall, remove_catch_syscall)
5567 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5568 (print_mention_catch_syscall, print_recreate_catch_syscall):
5569 Update.
5570 (create_syscall_event_catchpoint): Change type of "filter"
5571 parameter.
5572 (catch_syscall_split_args): Return a std::vector.
5573 (catch_syscall_command_1, catching_syscall_number_1): Update.
5574
4fa8aeac
TT
55752017-07-22 Tom Tromey <tom@tromey.com>
5576
5577 * break-catch-throw.c (struct exception_catchpoint)
5578 <exception_rx>: Now a std::string.
5579 (~exception_catchpoint): Remove.
5580 (print_one_detail_exception_catchpoint): Update.
5581 (handle_gnu_v3_exceptions): Change type of except_rx.
5582 (extract_exception_regexp): Return a std::string.
5583 (catch_exception_command_1): Update.
5584
f746a154
TT
55852017-07-22 Tom Tromey <tom@tromey.com>
5586
5587 * break-catch-sig.c (gdb_signal_type): Remove typedef.
5588 (struct signal_catchpoint) <signals_to_be_caught>: Now a
5589 std::vector.
5590 <catch_all>: Now a bool.
5591 (~signal_catchpoint): Remove.
5592 (signal_catchpoint_insert_location)
5593 (signal_catchpoint_remove_location)
5594 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5595 (signal_catchpoint_print_mention)
5596 (signal_catchpoint_print_recreate)
5597 (signal_catchpoint_explains_signal): Update.
5598 (create_signal_catchpoint): Change type of "filter" and
5599 "catch_all".
5600 (catch_signal_split_args): Return a std::vector. Change type of
5601 "catch_all".
5602 (catch_signal_command): Update.
5603
47e77640
PA
56042017-07-20 Pedro Alves <palves@redhat.com>
5605
5606 * ada-lang.c (ada_language_defn): Make extern.
5607 (_initialize_ada_language): Remove add_language call.
5608 * c-lang.c (c_language_defn, cplus_language_defn)
5609 (asm_language_defn, minimal_language_defn): Make extern.
5610 (_initialize_c_language): Delete.
5611 * completer.c (compare_cstrings): Delete, moved to utils.h.
5612 * d-lang.c (d_language_defn): Make extern.
5613 (_initialize_d_language): Remove add_language calls.
5614 * defs.h (enum language): Add comment.
5615 * f-lang.c (f_language_defn): Make extern.
5616 (_initialize_f_language): Remove add_language call.
5617 * go-lang.c (go_language_defn): Make extern.
5618 (_initialize_go_language): Remove add_language call.
5619 * language.c: Include <algorithm>.
5620 (languages): Redefine as const array.
5621 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5622 (set_language_command): Handle "local". Use for-range loop.
5623 (set_language): Remove loop.
5624 (language_enum): Rewrite.
5625 (language_def, language_str): Remove loops.
5626 (add_language): Delete.
5627 (add_set_language_command): New, based on add_languages.
5628 (skip_language_trampoline): Adjust.
5629 (local_language_defn): Delete.
5630 (language_gdbarch_post_init): Adjust.
5631 (_initialize_language): Remove add_language calls. Call
5632 add_set_language_command.
5633 * language.h (add_language): Delete.
5634 (auto_language_defn)
5635 (unknown_language_defn, minimal_language_defn, ada_language_defn)
5636 (asm_language_defn, c_language_defn, cplus_language_defn)
5637 (d_language_defn, f_language_defn, go_language_defn)
5638 (m2_language_defn, objc_language_defn, opencl_language_defn)
5639 (pascal_language_defn, rust_language_defn): Declare.
5640 * m2-lang.c (m2_language_defn): Make extern.
5641 (_initialize_m2_language): Remove add_language call.
5642 * objc-lang.c (objc_language_defn): Make extern.
5643 (_initialize_objc_language): Remove add_language call.
5644 * opencl-lang.c (opencl_language_defn): Make extern.
5645 (_initialize_opencl_language): Remove add_language call.
5646 * p-lang.c (pascal_language_defn): Make extern.
5647 (_initialize_pascal_language): Delete.
5648 * rust-lang.c (rust_language_defn): Make extern.
5649 (_initialize_rust_language): Delete.
5650 * utils.h (compare_cstrings): New static inline function.
5651
edb0c9cb
PA
56522017-07-20 Pedro Alves <palves@redhat.com>
5653
5654 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5655 (get_var_value): Constify parameters.
5656 (get_int_var_value): Change prototype.
5657 (to_fixed_range_type): Adjust.
5658 * ada-lang.h (get_int_var_value): Change prototype.
5659
a778f165
PA
56602017-07-20 Pedro Alves <palves@redhat.com>
5661
5662 * dwarf2read.c (dw2_lookup_symbol): Use
5663 SYMBOL_MATCHES_SEARCH_NAME.
5664 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5665
42edd901
PA
56662017-07-20 Pedro Alves <palves@redhat.com>
5667
5668 * block.c (block_iter_name_step, block_iter_name_first)
5669 (block_iter_name_next): Delete.
5670 (block_lookup_symbol_primary): Adjust to use
5671 dict_iter_match_first/dict_iter_match_next.
5672 * block.h (block_iter_name_first, block_iter_name_next): Delete
5673 declarations.
5674 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5675 dict_iter_match_first/dict_iter_match_next.
5676
cf325299
PA
56772017-07-20 Pedro Alves <palves@redhat.com>
5678
5679 * cp-support.c (cp_find_first_component_aux): Add missing case for
5680 end of string.
5681
c5ed0576
DB
56822017-07-18 David Blaikie <dblaikie@gmail.com>
5683
5684 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5685 of dwo_cu's dwo_file.
5686
27841e76
YQ
56872017-07-18 Yao Qi <yao.qi@linaro.org>
5688
5689 * remote.c (store_registers_using_G): Remove one line comment.
5690
cfb7e58b
YQ
56912017-07-18 Yao Qi <yao.qi@linaro.org>
5692
5693 * regcache.c (regcache_cpy): Simplify it.
5694 (regcache::cpy_no_passthrough): Remove it.
5695 * regcache.h (cpy_no_passthrough): Remove it.
5696 (regcache_dup, regcache_cpy): Update comments.
5697
386535dd
PA
56982017-07-18 Pedro Alves <palves@redhat.com>
5699
5700 * remote-sim.c (sim_command_completer): Adjust to work with a
5701 completion_tracker instead of a VEC.
5702
c45ec17c
PA
57032017-07-17 Pedro Alves <palves@redhat.com>
5704
5705 * completer.c (complete_source_filenames): New function.
5706 (complete_address_and_linespec_locations): New function.
5707 (location_completer): Use complete_address_and_linespec_locations.
5708 (completion_tracker::build_completion_result): Honor the tracker's
5709 request to suppress append.
5710 * completer.h (completion_tracker::suppress_append_ws)
5711 (completion_tracker::set_suppress_append_ws): New methods.
5712 (completion_tracker::m_suppress_append_ws): New field.
5713 (complete_source_filenames): New declaration.
5714 * linespec.c (linespec_complete_what): New.
5715 (struct ls_parser) <complete_what, completion_word,
5716 completion_quote_char, completion_quote_end, completion_tracker>:
5717 New fields.
5718 (string_find_incomplete_keyword_at_end): New.
5719 (linespec_lexer_lex_string): Record quote char. If in completion
5720 mode, don't throw.
5721 (linespec_lexer_consume_token): Advance the completion word point.
5722 (linespec_lexer_peek_token): Save/restore completion info.
5723 (save_stream_and_consume_token): New.
5724 (set_completion_after_number): New.
5725 (linespec_parse_basic): Set what to complete next depending on
5726 token. Handle function and label completions specially.
5727 (parse_linespec): Disable objc shortcut in completion mode. Set
5728 what to complete next depending on token type. Skip keyword if in
5729 completion mode.
5730 (complete_linespec_component, linespec_complete): New.
5731 * linespec.h (linespec_complete): Declare.
5732
be966d42
PA
57332017-07-17 Pedro Alves <palves@redhat.com>
5734
5735 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5736 Handle 'operator<' / 'operator<<'.
5737
a2459270
PA
57382017-07-17 Pedro Alves <palves@redhat.com>
5739
5740 * completer.c (collect_explicit_location_matches): Handle
5741 MATCH_LABEL.
5742 (convert_explicit_location_to_linespec): New, factored out from
5743 ...
5744 (convert_explicit_location_to_sals): ... this.
5745 (complete_label): New.
5746 (linespec_complete_label, find_label_symbols_in_block): New.
5747 (find_label_symbols): Add completion_mode parameter and adjust to
5748 call find_label_symbols_in_block.
5749 * linespec.h (linespec_complete_label): Declare.
5750
c6756f62
PA
57512017-07-17 Pedro Alves <palves@redhat.com>
5752
5753 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5754 complete_symbol_mode parameter.
5755 * cli/cli-cmds.c (complete_command): Get the completion result out
5756 of the handle_brkchars tracker if used a custom word point.
5757 * completer.c: Include "linespec.h".
5758 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5759 (advance_to_expression_complete_word_point): New.
5760 (completion_tracker::completes_to_completion_word): New.
5761 (complete_files_symbols): Pass down
5762 complete_symbol_mode::EXPRESSION.
5763 (explicit_options, probe_options): New.
5764 (collect_explicit_location_matches): Complete on the
5765 explictit_loc->foo instead of word. Use
5766 linespec_complete_function. Handle MATCH_LINE. Handle offering
5767 keyword and options completions.
5768 (backup_text_ptr): Delete.
5769 (skip_keyword): New.
5770 (complete_explicit_location): Remove 'word' parameter. Add
5771 language, quoted_arg_start and quoted_arg_end parameters.
5772 Rewrite, parsing left to right.
5773 (location_completer): Rewrite.
5774 (location_completer_handle_brkchars): New function.
5775 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5776 (enum complete_line_internal_reason): Adjust comments.
5777 (completion_tracker::discard_completions): New.
5778 (completer_handle_brkchars_func_for_completer): Handle
5779 location_completer.
5780 (gdb_custom_word_point_brkchars)
5781 (gdb_org_rl_basic_quote_characters): New.
5782 (gdb_completion_word_break_characters_throw)
5783 (completion_find_completion_word): Handle trackers that use a
5784 custom word point.
5785 (completion_tracker::advance_custom_word_point_by): New.
5786 (completion_tracker::build_completion_result): Don't rely on
5787 readline appending the quote char.
5788 (gdb_rl_attempted_completion_function_throw): Handle trackers that
5789 use a custom word point.
5790 (gdb_rl_attempted_completion_function): Restore
5791 rl_basic_quote_characters.
5792 * completer.h (class completion_tracker): Extend intro comment.
5793 (completion_tracker::set_quote_char)
5794 (completion_tracker::quote_char)
5795 (completion_tracker::set_use_custom_word_point)
5796 (completion_tracker::use_custom_word_point)
5797 (completion_tracker::custom_word_point)
5798 (completion_tracker::set_custom_word_point)
5799 (completion_tracker::advance_custom_word_point_by)
5800 (completion_tracker::completes_to_completion_word)
5801 (completion_tracker::discard_completions): New methods.
5802 (completion_tracker::m_quote_char)
5803 (completion_tracker::m_use_custom_word_point)
5804 (completion_tracker::m_custom_word_point): New fields.
5805 (advance_to_expression_complete_word_point): Declare.
5806 * f-lang.c (f_collect_symbol_completion_matches): Add
5807 complete_symbol_mode parameter.
5808 * language.h (struct language_defn)
5809 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5810 parameter.
5811 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
5812 (linespec_complete_function): New function.
5813 (linespec_lexer_lex_keyword): Adjust.
5814 * linespec.h (linespec_keywords, linespec_complete_function): New
5815 declarations.
5816 * location.c (find_end_quote): New function.
5817 (explicit_location_lex_one): Add explicit_completion_info
5818 parameter. Save quoting info. Don't throw if being called for
5819 completion. Don't handle Ada operators here.
5820 (is_cp_operator, skip_op_false_positives, first_of)
5821 (explicit_location_lex_one_function): New function.
5822 (string_to_explicit_location): Replace 'dont_throw' parameter with
5823 an explicit_completion_info pointer parameter. Handle it. Don't
5824 use explicit_location_lex_one to lex function names. Use
5825 explicit_location_lex_one_function instead.
5826 * location.h (struct explicit_completion_info): New.
5827 (string_to_explicit_location): Replace 'dont_throw' parameter with
5828 an explicit_completion_info pointer parameter.
5829 * symtab.c (default_collect_symbol_completion_matches_break_on):
5830 Add complete_symbol_mode parameter. Handle LINESPEC mode.
5831 (default_collect_symbol_completion_matches)
5832 (collect_symbol_completion_matches): Add complete_symbol_mode
5833 parameter.
5834 (collect_symbol_completion_matches_type): Pass down
5835 complete_symbol_mode::EXPRESSION.
5836 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5837 parameter. Handle LINESPEC mode.
5838 * symtab.h (complete_symbol_mode): New.
5839 (default_collect_symbol_completion_matches_break_on)
5840 (default_collect_symbol_completion_matches)
5841 (collect_symbol_completion_matches)
5842 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5843 parameter.
5844
1d550c82
PA
58452017-07-17 Pedro Alves <palves@redhat.com>
5846
5847 * utils.c (enum class strncmp_iw_mode): New.
5848 (strcmp_iw): Rename to ...
5849 (strncmp_iw_with_mode): ... this. Add string2_len and mode
5850 parameters. Handle them.
5851 (strncmp_iw): New.
5852 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5853 * utils.h (strncmp_iw): Declare.
5854 (strcmp_iw): Move describing comments here.
5855
8090b426
PA
58562017-07-17 Pedro Alves <palves@redhat.com>
5857
5858 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5859 CP_OPERATOR_STR.
5860 * c-typeprint.c (is_type_conversion_operator): Use
5861 CP_OPERATOR_STR.
5862 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5863 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5864 CP_OPERATOR_LEN.
5865 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5866 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5867 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5868 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5869 CP_OPERATOR_STR.
5870 * location.c: Include "cp-support.h".
5871 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5872 CP_OPERATOR_STR.
5873 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5874 CP_OPERATOR_LEN.
5875
6a2c1b87
PA
58762017-07-17 Pedro Alves <palves@redhat.com>
5877
5878 * cli/cli-cmds.c (complete_command): Use a completion tracker
5879 along with completion_find_completion_word for handle_brkchars
5880 phase.
5881 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5882 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5883 (struct gdb_rl_completion_word_info): New.
5884 (gdb_rl_find_completion_word): New.
5885 (completion_find_completion_word): New.
5886 * completer.h (completion_find_completion_word): Declare.
5887
eb3ff9a5
PA
58882017-07-17 Pedro Alves <palves@redhat.com>
5889
5890 * ada-lang.c (symbol_completion_match): Adjust comments.
5891 (symbol_completion_add): Replace vector parameter with
5892 completion_tracker parameter. Use it.
5893 (ada_make_symbol_completion_list): Rename to...
5894 (ada_collect_symbol_completion_matches): ... this. Add
5895 completion_tracker parameter and use it.
5896 (ada_language_defn): Adjust.
5897 * break-catch-syscall.c (catch_syscall_completer): Adjust
5898 prototype and work with completion_tracker instead of VEC.
5899 * breakpoint.c (condition_completer): Adjust prototype and work
5900 with completion_tracker instead of VEC.
5901 * c-lang.c (c_language_defn, cplus_language_defn)
5902 (asm_language_defn, minimal_language_defn): Adjust to renames.
5903 * cli/cli-cmds.c (complete_command): Rework using
5904 completion_tracker. Catch exceptions when completing.
5905 * cli/cli-decode.c (integer_unlimited_completer)
5906 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5907 with completion_tracker instead of VEC.
5908 * command.h (struct completion_tracker): Forward declare.
5909 (completer_ftype, completer_handle_brkchars_ftype): Change
5910 types.
5911 (complete_on_cmdlist, complete_on_enum): Adjust.
5912 * completer.c: Include <algorithm>.
5913 (struct gdb_completer_state): New.
5914 (current_completion): New global.
5915 (readline_line_completion_function): Delete.
5916 (noop_completer, filename_completer)
5917 (filename_completer_handle_brkchars, complete_files_symbols)
5918 (linespec_location_completer): Adjust to work with a
5919 completion_tracker instead of a VEC.
5920 (string_or_empty): New.
5921 (collect_explicit_location_matches): Adjust to work with a
5922 completion_tracker instead of a VEC.
5923 (explicit_location_completer): Rename to ...
5924 (complete_explicit_location): ... this and adjust to work with a
5925 completion_tracker instead of a VEC.
5926 (location_completer): Adjust to work with a completion_tracker
5927 instead of a VEC.
5928 (add_struct_fields): Adjust to work with a completion_list instead
5929 of VEC.
5930 (expression_completer): Rename to ...
5931 (complete_expression): ... this and adjust to work with a
5932 completion_tracker instead of a VEC. Use complete_files_symbols.
5933 (expression_completer): Reimplement on top of complete_expression.
5934 (symbol_completer): Adjust to work with a completion_tracker
5935 instead of a VEC.
5936 (enum complete_line_internal_reason): Add describing comments.
5937 (complete_line_internal_normal_command): Adjust to work with a
5938 completion_tracker instead of a VEC.
5939 (complete_line_internal): Rename to ...
5940 (complete_line_internal_1): ... this and adjust to work with a
5941 completion_tracker instead of a VEC. Assert TEXT is NULL in the
5942 handle_brkchars phase.
5943 (new_completion_tracker): Delete.
5944 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5945 complete_line_internal_1.
5946 (free_completion_tracker): Delete.
5947 (INITIAL_COMPLETION_HTAB_SIZE): New.
5948 (completion_tracker::completion_tracker)
5949 (completion_tracker::~completion_tracker): New.
5950 (maybe_add_completion): Delete.
5951 (completion_tracker::maybe_add_completion)
5952 (completion_tracker::add_completion)
5953 (completion_tracker::add_completions): New.
5954 (throw_max_completions_reached_error): Delete.
5955 (complete_line): Adjust to work with a completion_tracker instead
5956 of a VEC. Don't create a completion_tracker_t or check for max
5957 completions here.
5958 (command_completer, command_completer_handle_brkchars)
5959 (signal_completer, reg_or_group_completer_1)
5960 (reg_or_group_completer, default_completer_handle_brkchars):
5961 Adjust to work with a completion_tracker.
5962 (gdb_completion_word_break_characters_throw): New.
5963 (gdb_completion_word_break_characters): Reimplement.
5964 (line_completion_function): Delete.
5965 (completion_tracker::recompute_lowest_common_denominator)
5966 (expand_preserving_ws)
5967 (completion_tracker::build_completion_result)
5968 (completion_result::completion_result)
5969 (completion_result::completion_result)
5970 (completion_result::~completion_result)
5971 (completion_result::completion_result)
5972 (completion_result::release_match_list, compare_cstrings)
5973 (completion_result::sort_match_list)
5974 (completion_result::reset_match_list)
5975 (gdb_rl_attempted_completion_function_throw)
5976 (gdb_rl_attempted_completion_function): New.
5977 * completer.h (completion_list, struct completion_result)
5978 (class completion_tracker): New.
5979 (complete_line): Add completion_tracker parameter.
5980 (readline_line_completion_function): Delete.
5981 (gdb_rl_attempted_completion_function): New.
5982 (noop_completer, filename_completer, expression_completer)
5983 (location_completer, symbol_completer, command_completer)
5984 (signal_completer, reg_or_group_completer): Update prototypes.
5985 (completion_tracker_t, new_completion_tracker)
5986 (make_cleanup_free_completion_tracker): Delete.
5987 (enum maybe_add_completion_enum): Delete.
5988 (maybe_add_completion): Delete.
5989 (throw_max_completions_reached_error): Delete.
5990 * corefile.c (complete_set_gnutarget): Adjust to work with a
5991 completion_tracker instead of a VEC.
5992 * cp-abi.c (cp_abi_completer): Adjust to work with a
5993 completion_tracker instead of a VEC.
5994 * d-lang.c (d_language_defn): Adjust.
5995 * disasm.c (disassembler_options_completer): Adjust to work with a
5996 completion_tracker instead of a VEC.
5997 * f-lang.c (f_make_symbol_completion_list): Rename to ...
5998 (f_collect_symbol_completion_matches): ... this. Adjust to work
5999 with a completion_tracker instead of a VEC.
6000 (f_language_defn): Adjust.
6001 * go-lang.c (go_language_defn): Adjust.
6002 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6003 Adjust to work with a completion_tracker instead of a VEC.
6004 * infrun.c (handle_completer): Likewise.
6005 * interps.c (interpreter_completer): Likewise.
6006 * interps.h (interpreter_completer): Likewise.
6007 * language.c (unknown_language_defn, auto_language_defn)
6008 (local_language_defn): Adjust.
6009 * language.h (language_defn::la_make_symbol_completion_list):
6010 Rename to ...
6011 (language_defn::la_collect_symbol_completion_matches): ... this
6012 and adjust to work with a completion_tracker instead of a VEC.
6013 * m2-lang.c (m2_language_defn): Adjust.
6014 * objc-lang.c (objc_language_defn): Adjust.
6015 * opencl-lang.c (opencl_language_defn): Adjust.
6016 * p-lang.c (pascal_language_defn): Adjust.
6017 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6018 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6019 with a completion_tracker.
6020 * rust-lang.c (rust_language_defn): Adjust.
6021 * symtab.c (free_completion_list, do_free_completion_list)
6022 (return_val, completion_tracker): Delete.
6023 (completion_list_add_name, completion_list_add_symbol)
6024 (completion_list_add_msymbol, completion_list_objc_symbol)
6025 (completion_list_add_fields, add_symtab_completions): Add
6026 completion_tracker parameter and use it.
6027 (default_make_symbol_completion_list_break_on_1): Rename to...
6028 (default_collect_symbol_completion_matches_break_on): ... this.
6029 Add completion_tracker parameter and use it instead of allocating
6030 a completion tracker here.
6031 (default_make_symbol_completion_list_break_on): Delete old
6032 implementation.
6033 (default_make_symbol_completion_list): Delete.
6034 (default_collect_symbol_completion_matches): New.
6035 (make_symbol_completion_list): Delete.
6036 (collect_symbol_completion_matches): New.
6037 (make_symbol_completion_type): Rename to ...
6038 (collect_symbol_completion_matches_type): ... this. Add
6039 completion_tracker parameter and use it instead of VEC.
6040 (make_file_symbol_completion_list_1): Rename to...
6041 (collect_file_symbol_completion_matches): ... this. Add
6042 completion_tracker parameter and use it instead of VEC.
6043 (make_file_symbol_completion_list): Delete.
6044 (add_filename_to_list): Use completion_list instead of a VEC.
6045 (add_partial_filename_data::list): Now a completion_list.
6046 (make_source_files_completion_list): Work with a completion_list
6047 instead of a VEC.
6048 * symtab.h: Include "completer.h".
6049 (default_make_symbol_completion_list_break_on)
6050 (default_make_symbol_completion_list, make_symbol_completion_list)
6051 (make_symbol_completion_type, make_file_symbol_completion_list)
6052 (make_source_files_completion_list): Delete.
6053 (default_collect_symbol_completion_matches_break_on)
6054 (default_collect_symbol_completion_matches)
6055 (collect_symbol_completion_matches)
6056 (collect_symbol_completion_matches_type)
6057 (collect_file_symbol_completion_matches)
6058 (make_source_files_completion_list): New.
6059 * top.c (init_main): Don't install a rl_completion_entry_function
6060 hook. Install a rl_attempted_completion_function hook instead.
6061 * tui/tui-layout.c (layout_completer): Adjust to work with a
6062 completion_tracker.
6063 * tui/tui-regs.c (tui_reggroup_completer):
6064 * tui/tui-win.c (window_name_completer, focus_completer)
6065 (winheight_completer): Adjust to work with a completion_tracker.
6066 * value.c: Include "completer.h".
6067 (complete_internalvar): Adjust to work with a completion_tracker.
6068 * value.h (complete_internalvar): Likewise.
6069
6e1dbf8c
PA
60702017-07-17 Pedro Alves <palves@redhat.com>
6071
6072 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6073 renames.
6074 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6075 comments to completer_ftype's declaration.
6076 <completer_handle_brkchars>: Change type to
6077 completer_handle_brkchars_ftype.
6078 * command.h (completer_ftype): Add describing comment and give
6079 names to parameters.
6080 (completer_ftype_void): Rename to ...
6081 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6082 (set_cmd_completer_handle_brkchars): Adjust.
6083 * completer.c (filename_completer_handle_brkchars): New function.
6084 (complete_line_internal_normal_command): New function, factored
6085 out from ...
6086 (complete_line_internal): ... here.
6087 (command_completer_handle_brkchars)
6088 (default_completer_handle_brkchars)
6089 (completer_handle_brkchars_func_for_completer): New functions.
6090 * completer.h (set_gdb_completion_word_break_characters): Delete
6091 declaration.
6092 (completer_handle_brkchars_func_for_completer): New declaration.
6093 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6094 completer_handle_brkchars_func_for_completer.
6095
78b13106
PA
60962017-07-17 Pedro Alves <palves@redhat.com>
6097
6098 * completer.c (symbol_completer): New function, based on
6099 make_symbol_completion_list_fn.
6100 * completer.h (symbol_completer): New declaration.
6101 * guile/scm-cmd.c (cmdscm_completers): Adjust.
6102 * python/py-cmd.c (completers): Adjust.
6103 * symtab.c (make_symbol_completion_list_fn): Delete.
6104 * symtab.h (make_symbol_completion_list_fn): Delete.
6105 * cli/cli-decode.c (add_cmd): Adjust.
6106
bbf2f4df
PA
61072017-07-17 Pedro Alves <palves@redhat.com>
6108
6109 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6110 * dwarf2read.c: Include "filename-seen-cache.h".
6111 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6112 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6113 * filename-seen-cache.c: New file.
6114 * filename-seen-cache.h: New file.
6115 * symtab.c: Include "filename-seen-cache.h".
6116 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6117 (create_filename_seen_cache, clear_filename_seen_cache)
6118 (delete_filename_seen_cache, filename_seen): Delete, parts moved
6119 to filename-seen-cache.h/filename-seen-cache.c.
6120 (output_source_filename, sources_info)
6121 (maybe_add_partial_symtab_filename)
6122 (make_source_files_completion_list): Adjust to use
6123 filename_seen_cache.
6124
330cdd98
PA
61252017-07-17 Pedro Alves <palves@redhat.com>
6126
6127 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6128 fields.
6129 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6130 dwarf2_debug_sections*)): New.
6131 (dwarf2_per_objfile::dwarf2_per_objfile(const
6132 dwarf2_per_objfile&)): Declare as deleted.
6133 (dwarf2_per_objfile::operator=): Declare as deleted.
6134 (dwarf2_per_objfile::dwarf2_per_objfile)
6135 (dwarf2_per_objfile::~dwarf2_per_objfile)
6136 (dwarf2_per_objfile::free_cached_comp_units): New.
6137 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6138 ctor. Call dwarf2_per_objfile's ctor manually.
6139 (dwarf2_locate_sections): Deleted/refactored as ...
6140 (dwarf2_per_objfile::locate_sections): ... this new method.
6141 (free_cached_comp_units): Defer to
6142 dwarf2_per_objfile::free_cached_comp_units.
6143 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6144
8880f2a9
TT
61452017-07-14 Tom Tromey <tom@tromey.com>
6146
6147 PR rust/21764:
6148 * rust-exp.y (convert_ast_to_expression): Add "want_type"
6149 parameter.
6150 <UNOP_SIZEOF>: Split into separate case.
6151 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
6152
65547233
TT
61532017-07-14 Tom Tromey <tom@tromey.com>
6154
6155 PR rust/21763:
6156 * symtab.c (symbol_matches_domain): Add language_rust to special
6157 case.
6158 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6159 treat LOC_TYPEDEF symbols as variables.
6160
8f14146e
PA
61612017-07-14 Pedro Alves <palves@redhat.com>
6162
6163 * symtab.c (make_file_symbol_completion_list_1): Iterate over
6164 symtabs matching all symtabs with SRCFILE as file name instead of
6165 only considering the first hit, with lookup_symtab.
6166
2347965c
SM
61672017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6168
6169 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6170 operator_name parameters.
6171 (gen_expr): Update function call.
6172
40f4af28
SM
61732017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6174
6175 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6176 parameter.
6177 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6178 Likewise.
6179 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6180 parameter, use agent_expr::gdbarch instead, update function
6181 calls.
6182 (locexpr_tracepoint_var_ref): Likewise.
6183 (loclist_tracepoint_var_ref): Likewise.
6184 * ax-gdb.c (gen_trace_static_fields): Likewise.
6185 (gen_traced_pop): Likewise.
6186 (gen_frame_args_address): Likewise.
6187 (gen_frame_locals_address): Likewise.
6188 (gen_var_ref): Likewise.
6189 (gen_struct_ref_recursive): Likewise.
6190 (gen_static_field): Likewise.
6191 (gen_maybe_namespace_elt): Likewise.
6192 (gen_expr): Likewise.
6193 (gen_trace_for_var): Likewise.
6194 (gen_trace_for_expr): Likewise.
6195 (gen_trace_for_return_address): Likewise.
6196
053f8057
SM
61972017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6198
6199 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6200 parameter.
6201 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6202
6661ad48
SM
62032017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6204
6205 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6206 from ax, update calls.
6207 (gen_usual_arithmetic): Likewise.
6208 (gen_integral_promotions): Likewise.
6209 (gen_bitfield_ref): Likewise.
6210 (gen_primitive_field): Likewise.
6211 (gen_struct_ref_recursive): Likewise.
6212 (gen_struct_ref): Likewise.
6213 (gen_maybe_namespace_elt): Likewise.
6214 (gen_struct_elt_for_reference): Likewise.
6215 (gen_namespace_elt): Likewise.
6216 (gen_aggregate_elt_ref): Likewise.
6217 (gen_expr): Get gdbarch from ax, update calls.
6218 (gen_expr_binop_rest): Likewise.
6219
c55a47e7
PA
62202017-07-13 Pedro Alves <palves@redhat.com>
6221
6222 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6223 as default tdesc.
6224 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6225 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6226 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6227 tdesc_amd64_linux as default tdesc. Get final tdesc from the
6228 tdep.
6229 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6230 Get final tdesc from the tdep.
6231 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6232 default tdesc.
6233 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6234 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6235 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6236 Use it as default tdesc.
6237 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6238 down to amd_init_abi. No longer handle fallback tdesc here.
6239 * amd64-tdep.h (tdesc_x32): Declare.
6240 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6241 parameter.
6242 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6243 as default tdesc.
6244
55efceab
AA
62452017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6246
6247 * s390-linux-tdep.c (s390_process_record): Add support for
6248 instructions new in arch12.
6249
0aa37b65
JB
62502017-07-11 John Baldwin <jhb@FreeBSD.org>
6251
6252 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6253 PT_GETFSBASE and PT_GETGSBASE.
6254 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6255 PT_SETGSBASE.
6256
48aeef91
JB
62572017-07-11 John Baldwin <jhb@FreeBSD.org>
6258
6259 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6260 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6261 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6262 those rules.
6263 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6264 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6265 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6266 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6267 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6268 * features/i386/amd64.xml: Add 64bit-segments.xml.
6269 * features/i386/amd64-avx-avx512.c: Regenerated.
6270 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6271 * features/i386/amd64-avx-mpx.c: Regenerated.
6272 * features/i386/amd64-avx.c: Regenerated.
6273 * features/i386/amd64-mpx.c: Regenerated.
6274 * features/i386/amd64.c: Regenerated.
6275 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6276 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6277 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6278 * regformats/i386/amd64-avx.dat: Regenerated.
6279 * regformats/i386/amd64-mpx.dat: Regenerated.
6280 * regformats/i386/amd64.dat: Regenerated.
6281
77c501bc
YQ
62822017-07-10 Yao Qi <yao.qi@linaro.org>
6283
6284 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6285 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6286
6dc8d757
AK
62872017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
6288
6289 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6290 unsetenv.
6291 * gnulib/aclocal.m4: Regenerate.
6292 * gnulib/config.in: Regenerate.
6293 * gnulib/configure: Regenerate.
6294 * gnulib/import/Makefile.am: Regenerate.
6295 * gnulib/import/Makefile.in: Regenerate.
6296 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6297 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6298 * gnulib/import/m4/environ.m4: New file.
6299 * gnulib/import/m4/setenv.m4: New file.
6300 * gnulib/import/setenv.c: New file.
6301 * gnulib/import/unsetenv.c: New file.
6302
266934d1
SM
63032017-07-09 Simon Marchi <simon.marchi@ericsson.com>
6304
6305 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6306 address when op is DW_OP_addr.
6307
03278692
TT
63082017-07-09 Tom Tromey <tom@tromey.com>
6309
6310 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6311 check and apply to outer type.
6312
4b654465
JB
63132017-07-07 John Baldwin <jhb@FreeBSD.org>
6314
6315 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6316 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6317 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6318 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6319
2af9fc44
JB
63202017-07-07 John Baldwin <jhb@FreeBSD.org>
6321
6322 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6323
382b69bb
JB
63242017-07-07 John Baldwin <jhb@FreeBSD.org>
6325
6326 * corelow.c (get_core_siginfo): Remove.
6327 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6328 instead of get_core_siginfo.
6329 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6330 * gdbarch.h: Re-generate.
6331 * gdbarch.c: Re-generate.
6332 * linux-tdep.c (linux_core_xfer_siginfo): New.
6333 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6334
6e5eab33
JB
63352017-07-07 John Baldwin <jhb@FreeBSD.org>
6336
6337 * corelow.c (thread_section_name): Move to ...
6338 * gdbcore.h (thread_section_name): ... here.
6339
929edea9
JB
63402017-07-07 John Baldwin <jhb@FreeBSD.org>
6341
6342 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6343 (struct siginfo32): New.
6344 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6345 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6346 via ptrace(PT_LWPINFO).
6347
762c974a
JB
63482017-07-07 John Baldwin <jhb@FreeBSD.org>
6349
6350 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6351 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6352 (fbsd_get_siginfo_type): New.
6353 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6354 (_initialize_fbsd_tdep): New.
6355
33c5cd75
DB
63562017-07-06 David Blaikie <dblaikie@gmail.com>
6357
6358 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6359 a singular dwo_unit*) to support multiple CUs in the same way that
6360 multiple TUs are supported.
6361 (create_cus_hash_table): Replace create_dwo_cu with a function for
6362 parsing multiple CUs from a DWO file.
6363 (open_and_init_dwo_file): Use create_cus_hash_table rather than
6364 create_dwo_cu.
6365 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6366 htab_find, rather than comparing the signature to a singleton CU in
6367 the dwo_file.
6368
8455d262
PA
63692017-07-06 Pedro Alves <palves@redhat.com>
6370
6371 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6372
4da3eb35
PA
63732017-07-04 Pedro Alves <palves@redhat.com>
6374
6375 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6376 * gdbtypes.h (TYPE_STATIC): Delete.
6377 (struct fn_field) <is_public, is_abstract, is_static, is_final,
6378 is_synchronized, is_native>: Delete.
6379 <dummy>: Bump.
6380 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6381 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6382 (TYPE_FN_FIELD_ABSTRACT): Delete.
6383
5bfd255c
SM
63842017-07-03 Simon Marchi <simon.marchi@ericsson.com>
6385
6386 * buffer.h (buffer_finish): Fix spelling mistakes.
6387
25c54127
EZ
63882017-07-01 Eli Zaretskii <eliz@gnu.org>
6389
6390 * .dir-locals.el: Automatically switch to C-style comments in
6391 versions of Emacs that support the feature.
6392
dc4bde35
SDJ
63932017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6394 Pedro Alves <palves@redhat.com>
6395
6396 PR cli/21688
6397 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6398 (process_next_line): New variable 'inline_cmd'.
6399 Adjust 'if' clauses for "python", "compile" and "guile" to use
6400 'command_name_equals' and check for '!inline_cmd'.
6401
51ed89aa
SDJ
64022017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6403
6404 PR cli/21688
6405 * cli/cli-script.c (command_name_equals_not_inline): New function.
6406 (process_next_line): Adjust 'if' clauses for "python", "compile"
6407 and "guile" to use command_name_equals_not_inline.
6408
eb17d413
PA
64092017-06-29 Pedro Alves <palves@redhat.com>
6410
6411 * completer.c (expression_completer): Call
6412 linespec_location_completer instead of location_completer.
6413
195bcdd5
PA
64142017-06-29 Pedro Alves <palves@redhat.com>
6415
6416 * completer.c (expression_completer): Remove code that recomputes
6417 'text' from 'word'.
6418
adc764e7
YQ
64192017-06-29 Yao Qi <yao.qi@linaro.org>
6420
6421 * regformats/regdat.sh: Generate code with
6422 "ifndef IN_PROCESS_AGENT".
6423
6e75794e
PA
64242017-06-28 Pedro Alves <palves@redhat.com>
6425
6426 * command.h: Include "common/scoped_restore.h".
6427
bc491f2e
YQ
64282017-06-28 Yao Qi <yao.qi@linaro.org>
6429
6430 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6431 instead of obstack_grow.
6432
41664b45
DG
64332017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
6434
6435 PR gdb/21337
6436 * symfile.c (reread_symbols): Call objfiles_changed just before
6437 read_symbols.
6438
6da67eb1
PA
64392017-06-27 Pedro Alves <palves@redhat.com>
6440
6441 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6442 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6443 (completion_list_add_symbol, completion_list_add_msymbol):
6444 ... these new functions.
6445 (add_symtab_completions)
6446 (default_make_symbol_completion_list_break_on_1): Adjust.
6447
23732b1e
PA
64482017-06-27 Pedro Alves <palves@redhat.com>
6449
6450 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6451 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
6452 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6453 dtor.
6454 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
6455 'storage_obstack' field an auto_obstack. In-class initialize all
6456 non-bitfield fields. Make minsyms_read bool.
6457 * symfile.c (read_symbols): Adjust.
6458
a4d1e79a
AH
64592017-06-27 Alan Hayward <alan.hayward@arm.com>
6460
6461 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6462 (gdbsim_store_register): Likewise.
6463
8268c778
PA
64642017-06-27 Pedro Alves <palves@redhat.com>
6465
6466 * c-exp.y (name_obstack): Now an auto_obstack.
6467 (yylex): Use auto_obstack::clear.
6468 (c_parse): Use auto_obstack::clear instead of reinitializing and
6469 freeing the obstack.
6470 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6471 * d-exp.y (name_obstack): Now an auto_obstack.
6472 (yylex): Use auto_obstack::clear.
6473 (d_parse): Use auto_obstack::clear instead of reinitializing and
6474 freeing the obstack.
6475 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6476 auto_obstack.
6477 * dwarf2read.c (create_addrmap_from_index)
6478 (dwarf2_build_psymtabs_hard)
6479 (update_enumeration_type_from_children): Likewise.
6480 * gdb_obstack.h (auto_obstack): New type.
6481 * go-exp.y (name_obstack): Now an auto_obstack.
6482 (build_packaged_name): Use auto_obstack::clear.
6483 (go_parse): Use auto_obstack::clear instead of reinitializing and
6484 freeing the obstack.
6485 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6486 auto_obstack.
6487 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6488 * rust-exp.y (work_obstack): Now an auto_obstack.
6489 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6490 reinitializing and freeing the obstack.
6491 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6492 (host_char_to_target): Use auto_obstack.
6493 * utils.h (make_cleanup_obstack_free): Delete declaration.
6494 * valprint.c (generic_emit_char, generic_printstr): Use
6495 auto_obstack.
6496
db665f42
SM
64972017-06-27 Simon Marchi <simon.marchi@ericsson.com>
6498
6499 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6500 thread.
6501 (darwin_init_thread_list): Don't update dummy thread.
6502 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6503
873c0814
SM
65042017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6505
6506 * record-full.c (netorder16): Remove.
6507
8b5a7a6e
SM
65082017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6509
6510 * common/diagnostics.h: Define macros for GCC.
6511 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6512 * common/vec.h: Include diagnostics.h.
6513 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6514 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6515 warning.
6516
d1435379
SM
65172017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6518
6519 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6520 New macro.
6521 * ada-lex.l: Ignore deprecated register warnings.
6522
cc75e0fd
SM
65232017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6524
6525 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6526 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6527
07809eaf
SM
65282017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6529
6530 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6531 its own line.
6532
f076f034
SM
65332017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6534
6535 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6536
0dd5cbc5
AH
65372017-06-23 Alan Hayward <alan.hayward@arm.com>
6538
6539 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6540 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6541 (xtensa_register_read_masked): Likewise.
6542
d4c6ce5b
SDJ
65432017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
6544
6545 * common/environ.c (gdb_environ::unset): Update comment.
6546
16892a03
AH
65472017-06-22 Alan Hayward <alan.hayward@arm.com>
6548
6549 * python/py-unwind.c (pyuw_sniffer): Allocate space for
6550 registers.
6551
d7dcbefc
AH
65522017-06-22 Alan Hayward <alan.hayward@arm.com>
6553
6554 * record-full.c (record_full_exec_insn): Use byte_vector.
6555
b30ff123
YQ
65562017-06-22 Yao Qi <yao.qi@linaro.org>
6557
6558 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6559 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6560
4fa847d7
AH
65612017-06-22 Alan Hayward <alan.hayward@arm.com>
6562
6563 * remote.c (cached_reg): Move from here...
6564 * regcache.h (cached_reg): ...to here.
6565 * python/py-unwind.c (struct reg_info): Remove.
6566 (cached_frame_info): Use cached_reg_t.
6567 (pyuw_prev_register): Likewise.
6568 (pyuw_sniffer): Use cached_reg_t and allocate registers.
6569 (pyuw_dealloc_cache): Free all registers.
6570
f4906a9a
PA
65712017-06-22 Pedro Alves <palves@redhat.com>
6572 Simon Marchi <simon.marchi@ericsson.com>
6573
6574 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6575 warning.
6576 * common/diagnostics.h: New file.
6577
b45a1208
PA
65782017-06-22 Pedro Alves <palves@redhat.com>
6579
6580 * common/agent.h: Add include guards.
6581
e4da2c61
SM
65822017-06-21 Simon Marchi <simon.marchi@ericsson.com>
6583
6584 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6585 talk about addressable units instead of bytes.
6586
96160d60
SDJ
65872017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6588
6589 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6590 of '::const_iterator'.
6591
9a6c7d9c
SDJ
65922017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6593
6594 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6595 'unittests/environ-selftests.c'.
6596 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6597 * charset.c (find_charset_names): Declare object 'iconv_env'.
6598 Update code to use 'iconv_env' object. Remove call to
6599 'free_environ'.
6600 * common/environ.c: Include <utility>.
6601 (make_environ): Delete function.
6602 (free_environ): Delete function.
6603 (gdb_environ::clear): New function.
6604 (gdb_environ::operator=): New function.
6605 (gdb_environ::get): Likewise.
6606 (environ_vector): Delete function.
6607 (set_in_environ): Delete function.
6608 (gdb_environ::set): New function.
6609 (unset_in_environ): Delete function.
6610 (gdb_environ::unset): New function.
6611 (gdb_environ::envp): Likewise.
6612 * common/environ.h: Include <vector>.
6613 (struct gdb_environ): Delete; transform into...
6614 (class gdb_environ): ... this class.
6615 (free_environ): Delete prototype.
6616 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6617 environ_vector): Likewise.
6618 * infcmd.c (run_command_1): Update code to call
6619 'envp' from 'gdb_environ' class.
6620 (environment_info): Update code to call methods from 'gdb_environ'
6621 class.
6622 (unset_environment_command): Likewise.
6623 (path_info): Likewise.
6624 (path_command): Likewise.
6625 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6626 (inferior::inferior): Initialize 'environment' using the host's
6627 information.
6628 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6629 Include "environ.h".
6630 (class inferior) <environment>: Change type from 'struct
6631 gdb_environ' to 'gdb_environ'.
6632 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6633 methods from 'gdb_environ' class.
6634 * solib.c (solib_find_1): Likewise
6635 * unittests/environ-selftests.c: New file.
6636
75c554cf
YQ
66372017-06-20 Yao Qi <yao.qi@linaro.org>
6638
6639 * features/i386/i386-linux.xml: Exchange the order of including
6640 32bit-linux.xml and 32bit-sse.xml.
6641 * features/i386/i386-linux.c: Regenerated.
6642
72ddacb7
YQ
66432017-06-20 Yao Qi <yao.qi@linaro.org>
6644
6645 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6646 Delete copy ctor and assignment operator.
6647 (tdesc_type): Likewise.
6648 (tdesc_feature): Likewise.
6649 (tdesc_free_reg): Remove.
6650 (tdesc_create_reg): Use new.
6651 (tdesc_free_type): Remove.
6652 (tdesc_create_vector): Use new.
6653 (tdesc_create_union): Likewise.
6654 (tdesc_create_flags): Likewise.
6655 (tdesc_create_enum): Likewise.
6656 (tdesc_free_feature): Delete.
6657 (free_target_description): Use delete.
6658
325c9fd4
JB
66592017-06-19 John Baldwin <jhb@FreeBSD.org>
6660
6661 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6662 registers.
6663
16b7a719
PA
66642017-06-19 Pedro Alves <palves@redhat.com>
6665
6666 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6667 after gdb::unlinker.
6668
1c8e01c9
SDJ
66692017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6670
6671 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6672 gdb_environ to access an environment variable.
6673
ffce45d2
TP
66742017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6675
6676 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6677 gdb_byte*.
6678
1d4fbac9
SM
66792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6680
6681 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6682
8465943a
SM
66832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6684
6685 * configure: Re-generate.
6686 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6687
3e019bdc
SM
66882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6689
6690 * configure: Re-generate.
6691 * warning.m4: Pass -Werror to compiler when checking for
6692 supported warning flags.
6693
cf0dd6f0
SM
66942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6695
6696 * Makefile.in (COMPILE.pre): Add "-x c++".
6697
6f98355c
YQ
66982017-06-16 Alan Hayward <alan.hayward@arm.com>
6699 Pedro Alves <palves@redhat.com>
6700 Yao Qi <yao.qi@linaro.org>
6701
6702 * defs.h (RequireLongest): New.
6703 (extract_integer): Declare function template.
6704 (extract_signed_integer): Remove the declaration, but define it
6705 static inline.
6706 (extract_unsigned_integer): Likewise.
6707 (store_integer): Declare function template.
6708 (store_signed_integer): Remove the declaration, but define it
6709 static inline.
6710 (store_unsigned_integer): Likewise.
6711 * findvar.c (extract_integer): New function template.
6712 (extract_signed_integer): Remove.
6713 (extract_unsigned_integer): Remove.
6714 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6715 instantiations.
6716 (store_integer): New function template.
6717 (store_signed_integer): Remove.
6718 (store_unsigned_integer): Remove.
6719 (store_integer): Explicit instantiations.
6720 * regcache.c (regcache_raw_read_signed): Update.
6721 (regcache::raw_read): New function.
6722 (regcache::raw_read_signed): Remove.
6723 (regcache::raw_read_unsigned): Remove.
6724 (regcache_raw_read_unsigned): Update.
6725 (regcache_raw_write_unsigned): Update.
6726 (regcache::raw_write_signed): Remove.
6727 (regcache::raw_write): New function.
6728 (regcache_cooked_read_signed): Update.
6729 (regcache::raw_write_unsigned): Remove.
6730 (regcache::cooked_read_signed): Remove.
6731 (regcache_cooked_read_unsigned): Update.
6732 (regcache::cooked_read_unsigned): Remove.
6733 (regcache_cooked_write_signed): Update.
6734 (regcache_cooked_write_unsigned): Update.
6735 * regcache.h (regcache) <raw_read_signed>: Remove.
6736 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6737 <raw_read, raw_write>: New.
6738 <cooked_read_signed, cooked_write_signed>: Remove.
6739 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6740 <cooked_read, cooked_write>: New.
6741 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6742 (sh64_pseudo_register_write): Update.
6743
a87dc45a
AK
67442017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6745
6746 * arc-tdep.c (arc_disassembler_options): New variable.
6747 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6748 of default_print_insn.
6749 (arc_delayed_print_insn): Set info->section when needed,
6750 use default_print_insn to retrieve a disassembler.
6751
45159d6a
SDJ
67522017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6753
6754 PR gdb/21574
6755 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6756 to mention $SHELL and startup-with-shell.
6757
b46c4cf0
MF
67582017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6759
6760 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6761
6394c606
YQ
67622017-06-14 Yao Qi <yao.qi@linaro.org>
6763
6764 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6765 default_print_insn instead of print_insn_aarch64.
6766 * arm-tdep.c (gdb_print_insn_arm): Call
6767 default_print_insn instead of print_insn_big_arm
6768 and print_insn_little_arm.
6769 * i386-tdep.c (i386_print_insn): Call default_print_insn
6770 instead of print_insn_i386.
6771 * ia64-tdep.c (ia64_print_insn): Call
6772 default_print_insn instead of print_insn_ia64.
6773 * mips-tdep.c (gdb_print_insn_mips): Call
6774 default_print_insn instead of print_insn_big_mips
6775 and print_insn_little_mips.
6776 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6777 instead of print_insn_spu.
6778
d5722aa2
PA
67792017-06-14 Pedro Alves <palves@redhat.com>
6780
6781 * ada-lang.c: Include "common/byte-vector.h".
6782 (ada_value_primitive_packed_val): Use gdb::byte_vector.
6783 * charset.c (wchar_iterator::iterate): Resize the vector instead
6784 of reserving it.
6785 * common/byte-vector.h: Include "common/def-vector.h".
6786 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6787 * cli/cli-dump.c: Include "common/byte-vector.h".
6788 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6789 * common/byte-vector.h: New file.
6790 * common/def-vector.h: New file.
6791 * common/default-init-alloc.h: New file.
6792 * dwarf2loc.c: Include "common/byte-vector.h".
6793 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6794 instead of reserving it.
6795 * dwarf2read.c: Include "common/byte-vector.h".
6796 (data_buf::m_vec): Now a gdb::byte_vector.
6797 * gdb_regex.c: Include "common/def-vector.h".
6798 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6799 * mi/mi-main.c: Include "common/byte-vector.h".
6800 (mi_cmd_data_read_memory): Use gdb::byte_vector.
6801 * printcmd.c: Include "common/byte-vector.h".
6802 (print_scalar_formatted): Use gdb::byte_vector.
6803 * valprint.c: Include "common/byte-vector.h".
6804 (maybe_negate_by_bytes, print_decimal_chars): Use
6805 gdb::byte_vector.
6806
01ec7a27
SM
68072017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6808
6809 * darwin-nat.c: Include "nat/fork-inferior.h".
6810
848d9074
SM
68112017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6812
6813 * configure.nat: Factor out Darwin bits that are not
6814 architecture-specific. Add fork-inferior.o.
6815
3b912944
SM
68162017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6817
6818 * configure.nat: Factor out AIX bits that are not
6819 architecture-specific. Add fork-inferior.o.
6820
55acdf22
AA
68212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6822
6823 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
6824 (read_pieced_value, write_pieced_value): ...here. Reduce to
6825 wrappers that just call rw_pieced_value.
6826
f65e2044
AA
68272017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6828
6829 * dwarf2loc.c (write_pieced_value): When writing the data for a
6830 memory piece, use write_memory_with_notification instead of
6831 write_memory.
6832
23f945bf
AA
68332017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6834
6835 * valops.c (read_value_memory): Change embedded_offset to
6836 represent a bit offset instead of a byte offset.
6837 * value.h (read_value_memory): Adjust comment.
6838
f236533e
AA
68392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6840
6841 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6842 dest_offset_bits and source_offset_bits.
6843 (write_pieced_value): Likewise.
6844
65d84b76
AA
68452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6846
6847 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6848 given by DW_OP_bit_piece.
6849 (write_pieced_value): Likewise.
6850
242d31ab
AA
68512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6852
6853 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6854 some other preparations to the places where sufficient information
6855 is available.
6856 (write_pieced_value): Likewise.
6857
03c8af18
AA
68582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6859
6860 * dwarf2loc.c (bits_to_bytes): New function.
6861 (read_pieced_value): Fix offset calculations for register pieces
6862 on big-endian targets.
6863 (write_pieced_value): Likewise.
6864
840989c1
AA
68652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6866
6867 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6868 (write_pieced_value): Likewise.
6869
359b19bb
AA
68702017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6871
6872 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6873 transfer the source value's least significant bits, instead of its
6874 lowest-addressed ones. Rename type_len to max_offset.
6875 (read_pieced_value): Mirror above changes to write_pieced_value as
6876 applicable.
6877
07c9ca3b
AA
68782017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6879
6880 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6881 truncate full bytes from dest_offset_bits before using it as an
6882 offset into the buffer.
6883
f1cc9874
AA
68842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6885
6886 * dwarf2loc.c (write_pieced_value): Include transfer size in
6887 byte-wise check.
6888
cdaac320
AA
68892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6890
6891 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6892 calculation of this_size.
6893
af547a96
AA
68942017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6895
6896 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6897 when targeting a bit-field.
6898 (write_pieced_value): Likewise.
6899
ddd7882a
AA
69002017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6901
6902 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6903 (allocate_piece_closure): Drop addr_size parameter.
6904 (dwarf2_evaluate_loc_desc_full): Adjust call to
6905 allocate_piece_closure.
6906
e9352324
AA
69072017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6908
6909 PR gdb/21226
6910 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6911 the LSB end, independent of endianness.
6912
d5d1163e
AA
69132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6914
6915 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6916 size capping.
6917
032bb6ea
YQ
69182017-06-13 Yao Qi <yao.qi@linaro.org>
6919
6920 * mips-linux-nat.c: Move include features/mips*-linux.c to
6921 mips-linux-tdep.c.
6922 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6923 to mips-linux-tdep.c.
6924 * mips-linux-tdep.c: Include features/mips*-linux.c
6925 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6926 functions.
6927 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6928 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6929 (tdesc_mips64_dsp_linux): Declare.
6930
f12f6bad
TT
69312017-06-12 Tom Tromey <tom@tromey.com>
6932
6933 * valprint.h (val_print_type_code_int): Remove.
6934 * valprint.c (generic_val_print_int): Always call
6935 val_print_scalar_formatted.
6936 (val_print_type_code_int): Remove.
6937 * printcmd.c (print_scalar_formatted): Handle options->format==0.
6938 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6939 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6940 * ada-valprint.c (ada_val_print_num): Use
6941 val_print_scalar_formatted.
6942
d9109c80
TT
69432017-06-12 Tom Tromey <tom@tromey.com>
6944
6945 * printcmd.c (print_scalar_formatted): Unify the two switches.
6946 Don't convert scalars to LONGEST.
6947
4ac0cb1c
TT
69482017-06-12 Tom Tromey <tom@tromey.com>
6949
6950 PR exp/16225:
6951 * valprint.h (print_decimal_chars): Update.
6952 * valprint.c (maybe_negate_by_bytes): New function.
6953 (print_decimal_chars): Add "is_signed" argument.
6954 * printcmd.c (print_scalar_formatted): Update.
6955
30a25466
TT
69562017-06-12 Tom Tromey <tom@tromey.com>
6957
6958 PR exp/16225:
6959 * valprint.h (print_binary_chars, print_hex_chars): Update.
6960 * valprint.c (val_print_type_code_int): Update.
6961 (print_binary_chars): Add "zero_pad" argument.
6962 (emit_octal_digit): New function.
6963 (print_octal_chars): Don't zero-pad.
6964 (print_decimal_chars): Likewise.
6965 (print_hex_chars): Add "zero_pad" argument.
6966 * sh64-tdep.c (sh64_do_fp_register): Update.
6967 * regcache.c (regcache::dump): Update.
6968 * printcmd.c (print_scalar_formatted): Update.
6969 * infcmd.c (default_print_one_register_info): Update.
6970
b3464d03
PA
69712017-06-12 Pedro Alves <palves@redhat.com>
6972 Alan Hayward <alan.hayward@arm.com>
6973
6974 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6975 (mips_eabi_push_dummy_call): Rename local 'regsize' to
6976 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
6977 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6978 Assert that abi_regsize bytes fit in 'ref_valbuf'.
6979
4b76cda9
PA
69802017-06-12 Pedro Alves <palves@redhat.com>
6981
6982 * dwarf2read.c (mapped_symtab::data): Now a vector of
6983 symtab_index_entry instead of vector of
6984 std::unique_ptr<symtab_index_entry>. All users adjusted to check
6985 whether an element's name is NULL instead of checking whether the
6986 element itself is NULL.
6987 (find_slot): Change return type. Adjust.
6988 (hash_expand, , add_index_entry, uniquify_cu_indices)
6989 (write_hash_table): Adjust.
6990
e8f8bcb3
PA
69912017-06-12 Pedro Alves <palves@redhat.com>
6992
6993 * dwarf2read.c (recursively_count_psymbols): New function.
6994 (write_psymtabs_to_index): Call it to compute number of psyms and
6995 pass estimate size of psyms_seen to unordered_set's ctor.
6996
70a1152b
PA
69972017-06-12 Pedro Alves <palves@redhat.com>
6998
6999 * dwarf2read.c (write_hash_table): Check if key already exists
7000 before emplacing.
7001
c2f134ac
PA
70022017-06-12 Pedro Alves <palves@redhat.com>
7003
7004 * dwarf2read.c (data_buf::append_space): Rename to...
7005 (data_buf::grow): ... this, and make private. Adjust all callers.
7006 (data_buf::append_uint): New method.
7007 (add_address_entry, write_one_signatured_type)
7008 (write_psymtabs_to_index): Use it.
7009
a81e6d4d
PA
70102017-06-12 Pedro Alves <palves@redhat.com>
7011
7012 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7013 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7014 (data_buf::file_write): Call ::fwrite directly.
7015
6fd931f2
PA
70162017-06-12 Pedro Alves <palves@redhat.com>
7017
7018 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7019 std::vector::erase.
7020
bc8f2430
JK
70212017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7022
7023 Code cleanup: C++ify .gdb_index producer.
7024 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7025 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7026 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7027 (create_strtab, add_string): Remove.
7028 (file_write, data_buf): New.
7029 (struct symtab_index_entry): Use std::vector for cu_indices.
7030 (struct mapped_symtab): Use std::vector for data.
7031 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7032 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7033 Remove.
7034 (find_slot): Change return type. Update it to the new data structures.
7035 (hash_expand, add_index_entry): Update it to the new data structures.
7036 (offset_type_compare): Remove.
7037 (uniquify_cu_indices): Update it to the new data structures.
7038 (c_str_view, c_str_view_hasher, vector_hasher): New.
7039 (add_indices_to_cpool): Remove.
7040 (write_hash_table): Update it to the new data structures.
7041 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7042 (eq_psymtab_cu_index): Remove.
7043 (psym_index_map): New typedef.
7044 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7045 reference and std::unordered_map for cu_index_htab.
7046 (add_address_entry, add_address_entry_worker, write_address_map)
7047 (write_psymbols): Update it to the new data structures.
7048 (write_obstack): Remove.
7049 (struct signatured_type_index_data): Change types_list to a data_buf
7050 reference and psyms_seen to a std::unordered_set reference.
7051 (write_one_signatured_type, recursively_write_psymbols)
7052 (write_psymtabs_to_index): Update it to the new data structures.
7053
c4dcb155
SM
70542017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7055
7056 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7057 separate-debug-file commands.
7058 * symfile.h (separate_debug_file_debug): New global.
7059 * symfile.c (separate_debug_file_debug): New global.
7060 (separate_debug_file_exists, find_separate_debug_file): Add
7061 debug output.
7062 (_initialize_symfile): Add "set debug separate-debug-file"
7063 command.
7064 * build-id.c (build_id_to_debug_bfd,
7065 find_separate_debug_file_by_buildid): Add debug output.
7066
6d45d4b4
SM
70672017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7068
7069 * gdbarch.sh (displaced_step_free_closure): Remove.
7070 * gdbarch.h, gdbarch.c: Re-generate.
7071 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7072 displaced_step_free_closure.
7073 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7074 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7075 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7076 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7077 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7078 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7079 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7080 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7081 * infrun.c (displaced_step_clear): Call xfree instead of
7082 gdbarch_displaced_step_free_closure.
7083
2f91880f
SDJ
70842017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7085
7086 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7087 NULL".
7088
b8b6e72f
AH
70892017-06-08 Alan Hayward <alan.hayward@arm.com>
7090
7091 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7092 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7093 (mn10300_push_dummy_call): Likewise.
7094
5369082e
AH
70952017-06-08 Alan Hayward <alan.hayward@arm.com>
7096
7097 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7098
ff4ca5ac
AH
70992017-06-08 Alan Hayward <alan.hayward@arm.com>
7100
7101 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7102
aefd8b33
SDJ
71032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7104
7105 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7106 able to start inferiors using a shell.
7107 (New remote packets): Announce new packet "QStartupWithShell".
7108 * remote.c: Add PACKET_QStartupWithShell.
7109 (extended_remote_create_inferior): Handle new
7110 PACKET_QStartupWithShell.
7111 (remote_protocol_features) <QStartupWithShell>: New entry for
7112 PACKET_QStartupWithShell.
7113 (_initialize_remote): Call "add_packet_config_cmd" for
7114 QStartupShell.
7115
2090129c
SDJ
71162017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7117 Pedro Alves <palves@redhat.com>
7118
7119 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7120 and "nat/fork-inferior.h".
7121 * common/common-inferior.h: New file, with contents from
7122 "gdb/inferior.h".
7123 * commom/common-utils.c: Include "common-utils.h".
7124 (stringify_argv): New function.
7125 * common/common-utils.h (stringify_argv): New prototype.
7126 * configure.nat: Add "fork-inferior.o" as a dependency for
7127 "*linux*", "fbsd*" and "nbsd*" hosts.
7128 * corefile.c (get_exec_file): Update comment.
7129 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7130 instead of "startup_inferior".
7131 (darwin_create_inferior): Call "add_thread_silent" after
7132 "fork_inferior".
7133 * fork-child.c: Cleanup unnecessary includes.
7134 (SHELL_FILE): Move to "common/common-fork-child.c".
7135 (environ): Likewise.
7136 (exec_wrapper): Initialize.
7137 (get_exec_wrapper): New function.
7138 (breakup_args): Move to "common/common-fork-child.c"; rename to
7139 "breakup_args_for_exec".
7140 (escape_bang_in_quoted_argument): Move to
7141 "common/common-fork-child.c".
7142 (saved_ui): New variable.
7143 (prefork_hook): New function.
7144 (postfork_hook): Likewise.
7145 (postfork_child_hook): Likewise.
7146 (gdb_startup_inferior): Likewise.
7147 (fork_inferior): Move to "common/common-fork-child.c". Update
7148 function to support gdbserver.
7149 (startup_inferior): Likewise.
7150 * gdbcore.h (get_exec_file): Remove declaration.
7151 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7152 instead of "startup_inferior". Call "add_thread_silent" after
7153 "fork_inferior".
7154 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7155 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7156 instead of "startup_inferior". Call "add_thread_silent" after
7157 "fork_inferior".
7158 * inferior.h: Include "common-inferior.h".
7159 (trace_start_error): Move to "common/common-utils.h".
7160 (trace_start_error_with_name): Likewise.
7161 (fork_inferior): Move prototype to "nat/fork-inferior.h".
7162 (startup_inferior): Likewise.
7163 (gdb_startup_inferior): New prototype.
7164 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7165 * nat/fork-inferior.h: New file.
7166 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7167 instead of "startup_inferior". Call "add_thread_silent" after
7168 "fork_inferior".
7169 * target.h (target_terminal_init): Move prototype to
7170 "target/target.h".
7171 (target_terminal_inferior): Likewise.
7172 (target_terminal_ours): Likewise.
7173 * target/target.h (target_terminal_init): New prototype, moved
7174 from "target.h".
7175 (target_terminal_inferior): Likewise.
7176 (target_terminal_ours): Likewise.
7177 * utils.c (gdb_flush_out_err): New function.
7178
043a4934
SDJ
71792017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7180
7181 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7182 * common/common-gdbthread.h: New file, with parts from
7183 "gdb/gdbthread.h".
7184 * gdbthread.h: Include "common-gdbthread.h".
7185 (switch_to_thread): Moved to "common/common-gdbthread.h".
7186
15652511
SDJ
71872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7188
7189 * Makefile.in (SFILES): Add "common/job-control.c".
7190 (HFILES_NO_SRCDIR): Add "common/job-control.h".
7191 (COMMON_OBS): Add "job-control.o".
7192 * common/job-control.c: New file, with contents from
7193 "gdb/inflow.c".
7194 * common/job-control.h: New file, with contents from "terminal.h".
7195 * fork-child.c: Include "job-control.h".
7196 * inflow.c: Include "job-control.h".
7197 (gdb_setpgid): Move to "common/common-inflow.c".
7198 (_initialize_inflow): Move setting of "job_control" to
7199 "handle_job_control".
7200 * terminal.h (job_control): Moved to "common/common-terminal.h".
7201 (gdb_setpgid): Likewise.
7202 * top.c: Include "job_control.h".
7203 * utils.c: Likewise.
7204 (job_control): Moved to "job-control.c".
7205
2d7cc5c7
PA
72062017-06-07 Pedro Alves <palves@redhat.com>
7207
7208 * Makefile.in (SFILES): Add gdb_regex.c.
7209 (COMMON_OBS): Add gdb_regex.o.
7210 * ada-lang.c (ada_add_standard_exceptions)
7211 (ada_add_exceptions_from_frame, name_matches_regex)
7212 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7213 parameter type to compiled_regex. Adjust.
7214 (ada_exceptions_list): Use compiled_regex.
7215 * break-catch-throw.c (exception_catchpoint::pattern): Now a
7216 std::unique_ptr<compiled_regex>.
7217 (exception_catchpoint::~exception_catchpoint): Remove regfree
7218 call.
7219 (check_status_exception_catchpoint): Adjust to use compiled_regex.
7220 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7221 * breakpoint.c (solib_catchpoint::compiled): Now a
7222 std::unique_ptr<compiled_regex>.
7223 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7224 (check_status_catch_solib): Adjust to use compiled_regex.
7225 (add_solib_catchpoint): Adjust to use compiled_regex.
7226 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7227 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7228 compiled_regex reference. Adjust to use it.
7229 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7230 declaration. Include "gdb_regex.h".
7231 (apropos_cmd): Change regex parameter to compiled_regex reference.
7232 * gdb_regex.c: New file.
7233 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7234 declarations.
7235 (class compiled_regex): New.
7236 * linux-tdep.c: Include "common/gdb_optional.h".
7237 (struct mapping_regexes): New, factored out from
7238 mapping_is_anonymous_p, and adjusted to use compiled_regex.
7239 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7240 gdb::optional and remove cleanups. Adjust to compiled_regex.
7241 * probe.c: Include "common/gdb_optional.h".
7242 (collect_probes): Use compiled_regex and gdb::optional and remove
7243 cleanups.
7244 * skip.c: Include "common/gdb_optional.h".
7245 (skiplist_entry::compiled_function_regexp): Now a
7246 gdb::optional<compiled_regex>.
7247 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7248 (free_skiplist_entry): Remove regfree call.
7249 (compile_skip_regexp, skip_rfunction_p): Adjust to use
7250 compiled_regex and gdb::optional.
7251 * symtab.c: Include "common/gdb_optional.h".
7252 (search_symbols): Use compiled_regex and gdb::optional.
7253 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7254 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
7255 to gdb_regex.c.
7256
50d6adef
AH
72572017-06-07 Alan Hayward <alan.hayward@arm.com>
7258
7259 * regcache.c (regcache::save): Avoid buffer use.
7260 (regcache::dump): Likewise.
7261
4a8a33c8
AH
72622017-06-07 Alan Hayward <alan.hayward@arm.com>
7263
7264 * sh-tdep.c (sh_pseudo_register_read): Remove
7265 MAX_REGISTER_SIZE.
7266 (sh_pseudo_register_write): Likewise.
7267 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7268 (sh64_pseudo_register_write): Likewise
7269
d1be909e
AH
72702017-06-07 Alan Hayward <alan.hayward@arm.com>
7271
7272 * aarch64-tdep.c (aarch64_store_return_value): Use
7273 V_REGISTER_SIZE.
7274 (aarch64_pseudo_read_value): Likewise.
7275 (aarch64_pseudo_write): Likewise.
7276
f4a65042
YQ
72772017-06-06 Yao Qi <yao.qi@linaro.org>
7278
7279 * regformats/regdef.h (set_register_cache): Remove the
7280 declaration.
7281
9f7fb0aa
AH
72822017-06-06 Alan Hayward <alan.hayward@arm.com>
7283
7284 * frame.c (frame_unwind_register_signed): Use
7285 frame_unwind_register_value.
7286
e1e01040
PA
72872017-06-06 Pedro Alves <palves@redhat.com>
7288
7289 PR breakpoints/21553
7290 * breakpoint.c (create_breakpoints_sal_default)
7291 (init_breakpoint_sal, create_breakpoint_sal): Use
7292 gdb::unique_xmalloc_ptr for string parameters.
7293 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7294 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
7295 (base_breakpoint_create_breakpoints_sal)
7296 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7297 (strace_marker_create_breakpoints_sal)
7298 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7299 string parameters.
7300 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7301 gdb::unique_xmalloc_ptr for string parameters.
7302 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7303 parameters.
7304
fbe654c8
AH
73052017-06-06 Alan Hayward <alan.hayward@arm.com>
7306
7307 * alpha-tdep.c (alpha_register_to_value): Use
7308 get_frame_register_value.
7309 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7310
ae0d01d6
AH
73112017-06-06 Alan Hayward <alan.hayward@arm.com>
7312
7313 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7314 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7315 (ia64_value_to_register): Likewise.
7316 (ia64_extract_return_value): Likewise.
7317 (ia64_store_return_value): Likewise.
7318 (ia64_push_dummy_call): Likewise.
7319
49cf576c
JB
73202017-06-04 Joel Brobecker <brobecker@adacore.com>
7321
7322 GDB 8.0 released.
7323
26b6a6ab
SM
73242017-06-03 Simon Marchi <simon.marchi@ericsson.com>
7325
7326 * x86-linux-nat.c (struct arch_lwp_info): Remove.
7327
22827c51
SM
73282017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
7329
7330 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7331 parameter.
7332 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7333
0e05cf3a
SM
73342017-06-02 Simon Marchi <simon.marchi@ericsson.com>
7335
7336 * event-loop.c (poll_timers): Unallocate timer using delete
7337 instead of xfree.
7338
c1fc2657
SM
73392017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7340
7341 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7342 (struct breakpoint) <~breakpoint>: New.
7343 (struct watchpoint): Inherit from breakpoint.
7344 <~watchpoint>: New.
7345 <base>: Remove.
7346 (struct tracepoint): Inherit from breakpoint.
7347 <base>: Remove.
7348 * breakpoint.c (longjmp_breakpoint_ops): Remove.
7349 (struct longjmp_breakpoint): Inherit from breakpoint.
7350 <~longjmp_breakpoint>: New.
7351 <base>: Remove.
7352 (new_breakpoint_from_type): Remove casts.
7353 (watchpoint_in_thread_scope): Remove reference to base field.
7354 (watchpoint_del_at_next_stop): Likewise.
7355 (update_watchpoint): Likewise.
7356 (watchpoint_check): Likewise.
7357 (bpstat_check_watchpoint): Likewise.
7358 (set_longjmp_breakpoint): Likewise.
7359 (struct fork_catchpoint): Inherit from breakpoint.
7360 <base>: Remove.
7361 (struct solib_catchpoint): Inherit from breakpoint.
7362 <~solib_catchpoint>: New.
7363 <base>: Remove.
7364 (dtor_catch_solib): Change to ...
7365 (solib_catchpoint::~solib_catchpoint): ... this.
7366 (breakpoint_hit_catch_solib): Remove reference to base field.
7367 (add_solib_catchpoint): Likewise.
7368 (create_fork_vfork_event_catchpoint): Likewise.
7369 (struct exec_catchpoint): Inherit from breakpoint.
7370 <~exec_catchpoint>: New.
7371 <base>: Remove.
7372 (dtor_catch_exec): Change to ...
7373 (exec_catchpoint::~exec_catchpoint): ... this.
7374 (dtor_watchpoint): Change to ...
7375 (watchpoint::~watchpoint): ... this.
7376 (watch_command_1): Remove reference to base field.
7377 (catch_exec_command_1): Likewise.
7378 (base_breakpoint_dtor): Change to ...
7379 (breakpoint::~breakpoint): ... this.
7380 (base_breakpoint_ops): Remove dtor field value.
7381 (longjmp_bkpt_dtor): Change to ...
7382 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7383 (strace_marker_create_breakpoints_sal): Remove reference to base
7384 field.
7385 (delete_breakpoint): Don't manually call breakpoint destructor.
7386 (create_tracepoint_from_upload): Remove reference to base field.
7387 (trace_pass_set_count): Likewise.
7388 (initialize_breakpoint_ops): Don't initialize
7389 momentary_breakpoint_ops, don't set dtors.
7390 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7391 <~ada_catchpoint>: New.
7392 <base>: Remove.
7393 (create_excep_cond_exprs): Remove reference to base field.
7394 (dtor_exception): Change to ...
7395 (ada_catchpoint::~ada_catchpoint): ... this.
7396 (dtor_catch_exception): Remove.
7397 (dtor_catch_exception_unhandled): Remove.
7398 (dtor_catch_assert): Remove.
7399 (create_ada_exception_catchpoint): Remove reference to base
7400 field.
7401 (initialize_ada_catchpoint_ops): Don't set dtors.
7402 * break-catch-sig.c (struct signal_catchpoint): Inherit from
7403 breakpoint.
7404 <~signal_catchpoint>: New.
7405 <base>: Remove.
7406 (signal_catchpoint_dtor): Change to ...
7407 (signal_catchpoint::~signal_catchpoint): ... this.
7408 (create_signal_catchpoint): Remove reference to base field.
7409 (initialize_signal_catchpoint_ops): Don't set dtor.
7410 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7411 from breakpoint.
7412 <~syscall_catchpoint>: New.
7413 <base>: Remove.
7414 (dtor_catch_syscall): Change to ...
7415 (syscall_catchpoint::~syscall_catchpoint): ... this.
7416 (create_syscall_event_catchpoint): Remove reference to base
7417 field.
7418 (initialize_syscall_catchpoint_ops): Don't set dtor.
7419 * break-catch-throw.c (struct exception_catchpoint): Inherit
7420 from breakpoint.
7421 <~exception_catchpoint>: New.
7422 <base>: Remove.
7423 (dtor_exception_catchpoint): Change to ...
7424 (exception_catchpoint::~exception_catchpoint): ... this.
7425 (handle_gnu_v3_exceptions): Remove reference to base field.
7426 (initialize_throw_catchpoint_ops): Don't set dtor.
7427 * ctf.c (ctf_get_traceframe_address): Remove reference to base
7428 field.
7429 * remote.c (remote_get_tracepoint_status): Likewise.
7430 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7431 * tracefile.c (tracefile_fetch_registers): Likewise.
7432 * tracepoint.c (actions_command): Likewise.
7433 (validate_actionline): Likewise.
7434 (tfind_1): Likewise.
7435 (get_traceframe_location): Likewise.
7436 (find_matching_tracepoint_location): Likewise.
7437 (parse_tracepoint_status): Likewise.
7438 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7439
3b0871f4
SM
74402017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7441
7442 * breakpoint.c (struct longjmp_breakpoint): New struct.
7443 (is_tracepoint_type): Change return type to bool.
7444 (is_longjmp_type): New function.
7445 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7446 (set_raw_breakpoint_without_location): Use
7447 new_breakpoint_from_type.
7448 (set_raw_breakpoint): Likewise.
7449
a5e364af
SM
74502017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7451
7452 * breakpoint.c (new_breakpoint_from_type): New function.
7453 (create_breakpoint_sal): Use new_breakpoint_from_type and
7454 unique_ptr.
7455 (create_breakpoint): Likewise.
7456
ae3b3f34
SM
74572017-05-31 Simon Marchi <simon.marchi@ericsson.com>
7458
7459 * memattr.c (mem_info_command): Rename to ...
7460 (info_mem_command): ... this.
7461 (mem_enable_command): Rename to ...
7462 (enable_mem_command): ... this.
7463 (mem_disable_command): Rename to ...
7464 (disable_mem_command): ... this.
7465 (mem_delete_command): Rename to ...
7466 (delete_mem_command): ... this.
7467 (_initialize_mem): Adjust function names.
7468
13ace077
MM
74692017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7470
7471 * btrace.c (handle_pt_insn_events): New.
7472 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
7473 STATUS. Split into this and ...
7474 (handle_pt_insn_event_flags): ... this.
7475
c56ccc05
MM
74762017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7477
7478 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7479 and struct pt_insn.resynced.
7480 * configure: Regenerated.
7481 * config.in: Regenerated.
7482
08c3f6d2
TW
74832017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7484
7485 * btrace.c (ftrace_find_call_by_number): New function.
7486 (ftrace_new_function): Store objects, not pointers.
7487 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7488 ftrace_new_gap, ftrace_update_function,
7489 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7490 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7491 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7492 btrace_ends_with_single_insn, btrace_call_get): Account for
7493 btrace_thread_info::functions now storing objects.
7494 * btrace.h (struct btrace_thread_info): Add constructor.
7495 (struct btrace_thread_info) <functions>: Make std::vector.
7496 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7497 Initialize with default values.
7498 * record-btrace.c (record_btrace_frame_sniffer): Account for
7499 btrace_thread_info::functions now storing objects.
7500
8ffd39f2
TW
75012017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7502
7503 * btrace.c: Remove typedef bfun_s.
7504 (ftrace_new_gap): Directly add gaps to the list of gaps.
7505 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7506 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7507 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7508 instead of gdb VEC.
7509
4aeb0dfc
TW
75102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7511
7512 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7513 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7514 with btrace_thread_info::next_segment and
7515 btrace_thread_info::prev_segment.
7516 * btrace.h: Remove struct btrace_func_link.
7517 (struct btrace_function): Replace pair of function segment pointers
7518 with pair of indices.
7519 * python/py-record-btrace.c (btpy_call_prev_sibling,
7520 btpy_call_next_sibling): Replace references to
7521 btrace_thread_info::segment with btrace_thread_info::next_segment and
7522 btrace_thread_info::prev_segment.
7523 * record-btrace.c (record_btrace_frame_this_id): Use
7524 btrace_find_call_by_number.
7525
eb8f2b9c
TW
75262017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7527
7528 * btrace.c (ftrace_new_function, ftrace_fixup_level,
7529 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7530 btrace_insn_next, btrace_insn_prev): Remove references to
7531 btrace_thread_info::flow.
7532 * btrace.h (struct btrace_function): Remove FLOW.
7533
42bfe59e
TW
75342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7535
7536 * btrace.c (ftrace_find_call_by_number): New function.
7537 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7538 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7539 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7540 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7541 index.
7542 * btrace.h (struct btrace_function): Turn UP into an index.
7543 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7544 as an index.
7545 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7546 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7547 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7548
b54b03bd
TW
75492017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7550
7551 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7552 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7553 ftrace_update_function, ftrace_compute_global_level_offset,
7554 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7555 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7556 btrace_insn_end, btrace_is_empty): Remove references to
7557 btrace_thread_info::begin and btrace_thread_info::end.
7558 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7559 (struct btrace_thread_info) <functions>: Adjust comment.
7560 * record-btrace.c (record_btrace_start_replaying): Remove reference to
7561 btrace_thread_info::begin.
7562
8286623c
TW
75632017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7564
7565 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7566 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7567 ftrace_update_function): Remove arguments that implicitly were always
7568 BTINFO->END.
7569 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7570 Don't pass BTINFO->END.
7571
a0f1b963
TW
75722017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7573
7574 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7575 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7576 btrace_find_insn_by_number): Replace function segment pointer with
7577 index.
7578 (btrace_insn_cmp): Simplify.
7579 * btrace.h: (struct btrace_insn_iterator) Rename index to
7580 insn_index. Replace function segment pointer with index into function
7581 segment vector.
7582 * record-btrace.c (record_btrace_call_history): Replace function
7583 segment pointer use with index.
7584 (record_btrace_frame_sniffer): Retrieve function call segment through
7585 vector.
7586 (record_btrace_set_replay): Remove defunc't safety check.
7587
f158f208
TW
75882017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7589
7590 * btrace.c (btrace_ends_with_single_insn): New function.
7591 (btrace_call_get, btrace_call_number, btrace_call_begin,
7592 btrace_call_end, btrace_call_next, btrace_call_prev,
7593 btrace_find_call_by_number): Use index into call segment vector
7594 instead of pointer.
7595 (btrace_call_cmp): Simplify.
7596 * btrace.h (struct btrace_call_iterator): Replace function call segment
7597 pointer with index into vector.
7598 * record-btrace.c (record_btrace_call_history): Use index instead of
7599 pointer.
7600
521103fd
TW
76012017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7602
7603 * btrace.c (btrace_insn_begin, btrace_insn_end,
7604 btrace_find_insn_by_number): Add btinfo to iterator.
7605 * btrace.h (struct btrace_insn_iterator): Add btinfo.
7606
17b89b34
TW
76072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7608
7609 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7610 and save pointers directly.
7611 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7612 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7613 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
7614 changed signature of functions.
7615 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7616 (btrace_fetch): Remove code that adds btrace_function pointers to
7617 vector of btrace_functions.
7618 (btrace_clear): Simplify freeing vector of btrace_functions.
7619
2b51eddc
TW
76202017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7621
7622 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7623 Replace VEC_* with std::vector functions.
7624 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7625 (struct btrace_thread_info)<functions>: Change type to std::vector.
7626
db6be0d5
SM
76272017-05-30 Simon Marchi <simon.marchi@ericsson.com>
7628
7629 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
7630 "Removed targets and native configurations" up. Merge duplicate
7631 "New commands" sub-sections. Add "New options" sub-sections.
7632
b057297a
AH
76332017-05-26 Alan Hayward <alan.hayward@arm.com>
7634
7635 * defs.h (copy_integer_to_size): New declaration.
7636 * findvar.c (copy_integer_to_size): New function.
7637 (do_cint_test): New selftest function.
7638 (copy_integer_to_size_test): Likewise.
7639 (_initialize_findvar): Likewise.
7640 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7641 (mips_fbsd_collect_reg): Use raw_collect_integer.
7642 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7643 (mips64_fill_gregset): Use raw_collect_integer
7644 (mips64_fill_fpregset): Use raw_supply_integer.
7645 * regcache.c (regcache::raw_supply_integer): New function.
7646 (regcache::raw_collect_integer): Likewise.
7647 * regcache.h: (regcache::raw_supply_integer): New declaration.
7648 (regcache::raw_collect_integer): Likewise.
7649
b77b02a5
YQ
76502017-05-24 Yao Qi <yao.qi@linaro.org>
7651
7652 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7653 (COMMON_OBS): Add gdbarch-selftests.o.
7654 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7655 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7656 * gdbarch-selftests.c: New file.
7657 * regcache.h (regcache) <~regcache>: Mark it virtual if
7658 GDB_SELF_TEST.
7659 <raw_write>: Likewise.
7660
e521e87e
YQ
76612017-05-24 Yao Qi <yao.qi@linaro.org>
7662
7663 * regcache.c (current_regcache): Change it to
7664 regcache::current_regcache.
7665 (regcache_observer_target_changed): Update.
7666 (regcache_thread_ptid_changed): Make it a regcache static
7667 method.
7668 (regcache_thread_ptid_changed): Update.
7669 (class regcache_access): New.
7670 (current_regcache_test): Update.
7671 (_initialize_regcache): Update.
7672 * regcache.h: Include forward_list.
7673 (regcache): Declare regcache_thread_ptid_changed and declare
7674 registers_changed_ptid as friend.
7675
d8e07dda
YQ
76762017-05-24 Yao Qi <yao.qi@linaro.org>
7677
7678 * i387-tdep.c (i387_register_to_value): Use register_size
7679 instead of TYPE_LENGTH.
7680 * m68k-tdep.c (m68k_register_to_value): Likewise.
7681
8c8f9122
YQ
76822017-05-24 Yao Qi <yao.qi@linaro.org>
7683
7684 * i387-tdep.c (i387_convert_register_p): Return false if type
7685 code isn't TYPE_CODE_FLT.
7686
68fce50f
YQ
76872017-05-24 Yao Qi <yao.qi@linaro.org>
7688
7689 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7690 length is 4.
7691 (alpha_register_to_value): Remove type length check.
7692 (alpha_value_to_register): Likewise.
7693
88954b49
YQ
76942017-05-24 Yao Qi <yao.qi@linaro.org>
7695
7696 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7697 TYPE_CODE_FLT.
7698
e3ec9b69
YQ
76992017-05-24 Yao Qi <yao.qi@linaro.org>
7700
7701 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7702 TYPE_CODE_FLT or not.
7703
cdd238da
YQ
77042017-05-24 Yao Qi <yao.qi@linaro.org>
7705
7706 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7707 * avr-tdep.c (avr_gdbarch_init): Likewise.
7708 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7709 * cris-tdep.c (cris_gdbarch_init): Likewise.
7710 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7711 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7712 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7713 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7714 * mep-tdep.c (mep_gdbarch_init): Likewise.
7715 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7716 * mips-tdep.c (mips_gdbarch_init): Likewise.
7717 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7718 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7719 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7720 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7721 * v850-tdep.c (v850_gdbarch_init): Likewise.
7722
7a3929c4
YQ
77232017-05-24 Yao Qi <yao.qi@linaro.org>
7724
7725 * selftest-arch.c (tests_with_arch): Call registers_changed
7726 and reinit_frame_cache.
7727 * selftest.c (run_self_tests): Likewise.
7728
f4985dba
YQ
77292017-05-24 Yao Qi <yao.qi@linaro.org>
7730
7731 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7732 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7733
ab20fa4a
YQ
77342017-05-24 Yao Qi <yao.qi@linaro.org>
7735
7736 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7737 set_gdbarch_print_insn.
7738
f532ab94
YQ
77392017-05-24 Yao Qi <yao.qi@linaro.org>
7740
7741 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7742 set_gdbarch_print_insn.
7743
39503f82
YQ
77442017-05-24 Yao Qi <yao.qi@linaro.org>
7745
7746 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7747 set_gdbarch_print_insn.
7748 * arc-tdep.c (arc_gdbarch_init): Likewise.
7749 * arch-utils.c: include dis-asm.h.
7750 (default_print_insn): New function.
7751 * arch-utils.h (default_print_insn): Declare.
7752 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7753 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7754 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7755 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7756 * frv-tdep.c (frv_gdbarch_init): Likewise.
7757 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7758 * gdbarch.sh (print_insn): Use default_print_insn.
7759 * gdbarch.c: Regenerated.
7760 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7761 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7762 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7763 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7764 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7765 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7766 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7767 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7768 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7769 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7770 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7771 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7772 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7773 * mt-tdep.c (mt_gdbarch_init): Likewise.
7774 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7775 * nios2-tdep.c (nios2_print_insn): Remove.
7776 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7777 * rx-tdep.c (rx_gdbarch_init): Likewise.
7778 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7779 * score-tdep.c (score_print_insn): Remove.
7780 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7781 * sh-tdep.c (sh_gdbarch_init): Likewise.
7782 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7783 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7784 * tic6x-tdep.c (tic6x_print_insn): Remove.
7785 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7786 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7787 * v850-tdep.c (v850_gdbarch_init): Likewise.
7788 * vax-tdep.c (vax_gdbarch_init): Likewise.
7789 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7790 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7791
f7241d4f
JB
77922017-05-23 John Baldwin <jhb@FreeBSD.org>
7793
7794 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7795 (MIPS_FP0_REGNUM): Remove.
7796 (MIPS_FSR_REGNUM): Remove.
7797 (mips_fbsd_supply_fpregs): Use mips_regnum.
7798 (mips_fbsd_supply_gregs): Likewise.
7799 (mips_fbsd_collect_fpregs): Likewise.
7800 (mips_fbsd_collect_gregs): Likewise.
7801
d489d81d
JB
78022017-05-23 John Baldwin <jhb@FreeBSD.org>
7803
7804 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7805 (getpfpregs_supplies): New function.
7806 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7807 getfpregs_supplies.
7808 (mips_fbsd_store_inferior_registers): Likewise.
7809
e11b3cdc
PA
78102017-05-22 Pedro Alves <palves@redhat.com>
7811
7812 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7813 maintainer.
7814
0f068fb5
AH
78152017-05-22 Alan Hayward <alan.hayward@arm.com>
7816
7817 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7818 (store_register): Likewise.
7819 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7820 (get_decimal_float_return_value): Likewise.
7821 (do_ppc_sysv_return_value): Likewise.
7822 (ppc64_sysv_abi_push_integer): Likewise.
7823 (ppc64_sysv_abi_push_freg): Likewise.
7824 (ppc64_sysv_abi_return_value_base): Likewise.
7825 (ppc64_sysv_abi_return_value): Likewise.
7826 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7827 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7828 * rs6000-nat.c: Likewise.
7829 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7830 (rs6000_value_to_register): Likewise.
7831 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7832
e6cf65f2
TT
78332017-05-21 Tom Tromey <tom@tromey.com>
7834
7835 PR rust/21466:
7836 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7837 arrays as "[T]", not "[T; ]".
7838
43cc5389
TT
78392017-05-19 Tom Tromey <tom@tromey.com>
7840
7841 PR rust/21484:
7842 * rust-lang.c (exp_descriptor_rust): New function.
7843 (rust_language_defn): Use it.
7844 * p-lang.c (pascal_language_defn): Update.
7845 * opencl-lang.c (opencl_language_defn): Update.
7846 * objc-lang.c (objc_language_defn): Update.
7847 * m2-lang.c (m2_language_defn): Update.
7848 * language.h (struct language_defn)
7849 <la_watch_location_expression>: New member.
7850 * language.c (unknown_language_defn, auto_language_defn)
7851 (local_language_defn): Update.
7852 * go-lang.c (go_language_defn): Update.
7853 * f-lang.c (f_language_defn): Update.
7854 * d-lang.c (d_language_defn): Update.
7855 * c-lang.h (c_watch_location_expression): Declare.
7856 * c-lang.c (c_watch_location_expression): New function.
7857 (c_language_defn, cplus_language_defn, asm_language_defn)
7858 (minimal_language_defn): Use it.
7859 * breakpoint.c (watch_command_1): Call
7860 la_watch_location_expression.
7861 * ada-lang.c (ada_language_defn): Update.
7862
7a6e7fcc
RO
78632017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7864
6e7e1744
RO
7865 PR tui/21482
7866 * gdb_curses.h (NOMACROS): Define.
7867 (NCURSES_NOMACROS): Define.
7868
78692017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7870
7871 PR tui/21482
7a6e7fcc
RO
7872 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7873 arg to char *.
7874 * tui/tui-wingeneral.c (box_win): Likewise.
7875 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7876 (tui_show_source_line): Likewise.
7877 (tui_show_exec_info_content): Likewise.
7878
1933fd8e
VM
78792017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7880
7881 * sparc-tdep.c (sparc_structure_return_p)
7882 (sparc_arg_on_registers_p): New functions.
7883 (sparc32_store_arguments): Use them.
7884 * sparc64-tdep.c (sparc64_16_byte_align_p)
7885 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7886 Handle TYPE_CODE_ARRAY.
7887
21873064
YQ
78882017-05-17 Yao Qi <yao.qi@linaro.org>
7889
7890 * cli/cli-decode.c (add_alias_cmd): New function.
7891 * command.h (add_alias_cmd): Declare.
7892 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7893 instead call add_alias_cmd.
7894
2b351b19
PA
78952017-05-17 Pedro Alves <palves@redhat.com>
7896
7897 * Makefile.in (nat_extra_makefile_frag): Rename to ...
7898 (nat_makefile_frag): ... this. All references updated.
7899 * configure.ac: Likewise.
7900 * configure.nat: Likewise. Enhance comments.
7901 * configure: Regenerate.
7902
5f2ad7a3
RO
79032017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7904
7905 * procfs.c (procfs_create_inferior): Change prototype to match
7906 definition.
7907
adf3dde5
EZ
79082017-05-13 Eli Zaretskii <eliz@gnu.org>
7909
7910 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7911 C++ compiler warning.
7912
6830f270
TT
79132017-05-12 Tom Tromey <tom@tromey.com>
7914
7915 PR rust/21483:
7916 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7917 recurse, just call value_struct_elt directly.
7918
68f2f2e3
TT
79192017-05-12 Tom Tromey <tom@tromey.com>
7920
7921 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7922 OP_RUST_ARRAY>: Fix.
7923
256afbc2
TT
79242017-05-12 Tom Tromey <tom@tromey.com>
7925
7926 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7927
94bb8dfe
YQ
79282017-05-09 Yao Qi <yao.qi@linaro.org>
7929
7930 * regcache.c: Include <forward_list>.
7931 (struct regcache_list): Remove.
7932 (current_regcache): Update.
7933 (get_thread_arch_aspace_regcache): Update for std::forward_list.
7934 (regcache_thread_ptid_changed): Likewise.
7935 (registers_changed_ptid): Likewise.
7936 (current_regcache_size): Likewise.
7937
8248946c
YQ
79382017-05-09 Yao Qi <yao.qi@linaro.org>
7939
7940 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7941 (current_regcache_size): New function.
7942 (current_regcache_test): New function.
7943 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7944
313c5961
AH
79452017-05-08 Alan Hayward <alan.hayward@arm.com>
7946
7947 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7948 (print_gp_register_row): Use get_frame_register_value.
7949
27bfc1d1
AH
79502017-05-08 Alan Hayward <alan.hayward@arm.com>
7951
7952 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7953 (mips_supply_fpregset): Likewise.
7954 (mips64_supply_gregset): Likewise.
7955
146e6c5c
AH
79562017-05-08 Alan Hayward <alan.hayward@arm.com>
7957
7958 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
7959 regcache->raw_supply_zeroed.
7960
e50f25ec
SDJ
79612017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7962
7963 * configure.nat: Rearrange 'case' statements to match
7964 host before cpu.
7965
21ea5acd
SDJ
79662017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7967
7968 * Makefile.in: Remove "@host_makefile_frag@". Add variables
7969 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7970 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
7971 "@nat_extra_makefile_frag@".
7972 (Makefile): Remove dependency on "@frags@".
7973 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7974 (data-directory/Makefile): Likewise.
7975 * config/aarch64/linux.mh: Deleted; moved contents to
7976 "gdb/configure.nat".
7977 * config/alpha/alpha-linux.mh: Likewise.
7978 * config/alpha/nbsd.mh: Likewise.
7979 * config/arm/linux.mh: Likewise.
7980 * config/arm/nbsdelf.mh: Likewise.
7981 * config/i386/cygwin.mh: Likewise.
7982 * config/i386/cygwin64.mh: Likewise.
7983 * config/i386/darwin.mh: Likewise.
7984 * config/i386/fbsd.mh: Likewise.
7985 * config/i386/fbsd64.mh: Likewise.
7986 * config/i386/go32.mh: Likewise.
7987 * config/i386/i386gnu.mh: Likewise.
7988 * config/i386/i386sol2.mh: Likewise.
7989 * config/i386/linux.mh: Likewise.
7990 * config/i386/linux64.mh: Likewise.
7991 * config/i386/mingw.mh: Likewise.
7992 * config/i386/mingw64.mh: Likewise.
7993 * config/i386/nbsd64.mh: Likewise.
7994 * config/i386/nbsdelf.mh: Likewise.
7995 * config/i386/nto.mh: Likewise.
7996 * config/i386/obsd.mh: Likewise.
7997 * config/i386/obsd64.mh: Likewise.
7998 * config/i386/sol2-64.mh: Likewise.
7999 * config/ia64/linux.mh: Likewise.
8000 * config/m32r/linux.mh: Likewise.
8001 * config/m68k/linux.mh: Likewise.
8002 * config/m68k/nbsdelf.mh: Likewise.
8003 * config/m68k/obsd.mh: Likewise.
8004 * config/m88k/obsd.mh: Likewise.
8005 * config/mips/fbsd.mh: Likewise.
8006 * config/mips/linux.mh: Likewise.
8007 * config/mips/nbsd.mh: Likewise.
8008 * config/mips/obsd64.mh: Likewise.
8009 * config/pa/linux.mh: Likewise.
8010 * config/pa/nbsd.mh: Likewise.
8011 * config/pa/obsd.mh: Likewise.
8012 * config/powerpc/aix.mh: Likewise.
8013 * config/powerpc/fbsd.mh: Likewise.
8014 * config/powerpc/linux.mh: Likewise.
8015 * config/powerpc/nbsd.mh: Likewise.
8016 * config/powerpc/obsd.mh: Likewise.
8017 * config/powerpc/ppc64-linux.mh: Likewise.
8018 * config/powerpc/spu-linux.mh: Likewise.
8019 * config/s390/linux.mh: Likewise.
8020 * config/sh/nbsd.mh: Likewise.
8021 * config/sparc/fbsd.mh: Likewise.
8022 * config/sparc/linux.mh: Likewise.
8023 * config/sparc/linux64.mh: Likewise.
8024 * config/sparc/nbsd64.mh: Likewise.
8025 * config/sparc/nbsdelf.mh: Likewise.
8026 * config/sparc/obsd64.mh: Likewise.
8027 * config/sparc/sol2.mh: Likewise.
8028 * config/tilegx/linux.mh: Likewise.
8029 * config/vax/nbsdelf.mh: Likewise.
8030 * config/vax/obsd.mh: Likewise.
8031 * config/xtensa/linux.mh: Likewise.
8032 * config/i386/i386gnu.mn: New file, with excerpts from
8033 "config/i386/i386gnu.mh".
8034 * configure: Regenerate.
8035 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8036 *.mh files under "gdb/config".
8037 * configure.nat: New file, with contents from the
8038 "gdb/config/*/*.mh" files.
8039
7ed1acaf
TW
80402017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8041
8042 * btrace.c (btrace_clear): Free insn vector.
8043
e13cb306
PA
80442017-05-05 Pedro Alves <palves@redhat.com>
8045
8046 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8047 * configure: Regenerate.
8048
5ed8105e
PA
80492017-05-04 Pedro Alves <palves@redhat.com>
8050
8051 * Makefile.in (SFILES): Add progspace-and-thread.c.
8052 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8053 (COMMON_OBS): Add progspace-and-thread.o.
8054 * breakpoint.c: Include "progspace-and-thread.h".
8055 (update_inserted_breakpoint_locations)
8056 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8057 Use scoped_restore_current_pspace_and_thread.
8058 (create_std_terminate_master_breakpoint): Use
8059 scoped_restore_current_program_space.
8060 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8061 (print_breakpoint_location): Use
8062 scoped_restore_current_program_space.
8063 (bp_loc_is_permanent): Use
8064 scoped_restore_current_pspace_and_thread.
8065 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8066 (download_tracepoint_locations): Use
8067 scoped_restore_current_pspace_and_thread.
8068 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8069 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8070 (enum step_over_calls_kind): Moved from inferior.h.
8071 (class scoped_restore_current_thread): New class.
8072 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8073 declaration.
8074 (scoped_restore_current_thread): New class.
8075 * infcmd.c: Include "common/gdb_optional.h".
8076 (continue_1, proceed_after_attach): Use
8077 scoped_restore_current_thread.
8078 (notice_new_inferior): Use scoped_restore_current_thread.
8079 * inferior.c: Include "progspace-and-thread.h".
8080 (restore_inferior, save_current_inferior): Delete.
8081 (add_inferior_command, clone_inferior_command): Use
8082 scoped_restore_current_pspace_and_thread.
8083 * inferior.h (scoped_restore_current_inferior): New class.
8084 * infrun.c: Include "progspace-and-thread.h" and
8085 "common/gdb_optional.h".
8086 (follow_fork_inferior): Use
8087 scoped_restore_current_pspace_and_thread.
8088 (scoped_restore_exited_inferior): New class.
8089 (handle_vfork_child_exec_or_exit): Use
8090 scoped_restore_exited_inferior,
8091 scoped_restore_current_pspace_and_thread,
8092 scoped_restore_current_thread and scoped_restore.
8093 (fetch_inferior_event): Use scoped_restore_current_thread.
8094 * linespec.c (decode_line_full, decode_line_1): Use
8095 scoped_restore_current_program_space.
8096 * mi/mi-main.c: Include "progspace-and-thread.h".
8097 (exec_continue): Use scoped_restore_current_thread.
8098 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8099 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8100 * proc-service.c (ps_pglobal_lookup): Use
8101 scoped_restore_current_program_space.
8102 * progspace-and-thread.c: New file.
8103 * progspace-and-thread.h: New file.
8104 * progspace.c (release_program_space, clone_program_space): Use
8105 scoped_restore_current_program_space.
8106 (restore_program_space, save_current_program_space)
8107 (save_current_space_and_thread): Delete.
8108 (switch_to_program_space_and_thread): Moved to
8109 progspace-and-thread.c.
8110 * progspace.h (save_current_program_space)
8111 (save_current_space_and_thread): Delete declarations.
8112 (scoped_restore_current_program_space): New class.
8113 * remote.c (remote_btrace_maybe_reopen): Use
8114 scoped_restore_current_thread.
8115 * symtab.c: Include "progspace-and-thread.h".
8116 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8117 * thread.c (print_thread_info_1): Use
8118 scoped_restore_current_thread.
8119 (struct current_thread_cleanup): Delete.
8120 (do_restore_current_thread_cleanup)
8121 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8122 (scoped_restore_current_thread::~scoped_restore_current_thread):
8123 ... this new dtor.
8124 (make_cleanup_restore_current_thread): Rename/convert to ...
8125 (scoped_restore_current_thread::scoped_restore_current_thread):
8126 ... this new ctor.
8127 (thread_apply_all_command): Use scoped_restore_current_thread.
8128 (thread_apply_command): Use scoped_restore_current_thread.
8129 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8130 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8131
f6223dbb
PA
81322017-05-04 Pedro Alves <palves@redhat.com>
8133
8134 * thread.c (make_cleanup_restore_current_thread): Move
8135 find_thread_ptid call before the is_stopped call. Assert that the
8136 thread is found. Replace is_stopped call by checking the thread's
8137 state directly. Remove unnecessary NULL-thread check.
8138
3c3ae77e
PA
81392017-05-04 Pedro Alves <palves@redhat.com>
8140
8141 * corelow.c (thread_section_name): New class.
8142 (get_core_register_section, get_core_siginfo): Use it.
8143
45eba0ab
AA
81442017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
8145
8146 * corelow.c (sniff_core_bfd): Remove extra semicolon.
8147 (get_core_register_section): Remove xfree of NULL pointer.
8148
f81fdd35
AH
81492017-05-03 Alan Hayward <alan.hayward@arm.com>
8150
8151 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8152 * regcache.c (regcache::raw_supply_zeroed): New function.
8153 * regcache.h (regcache::raw_supply_zeroed): New declaration.
8154
35837774
SM
81552017-05-03 Simon Marchi <simon.marchi@ericsson.com>
8156
8157 * gdbarch.sh: Remove commented out definition of
8158 TARGET_CHAR_BIT.
8159 * gdbarch.h: Re-generate.
8160
c94fee56
SDJ
81612017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
8162
8163 * configure: Regenerate.
8164
d17f7b36
SM
81652017-05-02 Simon Marchi <simon.marchi@ericsson.com>
8166
8167 * solib-target.c (solib_target_relocate_section_addresses):
8168 Remove num_section_bases, num_bases, segment_bases variables.
8169
b560ebd6
SM
81702017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8171
8172 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8173
f2f46dfc
SM
81742017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8175
8176 * solib-target.c: Include <vector>
8177 (struct lm_info_target) <~lm_info_target>: Remove.
8178 <segment_bases, section_bases>: Change type to
8179 std::vector<CORE_ADDR>.
8180 (library_list_start_segment, library_list_start_section,
8181 library_list_end_library,
8182 solib_target_relocate_section_addresses): Adjust.
8183
a0ff9e1a
SM
81842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8185
8186 * gdbarch.sh (software_single_step): Change return type to
8187 std::vector<CORE_ADDR>.
8188 * gdbarch.c, gdbarch.h: Re-generate.
8189 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8190 Adjust.
8191 (arm_deal_with_atomic_sequence_raw): Adjust.
8192 (thumb_get_next_pcs_raw): Adjust.
8193 (arm_get_next_pcs_raw): Adjust.
8194 (arm_get_next_pcs): Adjust.
8195 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8196 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8197 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8198 (alpha_software_single_step): Adjust.
8199 * alpha-tdep.h (alpha_software_single_step): Adjust.
8200 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8201 * arm-tdep.c (arm_software_single_step): Adjust.
8202 (arm_breakpoint_kind_from_current_state): Adjust.
8203 * arm-tdep.h (arm_software_single_step): Adjust.
8204 * breakpoint.c (insert_single_step_breakpoint): Adjust.
8205 * cris-tdep.c (cris_software_single_step): Adjust.
8206 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8207 (micromips_deal_with_atomic_sequence): Adjust.
8208 (deal_with_atomic_sequence): Adjust.
8209 (mips_software_single_step): Adjust.
8210 * mips-tdep.h (mips_software_single_step): Adjust.
8211 * moxie-tdep.c (moxie_software_single_step): Adjust.
8212 * nios2-tdep.c (nios2_software_single_step): Adjust.
8213 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8214 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8215 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8216 * s390-linux-tdep.c (s390_software_single_step): Adjust.
8217 * sparc-tdep.c (sparc_software_single_step): Adjust.
8218 * spu-tdep.c (spu_software_single_step): Adjust.
8219 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8220
ea480a30
SM
82212017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8222
8223 * gdbarch.sh: Use semi-colon as field separator instead of colon.
8224 * gdbarch.h: Re-generate.
8225
d050f7d7
TW
82262017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8227
8228 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8229 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8230 * python/py-instruction.c, python/py-instruction.h: New file.
8231 * python/py-record.c: Add py-instruction.h include.
8232 (gdbpy_initialize_record): Make gdb.Instruction a super class of
8233 gdb.RecordInstruction.
8234 * python/python-internal.h: Add gdbpy_initialize_instruction
8235 declaration.
8236 * python/python.c (do_start_initialization): Add
8237 gdbpy_initialize_instruction.
8238
14f819c8
TW
82392017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8240
8241 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8242 Remove.
8243 (btrace_func_from_recpy_func): New function.
8244 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8245 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8246 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8247 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8248 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8249 Also, use new helper functions.
8250 (btpy_list_item): Use new helper functions.
8251 (recpy_bt_function_call_history): Use new type name.
8252 (btpy_call_getset): Remove.
8253 (gdbpy_initialize_btrace): Remove code to initialize
8254 gdb.BtraceFunctionCall.
8255 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8256 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8257 recpy_bt_func_prev, recpy_bt_func_next): New export.
8258 * python/py-record.c (recpy_func_type): New static object.
8259 (recpy_func_new, recpy_func_level, recpy_func_symbol,
8260 recpy_func_instructions, recpy_func_up, recpy_func_prev,
8261 recpy_func_next): New function.
8262 (recpy_element_hash, recpy_element_richcompare): Updated comment.
8263 (recpy_func_getset): New static object.
8264 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8265 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8266
0ed5da75
TW
82672017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8268
8269 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8270 (btpy_object, btpy_insn_type, btpy_new): Remove.
8271 (btpy_list_object): Use gdb.RecordInstruction type instead of
8272 gdb.BtraceInstruction type.
8273 (btrace_insn_from_recpy_insn): New function.
8274 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8275 btpy_new.
8276 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8277 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8278 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8279 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8280 instead of btpy_object.
8281 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8282 btpy_insn_data, btpy_insn_decode): Rename to ...
8283 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8284 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8285 recpy_bt_insn_decode): This. Also, use new helper functions.
8286 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8287 recpy_insn_type.
8288 (btpy_insn_getset): Remove.
8289 (gdbpy_initialize_btrace): Remove code to initialize
8290 gdb.BtraceInstruction. Use recpy_element_object.
8291 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8292 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8293 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8294 * python/py-record.c (recpy_insn_type): New static object.
8295 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8296 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8297 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8298 New function.
8299 (recpy_insn_getset): New static object.
8300 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8301 * python/py-record.h (recpy_element_object): New typedef.
8302 (recpy_insn_type, recpy_insn_new): New export.
8303
913aeadd
TW
83042017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8305
8306 * py-record-btrace.c (btpy_insn_new): Removed.
8307 (btpy_insn_or_gap_new): New function.
8308 (btpy_insn_error): Removed.
8309 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8310 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8311 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8312 btpy_insn_or_gap_new instead of btpy_insn_new.
8313 (btpy_insn_getset): Remove btpy_insn_error.
8314 * py-record.c (recpy_gap_type): New static object.
8315 (recpy_gap_object): New typedef.
8316 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8317 recpy_gap_reason_string): New function.
8318 (recpy_gap_getset): New static object.
8319 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8320 * py-record.h (recpy_gap_new): New export.
8321
a3be24ad
TW
83222017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8323
8324 * python/py-record.c (recpy_ptid): Remove.
8325 (recpy_record_getset): Remove recpy_ptid.
8326
ae20e79a
TW
83272017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8328
8329 * btrace.c (btrace_fetch): Set inferior_ptid.
8330 * python/py-record-btrace.c: Add "py-record.h" include.
8331 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8332 recpy_bt_end, recpy_bt_instruction_history,
8333 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8334 in gdb.Record object instead of current ptid.
8335 * python/py-record.c: Include new "py-record.h" file.
8336 (recpy_record_object): Moved to py-record.h.
8337 * python/py-record.h: New file.
8338
8d0050ea
TW
83392017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8340
8341 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8342 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8343 indentation.
8344
3f380b50
JB
83452017-05-01 Joel Brobecker <brobecker@adacore.com>
8346
8347 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8348 the past maintainers section.
8349
07495424
YQ
83502017-04-28 Yao Qi <yao.qi@linaro.org>
8351
8352 * infcmd.c (get_return_value): Use regcache ctor, and remove
8353 cleanup.
8354
deb1fa3e
YQ
83552017-04-28 Yao Qi <yao.qi@linaro.org>
8356 Pedro Alves <palves@redhat.com>
8357
8358 * regcache.c (regcache::regcache): New tag dispatch ctor.
8359 (do_cooked_read): Moved above.
8360 (regcache_dup): Use the tag dispatch ctor..
8361 * regcache.h (regcache): Declare ctor, delete copy ctor and
8362 assignment operator, remove friend regcache_dup.
8363
b421c83c
YQ
83642017-04-28 Yao Qi <yao.qi@linaro.org>
8365
8366 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8367 call method save instead of regcache_cpy.
8368 * regcache.h (struct regcache): Make regcache_dup a friend.
8369
ef79d9a3
YQ
83702017-04-28 Yao Qi <yao.qi@linaro.org>
8371
8372 * regcache.c (struct regcache): Move to regcache.h
8373 (regcache::arch): New method.
8374 (regcache_get_ptid): Update.
8375 (get_regcache_arch): Call arch method.
8376 (get_regcache_aspace): Call method aspace.
8377 (register_buffer): Change it to method.
8378 (regcache_save): Change it to regcache::save.
8379 (regcache_restore): Likewise.
8380 (regcache_cpy_no_passthrough): Remove the declaration.
8381 (regcache_cpy): Call methods restore and cpy_no_passthrough.
8382 (regcache_cpy_no_passthrough): Change it to method
8383 cpy_no_passthrough.
8384 (regcache_register_status): Change it to method
8385 get_register_status.
8386 (regcache_invalidate): Change it to method invalidate.
8387 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8388 (regcache_raw_update): Change it to method raw_update.
8389 (regcache_raw_read): Likewise.
8390 (regcache_raw_read_signed): Likewise.
8391 (regcache_raw_read_unsigned): Likewise.
8392 (regcache_raw_write_signed): Likewise.
8393 (regcache_raw_write_unsigned): Likewise.
8394 (regcache_cooked_read): Likewise.
8395 (regcache_cooked_read_value): Likewise.
8396 (regcache_cooked_read_signed): Likewise.
8397 (regcache_cooked_read_unsigned): Likewise.
8398 (regcache_cooked_write_signed): Likewise.
8399 (regcache_cooked_write_unsigned): Likewise.
8400 (regcache_raw_set_cached_value): Likewise.
8401 (regcache_raw_write): Likewise.
8402 (regcache_cooked_write): Likewise.
8403 (regcache_xfer_part): Likewise.
8404 (regcache_raw_read_part): Likewise.
8405 (regcache_raw_write_part): Likewise.
8406 (regcache_cooked_read_part): Likewise.
8407 (regcache_cooked_write_part): Likewise.
8408 (regcache_raw_supply): Likewise.
8409 (regcache_raw_collect): Likewise.
8410 (regcache_transfer_regset): Likewise.
8411 (regcache_supply_regset): Likewise.
8412 (regcache_collect_regset): Likewise.
8413 (regcache_debug_print_register): Likewise.
8414 (enum regcache_dump_what): Move it to regcache.h.
8415 (regcache_dump): Change it to method dump.
8416 * regcache.h (enum regcache_dump_what): New.
8417 (class regcache): New.
8418 * target.c (target_fetch_registers): Call method
8419 debug_print_register.
8420 (target_store_registers): Likewise.
8421
f8fdb78e
SM
84222017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8423
8424 * windows-nat.c (struct lm_info_windows): Initialize field.
8425 (windows_make_so): Allocate lm_info_windows with new.
8426 (windows_free_so): Free lm_info_windows with delete.
8427
9ccbfd7b
SM
84282017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8429
8430 * solib-darwin.c (struct lm_info_darwin): Initialize field.
8431 (darwin_current_sos): Allocate lm_info_darwin with new, remove
8432 cleanup.
8433 (darwin_free_so): Free lm_info_darwin with delete.
8434
76e75227
SM
84352017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8436
8437 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8438 <l_addr_p>: Change type to bool.
8439 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8440 (svr4_free_so): Free lm_info_svr4 with delete.
8441 (svr4_copy_library_list): Replace memcpy with call to copy
8442 constructor.
8443 (library_list_start_library, svr4_default_sos): Allocate
8444 lm_info_svr4 with new.
8445
51046d9e
SM
84462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8447
8448 * solib-target.c (struct lm_info_target): Add destructor,
8449 initialize fields.
8450 <name>: Change type to std::string.
8451 (library_list_start_library): Allocate lm_info_target with new.
8452 (solib_target_free_library_list): Free lm_info_target with
8453 delete.
8454 (solib_target_current_sos): Adapt to std::string.
8455 (solib_target_free_so): Free lm_info_target with delete.
8456
4023ae76
SM
84572017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8458
8459 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8460 fields.
8461 (frv_current_sos): Allocate lm_info_frv with new.
8462 (frv_relocate_main_executable): Free lm_info_frv with delete,
8463 allocate with new.
8464 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8465
af43057b
SM
84662017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8467
8468 * solib-frv.c (struct lm_info_frv): Fix indentation.
8469
b0911207
SM
84702017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8471
8472 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8473 map field.
8474 (dsbt_current_sos): Allocate lm_info_dsbt with new.
8475 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8476 and allocate with new.
8477 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8478
6c401f72
SM
84792017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8480
8481 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8482 <filename, member_name>: Change type to std::string.
8483 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8484 (library_list_start_library): Allocate lm_info_aix with new.
8485 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8486 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8487 with copy constructor.
8488
d0e449a1
SM
84892017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8490
8491 * solist.h (struct lm_info): Remove.
8492 (struct lm_info_base): New class.
8493 (struct so_list) <lm_info>: Change type to lm_info_base *.
8494 * nto-tdep.c (struct lm_info): Remove.
8495 (lm_addr): Adjust.
8496 * solib-aix.c (struct lm_info): Rename to ...
8497 (struct lm_info_aix): ... this. Extend lm_info_base.
8498 (lm_info_p): Rename to ...
8499 (lm_info_aix_p): ... this, and adjust.
8500 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8501 solib_aix_parse_libraries, library_list_start_library,
8502 solib_aix_free_library_list, solib_aix_parse_libraries,
8503 solib_aix_get_library_list,
8504 solib_aix_relocate_section_addresses, solib_aix_free_so,
8505 solib_aix_get_section_offsets,
8506 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8507 Adjust.
8508 (struct solib_aix_inferior_data) <library_list>: Adjust.
8509 * solib-darwin.c (struct lm_info): Rename to ...
8510 (struct lm_info_darwin): ... this. Extend lm_info_base.
8511 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8512 * solib-dsbt.c (struct lm_info): Rename to ...
8513 (struct lm_info_dsbt): ... this. Extend lm_info_base.
8514 (struct dsbt_info) <main_executable_lm_info): Adjust.
8515 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8516 dsbt_relocate_section_addresses): Adjust.
8517 * solib-frv.c (struct lm_info): Rename to ...
8518 (struct lm_info_frv): ... this. Extend lm_info_base.
8519 (main_executable_lm_info): Adjust.
8520 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8521 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8522 find_canonical_descriptor_in_load_object,
8523 frv_fdpic_find_canonical_descriptor): Adjust.
8524 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8525 to lm_info_svr4.
8526 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8527 svr4_clear_so, svr4_copy_library_list,
8528 library_list_start_library, svr4_default_sos, svr4_read_so_list,
8529 svr4_current_sos, svr4_fetch_objfile_link_map,
8530 solist_update_incremental): Adjust.
8531 * solib-svr4.h (struct lm_info_svr4): Move here from
8532 solib-svr4.c.
8533 * solib-target.c (struct lm_info): Rename to ...
8534 (struct lm_info_target): ... this. Extend lm_info_base.
8535 (lm_info_p): Rename to ...
8536 (lm_info_target_p): ... this.
8537 (solib_target_parse_libraries, library_list_start_segment,
8538 library_list_start_section, library_list_start_library,
8539 library_list_end_library, solib_target_free_library_list,
8540 solib_target_current_sos, solib_target_free_so,
8541 solib_target_relocate_section_addresses): Adjust.
8542 * windows-nat.c (struct lm_info): Rename to ...
8543 (struct lm_info_windows): ... this. Extend lm_info_base.
8544 (windows_make_so, handle_load_dll, handle_unload_dll,
8545 windows_xfer_shared_libraries): Adjust.
8546
434a4023
SM
85472017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8548
8549 * solib-darwin.c (struct darwin_so_list): Remove.
8550 (darwin_current_sos): Allocate an so_list object instead of a
8551 darwin_so_list, separately allocate an lm_info object.
8552 (darwin_free_so): Free lm_info.
8553
428544e8
JB
85542017-04-28 John Baldwin <jhb@FreeBSD.org>
8555
8556 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8557 with fprintf_filtered.
8558
4621115f
YQ
85592017-04-28 Yao Qi <yao.qi@linaro.org>
8560
8561 * regcache.c (regcache::regcache): New function.
8562 (regcache::~regcache): New function.
8563 (regcache_xmalloc_1): Remove.
8564 (regcache_xmalloc): Call new regcache.
8565 (regcache_xfree): Call delete regcache.
8566 (get_thread_arch_aspace_regcache): Call new regcache.
8567
339053c2
YQ
85682017-04-28 Yao Qi <yao.qi@linaro.org>
8569
8570 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8571 lwp instead of ptid_get_lwp.
8572
7974a605
YQ
85732017-04-28 Yao Qi <yao.qi@linaro.org>
8574
8575 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8576 lwp_info instead of getting from inferior_ptid.
8577
e15c3eb4
KS
85782017-04-27 Keith Seitz <keiths@redhat.com>
8579
8580 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8581 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8582 (CV_CONVERSION_BADNESS): Define.
8583 (rank_one_type): Remove overly restrictive rvalue reference
8584 rank checks.
8585 Add cv-qualifier checks and subranks for type equality.
8586 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8587 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8588 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8589
72bc1d24
SM
85902017-04-27 Simon Marchi <simon.marchi@ericsson.com>
8591
8592 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8593 count when creating the object.
8594
55bcecda
UW
85952017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8596 Ulrich Weigand <uweigand@de.ibm.com>
8597
8598 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8599 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8600 is used in AIX.
8601 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8602 (process_xcoff_symbol): Likewise.
8603 (scan_xcoff_symtab): Likewise.
8604
5c99fcf8
AH
86052017-04-26 Alan Hayward <alan.hayward@arm.com>
8606
8607 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8608 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8609 (ia64_access_reg): Use get_frame_register_unsigned.
8610 (ia64_access_rse_reg): Likewise.
8611 (ia64_libunwind_frame_prev_register): Likewise.
8612
b41c5a85
JW
86132017-04-26 Jiong Wang <jiong.wang@arm.com>
8614
8615 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8616 * gdbarch.c: Regenerated.
8617 * gdbarch.h: Regenerated.
8618 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8619 visibility external.
8620 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8621 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8622 (enum cfa_how_kind): Move to ...
8623 (struct dwarf2_frame_state_reg_info): Likewise.
8624 (struct dwarf2_frame_state): Likewise.
8625 * dwarf2-frame.h: ... here.
8626 (dwarf2_frame_state_alloc_regs): New declaration.
8627 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8628 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8629
c185f580
AH
86302017-04-26 Alan Hayward <alan.hayward@arm.com>
8631
8632 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8633 regcache_raw_read_unsigned.
8634 (xtensa_pseudo_register_write): Likewise.
8635
19c45594
AH
86362017-04-26 Alan Hayward <alan.hayward@arm.com>
8637
8638 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8639 (nds32_pseudo_register_write): Likewise.
8640
4658f12e
YQ
86412017-04-25 Yao Qi <yao.qi@linaro.org>
8642
8643 * regcache.c (struct regcache) <readonly_p>: Change its type
8644 to bool.
8645 (regcache_xmalloc_1): Update parameter type and callers update.
8646
d581dda8
YQ
86472017-04-25 Yao Qi <yao.qi@linaro.org>
8648
8649 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8650 set_gdbarch_wchar_bit.
8651 * arm-tdep.c (arm_gdbarch_init): Likewise.
8652
debed3db
PA
86532017-04-25 Pedro Alves <palves@redhat.com>
8654
8655 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8656 (BothAreRelocatable, memcopy, memmove): Don't define.
8657 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8658 macros.
8659
b0b92aeb
PA
86602017-04-25 Pedro Alves <palves@redhat.com>
8661
8662 * common/common-defs.h: Include "common/poison.h".
8663 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8664 and adjust.
8665 * common/poison.h: New file.
8666 * common/traits.h: Include <type_traits>.
8667 (Not, Or, Requires): New, moved from common/function-view.h.
8668
16c4d54a
PA
86692017-04-25 Pedro Alves <palves@redhat.com>
8670
8671 * breakpoint.h (struct breakpoint): In-class initialize all
8672 fields. Make boolean fields "bool".
8673 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8674 memset call and initializations no longer necessary.
8675
b5c36682
PA
86762017-04-25 Pedro Alves <palves@redhat.com>
8677
8678 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8679 reference.
8680 (pt_btrace_insn): New function.
8681 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8682
5625a286
PA
86832017-04-25 Pedro Alves <palves@redhat.com>
8684
8685 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8686 "base" field and inherit from "bp_location" instead. Add
8687 non-default ctor.
8688 (allocate_location_exception): Use new non-default ctor.
8689 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8690 (init_bp_location): Convert to ...
8691 (bp_location::bp_location): ... this new ctor, and remove memset
8692 call.
8693 (base_breakpoint_allocate_location): Use the new non-default ctor.
8694 * breakpoint.h (bp_location): Now a class. Declare default and
8695 non-default ctors. In-class initialize all members.
8696 (init_bp_location): Remove declaration.
8697
23bcc18f
PA
86982017-04-25 Pedro Alves <palves@redhat.com>
8699
8700 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8701 assignment operator.
8702
e1ba3053
YQ
87032017-04-24 Yao Qi <yao.qi@linaro.org>
8704
8705 * doublest.c (convert_doublest_to_floatformat): Call
8706 floatformat_totalsize_bytes.
8707
10f489e5
TT
87082017-04-22 Tom Tromey <tom@tromey.com>
8709
8710 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8711 ui_out_emit_list.
8712 * stack.c (print_frame): Use ui_out_emit_list.
8713 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8714 ui_out_emit_list.
8715 * mi/mi-main.c (print_one_inferior)
8716 (mi_cmd_data_list_register_names)
8717 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8718 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8719 ui_out_emit_list.
8720 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8721 (mi_output_solib_attribs): Use ui_out_emit_list,
8722 ui_out_emit_tuple.
8723 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8724 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8725 (mi_cmd_stack_list_args, list_args_or_locals): Use
8726 ui_out_emit_list.
8727 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8728 * breakpoint.c (print_solib_event, output_thread_groups): Use
8729 ui_out_emit_list.
8730
0092b74d
TT
87312017-04-22 Tom Tromey <tom@tromey.com>
8732
8733 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8734 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8735 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8736
a14a62dd
TT
87372017-04-22 Tom Tromey <tom@tromey.com>
8738
8739 * tracepoint.c (tvariables_info_1)
8740 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8741
46b9c129
TT
87422017-04-22 Tom Tromey <tom@tromey.com>
8743
8744 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8745 annotate_arg_emitter.
8746 * breakpoint.c (print_mention_watchpoint)
8747 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8748 * annotate.h (struct annotate_arg_emitter): New.
8749
2e783024
TT
87502017-04-22 Tom Tromey <tom@tromey.com>
8751
8752 * record-btrace.c (record_btrace_insn_history)
8753 (record_btrace_insn_history_range, record_btrace_call_history)
8754 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8755 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8756 ui_out_emit_tuple.
8757 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8758 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8759 * skip.c (skip_info): Use ui_out_emit_tuple.
8760 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8761 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8762 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8763 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8764 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8765 ui_out_emit_tuple.
8766 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8767 (output_register, mi_cmd_data_read_memory)
8768 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8769 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8770 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8771 Use ui_out_emit_tuple.
8772 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8773 ui_out_emit_tuple.
8774 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8775 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8776 * linux-thread-db.c (info_auto_load_libthread_db): Use
8777 ui_out_emit_tuple.
8778 * inferior.c (print_inferior): Use ui_out_emit_tuple.
8779 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8780 * disasm.c (do_mixed_source_and_assembly_deprecated)
8781 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8782 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8783 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8784 * breakpoint.c (print_one_breakpoint_location)
8785 (print_one_breakpoint): Use ui_out_emit_tuple.
8786 * auto-load.c (print_script, info_auto_load_cmd): Use
8787 ui_out_emit_tuple.
8788 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8789
9be21bb4
SM
87902017-04-21 Simon Marchi <simon.marchi@ericsson.com>
8791
8792 * thread.c (print_thread_info_1): Remove dead code.
8793
0d4c07af
JK
87942017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8795
8796 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8797 GDB_SELF_TEST.
8798 * arm-tdep.c (selftests::arm_record_test): Likewise.
8799
4daf993d
YQ
88002017-04-21 Yao Qi <yao.qi@linaro.org>
8801
8802 * regcache.c (regcache_restore): Remove argument 2. Replace
8803 argument 3 with regcache. Get register status from
8804 src->register_status and get register contents from
8805 register_buffer (src, regnum).
8806 (regcache_cpy): Update.
8807
a6c21d4a
PA
88082017-04-19 Pedro Alves <palves@redhat.com>
8809
8810 * gdbthread.h (thread): Add missing closing parenthesis in
8811 comment.
8812
3a3fd0fd
PA
88132017-04-19 Pedro Alves <palves@redhat.com>
8814
8815 * common/refcounted-object.h: New file.
8816 * gdbthread.h: Include "common/refcounted-object.h".
8817 (thread_info): Inherit from refcounted_object and add comments.
8818 (thread_info::incref, thread_info::decref)
8819 (thread_info::m_refcount): Delete.
8820 (thread_info::deletable): Use the refcounted_object::refcount()
8821 method.
8822 * inferior.c (current_inferior_): Add comment.
8823 (set_current_inferior): Increment/decrement refcounts.
8824 (prune_inferiors, remove_inferior_command): Skip inferiors marked
8825 not-deletable instead of comparing with the current inferior.
8826 (initialize_inferiors): Increment the initial inferior's refcount.
8827 * inferior.h (struct inferior): Forward declare.
8828 Include "common/refcounted-object.h".
8829 (current_inferior, set_current_inferior): Move declaration to
8830 before struct inferior's definition, and fix comment.
8831 (inferior): Inherit from refcounted_object. Add comments.
8832 * thread.c (switch_to_thread_no_regs): Reference the thread's
8833 inferior pointer directly instead of doing a ptid lookup.
8834 (switch_to_no_thread): New function.
8835 (switch_to_thread(thread_info *)): New function, factored out
8836 from ...
8837 (switch_to_thread(ptid_t)): ... this.
8838 (restore_current_thread): Delete.
8839 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8840 fields, and add 'inf' field.
8841 (do_restore_current_thread_cleanup): Check whether old->inf is
8842 alive instead of looking up an inferior by ptid. Use
8843 switch_to_thread and switch_to_no_thread.
8844 (restore_current_thread_cleanup_dtor): Use old->inf directly
8845 instead of lookup up an inferior by id. Decref the inferior.
8846 Don't restore 'removable'.
8847 (make_cleanup_restore_current_thread): Same the inferior pointer
8848 in old, instead of the inferior number. Incref the inferior.
8849 Don't save/clear 'removable'.
8850
9bcb1f16
PA
88512017-04-19 Pedro Alves <palves@redhat.com>
8852
8853 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8854 unittests/scoped_restore-selftests.c.
8855 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8856 * common/scoped_restore.h (scoped_restore_base): Make "class".
8857 (scoped_restore_base::release): New public method.
8858 (scoped_restore_base::scoped_restore_base): New protected ctor.
8859 (scoped_restore_base::m_saved_var): New protected field.
8860 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8861 scoped_restore_base base class instead of m_saved_var directly.
8862 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8863 (scoped_restore_tmpl::scoped_restore_tmpl(const
8864 scoped_restore_tmpl<T>&)): Likewise.
8865 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8866 method.
8867 (scoped_restore_tmpl::saved_var): New method.
8868 (scoped_restore_tmpl::m_saved_var): Delete.
8869 * inferior.h (inferior::detaching): Now a bool.
8870 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8871 cleanup.
8872 * unittests/scoped_restore-selftests.c: New file.
8873
26fcd539
PA
88742017-04-19 Pedro Alves <palves@redhat.com>
8875
8876 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8877 Re-sort in alphabetic order.
8878
fdd243b0
PA
88792017-04-18 Pedro Alves <palves@redhat.com>
8880
8881 * xml-support.c (obstack_xml_printf): Delete.
8882 * xml-support.h (obstack_xml_printf): Delete.
8883
4895cde2
PA
88842017-04-18 Pedro Alves <palves@redhat.com>
8885
8886 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8887 vdebug, verror, body_text, start_element, end_element, name,
8888 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8889 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8890 is_xinclude>: Make private and add m_ prefix.
8891 (gdb_xml_parser::body_text): New method, based on ...
8892 (gdb_xml_body_text): ... this. Adjust.
8893 (gdb_xml_parser::vdebug): New method, based on ...
8894 (gdb_xml_debug): ... this. Adjust.
8895 (gdb_xml_parser::verror): New method, based on ...
8896 (gdb_xml_error): ... this. Adjust.
8897 (gdb_xml_parser::start_element): New method, based on ...
8898 (gdb_xml_start_element): ... this. Adjust.
8899 (gdb_xml_start_element_wrapper): Defer to
8900 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8901 (gdb_xml_parser::end_element): New method, based on ...
8902 (gdb_xml_end_element_wrapper): ... this. Adjust.
8903 (gdb_xml_parser::~gdb_xml_parser): Adjust.
8904 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8905 (gdb_xml_parser::use_dtd): New method, based on ...
8906 (gdb_xml_use_dtd): ... this. Adjust.
8907 (gdb_xml_parser::parse): New method, based on ...
8908 (gdb_xml_parse): ... this. Adjust.
8909 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8910 (xinclude_start_include): Adjust to call the parser's name method.
8911 (xml_xinclude_default, xml_xinclude_start_doctype)
8912 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8913 method.
8914 (xml_process_xincludes): Adjust to call parser methods.
8915 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8916 declarations.
8917
bd8a901f
PA
89182017-04-18 Pedro Alves <palves@redhat.com>
8919
8920 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8921 gdb::optional<std::string>.
8922 * xml-support.c: Include <string>.
8923 (scope_level::scope_level(scope_level &&))
8924 (scope_level::~scope_level): Delete.
8925 (scope_level::body): Now a std::string.
8926 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8927 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8928 parameter.
8929 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8930 (xinclude_parsing_data::output): Now a std::string reference.
8931 (xinclude_start_include): Adjust.
8932 (xml_xinclude_default): Adjust.
8933 (xml_process_xincludes): Add 'output' parameter, and return bool.
8934 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8935 and return bool.
8936 * xml-tdesc.c: Include <unordered_map> and <string>.
8937 (tdesc_xml_cache): Delete.
8938 (tdesc_xml_cache_s): Delete.
8939 (xml_cache): Now an std::unordered_map.
8940 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8941 (target_fetch_description_xml): Change return type to
8942 gdb::optional<std::string>, and adjust.
8943 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8944 (target_fetch_description_xml): Change return type to
8945 gdb::optional<std::string>.
8946
d35d1958
PA
89472017-04-18 Pedro Alves <palves@redhat.com>
8948
8949 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8950 unittests/optional-selftests.c.
8951 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8952 * unittests/optional-selftests.c: New file.
8953 * unittests/optional/assignment/1.cc: New file.
8954 * unittests/optional/assignment/2.cc: New file.
8955 * unittests/optional/assignment/3.cc: New file.
8956 * unittests/optional/assignment/4.cc: New file.
8957 * unittests/optional/assignment/5.cc: New file.
8958 * unittests/optional/assignment/6.cc: New file.
8959 * unittests/optional/assignment/7.cc: New file.
8960 * unittests/optional/cons/copy.cc: New file.
8961 * unittests/optional/cons/default.cc: New file.
8962 * unittests/optional/cons/move.cc: New file.
8963 * unittests/optional/cons/value.cc: New file.
8964 * unittests/optional/in_place.cc: New file.
8965 * unittests/optional/observers/1.cc: New file.
8966 * unittests/optional/observers/2.cc: New file.
8967
22796e97
PA
89682017-04-18 Pedro Alves <palves@redhat.com>
8969
8970 * common/gdb_optional.h: Include common/traits.h.
8971 (in_place_t): New type.
8972 (in_place): New constexpr variable.
8973 (optional::optional): Remove member initialization of
8974 m_instantiated.
8975 (optional::optional(in_place_t...)): New constructor.
8976 (optional::~optional): Use reset.
8977 (optional::optional(const optional&)): New.
8978 (optional::optional(const optional&&)): New.
8979 (optional::optional(T &)): New.
8980 (optional::optional(T &&)): New.
8981 (operator::operator=(const optional &)): New.
8982 (operator::operator=(optional &&)): New.
8983 (operator::operator= (const T &))
8984 (operator::operator= (T &&))
8985 (operator::emplace (Args &&... args)): Return a T&. Use reset.
8986 (operator::reset): New.
8987 (operator::m_instantiated):: Add in-class initializer.
8988 * common/traits.h: Include <type_traits>.
8989 (struct And): New types.
8990
a7fc9b61
PA
89912017-04-18 Pedro Alves <palves@redhat.com>
8992
8993 * xml-support.c: Include <vector>.
8994 (scope_level::scope_level(const gdb_xml_element *))
8995 (scope_level::scope_level(scope_level&&)): New.
8996 (scope_level::~scope_level): New.
8997 (scope_level_s): Delete.
8998 (gdb_xml_parser::scopes): Now a std::vector.
8999 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9000 Use std::vector.
9001 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9002 scope cleanup code.
9003 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9004 of the scopes member. Use std::vector::emplace_back.
9005
010151c9
PA
90062017-04-18 Pedro Alves <palves@redhat.com>
9007
9008 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9009 a bool.
9010 (gdb_xml_end_element): Change type of first parameter.
9011 (gdb_xml_cleanup): Rename to ...
9012 (gdb_xml_parser::~gdb_xml_parser): ... this.
9013 (gdb_xml_create_parser_and_cleanup): Delete with ...
9014 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9015 to this new ctor.
9016 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9017 using gdb_xml_create_parser_and_cleanup.
9018 (xinclude_parsing_data): Add ctor/dtor.
9019 (xml_xinclude_cleanup): Delete.
9020 (xml_process_xincludes): Create a local xinclude_parsing_data
9021 instead of heap-allocating one. Create a local gdb_xml_parser
9022 instead of heap-allocating one with
9023 gdb_xml_create_parser_and_cleanup.
9024
d56060f0
JB
90252017-04-18 John Baldwin <jhb@FreeBSD.org>
9026
9027 PR threads/20743
9028 * fbsd-nat.c (resume_one_thread_cb): Remove.
9029 (resume_all_threads_cb): Remove.
9030 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9031 iterate_over_threads.
9032
305d16a9
JB
90332017-04-17 Joel Brobecker <brobecker@adacore.com>
9034
9035 * NEWS: Create a new section for the next release branch.
9036 Rename the section of the current branch, now that it has
9037 been cut.
9038
8bb57231
JB
90392017-04-17 Joel Brobecker <brobecker@adacore.com>
9040
9041 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9042 * version.in: Bump version to 8.0.50.DATE-git.
9043
096c92dd
SDJ
90442017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9045
9046 PR gdb/21385
9047 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9048 independently of the host, and fix build breakage on Cygwin.
9049
0550c955
PA
90502017-04-13 Pedro Alves <palves@redhat.com>
9051
9052 * inferior.c (free_inferior): Convert to ...
9053 (inferior::~inferior): ... this dtor.
9054 (inferior::inferior): New ctor, factored out from ...
9055 (add_inferior_silent): ... here. Allocate the inferior with a new
9056 expression.
9057 (delete_inferior): Call delete instead of free_inferior.
9058 * inferior.h (gdb_environ, continuation): Forward declare.
9059 (inferior): Now a class. Add in-class initialization to all
9060 members. Make boolean fields bool, except 'detaching'.
9061 (inferior::inferior): New explicit ctor.
9062 (inferior::~inferior): New.
9063
e3d60dfc
PA
90642017-04-13 Pedro Alves <palves@redhat.com>
9065
9066 * inferior.c (init_inferior_list): Delete.
9067 * inferior.h (init_inferior_list): Delete.
9068
5fd69d0a
PA
90692017-04-13 Pedro Alves <palves@redhat.com>
9070
9071 PR threads/13217
9072 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9073 (top level): Call it twice, with different thread sets.
9074
c6609450
PA
90752017-04-13 Pedro Alves <palves@redhat.com>
9076
9077 * thread.c: Include <algorithm>.
9078 (thread_array_cleanup): Delete.
9079 (scoped_inc_dec_ref): New class.
9080 (live_threads_count): New function.
9081 (set_thread_refcount): Delete.
9082 (tp_array_compar_ascending): Now a bool.
9083 (tp_array_compar): Convert to a std::sort comparison function.
9084 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9085 and live_threads_count.
9086
2a00d7ce
PA
90872017-04-13 Pedro Alves <palves@redhat.com>
9088
9089 * infrun.c (follow_fork_inferior): Also switch the current
9090 inferior.
9091
441d7c93
PA
90922017-04-13 Pedro Alves <palves@redhat.com>
9093
9094 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9095 before calling create_internal_breakpoint.
9096
808480f6
PA
90972017-04-13 Pedro Alves <palves@redhat.com>
9098
9099 * fork-child.c (execv_argv): New class.
9100 (breakup_args): Refactored as ...
9101 (execv_argv::init_for_no_shell): .. this method of execv_argv.
9102 Copy arguments to storage and replace separators with NULL
9103 terminators in place.
9104 (escape_bang_in_quoted_argument): Adjust to return bool.
9105 (execv_argv::execv_argv): New ctor.
9106 (execv_argv::init_for_shell): New method, factored out from
9107 fork_inferior. Don't strdup strings into the vector.
9108 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
9109 Remove free_vector_argv call.
9110
ad3d022a
YQ
91112017-04-13 Yao Qi <yao.qi@linaro.org>
9112
9113 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9114 tdep->rx_psw_type.
9115
e6ddc3bf
YQ
91162017-04-13 Yao Qi <yao.qi@linaro.org>
9117
9118 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9119 * rx-tdep.c (rx_gdbarch_init): Likewise.
9120
bfb8cf90
PA
91212017-04-13 Pedro Alves <palves@redhat.com>
9122
9123 * breakpoint.h (struct breakpoint): Reindent.
9124
f5336ca5
PA
91252017-04-13 Pedro Alves <palves@redhat.com>
9126
9127 * breakpoint.c (bp_location): Rename to ...
9128 (bp_locations): ... this. All references updated.
9129 (bp_location_count): Rename to ...
9130 (bp_locations_count): ... this. All references updated.
9131 (bp_location_placed_address_before_address_max): Rename to ...
9132 (bp_locations_placed_address_before_address_max): ... this. All
9133 references updated.
9134 (bp_location_shadow_len_after_address_max): Rename to ...
9135 (bp_locations_shadow_len_after_address_max): ... this. All
9136 references updated.
9137 (bp_location_compare_addrs): Rename to ...
9138 (bp_locations_compare_addrs): ... this. All references updated.
9139 (bp_location_compare):Rename to ...
9140 (bp_locations_compare): ... this. All references updated.
9141 (bp_location_target_extensions_update): Rename to ...
9142 (bp_locations_target_extensions_update): ... this. All references
9143 updated.
9144
be628ab8
SDJ
91452017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9146
9147 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9148 * common/common.m4: Check headers 'termios.h', 'termio.h' and
9149 'sgtty.h'.
9150 * common/gdb_termios.h: New file, with parts of "terminal.h".
9151 * inflow.c: Include "gdb_termios.h".
9152 * ser-unix.c: Include "gdb_termios.h".
9153 * terminal.h: Move terminal-related defines to
9154 "common/gdb_termios.h".
9155
8e9e35b1
TT
91562017-04-12 Tom Tromey <tom@tromey.com>
9157
9158 * probe.c (parse_probes): Update.
9159 * location.h (delete_event_location): Don't declare.
9160 (event_location_deleter::operator()): Update.
9161 * location.c (event_location_deleter::operator()): Rename from
9162 delete_event_location.
9163 * linespec.h (linespec_result) <location>: Change type to
9164 event_location_up.
9165 * linespec.c (canonicalize_linespec, event_location_to_sals)
9166 (decode_objc): Update.
9167 (linespec_result): Don't call delete_event_location.
9168 * breakpoint.c (create_breakpoints_sal)
9169 (bkpt_probe_create_sals_from_location)
9170 (strace_marker_create_sals_from_location): Update.
9171
16e802b9
TT
91722017-04-12 Tom Tromey <tom@tromey.com>
9173
9174 * linespec.h (struct linespec_result): Add constructor and
9175 destructor.
9176 (init_linespec_result, destroy_linespec_result)
9177 (make_cleanup_destroy_linespec_result): Don't declare.
9178 * linespec.c (init_linespec_result): Remove.
9179 (linespec_result::~linespec_result): Rename from
9180 destroy_linespec_result. Update.
9181 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9182 Remove.
9183 * breakpoint.c (create_breakpoint, break_range_command)
9184 (decode_location_default): Update.
9185 * ax-gdb.c (agent_command_1): Update.
9186
d28cd78a
TT
91872017-04-12 Tom Tromey <tom@tromey.com>
9188
9189 * remote.c (remote_download_tracepoint): Update.
9190 * python/py-breakpoint.c (bppy_get_location): Update.
9191 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9192 (gdbscm_breakpoint_location): Update.
9193 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9194 * breakpoint.h (struct breakpoint) <location, location_range_end>:
9195 Change type to event_location_up.
9196 * breakpoint.c (create_overlay_event_breakpoint)
9197 (create_longjmp_master_breakpoint)
9198 (create_std_terminate_master_breakpoint)
9199 (create_exception_master_breakpoint)
9200 (breakpoint_event_location_empty_p, print_breakpoint_location)
9201 (print_one_breakpoint_location, create_thread_event_breakpoint)
9202 (init_breakpoint_sal, create_breakpoint)
9203 (print_recreate_ranged_breakpoint, break_range_command)
9204 (init_ada_exception_breakpoint, say_where): Update.
9205 (base_breakpoint_dtor): Don't call delete_event_location.
9206 (bkpt_print_recreate, tracepoint_print_recreate)
9207 (dprintf_print_recreate, update_static_tracepoint)
9208 (breakpoint_re_set_default): Update.
9209
711799d5
TT
92102017-04-12 Tom Tromey <tom@tromey.com>
9211
9212 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9213 type of "to_do". Update.
9214 (compute_stack_depth): Use std::vector.
9215
52d214d3
TT
92162017-04-12 Tom Tromey <tom@tromey.com>
9217
9218 * printcmd.c (find_instruction_backward): Use std::vector.
9219
4c404b8b
TT
92202017-04-12 Tom Tromey <tom@tromey.com>
9221
9222 * symfile.c (objfilep): Remove typedef.
9223 (reread_symbols): Use a std::vector.
9224
156d9eab
TT
92252017-04-12 Tom Tromey <tom@tromey.com>
9226
9227 * mi/mi-main.c (exec_direction_forward): Remove.
9228 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9229 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9230 scoped_restore.
9231 * guile/guile.c (guile_repl_command, guile_command)
9232 (gdbscm_execute_gdb_command): Use scoped_restore.
9233 * go-exp.y (go_parse): Use scoped_restore.
9234 * d-exp.y (d_parse): Use scoped_restore.
9235 * cli/cli-decode.c (cmd_func): Use scoped_restore.
9236 * c-exp.y (c_parse): Use scoped_restore.
9237
4d89769a
TT
92382017-04-12 Tom Tromey <tom@tromey.com>
9239
9240 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9241 (mi_parse): Update return type.
9242 (mi_parse_free): Remove.
9243 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9244 (mi_parse::~mi_parse): Rename from mi_parse_free.
9245 (mi_parse_cleanup): Remove.
9246 (mi_parse): Return a unique_ptr. Use new.
9247 * mi/mi-main.c (mi_execute_command): Update.
9248
4b217cc7
TT
92492017-04-12 Tom Tromey <tom@tromey.com>
9250
9251 * location.c (explicit_location_lex_one): Return a
9252 unique_xmalloc_ptr.
9253 (string_to_explicit_location): Update. Remove cleanups.
9254
59d3651b
TT
92552017-04-12 Tom Tromey <tom@tromey.com>
9256
9257 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9258 (compare_value_and_voffset): Change type. Update.
9259 (compute_vtable_size): Change type of "offset_vec".
9260 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
9261 (gnuv3_get_typeid): Remove extraneous declaration.
9262
b24b0d6c
TT
92632017-04-12 Tom Tromey <tom@tromey.com>
9264
9265 * charset.h (wchar_iterator): Fix comment.
9266
80a3b8c5
TT
92672017-04-12 Tom Tromey <tom@tromey.com>
9268
9269 * charset.c (iconv_wrapper): New class.
9270 (cleanup_iconv): Remove.
9271 (convert_between_encodings): Use it.
9272
c83dd867
TT
92732017-04-12 Tom Tromey <tom@tromey.com>
9274
9275 * symfile.h (increment_reading_symtab): Update type.
9276 * symfile.c (decrement_reading_symtab): Remove.
9277 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9278 * psymtab.c (psymtab_to_symtab): Update.
9279 * dwarf2read.c (dw2_instantiate_symtab): Update.
9280
0e8621a0
TT
92812017-04-12 Tom Tromey <tom@tromey.com>
9282
9283 * jit.c (struct jit_reader): Declare separately. Add constructor
9284 and destructor. Change type of "handle".
9285 (loaded_jit_reader): Define separately.
9286 (jit_reader_load): Update. New "new".
9287 (jit_reader_unload_command): Use "delete".
9288 * gdb-dlfcn.h (struct dlclose_deleter): New.
9289 (gdb_dlhandle_up): New typedef.
9290 (gdb_dlopen, gdb_dlsym): Update types.
9291 (gdb_dlclose): Remove.
9292 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9293 (gdb_dlsym): Change type of "handle".
9294 (make_cleanup_dlclose): Remove.
9295 (dlclose_deleter::operator()): Rename from gdb_dlclose.
9296 * compile/compile-c-support.c (load_libcc): Update.
9297
67d89901
TT
92982017-04-12 Tom Tromey <tom@tromey.com>
9299
9300 * symtab.h (find_pcs_for_symtab_line): Change return type.
9301 * symtab.c (find_pcs_for_symtab_line): Change return type.
9302 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9303 type of "vec". Update.
9304 (ltpy_get_pcs_for_line): Update.
9305 * linespec.c (decode_digits_ordinary): Update.
9306
93921405
TT
93072017-04-12 Tom Tromey <tom@tromey.com>
9308
9309 * tracepoint.c (actions_command): Update.
9310 * python/python.c (python_command, python_interactive_command):
9311 Update.
9312 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9313 * guile/guile.c (guile_command): Update.
9314 * defs.h (read_command_lines, read_command_lines_1): Return
9315 command_line_up.
9316 (command_lines_deleter): New struct.
9317 (command_line_up): New typedef.
9318 * compile/compile.c (compile_code_command)
9319 (compile_print_command): Update.
9320 * cli/cli-script.h (get_command_line, copy_command_lines): Return
9321 command_line_up.
9322 (make_cleanup_free_command_lines): Remove.
9323 * cli/cli-script.c (get_command_line, read_command_lines_1)
9324 (copy_command_lines): Return command_line_up.
9325 (while_command, if_command, read_command_lines, define_command)
9326 (document_command): Update.
9327 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9328 Remove.
9329 * breakpoint.h (breakpoint_set_commands): Change type of
9330 "commands".
9331 * breakpoint.c (breakpoint_set_commands): Change type of
9332 "commands". Update.
9333 (do_map_commands_command, update_dprintf_command_list)
9334 (create_tracepoint_from_upload): Update.
9335
ffc2605c
TT
93362017-04-12 Tom Tromey <tom@tromey.com>
9337
9338 * tracepoint.c (scope_info): Update.
9339 * spu-tdep.c (spu_catch_start): Update.
9340 * python/python.c (gdbpy_decode_line): Update.
9341 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9342 * python/py-breakpoint.c (bppy_init): Update.
9343 * probe.c (parse_probes): Update.
9344 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9345 * location.h (event_location_deleter): New struct.
9346 (event_location_up): New typedef.
9347 (new_linespec_location, new_address_location, new_probe_location)
9348 (new_explicit_location, copy_event_location)
9349 (string_to_event_location, string_to_event_location_basic)
9350 (string_to_explicit_location): Update return type.
9351 (make_cleanup_delete_event_location): Remove.
9352 * location.c (new_linespec_location, new_address_location)
9353 (new_probe_location, new_explicit_location, copy_event_location):
9354 Return event_location_up.
9355 (delete_event_location_cleanup)
9356 (make_cleanup_delete_event_location): Remove.
9357 (string_to_explicit_location, string_to_event_location_basic)
9358 (string_to_event_location): Return event_location_up.
9359 * linespec.c (canonicalize_linespec, event_location_to_sals)
9360 (decode_line_with_current_source)
9361 (decode_line_with_last_displayed, decode_objc): Update.
9362 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9363 * completer.c (location_completer): Update.
9364 * cli/cli-cmds.c (edit_command, list_command): Update.
9365 * breakpoint.c (create_overlay_event_breakpoint)
9366 (create_longjmp_master_breakpoint)
9367 (create_std_terminate_master_breakpoint)
9368 (create_exception_master_breakpoint)
9369 (create_thread_event_breakpoint): Update.
9370 (init_breakpoint_sal): Update. Remove some dead code.
9371 (create_breakpoint_sal): Change type of "location". Update.
9372 (create_breakpoints_sal, create_breakpoint, break_command_1)
9373 (dprintf_command, break_range_command, until_break_command)
9374 (init_ada_exception_breakpoint)
9375 (strace_marker_create_sals_from_location)
9376 (update_static_tracepoint, trace_command, ftrace_command)
9377 (strace_command, create_tracepoint_from_upload): Update.
9378 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9379 * ax-gdb.c (agent_command_1): Update.
9380
8f10c932
PA
93812017-04-12 Pedro Alves <palves@redhat.com>
9382
9383 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9384 * configure.tgt: Handle i[34567]86-*-go32* and
9385 i[34567]86-*-msdosdjgpp*.
9386 * i386-tdep.c (i386_svr4_reg_to_regnum):
9387 Make extern.
9388 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9389 i386-go32-tdep.c.
9390 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9391 * i386-go32-tdep.c: New file.
9392 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9393 declarations.
9394
0a31ccfb
SM
93952017-04-12 Simon Marchi <simon.marchi@ericsson.com>
9396
9397 * aix-thread.c (pd_status2str): Change return type to const char *.
9398
e9bb3fbb
PA
93992017-04-12 Pedro Alves <palves@redhat.com>
9400
9401 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9402 calls to set_gdbarch_gnu_triplet_regexp.
9403
53375380
PA
94042017-04-12 Pedro Alves <palves@redhat.com>
9405
9406 PR gdb/21323
9407 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9408 New enum value.
9409 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9410 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9411 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9412 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9413 * gdbarch.h, gdbarch.c: Regenerate.
9414 * aarch64-tdep.c (aarch64_gdbarch_init): Override
9415 gdbarch_wchar_bit and gdbarch_wchar_signed.
9416 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9417 * arm-tdep.c (arm_gdbarch_init): Likewise.
9418 * avr-tdep.c (avr_gdbarch_init): Likewise.
9419 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9420 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9421 * i386-tdep.c (i386_go32_init_abi): Likewise.
9422 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9423 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9424 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9425 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9426 * sh-tdep.c (sh_gdbarch_init): Likewise.
9427 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9428 * sparc64-tdep.c (sparc64_init_abi): Likewise.
9429 * windows-tdep.c (windows_init_abi): Likewise.
9430 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9431
53e710ac
PA
94322017-04-12 Pedro Alves <palves@redhat.com>
9433
9434 PR c++/21323
9435 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9436 cplus_primitive_type_char32_t>: New enum values.
9437 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9438 and cplus_primitive_type_char32_t.
9439 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9440 32, use the archtecture's built-in type for char16_t and char32_t,
9441 respectively. Otherwise, fallback to init_integer_type as before,
9442 but make the type unsigned, and issue a complaint.
9443 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9444
ab0538b8
AH
94452017-04-12 Alan Hayward <alan.hayward@arm.com>
9446
5e0e0422 9447 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
9448 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9449
5430098f
SDJ
94502017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9451
9452 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9453 'const char *'.
9454
7c5ded6a
SDJ
94552017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9456
9457 * common/common-utils.c (free_vector_argv): New function.
9458 * common/common-utils.h: Include <vector>.
9459 (free_vector_argv): New prototype.
9460 * darwin-nat.c (darwin_create_inferior): Rewrite function
9461 prototype in order to constify "exec_file" and accept a
9462 "std::string" for "allargs".
9463 * fork-child.c: Include <vector>.
9464 (breakup_args): Rewrite function, using C++.
9465 (fork_inferior): Rewrite function header, constify "exec_file_arg"
9466 and accept "std::string" for "allargs". Update the code to
9467 calculate "argv" based on "allargs". Update calls to "exec_fun"
9468 and "execvp".
9469 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9470 order to constify "exec_file" and accept a "std::string" for
9471 "allargs".
9472 * go32-nat.c (go32_create_inferior): Likewise.
9473 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9474 * infcmd.c (run_command_1): Constify "exec_file". Use
9475 "std::string" for inferior arguments.
9476 * inferior.h (fork_inferior): Update prototype.
9477 * linux-nat.c (linux_nat_create_inferior): Rewrite function
9478 prototype in order to constify "exec_file" and accept a
9479 "std::string" for "allargs".
9480 * nto-procfs.c (procfs_create_inferior): Likewise.
9481 * procfs.c (procfs_create_inferior): Likewise.
9482 * remote-sim.c (gdbsim_create_inferior): Likewise.
9483 * remote.c (extended_remote_run): Update code to accept
9484 "std::string" as argument.
9485 (extended_remote_create_inferior): Rewrite function prototype in
9486 order to constify "exec_file" and accept a "std::string" for
9487 "allargs".
9488 * rs6000-nat.c (super_create_inferior): Likewise.
9489 (rs6000_create_inferior): Likewise.
9490 * target.h (struct target_ops) <to_create_inferior>: Likewise.
9491 * windows-nat.c (windows_create_inferior): Likewise.
9492
ae0eee42
PA
94932017-04-11 Pedro Alves <palves@redhat.com>
9494
9495 * thread.c: Fix whitespace throughout.
9496
a6acac06
PR
94972017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
9498
9499 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9500
64403bd1
AH
95012017-04-11 Alan Hayward <alan.hayward@arm.com>
9502
9503 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9504
a5bef50f
SDJ
95052017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
9506
9507 PR gdb/21364
9508 * osdata.c (info_osdata): Check if 'type' is an empty string
9509 instead of NULL.
9510
9295a5a9
PA
95112017-04-10 Pedro Alves <palves@redhat.com>
9512
9513 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9514 (ptid_to_global_thread_id, in_thread_list)
9515 (do_captured_list_thread_ids, set_resumed, set_running)
9516 (set_executing, set_stop_requested, finish_thread_state)
9517 (validate_registers_access, can_access_registers_ptid)
9518 (print_thread_info_1, switch_to_thread)
9519 (do_restore_current_thread_cleanup)
9520 (make_cleanup_restore_current_thread, thread_command)
9521 (thread_name_command): Use operator== instead of ptid_equal.
9522
996812e3
PA
95232017-04-10 Pedro Alves <palves@redhat.com>
9524
9525 * thread.c (struct current_thread_cleanup) <next>: Delete field.
9526 (current_thread_cleanup_chain): Delete.
9527 (restore_current_thread_cleanup_dtor)
9528 (make_cleanup_restore_current_thread): Remove references to
9529 current_thread_cleanup_chain.
9530
845b344f
AH
95312017-04-10 Alan Hayward <alan.hayward@arm.com>
9532
9533 * msp430-tdep.c (msp430_pseudo_register_read): Never return
9534 REG_UNKNOWN.
9535
803bdfe4
YQ
95362017-04-10 Yao Qi <yao.qi@linaro.org>
9537
9538 PR gdb/19942
9539 * gdbthread.h (thread_info::deletable): New method.
9540 (thread_info::incref): New method.
9541 (thread_info::decref): New method.
9542 (thread_info::refcount): Move it to private.
9543 * infrun.c (save_stop_context): Call inc_refcount.
9544 (release_stop_context_cleanup): Likewise.
9545 * thread.c (set_thread_exited): New function.
9546 (init_thread_list): Delete "tp" only it is deletable, otherwise
9547 call set_thread_exited.
9548 (delete_thread_1): Call set_thread_exited.
9549 (current_thread_cleanup) <inferior_pid>: Remove.
9550 <thread>: New field.
9551 (restore_current_thread_ptid_changed): Removed.
9552 (do_restore_current_thread_cleanup): Adjust.
9553 (restore_current_thread_cleanup_dtor): Don't call
9554 find_thread_ptid.
9555 (set_thread_refcount): Use dec_refcount.
9556 (make_cleanup_restore_current_thread): Adjust.
9557 (thread_apply_all_command): Call inc_refcount.
9558 (_initialize_thread): Don't call
9559 observer_attach_thread_ptid_changed.
9560
8c25b497
YQ
95612017-04-10 Yao Qi <yao.qi@linaro.org>
9562
9563 * thread.c (delete_thread_1): Hoist code on marking thread as
9564 exited.
9565
8473b447
SM
95662017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9567
9568 * windows-nat.c (windows_detach): Initialize ptid with
9569 minus_one_ptid.
9570
6670ec13
SM
95712017-04-07 Simon Marchi <simon.marchi@ericsson.com>
9572
9573 * unittests/ptid-selftests.c: Fix erroneous assert messages.
9574
ba2f91bb
AH
95752017-04-07 Alan Hayward <alan.hayward@arm.com>
9576
9577 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9578 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9579 (bfin_pseudo_register_write): Likewise
9580
436252de
SM
95812017-04-06 Simon Marchi <simon.marchi@ericsson.com>
9582
9583 * common/ptid.h (struct ptid): Change to...
9584 (class ptid_t): ... this.
9585 <ptid_t>: New constructors.
9586 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9587 matches>: New methods.
9588 <make_null, make_minus_one>: New static methods.
9589 <pid>: Rename to...
9590 <m_pid>: ...this.
9591 <lwp>: Rename to...
9592 <m_lwp>: ...this.
9593 <tid>: Rename to...
9594 <m_tid>: ...this.
9595 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9596 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9597 as references, move comment to class ptid_t.
9598 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9599 ptid_t static methods.
9600 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9601 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9602 Take ptid arguments as references, implement using ptid_t methods.
9603 * unittests/ptid-selftests.c: New file.
9604 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9605 unittests/ptid-selftests.c.
9606 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9607
0dedf377
TP
96082017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
9609
9610 * python/python.c (python_run_simple_file): Cast mode literal to
9611 non-const char pointer as expected by PyFile_FromString.
9612
4e9868d4
SM
96132017-04-05 Simon Marchi <simon.marchi@ericsson.com>
9614
9615 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9616 minus_one_ptid and null_ptid.
9617
9bf2a700
PA
96182017-04-05 Pedro Alves <palves@redhat.com>
9619
9620 * warning.m4 (build_warnings): Remove -Wno-write-strings.
9621 * configure: Regenerate.
9622
a121b7c1
PA
96232017-04-05 Pedro Alves <palves@redhat.com>
9624
9625 * ada-exp.y (yyerror): Constify.
9626 * ada-lang.c (bound_name, get_selections)
9627 (ada_variant_discrim_type)
9628 (ada_variant_discrim_name, ada_value_struct_elt)
9629 (ada_lookup_struct_elt_type, is_unchecked_variant)
9630 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9631 (catch_ada_exception_command_split)
9632 (catch_ada_assert_command_split, catch_assert_command)
9633 (ada_op_name): Constify.
9634 * ada-lang.h (ada_yyerror, get_selections)
9635 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9636 * arc-tdep.c (arc_print_frame_cache): Constify.
9637 * arm-tdep.c (arm_skip_stub): Constify.
9638 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9639 (gen_aggregate_elt_ref): Constify.
9640 * bcache.c (print_bcache_statistics): Constify.
9641 * bcache.h (print_bcache_statistics): Constify.
9642 * break-catch-throw.c (catch_exception_command_1):
9643 * breakpoint.c (struct ep_type_description::description):
9644 Constify.
9645 (add_solib_catchpoint): Constify.
9646 (catch_fork_command_1): Add cast.
9647 (add_catch_command): Constify.
9648 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9649 Constify.
9650 * bsd-uthread.c (bsd_uthread_state): Constify.
9651 * buildsym.c (patch_subfile_names): Constify.
9652 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9653 Constify.
9654 * c-exp.y (yyerror): Constify.
9655 (token::oper): Constify.
9656 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9657 * c-varobj.c (cplus_describe_child): Constify.
9658 * charset.c (find_charset_names): Add cast.
9659 (find_charset_names): Constify array and add const_cast.
9660 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9661 (edit_command): Constify.
9662 * cli/cli-decode.c (lookup_cmd): Constify.
9663 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9664 Constify.
9665 (struct dump_context): Constify.
9666 (add_dump_command, restore_command): Constify.
9667 * cli/cli-script.c (get_command_line): Constify.
9668 * cli/cli-script.h (get_command_line): Constify.
9669 * cli/cli-utils.c (check_for_argument): Constify.
9670 * cli/cli-utils.h (check_for_argument): Constify.
9671 * coff-pe-read.c (struct read_pe_section_data): Constify.
9672 * command.h (lookup_cmd): Constify.
9673 * common/print-utils.c (decimal2str): Constify.
9674 * completer.c (gdb_print_filename): Constify.
9675 * corefile.c (set_gnutarget): Constify.
9676 * cp-name-parser.y (yyerror): Constify.
9677 * cp-valprint.c (cp_print_class_member): Constify.
9678 * cris-tdep.c (cris_register_name, crisv32_register_name):
9679 Constify.
9680 * d-exp.y (yyerror): Constify.
9681 (struct token::oper): Constify.
9682 * d-lang.h (d_yyerror): Constify.
9683 * dbxread.c (struct header_file_location::name): Constify.
9684 (add_old_header_file, add_new_header_file, last_function_name)
9685 (dbx_next_symbol_text, add_bincl_to_list)
9686 (find_corresponding_bincl_psymtab, set_namestring)
9687 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9688 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9689 * defs.h (command_line_input, print_address_symbolic)
9690 (deprecated_readline_begin_hook): Constify.
9691 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9692 Constify.
9693 * event-top.c (handle_line_of_input): Constify and add cast.
9694 * exceptions.c (catch_errors): Constify.
9695 * exceptions.h (catch_errors): Constify.
9696 * expprint.c (print_subexp_standard, op_string, op_name)
9697 (op_name_standard, dump_raw_expression, dump_raw_expression):
9698 * expression.h (op_name, op_string, dump_raw_expression):
9699 Constify.
9700 * f-exp.y (yyerror): Constify.
9701 (struct token::oper): Constify.
9702 (struct f77_boolean_val::name): Constify.
9703 * f-lang.c (f_word_break_characters): Constify.
9704 * f-lang.h (f_yyerror): Constify.
9705 * fork-child.c (fork_inferior): Add cast.
9706 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9707 (new_variant): Constify.
9708 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9709 * gdbarch.c: Regenerate.
9710 * gdbcore.h (set_gnutarget): Constify.
9711 * go-exp.y (yyerror): Constify.
9712 (token::oper): Constify.
9713 * go-lang.h (go_yyerror): Constify.
9714 * go32-nat.c (go32_sysinfo): Constify.
9715 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9716 * guile/scm-cmd.c (cmdscm_function): Constify.
9717 * guile/scm-param.c (pascm_param_value): Constify.
9718 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9719 (h8300sx_register_name): Constify.
9720 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9721 Constify.
9722 * ia64-tdep.c (ia64_register_names): Constify.
9723 * infcmd.c (construct_inferior_arguments): Constify.
9724 (path_command, attach_post_wait): Constify.
9725 * language.c (show_range_command, show_case_command)
9726 (unk_lang_error): Constify.
9727 * language.h (language_defn::la_error)
9728 (language_defn::la_name_of_this): Constify.
9729 * linespec.c (decode_line_2): Constify.
9730 * linux-thread-db.c (thread_db_err_str): Constify.
9731 * lm32-tdep.c (lm32_register_name): Constify.
9732 * m2-exp.y (yyerror): Constify.
9733 * m2-lang.h (m2_yyerror): Constify.
9734 * m32r-tdep.c (m32r_register_names): Constify and make static.
9735 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9736 * m88k-tdep.c (m88k_register_name): Constify.
9737 * macroexp.c (appendmem): Constify.
9738 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9739 (upgrade_type, parse_external, parse_partial_symbols)
9740 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9741 (new_symbol): Constify.
9742 * memattr.c (mem_info_command): Constify.
9743 * mep-tdep.c (register_name_from_keyword): Constify.
9744 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9745 Constify.
9746 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9747 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9748 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9749 cast.
9750 (mi_execute_async_cli_command): Constify.
9751 * mips-tdep.c (mips_register_name): Constify.
9752 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9753 (am33_register_name, am33_2_register_name)
9754 * moxie-tdep.c (moxie_register_names): Constify.
9755 * nat/linux-osdata.c (osdata_type): Constify fields.
9756 * nto-tdep.c (nto_parse_redirection): Constify.
9757 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9758 (lookup_child_selector): Constify.
9759 (objc_methcall::name): Constify.
9760 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9761 (lookup_struct_typedef): Constify.
9762 * objfiles.c (pc_in_section): Constify.
9763 * objfiles.h (pc_in_section): Constify.
9764 * p-exp.y (struct token::oper): Constify.
9765 (yyerror): Constify.
9766 * p-lang.h (pascal_yyerror): Constify.
9767 * parser-defs.h (op_name_standard): Constify.
9768 (op_print::string): Constify.
9769 (exp_descriptor::op_name): Constify.
9770 * printcmd.c (print_address_symbolic): Constify.
9771 * psymtab.c (print_partial_symbols): Constify.
9772 * python/py-breakpoint.c (stop_func): Constify.
9773 (bppy_get_expression): Constify.
9774 * python/py-cmd.c (cmdpy_completer::name): Constify.
9775 (cmdpy_function): Constify.
9776 * python/py-event.c (evpy_add_attribute)
9777 (gdbpy_initialize_event_generic): Constify.
9778 * python/py-event.h (evpy_add_attribute)
9779 (gdbpy_initialize_event_generic): Constify.
9780 * python/py-evts.c (add_new_registry): Constify.
9781 * python/py-finishbreakpoint.c (outofscope_func): Constify.
9782 * python/py-framefilter.c (get_py_iter_from_func): Constify.
9783 * python/py-inferior.c (get_buffer): Add cast.
9784 * python/py-param.c (parm_constant::name): Constify.
9785 * python/py-unwind.c (fprint_frame_id): Constify.
9786 * python/python.c (gdbpy_parameter_value): Constify.
9787 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9788 * remote.c (memory_packet_config::name): Constify.
9789 (show_packet_config_cmd, remote_write_bytes)
9790 (remote_buffer_add_string):
9791 * reverse.c (exec_reverse_once): Constify.
9792 * rs6000-tdep.c (variant::name, variant::description): Constify.
9793 * rust-exp.y (rustyyerror): Constify.
9794 * rust-lang.c (rust_op_name): Constify.
9795 * rust-lang.h (rustyyerror): Constify.
9796 * serial.h (serial_ops::name): Constify.
9797 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9798 (sh_sh3e_register_name, sh_sh2e_register_name)
9799 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9800 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9801 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9802 (sh_sh4al_dsp_register_name): Constify.
9803 * sh64-tdep.c (sh64_register_name): Constify.
9804 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9805 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9806 * stabsread.c (patch_block_stabs, read_type_number)
9807 (ref_map::stabs, ref_add, process_reference)
9808 (symbol_reference_defined, define_symbol, define_symbol)
9809 (error_type, read_type, read_member_functions, read_cpp_abbrev)
9810 (read_one_struct_field, read_struct_fields, read_baseclasses)
9811 (read_tilde_fields, read_struct_type, read_array_type)
9812 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9813 (read_huge_number, read_range_type, read_args, common_block_start)
9814 (find_name_end): Constify.
9815 * stabsread.h (common_block_start, define_symbol)
9816 (process_one_symbol, symbol_reference_defined, ref_add):
9817 * symfile.c (get_section_index, add_symbol_file_command):
9818 * symfile.h (get_section_index): Constify.
9819 * target-descriptions.c (tdesc_type::name): Constify.
9820 (tdesc_free_type): Add cast.
9821 * target.c (find_default_run_target):
9822 (add_deprecated_target_alias, find_default_run_target)
9823 (target_announce_detach): Constify.
9824 (do_option): Constify.
9825 * target.h (add_deprecated_target_alias): Constify.
9826 * thread.c (print_thread_info_1): Constify.
9827 * top.c (deprecated_readline_begin_hook, command_line_input):
9828 Constify.
9829 (init_main): Add casts.
9830 * top.h (handle_line_of_input): Constify.
9831 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9832 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9833 (tfind_command): Rename to ...
9834 (tfind_command_1): ... this and constify.
9835 (tfind_command): New function.
9836 (tfind_end_command, tfind_start_command): Adjust.
9837 (encode_source_string): Constify.
9838 * tracepoint.h (encode_source_string): Constify.
9839 * tui/tui-data.c (tui_partial_win_by_name): Constify.
9840 * tui/tui-data.h (tui_partial_win_by_name): Constify.
9841 * tui/tui-source.c (tui_set_source_content_nil): Constify.
9842 * tui/tui-source.h (tui_set_source_content_nil): Constify.
9843 * tui/tui-win.c (parse_scrolling_args): Constify.
9844 * tui/tui-windata.c (tui_erase_data_content): Constify.
9845 * tui/tui-windata.h (tui_erase_data_content): Constify.
9846 * tui/tui-winsource.c (tui_erase_source_content): Constify.
9847 * tui/tui.c (tui_enable): Add cast.
9848 * utils.c (defaulted_query): Constify.
9849 (init_page_info): Add cast.
9850 (puts_debug, subset_compare): Constify.
9851 * utils.h (subset_compare): Constify.
9852 * varobj.c (varobj_format_string): Constify.
9853 * varobj.h (varobj_format_string): Constify.
9854 * vax-tdep.c (vax_register_name): Constify.
9855 * windows-nat.c (windows_detach): Constify.
9856 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9857 * xml-support.c (gdb_xml_end_element): Constify.
9858 * xml-tdesc.c (tdesc_start_reg): Constify.
9859 * xstormy16-tdep.c (xstormy16_register_name): Constify.
9860 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9861 * xtensa-tdep.h (xtensa_register_t::name): Constify.
9862
995816ba
PA
98632017-04-05 Pedro Alves <palves@redhat.com>
9864
9865 * proc-api.c (struct trans): Constify.
9866 (procfs_note): Constify.
9867 * proc-events.c (struct trans, syscall_table):
9868 * proc-flags.c (struct trans): Constify.
9869 * proc-utils.h (procfs_note): Constify.
9870 * proc-why.c (struct trans): Constify.
9871 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9872 (procfs_detach): Constify.
9873 * sol-thread.c (struct string_map): Constify.
9874 (td_err_string, td_state_string): Constify.
9875
3e83a920
PA
98762017-04-05 Pedro Alves <palves@redhat.com>
9877
9878 * proc-api.c (procfs_filename): Don't initialize
9879 procfs_filename.
9880 (prepare_to_trace): Assume procfs_filename is non-NULL.
9881 (_initialize_proc_api): Give procfs_filename a default value here.
9882
63160a43
PA
98832017-04-05 Pedro Alves <palves@redhat.com>
9884
9885 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9886 'cond_string' parameter.
9887 (extract_exception_regexp): Constify 'string' parameter.
9888 (catch_exception_command_1): Constify.
9889 * breakpoint.c (init_catchpoint)
9890 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9891 parameter.
9892 (ep_parse_optional_if_clause, catch_fork_command_1)
9893 (catch_exec_command_1): Constify.
9894 * breakpoint.h (init_catchpoint): Constify 'cond_string'
9895 parameter.
9896 (ep_parse_optional_if_clause): Constify.
9897 * cli/cli-utils.c (remove_trailing_whitespace)
9898 (check_for_argument): Constify.
9899 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9900 non-const overload.
9901 (check_for_argument): Likewise.
9902
9b2eba3d
PA
99032017-04-05 Pedro Alves <palves@redhat.com>
9904
9905 * event-top.c (command_line_handler): Add cast to execute_command
9906 call.
9907 * record-btrace.c (cmd_record_btrace_bts_start)
9908 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9909 (cmd_record_btrace_start): Add cast to execute_command call.
9910 * record-full.c (record_full_goto_insn):
9911 * record.c (record_start, record_stop): Add cast to
9912 execute_command_to_string calls.
9913 (cmd_record_start): Add cast to execute_command calls.
9914
2adadf51
PA
99152017-04-05 Pedro Alves <palves@redhat.com>
9916
9917 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9918 static inline function.
9919 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9920 array and use gdb_PyArg_ParseTupleAndKeywords.
9921 * python/py-cmd.c (cmdpy_init): Likewise.
9922 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9923 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9924 (infpy_search_memory): Likewise.
9925 * python/py-objfile.c (objfpy_add_separate_debug_file)
9926 (gdbpy_lookup_objfile): Likewise.
9927 * python/py-symbol.c (gdbpy_lookup_symbol)
9928 (gdbpy_lookup_global_symbol): Likewise.
9929 * python/py-type.c (gdbpy_lookup_type): Likewise.
9930 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9931 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9932 Likewise.
9933
0d1f4ceb
PA
99342017-04-05 Pedro Alves <palves@redhat.com>
9935
9936 * python/python-internal.h (gdb_PyGetSetDef): New type.
9937 * python/py-block.c (block_object_getset)
9938 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9939 * python/py-event.c (event_object_getset)
9940 (finish_breakpoint_object_getset): Likewise.
9941 * python/py-inferior.c (inferior_object_getset): Likewise.
9942 * python/py-infthread.c (thread_object_getset): Likewise.
9943 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9944 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9945 * python/py-objfile.c (objfile_getset): Likewise.
9946 * python/py-progspace.c (pspace_getset): Likewise.
9947 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9948 Likewise.
9949 * python/py-record.c (recpy_record_getset): Likewise.
9950 * python/py-symbol.c (symbol_object_getset): Likewise.
9951 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9952 Likewise.
9953 * python/py-type.c (type_object_getset, field_object_getset):
9954 Likewise.
9955 * python/py-value.c (value_object_getset): Likewise.
9956
4d759979
PA
99572017-04-05 Pedro Alves <palves@redhat.com>
9958
9959 * python/python-internal.h (gdb_PyObject_CallMethod)
9960 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9961 New functions.
9962 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9963 (PySys_GetObject, PySys_SetPath): New macros.
9964
fdf9e36f
PA
99652017-04-05 Pedro Alves <palves@redhat.com>
9966
9967 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9968 info_osdata_command.
9969 * osdata.c (info_osdata_command): Rename to ...
9970 (info_osdata): ... this. Constify 'type' parameter, and remove
9971 the 'from_tty' parameter. Accept NULL TYPE.
9972 (info_osdata_command): New function.
9973 * osdata.h (info_osdata_command): Remove declaration.
9974 (info_osdata): New declaration.
9975
9f33b8b7
PA
99762017-04-05 Pedro Alves <palves@redhat.com>
9977
9978 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9979 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9980 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9981 parameter.
9982 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9983 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9984 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9985 parameter.
9986 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9987 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9988 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9989 (mi_cmd_file_list_exec_source_files)
9990 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9991 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9992 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9993 parameter.
9994 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9995 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9996 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9997 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9998 (mi_cmd_stack_info_frame): Constify 'command' parameter.
9999 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10000 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10001 'command' parameter.
10002 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10003 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10004 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10005 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10006 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10007 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10008 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10009 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10010 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10011 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10012 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10013 parameter.
10014 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10015 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10016 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10017 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10018 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10019 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10020 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10021 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10022 (mi_cmd_data_list_changed_registers)
10023 (mi_cmd_data_write_register_values)
10024 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10025 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10026 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10027 (mi_cmd_list_features, mi_cmd_list_target_features)
10028 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10029 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10030 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10031 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10032 (mi_cmd_trace_frame_collected): Constify 'command'
10033 parameter.
10034 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10035 'command' parameter.
10036
67cb5b2d
PA
100372017-04-05 Pedro Alves <palves@redhat.com>
10038
10039 * ada-lang.c (ada_completer_word_break_characters): Now a const
10040 array.
10041 (ada_get_gdb_completer_word_break_characters): Constify.
10042 * completer.c (gdb_completer_command_word_break_characters)
10043 (gdb_completer_file_name_break_characters)
10044 (gdb_completer_quote_characters): Now const arrays.
10045 (get_gdb_completer_quote_characters): Constify.
10046 (set_rl_completer_word_break_characters): New function.
10047 (set_gdb_completion_word_break_characters)
10048 (complete_line_internal): Use it.
10049 * completer.h (get_gdb_completer_quote_characters): Constify.
10050 (set_rl_completer_word_break_characters): Declare.
10051 * f-lang.c (f_word_break_characters): Constify.
10052 * language.c (default_word_break_characters): Constify.
10053 * language.h (language_defn::la_word_break_characters): Constify.
10054 (default_word_break_characters): Constify.
10055 * top.c (init_main): Use set_rl_completer_word_break_characters.
10056
7a114964
PA
100572017-04-05 Pedro Alves <palves@redhat.com>
10058
10059 * aix-thread.c (aix_thread_pid_to_str)
10060 (aix_thread_extra_thread_info): Constify.
10061 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10062 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10063 (bsd_uthread_pid_to_str): Constify.
10064 * corelow.c (core_pid_to_str): Constify.
10065 * darwin-nat.c (darwin_pid_to_str): Constify.
10066 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10067 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10068 Constify.
10069 * gnu-nat.c (gnu_pid_to_str): Constify.
10070 * go32-nat.c (go32_pid_to_str): Constify.
10071 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10072 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10073 * inferior.c (inferior_pid_to_str): Constify.
10074 * linux-nat.c (linux_nat_pid_to_str): Constify.
10075 * linux-tdep.c (linux_core_pid_to_str): Constify.
10076 * linux-thread-db.c (thread_db_pid_to_str)
10077 (thread_db_extra_thread_info): Constify.
10078 * nto-tdep.c (nto_extra_thread_info): Constify.
10079 * nto-tdep.h (nto_extra_thread_info): Constify.
10080 * obsd-nat.c (obsd_pid_to_str): Constify.
10081 * procfs.c (procfs_pid_to_str): Constify.
10082 * ravenscar-thread.c (ravenscar_extra_thread_info)
10083 (ravenscar_pid_to_str): Constify.
10084 * remote-sim.c (gdbsim_pid_to_str): Constify.
10085 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10086 Constify.
10087 * sol-thread.c (solaris_pid_to_str): Constify.
10088 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10089 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10090 * target.c (default_pid_to_str, target_pid_to_str)
10091 (normal_pid_to_str, default_pid_to_str): Constify.
10092 * target.h (target_ops::to_pid_to_str)
10093 (target_ops::to_extra_thread_info): Constify.
10094 (target_pid_to_str, normal_pid_to_str): Constify.
10095 * windows-nat.c (windows_pid_to_str): Constify.
10096 * gdbarch.sh (core_pid_to_str): Constify.
10097 * target-delegates.c: Regenerate.
10098 * gdbarch.h, gdbarch.c: Regenerate.
10099
69bbf465
PA
101002017-04-05 Pedro Alves <palves@redhat.com>
10101
10102 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10103 the memory of the temporary warning_pre_print override.
10104 * utils.c (warning_pre_print): Constify.
10105 * utils.h (warning_pre_print): Constify.
10106
be47f9e8
PA
101072017-04-05 Pedro Alves <palves@redhat.com>
10108
10109 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10110 (shell_command): New function.
10111 (make_command): Use std::string.
10112 (init_cli_cmds): Register shell_command instead of shell_escape.
10113
bde6261a
PA
101142017-04-05 Pedro Alves <palves@redhat.com>
10115
10116 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10117 * tracepoint.c (default_collect): Don't initialize.
10118
b38ef47f
PA
101192017-04-05 Pedro Alves <palves@redhat.com>
10120
10121 * macroexp.c (macro_buffer::shared): Now a bool.
10122 (init_buffer): Update.
10123 (init_shared_buffer): Constify 'addr' parameter.
10124 (substitute_args, expand, macro_expand, macro_expand_next): Remove
10125 casts.
10126
f995bbe8
PA
101272017-04-05 Pedro Alves <palves@redhat.com>
10128
10129 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10130 * disasm.c (set_disassembler_options): Constify local.
10131 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10132
4a596fe2
SDJ
101332017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
10134
10135 PR gdb/21352
10136 * tracefile.c (tsave_command): Fix argument parsing for '-r'
10137 option.
10138
2cad08ea
YQ
101392017-04-05 Yao Qi <yao.qi@linaro.org>
10140
10141 * frame.c (frame_unwind_register_unsigned): Call
10142 frame_unwind_register_value.
10143
55a98976
YQ
101442017-04-05 Yao Qi <yao.qi@linaro.org>
10145
10146 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10147 Use gdb_test_multiple, and don't match anchor.
10148
4ac40124
PA
101492017-04-05 Pedro Alves <palves@redhat.com>
10150
10151 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10152 (Write After Approval): Remove Simon Marchi.
10153
c053b654
PA
101542017-04-05 Pedro Alves <palves@redhat.com>
10155
10156 * common/gdb_optional.h (optional::optional): Make constexpr and
10157 initialize m_dummy.
10158
4c7bf4f9
JB
101592017-04-04 John Baldwin <jhb@FreeBSD.org>
10160
10161 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10162 (amd64fbsd_jmp_buf_reg_offset): Remove.
10163 (amd64fbsd_supply_uthread): Remove function.
10164 (amd64fbsd_collect_uthread): Remove function.
10165 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10166 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10167 (x86_64-*-freebsd*): Remove bsd-uthread.o.
10168 (fbsd-nat.c): Update comment.
10169 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10170 (i386fbsd_jmp_buf_reg_offset): Remove.
10171 (i386fbsd_supply_uthread): Remove function.
10172 (i386fbsd_collect_uthread): Remove function.
10173 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10174
1e1a8bef
JB
101752017-04-04 John Baldwin <jhb@FreeBSD.org>
10176
10177 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10178 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10179 * NEWS: Mention that support for FreeBSD/alpha was removed.
10180 * alpha-fbsd-tdep.c: Delete file.
10181 * config/alpha/fbsd.mh: Delete file.
10182 * configure.host: Delete alpha*-*-freebsd* and
10183 alpha*-*-kfreebsd*-gnu.
10184 * configure.tgt: Delete alpha*-*-freebsd* and
10185 alpha*-*-kfreebsd*-gnu.
10186
49907934
JB
101872017-04-04 John Baldwin <jhb@FreeBSD.org>
10188
10189 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10190 amd64bsd_store_inferior_registers): Use ptid from regcache.
10191
6f77053d
PA
101922017-04-04 Pedro Alves <palves@redhat.com>
10193
10194 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
10195 data fields, make them private and add "m_" prefixes.
10196 (lnp_state_machine::lnp_state_machine): New ctor.
10197 (record_line, check_line_address, handle_set_discriminator)
10198 (handle_set_address, handle_advance_pc, handle_special_opcode)
10199 (handle_advance_line, handle_set_file, handle_negate_stmt)
10200 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10201 (end_sequence, advance_line): New methods.
10202 (m_gdbarch, m_record_lines_p): New fields.
10203 (lnp_reader_state): Delete.
10204 (dwarf_record_line): Rename to ...
10205 (lnp_state_machine::record_line): ... adjust.
10206 (init_lnp_state_machine): Delete.
10207 (lnp_state_machine::lnp_state_machine): New.
10208 (check_line_address): Rename to ...
10209 (lnp_state_machine::check_line_address): This.
10210 (dwarf_decode_lines_1): Remove reference to "reader_state".
10211 Adjust lnp_state_machine having a non-default ctor. Use bool.
10212 State machine internal state manipulation moved to
10213 lnp_state_machine methods.
10214
9c541725
PA
102152017-04-04 Pedro Alves <palves@redhat.com>
10216
10217 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10218 unittests/offset-type-selftests.c.
10219 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10220 * common/offset-type.h: New file.
10221 * common/preprocessor.h: New file.
10222 * common/traits.h: New file.
10223 * common/valid-expr.h: New file.
10224 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
10225 sect_offset and cu_offset strong typedefs throughout.
10226 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10227 typedefs throughout.
10228 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
10229 sect_offset and cu_offset strong typedefs throughout.
10230 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10231 typedefs throughout.
10232 * gdbtypes.h: Include "common/offset-type.h".
10233 (cu_offset): Now an offset type (strong typedef) instead of a
10234 struct.
10235 (sect_offset): Likewise.
10236 (union call_site_parameter_u): Rename "param_offset" field to
10237 "param_cu_off".
10238 * unittests/offset-type-selftests.c: New file.
10239
ecfb656c
PA
102402017-04-04 Pedro Alves <palves@redhat.com>
10241
10242 * common/underlying.h: New file.
10243 * dwarf2read.c: Include "common/gdb_optional.h" and
10244 "common/underlying.h".
10245 (dir_index, file_name_index): New types.
10246 (file_entry): Use them.
10247 (file_entry::include): Use to_underlying.
10248 (line_header::add_file_name): Use dir_index.
10249 (read_formatted_entries): Use gdb::optional. Read form before
10250 writting to file_entry.
10251 (dwarf_decode_line_header): Use dir_index.
10252 (lnp_state_machine::current_file): Use to_underlying.
10253 (lnp_state_machine::file): Change type to file_name_index.
10254 (dwarf_record_line): Use to_underlying.
10255 (init_lnp_state_machine): Use file_name_index.
10256 (dwarf_decode_lines_1): Use dir_index and file_name_index.
10257
d194f1fe
PA
102582017-04-04 Pedro Alves <palves@redhat.com>
10259
10260 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10261 operator bool, has_value and get methods.
10262
fff8551c
PA
102632017-04-04 Pedro Alves <palves@redhat.com>
10264
10265 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10266 fields.
10267 (line_header): Initialize all data fields. Change type of
10268 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10269 Change type of include_dirs to std::vector<const char *>. Remove
10270 num_include_dirs, include_dirs_size. Change type of file_names to
10271 std::vector<file_entry>. Remove num_file_names, file_names_size.
10272 (line_header::line_header): New.
10273 (line_header::add_include_dir, line_header::add_file_name): New
10274 methods.
10275 (line_header::include_dir_at): Remove NULL check.
10276 (line_header::file_name_at): Add const overload.
10277 (line_header_up): New unique_ptr typedef.
10278 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
10279 std::vector. Remove free_line_header call.
10280 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
10281 free_line_header call.
10282 (free_cu_line_header): Delete.
10283 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10284 (setup_type_unit_groups): Use line_header_up instead of cleanups.
10285 Adjust to use std::vector.
10286 (free_line_header): Delete.
10287 (free_line_header_voidp): Use delete.
10288 (add_include_dir): Replace with ...
10289 (line_header::add_include_dir): ... this method. Use std::vector.
10290 (add_file_name): Replace with ...
10291 (line_header::add_file_name): ... this method. Use std::vector.
10292 (add_include_dir_stub): Delete.
10293 (read_formatted_entries): Remove memset.
10294 (dwarf_decode_line_header): Return a line_header_up instead of a
10295 raw pointer. Remove cleanup handling. Pass lambdas to
10296 read_formatted_entries. Adjust to use line_header methods.
10297 (dwarf_decode_lines_1): Adjust to use line_header methods.
10298 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10299 use std::vector.
10300
d62a8ae2
SM
103012017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
10302
10303 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10304 instead of struct ptid.
10305
db3a1dc7
AH
103062017-05-04 Alan Hayward <alan.hayward@arm.com>
10307
10308 * frame.c (get_frame_register_bytes): Unwind using value.
10309 (put_frame_register_bytes): Likewise.
10310
b1b45502
IB
103112017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
10312
10313 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10314 aggregate-like.
10315
ec13808e
JK
103162017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
10317
10318 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10319
12316564
YQ
103202017-03-29 Yao Qi <yao.qi@linaro.org>
10321
10322 * gdbthread.h (struct thread_info): Declare constructor and
10323 destructor. Add some in-class member initializers.
10324 * thread.c (free_thread): Remove.
10325 (init_thread_list): Call delete instead of free_thread.
10326 (new_thread): Call thread_info constructor.
10327 (thread_info::thread_info): New function.
10328 (thread_info::~thread_info): New function.
10329 (delete_thread_1): Call delete instead of free_thread.
10330 (make_cleanup_restore_current_thread): Move tp and frame to
10331 inner block.
10332
fe5f7374
AK
103332017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10334
10335 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10336 (arc_skip_prologue): Likewise.
10337 (arc_make_frame_cache): Likewise.
10338 (arc_pv_get_operand): New function.
10339 (arc_is_in_prologue): Likewise.
10340 (arc_analyze_prologue): Likewise.
10341 (arc_print_frame_cache): Likewise.
10342 (MAX_PROLOGUE_LENGTH): New constant.
10343
eea78757
AK
103442017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10345
10346 * configure.tgt: Add arc-insn.o.
10347 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10348 (dump_arc_instruction_command): New function.
10349 (arc_fprintf_disasm): Likewise.
10350 (arc_disassemble_info): Likewise.
10351 (arc_insn_get_operand_value): Likewise.
10352 (arc_insn_get_operand_value_signed): Likewise.
10353 (arc_insn_get_memory_base_reg): Likewise.
10354 (arc_insn_get_memory_offset): Likewise.
10355 (arc_insn_get_branch_target): Likewise.
10356 (arc_insn_dump): Likewise.
10357 (arc_insn_get_linear_next_pc): Likewise.
10358 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10359 (arc_disassemble_info): Likewise.
10360 (arc_insn_get_branch_target): Likewise.
10361 (arc_insn_get_linear_next_pc): Likewise.
10362 * NEWS: Mention new "maint print arc arc-instruction".
10363
3be78afd
AK
103642017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10365
10366 * arc-tdep (maintenance_print_arc_list): New variable.
10367 (maintenance_print_arc_command): New function.
10368
296ec4fa
AK
103692017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10370
10371 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10372 Add "limm" and "reserved".
10373 (arc_cannot_fetch_register, arc_cannot_store_register): Add
10374 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10375 * arc-tdep.h (arc_regnum): Likewise.
10376
f74f865e
MF
103772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10378
10379 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10380 for THREADPTR register.
10381 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10382 register.
10383 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10384 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10385 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10386
0d0bf81a
MF
103872017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10388
10389 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10390 registers above gdbarch_num_regs (gdbarch) as privileged in
10391 call0 ABI.
10392
0ce4291e
MF
103932017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10394
10395 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10396 for a single specified register or for all registers in
10397 a0_base..a0_base + C0_NREGS range.
10398 (supply_gregset_reg): Call regcache_raw_supply for a single
10399 specified register or for all registers in a0_base..a0_base +
10400 C0_NREGS range.
10401
c56054f9
MF
104022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10403
10404 * arch/xtensa.h (C0_NREGS): Add definition.
10405 * xtensa-tdep.c (C0_NREGS): Remove definition.
10406
a4398628
MF
104072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10408
10409 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10410 Drop xtensa_default_isa initialization.
10411 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10412
8c43009f
PA
104132017-03-27 Pedro Alves <palves@redhat.com>
10414
10415 * dwarf2read.c (file_entry) <dir_index>: Add comment.
10416 (file_entry::include_dir): New method.
10417 (line_header::include_dir_at, line_header::file_name_at): New
10418 methods.
10419 (setup_type_unit_groups, setup_type_unit_groups)
10420 (psymtab_include_file_name): Simplify using the new methods.
10421 (lnp_state_machine) <the_line_header>: New field.
10422 <file>: Add comment.
10423 (lnp_state_machine::current_file): New method.
10424 (dwarf_record_line): Simplify using the new methods.
10425 (init_lnp_state_machine): Initialize the "the_line_header" field.
10426 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10427 Simplify using the new methods.
10428
a7e80b9e
PA
104292017-03-27 Pedro Alves <palves@redhat.com>
10430
10431 * cp-name-parser.y (make_empty): Delete.
10432 (demangler_special, nested_name, ptr_operator, array_indicator)
10433 (direct_declarator, declarator_1): Use fill_comp instead of
10434 make_empty.
10435
21047726
PA
104362017-03-27 Pedro Alves <palves@redhat.com>
10437
10438 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10439 to ATTRIBUTE_PRINTF.
10440 * solib-target.c (library_list_start_list): Print "string" not
10441 "version".
10442 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10443 gdb_xml_error call.
10444
d721ba37
PA
104452017-03-27 Pedro Alves <palves@redhat.com>
10446
10447 * dwarf2read.c (struct file_and_directory): New.
10448 (dwarf2_get_dwz_file): Adjust to use std::string.
10449 (dw2_get_file_names_reader): Adjust to use file_and_directory.
10450 (find_file_and_directory): Adjust to return a file_and_directory
10451 object.
10452 (read_file_scope): Adjust to use file_and_directory. Remove
10453 make_cleanup/do_cleanups calls.
10454 (open_and_init_dwp_file): Adjust to use std::string. Remove
10455 make_cleanup/do_cleanups calls.
10456 * python/python.c (do_start_initialization): Adjust to ldirname
10457 returning a std::string.
10458 * utils.c (ldirname): Now returns a std::string.
10459 * utils.h (ldirname): Change return type to std::string.
10460 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10461 returning a std::string.
10462 * xml-tdesc.c (file_read_description_xml): Likewise.
10463
ed771251
AH
104642017-03-24 Alan Hayward <alan.hayward@arm.com>
10465
10466 * regcache.c (regcache_debug_print_register): New function.
10467 * regcache.h (regcache_debug_print_register): New declaration.
10468 * target.c (debug_print_register): Remove.
10469 (target_fetch_registers): Call regcache_debug_print_register.
10470 (target_store_registers): Likewise.
10471
568c1b9f
PB
104722017-03-24 Pádraig Brady <pbrady@fb.com>
10473
10474 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10475 reference beyond the 'lh->include_dirs' array before accessing to
10476 it.
10477 (psymtab_include_file_name): Likewise.
10478 (dwarf_decode_lines_1): Likewise.
10479 (dwarf_decode_lines): Likewise.
10480 (file_file_name): Likewise.
10481
3e00d44f
SM
104822017-03-23 Simon Marchi <simon.marchi@ericsson.com>
10483
10484 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10485 inferior_ptid.
10486 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10487 ps_lsetfpregs): Likewise.
10488 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10489 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10490 ps_lsetfpregs): Likewise.
10491 * target.c (target_fetch_registers, target_store_registers):
10492 Remove asserts.
10493
077ae656
AH
104942017-03-23 Alan Hayward <alan.hayward@arm.com>
10495
10496 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10497
1e2b521d
YQ
104982017-03-23 Yao Qi <yao.qi@linaro.org>
10499
10500 * aarch64-tdep.c (aarch64_process_record_test): Declare.
10501 (_initialize_aarch64_tdep): Register it.
10502 (aarch64_record_load_store): Handle PRFM instruction.
10503 (aarch64_process_record_test): New function.
10504
33877125
YQ
105052017-03-23 Yao Qi <yao.qi@linaro.org>
10506
10507 * aarch64-tdep.c (aarch64_record_load_store): Fix code
10508 indentation.
10509
a0eef940
YQ
105102017-03-23 Yao Qi <yao.qi@linaro.org>
10511
10512 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10513
3f2a3564
PR
105142017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10515
10516 python/python.c (do_start_initialization): Fix memory leak.
10517
b67aeab0
SM
105182017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10519
10520 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10521 using get_ptrace_pid.
10522 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10523 inferior_ptid.
10524 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10525 inferior_ptid instead of pid.
10526
ffdbe864
YQ
105272017-03-22 Yao Qi <yao.qi@linaro.org>
10528
10529 * aarch64-tdep.c: Wrap locally used classes in anonymous
10530 namespace.
10531 * arm-tdep.c: Likewise.
10532 * linespec.c: Likewise.
10533 * ui-out.c: Likewise.
10534
9d736fbf
JG
105352017-03-22 Jonah Graham <jonah@kichwacoders.com>
10536
10537 PR gdb/19637
10538 * python/lib/gdb/printer/bound_registers.py: Import sys.
10539
3de88e9a
SM
105402017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10541
10542 * windows-nat.c (do_windows_fetch_inferior_registers): Add
10543 windows_thread_info parameter and use it instead of
10544 current_thread.
10545 (windows_fetch_inferior_registers): Don't set current_thread,
10546 pass the thread to do_windows_fetch_inferior_registers. Use
10547 ptid from regcache instead of inferior_ptid.
10548 (do_windows_store_inferior_registers): Add windows_thread_info
10549 parameter and use it instead of current_thread.
10550 (windows_store_inferior_registers): Don't set current_thread,
10551 pass the thread to do_windows_store_inferior_registers. Use
10552 ptid from regcache instead of inferior_ptid.
10553
0e7b8f61
SM
105542017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10555
10556 * ser-mingw.c (ser_windows_raw): Remove reference to
10557 struct serial::current_timeout.
10558
5badf10a
IR
105592017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
10560
10561 PR tdep/20928
10562 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10563 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10564 (sparc64_fsr_type): Fix %fsr decoding.
10565
cee59b3f
TW
105662017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
10567
10568 * python/py-record-btrace.c (btpy_insn_data): Change return type
10569 for Python 2.
10570
639a9038
SM
105712017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10572
10573 * spu-linux-nat.c (spu_fetch_inferior_registers,
10574 spu_store_inferior_registers): Use ptid from regcache, set and
10575 restore inferior_ptid.
10576 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10577 Likewise.
10578
bcc0c096
SM
105792017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10580
10581 * i386-linux-nat.c (fetch_register, store_register,
10582 i386_linux_fetch_inferior_registers,
10583 i386_linux_store_inferior_registers): Use ptid from regcache.
10584 * ia64-linux-nat.c (ia64_linux_fetch_register,
10585 ia64_linux_store_register): Likewise.
10586 * inf-ptrace.c (inf_ptrace_fetch_register,
10587 inf_ptrace_store_register): Likewise.
10588 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10589 m32r_linux_store_inferior_registers): Likewise.
10590 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10591 m68kbsd_store_inferior_registers): Likewise.
10592 * m68k-linux-nat.c (fetch_register, store_register,
10593 m68k_linux_fetch_inferior_registers,
10594 m68k_linux_store_inferior_registers): Likewise.
10595 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10596 m88kbsd_store_inferior_registers): Likewise.
10597 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10598 mips_fbsd_store_inferior_registers): Likewise.
10599 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10600 mips64_linux_regsets_store_registers): Likewise.
10601 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10602 mipsnbsd_store_inferior_registers): Likewise.
10603 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10604 mips64obsd_store_inferior_registers): Likewise.
10605 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10606 Likewise.
10607 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10608 ppcfbsd_store_inferior_registers): Likewise.
10609 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10610 ppc_linux_store_inferior_registers): Likewise.
10611 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10612 ppcnbsd_store_inferior_registers): Likewise.
10613 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10614 ppcobsd_store_registers): Likewise.
10615 * procfs.c (procfs_fetch_registers, procfs_store_registers):
10616 Likewise.
10617 * ravenscar-thread.c (ravenscar_fetch_registers,
10618 ravenscar_store_registers, ravenscar_prepare_to_store):
10619 Likewise.
10620 * record-btrace.c (record_btrace_fetch_registers,
10621 record_btrace_store_registers, record_btrace_prepare_to_store):
10622 Likewise.
10623 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10624 Lookup inferior using ptid from regcache, instead of
10625 current_inferior.
10626 * remote.c (remote_fetch_registers, remote_store_registers): Use
10627 ptid from regcache.
10628 * rs6000-nat.c (fetch_register, store_register): Likewise.
10629 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10630 s390_linux_store_inferior_registers): Likewise.
10631 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10632 shnbsd_store_inferior_registers): Likewise.
10633 * sol-thread.c (sol_thread_fetch_registers,
10634 sol_thread_store_registers): Likewise.
10635 * sparc-nat.c (sparc_fetch_inferior_registers,
10636 sparc_store_inferior_registers): Likewise.
10637 * tilegx-linux-nat.c (fetch_inferior_registers,
10638 store_inferior_registers): Likewise.
10639 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10640 vaxbsd_store_inferior_registers): Likewise.
10641 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10642 store_xtregs): Likewise.
10643
c0f55cc6
AV
106442017-03-20 Artemiy Volkov <artemiyv@acm.org>
10645
10646 PR gdb/14441
10647 * NEWS: Mention support for rvalue references in GDB and python.
10648 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10649 supports both lvalue and rvalue references.
10650
15c0a2a9
AV
106512017-03-20 Artemiy Volkov <artemiyv@acm.org>
10652
10653 PR gdb/14441
10654 * gdbtypes.c (rank_one_type): Implement overloading
10655 resolution rules regarding rvalue references.
10656
aa006118
AV
106572017-03-20 Artemiy Volkov <artemiyv@acm.org>
10658
10659 PR gdb/14441
10660 * aarch64-tdep.c (aarch64_type_align)
10661 (aarch64_extract_return_value, aarch64_store_return_value): Change
10662 lvalue reference type checks to general reference type checks.
10663 * amd64-tdep.c (amd64_classify): Likewise.
10664 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10665 Likewise.
10666 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10667 (arm_store_return_value): Likewise.
10668 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10669 * c-typeprint.c (c_print_type): Likewise.
10670 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10671 (cplus_number_of_children, cplus_describe_child): Likewise.
10672 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10673 * completer.c (expression_completer): Likewise.
10674 * cp-support.c (make_symbol_overload_list_adl_namespace):
10675 Likewise.
10676 * darwin-nat-info.c (info_mach_region_command): Likewise.
10677 * dwarf2loc.c (entry_data_value_coerce_ref)
10678 (value_of_dwarf_reg_entry): Likewise.
10679 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10680 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10681 Likewise.
10682 * findvar.c (extract_typed_address, store_typed_address):
10683 Likewise.
10684 * gdbtypes.c (rank_one_type): Likewise.
10685 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10686 * infcall.c (value_arg_coerce): Likewise.
10687 * language.c (pointer_type): Likewise.
10688 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10689 Likewise.
10690 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10691 * mn10300-tdep.c (mn10300_type_align): Likewise.
10692 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10693 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10694 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10695 Likewise.
10696 * printcmd.c (print_formatted, x_command): Likewise.
10697 * python/py-type.c (typy_get_composite, typy_template_argument):
10698 Likewise.
10699 * python/py-value.c (valpy_referenced_value)
10700 (valpy_get_dynamic_type, value_has_field): Likewise.
10701 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10702 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10703 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10704 * spu-tdep.c (spu_scalar_value_p): Likewise.
10705 * symtab.c (lookup_symbol_aux): Likewise.
10706 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10707 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10708 Likewise.
10709 * valops.c (value_cast_pointers, value_cast)
10710 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10711 (value_struct_elt, value_struct_elt_bitpos)
10712 (value_find_oload_method_list, find_overload_match)
10713 (value_rtti_indirect_type): Likewise.
10714 * valprint.c (val_print_scalar_type_p, generic_val_print):
10715 Likewise.
10716 * value.c (value_actual_type, value_as_address, unpack_long)
10717 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10718 (coerce_ref): Likewise.
10719 * varobj.c (varobj_get_value_type): Likewise.
10720
3fcf899d
AV
107212017-03-20 Artemiy Volkov <artemiyv@acm.org>
10722
10723 PR gdb/14441
10724 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10725 table of constants.
10726 * python/lib/gdb/command/explore.py: Support exploring values
10727 of rvalue reference types.
10728 * python/lib/gdb/types.py: Implement get_basic_type() for
10729 rvalue reference types.
10730 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10731 constant.
10732 * python/py-value.c (valpy_getitem): Add an rvalue reference
10733 check.
10734 (valpy_reference_value): Add new parameter "refcode".
10735 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10736 New wrappers for valpy_reference_value().
10737 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10738 (gdbpy_invoke_xmethod): Likewise.
10739
4297a3f0
AV
107402017-03-20 Artemiy Volkov <artemiyv@acm.org>
10741
10742 PR gdb/14441
10743 * dwarf2read.c (process_die, read_type_die_1): Handle the
10744 DW_TAG_rvalue_reference_type DIE.
10745 (read_tag_reference_type): Add new parameter "refcode".
10746
e1cb3213
AV
107472017-03-20 Artemiy Volkov <artemiyv@acm.org>
10748
10749 PR gdb/14441
10750 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10751 (c_type_print_modifier, c_type_print_varspec_suffix)
10752 (c_type_print_base): Support printing rvalue reference types.
10753 * c-valprint.c (c_val_print, c_value_print): Support printing
10754 rvalue reference values.
10755
e4347c89
AV
107562017-03-20 Artemiy Volkov <artemiyv@acm.org>
10757
10758 PR gdb/14441
10759 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10760 typename.
10761 * cp-support.c (replace_typedefs): Handle
10762 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10763 * python/py-type.c (typy_lookup_type): Likewise.
10764
53cc15f5
AV
107652017-03-20 Artemiy Volkov <artemiyv@acm.org>
10766
10767 PR gdb/14441
10768 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10769 * parse.c (insert_type): Change assert statement.
10770 (follow_types): Handle rvalue reference types.
10771 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10772 constant.
10773
a65cfae5
AV
107742017-03-20 Artemiy Volkov <artemiyv@acm.org>
10775
10776 PR gdb/14441
10777 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10778 value_ref() interface.
10779 * c-valprint.c (c_value_print): Likewise.
10780 * infcall.c (value_arg_coerce): Likewise.
10781 * python/py-value.c (valpy_reference_value): Likewise.
10782 * valops.c (value_cast, value_reinterpret_cast)
10783 (value_dynamic_cast, typecmp): Likewise.
10784 (value_ref): Parameterize by kind of return value reference type.
10785 * value.h (value_ref): Add new parameter "refcode".
10786
3b224330
AV
107872017-03-20 Artemiy Volkov <artemiyv@acm.org>
10788
10789 PR gdb/14441
10790 * dwarf2read.c (read_tag_reference_type): Use
10791 lookup_lvalue_reference_type() instead of lookup_reference_type().
10792 * eval.c (evaluate_subexp_standard): Likewise.
10793 * f-exp.y: Likewise.
10794 * gdbtypes.c (make_reference_type, lookup_reference_type):
10795 Generalize with rvalue reference types.
10796 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10797 convenience wrappers for lookup_reference_type().
10798 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10799 reference kind parameter.
10800 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10801 wrappers for lookup_reference_type().
10802 * guile/scm-type.c (gdbscm_type_reference): Use
10803 lookup_lvalue_reference_type() instead of lookup_reference_type().
10804 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10805 * parse.c (follow_types): Likewise.
10806 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10807 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10808 Likewise.
10809 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10810 (gdbpy_invoke_xmethod): Likewise.
10811 * stabsread.c: Provide extra argument to make_reference_type()
10812 call.
10813 * valops.c (value_ref, value_rtti_indirect_type): Use
10814 lookup_lvalue_reference_type() instead of lookup_reference_type().
10815
f9aeb8d4
AV
108162017-03-20 Artemiy Volkov <artemiyv@acm.org>
10817
10818 PR gdb/14441
10819 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10820 (TYPE_IS_REFERENCE): New macro.
10821 (struct type): Add rvalue_reference_type field.
10822 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10823
51457a05
MAL
108242017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10825
10826 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10827 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10828 New function definition.
10829 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10830 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10831 New function declaration.
10832 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10833 * mi/mi-interp.h: New file.
10834 * solib.c (info_sharedlibrary_command): Replace for loop with
10835 ALL_SO_LIBS macro
10836 * solib.h (update_solib_list): New function declaration.
10837 (so_list_head): Move macro.
10838 * solist.h (ALL_SO_LIBS): New macro.
10839
e696b3ad
MAL
108402017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10841
10842 * infcmd.c (post_create_inferior): Remove unused argument in
10843 call to solib_add.
10844 * remote.c (remote_start_remote): Likewise.
10845 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10846 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10847 (enable_break): Likewise.
10848 * solib.c (update_solib_list): Remove unused target argument
10849 and its documentation.
10850 (solib_add): Remove unused target argument. Remove unused
10851 argument in call to update_solib_list.
10852 (info_sharedlibrary_command): Remove unused argument in call
10853 to update_solib_list.
10854 (sharedlibrary_command): Remove unused argument in call to
10855 solib_add.
10856 (handle_solib_event): Likewise.
10857 (reload_shared_libraries): Likewise.
10858 * solib.h (solib_add): Remove unused target argument.
10859
dcb84eda
AA
108602017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
10861
10862 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10863 (s390_displaced_step_fixup): Cover relative branches with the
10864 default fixup handling. This fixes lack of support for some
10865 relative branch instructions.
10866
d9cb6cdc
SM
108672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10868
10869 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10870 ptid from regcache.
10871
1afaf9f4
SM
108722017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10873
10874 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10875 i386_darwin_store_inferior_registers): Use ptid from regcache.
10876
aac12e24
SM
108772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10878
10879 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10880 i386bsd_store_inferior_registers): Use ptid from regcache.
10881
bbe1eef1
SM
108822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10883
10884 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10885 hppaobsd_store_registers): Use ptid from regcache.
10886
10799020
SM
108872017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10888
10889 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10890 hppanbsd_store_registers): Use ptid from regcache.
10891
00204cf7
SM
108922017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10893
10894 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10895 from regcache. Use get_ptrace_pid.
10896
11a33714
SM
108972017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10898
10899 * corelow.c (get_core_register_section): Use ptid from regcache,
10900 update doc.
10901
317cd492
SM
109022017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10903
10904 * bsd-uthread.c (bsd_uthread_fetch_registers,
10905 bsd_uthread_store_registers): Use ptid from regcache, set and
10906 restore inferior_ptid.
10907
9ac8a7c2
SM
109082017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10909
10910 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10911 fetch_fp_regs, store_register, store_regs, store_fp_register,
10912 store_fp_regs): Use ptid from regcache.
10913
4ac4bb6a
SM
109142017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10915
10916 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10917 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10918 store_vfp_regs): Use ptid from regcache.
10919
9bcbdca8
PA
109202017-03-17 Pedro Alves <palves@redhat.com>
10921
10922 PR remote/21188
10923 * ser-base.c (ser_base_wait_for): Add comment.
10924 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10925 version.
10926 * ser-unix.c (hardwire_raw): Remove reference to
10927 scb->current_timeout.
10928 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10929 (hardwire_ops): Install ser_base_readchar instead of
10930 hardwire_readchar.
10931 * serial.h (struct serial) <current_timeout, timeout_remaining>:
10932 Remove fields.
10933
7503099f
JG
109342017-03-17 Jonah Graham <jonah@kichwacoders.com>
10935
10936 PR gdb/19637
10937 * python/lib/gdb/printer/bound_registers.py: Add support for
10938 Python 3.
10939
7942e96e
AA
109402017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
10941
10942 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10943 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10944 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10945 byte_offset to subobj_byte_offset. Fix the handling of
10946 DWARF_VALUE_STACK on big-endian targets when coming via an
10947 implicit pointer.
10948 (dwarf2_evaluate_loc_desc): Adjust call to
10949 dwarf2_evaluate_loc_desc_full.
10950 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10951 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10952
ba14f379
YQ
109532017-03-16 Yao Qi <yao.qi@linaro.org>
10954
10955 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10956 and REVSH instructions.
10957
b121eeb9
YQ
109582017-03-16 Yao Qi <yao.qi@linaro.org>
10959
10960 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10961 (arm_record_test): Declare.
10962 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10963 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10964 align with the manual.
10965 (thumb_record_misc): Adjust the code order to align with the
10966 manual.
10967 (thumb2_record_decode_insn_handler): Fix instruction matching.
10968 (instruction_reader_thumb): New class.
10969 (arm_record_test): New function.
10970
728a7913
YQ
109712017-03-16 Yao Qi <yao.qi@linaro.org>
10972
10973 * arm-tdep.c (abstract_memory_reader): New class.
10974 (instruction_reader): New class.
10975 (extract_arm_insn): Add argument 'reader'. Callers updated.
10976 (decode_insn): Likewise.
10977
34b43320
DE
109782017-03-16 Doug Evans <dje@google.com>
10979
a7c0469f
DE
10980 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10981 member. Change type of TYPE member to SCM. All uses updated.
10982 (lsscm_make_lazy_string_smob): Add assert.
10983 (lsscm_make_lazy_string): Flag bad length values.
10984 (lsscm_elt_type): New function.
10985 (gdbscm_lazy_string_to_value): Rewrite to use
10986 lsscm_safe_lazy_string_to_value.
10987 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10988 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10989 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
10990 in incoming type.
10991 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10992 * guile/scm-type.c (tyscm_scm_to_type): New function.
10993
109942017-03-15 Doug Evans <dje@google.com>
10995
34b43320
DE
10996 PR python/17728, python/18439, python/18779
10997 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10998 member. Change type of TYPE member to PyObject *. All uses updated.
10999 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11000 (gdbpy_create_lazy_string_object): Flag bad length values.
11001 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11002 Handle typedefs in incoming type.
11003 (stpy_lazy_string_elt_type): New function.
11004 (gdbpy_extract_lazy_string): Call it.
11005 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11006 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11007 typedefs in incoming type.
11008
a3a5fecc
DE
110092017-03-16 Doug Evans <dje@google.com>
11010
11011 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11012 * guile/scm-type.c (tyscm_scm_to_type): New function.
11013
28f1c605
JW
110142017-03-16 Jiong Wang <jiong.wang@arm.com>
11015
11016 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11017 "ULONGEST" for "skip".
11018
87c336f6
AA
110192017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11020
11021 PR gdb/21220
11022 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11023 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11024 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11025 over ptrace peek/poke until end of buffer or error.
11026
cf81cf60
SM
110272017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11028
11029 * parse.c (length_of_subexp): Make static.
11030 * parser-defs.h (length_of_subexp): Remove.
11031
a379284a
AA
110322017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11033
11034 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11035 as well.
11036
8a6200ba
PA
110372017-03-14 Pedro Alves <palves@redhat.com>
11038
11039 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11040 (main): Use std::unique_ptr. Remove calls to
11041 cp_demangled_name_parse_free.
11042
f79ec206
SM
110432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11044
11045 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11046 alphabsd_store_inferior_registers): Use regcache->ptid instead
11047 of inferior_ptid.
11048
edb5fb00
SM
110492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11050
11051 * aix-thread.c (aix_thread_fetch_registers,
11052 aix_thread_store_registers): Use regcache->ptid instead of
11053 inferior_ptid.
11054
55119686
SM
110552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11056
11057 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11058 store_gregs_to_thread, fetch_fpregs_from_thread,
11059 store_fpregs_to_thread): Use regcache->ptid instead of
11060 inferior_ptid.
11061
6a06fbb7
SM
110622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11063
11064 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11065 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11066 instead of inferior_ptid.
11067
c6386875
SM
110682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11069
11070 * target.c (target_fetch_registers, target_store_registers): Add
11071 assert.
11072
ddaaf0fb
SM
110732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11074
11075 * regcache.h (regcache_get_ptid): New function.
11076 * regcache.c (regcache_get_ptid): New function.
11077
b9da89d1 110782017-03-13 Mark Wielaard <mark@klomp.org>
11079
11080 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11081
5f4d1085
KS
110822017-03-10 Keith Seitz <keiths@redhat.com>
11083
11084 PR c++/8218
11085 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11086
c65d6b55
PA
110872017-03-08 Pedro Alves <palves@redhat.com>
11088
11089 PR gdb/18360
11090 * infrun.c (start_step_over, do_target_resume, resume)
11091 (restart_threads): Assert we're not resuming a thread that is
11092 meant to be stopped.
11093 (infrun_thread_stop_requested_callback): Delete.
11094 (infrun_thread_stop_requested): If the thread is internally
11095 stopped, queue a pending stop event and clear the thread's
11096 inline-frame state.
11097 (handle_stop_requested): New function.
11098 (handle_syscall_event, handle_inferior_event_1): Use
11099 handle_stop_requested.
11100 (handle_stop_requested): New function.
11101 (handle_signal_stop): Set the thread's stop_signal here instead of
11102 at caller.
11103 (finish_step_over): Clear step over info unconditionally.
11104 (handle_signal_stop): If the user had interrupted the event
11105 thread, consider the stop a random signal.
11106 (handle_signal_stop) <signal arrived while stepping over
11107 breakpoint>: Don't restart threads here.
11108 (stop_waiting): Don't clear step-over info here.
11109
15c22686
PA
111102017-03-08 Pedro Alves <palves@redhat.com>
11111
11112 PR 21206
11113 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11114 goes to argument 2, not 1.
11115
6e5d74e7
PA
111162017-03-08 Pedro Alves <palves@redhat.com>
11117
11118 PR cli/21218
11119 * top.c (gdb_readline_wrapper): Avoid passing NULL to
11120 display_gdb_prompt.
11121 (command_line_input): Add comment.
11122
9753a2f6
PA
111232017-03-08 Pedro Alves <palves@redhat.com>
11124
11125 PR tui/21216
11126 * tui/tui-file.c (tui_file::write): New.
11127 * tui/tui-file.h (tui_file): Override "write".
11128 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11129 factored out from ...
11130 (tui_puts): ... here.
11131 (tui_putc): Use them.
11132 (tui_write): New function.
11133 * tui/tui-io.h (tui_write): Declare.
11134
1672e0d9
SDJ
111352017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
11136
11137 * Makefile.in (SFILES): Replace "environ.c" with
11138 "common/environ.c".
11139 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11140 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
11141 to...
11142 * common/environ.c: ... here.
11143 * environ.h: Moved to...
11144 * common/environ.h: ... here.
11145
f7bb4e3a
PB
111462017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11147
11148 * gdbarch.sh (pstring_ptr): New static function.
11149 (gdbarch_disassembler_options): Use it.
11150 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11151 not valid_disassembler_option->name.
11152 * gdbarch.c: Regenerate.
11153
e45ced6c
PB
111542017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11155
11156 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11157
5f6fd321
PA
111582017-03-07 Pedro Alves <palves@redhat.com>
11159
11160 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11161
6dbb839a 111622017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
11163
11164 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11165 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11166 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 11167 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 11168
d274ecf4
SM
111692017-03-06 Simon Marchi <simon.marchi@ericsson.com>
11170
11171 * xtensa-linux-nat.c (fetch_gregs): Remove const.
11172
df97be55
SM
111732017-03-03 Simon Marchi <simon.marchi@ericsson.com>
11174
11175 * remote.c (remote_add_target_side_commands): Use range-based
11176 for loop.
11177
7d45f3df
YQ
111782017-03-03 Yao Qi <yao.qi@linaro.org>
11179
11180 PR gdb/21165
11181 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11182 value is lazy.
11183 * valprint.c (common_val_print): Likewise.
11184
65b48a81
PB
111852017-02-28 Peter Bergner <bergner@vnet.ibm.com>
11186
11187 * NEWS: Mention new set/show disassembler-options commands.
11188 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11189 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11190 (prospective_options): New static variable.
11191 (gdb_disassembler::gdb_disassembler): Initialize
11192 m_di.disassembler_options.
11193 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11194 (get_disassembler_options): New function.
11195 (set_disassembler_options): Likewise.
11196 (set_disassembler_options_sfunc): Likewise.
11197 (show_disassembler_options_sfunc): Likewise.
11198 (disassembler_options_completer): Likewise.
11199 (_initialize_disasm): Likewise.
11200 * disasm.h (get_disassembler_options): New prototype.
11201 (set_disassembler_options): Likewise.
11202 * gdbarch.sh (gdbarch_disassembler_options): New variable.
11203 (gdbarch_verify_disassembler_options): Likewise.
11204 * gdbarch.c: Regenerate.
11205 * gdbarch.h: Likewise.
11206 * arm-tdep.c (num_disassembly_options): Delete.
11207 (set_disassembly_style): Likewise.
11208 (arm_disassembler_options): New static variable.
11209 (set_disassembly_style_sfunc): Convert short style name into long
11210 option name. Call set_disassembler_options.
11211 (show_disassembly_style_sfunc): New function.
11212 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11213 set_gdbarch_verify_disassembler_options.
11214 (_initialize_arm_tdep): Delete regnames variable and update callers.
11215 (arm_disassembler_options): Initialize.
11216 (disasm_options): New variable.
11217 (num_disassembly_options): Rename from this...
11218 (num_disassembly_styles): ...to this. Compute by scanning through
11219 disasm_options.
11220 (valid_disassembly_styles): Initialize using disasm_options.
11221 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11222 set_arm_regname_option.
11223 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11224 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11225 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11226 set_gdbarch_verify_disassembler_options.
11227 * s390-tdep.c (s390_disassembler_options): New static variable.
11228 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11229 set_gdbarch_verify_disassembler_options.
11230
d538e36d
SM
112312017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11232
11233 * remote.c (remote_add_target_side_condition): Remove "struct"
11234 keyword from range-based for loop.
11235
83621223
SM
112362017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11237
11238 * remote.c (remote_add_target_side_condition): Use range-based
11239 for loop. Update comment.
11240
2123df0e
YQ
112412017-02-27 Yao Qi <yao.qi@linaro.org>
11242
11243 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11244
8e368124
AH
112452017-02-26 Alan Hayward <alan.hayward@arm.com>
11246
11247 * regcache.c (regcache_raw_update): New function.
11248 (regcache_raw_read): Move code to regcache_raw_update.
11249 * regcache.h (regcache_raw_update): New declaration.
11250 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11251
a49dd8dd
JK
112522017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
11253
11254 * dwarf2read.c (create_debug_type_hash_table): Initialize
11255 header.signature and header.type_offset_in_tu.
11256
34e4bae9
PA
112572017-02-24 Pedro Alves <palves@redhat.com>
11258
11259 * symtab.c (make_file_symbol_completion_list_1): Use
11260 add_symtab_completions.
11261
b0e4b369
AH
112622017-02-24 Alan Hayward <alan.hayward@arm.com>
11263
11264 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11265
975c21ab
AH
112662017-02-24 Alan Hayward <alan.hayward@arm.com>
11267
11268 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11269 I386_MAX_REGISTER_SIZE.
11270 (i386_pseudo_register_write): Likewise.
11271 (i386_process_record): Likewise.
11272 * i387-tdep.c (i387_supply_xsave): Likewise.
11273 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11274 (store_register): Likewise.
11275
14bc53a8
PA
112762017-02-23 Pedro Alves <palves@redhat.com>
11277
11278 * ada-lang.c: Include "common/function-view.h".
11279 (ada_iterate_over_symbols): Adjust to use function_view as
11280 callback type.
11281 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11282 (ada_make_symbol_completion_list): Use a lambda.
11283 (ada_exc_search_name_matches): Delete.
11284 (name_matches_regex): New.
11285 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11286 * compile/compile-c-support.c: Include "common/function-view.h".
11287 (print_one_macro): Change prototype to accept a ui_file pointer.
11288 (write_macro_definitions): Use a lambda.
11289 * dwarf2read.c: Include "common/function-view.h".
11290 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11291 (dw2_expand_symtabs_matching): Adjust to use function_view as
11292 callback type.
11293 * language.h: Include "common/function-view.h".
11294 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11295 function_view as callback type.
11296 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11297 * linespec.c: Include "common/function-view.h".
11298 (collect_info::add_symbol): New method.
11299 (struct symbol_and_data_callback, iterate_inline_only, struct
11300 symbol_matcher_data, iterate_name_matcher): Delete.
11301 (iterate_over_all_matching_symtabs): Adjust to use function_view
11302 as callback type and lambdas.
11303 (iterate_over_file_blocks): Adjust to use function_view as
11304 callback type.
11305 (decode_compound_collector): Now a class with private fields.
11306 (decode_compound_collector::release_symbols): New method.
11307 (collect_one_symbol): Rename to...
11308 (decode_compound_collector::operator()): ... this and adjust.
11309 (lookup_prefix_sym): decode_compound_collector construction bits
11310 move to decode_compound_collector ctor. Pass the
11311 decode_compound_collector object directly as callback. Remove
11312 cleanups and use decode_compound_collector::release_symbols
11313 instead.
11314 (symtab_collector): Now a class with private fields.
11315 (symtab_collector::release_symtabs): New method.
11316 (add_symtabs_to_list): Rename to...
11317 (symtab_collector::operator()): ... this and adjust.
11318 (collect_symtabs_from_filename): symtab_collector construction
11319 bits move to symtab_collector ctor. Pass the symtab_collector
11320 object directly as callback. Remove cleanups and use
11321 symtab_collector::release_symtabs instead.
11322 (collect_symbols): Delete.
11323 (add_matching_symbols_to_info): Use lambdas.
11324 * macrocmd.c (print_macro_callback): Delete.
11325 (info_macro_command): Use a lambda.
11326 (info_macros_command): Pass print_macro_definition as callable
11327 directly.
11328 (print_one_macro): Remove 'ignore' parameter.
11329 (macro_list_command): Adjust.
11330 * macrotab.c (macro_for_each_data::fn): Now a function_view.
11331 (macro_for_each_data::user_data): Delete field.
11332 (foreach_macro): Adjust to call the function_view.
11333 (macro_for_each): Adjust to use function_view as callback type.
11334 (foreach_macro_in_scope): Adjust to call the function_view.
11335 (macro_for_each_in_scope): Adjust to use function_view as callback
11336 type.
11337 * macrotab.h: Include "common/function-view.h".
11338 (macro_callback_fn): Declare a prototype instead of a pointer.
11339 Remove "user_data" parameter.
11340 (macro_for_each, macro_for_each_in_scope): Adjust to use
11341 function_view as callback type.
11342 * psymtab.c (partial_map_expand_apply)
11343 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11344 Adjust to use function_view as callback type and to return bool.
11345 (psym_expand_symtabs_matching): Adjust to use function_view as
11346 callback types.
11347 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11348 to use function_view as callback type and to return bool.
11349 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11350 callback types.
11351 * symfile.c (expand_symtabs_matching): Adjust to use function_view
11352 as callback types.
11353 * symfile.h: Include "common/function-view.h".
11354 (expand_symtabs_file_matcher_ftype)
11355 (expand_symtabs_symbol_matcher_ftype)
11356 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11357 return bool.
11358 (quick_symbol_functions::map_symtabs_matching_filename)
11359 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11360 function_view as callback type and return bool.
11361 (expand_symtabs_matching): Adjust to use function_view as callback
11362 type.
11363 (maintenance_expand_name_matcher)
11364 (maintenance_expand_file_matcher): Delete.
11365 (maintenance_expand_symtabs): Use lambdas.
11366 * symtab.c (iterate_over_some_symtabs): Adjust to use
11367 function_view as callback types and return bool.
11368 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
11369 of a cleanup.
11370 (lookup_symtab_callback): Delete.
11371 (lookup_symtab): Use a lambda.
11372 (iterate_over_symbols): Adjust to use function_view as callback
11373 type.
11374 (struct search_symbols_data, search_symbols_file_matches)
11375 (search_symbols_name_matches): Delete.
11376 (search_symbols): Use a pair of lambdas.
11377 (struct add_name_data, add_macro_name, symbol_completion_matcher)
11378 (symtab_expansion_callback): Delete.
11379 (default_make_symbol_completion_list_break_on_1): Use lambdas.
11380 * symtab.h: Include "common/function-view.h".
11381 (iterate_over_some_symtabs): Adjust to use function_view as
11382 callback type and return bool.
11383 (iterate_over_symtabs): Adjust to use function_view as callback
11384 type.
11385 (symbol_found_callback_ftype): Remove 'data' parameter and return
11386 bool.
11387 (iterate_over_symbols): Adjust to use function_view as callback
11388 type.
11389
07e253aa
PA
113902017-02-23 Pedro Alves <palves@redhat.com>
11391
11392 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11393 (%.o) <unittests/%.c>: New pattern.
11394 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11395 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11396 * common/function-view.h: New file.
11397 * unittests/function-view-selftests.c: New file.
11398 * configure: Regenerate.
11399
8eaf5320
SM
114002017-02-23 Simon Marchi <simon.marchi@ericsson.com>
11401
11402 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11403 inferior_ptid.
11404 * go32-nat.c (go32_thread_alive): Likewise.
11405
38768751
YQ
114062017-02-23 Yao Qi <yao.qi@linaro.org>
11407
11408 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11409 delete.
11410
0a8beaba
YQ
114112017-02-23 Yao Qi <yao.qi@linaro.org>
11412
11413 * varobj.c (varobj_clear_saved_item): Use delete instead of
11414 xfree.
11415 (update_dynamic_varobj_children): Likewise.
11416
58fdfd2c
JK
114172017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11418
11419 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11420
1b90b139
SM
114212017-02-21 Simon Marchi <simon.marchi@ericsson.com>
11422
11423 * common/enum-flags.h (enum_flags::enum_flags): Initialize
11424 m_enum_value to 0 in default constructor.
11425
2039d74e
EBM
114262017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11427
11428 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11429 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11430 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11431 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11432 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11433 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11434 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11435 IS_STORE_CONDITIONAL_INSN.
11436
7814882a
JK
114372017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11438
11439 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11440
0ae60b63
JK
114412017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11442
11443 * NEWS (Changes since GDB 7.12): Add DWARF-5.
11444
0224619f
JK
114452017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11446
11447 * dwarf2read.c (skip_one_die, read_attribute_value)
11448 (dwarf2_const_value_attr, dump_die_shallow)
11449 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11450 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11451
0af92d60
JK
114522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11453
11454 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11455 (dwarf_parse_macro_header): Accept DWARF version 5.
11456 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11457
216f72a1
JK
114582017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11459
11460 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11461 DW_AT_GNU_*.
11462 * common/common-exceptions.h (enum errors): Likewise.
11463 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11464 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11465 (dwarf_expr_context::execute_stack_op): Likewise.
11466 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11467 Likewise.
11468 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11469 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11470 (show_entry_values_debug, call_site_to_target_addr)
11471 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11472 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11473 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11474 (value_of_dwarf_block_entry, indirect_pieced_value)
11475 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11476 (disassemble_dwarf_expression): Likewise.
11477 * dwarf2read.c (process_die, inherit_abstract_dies)
11478 (read_call_site_scope): Likewise.
11479 * gdbtypes.h (struct func_type, struct call_site_parameter)
11480 (struct call_site): Likewise.
11481 * stack.c (read_frame_arg): Likewise.
11482 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11483
43988095
JK
114842017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11485
11486 * defs.h (read_unsigned_leb128): New declaration.
11487 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11488 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11489 (dwarf2_find_location_expression): Call also
11490 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
11491 * dwarf2loc.h (dwarf2_version): New declaration.
11492 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11493 rnglists.
11494 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11495 .debug_rnglists.
11496 (struct dwop_section_names): Add loclists_dwo.
11497 (dwop_section_names): Add .debug_loclists.dwo.
11498 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11499 (struct dwarf2_per_cu_data): Add dwarf_version.
11500 (struct dwo_sections): Add loclists.
11501 (struct attr_abbrev): Add implicit_const.
11502 (read_indirect_line_string): New declaration.
11503 (read_unsigned_leb128): Delete declaration.
11504 (rcuh_kind): New definition.
11505 (read_and_check_comp_unit_head): Change parameter
11506 is_debug_types_section to section_kind.
11507 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11508 (read_comp_unit_head): Change parameter abfd to section, add parameter
11509 section_kind. Handle DWARF-5.
11510 (error_check_comp_unit_head): Accept also DWARF version 5.
11511 (read_and_check_comp_unit_head): Change parameter
11512 is_debug_types_section to section_kind.
11513 (read_and_check_type_unit_head): Delete function.
11514 (read_abbrev_offset): Handle DWARF-5.
11515 (create_debug_type_hash_table): Add parameter section_kind. Process
11516 only DW_UT_type. Use signature and type_offset_in_tu from struct
11517 comp_unit_head.
11518 (create_debug_types_hash_table): Update create_debug_type_hash_table
11519 caller.
11520 (create_all_type_units): Call create_debug_type_hash_table.
11521 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11522 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11523 caller.
11524 (skip_one_die): Handle DW_FORM_implicit_const.
11525 (dwarf2_rnglists_process): New function.
11526 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11527 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11528 (read_attribute_value): Handle DW_FORM_implicit_const,
11529 DW_FORM_line_strp.
11530 (read_attribute): Handle DW_FORM_implicit_const.
11531 (read_indirect_string_at_offset_from): New function from
11532 read_indirect_string_at_offset.
11533 (read_indirect_string_at_offset): Call
11534 read_indirect_string_at_offset_from.
11535 (read_indirect_line_string_at_offset): New function.
11536 (read_indirect_string): New function comment.
11537 (read_indirect_line_string): New function.
11538 (read_unsigned_leb128): Make it global.
11539 (dwarf2_string_attr): Handle DWARF-5.
11540 (add_include_dir_stub, read_formatted_entries): New functions.
11541 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11542 Handle DWARF-5.
11543 (per_cu_header_read_in): Update read_comp_unit_head caller.
11544 (dwarf2_version): New function.
11545 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11546 rnglists.
11547 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11548 fields.
11549
22d2f3ab
JK
115502017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11551
11552 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11553
5f46c5a5
JK
115542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11555
11556 * dwarf2read.c (dwarf2_ranges_process): New function from
11557 dwarf2_ranges_read.
11558 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11559 dwarf2_ranges_process.
11560
78d4d2c5
JK
115612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11562
11563 * dwarf2read.c (create_debug_type_hash_table): New function from
11564 create_debug_types_hash_table.
11565 (create_debug_types_hash_table): Call create_debug_type_hash_table.
11566 (create_all_type_units, open_and_init_dwo_file): Update
11567 create_debug_types_hash_table callers.
11568
1b076f25
SDJ
115692017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11570
11571 PR gdb/16188
11572 * fork-child.c (trace_start_error): Fix thinko. va_end should
11573 refer to 'ap', not 'args'.
11574
0db8980c
SDJ
115752017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11576 Pedro Alves <palves@redhat.com>
11577
11578 PR gdb/16188
11579 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11580 calls succeeded.
11581 * fork-child.c (trace_start_error): New function.
11582 (trace_start_error_with_name): Likewise.
11583 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11584 * inf-ptrace.c (inf_ptrace_me): Likewise.
11585 * inferior.h (trace_start_error): New prototype.
11586 (trace_start_error_with_name): Likewise.
11587
99e8a4f9
SDJ
115882017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
11589
11590 PR gdb/21164
11591 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11592 NULL before using it.
11593 * symmisc.c (maintenance_print_symbols): Likewise.
11594 (maintenance_print_msymbols): Likewise.
11595
4e746bb6
TW
115962017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11597
11598 * NEWS: Add record Python bindings entry.
11599
116002017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11601
11602 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11603 py-record-full.o.
11604 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11605 * python/py-record-btrace.c, python/py-record-btrace.h,
11606 python/py-record-full.c, python/py-record-full.h: New file.
11607 * python/py-record.c: Add include for py-record-btrace.h and
11608 py-record-full.h.
11609 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11610 recpy_instruction_history, recpy_function_call_history, recpy_begin,
11611 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11612 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11613 New definition.
11614 (gdbpy_initialize_btrace): New export.
11615 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11616
116172017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11618
11619 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11620 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11621 * python/py-record.c: New file.
11622 * python/python-internal.h (gdbpy_start_recording,
11623 gdbpy_current_recording, gdpy_stop_recording,
11624 gdbpy_initialize_record): New export.
11625 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11626 (python_GdbMethods): Add gdbpy_start_recording,
11627 gdbpy_current_recording and gdbpy_stop_recording.
11628
116292017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11630
11631 * record-btrace.c (record_btrace_record_method): New function.
11632 (init_record_btrace_ops): Initialize to_record_method.
11633 * record-full.c (record_full_record_method): New function.
11634 (init_record_full_ops, init_record_full_core_ops): Add
11635 record_full_record_method.
11636 * record.h (enum record_method): New enum.
11637 * target-debug.h (target_debug_print_enum_record_method: New define.
11638 * target-delegates.c: Regenerate.
11639 * target.c (target_record_method): New function.
11640 * target.h: Include record.h.
11641 (struct target_ops) <to_record_method>: New field.
11642 (target_record_method): New export.
11643
116442017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11645
11646 * record.h (record_start, record_stop): New export.
11647 * record.c (record_start, record_stop): New function.
11648
116492017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11650
11651 * btrace.c (btrace_fetch): Copy function call segments pointer
11652 into a vector.
11653 (btrace_clear): Clear the vector.
11654 (btrace_find_insn_by_number): Use binary search to find the correct
11655 function call segment.
11656 * btrace.h (brace_fun_p): New typedef.
11657 (struct btrace_thread_info) <functions>: New field.
11658
116592017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11660
11661 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11662 * btrace.c (btrace_decode_error): ... here. New function.
11663 * btrace.h (btrace_decode_error): New export.
11664
116652017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11666
11667 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11668 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11669 btrace_find_insn_by_number): Remove special case for gaps.
11670 * btrace.h (btrace_insn_get_error): New export.
11671 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11672 * record-btrace.c (btrace_insn_history): Print number for gaps.
11673 (record_btrace_info, record_btrace_goto): Handle gaps.
11674
3f77c769
TT
116752017-02-14 Tom Tromey <tom@tromey.com>
11676
11677 PR python/13598:
11678 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11679 event.
11680 * python/py-evts.c (gdbpy_initialize_py_events): Add
11681 before_prompt registry.
11682 * python/py-events.h (events_object) <before_prompt>: New field.
11683
4c2c7ac6
MM
116842017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11685
11686 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11687
5cf30ebf
LM
116882017-02-13 Luis Machado <lgustavo@codesourcery.com>
11689
11690 * symfile (_initialize_symfile): Add usage text to the load command's
11691 help text.
11692
26a06916
SM
116932017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11694
11695 * utils.c (defaulted_query): Don't query on secondary UIs.
11696
0b145e37
TT
116972017-02-10 Tom Tromey <tom@tromey.com>
11698
11699 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11700
2d8365c4
TT
117012017-02-10 Tom Tromey <tom@tromey.com>
11702
11703 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11704 "cleanup" local.
11705 * python/py-type.c (typy_legacy_template_argument): Remove
11706 unnecessary "cleanup" local.
11707
2bb8f231
TT
117082017-02-10 Tom Tromey <tom@tromey.com>
11709
11710 * python/python.c (do_start_initialization): New function, from
11711 _initialize_python.
11712 (_initialize_python): Call do_start_initialization.
11713 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11714 goto.
11715
1bdfaf42
TT
117162017-02-10 Tom Tromey <tom@tromey.com>
11717
11718 * python/py-prettyprint.c (pretty_print_one_value): Use
11719 gdbpy_ref.
11720
88b6faea
TT
117212017-02-10 Tom Tromey <tom@tromey.com>
11722
11723 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11724 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11725 gdbpy_ref.
11726 * python/py-type.c (field_new): Use gdbpy_ref.
11727 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11728 gdbpy_ref.
11729 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11730 (py_free_pspace): Likewise.
11731 (pspace_to_pspace_object): Likewise.
11732 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11733 (py_free_objfile): Likewise.
11734 (objfile_to_objfile_object): Likewise.
11735 * python/py-inferior.c (delete_thread_object): Use
11736 gdbpy_ref.
11737 (infpy_read_memory): Likewise.
11738 (py_free_inferior): Likewise.
11739 * python/py-evtregistry.c (create_eventregistry_object): Use
11740 gdbpy_ref.
11741 * python/py-event.c (create_event_object): Use gdbpy_ref.
11742
7780f186
TT
117432017-02-10 Tom Tromey <tom@tromey.com>
11744
11745 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11746 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11747 used.
11748 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11749 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11750 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11751 python/py-framefilter.c, python/py-function.c,
11752 python/py-inferior.c, python/py-infevents.c,
11753 python/py-linetable.c, python/py-newobjfileevent.c,
11754 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11755 python/py-signalevent.c, python/py-stopevent.c,
11756 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11757 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11758 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11759 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11760
d4b0bb18
TT
117612017-02-10 Tom Tromey <tom@tromey.com>
11762
11763 * ui-out.h (ui_out_emit_type): New class.
11764 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11765 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11766 and ui_out_emit_tuple.
11767 (enumerate_locals): Likewise.
11768 (py_mi_print_variables, py_print_locals, py_print_args): Use
11769 ui_out_emit_list.
11770 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11771 ui_out_emit_list.
11772 * common/gdb_optional.h: New file.
11773
f67f945c
MG
117742017-02-10 Martin Galvan <martingalvan@sourceware.org>
11775
11776 * MAINTAINERS (Write After Approval): Update my e-mail address.
11777
18da0c51
MG
117782017-02-10 Martin Galvan <martingalvan@sourceware.org>
11779
11780 PR gdb/21122
11781 * breakpoint.c (_initialize_breakpoint): Update the help description
11782 of the 'commands' command to indicate that it takes a list argument.
11783
62c14536
SM
117842017-02-09 Simon Marchi <simon.marchi@ericsson.com>
11785
11786 * interps.c (current_interp_set_logging): Remove "return".
11787
ff6fa247
GB
117882017-02-09 Gary Benson <gbenson@redhat.com>
11789
11790 * symtab.c (add_symtab_completions): Prevent NULL pointer
11791 dereference.
11792
a474bd8e
PA
117932017-02-08 Pedro Alves <palves@redhat.com>
11794
11795 * interps.c (interp::interp): Remove reference to quiet_p.
11796 (interp_set): Make static. Remove dead "Switching to" output
11797 code.
11798 (interp_quiet_p, interp_set_quiet): Delete.
11799 (interpreter_exec_cmd): Don't set the interpreter quiet.
11800 * interps.h (interp_quiet_p): Make static.
11801 (class interp) <quiet_p>: Remove field
11802
3d7b173c
JG
118032017-02-08 Jerome Guitton <guitton@adacore.com>
11804
604c4576
JG
11805 * cli/cli-decode.c (find_command_name_length): Make it extern.
11806 * cli/cli-decode.h (find_command_name_length): Declare.
11807 * cli/cli-script.c (command_name_equals, line_first_arg):
11808 New functions.
11809 (process_next_line): Use cli-decode to parse command names.
11810 (build_command_line): Make args a constant pointer.
11811
118122017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 11813
3d7b173c
JG
11814 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11815 Remove case-insensitive search.
11816
1291063d
JM
118172017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
11818
11819 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11820 at the end of the line. Avoids an ARI warning.
11821
20b477a7
LM
118222017-02-06 Luis Machado <lgustavo@codesourcery.com>
11823
11824 * NEWS: Mention support for record/replay of Intel 64 rdrand and
11825 rdseed instructions.
11826 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11827
3f7b46f2
IR
118282017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
11829
11830 PR tdep/20936
11831 Provide and use sparc32 and sparc64 target description XML files.
11832 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11833 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11834 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11835 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11836 * features/sparc/sparc32-solaris.xml: New file.
11837 * features/sparc/sparc64-solaris.xml: New file.
11838 * features/sparc/sparc32-solaris.c: Generated.
11839 * features/sparc/sparc64-solaris.c: Generated.
11840 * sparc-tdep.h: Account for differences in target descriptions.
11841 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11842 (sparc32_register_type): Use target provided registers.
11843 (validate_tdesc_registers): New function.
11844 (sparc32_gdbarch_init): Use tdesc_has_registers.
11845 Set pseudoregister functions.
11846 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11847 (sparc64_register_type): Use target provided registers.
11848 (sparc64_init_abi): Set pseudoregister functions.
11849
f0fd41c1
TT
118502017-02-03 Tom Tromey <tom@tromey.com>
11851
11852 PR rust/21097:
11853 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11854 with a single member.
11855
d6f9b0fb
PA
118562017-02-03 Pedro Alves <palves@redhat.com>
11857
11858 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11859 (cli_interp_base::~cli_interp_base): New.
11860 (cli_interp): New struct.
11861 (as_cli_interp): Cast the interp itself to cli_interp.
11862 (cli_interpreter_pre_command_loop): Rename to ...
11863 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
11864 parameter.
11865 (cli_interpreter_init): Rename to ...
11866 (cli_interp::init): ... this. Remove 'self' parameter. Use
11867 boolean. Make extern.
11868 (cli_interpreter_resume): Rename to ...
11869 (cli_interp::resume): ... this. Remove 'data' parameter. Make
11870 extern.
11871 (cli_interpreter_suspend): Rename to ...
11872 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
11873 extern.
11874 (cli_interpreter_exec): Rename to ...
11875 (cli_interp::exec): ... this. Remove 'data' parameter. Make
11876 extern.
11877 (cli_interpreter_supports_command_editing): Rename to ...
11878 (cli_interp_base::supports_command_editing): ... this. Remove
11879 'interp' parameter. Make extern.
11880 (cli_ui_out): Rename to ...
11881 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
11882 Make extern.
11883 (cli_set_logging): Rename to ...
11884 (cli_interp_base::set_logging): ... this. Remove 'interp'
11885 parameter. Make extern.
11886 (cli_interp_procs): Delete.
11887 (cli_interp_factory): Adjust to use "new".
11888 * cli/cli-interp.h: Include "interps.h".
11889 (struct cli_interp_base): New struct.
11890 * interps.c (struct interp): Delete. Fields moved to interps.h.
11891 (interp_new): Delete.
11892 (interp::interp, interp::~interp): New.
11893 (interp_set): Use bool, and return void. Assume the interpreter
11894 has suspend, init and resume methods, and that the all return
11895 void.
11896 (set_top_level_interpreter): interp_set returns void.
11897 (interp_ui_out): Adapt.
11898 (current_interp_set_logging): Adapt.
11899 (interp_data): Delete.
11900 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11901 (interp_exec): Adapt.
11902 (top_level_interpreter_data): Delete.
11903 * interps.h (interp_init_ftype, interp_resume_ftype)
11904 (interp_suspend_ftype, interp_exec_ftype)
11905 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11906 (class interp): New.
11907 (interp_new): Delete.
11908 (interp_set): Now returns void. Use bool.
11909 (interp_data, top_level_interpreter_data): Delete.
11910 * mi/mi-common.h: Include interps.h.
11911 (class mi_interp): Inherit from interp. Define a ctor. Declare
11912 init, resume, suspect, exec, interp_ui_out, set_logging and
11913 pre_command_loop methods.
11914 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11915 (mi_interpreter_init): Rename to ...
11916 (mi_interp::init): ... this. Remove the 'interp' parameter, use
11917 bool, return void and make extern. Adjust.
11918 (mi_interpreter_resume): ... Rename to ...
11919 (mi_interp::resume): ... this. Remove the 'data' parameter,
11920 return void and make extern. Adjust.
11921 (mi_interpreter_suspend): ... Rename to ...
11922 (mi_interp::suspend): ... this. Remove the 'data' parameter,
11923 return void and make extern. Adjust.
11924 (mi_interpreter_exec): ... Rename to ...
11925 (mi_interp::exec): ... this. Remove the 'data' parameter and make
11926 extern. Adjust.
11927 (mi_interpreter_pre_command_loop): ... Rename to ...
11928 (mi_interp::pre_command_loop): ... this. Remove the 'self'
11929 parameter and make extern.
11930 (mi_on_normal_stop_1): Adjust.
11931 (mi_ui_out): Rename to ...
11932 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
11933 parameter and make extern. Adjust.
11934 (mi_set_logging): Rename to ...
11935 (mi_interp::set_logging): ... this. Remove the 'interp'
11936 parameter and make extern. Adjust.
11937 (mi_interp_procs): Delete.
11938 (mi_interp_factory): Adjust to use 'new'.
11939 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11940 (mi_print_exception, mi_execute_command, mi_load_progress):
11941 Adjust.
11942 * tui/tui-interp.c (tui_interp): New class.
11943 (as_tui_interp): Return a tui_interp pointer.
11944 (tui_on_normal_stop, tui_on_signal_received)
11945 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11946 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11947 to use interp::interp_ui_out.
11948 (tui_init): Rename to ...
11949 (tui_interp::init): ... this. Remove the 'self' parameter, use
11950 bool, return void and make extern. Adjust.
11951 (tui_resume): Rename to ...
11952 (tui_interp::resume): ... this. Remove the 'data' parameter,
11953 return void and make extern. Adjust.
11954 (tui_suspend): Rename to ...
11955 (tui_interp::suspend): ... this. Remove the 'data' parameter,
11956 return void and make extern. Adjust.
11957 (tui_ui_out): Rename to ...
11958 (tui_interp::interp_ui_out): ... this. Remove the 'self'
11959 parameter, and make extern. Adjust.
11960 (tui_exec): Rename to ...
11961 (tui_interp::exec): ... this. Remove the 'data' parameter and
11962 make extern.
11963 (tui_interp_procs): Delete.
11964 (tui_interp_factory): Use "new".
11965
65c40c95
TT
119662017-02-02 Tom Tromey <tom@tromey.com>
11967
11968 * rust-exp.y (ends_raw_string, space_then_number)
11969 (rust_identifier_start_p): Return bool.
11970 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11971 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11972 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11973 (rust_chartype_p): Return bool.
11974 (val_print_struct, rust_print_struct_def, rust_print_type):
11975 Update.
11976 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11977 Return bool.
11978
b50f188d
TT
119792017-02-02 Tom Tromey <tom@tromey.com>
11980
11981 * rust-lang.c: Reindent.
11982
03c85b11
TT
119832017-02-02 Tom Tromey <tom@tromey.com>
11984
11985 * rust-lang.h (rust_crate_for_block): Update.
11986 * rust-lang.c (rust_crate_for_block): Return std::string.
11987 (rust_get_disr_info): Use std:;string, not
11988 gdb::unique_xmalloc_ptr.
11989 * rust-exp.y (crate_name): Update.
11990
9b6da501
PA
119912017-02-02 Pedro Alves <palves@redhat.com>
11992
11993 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11994 field out of gdb_disassembler_test and make it static.
11995
ec4cb20b
PA
119962017-02-02 Pedro Alves <palves@redhat.com>
11997
11998 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11999 mi1_interp and mi_interp fields.
12000
5be5dbf0
PA
120012017-02-02 Pedro Alves <palves@redhat.com>
12002
616268b6
PA
12003 * cli/cli-interp.c (struct saved_output_files, saved_output):
12004 Moved from cli/cli-logging.c.
12005 (cli_set_logging): New function.
12006 (cli_interp_procs): Install cli_set_logging.
12007 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12008 Declare.
12009 * cli/cli-logging.c (struct saved_output_files, saved_output):
12010 Moved to cli/cli-interp.c.
12011 (pop_output_files): Don't save outputs here.
12012 (make_logging_output): New function.
12013 (handle_redirections): Don't build tee nor save previous outputs
12014 here.
12015 * interps.c (current_interp_set_logging): Change prototype.
12016 Assume there's always a set_logging_proc method installed.
12017 * interps.h (interp_set_logging_ftype): Change prototype.
12018 (current_interp_set_logging): Change prototype and adjust comment.
12019 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12020 use make_logging_output.
12021 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
120222017-02-02 Pedro Alves <palves@redhat.com>
12023
5be5dbf0
PA
12024 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12025 from ...
12026 (set_logging_overwrite): ... here.
12027 (logging_no_redirect_file): Delete.
12028 (set_logging_redirect): Don't handle redirection on the fly.
12029 Instead warn that "logging off" / "logging on" is necessary.
12030 (pop_output_files): Delete references to logging_no_redirect_file.
12031 (show_logging_command): Always speak in terms of what will happen
12032 once logging is reenabled.
12033
c99cc448
PA
120342017-02-02 Pedro Alves <palves@redhat.com>
12035
12036 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12037
8b172ce7
PA
120382017-02-02 Pedro Alves <palves@redhat.com>
12039
12040 * disasm.c (gdb_pretty_print_insn): Rename to ...
12041 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12042 Remove gdbarch parameter. Adapt to clear the object's buffers
12043 instead of allocating new buffers, and to print using the object's
12044 gdb_disassembler instead of calling gdb_print_insn.
12045 (dump_insns): Use gdb_pretty_print_disassembler.
12046 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12047 (gdb_pretty_print_disassembler): New class.
12048 * record-btrace.c (btrace_insn_history): Use
12049 gdb_pretty_print_disassembler.
12050
d7e74731
PA
120512017-02-02 Pedro Alves <palves@redhat.com>
12052
12053 * ada-lang.c (type_as_string): Use string_file.
12054 * ada-valprint.c (ada_print_floating): Use string_file.
12055 * ada-varobj.c (ada_varobj_scalar_image)
12056 (ada_varobj_get_value_image): Use string_file.
12057 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12058 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12059 * breakpoint.c (update_inserted_breakpoint_locations)
12060 (insert_breakpoint_locations, reattach_breakpoints)
12061 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12062 (print_it_watchpoint): Use string_file.
12063 (save_breakpoints): Use stdio_file.
12064 * c-exp.y (oper): Use string_file.
12065 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12066 tee_file.
12067 (pop_output_files): Use delete.
12068 (handle_redirections): Use stdio_file and tee_file.
12069 * cli/cli-setshow.c (do_show_command): Use string_file.
12070 * compile/compile-c-support.c (c_compute_program): Use
12071 string_file.
12072 * compile/compile-c-symbols.c (generate_vla_size): Take a
12073 'string_file &' instead of a 'ui_file *'.
12074 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12075 of a 'ui_file *'. Use string_file.
12076 (generate_c_for_variable_locations): Take a 'string_file &'
12077 instead of a 'ui_file *'.
12078 * compile/compile-internal.h (generate_c_for_for_one_variable):
12079 Take a 'string_file &' instead of a 'ui_file *'.
12080 * compile/compile-loc2c.c (push, pushf, unary, binary)
12081 (print_label, pushf_register_address, pushf_register)
12082 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12083 'ui_file *'. Adjust.
12084 * compile/compile.c (compile_to_object): Use string_file.
12085 * compile/compile.h (compile_dwarf_expr_to_c)
12086 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12087 'ui_file *'.
12088 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12089 (replace_typedefs_qualified_name): Use string_file and
12090 obstack_copy0.
12091 * disasm.c (gdb_pretty_print_insn): Use string_file.
12092 (gdb_disassembly): Adjust reference the null_stream global.
12093 (do_ui_file_delete): Delete.
12094 (gdb_insn_length): Use null_stream.
12095 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12096 * dwarf2loc.c (dwarf2_compile_property_to_c)
12097 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12098 'string_file &' instead of a 'ui_file *'.
12099 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12100 * dwarf2read.c (do_ui_file_peek_last): Delete.
12101 (dwarf2_compute_name): Use string_file.
12102 * event-top.c (gdb_setup_readline): Use stdio_file.
12103 * gdbarch.sh (verify_gdbarch): Use string_file.
12104 * gdbtypes.c (safe_parse_type): Use null_stream.
12105 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12106 string_file.
12107 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12108 'string_file *' instead of a 'ui_file *'.
12109 (gdbscm_arch_disassemble): Use string_file.
12110 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12111 * guile/scm-ports.c (class ioscm_file_port): Now a class that
12112 inherits from ui_file.
12113 (ioscm_file_port_delete, ioscm_file_port_rewind)
12114 (ioscm_file_port_put): Delete.
12115 (ioscm_file_port_write): Rename to ...
12116 (ioscm_file_port::write): ... this. Remove file_port_magic
12117 checks.
12118 (ioscm_file_port_new): Delete.
12119 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12120 ui_file_up.
12121 * guile/scm-type.c (tyscm_type_name): Use string_file.
12122 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12123 Use string_file.
12124 * infcmd.c (print_return_value_1): Use string_file.
12125 * infrun.c (print_target_wait_results): Use string_file.
12126 * language.c (add_language): Use string_file.
12127 * location.c (explicit_to_string_internal): Use string_file.
12128 * main.c (captured_main_1): Use null_file.
12129 * maint.c (maintenance_print_architecture): Use stdio_file.
12130 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12131 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12132 event_channel>: Change type to mi_console_file pointer.
12133 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12134 (mi_console_file_delete): Delete.
12135 (struct mi_console_file): Delete.
12136 (mi_console_file_magic): Delete.
12137 (mi_console_file_new): Delete.
12138 (mi_console_file::mi_console_file): New.
12139 (mi_console_file_delete): Delete.
12140 (mi_console_file_fputs): Delete.
12141 (mi_console_file::write): New.
12142 (mi_console_raw_packet): Delete.
12143 (mi_console_file::flush): New.
12144 (mi_console_file_flush): Delete.
12145 (mi_console_set_raw): Rename to ...
12146 (mi_console_file::set_raw): ... this.
12147 * mi/mi-console.h (class mi_console_file): New class.
12148 (mi_console_file_new, mi_console_set_raw): Delete.
12149 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12150 (mi_set_logging): Use delete and tee_file. Adjust.
12151 * mi/mi-main.c (output_register): Use string_file.
12152 (mi_cmd_data_evaluate_expression): Use string_file.
12153 (mi_cmd_data_read_memory): Use string_file.
12154 (mi_cmd_execute, print_variable_or_computed): Use string_file.
12155 * mi/mi-out.c (mi_ui_out::main_stream): New.
12156 (mi_ui_out::rewind): Use main_stream and
12157 string_file.
12158 (mi_ui_out::put): Use main_stream and string_file.
12159 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12160 Allocate a 'string_file' instead.
12161 (mi_out_new): Don't allocate a mem_fileopen stream here.
12162 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12163 (mi_ui_out::main_stream): Declare method.
12164 * printcmd.c (eval_command): Use string_file.
12165 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12166 * python/py-arch.c (archpy_disassemble): Use string_file.
12167 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12168 * python/py-frame.c (frapy_str): Use string_file.
12169 * python/py-framefilter.c (py_print_type, py_print_single_arg):
12170 Use string_file.
12171 * python/py-type.c (typy_str): Use string_file.
12172 * python/py-unwind.c (unwind_infopy_str): Use string_file.
12173 * python/py-value.c (valpy_str): Use string_file.
12174 * record-btrace.c (btrace_insn_history): Use string_file.
12175 * regcache.c (regcache_print): Use stdio_file.
12176 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12177 * remote.c (escape_buffer): Use string_file.
12178 * rust-lang.c (rust_get_disr_info): Use string_file.
12179 * serial.c (serial_open_ops_1): Use stdio_file.
12180 (do_serial_close): Use delete.
12181 * stack.c (print_frame_arg): Use string_file.
12182 (print_frame_args): Remove local mem_fileopen stream, not used.
12183 (print_frame): Use string_file.
12184 * symmisc.c (maintenance_print_symbols): Use stdio_file.
12185 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12186 Take a 'string_file *' instead of a 'ui_file *'.
12187 * top.c (new_ui): Use stdio_file and stderr_file.
12188 (free_ui): Use delete.
12189 (execute_command_to_string): Use string_file.
12190 (quit_confirm): Use string_file.
12191 * tracepoint.c (collection_list::append_exp): Use string_file.
12192 * tui/tui-disasm.c (tui_disassemble): Use string_file.
12193 * tui/tui-file.c: Don't include "ui-file.h".
12194 (enum streamtype, struct tui_stream): Delete.
12195 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12196 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12197 (tui_file::tui_file): New method.
12198 (tui_file_fputs): Delete.
12199 (tui_file_get_strbuf): Delete.
12200 (tui_file::puts): New method.
12201 (tui_file_adjust_strbuf): Delete.
12202 (tui_file_flush): Delete.
12203 (tui_file::flush): New method.
12204 * tui/tui-file.h: Tweak intro comment.
12205 Include ui-file.h.
12206 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12207 (tui_file_adjust_strbuf): Delete declarations.
12208 (class tui_file): New class.
12209 * tui/tui-io.c (tui_initialize_io): Use tui_file.
12210 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12211 (tui_register_format): Use string_stream.
12212 * tui/tui-stack.c (tui_make_status_line): Use string_file.
12213 (tui_get_function_from_frame): Use string_file.
12214 * typeprint.c (type_to_string): Use string_file.
12215 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12216 (null_stream): New global.
12217 (ui_file_delete): Delete.
12218 (ui_file::ui_file): New.
12219 (null_file_isatty): Delete.
12220 (ui_file::~ui_file): New.
12221 (null_file_rewind): Delete.
12222 (ui_file::printf): New.
12223 (null_file_put): Delete.
12224 (null_file_flush): Delete.
12225 (ui_file::putstr): New.
12226 (null_file_write): Delete.
12227 (ui_file::putstrn): New.
12228 (null_file_read): Delete.
12229 (ui_file::putc): New.
12230 (null_file_fputs): Delete.
12231 (null_file_write_async_safe): Delete.
12232 (ui_file::vprintf): New.
12233 (null_file_delete): Delete.
12234 (null_file::write): New.
12235 (null_file_fseek): Delete.
12236 (null_file::puts): New.
12237 (ui_file_data): Delete.
12238 (null_file::write_async_safe): New.
12239 (gdb_flush, ui_file_isatty): Adjust.
12240 (ui_file_put, ui_file_rewind): Delete.
12241 (ui_file_write): Adjust.
12242 (ui_file_write_for_put): Delete.
12243 (ui_file_write_async_safe, ui_file_read): Adjust.
12244 (ui_file_fseek): Delete.
12245 (fputs_unfiltered): Adjust.
12246 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12247 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12248 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12249 (set_ui_file_data): Delete.
12250 (string_file::~string_file, string_file::write)
12251 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12252 (do_ui_file_as_string, ui_file_as_string): Delete.
12253 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12254 (struct mem_file): Delete.
12255 (mem_file_new): Delete.
12256 (stdio_file::stdio_file): New.
12257 (mem_file_delete): Delete.
12258 (stdio_file::stdio_file): New.
12259 (mem_fileopen): Delete.
12260 (stdio_file::~stdio_file): New.
12261 (mem_file_rewind): Delete.
12262 (stdio_file::set_stream): New.
12263 (mem_file_put): Delete.
12264 (stdio_file::open): New.
12265 (mem_file_write): Delete.
12266 (stdio_file_magic, struct stdio_file): Delete.
12267 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12268 (stdio_file::flush): New.
12269 (stdio_file_read): Rename to ...
12270 (stdio_file::read): ... this. Adjust.
12271 (stdio_file_write): Rename to ...
12272 (stdio_file::write): ... this. Adjust.
12273 (stdio_file_write_async_safe): Rename to ...
12274 (stdio_file::write_async_safe) ... this. Adjust.
12275 (stdio_file_fputs): Rename to ...
12276 (stdio_file::puts) ... this. Adjust.
12277 (stdio_file_isatty): Delete.
12278 (stdio_file_fseek): Delete.
12279 (stdio_file::isatty): New.
12280 (stderr_file_write): Rename to ...
12281 (stderr_file::write) ... this. Adjust.
12282 (stderr_file_fputs): Rename to ...
12283 (stderr_file::puts) ... this. Adjust.
12284 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12285 (stderr_file::stderr_file): New.
12286 (tee_file_magic): Delete.
12287 (struct tee_file): Delete.
12288 (tee_file::tee_file): New.
12289 (tee_file_new): Delete.
12290 (tee_file::~tee_file): New.
12291 (tee_file_delete): Delete.
12292 (tee_file_flush): Rename to ...
12293 (tee_file::flush): ... this. Adjust.
12294 (tee_file_write): Rename to ...
12295 (tee_file::write): ... this. Adjust.
12296 (tee_file::write_async_safe): New.
12297 (tee_file_fputs): Rename to ...
12298 (tee_file::puts): ... this. Adjust.
12299 (tee_file_isatty): Rename to ...
12300 (tee_file::isatty): ... this. Adjust.
12301 * ui-file.h (struct obstack, struct ui_file): Don't
12302 forward-declare.
12303 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12304 (ui_file_write_ftype)
12305 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12306 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12307 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12308 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12309 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12310 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12311 (set_ui_file_fseek): Delete.
12312 (ui_file_data, ui_file_delete, ui_file_rewind)
12313 (struct ui_file): New.
12314 (ui_file_up): New.
12315 (class null_file): New.
12316 (null_stream): Declare.
12317 (ui_file_write_for_put, ui_file_put): Delete.
12318 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12319 Delete.
12320 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12321 (gdb_fopen, tee_file_new): Delete.
12322 (struct string_file): New.
12323 (struct stdio_file): New.
12324 (stdio_file_up): New.
12325 (struct stderr_file): New.
12326 (class tee_file): New.
12327 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12328 of a 'ui_file *'. Adjust.
12329 * ui-out.h (class ui_out) <field_stream>: Likewise.
12330 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12331 (null_stream): Delete.
12332 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12333 Adjust.
12334 * utils.h (struct ui_file): Delete forward declaration..
12335 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12336 (error_stream): Take a 'string_file &' instead of a
12337 'ui_file *'.
12338 * varobj.c (varobj_value_get_print_value): Use string_file.
12339 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12340 * gdbarch.c: Regenerate.
12341
187808b0
PA
123422017-02-02 Pedro Alves <palves@redhat.com>
12343
12344 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12345 (gdb_pretty_print_insn): ... this. Now a free function. Add back
12346 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
12347 Adjust to call gdb_print_insn instead of
12348 gdb_disassembler::print_insn.
12349 (dump_insns, do_mixed_source_and_assembly_deprecated)
12350 (do_mixed_source_and_assembly, do_assembly_only): Add back a
12351 'gdbarch' parameter. Remove gdb_disassembler parameter.
12352 (gdb_disassembly): Don't allocate a gdb_disassembler here.
12353 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12354 declaration.
12355 (gdb_pretty_print_insn): Re-add declaration.
12356 * record-btrace.c (btrace_insn_history): Don't allocate a
12357 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
12358
7a8eb317
SM
123592017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
12360
12361 * disasm.h (gdb_disassembly): Remove file_string parameter.
12362 * disasm.c (gdb_disassembly): Likewise.
12363 * cli/cli-cmds.c (print_disassembly): Adapt.
12364 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12365 * stack.c (do_gdb_disassembly): Likewise.
12366
7346ef59
AA
123672017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
12368
12369 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12370 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12371 targets. And if the implicit value is longer than needed, extract
12372 the first bytes instead of the "least significant" ones.
12373
cd4007e4
MM
123742017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12375
12376 * btrace.c (btrace_enable): Do not call btrace_add_pc for
12377 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12378 (btrace_fetch): Assert can_access_registers_ptid.
12379 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12380 validate_registers_access.
12381
cf77c34e
MM
123822017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12383
12384 * gdbthread.h (can_access_registers_ptid): New.
12385 * thread.c (can_access_registers_ptid): New.
12386
be85ce7d
PA
123872017-02-01 Pedro Alves <palves@redhat.com>
12388
12389 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12390
29b0b251
PA
123912017-01-31 Pedro Alves <palves@redhat.com>
12392
12393 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12394 Fix typos.
12395
289b5b24
PA
123962017-01-31 Pedro Alves <palves@redhat.com>
12397
12398 * stack.c (print_frame_args): Remove local mem_fileopen stream,
12399 not used.
12400
b47413b4
PA
124012017-01-31 Pedro Alves <palves@redhat.com>
12402
12403 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12404
60adb36c
PA
124052017-01-31 Pedro Alves <palves@redhat.com>
12406
12407 * common/scoped_restore.h
12408 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12409 change the value's parameter type to T2.
12410 (make_scoped_restore): Likewise.
12411
2735833d
WT
124122017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12413 Richard Henderson <rth@redhat.com>
12414
12415 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12416 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12417 GS_BASE for older kernels.
12418 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12419 GS_BASE for older kernels.
12420 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12421 and GS_BASE to the offset table.
12422 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12423 system register group.
12424 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12425 for older kernels.
12426 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12427 amd64 ABI.
12428 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12429 AMD64_GSBASE_REGNUM.
12430 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12431 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12432 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12433 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12434 i386/64bit-segments.xml in those rules.
12435 * features/i386/64bit-segments.xml: New file.
12436 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12437 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12438 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12439 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12440 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12441 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12442 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12443 * features/i386/amd64-avx-linux.c: Regenerated.
12444 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12445 * features/i386/amd64-avx-mpx.c: Regenerated.
12446 * features/i386/amd64-avx512-linux.c: Regenerated.
12447 * features/i386/amd64-linux.c: Regenerated.
12448 * features/i386/amd64-mpx-linux.c: Regenerated.
12449 * features/i386/i386-avx-mpx-linux.c: Regenerated.
12450 * features/i386/i386-avx-mpx.c: Regenerated.
12451 * features/i386/x32-avx-linux.c: Regenerated.
12452 * features/i386/x32-avx512-linux.c: Regenerated.
12453 * regformats/i386/amd64-avx-linux.dat: Regenerated.
12454 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12455 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12456 * regformats/i386/amd64-linux.dat: Regenerated.
12457 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12458 * regformats/i386/x32-avx-linux.dat: Regenerated.
12459 * regformats/i386/x32-avx512-linux.dat: Regenerated.
12460 * regformats/i386/x32-linux.dat: Regenerated.
12461
8884e97e
WT
124622017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12463
12464 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12465 Set to AMD64_NUM_REGS.
12466
7005d26a
WT
124672017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12468
12469 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12470 that checks validity of a register number.
12471
4bd2e1b2
KC
124722017-01-27 Kees Cook <keescook@google.com>
12473
12474 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12475 fetch_fpregs if target has fpa registers.
12476 (arm_linux_store_inferior_registers): Call store_fpregs if target
12477 has fpa registers.
12478
7cf1de6c
AA
124792017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
12480
12481 * cris-tdep.c (cris_gdbarch_init): Remove check for
12482 info.byte_order and force it to BFD_ENDIAN_LITTLE.
12483
874a1c8c
AT
124842017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
12485
12486 * corelow.c (get_core_register_section): Check for regset
12487 existence before checking for REGSET_VARIABLE_SIZE.
12488
d8b49cf0
YQ
124892017-01-26 Yao Qi <yao.qi@linaro.org>
12490 Pedro Alves <palves@redhat.com>
12491
12492 PR gdb/20939
12493 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12494 call memory_error, save memaddr instead.
12495 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12496 negative, cal memory_error.
12497 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12498
658ca58c
YQ
124992017-01-26 Yao Qi <yao.qi@linaro.org>
12500
12501 * disasm-selftests.c (memory_error_test): New function.
12502 (_initialize_disasm_selftests): Register memory_error_test.
12503
79843d45
YQ
125042017-01-26 Yao Qi <yao.qi@linaro.org>
12505
12506 * Makefile.in (SFILES): Add disasm-selftests.c and
12507 selftest-arch.c.
12508 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12509 * disasm-selftests.c: New file.
12510 * selftest-arch.c: New file.
12511 * selftest-arch.h: New file.
12512
8cafda32
YQ
125132017-01-26 Yao Qi <yao.qi@linaro.org>
12514
12515 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12516 to bfd_arch_mep. Don't return 0 if section is not
12517 found. Call print_insn_mep.
12518
e47ad6c0
YQ
125192017-01-26 Pedro Alves <palves@redhat.com>
12520 Yao Qi <yao.qi@linaro.org>
12521
12522 * arm-tdep.c: Include "disasm.h".
12523 (gdb_print_insn_arm): Update code to get gdbarch.
12524 * disasm.c (dis_asm_read_memory): Change it to
12525 gdb_disassembler::dis_asm_read_memory.
12526 (dis_asm_memory_error): Likewise.
12527 (dis_asm_print_address): Likewise.
12528 (gdb_pretty_print_insn): Change it to
12529 gdb_disassembler::pretty_print_insn.
12530 (dump_insns): Add one argument gdb_disassemlber. All
12531 callers updated.
12532 (do_mixed_source_and_assembly_deprecated): Likewise.
12533 (do_mixed_source_and_assembly): Likewise.
12534 (do_assembly_only): Likewise.
12535 (gdb_disassembler::gdb_disassembler): New.
12536 (gdb_disassembler::print_insn): New.
12537 * disasm.h (class gdb_disassembler): New.
12538 (gdb_pretty_print_insn): Remove declaration.
12539 (gdb_disassemble_info): Likewise.
12540 * guile/scm-disasm.c (class gdbscm_disassembler): New.
12541 (gdbscm_disasm_read_memory_worker): Update.
12542 (gdbscm_disasm_read_memory): Update.
12543 (gdbscm_disasm_memory_error): Remove.
12544 (gdbscm_disasm_print_address): Remove.
12545 (gdbscm_disassembler::gdbscm_disassembler): New.
12546 (gdbscm_print_insn_from_port): Update.
12547 * mips-tdep.c: Include disasm.h.
12548 (gdb_print_insn_mips): Update code to get gdbarch.
12549 * record-btrace.c (btrace_insn_history): Update.
12550 * spu-tdep.c: Include disasm.h.
12551 (struct spu_dis_asm_data): Remove.
12552 (struct spu_dis_asm_info): New.
12553 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12554 SPU id.
12555 (gdb_print_insn_spu): Cast disassemble_info to
12556 spu_dis_asm_info.
12557
80d75874
YQ
125582017-01-26 Yao Qi <yao.qi@linaro.org>
12559
12560 * disasm.c (do_ui_file_delete): Delete.
12561 (gdb_insn_length): Move code creating stream to ...
12562 * utils.c (null_stream): ... here. New function.
12563 * utils.h (null_stream): Declare.
12564
60685cd0
SM
125652017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
12566
12567 * python/py-inferior.c (find_thread_object): Return directly
12568 from the loop. Remove "found" variable.
12569
eb1cdb62
JB
125702017-01-21 Joel Brobecker <brobecker@adacore.com>
12571
12572 GDB 7.12.1 released.
12573
b1ce6568
SM
125742017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12575
12576 * python/py-function.c (fnpy_call): Reorder declarations to have
12577 the gdbpy_enter object declared first.
12578 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12579
6f8b0407
SM
125802017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12581
fec93fb1 12582 PR python/21068
6f8b0407
SM
12583 * python/python-internal.h (PyMem_RawMalloc): Define for
12584 Python < 3.4.
12585 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12586 PyMem_RawMalloc instead of PyMem_Malloc.
12587
78cbbba8
LM
125882017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
12589 Luis Machado <lgustavo@codesourcery.com>
12590
12591 * NEWS (New commands): Mention flash-erase.
12592 (New MI commands): Mention target-flash-erase.
12593 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12594 command.
12595 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12596 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12597 * target.c (flash_erase_command): New function.
12598 (initialize_targets): Add new flash-erase command.
12599 * target.h (flash_erase_command): New declaration.
12600
2132fe85
JB
126012017-01-20 Joel Brobecker <brobecker@adacore.com>
12602
12603 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12604 HAVE_SYS_PROCFS_H is defined.
12605
d1dff226
AH
126062017-01-18 Alan Hayward <alan.hayward@arm.com>
12607
12608 * remote.c (struct cached_reg): Change data into a pointer.
12609 * (stop_reply_dtr): Free data pointers before deleting vector.
12610 (process_stop_reply): Likewise.
12611 (remote_parse_stop_reply): Allocate space for data
12612
9890e433
AH
126132017-01-18 Alan Hayward <alan.hayward@arm.com>
12614
12615 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12616 MAX_REGISTER_SIZE.
12617 (amd64_pseudo_register_read_value): Likewise.
12618 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12619 (store_register_using_P): Likewise.
12620 * regcache.c (regcache_xfer_part): Likewise.
12621
7a36499a
IR
126222017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
12623
12624 Split real and pseudo registers.
12625 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12626 (sparc32_pseudo_regnum): New enum.
12627 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12628 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12629 (SPARC32_CP0_REGISTERS): New macro.
12630 (sparc32_pseudo_register_name): New function.
12631 (sparc32_register_name): Use sparc32_pseudo_register_name.
12632 (sparc32_pseudo_register_type): New function.
12633 (sparc32_register_type): Use sparc32_pseudo_register_type.
12634 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12635 pseudo register numbers.
12636 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12637 (SPARC64_CP0_REGISTERS): New macro.
12638 (sparc64_pseudo_register_name): New function.
12639 (sparc64_register_name): Use sparc64_pseudo_register_name.
12640 (sparc64_pseudo_register_type): New function.
12641 (sparc64_register_type): Use sparc64_pseudo_register_type.
12642 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12643 pseudo register numbers.
12644 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12645 sparc64_store_arguments): Handle pseudo register numbers.
12646
6f8976bf
YQ
126472017-01-13 Yao Qi <yao.qi@linaro.org>
12648
12649 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12650 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12651 output.
12652 (getpkt_or_notif_sane_1): Likewise.
12653
e4241ace
YQ
126542017-01-13 Yao Qi <yao.qi@linaro.org>
12655
12656 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12657 of CC. Pass "-x c++-header" instead of "-x c".
12658
3015c064
SM
126592017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12660
12661 * remote.c (remote_can_async_p): Update comment.
12662
fde1b17d
SM
126632017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12664
12665 * linux-nat.c (linux_nat_can_async_p): Update comment.
12666
ca1ca08b
SM
126672017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12668
12669 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12670
4ad2da73
SM
126712017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12672
12673 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12674
c8b23b3f
TT
126752017-01-10 Tom Tromey <tom@tromey.com>
12676
12677 * python/py-type.c (typy_legacy_template_argument): Update.
12678 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12679 ~demangle_parse_info): Declare new members.
12680 (cp_demangled_name_to_comp): Return unique_ptr.
12681 (cp_demangled_name_parse_free)
12682 (make_cleanup_cp_demangled_name_parse_free)
12683 (cp_new_demangle_parse_info): Remove.
12684 * cp-support.c (do_demangled_name_parse_free_cleanup)
12685 (make_cleanup_cp_demangled_name_parse_free): Remove.
12686 (inspect_type, cp_canonicalize_string_full)
12687 (cp_canonicalize_string): Update.
12688 (mangled_name_to_comp): Change return type.
12689 (cp_class_name_from_physname, method_name_from_physname)
12690 (cp_func_name, cp_remove_params): Update.
12691 * cp-name-parser.y (demangle_parse_info): New constructor, from
12692 cp_new_demangle_parse_info.
12693 (~demangle_parse_info): New destructor, from
12694 cp_demangled_name_parse_free.
12695 (cp_merge_demangle_parse_infos): Update.
12696 (cp_demangled_name_to_comp): Change return type.
12697
1ac32117
TT
126982017-01-10 Tom Tromey <tom@tromey.com>
12699
12700 * top.c (prevent_dont_repeat): Change return type.
12701 * python/python.c (execute_gdb_command): Use std::string.
12702 Update.
12703 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12704 * command.h (prevent_dont_repeat): Change return type.
12705 * breakpoint.c (bpstat_do_actions_1): Update.
12706
0cf08227
TT
127072017-01-10 Tom Tromey <tom@tromey.com>
12708
12709 * value.h (scoped_value_mark::~scoped_value_mark): Call
12710 free_to_mark.
12711 (scoped_value_mark::free_to_mark): New method.
12712 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12713 scoped_value_mark.
12714
eb115069
TT
127152017-01-10 Tom Tromey <tom@tromey.com>
12716
12717 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12718 (valpy_reference_value, valpy_const_value, valpy_get_address)
12719 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12720 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12721 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12722 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12723 scoped_value_mark.
12724 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12725 * value.h (scoped_value_mark): New class.
12726
906768f9
TT
127272017-01-10 Tom Tromey <tom@tromey.com>
12728
12729 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12730 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12731 * psymtab.c (discard_psymtabs_upto): Remove.
12732 (make_cleanup_discard_psymtabs): Remove.
12733 (struct psymtab_state): Remove.
12734
bef155c3
TT
127352017-01-10 Tom Tromey <tom@tromey.com>
12736
12737 * record-full.c (record_full_save_cleanups): Remove.
12738 (record_full_save): Use gdb::unlinker.
12739 * gcore.c (do_bfd_delete_cleanup): Remove.
12740 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12741 cleanups.
12742 * dwarf2read.c (unlink_if_set): Remove.
12743 (write_psymtabs_to_index): Use gdb::unlinker.
12744 * common/gdb_unlinker.h: New file.
12745
192b62ce
TT
127462017-01-10 Tom Tromey <tom@tromey.com>
12747
12748 * windows-tdep.c (windows_xfer_shared_library): Update.
12749 * windows-nat.c (windows_make_so): Update.
12750 * utils.h (make_cleanup_bfd_unref): Remove.
12751 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12752 * symfile.h (symfile_bfd_open)
12753 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12754 * symfile.c (read_symbols, symbol_file_add)
12755 (separate_debug_file_exists): Update.
12756 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12757 (generic_load, reread_symbols): Update.
12758 * symfile-mem.c (symbol_file_add_from_memory): Update.
12759 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12760 (spu_symbol_file_add_from_memory): Update.
12761 * solist.h (struct target_so_ops) <bfd_open>: Return
12762 gdb_bfd_ref_ptr.
12763 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12764 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12765 gdb_bfd_ref_ptr.
12766 (solib_map_sections, reload_shared_libraries_1): Update.
12767 * solib-svr4.c (enable_break): Update.
12768 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12769 * solib-frv.c (enable_break2): Update.
12770 * solib-dsbt.c (enable_break): Update.
12771 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12772 gdb_bfd_ref_ptr.
12773 (darwin_solib_get_all_image_info_addr_at_init): Update.
12774 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12775 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12776 * record-full.c (record_full_save): Update.
12777 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12778 * procfs.c (insert_dbx_link_bpt_in_file): Update.
12779 * minidebug.c (find_separate_debug_file_in_section): Return
12780 gdb_bfd_ref_ptr.
12781 * machoread.c (macho_add_oso_symfile): Change abfd to
12782 gdb_bfd_ref_ptr.
12783 (macho_symfile_read_all_oso): Update.
12784 (macho_check_dsym): Return gdb_bfd_ref_ptr.
12785 (macho_symfile_read): Update.
12786 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12787 (jit_bfd_try_read_symtab): Update.
12788 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12789 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12790 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12791 gdb_bfd_ref_ptr.
12792 (gdb_bfd_ref_policy): New struct.
12793 (gdb_bfd_ref_ptr): New typedef.
12794 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12795 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12796 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12797 gdb_bfd_ref_ptr.
12798 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12799 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12800 (gcore_command): Update.
12801 * exec.c (exec_file_attach): Update.
12802 * elfread.c (elf_symfile_read): Update.
12803 * dwarf2read.c (dwarf2_get_dwz_file): Update.
12804 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12805 (open_and_init_dwo_file): Update.
12806 (open_dwp_file): Return gdb_bfd_ref_ptr.
12807 (open_and_init_dwp_file): Update.
12808 * corelow.c (core_open): Update.
12809 * compile/compile-object-load.c (compile_object_load): Update.
12810 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12811 * coffread.c (coff_symfile_read): Update.
12812 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12813 gdb_bfd_ref_ptr. Rename.
12814 (dump_bfd_file, restore_command): Update.
12815 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12816 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12817 (find_separate_debug_file_by_buildid): Update.
12818
50315b21
TT
128192017-01-10 Tom Tromey <tom@tromey.com>
12820
12821 * common/gdb_ref_ptr.h: New file.
12822 * python/py-ref.h (struct gdbpy_ref_policy): New.
12823 (gdbpy_ref): Now a typedef.
12824
fc4007c9
TT
128252017-01-10 Tom Tromey <tom@tromey.com>
12826
12827 * utils.h (make_cleanup_htab_delete): Don't declare.
12828 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12829 Remove.
12830 * linespec.c (decode_compound_collector): Add constructor,
12831 destructor.
12832 (lookup_prefix_sym): Remove cleanup.
12833 (symtab_collector): Add constructor, destructor.
12834 (collect_symtabs_from_filename): Remove cleanup.
12835 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12836 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12837 Use htab_up.
12838 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12839 * dwarf2read.c (dw2_expand_symtabs_matching)
12840 (dw2_map_symbol_filenames, dwarf_decode_macros)
12841 (write_psymtabs_to_index): Use htab_up.
12842 * dwarf2loc.c (func_verify_no_selftailcall)
12843 (call_site_find_chain_1, func_verify_no_selftailcall)
12844 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12845 std::vector, gdb::unique_xmalloc_ptr.
12846 (call_sitep): Remove typedef.
12847 (dwarf2_locexpr_baton_eval): Remove unused variable.
12848
8dbcee67
TT
128492017-01-10 Tom Tromey <tom@tromey.com>
12850
12851 * python/python-internal.h (make_cleanup_py_decref)
12852 (make_cleanup_py_xdecref): Don't declare.
12853 * python/py-utils.c (py_decref, make_cleanup_py_decref)
12854 (py_xdecref, make_cleanup_py_xdecref): Remove.
12855
13df46cc
TT
128562017-01-10 Tom Tromey <tom@tromey.com>
12857
12858 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12859 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12860
06fc9bf7
TT
128612017-01-10 Tom Tromey <tom@tromey.com>
12862
12863 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12864
830a4934
TT
128652017-01-10 Tom Tromey <tom@tromey.com>
12866
12867 * python/py-utils.c (unicode_to_encoded_string)
12868 (python_string_to_target_string)
12869 (python_string_to_target_python_string)
12870 (python_string_to_host_string, gdbpy_obj_to_string)
12871 (get_addr_from_python): Use gdbpy_ref.
12872
4586d543
TT
128732017-01-10 Tom Tromey <tom@tromey.com>
12874
12875 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12876 gdbpy_ref.
12877
59876f8f
TT
128782017-01-10 Tom Tromey <tom@tromey.com>
12879
12880 * python/python.c (eval_python_command, gdbpy_decode_line)
12881 (gdbpy_run_events, gdbpy_start_type_printers)
12882 (gdbpy_apply_type_printers): Use gdbpy_ref.
12883
97d83487
TT
128842017-01-10 Tom Tromey <tom@tromey.com>
12885
12886 * python/py-param.c (get_doc_string, compute_enum_values): Use
12887 gdbpy_ref.
12888
9205649a
TT
128892017-01-10 Tom Tromey <tom@tromey.com>
12890
12891 * python/py-inferior.c (find_thread_object, build_inferior_list):
12892 Use gdbpy_ref.
12893
74c49d45
TT
128942017-01-10 Tom Tromey <tom@tromey.com>
12895
12896 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12897
16361ffb
TT
128982017-01-10 Tom Tromey <tom@tromey.com>
12899
12900 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12901 gdbpy_ref.
12902
905f2cca
TT
129032017-01-10 Tom Tromey <tom@tromey.com>
12904
12905 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
12906 extra incref.
12907 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12908 Use gdbpy_ref.
12909
64081434
TT
129102017-01-10 Tom Tromey <tom@tromey.com>
12911
12912 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12913 gdbpy_ref.
12914
59e9e831
TT
129152017-01-10 Tom Tromey <tom@tromey.com>
12916
12917 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
12918 decref results of PyArg_ParseTupleAndKeywords.
12919
9de10f6d
TT
129202017-01-10 Tom Tromey <tom@tromey.com>
12921
12922 * python/python.c (python_run_simple_file): Use
12923 unique_xmalloc_ptr, gdbpy_ref.
12924
2bd5759d
TT
129252017-01-10 Tom Tromey <tom@tromey.com>
12926
12927 * python/py-prettyprint.c (print_stack_unless_memory_error)
12928 (print_string_repr, print_children): Use gdbpy_ref.
12929 (dummy_python_frame): New class.
12930 (dummy_python_frame::dummy_python_frame): Rename from
12931 push_dummy_python_frame.
12932 (py_restore_tstate): Remove.
12933
3b4e0e01
TT
129342017-01-10 Tom Tromey <tom@tromey.com>
12935
12936 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12937
17a22718
TT
129382017-01-10 Tom Tromey <tom@tromey.com>
12939
12940 * python/python.c (ensure_python_env, restore_python_env):
12941 Remove.
12942 * python/python-internal.h (ensure_python_env): Don't declare.
12943 * varobj.h (varobj_ensure_python_env): Don't declare.
12944 * varobj.c (varobj_ensure_python_env): Remove.
12945
68cdc557
TT
129462017-01-10 Tom Tromey <tom@tromey.com>
12947
12948 * varobj.c (varobj_value_get_print_value): Use
12949 gdbpy_enter_varobj.
12950
1eba6383
TT
129512017-01-10 Tom Tromey <tom@tromey.com>
12952
12953 * python/py-prettyprint.c (print_string_repr, print_children):
12954 Update.
12955 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12956 of "encoding".
12957 * varobj.c (varobj_value_get_print_value): Update.
12958 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12959
bde7b3e3
TT
129602017-01-10 Tom Tromey <tom@tromey.com>
12961
12962 * varobj.c (varobj_get_display_hint)
12963 (dynamic_varobj_has_child_method, install_new_value_visualizer)
12964 (varobj_set_visualizer, free_variable): Use
12965 gdbpy_enter_varobj.
12966
a7785f8c
TT
129672017-01-10 Tom Tromey <tom@tromey.com>
12968
12969 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12970 (do_finish_initialization): New function. Use gdbpy_ref.
12971 (gdbpy_finish_initialization): Use gdbpy_enter. Call
12972 do_finish_initialization.
12973
2865bfce
TT
129742017-01-10 Tom Tromey <tom@tromey.com>
12975
12976 * python/py-param.c (get_set_value, get_show_value): Use
12977 gdbpy_enter, gdbpy_ref.
12978
0e9dcc75
TT
129792017-01-10 Tom Tromey <tom@tromey.com>
12980
12981 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12982
12a5cedd
TT
129832017-01-10 Tom Tromey <tom@tromey.com>
12984
12985 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12986
788f2586
TT
129872017-01-10 Tom Tromey <tom@tromey.com>
12988
12989 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12990 Use gdbpy_enter_varobj.
12991
6cd67bea
TT
129922017-01-10 Tom Tromey <tom@tromey.com>
12993
12994 * varobj.c (gdbpy_enter_varobj): New constructor.
12995 * python/python-internal.h (gdbpy_enter_varobj): New class.
12996 * python/py-varobj.c (py_varobj_get_iterator): Use
12997 gdbpy_enter_varobj.
12998
14b122bf
TT
129992017-01-10 Tom Tromey <tom@tromey.com>
13000
13001 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13002 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13003 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13004 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13005 unique_xmalloc_ptr.
13006 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13007
bf1ca3b9
TT
130082017-01-10 Tom Tromey <tom@tromey.com>
13009
13010 * python/py-xmethods.c (invoke_match_method): Use
13011 gdbpy_ref.
13012
572a5524
TT
130132017-01-10 Tom Tromey <tom@tromey.com>
13014
13015 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13016 gdbpy_enter, gdbpy_ref.
13017
396a78b6
TT
130182017-01-10 Tom Tromey <tom@tromey.com>
13019
13020 * python/python.c (python_interactive_command): Use gdbpy_enter.
13021
a88b13c7
TT
130222017-01-10 Tom Tromey <tom@tromey.com>
13023
13024 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13025 gdbpy_ref.
13026
e9f0c363
TT
130272017-01-10 Tom Tromey <tom@tromey.com>
13028
13029 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13030 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13031
6349f452
TT
130322017-01-10 Tom Tromey <tom@tromey.com>
13033
13034 * utils.h (htab_deleter): New struct.
13035 (htab_up): New typedef.
13036 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13037 gdbpy_enter, gdbpy_ref, htab_up.
13038
c0171de6
TT
130392017-01-10 Tom Tromey <tom@tromey.com>
13040
13041 * python/py-unwind.c (pending_frame_invalidate): Remove.
13042 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13043
f18e226f
TT
130442017-01-10 Tom Tromey <tom@tromey.com>
13045
13046 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13047 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13048
c57af3f1
TT
130492017-01-10 Tom Tromey <tom@tromey.com>
13050
13051 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13052
60e600ec
TT
130532017-01-10 Tom Tromey <tom@tromey.com>
13054
13055 * python/python.c (gdbpy_eval_from_control_command)
13056 (gdbpy_source_script, gdbpy_run_events)
13057 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13058 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13059 gdbpy_enter.
13060
bf7da5b0
TT
130612017-01-10 Tom Tromey <tom@tromey.com>
13062
13063 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13064
2d38bced
TT
130652017-01-10 Tom Tromey <tom@tromey.com>
13066
13067 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13068
07bc7329
TT
130692017-01-10 Tom Tromey <tom@tromey.com>
13070
13071 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13072 (python_on_inferior_call_pre, python_on_inferior_call_post)
13073 (python_on_memory_change, python_on_register_change)
13074 (python_inferior_exit, python_new_objfile, add_thread_object)
13075 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13076
6e7c365e
TT
130772017-01-10 Tom Tromey <tom@tromey.com>
13078
13079 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13080 (bpfinishpy_handle_exit): Use gdbpy_enter.
13081
6ba0cd40
TT
130822017-01-10 Tom Tromey <tom@tromey.com>
13083
13084 * python/py-cmd.c (cmdpy_destroyer)
13085 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13086 gdbpy_enter.
13087
de2dc875
TT
130882017-01-10 Tom Tromey <tom@tromey.com>
13089
13090 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13091 gdbpy_enter.
13092 (gdbpy_breakpoint_has_cond): Likewise.
13093
4ecee2c4
TT
130942017-01-10 Tom Tromey <tom@tromey.com>
13095
13096 * python/python.c (gdbpy_enter): New constructor.
13097 (~gdbpy_enter): New destructor.
13098 (restore_python_env, ensure_python_env): Rewrite.
13099 * python/python-internal.h (gdbpy_enter): New class.
13100
37fce74f
TT
131012017-01-10 Tom Tromey <tom@tromey.com>
13102
13103 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13104
53a0cca3
TT
131052017-01-10 Tom Tromey <tom@tromey.com>
13106
13107 * python/py-value.c (value_has_field, get_field_flag)
13108 (get_field_type, valpy_getitem, convert_value_from_python): Use
13109 gdbpy_ref.
13110
ff3724f5
TT
131112017-01-10 Tom Tromey <tom@tromey.com>
13112
13113 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13114 gdbpy_ref.
13115
0700aea5
TT
131162017-01-10 Tom Tromey <tom@tromey.com>
13117
13118 * python/py-prettyprint.c (search_pp_list)
13119 (find_pretty_printer_from_objfiles)
13120 (find_pretty_printer_from_progspace)
13121 (find_pretty_printer_from_gdb, find_pretty_printer)
13122 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13123 gdbpy_ref.
13124
1bb44c9f
TT
131252017-01-10 Tom Tromey <tom@tromey.com>
13126
13127 * python/py-param.c (call_doc_function): Use gdbpy_ref.
13128
87ce03fd
TT
131292017-01-10 Tom Tromey <tom@tromey.com>
13130
13131 * python/py-linetable.c (build_line_table_tuple_from_pcs)
13132 (ltpy_get_all_source_lines): Use gdbpy_ref.
13133
ee0a3fb8
TT
131342017-01-10 Tom Tromey <tom@tromey.com>
13135
13136 * python/py-framefilter.c (extract_sym, extract_value)
13137 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13138 gdbpy_ref.
13139
bf2a52fa
TT
131402017-01-10 Tom Tromey <tom@tromey.com>
13141
13142 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13143
f59fe7f8
TT
131442017-01-10 Tom Tromey <tom@tromey.com>
13145
13146 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13147
80bd970a
TT
131482017-01-10 Tom Tromey <tom@tromey.com>
13149
13150 * python/py-function.c (convert_values_to_python, fnpy_init): Use
13151 gdbpy_ref.
13152
d1b3de2e
TT
131532017-01-10 Tom Tromey <tom@tromey.com>
13154
13155 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13156
3bb43384
TT
131572017-01-10 Tom Tromey <tom@tromey.com>
13158
13159 * python/py-type.c (convert_field, make_fielditem, typy_fields)
13160 (typy_range): Use gdbpy_ref.
13161
abf5651e
TT
131622017-01-10 Tom Tromey <tom@tromey.com>
13163
13164 * python/py-threadevent.c (create_thread_event_object): Use
13165 gdbpy_ref.
13166 * python/py-stopevent.c (create_stop_event_object): Simplify.
13167 (emit_stop_event): Use gdbpy_ref.
13168 * python/py-signalevent.c (create_signal_event_object): Use
13169 gdbpy_ref.
13170 * python/py-newobjfileevent.c (create_new_objfile_event_object)
13171 (emit_new_objfile_event, create_clear_objfiles_event_object)
13172 (emit_clear_objfiles_event): Use gdbpy_ref.
13173 * python/py-infevents.c (create_inferior_call_event_object)
13174 (create_register_changed_event_object)
13175 (create_memory_changed_event_object, emit_inferior_call_event)
13176 (emit_memory_changed_event, emit_register_changed_event): Use
13177 gdbpy_ref.
13178 * python/py-exitedevent.c (create_exited_event_object)
13179 (emit_exited_event): Use gdbpy_ref.
13180 * python/py-event.h (evpy_emit_event): Remove
13181 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13182 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13183 * python/py-continueevent.c (emit_continue_event): Use
13184 gdbpy_ref.
13185 * python/py-breakpoint.c (gdbpy_breakpoint_created)
13186 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13187 gdbpy_ref.
13188 * python/py-bpevent.c (create_breakpoint_event_object): Use
13189 gdbpy_ref.
13190
a68ff33e
TT
131912017-01-10 Tom Tromey <tom@tromey.com>
13192
13193 * python/py-ref.h: New file.
13194
7becfd03
SM
131952017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13196
13197 * cli-out.c (cli_ui_out::do_redirect): Change return type to
13198 void.
13199 * cli-out.h (cli_ui_out::do_redirect): Likewise.
13200 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13201 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13202 * ui-out.c (ui_out::redirect): Likewise.
13203 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13204 * cli/cli-logging.c (set_logging_redirect): Update call site of
13205 ui_out::redirect.
13206 (handle_redirections): Likewise.
13207 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13208 * top.c (execute_command_to_string): Likewise.
13209 * utils.c (do_ui_out_redirect_pop): Likewise.
13210
df294654
SM
132112017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13212
13213 * stack.c (_initialize_stack): Update "frame" command help message.
13214
f5e6296e
IB
132152017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
13216
13217 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13218
0e2d6fa6
YQ
132192017-01-06 Yao Qi <yao.qi@linaro.org>
13220
13221 * x86-linux-nat.h: Include gdb_proc_service.h.
13222
44d6d3f9
YQ
132232017-01-06 Yao Qi <yao.qi@linaro.org>
13224
13225 * ser-base.h: Include serial.h.
13226
656731fe
YQ
132272017-01-06 Yao Qi <yao.qi@linaro.org>
13228
13229 * ppc-linux-tdep.h: Include ppc-tdep.h.
13230
1ca8f924
YQ
132312017-01-06 Yao Qi <yao.qi@linaro.org>
13232
13233 * nat/amd64-linux-siginfo.h: Include signal.h.
13234
bc3008c4
YQ
132352017-01-06 Yao Qi <yao.qi@linaro.org>
13236
13237 * nat/aarch64-linux-hw-point.h: Include break-common.h.
13238
66c80d03
YQ
132392017-01-06 Yao Qi <yao.qi@linaro.org>
13240
13241 * mi/mi-parse.h: Include mi-cmds.h.
13242
051d2dda
YQ
132432017-01-06 Yao Qi <yao.qi@linaro.org>
13244
13245 * inf-loop.c: Don't include "target.h".
13246 * inf-loop.h: Include it here.
13247
8018d34f
YQ
132482017-01-06 Yao Qi <yao.qi@linaro.org>
13249
13250 * dfp.h: Include "dboulest.h" and "expression.h".
13251
c0b8369c
YQ
132522017-01-06 Yao Qi <yao.qi@linaro.org>
13253
13254 * ax-gdb.h: Include "ax.h".
13255
ad5cba2a
YQ
132562017-01-06 Yao Qi <yao.qi@linaro.org>
13257
13258 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13259 with nat/gdb_ptrace.h.
13260
1c33cd7f
YQ
132612017-01-05 Yao Qi <yao.qi@linaro.org>
13262
13263 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13264 new line.
13265 (mips64_fbsd_sigframe_init): Likewise.
13266
c988ac1d
JB
132672017-01-04 John Baldwin <jhb@FreeBSD.org>
13268
13269 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13270 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13271
b268007c
JB
132722017-01-04 John Baldwin <jhb@FreeBSD.org>
13273
13274 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13275 * NEWS: Mention new FreeBSD/mips native configuration.
13276 * config/mips/fbsd.mh: New file.
13277 * configure.host: Add mips*-*-freebsd*.
13278 * mips-fbsd-nat.c: New file.
13279
387360da
JB
132802017-01-04 John Baldwin <jhb@FreeBSD.org>
13281
13282 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13283 (ALLDEPFILES): Add mips-fbsd-tdep.c.
13284 * NEWS: Mention new FreeBSD/mips target.
13285 * configure.tgt: Add mips*-*-freebsd*.
13286 * mips-fbsd-tdep.c: New file.
13287 * mips-fbsd-tdep.h: New file.
13288
2aaaf250
YQ
132892017-01-04 Yao Qi <yao.qi@linaro.org>
13290
13291 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13292 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13293
61baf725
JB
132942017-01-01 Joel Brobecker <brobecker@adacore.com>
13295
6dbb839a 13296 Update copyright year range in all GDB files.
61baf725 13297
c113e7ff 132982017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 13299
c113e7ff 13300 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 13301
c113e7ff 13302For older changes see ChangeLog-2016.
c906108c
SS
13303\f
13304Local Variables:
13305mode: change-log
13306left-margin: 8
13307fill-column: 74
13308version-control: never
57da7796 13309coding: utf-8
c906108c 13310End:
This page took 2.610017 seconds and 4 git commands to generate.