]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Add missing-END_CATCH detection/protection (to gdb's TRY/CATCH/END_CATCH)
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
bc3b087d
SDJ
12017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * NEWS (Changes since GDB 8.0): Add entry about new
4 'set-cwd-on-gdbserver' feature.
5 (New remote packets): Add entry for QSetWorkingDir.
6 * common/common-inferior.h (set_inferior_cwd): New prototype.
7 * infcmd.c (set_inferior_cwd): Remove "static".
8 (show_cwd_command): Expand text to include remote debugging.
9 * remote.c: Add PACKET_QSetWorkingDir.
10 (remote_protocol_features) <QSetWorkingDir>: New entry for
11 PACKET_QSetWorkingDir.
12 (extended_remote_set_inferior_cwd): New function.
13 (extended_remote_create_inferior): Call
14 "extended_remote_set_inferior_cwd".
15 (_initialize_remote): Call "add_packet_config_cmd" for
16 QSetWorkingDir.
17
d092c5a2
SDJ
182017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
19
20 * NEWS (New commands): Mention "set/show cwd".
21 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
22 "cd" command's help text.
23 * common/common-inferior.h (get_inferior_cwd): New prototype.
24 * infcmd.c (inferior_cwd_scratch): New global variable.
25 (set_inferior_cwd): New function.
26 (get_inferior_cwd): Likewise.
27 (set_cwd_command): Likewise.
28 (show_cwd_command): Likewise.
29 (_initialize_infcmd): Add "set/show cwd" commands.
30 * inferior.h (class inferior) <cwd>: New field.
31 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
32 (fork_inferior): Change inferior's cwd before its execution.
33 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
34 to CreateProcess.
35
7da0a886
SDJ
362017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
37
38 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
39 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
40 (COMMON_OBS): Add gdb_tilde_expand.o.
41 * common/gdb_tilde_expand.c: New file.
42 * common/gdb_tilde_expand.h: Likewise.
43
db8dd160
MR
442017-10-03 Maciej W. Rozycki <macro@imgtec.com>
45
46 * gdbarch.sh (objfile): Remove duplicate declaration.
47 * gdbarch.h: Regenerate.
48
f8bfbf22
TT
492017-10-03 Tom Tromey <tom@tromey.com>
50
51 * utils.c (internal_vproblem): Use string_vprintf.
52
5178ed48
TT
532017-10-03 Tom Tromey <tom@tromey.com>
54
55 * printcmd.c (info_symbol_command): Use std::string.
56
8cff8730
TT
572017-10-03 Tom Tromey <tom@tromey.com>
58
59 * top.c (gdb_safe_append_history): Use std::string.
60
895b8f30
TT
612017-10-03 Tom Tromey <tom@tromey.com>
62
63 * event-top.c (stdin_event_handler): Update.
64 * main.c (captured_main_1): Update.
65 * top.h (make_delete_ui_cleanup): Remove.
66 (struct ui): Add constructor and destructor.
67 (new_ui, delete_ui): Remove.
68 * top.c (make_delete_ui_cleanup): Remove.
69 (new_ui_command): Use std::unique_ptr.
70 (delete_ui_cleanup): Remove.
71 (ui::ui): Rename from new_ui. Update.
72 (free_ui): Remove.
73 (ui::~ui): Rename from delete_ui. Update.
74
0efef640
TT
752017-10-03 Tom Tromey <tom@tromey.com>
76
77 * symfile.c (load_progress): Use gdb::byte_vector.
78
245ad7d3
TT
792017-10-03 Tom Tromey <tom@tromey.com>
80
81 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
82 declaration.
83 * printcmd.c (x_command): Remove unused declaration.
84 * symfile.c (symbol_file_command): Remove unused declaration.
85
e05550d7
TT
862017-10-03 Tom Tromey <tom@tromey.com>
87
88 * utils.c (internal_vproblem): Use std::string.
89 (defaulted_query): Likewise.
90
b95de2b7
TT
912017-10-03 Tom Tromey <tom@tromey.com>
92
93 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
94 * top.c (execute_command_to_string): Update.
95 * utils.c (make_cleanup_restore_page_info): Remove.
96 (do_restore_page_info_cleanup): Remove.
97 (set_batch_flag_and_restore_page_info):
98 New.
99 (make_cleanup_restore_page_info): Remove.
100 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
101 (~set_batch_flag_and_restore_page_info): New
102 (make_cleanup_restore_uinteger): Remove.
103 (make_cleanup_restore_integer): Remove.
104 (struct restore_integer_closure): Remove.
105 (restore_integer): Remove.
106 * utils.h (struct set_batch_flag_and_restore_page_info): New
107 class.
108 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
109 (make_cleanup_restore_page_info): Remove.
110 (make_cleanup_restore_uinteger) Remove.
111 (make_cleanup_restore_integer) Remove.
112
07036511
TT
1132017-10-03 Tom Tromey <tom@tromey.com>
114
115 * record-full.h (record_full_gdb_operation_disable_set): Return
116 scoped_restore_tmpl<int>.
117 * infrun.c (adjust_pc_after_break): Update.
118 (handle_signal_stop): Update.
119 * record-full.c (record_full_gdb_operation_disable_set): Return
120 scoped_restore_tmpl<int>.
121 (record_full_wait_1, record_full_insert_breakpoint)
122 (record_full_remove_breakpoint, record_full_save)
123 (record_full_goto_insn): Update.
124
45320ffa
TT
1252017-10-02 Tom Tromey <tom@tromey.com>
126
127 PR rust/22236:
128 * rust-lang.c (rust_val_print_str): New function.
129 (val_print_struct): Call it.
130 (rust_subscript): Preserve name of slice type.
131
b3e3859b
TT
1322017-10-02 Tom Tromey <tom@tromey.com>
133
134 * rust-lang.c (rust_subscript): Handle slices in
135 EVAL_AVOID_SIDE_EFFECTS case.
136
01af5e0d
TT
1372017-10-02 Tom Tromey <tom@tromey.com>
138
139 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
140
888e3ddb
TT
1412017-10-02 Tom Tromey <tom@tromey.com>
142
143 * rust-lang.h (rust_slice_type): Add "extern".
144
cc536b21
PA
1452017-10-02 Tom Tromey <tom@tromey.com>
146 Pedro Alves <palves@redhat.com>
147
148 * ada-lang.h (ada_exc_info::operator<): Make const.
149 (ada_exc_info::operator==): Make const.
150 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
151 Make const.
152
386c8614
TT
1532017-09-29 Tom Tromey <tom@tromey.com>
154
155 * target.c (read_whatever_is_readable): Change type of "result".
156 Update.
157 (free_memory_read_result_vector): Remove.
158 (read_memory_robust): Change return type. Update.
159 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
160 bin2hex, std::string.
161 * target.h (memory_read_result_s): Remove typedef.
162 (free_memory_read_result_vector): Remove.
163 (read_memory_robust): Return std::vector.
164
789c4b5e
TT
1652017-09-29 Tom Tromey <tom@tromey.com>
166
167 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
168
ab816a27
TT
1692017-09-29 Tom Tromey <tom@tromey.com>
170
171 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
172 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
173 operator< and operator==.
174 (ada_exceptions_list): Return a std::vector.
175 * ada-lang.c (ada_exc_info::operator<): Rename from
176 compare_ada_exception_info.
177 (ada_exc_info::operator==): New.
178 (sort_remove_dups_ada_exceptions_list): Change type of
179 "exceptions".
180 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
181 (ada_add_global_exceptions): Likewise.
182 (ada_exceptions_list_1): Return a std::vector.
183 (ada_exceptions_list): Likewise.
184
52f9abe4
TT
1852017-09-29 Tom Tromey <tom@tromey.com>
186
187 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
188 'std::set *'.
189 (print_one_inferior): Update.
190 (free_vector_of_ints): Remove.
191 (list_available_thread_groups): Change "ids" to std::set.
192 (mi_cmd_list_thread_groups): Update.
193 (struct collect_cores_data) <core>: Now a std::set.
194 (collect_cores): Update.
195 (unique): Remove.
196 (print_one_inferior): Update.
197
dcd5ddcc
TT
1982017-09-29 Tom Tromey <tom@tromey.com>
199
200 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
201 (mi_execute_async_cli_command): Likewise.
202 (mi_cmd_trace_frame_collected): Use field_fmt.
203
45d288cc
TT
2042017-09-29 Tom Tromey <tom@tromey.com>
205
206 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
207 gdb::byte_vector.
208
6afe2f4a
TT
2092017-09-29 Tom Tromey <tom@tromey.com>
210
211 * mi/mi-parse.c (mi_parse): Remove unused declaration.
212
9813429a
TT
2132017-09-29 Tom Tromey <tom@tromey.com>
214
215 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
216
2d6960b4
TT
2172017-09-29 Tom Tromey <tom@tromey.com>
218
219 * varobj.h (varobj_gen_name): Return std::string.
220 * varobj.c (varobj_gen_name): Return std::string.
221 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
222 (mi_cmd_var_delete): Don't copy "name".
223
784c453a
TT
2242017-09-29 Tom Tromey <tom@tromey.com>
225
226 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
227 (mi_cmd_break_insert_1): Update.
228
a9bc57b9
TT
2292017-09-29 Tom Tromey <tom@tromey.com>
230
231 * target.h (make_scoped_defer_target_commit_resume): Update.
232 * target.c (make_scoped_defer_target_commit_resume): Rename from
233 make_cleanup_defer_target_commit_resume. Return a
234 scoped_restore.
235 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
236
9754d8c4
TT
2372017-09-29 Tom Tromey <tom@tromey.com>
238
239 * main.c (captured_main_1): Remove unused declaration.
240 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
241
99ef965c
TT
2422017-09-29 Tom Tromey <tom@tromey.com>
243
244 * symtab.c (search_symbols): Remove unused outer cleanup.
245 (make_source_files_completion_list): Remove unused declaration.
246
42518ba7
TT
2472017-09-29 Tom Tromey <tom@tromey.com>
248
249 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
250
726b2169
TT
2512017-09-29 Tom Tromey <tom@tromey.com>
252
253 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
254 gdb::byte_vector.
255
55b06432
TT
2562017-09-29 Tom Tromey <tom@tromey.com>
257
258 * complaints.c (vcomplaint): Use std::string.
259
8abcee91
TT
2602017-09-29 Tom Tromey <tom@tromey.com>
261
262 * tracepoint.c (trace_variable_command): Use std::string.
263 (encode_actions_1): Remove unused declarations.
264 (create_tsv_from_upload): Use std::string.
265
6ad94bc7
TT
2662017-09-29 Tom Tromey <tom@tromey.com>
267
268 * cp-support.c (gdb_demangle): Use std::string.
269
2003f3d8
TT
2702017-09-29 Tom Tromey <tom@tromey.com>
271
272 * stack.c (parse_frame_specification): Use std::string
273 (info_frame_command): Use gdb::unique_xmalloc_ptr.
274
8f8accb5
TT
2752017-09-29 Tom Tromey <tom@tromey.com>
276
277 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
278
200aa7b1
TT
2792017-09-29 Tom Tromey <tom@tromey.com>
280
281 * utils.c (vfprintf_maybe_filtered): Use std::string.
282 (vfprintf_unfiltered): Likewise.
283
606aae8a
TT
2842017-09-29 Tom Tromey <tom@tromey.com>
285
286 * event-top.c (top_level_prompt): Return std::string.
287 (display_gdb_prompt): Update.
288
bd413795
TT
2892017-09-29 Tom Tromey <tom@tromey.com>
290
291 * unittests/common-utils-selftests.c (format): New function.
292 (string_vprintf_tests): New function.
293 (_initialize_common_utils_selftests): Register new tests.
294 * common/common-utils.c (string_vprintf): New function.
295 * common/common-utils.h (string_vprintf): Declare.
296
256642e8
PA
2972017-09-29 Pedro Alves <palves@redhat.com>
298
299 * common/rsp-low.c (unpack_varlen_hex): Constify.
300 * common/rsp-low.h (unpack_varlen_hex): Constify.
301 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
302 Constify.
303 * remote.c (remote_set_permissions, read_ptid)
304 (remote_current_thread, remote_get_threads_with_qthreadinfo)
305 (remote_static_tracepoint_marker_at)
306 (remote_static_tracepoint_markers_by_strid)
307 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
308 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
309 (parse_tracepoint_definition, parse_tsv_definition)
310 (parse_static_tracepoint_marker_definition): Constify.
311 * tracepoint.h (parse_static_tracepoint_marker_definition)
312 (parse_trace_status, parse_tracepoint_status)
313 (parse_tracepoint_definition, parse_tsv_definition): Constify.
314
b6bb3468
PA
3152017-09-29 Pedro Alves <palves@redhat.com>
316
317 * remote.c (target_buf, target_buf_size): Delete.
318 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
319 Use the connection's packet buffer instead.
320 All callers adjusted.
321 (_initialize_remote): Remove references to target_buf and
322 target_buf_size.
323
b2f8eb7a
PA
3242017-09-28 Pedro Alves <palves@redhat.com>
325
326 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
327 unittests/common-utils-selftests.c.
328 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
329 (COMMON_OBS): Remove utils-selftests.o.
330 * utils-selftests.c: Move to ...
331 * unittests/common-utils-selftests.c: ... here and rename self
332 test to "string_printf".
333
08302ed2
DE
3342017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
335
336 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
337 having NULL cus or tus.
338
96a5a1d3
UW
3392017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
340
341 * arm-tdep.c: (convert_from_extended): Remove.
342 (convert_to_extended): Likewise.
343 (arm_extract_return_value): Use convert_typed_floating.
344 (arm_store_return_value): Likewise.
345
346 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
347 * sh-tdep.c: Do not include "floatformat.h".
348 (sh_littlebyte_bigword_type): New function.
349 (sh_register_convert_to_virtual): Use convert_typed_floating.
350 (sh_register_convert_to_raw): Likewise.
351 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
352 (sh64_littlebyte_bigword_type): New function.
353 (sh64_extract_return_value): Use convert_typed_floating.
354 (sh64_register_convert_to_virtual): Likewise.
355 (sh64_register_convert_to_raw): Likewise.
356
0db7851f
UW
3572017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
358
359 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
360 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
361
362 * gdbtypes.h (union type_specific): Make field floatformat hold
363 just a single struct floatformat, not an array.
364 (floatformat_from_type): Move here.
365 * gdbtypes.c (floatformat_from_type): Move here. Update to
366 changed TYPE_FLOATFORMAT definition.
367 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
368 (recursive_dump_type): Likewise.
369 (init_float_type): Install correct floatformat for byte order.
370 (arch_float_type): Likewise.
371
77b7c781
UW
3722017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
373
374 * gdbtypes.c (init_type): Change incoming argument from
375 length-in-bytes to length-in-bits. Assert length is a
376 multiple of TARGET_CHAR_BITS.
377 (arch_type, arch_flags_type): Likewise.
378 (init_integer_type): Update call to init_type.
379 (init_character_type): Likewise.
380 (init_boolean_type): Likewise.
381 (init_float_type): Likewise.
382 (init_decfloat_type): Likewise.
383 (init_complex_type): Likewise.
384 (init_pointer_type): Likewise.
385 (objfile_type): Likewise.
386 (arch_integer_type): Update call to arch_type.
387 (arch_character_type): Likewise.
388 (arch_boolean_type): Likewise.
389 (arch_float_type): Likewise.
390 (arch_decfloat_type): Likewise.
391 (arch_complex_type): Likewise.
392 (arch_pointer_type): Likewise.
393 (gdbtypes_post_init): Likewise.
394
395 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
396 (read_base_type): Likewise.
397 * mdebugread.c (basic_type): Likewise.
398 * stabsread.c (dbx_init_float_type): Likewise.
399 (rs6000_builtin_type): Likewise.
400 (read_range_type): Likewise. Also, fix call to init_integer_type
401 with erroneous length argument.
402
403 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
404 * d-lang.c (build_d_types): Likewise.
405 * f-lang.c (build_fortran_types): Likewise.
406 * go-lang.c (build_go_types): Likewise.
407 * opencl-lang.c (build_opencl_types): Likewise.
408 * jit.c (finalize_symtab): Likewise.
409 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
410 (build_std_type_info_type): Likewise.
411 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
412 update call to arch_flags_type.
413
414 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
415 arch_type.
416 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
417 * windows-tdep.c (windows_get_tlb_type): Likewise.
418
419 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
420 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
421 * m32c-tdep.c (make_types): Likewise.
422 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
423 (rl78_psw_type): Update call to arch_flags_type.
424 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
425 * rx-tdep.c (rx_psw_type): Likewise.
426 (rx_fpsw_type): Likewise.
427 * sparc-tdep.c (sparc_psr_type): Likewise.
428 (sparc_fsr_type): Likewise.
429 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
430 (sparc64_ccr_type): Likewise.
431 (sparc64_fsr_type): Likewise.
432 (sparc64_fprs_type): Likewise.
433
f21b4d5c
TT
4342017-09-27 Tom Tromey <tom@tromey.com>
435
436 * findcmd.c (find_command): Constify.
437
643c2ffa
TT
4382017-09-27 Tom Tromey <tom@tromey.com>
439
440 * ada-tasks.c (task_command_1, task_command): Constify.
441
510e5e56
TT
4422017-09-27 Tom Tromey <tom@tromey.com>
443
444 * symtab.c (maintenance_print_symbol_cache)
445 (maintenance_flush_symbol_cache)
446 (maintenance_print_symbol_cache_statistics): Constify.
447
e503b191
TT
4482017-09-27 Tom Tromey <tom@tromey.com>
449
450 * inferior.c (detach_inferior_command, kill_inferior_command)
451 (inferior_command): Constify.
452
4e001312
TT
4532017-09-27 Tom Tromey <tom@tromey.com>
454
455 * regcache.c (regcache_print, maintenance_print_registers)
456 (maintenance_print_raw_registers)
457 (maintenance_print_cooked_registers)
458 (maintenance_print_register_groups)
459 (maintenance_print_remote_registers): Constify.
460
77763700
TT
4612017-09-27 Tom Tromey <tom@tromey.com>
462
463 * printcmd.c (map_display_numbers, undisplay_command)
464 (enable_disable_display_command, enable_display_command)
465 (disable_display_command): Constify.
466
4495129a
TT
4672017-09-27 Tom Tromey <tom@tromey.com>
468
469 * breakpoint.h (delete_command): Don't declare.
470 * breakpoint.c (delete_command, enable_once_command)
471 (enable_count_command, enable_delete_command, breakpoint_1)
472 (maintenance_info_breakpoints, stopin_command, stopat_command)
473 (delete_command, delete_trace_command, save_breakpoints)
474 (save_breakpoints_command, save_tracepoints_command): Constify.
475
3088cf40
TT
4762017-09-27 Tom Tromey <tom@tromey.com>
477
478 * macrocmd.c (macro_expand_command, macro_expand_once_command)
479 (skip_ws, extract_identifier, macro_define_command)
480 (macro_undef_command, macro_list_command): Constify.
481
69f476a3
TT
4822017-09-27 Tom Tromey <tom@tromey.com>
483
484 * infcmd.c (environment_info, set_environment_command)
485 (unset_environment_command, path_info, info_proc_cmd_1)
486 (info_proc_cmd_mappings, info_proc_cmd_stat)
487 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
488 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
489
c4a3e68e
TT
4902017-09-27 Tom Tromey <tom@tromey.com>
491
492 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
493 Constify.
494
c9d31bd6
TT
4952017-09-27 Tom Tromey <tom@tromey.com>
496
497 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
498
1f3f85eb
TT
4992017-09-27 Tom Tromey <tom@tromey.com>
500
501 * demangle.c (demangle_command): Constify.
502
9c504b5d
TT
5032017-09-27 Tom Tromey <tom@tromey.com>
504
505 * progspace.c (maintenance_info_program_spaces_command):
506 Constify.
507
6663cf91
TT
5082017-09-27 Tom Tromey <tom@tromey.com>
509
510 * compile/compile.c (check_raw_argument, compile_file_command)
511 (compile_code_command, compile_print_command): Constify.
512
34e5fa26
TT
5132017-09-27 Tom Tromey <tom@tromey.com>
514
515 * reggroups.c (maintenance_print_reggroups): Constify.
516
8384c356
TT
5172017-09-27 Tom Tromey <tom@tromey.com>
518
519 * dwarf2read.c (save_gdb_index_command): Constify.
520
884beb0c
TT
5212017-09-27 Tom Tromey <tom@tromey.com>
522
523 * stap-probe.c (info_probes_stap_command): Constify.
524
e0b2930c
TT
5252017-09-27 Tom Tromey <tom@tromey.com>
526
527 * fork-child.c (unset_exec_wrapper_command): Constify.
528
f938677d
TT
5292017-09-27 Tom Tromey <tom@tromey.com>
530
531 * btrace.c (get_uint, get_context_size, no_chunk)
532 (maint_btrace_packet_history_cmd)
533 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
534 (maint_info_btrace_cmd): Constify.
535
8949cb87
TT
5362017-09-27 Tom Tromey <tom@tromey.com>
537
538 * reverse.c (delete_bookmark_command): Constify.
539
ac88e2de
TT
5402017-09-27 Tom Tromey <tom@tromey.com>
541
542 * remote.c (set_memory_packet_size)
543 (set_memory_write_packet_size, show_memory_write_packet_size)
544 (set_memory_read_packet_size, show_memory_read_packet_size)
545 (compare_sections_command, packet_command, remote_put_command)
546 (remote_get_command, remote_delete_command): Constify.
547
bd4c9dfe
TT
5482017-09-27 Tom Tromey <tom@tromey.com>
549
550 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
551 (set_mipsfpu_double_command, set_mipsfpu_none_command)
552 (set_mipsfpu_auto_command): Constify.
553
5e93d4c6
TT
5542017-09-27 Tom Tromey <tom@tromey.com>
555
556 * cli/cli-cmds.h (cd_command): Constify.
557 * cli/cli-cmds.c (cd_command): Constify.
558
fc41a75b
TT
5592017-09-27 Tom Tromey <tom@tromey.com>
560
561 * thread.c (thread_name_command, thread_find_command): Constify.
562
67810076
TT
5632017-09-27 Tom Tromey <tom@tromey.com>
564
565 * probe.c (enable_probes_command, disable_probes_command):
566 Constify.
567
1d8b34a7
TT
5682017-09-27 Tom Tromey <tom@tromey.com>
569
570 * symfile.c (symbol_file_command): Constify.
571 * gdbcore.h (deprecated_file_changed_hook): Constify.
572 * exec.c (deprecated_file_changed_hook, exec_file_command)
573 (file_command): Constify.
574 * defs.h (symbol_file_command): Constify.
575
442019e1
TT
5762017-09-27 Tom Tromey <tom@tromey.com>
577
578 * remote-fileio.c (set_system_call_allowed)
579 (show_system_call_allowed): Constify.
580
2983f7cb
TT
5812017-09-27 Tom Tromey <tom@tromey.com>
582
583 * tracepoint.c (delete_trace_variable_command)
584 (tfind_end_command, tfind_start_command, tfind_pc_command)
585 (tfind_tracepoint_command, tfind_line_command)
586 (tfind_range_command, tfind_outside_command): Constify.
587
4fd41b24
TT
5882017-09-27 Tom Tromey <tom@tromey.com>
589
590 * ax-gdb.c (maint_agent_printf_command, agent_command)
591 (agent_eval_command): Constify.
592
f2fc3015
TT
5932017-09-27 Tom Tromey <tom@tromey.com>
594
595 * tracepoint.c (info_scope_command): Constify.
596 * python/python.c (gdbpy_decode_line): Constify.
597 * python/py-breakpoint.c (bppy_init): Constify.
598 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
599 * location.h: (new_linespec_location)
600 (string_to_event_location_basic, string_to_event_location):
601 Constify.
602 * location.c (new_linespec_location)
603 (string_to_event_location_basic, string_to_event_location):
604 Constify.
605 * linespec.h (decode_line_with_current_source)
606 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
607 * linespec.c (linespec_lex_to_end)
608 (decode_line_with_current_source)
609 (decode_line_with_last_displayed): Constify.
610 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
611 Constify.
612 * cli/cli-cmds.c (edit_command, list_command): Constify.
613 * breakpoint.h (until_break_command, watch_command_wrapper)
614 (awatch_command_wrapper, rwatch_command_wrapper)
615 (init_ada_exception_breakpoint): Constify.
616 * breakpoint.c (break_command_1, dprintf_command)
617 (break_range_command, watch_command_wrapper)
618 (rwatch_command_wrapper, awatch_command_wrapper)
619 (until_break_command, init_ada_exception_breakpoint)
620 (strace_marker_create_sals_from_location, trace_command)
621 (ftrace_command, strace_command, struct tracepoint): Constify.
622 * ax-gdb.c (agent_command_1): Constify.
623 * ada-lang.c (ada_exception_sal): Constify.
624
8c2f95f4
TT
6252017-09-27 Tom Tromey <tom@tromey.com>
626
627 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
628 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
629 (get_context_size, no_chunk, get_insn_history_modifiers)
630 (cmd_record_insn_history, get_call_history_modifiers)
631 (cmd_record_call_history): Constify.
632
a0d65762
TT
6332017-09-27 Tom Tromey <tom@tromey.com>
634
635 * source.c (show_substitute_path_command)
636 (unset_substitute_path_command, set_substitute_path_command):
637 Constify.
638
58971144
TT
6392017-09-27 Tom Tromey <tom@tromey.com>
640
641 * typeprint.c (maintenance_print_type): Constify.
642 * maint.c (maintenance_dump_me, maintenance_demangle)
643 (maintenance_time_display, maintenance_info_sections)
644 (maintenance_print_statistics, maintenance_deprecate)
645 (maintenance_undeprecate): Constify.
646 (maintenance_do_deprecate): Constify. Use std::string.
647 (maintenance_selftest): Constify.
648 * gdbtypes.h (maintenance_print_type): Constify.
649
c482f52c
TT
6502017-09-27 Tom Tromey <tom@tromey.com>
651
652 * hppa-tdep.c (unwind_command): Constify.
653
e100df1a
TT
6542017-09-27 Tom Tromey <tom@tromey.com>
655
656 * target-descriptions.c (unset_tdesc_filename_cmd)
657 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
658 Constify.
659
31d56ade
TT
6602017-09-27 Tom Tromey <tom@tromey.com>
661
662 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
663
b961da0b
TT
6642017-09-27 Tom Tromey <tom@tromey.com>
665
666 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
667
e2d8ae16
TT
6682017-09-27 Tom Tromey <tom@tromey.com>
669
670 * tui/tui-regs.c (tui_reg_command): Constify.
671
863779b0
TT
6722017-09-27 Tom Tromey <tom@tromey.com>
673
674 * skip.c (skip_file_command, skip_function_command)
675 (skip_enable_command, skip_disable_command, skip_delete_command):
676 Constify.
677
cdb34d4a
TT
6782017-09-27 Tom Tromey <tom@tromey.com>
679
680 * record-btrace.c (cmd_record_btrace_bts_start)
681 (cmd_record_btrace_pt_start): Constify.
682
e99c83e7
TT
6832017-09-27 Tom Tromey <tom@tromey.com>
684
685 * symmisc.c (maintenance_print_symbols)
686 (maintenance_print_msymbols, maintenance_print_objfiles)
687 (maintenance_info_symtabs, maintenance_check_symtabs)
688 (maintenance_expand_symtabs, maintenance_info_line_tables):
689 Constify.
690
32faf971
TT
6912017-09-27 Tom Tromey <tom@tromey.com>
692
693 * top.c (new_ui_command): Constify.
694
2cf311eb
TT
6952017-09-27 Tom Tromey <tom@tromey.com>
696
697 * symfile.c (add_symbol_file_command)
698 (remove_symbol_file_command, list_overlays_command)
699 (map_overlay_command, unmap_overlay_command)
700 (overlay_auto_command, overlay_manual_command)
701 (overlay_off_command, overlay_load_command): Constify.
702
e6738699
TT
7032017-09-27 Tom Tromey <tom@tromey.com>
704
705 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
706 (info_spu_mailbox_command, info_spu_dma_command)
707 (info_spu_proxydma_command): Constify.
708
aa360cd5
TT
7092017-09-27 Tom Tromey <tom@tromey.com>
710
711 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
712
898241a5
TT
7132017-09-27 Tom Tromey <tom@tromey.com>
714
715 * cli/cli-script.c (user_defined_command): Constify.
716
2d0ac106
TT
7172017-09-27 Tom Tromey <tom@tromey.com>
718
719 * cli/cli-dump.c (dump_memory_command, dump_value_command)
720 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
721 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
722 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
723 (dump_binary_value, append_binary_memory, append_binary_value):
724 Constify.
725 (struct dump_context) <func>: Constify.
726 (add_dump_command): Update.
727
dede02ce
TT
7282017-09-27 Tom Tromey <tom@tromey.com>
729
730 * cli/cli-cmds.c (show_version, show_configuration)
731 (source_command, show_user): Constify.
732
d3cb6b99
TT
7332017-09-27 Tom Tromey <tom@tromey.com>
734
735 * target.c (maintenance_print_target_stack): Constify.
736
1970a12f
TT
7372017-09-27 Tom Tromey <tom@tromey.com>
738
739 * interps.c (interpreter_exec_cmd): Constify.
740
41243651
TT
7412017-09-27 Tom Tromey <tom@tromey.com>
742
743 * record-full.c (cmd_record_full_restore): Constify.
744
4465d9db
TT
7452017-09-27 Tom Tromey <tom@tromey.com>
746
747 * memattr.c (enable_mem_command, disable_mem_command)
748 (delete_mem_command): Constify.
749
ad25e423
TT
7502017-09-27 Tom Tromey <tom@tromey.com>
751
752 * value.c (show_convenience): Constify.
753
d64097b1
TT
7542017-09-27 Tom Tromey <tom@tromey.com>
755
756 * gdbcore.h (core_file_command): Update.
757 * corefile.c (core_file_command): Constify.
758
4d4589ef
TT
7592017-09-27 Tom Tromey <tom@tromey.com>
760
761 * user-regs.c (maintenance_print_user_registers): Constify.
762
32a7bf17
TT
7632017-09-27 Tom Tromey <tom@tromey.com>
764
765 * cp-namespace.c (maintenance_cplus_namespace): Constify.
766
4a475551
TT
7672017-09-27 Tom Tromey <tom@tromey.com>
768
769 * cp-support.c (first_component_command): Constify.
770
990b9f9f
TT
7712017-09-27 Tom Tromey <tom@tromey.com>
772
773 * psymtab.c (maintenance_print_psymbols)
774 (maintenance_info_psymtabs, maintenance_check_psymtabs):
775 Constify.
776
c281872e
TT
7772017-09-27 Tom Tromey <tom@tromey.com>
778
779 * windows-tdep.c (display_tib): Constify.
780
5b64bf74
TT
7812017-09-27 Tom Tromey <tom@tromey.com>
782
783 * linux-fork.c (delete_checkpoint_command)
784 (detach_checkpoint_command): Constify.
785
4ada038f
TT
7862017-09-27 Tom Tromey <tom@tromey.com>
787
788 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
789
57f5a81b
TT
7902017-09-27 Tom Tromey <tom@tromey.com>
791
792 * arc-tdep.c (dump_arc_instruction_command): Constify.
793
b0a8e6c4
TT
7942017-09-27 Tom Tromey <tom@tromey.com>
795
796 * valprint.c (set_radix, show_radix): Constify.
797
8d97dc1c
TT
7982017-09-27 Tom Tromey <tom@tromey.com>
799
800 * dtrace-probe.c (info_probes_dtrace_command): Constify.
801
eb7c454d
TT
8022017-09-27 Tom Tromey <tom@tromey.com>
803
804 * command.h (not_just_help_class_command): Update.
805 * cli/cli-decode.h (not_just_help_class_command): Update.
806 * cli/cli-decode.c (not_just_help_class_command): Constify.
807
e4e33335
TT
8082017-09-27 Tom Tromey <tom@tromey.com>
809
810 * gdb_bfd.c (maintenance_info_bfds): Constify.
811
0450cc4c
TT
8122017-09-27 Tom Tromey <tom@tromey.com>
813
814 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
815 overloads.
816 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
817 (do_const_cfunc): New function.
818 (cmd_cfunc_eq): New overload.
819 (cli_user_command_p): Check do_const_cfunc.
820 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
821 const_cfunc.
822 * command.h (add_cmd): Add const overload and no-function
823 overload.
824 (set_cmd_cfunc): Add const overload.
825 (cmd_const_cfunc_ftype): Declare.
826 (cmd_cfunc_eq): Add const overload.
827 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
828 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
829 overload.
830
a9bbfbd8
TT
8312017-09-27 Tom Tromey <tom@tromey.com>
832
833 * macroexp.c (get_next_token_for_substitution): New function.
834 (substitute_args): Call it. Check for __VA_OPT__.
835
5230b05a
WT
8362017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
837 Pedro Alves <palves@redhat.com>
838
839 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
840 producer_is_icc_lt_14.
841 (producer_is_icc_lt_14): New function.
842 (check_producer): Add code for checking version of ICC.
843 (producer_is_icc): Move to producer.c.
844 (read_structure_type): Restrict ICC workaround to ICC<14.
845 * producer.c: Include selftest.h.
846 (producer_is_icc, producer_parsing_tests, _initialize_producer):
847 New functions.
848 * producer.h (producer_is_icc): New declaration.
849
b32b108a
WT
8502017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
851
852 * Makefile.in (SFILES): Add producer.c.
853 (COMMON_OBS): Add producer.o
854 * amd64-tdep.c (producer.h): Add new include.
855 * dwarf2read.c (producer.h): Add new include.
856 * producer.c: New file.
857 * producer.h: New file.
858 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
859 producer.c.
860 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
861 producer.h.
862
5007d765
MK
8632017-09-26 Matthias Klose <doko@ubuntu.com>
864
865 * configure.ac: Search ncursesw before ncurses.
866 Check ncursesw/ncurses.h before ncurses/ncurses.h.
867 * gdb_curses.h: Include <ncursesw/ncurses.h>
868 * config.in, configure: Regenerate.
869
281c4447
RO
8702017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
871
872 PR gdb/22185
873 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
874 obsolete.
875 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
876 Remove i386sol2 support.
877 * configure.nat <i386sol2>: Remove.
878 <sol2-64>: Fold into ...
879 <sol2>: ... this.
880 Move common settings to default section.
881 Add sol-thread.o.
882 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
883 x86_64-*-solaris2.1[0-9]*>: Rename to ...
884 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
885 <i[34567]86-*-solaris*>: Remove.
886 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
887
888 * configure.ac: Remove wctype in libw check.
889 (_MSE_INT_H): Don't define on Solaris 7-9.
890 <solaris*>: Remove libthread_db.so.1 check.
891 * configure: Regenerate.
892 * config.in: Regenerate.
893
894 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
895 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
896 (gdb_ps_size_t): Remove.
897 Use base types in users.
898 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
899
900 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
901
39b06c20
RO
9022017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
903
904 PR build/22206
905 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
906 (adi_is_addr_mapped): Likewise.
907 (PSR_ICC): Don't redefine.
908 (PSR_IMPL): Likewise.
909
6c3e20f1
TT
9102017-09-25 Tom Tromey <tom@tromey.com>
911
912 * regcache.c (regcache::dump): Use string_printf.
913
b292235f
TT
9142017-09-25 Tom Tromey <tom@tromey.com>
915
916 * regcache.c (class regcache_invalidator): New.
917 (struct register_to_invalidate): Remove.
918 (make_cleanup_regcache_invalidate): Remove.
919 (regcache::raw_write): Use regcache_invalidator.
920
9ac86b52
TT
9212017-09-25 Tom Tromey <tom@tromey.com>
922
923 * spu-tdep.c (spu2ppu_sniffer): Update.
924 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
925 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
926 Remove.
927 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
928 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
929 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
930 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
931 (frame_pop): Update.
932
c0e383c6
TT
9332017-09-25 Tom Tromey <tom@tromey.com>
934
935 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
936 * regcache.h (regcache_xfree): Don't declare.
937 * regcache.c (regcache_xfree): Remove.
938 (do_regcache_xfree): Use delete.
939 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
940 * linux-fork.c (free_fork): Use delete.
941 (fork_save_infrun_state): Likewise.
942 * jit.c (jit_dealloc_cache): Use delete.
943 * infrun.c (discard_infcall_suspend_state): Use delete.
944
791199cc
TT
9452017-09-25 Tom Tromey <tom@tromey.com>
946
947 * regcache.h (regcache_xmalloc): Don't declare.
948 (regcache_raw_set_cached_value): Update comment.
949 * regcache.c (regcache_xmalloc): Remove.
950 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
951 * jit.c (jit_frame_sniffer): Use new.
952 * frame.c (frame_save_as_regcache): Use new.
953
289e23aa
AA
9542017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
955
956 * NEWS: Advertise support for guarded-storage registers on IBM z.
957
1b63490c
AA
9582017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
959
960 * s390-linux-nat.c (have_regset_gs): New static variable.
961 (s390_linux_fetch_inferior_registers): Handle guarded-storage
962 control block and guarded-storage broadcast control regsets.
963 (s390_read_description): Detect whether the target has
964 guarded-storage support, return appropriate tdesc.
965 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
966 (features/s390x-gs-linux64.c): Likewise.
967 (struct gdbarch_tdep) <have_gs>: New field.
968 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
969 (s390_gsbc_regset): New variables.
970 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
971 and s390_gsbc_regset, if applicable.
972 (s390_core_read_description): Check whether core file was from a
973 target with guarded-storage support; include appropriate regsets.
974 (s390_gdbarch_init): Add registers for guarded-storage support.
975 (_initialize_s390_tdep): Initialize new target descriptions that
976 include registers for guarded-storage support.
977 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
978 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
979 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
980 (S390_NUM_REGS): Adjust macro definition.
981 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
982 (tdesc_s390x_gs_linux64): New declarations.
983
96235dc1
AA
9842017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
985
986 * features/s390-gs-linux64.xml: New file.
987 * features/s390-gs.xml: New file.
988 * features/s390-gsbc.xml: New file.
989 * features/s390x-gs-linux64.xml: New file.
990 * features/Makefile (WHICH): Add s390-gs-linux64 and
991 s390x-gs-linux64.
992 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
993 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
994 * features/s390-gs-linux64.c: New generated file.
995 * features/s390x-gs-linux64.c: New file.
996 * regformats/s390-gs-linux64.dat: New file.
997 * regformats/s390x-gs-linux64.dat: New file.
998
b4a7c699
TT
9992017-09-23 Tom Tromey <tom@tromey.com>
1000
1001 * defs.h (make_cleanup_override_quit_handler): Don't declare.
1002
c2f97536
TT
10032017-09-22 Tom Tromey <tom@tromey.com>
1004
1005 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1006 type to scoped_restore_tmpl.
1007 <scoped_input_handler>: Initialize m_quit_handler directly.
1008
43573013
SDJ
10092017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1010
1011 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1012 (cd_command): Likewise. Free "current_directory" before
1013 assigning to it.
1014 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1015 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1016 * top.c (gdb_dirbuf): Remove global declaration.
1017 * top.h (gdb_dirbuf): Likewise.
1018
6ec2e0f5
SDJ
10192017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1020
1021 * gnulib/aclocal.m4: Regenerate.
1022 * gnulib/config.in: Regenerate.
1023 * gnulib/configure: Regenerate.
1024 * gnulib/import/Makefile.am: Regenerate.
1025 * gnulib/import/Makefile.in: Regenerate.
1026 * gnulib/import/assure.h: New file.
1027 * gnulib/import/at-func.c: Likewise
1028 * gnulib/import/chdir-long.c: New file.
1029 * gnulib/import/chdir-long.h: New file.
1030 * gnulib/import/cloexec.c: New file.
1031 * gnulib/import/cloexec.h: New file.
1032 * gnulib/import/close.c: New file.
1033 * gnulib/import/closedir.c: New file.
1034 * gnulib/import/dirent-private.h: New file.
1035 * gnulib/import/dup-safer.c: New file.
1036 * gnulib/import/dup.c: New file.
1037 * gnulib/import/dup2.c: New file.
1038 * gnulib/import/error.c: New file.
1039 * gnulib/import/error.h: New file.
1040 * gnulib/import/exitfail.c: New file.
1041 * gnulib/import/exitfail.h: New file.
1042 * gnulib/import/fchdir.c: New file.
1043 * gnulib/import/fcntl.c: New file.
1044 * gnulib/import/fcntl.in.h: New file.
1045 * gnulib/import/fd-hook.c: New file.
1046 * gnulib/import/fd-hook.h: New file.
1047 * gnulib/import/fd-safer.c: New file.
1048 * gnulib/import/fdopendir.c: New file.
1049 * gnulib/import/filename.h: New file.
1050 * gnulib/import/filenamecat-lgpl.c: New file.
1051 * gnulib/import/filenamecat.h: New file.
1052 * gnulib/import/fstat.c: New file.
1053 * gnulib/import/fstatat.c: New file.
1054 * gnulib/import/getcwd-lgpl.c: New file.
1055 * gnulib/import/getcwd.c: New file.
1056 * gnulib/import/getdtablesize.c: New file.
1057 * gnulib/import/getlogin_r.c: New file.
1058 * gnulib/import/getprogname.c: New file.
1059 * gnulib/import/getprogname.h: New file.
1060 * gnulib/import/gettext.h: New file.
1061 * gnulib/import/glob-libc.h: New file.
1062 * gnulib/import/glob.c: New file.
1063 * gnulib/import/glob.in.h: New file.
1064 * gnulib/import/intprops.h: New file.
1065 * gnulib/import/m4/chdir-long.m4: New file.
1066 * gnulib/import/m4/close.m4: New file.
1067 * gnulib/import/m4/closedir.m4: New file.
1068 * gnulib/import/m4/d-ino.m4: New file.
1069 * gnulib/import/m4/d-type.m4: New file.
1070 * gnulib/import/m4/dup.m4: New file.
1071 * gnulib/import/m4/dup2.m4: New file.
1072 * gnulib/import/m4/error.m4: New file.
1073 * gnulib/import/m4/fchdir.m4: New file.
1074 * gnulib/import/m4/fcntl.m4: New file.
1075 * gnulib/import/m4/fcntl_h.m4: New file.
1076 * gnulib/import/m4/fdopendir.m4: New file.
1077 * gnulib/import/m4/filenamecat.m4: New file.
1078 * gnulib/import/m4/fstat.m4: New file.
1079 * gnulib/import/m4/fstatat.m4: New file.
1080 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1081 * gnulib/import/m4/getcwd-path-max.m4: New file.
1082 * gnulib/import/m4/getcwd.m4: New file.
1083 * gnulib/import/m4/getdtablesize.m4: New file.
1084 * gnulib/import/m4/getlogin_r.m4: New file.
1085 * gnulib/import/m4/getprogname.m4: New file.
1086 * gnulib/import/m4/glob.m4: New file.
1087 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1088 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1089 * gnulib/import/m4/mempcpy.m4: New file.
1090 * gnulib/import/m4/memrchr.m4: New file.
1091 * gnulib/import/m4/mode_t.m4: New file.
1092 * gnulib/import/m4/msvc-inval.m4: New file.
1093 * gnulib/import/m4/msvc-nothrow.m4: New file.
1094 * gnulib/import/m4/open.m4: New file.
1095 * gnulib/import/m4/openat.m4: New file.
1096 * gnulib/import/m4/opendir.m4: New file.
1097 * gnulib/import/m4/readdir.m4: New file.
1098 * gnulib/import/m4/realloc.m4: New file.
1099 * gnulib/import/m4/rewinddir.m4: New file.
1100 * gnulib/import/m4/save-cwd.m4: New file.
1101 * gnulib/import/m4/strdup.m4: New file.
1102 * gnulib/import/m4/strerror.m4: New file.
1103 * gnulib/import/m4/unistd-safer.m4: New file.
1104 * gnulib/import/mempcpy.c: New file.
1105 * gnulib/import/memrchr.c: New file.
1106 * gnulib/import/msvc-inval.c: New file.
1107 * gnulib/import/msvc-inval.h: New file.
1108 * gnulib/import/msvc-nothrow.c: New file.
1109 * gnulib/import/msvc-nothrow.h: New file.
1110 * gnulib/import/open.c: New file.
1111 * gnulib/import/openat-die.c: New file.
1112 * gnulib/import/openat-priv.h: New file.
1113 * gnulib/import/openat-proc.c: New file.
1114 * gnulib/import/openat.c: New file.
1115 * gnulib/import/openat.h: New file.
1116 * gnulib/import/opendir.c: New file.
1117 * gnulib/import/pipe-safer.c: New file.
1118 * gnulib/import/readdir.c: New file.
1119 * gnulib/import/realloc.c: New file.
1120 * gnulib/import/rewinddir.c: New file.
1121 * gnulib/import/save-cwd.c: New file.
1122 * gnulib/import/save-cwd.h: New file.
1123 * gnulib/import/strdup.c: New file.
1124 * gnulib/import/strerror-override.c: New file.
1125 * gnulib/import/strerror-override.h: New file.
1126 * gnulib/import/strerror.c: New file.
1127 * gnulib/import/unistd--.h: New file.
1128 * gnulib/import/unistd-safer.h: New file.
1129 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1130 "getcwd" and "glob".
1131 * ser-tcp.c: Undefine "close" before redefining it.
1132
432ae719
SM
11332017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1134
1135 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1136 get rid of res_val.
1137
4fa7574e
RO
11382017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1139
1140 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1141 <sol2,sparc>: Likewise.
1142 <sol2-64,i386>: Likewise.
1143
1144 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1145 -Wdeprecated-declarations on *-*-solaris*.
1146 * configure: Regenerate.
1147
1148 * procfs.c: Include "nat/inferior.h".
1149 (procfs_info_proc): Fix typo.
1150
f6327dcb
KB
11512017-09-21 Kevin Buettner <kevinb@redhat.com>
1152
1153 * remote.c (vector): Include.
1154 (struct private_thread_info): Add field, thread_handle.
1155 (free_private_thread_info): Deallocate storage associated with
1156 thread handle.
1157 (get_private_info_thread): Initialize `thread_handle' field.
1158 (struct thread_item): Add field, thread_handle.
1159 (clear_threads_listing_context): Deallocate storage associated
1160 with thread handle.
1161 (start_thread): Add support for "handle" attribute.
1162 (thread_attributes): Add "handle".
1163 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1164 field.
1165 (remote_update_thread_list): Update thread_handle.
1166 (remote_thread_handle_to_thread_info): New function.
1167 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1168
fbbe5337
KB
11692017-09-21 Kevin Buettner <kevinb@redhat.com>
1170
1171 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1172 function.
1173 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1174 * python/python-internal.h (thread_object_type): Declare.
1175
e04ee09e
KB
11762017-09-21 Kevin Buettner <kevinb@redhat.com>
1177
1178 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1179 (target_thread_handle_to_thread_info): Declare.
1180 * target.c (target_thread_handle_to_thread_info): New function.
1181 * target-delegates.c: Regenerate.
1182 * gdbthread.h (find_thread_by_handle): Declare.
1183 * thread.c (find_thread_by_handle): New function.
1184 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1185 function.
1186 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1187
1e5b66ed
SM
11882017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1191
ebe48ba0
SM
11922017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1195
0a0bf5dc
YQ
11962017-09-21 Yao Qi <yao.qi@linaro.org>
1197
1198 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1199 to gdb_target_obs.
1200
d1b0a7bf
TT
12012017-09-20 Tom Tromey <tom@tromey.com>
1202
1203 * breakpoint.c (struct counted_command_line): Remove.
1204 (breakpoint_commands): Update.
1205 (alloc_counted_command_line, incref_counted_command_line)
1206 (decref_counted_command_line, do_cleanup_counted_command_line)
1207 (make_cleanup_decref_counted_command_line): Remove.
1208 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1209 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1210 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1211 (save_breakpoints): Update.
1212 * breakpoint.h (counted_command_line): Now a typedef to
1213 shared_ptr.
1214 (struct breakpoint) <commands>: Now a counted_command_line.
1215 (struct bpstats) <command>: Likewise.
1216
48649e1b
TT
12172017-09-20 Tom Tromey <tom@tromey.com>
1218
1219 * breakpoint.c (struct commands_info, do_map_commands_command):
1220 Remove.
1221 (commands_command_1): Update.
1222 (iterate_over_related_breakpoints): Take a function_view.
1223 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1224 (delete_command): Update.
1225 (map_breakpoint_numbers): Take a function_view.
1226 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1227 (disable_command): Update.
1228 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1229 (enable_command): Update.
1230 (struct disp_data, do_enable_breakpoint_disp)
1231 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1232 (do_map_enable_delete_breakpoint): Remove.
1233 (enable_once_command, enable_count_command, enable_delete_command)
1234 (delete_trace_variable_command): Update.
1235
04afa70c
TT
12362017-09-20 Tom Tromey <tom@tromey.com>
1237
1238 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1239 (bpstat_clear): Use delete.
1240 (bpstats): New constructors.
1241 (bpstat_copy, bpstat_stop_status): Use new.
1242 (dprintf_after_condition_true): Update.
1243 * breakpoint.h (bpstats::bpstats): Add constructors.
1244 (bpstats::~bpstats): Add destructor.
1245
c83833f4
PA
12462017-09-20 Pedro Alves <palves@redhat.com>
1247
1248 * eval.c (make_params): Delete, refactored as ...
1249 (class fake_method): ... this new type's ctor.
1250 (fake_method::~fake_method): New.
1251 (evaluate_subexp_standard): Use 'fake_method'.
1252
223ffa71
TT
12532017-09-20 Tom Tromey <tom@tromey.com>
1254
1255 * windows-nat.c (get_windows_debug_event, windows_wait)
1256 (do_initial_windows_stuff, windows_attach): Update.
1257 * utils.c (vwarning, internal_vproblem): Update.
1258 (ui_unregister_input_event_handler_cleanup)
1259 (prepare_to_handle_input): Remove.
1260 (class scoped_input_handler): New.
1261 (defaulted_query, prompt_for_continue): Update.
1262 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1263 Update.
1264 * top.c (undo_terminal_modifications_before_exit): Update.
1265 * target/target.h (target_terminal_init, target_terminal_inferior)
1266 (target_terminal_ours): Don't declare.
1267 (class target_terminal): New.
1268 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1269 (target_terminal_ours_for_output)
1270 (make_cleanup_restore_target_terminal): Don't declare.
1271 (target_terminal_info): Remove.
1272 * target.c (enum terminal_state, terminal_state): Remove.
1273 (target_terminal::terminal_state): Define.
1274 (target_terminal::init): Rename from target_terminal_init.
1275 (target_terminal::inferior): Rename from
1276 target_terminal_inferior.
1277 (target_terminal::ours): Rename from target_terminal_ours.
1278 (target_terminal::ours_for_output): Rename from
1279 target_terminal_ours_for_output.
1280 (target_terminal::info): New method.
1281 (cleanup_restore_target_terminal)
1282 (make_cleanup_restore_target_terminal): Remove.
1283 * solib.c (handle_solib_event): Update.
1284 * remote.c (remote_serial_quit_handler): Update.
1285 (remote_terminal_inferior, remote_wait_as): Update.
1286 * record-full.c (record_full_wait_1): Update.
1287 * nto-procfs.c (procfs_create_inferior): Update.
1288 * nat/fork-inferior.c (startup_inferior): Update.
1289 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1290 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1291 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1292 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1293 (mi_breakpoint_created, mi_breakpoint_deleted)
1294 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1295 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1296 (mi_user_selected_context_changed, report_initial_inferior):
1297 Update.
1298 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1299 (linux_nat_terminal_inferior): Update.
1300 * infrun.c (follow_fork_inferior)
1301 (handle_vfork_child_exec_or_exit, do_target_resume)
1302 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1303 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1304 Update.
1305 * inflow.c (child_terminal_init, info_terminal_command): Update.
1306 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1307 (attach_command): Update.
1308 * infcall.c (call_thread_fsm_should_stop): Update.
1309 * gnu-nat.c (gnu_attach): Update.
1310 * extension.c (struct active_ext_lang_state)
1311 (restore_active_ext_lang): Update.
1312 * exceptions.c (print_flush): Update.
1313 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1314 (struct quit_handler_cleanup_data, restore_quit_handler)
1315 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1316 Remove.
1317 * cp-support.c (gdb_demangle): Update.
1318 * breakpoint.c (update_inserted_breakpoint_locations)
1319 (insert_breakpoint_locations, handle_jit_event)
1320 (disable_breakpoints_in_unloaded_shlib): Update.
1321 * annotate.c (annotate_breakpoints_invalid)
1322 (annotate_frames_invalid): Update.
1323
013af3fc
TT
13242017-09-20 Tom Tromey <tom@tromey.com>
1325
1326 * main.c (catch_command_errors): Rename from
1327 catch_command_errors_const.
1328 (captured_main_1): Update.
1329
06871ae8
PA
13302017-09-20 Pedro Alves <palves@redhat.com>
1331
1332 * cli/cli-cmds.c (list_command): Use print_sal_location.
1333 (print_sal_location): New function.
1334 (ambiguous_line_spec): Use print_sal_location.
1335 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1336 * symtab.c (find_function_start_sal): Likewise.
1337 * symtab.h (symtab_and_line::symbol): New field.
1338
e5f25bc5
PA
13392017-09-20 Pedro Alves <palves@redhat.com>
1340
1341 * linespec.c (minsym_found): Handle non-text minsyms.
1342 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1343
1b7fa39e
WT
13442017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1345
1346 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1347 backslash.
1348
37dd0825
WT
13492017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1350
1351 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1352 vmovups instead vmovaps.
1353 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1354
4e5a4f58
JB
13552017-09-19 John Baldwin <jhb@FreeBSD.org>
1356
1357 * NEWS (Changes since GDB 8.0): Add starti.
1358 * infcmd.c (enum run_break): New.
1359 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1360 case.
1361 (run_command): Use enum run_how.
1362 (start_command): Likewise.
1363 (starti_command): New function.
1364 (RUN_ARGS_HELP): New macro.
1365 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1366 commands. Add starti command.
1367
aa70c9f1
YQ
13682017-09-19 Yao Qi <yao.qi@linaro.org>
1369
1370 * Makefile.in (monitor.o): Remove the rule.
1371
d6541620
YQ
13722017-09-19 Yao Qi <yao.qi@linaro.org>
1373
1374 * annotate.h (struct annotate_arg_emitter): Use
1375 DISABLE_COPY_AND_ASSIGN.
1376 * common/refcounted-object.h (refcounted_object): Likewise.
1377 * completer.h (struct completion_result): Likewise.
1378 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1379 * filename-seen-cache.h (filename_seen_cache): Likewise.
1380 * gdbcore.h (thread_section_name): Likewise.
1381 * gdb_regex.h (compiled_regex): Likewise.
1382 * gdbthread.h (scoped_restore_current_thread): Likewise.
1383 * inferior.h (scoped_restore_current_inferior): Likewise.
1384 * jit.c (jit_reader): Likewise.
1385 * linespec.h (struct linespec_result): Likewise.
1386 * mi/mi-parse.h (struct mi_parse): Likewise.
1387 * nat/fork-inferior.c (execv_argv): Likewise.
1388 * progspace.h (scoped_restore_current_program_space): Likewise.
1389 * python/python-internal.h (class gdbpy_enter): Likewise.
1390 * regcache.h (regcache): Likewise.
1391 * target-descriptions.c (struct tdesc_reg): Likewise.
1392 (struct tdesc_type): Likewise.
1393 (struct tdesc_feature): Likewise.
1394 * ui-out.h (ui_out_emit_type): Likewise.
1395
0615127c
SM
13962017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1397
1398 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1399 label abort_expression.
1400
5e187554
SM
14012017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1402
1403 * common/buffer.c (buffer_xml_printf): Adjust.
1404 * common/xml-utils.c (xml_escape_text): Change return type to
1405 std::string, update code accordingly.
1406 * common/xml-utils.h (xml_escape_text): Change return type to
1407 std::string.
1408 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1409 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1410 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1411 Adjust.
1412
c3d7b541
SM
14132017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1414
1415 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1416 (SUBDIR_UNITTESTS_OBS): Add new object file.
1417 * unittests/xml-utils-selftests.c: New file.
1418
1526853e
SM
14192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1420
1421 * common/selftest.h (selftest): New struct/interface.
1422 (register_test): Add name parameter, add new overload.
1423 (run_tests): Add filter parameter.
1424 (for_each_selftest_ftype): New typedef.
1425 (for_each_selftest): New declaration.
1426 * common/selftest.c (tests): Change type to
1427 map<string, unique_ptr<selftest>>.
1428 (simple_selftest): New struct.
1429 (register_test): New function.
1430 (register_test): Add name parameter and use it.
1431 (run_tests): Add filter parameter and use it. Add prints.
1432 Adjust to vector -> map change.
1433 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1434 registering selftests.
1435 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1436 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1437 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1438 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1439 * findvar.c (_initialize_findvar): Likewise.
1440 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1441 * maint.c (maintenance_selftest): Update call to run_tests.
1442 (maintenance_info_selftests): New function.
1443 (_initialize_maint_cmds): Register "maintenance info selftests"
1444 command. Update "maintenance selftest" doc.
1445 * regcache.c (_initialize_regcache): Add names when registering
1446 selftests.
1447 * rust-exp.y (_initialize_rust_exp): Likewise.
1448 * selftest-arch.c (gdbarch_selftest): New struct.
1449 (gdbarch_tests): Remove.
1450 (register_test_foreach_arch): Add name parameter. Call
1451 register_test.
1452 (tests_with_arch): Remove, move most content to
1453 gdbarch_selftest::operator().
1454 (_initialize_selftests_foreach_arch): Remove.
1455 * selftest-arch.h (register_test_foreach_arch): Add name
1456 parameter.
1457 (run_tests_with_arch): New declaration.
1458 * utils-selftests.c (_initialize_utils_selftests): Add names
1459 when registering selftests.
1460 * utils.c (_initialize_utils): Likewise.
1461 * unittests/array-view-selftests.c
1462 (_initialize_array_view_selftests): Likewise.
1463 * unittests/environ-selftests.c (_initialize_environ_selftests):
1464 Likewise.
1465 * unittests/function-view-selftests.c
1466 (_initialize_function_view_selftests): Likewise.
1467 * unittests/offset-type-selftests.c
1468 (_initialize_offset_type_selftests): Likewise.
1469 * unittests/optional-selftests.c
1470 (_initialize_optional_selftests): Likewise.
1471 * unittests/scoped_restore-selftests.c
1472 (_initialize_scoped_restore_selftests): Likewise.
1473 * NEWS: Document "maintenance selftest" and "maint info
1474 selftests".
1475
5846367a
SM
14762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1477
1478 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1479 scoped_restore.
1480
bd77e8ff
SM
14812017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1482
1483 * mi/mi-main.c (mi_load_progress): Make uiout variable
1484 a unique_ptr.
1485
26a67918
PA
14862017-09-15 Pedro Alves <palves@redhat.com>
1487
1488 * compile/compile-c-types.c (convert_enum, convert_int)
1489 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1490
3f8a7804
SM
14912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1492
1493 * dwarf2read.c (copy_string): Remove.
1494 (parse_macro_definition): Replace copy_string with savestring.
1495
8d200706
YQ
14962017-09-15 Yao Qi <yao.qi@linaro.org>
1497
1498 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1499 gdb_target_obs.
1500 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1501 Likewise.
1502 (i[34567]86-*-linux*): Likewise.
1503
d185219d
SM
15042017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1505
1506 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1507 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1508 <stack>: Change type to std::vector.
1509 <stack_len, stack_allocated>: Remove.
1510 <grow_stack>: Remove.
1511 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1512 (dwarf_expr_context::~dwarf_expr_context): Remove.
1513 (dwarf_expr_context::grow_stack): Remove.
1514 (dwarf_expr_context::push): Adjust.
1515 (dwarf_expr_context::pop): Adjust.
1516 (dwarf_expr_context::fetch): Adjust.
1517 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1518 (dwarf_expr_context::stack_empty_p): Adjust.
1519 (dwarf_expr_context::execute_stack_op): Adjust.
1520
eccd80d6
SM
15212017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1522
1523 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1524 return type to bool.
1525 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1526
69009882
SM
15272017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1528
1529 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1530 Change type to bool.
1531 (dwarf_stack_value) <in_stack_memory>: Likewise.
1532 (dwarf_expr_context) <push_address>: Change parameter type to
1533 bool.
1534 <fetch_in_stack_memory>: Change return type to bool.
1535 <push>: Change parameter type to bool.
1536 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1537 to bool.
1538 (dwarf_expr_context::push_address): Likewise.
1539 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1540 to bool.
1541 (dwarf_expr_context::execute_stack_op): Adjust.
1542 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1543
1e467161
SM
15442017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1547 (struct dwarf_expr_context) <n_pieces>: Remove.
1548 <pieces>: Change type to std::vector.
1549 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1550 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1551 pieces.
1552 (dwarf_expr_context::add_piece): Adjust.
1553 * dwarf2loc.c (struct piece_closure): Initialize fields.
1554 <n_pieces>: Remove.
1555 <pieces>: Change type to std::vector.
1556 (allocate_piece_closure): Adjust, change parameter to
1557 std::vector rvalue and std::move it to piece_closure.
1558 (rw_pieced_value): Adjust.
1559 (check_pieced_synthetic_pointer): Adjust.
1560 (indirect_synthetic_pointer): Adjust.
1561 (coerce_pieced_ref): Adjust.
1562 (free_pieced_value_closure): Adjust. Use delete to free
1563 piece_closure.
1564 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1565 to allocate_piece_closure.
1566 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1567
0782db84
SM
15682017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1569
1570 * probe.h (probe_ops_cp): Remove typedef.
1571 (DEF_VEC_P (probe_ops_cp)): Remove.
1572 (all_probe_ops): Change type to std::vector.
1573 * probe.c (info_probes_for_ops): Adjust to vector change.
1574 (probe_linespec_to_ops): Likewise.
1575 (all_probe_ops): Change type to std::vector.
1576 (_initialize_probe): Adjust to vector change.
1577 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1578 * elfread.c (elf_get_probes): Likewise.
1579 * stap-probe.c (_initialize_stap_probe): Likewise.
1580
1eac6bea
SM
15812017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * probe.h (struct bound_probe): Define constructors.
1584 * probe.c (bound_probe_s): Remove typedef.
1585 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1586 (collect_probes): Change return type to std::vector, remove
1587 cleanup.
1588 (compare_probes): Return bool, change parameter type. Change
1589 semantic to "less than".
1590 (gen_ui_out_table_header_info): Change parameter to std::vector
1591 and update.
1592 (exists_probe_with_pops): Likewise.
1593 (info_probes_for_ops): Update to std::vector change.
1594 (enable_probes_command): Likewise.
1595 (disable_probes_command): Likewise.
1596
aaa63a31
SM
15972017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1600 vec to std::vector.
1601 * probe.c (parse_probes_in_pspace): Update.
1602 (find_probes_in_objfile): Update.
1603 (find_probe_by_pc): Update.
1604 (collect_probes): Update.
1605 (probe_any_get_probes): Update.
1606 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1607 return type to reference to std::vector.
1608 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1609 std::vector and update.
1610 (dtrace_process_dof): Likewise.
1611 (dtrace_get_probes): Likewise.
1612 * elfread.c (elf_get_probes): Change return type to std::vector,
1613 store an std::vector in bfd_data.
1614 (probe_key_free): Update to std::vector.
1615 * stap-probe.c (handle_stap_probe): Change parameter to
1616 std::vector and update.
1617 (stap_get_probes): Likewise.
1618 * symfile-debug.c (debug_sym_get_probes): Change return type to
1619 std::vector and update.
1620
cb85b21b
TT
16212017-09-11 Tom Tromey <tom@tromey.com>
1622
1623 * breakpoint.c (program_breakpoint_here_p): Update.
1624 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1625 from make_show_memory_breakpoints_cleanup. Return a
1626 scoped_restore_tmpl<int>.
1627 (restore_show_memory_breakpoints): Remove.
1628 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1629 * mem-break.c (memory_validate_breakpoint): Update.
1630 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1631 (ia64_memory_remove_breakpoint): Update.
1632 (ia64_breakpoint_from_pc): Update.
1633 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1634 from make_show_memory_breakpoints_cleanup.
1635
8fbc99ef
TT
16362017-09-11 Tom Tromey <tom@tromey.com>
1637
1638 * d-namespace.c (d_lookup_symbol): Use std::string.
1639 (find_symbol_in_baseclass): Likewise.
1640
50feb4bd
TT
16412017-09-11 Tom Tromey <tom@tromey.com>
1642
1643 * ctf.c (ctf_start): Use std::string.
1644
c6dc63a1
TT
16452017-09-11 Tom Tromey <tom@tromey.com>
1646
1647 * ada-lang.c (is_known_support_routine): Update.
1648 (ada_unhandled_exception_name_addr_from_raise): Update.
1649 * guile/scm-frame.c (gdbscm_frame_name): Update.
1650 * python/py-frame.c (frapy_name): Update.
1651 (frapy_function): Update.
1652 * stack.h (find_frame_funname): Update.
1653 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1654 (print_frame): Update.
1655
d6b9b80f
TT
16562017-09-11 Tom Tromey <tom@tromey.com>
1657
1658 * findcmd.c (put_bits): Take a gdb::byte_vector.
1659 (parse_find_args): Return gdb::byte_vector. "args" now const.
1660 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1661 cleanups.
1662 (find_command): Update.
1663
a9921622
TT
16642017-09-11 Tom Tromey <tom@tromey.com>
1665
1666 * cli/cli-script.c (class scoped_restore_hook_in): New.
1667 (clear_hook_in_cleanup): Remove.
1668 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1669 scoped_restore_hook_in.
1670
be0d7abb
TT
16712017-09-11 Tom Tromey <tom@tromey.com>
1672
1673 * cli/cli-script.c (restore_interp): Remove.
1674 (read_command_lines): Use scoped_restore_interp.
1675 * interps.c (scoped_restore_interp::set_temp): Rename from
1676 interp_set_temp.
1677 * interps.h (class scoped_restore_interp): New.
1678 (interp_set_temp): Remove.
1679
00f675ff
TT
16802017-09-11 Tom Tromey <tom@tromey.com>
1681
1682 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1683 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1684 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1685 scoped_restore.
1686 (mi_cmd_break_insert_1): Update.
1687 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1688 scoped_restore.
1689
cb791d59
TT
16902017-09-11 Tom Tromey <tom@tromey.com>
1691
1692 * demangle.c (demangle_command): Update.
1693 * breakpoint.c (disable_command): Update.
1694 (enable_command): Update.
1695 (find_location_by_number): Make "number" const. Use
1696 get_number_trailer.
1697 * cli/cli-utils.c (extract_arg): Return std::string.
1698 * probe.c (parse_probe_linespec): Update. Change types.
1699 (collect_probes): Take string arguments.
1700 (parse_probe_linespec): Likewise.
1701 (info_probes_for_ops): Update.
1702 (enable_probes_command): Update.
1703 (disable_probes_command): Update.
1704 * break-catch-sig.c (catch_signal_split_args): Update.
1705 * mi/mi-parse.c (mi_parse): Update.
1706
2039bd9f
TT
17072017-09-11 Tom Tromey <tom@tromey.com>
1708
1709 * language.h (language_enum): Make argument const.
1710 * language.c (language_enum): Make argument const.
1711
f1735a53
TT
17122017-09-11 Tom Tromey <tom@tromey.com>
1713
1714 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1715 as function.
1716 (skip_to_space): Rename from skip_to_space_const.
1717 * common/common-utils.c (skip_to_space): New function.
1718 (skip_to_space): Rename from skip_to_space_const.
1719 * cli/cli-utils.h (get_number): Rename from get_number_const.
1720 (extract_arg): Rename from extract_arg_const.
1721 * cli/cli-utils.c (get_number): Rename from get_number_const.
1722 (extract_arg): Rename from extract_arg_const.
1723 (number_or_range_parser::get_number): Use ::get_number.
1724 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1725 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1726 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1727 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1728 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1729 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1730 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1731 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1732
7d221d74
TT
17332017-09-11 Tom Tromey <tom@tromey.com>
1734
1735 * python/python.c (do_start_initialization): Use
1736 py-event-types.def to initialize types.
1737 Define all object type structures.
1738 * python/python-internal.h: Don't declare event initialization
1739 functions.
1740 * python/py-threadevent.c (thread_event_object_type): Don't
1741 define.
1742 * python/py-stopevent.c (stop_event_object_type): Don't define.
1743 * python/py-signalevent.c (signal_event_object_type): Don't
1744 declare or define.
1745 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1746 (clear_objfiles_event_object_type): Don't declare or define.
1747 * python/py-infevents.c (inferior_call_pre_event_object_type)
1748 (inferior_call_post_event_object_type)
1749 (register_changed_event_object_type)
1750 (memory_changed_event_object_type): Don't declare or define.
1751 * python/py-inferior.c (new_thread_event_object_type)
1752 (new_inferior_event_object_type)
1753 (inferior_deleted_event_object_type): Don't declare or define.
1754 * python/py-exitedevent.c (exited_event_object_type): Don't
1755 declare or define.
1756 * python/py-evts.c (gdbpy_initialize_py_events): Use
1757 py-all-events.def.
1758 * python/py-events.h (thread_event_object_type): Don't declare.
1759 (events_object): Use py-all-events.def.
1760 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1761 py-event-types.def.
1762 * python/py-event-types.def: New file.
1763 * python/py-continueevent.c (create_continue_event_object): Don't
1764 declare or define.
1765 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1766 declare or define.
1767 * python/py-all-events.def: New file.
1768
35c61a1d
TT
17692017-09-11 Tom Tromey <tom@tromey.com>
1770
1771 * python/py-threadevent.c (create_thread_event_object): Return
1772 gdbpy_ref.
1773 * python/py-stopevent.h (create_stop_event_object)
1774 (create_breakpoint_event_object, create_signal_event_object):
1775 Update.
1776 * python/py-stopevent.c (create_stop_event_object): Return
1777 gdbpy_ref.
1778 (emit_stop_event): Update.
1779 * python/py-signalevent.c (create_signal_event_object): Return
1780 gdbpy_ref.
1781 * python/py-infevents.c (create_inferior_call_event_object):
1782 Update.
1783 * python/py-event.h (create_event_object)
1784 (create_thread_event_object): Update.
1785 * python/py-event.c (create_event_object): Return gdbpy_ref.
1786 * python/py-continueevent.c: Return gdbpy_ref.
1787 * python/py-bpevent.c (create_breakpoint_event_object): Return
1788 gdbpy_ref.
1789
7c96f8c1
TT
17902017-09-11 Tom Tromey <tom@tromey.com>
1791
1792 PR python/15622:
1793 * NEWS: Add entry.
1794 * python/python.c (do_start_initialization): Initialize new event
1795 types.
1796 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1797 (gdbpy_initialize_inferior_deleted_event)
1798 (gdbpy_initialize_new_thread_event): Declare.
1799 * python/py-threadevent.c (create_thread_event_object): Add option
1800 "thread" parameter.
1801 * python/py-inferior.c (new_thread_event_object_type)
1802 (new_inferior_event_object_type)
1803 (inferior_deleted_event_object_type): Declare.
1804 (python_new_inferior, python_inferior_deleted): New functions.
1805 (add_thread_object): Emit new_thread event.
1806 (gdbpy_initialize_inferior): Attach new functions to corresponding
1807 observers.
1808 (new_thread, new_inferior, inferior_deleted): Define new event
1809 types.
1810 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1811 registries.
1812 * python/py-events.h (events_object) <new_inferior,
1813 inferior_deleted, new_thread>: New fields.
1814 * python/py-event.h (create_thread_event_breakpoint): Add optional
1815 "thread" parameter.
1816
72542b8e
AB
18172017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1818
1819 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1820 check current_ui instead.
1821 (internal_vproblem): Likewise.
1822
0d64823e
SM
18232017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * thread.c (print_thread_info_1): Remove unnecessary calls to
1826 uiout->is_mi_like_p.
1827
eb1e02fd
TT
18282017-09-09 Tom Tromey <tom@tromey.com>
1829
1830 * namespace.h (add_using_directive): Update.
1831 * namespace.c (add_using_directive): Change type of excludes to
1832 std::vector.
1833 * dwarf2read.c (read_import_statement): Use std::vector.
1834 (read_namespace): Update.
1835 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1836
0fc21fd8
TT
18372017-09-09 Tom Tromey <tom@tromey.com>
1838
1839 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1840
49663d05
TT
18412017-09-09 Tom Tromey <tom@tromey.com>
1842
1843 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1844
0b868b60
TT
18452017-09-09 Tom Tromey <tom@tromey.com>
1846
1847 * stack.c (func_command): Use gdb::def_vector.
1848
c0470d48
TT
18492017-09-09 Tom Tromey <tom@tromey.com>
1850
1851 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1852 ui_out_emit_list, ui_out_emit_tuple.
1853 (mi_cmd_var_update): Likewise.
1854
ca5909c7
TT
18552017-09-09 Tom Tromey <tom@tromey.com>
1856
1857 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1858 ui_out_redirect_pop.
1859 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1860 ui_out_redirect_pop.
1861 * utils.c (do_ui_out_redirect_pop)
1862 (make_cleanup_ui_out_redirect_pop): Remove.
1863 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1864 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1865 * ui-out.h (ui_out_redirect_pop): New class.
1866
e6a2252a
TT
18672017-09-09 Tom Tromey <tom@tromey.com>
1868
1869 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1870 (list_available_thread_groups, mi_cmd_list_thread_groups)
1871 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1872 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1873 Likewise.
1874
393702cd
TT
18752017-09-09 Tom Tromey <tom@tromey.com>
1876
1877 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1878 ui_out_emit_tuple.
1879
76f9c9cf
TT
18802017-09-09 Tom Tromey <tom@tromey.com>
1881
1882 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1883 * stack.c (print_frame): Use ui_out_emit_tuple.
1884 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1885 (info_spu_mailbox_command, info_spu_dma_command)
1886 (info_spu_proxydma_command): Likewise.
1887 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1888 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1889 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1890 ui_out_emit_tuple.
1891 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1892
dc9fe180
TT
18932017-09-09 Tom Tromey <tom@tromey.com>
1894
1895 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1896 (class ui_out_emit_table): Update comment.
1897 * ui-out.c (do_cleanup_table_end)
1898 (make_cleanup_ui_out_table_begin_end): Remove.
1899 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1900 (info_spu_dma_cmdlist): Likewise.
1901 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1902 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1903 ui_out_emit_table.
1904
f8cc3da6
TT
19052017-09-09 Tom Tromey <tom@tromey.com>
1906
1907 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1908 ui_out_emit_list, gdb::optional.
1909
481695ed
JB
19102017-09-09 John Baldwin <jhb@FreeBSD.org>
1911
1912 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1913 prototype.
1914 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1915 prototype.
1916 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1917 prototype.
1918 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1919 * ada-exp.y: Remove _initialize_ada_exp prototype.
1920 * ada-lang.c: Remove _initialize_ada_language prototype.
1921 * ada-tasks.c: Remove _initialize_tasks prototype.
1922 * addrmap.c: Remove _initialize_addrmap prototype.
1923 * agent.c: Remove _initialize_agent prototype.
1924 * aix-thread.c: Remove _initialize_aix_thread prototype.
1925 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1926 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1927 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1928 prototype.
1929 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1930 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1931 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1932 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1933 prototype.
1934 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1935 prototype.
1936 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1937 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1938 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1939 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1940 prototype.
1941 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1942 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1943 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1944 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1945 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1946 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1947 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1948 prototype.
1949 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1950 prototype.
1951 * annotate.c: Remove _initialize_annotate prototype.
1952 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1953 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1954 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1955 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1956 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1957 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1958 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1959 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1960 prototype.
1961 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1962 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1963 * auto-load.c: Remove _initialize_auto_load prototype.
1964 * auxv.c: Remove _initialize_auxv prototype.
1965 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1966 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1967 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1968 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1969 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1970 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1971 prototype.
1972 * break-catch-throw.c: Remove _initialize_break_catch_throw
1973 prototype.
1974 * breakpoint.c: Remove _initialize_breakpoint prototype.
1975 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1976 * btrace.c: Remove _initialize_btrace prototype.
1977 * charset.c: Remove _initialize_charset prototype.
1978 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1979 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1980 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1981 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1982 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1983 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1984 * coffread.c: Remove _initialize_coffread prototype.
1985 * compile/compile.c: Remove _initialize_compile prototype.
1986 * complaints.c: Remove _initialize_complaints prototype.
1987 * completer.c: Remove _initialize_completer prototype.
1988 * copying.awk: Remove _initialize_copying prototype.
1989 * copying.c: Regenerate.
1990 * core-regset.c: Remove _initialize_core_regset prototype.
1991 * corefile.c: Remove _initialize_core prototype.
1992 * corelow.c: Remove _initialize_corelow prototype.
1993 * cp-abi.c: Remove _initialize_cp_abi prototype.
1994 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1995 * cp-support.c: Remove _initialize_cp_support prototype.
1996 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1997 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1998 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1999 * ctf.c: Remove _initialize_ctf prototype.
2000 * d-lang.c: Remove _initialize_d_language prototype.
2001 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2002 prototype.
2003 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2004 * dbxread.c: Remove _initialize_dbxread prototype.
2005 * dcache.c: Remove _initialize_dcache prototype.
2006 * demangle.c: Remove _initialize_demangler prototype.
2007 * disasm-selftests.c: Remove _initialize_disasm_selftests
2008 prototype.
2009 * disasm.c: Remove _initialize_disasm prototype.
2010 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2011 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2012 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2013 prototype.
2014 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2015 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2016 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2017 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2018 * elfread.c: Remove _initialize_elfread prototype.
2019 * exec.c: Remove _initialize_exec prototype.
2020 * extension.c: Remove _initialize_extension prototype.
2021 * f-lang.c: Remove _initialize_f_language prototype.
2022 * f-valprint.c: Remove _initialize_f_valprint prototype.
2023 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2024 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2025 * filesystem.c: Remove _initialize_filesystem prototype.
2026 * findcmd.c: Remove _initialize_mem_search prototype.
2027 * fork-child.c: Remove _initialize_fork_child prototype.
2028 * frame-base.c: Remove _initialize_frame_base prototype.
2029 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2030 * frame.c: Remove _initialize_frame prototype.
2031 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2032 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2033 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2034 * gcore.c: Remove _initialize_gcore prototype.
2035 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2036 * gdbarch.c: Regenerate.
2037 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2038 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2039 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2040 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2041 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2042 * go-lang.c: Remove _initialize_go_language prototype.
2043 * go32-nat.c: Remove _initialize_go32_nat prototype.
2044 * guile/guile.c: Remove _initialize_guile prototype.
2045 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2046 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2047 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2048 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2049 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2050 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2051 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2052 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2053 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2054 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2055 prototype.
2056 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2057 prototype.
2058 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2059 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2060 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2061 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2062 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2063 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2064 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2065 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2066 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2067 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2068 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2069 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2070 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2071 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2072 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2073 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2074 prototype.
2075 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2076 prototype.
2077 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2078 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2079 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2080 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2081 * infcall.c: Remove _initialize_infcall prototype.
2082 * infcmd.c: Remove _initialize_infcmd prototype.
2083 * inferior.c: Remove _initialize_inferiors prototype.
2084 * inflow.c: Remove _initialize_inflow prototype.
2085 * infrun.c: Remove _initialize_infrun prototype.
2086 * interps.c: Remove _initialize_interpreter prototype.
2087 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2088 * jit.c: Remove _initialize_jit prototype.
2089 * language.c: Remove _initialize_language prototype.
2090 * linux-fork.c: Remove _initialize_linux_fork prototype.
2091 * linux-nat.c: Remove _initialize_linux_nat prototype.
2092 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2093 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2094 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2095 * m2-lang.c: Remove _initialize_m2_language prototype.
2096 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2097 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2098 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2099 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2100 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2101 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2102 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2103 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2104 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2105 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2106 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2107 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2108 * machoread.c: Remove _initialize_machoread prototype.
2109 * macrocmd.c: Remove _initialize_macrocmd prototype.
2110 * macroscope.c: Remove _initialize_macroscope prototype.
2111 * maint.c: Remove _initialize_maint_cmds prototype.
2112 * mdebugread.c: Remove _initialize_mdebugread prototype.
2113 * memattr.c: Remove _initialize_mem prototype.
2114 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2115 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2116 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2117 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2118 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2119 * microblaze-linux-tdep.c: Remove
2120 _initialize_microblaze_linux_tdep prototype.
2121 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2122 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2123 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2124 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2125 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2126 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2127 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2128 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2129 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2130 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2131 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2132 prototype.
2133 * mipsread.c: Remove _initialize_mipsread prototype.
2134 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2135 prototype.
2136 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2137 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2138 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2139 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2140 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2141 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2142 prototype.
2143 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2144 * nto-procfs.c: Remove _initialize_procfs prototype.
2145 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2146 * objc-lang.c: Remove _initialize_objc_language prototype.
2147 * objfiles.c: Remove _initialize_objfiles prototype.
2148 * observer.c: Remove observer_test_first_notification_function,
2149 observer_test_second_notification_function,
2150 observer_test_third_notification_function, and
2151 _initialize_observer prototypes.
2152 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2153 * osabi.c: Remove _initialize_gdb_osabi prototype.
2154 * osdata.c: Remove _initialize_osdata prototype.
2155 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2156 * parse.c: Remove _initialize_parse prototype.
2157 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2158 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2159 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2160 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2161 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2162 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2163 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2164 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2165 * printcmd.c: Remove _initialize_printcmd prototype.
2166 * probe.c: Remove _initialize_probe prototype.
2167 * proc-api.c: Remove _initialize_proc_api prototype.
2168 * proc-events.c: Remove _initialize_proc_events prototype.
2169 * proc-service.c: Remove _initialize_proc_service prototype.
2170 * procfs.c: Remove _initialize_procfs prototype.
2171 * psymtab.c: Remove _initialize_psymtab prototype.
2172 * python/python.c: Remove _initialize_python prototype.
2173 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2174 * record-btrace.c: Remove _initialize_record_btrace prototype.
2175 * record-full.c: Remove _initialize_record_full prototype.
2176 * record.c: Remove _initialize_record prototype.
2177 * regcache.c: Remove _initialize_regcache prototype.
2178 * reggroups.c: Remove _initialize_reggroup prototype.
2179 * remote-notif.c: Remove _initialize_notif prototype.
2180 * remote-sim.c: Remove _initialize_remote_sim prototype.
2181 * remote.c: Remove _initialize_remote prototype.
2182 * reverse.c: Remove _initialize_reverse prototype.
2183 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2184 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2185 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2186 prototype.
2187 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2188 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2189 * rust-exp.y: Remove _initialize_rust_exp prototype.
2190 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2191 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2192 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2193 * score-tdep.c: Remove _initialize_score_tdep prototype.
2194 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2195 prototype.
2196 * ser-go32.c: Remove _initialize_ser_dos prototype.
2197 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2198 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2199 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2200 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2201 * serial.c: Remove _initialize_serial prototype.
2202 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2203 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2204 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2205 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2206 * skip.c: Remove _initialize_step_skip prototype.
2207 * sol-thread.c: Remove _initialize_sol_thread prototype.
2208 * solib-aix.c: Remove _initialize_solib_aix prototype.
2209 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2210 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2211 * solib-frv.c: Remove _initialize_frv_solib prototype.
2212 * solib-spu.c: Remove _initialize_spu_solib prototype.
2213 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2214 * solib-target.c: Remove _initialize_solib_target prototype.
2215 * solib.c: Remove _initialize_solib prototype.
2216 * source.c: Remove _initialize_source prototype.
2217 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2218 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2219 prototype.
2220 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2221 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2222 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2223 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2224 prototype.
2225 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2226 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2227 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2228 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2229 prototype.
2230 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2231 prototype.
2232 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2233 prototype.
2234 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2235 prototype.
2236 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2237 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2238 prototype.
2239 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2240 prototype.
2241 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2242 prototype.
2243 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2244 prototype.
2245 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2246 prototype.
2247 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2248 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2249 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2250 * stabsread.c: Remove _initialize_stabsread prototype.
2251 * stack.c: Remove _initialize_stack prototype.
2252 * stap-probe.c: Remove _initialize_stap_probe prototype.
2253 * std-regs.c: Remove _initialize_frame_reg prototype.
2254 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2255 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2256 * symfile.c: Remove _initialize_symfile prototype.
2257 * symmisc.c: Remove _initialize_symmisc prototype.
2258 * symtab.c: Remove _initialize_symtab prototype.
2259 * target-dcache.c: Remove _initialize_target_dcache prototype.
2260 * target-descriptions.c: Remove _initialize_target_descriptions
2261 prototype.
2262 * thread.c: Remove _initialize_thread prototype.
2263 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2264 prototype.
2265 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2266 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2267 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2268 prototype.
2269 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2270 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2271 * tracefile.c: Remove _initialize_tracefile prototype.
2272 * tracepoint.c: Remove _initialize_tracepoint prototype.
2273 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2274 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2275 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2276 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2277 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2278 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2279 * tui/tui.c: Remove _initialize_tui prototype.
2280 * typeprint.c: Remove _initialize_typeprint prototype.
2281 * user-regs.c: Remove _initialize_user_regs prototype.
2282 * utils.c: Remove _initialize_utils prototype.
2283 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2284 * valarith.c: Remove _initialize_valarith prototype.
2285 * valops.c: Remove _initialize_valops prototype.
2286 * valprint.c: Remove _initialize_valprint prototype.
2287 * value.c: Remove _initialize_values prototype.
2288 * varobj.c: Remove _initialize_varobj prototype.
2289 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2290 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2291 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2292 * windows-nat.c: Remove _initialize_windows_nat,
2293 _initialize_check_for_gdb_ini, and _initialize_loadable
2294 prototypes.
2295 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2296 * xcoffread.c: Remove _initialize_xcoffread prototype.
2297 * xml-support.c: Remove _initialize_xml_support prototype.
2298 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2299 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2300 prototype.
2301 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2302 prototype.
2303 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2304
a611b5cb
KS
23052017-09-08 Keith Seitz <keiths@redhat.com>
2306
2307 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2308 field.
2309
469412dd
CW
23102017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2311
2312 * f-valprint.c (f_val_print): Remove check for one byte
2313 sized integers. Remove printing of character type.
2314
a5ad232b
FP
23152017-09-08 Frank Penczek <frank.penczek@intel.com>
2316 Christoph Weinmann <christoph.t.weinmann@intel.com>
2317 Bernhard Heckel <bernhard.heckel@intel.com>
2318
2319 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2320 to maintain proper indentation when printing pointers/refs.
2321
e5014227
JB
23222017-09-07 Joel Brobecker <brobecker@adacore.com>
2323
2324 GDB 8.0.1 released.
2325
63c99141
JB
23262017-09-07 Joel Brobecker <brobecker@adacore.com>
2327
2328 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2329
69c1e056
TT
23302017-09-05 Tom Tromey <tom@tromey.com>
2331
2332 * parse.c (funcall_chain): Now a std::vector.
2333 (start_arglist, end_arglist): Simplify.
2334 (free_funcalls): Remove.
2335 (parse_exp_in_context_1): Remove cleanup.
2336
fef704bf
TT
23372017-09-05 Tom Tromey <tom@tromey.com>
2338
2339 * go-exp.y (go_parse): Don't create a cleanup.
2340
5613c585
TT
23412017-09-05 Tom Tromey <tom@tromey.com>
2342
2343 * d-exp.y (PrimaryExpression): Use std::string.
2344 (d_parse): Don't create a cleanup.
2345
eae49211
TT
23462017-09-05 Tom Tromey <tom@tromey.com>
2347
2348 * utils.c (do_clear_parser_state): Remove.
2349 (make_cleanup_clear_parser_state): Remove.
2350 * p-exp.y (pascal_parse): Use scoped_restore.
2351 * m2-exp.y (m2_parse): Use scoped_restore.
2352 * f-exp.y (f_parse): Use scoped_restore.
2353 * d-exp.y (d_parse): Use scoped_restore.
2354 * c-exp.y (c_parse): Use scoped_restore.
2355 * ada-exp.y (ada_parse): Use scoped_restore.
2356 * utils.h (make_cleanup_clear_parser_state): Remove.
2357
73b9be8b
KS
23582017-09-06 Keith Seitz <keiths@redhat.com>
2359
2360 * dwarf2read.c (dw2_linkage_name_attr): New function.
2361 (dw2_linkage_name): New function.
2362 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2363 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2364 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2365
a102602b
KR
23662017-09-06 Kamil Rytarowski <n54@gmx.com>
2367
2368 * config/djgpp/djconfig.sh: Correct shell portability issue.
2369
28ad437d
KR
23702017-09-06 Kamil Rytarowski <n54@gmx.com>
2371
2372 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2373
351787dd
JB
23742017-09-06 John Baldwin <jhb@FreeBSD.org>
2375
2376 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2377 * NEWS: Mention new FreeBSD/mips native configuration.
2378 * configure.host: Add aarch64*-*-freebsd*.
2379 * configure.nat: Likewise.
2380 * aarch64-fbsd-nat.c: New file.
2381
c0f84956
JB
23822017-09-06 John Baldwin <jhb@FreeBSD.org>
2383
2384 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2385 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2386 * NEWS: Mention new FreeBSD/aarch64 target.
2387 * configure.tgt: Add aarch64*-*-freebsd*.
2388 * aarch64-fbsd-tdep.c: New file.
2389 * aarch64-fbsd-tdep.h: New file.
2390
7610297a
KR
23912017-09-06 Kamil Rytarowski <n54@gmx.com>
2392
2393 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2394
fbd1b771
JK
23952017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2396
2397 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2398 of TLS symbols.
2399
5ca79eae
PW
24002017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2401
2402 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2403 call.
2404
bf93d7ba
SM
24052017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2406
2407 * infrun.c (follow_exec): Call add_thread after
2408 target_find_description.
2409
1bb7c059
SM
24102017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2411
2412 * infrun.c (handle_inferior_event_1): When exec'ing, read
2413 stop_pc after follow_exec.
2414
fc809827
SM
24152017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2416
2417 * remote.c (process_g_packet): Update error message.
2418
d2fcdd85
YQ
24192017-09-05 Yao Qi <yao.qi@linaro.org>
2420
2421 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2422 targets.
2423
e69570ee
PA
24242017-09-05 Pedro Alves <palves@redhat.com>
2425
2426 * eval.c (eval_call, evaluate_funcall): New functions, factored
2427 out from ...
2428 (evaluate_subexp_standard): ... this.
2429
22916b07
YQ
24302017-09-05 Yao Qi <yao.qi@linaro.org>
2431
2432 * amd64-tdep.c (amd64_target_description): Create target
2433 descriptions.
2434 (_initialize_amd64_tdep): Don't call functions
2435 initialize_tdesc_amd64_*. Add self tests.
2436 * arch/amd64.c (amd64_create_target_description): Add parameter
2437 is_linux. Call set_tdesc_osabi if is_linux is true.
2438 * arch/amd64.h (amd64_create_target_description): Update the
2439 declaration.
2440 * arch/i386.c (i386_create_target_description): Add parameter
2441 is_linux. Call set_tdesc_osabi if is_linux is true.
2442 * arch/i386.h (i386_create_target_description): Update
2443 declaration.
2444 * configure.tgt: Add i386.o to gdb_target_obs.
2445 * features/Makefile (XMLTOC): Remove i386/*.xml.
2446 * features/i386/amd64-avx-avx512.c: Remove.
2447 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2448 * features/i386/amd64-avx-mpx.c: Remove.
2449 * features/i386/amd64-avx.c: Remove.
2450 * features/i386/amd64-mpx.c: Remove.
2451 * features/i386/amd64.c: Remove.
2452 * features/i386/i386-avx-avx512.c: Remove.
2453 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2454 * features/i386/i386-avx-mpx.c: Remove.
2455 * features/i386/i386-avx.c: Remove.
2456 * features/i386/i386-mmx.c: Remove.
2457 * features/i386/i386-mpx.c: Remove.
2458 * features/i386/i386.c: Remove.
2459 * i386-tdep.c: Don't include features/i386/i386*.c., include
2460 target-descriptions.h and arch/i386.h.
2461 (i386_target_description): Create target descriptions.
2462 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2463 functions. Do self tests.
2464
0854b7b1
YQ
24652017-09-05 Yao Qi <yao.qi@linaro.org>
2466
2467 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2468 * features/i386/amd64-avx-avx512-linux.c: Removed.
2469 * features/i386/amd64-avx-linux.c: Removed.
2470 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2471 * features/i386/amd64-avx-mpx-linux.c: Removed.
2472 * features/i386/amd64-linux.c: Removed.
2473 * features/i386/amd64-mpx-linux.c: Removed.
2474 * features/i386/x32-avx-avx512-linux.c: Removed.
2475 * features/i386/x32-avx-linux.c: Removed.
2476 * features/i386/x32-linux.c: Removed.
2477
b4570e4b
YQ
24782017-09-05 Yao Qi <yao.qi@linaro.org>
2479
2480 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2481 features/i386/*.c.
2482 (amd64_linux_read_description): Call
2483 amd64_create_target_description.
2484 * arch/amd64.c: New file.
2485 * arch/amd64.h: New file.
2486 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2487 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2488
6c73f67f
YQ
24892017-09-05 Yao Qi <yao.qi@linaro.org>
2490
2491 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2492 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2493 (amd64_linux_read_description): Create target descriptions.
2494 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2495 functions. Add unit tests.
2496 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2497 x32-core.xml.
2498 * features/i386/64bit-avx.c: Generated.
2499 * features/i386/64bit-avx512.c: Generated.
2500 * features/i386/64bit-core.c: Generated.
2501 * features/i386/64bit-linux.c: Generated.
2502 * features/i386/64bit-mpx.c: Generated.
2503 * features/i386/64bit-pkeys.c: Generated.
2504 * features/i386/64bit-segments.c: Generated.
2505 * features/i386/64bit-sse.c: Generated.
2506 * features/i386/x32-core.c: Generated.
2507 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2508 c files for amd64-linux and x32-linux.
2509
9d3d478b
YQ
25102017-09-05 Yao Qi <yao.qi@linaro.org>
2511
2512 * amd64-linux-tdep.c (amd64_linux_read_description): New
2513 function.
2514 (amd64_linux_core_read_description): Call
2515 amd64_linux_read_description.
2516 (amd64_linux_init_abi): Likewise.
2517 (amd64_x32_linux_init_abi): Likewise.
2518 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2519 * x86-linux-nat.c (x86_linux_read_description): Call
2520 amd64_linux_read_description.
2521
b9f1d50f
YQ
25222017-09-05 Yao Qi <yao.qi@linaro.org>
2523
2524 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2525 comments.
2526
188c9e6d
YQ
25272017-09-05 Yao Qi <yao.qi@linaro.org>
2528
2529 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2530 * features/i386/i386-avx-avx512-linux.c: Remove.
2531 * features/i386/i386-avx-linux.c: Remove.
2532 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2533 * features/i386/i386-avx-mpx-linux.c: Remove.
2534 * features/i386/i386-linux.c: Remove.
2535 * features/i386/i386-mmx-linux.c: Remove.
2536 * features/i386/i386-mpx-linux.c: Remove.
2537
5f035c07
YQ
25382017-09-05 Yao Qi <yao.qi@linaro.org>
2539
2540 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2541 (SFILES): Add arch/i386.c.
2542 (HFILES_NO_SRCDIR): Add arch/i386.h.
2543 * arch/i386.c: New file.
2544 * arch/i386.h: New file.
2545 * arch/tdesc.h (allocate_target_description): Declare.
2546 (set_tdesc_architecture): Declare.
2547 (set_tdesc_osabi): Declare.
2548 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2549 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2550 include arch/i386.h.
2551 (i386_linux_read_description): Remove code and call
2552 i386_create_target_description.
2553 (set_tdesc_architecture): New function.
2554 (set_tdesc_osabi): New function.
2555 * target-descriptions.h (allocate_target_description): Remove.
2556
0abe8a89
YQ
25572017-09-05 Yao Qi <yao.qi@linaro.org>
2558
2559 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2560 * target-descriptions.c (tdesc_create_feature): Likewise, and
2561 adjust code.
2562 * features/i386/32bit-avx.c: Re-generated.
2563 * features/i386/32bit-avx512.c: Re-generated.
2564 * features/i386/32bit-core.c: Re-generated.
2565 * features/i386/32bit-linux.c: Re-generated.
2566 * features/i386/32bit-mpx.c: Re-generated.
2567 * features/i386/32bit-pkeys.c: Re-generated.
2568 * features/i386/32bit-sse.c: Re-generated.
2569
0a188386
YQ
25702017-09-05 Yao Qi <yao.qi@linaro.org>
2571
2572 * regformats/regdef.h (struct reg): Override operator == and !=.
2573
f49ff000
YQ
25742017-09-05 Yao Qi <yao.qi@linaro.org>
2575
2576 * arch/tdesc.h: New file.
2577 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2578 * target-descriptions.c: Update comments.
2579 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2580 declarations.
2581 * features/i386/32bit-avx.c: Re-generated.
2582 * features/i386/32bit-avx512.c: Re-generated.
2583 * features/i386/32bit-core.c: Re-generated.
2584 * features/i386/32bit-linux.c: Re-generated.
2585 * features/i386/32bit-mpx.c: Re-generated.
2586 * features/i386/32bit-pkeys.c: Re-generated.
2587 * features/i386/32bit-sse.c: Re-generated.
2588
f7000548
YQ
25892017-09-05 Yao Qi <yao.qi@linaro.org>
2590
2591 * regformats/regdat.sh: Update generated code.
2592
c9a5e2a5
YQ
25932017-09-05 Yao Qi <yao.qi@linaro.org>
2594
2595 * regformats/regdat.sh: Adjust code order.
2596
d6b687ac
SM
25972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2598
2599 * expprint.c (dump_subexp_body_standard): Use constant format
2600 string in fprintf_filtered call.
2601
a379bfd0
JB
26022017-09-04 John Baldwin <jhb@FreeBSD.org>
2603
2604 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2605 NetBSD/i386.
2606 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2607
f7efc967
JB
26082017-09-04 John Baldwin <jhb@FreeBSD.org>
2609
2610 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2611
c49fbc6c
JB
26122017-09-04 John Baldwin <jhb@FreeBSD.org>
2613
2614 * bsd-kvm.o: Define _KMEMUSER.
2615 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2616 * configure: Regenerate.
2617
26562e73
JB
26182017-09-04 John Baldwin <jhb@FreeBSD.org>
2619
2620 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2621 * i386-fbsd-nat.c: Likewise.
2622
31cf1487
JB
26232017-09-04 John Baldwin <jhb@FreeBSD.org>
2624
2625 * unittests/array-view-selftests.c: Add include of <array>.
2626
5b9f8a7c
JB
26272017-09-04 John Baldwin <jhb@FreeBSD.org>
2628
2629 * spu-tdep.c (flush_ea_cache): Add missing argument to
2630 call_function_by_hand.
2631
d69cf9b2
PA
26322017-09-04 Pedro Alves <palves@redhat.com>
2633
2634 * NEWS (Safer support for debugging with no debug info): New.
2635
3693fdb3
PA
26362017-09-04 Pedro Alves <palves@redhat.com>
2637
2638 * c-exp.y (function_method, function_method_void): Add current
2639 instance flags to TYPE_INSTANCE.
2640 * dwarf2read.c (check_modifier): New.
2641 (compute_delayed_physnames): Assert that only C++ adds delayed
2642 physnames. Mark fn_fields as const/volatile depending on
2643 physname.
2644 * eval.c (make_params): New type_instance_flags parameter. Use
2645 it as the new type's instance flags.
2646 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2647 flags element and pass it to make_params.
2648 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2649 instance flags element.
2650 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2651 * gdbtypes.h: Include "enum-flags.h".
2652 (type_instance_flags): New enum-flags type.
2653 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2654 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2655 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2656 (follow_type_instance_flags): New function.
2657 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2658 * parser-defs.h (follow_type_instance_flags): Declare.
2659 * valops.c (value_struct_elt_for_reference): const/volatile must
2660 match too.
2661
e68cb8e0
PA
26622017-09-04 Pedro Alves <palves@redhat.com>
2663
2664 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2665 function/method scopes; lookup the nested name as a function local
2666 static variable.
2667
858be34c
PA
26682017-09-04 Pedro Alves <palves@redhat.com>
2669
2670 (%type <voidval>): Add function_method.
2671 * c-exp.y (exp): New production for calls with no arguments.
2672 (function_method, function_method_void_or_typelist): New
2673 productions.
2674 (exp): New production for "method()::static_var".
2675 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2676 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2677 Handle OP_FUNC_STATIC_VAR.
2678 * parse.c (operator_length_standard):
2679 Handle OP_FUNC_STATIC_VAR.
2680
dd5901a6
PA
26812017-09-04 Pedro Alves <palves@redhat.com>
2682
2683 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2684 handling.
2685 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2686 Ditto.
2687 * parse.c (operator_length_standard, operator_check_standard):
2688 Ditto.
2689 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2690
46a4882b
PA
26912017-09-04 Pedro Alves <palves@redhat.com>
2692
2693 * ax-gdb.c: Include "typeprint.h".
2694 (gen_expr_for_cast): New function.
2695 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2696 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2697 type is unknown.
2698 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2699 nodebug_data_symbol.
2700 * eval.c: Include "typeprint.h".
2701 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2702 Error out if symbol has unknown type.
2703 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2704 evaluate_subexp_for_cast.
2705 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2706 OP_VAR_MSYM_VALUE.
2707 (evaluate_subexp_for_cast): New function.
2708 * gdbtypes.c (init_nodebug_var_type): New function.
2709 (objfile_type): Use it to initialize types of variables with no
2710 debug info.
2711 * typeprint.c (error_unknown_type): New.
2712 * typeprint.h (error_unknown_type): New declaration.
2713 * compile/compile-c-types.c (convert_type_basic): Handle
2714 TYPE_CODE_ERROR; warn and fallback to int for variables with
2715 unknown type.
2716
fe13dfec
PA
27172017-09-04 Pedro Alves <palves@redhat.com>
2718
2719 * eval.c (evaluate_var_value): New function, factored out from ...
2720 (evaluate_subexp_standard): ... here.
2721
d008ee21
PA
27222017-09-04 Pedro Alves <palves@redhat.com>
2723
2724 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2725 Remove useless assignments to 'op'.
2726
827d0c51
PA
27272017-09-04 Pedro Alves <palves@redhat.com>
2728
2729 * eval.c (eval_skip_value): New function.
2730 (evaluate_subexp_standard): Use it.
2731
2c5a2be1
PA
27322017-09-04 Pedro Alves <palves@redhat.com>
2733
2734 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2735 function name from symbol/minsym and pass it to
2736 error_call_unknown_return_type.
2737
74ea4be4
PA
27382017-09-04 Pedro Alves <palves@redhat.com>
2739
2740 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2741 * ax-gdb.c (gen_msym_var_ref): New function.
2742 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2743 * eval.c (evaluate_var_msym_value): New function.
2744 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2745 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2746 to call_function_by_hand.
2747 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2748 Handle OP_VAR_MSYM_VALUE.
2749 (union exp_element) <msymbol>: New field.
2750 * minsyms.h (struct type): Forward declare.
2751 (find_minsym_type_and_address): Declare.
2752 * parse.c (write_exp_elt_msym): New function.
2753 (write_exp_msymbol): Delete, refactored as ...
2754 (find_minsym_type_and_address): ... this new function.
2755 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2756 (operator_length_standard, operator_check_standard): Handle
2757 OP_VAR_MSYM_VALUE.
2758 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2759
7022349d
PA
27602017-09-04 Pedro Alves <palves@redhat.com>
2761
2762 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2763 TYPE_GNU_IFUNC specially here. Throw error if return type is
2764 unknown.
2765 * ada-typeprint.c (print_func_type): Handle functions with unknown
2766 return type.
2767 * c-typeprint.c (c_type_print_base): Handle functions and methods
2768 with unknown return type.
2769 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2770 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2771 * compile/compile-c-types.c: Include "objfiles.h".
2772 (convert_func): For functions with unknown return type, warn and
2773 default to int.
2774 * compile/compile-object-run.c (compile_object_run): Adjust call
2775 to call_function_by_hand_dummy.
2776 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2777 call_function_by_hand.
2778 * eval.c (evaluate_subexp_standard): Adjust calls to
2779 call_function_by_hand. Handle functions and methods with unknown
2780 return type. Pass expect_type to call_function_by_hand.
2781 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2782 return type.
2783 * gcore.c (call_target_sbrk): Adjust call to
2784 call_function_by_hand.
2785 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2786 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2787 an integer address type instead of nodebug.
2788 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2789 call_function_by_hand.
2790 * infcall.c (error_call_unknown_return_type): New function.
2791 (call_function_by_hand): New "default_return_type" parameter.
2792 Pass it down.
2793 (call_function_by_hand_dummy): New "default_return_type"
2794 parameter. Use it instead of defaulting to int. If there's no
2795 default and the return type is unknown, throw an error. If
2796 there's a default return type, and the called function has no
2797 debug info, then assume the function is prototyped.
2798 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2799 New "default_return_type" parameter.
2800 (error_call_unknown_return_type): New declaration.
2801 * linux-fork.c (call_lseek): Cast return type of lseek.
2802 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2803 call_function_by_hand.
2804 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2805 calls to call_function_by_hand.
2806 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2807 return type.
2808 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2809 (value_nsstring, print_object_command): Adjust calls to
2810 call_function_by_hand.
2811 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2812 functions with unknown return type.
2813 (pascal_type_print_func_varspec_suffix): New function.
2814 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2815 TYPE_CODE_METHOD>: Use it.
2816 * python/py-value.c (valpy_call): Adjust call to
2817 call_function_by_hand.
2818 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2819 call_function_by_hand.
2820 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2821 call_function_by_hand.
2822 * valops.c (value_allocate_space_in_inferior): Adjust call to
2823 call_function_by_hand.
2824 * typeprint.c (type_print_unknown_return_type): New function.
2825 * typeprint.h (type_print_unknown_return_type): New declaration.
2826
54990598
PA
28272017-09-04 Pedro Alves <palves@redhat.com>
2828
2829 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2830 types with more than one parameter as prototyped.
2831
9a24775b
PA
28322017-09-04 Pedro Alves <palves@redhat.com>
2833
2834 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2835 (disassemble_command): Use gdb_disassembly_flags instead of bare
2836 int.
2837 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2838 (dump_insns, do_mixed_source_and_assembly_deprecated)
2839 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2840 Use gdb_disassembly_flags instead of bare int.
2841 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2842 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2843 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2844 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2845 (enum gdb_disassembly_flag): ... values of this new enumeration.
2846 (gdb_disassembly_flags): Define.
2847 (gdb_disassembly)
2848 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2849 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2850 gdb_disassembly_flags instead of bare int.
2851 * record-btrace.c (btrace_insn_history)
2852 (record_btrace_insn_history, record_btrace_insn_history_range)
2853 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2854 instead of bare int.
2855 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2856 Use gdb_disassembly_flags instead of bare int.
2857 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2858 Define.
2859 * target-delegates.c: Regenerate.
2860 * target.c (target_insn_history, target_insn_history_from)
2861 (target_insn_history_range): Use gdb_disassembly_flags instead of
2862 bare int.
2863 * target.h: Include "disasm.h".
2864 (struct target_ops) <to_insn_history, to_insn_history_from,
2865 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2866 int.
2867 (target_insn_history, target_insn_history_from)
2868 (target_insn_history_range): Use gdb_disassembly_flags instead of
2869 bare int.
2870
80a65e9b
SM
28712017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2872
2873 * cli/cli-script.c (build_command_line): For if/while commands,
2874 check whether args is empty.
2875
6b66338c
SM
28762017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2877
2878 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2879 (enum command_control_type): Likewise.
2880 (struct command_line): Likewise.
2881 (free_command_lines): Likewise.
2882 (struct command_lines_deleter): Likewise.
2883 (command_line_up): Likewise.
2884 (read_command_lines): Likewise.
2885 (read_command_lines_1): Likewise.
2886 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2887 (enum command_control_type): Likewise.
2888 (struct command_line): Likewise.
2889 (free_command_lines): Likewise.
2890 (struct command_lines_deleter): Likewise.
2891 (command_line_up): Likewise.
2892 (read_command_lines): Likewise.
2893 (read_command_lines_1): Likewise.
2894 * breakpoint.h: Include cli/cli-script.h.
2895 * extension-priv.h: Likewise.
2896 * gdbcmd.h: Likewise.
2897
51abb421
PA
28982017-09-04 Pedro Alves <palves@redhat.com>
2899
2900 * ada-lang.c (is_known_support_routine): Move sal declaration to
2901 where it is initialized.
2902 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2903 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2904 (clear_command, update_static_tracepoint): Remove init_sal
2905 references. Move declarations closer to initializations.
2906 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2907 initializations.
2908 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2909 references. Move sal declarations closer to initializations.
2910 * frame.c (find_frame_sal): Return a symtab_and_line via function
2911 return instead of output parameter. Remove init_sal references.
2912 * frame.h (find_frame_sal): Return a symtab_and_line via function
2913 return instead of output parameter.
2914 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2915 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2916 instead of memset.
2917 (gdbscm_find_pc_line): Remove init_sal reference.
2918 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2919 references. Move declarations closer to initializations.
2920 * infcmd.c (set_step_frame): Update. Move declarations closer to
2921 initializations.
2922 (finish_backward): Remove init_sal references. Move declarations
2923 closer to initializations.
2924 * infrun.c (process_event_stop_test, handle_step_into_function)
2925 (insert_hp_step_resume_breakpoint_at_frame)
2926 (insert_step_resume_breakpoint_at_caller): Likewise.
2927 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2928 (symbol_to_sal): Likewise.
2929 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2930 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2931 to its initialization.
2932 * reverse.c (save_bookmark_command): Use new/delete. Remove
2933 init_sal references. Move declarations closer to initializations.
2934 * source.c (get_current_source_symtab_and_line): Remove brace
2935 initialization.
2936 (set_current_source_symtab_and_line): Now takes the sal by const
2937 reference. Remove brace initialization.
2938 (line_info): Remove init_sal reference.
2939 * source.h (set_current_source_symtab_and_line): Now takes a
2940 symtab_and_line via const reference.
2941 * stack.c (set_current_sal_from_frame): Adjust.
2942 (print_frame_info): Adjust.
2943 (get_last_displayed_sal): Return the sal via function return
2944 instead of via output parameter. Simplify.
2945 (frame_info): Adjust.
2946 * stack.h (get_last_displayed_sal): Return the sal via function
2947 return instead of via output parameter.
2948 * symtab.c (init_sal): Delete.
2949 (find_pc_sect_line): Remove init_sal references. Move
2950 declarations closer to initializations.
2951 (find_function_start_sal): Remove init_sal references. Move
2952 declarations closer to initializations.
2953 * symtab.h (struct symtab_and_line): In-class initialize all
2954 fields.
2955 * tracepoint.c (set_traceframe_context)
2956 (print_one_static_tracepoint_marker): Remove init_sal references.
2957 Move declarations closer to initializations.
2958 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2959 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2960 declarations closer to initializations.
2961 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2962 init_sal references. Adjust.
2963
6c5b2ebe
PA
29642017-09-04 Pedro Alves <palves@redhat.com>
2965
2966 * ax-gdb.c (agent_command_1): Use range-for.
2967 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2968 * breakpoint.c: Include "common/array-view.h".
2969 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2970 parameter from struct symtabs_and_lines to
2971 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2972 (breakpoint_sals_to_pc): Change sals parameter from struct
2973 symtabs_and_lines to std::vector reference.
2974 (check_fast_tracepoint_sals): Change sals parameter from struct
2975 symtabs_and_lines to std::array_view. Use range-for.
2976 (decode_static_tracepoint_spec): Return a std::vector instead of
2977 symtabs_and_lines. Update.
2978 (create_breakpoint): Update.
2979 (break_range_command, until_break_command, clear_command): Update.
2980 (base_breakpoint_decode_location, bkpt_decode_location)
2981 (bkpt_probe_create_sals_from_location)
2982 (bkpt_probe_decode_location, tracepoint_decode_location)
2983 (tracepoint_probe_decode_location)
2984 (strace_marker_create_sals_from_location): Return a std::vector
2985 instead of symtabs_and_lines.
2986 (strace_marker_create_breakpoints_sal): Update.
2987 (strace_marker_decode_location): Return a std::vector instead of
2988 symtabs_and_lines. Update.
2989 (update_breakpoint_locations): Change struct symtabs_and_lines
2990 parameters to gdb::array_view. Adjust.
2991 (location_to_sals): Return a std::vector instead of
2992 symtabs_and_lines. Update.
2993 (breakpoint_re_set_default): Use std::vector instead of struct
2994 symtabs_and_lines.
2995 (decode_location_default): Return a std::vector instead of
2996 symtabs_and_lines. Update.
2997 * breakpoint.h: Include "common/array-view.h".
2998 (struct breakpoint_ops) <decode_location>: Now returns a
2999 std::vector instead of returning a symtabs_and_lines via output
3000 parameter.
3001 (update_breakpoint_locations): Change sals parameters to use
3002 gdb::array_view.
3003 * cli/cli-cmds.c (edit_command, list_command): Update to use
3004 std::vector and gdb::array_view.
3005 (ambiguous_line_spec): Adjust to use gdb::array_view and
3006 range-for.
3007 (compare_symtabs): Rename to ...
3008 (cmp_symtabs): ... this. Change parameters to symtab_and_line
3009 const reference and adjust.
3010 (filter_sals): Rewrite using std::vector and standard algorithms.
3011 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3012 (jump_command): Update to use std::vector.
3013 * linespec.c (struct linespec_state) <canonical_names>: Update
3014 comment.
3015 (add_sal_to_sals_basic): Delete.
3016 (add_sal_to_sals, filter_results, convert_results_to_lsals)
3017 (decode_line_2, create_sals_line_offset)
3018 (convert_address_location_to_sals, convert_linespec_to_sals)
3019 (convert_explicit_location_to_sals, parse_linespec)
3020 (event_location_to_sals, decode_line_full, decode_line_1)
3021 (decode_line_with_current_source)
3022 (decode_line_with_last_displayed, decode_objc)
3023 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3024 (linespec_result::~linespec_result): Adjust to use std::vector
3025 instead of symtabs_and_lines.
3026 * linespec.h (linespec_sals::sals): Now a std::vector.
3027 (struct linespec_result): Use std::vector, bool, and in-class
3028 initialization.
3029 (decode_line_1, decode_line_with_current_source)
3030 (decode_line_with_last_displayed): Return std::vector.
3031 * macrocmd.c (info_macros_command): Use std::vector.
3032 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3033 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3034 std::vector.
3035 * probe.h (parse_probes): Return a std::vector.
3036 * python/python.c (gdbpy_decode_line): Use std::vector and
3037 gdb::array_view.
3038 * source.c (select_source_symtab, line_info): Use std::vector.
3039 * stack.c (func_command): Use std::vector.
3040 * symtab.h (struct symtabs_and_lines): Delete.
3041 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3042
7c44b49c
PA
30432017-09-04 Pedro Alves <palves@redhat.com>
3044
3045 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3046 unittests/array-view-selftests.c.
3047 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3048 * common/array-view.h: New file.
3049 * unittests/array-view-selftests.c: New file.
3050
e439fa14
PA
30512017-09-04 Pedro Alves <palves@redhat.com>
3052
3053 * cli/cli-cmds.c (edit_command): Pass message to
3054 ambiguous_line_spec.
3055 (list_command): Pass message to ambiguous_line_spec. Say
3056 "first"/"last" instead of "start" and "end" to be consistent with
3057 the manual.
3058 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3059 them to print formatted message.
3060
7525b645
PA
30612017-09-04 Pedro Alves <palves@redhat.com>
3062
3063 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3064 ftrace_update_insns by reference instead of pointer.
3065
badc0020
YQ
30662017-09-04 Yao Qi <yao.qi@linaro.org>
3067
3068 * i386-go32-tdep.c: Include x86-xstate.h.
3069 (i386_go32_init_abi): Call i386_target_description.
3070 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3071 if xcr0 is X86_XSTATE_X87_MASK.
3072 * i386-tdep.h (tdesc_i386): Remove the declaration.
3073 (tdesc_i386_mmx): Likewise.
3074
d78bdb54
YQ
30752017-09-04 Yao Qi <yao.qi@linaro.org>
3076
3077 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3078 X86_XSTATE_SSE_MASK instead of 0.
3079
ca1fa5ee
YQ
30802017-09-04 Yao Qi <yao.qi@linaro.org>
3081
3082 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3083 i386_target_description.
3084 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3085 i386_target_description.
3086 * i386-tdep.c (i386_gdbarch_init): Likewise.
3087
2434b019
YQ
30882017-09-04 Yao Qi <yao.qi@linaro.org>
3089
3090 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3091 (x86_darwin_init_abi_64): Call amd64_target_description.
3092 * amd64-dicos-tdep.c: Likewise.
3093 * amd64-fbsd-nat.c: Likewise.
3094 * amd64-fbsd-tdep.c: Likewise.
3095 * amd64-nbsd-tdep.c: Likewise.
3096 * amd64-obsd-tdep.c: Likewise.
3097 * amd64-sol2-tdep.c: Likewise.
3098 * amd64-windows-tdep.c: Likewise.
3099 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3100
0860c437
SM
31012017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3102
3103 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3104 (btrace_function) <insn>: Change type to use std::vector.
3105 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3106 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3107 ftrace_update_insns, ftrace_compute_global_level_offset,
3108 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3109 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3110 change to std::vector.
3111 (ftrace_update_insns): Adjust to change to std::vector, change
3112 type of INSN parameter.
3113 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3114 * record-btrace.c (btrace_call_history_insn_range,
3115 btrace_compute_src_line_range,
3116 record_btrace_frame_prev_register): Adjust to change to
3117 std::vector.
3118 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3119 to change to std::vector.
3120
0638b7f9
TT
31212017-09-03 Tom Tromey <tom@tromey.com>
3122
3123 * corefile.c (reopen_exec_file): Use std::string.
3124
8f84fb0e
TT
31252017-09-03 Tom Tromey <tom@tromey.com>
3126
3127 * compile/compile.c (compile_register_name_mangled): Return
3128 std::string.
3129 * compile/compile-loc2c.c (pushf_register_address): Update.
3130 (pushf_register): Update.
3131 * compile/compile-c-types.c (convert_array): Update.
3132 * compile/compile-c-symbols.c (generate_vla_size): Update.
3133 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3134 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3135 (convert_one_symbol): Update.
3136 (generate_c_for_for_one_variable): Update.
3137 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3138 std::string.
3139 (generate_register_struct): Update.
3140 * compile/compile-internal.h (c_get_range_decl_name): Return a
3141 std::string.
3142 (compile_register_name_mangled): Return std::string.
3143
18e9961f
TT
31442017-09-03 Tom Tromey <tom@tromey.com>
3145
3146 * utils.c (perror_string): Return a std::string.
3147 (throw_perror_with_name, perror_warning_with_name): Update.
3148
45343786
TT
31492017-09-03 Tom Tromey <tom@tromey.com>
3150
3151 * demangle.c (demangle_command): Use std::string,
3152 unique_xmalloc_ptr.
3153
b57af503
TT
31542017-09-03 Tom Tromey <tom@tromey.com>
3155
3156 * cli/cli-setshow.c (do_set_command): Use std::string.
3157
6eecf35f
TT
31582017-09-03 Tom Tromey <tom@tromey.com>
3159
3160 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3161
56496dd4
TT
31622017-09-03 Tom Tromey <tom@tromey.com>
3163
3164 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3165
e91a1fa7
TT
31662017-09-03 Tom Tromey <tom@tromey.com>
3167
3168 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3169 gdb::unique_xmalloc_ptr.
3170
7ffd83d7
TT
31712017-09-03 Tom Tromey <tom@tromey.com>
3172
3173 * thread.c (print_thread_info_1): Use string_printf.
3174 (thread_apply_command, thread_apply_all_command): Use
3175 std::string.
3176
1ccbe998
TT
31772017-09-03 Tom Tromey <tom@tromey.com>
3178
3179 * valprint.c (val_print_string): Update.
3180 * gdbcore.h (memory_error_message): Return std::string.
3181 * corefile.c (memory_error_message): Return std::string.
3182 (memory_error): Update.
3183 * breakpoint.c (insert_bp_location): Update.
3184
23fdd69e
SM
31852017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3186
3187 * target/waitstatus.h (target_waitstatus_to_string): Change
3188 return type to std::string.
3189 * target/waitstatus.c (target_waitstatus_to_string): Return
3190 std::string.
3191 * target.h (target_waitstatus_to_string): Remove declaration.
3192 * infrun.c (resume, clear_proceed_status_thread,
3193 print_target_wait_results, do_target_wait, save_waitstatus,
3194 stop_all_threads): Adjust.
3195 * record-btrace.c (record_btrace_wait): Adjust.
3196 * target-debug.h
3197 (target_debug_print_struct_target_waitstatus_p): Adjust.
3198
5c811d30
JK
31992017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3200
3201 PR gdb/22046
3202 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3203 detection.
3204
0a2dde4a
SDJ
32052017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3206
3207 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3208 for setting/unsetting environment variables on the remote target.
3209 (New remote packets): Add entries for QEnvironmentHexEncoded,
3210 QEnvironmentUnset and QEnvironmentReset.
3211 * common/environ.c (gdb_environ::operator=): Extend method to
3212 handle m_user_set_env_list and m_user_unset_env_list.
3213 (gdb_environ::clear): Likewise.
3214 (match_var_in_string): Change type of first parameter from 'char
3215 *' to 'const char *'.
3216 (gdb_environ::set): Extend method to handle
3217 m_user_set_env_list and m_user_unset_env_list.
3218 (gdb_environ::unset): Likewise.
3219 (gdb_environ::clear_user_set_env): New method.
3220 (gdb_environ::user_set_envp): Likewise.
3221 (gdb_environ::user_unset_envp): Likewise.
3222 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3223 m_user_unset_env_list on move constructor/assignment.
3224 (unset): Add new default parameter 'update_unset_list = true'.
3225 (clear_user_set_env): New method.
3226 (user_set_envp): Likewise.
3227 (user_unset_envp): Likewise.
3228 (m_user_set_env_list): New std::set.
3229 (m_user_unset_env_list): Likewise.
3230 * common/rsp-low.c (hex2str): New function.
3231 (bin2hex): New overload for bin2hex function.
3232 * common/rsp-low.c (hex2str): New prototype.
3233 (str2hex): New overload prototype.
3234 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3235 QEnvironmentUnset and QEnvironmentReset.
3236 (remote_protocol_features): Add QEnvironmentHexEncoded,
3237 QEnvironmentUnset and QEnvironmentReset packets.
3238 (send_environment_packet): New function.
3239 (extended_remote_environment_support): Likewise.
3240 (extended_remote_create_inferior): Call
3241 extended_remote_environment_support.
3242 (_initialize_remote): Add QEnvironmentHexEncoded,
3243 QEnvironmentUnset and QEnvironmentReset packet configs.
3244 * unittests/environ-selftests.c (gdb_selftest_env_var):
3245 New variable.
3246 (test_vector_initialization): New function.
3247 (test_init_from_host_environ): Likewise.
3248 (test_reinit_from_host_environ): Likewise.
3249 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3250 Likewise.
3251 (test_unset_set_empty_vector): Likewise.
3252 (test_vector_clear): Likewise.
3253 (test_std_move): Likewise.
3254 (test_move_constructor):
3255 (test_self_move): Likewise.
3256 (test_set_unset_reset): Likewise.
3257 (run_tests): Rewrite in terms of the functions above.
3258
654670a4
WP
32592017-08-31 Weimin Pan <weimin.pan@oracle.com>
3260
3261 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3262 (adi_available): Use a temp variable of type CORE_ADDR as argument
3263 3 when calling target_auxv_search.
3264 (adi_normalize_address): Use masks and xor operators to calculate
3265 normalized address.
3266 (adi_read_versions, adi_write_versions, adi_print_versions)
3267 (do_examine, do_assign): Use paddress.
3268
7755ddb7
JB
32692017-08-29 John Baldwin <jhb@FreeBSD.org>
3270
3271 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3272 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3273 out of loop and add supply of FIR.
3274 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3275 add collect of FIR.
3276
fd437cbc
SM
32772017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3278
3804a343 3279 PR gdb/21827
fd437cbc
SM
3280 * cli/cli-script.c (define_command): Don't convert command name
3281 to lower case.
3282
988f6b3d
JB
32832017-08-25 Joel Brobecker <brobecker@adacore.com>
3284
3285 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3286 Update all callers accordingly. Remove all code blocks handling
3287 the case where DISPP is not NULL.
3288
663c44ac
JK
32892017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3290
3291 PR symtab/22003
3292 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3293 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3294 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3295
f1902523
JK
32962017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3297
3298 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3299 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3300 (read_comp_units_from_section): New parameter abbrev_section, use
3301 read_and_check_comp_unit_head, allocate signatured_type if needed.
3302 (create_all_comp_units): Update read_comp_units_from_section caller.
3303
87215ad1
SDJ
33042017-08-23 Pedro Alves <palves@redhat.com>
3305
3306 PR remote/21852
3307 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3308 to null_ptid and switch to thread without reading the registers
3309 after adding the inferior.
3310
6e41ddec
JK
33112017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3312
3313 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3314 compile-gcc.
3315 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3316 (compile_to_object): Implement compile_gcc.
3317 (_initialize_compile): Install "set compile-gcc". Initialize
3318 compile_gcc.
3319
e68c32d5
JK
33202017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3321
3322 * compile/compile.c (compile_to_object): Conditionally call
3323 set_verbose. Conditionally call compile or compile_v0.
3324
58afddc6
WP
33252017-08-07 Weimin Pan <weimin.pan@oracle.com>
3326
3327 * sparc64-tdep.h: (adi_normalize_address): New export.
3328 * sparc-nat.h: (open_adi_tag_fd): New export.
3329 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3330 * sparc64-linux-tdep.c:
3331 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3332 (sparc64_linux_handle_segmentation_fault): New function.
3333 (sparc64_linux_init_abi): Register
3334 sparc64_linux_handle_segmentation_fault
3335 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3336 (sparc64_addr_bits_remove): New function.
3337 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3338 (MAX_PROC_NAME_SIZE): New macro.
3339 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3340 (sparc64adilist): New variable.
3341 (adi_proc_list): New variable.
3342 (find_adi_info): New function.
3343 (add_adi_info): New function.
3344 (get_adi_info_proc): New function.
3345 (get_adi_info): New function.
3346 (info_adi_command): New function.
3347 (read_maps_entry): New function.
3348 (adi_available): New function.
3349 (adi_normalize_address): New function.
3350 (adi_align_address): New function.
3351 (adi_convert_byte_count): New function.
3352 (adi_tag_fd): New function.
3353 (adi_is_addr_mapped): New function.
3354 (adi_read_versions): New function.
3355 (adi_write_versions): New function.
3356 (adi_print_versions): New function.
3357 (do_examine): New function.
3358 (do_assign): New function.
3359 (adi_examine_command): New function.
3360 (adi_assign_command): New function.
3361 (_initialize_sparc64_adi_tdep): New function.
3362
11db9430
SM
33632017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * breakpoint.c (breakpoints_info): Rename to ...
3366 (info_breakpoints_command): ... this.
3367 (watchpoints_info): Rename to ...
3368 (info_watchpoints_command): ... this.
3369 (tracepoints_info): Rename to ...
3370 (info_tracepoints_command): ... this.
3371 (_initialize_breakpoint): Adjust.
3372 * dcache.c (dcache_info): Rename to ...
3373 (info_display_command): ... this.
3374 (_initialize_dcache): Adjust.
3375 * frame.h (args_info): Rename to ...
3376 (info_args_command): ... this.
3377 (locals_info): Rename to ...
3378 (info_locals_command): ... this.
3379 * infcmd.c (nofp_registers_info): Rename to ...
3380 (info_registers_command): ... this.
3381 (float_info): Rename to ...
3382 (info_float_command): ... this.
3383 (program_info): Rename to ...
3384 (info_program_command): ... this.
3385 (all_registers_info): Rename to ...
3386 (info_all_registers_command): ... this.
3387 (vector_info): Rename to ...
3388 (info_vector_command): ... this.
3389 (float_info): Rename to ...
3390 (info_float_command): ... this.
3391 (_initialize_infcmd): Adjust.
3392 * inferior.h (term_info): Rename to ...
3393 (info_terminal_command): ... this.
3394 * inflow.c (term_info): Rename to ...
3395 (info_terminal_command): ... this.
3396 (_initialize_inflow): Adjust.
3397 * infrun.c (signals_info): Rename to ...
3398 (info_signals_command): ... this.
3399 (_initialize_infrun): Adjust.
3400 * objc-lang.c (classes_info): Rename to ...
3401 (info_classes_command): ... this.
3402 (selectors_info): Rename to ...
3403 (info_selectors_command): ... this.
3404 (_initialize_objc_language): Adjust.
3405 * printcmd.c (sym_info): Rename to ...
3406 (info_symbol_command): ... this.
3407 (address_info): Rename to ...
3408 (info_address_command): ... this.
3409 (display_info): Rename to ...
3410 (info_display_command): ... this.
3411 (_initialize_printcmd): Adjust.
3412 * reverse.c (bookmarks_info): Rename to ...
3413 (info_breakpoints_command): ... this.
3414 (_initialize_reverse): Adjust.
3415 * ser-go32.c (dos_info): Rename to ...
3416 (info_serial_command): ... this.
3417 (_initialize_ser_dos): Adjust.
3418 * skip.c (skip_info): Rename to ...
3419 (info_skip_command): ... this.
3420 (_initialize_step_skip): Adjust.
3421 * source.c (line_info): Rename to ...
3422 (info_line_command): ... this.
3423 (source_info): Rename to ...
3424 (info_source_command)
3425 * stack.c (frame_info): Rename to ...
3426 (info_frame_command): ... this.
3427 (locals_info): Rename to ...
3428 (info_locals_command): ... this.
3429 (args_info): Rename to ...
3430 (info_args_command): ... this.
3431 (_initialize_stack): Adjust.
3432 * symtab.c (sources_info): Rename to ...
3433 (info_sources_command): ... this.
3434 (variables_info): Rename to ...
3435 (info_variables_command): ... this.
3436 (functions_info): Rename to ...
3437 (info_functions_command): ... this.
3438 (types_info): Rename to ...
3439 (info_types_command): ... this.
3440 (_initialize_symtab): Adjust.
3441 * target.c (target_info): Rename to ...
3442 (info_target_command): ... this.
3443 (initialize_targets): Adjust.
3444 * tracepoint.c (tvariables_info): Rename to ...
3445 (info_tvariables_command): ... this.
3446 (scope_info): Rename to ...
3447 (info_scope_command): ... this.
3448 (trace_dump_actions): Adjust.
3449 (_initialize_tracepoint): Adjust.
3450
b270e6f9
TT
34512017-08-22 Tom Tromey <tom@tromey.com>
3452
3453 * breakpoint.h (install_breakpoint): Update.
3454 * breakpoint.c (add_solib_catchpoint): Update.
3455 (install_breakpoint): Change argument to a std::unique_ptr.
3456 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3457 (create_breakpoint_sal, create_breakpoint): Update.
3458 (watch_command_1, catch_exec_command_1)
3459 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3460 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3461 Return the breakpoint.
3462 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3463 (new_single_step_breakpoint): Update.
3464 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3465 std::unique_ptr.
3466 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3467 std::unique_ptr.
3468 * break-catch-sig.c (create_signal_catchpoint): Use
3469 std::unique_ptr.
3470 * ada-lang.c (create_ada_exception_catchpoint): Use
3471 std::unique_ptr.
3472
36bd8eaa
TT
34732017-08-22 Tom Tromey <tom@tromey.com>
3474
3475 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3476
56f37645
TT
34772017-08-22 Tom Tromey <tom@tromey.com>
3478
3479 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3480 (lookup_partial_symbol): Update.
3481
0b581c69
TT
34822017-08-22 Tom Tromey <tom@tromey.com>
3483
3484 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3485 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3486 (find_and_open_source, symtab_to_fullname): Update.
3487 * psymtab.c (psymtab_to_fullname): Update.
3488
14278e1f
TT
34892017-08-22 Tom Tromey <tom@tromey.com>
3490
3491 * exec.c (exec_file_attach): Update.
3492 * linux-thread-db.c (try_thread_db_load): Update.
3493 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3494 * utils.c (gdb_realpath): Change return type.
3495 (gdb_realpath_keepfile): Update.
3496 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3497 (_initialize_utils): Register the new self test.
3498 * source.c (openp): Update.
3499 (find_and_open_source): Update.
3500 * nto-tdep.c (nto_find_and_open_solib): Update.
3501 * main.c (set_gdb_data_directory): Update.
3502 (captured_main_1): Update.
3503 * dwarf2read.c (dwarf2_get_dwz_file): Update
3504 (dw2_map_symbol_filenames): Update.
3505 * auto-load.c (auto_load_safe_path_vec_update): Update.
3506 (filename_is_in_auto_load_safe_path_vec): Change type of
3507 "filename_realp".
3508 (auto_load_objfile_script): Update.
3509 (file_is_auto_load_safe): Update. Use std::string.
3510 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3511
4971c9a7
TT
35122017-08-22 Tom Tromey <tom@tromey.com>
3513
3514 * utils.c (gdb_realpath_keepfile): Return a
3515 gdb::unique_xmalloc_ptr.
3516 * exec.c (exec_file_attach): Update.
3517 * utils.h (gdb_realpath_keepfile): Return a
3518 gdb::unique_xmalloc_ptr.
3519
e3e41d58
TT
35202017-08-22 Tom Tromey <tom@tromey.com>
3521
3522 * compile/compile.c (compile_file_command): Use
3523 gdb::unique_xmalloc_ptr, std::string.
3524 * utils.c (gdb_abspath): Change return type.
3525 * source.c (openp): Update.
3526 * objfiles.c (allocate_objfile): Update.
3527 * main.c (set_gdb_data_directory): Update.
3528 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3529
0d999a6e
ZZ
35302017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3531
3532 * cli-cmds.c (list_commands): List actual code around more than
3533 one location.
3534
329d5e7e
JB
35352017-08-21 John Baldwin <jhb@FreeBSD.org>
3536
3537 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3538
bf223d3e
PA
35392017-08-21 Pedro Alves <palves@redhat.com>
3540
3541 PR gdb/19487
3542 * c-exp.y (variable production): Handle function aliases.
3543 * minsyms.c (msymbol_is_text): New function.
3544 * minsyms.h (msymbol_is_text): Declare.
3545 * symtab.c (find_function_alias_target): New function.
3546 * symtab.h (find_function_alias_target): Declare.
3547
c973d0aa
PA
35482017-08-21 Pedro Alves <palves@redhat.com>
3549
3550 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3551 typedefs.
3552 * typeprint.c (whatis_exp): If handling "whatis", and expression
3553 is OP_TYPE, strip one typedef level. Otherwise don't strip
3554 typedefs here.
3555 * valops.c (value_cast): Save "to" type before resolving
3556 stubs/typedefs. Use that type as resulting value's type.
3557
2989a365
TT
35582017-08-18 Tom Tromey <tom@tromey.com>
3559 Pedro Alves <palves@redhat.com>
3560
3561 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3562 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3563 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3564 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3565 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3566 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3567 (linux_get_siginfo_data): Add "thread" argument. Use
3568 scoped_restore.
3569 * linux-nat.c (linux_child_follow_fork)
3570 (check_stopped_by_watchpoint): Use scoped_restore.
3571 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3572 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3573 (restore_inferior_ptid, save_inferior_ptid): Remove.
3574 * btrace.c (btrace_fetch): Use scoped_restore.
3575 * bsd-uthread.c (bsd_uthread_fetch_registers)
3576 (bsd_uthread_store_registers): Use scoped_restore.
3577 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3578 scoped_restore.
3579 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3580 (aix_thread_xfer_partial): Use scoped_restore.
3581 * inferior.h (save_inferior_ptid): Remove.
3582
e60eb288
YQ
35832017-08-18 Yao Qi <yao.qi@linaro.org>
3584
3585 PR tdep/21818
3586 * arm-tdep.c (gdb_print_insn_arm): Mark
3587 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3588
6d580b63
YQ
35892017-08-18 Yao Qi <yao.qi@linaro.org>
3590
3591 * NEWS: Mention GDBserver's new option "--selftest".
3592 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3593 * selftest.c: Move it to common/selftest.c.
3594 * selftest.h: Move it to common/selftest.h.
3595 * selftest-arch.c (reset): New function.
3596 (tests_with_arch): Call reset.
3597
86dcbf50
YQ
35982017-08-18 Yao Qi <yao.qi@linaro.org>
3599
3600 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3601 instead of exception_fprintf and printf_filtered.
3602
7649770c
YQ
36032017-08-18 Yao Qi <yao.qi@linaro.org>
3604
3605 * selftest.c (register_self_test): Rename it to
3606 selftests::register_test.
3607 (run_self_tests): selftest::run_tests.
3608 * selftest.h: Update declarations.
3609 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3610 selftests::register_test_foreach_arch.
3611 * selftest-arch.h: Update declaration.
3612 * aarch64-tdep.c: Update.
3613 * arm-tdep.c: Likewise.
3614 * disasm-selftests.c: Likewise.
3615 * dwarf2loc.c: Likewise.
3616 * dwarf2-frame.c: Likewise.
3617 * findvar.c: Likewise.
3618 * gdbarch-selftests.c: Likewise.
3619 * maint.c (maintenance_selftest): Likewise.
3620 * regcache.c: Likewise.
3621 * rust-exp.y: Likewise.
3622 * selftest-arch.c: Likewise.
3623 * unittests/environ-selftests.c: Likewise.
3624 * unittests/function-view-selftests.c: Likewise.
3625 * unittests/offset-type-selftests.c: Likewise.
3626 * unittests/optional-selftests.c: Likewise.
3627 * unittests/scoped_restore-selftests.c: Likewise.
3628 * utils-selftests.c: Likewise.
3629
b0cba12e
PA
36302017-08-17 Pedro Alves <palves@redhat.com>
3631
3632 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3633 local.
3634
4c8aa72d
PA
36352017-08-17 Pedro Alves <palves@redhat.com>
3636
3637 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3638 field.
3639 (reset_die_in_process): Delete, replaced by ...
3640 (process_die_scope): ... this new class. Make it responsible for
3641 freeing cu->line_header too.
3642 (process_die): Use process_die_scope.
3643 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3644 cu->line_header_die_owner. Don't release the line header if it's
3645 owned by the CU.
3646 (setup_type_unit_groups): Make the CU/DIE own the line header.
3647 Don't release the line header here.
3648
ba713918
AL
36492017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3650
3651 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3652
44d0fb3a
RK
36532017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3654
3655 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3656 Single-Key mode
3657
a5afdb16
RK
36582017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3659
3660 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3661 mode command list.
3662
47613aeb
SH
36632017-08-15 Stafford Horne <shorne@gmail.com>
3664
3665 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3666
9c3cc999
SH
36672017-08-15 Stafford Horne <shorne@gmail.com>
3668
3669 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3670
206726fb
SDJ
36712017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3672
3673 PR gdb/21954
3674 * infcmd.c (unset_environment_command): Use the 'clear' method on
3675 the environment instead of resetting it.
3676
0335ac6d
JB
36772017-08-15 John Baldwin <jhb@FreeBSD.org>
3678
3679 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3680 platforms.
3681
d3abe1c8
TT
36822017-08-14 Tom Tromey <tom@tromey.com>
3683
3684 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3685 (print_binary_chars): Likewise.
3686 (BITS_IN_BYTES): Remove.
3687
d6382fff
TT
36882017-08-14 Tom Tromey <tom@tromey.com>
3689
3690 PR gdb/21675
3691 * valprint.c (LOW_ZERO): Change value to 034.
3692 (print_octal_chars): Add static_asserts for octal constants.
3693 * printcmd.c (print_scalar_formatted): Add 'd' case.
3694
f978cb06
TT
36952017-08-11 Tom Tromey <tom@tromey.com>
3696
3697 * symfile.c (add_symbol_file_command): Use std::vector.
3698
2f5404b3
TT
36992017-08-14 Tom Tromey <tom@tromey.com>
3700
3701 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3702 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3703 std::move.
3704 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3705
de7985c3
PA
37062017-08-11 Pedro Alves <palves@redhat.com>
3707
3708 * infrun.c (process_event_stop_test): Adjust
3709 function_name_is_marked_for_skip call.
3710 * skip.c: Include <list>.
3711 (skiplist_entry): Make it a class with private fields, and
3712 getters/setters.
3713 (skiplist_entry_chain): Delete.
3714 (skiplist_entries): New.
3715 (skiplist_entry_count): Delete.
3716 (highest_skiplist_entry_num): New.
3717 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3718 (add_skiplist_entry): Delete.
3719 (skiplist_entry::skiplist_entry): New.
3720 (skiplist_entry::add_entry): New.
3721 (skip_file_command, skip_function): Adjust.
3722 (compile_skip_regexp): Delete.
3723 (skip_command): Don't compile regexp here. Adjust to use
3724 skiplist_entry::add_entry.
3725 (skip_info): Adjust to use range-for and getters.
3726 (skip_enable_command, skip_disable_command): Adjust to use
3727 range-for and setters.
3728 (skip_delete_command): Adjust to use std::list.
3729 (add_skiplist_entry): Delete.
3730 (skip_file_p): Delete, refactored as ...
3731 (skiplist_entry::do_skip_file_p): ... this new method.
3732 (skip_gfile_p): Delete, refactored as ...
3733 (skiplist_entry::do_gskip_file_p): ... this new method.
3734 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3735 (skiplist_entry::skip_function_p): ... this new method.
3736 (function_name_is_marked_for_skip): Now returns bool, and takes
3737 the function sal by const reference. Adjust to use range-for and
3738 skiplist_entry methods.
3739 (_initialize_step_skip): Remove references to
3740 skiplist_entry_chain, skiplist_entry_count.
3741 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3742 takes the function sal by const reference.
3743
be7d3cd5
YQ
37442017-08-11 Yao Qi <yao.qi@linaro.org>
3745
3746 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3747 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3748 (dwarf2_frame_cache):
3749 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3750 RETURN_MASK_ALL and set *this_case to NULL.
3751 * frame-unwind.h: Update comments.
3752
1c90d9f0
YQ
37532017-08-11 Yao Qi <yao.qi@linaro.org>
3754
3755 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3756 (dwarf2_frame_state_copy_regs): Remove.
3757 (dwarf2_frame_state_free_regs): Remove.
3758 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3759 (dwarf2_restore_rule): Call method .alloc_regs instead of
3760 dwarf2_frame_state_alloc_regs.
3761 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3762 constructor. Call std::move.
3763 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3764 (dwarf2_frame_cache): Likewise.
3765
3766 [GDB_SELF_TEST]: Include selftest.h and
3767 selftest-arch.h.
3768 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3769 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3770 execute_cfa_program_test.
3771
3772 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3773 copy ctor, assignment operator, move assignment.
3774 <alloc_regs>: New method.
3775 <swap>: New method.
3776 (struct dwarf2_frame_state): Delete dtor.
3777 (dwarf2_frame_state_alloc_regs): Remove declaration.
3778 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3779 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3780
afe37d6b
YQ
37812017-08-11 Yao Qi <yao.qi@linaro.org>
3782
3783 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3784 (dwarf2_frame_state::dwarf2_frame_state): New.
3785 (dwarf2_frame_state::~dwarf2_frame_state): New.
3786 (dwarf2_fetch_cfa_info): Update.
3787 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3788 rather than a pointer. Update code.
3789 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3790 dtor.
3791 <data_align, code_align, retaddr_column>: Change them to const.
3792 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3793 to bool.
3794
b348037f
YQ
37952017-08-11 Yao Qi <yao.qi@linaro.org>
3796
3797 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3798 <loc.exp>: New field.
3799 * dwarf2-frame.c (execute_cfa_program): Update.
3800 (dwarf2_frame_prev_register): Update.
3801
e7c9de26
PA
38022017-08-10 Pedro Alves <palves@redhat.com>
3803
3804 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3805
e8c6b620
JB
38062017-08-09 John Baldwin <jhb@FreeBSD.org>
3807
3808 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3809 (fbsd_pending_children): Use std::list.
3810 (fbsd_remember_child): Likewise.
3811 (fbsd_is_child_pending): Likewise.
3812 (fbsd_pending_vfork_done): Use std::forward_list.
3813 (fbsd_add_vfork_done): Likewise.
3814 (fbsd_is_vfork_done_pending): Likewise.
3815 (fbsd_next_vfork_done): Likewise.
3816
e4a26669
JB
38172017-08-09 John Baldwin <jhb@FreeBSD.org>
3818
3819 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3820 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3821 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3822 for `mapfilename'.
3823 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3824 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3825
142311d3
JB
38262017-08-09 John Baldwin <jhb@FreeBSD.org>
3827
3828 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3829 "filestuff.h".
3830 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3831
42fa2e0e
TT
38322017-08-09 Tom Tromey <tom@tromey.com>
3833
3834 * skip.c (skiplist_entry): New constructor.
3835 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3836 (skiplist_entry::file_is_glob): Now bool.
3837 (skiplist_entry::file, skiplist_entry::function): Now
3838 std::string.
3839 (make_skip_entry): Return a unique_ptr. Use new.
3840 (free_skiplist_entry, free_skiplist_entry_cleanup)
3841 (make_free_skiplist_entry_cleanup): Remove.
3842 (skip_command, skip_disable_command, add_skiplist_entry)
3843 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3844 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3845 (function_name_is_marked_for_skip): Update.
3846 (skip_delete_command): Update. Use delete.
3847
cd3af38d
JW
38482017-08-09 Jiong Wang <jiong.wang@arm.com>
3849
3850 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3851 (aarch64_linux_core_read_description): New function.
3852 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3853
29592bde
PA
38542017-08-09 Pedro Alves <palves@redhat.com>
3855
3856 * cp-name-parser.y (cp_comp_to_string): Return a
3857 gdb::unique_xmalloc_ptr<char>.
3858 * cp-support.c (replace_typedefs_qualified_name)
3859 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3860 (cp_canonicalize_string_full): Use op= instead of explicit
3861 convertion.
3862 (cp_class_name_from_physname, method_name_from_physname)
3863 (cp_func_name, cp_remove_params): Adjust to use
3864 gdb::unique_xmalloc_ptr<char>.
3865 * cp-support.h (cp_comp_to_string): Return a
3866 gdb::unique_xmalloc_ptr<char>.
3867 * python/py-type.c (typy_lookup_type): Adjust to use
3868 gdb::unique_xmalloc_ptr<char>.
3869
b3340438
L
38702017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3871
3872 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3873
e88e8651
YQ
38742017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3875 Yao Qi <yao.qi@linaro.org>
3876
3877 * cp-support.c (cp_canonicalize_string_full): Use
3878 gdb::unique_xmalloc_ptr<char>.
3879 (cp_canonicalize_string): Likewise.
3880
f5a29eb0
YQ
38812017-08-09 Yao Qi <yao.qi@linaro.org>
3882
3883 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3884 * regformats/i386/amd64-avx-avx512.dat: Remove.
3885 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3886 * regformats/i386/amd64-avx-mpx.dat:Remove.
3887 * regformats/i386/amd64-avx.dat: Remove.
3888 * regformats/i386/amd64-mpx.dat: Remove.
3889 * regformats/i386/i386-avx-avx512.dat: Remove.
3890 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3891 * regformats/i386/i386-avx-mpx.dat: Remove.
3892 * regformats/i386/i386-mmx.dat: Remove.
3893 * regformats/i386/i386-mpx.dat: Remove.
3894
57757c2f
YQ
38952017-08-09 Yao Qi <yao.qi@linaro.org>
3896
3897 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3898 * amd64-tdep.c: Don't include features/i386/x32*.c.
3899 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3900 functions.
3901 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3902 and i386/x32-avx-avx512.
3903 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3904 and i386/x32.xml.
3905 * features/i386/x32-avx-avx512.c: Removed.
3906 * features/i386/x32-avx-avx512.xml: Removed.
3907 * features/i386/x32-avx.c: Removed.
3908 * features/i386/x32-avx.xml: Removed.
3909 * features/i386/x32.c: Removed.
3910 * features/i386/x32.xml: Removed.
3911 * regformats/i386/x32-avx-avx512.dat: Removed.
3912 * regformats/i386/x32-avx.dat: Removed.
3913 * regformats/i386/x32.dat: Removed.
3914
ba7b109b
MR
39152017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3916
3917 PR breakpoints/21886
3918 * mem-break.c (default_memory_insert_breakpoint): Use
3919 `->placed_address' rather than `->reqstd_address' for the
3920 breakpoint location.
3921
e347efc3
MR
39222017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3923
3924 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3925 assertions.
3926
0dba2a6c
MR
39272017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3928
3929 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3930 a union of `tdep_info', `tdesc_data' and `id'.
3931 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3932 rather than `info.tdep_info'.
3933 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3934 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3935 * i386-tdep.c (i386_gdbarch_init): Likewise.
3936 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3937 * mips-tdep.c (mips_gdbarch_init): Likewise.
3938 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3939 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3940 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3941 `info.tdep_info'.
3942 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3943 `info.tdep_info'.
3944 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3945 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3946 `info.tdep_info'.
3947 * spu-tdep.c (spu_gdbarch_init): Likewise.
3948 * gdbarch.h: Regenerate.
3949
16eb6b2d
LS
39502017-08-07 Leszek Swirski <leszeks@google.com>
3951
7b005726 3952 PR symtab/20899
16eb6b2d
LS
3953 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3954
74cbb09e
SM
39552017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3956
3957 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3958 (gdbsim_open): Rename gdb_argv args object to argv.
3959
ee0c3293
TT
39602017-08-05 Tom Tromey <tom@tromey.com>
3961
3962 * compile/compile-object-load.c (compile_object_load): Use
3963 gdb::unique_xmalloc_ptr.
3964 * cli/cli-dump.c (scan_filename): Rename from
3965 scan_filename_with_cleanup. Change return type.
3966 (scan_expression): Rename from scan_expression_with_cleanup.
3967 Change return type.
3968 (dump_memory_to_file, dump_value_to_file, restore_command):
3969 Use gdb::unique_xmalloc_ptr. Update.
3970 * cli/cli-cmds.c (find_and_open_script): Use
3971 gdb::unique_xmalloc_ptr.
3972 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3973 * symmisc.c (maintenance_print_symbols)
3974 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3975 * symfile.c (symfile_bfd_open, generic_load)
3976 (add_symbol_file_command, remove_symbol_file_command): Use
3977 gdb::unique_xmalloc_ptr.
3978 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3979 * psymtab.c (maintenance_print_psymbols): Use
3980 gdb::unique_xmalloc_ptr.
3981 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3982 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3983 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3984 (reload_shared_libraries_1): Likewise.
3985
3232fabd
TT
39862017-08-05 Tom Tromey <tom@tromey.com>
3987
3988 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3989 (rust_op_vector, rust_set_vector): New typedefs.
3990 (current_parser): New global.
3991 (work_obstack): Change to pointer type. Update all users.
3992 (rust_ast, pstate): Remove globals.
3993 (struct rust_parser): New.
3994 (%union) <params, field_inits>: Change type.
3995 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3996 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3997 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3998 (convert_params_to_types, convert_params_to_expression): Change
3999 type of "params".
4000 (ast_string): Change type of "fields".
4001 (rust_parse): Make a rust_parser. Remove cleanups.
4002 (rust_lex_tests): Make and install an auto_obstack.
4003
f02fd774
YQ
40042017-08-04 Yao Qi <yao.qi@linaro.org>
4005
4006 * configure.srv (ipa_x32_linux_regobj): New.
4007 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4008 instead of X86_TDESC_AVX512.
4009 (initialize_low_tracepoint): Call
4010 init_registers_x32_avx_avx512_linux.
4011
91975afd
YQ
40122017-08-04 Yao Qi <yao.qi@linaro.org>
4013
4014 * utils.h (gdb_argv): Add namespace std for nullptr_t.
4015
2331fa3a
RK
40162017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
4017
4018 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4019
744e4fe1
TT
40202017-08-03 Tom Tromey <tom@tromey.com>
4021
4022 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4023 Remove.
4024 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4025
1c034b67
TT
40262017-08-03 Tom Tromey <tom@tromey.com>
4027
4028 * python/py-param.c (compute_enum_values): Use gdb_argv.
4029
773a1edc
TT
40302017-08-03 Tom Tromey <tom@tromey.com>
4031
4032 * utils.h (struct gdb_argv_deleter): New.
4033 (gdb_argv): New class.
4034 * utils.c (gdb_argv::reset): New method.
4035 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4036 * tracefile.c (tsave_command): Use gdb_argv.
4037 * top.c (new_ui_command): Use gdb_argv.
4038 * symmisc.c (maintenance_print_symbols)
4039 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4040 * symfile.c (symbol_file_command, generic_load)
4041 (remove_symbol_file_command): Use gdb_argv.
4042 * stack.c (backtrace_command): Use gdb_argv.
4043 * source.c (add_path, show_substitute_path_command)
4044 (unset_substitute_path_command, set_substitute_path_command):
4045 Use gdb_argv.
4046 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4047 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4048 * remote.c (extended_remote_run, remote_put_command)
4049 (remote_get_command, remote_delete_command): Use gdb_argv.
4050 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4051 (gdbsim_open): Use gdb_argv.
4052 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4053 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4054 * procfs.c (procfs_info_proc): Use gdb_argv.
4055 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4056 * infrun.c (handle_command): Use gdb_argv.
4057 * inferior.c (add_inferior_command, clone_inferior_command):
4058 Use gdb_argv.
4059 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4060 * exec.c (exec_file_command): Use gdb_argv.
4061 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4062 * compile/compile.c (build_argc_argv): Use gdb_argv.
4063
0d50bde3
TT
40642017-08-03 Tom Tromey <tom@tromey.com>
4065
4066 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4067
7f968c89
TT
40682017-08-03 Tom Tromey <tom@tromey.com>
4069
4070 * python/python.c (compute_python_string): Return std::string.
4071 (gdbpy_eval_from_control_command): Update.
4072 (do_start_initialization): Use std::string.
4073 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4074 xstrprintf.
4075 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4076 xstrprintf.
4077
3c9ebddd
TT
40782017-08-03 Tom Tromey <tom@tromey.com>
4079
4080 * top.h (do_restore_instream_cleanup): Remove.
4081 * top.c (do_restore_instream_cleanup): Remove.
4082 (read_command_file): Use scoped_restore.
4083 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4084
b51b225e
TT
40852017-08-03 Tom Tromey <tom@tromey.com>
4086
4087 * cli/cli-script.c (execute_user_command)
4088 (execute_control_command): Use scoped_restore.
4089
ac991630
TT
40902017-08-03 Tom Tromey <tom@tromey.com>
4091
4092 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4093 (execute_user_command): Remove user_call_depth; use
4094 user_args_stack's size instead.
4095
898e0c8e
TT
40962017-08-03 Tom Tromey <tom@tromey.com>
4097
4098 * top.h (in_user_command): Remove.
4099 * top.c (in_user_command): Remove.
4100 * cli/cli-script.c (do_restore_user_call_depth)
4101 (execute_user_command): Update.
4102
26fcd5d7
TT
41032017-08-03 Tom Tromey <tom@tromey.com>
4104
4105 * valops.c (search_struct_method): Use gdb::byte_vector.
4106 * valarith.c (value_concat): Use std::vector.
4107 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4108 (simple_search_memory): Likewise.
4109 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4110 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4111 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4112 * elfread.c (elf_rel_plt_read): Use std::string.
4113 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4114 * cli/cli-dump.c (restore_section_callback): Use
4115 gdb::byte_vector.
4116
7c218e6c
TT
41172017-08-03 Tom Tromey <tom@tromey.com>
4118
4119 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4120
31b68d4a
TT
41212017-08-03 Tom Tromey <tom@tromey.com>
4122
4123 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4124 (tui_register_format): Use scoped_restore.
4125
2ec845e7
TT
41262017-08-03 Tom Tromey <tom@tromey.com>
4127
4128 * reverse.c (exec_direction_default): Remove.
4129 (exec_reverse_once): Use scoped_restore.
4130 * remote.c (restore_remote_timeout): Remove.
4131 (remote_flash_erase, remote_flash_write, remote_flash_done)
4132 (readchar, remote_serial_write): Use scoped_restore.
4133 * cli/cli-script.c (struct source_cleanup_lines_args)
4134 (source_cleanup_lines): Remove.
4135 (script_from_file): Use scoped_restore.
4136 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4137 (source_command): Use scoped_restore.
4138
b3bc8453
TT
41392017-08-03 Tom Tromey <tom@tromey.com>
4140
4141 * utils.h (make_cleanup_free_so): Remove.
4142 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4143 * solist.h (struct so_deleter): New.
4144 (so_list_up): New typedef.
4145 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4146
e3ad2841
TT
41472017-08-03 Tom Tromey <tom@tromey.com>
4148
4149 * utils.h (make_cleanup_restore_current_language): Remove.
4150 * utils.c (do_restore_current_language)
4151 (make_cleanup_restore_current_language): Remove.
4152 * parse.c (parse_exp_in_context_1)
4153 (parse_expression_with_language): Use
4154 scoped_restore_current_language.
4155 * mi/mi-main.c (mi_cmd_execute): Use
4156 scoped_restore_current_language.
4157 * language.h (scoped_restore_current_language): New class.
4158
b80cf838
TT
41592017-08-03 Tom Tromey <tom@tromey.com>
4160
4161 * compile/compile.c (cleanup_unlink_file): Remove.
4162 (compile_to_object): Use gdb::unlinker.
4163 (eval_compile_command): Likewise.
4164
fad0444a
TT
41652017-08-03 Tom Tromey <tom@tromey.com>
4166
4167 * utils.h (make_cleanup_fclose): Remove.
4168 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4169
6e7bc05c
TT
41702017-08-03 Tom Tromey <tom@tromey.com>
4171
4172 * top.c (open_terminal_stream): Return gdb_file_up.
4173 (new_ui_command): Update.
4174
4a45905b
TT
41752017-08-03 Tom Tromey <tom@tromey.com>
4176
4177 * source.c (print_source_lines_base, forward_search_command)
4178 (reverse_search_command): Use gdb_file_up.
4179
7cd06d6e
TT
41802017-08-03 Tom Tromey <tom@tromey.com>
4181
4182 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4183
ed166945
TT
41842017-08-03 Tom Tromey <tom@tromey.com>
4185
4186 * cli/cli-cmds.c (find_and_open_script): Change return type.
4187 Remove "streamp" and "full_path" parameters.
4188 (source_script_with_search): Update.
4189 * auto-load.c (source_script_file): Update.
4190 * cli/cli-cmds.h (find_and_open_script): Change type.
4191 (open_script): New struct.
4192
d419f42d
TT
41932017-08-03 Tom Tromey <tom@tromey.com>
4194
4195 * xml-support.c (xml_fetch_content_from_file): Update.
4196 * ui-file.c (stdio_file::open): Update.
4197 * tracefile-tfile.c (tfile_start): Update.
4198 * remote.c (remote_file_put, remote_file_get): Update.
4199 * nat/linux-procfs.c (linux_proc_get_int)
4200 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4201 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4202 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4203 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4204 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4205 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4206 * linux-nat.c (linux_proc_pending_signals): Update.
4207 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4208 (file_closer): Remove.
4209 * compile/compile.c (compile_to_object): Update.
4210 * common/filestuff.h (struct gdb_file_deleter): New.
4211 (gdb_file_up): New typedef.
4212 (gdb_fopen_cloexec): Change return type.
4213 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4214 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4215 (dump_binary_file, restore_binary_file): Update.
4216 * auto-load.c (auto_load_objfile_script_1): Update.
4217
4a2b031d
TT
42182017-08-03 Tom Tromey <tom@tromey.com>
4219
4220 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4221 (info_static_tracepoint_markers_command): Likewise.
4222 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4223 * skip.c (skip_info): Use ui_out_emit_table.
4224 * progspace.c (print_program_space): Use ui_out_emit_table.
4225 * osdata.c (info_osdata): Use ui_out_emit_table.
4226 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4227 ui_out_emit_table.
4228 * linux-thread-db.c (info_auto_load_libthread_db): Use
4229 ui_out_emit_table.
4230 * inferior.c (print_inferior): Use ui_out_emit_table.
4231 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4232 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4233 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4234 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4235 * ui-out.h (class ui_out_emit_table): New.
4236
a4f320fd
MR
42372017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4238
4239 * mips-tdep.c (mips_fpu_type_str): New function.
4240 (mips_dump_tdep): Call it.
4241
a2f1f308
MR
42422017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4243
4244 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4245 `->mips_fpu_type'.
4246
7e5ed83b
XR
42472017-07-31 Xavier Roirand <roirand@adacore.com>
4248
4249 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4250
4c9dc811
XR
42512017-07-27 Xavier Roirand <roirand@adacore.com>
4252
4253 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4254
27d41eac
YQ
42552017-07-26 Yao Qi <yao.qi@linaro.org>
4256
4257 * cli/cli-cmds.c (maintenancechecklist): New variable.
4258 * gdbcmd.h (maintenancechecklist): Declare it.
4259 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4260 Call i386_linux_read_description with different masks.
4261 * maint.c (maintenance_check_command): New function.
4262 (_initialize_maint_cmds): Call add_prefix_cmd.
4263 * target-descriptions.c (tdesc_reg): override operator != and ==.
4264 (tdesc_type): Likewise.
4265 (tdesc_feature): Likewise.
4266 (target_desc): Likewise.
4267 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4268 (maintenance_check_xml_descriptions): New function.
4269 (_initialize_target_descriptions) Add command "xml-descriptions".
4270 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4271
ea03d0d3
YQ
42722017-07-26 Yao Qi <yao.qi@linaro.org>
4273
4274 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4275 Include features/i386/32bit-*.c.
4276 (i386_linux_read_description): Generate target description if it
4277 doesn't exist.
4278 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4279 functions.
4280 * features/i386/32bit-linux.c: Re-generated.
4281 * features/i386/32bit-sse.c: Likewise.
4282 * target-descriptions.c (print_c_feature::visit): Print code to
4283 set register number if needed.
4284 (print_c_feature) <m_next_regnum>: New field.
4285
25aa13e5
YQ
42862017-07-26 Yao Qi <yao.qi@linaro.org>
4287
4288 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4289 (FEATURE_XMLFILES): New.
4290 (FEATURE_CFILES): New.
4291 New rules.
4292 (clean-cfiles): Remove generated c files.
4293 * features/i386/32bit-avx.c: Generated.
4294 * features/i386/32bit-avx512.c: Generated.
4295 * features/i386/32bit-core.c: Generated.
4296 * features/i386/32bit-linux.c: Generated.
4297 * features/i386/32bit-mpx.c: Generated.
4298 * features/i386/32bit-pkeys.c: Generated.
4299 * features/i386/32bit-sse.c: Generated.
4300 * target-descriptions.c: Include algorithm.
4301 (tdesc_element_visitor): Add method visit_end.
4302 (print_c_tdesc): Implement visit_end.
4303 (print_c_tdesc:: m_filename_after_features): Move it to
4304 protected.
4305 (print_c_feature): New class.
4306 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4307 name starts with "i386/32bit-".
4308
6eb1e6a8
YQ
43092017-07-26 Yao Qi <yao.qi@linaro.org>
4310
4311 * target-descriptions.c (tdesc_element_visitor): New class.
4312 (tdesc_element): New class.
4313 (tdesc_reg): Inherit from tdesc_element.
4314 (tdesc_reg::accept): New function.
4315 (tdesc_type): Inherit from tdesc_element.
4316 (tdesc_type::accept): New function.
4317 (tdesc_feature): Inherit from tdesc_element.
4318 (tdesc_feature::accept): New function.
4319 (target_desc): Inherit from tdesc_element.
4320 (target_desc::target_desc): New.
4321 (target_desc::~target_desc): New.
4322 (target_desc::accept): New.
4323 (allocate_target_description): Use new.
4324 (free_target_description): Use delete.
4325 (print_c_tdesc): New class.
4326 (maint_print_c_tdesc_cmd): Adjust.
4327
4328 * features/aarch64.c: Re-generated.
4329 * features/arc-arcompact.c: Re-generated.
4330 * features/arc-v2.c: Re-generated.
4331 * features/arm/arm-with-iwmmxt.c: Re-generated.
4332 * features/arm/arm-with-m.c: Re-generated.
4333 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4334 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4335 * features/arm/arm-with-neon.c: Re-generated.
4336 * features/arm/arm-with-vfpv2.c: Re-generated.
4337 * features/arm/arm-with-vfpv3.c: Re-generated.
4338 * features/i386/amd64-avx-avx512.c: Re-generated.
4339 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4340 * features/i386/amd64-avx.c: Re-generated.
4341 * features/i386/amd64-avx-linux.c: Re-generated.
4342 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4343 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4344 * features/i386/amd64-avx-mpx.c: Re-generated.
4345 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4346 * features/i386/amd64.c: Re-generated.
4347 * features/i386/amd64-linux.c: Re-generated.
4348 * features/i386/amd64-mpx.c: Re-generated.
4349 * features/i386/amd64-mpx-linux.c: Re-generated.
4350 * features/i386/i386-avx-avx512.c: Re-generated.
4351 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4352 * features/i386/i386-avx.c: Re-generated.
4353 * features/i386/i386-avx-linux.c: Re-generated.
4354 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4355 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4356 * features/i386/i386-avx-mpx.c: Re-generated.
4357 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4358 * features/i386/i386.c: Re-generated.
4359 * features/i386/i386-linux.c: Re-generated.
4360 * features/i386/i386-mmx.c: Re-generated.
4361 * features/i386/i386-mmx-linux.c: Re-generated.
4362 * features/i386/i386-mpx.c: Re-generated.
4363 * features/i386/i386-mpx-linux.c: Re-generated.
4364 * features/i386/x32-avx-avx512.c: Re-generated.
4365 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4366 * features/i386/x32-avx.c: Re-generated.
4367 * features/i386/x32-avx-linux.c: Re-generated.
4368 * features/i386/x32.c: Re-generated.
4369 * features/i386/x32-linux.c: Re-generated.
4370 * features/microblaze.c: Re-generated.
4371 * features/microblaze-with-stack-protect.c: Re-generated.
4372 * features/mips64-dsp-linux.c: Re-generated.
4373 * features/mips64-linux.c: Re-generated.
4374 * features/mips-dsp-linux.c: Re-generated.
4375 * features/mips-linux.c: Re-generated.
4376 * features/nds32.c: Re-generated.
4377 * features/nios2.c: Re-generated.
4378 * features/nios2-linux.c: Re-generated.
4379 * features/rs6000/powerpc-32.c: Re-generated.
4380 * features/rs6000/powerpc-32l.c: Re-generated.
4381 * features/rs6000/powerpc-403.c: Re-generated.
4382 * features/rs6000/powerpc-403gc.c : Re-generated.
4383 * features/rs6000/powerpc-405.c: Re-generated.
4384 * features/rs6000/powerpc-505.c: Re-generated.
4385 * features/rs6000/powerpc-601.c: Re-generated.
4386 * features/rs6000/powerpc-602.c: Re-generated.
4387 * features/rs6000/powerpc-603.c: Re-generated.
4388 * features/rs6000/powerpc-604.c: Re-generated.
4389 * features/rs6000/powerpc-64.c: Re-generated.
4390 * features/rs6000/powerpc-64l.c: Re-generated.
4391 * features/rs6000/powerpc-7400.c: Re-generated.
4392 * features/rs6000/powerpc-750.c: Re-generated.
4393 * features/rs6000/powerpc-860.c: Re-generated.
4394 * features/rs6000/powerpc-altivec32.c: Re-generated.
4395 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4396 * features/rs6000/powerpc-altivec64.c: Re-generated.
4397 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4398 * features/rs6000/powerpc-cell32l.c: Re-generated.
4399 * features/rs6000/powerpc-cell64l.c: Re-generated.
4400 * features/rs6000/powerpc-e500.c: Re-generated.
4401 * features/rs6000/powerpc-e500l.c: Re-generated.
4402 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4403 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4404 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4405 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4406 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4407 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4408 * features/rs6000/powerpc-vsx32.c: Re-generated.
4409 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4410 * features/rs6000/powerpc-vsx64.c: Re-generated.
4411 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4412 * features/rs6000/rs6000.c: Re-generated.
4413 * features/s390-linux32.c: Re-generated.
4414 * features/s390-linux32v1.c: Re-generated.
4415 * features/s390-linux32v2.c: Re-generated.
4416 * features/s390-linux64.c: Re-generated.
4417 * features/s390-linux64v1.c: Re-generated.
4418 * features/s390-linux64v2.c: Re-generated.
4419 * features/s390-te-linux64.c: Re-generated.
4420 * features/s390-tevx-linux64.c: Re-generated.
4421 * features/s390-vx-linux64.c: Re-generated.
4422 * features/s390x-linux64.c: Re-generated.
4423 * features/s390x-linux64v1.c: Re-generated.
4424 * features/s390x-linux64v2.c: Re-generated.
4425 * features/s390x-te-linux64.c: Re-generated.
4426 * features/s390x-tevx-linux64.c: Re-generated.
4427 * features/s390x-vx-linux64.c: Re-generated.
4428 * features/sparc/sparc32-solaris.c: Re-generated.
4429 * features/sparc/sparc64-solaris.c: Re-generated.
4430 * features/tic6x-c62x.c: Re-generated.
4431 * features/tic6x-c62x-linux.c: Re-generated.
4432 * features/tic6x-c64x.c: Re-generated.
4433 * features/tic6x-c64x-linux.c: Re-generated.
4434 * features/tic6x-c64xp.c: Re-generated.
4435 * features/tic6x-c64xp-linux.c: Re-generated.
4436
35b4818d
YQ
44372017-07-26 Yao Qi <yao.qi@linaro.org>
4438
4439 * i386-linux-tdep.c (i386_linux_read_description): New function.
4440 (i386_linux_core_read_description): Call
4441 i386_linux_read_description.
4442 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4443 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4444 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4445 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4446 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4447 * x86-linux-nat.c (x86_linux_read_description): Call
4448 i386_linux_read_description.
4449
8e2141c6
YQ
44502017-07-26 Yao Qi <yao.qi@linaro.org>
4451
4452 * NEWS: Mention it.
4453 * features/Makefile (%.c: %.xml): Pass the xml file name to
4454 command "maint print c-tdesc".
4455 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4456 name from 'arg'.
4457
b468ff4c
YQ
44582017-07-26 Yao Qi <yao.qi@linaro.org>
4459
4460 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4461 in-class initialization.
4462 (tdesc_create_feature): Call new instead of XCNEW.
4463 (free_target_description): Ue delete.
4464
b9c0e1b4
JB
44652017-07-25 John Baldwin <jhb@FreeBSD.org>
4466
4467 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4468
a04b5337
YQ
44692017-07-25 Yao Qi <yao.qi@linaro.org>
4470
4471 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4472 constant.
4473 (amd64_x32_init_abi): Likewise.
4474 * amd64-tdep.h (amd64_init_abi): Update declaration.
4475 (amd64_x32_init_abi): Likewise.
4476
02ad7fc2
YQ
44772017-07-25 Yao Qi <yao.qi@linaro.org>
4478
4479 PR tdep/21717
4480 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4481 condition for FPSCR.
4482 (arm_linux_store_inferior_registers): Likewise.
4483
b6f48cb0
TT
44842017-07-22 Tom Tromey <tom@tromey.com>
4485
4486 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4487 <syscalls_counts>: Now a std::vector.
4488 (get_catch_syscall_inferior_data): Use "new".
4489 (catch_syscall_inferior_data_cleanup): Use "delete".
4490 (insert_catch_syscall, remove_catch_syscall)
4491 (clear_syscall_counts): Update.
4492
e12c9b7a
TT
44932017-07-22 Tom Tromey <tom@tromey.com>
4494
4495 * break-catch-syscall.c (syscall_catchpoint)
4496 <syscalls_to_be_caught>: Now a std::vector<int>
4497 (~syscall_catchpoint): Remove.
4498 (insert_catch_syscall, remove_catch_syscall)
4499 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4500 (print_mention_catch_syscall, print_recreate_catch_syscall):
4501 Update.
4502 (create_syscall_event_catchpoint): Change type of "filter"
4503 parameter.
4504 (catch_syscall_split_args): Return a std::vector.
4505 (catch_syscall_command_1, catching_syscall_number_1): Update.
4506
4fa8aeac
TT
45072017-07-22 Tom Tromey <tom@tromey.com>
4508
4509 * break-catch-throw.c (struct exception_catchpoint)
4510 <exception_rx>: Now a std::string.
4511 (~exception_catchpoint): Remove.
4512 (print_one_detail_exception_catchpoint): Update.
4513 (handle_gnu_v3_exceptions): Change type of except_rx.
4514 (extract_exception_regexp): Return a std::string.
4515 (catch_exception_command_1): Update.
4516
f746a154
TT
45172017-07-22 Tom Tromey <tom@tromey.com>
4518
4519 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4520 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4521 std::vector.
4522 <catch_all>: Now a bool.
4523 (~signal_catchpoint): Remove.
4524 (signal_catchpoint_insert_location)
4525 (signal_catchpoint_remove_location)
4526 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4527 (signal_catchpoint_print_mention)
4528 (signal_catchpoint_print_recreate)
4529 (signal_catchpoint_explains_signal): Update.
4530 (create_signal_catchpoint): Change type of "filter" and
4531 "catch_all".
4532 (catch_signal_split_args): Return a std::vector. Change type of
4533 "catch_all".
4534 (catch_signal_command): Update.
4535
47e77640
PA
45362017-07-20 Pedro Alves <palves@redhat.com>
4537
4538 * ada-lang.c (ada_language_defn): Make extern.
4539 (_initialize_ada_language): Remove add_language call.
4540 * c-lang.c (c_language_defn, cplus_language_defn)
4541 (asm_language_defn, minimal_language_defn): Make extern.
4542 (_initialize_c_language): Delete.
4543 * completer.c (compare_cstrings): Delete, moved to utils.h.
4544 * d-lang.c (d_language_defn): Make extern.
4545 (_initialize_d_language): Remove add_language calls.
4546 * defs.h (enum language): Add comment.
4547 * f-lang.c (f_language_defn): Make extern.
4548 (_initialize_f_language): Remove add_language call.
4549 * go-lang.c (go_language_defn): Make extern.
4550 (_initialize_go_language): Remove add_language call.
4551 * language.c: Include <algorithm>.
4552 (languages): Redefine as const array.
4553 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4554 (set_language_command): Handle "local". Use for-range loop.
4555 (set_language): Remove loop.
4556 (language_enum): Rewrite.
4557 (language_def, language_str): Remove loops.
4558 (add_language): Delete.
4559 (add_set_language_command): New, based on add_languages.
4560 (skip_language_trampoline): Adjust.
4561 (local_language_defn): Delete.
4562 (language_gdbarch_post_init): Adjust.
4563 (_initialize_language): Remove add_language calls. Call
4564 add_set_language_command.
4565 * language.h (add_language): Delete.
4566 (auto_language_defn)
4567 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4568 (asm_language_defn, c_language_defn, cplus_language_defn)
4569 (d_language_defn, f_language_defn, go_language_defn)
4570 (m2_language_defn, objc_language_defn, opencl_language_defn)
4571 (pascal_language_defn, rust_language_defn): Declare.
4572 * m2-lang.c (m2_language_defn): Make extern.
4573 (_initialize_m2_language): Remove add_language call.
4574 * objc-lang.c (objc_language_defn): Make extern.
4575 (_initialize_objc_language): Remove add_language call.
4576 * opencl-lang.c (opencl_language_defn): Make extern.
4577 (_initialize_opencl_language): Remove add_language call.
4578 * p-lang.c (pascal_language_defn): Make extern.
4579 (_initialize_pascal_language): Delete.
4580 * rust-lang.c (rust_language_defn): Make extern.
4581 (_initialize_rust_language): Delete.
4582 * utils.h (compare_cstrings): New static inline function.
4583
edb0c9cb
PA
45842017-07-20 Pedro Alves <palves@redhat.com>
4585
4586 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4587 (get_var_value): Constify parameters.
4588 (get_int_var_value): Change prototype.
4589 (to_fixed_range_type): Adjust.
4590 * ada-lang.h (get_int_var_value): Change prototype.
4591
a778f165
PA
45922017-07-20 Pedro Alves <palves@redhat.com>
4593
4594 * dwarf2read.c (dw2_lookup_symbol): Use
4595 SYMBOL_MATCHES_SEARCH_NAME.
4596 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4597
42edd901
PA
45982017-07-20 Pedro Alves <palves@redhat.com>
4599
4600 * block.c (block_iter_name_step, block_iter_name_first)
4601 (block_iter_name_next): Delete.
4602 (block_lookup_symbol_primary): Adjust to use
4603 dict_iter_match_first/dict_iter_match_next.
4604 * block.h (block_iter_name_first, block_iter_name_next): Delete
4605 declarations.
4606 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4607 dict_iter_match_first/dict_iter_match_next.
4608
cf325299
PA
46092017-07-20 Pedro Alves <palves@redhat.com>
4610
4611 * cp-support.c (cp_find_first_component_aux): Add missing case for
4612 end of string.
4613
c5ed0576
DB
46142017-07-18 David Blaikie <dblaikie@gmail.com>
4615
4616 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4617 of dwo_cu's dwo_file.
4618
27841e76
YQ
46192017-07-18 Yao Qi <yao.qi@linaro.org>
4620
4621 * remote.c (store_registers_using_G): Remove one line comment.
4622
cfb7e58b
YQ
46232017-07-18 Yao Qi <yao.qi@linaro.org>
4624
4625 * regcache.c (regcache_cpy): Simplify it.
4626 (regcache::cpy_no_passthrough): Remove it.
4627 * regcache.h (cpy_no_passthrough): Remove it.
4628 (regcache_dup, regcache_cpy): Update comments.
4629
386535dd
PA
46302017-07-18 Pedro Alves <palves@redhat.com>
4631
4632 * remote-sim.c (sim_command_completer): Adjust to work with a
4633 completion_tracker instead of a VEC.
4634
c45ec17c
PA
46352017-07-17 Pedro Alves <palves@redhat.com>
4636
4637 * completer.c (complete_source_filenames): New function.
4638 (complete_address_and_linespec_locations): New function.
4639 (location_completer): Use complete_address_and_linespec_locations.
4640 (completion_tracker::build_completion_result): Honor the tracker's
4641 request to suppress append.
4642 * completer.h (completion_tracker::suppress_append_ws)
4643 (completion_tracker::set_suppress_append_ws): New methods.
4644 (completion_tracker::m_suppress_append_ws): New field.
4645 (complete_source_filenames): New declaration.
4646 * linespec.c (linespec_complete_what): New.
4647 (struct ls_parser) <complete_what, completion_word,
4648 completion_quote_char, completion_quote_end, completion_tracker>:
4649 New fields.
4650 (string_find_incomplete_keyword_at_end): New.
4651 (linespec_lexer_lex_string): Record quote char. If in completion
4652 mode, don't throw.
4653 (linespec_lexer_consume_token): Advance the completion word point.
4654 (linespec_lexer_peek_token): Save/restore completion info.
4655 (save_stream_and_consume_token): New.
4656 (set_completion_after_number): New.
4657 (linespec_parse_basic): Set what to complete next depending on
4658 token. Handle function and label completions specially.
4659 (parse_linespec): Disable objc shortcut in completion mode. Set
4660 what to complete next depending on token type. Skip keyword if in
4661 completion mode.
4662 (complete_linespec_component, linespec_complete): New.
4663 * linespec.h (linespec_complete): Declare.
4664
be966d42
PA
46652017-07-17 Pedro Alves <palves@redhat.com>
4666
4667 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4668 Handle 'operator<' / 'operator<<'.
4669
a2459270
PA
46702017-07-17 Pedro Alves <palves@redhat.com>
4671
4672 * completer.c (collect_explicit_location_matches): Handle
4673 MATCH_LABEL.
4674 (convert_explicit_location_to_linespec): New, factored out from
4675 ...
4676 (convert_explicit_location_to_sals): ... this.
4677 (complete_label): New.
4678 (linespec_complete_label, find_label_symbols_in_block): New.
4679 (find_label_symbols): Add completion_mode parameter and adjust to
4680 call find_label_symbols_in_block.
4681 * linespec.h (linespec_complete_label): Declare.
4682
c6756f62
PA
46832017-07-17 Pedro Alves <palves@redhat.com>
4684
4685 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4686 complete_symbol_mode parameter.
4687 * cli/cli-cmds.c (complete_command): Get the completion result out
4688 of the handle_brkchars tracker if used a custom word point.
4689 * completer.c: Include "linespec.h".
4690 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4691 (advance_to_expression_complete_word_point): New.
4692 (completion_tracker::completes_to_completion_word): New.
4693 (complete_files_symbols): Pass down
4694 complete_symbol_mode::EXPRESSION.
4695 (explicit_options, probe_options): New.
4696 (collect_explicit_location_matches): Complete on the
4697 explictit_loc->foo instead of word. Use
4698 linespec_complete_function. Handle MATCH_LINE. Handle offering
4699 keyword and options completions.
4700 (backup_text_ptr): Delete.
4701 (skip_keyword): New.
4702 (complete_explicit_location): Remove 'word' parameter. Add
4703 language, quoted_arg_start and quoted_arg_end parameters.
4704 Rewrite, parsing left to right.
4705 (location_completer): Rewrite.
4706 (location_completer_handle_brkchars): New function.
4707 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4708 (enum complete_line_internal_reason): Adjust comments.
4709 (completion_tracker::discard_completions): New.
4710 (completer_handle_brkchars_func_for_completer): Handle
4711 location_completer.
4712 (gdb_custom_word_point_brkchars)
4713 (gdb_org_rl_basic_quote_characters): New.
4714 (gdb_completion_word_break_characters_throw)
4715 (completion_find_completion_word): Handle trackers that use a
4716 custom word point.
4717 (completion_tracker::advance_custom_word_point_by): New.
4718 (completion_tracker::build_completion_result): Don't rely on
4719 readline appending the quote char.
4720 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4721 use a custom word point.
4722 (gdb_rl_attempted_completion_function): Restore
4723 rl_basic_quote_characters.
4724 * completer.h (class completion_tracker): Extend intro comment.
4725 (completion_tracker::set_quote_char)
4726 (completion_tracker::quote_char)
4727 (completion_tracker::set_use_custom_word_point)
4728 (completion_tracker::use_custom_word_point)
4729 (completion_tracker::custom_word_point)
4730 (completion_tracker::set_custom_word_point)
4731 (completion_tracker::advance_custom_word_point_by)
4732 (completion_tracker::completes_to_completion_word)
4733 (completion_tracker::discard_completions): New methods.
4734 (completion_tracker::m_quote_char)
4735 (completion_tracker::m_use_custom_word_point)
4736 (completion_tracker::m_custom_word_point): New fields.
4737 (advance_to_expression_complete_word_point): Declare.
4738 * f-lang.c (f_collect_symbol_completion_matches): Add
4739 complete_symbol_mode parameter.
4740 * language.h (struct language_defn)
4741 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4742 parameter.
4743 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4744 (linespec_complete_function): New function.
4745 (linespec_lexer_lex_keyword): Adjust.
4746 * linespec.h (linespec_keywords, linespec_complete_function): New
4747 declarations.
4748 * location.c (find_end_quote): New function.
4749 (explicit_location_lex_one): Add explicit_completion_info
4750 parameter. Save quoting info. Don't throw if being called for
4751 completion. Don't handle Ada operators here.
4752 (is_cp_operator, skip_op_false_positives, first_of)
4753 (explicit_location_lex_one_function): New function.
4754 (string_to_explicit_location): Replace 'dont_throw' parameter with
4755 an explicit_completion_info pointer parameter. Handle it. Don't
4756 use explicit_location_lex_one to lex function names. Use
4757 explicit_location_lex_one_function instead.
4758 * location.h (struct explicit_completion_info): New.
4759 (string_to_explicit_location): Replace 'dont_throw' parameter with
4760 an explicit_completion_info pointer parameter.
4761 * symtab.c (default_collect_symbol_completion_matches_break_on):
4762 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4763 (default_collect_symbol_completion_matches)
4764 (collect_symbol_completion_matches): Add complete_symbol_mode
4765 parameter.
4766 (collect_symbol_completion_matches_type): Pass down
4767 complete_symbol_mode::EXPRESSION.
4768 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4769 parameter. Handle LINESPEC mode.
4770 * symtab.h (complete_symbol_mode): New.
4771 (default_collect_symbol_completion_matches_break_on)
4772 (default_collect_symbol_completion_matches)
4773 (collect_symbol_completion_matches)
4774 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4775 parameter.
4776
1d550c82
PA
47772017-07-17 Pedro Alves <palves@redhat.com>
4778
4779 * utils.c (enum class strncmp_iw_mode): New.
4780 (strcmp_iw): Rename to ...
4781 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4782 parameters. Handle them.
4783 (strncmp_iw): New.
4784 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4785 * utils.h (strncmp_iw): Declare.
4786 (strcmp_iw): Move describing comments here.
4787
8090b426
PA
47882017-07-17 Pedro Alves <palves@redhat.com>
4789
4790 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4791 CP_OPERATOR_STR.
4792 * c-typeprint.c (is_type_conversion_operator): Use
4793 CP_OPERATOR_STR.
4794 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4795 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4796 CP_OPERATOR_LEN.
4797 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4798 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4799 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4800 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4801 CP_OPERATOR_STR.
4802 * location.c: Include "cp-support.h".
4803 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4804 CP_OPERATOR_STR.
4805 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4806 CP_OPERATOR_LEN.
4807
6a2c1b87
PA
48082017-07-17 Pedro Alves <palves@redhat.com>
4809
4810 * cli/cli-cmds.c (complete_command): Use a completion tracker
4811 along with completion_find_completion_word for handle_brkchars
4812 phase.
4813 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4814 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4815 (struct gdb_rl_completion_word_info): New.
4816 (gdb_rl_find_completion_word): New.
4817 (completion_find_completion_word): New.
4818 * completer.h (completion_find_completion_word): Declare.
4819
eb3ff9a5
PA
48202017-07-17 Pedro Alves <palves@redhat.com>
4821
4822 * ada-lang.c (symbol_completion_match): Adjust comments.
4823 (symbol_completion_add): Replace vector parameter with
4824 completion_tracker parameter. Use it.
4825 (ada_make_symbol_completion_list): Rename to...
4826 (ada_collect_symbol_completion_matches): ... this. Add
4827 completion_tracker parameter and use it.
4828 (ada_language_defn): Adjust.
4829 * break-catch-syscall.c (catch_syscall_completer): Adjust
4830 prototype and work with completion_tracker instead of VEC.
4831 * breakpoint.c (condition_completer): Adjust prototype and work
4832 with completion_tracker instead of VEC.
4833 * c-lang.c (c_language_defn, cplus_language_defn)
4834 (asm_language_defn, minimal_language_defn): Adjust to renames.
4835 * cli/cli-cmds.c (complete_command): Rework using
4836 completion_tracker. Catch exceptions when completing.
4837 * cli/cli-decode.c (integer_unlimited_completer)
4838 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4839 with completion_tracker instead of VEC.
4840 * command.h (struct completion_tracker): Forward declare.
4841 (completer_ftype, completer_handle_brkchars_ftype): Change
4842 types.
4843 (complete_on_cmdlist, complete_on_enum): Adjust.
4844 * completer.c: Include <algorithm>.
4845 (struct gdb_completer_state): New.
4846 (current_completion): New global.
4847 (readline_line_completion_function): Delete.
4848 (noop_completer, filename_completer)
4849 (filename_completer_handle_brkchars, complete_files_symbols)
4850 (linespec_location_completer): Adjust to work with a
4851 completion_tracker instead of a VEC.
4852 (string_or_empty): New.
4853 (collect_explicit_location_matches): Adjust to work with a
4854 completion_tracker instead of a VEC.
4855 (explicit_location_completer): Rename to ...
4856 (complete_explicit_location): ... this and adjust to work with a
4857 completion_tracker instead of a VEC.
4858 (location_completer): Adjust to work with a completion_tracker
4859 instead of a VEC.
4860 (add_struct_fields): Adjust to work with a completion_list instead
4861 of VEC.
4862 (expression_completer): Rename to ...
4863 (complete_expression): ... this and adjust to work with a
4864 completion_tracker instead of a VEC. Use complete_files_symbols.
4865 (expression_completer): Reimplement on top of complete_expression.
4866 (symbol_completer): Adjust to work with a completion_tracker
4867 instead of a VEC.
4868 (enum complete_line_internal_reason): Add describing comments.
4869 (complete_line_internal_normal_command): Adjust to work with a
4870 completion_tracker instead of a VEC.
4871 (complete_line_internal): Rename to ...
4872 (complete_line_internal_1): ... this and adjust to work with a
4873 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4874 handle_brkchars phase.
4875 (new_completion_tracker): Delete.
4876 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4877 complete_line_internal_1.
4878 (free_completion_tracker): Delete.
4879 (INITIAL_COMPLETION_HTAB_SIZE): New.
4880 (completion_tracker::completion_tracker)
4881 (completion_tracker::~completion_tracker): New.
4882 (maybe_add_completion): Delete.
4883 (completion_tracker::maybe_add_completion)
4884 (completion_tracker::add_completion)
4885 (completion_tracker::add_completions): New.
4886 (throw_max_completions_reached_error): Delete.
4887 (complete_line): Adjust to work with a completion_tracker instead
4888 of a VEC. Don't create a completion_tracker_t or check for max
4889 completions here.
4890 (command_completer, command_completer_handle_brkchars)
4891 (signal_completer, reg_or_group_completer_1)
4892 (reg_or_group_completer, default_completer_handle_brkchars):
4893 Adjust to work with a completion_tracker.
4894 (gdb_completion_word_break_characters_throw): New.
4895 (gdb_completion_word_break_characters): Reimplement.
4896 (line_completion_function): Delete.
4897 (completion_tracker::recompute_lowest_common_denominator)
4898 (expand_preserving_ws)
4899 (completion_tracker::build_completion_result)
4900 (completion_result::completion_result)
4901 (completion_result::completion_result)
4902 (completion_result::~completion_result)
4903 (completion_result::completion_result)
4904 (completion_result::release_match_list, compare_cstrings)
4905 (completion_result::sort_match_list)
4906 (completion_result::reset_match_list)
4907 (gdb_rl_attempted_completion_function_throw)
4908 (gdb_rl_attempted_completion_function): New.
4909 * completer.h (completion_list, struct completion_result)
4910 (class completion_tracker): New.
4911 (complete_line): Add completion_tracker parameter.
4912 (readline_line_completion_function): Delete.
4913 (gdb_rl_attempted_completion_function): New.
4914 (noop_completer, filename_completer, expression_completer)
4915 (location_completer, symbol_completer, command_completer)
4916 (signal_completer, reg_or_group_completer): Update prototypes.
4917 (completion_tracker_t, new_completion_tracker)
4918 (make_cleanup_free_completion_tracker): Delete.
4919 (enum maybe_add_completion_enum): Delete.
4920 (maybe_add_completion): Delete.
4921 (throw_max_completions_reached_error): Delete.
4922 * corefile.c (complete_set_gnutarget): Adjust to work with a
4923 completion_tracker instead of a VEC.
4924 * cp-abi.c (cp_abi_completer): Adjust to work with a
4925 completion_tracker instead of a VEC.
4926 * d-lang.c (d_language_defn): Adjust.
4927 * disasm.c (disassembler_options_completer): Adjust to work with a
4928 completion_tracker instead of a VEC.
4929 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4930 (f_collect_symbol_completion_matches): ... this. Adjust to work
4931 with a completion_tracker instead of a VEC.
4932 (f_language_defn): Adjust.
4933 * go-lang.c (go_language_defn): Adjust.
4934 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4935 Adjust to work with a completion_tracker instead of a VEC.
4936 * infrun.c (handle_completer): Likewise.
4937 * interps.c (interpreter_completer): Likewise.
4938 * interps.h (interpreter_completer): Likewise.
4939 * language.c (unknown_language_defn, auto_language_defn)
4940 (local_language_defn): Adjust.
4941 * language.h (language_defn::la_make_symbol_completion_list):
4942 Rename to ...
4943 (language_defn::la_collect_symbol_completion_matches): ... this
4944 and adjust to work with a completion_tracker instead of a VEC.
4945 * m2-lang.c (m2_language_defn): Adjust.
4946 * objc-lang.c (objc_language_defn): Adjust.
4947 * opencl-lang.c (opencl_language_defn): Adjust.
4948 * p-lang.c (pascal_language_defn): Adjust.
4949 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4950 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4951 with a completion_tracker.
4952 * rust-lang.c (rust_language_defn): Adjust.
4953 * symtab.c (free_completion_list, do_free_completion_list)
4954 (return_val, completion_tracker): Delete.
4955 (completion_list_add_name, completion_list_add_symbol)
4956 (completion_list_add_msymbol, completion_list_objc_symbol)
4957 (completion_list_add_fields, add_symtab_completions): Add
4958 completion_tracker parameter and use it.
4959 (default_make_symbol_completion_list_break_on_1): Rename to...
4960 (default_collect_symbol_completion_matches_break_on): ... this.
4961 Add completion_tracker parameter and use it instead of allocating
4962 a completion tracker here.
4963 (default_make_symbol_completion_list_break_on): Delete old
4964 implementation.
4965 (default_make_symbol_completion_list): Delete.
4966 (default_collect_symbol_completion_matches): New.
4967 (make_symbol_completion_list): Delete.
4968 (collect_symbol_completion_matches): New.
4969 (make_symbol_completion_type): Rename to ...
4970 (collect_symbol_completion_matches_type): ... this. Add
4971 completion_tracker parameter and use it instead of VEC.
4972 (make_file_symbol_completion_list_1): Rename to...
4973 (collect_file_symbol_completion_matches): ... this. Add
4974 completion_tracker parameter and use it instead of VEC.
4975 (make_file_symbol_completion_list): Delete.
4976 (add_filename_to_list): Use completion_list instead of a VEC.
4977 (add_partial_filename_data::list): Now a completion_list.
4978 (make_source_files_completion_list): Work with a completion_list
4979 instead of a VEC.
4980 * symtab.h: Include "completer.h".
4981 (default_make_symbol_completion_list_break_on)
4982 (default_make_symbol_completion_list, make_symbol_completion_list)
4983 (make_symbol_completion_type, make_file_symbol_completion_list)
4984 (make_source_files_completion_list): Delete.
4985 (default_collect_symbol_completion_matches_break_on)
4986 (default_collect_symbol_completion_matches)
4987 (collect_symbol_completion_matches)
4988 (collect_symbol_completion_matches_type)
4989 (collect_file_symbol_completion_matches)
4990 (make_source_files_completion_list): New.
4991 * top.c (init_main): Don't install a rl_completion_entry_function
4992 hook. Install a rl_attempted_completion_function hook instead.
4993 * tui/tui-layout.c (layout_completer): Adjust to work with a
4994 completion_tracker.
4995 * tui/tui-regs.c (tui_reggroup_completer):
4996 * tui/tui-win.c (window_name_completer, focus_completer)
4997 (winheight_completer): Adjust to work with a completion_tracker.
4998 * value.c: Include "completer.h".
4999 (complete_internalvar): Adjust to work with a completion_tracker.
5000 * value.h (complete_internalvar): Likewise.
5001
6e1dbf8c
PA
50022017-07-17 Pedro Alves <palves@redhat.com>
5003
5004 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5005 renames.
5006 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5007 comments to completer_ftype's declaration.
5008 <completer_handle_brkchars>: Change type to
5009 completer_handle_brkchars_ftype.
5010 * command.h (completer_ftype): Add describing comment and give
5011 names to parameters.
5012 (completer_ftype_void): Rename to ...
5013 (completer_handle_brkchars_ftype) ... this. Add describing comment.
5014 (set_cmd_completer_handle_brkchars): Adjust.
5015 * completer.c (filename_completer_handle_brkchars): New function.
5016 (complete_line_internal_normal_command): New function, factored
5017 out from ...
5018 (complete_line_internal): ... here.
5019 (command_completer_handle_brkchars)
5020 (default_completer_handle_brkchars)
5021 (completer_handle_brkchars_func_for_completer): New functions.
5022 * completer.h (set_gdb_completion_word_break_characters): Delete
5023 declaration.
5024 (completer_handle_brkchars_func_for_completer): New declaration.
5025 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5026 completer_handle_brkchars_func_for_completer.
5027
78b13106
PA
50282017-07-17 Pedro Alves <palves@redhat.com>
5029
5030 * completer.c (symbol_completer): New function, based on
5031 make_symbol_completion_list_fn.
5032 * completer.h (symbol_completer): New declaration.
5033 * guile/scm-cmd.c (cmdscm_completers): Adjust.
5034 * python/py-cmd.c (completers): Adjust.
5035 * symtab.c (make_symbol_completion_list_fn): Delete.
5036 * symtab.h (make_symbol_completion_list_fn): Delete.
5037 * cli/cli-decode.c (add_cmd): Adjust.
5038
bbf2f4df
PA
50392017-07-17 Pedro Alves <palves@redhat.com>
5040
5041 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5042 * dwarf2read.c: Include "filename-seen-cache.h".
5043 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5044 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5045 * filename-seen-cache.c: New file.
5046 * filename-seen-cache.h: New file.
5047 * symtab.c: Include "filename-seen-cache.h".
5048 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5049 (create_filename_seen_cache, clear_filename_seen_cache)
5050 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5051 to filename-seen-cache.h/filename-seen-cache.c.
5052 (output_source_filename, sources_info)
5053 (maybe_add_partial_symtab_filename)
5054 (make_source_files_completion_list): Adjust to use
5055 filename_seen_cache.
5056
330cdd98
PA
50572017-07-17 Pedro Alves <palves@redhat.com>
5058
5059 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5060 fields.
5061 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5062 dwarf2_debug_sections*)): New.
5063 (dwarf2_per_objfile::dwarf2_per_objfile(const
5064 dwarf2_per_objfile&)): Declare as deleted.
5065 (dwarf2_per_objfile::operator=): Declare as deleted.
5066 (dwarf2_per_objfile::dwarf2_per_objfile)
5067 (dwarf2_per_objfile::~dwarf2_per_objfile)
5068 (dwarf2_per_objfile::free_cached_comp_units): New.
5069 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5070 ctor. Call dwarf2_per_objfile's ctor manually.
5071 (dwarf2_locate_sections): Deleted/refactored as ...
5072 (dwarf2_per_objfile::locate_sections): ... this new method.
5073 (free_cached_comp_units): Defer to
5074 dwarf2_per_objfile::free_cached_comp_units.
5075 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5076
8880f2a9
TT
50772017-07-14 Tom Tromey <tom@tromey.com>
5078
5079 PR rust/21764:
5080 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5081 parameter.
5082 <UNOP_SIZEOF>: Split into separate case.
5083 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5084
65547233
TT
50852017-07-14 Tom Tromey <tom@tromey.com>
5086
5087 PR rust/21763:
5088 * symtab.c (symbol_matches_domain): Add language_rust to special
5089 case.
5090 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5091 treat LOC_TYPEDEF symbols as variables.
5092
8f14146e
PA
50932017-07-14 Pedro Alves <palves@redhat.com>
5094
5095 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5096 symtabs matching all symtabs with SRCFILE as file name instead of
5097 only considering the first hit, with lookup_symtab.
5098
2347965c
SM
50992017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5100
5101 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5102 operator_name parameters.
5103 (gen_expr): Update function call.
5104
40f4af28
SM
51052017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5106
5107 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5108 parameter.
5109 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5110 Likewise.
5111 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5112 parameter, use agent_expr::gdbarch instead, update function
5113 calls.
5114 (locexpr_tracepoint_var_ref): Likewise.
5115 (loclist_tracepoint_var_ref): Likewise.
5116 * ax-gdb.c (gen_trace_static_fields): Likewise.
5117 (gen_traced_pop): Likewise.
5118 (gen_frame_args_address): Likewise.
5119 (gen_frame_locals_address): Likewise.
5120 (gen_var_ref): Likewise.
5121 (gen_struct_ref_recursive): Likewise.
5122 (gen_static_field): Likewise.
5123 (gen_maybe_namespace_elt): Likewise.
5124 (gen_expr): Likewise.
5125 (gen_trace_for_var): Likewise.
5126 (gen_trace_for_expr): Likewise.
5127 (gen_trace_for_return_address): Likewise.
5128
053f8057
SM
51292017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5130
5131 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5132 parameter.
5133 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5134
6661ad48
SM
51352017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5136
5137 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5138 from ax, update calls.
5139 (gen_usual_arithmetic): Likewise.
5140 (gen_integral_promotions): Likewise.
5141 (gen_bitfield_ref): Likewise.
5142 (gen_primitive_field): Likewise.
5143 (gen_struct_ref_recursive): Likewise.
5144 (gen_struct_ref): Likewise.
5145 (gen_maybe_namespace_elt): Likewise.
5146 (gen_struct_elt_for_reference): Likewise.
5147 (gen_namespace_elt): Likewise.
5148 (gen_aggregate_elt_ref): Likewise.
5149 (gen_expr): Get gdbarch from ax, update calls.
5150 (gen_expr_binop_rest): Likewise.
5151
c55a47e7
PA
51522017-07-13 Pedro Alves <palves@redhat.com>
5153
5154 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5155 as default tdesc.
5156 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5157 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5158 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5159 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5160 tdep.
5161 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5162 Get final tdesc from the tdep.
5163 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5164 default tdesc.
5165 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5166 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5167 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5168 Use it as default tdesc.
5169 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5170 down to amd_init_abi. No longer handle fallback tdesc here.
5171 * amd64-tdep.h (tdesc_x32): Declare.
5172 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5173 parameter.
5174 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5175 as default tdesc.
5176
55efceab
AA
51772017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5178
5179 * s390-linux-tdep.c (s390_process_record): Add support for
5180 instructions new in arch12.
5181
0aa37b65
JB
51822017-07-11 John Baldwin <jhb@FreeBSD.org>
5183
5184 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5185 PT_GETFSBASE and PT_GETGSBASE.
5186 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5187 PT_SETGSBASE.
5188
48aeef91
JB
51892017-07-11 John Baldwin <jhb@FreeBSD.org>
5190
5191 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5192 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5193 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5194 those rules.
5195 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5196 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5197 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5198 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5199 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5200 * features/i386/amd64.xml: Add 64bit-segments.xml.
5201 * features/i386/amd64-avx-avx512.c: Regenerated.
5202 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5203 * features/i386/amd64-avx-mpx.c: Regenerated.
5204 * features/i386/amd64-avx.c: Regenerated.
5205 * features/i386/amd64-mpx.c: Regenerated.
5206 * features/i386/amd64.c: Regenerated.
5207 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5208 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5209 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5210 * regformats/i386/amd64-avx.dat: Regenerated.
5211 * regformats/i386/amd64-mpx.dat: Regenerated.
5212 * regformats/i386/amd64.dat: Regenerated.
5213
77c501bc
YQ
52142017-07-10 Yao Qi <yao.qi@linaro.org>
5215
5216 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5217 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5218
6dc8d757
AK
52192017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5220
5221 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5222 unsetenv.
5223 * gnulib/aclocal.m4: Regenerate.
5224 * gnulib/config.in: Regenerate.
5225 * gnulib/configure: Regenerate.
5226 * gnulib/import/Makefile.am: Regenerate.
5227 * gnulib/import/Makefile.in: Regenerate.
5228 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5229 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5230 * gnulib/import/m4/environ.m4: New file.
5231 * gnulib/import/m4/setenv.m4: New file.
5232 * gnulib/import/setenv.c: New file.
5233 * gnulib/import/unsetenv.c: New file.
5234
266934d1
SM
52352017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5236
5237 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5238 address when op is DW_OP_addr.
5239
03278692
TT
52402017-07-09 Tom Tromey <tom@tromey.com>
5241
5242 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5243 check and apply to outer type.
5244
4b654465
JB
52452017-07-07 John Baldwin <jhb@FreeBSD.org>
5246
5247 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5248 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5249 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5250 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5251
2af9fc44
JB
52522017-07-07 John Baldwin <jhb@FreeBSD.org>
5253
5254 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5255
382b69bb
JB
52562017-07-07 John Baldwin <jhb@FreeBSD.org>
5257
5258 * corelow.c (get_core_siginfo): Remove.
5259 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5260 instead of get_core_siginfo.
5261 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5262 * gdbarch.h: Re-generate.
5263 * gdbarch.c: Re-generate.
5264 * linux-tdep.c (linux_core_xfer_siginfo): New.
5265 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5266
6e5eab33
JB
52672017-07-07 John Baldwin <jhb@FreeBSD.org>
5268
5269 * corelow.c (thread_section_name): Move to ...
5270 * gdbcore.h (thread_section_name): ... here.
5271
929edea9
JB
52722017-07-07 John Baldwin <jhb@FreeBSD.org>
5273
5274 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5275 (struct siginfo32): New.
5276 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5277 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5278 via ptrace(PT_LWPINFO).
5279
762c974a
JB
52802017-07-07 John Baldwin <jhb@FreeBSD.org>
5281
5282 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5283 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5284 (fbsd_get_siginfo_type): New.
5285 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5286 (_initialize_fbsd_tdep): New.
5287
33c5cd75
DB
52882017-07-06 David Blaikie <dblaikie@gmail.com>
5289
5290 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5291 a singular dwo_unit*) to support multiple CUs in the same way that
5292 multiple TUs are supported.
5293 (create_cus_hash_table): Replace create_dwo_cu with a function for
5294 parsing multiple CUs from a DWO file.
5295 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5296 create_dwo_cu.
5297 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5298 htab_find, rather than comparing the signature to a singleton CU in
5299 the dwo_file.
5300
8455d262
PA
53012017-07-06 Pedro Alves <palves@redhat.com>
5302
5303 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5304
4da3eb35
PA
53052017-07-04 Pedro Alves <palves@redhat.com>
5306
5307 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5308 * gdbtypes.h (TYPE_STATIC): Delete.
5309 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5310 is_synchronized, is_native>: Delete.
5311 <dummy>: Bump.
5312 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5313 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5314 (TYPE_FN_FIELD_ABSTRACT): Delete.
5315
5bfd255c
SM
53162017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5317
5318 * buffer.h (buffer_finish): Fix spelling mistakes.
5319
25c54127
EZ
53202017-07-01 Eli Zaretskii <eliz@gnu.org>
5321
5322 * .dir-locals.el: Automatically switch to C-style comments in
5323 versions of Emacs that support the feature.
5324
dc4bde35
SDJ
53252017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5326 Pedro Alves <palves@redhat.com>
5327
5328 PR cli/21688
5329 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5330 (process_next_line): New variable 'inline_cmd'.
5331 Adjust 'if' clauses for "python", "compile" and "guile" to use
5332 'command_name_equals' and check for '!inline_cmd'.
5333
51ed89aa
SDJ
53342017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5335
5336 PR cli/21688
5337 * cli/cli-script.c (command_name_equals_not_inline): New function.
5338 (process_next_line): Adjust 'if' clauses for "python", "compile"
5339 and "guile" to use command_name_equals_not_inline.
5340
eb17d413
PA
53412017-06-29 Pedro Alves <palves@redhat.com>
5342
5343 * completer.c (expression_completer): Call
5344 linespec_location_completer instead of location_completer.
5345
195bcdd5
PA
53462017-06-29 Pedro Alves <palves@redhat.com>
5347
5348 * completer.c (expression_completer): Remove code that recomputes
5349 'text' from 'word'.
5350
adc764e7
YQ
53512017-06-29 Yao Qi <yao.qi@linaro.org>
5352
5353 * regformats/regdat.sh: Generate code with
5354 "ifndef IN_PROCESS_AGENT".
5355
6e75794e
PA
53562017-06-28 Pedro Alves <palves@redhat.com>
5357
5358 * command.h: Include "common/scoped_restore.h".
5359
bc491f2e
YQ
53602017-06-28 Yao Qi <yao.qi@linaro.org>
5361
5362 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5363 instead of obstack_grow.
5364
41664b45
DG
53652017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5366
5367 PR gdb/21337
5368 * symfile.c (reread_symbols): Call objfiles_changed just before
5369 read_symbols.
5370
6da67eb1
PA
53712017-06-27 Pedro Alves <palves@redhat.com>
5372
5373 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5374 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5375 (completion_list_add_symbol, completion_list_add_msymbol):
5376 ... these new functions.
5377 (add_symtab_completions)
5378 (default_make_symbol_completion_list_break_on_1): Adjust.
5379
23732b1e
PA
53802017-06-27 Pedro Alves <palves@redhat.com>
5381
5382 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5383 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5384 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5385 dtor.
5386 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5387 'storage_obstack' field an auto_obstack. In-class initialize all
5388 non-bitfield fields. Make minsyms_read bool.
5389 * symfile.c (read_symbols): Adjust.
5390
a4d1e79a
AH
53912017-06-27 Alan Hayward <alan.hayward@arm.com>
5392
5393 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5394 (gdbsim_store_register): Likewise.
5395
8268c778
PA
53962017-06-27 Pedro Alves <palves@redhat.com>
5397
5398 * c-exp.y (name_obstack): Now an auto_obstack.
5399 (yylex): Use auto_obstack::clear.
5400 (c_parse): Use auto_obstack::clear instead of reinitializing and
5401 freeing the obstack.
5402 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5403 * d-exp.y (name_obstack): Now an auto_obstack.
5404 (yylex): Use auto_obstack::clear.
5405 (d_parse): Use auto_obstack::clear instead of reinitializing and
5406 freeing the obstack.
5407 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5408 auto_obstack.
5409 * dwarf2read.c (create_addrmap_from_index)
5410 (dwarf2_build_psymtabs_hard)
5411 (update_enumeration_type_from_children): Likewise.
5412 * gdb_obstack.h (auto_obstack): New type.
5413 * go-exp.y (name_obstack): Now an auto_obstack.
5414 (build_packaged_name): Use auto_obstack::clear.
5415 (go_parse): Use auto_obstack::clear instead of reinitializing and
5416 freeing the obstack.
5417 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5418 auto_obstack.
5419 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5420 * rust-exp.y (work_obstack): Now an auto_obstack.
5421 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5422 reinitializing and freeing the obstack.
5423 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5424 (host_char_to_target): Use auto_obstack.
5425 * utils.h (make_cleanup_obstack_free): Delete declaration.
5426 * valprint.c (generic_emit_char, generic_printstr): Use
5427 auto_obstack.
5428
db665f42
SM
54292017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5430
5431 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5432 thread.
5433 (darwin_init_thread_list): Don't update dummy thread.
5434 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5435
873c0814
SM
54362017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5437
5438 * record-full.c (netorder16): Remove.
5439
8b5a7a6e
SM
54402017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5441
5442 * common/diagnostics.h: Define macros for GCC.
5443 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5444 * common/vec.h: Include diagnostics.h.
5445 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5446 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5447 warning.
5448
d1435379
SM
54492017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5450
5451 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5452 New macro.
5453 * ada-lex.l: Ignore deprecated register warnings.
5454
cc75e0fd
SM
54552017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5456
5457 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5458 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5459
07809eaf
SM
54602017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5461
5462 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5463 its own line.
5464
f076f034
SM
54652017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5466
5467 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5468
0dd5cbc5
AH
54692017-06-23 Alan Hayward <alan.hayward@arm.com>
5470
5471 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5472 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5473 (xtensa_register_read_masked): Likewise.
5474
d4c6ce5b
SDJ
54752017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5476
5477 * common/environ.c (gdb_environ::unset): Update comment.
5478
16892a03
AH
54792017-06-22 Alan Hayward <alan.hayward@arm.com>
5480
5481 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5482 registers.
5483
d7dcbefc
AH
54842017-06-22 Alan Hayward <alan.hayward@arm.com>
5485
5486 * record-full.c (record_full_exec_insn): Use byte_vector.
5487
b30ff123
YQ
54882017-06-22 Yao Qi <yao.qi@linaro.org>
5489
5490 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5491 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5492
4fa847d7
AH
54932017-06-22 Alan Hayward <alan.hayward@arm.com>
5494
5495 * remote.c (cached_reg): Move from here...
5496 * regcache.h (cached_reg): ...to here.
5497 * python/py-unwind.c (struct reg_info): Remove.
5498 (cached_frame_info): Use cached_reg_t.
5499 (pyuw_prev_register): Likewise.
5500 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5501 (pyuw_dealloc_cache): Free all registers.
5502
f4906a9a
PA
55032017-06-22 Pedro Alves <palves@redhat.com>
5504 Simon Marchi <simon.marchi@ericsson.com>
5505
5506 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5507 warning.
5508 * common/diagnostics.h: New file.
5509
b45a1208
PA
55102017-06-22 Pedro Alves <palves@redhat.com>
5511
5512 * common/agent.h: Add include guards.
5513
e4da2c61
SM
55142017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5515
5516 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5517 talk about addressable units instead of bytes.
5518
96160d60
SDJ
55192017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5520
5521 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5522 of '::const_iterator'.
5523
9a6c7d9c
SDJ
55242017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5525
5526 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5527 'unittests/environ-selftests.c'.
5528 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5529 * charset.c (find_charset_names): Declare object 'iconv_env'.
5530 Update code to use 'iconv_env' object. Remove call to
5531 'free_environ'.
5532 * common/environ.c: Include <utility>.
5533 (make_environ): Delete function.
5534 (free_environ): Delete function.
5535 (gdb_environ::clear): New function.
5536 (gdb_environ::operator=): New function.
5537 (gdb_environ::get): Likewise.
5538 (environ_vector): Delete function.
5539 (set_in_environ): Delete function.
5540 (gdb_environ::set): New function.
5541 (unset_in_environ): Delete function.
5542 (gdb_environ::unset): New function.
5543 (gdb_environ::envp): Likewise.
5544 * common/environ.h: Include <vector>.
5545 (struct gdb_environ): Delete; transform into...
5546 (class gdb_environ): ... this class.
5547 (free_environ): Delete prototype.
5548 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5549 environ_vector): Likewise.
5550 * infcmd.c (run_command_1): Update code to call
5551 'envp' from 'gdb_environ' class.
5552 (environment_info): Update code to call methods from 'gdb_environ'
5553 class.
5554 (unset_environment_command): Likewise.
5555 (path_info): Likewise.
5556 (path_command): Likewise.
5557 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5558 (inferior::inferior): Initialize 'environment' using the host's
5559 information.
5560 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5561 Include "environ.h".
5562 (class inferior) <environment>: Change type from 'struct
5563 gdb_environ' to 'gdb_environ'.
5564 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5565 methods from 'gdb_environ' class.
5566 * solib.c (solib_find_1): Likewise
5567 * unittests/environ-selftests.c: New file.
5568
75c554cf
YQ
55692017-06-20 Yao Qi <yao.qi@linaro.org>
5570
5571 * features/i386/i386-linux.xml: Exchange the order of including
5572 32bit-linux.xml and 32bit-sse.xml.
5573 * features/i386/i386-linux.c: Regenerated.
5574
72ddacb7
YQ
55752017-06-20 Yao Qi <yao.qi@linaro.org>
5576
5577 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5578 Delete copy ctor and assignment operator.
5579 (tdesc_type): Likewise.
5580 (tdesc_feature): Likewise.
5581 (tdesc_free_reg): Remove.
5582 (tdesc_create_reg): Use new.
5583 (tdesc_free_type): Remove.
5584 (tdesc_create_vector): Use new.
5585 (tdesc_create_union): Likewise.
5586 (tdesc_create_flags): Likewise.
5587 (tdesc_create_enum): Likewise.
5588 (tdesc_free_feature): Delete.
5589 (free_target_description): Use delete.
5590
325c9fd4
JB
55912017-06-19 John Baldwin <jhb@FreeBSD.org>
5592
5593 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5594 registers.
5595
16b7a719
PA
55962017-06-19 Pedro Alves <palves@redhat.com>
5597
5598 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5599 after gdb::unlinker.
5600
1c8e01c9
SDJ
56012017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5602
5603 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5604 gdb_environ to access an environment variable.
5605
ffce45d2
TP
56062017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5607
5608 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5609 gdb_byte*.
5610
1d4fbac9
SM
56112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5612
5613 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5614
8465943a
SM
56152017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5616
5617 * configure: Re-generate.
5618 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5619
3e019bdc
SM
56202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5621
5622 * configure: Re-generate.
5623 * warning.m4: Pass -Werror to compiler when checking for
5624 supported warning flags.
5625
cf0dd6f0
SM
56262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5627
5628 * Makefile.in (COMPILE.pre): Add "-x c++".
5629
6f98355c
YQ
56302017-06-16 Alan Hayward <alan.hayward@arm.com>
5631 Pedro Alves <palves@redhat.com>
5632 Yao Qi <yao.qi@linaro.org>
5633
5634 * defs.h (RequireLongest): New.
5635 (extract_integer): Declare function template.
5636 (extract_signed_integer): Remove the declaration, but define it
5637 static inline.
5638 (extract_unsigned_integer): Likewise.
5639 (store_integer): Declare function template.
5640 (store_signed_integer): Remove the declaration, but define it
5641 static inline.
5642 (store_unsigned_integer): Likewise.
5643 * findvar.c (extract_integer): New function template.
5644 (extract_signed_integer): Remove.
5645 (extract_unsigned_integer): Remove.
5646 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5647 instantiations.
5648 (store_integer): New function template.
5649 (store_signed_integer): Remove.
5650 (store_unsigned_integer): Remove.
5651 (store_integer): Explicit instantiations.
5652 * regcache.c (regcache_raw_read_signed): Update.
5653 (regcache::raw_read): New function.
5654 (regcache::raw_read_signed): Remove.
5655 (regcache::raw_read_unsigned): Remove.
5656 (regcache_raw_read_unsigned): Update.
5657 (regcache_raw_write_unsigned): Update.
5658 (regcache::raw_write_signed): Remove.
5659 (regcache::raw_write): New function.
5660 (regcache_cooked_read_signed): Update.
5661 (regcache::raw_write_unsigned): Remove.
5662 (regcache::cooked_read_signed): Remove.
5663 (regcache_cooked_read_unsigned): Update.
5664 (regcache::cooked_read_unsigned): Remove.
5665 (regcache_cooked_write_signed): Update.
5666 (regcache_cooked_write_unsigned): Update.
5667 * regcache.h (regcache) <raw_read_signed>: Remove.
5668 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5669 <raw_read, raw_write>: New.
5670 <cooked_read_signed, cooked_write_signed>: Remove.
5671 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5672 <cooked_read, cooked_write>: New.
5673 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5674 (sh64_pseudo_register_write): Update.
5675
a87dc45a
AK
56762017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5677
5678 * arc-tdep.c (arc_disassembler_options): New variable.
5679 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5680 of default_print_insn.
5681 (arc_delayed_print_insn): Set info->section when needed,
5682 use default_print_insn to retrieve a disassembler.
5683
45159d6a
SDJ
56842017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5685
5686 PR gdb/21574
5687 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5688 to mention $SHELL and startup-with-shell.
5689
b46c4cf0
MF
56902017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5691
5692 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5693
6394c606
YQ
56942017-06-14 Yao Qi <yao.qi@linaro.org>
5695
5696 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5697 default_print_insn instead of print_insn_aarch64.
5698 * arm-tdep.c (gdb_print_insn_arm): Call
5699 default_print_insn instead of print_insn_big_arm
5700 and print_insn_little_arm.
5701 * i386-tdep.c (i386_print_insn): Call default_print_insn
5702 instead of print_insn_i386.
5703 * ia64-tdep.c (ia64_print_insn): Call
5704 default_print_insn instead of print_insn_ia64.
5705 * mips-tdep.c (gdb_print_insn_mips): Call
5706 default_print_insn instead of print_insn_big_mips
5707 and print_insn_little_mips.
5708 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5709 instead of print_insn_spu.
5710
d5722aa2
PA
57112017-06-14 Pedro Alves <palves@redhat.com>
5712
5713 * ada-lang.c: Include "common/byte-vector.h".
5714 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5715 * charset.c (wchar_iterator::iterate): Resize the vector instead
5716 of reserving it.
5717 * common/byte-vector.h: Include "common/def-vector.h".
5718 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5719 * cli/cli-dump.c: Include "common/byte-vector.h".
5720 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5721 * common/byte-vector.h: New file.
5722 * common/def-vector.h: New file.
5723 * common/default-init-alloc.h: New file.
5724 * dwarf2loc.c: Include "common/byte-vector.h".
5725 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5726 instead of reserving it.
5727 * dwarf2read.c: Include "common/byte-vector.h".
5728 (data_buf::m_vec): Now a gdb::byte_vector.
5729 * gdb_regex.c: Include "common/def-vector.h".
5730 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5731 * mi/mi-main.c: Include "common/byte-vector.h".
5732 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5733 * printcmd.c: Include "common/byte-vector.h".
5734 (print_scalar_formatted): Use gdb::byte_vector.
5735 * valprint.c: Include "common/byte-vector.h".
5736 (maybe_negate_by_bytes, print_decimal_chars): Use
5737 gdb::byte_vector.
5738
01ec7a27
SM
57392017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5740
5741 * darwin-nat.c: Include "nat/fork-inferior.h".
5742
848d9074
SM
57432017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5744
5745 * configure.nat: Factor out Darwin bits that are not
5746 architecture-specific. Add fork-inferior.o.
5747
3b912944
SM
57482017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5749
5750 * configure.nat: Factor out AIX bits that are not
5751 architecture-specific. Add fork-inferior.o.
5752
55acdf22
AA
57532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5754
5755 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5756 (read_pieced_value, write_pieced_value): ...here. Reduce to
5757 wrappers that just call rw_pieced_value.
5758
f65e2044
AA
57592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5760
5761 * dwarf2loc.c (write_pieced_value): When writing the data for a
5762 memory piece, use write_memory_with_notification instead of
5763 write_memory.
5764
23f945bf
AA
57652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5766
5767 * valops.c (read_value_memory): Change embedded_offset to
5768 represent a bit offset instead of a byte offset.
5769 * value.h (read_value_memory): Adjust comment.
5770
f236533e
AA
57712017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5772
5773 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5774 dest_offset_bits and source_offset_bits.
5775 (write_pieced_value): Likewise.
5776
65d84b76
AA
57772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5778
5779 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5780 given by DW_OP_bit_piece.
5781 (write_pieced_value): Likewise.
5782
242d31ab
AA
57832017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5784
5785 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5786 some other preparations to the places where sufficient information
5787 is available.
5788 (write_pieced_value): Likewise.
5789
03c8af18
AA
57902017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5791
5792 * dwarf2loc.c (bits_to_bytes): New function.
5793 (read_pieced_value): Fix offset calculations for register pieces
5794 on big-endian targets.
5795 (write_pieced_value): Likewise.
5796
840989c1
AA
57972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5798
5799 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5800 (write_pieced_value): Likewise.
5801
359b19bb
AA
58022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5803
5804 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5805 transfer the source value's least significant bits, instead of its
5806 lowest-addressed ones. Rename type_len to max_offset.
5807 (read_pieced_value): Mirror above changes to write_pieced_value as
5808 applicable.
5809
07c9ca3b
AA
58102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5811
5812 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5813 truncate full bytes from dest_offset_bits before using it as an
5814 offset into the buffer.
5815
f1cc9874
AA
58162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5817
5818 * dwarf2loc.c (write_pieced_value): Include transfer size in
5819 byte-wise check.
5820
cdaac320
AA
58212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5822
5823 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5824 calculation of this_size.
5825
af547a96
AA
58262017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5827
5828 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5829 when targeting a bit-field.
5830 (write_pieced_value): Likewise.
5831
ddd7882a
AA
58322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5833
5834 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5835 (allocate_piece_closure): Drop addr_size parameter.
5836 (dwarf2_evaluate_loc_desc_full): Adjust call to
5837 allocate_piece_closure.
5838
e9352324
AA
58392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5840
5841 PR gdb/21226
5842 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5843 the LSB end, independent of endianness.
5844
d5d1163e
AA
58452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5846
5847 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5848 size capping.
5849
032bb6ea
YQ
58502017-06-13 Yao Qi <yao.qi@linaro.org>
5851
5852 * mips-linux-nat.c: Move include features/mips*-linux.c to
5853 mips-linux-tdep.c.
5854 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5855 to mips-linux-tdep.c.
5856 * mips-linux-tdep.c: Include features/mips*-linux.c
5857 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5858 functions.
5859 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5860 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5861 (tdesc_mips64_dsp_linux): Declare.
5862
f12f6bad
TT
58632017-06-12 Tom Tromey <tom@tromey.com>
5864
5865 * valprint.h (val_print_type_code_int): Remove.
5866 * valprint.c (generic_val_print_int): Always call
5867 val_print_scalar_formatted.
5868 (val_print_type_code_int): Remove.
5869 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5870 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5871 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5872 * ada-valprint.c (ada_val_print_num): Use
5873 val_print_scalar_formatted.
5874
d9109c80
TT
58752017-06-12 Tom Tromey <tom@tromey.com>
5876
5877 * printcmd.c (print_scalar_formatted): Unify the two switches.
5878 Don't convert scalars to LONGEST.
5879
4ac0cb1c
TT
58802017-06-12 Tom Tromey <tom@tromey.com>
5881
5882 PR exp/16225:
5883 * valprint.h (print_decimal_chars): Update.
5884 * valprint.c (maybe_negate_by_bytes): New function.
5885 (print_decimal_chars): Add "is_signed" argument.
5886 * printcmd.c (print_scalar_formatted): Update.
5887
30a25466
TT
58882017-06-12 Tom Tromey <tom@tromey.com>
5889
5890 PR exp/16225:
5891 * valprint.h (print_binary_chars, print_hex_chars): Update.
5892 * valprint.c (val_print_type_code_int): Update.
5893 (print_binary_chars): Add "zero_pad" argument.
5894 (emit_octal_digit): New function.
5895 (print_octal_chars): Don't zero-pad.
5896 (print_decimal_chars): Likewise.
5897 (print_hex_chars): Add "zero_pad" argument.
5898 * sh64-tdep.c (sh64_do_fp_register): Update.
5899 * regcache.c (regcache::dump): Update.
5900 * printcmd.c (print_scalar_formatted): Update.
5901 * infcmd.c (default_print_one_register_info): Update.
5902
b3464d03
PA
59032017-06-12 Pedro Alves <palves@redhat.com>
5904 Alan Hayward <alan.hayward@arm.com>
5905
5906 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5907 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5908 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5909 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5910 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5911
4b76cda9
PA
59122017-06-12 Pedro Alves <palves@redhat.com>
5913
5914 * dwarf2read.c (mapped_symtab::data): Now a vector of
5915 symtab_index_entry instead of vector of
5916 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5917 whether an element's name is NULL instead of checking whether the
5918 element itself is NULL.
5919 (find_slot): Change return type. Adjust.
5920 (hash_expand, , add_index_entry, uniquify_cu_indices)
5921 (write_hash_table): Adjust.
5922
e8f8bcb3
PA
59232017-06-12 Pedro Alves <palves@redhat.com>
5924
5925 * dwarf2read.c (recursively_count_psymbols): New function.
5926 (write_psymtabs_to_index): Call it to compute number of psyms and
5927 pass estimate size of psyms_seen to unordered_set's ctor.
5928
70a1152b
PA
59292017-06-12 Pedro Alves <palves@redhat.com>
5930
5931 * dwarf2read.c (write_hash_table): Check if key already exists
5932 before emplacing.
5933
c2f134ac
PA
59342017-06-12 Pedro Alves <palves@redhat.com>
5935
5936 * dwarf2read.c (data_buf::append_space): Rename to...
5937 (data_buf::grow): ... this, and make private. Adjust all callers.
5938 (data_buf::append_uint): New method.
5939 (add_address_entry, write_one_signatured_type)
5940 (write_psymtabs_to_index): Use it.
5941
a81e6d4d
PA
59422017-06-12 Pedro Alves <palves@redhat.com>
5943
5944 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5945 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5946 (data_buf::file_write): Call ::fwrite directly.
5947
6fd931f2
PA
59482017-06-12 Pedro Alves <palves@redhat.com>
5949
5950 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5951 std::vector::erase.
5952
bc8f2430
JK
59532017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5954
5955 Code cleanup: C++ify .gdb_index producer.
5956 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5957 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5958 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5959 (create_strtab, add_string): Remove.
5960 (file_write, data_buf): New.
5961 (struct symtab_index_entry): Use std::vector for cu_indices.
5962 (struct mapped_symtab): Use std::vector for data.
5963 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5964 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5965 Remove.
5966 (find_slot): Change return type. Update it to the new data structures.
5967 (hash_expand, add_index_entry): Update it to the new data structures.
5968 (offset_type_compare): Remove.
5969 (uniquify_cu_indices): Update it to the new data structures.
5970 (c_str_view, c_str_view_hasher, vector_hasher): New.
5971 (add_indices_to_cpool): Remove.
5972 (write_hash_table): Update it to the new data structures.
5973 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5974 (eq_psymtab_cu_index): Remove.
5975 (psym_index_map): New typedef.
5976 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5977 reference and std::unordered_map for cu_index_htab.
5978 (add_address_entry, add_address_entry_worker, write_address_map)
5979 (write_psymbols): Update it to the new data structures.
5980 (write_obstack): Remove.
5981 (struct signatured_type_index_data): Change types_list to a data_buf
5982 reference and psyms_seen to a std::unordered_set reference.
5983 (write_one_signatured_type, recursively_write_psymbols)
5984 (write_psymtabs_to_index): Update it to the new data structures.
5985
c4dcb155
SM
59862017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5987
5988 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5989 separate-debug-file commands.
5990 * symfile.h (separate_debug_file_debug): New global.
5991 * symfile.c (separate_debug_file_debug): New global.
5992 (separate_debug_file_exists, find_separate_debug_file): Add
5993 debug output.
5994 (_initialize_symfile): Add "set debug separate-debug-file"
5995 command.
5996 * build-id.c (build_id_to_debug_bfd,
5997 find_separate_debug_file_by_buildid): Add debug output.
5998
6d45d4b4
SM
59992017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6000
6001 * gdbarch.sh (displaced_step_free_closure): Remove.
6002 * gdbarch.h, gdbarch.c: Re-generate.
6003 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6004 displaced_step_free_closure.
6005 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6006 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6007 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6008 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6009 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6010 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6011 * arch-utils.h (simple_displaced_step_free_closure): Remove.
6012 * arch-utils.c (simple_displaced_step_free_closure): Remove.
6013 * infrun.c (displaced_step_clear): Call xfree instead of
6014 gdbarch_displaced_step_free_closure.
6015
2f91880f
SDJ
60162017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
6017
6018 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6019 NULL".
6020
b8b6e72f
AH
60212017-06-08 Alan Hayward <alan.hayward@arm.com>
6022
6023 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6024 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6025 (mn10300_push_dummy_call): Likewise.
6026
5369082e
AH
60272017-06-08 Alan Hayward <alan.hayward@arm.com>
6028
6029 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6030
ff4ca5ac
AH
60312017-06-08 Alan Hayward <alan.hayward@arm.com>
6032
6033 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6034
aefd8b33
SDJ
60352017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6036
6037 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6038 able to start inferiors using a shell.
6039 (New remote packets): Announce new packet "QStartupWithShell".
6040 * remote.c: Add PACKET_QStartupWithShell.
6041 (extended_remote_create_inferior): Handle new
6042 PACKET_QStartupWithShell.
6043 (remote_protocol_features) <QStartupWithShell>: New entry for
6044 PACKET_QStartupWithShell.
6045 (_initialize_remote): Call "add_packet_config_cmd" for
6046 QStartupShell.
6047
2090129c
SDJ
60482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6049 Pedro Alves <palves@redhat.com>
6050
6051 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6052 and "nat/fork-inferior.h".
6053 * common/common-inferior.h: New file, with contents from
6054 "gdb/inferior.h".
6055 * commom/common-utils.c: Include "common-utils.h".
6056 (stringify_argv): New function.
6057 * common/common-utils.h (stringify_argv): New prototype.
6058 * configure.nat: Add "fork-inferior.o" as a dependency for
6059 "*linux*", "fbsd*" and "nbsd*" hosts.
6060 * corefile.c (get_exec_file): Update comment.
6061 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6062 instead of "startup_inferior".
6063 (darwin_create_inferior): Call "add_thread_silent" after
6064 "fork_inferior".
6065 * fork-child.c: Cleanup unnecessary includes.
6066 (SHELL_FILE): Move to "common/common-fork-child.c".
6067 (environ): Likewise.
6068 (exec_wrapper): Initialize.
6069 (get_exec_wrapper): New function.
6070 (breakup_args): Move to "common/common-fork-child.c"; rename to
6071 "breakup_args_for_exec".
6072 (escape_bang_in_quoted_argument): Move to
6073 "common/common-fork-child.c".
6074 (saved_ui): New variable.
6075 (prefork_hook): New function.
6076 (postfork_hook): Likewise.
6077 (postfork_child_hook): Likewise.
6078 (gdb_startup_inferior): Likewise.
6079 (fork_inferior): Move to "common/common-fork-child.c". Update
6080 function to support gdbserver.
6081 (startup_inferior): Likewise.
6082 * gdbcore.h (get_exec_file): Remove declaration.
6083 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6084 instead of "startup_inferior". Call "add_thread_silent" after
6085 "fork_inferior".
6086 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6087 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6088 instead of "startup_inferior". Call "add_thread_silent" after
6089 "fork_inferior".
6090 * inferior.h: Include "common-inferior.h".
6091 (trace_start_error): Move to "common/common-utils.h".
6092 (trace_start_error_with_name): Likewise.
6093 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6094 (startup_inferior): Likewise.
6095 (gdb_startup_inferior): New prototype.
6096 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6097 * nat/fork-inferior.h: New file.
6098 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6099 instead of "startup_inferior". Call "add_thread_silent" after
6100 "fork_inferior".
6101 * target.h (target_terminal_init): Move prototype to
6102 "target/target.h".
6103 (target_terminal_inferior): Likewise.
6104 (target_terminal_ours): Likewise.
6105 * target/target.h (target_terminal_init): New prototype, moved
6106 from "target.h".
6107 (target_terminal_inferior): Likewise.
6108 (target_terminal_ours): Likewise.
6109 * utils.c (gdb_flush_out_err): New function.
6110
043a4934
SDJ
61112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6112
6113 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6114 * common/common-gdbthread.h: New file, with parts from
6115 "gdb/gdbthread.h".
6116 * gdbthread.h: Include "common-gdbthread.h".
6117 (switch_to_thread): Moved to "common/common-gdbthread.h".
6118
15652511
SDJ
61192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6120
6121 * Makefile.in (SFILES): Add "common/job-control.c".
6122 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6123 (COMMON_OBS): Add "job-control.o".
6124 * common/job-control.c: New file, with contents from
6125 "gdb/inflow.c".
6126 * common/job-control.h: New file, with contents from "terminal.h".
6127 * fork-child.c: Include "job-control.h".
6128 * inflow.c: Include "job-control.h".
6129 (gdb_setpgid): Move to "common/common-inflow.c".
6130 (_initialize_inflow): Move setting of "job_control" to
6131 "handle_job_control".
6132 * terminal.h (job_control): Moved to "common/common-terminal.h".
6133 (gdb_setpgid): Likewise.
6134 * top.c: Include "job_control.h".
6135 * utils.c: Likewise.
6136 (job_control): Moved to "job-control.c".
6137
2d7cc5c7
PA
61382017-06-07 Pedro Alves <palves@redhat.com>
6139
6140 * Makefile.in (SFILES): Add gdb_regex.c.
6141 (COMMON_OBS): Add gdb_regex.o.
6142 * ada-lang.c (ada_add_standard_exceptions)
6143 (ada_add_exceptions_from_frame, name_matches_regex)
6144 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6145 parameter type to compiled_regex. Adjust.
6146 (ada_exceptions_list): Use compiled_regex.
6147 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6148 std::unique_ptr<compiled_regex>.
6149 (exception_catchpoint::~exception_catchpoint): Remove regfree
6150 call.
6151 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6152 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6153 * breakpoint.c (solib_catchpoint::compiled): Now a
6154 std::unique_ptr<compiled_regex>.
6155 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6156 (check_status_catch_solib): Adjust to use compiled_regex.
6157 (add_solib_catchpoint): Adjust to use compiled_regex.
6158 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6159 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6160 compiled_regex reference. Adjust to use it.
6161 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6162 declaration. Include "gdb_regex.h".
6163 (apropos_cmd): Change regex parameter to compiled_regex reference.
6164 * gdb_regex.c: New file.
6165 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6166 declarations.
6167 (class compiled_regex): New.
6168 * linux-tdep.c: Include "common/gdb_optional.h".
6169 (struct mapping_regexes): New, factored out from
6170 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6171 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6172 gdb::optional and remove cleanups. Adjust to compiled_regex.
6173 * probe.c: Include "common/gdb_optional.h".
6174 (collect_probes): Use compiled_regex and gdb::optional and remove
6175 cleanups.
6176 * skip.c: Include "common/gdb_optional.h".
6177 (skiplist_entry::compiled_function_regexp): Now a
6178 gdb::optional<compiled_regex>.
6179 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6180 (free_skiplist_entry): Remove regfree call.
6181 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6182 compiled_regex and gdb::optional.
6183 * symtab.c: Include "common/gdb_optional.h".
6184 (search_symbols): Use compiled_regex and gdb::optional.
6185 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6186 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6187 to gdb_regex.c.
6188
50d6adef
AH
61892017-06-07 Alan Hayward <alan.hayward@arm.com>
6190
6191 * regcache.c (regcache::save): Avoid buffer use.
6192 (regcache::dump): Likewise.
6193
4a8a33c8
AH
61942017-06-07 Alan Hayward <alan.hayward@arm.com>
6195
6196 * sh-tdep.c (sh_pseudo_register_read): Remove
6197 MAX_REGISTER_SIZE.
6198 (sh_pseudo_register_write): Likewise.
6199 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6200 (sh64_pseudo_register_write): Likewise
6201
d1be909e
AH
62022017-06-07 Alan Hayward <alan.hayward@arm.com>
6203
6204 * aarch64-tdep.c (aarch64_store_return_value): Use
6205 V_REGISTER_SIZE.
6206 (aarch64_pseudo_read_value): Likewise.
6207 (aarch64_pseudo_write): Likewise.
6208
f4a65042
YQ
62092017-06-06 Yao Qi <yao.qi@linaro.org>
6210
6211 * regformats/regdef.h (set_register_cache): Remove the
6212 declaration.
6213
9f7fb0aa
AH
62142017-06-06 Alan Hayward <alan.hayward@arm.com>
6215
6216 * frame.c (frame_unwind_register_signed): Use
6217 frame_unwind_register_value.
6218
e1e01040
PA
62192017-06-06 Pedro Alves <palves@redhat.com>
6220
6221 PR breakpoints/21553
6222 * breakpoint.c (create_breakpoints_sal_default)
6223 (init_breakpoint_sal, create_breakpoint_sal): Use
6224 gdb::unique_xmalloc_ptr for string parameters.
6225 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6226 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6227 (base_breakpoint_create_breakpoints_sal)
6228 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6229 (strace_marker_create_breakpoints_sal)
6230 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6231 string parameters.
6232 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6233 gdb::unique_xmalloc_ptr for string parameters.
6234 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6235 parameters.
6236
fbe654c8
AH
62372017-06-06 Alan Hayward <alan.hayward@arm.com>
6238
6239 * alpha-tdep.c (alpha_register_to_value): Use
6240 get_frame_register_value.
6241 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6242
ae0d01d6
AH
62432017-06-06 Alan Hayward <alan.hayward@arm.com>
6244
6245 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6246 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6247 (ia64_value_to_register): Likewise.
6248 (ia64_extract_return_value): Likewise.
6249 (ia64_store_return_value): Likewise.
6250 (ia64_push_dummy_call): Likewise.
6251
49cf576c
JB
62522017-06-04 Joel Brobecker <brobecker@adacore.com>
6253
6254 GDB 8.0 released.
6255
26b6a6ab
SM
62562017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6257
6258 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6259
22827c51
SM
62602017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6261
6262 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6263 parameter.
6264 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6265
0e05cf3a
SM
62662017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6267
6268 * event-loop.c (poll_timers): Unallocate timer using delete
6269 instead of xfree.
6270
c1fc2657
SM
62712017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6272
6273 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6274 (struct breakpoint) <~breakpoint>: New.
6275 (struct watchpoint): Inherit from breakpoint.
6276 <~watchpoint>: New.
6277 <base>: Remove.
6278 (struct tracepoint): Inherit from breakpoint.
6279 <base>: Remove.
6280 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6281 (struct longjmp_breakpoint): Inherit from breakpoint.
6282 <~longjmp_breakpoint>: New.
6283 <base>: Remove.
6284 (new_breakpoint_from_type): Remove casts.
6285 (watchpoint_in_thread_scope): Remove reference to base field.
6286 (watchpoint_del_at_next_stop): Likewise.
6287 (update_watchpoint): Likewise.
6288 (watchpoint_check): Likewise.
6289 (bpstat_check_watchpoint): Likewise.
6290 (set_longjmp_breakpoint): Likewise.
6291 (struct fork_catchpoint): Inherit from breakpoint.
6292 <base>: Remove.
6293 (struct solib_catchpoint): Inherit from breakpoint.
6294 <~solib_catchpoint>: New.
6295 <base>: Remove.
6296 (dtor_catch_solib): Change to ...
6297 (solib_catchpoint::~solib_catchpoint): ... this.
6298 (breakpoint_hit_catch_solib): Remove reference to base field.
6299 (add_solib_catchpoint): Likewise.
6300 (create_fork_vfork_event_catchpoint): Likewise.
6301 (struct exec_catchpoint): Inherit from breakpoint.
6302 <~exec_catchpoint>: New.
6303 <base>: Remove.
6304 (dtor_catch_exec): Change to ...
6305 (exec_catchpoint::~exec_catchpoint): ... this.
6306 (dtor_watchpoint): Change to ...
6307 (watchpoint::~watchpoint): ... this.
6308 (watch_command_1): Remove reference to base field.
6309 (catch_exec_command_1): Likewise.
6310 (base_breakpoint_dtor): Change to ...
6311 (breakpoint::~breakpoint): ... this.
6312 (base_breakpoint_ops): Remove dtor field value.
6313 (longjmp_bkpt_dtor): Change to ...
6314 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6315 (strace_marker_create_breakpoints_sal): Remove reference to base
6316 field.
6317 (delete_breakpoint): Don't manually call breakpoint destructor.
6318 (create_tracepoint_from_upload): Remove reference to base field.
6319 (trace_pass_set_count): Likewise.
6320 (initialize_breakpoint_ops): Don't initialize
6321 momentary_breakpoint_ops, don't set dtors.
6322 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6323 <~ada_catchpoint>: New.
6324 <base>: Remove.
6325 (create_excep_cond_exprs): Remove reference to base field.
6326 (dtor_exception): Change to ...
6327 (ada_catchpoint::~ada_catchpoint): ... this.
6328 (dtor_catch_exception): Remove.
6329 (dtor_catch_exception_unhandled): Remove.
6330 (dtor_catch_assert): Remove.
6331 (create_ada_exception_catchpoint): Remove reference to base
6332 field.
6333 (initialize_ada_catchpoint_ops): Don't set dtors.
6334 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6335 breakpoint.
6336 <~signal_catchpoint>: New.
6337 <base>: Remove.
6338 (signal_catchpoint_dtor): Change to ...
6339 (signal_catchpoint::~signal_catchpoint): ... this.
6340 (create_signal_catchpoint): Remove reference to base field.
6341 (initialize_signal_catchpoint_ops): Don't set dtor.
6342 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6343 from breakpoint.
6344 <~syscall_catchpoint>: New.
6345 <base>: Remove.
6346 (dtor_catch_syscall): Change to ...
6347 (syscall_catchpoint::~syscall_catchpoint): ... this.
6348 (create_syscall_event_catchpoint): Remove reference to base
6349 field.
6350 (initialize_syscall_catchpoint_ops): Don't set dtor.
6351 * break-catch-throw.c (struct exception_catchpoint): Inherit
6352 from breakpoint.
6353 <~exception_catchpoint>: New.
6354 <base>: Remove.
6355 (dtor_exception_catchpoint): Change to ...
6356 (exception_catchpoint::~exception_catchpoint): ... this.
6357 (handle_gnu_v3_exceptions): Remove reference to base field.
6358 (initialize_throw_catchpoint_ops): Don't set dtor.
6359 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6360 field.
6361 * remote.c (remote_get_tracepoint_status): Likewise.
6362 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6363 * tracefile.c (tracefile_fetch_registers): Likewise.
6364 * tracepoint.c (actions_command): Likewise.
6365 (validate_actionline): Likewise.
6366 (tfind_1): Likewise.
6367 (get_traceframe_location): Likewise.
6368 (find_matching_tracepoint_location): Likewise.
6369 (parse_tracepoint_status): Likewise.
6370 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6371
3b0871f4
SM
63722017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6373
6374 * breakpoint.c (struct longjmp_breakpoint): New struct.
6375 (is_tracepoint_type): Change return type to bool.
6376 (is_longjmp_type): New function.
6377 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6378 (set_raw_breakpoint_without_location): Use
6379 new_breakpoint_from_type.
6380 (set_raw_breakpoint): Likewise.
6381
a5e364af
SM
63822017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6383
6384 * breakpoint.c (new_breakpoint_from_type): New function.
6385 (create_breakpoint_sal): Use new_breakpoint_from_type and
6386 unique_ptr.
6387 (create_breakpoint): Likewise.
6388
ae3b3f34
SM
63892017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6390
6391 * memattr.c (mem_info_command): Rename to ...
6392 (info_mem_command): ... this.
6393 (mem_enable_command): Rename to ...
6394 (enable_mem_command): ... this.
6395 (mem_disable_command): Rename to ...
6396 (disable_mem_command): ... this.
6397 (mem_delete_command): Rename to ...
6398 (delete_mem_command): ... this.
6399 (_initialize_mem): Adjust function names.
6400
13ace077
MM
64012017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6402
6403 * btrace.c (handle_pt_insn_events): New.
6404 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6405 STATUS. Split into this and ...
6406 (handle_pt_insn_event_flags): ... this.
6407
c56ccc05
MM
64082017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6409
6410 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6411 and struct pt_insn.resynced.
6412 * configure: Regenerated.
6413 * config.in: Regenerated.
6414
08c3f6d2
TW
64152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6416
6417 * btrace.c (ftrace_find_call_by_number): New function.
6418 (ftrace_new_function): Store objects, not pointers.
6419 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6420 ftrace_new_gap, ftrace_update_function,
6421 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6422 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6423 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6424 btrace_ends_with_single_insn, btrace_call_get): Account for
6425 btrace_thread_info::functions now storing objects.
6426 * btrace.h (struct btrace_thread_info): Add constructor.
6427 (struct btrace_thread_info) <functions>: Make std::vector.
6428 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6429 Initialize with default values.
6430 * record-btrace.c (record_btrace_frame_sniffer): Account for
6431 btrace_thread_info::functions now storing objects.
6432
8ffd39f2
TW
64332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6434
6435 * btrace.c: Remove typedef bfun_s.
6436 (ftrace_new_gap): Directly add gaps to the list of gaps.
6437 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6438 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6439 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6440 instead of gdb VEC.
6441
4aeb0dfc
TW
64422017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6443
6444 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6445 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6446 with btrace_thread_info::next_segment and
6447 btrace_thread_info::prev_segment.
6448 * btrace.h: Remove struct btrace_func_link.
6449 (struct btrace_function): Replace pair of function segment pointers
6450 with pair of indices.
6451 * python/py-record-btrace.c (btpy_call_prev_sibling,
6452 btpy_call_next_sibling): Replace references to
6453 btrace_thread_info::segment with btrace_thread_info::next_segment and
6454 btrace_thread_info::prev_segment.
6455 * record-btrace.c (record_btrace_frame_this_id): Use
6456 btrace_find_call_by_number.
6457
eb8f2b9c
TW
64582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6459
6460 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6461 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6462 btrace_insn_next, btrace_insn_prev): Remove references to
6463 btrace_thread_info::flow.
6464 * btrace.h (struct btrace_function): Remove FLOW.
6465
42bfe59e
TW
64662017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6467
6468 * btrace.c (ftrace_find_call_by_number): New function.
6469 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6470 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6471 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6472 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6473 index.
6474 * btrace.h (struct btrace_function): Turn UP into an index.
6475 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6476 as an index.
6477 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6478 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6479 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6480
b54b03bd
TW
64812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6482
6483 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6484 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6485 ftrace_update_function, ftrace_compute_global_level_offset,
6486 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6487 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6488 btrace_insn_end, btrace_is_empty): Remove references to
6489 btrace_thread_info::begin and btrace_thread_info::end.
6490 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6491 (struct btrace_thread_info) <functions>: Adjust comment.
6492 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6493 btrace_thread_info::begin.
6494
8286623c
TW
64952017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6496
6497 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6498 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6499 ftrace_update_function): Remove arguments that implicitly were always
6500 BTINFO->END.
6501 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6502 Don't pass BTINFO->END.
6503
a0f1b963
TW
65042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6505
6506 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6507 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6508 btrace_find_insn_by_number): Replace function segment pointer with
6509 index.
6510 (btrace_insn_cmp): Simplify.
6511 * btrace.h: (struct btrace_insn_iterator) Rename index to
6512 insn_index. Replace function segment pointer with index into function
6513 segment vector.
6514 * record-btrace.c (record_btrace_call_history): Replace function
6515 segment pointer use with index.
6516 (record_btrace_frame_sniffer): Retrieve function call segment through
6517 vector.
6518 (record_btrace_set_replay): Remove defunc't safety check.
6519
f158f208
TW
65202017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6521
6522 * btrace.c (btrace_ends_with_single_insn): New function.
6523 (btrace_call_get, btrace_call_number, btrace_call_begin,
6524 btrace_call_end, btrace_call_next, btrace_call_prev,
6525 btrace_find_call_by_number): Use index into call segment vector
6526 instead of pointer.
6527 (btrace_call_cmp): Simplify.
6528 * btrace.h (struct btrace_call_iterator): Replace function call segment
6529 pointer with index into vector.
6530 * record-btrace.c (record_btrace_call_history): Use index instead of
6531 pointer.
6532
521103fd
TW
65332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6534
6535 * btrace.c (btrace_insn_begin, btrace_insn_end,
6536 btrace_find_insn_by_number): Add btinfo to iterator.
6537 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6538
17b89b34
TW
65392017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6540
6541 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6542 and save pointers directly.
6543 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6544 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6545 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6546 changed signature of functions.
6547 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6548 (btrace_fetch): Remove code that adds btrace_function pointers to
6549 vector of btrace_functions.
6550 (btrace_clear): Simplify freeing vector of btrace_functions.
6551
2b51eddc
TW
65522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6553
6554 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6555 Replace VEC_* with std::vector functions.
6556 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6557 (struct btrace_thread_info)<functions>: Change type to std::vector.
6558
db6be0d5
SM
65592017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6560
6561 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6562 "Removed targets and native configurations" up. Merge duplicate
6563 "New commands" sub-sections. Add "New options" sub-sections.
6564
b057297a
AH
65652017-05-26 Alan Hayward <alan.hayward@arm.com>
6566
6567 * defs.h (copy_integer_to_size): New declaration.
6568 * findvar.c (copy_integer_to_size): New function.
6569 (do_cint_test): New selftest function.
6570 (copy_integer_to_size_test): Likewise.
6571 (_initialize_findvar): Likewise.
6572 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6573 (mips_fbsd_collect_reg): Use raw_collect_integer.
6574 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6575 (mips64_fill_gregset): Use raw_collect_integer
6576 (mips64_fill_fpregset): Use raw_supply_integer.
6577 * regcache.c (regcache::raw_supply_integer): New function.
6578 (regcache::raw_collect_integer): Likewise.
6579 * regcache.h: (regcache::raw_supply_integer): New declaration.
6580 (regcache::raw_collect_integer): Likewise.
6581
b77b02a5
YQ
65822017-05-24 Yao Qi <yao.qi@linaro.org>
6583
6584 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6585 (COMMON_OBS): Add gdbarch-selftests.o.
6586 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6587 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6588 * gdbarch-selftests.c: New file.
6589 * regcache.h (regcache) <~regcache>: Mark it virtual if
6590 GDB_SELF_TEST.
6591 <raw_write>: Likewise.
6592
e521e87e
YQ
65932017-05-24 Yao Qi <yao.qi@linaro.org>
6594
6595 * regcache.c (current_regcache): Change it to
6596 regcache::current_regcache.
6597 (regcache_observer_target_changed): Update.
6598 (regcache_thread_ptid_changed): Make it a regcache static
6599 method.
6600 (regcache_thread_ptid_changed): Update.
6601 (class regcache_access): New.
6602 (current_regcache_test): Update.
6603 (_initialize_regcache): Update.
6604 * regcache.h: Include forward_list.
6605 (regcache): Declare regcache_thread_ptid_changed and declare
6606 registers_changed_ptid as friend.
6607
d8e07dda
YQ
66082017-05-24 Yao Qi <yao.qi@linaro.org>
6609
6610 * i387-tdep.c (i387_register_to_value): Use register_size
6611 instead of TYPE_LENGTH.
6612 * m68k-tdep.c (m68k_register_to_value): Likewise.
6613
8c8f9122
YQ
66142017-05-24 Yao Qi <yao.qi@linaro.org>
6615
6616 * i387-tdep.c (i387_convert_register_p): Return false if type
6617 code isn't TYPE_CODE_FLT.
6618
68fce50f
YQ
66192017-05-24 Yao Qi <yao.qi@linaro.org>
6620
6621 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6622 length is 4.
6623 (alpha_register_to_value): Remove type length check.
6624 (alpha_value_to_register): Likewise.
6625
88954b49
YQ
66262017-05-24 Yao Qi <yao.qi@linaro.org>
6627
6628 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6629 TYPE_CODE_FLT.
6630
e3ec9b69
YQ
66312017-05-24 Yao Qi <yao.qi@linaro.org>
6632
6633 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6634 TYPE_CODE_FLT or not.
6635
cdd238da
YQ
66362017-05-24 Yao Qi <yao.qi@linaro.org>
6637
6638 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6639 * avr-tdep.c (avr_gdbarch_init): Likewise.
6640 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6641 * cris-tdep.c (cris_gdbarch_init): Likewise.
6642 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6643 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6644 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6645 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6646 * mep-tdep.c (mep_gdbarch_init): Likewise.
6647 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6648 * mips-tdep.c (mips_gdbarch_init): Likewise.
6649 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6650 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6651 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6652 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6653 * v850-tdep.c (v850_gdbarch_init): Likewise.
6654
7a3929c4
YQ
66552017-05-24 Yao Qi <yao.qi@linaro.org>
6656
6657 * selftest-arch.c (tests_with_arch): Call registers_changed
6658 and reinit_frame_cache.
6659 * selftest.c (run_self_tests): Likewise.
6660
f4985dba
YQ
66612017-05-24 Yao Qi <yao.qi@linaro.org>
6662
6663 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6664 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6665
ab20fa4a
YQ
66662017-05-24 Yao Qi <yao.qi@linaro.org>
6667
6668 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6669 set_gdbarch_print_insn.
6670
f532ab94
YQ
66712017-05-24 Yao Qi <yao.qi@linaro.org>
6672
6673 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6674 set_gdbarch_print_insn.
6675
39503f82
YQ
66762017-05-24 Yao Qi <yao.qi@linaro.org>
6677
6678 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6679 set_gdbarch_print_insn.
6680 * arc-tdep.c (arc_gdbarch_init): Likewise.
6681 * arch-utils.c: include dis-asm.h.
6682 (default_print_insn): New function.
6683 * arch-utils.h (default_print_insn): Declare.
6684 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6685 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6686 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6687 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6688 * frv-tdep.c (frv_gdbarch_init): Likewise.
6689 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6690 * gdbarch.sh (print_insn): Use default_print_insn.
6691 * gdbarch.c: Regenerated.
6692 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6693 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6694 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6695 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6696 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6697 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6698 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6699 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6700 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6701 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6702 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6703 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6704 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6705 * mt-tdep.c (mt_gdbarch_init): Likewise.
6706 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6707 * nios2-tdep.c (nios2_print_insn): Remove.
6708 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6709 * rx-tdep.c (rx_gdbarch_init): Likewise.
6710 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6711 * score-tdep.c (score_print_insn): Remove.
6712 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6713 * sh-tdep.c (sh_gdbarch_init): Likewise.
6714 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6715 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6716 * tic6x-tdep.c (tic6x_print_insn): Remove.
6717 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6718 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6719 * v850-tdep.c (v850_gdbarch_init): Likewise.
6720 * vax-tdep.c (vax_gdbarch_init): Likewise.
6721 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6722 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6723
f7241d4f
JB
67242017-05-23 John Baldwin <jhb@FreeBSD.org>
6725
6726 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6727 (MIPS_FP0_REGNUM): Remove.
6728 (MIPS_FSR_REGNUM): Remove.
6729 (mips_fbsd_supply_fpregs): Use mips_regnum.
6730 (mips_fbsd_supply_gregs): Likewise.
6731 (mips_fbsd_collect_fpregs): Likewise.
6732 (mips_fbsd_collect_gregs): Likewise.
6733
d489d81d
JB
67342017-05-23 John Baldwin <jhb@FreeBSD.org>
6735
6736 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6737 (getpfpregs_supplies): New function.
6738 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6739 getfpregs_supplies.
6740 (mips_fbsd_store_inferior_registers): Likewise.
6741
e11b3cdc
PA
67422017-05-22 Pedro Alves <palves@redhat.com>
6743
6744 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6745 maintainer.
6746
0f068fb5
AH
67472017-05-22 Alan Hayward <alan.hayward@arm.com>
6748
6749 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6750 (store_register): Likewise.
6751 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6752 (get_decimal_float_return_value): Likewise.
6753 (do_ppc_sysv_return_value): Likewise.
6754 (ppc64_sysv_abi_push_integer): Likewise.
6755 (ppc64_sysv_abi_push_freg): Likewise.
6756 (ppc64_sysv_abi_return_value_base): Likewise.
6757 (ppc64_sysv_abi_return_value): Likewise.
6758 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6759 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6760 * rs6000-nat.c: Likewise.
6761 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6762 (rs6000_value_to_register): Likewise.
6763 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6764
e6cf65f2
TT
67652017-05-21 Tom Tromey <tom@tromey.com>
6766
6767 PR rust/21466:
6768 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6769 arrays as "[T]", not "[T; ]".
6770
43cc5389
TT
67712017-05-19 Tom Tromey <tom@tromey.com>
6772
6773 PR rust/21484:
6774 * rust-lang.c (exp_descriptor_rust): New function.
6775 (rust_language_defn): Use it.
6776 * p-lang.c (pascal_language_defn): Update.
6777 * opencl-lang.c (opencl_language_defn): Update.
6778 * objc-lang.c (objc_language_defn): Update.
6779 * m2-lang.c (m2_language_defn): Update.
6780 * language.h (struct language_defn)
6781 <la_watch_location_expression>: New member.
6782 * language.c (unknown_language_defn, auto_language_defn)
6783 (local_language_defn): Update.
6784 * go-lang.c (go_language_defn): Update.
6785 * f-lang.c (f_language_defn): Update.
6786 * d-lang.c (d_language_defn): Update.
6787 * c-lang.h (c_watch_location_expression): Declare.
6788 * c-lang.c (c_watch_location_expression): New function.
6789 (c_language_defn, cplus_language_defn, asm_language_defn)
6790 (minimal_language_defn): Use it.
6791 * breakpoint.c (watch_command_1): Call
6792 la_watch_location_expression.
6793 * ada-lang.c (ada_language_defn): Update.
6794
7a6e7fcc
RO
67952017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6796
6e7e1744
RO
6797 PR tui/21482
6798 * gdb_curses.h (NOMACROS): Define.
6799 (NCURSES_NOMACROS): Define.
6800
68012017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6802
6803 PR tui/21482
7a6e7fcc
RO
6804 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6805 arg to char *.
6806 * tui/tui-wingeneral.c (box_win): Likewise.
6807 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6808 (tui_show_source_line): Likewise.
6809 (tui_show_exec_info_content): Likewise.
6810
1933fd8e
VM
68112017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6812
6813 * sparc-tdep.c (sparc_structure_return_p)
6814 (sparc_arg_on_registers_p): New functions.
6815 (sparc32_store_arguments): Use them.
6816 * sparc64-tdep.c (sparc64_16_byte_align_p)
6817 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6818 Handle TYPE_CODE_ARRAY.
6819
21873064
YQ
68202017-05-17 Yao Qi <yao.qi@linaro.org>
6821
6822 * cli/cli-decode.c (add_alias_cmd): New function.
6823 * command.h (add_alias_cmd): Declare.
6824 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6825 instead call add_alias_cmd.
6826
2b351b19
PA
68272017-05-17 Pedro Alves <palves@redhat.com>
6828
6829 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6830 (nat_makefile_frag): ... this. All references updated.
6831 * configure.ac: Likewise.
6832 * configure.nat: Likewise. Enhance comments.
6833 * configure: Regenerate.
6834
5f2ad7a3
RO
68352017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6836
6837 * procfs.c (procfs_create_inferior): Change prototype to match
6838 definition.
6839
adf3dde5
EZ
68402017-05-13 Eli Zaretskii <eliz@gnu.org>
6841
6842 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6843 C++ compiler warning.
6844
6830f270
TT
68452017-05-12 Tom Tromey <tom@tromey.com>
6846
6847 PR rust/21483:
6848 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6849 recurse, just call value_struct_elt directly.
6850
68f2f2e3
TT
68512017-05-12 Tom Tromey <tom@tromey.com>
6852
6853 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6854 OP_RUST_ARRAY>: Fix.
6855
256afbc2
TT
68562017-05-12 Tom Tromey <tom@tromey.com>
6857
6858 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6859
94bb8dfe
YQ
68602017-05-09 Yao Qi <yao.qi@linaro.org>
6861
6862 * regcache.c: Include <forward_list>.
6863 (struct regcache_list): Remove.
6864 (current_regcache): Update.
6865 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6866 (regcache_thread_ptid_changed): Likewise.
6867 (registers_changed_ptid): Likewise.
6868 (current_regcache_size): Likewise.
6869
8248946c
YQ
68702017-05-09 Yao Qi <yao.qi@linaro.org>
6871
6872 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6873 (current_regcache_size): New function.
6874 (current_regcache_test): New function.
6875 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6876
313c5961
AH
68772017-05-08 Alan Hayward <alan.hayward@arm.com>
6878
6879 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6880 (print_gp_register_row): Use get_frame_register_value.
6881
27bfc1d1
AH
68822017-05-08 Alan Hayward <alan.hayward@arm.com>
6883
6884 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6885 (mips_supply_fpregset): Likewise.
6886 (mips64_supply_gregset): Likewise.
6887
146e6c5c
AH
68882017-05-08 Alan Hayward <alan.hayward@arm.com>
6889
6890 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6891 regcache->raw_supply_zeroed.
6892
e50f25ec
SDJ
68932017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6894
6895 * configure.nat: Rearrange 'case' statements to match
6896 host before cpu.
6897
21ea5acd
SDJ
68982017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6899
6900 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6901 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6902 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6903 "@nat_extra_makefile_frag@".
6904 (Makefile): Remove dependency on "@frags@".
6905 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6906 (data-directory/Makefile): Likewise.
6907 * config/aarch64/linux.mh: Deleted; moved contents to
6908 "gdb/configure.nat".
6909 * config/alpha/alpha-linux.mh: Likewise.
6910 * config/alpha/nbsd.mh: Likewise.
6911 * config/arm/linux.mh: Likewise.
6912 * config/arm/nbsdelf.mh: Likewise.
6913 * config/i386/cygwin.mh: Likewise.
6914 * config/i386/cygwin64.mh: Likewise.
6915 * config/i386/darwin.mh: Likewise.
6916 * config/i386/fbsd.mh: Likewise.
6917 * config/i386/fbsd64.mh: Likewise.
6918 * config/i386/go32.mh: Likewise.
6919 * config/i386/i386gnu.mh: Likewise.
6920 * config/i386/i386sol2.mh: Likewise.
6921 * config/i386/linux.mh: Likewise.
6922 * config/i386/linux64.mh: Likewise.
6923 * config/i386/mingw.mh: Likewise.
6924 * config/i386/mingw64.mh: Likewise.
6925 * config/i386/nbsd64.mh: Likewise.
6926 * config/i386/nbsdelf.mh: Likewise.
6927 * config/i386/nto.mh: Likewise.
6928 * config/i386/obsd.mh: Likewise.
6929 * config/i386/obsd64.mh: Likewise.
6930 * config/i386/sol2-64.mh: Likewise.
6931 * config/ia64/linux.mh: Likewise.
6932 * config/m32r/linux.mh: Likewise.
6933 * config/m68k/linux.mh: Likewise.
6934 * config/m68k/nbsdelf.mh: Likewise.
6935 * config/m68k/obsd.mh: Likewise.
6936 * config/m88k/obsd.mh: Likewise.
6937 * config/mips/fbsd.mh: Likewise.
6938 * config/mips/linux.mh: Likewise.
6939 * config/mips/nbsd.mh: Likewise.
6940 * config/mips/obsd64.mh: Likewise.
6941 * config/pa/linux.mh: Likewise.
6942 * config/pa/nbsd.mh: Likewise.
6943 * config/pa/obsd.mh: Likewise.
6944 * config/powerpc/aix.mh: Likewise.
6945 * config/powerpc/fbsd.mh: Likewise.
6946 * config/powerpc/linux.mh: Likewise.
6947 * config/powerpc/nbsd.mh: Likewise.
6948 * config/powerpc/obsd.mh: Likewise.
6949 * config/powerpc/ppc64-linux.mh: Likewise.
6950 * config/powerpc/spu-linux.mh: Likewise.
6951 * config/s390/linux.mh: Likewise.
6952 * config/sh/nbsd.mh: Likewise.
6953 * config/sparc/fbsd.mh: Likewise.
6954 * config/sparc/linux.mh: Likewise.
6955 * config/sparc/linux64.mh: Likewise.
6956 * config/sparc/nbsd64.mh: Likewise.
6957 * config/sparc/nbsdelf.mh: Likewise.
6958 * config/sparc/obsd64.mh: Likewise.
6959 * config/sparc/sol2.mh: Likewise.
6960 * config/tilegx/linux.mh: Likewise.
6961 * config/vax/nbsdelf.mh: Likewise.
6962 * config/vax/obsd.mh: Likewise.
6963 * config/xtensa/linux.mh: Likewise.
6964 * config/i386/i386gnu.mn: New file, with excerpts from
6965 "config/i386/i386gnu.mh".
6966 * configure: Regenerate.
6967 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6968 *.mh files under "gdb/config".
6969 * configure.nat: New file, with contents from the
6970 "gdb/config/*/*.mh" files.
6971
7ed1acaf
TW
69722017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6973
6974 * btrace.c (btrace_clear): Free insn vector.
6975
e13cb306
PA
69762017-05-05 Pedro Alves <palves@redhat.com>
6977
6978 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6979 * configure: Regenerate.
6980
5ed8105e
PA
69812017-05-04 Pedro Alves <palves@redhat.com>
6982
6983 * Makefile.in (SFILES): Add progspace-and-thread.c.
6984 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6985 (COMMON_OBS): Add progspace-and-thread.o.
6986 * breakpoint.c: Include "progspace-and-thread.h".
6987 (update_inserted_breakpoint_locations)
6988 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6989 Use scoped_restore_current_pspace_and_thread.
6990 (create_std_terminate_master_breakpoint): Use
6991 scoped_restore_current_program_space.
6992 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6993 (print_breakpoint_location): Use
6994 scoped_restore_current_program_space.
6995 (bp_loc_is_permanent): Use
6996 scoped_restore_current_pspace_and_thread.
6997 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6998 (download_tracepoint_locations): Use
6999 scoped_restore_current_pspace_and_thread.
7000 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7001 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7002 (enum step_over_calls_kind): Moved from inferior.h.
7003 (class scoped_restore_current_thread): New class.
7004 * gdbthread.h (make_cleanup_restore_current_thread): Delete
7005 declaration.
7006 (scoped_restore_current_thread): New class.
7007 * infcmd.c: Include "common/gdb_optional.h".
7008 (continue_1, proceed_after_attach): Use
7009 scoped_restore_current_thread.
7010 (notice_new_inferior): Use scoped_restore_current_thread.
7011 * inferior.c: Include "progspace-and-thread.h".
7012 (restore_inferior, save_current_inferior): Delete.
7013 (add_inferior_command, clone_inferior_command): Use
7014 scoped_restore_current_pspace_and_thread.
7015 * inferior.h (scoped_restore_current_inferior): New class.
7016 * infrun.c: Include "progspace-and-thread.h" and
7017 "common/gdb_optional.h".
7018 (follow_fork_inferior): Use
7019 scoped_restore_current_pspace_and_thread.
7020 (scoped_restore_exited_inferior): New class.
7021 (handle_vfork_child_exec_or_exit): Use
7022 scoped_restore_exited_inferior,
7023 scoped_restore_current_pspace_and_thread,
7024 scoped_restore_current_thread and scoped_restore.
7025 (fetch_inferior_event): Use scoped_restore_current_thread.
7026 * linespec.c (decode_line_full, decode_line_1): Use
7027 scoped_restore_current_program_space.
7028 * mi/mi-main.c: Include "progspace-and-thread.h".
7029 (exec_continue): Use scoped_restore_current_thread.
7030 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7031 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7032 * proc-service.c (ps_pglobal_lookup): Use
7033 scoped_restore_current_program_space.
7034 * progspace-and-thread.c: New file.
7035 * progspace-and-thread.h: New file.
7036 * progspace.c (release_program_space, clone_program_space): Use
7037 scoped_restore_current_program_space.
7038 (restore_program_space, save_current_program_space)
7039 (save_current_space_and_thread): Delete.
7040 (switch_to_program_space_and_thread): Moved to
7041 progspace-and-thread.c.
7042 * progspace.h (save_current_program_space)
7043 (save_current_space_and_thread): Delete declarations.
7044 (scoped_restore_current_program_space): New class.
7045 * remote.c (remote_btrace_maybe_reopen): Use
7046 scoped_restore_current_thread.
7047 * symtab.c: Include "progspace-and-thread.h".
7048 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7049 * thread.c (print_thread_info_1): Use
7050 scoped_restore_current_thread.
7051 (struct current_thread_cleanup): Delete.
7052 (do_restore_current_thread_cleanup)
7053 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7054 (scoped_restore_current_thread::~scoped_restore_current_thread):
7055 ... this new dtor.
7056 (make_cleanup_restore_current_thread): Rename/convert to ...
7057 (scoped_restore_current_thread::scoped_restore_current_thread):
7058 ... this new ctor.
7059 (thread_apply_all_command): Use scoped_restore_current_thread.
7060 (thread_apply_command): Use scoped_restore_current_thread.
7061 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7062 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7063
f6223dbb
PA
70642017-05-04 Pedro Alves <palves@redhat.com>
7065
7066 * thread.c (make_cleanup_restore_current_thread): Move
7067 find_thread_ptid call before the is_stopped call. Assert that the
7068 thread is found. Replace is_stopped call by checking the thread's
7069 state directly. Remove unnecessary NULL-thread check.
7070
3c3ae77e
PA
70712017-05-04 Pedro Alves <palves@redhat.com>
7072
7073 * corelow.c (thread_section_name): New class.
7074 (get_core_register_section, get_core_siginfo): Use it.
7075
45eba0ab
AA
70762017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7077
7078 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7079 (get_core_register_section): Remove xfree of NULL pointer.
7080
f81fdd35
AH
70812017-05-03 Alan Hayward <alan.hayward@arm.com>
7082
7083 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7084 * regcache.c (regcache::raw_supply_zeroed): New function.
7085 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7086
35837774
SM
70872017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7088
7089 * gdbarch.sh: Remove commented out definition of
7090 TARGET_CHAR_BIT.
7091 * gdbarch.h: Re-generate.
7092
c94fee56
SDJ
70932017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7094
7095 * configure: Regenerate.
7096
d17f7b36
SM
70972017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7098
7099 * solib-target.c (solib_target_relocate_section_addresses):
7100 Remove num_section_bases, num_bases, segment_bases variables.
7101
b560ebd6
SM
71022017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7103
7104 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7105
f2f46dfc
SM
71062017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7107
7108 * solib-target.c: Include <vector>
7109 (struct lm_info_target) <~lm_info_target>: Remove.
7110 <segment_bases, section_bases>: Change type to
7111 std::vector<CORE_ADDR>.
7112 (library_list_start_segment, library_list_start_section,
7113 library_list_end_library,
7114 solib_target_relocate_section_addresses): Adjust.
7115
a0ff9e1a
SM
71162017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7117
7118 * gdbarch.sh (software_single_step): Change return type to
7119 std::vector<CORE_ADDR>.
7120 * gdbarch.c, gdbarch.h: Re-generate.
7121 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7122 Adjust.
7123 (arm_deal_with_atomic_sequence_raw): Adjust.
7124 (thumb_get_next_pcs_raw): Adjust.
7125 (arm_get_next_pcs_raw): Adjust.
7126 (arm_get_next_pcs): Adjust.
7127 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7128 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7129 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7130 (alpha_software_single_step): Adjust.
7131 * alpha-tdep.h (alpha_software_single_step): Adjust.
7132 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7133 * arm-tdep.c (arm_software_single_step): Adjust.
7134 (arm_breakpoint_kind_from_current_state): Adjust.
7135 * arm-tdep.h (arm_software_single_step): Adjust.
7136 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7137 * cris-tdep.c (cris_software_single_step): Adjust.
7138 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7139 (micromips_deal_with_atomic_sequence): Adjust.
7140 (deal_with_atomic_sequence): Adjust.
7141 (mips_software_single_step): Adjust.
7142 * mips-tdep.h (mips_software_single_step): Adjust.
7143 * moxie-tdep.c (moxie_software_single_step): Adjust.
7144 * nios2-tdep.c (nios2_software_single_step): Adjust.
7145 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7146 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7147 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7148 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7149 * sparc-tdep.c (sparc_software_single_step): Adjust.
7150 * spu-tdep.c (spu_software_single_step): Adjust.
7151 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7152
ea480a30
SM
71532017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7154
7155 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7156 * gdbarch.h: Re-generate.
7157
d050f7d7
TW
71582017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7159
7160 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7161 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7162 * python/py-instruction.c, python/py-instruction.h: New file.
7163 * python/py-record.c: Add py-instruction.h include.
7164 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7165 gdb.RecordInstruction.
7166 * python/python-internal.h: Add gdbpy_initialize_instruction
7167 declaration.
7168 * python/python.c (do_start_initialization): Add
7169 gdbpy_initialize_instruction.
7170
14f819c8
TW
71712017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7172
7173 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7174 Remove.
7175 (btrace_func_from_recpy_func): New function.
7176 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7177 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7178 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7179 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7180 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7181 Also, use new helper functions.
7182 (btpy_list_item): Use new helper functions.
7183 (recpy_bt_function_call_history): Use new type name.
7184 (btpy_call_getset): Remove.
7185 (gdbpy_initialize_btrace): Remove code to initialize
7186 gdb.BtraceFunctionCall.
7187 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7188 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7189 recpy_bt_func_prev, recpy_bt_func_next): New export.
7190 * python/py-record.c (recpy_func_type): New static object.
7191 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7192 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7193 recpy_func_next): New function.
7194 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7195 (recpy_func_getset): New static object.
7196 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7197 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7198
0ed5da75
TW
71992017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7200
7201 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7202 (btpy_object, btpy_insn_type, btpy_new): Remove.
7203 (btpy_list_object): Use gdb.RecordInstruction type instead of
7204 gdb.BtraceInstruction type.
7205 (btrace_insn_from_recpy_insn): New function.
7206 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7207 btpy_new.
7208 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7209 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7210 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7211 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7212 instead of btpy_object.
7213 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7214 btpy_insn_data, btpy_insn_decode): Rename to ...
7215 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7216 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7217 recpy_bt_insn_decode): This. Also, use new helper functions.
7218 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7219 recpy_insn_type.
7220 (btpy_insn_getset): Remove.
7221 (gdbpy_initialize_btrace): Remove code to initialize
7222 gdb.BtraceInstruction. Use recpy_element_object.
7223 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7224 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7225 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7226 * python/py-record.c (recpy_insn_type): New static object.
7227 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7228 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7229 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7230 New function.
7231 (recpy_insn_getset): New static object.
7232 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7233 * python/py-record.h (recpy_element_object): New typedef.
7234 (recpy_insn_type, recpy_insn_new): New export.
7235
913aeadd
TW
72362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7237
7238 * py-record-btrace.c (btpy_insn_new): Removed.
7239 (btpy_insn_or_gap_new): New function.
7240 (btpy_insn_error): Removed.
7241 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7242 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7243 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7244 btpy_insn_or_gap_new instead of btpy_insn_new.
7245 (btpy_insn_getset): Remove btpy_insn_error.
7246 * py-record.c (recpy_gap_type): New static object.
7247 (recpy_gap_object): New typedef.
7248 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7249 recpy_gap_reason_string): New function.
7250 (recpy_gap_getset): New static object.
7251 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7252 * py-record.h (recpy_gap_new): New export.
7253
a3be24ad
TW
72542017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7255
7256 * python/py-record.c (recpy_ptid): Remove.
7257 (recpy_record_getset): Remove recpy_ptid.
7258
ae20e79a
TW
72592017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7260
7261 * btrace.c (btrace_fetch): Set inferior_ptid.
7262 * python/py-record-btrace.c: Add "py-record.h" include.
7263 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7264 recpy_bt_end, recpy_bt_instruction_history,
7265 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7266 in gdb.Record object instead of current ptid.
7267 * python/py-record.c: Include new "py-record.h" file.
7268 (recpy_record_object): Moved to py-record.h.
7269 * python/py-record.h: New file.
7270
8d0050ea
TW
72712017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7272
7273 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7274 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7275 indentation.
7276
3f380b50
JB
72772017-05-01 Joel Brobecker <brobecker@adacore.com>
7278
7279 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7280 the past maintainers section.
7281
07495424
YQ
72822017-04-28 Yao Qi <yao.qi@linaro.org>
7283
7284 * infcmd.c (get_return_value): Use regcache ctor, and remove
7285 cleanup.
7286
deb1fa3e
YQ
72872017-04-28 Yao Qi <yao.qi@linaro.org>
7288 Pedro Alves <palves@redhat.com>
7289
7290 * regcache.c (regcache::regcache): New tag dispatch ctor.
7291 (do_cooked_read): Moved above.
7292 (regcache_dup): Use the tag dispatch ctor..
7293 * regcache.h (regcache): Declare ctor, delete copy ctor and
7294 assignment operator, remove friend regcache_dup.
7295
b421c83c
YQ
72962017-04-28 Yao Qi <yao.qi@linaro.org>
7297
7298 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7299 call method save instead of regcache_cpy.
7300 * regcache.h (struct regcache): Make regcache_dup a friend.
7301
ef79d9a3
YQ
73022017-04-28 Yao Qi <yao.qi@linaro.org>
7303
7304 * regcache.c (struct regcache): Move to regcache.h
7305 (regcache::arch): New method.
7306 (regcache_get_ptid): Update.
7307 (get_regcache_arch): Call arch method.
7308 (get_regcache_aspace): Call method aspace.
7309 (register_buffer): Change it to method.
7310 (regcache_save): Change it to regcache::save.
7311 (regcache_restore): Likewise.
7312 (regcache_cpy_no_passthrough): Remove the declaration.
7313 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7314 (regcache_cpy_no_passthrough): Change it to method
7315 cpy_no_passthrough.
7316 (regcache_register_status): Change it to method
7317 get_register_status.
7318 (regcache_invalidate): Change it to method invalidate.
7319 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7320 (regcache_raw_update): Change it to method raw_update.
7321 (regcache_raw_read): Likewise.
7322 (regcache_raw_read_signed): Likewise.
7323 (regcache_raw_read_unsigned): Likewise.
7324 (regcache_raw_write_signed): Likewise.
7325 (regcache_raw_write_unsigned): Likewise.
7326 (regcache_cooked_read): Likewise.
7327 (regcache_cooked_read_value): Likewise.
7328 (regcache_cooked_read_signed): Likewise.
7329 (regcache_cooked_read_unsigned): Likewise.
7330 (regcache_cooked_write_signed): Likewise.
7331 (regcache_cooked_write_unsigned): Likewise.
7332 (regcache_raw_set_cached_value): Likewise.
7333 (regcache_raw_write): Likewise.
7334 (regcache_cooked_write): Likewise.
7335 (regcache_xfer_part): Likewise.
7336 (regcache_raw_read_part): Likewise.
7337 (regcache_raw_write_part): Likewise.
7338 (regcache_cooked_read_part): Likewise.
7339 (regcache_cooked_write_part): Likewise.
7340 (regcache_raw_supply): Likewise.
7341 (regcache_raw_collect): Likewise.
7342 (regcache_transfer_regset): Likewise.
7343 (regcache_supply_regset): Likewise.
7344 (regcache_collect_regset): Likewise.
7345 (regcache_debug_print_register): Likewise.
7346 (enum regcache_dump_what): Move it to regcache.h.
7347 (regcache_dump): Change it to method dump.
7348 * regcache.h (enum regcache_dump_what): New.
7349 (class regcache): New.
7350 * target.c (target_fetch_registers): Call method
7351 debug_print_register.
7352 (target_store_registers): Likewise.
7353
f8fdb78e
SM
73542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7355
7356 * windows-nat.c (struct lm_info_windows): Initialize field.
7357 (windows_make_so): Allocate lm_info_windows with new.
7358 (windows_free_so): Free lm_info_windows with delete.
7359
9ccbfd7b
SM
73602017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7361
7362 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7363 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7364 cleanup.
7365 (darwin_free_so): Free lm_info_darwin with delete.
7366
76e75227
SM
73672017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7368
7369 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7370 <l_addr_p>: Change type to bool.
7371 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7372 (svr4_free_so): Free lm_info_svr4 with delete.
7373 (svr4_copy_library_list): Replace memcpy with call to copy
7374 constructor.
7375 (library_list_start_library, svr4_default_sos): Allocate
7376 lm_info_svr4 with new.
7377
51046d9e
SM
73782017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7379
7380 * solib-target.c (struct lm_info_target): Add destructor,
7381 initialize fields.
7382 <name>: Change type to std::string.
7383 (library_list_start_library): Allocate lm_info_target with new.
7384 (solib_target_free_library_list): Free lm_info_target with
7385 delete.
7386 (solib_target_current_sos): Adapt to std::string.
7387 (solib_target_free_so): Free lm_info_target with delete.
7388
4023ae76
SM
73892017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7390
7391 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7392 fields.
7393 (frv_current_sos): Allocate lm_info_frv with new.
7394 (frv_relocate_main_executable): Free lm_info_frv with delete,
7395 allocate with new.
7396 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7397
af43057b
SM
73982017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7399
7400 * solib-frv.c (struct lm_info_frv): Fix indentation.
7401
b0911207
SM
74022017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7403
7404 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7405 map field.
7406 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7407 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7408 and allocate with new.
7409 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7410
6c401f72
SM
74112017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7412
7413 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7414 <filename, member_name>: Change type to std::string.
7415 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7416 (library_list_start_library): Allocate lm_info_aix with new.
7417 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7418 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7419 with copy constructor.
7420
d0e449a1
SM
74212017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7422
7423 * solist.h (struct lm_info): Remove.
7424 (struct lm_info_base): New class.
7425 (struct so_list) <lm_info>: Change type to lm_info_base *.
7426 * nto-tdep.c (struct lm_info): Remove.
7427 (lm_addr): Adjust.
7428 * solib-aix.c (struct lm_info): Rename to ...
7429 (struct lm_info_aix): ... this. Extend lm_info_base.
7430 (lm_info_p): Rename to ...
7431 (lm_info_aix_p): ... this, and adjust.
7432 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7433 solib_aix_parse_libraries, library_list_start_library,
7434 solib_aix_free_library_list, solib_aix_parse_libraries,
7435 solib_aix_get_library_list,
7436 solib_aix_relocate_section_addresses, solib_aix_free_so,
7437 solib_aix_get_section_offsets,
7438 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7439 Adjust.
7440 (struct solib_aix_inferior_data) <library_list>: Adjust.
7441 * solib-darwin.c (struct lm_info): Rename to ...
7442 (struct lm_info_darwin): ... this. Extend lm_info_base.
7443 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7444 * solib-dsbt.c (struct lm_info): Rename to ...
7445 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7446 (struct dsbt_info) <main_executable_lm_info): Adjust.
7447 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7448 dsbt_relocate_section_addresses): Adjust.
7449 * solib-frv.c (struct lm_info): Rename to ...
7450 (struct lm_info_frv): ... this. Extend lm_info_base.
7451 (main_executable_lm_info): Adjust.
7452 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7453 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7454 find_canonical_descriptor_in_load_object,
7455 frv_fdpic_find_canonical_descriptor): Adjust.
7456 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7457 to lm_info_svr4.
7458 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7459 svr4_clear_so, svr4_copy_library_list,
7460 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7461 svr4_current_sos, svr4_fetch_objfile_link_map,
7462 solist_update_incremental): Adjust.
7463 * solib-svr4.h (struct lm_info_svr4): Move here from
7464 solib-svr4.c.
7465 * solib-target.c (struct lm_info): Rename to ...
7466 (struct lm_info_target): ... this. Extend lm_info_base.
7467 (lm_info_p): Rename to ...
7468 (lm_info_target_p): ... this.
7469 (solib_target_parse_libraries, library_list_start_segment,
7470 library_list_start_section, library_list_start_library,
7471 library_list_end_library, solib_target_free_library_list,
7472 solib_target_current_sos, solib_target_free_so,
7473 solib_target_relocate_section_addresses): Adjust.
7474 * windows-nat.c (struct lm_info): Rename to ...
7475 (struct lm_info_windows): ... this. Extend lm_info_base.
7476 (windows_make_so, handle_load_dll, handle_unload_dll,
7477 windows_xfer_shared_libraries): Adjust.
7478
434a4023
SM
74792017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7480
7481 * solib-darwin.c (struct darwin_so_list): Remove.
7482 (darwin_current_sos): Allocate an so_list object instead of a
7483 darwin_so_list, separately allocate an lm_info object.
7484 (darwin_free_so): Free lm_info.
7485
428544e8
JB
74862017-04-28 John Baldwin <jhb@FreeBSD.org>
7487
7488 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7489 with fprintf_filtered.
7490
4621115f
YQ
74912017-04-28 Yao Qi <yao.qi@linaro.org>
7492
7493 * regcache.c (regcache::regcache): New function.
7494 (regcache::~regcache): New function.
7495 (regcache_xmalloc_1): Remove.
7496 (regcache_xmalloc): Call new regcache.
7497 (regcache_xfree): Call delete regcache.
7498 (get_thread_arch_aspace_regcache): Call new regcache.
7499
339053c2
YQ
75002017-04-28 Yao Qi <yao.qi@linaro.org>
7501
7502 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7503 lwp instead of ptid_get_lwp.
7504
7974a605
YQ
75052017-04-28 Yao Qi <yao.qi@linaro.org>
7506
7507 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7508 lwp_info instead of getting from inferior_ptid.
7509
e15c3eb4
KS
75102017-04-27 Keith Seitz <keiths@redhat.com>
7511
7512 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7513 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7514 (CV_CONVERSION_BADNESS): Define.
7515 (rank_one_type): Remove overly restrictive rvalue reference
7516 rank checks.
7517 Add cv-qualifier checks and subranks for type equality.
7518 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7519 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7520 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7521
72bc1d24
SM
75222017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7523
7524 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7525 count when creating the object.
7526
55bcecda
UW
75272017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7528 Ulrich Weigand <uweigand@de.ibm.com>
7529
7530 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7531 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7532 is used in AIX.
7533 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7534 (process_xcoff_symbol): Likewise.
7535 (scan_xcoff_symtab): Likewise.
7536
5c99fcf8
AH
75372017-04-26 Alan Hayward <alan.hayward@arm.com>
7538
7539 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7540 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7541 (ia64_access_reg): Use get_frame_register_unsigned.
7542 (ia64_access_rse_reg): Likewise.
7543 (ia64_libunwind_frame_prev_register): Likewise.
7544
b41c5a85
JW
75452017-04-26 Jiong Wang <jiong.wang@arm.com>
7546
7547 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7548 * gdbarch.c: Regenerated.
7549 * gdbarch.h: Regenerated.
7550 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7551 visibility external.
7552 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7553 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7554 (enum cfa_how_kind): Move to ...
7555 (struct dwarf2_frame_state_reg_info): Likewise.
7556 (struct dwarf2_frame_state): Likewise.
7557 * dwarf2-frame.h: ... here.
7558 (dwarf2_frame_state_alloc_regs): New declaration.
7559 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7560 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7561
c185f580
AH
75622017-04-26 Alan Hayward <alan.hayward@arm.com>
7563
7564 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7565 regcache_raw_read_unsigned.
7566 (xtensa_pseudo_register_write): Likewise.
7567
19c45594
AH
75682017-04-26 Alan Hayward <alan.hayward@arm.com>
7569
7570 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7571 (nds32_pseudo_register_write): Likewise.
7572
4658f12e
YQ
75732017-04-25 Yao Qi <yao.qi@linaro.org>
7574
7575 * regcache.c (struct regcache) <readonly_p>: Change its type
7576 to bool.
7577 (regcache_xmalloc_1): Update parameter type and callers update.
7578
d581dda8
YQ
75792017-04-25 Yao Qi <yao.qi@linaro.org>
7580
7581 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7582 set_gdbarch_wchar_bit.
7583 * arm-tdep.c (arm_gdbarch_init): Likewise.
7584
debed3db
PA
75852017-04-25 Pedro Alves <palves@redhat.com>
7586
7587 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7588 (BothAreRelocatable, memcopy, memmove): Don't define.
7589 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7590 macros.
7591
b0b92aeb
PA
75922017-04-25 Pedro Alves <palves@redhat.com>
7593
7594 * common/common-defs.h: Include "common/poison.h".
7595 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7596 and adjust.
7597 * common/poison.h: New file.
7598 * common/traits.h: Include <type_traits>.
7599 (Not, Or, Requires): New, moved from common/function-view.h.
7600
16c4d54a
PA
76012017-04-25 Pedro Alves <palves@redhat.com>
7602
7603 * breakpoint.h (struct breakpoint): In-class initialize all
7604 fields. Make boolean fields "bool".
7605 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7606 memset call and initializations no longer necessary.
7607
b5c36682
PA
76082017-04-25 Pedro Alves <palves@redhat.com>
7609
7610 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7611 reference.
7612 (pt_btrace_insn): New function.
7613 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7614
5625a286
PA
76152017-04-25 Pedro Alves <palves@redhat.com>
7616
7617 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7618 "base" field and inherit from "bp_location" instead. Add
7619 non-default ctor.
7620 (allocate_location_exception): Use new non-default ctor.
7621 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7622 (init_bp_location): Convert to ...
7623 (bp_location::bp_location): ... this new ctor, and remove memset
7624 call.
7625 (base_breakpoint_allocate_location): Use the new non-default ctor.
7626 * breakpoint.h (bp_location): Now a class. Declare default and
7627 non-default ctors. In-class initialize all members.
7628 (init_bp_location): Remove declaration.
7629
23bcc18f
PA
76302017-04-25 Pedro Alves <palves@redhat.com>
7631
7632 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7633 assignment operator.
7634
e1ba3053
YQ
76352017-04-24 Yao Qi <yao.qi@linaro.org>
7636
7637 * doublest.c (convert_doublest_to_floatformat): Call
7638 floatformat_totalsize_bytes.
7639
10f489e5
TT
76402017-04-22 Tom Tromey <tom@tromey.com>
7641
7642 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7643 ui_out_emit_list.
7644 * stack.c (print_frame): Use ui_out_emit_list.
7645 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7646 ui_out_emit_list.
7647 * mi/mi-main.c (print_one_inferior)
7648 (mi_cmd_data_list_register_names)
7649 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7650 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7651 ui_out_emit_list.
7652 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7653 (mi_output_solib_attribs): Use ui_out_emit_list,
7654 ui_out_emit_tuple.
7655 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7656 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7657 (mi_cmd_stack_list_args, list_args_or_locals): Use
7658 ui_out_emit_list.
7659 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7660 * breakpoint.c (print_solib_event, output_thread_groups): Use
7661 ui_out_emit_list.
7662
0092b74d
TT
76632017-04-22 Tom Tromey <tom@tromey.com>
7664
7665 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7666 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7667 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7668
a14a62dd
TT
76692017-04-22 Tom Tromey <tom@tromey.com>
7670
7671 * tracepoint.c (tvariables_info_1)
7672 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7673
46b9c129
TT
76742017-04-22 Tom Tromey <tom@tromey.com>
7675
7676 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7677 annotate_arg_emitter.
7678 * breakpoint.c (print_mention_watchpoint)
7679 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7680 * annotate.h (struct annotate_arg_emitter): New.
7681
2e783024
TT
76822017-04-22 Tom Tromey <tom@tromey.com>
7683
7684 * record-btrace.c (record_btrace_insn_history)
7685 (record_btrace_insn_history_range, record_btrace_call_history)
7686 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7687 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7688 ui_out_emit_tuple.
7689 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7690 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7691 * skip.c (skip_info): Use ui_out_emit_tuple.
7692 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7693 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7694 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7695 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7696 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7697 ui_out_emit_tuple.
7698 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7699 (output_register, mi_cmd_data_read_memory)
7700 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7701 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7702 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7703 Use ui_out_emit_tuple.
7704 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7705 ui_out_emit_tuple.
7706 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7707 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7708 * linux-thread-db.c (info_auto_load_libthread_db): Use
7709 ui_out_emit_tuple.
7710 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7711 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7712 * disasm.c (do_mixed_source_and_assembly_deprecated)
7713 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7714 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7715 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7716 * breakpoint.c (print_one_breakpoint_location)
7717 (print_one_breakpoint): Use ui_out_emit_tuple.
7718 * auto-load.c (print_script, info_auto_load_cmd): Use
7719 ui_out_emit_tuple.
7720 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7721
9be21bb4
SM
77222017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7723
7724 * thread.c (print_thread_info_1): Remove dead code.
7725
0d4c07af
JK
77262017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7727
7728 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7729 GDB_SELF_TEST.
7730 * arm-tdep.c (selftests::arm_record_test): Likewise.
7731
4daf993d
YQ
77322017-04-21 Yao Qi <yao.qi@linaro.org>
7733
7734 * regcache.c (regcache_restore): Remove argument 2. Replace
7735 argument 3 with regcache. Get register status from
7736 src->register_status and get register contents from
7737 register_buffer (src, regnum).
7738 (regcache_cpy): Update.
7739
a6c21d4a
PA
77402017-04-19 Pedro Alves <palves@redhat.com>
7741
7742 * gdbthread.h (thread): Add missing closing parenthesis in
7743 comment.
7744
3a3fd0fd
PA
77452017-04-19 Pedro Alves <palves@redhat.com>
7746
7747 * common/refcounted-object.h: New file.
7748 * gdbthread.h: Include "common/refcounted-object.h".
7749 (thread_info): Inherit from refcounted_object and add comments.
7750 (thread_info::incref, thread_info::decref)
7751 (thread_info::m_refcount): Delete.
7752 (thread_info::deletable): Use the refcounted_object::refcount()
7753 method.
7754 * inferior.c (current_inferior_): Add comment.
7755 (set_current_inferior): Increment/decrement refcounts.
7756 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7757 not-deletable instead of comparing with the current inferior.
7758 (initialize_inferiors): Increment the initial inferior's refcount.
7759 * inferior.h (struct inferior): Forward declare.
7760 Include "common/refcounted-object.h".
7761 (current_inferior, set_current_inferior): Move declaration to
7762 before struct inferior's definition, and fix comment.
7763 (inferior): Inherit from refcounted_object. Add comments.
7764 * thread.c (switch_to_thread_no_regs): Reference the thread's
7765 inferior pointer directly instead of doing a ptid lookup.
7766 (switch_to_no_thread): New function.
7767 (switch_to_thread(thread_info *)): New function, factored out
7768 from ...
7769 (switch_to_thread(ptid_t)): ... this.
7770 (restore_current_thread): Delete.
7771 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7772 fields, and add 'inf' field.
7773 (do_restore_current_thread_cleanup): Check whether old->inf is
7774 alive instead of looking up an inferior by ptid. Use
7775 switch_to_thread and switch_to_no_thread.
7776 (restore_current_thread_cleanup_dtor): Use old->inf directly
7777 instead of lookup up an inferior by id. Decref the inferior.
7778 Don't restore 'removable'.
7779 (make_cleanup_restore_current_thread): Same the inferior pointer
7780 in old, instead of the inferior number. Incref the inferior.
7781 Don't save/clear 'removable'.
7782
9bcb1f16
PA
77832017-04-19 Pedro Alves <palves@redhat.com>
7784
7785 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7786 unittests/scoped_restore-selftests.c.
7787 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7788 * common/scoped_restore.h (scoped_restore_base): Make "class".
7789 (scoped_restore_base::release): New public method.
7790 (scoped_restore_base::scoped_restore_base): New protected ctor.
7791 (scoped_restore_base::m_saved_var): New protected field.
7792 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7793 scoped_restore_base base class instead of m_saved_var directly.
7794 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7795 (scoped_restore_tmpl::scoped_restore_tmpl(const
7796 scoped_restore_tmpl<T>&)): Likewise.
7797 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7798 method.
7799 (scoped_restore_tmpl::saved_var): New method.
7800 (scoped_restore_tmpl::m_saved_var): Delete.
7801 * inferior.h (inferior::detaching): Now a bool.
7802 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7803 cleanup.
7804 * unittests/scoped_restore-selftests.c: New file.
7805
26fcd539
PA
78062017-04-19 Pedro Alves <palves@redhat.com>
7807
7808 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7809 Re-sort in alphabetic order.
7810
fdd243b0
PA
78112017-04-18 Pedro Alves <palves@redhat.com>
7812
7813 * xml-support.c (obstack_xml_printf): Delete.
7814 * xml-support.h (obstack_xml_printf): Delete.
7815
4895cde2
PA
78162017-04-18 Pedro Alves <palves@redhat.com>
7817
7818 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7819 vdebug, verror, body_text, start_element, end_element, name,
7820 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7821 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7822 is_xinclude>: Make private and add m_ prefix.
7823 (gdb_xml_parser::body_text): New method, based on ...
7824 (gdb_xml_body_text): ... this. Adjust.
7825 (gdb_xml_parser::vdebug): New method, based on ...
7826 (gdb_xml_debug): ... this. Adjust.
7827 (gdb_xml_parser::verror): New method, based on ...
7828 (gdb_xml_error): ... this. Adjust.
7829 (gdb_xml_parser::start_element): New method, based on ...
7830 (gdb_xml_start_element): ... this. Adjust.
7831 (gdb_xml_start_element_wrapper): Defer to
7832 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7833 (gdb_xml_parser::end_element): New method, based on ...
7834 (gdb_xml_end_element_wrapper): ... this. Adjust.
7835 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7836 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7837 (gdb_xml_parser::use_dtd): New method, based on ...
7838 (gdb_xml_use_dtd): ... this. Adjust.
7839 (gdb_xml_parser::parse): New method, based on ...
7840 (gdb_xml_parse): ... this. Adjust.
7841 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7842 (xinclude_start_include): Adjust to call the parser's name method.
7843 (xml_xinclude_default, xml_xinclude_start_doctype)
7844 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7845 method.
7846 (xml_process_xincludes): Adjust to call parser methods.
7847 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7848 declarations.
7849
bd8a901f
PA
78502017-04-18 Pedro Alves <palves@redhat.com>
7851
7852 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7853 gdb::optional<std::string>.
7854 * xml-support.c: Include <string>.
7855 (scope_level::scope_level(scope_level &&))
7856 (scope_level::~scope_level): Delete.
7857 (scope_level::body): Now a std::string.
7858 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7859 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7860 parameter.
7861 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7862 (xinclude_parsing_data::output): Now a std::string reference.
7863 (xinclude_start_include): Adjust.
7864 (xml_xinclude_default): Adjust.
7865 (xml_process_xincludes): Add 'output' parameter, and return bool.
7866 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7867 and return bool.
7868 * xml-tdesc.c: Include <unordered_map> and <string>.
7869 (tdesc_xml_cache): Delete.
7870 (tdesc_xml_cache_s): Delete.
7871 (xml_cache): Now an std::unordered_map.
7872 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7873 (target_fetch_description_xml): Change return type to
7874 gdb::optional<std::string>, and adjust.
7875 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7876 (target_fetch_description_xml): Change return type to
7877 gdb::optional<std::string>.
7878
d35d1958
PA
78792017-04-18 Pedro Alves <palves@redhat.com>
7880
7881 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7882 unittests/optional-selftests.c.
7883 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7884 * unittests/optional-selftests.c: New file.
7885 * unittests/optional/assignment/1.cc: New file.
7886 * unittests/optional/assignment/2.cc: New file.
7887 * unittests/optional/assignment/3.cc: New file.
7888 * unittests/optional/assignment/4.cc: New file.
7889 * unittests/optional/assignment/5.cc: New file.
7890 * unittests/optional/assignment/6.cc: New file.
7891 * unittests/optional/assignment/7.cc: New file.
7892 * unittests/optional/cons/copy.cc: New file.
7893 * unittests/optional/cons/default.cc: New file.
7894 * unittests/optional/cons/move.cc: New file.
7895 * unittests/optional/cons/value.cc: New file.
7896 * unittests/optional/in_place.cc: New file.
7897 * unittests/optional/observers/1.cc: New file.
7898 * unittests/optional/observers/2.cc: New file.
7899
22796e97
PA
79002017-04-18 Pedro Alves <palves@redhat.com>
7901
7902 * common/gdb_optional.h: Include common/traits.h.
7903 (in_place_t): New type.
7904 (in_place): New constexpr variable.
7905 (optional::optional): Remove member initialization of
7906 m_instantiated.
7907 (optional::optional(in_place_t...)): New constructor.
7908 (optional::~optional): Use reset.
7909 (optional::optional(const optional&)): New.
7910 (optional::optional(const optional&&)): New.
7911 (optional::optional(T &)): New.
7912 (optional::optional(T &&)): New.
7913 (operator::operator=(const optional &)): New.
7914 (operator::operator=(optional &&)): New.
7915 (operator::operator= (const T &))
7916 (operator::operator= (T &&))
7917 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7918 (operator::reset): New.
7919 (operator::m_instantiated):: Add in-class initializer.
7920 * common/traits.h: Include <type_traits>.
7921 (struct And): New types.
7922
a7fc9b61
PA
79232017-04-18 Pedro Alves <palves@redhat.com>
7924
7925 * xml-support.c: Include <vector>.
7926 (scope_level::scope_level(const gdb_xml_element *))
7927 (scope_level::scope_level(scope_level&&)): New.
7928 (scope_level::~scope_level): New.
7929 (scope_level_s): Delete.
7930 (gdb_xml_parser::scopes): Now a std::vector.
7931 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7932 Use std::vector.
7933 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7934 scope cleanup code.
7935 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7936 of the scopes member. Use std::vector::emplace_back.
7937
010151c9
PA
79382017-04-18 Pedro Alves <palves@redhat.com>
7939
7940 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7941 a bool.
7942 (gdb_xml_end_element): Change type of first parameter.
7943 (gdb_xml_cleanup): Rename to ...
7944 (gdb_xml_parser::~gdb_xml_parser): ... this.
7945 (gdb_xml_create_parser_and_cleanup): Delete with ...
7946 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7947 to this new ctor.
7948 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7949 using gdb_xml_create_parser_and_cleanup.
7950 (xinclude_parsing_data): Add ctor/dtor.
7951 (xml_xinclude_cleanup): Delete.
7952 (xml_process_xincludes): Create a local xinclude_parsing_data
7953 instead of heap-allocating one. Create a local gdb_xml_parser
7954 instead of heap-allocating one with
7955 gdb_xml_create_parser_and_cleanup.
7956
d56060f0
JB
79572017-04-18 John Baldwin <jhb@FreeBSD.org>
7958
7959 PR threads/20743
7960 * fbsd-nat.c (resume_one_thread_cb): Remove.
7961 (resume_all_threads_cb): Remove.
7962 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7963 iterate_over_threads.
7964
305d16a9
JB
79652017-04-17 Joel Brobecker <brobecker@adacore.com>
7966
7967 * NEWS: Create a new section for the next release branch.
7968 Rename the section of the current branch, now that it has
7969 been cut.
7970
8bb57231
JB
79712017-04-17 Joel Brobecker <brobecker@adacore.com>
7972
7973 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7974 * version.in: Bump version to 8.0.50.DATE-git.
7975
096c92dd
SDJ
79762017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7977
7978 PR gdb/21385
7979 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7980 independently of the host, and fix build breakage on Cygwin.
7981
0550c955
PA
79822017-04-13 Pedro Alves <palves@redhat.com>
7983
7984 * inferior.c (free_inferior): Convert to ...
7985 (inferior::~inferior): ... this dtor.
7986 (inferior::inferior): New ctor, factored out from ...
7987 (add_inferior_silent): ... here. Allocate the inferior with a new
7988 expression.
7989 (delete_inferior): Call delete instead of free_inferior.
7990 * inferior.h (gdb_environ, continuation): Forward declare.
7991 (inferior): Now a class. Add in-class initialization to all
7992 members. Make boolean fields bool, except 'detaching'.
7993 (inferior::inferior): New explicit ctor.
7994 (inferior::~inferior): New.
7995
e3d60dfc
PA
79962017-04-13 Pedro Alves <palves@redhat.com>
7997
7998 * inferior.c (init_inferior_list): Delete.
7999 * inferior.h (init_inferior_list): Delete.
8000
5fd69d0a
PA
80012017-04-13 Pedro Alves <palves@redhat.com>
8002
8003 PR threads/13217
8004 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8005 (top level): Call it twice, with different thread sets.
8006
c6609450
PA
80072017-04-13 Pedro Alves <palves@redhat.com>
8008
8009 * thread.c: Include <algorithm>.
8010 (thread_array_cleanup): Delete.
8011 (scoped_inc_dec_ref): New class.
8012 (live_threads_count): New function.
8013 (set_thread_refcount): Delete.
8014 (tp_array_compar_ascending): Now a bool.
8015 (tp_array_compar): Convert to a std::sort comparison function.
8016 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8017 and live_threads_count.
8018
2a00d7ce
PA
80192017-04-13 Pedro Alves <palves@redhat.com>
8020
8021 * infrun.c (follow_fork_inferior): Also switch the current
8022 inferior.
8023
441d7c93
PA
80242017-04-13 Pedro Alves <palves@redhat.com>
8025
8026 * breakpoint.c (watch_command_1): Save watchpoint-frame info
8027 before calling create_internal_breakpoint.
8028
808480f6
PA
80292017-04-13 Pedro Alves <palves@redhat.com>
8030
8031 * fork-child.c (execv_argv): New class.
8032 (breakup_args): Refactored as ...
8033 (execv_argv::init_for_no_shell): .. this method of execv_argv.
8034 Copy arguments to storage and replace separators with NULL
8035 terminators in place.
8036 (escape_bang_in_quoted_argument): Adjust to return bool.
8037 (execv_argv::execv_argv): New ctor.
8038 (execv_argv::init_for_shell): New method, factored out from
8039 fork_inferior. Don't strdup strings into the vector.
8040 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8041 Remove free_vector_argv call.
8042
ad3d022a
YQ
80432017-04-13 Yao Qi <yao.qi@linaro.org>
8044
8045 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8046 tdep->rx_psw_type.
8047
e6ddc3bf
YQ
80482017-04-13 Yao Qi <yao.qi@linaro.org>
8049
8050 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8051 * rx-tdep.c (rx_gdbarch_init): Likewise.
8052
bfb8cf90
PA
80532017-04-13 Pedro Alves <palves@redhat.com>
8054
8055 * breakpoint.h (struct breakpoint): Reindent.
8056
f5336ca5
PA
80572017-04-13 Pedro Alves <palves@redhat.com>
8058
8059 * breakpoint.c (bp_location): Rename to ...
8060 (bp_locations): ... this. All references updated.
8061 (bp_location_count): Rename to ...
8062 (bp_locations_count): ... this. All references updated.
8063 (bp_location_placed_address_before_address_max): Rename to ...
8064 (bp_locations_placed_address_before_address_max): ... this. All
8065 references updated.
8066 (bp_location_shadow_len_after_address_max): Rename to ...
8067 (bp_locations_shadow_len_after_address_max): ... this. All
8068 references updated.
8069 (bp_location_compare_addrs): Rename to ...
8070 (bp_locations_compare_addrs): ... this. All references updated.
8071 (bp_location_compare):Rename to ...
8072 (bp_locations_compare): ... this. All references updated.
8073 (bp_location_target_extensions_update): Rename to ...
8074 (bp_locations_target_extensions_update): ... this. All references
8075 updated.
8076
be628ab8
SDJ
80772017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8078
8079 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8080 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8081 'sgtty.h'.
8082 * common/gdb_termios.h: New file, with parts of "terminal.h".
8083 * inflow.c: Include "gdb_termios.h".
8084 * ser-unix.c: Include "gdb_termios.h".
8085 * terminal.h: Move terminal-related defines to
8086 "common/gdb_termios.h".
8087
8e9e35b1
TT
80882017-04-12 Tom Tromey <tom@tromey.com>
8089
8090 * probe.c (parse_probes): Update.
8091 * location.h (delete_event_location): Don't declare.
8092 (event_location_deleter::operator()): Update.
8093 * location.c (event_location_deleter::operator()): Rename from
8094 delete_event_location.
8095 * linespec.h (linespec_result) <location>: Change type to
8096 event_location_up.
8097 * linespec.c (canonicalize_linespec, event_location_to_sals)
8098 (decode_objc): Update.
8099 (linespec_result): Don't call delete_event_location.
8100 * breakpoint.c (create_breakpoints_sal)
8101 (bkpt_probe_create_sals_from_location)
8102 (strace_marker_create_sals_from_location): Update.
8103
16e802b9
TT
81042017-04-12 Tom Tromey <tom@tromey.com>
8105
8106 * linespec.h (struct linespec_result): Add constructor and
8107 destructor.
8108 (init_linespec_result, destroy_linespec_result)
8109 (make_cleanup_destroy_linespec_result): Don't declare.
8110 * linespec.c (init_linespec_result): Remove.
8111 (linespec_result::~linespec_result): Rename from
8112 destroy_linespec_result. Update.
8113 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8114 Remove.
8115 * breakpoint.c (create_breakpoint, break_range_command)
8116 (decode_location_default): Update.
8117 * ax-gdb.c (agent_command_1): Update.
8118
d28cd78a
TT
81192017-04-12 Tom Tromey <tom@tromey.com>
8120
8121 * remote.c (remote_download_tracepoint): Update.
8122 * python/py-breakpoint.c (bppy_get_location): Update.
8123 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8124 (gdbscm_breakpoint_location): Update.
8125 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8126 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8127 Change type to event_location_up.
8128 * breakpoint.c (create_overlay_event_breakpoint)
8129 (create_longjmp_master_breakpoint)
8130 (create_std_terminate_master_breakpoint)
8131 (create_exception_master_breakpoint)
8132 (breakpoint_event_location_empty_p, print_breakpoint_location)
8133 (print_one_breakpoint_location, create_thread_event_breakpoint)
8134 (init_breakpoint_sal, create_breakpoint)
8135 (print_recreate_ranged_breakpoint, break_range_command)
8136 (init_ada_exception_breakpoint, say_where): Update.
8137 (base_breakpoint_dtor): Don't call delete_event_location.
8138 (bkpt_print_recreate, tracepoint_print_recreate)
8139 (dprintf_print_recreate, update_static_tracepoint)
8140 (breakpoint_re_set_default): Update.
8141
711799d5
TT
81422017-04-12 Tom Tromey <tom@tromey.com>
8143
8144 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8145 type of "to_do". Update.
8146 (compute_stack_depth): Use std::vector.
8147
52d214d3
TT
81482017-04-12 Tom Tromey <tom@tromey.com>
8149
8150 * printcmd.c (find_instruction_backward): Use std::vector.
8151
4c404b8b
TT
81522017-04-12 Tom Tromey <tom@tromey.com>
8153
8154 * symfile.c (objfilep): Remove typedef.
8155 (reread_symbols): Use a std::vector.
8156
156d9eab
TT
81572017-04-12 Tom Tromey <tom@tromey.com>
8158
8159 * mi/mi-main.c (exec_direction_forward): Remove.
8160 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8161 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8162 scoped_restore.
8163 * guile/guile.c (guile_repl_command, guile_command)
8164 (gdbscm_execute_gdb_command): Use scoped_restore.
8165 * go-exp.y (go_parse): Use scoped_restore.
8166 * d-exp.y (d_parse): Use scoped_restore.
8167 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8168 * c-exp.y (c_parse): Use scoped_restore.
8169
4d89769a
TT
81702017-04-12 Tom Tromey <tom@tromey.com>
8171
8172 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8173 (mi_parse): Update return type.
8174 (mi_parse_free): Remove.
8175 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8176 (mi_parse::~mi_parse): Rename from mi_parse_free.
8177 (mi_parse_cleanup): Remove.
8178 (mi_parse): Return a unique_ptr. Use new.
8179 * mi/mi-main.c (mi_execute_command): Update.
8180
4b217cc7
TT
81812017-04-12 Tom Tromey <tom@tromey.com>
8182
8183 * location.c (explicit_location_lex_one): Return a
8184 unique_xmalloc_ptr.
8185 (string_to_explicit_location): Update. Remove cleanups.
8186
59d3651b
TT
81872017-04-12 Tom Tromey <tom@tromey.com>
8188
8189 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8190 (compare_value_and_voffset): Change type. Update.
8191 (compute_vtable_size): Change type of "offset_vec".
8192 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8193 (gnuv3_get_typeid): Remove extraneous declaration.
8194
b24b0d6c
TT
81952017-04-12 Tom Tromey <tom@tromey.com>
8196
8197 * charset.h (wchar_iterator): Fix comment.
8198
80a3b8c5
TT
81992017-04-12 Tom Tromey <tom@tromey.com>
8200
8201 * charset.c (iconv_wrapper): New class.
8202 (cleanup_iconv): Remove.
8203 (convert_between_encodings): Use it.
8204
c83dd867
TT
82052017-04-12 Tom Tromey <tom@tromey.com>
8206
8207 * symfile.h (increment_reading_symtab): Update type.
8208 * symfile.c (decrement_reading_symtab): Remove.
8209 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8210 * psymtab.c (psymtab_to_symtab): Update.
8211 * dwarf2read.c (dw2_instantiate_symtab): Update.
8212
0e8621a0
TT
82132017-04-12 Tom Tromey <tom@tromey.com>
8214
8215 * jit.c (struct jit_reader): Declare separately. Add constructor
8216 and destructor. Change type of "handle".
8217 (loaded_jit_reader): Define separately.
8218 (jit_reader_load): Update. New "new".
8219 (jit_reader_unload_command): Use "delete".
8220 * gdb-dlfcn.h (struct dlclose_deleter): New.
8221 (gdb_dlhandle_up): New typedef.
8222 (gdb_dlopen, gdb_dlsym): Update types.
8223 (gdb_dlclose): Remove.
8224 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8225 (gdb_dlsym): Change type of "handle".
8226 (make_cleanup_dlclose): Remove.
8227 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8228 * compile/compile-c-support.c (load_libcc): Update.
8229
67d89901
TT
82302017-04-12 Tom Tromey <tom@tromey.com>
8231
8232 * symtab.h (find_pcs_for_symtab_line): Change return type.
8233 * symtab.c (find_pcs_for_symtab_line): Change return type.
8234 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8235 type of "vec". Update.
8236 (ltpy_get_pcs_for_line): Update.
8237 * linespec.c (decode_digits_ordinary): Update.
8238
93921405
TT
82392017-04-12 Tom Tromey <tom@tromey.com>
8240
8241 * tracepoint.c (actions_command): Update.
8242 * python/python.c (python_command, python_interactive_command):
8243 Update.
8244 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8245 * guile/guile.c (guile_command): Update.
8246 * defs.h (read_command_lines, read_command_lines_1): Return
8247 command_line_up.
8248 (command_lines_deleter): New struct.
8249 (command_line_up): New typedef.
8250 * compile/compile.c (compile_code_command)
8251 (compile_print_command): Update.
8252 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8253 command_line_up.
8254 (make_cleanup_free_command_lines): Remove.
8255 * cli/cli-script.c (get_command_line, read_command_lines_1)
8256 (copy_command_lines): Return command_line_up.
8257 (while_command, if_command, read_command_lines, define_command)
8258 (document_command): Update.
8259 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8260 Remove.
8261 * breakpoint.h (breakpoint_set_commands): Change type of
8262 "commands".
8263 * breakpoint.c (breakpoint_set_commands): Change type of
8264 "commands". Update.
8265 (do_map_commands_command, update_dprintf_command_list)
8266 (create_tracepoint_from_upload): Update.
8267
ffc2605c
TT
82682017-04-12 Tom Tromey <tom@tromey.com>
8269
8270 * tracepoint.c (scope_info): Update.
8271 * spu-tdep.c (spu_catch_start): Update.
8272 * python/python.c (gdbpy_decode_line): Update.
8273 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8274 * python/py-breakpoint.c (bppy_init): Update.
8275 * probe.c (parse_probes): Update.
8276 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8277 * location.h (event_location_deleter): New struct.
8278 (event_location_up): New typedef.
8279 (new_linespec_location, new_address_location, new_probe_location)
8280 (new_explicit_location, copy_event_location)
8281 (string_to_event_location, string_to_event_location_basic)
8282 (string_to_explicit_location): Update return type.
8283 (make_cleanup_delete_event_location): Remove.
8284 * location.c (new_linespec_location, new_address_location)
8285 (new_probe_location, new_explicit_location, copy_event_location):
8286 Return event_location_up.
8287 (delete_event_location_cleanup)
8288 (make_cleanup_delete_event_location): Remove.
8289 (string_to_explicit_location, string_to_event_location_basic)
8290 (string_to_event_location): Return event_location_up.
8291 * linespec.c (canonicalize_linespec, event_location_to_sals)
8292 (decode_line_with_current_source)
8293 (decode_line_with_last_displayed, decode_objc): Update.
8294 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8295 * completer.c (location_completer): Update.
8296 * cli/cli-cmds.c (edit_command, list_command): Update.
8297 * breakpoint.c (create_overlay_event_breakpoint)
8298 (create_longjmp_master_breakpoint)
8299 (create_std_terminate_master_breakpoint)
8300 (create_exception_master_breakpoint)
8301 (create_thread_event_breakpoint): Update.
8302 (init_breakpoint_sal): Update. Remove some dead code.
8303 (create_breakpoint_sal): Change type of "location". Update.
8304 (create_breakpoints_sal, create_breakpoint, break_command_1)
8305 (dprintf_command, break_range_command, until_break_command)
8306 (init_ada_exception_breakpoint)
8307 (strace_marker_create_sals_from_location)
8308 (update_static_tracepoint, trace_command, ftrace_command)
8309 (strace_command, create_tracepoint_from_upload): Update.
8310 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8311 * ax-gdb.c (agent_command_1): Update.
8312
8f10c932
PA
83132017-04-12 Pedro Alves <palves@redhat.com>
8314
8315 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8316 * configure.tgt: Handle i[34567]86-*-go32* and
8317 i[34567]86-*-msdosdjgpp*.
8318 * i386-tdep.c (i386_svr4_reg_to_regnum):
8319 Make extern.
8320 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8321 i386-go32-tdep.c.
8322 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8323 * i386-go32-tdep.c: New file.
8324 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8325 declarations.
8326
0a31ccfb
SM
83272017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8328
8329 * aix-thread.c (pd_status2str): Change return type to const char *.
8330
e9bb3fbb
PA
83312017-04-12 Pedro Alves <palves@redhat.com>
8332
8333 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8334 calls to set_gdbarch_gnu_triplet_regexp.
8335
53375380
PA
83362017-04-12 Pedro Alves <palves@redhat.com>
8337
8338 PR gdb/21323
8339 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8340 New enum value.
8341 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8342 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8343 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8344 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8345 * gdbarch.h, gdbarch.c: Regenerate.
8346 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8347 gdbarch_wchar_bit and gdbarch_wchar_signed.
8348 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8349 * arm-tdep.c (arm_gdbarch_init): Likewise.
8350 * avr-tdep.c (avr_gdbarch_init): Likewise.
8351 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8352 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8353 * i386-tdep.c (i386_go32_init_abi): Likewise.
8354 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8355 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8356 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8357 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8358 * sh-tdep.c (sh_gdbarch_init): Likewise.
8359 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8360 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8361 * windows-tdep.c (windows_init_abi): Likewise.
8362 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8363
53e710ac
PA
83642017-04-12 Pedro Alves <palves@redhat.com>
8365
8366 PR c++/21323
8367 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8368 cplus_primitive_type_char32_t>: New enum values.
8369 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8370 and cplus_primitive_type_char32_t.
8371 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8372 32, use the archtecture's built-in type for char16_t and char32_t,
8373 respectively. Otherwise, fallback to init_integer_type as before,
8374 but make the type unsigned, and issue a complaint.
8375 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8376
ab0538b8
AH
83772017-04-12 Alan Hayward <alan.hayward@arm.com>
8378
5e0e0422 8379 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8380 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8381
5430098f
SDJ
83822017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8383
8384 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8385 'const char *'.
8386
7c5ded6a
SDJ
83872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8388
8389 * common/common-utils.c (free_vector_argv): New function.
8390 * common/common-utils.h: Include <vector>.
8391 (free_vector_argv): New prototype.
8392 * darwin-nat.c (darwin_create_inferior): Rewrite function
8393 prototype in order to constify "exec_file" and accept a
8394 "std::string" for "allargs".
8395 * fork-child.c: Include <vector>.
8396 (breakup_args): Rewrite function, using C++.
8397 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8398 and accept "std::string" for "allargs". Update the code to
8399 calculate "argv" based on "allargs". Update calls to "exec_fun"
8400 and "execvp".
8401 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8402 order to constify "exec_file" and accept a "std::string" for
8403 "allargs".
8404 * go32-nat.c (go32_create_inferior): Likewise.
8405 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8406 * infcmd.c (run_command_1): Constify "exec_file". Use
8407 "std::string" for inferior arguments.
8408 * inferior.h (fork_inferior): Update prototype.
8409 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8410 prototype in order to constify "exec_file" and accept a
8411 "std::string" for "allargs".
8412 * nto-procfs.c (procfs_create_inferior): Likewise.
8413 * procfs.c (procfs_create_inferior): Likewise.
8414 * remote-sim.c (gdbsim_create_inferior): Likewise.
8415 * remote.c (extended_remote_run): Update code to accept
8416 "std::string" as argument.
8417 (extended_remote_create_inferior): Rewrite function prototype in
8418 order to constify "exec_file" and accept a "std::string" for
8419 "allargs".
8420 * rs6000-nat.c (super_create_inferior): Likewise.
8421 (rs6000_create_inferior): Likewise.
8422 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8423 * windows-nat.c (windows_create_inferior): Likewise.
8424
ae0eee42
PA
84252017-04-11 Pedro Alves <palves@redhat.com>
8426
8427 * thread.c: Fix whitespace throughout.
8428
a6acac06
PR
84292017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8430
8431 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8432
64403bd1
AH
84332017-04-11 Alan Hayward <alan.hayward@arm.com>
8434
8435 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8436
a5bef50f
SDJ
84372017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8438
8439 PR gdb/21364
8440 * osdata.c (info_osdata): Check if 'type' is an empty string
8441 instead of NULL.
8442
9295a5a9
PA
84432017-04-10 Pedro Alves <palves@redhat.com>
8444
8445 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8446 (ptid_to_global_thread_id, in_thread_list)
8447 (do_captured_list_thread_ids, set_resumed, set_running)
8448 (set_executing, set_stop_requested, finish_thread_state)
8449 (validate_registers_access, can_access_registers_ptid)
8450 (print_thread_info_1, switch_to_thread)
8451 (do_restore_current_thread_cleanup)
8452 (make_cleanup_restore_current_thread, thread_command)
8453 (thread_name_command): Use operator== instead of ptid_equal.
8454
996812e3
PA
84552017-04-10 Pedro Alves <palves@redhat.com>
8456
8457 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8458 (current_thread_cleanup_chain): Delete.
8459 (restore_current_thread_cleanup_dtor)
8460 (make_cleanup_restore_current_thread): Remove references to
8461 current_thread_cleanup_chain.
8462
845b344f
AH
84632017-04-10 Alan Hayward <alan.hayward@arm.com>
8464
8465 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8466 REG_UNKNOWN.
8467
803bdfe4
YQ
84682017-04-10 Yao Qi <yao.qi@linaro.org>
8469
8470 PR gdb/19942
8471 * gdbthread.h (thread_info::deletable): New method.
8472 (thread_info::incref): New method.
8473 (thread_info::decref): New method.
8474 (thread_info::refcount): Move it to private.
8475 * infrun.c (save_stop_context): Call inc_refcount.
8476 (release_stop_context_cleanup): Likewise.
8477 * thread.c (set_thread_exited): New function.
8478 (init_thread_list): Delete "tp" only it is deletable, otherwise
8479 call set_thread_exited.
8480 (delete_thread_1): Call set_thread_exited.
8481 (current_thread_cleanup) <inferior_pid>: Remove.
8482 <thread>: New field.
8483 (restore_current_thread_ptid_changed): Removed.
8484 (do_restore_current_thread_cleanup): Adjust.
8485 (restore_current_thread_cleanup_dtor): Don't call
8486 find_thread_ptid.
8487 (set_thread_refcount): Use dec_refcount.
8488 (make_cleanup_restore_current_thread): Adjust.
8489 (thread_apply_all_command): Call inc_refcount.
8490 (_initialize_thread): Don't call
8491 observer_attach_thread_ptid_changed.
8492
8c25b497
YQ
84932017-04-10 Yao Qi <yao.qi@linaro.org>
8494
8495 * thread.c (delete_thread_1): Hoist code on marking thread as
8496 exited.
8497
8473b447
SM
84982017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8499
8500 * windows-nat.c (windows_detach): Initialize ptid with
8501 minus_one_ptid.
8502
6670ec13
SM
85032017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8504
8505 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8506
ba2f91bb
AH
85072017-04-07 Alan Hayward <alan.hayward@arm.com>
8508
8509 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8510 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8511 (bfin_pseudo_register_write): Likewise
8512
436252de
SM
85132017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8514
8515 * common/ptid.h (struct ptid): Change to...
8516 (class ptid_t): ... this.
8517 <ptid_t>: New constructors.
8518 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8519 matches>: New methods.
8520 <make_null, make_minus_one>: New static methods.
8521 <pid>: Rename to...
8522 <m_pid>: ...this.
8523 <lwp>: Rename to...
8524 <m_lwp>: ...this.
8525 <tid>: Rename to...
8526 <m_tid>: ...this.
8527 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8528 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8529 as references, move comment to class ptid_t.
8530 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8531 ptid_t static methods.
8532 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8533 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8534 Take ptid arguments as references, implement using ptid_t methods.
8535 * unittests/ptid-selftests.c: New file.
8536 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8537 unittests/ptid-selftests.c.
8538 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8539
0dedf377
TP
85402017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8541
8542 * python/python.c (python_run_simple_file): Cast mode literal to
8543 non-const char pointer as expected by PyFile_FromString.
8544
4e9868d4
SM
85452017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8546
8547 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8548 minus_one_ptid and null_ptid.
8549
9bf2a700
PA
85502017-04-05 Pedro Alves <palves@redhat.com>
8551
8552 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8553 * configure: Regenerate.
8554
a121b7c1
PA
85552017-04-05 Pedro Alves <palves@redhat.com>
8556
8557 * ada-exp.y (yyerror): Constify.
8558 * ada-lang.c (bound_name, get_selections)
8559 (ada_variant_discrim_type)
8560 (ada_variant_discrim_name, ada_value_struct_elt)
8561 (ada_lookup_struct_elt_type, is_unchecked_variant)
8562 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8563 (catch_ada_exception_command_split)
8564 (catch_ada_assert_command_split, catch_assert_command)
8565 (ada_op_name): Constify.
8566 * ada-lang.h (ada_yyerror, get_selections)
8567 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8568 * arc-tdep.c (arc_print_frame_cache): Constify.
8569 * arm-tdep.c (arm_skip_stub): Constify.
8570 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8571 (gen_aggregate_elt_ref): Constify.
8572 * bcache.c (print_bcache_statistics): Constify.
8573 * bcache.h (print_bcache_statistics): Constify.
8574 * break-catch-throw.c (catch_exception_command_1):
8575 * breakpoint.c (struct ep_type_description::description):
8576 Constify.
8577 (add_solib_catchpoint): Constify.
8578 (catch_fork_command_1): Add cast.
8579 (add_catch_command): Constify.
8580 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8581 Constify.
8582 * bsd-uthread.c (bsd_uthread_state): Constify.
8583 * buildsym.c (patch_subfile_names): Constify.
8584 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8585 Constify.
8586 * c-exp.y (yyerror): Constify.
8587 (token::oper): Constify.
8588 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8589 * c-varobj.c (cplus_describe_child): Constify.
8590 * charset.c (find_charset_names): Add cast.
8591 (find_charset_names): Constify array and add const_cast.
8592 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8593 (edit_command): Constify.
8594 * cli/cli-decode.c (lookup_cmd): Constify.
8595 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8596 Constify.
8597 (struct dump_context): Constify.
8598 (add_dump_command, restore_command): Constify.
8599 * cli/cli-script.c (get_command_line): Constify.
8600 * cli/cli-script.h (get_command_line): Constify.
8601 * cli/cli-utils.c (check_for_argument): Constify.
8602 * cli/cli-utils.h (check_for_argument): Constify.
8603 * coff-pe-read.c (struct read_pe_section_data): Constify.
8604 * command.h (lookup_cmd): Constify.
8605 * common/print-utils.c (decimal2str): Constify.
8606 * completer.c (gdb_print_filename): Constify.
8607 * corefile.c (set_gnutarget): Constify.
8608 * cp-name-parser.y (yyerror): Constify.
8609 * cp-valprint.c (cp_print_class_member): Constify.
8610 * cris-tdep.c (cris_register_name, crisv32_register_name):
8611 Constify.
8612 * d-exp.y (yyerror): Constify.
8613 (struct token::oper): Constify.
8614 * d-lang.h (d_yyerror): Constify.
8615 * dbxread.c (struct header_file_location::name): Constify.
8616 (add_old_header_file, add_new_header_file, last_function_name)
8617 (dbx_next_symbol_text, add_bincl_to_list)
8618 (find_corresponding_bincl_psymtab, set_namestring)
8619 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8620 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8621 * defs.h (command_line_input, print_address_symbolic)
8622 (deprecated_readline_begin_hook): Constify.
8623 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8624 Constify.
8625 * event-top.c (handle_line_of_input): Constify and add cast.
8626 * exceptions.c (catch_errors): Constify.
8627 * exceptions.h (catch_errors): Constify.
8628 * expprint.c (print_subexp_standard, op_string, op_name)
8629 (op_name_standard, dump_raw_expression, dump_raw_expression):
8630 * expression.h (op_name, op_string, dump_raw_expression):
8631 Constify.
8632 * f-exp.y (yyerror): Constify.
8633 (struct token::oper): Constify.
8634 (struct f77_boolean_val::name): Constify.
8635 * f-lang.c (f_word_break_characters): Constify.
8636 * f-lang.h (f_yyerror): Constify.
8637 * fork-child.c (fork_inferior): Add cast.
8638 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8639 (new_variant): Constify.
8640 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8641 * gdbarch.c: Regenerate.
8642 * gdbcore.h (set_gnutarget): Constify.
8643 * go-exp.y (yyerror): Constify.
8644 (token::oper): Constify.
8645 * go-lang.h (go_yyerror): Constify.
8646 * go32-nat.c (go32_sysinfo): Constify.
8647 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8648 * guile/scm-cmd.c (cmdscm_function): Constify.
8649 * guile/scm-param.c (pascm_param_value): Constify.
8650 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8651 (h8300sx_register_name): Constify.
8652 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8653 Constify.
8654 * ia64-tdep.c (ia64_register_names): Constify.
8655 * infcmd.c (construct_inferior_arguments): Constify.
8656 (path_command, attach_post_wait): Constify.
8657 * language.c (show_range_command, show_case_command)
8658 (unk_lang_error): Constify.
8659 * language.h (language_defn::la_error)
8660 (language_defn::la_name_of_this): Constify.
8661 * linespec.c (decode_line_2): Constify.
8662 * linux-thread-db.c (thread_db_err_str): Constify.
8663 * lm32-tdep.c (lm32_register_name): Constify.
8664 * m2-exp.y (yyerror): Constify.
8665 * m2-lang.h (m2_yyerror): Constify.
8666 * m32r-tdep.c (m32r_register_names): Constify and make static.
8667 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8668 * m88k-tdep.c (m88k_register_name): Constify.
8669 * macroexp.c (appendmem): Constify.
8670 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8671 (upgrade_type, parse_external, parse_partial_symbols)
8672 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8673 (new_symbol): Constify.
8674 * memattr.c (mem_info_command): Constify.
8675 * mep-tdep.c (register_name_from_keyword): Constify.
8676 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8677 Constify.
8678 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8679 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8680 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8681 cast.
8682 (mi_execute_async_cli_command): Constify.
8683 * mips-tdep.c (mips_register_name): Constify.
8684 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8685 (am33_register_name, am33_2_register_name)
8686 * moxie-tdep.c (moxie_register_names): Constify.
8687 * nat/linux-osdata.c (osdata_type): Constify fields.
8688 * nto-tdep.c (nto_parse_redirection): Constify.
8689 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8690 (lookup_child_selector): Constify.
8691 (objc_methcall::name): Constify.
8692 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8693 (lookup_struct_typedef): Constify.
8694 * objfiles.c (pc_in_section): Constify.
8695 * objfiles.h (pc_in_section): Constify.
8696 * p-exp.y (struct token::oper): Constify.
8697 (yyerror): Constify.
8698 * p-lang.h (pascal_yyerror): Constify.
8699 * parser-defs.h (op_name_standard): Constify.
8700 (op_print::string): Constify.
8701 (exp_descriptor::op_name): Constify.
8702 * printcmd.c (print_address_symbolic): Constify.
8703 * psymtab.c (print_partial_symbols): Constify.
8704 * python/py-breakpoint.c (stop_func): Constify.
8705 (bppy_get_expression): Constify.
8706 * python/py-cmd.c (cmdpy_completer::name): Constify.
8707 (cmdpy_function): Constify.
8708 * python/py-event.c (evpy_add_attribute)
8709 (gdbpy_initialize_event_generic): Constify.
8710 * python/py-event.h (evpy_add_attribute)
8711 (gdbpy_initialize_event_generic): Constify.
8712 * python/py-evts.c (add_new_registry): Constify.
8713 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8714 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8715 * python/py-inferior.c (get_buffer): Add cast.
8716 * python/py-param.c (parm_constant::name): Constify.
8717 * python/py-unwind.c (fprint_frame_id): Constify.
8718 * python/python.c (gdbpy_parameter_value): Constify.
8719 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8720 * remote.c (memory_packet_config::name): Constify.
8721 (show_packet_config_cmd, remote_write_bytes)
8722 (remote_buffer_add_string):
8723 * reverse.c (exec_reverse_once): Constify.
8724 * rs6000-tdep.c (variant::name, variant::description): Constify.
8725 * rust-exp.y (rustyyerror): Constify.
8726 * rust-lang.c (rust_op_name): Constify.
8727 * rust-lang.h (rustyyerror): Constify.
8728 * serial.h (serial_ops::name): Constify.
8729 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8730 (sh_sh3e_register_name, sh_sh2e_register_name)
8731 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8732 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8733 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8734 (sh_sh4al_dsp_register_name): Constify.
8735 * sh64-tdep.c (sh64_register_name): Constify.
8736 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8737 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8738 * stabsread.c (patch_block_stabs, read_type_number)
8739 (ref_map::stabs, ref_add, process_reference)
8740 (symbol_reference_defined, define_symbol, define_symbol)
8741 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8742 (read_one_struct_field, read_struct_fields, read_baseclasses)
8743 (read_tilde_fields, read_struct_type, read_array_type)
8744 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8745 (read_huge_number, read_range_type, read_args, common_block_start)
8746 (find_name_end): Constify.
8747 * stabsread.h (common_block_start, define_symbol)
8748 (process_one_symbol, symbol_reference_defined, ref_add):
8749 * symfile.c (get_section_index, add_symbol_file_command):
8750 * symfile.h (get_section_index): Constify.
8751 * target-descriptions.c (tdesc_type::name): Constify.
8752 (tdesc_free_type): Add cast.
8753 * target.c (find_default_run_target):
8754 (add_deprecated_target_alias, find_default_run_target)
8755 (target_announce_detach): Constify.
8756 (do_option): Constify.
8757 * target.h (add_deprecated_target_alias): Constify.
8758 * thread.c (print_thread_info_1): Constify.
8759 * top.c (deprecated_readline_begin_hook, command_line_input):
8760 Constify.
8761 (init_main): Add casts.
8762 * top.h (handle_line_of_input): Constify.
8763 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8764 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8765 (tfind_command): Rename to ...
8766 (tfind_command_1): ... this and constify.
8767 (tfind_command): New function.
8768 (tfind_end_command, tfind_start_command): Adjust.
8769 (encode_source_string): Constify.
8770 * tracepoint.h (encode_source_string): Constify.
8771 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8772 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8773 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8774 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8775 * tui/tui-win.c (parse_scrolling_args): Constify.
8776 * tui/tui-windata.c (tui_erase_data_content): Constify.
8777 * tui/tui-windata.h (tui_erase_data_content): Constify.
8778 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8779 * tui/tui.c (tui_enable): Add cast.
8780 * utils.c (defaulted_query): Constify.
8781 (init_page_info): Add cast.
8782 (puts_debug, subset_compare): Constify.
8783 * utils.h (subset_compare): Constify.
8784 * varobj.c (varobj_format_string): Constify.
8785 * varobj.h (varobj_format_string): Constify.
8786 * vax-tdep.c (vax_register_name): Constify.
8787 * windows-nat.c (windows_detach): Constify.
8788 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8789 * xml-support.c (gdb_xml_end_element): Constify.
8790 * xml-tdesc.c (tdesc_start_reg): Constify.
8791 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8792 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8793 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8794
995816ba
PA
87952017-04-05 Pedro Alves <palves@redhat.com>
8796
8797 * proc-api.c (struct trans): Constify.
8798 (procfs_note): Constify.
8799 * proc-events.c (struct trans, syscall_table):
8800 * proc-flags.c (struct trans): Constify.
8801 * proc-utils.h (procfs_note): Constify.
8802 * proc-why.c (struct trans): Constify.
8803 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8804 (procfs_detach): Constify.
8805 * sol-thread.c (struct string_map): Constify.
8806 (td_err_string, td_state_string): Constify.
8807
3e83a920
PA
88082017-04-05 Pedro Alves <palves@redhat.com>
8809
8810 * proc-api.c (procfs_filename): Don't initialize
8811 procfs_filename.
8812 (prepare_to_trace): Assume procfs_filename is non-NULL.
8813 (_initialize_proc_api): Give procfs_filename a default value here.
8814
63160a43
PA
88152017-04-05 Pedro Alves <palves@redhat.com>
8816
8817 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8818 'cond_string' parameter.
8819 (extract_exception_regexp): Constify 'string' parameter.
8820 (catch_exception_command_1): Constify.
8821 * breakpoint.c (init_catchpoint)
8822 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8823 parameter.
8824 (ep_parse_optional_if_clause, catch_fork_command_1)
8825 (catch_exec_command_1): Constify.
8826 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8827 parameter.
8828 (ep_parse_optional_if_clause): Constify.
8829 * cli/cli-utils.c (remove_trailing_whitespace)
8830 (check_for_argument): Constify.
8831 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8832 non-const overload.
8833 (check_for_argument): Likewise.
8834
9b2eba3d
PA
88352017-04-05 Pedro Alves <palves@redhat.com>
8836
8837 * event-top.c (command_line_handler): Add cast to execute_command
8838 call.
8839 * record-btrace.c (cmd_record_btrace_bts_start)
8840 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8841 (cmd_record_btrace_start): Add cast to execute_command call.
8842 * record-full.c (record_full_goto_insn):
8843 * record.c (record_start, record_stop): Add cast to
8844 execute_command_to_string calls.
8845 (cmd_record_start): Add cast to execute_command calls.
8846
2adadf51
PA
88472017-04-05 Pedro Alves <palves@redhat.com>
8848
8849 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8850 static inline function.
8851 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8852 array and use gdb_PyArg_ParseTupleAndKeywords.
8853 * python/py-cmd.c (cmdpy_init): Likewise.
8854 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8855 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8856 (infpy_search_memory): Likewise.
8857 * python/py-objfile.c (objfpy_add_separate_debug_file)
8858 (gdbpy_lookup_objfile): Likewise.
8859 * python/py-symbol.c (gdbpy_lookup_symbol)
8860 (gdbpy_lookup_global_symbol): Likewise.
8861 * python/py-type.c (gdbpy_lookup_type): Likewise.
8862 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8863 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8864 Likewise.
8865
0d1f4ceb
PA
88662017-04-05 Pedro Alves <palves@redhat.com>
8867
8868 * python/python-internal.h (gdb_PyGetSetDef): New type.
8869 * python/py-block.c (block_object_getset)
8870 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8871 * python/py-event.c (event_object_getset)
8872 (finish_breakpoint_object_getset): Likewise.
8873 * python/py-inferior.c (inferior_object_getset): Likewise.
8874 * python/py-infthread.c (thread_object_getset): Likewise.
8875 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8876 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8877 * python/py-objfile.c (objfile_getset): Likewise.
8878 * python/py-progspace.c (pspace_getset): Likewise.
8879 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8880 Likewise.
8881 * python/py-record.c (recpy_record_getset): Likewise.
8882 * python/py-symbol.c (symbol_object_getset): Likewise.
8883 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8884 Likewise.
8885 * python/py-type.c (type_object_getset, field_object_getset):
8886 Likewise.
8887 * python/py-value.c (value_object_getset): Likewise.
8888
4d759979
PA
88892017-04-05 Pedro Alves <palves@redhat.com>
8890
8891 * python/python-internal.h (gdb_PyObject_CallMethod)
8892 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8893 New functions.
8894 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8895 (PySys_GetObject, PySys_SetPath): New macros.
8896
fdf9e36f
PA
88972017-04-05 Pedro Alves <palves@redhat.com>
8898
8899 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8900 info_osdata_command.
8901 * osdata.c (info_osdata_command): Rename to ...
8902 (info_osdata): ... this. Constify 'type' parameter, and remove
8903 the 'from_tty' parameter. Accept NULL TYPE.
8904 (info_osdata_command): New function.
8905 * osdata.h (info_osdata_command): Remove declaration.
8906 (info_osdata): New declaration.
8907
9f33b8b7
PA
89082017-04-05 Pedro Alves <palves@redhat.com>
8909
8910 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8911 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8912 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8913 parameter.
8914 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8915 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8916 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8917 parameter.
8918 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8919 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8920 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8921 (mi_cmd_file_list_exec_source_files)
8922 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8923 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8924 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8925 parameter.
8926 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8927 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8928 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8929 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8930 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8931 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8932 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8933 'command' parameter.
8934 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8935 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8936 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8937 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8938 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8939 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8940 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8941 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8942 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8943 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8944 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8945 parameter.
8946 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8947 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8948 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8949 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8950 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8951 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8952 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8953 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8954 (mi_cmd_data_list_changed_registers)
8955 (mi_cmd_data_write_register_values)
8956 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8957 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8958 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8959 (mi_cmd_list_features, mi_cmd_list_target_features)
8960 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8961 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8962 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8963 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8964 (mi_cmd_trace_frame_collected): Constify 'command'
8965 parameter.
8966 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8967 'command' parameter.
8968
67cb5b2d
PA
89692017-04-05 Pedro Alves <palves@redhat.com>
8970
8971 * ada-lang.c (ada_completer_word_break_characters): Now a const
8972 array.
8973 (ada_get_gdb_completer_word_break_characters): Constify.
8974 * completer.c (gdb_completer_command_word_break_characters)
8975 (gdb_completer_file_name_break_characters)
8976 (gdb_completer_quote_characters): Now const arrays.
8977 (get_gdb_completer_quote_characters): Constify.
8978 (set_rl_completer_word_break_characters): New function.
8979 (set_gdb_completion_word_break_characters)
8980 (complete_line_internal): Use it.
8981 * completer.h (get_gdb_completer_quote_characters): Constify.
8982 (set_rl_completer_word_break_characters): Declare.
8983 * f-lang.c (f_word_break_characters): Constify.
8984 * language.c (default_word_break_characters): Constify.
8985 * language.h (language_defn::la_word_break_characters): Constify.
8986 (default_word_break_characters): Constify.
8987 * top.c (init_main): Use set_rl_completer_word_break_characters.
8988
7a114964
PA
89892017-04-05 Pedro Alves <palves@redhat.com>
8990
8991 * aix-thread.c (aix_thread_pid_to_str)
8992 (aix_thread_extra_thread_info): Constify.
8993 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8994 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8995 (bsd_uthread_pid_to_str): Constify.
8996 * corelow.c (core_pid_to_str): Constify.
8997 * darwin-nat.c (darwin_pid_to_str): Constify.
8998 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8999 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9000 Constify.
9001 * gnu-nat.c (gnu_pid_to_str): Constify.
9002 * go32-nat.c (go32_pid_to_str): Constify.
9003 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9004 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9005 * inferior.c (inferior_pid_to_str): Constify.
9006 * linux-nat.c (linux_nat_pid_to_str): Constify.
9007 * linux-tdep.c (linux_core_pid_to_str): Constify.
9008 * linux-thread-db.c (thread_db_pid_to_str)
9009 (thread_db_extra_thread_info): Constify.
9010 * nto-tdep.c (nto_extra_thread_info): Constify.
9011 * nto-tdep.h (nto_extra_thread_info): Constify.
9012 * obsd-nat.c (obsd_pid_to_str): Constify.
9013 * procfs.c (procfs_pid_to_str): Constify.
9014 * ravenscar-thread.c (ravenscar_extra_thread_info)
9015 (ravenscar_pid_to_str): Constify.
9016 * remote-sim.c (gdbsim_pid_to_str): Constify.
9017 * remote.c (remote_threads_extra_info, remote_pid_to_str):
9018 Constify.
9019 * sol-thread.c (solaris_pid_to_str): Constify.
9020 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9021 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9022 * target.c (default_pid_to_str, target_pid_to_str)
9023 (normal_pid_to_str, default_pid_to_str): Constify.
9024 * target.h (target_ops::to_pid_to_str)
9025 (target_ops::to_extra_thread_info): Constify.
9026 (target_pid_to_str, normal_pid_to_str): Constify.
9027 * windows-nat.c (windows_pid_to_str): Constify.
9028 * gdbarch.sh (core_pid_to_str): Constify.
9029 * target-delegates.c: Regenerate.
9030 * gdbarch.h, gdbarch.c: Regenerate.
9031
69bbf465
PA
90322017-04-05 Pedro Alves <palves@redhat.com>
9033
9034 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9035 the memory of the temporary warning_pre_print override.
9036 * utils.c (warning_pre_print): Constify.
9037 * utils.h (warning_pre_print): Constify.
9038
be47f9e8
PA
90392017-04-05 Pedro Alves <palves@redhat.com>
9040
9041 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9042 (shell_command): New function.
9043 (make_command): Use std::string.
9044 (init_cli_cmds): Register shell_command instead of shell_escape.
9045
bde6261a
PA
90462017-04-05 Pedro Alves <palves@redhat.com>
9047
9048 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9049 * tracepoint.c (default_collect): Don't initialize.
9050
b38ef47f
PA
90512017-04-05 Pedro Alves <palves@redhat.com>
9052
9053 * macroexp.c (macro_buffer::shared): Now a bool.
9054 (init_buffer): Update.
9055 (init_shared_buffer): Constify 'addr' parameter.
9056 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9057 casts.
9058
f995bbe8
PA
90592017-04-05 Pedro Alves <palves@redhat.com>
9060
9061 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9062 * disasm.c (set_disassembler_options): Constify local.
9063 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9064
4a596fe2
SDJ
90652017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9066
9067 PR gdb/21352
9068 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9069 option.
9070
2cad08ea
YQ
90712017-04-05 Yao Qi <yao.qi@linaro.org>
9072
9073 * frame.c (frame_unwind_register_unsigned): Call
9074 frame_unwind_register_value.
9075
55a98976
YQ
90762017-04-05 Yao Qi <yao.qi@linaro.org>
9077
9078 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9079 Use gdb_test_multiple, and don't match anchor.
9080
4ac40124
PA
90812017-04-05 Pedro Alves <palves@redhat.com>
9082
9083 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9084 (Write After Approval): Remove Simon Marchi.
9085
c053b654
PA
90862017-04-05 Pedro Alves <palves@redhat.com>
9087
9088 * common/gdb_optional.h (optional::optional): Make constexpr and
9089 initialize m_dummy.
9090
4c7bf4f9
JB
90912017-04-04 John Baldwin <jhb@FreeBSD.org>
9092
9093 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9094 (amd64fbsd_jmp_buf_reg_offset): Remove.
9095 (amd64fbsd_supply_uthread): Remove function.
9096 (amd64fbsd_collect_uthread): Remove function.
9097 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9098 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9099 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9100 (fbsd-nat.c): Update comment.
9101 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9102 (i386fbsd_jmp_buf_reg_offset): Remove.
9103 (i386fbsd_supply_uthread): Remove function.
9104 (i386fbsd_collect_uthread): Remove function.
9105 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9106
1e1a8bef
JB
91072017-04-04 John Baldwin <jhb@FreeBSD.org>
9108
9109 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9110 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9111 * NEWS: Mention that support for FreeBSD/alpha was removed.
9112 * alpha-fbsd-tdep.c: Delete file.
9113 * config/alpha/fbsd.mh: Delete file.
9114 * configure.host: Delete alpha*-*-freebsd* and
9115 alpha*-*-kfreebsd*-gnu.
9116 * configure.tgt: Delete alpha*-*-freebsd* and
9117 alpha*-*-kfreebsd*-gnu.
9118
49907934
JB
91192017-04-04 John Baldwin <jhb@FreeBSD.org>
9120
9121 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9122 amd64bsd_store_inferior_registers): Use ptid from regcache.
9123
6f77053d
PA
91242017-04-04 Pedro Alves <palves@redhat.com>
9125
9126 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9127 data fields, make them private and add "m_" prefixes.
9128 (lnp_state_machine::lnp_state_machine): New ctor.
9129 (record_line, check_line_address, handle_set_discriminator)
9130 (handle_set_address, handle_advance_pc, handle_special_opcode)
9131 (handle_advance_line, handle_set_file, handle_negate_stmt)
9132 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9133 (end_sequence, advance_line): New methods.
9134 (m_gdbarch, m_record_lines_p): New fields.
9135 (lnp_reader_state): Delete.
9136 (dwarf_record_line): Rename to ...
9137 (lnp_state_machine::record_line): ... adjust.
9138 (init_lnp_state_machine): Delete.
9139 (lnp_state_machine::lnp_state_machine): New.
9140 (check_line_address): Rename to ...
9141 (lnp_state_machine::check_line_address): This.
9142 (dwarf_decode_lines_1): Remove reference to "reader_state".
9143 Adjust lnp_state_machine having a non-default ctor. Use bool.
9144 State machine internal state manipulation moved to
9145 lnp_state_machine methods.
9146
9c541725
PA
91472017-04-04 Pedro Alves <palves@redhat.com>
9148
9149 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9150 unittests/offset-type-selftests.c.
9151 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9152 * common/offset-type.h: New file.
9153 * common/preprocessor.h: New file.
9154 * common/traits.h: New file.
9155 * common/valid-expr.h: New file.
9156 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9157 sect_offset and cu_offset strong typedefs throughout.
9158 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9159 typedefs throughout.
9160 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9161 sect_offset and cu_offset strong typedefs throughout.
9162 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9163 typedefs throughout.
9164 * gdbtypes.h: Include "common/offset-type.h".
9165 (cu_offset): Now an offset type (strong typedef) instead of a
9166 struct.
9167 (sect_offset): Likewise.
9168 (union call_site_parameter_u): Rename "param_offset" field to
9169 "param_cu_off".
9170 * unittests/offset-type-selftests.c: New file.
9171
ecfb656c
PA
91722017-04-04 Pedro Alves <palves@redhat.com>
9173
9174 * common/underlying.h: New file.
9175 * dwarf2read.c: Include "common/gdb_optional.h" and
9176 "common/underlying.h".
9177 (dir_index, file_name_index): New types.
9178 (file_entry): Use them.
9179 (file_entry::include): Use to_underlying.
9180 (line_header::add_file_name): Use dir_index.
9181 (read_formatted_entries): Use gdb::optional. Read form before
9182 writting to file_entry.
9183 (dwarf_decode_line_header): Use dir_index.
9184 (lnp_state_machine::current_file): Use to_underlying.
9185 (lnp_state_machine::file): Change type to file_name_index.
9186 (dwarf_record_line): Use to_underlying.
9187 (init_lnp_state_machine): Use file_name_index.
9188 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9189
d194f1fe
PA
91902017-04-04 Pedro Alves <palves@redhat.com>
9191
9192 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9193 operator bool, has_value and get methods.
9194
fff8551c
PA
91952017-04-04 Pedro Alves <palves@redhat.com>
9196
9197 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9198 fields.
9199 (line_header): Initialize all data fields. Change type of
9200 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9201 Change type of include_dirs to std::vector<const char *>. Remove
9202 num_include_dirs, include_dirs_size. Change type of file_names to
9203 std::vector<file_entry>. Remove num_file_names, file_names_size.
9204 (line_header::line_header): New.
9205 (line_header::add_include_dir, line_header::add_file_name): New
9206 methods.
9207 (line_header::include_dir_at): Remove NULL check.
9208 (line_header::file_name_at): Add const overload.
9209 (line_header_up): New unique_ptr typedef.
9210 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9211 std::vector. Remove free_line_header call.
9212 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9213 free_line_header call.
9214 (free_cu_line_header): Delete.
9215 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9216 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9217 Adjust to use std::vector.
9218 (free_line_header): Delete.
9219 (free_line_header_voidp): Use delete.
9220 (add_include_dir): Replace with ...
9221 (line_header::add_include_dir): ... this method. Use std::vector.
9222 (add_file_name): Replace with ...
9223 (line_header::add_file_name): ... this method. Use std::vector.
9224 (add_include_dir_stub): Delete.
9225 (read_formatted_entries): Remove memset.
9226 (dwarf_decode_line_header): Return a line_header_up instead of a
9227 raw pointer. Remove cleanup handling. Pass lambdas to
9228 read_formatted_entries. Adjust to use line_header methods.
9229 (dwarf_decode_lines_1): Adjust to use line_header methods.
9230 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9231 use std::vector.
9232
d62a8ae2
SM
92332017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9234
9235 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9236 instead of struct ptid.
9237
db3a1dc7
AH
92382017-05-04 Alan Hayward <alan.hayward@arm.com>
9239
9240 * frame.c (get_frame_register_bytes): Unwind using value.
9241 (put_frame_register_bytes): Likewise.
9242
b1b45502
IB
92432017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9244
9245 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9246 aggregate-like.
9247
ec13808e
JK
92482017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9249
9250 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9251
12316564
YQ
92522017-03-29 Yao Qi <yao.qi@linaro.org>
9253
9254 * gdbthread.h (struct thread_info): Declare constructor and
9255 destructor. Add some in-class member initializers.
9256 * thread.c (free_thread): Remove.
9257 (init_thread_list): Call delete instead of free_thread.
9258 (new_thread): Call thread_info constructor.
9259 (thread_info::thread_info): New function.
9260 (thread_info::~thread_info): New function.
9261 (delete_thread_1): Call delete instead of free_thread.
9262 (make_cleanup_restore_current_thread): Move tp and frame to
9263 inner block.
9264
fe5f7374
AK
92652017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9266
9267 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9268 (arc_skip_prologue): Likewise.
9269 (arc_make_frame_cache): Likewise.
9270 (arc_pv_get_operand): New function.
9271 (arc_is_in_prologue): Likewise.
9272 (arc_analyze_prologue): Likewise.
9273 (arc_print_frame_cache): Likewise.
9274 (MAX_PROLOGUE_LENGTH): New constant.
9275
eea78757
AK
92762017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9277
9278 * configure.tgt: Add arc-insn.o.
9279 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9280 (dump_arc_instruction_command): New function.
9281 (arc_fprintf_disasm): Likewise.
9282 (arc_disassemble_info): Likewise.
9283 (arc_insn_get_operand_value): Likewise.
9284 (arc_insn_get_operand_value_signed): Likewise.
9285 (arc_insn_get_memory_base_reg): Likewise.
9286 (arc_insn_get_memory_offset): Likewise.
9287 (arc_insn_get_branch_target): Likewise.
9288 (arc_insn_dump): Likewise.
9289 (arc_insn_get_linear_next_pc): Likewise.
9290 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9291 (arc_disassemble_info): Likewise.
9292 (arc_insn_get_branch_target): Likewise.
9293 (arc_insn_get_linear_next_pc): Likewise.
9294 * NEWS: Mention new "maint print arc arc-instruction".
9295
3be78afd
AK
92962017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9297
9298 * arc-tdep (maintenance_print_arc_list): New variable.
9299 (maintenance_print_arc_command): New function.
9300
296ec4fa
AK
93012017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9302
9303 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9304 Add "limm" and "reserved".
9305 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9306 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9307 * arc-tdep.h (arc_regnum): Likewise.
9308
f74f865e
MF
93092017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9310
9311 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9312 for THREADPTR register.
9313 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9314 register.
9315 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9316 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9317 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9318
0d0bf81a
MF
93192017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9320
9321 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9322 registers above gdbarch_num_regs (gdbarch) as privileged in
9323 call0 ABI.
9324
0ce4291e
MF
93252017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9326
9327 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9328 for a single specified register or for all registers in
9329 a0_base..a0_base + C0_NREGS range.
9330 (supply_gregset_reg): Call regcache_raw_supply for a single
9331 specified register or for all registers in a0_base..a0_base +
9332 C0_NREGS range.
9333
c56054f9
MF
93342017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9335
9336 * arch/xtensa.h (C0_NREGS): Add definition.
9337 * xtensa-tdep.c (C0_NREGS): Remove definition.
9338
a4398628
MF
93392017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9340
9341 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9342 Drop xtensa_default_isa initialization.
9343 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9344
8c43009f
PA
93452017-03-27 Pedro Alves <palves@redhat.com>
9346
9347 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9348 (file_entry::include_dir): New method.
9349 (line_header::include_dir_at, line_header::file_name_at): New
9350 methods.
9351 (setup_type_unit_groups, setup_type_unit_groups)
9352 (psymtab_include_file_name): Simplify using the new methods.
9353 (lnp_state_machine) <the_line_header>: New field.
9354 <file>: Add comment.
9355 (lnp_state_machine::current_file): New method.
9356 (dwarf_record_line): Simplify using the new methods.
9357 (init_lnp_state_machine): Initialize the "the_line_header" field.
9358 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9359 Simplify using the new methods.
9360
a7e80b9e
PA
93612017-03-27 Pedro Alves <palves@redhat.com>
9362
9363 * cp-name-parser.y (make_empty): Delete.
9364 (demangler_special, nested_name, ptr_operator, array_indicator)
9365 (direct_declarator, declarator_1): Use fill_comp instead of
9366 make_empty.
9367
21047726
PA
93682017-03-27 Pedro Alves <palves@redhat.com>
9369
9370 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9371 to ATTRIBUTE_PRINTF.
9372 * solib-target.c (library_list_start_list): Print "string" not
9373 "version".
9374 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9375 gdb_xml_error call.
9376
d721ba37
PA
93772017-03-27 Pedro Alves <palves@redhat.com>
9378
9379 * dwarf2read.c (struct file_and_directory): New.
9380 (dwarf2_get_dwz_file): Adjust to use std::string.
9381 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9382 (find_file_and_directory): Adjust to return a file_and_directory
9383 object.
9384 (read_file_scope): Adjust to use file_and_directory. Remove
9385 make_cleanup/do_cleanups calls.
9386 (open_and_init_dwp_file): Adjust to use std::string. Remove
9387 make_cleanup/do_cleanups calls.
9388 * python/python.c (do_start_initialization): Adjust to ldirname
9389 returning a std::string.
9390 * utils.c (ldirname): Now returns a std::string.
9391 * utils.h (ldirname): Change return type to std::string.
9392 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9393 returning a std::string.
9394 * xml-tdesc.c (file_read_description_xml): Likewise.
9395
ed771251
AH
93962017-03-24 Alan Hayward <alan.hayward@arm.com>
9397
9398 * regcache.c (regcache_debug_print_register): New function.
9399 * regcache.h (regcache_debug_print_register): New declaration.
9400 * target.c (debug_print_register): Remove.
9401 (target_fetch_registers): Call regcache_debug_print_register.
9402 (target_store_registers): Likewise.
9403
568c1b9f
PB
94042017-03-24 Pádraig Brady <pbrady@fb.com>
9405
9406 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9407 reference beyond the 'lh->include_dirs' array before accessing to
9408 it.
9409 (psymtab_include_file_name): Likewise.
9410 (dwarf_decode_lines_1): Likewise.
9411 (dwarf_decode_lines): Likewise.
9412 (file_file_name): Likewise.
9413
3e00d44f
SM
94142017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9415
9416 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9417 inferior_ptid.
9418 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9419 ps_lsetfpregs): Likewise.
9420 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9421 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9422 ps_lsetfpregs): Likewise.
9423 * target.c (target_fetch_registers, target_store_registers):
9424 Remove asserts.
9425
077ae656
AH
94262017-03-23 Alan Hayward <alan.hayward@arm.com>
9427
9428 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9429
1e2b521d
YQ
94302017-03-23 Yao Qi <yao.qi@linaro.org>
9431
9432 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9433 (_initialize_aarch64_tdep): Register it.
9434 (aarch64_record_load_store): Handle PRFM instruction.
9435 (aarch64_process_record_test): New function.
9436
33877125
YQ
94372017-03-23 Yao Qi <yao.qi@linaro.org>
9438
9439 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9440 indentation.
9441
a0eef940
YQ
94422017-03-23 Yao Qi <yao.qi@linaro.org>
9443
9444 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9445
3f2a3564
PR
94462017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9447
9448 python/python.c (do_start_initialization): Fix memory leak.
9449
b67aeab0
SM
94502017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9451
9452 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9453 using get_ptrace_pid.
9454 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9455 inferior_ptid.
9456 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9457 inferior_ptid instead of pid.
9458
ffdbe864
YQ
94592017-03-22 Yao Qi <yao.qi@linaro.org>
9460
9461 * aarch64-tdep.c: Wrap locally used classes in anonymous
9462 namespace.
9463 * arm-tdep.c: Likewise.
9464 * linespec.c: Likewise.
9465 * ui-out.c: Likewise.
9466
9d736fbf
JG
94672017-03-22 Jonah Graham <jonah@kichwacoders.com>
9468
9469 PR gdb/19637
9470 * python/lib/gdb/printer/bound_registers.py: Import sys.
9471
3de88e9a
SM
94722017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9473
9474 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9475 windows_thread_info parameter and use it instead of
9476 current_thread.
9477 (windows_fetch_inferior_registers): Don't set current_thread,
9478 pass the thread to do_windows_fetch_inferior_registers. Use
9479 ptid from regcache instead of inferior_ptid.
9480 (do_windows_store_inferior_registers): Add windows_thread_info
9481 parameter and use it instead of current_thread.
9482 (windows_store_inferior_registers): Don't set current_thread,
9483 pass the thread to do_windows_store_inferior_registers. Use
9484 ptid from regcache instead of inferior_ptid.
9485
0e7b8f61
SM
94862017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9487
9488 * ser-mingw.c (ser_windows_raw): Remove reference to
9489 struct serial::current_timeout.
9490
5badf10a
IR
94912017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9492
9493 PR tdep/20928
9494 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9495 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9496 (sparc64_fsr_type): Fix %fsr decoding.
9497
cee59b3f
TW
94982017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9499
9500 * python/py-record-btrace.c (btpy_insn_data): Change return type
9501 for Python 2.
9502
639a9038
SM
95032017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9504
9505 * spu-linux-nat.c (spu_fetch_inferior_registers,
9506 spu_store_inferior_registers): Use ptid from regcache, set and
9507 restore inferior_ptid.
9508 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9509 Likewise.
9510
bcc0c096
SM
95112017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9512
9513 * i386-linux-nat.c (fetch_register, store_register,
9514 i386_linux_fetch_inferior_registers,
9515 i386_linux_store_inferior_registers): Use ptid from regcache.
9516 * ia64-linux-nat.c (ia64_linux_fetch_register,
9517 ia64_linux_store_register): Likewise.
9518 * inf-ptrace.c (inf_ptrace_fetch_register,
9519 inf_ptrace_store_register): Likewise.
9520 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9521 m32r_linux_store_inferior_registers): Likewise.
9522 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9523 m68kbsd_store_inferior_registers): Likewise.
9524 * m68k-linux-nat.c (fetch_register, store_register,
9525 m68k_linux_fetch_inferior_registers,
9526 m68k_linux_store_inferior_registers): Likewise.
9527 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9528 m88kbsd_store_inferior_registers): Likewise.
9529 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9530 mips_fbsd_store_inferior_registers): Likewise.
9531 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9532 mips64_linux_regsets_store_registers): Likewise.
9533 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9534 mipsnbsd_store_inferior_registers): Likewise.
9535 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9536 mips64obsd_store_inferior_registers): Likewise.
9537 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9538 Likewise.
9539 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9540 ppcfbsd_store_inferior_registers): Likewise.
9541 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9542 ppc_linux_store_inferior_registers): Likewise.
9543 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9544 ppcnbsd_store_inferior_registers): Likewise.
9545 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9546 ppcobsd_store_registers): Likewise.
9547 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9548 Likewise.
9549 * ravenscar-thread.c (ravenscar_fetch_registers,
9550 ravenscar_store_registers, ravenscar_prepare_to_store):
9551 Likewise.
9552 * record-btrace.c (record_btrace_fetch_registers,
9553 record_btrace_store_registers, record_btrace_prepare_to_store):
9554 Likewise.
9555 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9556 Lookup inferior using ptid from regcache, instead of
9557 current_inferior.
9558 * remote.c (remote_fetch_registers, remote_store_registers): Use
9559 ptid from regcache.
9560 * rs6000-nat.c (fetch_register, store_register): Likewise.
9561 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9562 s390_linux_store_inferior_registers): Likewise.
9563 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9564 shnbsd_store_inferior_registers): Likewise.
9565 * sol-thread.c (sol_thread_fetch_registers,
9566 sol_thread_store_registers): Likewise.
9567 * sparc-nat.c (sparc_fetch_inferior_registers,
9568 sparc_store_inferior_registers): Likewise.
9569 * tilegx-linux-nat.c (fetch_inferior_registers,
9570 store_inferior_registers): Likewise.
9571 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9572 vaxbsd_store_inferior_registers): Likewise.
9573 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9574 store_xtregs): Likewise.
9575
c0f55cc6
AV
95762017-03-20 Artemiy Volkov <artemiyv@acm.org>
9577
9578 PR gdb/14441
9579 * NEWS: Mention support for rvalue references in GDB and python.
9580 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9581 supports both lvalue and rvalue references.
9582
15c0a2a9
AV
95832017-03-20 Artemiy Volkov <artemiyv@acm.org>
9584
9585 PR gdb/14441
9586 * gdbtypes.c (rank_one_type): Implement overloading
9587 resolution rules regarding rvalue references.
9588
aa006118
AV
95892017-03-20 Artemiy Volkov <artemiyv@acm.org>
9590
9591 PR gdb/14441
9592 * aarch64-tdep.c (aarch64_type_align)
9593 (aarch64_extract_return_value, aarch64_store_return_value): Change
9594 lvalue reference type checks to general reference type checks.
9595 * amd64-tdep.c (amd64_classify): Likewise.
9596 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9597 Likewise.
9598 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9599 (arm_store_return_value): Likewise.
9600 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9601 * c-typeprint.c (c_print_type): Likewise.
9602 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9603 (cplus_number_of_children, cplus_describe_child): Likewise.
9604 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9605 * completer.c (expression_completer): Likewise.
9606 * cp-support.c (make_symbol_overload_list_adl_namespace):
9607 Likewise.
9608 * darwin-nat-info.c (info_mach_region_command): Likewise.
9609 * dwarf2loc.c (entry_data_value_coerce_ref)
9610 (value_of_dwarf_reg_entry): Likewise.
9611 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9612 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9613 Likewise.
9614 * findvar.c (extract_typed_address, store_typed_address):
9615 Likewise.
9616 * gdbtypes.c (rank_one_type): Likewise.
9617 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9618 * infcall.c (value_arg_coerce): Likewise.
9619 * language.c (pointer_type): Likewise.
9620 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9621 Likewise.
9622 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9623 * mn10300-tdep.c (mn10300_type_align): Likewise.
9624 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9625 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9626 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9627 Likewise.
9628 * printcmd.c (print_formatted, x_command): Likewise.
9629 * python/py-type.c (typy_get_composite, typy_template_argument):
9630 Likewise.
9631 * python/py-value.c (valpy_referenced_value)
9632 (valpy_get_dynamic_type, value_has_field): Likewise.
9633 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9634 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9635 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9636 * spu-tdep.c (spu_scalar_value_p): Likewise.
9637 * symtab.c (lookup_symbol_aux): Likewise.
9638 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9639 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9640 Likewise.
9641 * valops.c (value_cast_pointers, value_cast)
9642 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9643 (value_struct_elt, value_struct_elt_bitpos)
9644 (value_find_oload_method_list, find_overload_match)
9645 (value_rtti_indirect_type): Likewise.
9646 * valprint.c (val_print_scalar_type_p, generic_val_print):
9647 Likewise.
9648 * value.c (value_actual_type, value_as_address, unpack_long)
9649 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9650 (coerce_ref): Likewise.
9651 * varobj.c (varobj_get_value_type): Likewise.
9652
3fcf899d
AV
96532017-03-20 Artemiy Volkov <artemiyv@acm.org>
9654
9655 PR gdb/14441
9656 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9657 table of constants.
9658 * python/lib/gdb/command/explore.py: Support exploring values
9659 of rvalue reference types.
9660 * python/lib/gdb/types.py: Implement get_basic_type() for
9661 rvalue reference types.
9662 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9663 constant.
9664 * python/py-value.c (valpy_getitem): Add an rvalue reference
9665 check.
9666 (valpy_reference_value): Add new parameter "refcode".
9667 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9668 New wrappers for valpy_reference_value().
9669 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9670 (gdbpy_invoke_xmethod): Likewise.
9671
4297a3f0
AV
96722017-03-20 Artemiy Volkov <artemiyv@acm.org>
9673
9674 PR gdb/14441
9675 * dwarf2read.c (process_die, read_type_die_1): Handle the
9676 DW_TAG_rvalue_reference_type DIE.
9677 (read_tag_reference_type): Add new parameter "refcode".
9678
e1cb3213
AV
96792017-03-20 Artemiy Volkov <artemiyv@acm.org>
9680
9681 PR gdb/14441
9682 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9683 (c_type_print_modifier, c_type_print_varspec_suffix)
9684 (c_type_print_base): Support printing rvalue reference types.
9685 * c-valprint.c (c_val_print, c_value_print): Support printing
9686 rvalue reference values.
9687
e4347c89
AV
96882017-03-20 Artemiy Volkov <artemiyv@acm.org>
9689
9690 PR gdb/14441
9691 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9692 typename.
9693 * cp-support.c (replace_typedefs): Handle
9694 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9695 * python/py-type.c (typy_lookup_type): Likewise.
9696
53cc15f5
AV
96972017-03-20 Artemiy Volkov <artemiyv@acm.org>
9698
9699 PR gdb/14441
9700 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9701 * parse.c (insert_type): Change assert statement.
9702 (follow_types): Handle rvalue reference types.
9703 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9704 constant.
9705
a65cfae5
AV
97062017-03-20 Artemiy Volkov <artemiyv@acm.org>
9707
9708 PR gdb/14441
9709 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9710 value_ref() interface.
9711 * c-valprint.c (c_value_print): Likewise.
9712 * infcall.c (value_arg_coerce): Likewise.
9713 * python/py-value.c (valpy_reference_value): Likewise.
9714 * valops.c (value_cast, value_reinterpret_cast)
9715 (value_dynamic_cast, typecmp): Likewise.
9716 (value_ref): Parameterize by kind of return value reference type.
9717 * value.h (value_ref): Add new parameter "refcode".
9718
3b224330
AV
97192017-03-20 Artemiy Volkov <artemiyv@acm.org>
9720
9721 PR gdb/14441
9722 * dwarf2read.c (read_tag_reference_type): Use
9723 lookup_lvalue_reference_type() instead of lookup_reference_type().
9724 * eval.c (evaluate_subexp_standard): Likewise.
9725 * f-exp.y: Likewise.
9726 * gdbtypes.c (make_reference_type, lookup_reference_type):
9727 Generalize with rvalue reference types.
9728 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9729 convenience wrappers for lookup_reference_type().
9730 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9731 reference kind parameter.
9732 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9733 wrappers for lookup_reference_type().
9734 * guile/scm-type.c (gdbscm_type_reference): Use
9735 lookup_lvalue_reference_type() instead of lookup_reference_type().
9736 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9737 * parse.c (follow_types): Likewise.
9738 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9739 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9740 Likewise.
9741 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9742 (gdbpy_invoke_xmethod): Likewise.
9743 * stabsread.c: Provide extra argument to make_reference_type()
9744 call.
9745 * valops.c (value_ref, value_rtti_indirect_type): Use
9746 lookup_lvalue_reference_type() instead of lookup_reference_type().
9747
f9aeb8d4
AV
97482017-03-20 Artemiy Volkov <artemiyv@acm.org>
9749
9750 PR gdb/14441
9751 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9752 (TYPE_IS_REFERENCE): New macro.
9753 (struct type): Add rvalue_reference_type field.
9754 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9755
51457a05
MAL
97562017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9757
9758 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9759 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9760 New function definition.
9761 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9762 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9763 New function declaration.
9764 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9765 * mi/mi-interp.h: New file.
9766 * solib.c (info_sharedlibrary_command): Replace for loop with
9767 ALL_SO_LIBS macro
9768 * solib.h (update_solib_list): New function declaration.
9769 (so_list_head): Move macro.
9770 * solist.h (ALL_SO_LIBS): New macro.
9771
e696b3ad
MAL
97722017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9773
9774 * infcmd.c (post_create_inferior): Remove unused argument in
9775 call to solib_add.
9776 * remote.c (remote_start_remote): Likewise.
9777 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9778 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9779 (enable_break): Likewise.
9780 * solib.c (update_solib_list): Remove unused target argument
9781 and its documentation.
9782 (solib_add): Remove unused target argument. Remove unused
9783 argument in call to update_solib_list.
9784 (info_sharedlibrary_command): Remove unused argument in call
9785 to update_solib_list.
9786 (sharedlibrary_command): Remove unused argument in call to
9787 solib_add.
9788 (handle_solib_event): Likewise.
9789 (reload_shared_libraries): Likewise.
9790 * solib.h (solib_add): Remove unused target argument.
9791
dcb84eda
AA
97922017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9793
9794 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9795 (s390_displaced_step_fixup): Cover relative branches with the
9796 default fixup handling. This fixes lack of support for some
9797 relative branch instructions.
9798
d9cb6cdc
SM
97992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9800
9801 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9802 ptid from regcache.
9803
1afaf9f4
SM
98042017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9805
9806 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9807 i386_darwin_store_inferior_registers): Use ptid from regcache.
9808
aac12e24
SM
98092017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9810
9811 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9812 i386bsd_store_inferior_registers): Use ptid from regcache.
9813
bbe1eef1
SM
98142017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9815
9816 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9817 hppaobsd_store_registers): Use ptid from regcache.
9818
10799020
SM
98192017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9820
9821 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9822 hppanbsd_store_registers): Use ptid from regcache.
9823
00204cf7
SM
98242017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9825
9826 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9827 from regcache. Use get_ptrace_pid.
9828
11a33714
SM
98292017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9830
9831 * corelow.c (get_core_register_section): Use ptid from regcache,
9832 update doc.
9833
317cd492
SM
98342017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9835
9836 * bsd-uthread.c (bsd_uthread_fetch_registers,
9837 bsd_uthread_store_registers): Use ptid from regcache, set and
9838 restore inferior_ptid.
9839
9ac8a7c2
SM
98402017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9841
9842 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9843 fetch_fp_regs, store_register, store_regs, store_fp_register,
9844 store_fp_regs): Use ptid from regcache.
9845
4ac4bb6a
SM
98462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9847
9848 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9849 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9850 store_vfp_regs): Use ptid from regcache.
9851
9bcbdca8
PA
98522017-03-17 Pedro Alves <palves@redhat.com>
9853
9854 PR remote/21188
9855 * ser-base.c (ser_base_wait_for): Add comment.
9856 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9857 version.
9858 * ser-unix.c (hardwire_raw): Remove reference to
9859 scb->current_timeout.
9860 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9861 (hardwire_ops): Install ser_base_readchar instead of
9862 hardwire_readchar.
9863 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9864 Remove fields.
9865
7503099f
JG
98662017-03-17 Jonah Graham <jonah@kichwacoders.com>
9867
9868 PR gdb/19637
9869 * python/lib/gdb/printer/bound_registers.py: Add support for
9870 Python 3.
9871
7942e96e
AA
98722017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9873
9874 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9875 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9876 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9877 byte_offset to subobj_byte_offset. Fix the handling of
9878 DWARF_VALUE_STACK on big-endian targets when coming via an
9879 implicit pointer.
9880 (dwarf2_evaluate_loc_desc): Adjust call to
9881 dwarf2_evaluate_loc_desc_full.
9882 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9883 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9884
ba14f379
YQ
98852017-03-16 Yao Qi <yao.qi@linaro.org>
9886
9887 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9888 and REVSH instructions.
9889
b121eeb9
YQ
98902017-03-16 Yao Qi <yao.qi@linaro.org>
9891
9892 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9893 (arm_record_test): Declare.
9894 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9895 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9896 align with the manual.
9897 (thumb_record_misc): Adjust the code order to align with the
9898 manual.
9899 (thumb2_record_decode_insn_handler): Fix instruction matching.
9900 (instruction_reader_thumb): New class.
9901 (arm_record_test): New function.
9902
728a7913
YQ
99032017-03-16 Yao Qi <yao.qi@linaro.org>
9904
9905 * arm-tdep.c (abstract_memory_reader): New class.
9906 (instruction_reader): New class.
9907 (extract_arm_insn): Add argument 'reader'. Callers updated.
9908 (decode_insn): Likewise.
9909
34b43320
DE
99102017-03-16 Doug Evans <dje@google.com>
9911
a7c0469f
DE
9912 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9913 member. Change type of TYPE member to SCM. All uses updated.
9914 (lsscm_make_lazy_string_smob): Add assert.
9915 (lsscm_make_lazy_string): Flag bad length values.
9916 (lsscm_elt_type): New function.
9917 (gdbscm_lazy_string_to_value): Rewrite to use
9918 lsscm_safe_lazy_string_to_value.
9919 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9920 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9921 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9922 in incoming type.
9923 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9924 * guile/scm-type.c (tyscm_scm_to_type): New function.
9925
99262017-03-15 Doug Evans <dje@google.com>
9927
34b43320
DE
9928 PR python/17728, python/18439, python/18779
9929 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9930 member. Change type of TYPE member to PyObject *. All uses updated.
9931 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9932 (gdbpy_create_lazy_string_object): Flag bad length values.
9933 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9934 Handle typedefs in incoming type.
9935 (stpy_lazy_string_elt_type): New function.
9936 (gdbpy_extract_lazy_string): Call it.
9937 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9938 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9939 typedefs in incoming type.
9940
a3a5fecc
DE
99412017-03-16 Doug Evans <dje@google.com>
9942
9943 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9944 * guile/scm-type.c (tyscm_scm_to_type): New function.
9945
28f1c605
JW
99462017-03-16 Jiong Wang <jiong.wang@arm.com>
9947
9948 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9949 "ULONGEST" for "skip".
9950
87c336f6
AA
99512017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9952
9953 PR gdb/21220
9954 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9955 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9956 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9957 over ptrace peek/poke until end of buffer or error.
9958
cf81cf60
SM
99592017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9960
9961 * parse.c (length_of_subexp): Make static.
9962 * parser-defs.h (length_of_subexp): Remove.
9963
a379284a
AA
99642017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9965
9966 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9967 as well.
9968
8a6200ba
PA
99692017-03-14 Pedro Alves <palves@redhat.com>
9970
9971 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9972 (main): Use std::unique_ptr. Remove calls to
9973 cp_demangled_name_parse_free.
9974
f79ec206
SM
99752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9976
9977 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9978 alphabsd_store_inferior_registers): Use regcache->ptid instead
9979 of inferior_ptid.
9980
edb5fb00
SM
99812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9982
9983 * aix-thread.c (aix_thread_fetch_registers,
9984 aix_thread_store_registers): Use regcache->ptid instead of
9985 inferior_ptid.
9986
55119686
SM
99872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9988
9989 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9990 store_gregs_to_thread, fetch_fpregs_from_thread,
9991 store_fpregs_to_thread): Use regcache->ptid instead of
9992 inferior_ptid.
9993
6a06fbb7
SM
99942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9995
9996 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9997 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9998 instead of inferior_ptid.
9999
c6386875
SM
100002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10001
10002 * target.c (target_fetch_registers, target_store_registers): Add
10003 assert.
10004
ddaaf0fb
SM
100052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10006
10007 * regcache.h (regcache_get_ptid): New function.
10008 * regcache.c (regcache_get_ptid): New function.
10009
b9da89d1 100102017-03-13 Mark Wielaard <mark@klomp.org>
10011
10012 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10013
5f4d1085
KS
100142017-03-10 Keith Seitz <keiths@redhat.com>
10015
10016 PR c++/8218
10017 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10018
c65d6b55
PA
100192017-03-08 Pedro Alves <palves@redhat.com>
10020
10021 PR gdb/18360
10022 * infrun.c (start_step_over, do_target_resume, resume)
10023 (restart_threads): Assert we're not resuming a thread that is
10024 meant to be stopped.
10025 (infrun_thread_stop_requested_callback): Delete.
10026 (infrun_thread_stop_requested): If the thread is internally
10027 stopped, queue a pending stop event and clear the thread's
10028 inline-frame state.
10029 (handle_stop_requested): New function.
10030 (handle_syscall_event, handle_inferior_event_1): Use
10031 handle_stop_requested.
10032 (handle_stop_requested): New function.
10033 (handle_signal_stop): Set the thread's stop_signal here instead of
10034 at caller.
10035 (finish_step_over): Clear step over info unconditionally.
10036 (handle_signal_stop): If the user had interrupted the event
10037 thread, consider the stop a random signal.
10038 (handle_signal_stop) <signal arrived while stepping over
10039 breakpoint>: Don't restart threads here.
10040 (stop_waiting): Don't clear step-over info here.
10041
15c22686
PA
100422017-03-08 Pedro Alves <palves@redhat.com>
10043
10044 PR 21206
10045 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10046 goes to argument 2, not 1.
10047
6e5d74e7
PA
100482017-03-08 Pedro Alves <palves@redhat.com>
10049
10050 PR cli/21218
10051 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10052 display_gdb_prompt.
10053 (command_line_input): Add comment.
10054
9753a2f6
PA
100552017-03-08 Pedro Alves <palves@redhat.com>
10056
10057 PR tui/21216
10058 * tui/tui-file.c (tui_file::write): New.
10059 * tui/tui-file.h (tui_file): Override "write".
10060 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10061 factored out from ...
10062 (tui_puts): ... here.
10063 (tui_putc): Use them.
10064 (tui_write): New function.
10065 * tui/tui-io.h (tui_write): Declare.
10066
1672e0d9
SDJ
100672017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10068
10069 * Makefile.in (SFILES): Replace "environ.c" with
10070 "common/environ.c".
10071 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10072 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10073 to...
10074 * common/environ.c: ... here.
10075 * environ.h: Moved to...
10076 * common/environ.h: ... here.
10077
f7bb4e3a
PB
100782017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10079
10080 * gdbarch.sh (pstring_ptr): New static function.
10081 (gdbarch_disassembler_options): Use it.
10082 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10083 not valid_disassembler_option->name.
10084 * gdbarch.c: Regenerate.
10085
e45ced6c
PB
100862017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10087
10088 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10089
5f6fd321
PA
100902017-03-07 Pedro Alves <palves@redhat.com>
10091
10092 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10093
6dbb839a 100942017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
10095
10096 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10097 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10098 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 10099 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 10100
d274ecf4
SM
101012017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10102
10103 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10104
df97be55
SM
101052017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10106
10107 * remote.c (remote_add_target_side_commands): Use range-based
10108 for loop.
10109
7d45f3df
YQ
101102017-03-03 Yao Qi <yao.qi@linaro.org>
10111
10112 PR gdb/21165
10113 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10114 value is lazy.
10115 * valprint.c (common_val_print): Likewise.
10116
65b48a81
PB
101172017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10118
10119 * NEWS: Mention new set/show disassembler-options commands.
10120 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10121 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10122 (prospective_options): New static variable.
10123 (gdb_disassembler::gdb_disassembler): Initialize
10124 m_di.disassembler_options.
10125 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10126 (get_disassembler_options): New function.
10127 (set_disassembler_options): Likewise.
10128 (set_disassembler_options_sfunc): Likewise.
10129 (show_disassembler_options_sfunc): Likewise.
10130 (disassembler_options_completer): Likewise.
10131 (_initialize_disasm): Likewise.
10132 * disasm.h (get_disassembler_options): New prototype.
10133 (set_disassembler_options): Likewise.
10134 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10135 (gdbarch_verify_disassembler_options): Likewise.
10136 * gdbarch.c: Regenerate.
10137 * gdbarch.h: Likewise.
10138 * arm-tdep.c (num_disassembly_options): Delete.
10139 (set_disassembly_style): Likewise.
10140 (arm_disassembler_options): New static variable.
10141 (set_disassembly_style_sfunc): Convert short style name into long
10142 option name. Call set_disassembler_options.
10143 (show_disassembly_style_sfunc): New function.
10144 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10145 set_gdbarch_verify_disassembler_options.
10146 (_initialize_arm_tdep): Delete regnames variable and update callers.
10147 (arm_disassembler_options): Initialize.
10148 (disasm_options): New variable.
10149 (num_disassembly_options): Rename from this...
10150 (num_disassembly_styles): ...to this. Compute by scanning through
10151 disasm_options.
10152 (valid_disassembly_styles): Initialize using disasm_options.
10153 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10154 set_arm_regname_option.
10155 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10156 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10157 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10158 set_gdbarch_verify_disassembler_options.
10159 * s390-tdep.c (s390_disassembler_options): New static variable.
10160 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10161 set_gdbarch_verify_disassembler_options.
10162
d538e36d
SM
101632017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10164
10165 * remote.c (remote_add_target_side_condition): Remove "struct"
10166 keyword from range-based for loop.
10167
83621223
SM
101682017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10169
10170 * remote.c (remote_add_target_side_condition): Use range-based
10171 for loop. Update comment.
10172
2123df0e
YQ
101732017-02-27 Yao Qi <yao.qi@linaro.org>
10174
10175 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10176
8e368124
AH
101772017-02-26 Alan Hayward <alan.hayward@arm.com>
10178
10179 * regcache.c (regcache_raw_update): New function.
10180 (regcache_raw_read): Move code to regcache_raw_update.
10181 * regcache.h (regcache_raw_update): New declaration.
10182 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10183
a49dd8dd
JK
101842017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10185
10186 * dwarf2read.c (create_debug_type_hash_table): Initialize
10187 header.signature and header.type_offset_in_tu.
10188
34e4bae9
PA
101892017-02-24 Pedro Alves <palves@redhat.com>
10190
10191 * symtab.c (make_file_symbol_completion_list_1): Use
10192 add_symtab_completions.
10193
b0e4b369
AH
101942017-02-24 Alan Hayward <alan.hayward@arm.com>
10195
10196 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10197
975c21ab
AH
101982017-02-24 Alan Hayward <alan.hayward@arm.com>
10199
10200 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10201 I386_MAX_REGISTER_SIZE.
10202 (i386_pseudo_register_write): Likewise.
10203 (i386_process_record): Likewise.
10204 * i387-tdep.c (i387_supply_xsave): Likewise.
10205 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10206 (store_register): Likewise.
10207
14bc53a8
PA
102082017-02-23 Pedro Alves <palves@redhat.com>
10209
10210 * ada-lang.c: Include "common/function-view.h".
10211 (ada_iterate_over_symbols): Adjust to use function_view as
10212 callback type.
10213 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10214 (ada_make_symbol_completion_list): Use a lambda.
10215 (ada_exc_search_name_matches): Delete.
10216 (name_matches_regex): New.
10217 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10218 * compile/compile-c-support.c: Include "common/function-view.h".
10219 (print_one_macro): Change prototype to accept a ui_file pointer.
10220 (write_macro_definitions): Use a lambda.
10221 * dwarf2read.c: Include "common/function-view.h".
10222 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10223 (dw2_expand_symtabs_matching): Adjust to use function_view as
10224 callback type.
10225 * language.h: Include "common/function-view.h".
10226 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10227 function_view as callback type.
10228 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10229 * linespec.c: Include "common/function-view.h".
10230 (collect_info::add_symbol): New method.
10231 (struct symbol_and_data_callback, iterate_inline_only, struct
10232 symbol_matcher_data, iterate_name_matcher): Delete.
10233 (iterate_over_all_matching_symtabs): Adjust to use function_view
10234 as callback type and lambdas.
10235 (iterate_over_file_blocks): Adjust to use function_view as
10236 callback type.
10237 (decode_compound_collector): Now a class with private fields.
10238 (decode_compound_collector::release_symbols): New method.
10239 (collect_one_symbol): Rename to...
10240 (decode_compound_collector::operator()): ... this and adjust.
10241 (lookup_prefix_sym): decode_compound_collector construction bits
10242 move to decode_compound_collector ctor. Pass the
10243 decode_compound_collector object directly as callback. Remove
10244 cleanups and use decode_compound_collector::release_symbols
10245 instead.
10246 (symtab_collector): Now a class with private fields.
10247 (symtab_collector::release_symtabs): New method.
10248 (add_symtabs_to_list): Rename to...
10249 (symtab_collector::operator()): ... this and adjust.
10250 (collect_symtabs_from_filename): symtab_collector construction
10251 bits move to symtab_collector ctor. Pass the symtab_collector
10252 object directly as callback. Remove cleanups and use
10253 symtab_collector::release_symtabs instead.
10254 (collect_symbols): Delete.
10255 (add_matching_symbols_to_info): Use lambdas.
10256 * macrocmd.c (print_macro_callback): Delete.
10257 (info_macro_command): Use a lambda.
10258 (info_macros_command): Pass print_macro_definition as callable
10259 directly.
10260 (print_one_macro): Remove 'ignore' parameter.
10261 (macro_list_command): Adjust.
10262 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10263 (macro_for_each_data::user_data): Delete field.
10264 (foreach_macro): Adjust to call the function_view.
10265 (macro_for_each): Adjust to use function_view as callback type.
10266 (foreach_macro_in_scope): Adjust to call the function_view.
10267 (macro_for_each_in_scope): Adjust to use function_view as callback
10268 type.
10269 * macrotab.h: Include "common/function-view.h".
10270 (macro_callback_fn): Declare a prototype instead of a pointer.
10271 Remove "user_data" parameter.
10272 (macro_for_each, macro_for_each_in_scope): Adjust to use
10273 function_view as callback type.
10274 * psymtab.c (partial_map_expand_apply)
10275 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10276 Adjust to use function_view as callback type and to return bool.
10277 (psym_expand_symtabs_matching): Adjust to use function_view as
10278 callback types.
10279 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10280 to use function_view as callback type and to return bool.
10281 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10282 callback types.
10283 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10284 as callback types.
10285 * symfile.h: Include "common/function-view.h".
10286 (expand_symtabs_file_matcher_ftype)
10287 (expand_symtabs_symbol_matcher_ftype)
10288 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10289 return bool.
10290 (quick_symbol_functions::map_symtabs_matching_filename)
10291 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10292 function_view as callback type and return bool.
10293 (expand_symtabs_matching): Adjust to use function_view as callback
10294 type.
10295 (maintenance_expand_name_matcher)
10296 (maintenance_expand_file_matcher): Delete.
10297 (maintenance_expand_symtabs): Use lambdas.
10298 * symtab.c (iterate_over_some_symtabs): Adjust to use
10299 function_view as callback types and return bool.
10300 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10301 of a cleanup.
10302 (lookup_symtab_callback): Delete.
10303 (lookup_symtab): Use a lambda.
10304 (iterate_over_symbols): Adjust to use function_view as callback
10305 type.
10306 (struct search_symbols_data, search_symbols_file_matches)
10307 (search_symbols_name_matches): Delete.
10308 (search_symbols): Use a pair of lambdas.
10309 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10310 (symtab_expansion_callback): Delete.
10311 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10312 * symtab.h: Include "common/function-view.h".
10313 (iterate_over_some_symtabs): Adjust to use function_view as
10314 callback type and return bool.
10315 (iterate_over_symtabs): Adjust to use function_view as callback
10316 type.
10317 (symbol_found_callback_ftype): Remove 'data' parameter and return
10318 bool.
10319 (iterate_over_symbols): Adjust to use function_view as callback
10320 type.
10321
07e253aa
PA
103222017-02-23 Pedro Alves <palves@redhat.com>
10323
10324 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10325 (%.o) <unittests/%.c>: New pattern.
10326 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10327 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10328 * common/function-view.h: New file.
10329 * unittests/function-view-selftests.c: New file.
10330 * configure: Regenerate.
10331
8eaf5320
SM
103322017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10333
10334 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10335 inferior_ptid.
10336 * go32-nat.c (go32_thread_alive): Likewise.
10337
38768751
YQ
103382017-02-23 Yao Qi <yao.qi@linaro.org>
10339
10340 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10341 delete.
10342
0a8beaba
YQ
103432017-02-23 Yao Qi <yao.qi@linaro.org>
10344
10345 * varobj.c (varobj_clear_saved_item): Use delete instead of
10346 xfree.
10347 (update_dynamic_varobj_children): Likewise.
10348
58fdfd2c
JK
103492017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10350
10351 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10352
1b90b139
SM
103532017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10354
10355 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10356 m_enum_value to 0 in default constructor.
10357
2039d74e
EBM
103582017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10359
10360 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10361 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10362 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10363 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10364 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10365 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10366 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10367 IS_STORE_CONDITIONAL_INSN.
10368
7814882a
JK
103692017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10370
10371 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10372
0ae60b63
JK
103732017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10374
10375 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10376
0224619f
JK
103772017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10378
10379 * dwarf2read.c (skip_one_die, read_attribute_value)
10380 (dwarf2_const_value_attr, dump_die_shallow)
10381 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10382 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10383
0af92d60
JK
103842017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10385
10386 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10387 (dwarf_parse_macro_header): Accept DWARF version 5.
10388 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10389
216f72a1
JK
103902017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10391
10392 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10393 DW_AT_GNU_*.
10394 * common/common-exceptions.h (enum errors): Likewise.
10395 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10396 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10397 (dwarf_expr_context::execute_stack_op): Likewise.
10398 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10399 Likewise.
10400 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10401 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10402 (show_entry_values_debug, call_site_to_target_addr)
10403 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10404 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10405 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10406 (value_of_dwarf_block_entry, indirect_pieced_value)
10407 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10408 (disassemble_dwarf_expression): Likewise.
10409 * dwarf2read.c (process_die, inherit_abstract_dies)
10410 (read_call_site_scope): Likewise.
10411 * gdbtypes.h (struct func_type, struct call_site_parameter)
10412 (struct call_site): Likewise.
10413 * stack.c (read_frame_arg): Likewise.
10414 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10415
43988095
JK
104162017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10417
10418 * defs.h (read_unsigned_leb128): New declaration.
10419 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10420 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10421 (dwarf2_find_location_expression): Call also
10422 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10423 * dwarf2loc.h (dwarf2_version): New declaration.
10424 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10425 rnglists.
10426 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10427 .debug_rnglists.
10428 (struct dwop_section_names): Add loclists_dwo.
10429 (dwop_section_names): Add .debug_loclists.dwo.
10430 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10431 (struct dwarf2_per_cu_data): Add dwarf_version.
10432 (struct dwo_sections): Add loclists.
10433 (struct attr_abbrev): Add implicit_const.
10434 (read_indirect_line_string): New declaration.
10435 (read_unsigned_leb128): Delete declaration.
10436 (rcuh_kind): New definition.
10437 (read_and_check_comp_unit_head): Change parameter
10438 is_debug_types_section to section_kind.
10439 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10440 (read_comp_unit_head): Change parameter abfd to section, add parameter
10441 section_kind. Handle DWARF-5.
10442 (error_check_comp_unit_head): Accept also DWARF version 5.
10443 (read_and_check_comp_unit_head): Change parameter
10444 is_debug_types_section to section_kind.
10445 (read_and_check_type_unit_head): Delete function.
10446 (read_abbrev_offset): Handle DWARF-5.
10447 (create_debug_type_hash_table): Add parameter section_kind. Process
10448 only DW_UT_type. Use signature and type_offset_in_tu from struct
10449 comp_unit_head.
10450 (create_debug_types_hash_table): Update create_debug_type_hash_table
10451 caller.
10452 (create_all_type_units): Call create_debug_type_hash_table.
10453 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10454 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10455 caller.
10456 (skip_one_die): Handle DW_FORM_implicit_const.
10457 (dwarf2_rnglists_process): New function.
10458 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10459 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10460 (read_attribute_value): Handle DW_FORM_implicit_const,
10461 DW_FORM_line_strp.
10462 (read_attribute): Handle DW_FORM_implicit_const.
10463 (read_indirect_string_at_offset_from): New function from
10464 read_indirect_string_at_offset.
10465 (read_indirect_string_at_offset): Call
10466 read_indirect_string_at_offset_from.
10467 (read_indirect_line_string_at_offset): New function.
10468 (read_indirect_string): New function comment.
10469 (read_indirect_line_string): New function.
10470 (read_unsigned_leb128): Make it global.
10471 (dwarf2_string_attr): Handle DWARF-5.
10472 (add_include_dir_stub, read_formatted_entries): New functions.
10473 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10474 Handle DWARF-5.
10475 (per_cu_header_read_in): Update read_comp_unit_head caller.
10476 (dwarf2_version): New function.
10477 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10478 rnglists.
10479 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10480 fields.
10481
22d2f3ab
JK
104822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10483
10484 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10485
5f46c5a5
JK
104862017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10487
10488 * dwarf2read.c (dwarf2_ranges_process): New function from
10489 dwarf2_ranges_read.
10490 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10491 dwarf2_ranges_process.
10492
78d4d2c5
JK
104932017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10494
10495 * dwarf2read.c (create_debug_type_hash_table): New function from
10496 create_debug_types_hash_table.
10497 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10498 (create_all_type_units, open_and_init_dwo_file): Update
10499 create_debug_types_hash_table callers.
10500
1b076f25
SDJ
105012017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10502
10503 PR gdb/16188
10504 * fork-child.c (trace_start_error): Fix thinko. va_end should
10505 refer to 'ap', not 'args'.
10506
0db8980c
SDJ
105072017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10508 Pedro Alves <palves@redhat.com>
10509
10510 PR gdb/16188
10511 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10512 calls succeeded.
10513 * fork-child.c (trace_start_error): New function.
10514 (trace_start_error_with_name): Likewise.
10515 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10516 * inf-ptrace.c (inf_ptrace_me): Likewise.
10517 * inferior.h (trace_start_error): New prototype.
10518 (trace_start_error_with_name): Likewise.
10519
99e8a4f9
SDJ
105202017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10521
10522 PR gdb/21164
10523 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10524 NULL before using it.
10525 * symmisc.c (maintenance_print_symbols): Likewise.
10526 (maintenance_print_msymbols): Likewise.
10527
4e746bb6
TW
105282017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10529
10530 * NEWS: Add record Python bindings entry.
10531
105322017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10533
10534 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10535 py-record-full.o.
10536 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10537 * python/py-record-btrace.c, python/py-record-btrace.h,
10538 python/py-record-full.c, python/py-record-full.h: New file.
10539 * python/py-record.c: Add include for py-record-btrace.h and
10540 py-record-full.h.
10541 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10542 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10543 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10544 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10545 New definition.
10546 (gdbpy_initialize_btrace): New export.
10547 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10548
105492017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10550
10551 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10552 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10553 * python/py-record.c: New file.
10554 * python/python-internal.h (gdbpy_start_recording,
10555 gdbpy_current_recording, gdpy_stop_recording,
10556 gdbpy_initialize_record): New export.
10557 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10558 (python_GdbMethods): Add gdbpy_start_recording,
10559 gdbpy_current_recording and gdbpy_stop_recording.
10560
105612017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10562
10563 * record-btrace.c (record_btrace_record_method): New function.
10564 (init_record_btrace_ops): Initialize to_record_method.
10565 * record-full.c (record_full_record_method): New function.
10566 (init_record_full_ops, init_record_full_core_ops): Add
10567 record_full_record_method.
10568 * record.h (enum record_method): New enum.
10569 * target-debug.h (target_debug_print_enum_record_method: New define.
10570 * target-delegates.c: Regenerate.
10571 * target.c (target_record_method): New function.
10572 * target.h: Include record.h.
10573 (struct target_ops) <to_record_method>: New field.
10574 (target_record_method): New export.
10575
105762017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10577
10578 * record.h (record_start, record_stop): New export.
10579 * record.c (record_start, record_stop): New function.
10580
105812017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10582
10583 * btrace.c (btrace_fetch): Copy function call segments pointer
10584 into a vector.
10585 (btrace_clear): Clear the vector.
10586 (btrace_find_insn_by_number): Use binary search to find the correct
10587 function call segment.
10588 * btrace.h (brace_fun_p): New typedef.
10589 (struct btrace_thread_info) <functions>: New field.
10590
105912017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10592
10593 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10594 * btrace.c (btrace_decode_error): ... here. New function.
10595 * btrace.h (btrace_decode_error): New export.
10596
105972017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10598
10599 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10600 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10601 btrace_find_insn_by_number): Remove special case for gaps.
10602 * btrace.h (btrace_insn_get_error): New export.
10603 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10604 * record-btrace.c (btrace_insn_history): Print number for gaps.
10605 (record_btrace_info, record_btrace_goto): Handle gaps.
10606
3f77c769
TT
106072017-02-14 Tom Tromey <tom@tromey.com>
10608
10609 PR python/13598:
10610 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10611 event.
10612 * python/py-evts.c (gdbpy_initialize_py_events): Add
10613 before_prompt registry.
10614 * python/py-events.h (events_object) <before_prompt>: New field.
10615
4c2c7ac6
MM
106162017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10617
10618 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10619
5cf30ebf
LM
106202017-02-13 Luis Machado <lgustavo@codesourcery.com>
10621
10622 * symfile (_initialize_symfile): Add usage text to the load command's
10623 help text.
10624
26a06916
SM
106252017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10626
10627 * utils.c (defaulted_query): Don't query on secondary UIs.
10628
0b145e37
TT
106292017-02-10 Tom Tromey <tom@tromey.com>
10630
10631 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10632
2d8365c4
TT
106332017-02-10 Tom Tromey <tom@tromey.com>
10634
10635 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10636 "cleanup" local.
10637 * python/py-type.c (typy_legacy_template_argument): Remove
10638 unnecessary "cleanup" local.
10639
2bb8f231
TT
106402017-02-10 Tom Tromey <tom@tromey.com>
10641
10642 * python/python.c (do_start_initialization): New function, from
10643 _initialize_python.
10644 (_initialize_python): Call do_start_initialization.
10645 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10646 goto.
10647
1bdfaf42
TT
106482017-02-10 Tom Tromey <tom@tromey.com>
10649
10650 * python/py-prettyprint.c (pretty_print_one_value): Use
10651 gdbpy_ref.
10652
88b6faea
TT
106532017-02-10 Tom Tromey <tom@tromey.com>
10654
10655 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10656 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10657 gdbpy_ref.
10658 * python/py-type.c (field_new): Use gdbpy_ref.
10659 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10660 gdbpy_ref.
10661 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10662 (py_free_pspace): Likewise.
10663 (pspace_to_pspace_object): Likewise.
10664 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10665 (py_free_objfile): Likewise.
10666 (objfile_to_objfile_object): Likewise.
10667 * python/py-inferior.c (delete_thread_object): Use
10668 gdbpy_ref.
10669 (infpy_read_memory): Likewise.
10670 (py_free_inferior): Likewise.
10671 * python/py-evtregistry.c (create_eventregistry_object): Use
10672 gdbpy_ref.
10673 * python/py-event.c (create_event_object): Use gdbpy_ref.
10674
7780f186
TT
106752017-02-10 Tom Tromey <tom@tromey.com>
10676
10677 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10678 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10679 used.
10680 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10681 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10682 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10683 python/py-framefilter.c, python/py-function.c,
10684 python/py-inferior.c, python/py-infevents.c,
10685 python/py-linetable.c, python/py-newobjfileevent.c,
10686 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10687 python/py-signalevent.c, python/py-stopevent.c,
10688 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10689 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10690 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10691 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10692
d4b0bb18
TT
106932017-02-10 Tom Tromey <tom@tromey.com>
10694
10695 * ui-out.h (ui_out_emit_type): New class.
10696 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10697 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10698 and ui_out_emit_tuple.
10699 (enumerate_locals): Likewise.
10700 (py_mi_print_variables, py_print_locals, py_print_args): Use
10701 ui_out_emit_list.
10702 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10703 ui_out_emit_list.
10704 * common/gdb_optional.h: New file.
10705
f67f945c
MG
107062017-02-10 Martin Galvan <martingalvan@sourceware.org>
10707
10708 * MAINTAINERS (Write After Approval): Update my e-mail address.
10709
18da0c51
MG
107102017-02-10 Martin Galvan <martingalvan@sourceware.org>
10711
10712 PR gdb/21122
10713 * breakpoint.c (_initialize_breakpoint): Update the help description
10714 of the 'commands' command to indicate that it takes a list argument.
10715
62c14536
SM
107162017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10717
10718 * interps.c (current_interp_set_logging): Remove "return".
10719
ff6fa247
GB
107202017-02-09 Gary Benson <gbenson@redhat.com>
10721
10722 * symtab.c (add_symtab_completions): Prevent NULL pointer
10723 dereference.
10724
a474bd8e
PA
107252017-02-08 Pedro Alves <palves@redhat.com>
10726
10727 * interps.c (interp::interp): Remove reference to quiet_p.
10728 (interp_set): Make static. Remove dead "Switching to" output
10729 code.
10730 (interp_quiet_p, interp_set_quiet): Delete.
10731 (interpreter_exec_cmd): Don't set the interpreter quiet.
10732 * interps.h (interp_quiet_p): Make static.
10733 (class interp) <quiet_p>: Remove field
10734
3d7b173c
JG
107352017-02-08 Jerome Guitton <guitton@adacore.com>
10736
604c4576
JG
10737 * cli/cli-decode.c (find_command_name_length): Make it extern.
10738 * cli/cli-decode.h (find_command_name_length): Declare.
10739 * cli/cli-script.c (command_name_equals, line_first_arg):
10740 New functions.
10741 (process_next_line): Use cli-decode to parse command names.
10742 (build_command_line): Make args a constant pointer.
10743
107442017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10745
3d7b173c
JG
10746 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10747 Remove case-insensitive search.
10748
1291063d
JM
107492017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10750
10751 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10752 at the end of the line. Avoids an ARI warning.
10753
20b477a7
LM
107542017-02-06 Luis Machado <lgustavo@codesourcery.com>
10755
10756 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10757 rdseed instructions.
10758 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10759
3f7b46f2
IR
107602017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10761
10762 PR tdep/20936
10763 Provide and use sparc32 and sparc64 target description XML files.
10764 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10765 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10766 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10767 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10768 * features/sparc/sparc32-solaris.xml: New file.
10769 * features/sparc/sparc64-solaris.xml: New file.
10770 * features/sparc/sparc32-solaris.c: Generated.
10771 * features/sparc/sparc64-solaris.c: Generated.
10772 * sparc-tdep.h: Account for differences in target descriptions.
10773 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10774 (sparc32_register_type): Use target provided registers.
10775 (validate_tdesc_registers): New function.
10776 (sparc32_gdbarch_init): Use tdesc_has_registers.
10777 Set pseudoregister functions.
10778 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10779 (sparc64_register_type): Use target provided registers.
10780 (sparc64_init_abi): Set pseudoregister functions.
10781
f0fd41c1
TT
107822017-02-03 Tom Tromey <tom@tromey.com>
10783
10784 PR rust/21097:
10785 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10786 with a single member.
10787
d6f9b0fb
PA
107882017-02-03 Pedro Alves <palves@redhat.com>
10789
10790 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10791 (cli_interp_base::~cli_interp_base): New.
10792 (cli_interp): New struct.
10793 (as_cli_interp): Cast the interp itself to cli_interp.
10794 (cli_interpreter_pre_command_loop): Rename to ...
10795 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10796 parameter.
10797 (cli_interpreter_init): Rename to ...
10798 (cli_interp::init): ... this. Remove 'self' parameter. Use
10799 boolean. Make extern.
10800 (cli_interpreter_resume): Rename to ...
10801 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10802 extern.
10803 (cli_interpreter_suspend): Rename to ...
10804 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10805 extern.
10806 (cli_interpreter_exec): Rename to ...
10807 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10808 extern.
10809 (cli_interpreter_supports_command_editing): Rename to ...
10810 (cli_interp_base::supports_command_editing): ... this. Remove
10811 'interp' parameter. Make extern.
10812 (cli_ui_out): Rename to ...
10813 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10814 Make extern.
10815 (cli_set_logging): Rename to ...
10816 (cli_interp_base::set_logging): ... this. Remove 'interp'
10817 parameter. Make extern.
10818 (cli_interp_procs): Delete.
10819 (cli_interp_factory): Adjust to use "new".
10820 * cli/cli-interp.h: Include "interps.h".
10821 (struct cli_interp_base): New struct.
10822 * interps.c (struct interp): Delete. Fields moved to interps.h.
10823 (interp_new): Delete.
10824 (interp::interp, interp::~interp): New.
10825 (interp_set): Use bool, and return void. Assume the interpreter
10826 has suspend, init and resume methods, and that the all return
10827 void.
10828 (set_top_level_interpreter): interp_set returns void.
10829 (interp_ui_out): Adapt.
10830 (current_interp_set_logging): Adapt.
10831 (interp_data): Delete.
10832 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10833 (interp_exec): Adapt.
10834 (top_level_interpreter_data): Delete.
10835 * interps.h (interp_init_ftype, interp_resume_ftype)
10836 (interp_suspend_ftype, interp_exec_ftype)
10837 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10838 (class interp): New.
10839 (interp_new): Delete.
10840 (interp_set): Now returns void. Use bool.
10841 (interp_data, top_level_interpreter_data): Delete.
10842 * mi/mi-common.h: Include interps.h.
10843 (class mi_interp): Inherit from interp. Define a ctor. Declare
10844 init, resume, suspect, exec, interp_ui_out, set_logging and
10845 pre_command_loop methods.
10846 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10847 (mi_interpreter_init): Rename to ...
10848 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10849 bool, return void and make extern. Adjust.
10850 (mi_interpreter_resume): ... Rename to ...
10851 (mi_interp::resume): ... this. Remove the 'data' parameter,
10852 return void and make extern. Adjust.
10853 (mi_interpreter_suspend): ... Rename to ...
10854 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10855 return void and make extern. Adjust.
10856 (mi_interpreter_exec): ... Rename to ...
10857 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10858 extern. Adjust.
10859 (mi_interpreter_pre_command_loop): ... Rename to ...
10860 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10861 parameter and make extern.
10862 (mi_on_normal_stop_1): Adjust.
10863 (mi_ui_out): Rename to ...
10864 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10865 parameter and make extern. Adjust.
10866 (mi_set_logging): Rename to ...
10867 (mi_interp::set_logging): ... this. Remove the 'interp'
10868 parameter and make extern. Adjust.
10869 (mi_interp_procs): Delete.
10870 (mi_interp_factory): Adjust to use 'new'.
10871 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10872 (mi_print_exception, mi_execute_command, mi_load_progress):
10873 Adjust.
10874 * tui/tui-interp.c (tui_interp): New class.
10875 (as_tui_interp): Return a tui_interp pointer.
10876 (tui_on_normal_stop, tui_on_signal_received)
10877 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10878 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10879 to use interp::interp_ui_out.
10880 (tui_init): Rename to ...
10881 (tui_interp::init): ... this. Remove the 'self' parameter, use
10882 bool, return void and make extern. Adjust.
10883 (tui_resume): Rename to ...
10884 (tui_interp::resume): ... this. Remove the 'data' parameter,
10885 return void and make extern. Adjust.
10886 (tui_suspend): Rename to ...
10887 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10888 return void and make extern. Adjust.
10889 (tui_ui_out): Rename to ...
10890 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10891 parameter, and make extern. Adjust.
10892 (tui_exec): Rename to ...
10893 (tui_interp::exec): ... this. Remove the 'data' parameter and
10894 make extern.
10895 (tui_interp_procs): Delete.
10896 (tui_interp_factory): Use "new".
10897
65c40c95
TT
108982017-02-02 Tom Tromey <tom@tromey.com>
10899
10900 * rust-exp.y (ends_raw_string, space_then_number)
10901 (rust_identifier_start_p): Return bool.
10902 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10903 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10904 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10905 (rust_chartype_p): Return bool.
10906 (val_print_struct, rust_print_struct_def, rust_print_type):
10907 Update.
10908 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10909 Return bool.
10910
b50f188d
TT
109112017-02-02 Tom Tromey <tom@tromey.com>
10912
10913 * rust-lang.c: Reindent.
10914
03c85b11
TT
109152017-02-02 Tom Tromey <tom@tromey.com>
10916
10917 * rust-lang.h (rust_crate_for_block): Update.
10918 * rust-lang.c (rust_crate_for_block): Return std::string.
10919 (rust_get_disr_info): Use std:;string, not
10920 gdb::unique_xmalloc_ptr.
10921 * rust-exp.y (crate_name): Update.
10922
9b6da501
PA
109232017-02-02 Pedro Alves <palves@redhat.com>
10924
10925 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10926 field out of gdb_disassembler_test and make it static.
10927
ec4cb20b
PA
109282017-02-02 Pedro Alves <palves@redhat.com>
10929
10930 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10931 mi1_interp and mi_interp fields.
10932
5be5dbf0
PA
109332017-02-02 Pedro Alves <palves@redhat.com>
10934
616268b6
PA
10935 * cli/cli-interp.c (struct saved_output_files, saved_output):
10936 Moved from cli/cli-logging.c.
10937 (cli_set_logging): New function.
10938 (cli_interp_procs): Install cli_set_logging.
10939 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10940 Declare.
10941 * cli/cli-logging.c (struct saved_output_files, saved_output):
10942 Moved to cli/cli-interp.c.
10943 (pop_output_files): Don't save outputs here.
10944 (make_logging_output): New function.
10945 (handle_redirections): Don't build tee nor save previous outputs
10946 here.
10947 * interps.c (current_interp_set_logging): Change prototype.
10948 Assume there's always a set_logging_proc method installed.
10949 * interps.h (interp_set_logging_ftype): Change prototype.
10950 (current_interp_set_logging): Change prototype and adjust comment.
10951 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10952 use make_logging_output.
10953 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
109542017-02-02 Pedro Alves <palves@redhat.com>
10955
5be5dbf0
PA
10956 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10957 from ...
10958 (set_logging_overwrite): ... here.
10959 (logging_no_redirect_file): Delete.
10960 (set_logging_redirect): Don't handle redirection on the fly.
10961 Instead warn that "logging off" / "logging on" is necessary.
10962 (pop_output_files): Delete references to logging_no_redirect_file.
10963 (show_logging_command): Always speak in terms of what will happen
10964 once logging is reenabled.
10965
c99cc448
PA
109662017-02-02 Pedro Alves <palves@redhat.com>
10967
10968 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10969
8b172ce7
PA
109702017-02-02 Pedro Alves <palves@redhat.com>
10971
10972 * disasm.c (gdb_pretty_print_insn): Rename to ...
10973 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10974 Remove gdbarch parameter. Adapt to clear the object's buffers
10975 instead of allocating new buffers, and to print using the object's
10976 gdb_disassembler instead of calling gdb_print_insn.
10977 (dump_insns): Use gdb_pretty_print_disassembler.
10978 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10979 (gdb_pretty_print_disassembler): New class.
10980 * record-btrace.c (btrace_insn_history): Use
10981 gdb_pretty_print_disassembler.
10982
d7e74731
PA
109832017-02-02 Pedro Alves <palves@redhat.com>
10984
10985 * ada-lang.c (type_as_string): Use string_file.
10986 * ada-valprint.c (ada_print_floating): Use string_file.
10987 * ada-varobj.c (ada_varobj_scalar_image)
10988 (ada_varobj_get_value_image): Use string_file.
10989 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10990 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10991 * breakpoint.c (update_inserted_breakpoint_locations)
10992 (insert_breakpoint_locations, reattach_breakpoints)
10993 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10994 (print_it_watchpoint): Use string_file.
10995 (save_breakpoints): Use stdio_file.
10996 * c-exp.y (oper): Use string_file.
10997 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10998 tee_file.
10999 (pop_output_files): Use delete.
11000 (handle_redirections): Use stdio_file and tee_file.
11001 * cli/cli-setshow.c (do_show_command): Use string_file.
11002 * compile/compile-c-support.c (c_compute_program): Use
11003 string_file.
11004 * compile/compile-c-symbols.c (generate_vla_size): Take a
11005 'string_file &' instead of a 'ui_file *'.
11006 (generate_c_for_for_one_variable): Take a 'string_file &' instead
11007 of a 'ui_file *'. Use string_file.
11008 (generate_c_for_variable_locations): Take a 'string_file &'
11009 instead of a 'ui_file *'.
11010 * compile/compile-internal.h (generate_c_for_for_one_variable):
11011 Take a 'string_file &' instead of a 'ui_file *'.
11012 * compile/compile-loc2c.c (push, pushf, unary, binary)
11013 (print_label, pushf_register_address, pushf_register)
11014 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11015 'ui_file *'. Adjust.
11016 * compile/compile.c (compile_to_object): Use string_file.
11017 * compile/compile.h (compile_dwarf_expr_to_c)
11018 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11019 'ui_file *'.
11020 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11021 (replace_typedefs_qualified_name): Use string_file and
11022 obstack_copy0.
11023 * disasm.c (gdb_pretty_print_insn): Use string_file.
11024 (gdb_disassembly): Adjust reference the null_stream global.
11025 (do_ui_file_delete): Delete.
11026 (gdb_insn_length): Use null_stream.
11027 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11028 * dwarf2loc.c (dwarf2_compile_property_to_c)
11029 (locexpr_generate_c_location, loclist_generate_c_location): Take a
11030 'string_file &' instead of a 'ui_file *'.
11031 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11032 * dwarf2read.c (do_ui_file_peek_last): Delete.
11033 (dwarf2_compute_name): Use string_file.
11034 * event-top.c (gdb_setup_readline): Use stdio_file.
11035 * gdbarch.sh (verify_gdbarch): Use string_file.
11036 * gdbtypes.c (safe_parse_type): Use null_stream.
11037 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11038 string_file.
11039 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11040 'string_file *' instead of a 'ui_file *'.
11041 (gdbscm_arch_disassemble): Use string_file.
11042 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11043 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11044 inherits from ui_file.
11045 (ioscm_file_port_delete, ioscm_file_port_rewind)
11046 (ioscm_file_port_put): Delete.
11047 (ioscm_file_port_write): Rename to ...
11048 (ioscm_file_port::write): ... this. Remove file_port_magic
11049 checks.
11050 (ioscm_file_port_new): Delete.
11051 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11052 ui_file_up.
11053 * guile/scm-type.c (tyscm_type_name): Use string_file.
11054 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11055 Use string_file.
11056 * infcmd.c (print_return_value_1): Use string_file.
11057 * infrun.c (print_target_wait_results): Use string_file.
11058 * language.c (add_language): Use string_file.
11059 * location.c (explicit_to_string_internal): Use string_file.
11060 * main.c (captured_main_1): Use null_file.
11061 * maint.c (maintenance_print_architecture): Use stdio_file.
11062 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11063 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11064 event_channel>: Change type to mi_console_file pointer.
11065 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11066 (mi_console_file_delete): Delete.
11067 (struct mi_console_file): Delete.
11068 (mi_console_file_magic): Delete.
11069 (mi_console_file_new): Delete.
11070 (mi_console_file::mi_console_file): New.
11071 (mi_console_file_delete): Delete.
11072 (mi_console_file_fputs): Delete.
11073 (mi_console_file::write): New.
11074 (mi_console_raw_packet): Delete.
11075 (mi_console_file::flush): New.
11076 (mi_console_file_flush): Delete.
11077 (mi_console_set_raw): Rename to ...
11078 (mi_console_file::set_raw): ... this.
11079 * mi/mi-console.h (class mi_console_file): New class.
11080 (mi_console_file_new, mi_console_set_raw): Delete.
11081 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11082 (mi_set_logging): Use delete and tee_file. Adjust.
11083 * mi/mi-main.c (output_register): Use string_file.
11084 (mi_cmd_data_evaluate_expression): Use string_file.
11085 (mi_cmd_data_read_memory): Use string_file.
11086 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11087 * mi/mi-out.c (mi_ui_out::main_stream): New.
11088 (mi_ui_out::rewind): Use main_stream and
11089 string_file.
11090 (mi_ui_out::put): Use main_stream and string_file.
11091 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11092 Allocate a 'string_file' instead.
11093 (mi_out_new): Don't allocate a mem_fileopen stream here.
11094 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11095 (mi_ui_out::main_stream): Declare method.
11096 * printcmd.c (eval_command): Use string_file.
11097 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11098 * python/py-arch.c (archpy_disassemble): Use string_file.
11099 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11100 * python/py-frame.c (frapy_str): Use string_file.
11101 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11102 Use string_file.
11103 * python/py-type.c (typy_str): Use string_file.
11104 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11105 * python/py-value.c (valpy_str): Use string_file.
11106 * record-btrace.c (btrace_insn_history): Use string_file.
11107 * regcache.c (regcache_print): Use stdio_file.
11108 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11109 * remote.c (escape_buffer): Use string_file.
11110 * rust-lang.c (rust_get_disr_info): Use string_file.
11111 * serial.c (serial_open_ops_1): Use stdio_file.
11112 (do_serial_close): Use delete.
11113 * stack.c (print_frame_arg): Use string_file.
11114 (print_frame_args): Remove local mem_fileopen stream, not used.
11115 (print_frame): Use string_file.
11116 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11117 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11118 Take a 'string_file *' instead of a 'ui_file *'.
11119 * top.c (new_ui): Use stdio_file and stderr_file.
11120 (free_ui): Use delete.
11121 (execute_command_to_string): Use string_file.
11122 (quit_confirm): Use string_file.
11123 * tracepoint.c (collection_list::append_exp): Use string_file.
11124 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11125 * tui/tui-file.c: Don't include "ui-file.h".
11126 (enum streamtype, struct tui_stream): Delete.
11127 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11128 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11129 (tui_file::tui_file): New method.
11130 (tui_file_fputs): Delete.
11131 (tui_file_get_strbuf): Delete.
11132 (tui_file::puts): New method.
11133 (tui_file_adjust_strbuf): Delete.
11134 (tui_file_flush): Delete.
11135 (tui_file::flush): New method.
11136 * tui/tui-file.h: Tweak intro comment.
11137 Include ui-file.h.
11138 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11139 (tui_file_adjust_strbuf): Delete declarations.
11140 (class tui_file): New class.
11141 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11142 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11143 (tui_register_format): Use string_stream.
11144 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11145 (tui_get_function_from_frame): Use string_file.
11146 * typeprint.c (type_to_string): Use string_file.
11147 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11148 (null_stream): New global.
11149 (ui_file_delete): Delete.
11150 (ui_file::ui_file): New.
11151 (null_file_isatty): Delete.
11152 (ui_file::~ui_file): New.
11153 (null_file_rewind): Delete.
11154 (ui_file::printf): New.
11155 (null_file_put): Delete.
11156 (null_file_flush): Delete.
11157 (ui_file::putstr): New.
11158 (null_file_write): Delete.
11159 (ui_file::putstrn): New.
11160 (null_file_read): Delete.
11161 (ui_file::putc): New.
11162 (null_file_fputs): Delete.
11163 (null_file_write_async_safe): Delete.
11164 (ui_file::vprintf): New.
11165 (null_file_delete): Delete.
11166 (null_file::write): New.
11167 (null_file_fseek): Delete.
11168 (null_file::puts): New.
11169 (ui_file_data): Delete.
11170 (null_file::write_async_safe): New.
11171 (gdb_flush, ui_file_isatty): Adjust.
11172 (ui_file_put, ui_file_rewind): Delete.
11173 (ui_file_write): Adjust.
11174 (ui_file_write_for_put): Delete.
11175 (ui_file_write_async_safe, ui_file_read): Adjust.
11176 (ui_file_fseek): Delete.
11177 (fputs_unfiltered): Adjust.
11178 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11179 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11180 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11181 (set_ui_file_data): Delete.
11182 (string_file::~string_file, string_file::write)
11183 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11184 (do_ui_file_as_string, ui_file_as_string): Delete.
11185 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11186 (struct mem_file): Delete.
11187 (mem_file_new): Delete.
11188 (stdio_file::stdio_file): New.
11189 (mem_file_delete): Delete.
11190 (stdio_file::stdio_file): New.
11191 (mem_fileopen): Delete.
11192 (stdio_file::~stdio_file): New.
11193 (mem_file_rewind): Delete.
11194 (stdio_file::set_stream): New.
11195 (mem_file_put): Delete.
11196 (stdio_file::open): New.
11197 (mem_file_write): Delete.
11198 (stdio_file_magic, struct stdio_file): Delete.
11199 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11200 (stdio_file::flush): New.
11201 (stdio_file_read): Rename to ...
11202 (stdio_file::read): ... this. Adjust.
11203 (stdio_file_write): Rename to ...
11204 (stdio_file::write): ... this. Adjust.
11205 (stdio_file_write_async_safe): Rename to ...
11206 (stdio_file::write_async_safe) ... this. Adjust.
11207 (stdio_file_fputs): Rename to ...
11208 (stdio_file::puts) ... this. Adjust.
11209 (stdio_file_isatty): Delete.
11210 (stdio_file_fseek): Delete.
11211 (stdio_file::isatty): New.
11212 (stderr_file_write): Rename to ...
11213 (stderr_file::write) ... this. Adjust.
11214 (stderr_file_fputs): Rename to ...
11215 (stderr_file::puts) ... this. Adjust.
11216 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11217 (stderr_file::stderr_file): New.
11218 (tee_file_magic): Delete.
11219 (struct tee_file): Delete.
11220 (tee_file::tee_file): New.
11221 (tee_file_new): Delete.
11222 (tee_file::~tee_file): New.
11223 (tee_file_delete): Delete.
11224 (tee_file_flush): Rename to ...
11225 (tee_file::flush): ... this. Adjust.
11226 (tee_file_write): Rename to ...
11227 (tee_file::write): ... this. Adjust.
11228 (tee_file::write_async_safe): New.
11229 (tee_file_fputs): Rename to ...
11230 (tee_file::puts): ... this. Adjust.
11231 (tee_file_isatty): Rename to ...
11232 (tee_file::isatty): ... this. Adjust.
11233 * ui-file.h (struct obstack, struct ui_file): Don't
11234 forward-declare.
11235 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11236 (ui_file_write_ftype)
11237 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11238 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11239 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11240 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11241 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11242 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11243 (set_ui_file_fseek): Delete.
11244 (ui_file_data, ui_file_delete, ui_file_rewind)
11245 (struct ui_file): New.
11246 (ui_file_up): New.
11247 (class null_file): New.
11248 (null_stream): Declare.
11249 (ui_file_write_for_put, ui_file_put): Delete.
11250 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11251 Delete.
11252 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11253 (gdb_fopen, tee_file_new): Delete.
11254 (struct string_file): New.
11255 (struct stdio_file): New.
11256 (stdio_file_up): New.
11257 (struct stderr_file): New.
11258 (class tee_file): New.
11259 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11260 of a 'ui_file *'. Adjust.
11261 * ui-out.h (class ui_out) <field_stream>: Likewise.
11262 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11263 (null_stream): Delete.
11264 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11265 Adjust.
11266 * utils.h (struct ui_file): Delete forward declaration..
11267 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11268 (error_stream): Take a 'string_file &' instead of a
11269 'ui_file *'.
11270 * varobj.c (varobj_value_get_print_value): Use string_file.
11271 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11272 * gdbarch.c: Regenerate.
11273
187808b0
PA
112742017-02-02 Pedro Alves <palves@redhat.com>
11275
11276 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11277 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11278 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11279 Adjust to call gdb_print_insn instead of
11280 gdb_disassembler::print_insn.
11281 (dump_insns, do_mixed_source_and_assembly_deprecated)
11282 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11283 'gdbarch' parameter. Remove gdb_disassembler parameter.
11284 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11285 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11286 declaration.
11287 (gdb_pretty_print_insn): Re-add declaration.
11288 * record-btrace.c (btrace_insn_history): Don't allocate a
11289 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11290
7a8eb317
SM
112912017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11292
11293 * disasm.h (gdb_disassembly): Remove file_string parameter.
11294 * disasm.c (gdb_disassembly): Likewise.
11295 * cli/cli-cmds.c (print_disassembly): Adapt.
11296 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11297 * stack.c (do_gdb_disassembly): Likewise.
11298
7346ef59
AA
112992017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11300
11301 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11302 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11303 targets. And if the implicit value is longer than needed, extract
11304 the first bytes instead of the "least significant" ones.
11305
cd4007e4
MM
113062017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11307
11308 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11309 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11310 (btrace_fetch): Assert can_access_registers_ptid.
11311 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11312 validate_registers_access.
11313
cf77c34e
MM
113142017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11315
11316 * gdbthread.h (can_access_registers_ptid): New.
11317 * thread.c (can_access_registers_ptid): New.
11318
be85ce7d
PA
113192017-02-01 Pedro Alves <palves@redhat.com>
11320
11321 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11322
29b0b251
PA
113232017-01-31 Pedro Alves <palves@redhat.com>
11324
11325 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11326 Fix typos.
11327
289b5b24
PA
113282017-01-31 Pedro Alves <palves@redhat.com>
11329
11330 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11331 not used.
11332
b47413b4
PA
113332017-01-31 Pedro Alves <palves@redhat.com>
11334
11335 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11336
60adb36c
PA
113372017-01-31 Pedro Alves <palves@redhat.com>
11338
11339 * common/scoped_restore.h
11340 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11341 change the value's parameter type to T2.
11342 (make_scoped_restore): Likewise.
11343
2735833d
WT
113442017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11345 Richard Henderson <rth@redhat.com>
11346
11347 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11348 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11349 GS_BASE for older kernels.
11350 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11351 GS_BASE for older kernels.
11352 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11353 and GS_BASE to the offset table.
11354 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11355 system register group.
11356 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11357 for older kernels.
11358 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11359 amd64 ABI.
11360 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11361 AMD64_GSBASE_REGNUM.
11362 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11363 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11364 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11365 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11366 i386/64bit-segments.xml in those rules.
11367 * features/i386/64bit-segments.xml: New file.
11368 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11369 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11370 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11371 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11372 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11373 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11374 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11375 * features/i386/amd64-avx-linux.c: Regenerated.
11376 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11377 * features/i386/amd64-avx-mpx.c: Regenerated.
11378 * features/i386/amd64-avx512-linux.c: Regenerated.
11379 * features/i386/amd64-linux.c: Regenerated.
11380 * features/i386/amd64-mpx-linux.c: Regenerated.
11381 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11382 * features/i386/i386-avx-mpx.c: Regenerated.
11383 * features/i386/x32-avx-linux.c: Regenerated.
11384 * features/i386/x32-avx512-linux.c: Regenerated.
11385 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11386 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11387 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11388 * regformats/i386/amd64-linux.dat: Regenerated.
11389 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11390 * regformats/i386/x32-avx-linux.dat: Regenerated.
11391 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11392 * regformats/i386/x32-linux.dat: Regenerated.
11393
8884e97e
WT
113942017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11395
11396 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11397 Set to AMD64_NUM_REGS.
11398
7005d26a
WT
113992017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11400
11401 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11402 that checks validity of a register number.
11403
4bd2e1b2
KC
114042017-01-27 Kees Cook <keescook@google.com>
11405
11406 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11407 fetch_fpregs if target has fpa registers.
11408 (arm_linux_store_inferior_registers): Call store_fpregs if target
11409 has fpa registers.
11410
7cf1de6c
AA
114112017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11412
11413 * cris-tdep.c (cris_gdbarch_init): Remove check for
11414 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11415
874a1c8c
AT
114162017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11417
11418 * corelow.c (get_core_register_section): Check for regset
11419 existence before checking for REGSET_VARIABLE_SIZE.
11420
d8b49cf0
YQ
114212017-01-26 Yao Qi <yao.qi@linaro.org>
11422 Pedro Alves <palves@redhat.com>
11423
11424 PR gdb/20939
11425 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11426 call memory_error, save memaddr instead.
11427 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11428 negative, cal memory_error.
11429 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11430
658ca58c
YQ
114312017-01-26 Yao Qi <yao.qi@linaro.org>
11432
11433 * disasm-selftests.c (memory_error_test): New function.
11434 (_initialize_disasm_selftests): Register memory_error_test.
11435
79843d45
YQ
114362017-01-26 Yao Qi <yao.qi@linaro.org>
11437
11438 * Makefile.in (SFILES): Add disasm-selftests.c and
11439 selftest-arch.c.
11440 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11441 * disasm-selftests.c: New file.
11442 * selftest-arch.c: New file.
11443 * selftest-arch.h: New file.
11444
8cafda32
YQ
114452017-01-26 Yao Qi <yao.qi@linaro.org>
11446
11447 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11448 to bfd_arch_mep. Don't return 0 if section is not
11449 found. Call print_insn_mep.
11450
e47ad6c0
YQ
114512017-01-26 Pedro Alves <palves@redhat.com>
11452 Yao Qi <yao.qi@linaro.org>
11453
11454 * arm-tdep.c: Include "disasm.h".
11455 (gdb_print_insn_arm): Update code to get gdbarch.
11456 * disasm.c (dis_asm_read_memory): Change it to
11457 gdb_disassembler::dis_asm_read_memory.
11458 (dis_asm_memory_error): Likewise.
11459 (dis_asm_print_address): Likewise.
11460 (gdb_pretty_print_insn): Change it to
11461 gdb_disassembler::pretty_print_insn.
11462 (dump_insns): Add one argument gdb_disassemlber. All
11463 callers updated.
11464 (do_mixed_source_and_assembly_deprecated): Likewise.
11465 (do_mixed_source_and_assembly): Likewise.
11466 (do_assembly_only): Likewise.
11467 (gdb_disassembler::gdb_disassembler): New.
11468 (gdb_disassembler::print_insn): New.
11469 * disasm.h (class gdb_disassembler): New.
11470 (gdb_pretty_print_insn): Remove declaration.
11471 (gdb_disassemble_info): Likewise.
11472 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11473 (gdbscm_disasm_read_memory_worker): Update.
11474 (gdbscm_disasm_read_memory): Update.
11475 (gdbscm_disasm_memory_error): Remove.
11476 (gdbscm_disasm_print_address): Remove.
11477 (gdbscm_disassembler::gdbscm_disassembler): New.
11478 (gdbscm_print_insn_from_port): Update.
11479 * mips-tdep.c: Include disasm.h.
11480 (gdb_print_insn_mips): Update code to get gdbarch.
11481 * record-btrace.c (btrace_insn_history): Update.
11482 * spu-tdep.c: Include disasm.h.
11483 (struct spu_dis_asm_data): Remove.
11484 (struct spu_dis_asm_info): New.
11485 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11486 SPU id.
11487 (gdb_print_insn_spu): Cast disassemble_info to
11488 spu_dis_asm_info.
11489
80d75874
YQ
114902017-01-26 Yao Qi <yao.qi@linaro.org>
11491
11492 * disasm.c (do_ui_file_delete): Delete.
11493 (gdb_insn_length): Move code creating stream to ...
11494 * utils.c (null_stream): ... here. New function.
11495 * utils.h (null_stream): Declare.
11496
60685cd0
SM
114972017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11498
11499 * python/py-inferior.c (find_thread_object): Return directly
11500 from the loop. Remove "found" variable.
11501
eb1cdb62
JB
115022017-01-21 Joel Brobecker <brobecker@adacore.com>
11503
11504 GDB 7.12.1 released.
11505
b1ce6568
SM
115062017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11507
11508 * python/py-function.c (fnpy_call): Reorder declarations to have
11509 the gdbpy_enter object declared first.
11510 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11511
6f8b0407
SM
115122017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11513
fec93fb1 11514 PR python/21068
6f8b0407
SM
11515 * python/python-internal.h (PyMem_RawMalloc): Define for
11516 Python < 3.4.
11517 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11518 PyMem_RawMalloc instead of PyMem_Malloc.
11519
78cbbba8
LM
115202017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11521 Luis Machado <lgustavo@codesourcery.com>
11522
11523 * NEWS (New commands): Mention flash-erase.
11524 (New MI commands): Mention target-flash-erase.
11525 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11526 command.
11527 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11528 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11529 * target.c (flash_erase_command): New function.
11530 (initialize_targets): Add new flash-erase command.
11531 * target.h (flash_erase_command): New declaration.
11532
2132fe85
JB
115332017-01-20 Joel Brobecker <brobecker@adacore.com>
11534
11535 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11536 HAVE_SYS_PROCFS_H is defined.
11537
d1dff226
AH
115382017-01-18 Alan Hayward <alan.hayward@arm.com>
11539
11540 * remote.c (struct cached_reg): Change data into a pointer.
11541 * (stop_reply_dtr): Free data pointers before deleting vector.
11542 (process_stop_reply): Likewise.
11543 (remote_parse_stop_reply): Allocate space for data
11544
9890e433
AH
115452017-01-18 Alan Hayward <alan.hayward@arm.com>
11546
11547 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11548 MAX_REGISTER_SIZE.
11549 (amd64_pseudo_register_read_value): Likewise.
11550 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11551 (store_register_using_P): Likewise.
11552 * regcache.c (regcache_xfer_part): Likewise.
11553
7a36499a
IR
115542017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11555
11556 Split real and pseudo registers.
11557 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11558 (sparc32_pseudo_regnum): New enum.
11559 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11560 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11561 (SPARC32_CP0_REGISTERS): New macro.
11562 (sparc32_pseudo_register_name): New function.
11563 (sparc32_register_name): Use sparc32_pseudo_register_name.
11564 (sparc32_pseudo_register_type): New function.
11565 (sparc32_register_type): Use sparc32_pseudo_register_type.
11566 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11567 pseudo register numbers.
11568 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11569 (SPARC64_CP0_REGISTERS): New macro.
11570 (sparc64_pseudo_register_name): New function.
11571 (sparc64_register_name): Use sparc64_pseudo_register_name.
11572 (sparc64_pseudo_register_type): New function.
11573 (sparc64_register_type): Use sparc64_pseudo_register_type.
11574 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11575 pseudo register numbers.
11576 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11577 sparc64_store_arguments): Handle pseudo register numbers.
11578
6f8976bf
YQ
115792017-01-13 Yao Qi <yao.qi@linaro.org>
11580
11581 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11582 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11583 output.
11584 (getpkt_or_notif_sane_1): Likewise.
11585
e4241ace
YQ
115862017-01-13 Yao Qi <yao.qi@linaro.org>
11587
11588 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11589 of CC. Pass "-x c++-header" instead of "-x c".
11590
3015c064
SM
115912017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11592
11593 * remote.c (remote_can_async_p): Update comment.
11594
fde1b17d
SM
115952017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11596
11597 * linux-nat.c (linux_nat_can_async_p): Update comment.
11598
ca1ca08b
SM
115992017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11600
11601 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11602
4ad2da73
SM
116032017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11604
11605 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11606
c8b23b3f
TT
116072017-01-10 Tom Tromey <tom@tromey.com>
11608
11609 * python/py-type.c (typy_legacy_template_argument): Update.
11610 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11611 ~demangle_parse_info): Declare new members.
11612 (cp_demangled_name_to_comp): Return unique_ptr.
11613 (cp_demangled_name_parse_free)
11614 (make_cleanup_cp_demangled_name_parse_free)
11615 (cp_new_demangle_parse_info): Remove.
11616 * cp-support.c (do_demangled_name_parse_free_cleanup)
11617 (make_cleanup_cp_demangled_name_parse_free): Remove.
11618 (inspect_type, cp_canonicalize_string_full)
11619 (cp_canonicalize_string): Update.
11620 (mangled_name_to_comp): Change return type.
11621 (cp_class_name_from_physname, method_name_from_physname)
11622 (cp_func_name, cp_remove_params): Update.
11623 * cp-name-parser.y (demangle_parse_info): New constructor, from
11624 cp_new_demangle_parse_info.
11625 (~demangle_parse_info): New destructor, from
11626 cp_demangled_name_parse_free.
11627 (cp_merge_demangle_parse_infos): Update.
11628 (cp_demangled_name_to_comp): Change return type.
11629
1ac32117
TT
116302017-01-10 Tom Tromey <tom@tromey.com>
11631
11632 * top.c (prevent_dont_repeat): Change return type.
11633 * python/python.c (execute_gdb_command): Use std::string.
11634 Update.
11635 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11636 * command.h (prevent_dont_repeat): Change return type.
11637 * breakpoint.c (bpstat_do_actions_1): Update.
11638
0cf08227
TT
116392017-01-10 Tom Tromey <tom@tromey.com>
11640
11641 * value.h (scoped_value_mark::~scoped_value_mark): Call
11642 free_to_mark.
11643 (scoped_value_mark::free_to_mark): New method.
11644 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11645 scoped_value_mark.
11646
eb115069
TT
116472017-01-10 Tom Tromey <tom@tromey.com>
11648
11649 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11650 (valpy_reference_value, valpy_const_value, valpy_get_address)
11651 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11652 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11653 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11654 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11655 scoped_value_mark.
11656 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11657 * value.h (scoped_value_mark): New class.
11658
906768f9
TT
116592017-01-10 Tom Tromey <tom@tromey.com>
11660
11661 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11662 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11663 * psymtab.c (discard_psymtabs_upto): Remove.
11664 (make_cleanup_discard_psymtabs): Remove.
11665 (struct psymtab_state): Remove.
11666
bef155c3
TT
116672017-01-10 Tom Tromey <tom@tromey.com>
11668
11669 * record-full.c (record_full_save_cleanups): Remove.
11670 (record_full_save): Use gdb::unlinker.
11671 * gcore.c (do_bfd_delete_cleanup): Remove.
11672 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11673 cleanups.
11674 * dwarf2read.c (unlink_if_set): Remove.
11675 (write_psymtabs_to_index): Use gdb::unlinker.
11676 * common/gdb_unlinker.h: New file.
11677
192b62ce
TT
116782017-01-10 Tom Tromey <tom@tromey.com>
11679
11680 * windows-tdep.c (windows_xfer_shared_library): Update.
11681 * windows-nat.c (windows_make_so): Update.
11682 * utils.h (make_cleanup_bfd_unref): Remove.
11683 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11684 * symfile.h (symfile_bfd_open)
11685 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11686 * symfile.c (read_symbols, symbol_file_add)
11687 (separate_debug_file_exists): Update.
11688 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11689 (generic_load, reread_symbols): Update.
11690 * symfile-mem.c (symbol_file_add_from_memory): Update.
11691 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11692 (spu_symbol_file_add_from_memory): Update.
11693 * solist.h (struct target_so_ops) <bfd_open>: Return
11694 gdb_bfd_ref_ptr.
11695 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11696 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11697 gdb_bfd_ref_ptr.
11698 (solib_map_sections, reload_shared_libraries_1): Update.
11699 * solib-svr4.c (enable_break): Update.
11700 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11701 * solib-frv.c (enable_break2): Update.
11702 * solib-dsbt.c (enable_break): Update.
11703 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11704 gdb_bfd_ref_ptr.
11705 (darwin_solib_get_all_image_info_addr_at_init): Update.
11706 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11707 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11708 * record-full.c (record_full_save): Update.
11709 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11710 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11711 * minidebug.c (find_separate_debug_file_in_section): Return
11712 gdb_bfd_ref_ptr.
11713 * machoread.c (macho_add_oso_symfile): Change abfd to
11714 gdb_bfd_ref_ptr.
11715 (macho_symfile_read_all_oso): Update.
11716 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11717 (macho_symfile_read): Update.
11718 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11719 (jit_bfd_try_read_symtab): Update.
11720 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11721 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11722 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11723 gdb_bfd_ref_ptr.
11724 (gdb_bfd_ref_policy): New struct.
11725 (gdb_bfd_ref_ptr): New typedef.
11726 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11727 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11728 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11729 gdb_bfd_ref_ptr.
11730 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11731 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11732 (gcore_command): Update.
11733 * exec.c (exec_file_attach): Update.
11734 * elfread.c (elf_symfile_read): Update.
11735 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11736 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11737 (open_and_init_dwo_file): Update.
11738 (open_dwp_file): Return gdb_bfd_ref_ptr.
11739 (open_and_init_dwp_file): Update.
11740 * corelow.c (core_open): Update.
11741 * compile/compile-object-load.c (compile_object_load): Update.
11742 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11743 * coffread.c (coff_symfile_read): Update.
11744 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11745 gdb_bfd_ref_ptr. Rename.
11746 (dump_bfd_file, restore_command): Update.
11747 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11748 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11749 (find_separate_debug_file_by_buildid): Update.
11750
50315b21
TT
117512017-01-10 Tom Tromey <tom@tromey.com>
11752
11753 * common/gdb_ref_ptr.h: New file.
11754 * python/py-ref.h (struct gdbpy_ref_policy): New.
11755 (gdbpy_ref): Now a typedef.
11756
fc4007c9
TT
117572017-01-10 Tom Tromey <tom@tromey.com>
11758
11759 * utils.h (make_cleanup_htab_delete): Don't declare.
11760 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11761 Remove.
11762 * linespec.c (decode_compound_collector): Add constructor,
11763 destructor.
11764 (lookup_prefix_sym): Remove cleanup.
11765 (symtab_collector): Add constructor, destructor.
11766 (collect_symtabs_from_filename): Remove cleanup.
11767 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11768 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11769 Use htab_up.
11770 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11771 * dwarf2read.c (dw2_expand_symtabs_matching)
11772 (dw2_map_symbol_filenames, dwarf_decode_macros)
11773 (write_psymtabs_to_index): Use htab_up.
11774 * dwarf2loc.c (func_verify_no_selftailcall)
11775 (call_site_find_chain_1, func_verify_no_selftailcall)
11776 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11777 std::vector, gdb::unique_xmalloc_ptr.
11778 (call_sitep): Remove typedef.
11779 (dwarf2_locexpr_baton_eval): Remove unused variable.
11780
8dbcee67
TT
117812017-01-10 Tom Tromey <tom@tromey.com>
11782
11783 * python/python-internal.h (make_cleanup_py_decref)
11784 (make_cleanup_py_xdecref): Don't declare.
11785 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11786 (py_xdecref, make_cleanup_py_xdecref): Remove.
11787
13df46cc
TT
117882017-01-10 Tom Tromey <tom@tromey.com>
11789
11790 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11791 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11792
06fc9bf7
TT
117932017-01-10 Tom Tromey <tom@tromey.com>
11794
11795 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11796
830a4934
TT
117972017-01-10 Tom Tromey <tom@tromey.com>
11798
11799 * python/py-utils.c (unicode_to_encoded_string)
11800 (python_string_to_target_string)
11801 (python_string_to_target_python_string)
11802 (python_string_to_host_string, gdbpy_obj_to_string)
11803 (get_addr_from_python): Use gdbpy_ref.
11804
4586d543
TT
118052017-01-10 Tom Tromey <tom@tromey.com>
11806
11807 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11808 gdbpy_ref.
11809
59876f8f
TT
118102017-01-10 Tom Tromey <tom@tromey.com>
11811
11812 * python/python.c (eval_python_command, gdbpy_decode_line)
11813 (gdbpy_run_events, gdbpy_start_type_printers)
11814 (gdbpy_apply_type_printers): Use gdbpy_ref.
11815
97d83487
TT
118162017-01-10 Tom Tromey <tom@tromey.com>
11817
11818 * python/py-param.c (get_doc_string, compute_enum_values): Use
11819 gdbpy_ref.
11820
9205649a
TT
118212017-01-10 Tom Tromey <tom@tromey.com>
11822
11823 * python/py-inferior.c (find_thread_object, build_inferior_list):
11824 Use gdbpy_ref.
11825
74c49d45
TT
118262017-01-10 Tom Tromey <tom@tromey.com>
11827
11828 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11829
16361ffb
TT
118302017-01-10 Tom Tromey <tom@tromey.com>
11831
11832 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11833 gdbpy_ref.
11834
905f2cca
TT
118352017-01-10 Tom Tromey <tom@tromey.com>
11836
11837 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11838 extra incref.
11839 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11840 Use gdbpy_ref.
11841
64081434
TT
118422017-01-10 Tom Tromey <tom@tromey.com>
11843
11844 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11845 gdbpy_ref.
11846
59e9e831
TT
118472017-01-10 Tom Tromey <tom@tromey.com>
11848
11849 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11850 decref results of PyArg_ParseTupleAndKeywords.
11851
9de10f6d
TT
118522017-01-10 Tom Tromey <tom@tromey.com>
11853
11854 * python/python.c (python_run_simple_file): Use
11855 unique_xmalloc_ptr, gdbpy_ref.
11856
2bd5759d
TT
118572017-01-10 Tom Tromey <tom@tromey.com>
11858
11859 * python/py-prettyprint.c (print_stack_unless_memory_error)
11860 (print_string_repr, print_children): Use gdbpy_ref.
11861 (dummy_python_frame): New class.
11862 (dummy_python_frame::dummy_python_frame): Rename from
11863 push_dummy_python_frame.
11864 (py_restore_tstate): Remove.
11865
3b4e0e01
TT
118662017-01-10 Tom Tromey <tom@tromey.com>
11867
11868 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11869
17a22718
TT
118702017-01-10 Tom Tromey <tom@tromey.com>
11871
11872 * python/python.c (ensure_python_env, restore_python_env):
11873 Remove.
11874 * python/python-internal.h (ensure_python_env): Don't declare.
11875 * varobj.h (varobj_ensure_python_env): Don't declare.
11876 * varobj.c (varobj_ensure_python_env): Remove.
11877
68cdc557
TT
118782017-01-10 Tom Tromey <tom@tromey.com>
11879
11880 * varobj.c (varobj_value_get_print_value): Use
11881 gdbpy_enter_varobj.
11882
1eba6383
TT
118832017-01-10 Tom Tromey <tom@tromey.com>
11884
11885 * python/py-prettyprint.c (print_string_repr, print_children):
11886 Update.
11887 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11888 of "encoding".
11889 * varobj.c (varobj_value_get_print_value): Update.
11890 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11891
bde7b3e3
TT
118922017-01-10 Tom Tromey <tom@tromey.com>
11893
11894 * varobj.c (varobj_get_display_hint)
11895 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11896 (varobj_set_visualizer, free_variable): Use
11897 gdbpy_enter_varobj.
11898
a7785f8c
TT
118992017-01-10 Tom Tromey <tom@tromey.com>
11900
11901 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11902 (do_finish_initialization): New function. Use gdbpy_ref.
11903 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11904 do_finish_initialization.
11905
2865bfce
TT
119062017-01-10 Tom Tromey <tom@tromey.com>
11907
11908 * python/py-param.c (get_set_value, get_show_value): Use
11909 gdbpy_enter, gdbpy_ref.
11910
0e9dcc75
TT
119112017-01-10 Tom Tromey <tom@tromey.com>
11912
11913 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11914
12a5cedd
TT
119152017-01-10 Tom Tromey <tom@tromey.com>
11916
11917 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11918
788f2586
TT
119192017-01-10 Tom Tromey <tom@tromey.com>
11920
11921 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11922 Use gdbpy_enter_varobj.
11923
6cd67bea
TT
119242017-01-10 Tom Tromey <tom@tromey.com>
11925
11926 * varobj.c (gdbpy_enter_varobj): New constructor.
11927 * python/python-internal.h (gdbpy_enter_varobj): New class.
11928 * python/py-varobj.c (py_varobj_get_iterator): Use
11929 gdbpy_enter_varobj.
11930
14b122bf
TT
119312017-01-10 Tom Tromey <tom@tromey.com>
11932
11933 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11934 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11935 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11936 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11937 unique_xmalloc_ptr.
11938 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11939
bf1ca3b9
TT
119402017-01-10 Tom Tromey <tom@tromey.com>
11941
11942 * python/py-xmethods.c (invoke_match_method): Use
11943 gdbpy_ref.
11944
572a5524
TT
119452017-01-10 Tom Tromey <tom@tromey.com>
11946
11947 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11948 gdbpy_enter, gdbpy_ref.
11949
396a78b6
TT
119502017-01-10 Tom Tromey <tom@tromey.com>
11951
11952 * python/python.c (python_interactive_command): Use gdbpy_enter.
11953
a88b13c7
TT
119542017-01-10 Tom Tromey <tom@tromey.com>
11955
11956 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11957 gdbpy_ref.
11958
e9f0c363
TT
119592017-01-10 Tom Tromey <tom@tromey.com>
11960
11961 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11962 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11963
6349f452
TT
119642017-01-10 Tom Tromey <tom@tromey.com>
11965
11966 * utils.h (htab_deleter): New struct.
11967 (htab_up): New typedef.
11968 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11969 gdbpy_enter, gdbpy_ref, htab_up.
11970
c0171de6
TT
119712017-01-10 Tom Tromey <tom@tromey.com>
11972
11973 * python/py-unwind.c (pending_frame_invalidate): Remove.
11974 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11975
f18e226f
TT
119762017-01-10 Tom Tromey <tom@tromey.com>
11977
11978 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11979 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11980
c57af3f1
TT
119812017-01-10 Tom Tromey <tom@tromey.com>
11982
11983 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11984
60e600ec
TT
119852017-01-10 Tom Tromey <tom@tromey.com>
11986
11987 * python/python.c (gdbpy_eval_from_control_command)
11988 (gdbpy_source_script, gdbpy_run_events)
11989 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11990 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11991 gdbpy_enter.
11992
bf7da5b0
TT
119932017-01-10 Tom Tromey <tom@tromey.com>
11994
11995 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11996
2d38bced
TT
119972017-01-10 Tom Tromey <tom@tromey.com>
11998
11999 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12000
07bc7329
TT
120012017-01-10 Tom Tromey <tom@tromey.com>
12002
12003 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12004 (python_on_inferior_call_pre, python_on_inferior_call_post)
12005 (python_on_memory_change, python_on_register_change)
12006 (python_inferior_exit, python_new_objfile, add_thread_object)
12007 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12008
6e7c365e
TT
120092017-01-10 Tom Tromey <tom@tromey.com>
12010
12011 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12012 (bpfinishpy_handle_exit): Use gdbpy_enter.
12013
6ba0cd40
TT
120142017-01-10 Tom Tromey <tom@tromey.com>
12015
12016 * python/py-cmd.c (cmdpy_destroyer)
12017 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12018 gdbpy_enter.
12019
de2dc875
TT
120202017-01-10 Tom Tromey <tom@tromey.com>
12021
12022 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12023 gdbpy_enter.
12024 (gdbpy_breakpoint_has_cond): Likewise.
12025
4ecee2c4
TT
120262017-01-10 Tom Tromey <tom@tromey.com>
12027
12028 * python/python.c (gdbpy_enter): New constructor.
12029 (~gdbpy_enter): New destructor.
12030 (restore_python_env, ensure_python_env): Rewrite.
12031 * python/python-internal.h (gdbpy_enter): New class.
12032
37fce74f
TT
120332017-01-10 Tom Tromey <tom@tromey.com>
12034
12035 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12036
53a0cca3
TT
120372017-01-10 Tom Tromey <tom@tromey.com>
12038
12039 * python/py-value.c (value_has_field, get_field_flag)
12040 (get_field_type, valpy_getitem, convert_value_from_python): Use
12041 gdbpy_ref.
12042
ff3724f5
TT
120432017-01-10 Tom Tromey <tom@tromey.com>
12044
12045 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12046 gdbpy_ref.
12047
0700aea5
TT
120482017-01-10 Tom Tromey <tom@tromey.com>
12049
12050 * python/py-prettyprint.c (search_pp_list)
12051 (find_pretty_printer_from_objfiles)
12052 (find_pretty_printer_from_progspace)
12053 (find_pretty_printer_from_gdb, find_pretty_printer)
12054 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12055 gdbpy_ref.
12056
1bb44c9f
TT
120572017-01-10 Tom Tromey <tom@tromey.com>
12058
12059 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12060
87ce03fd
TT
120612017-01-10 Tom Tromey <tom@tromey.com>
12062
12063 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12064 (ltpy_get_all_source_lines): Use gdbpy_ref.
12065
ee0a3fb8
TT
120662017-01-10 Tom Tromey <tom@tromey.com>
12067
12068 * python/py-framefilter.c (extract_sym, extract_value)
12069 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12070 gdbpy_ref.
12071
bf2a52fa
TT
120722017-01-10 Tom Tromey <tom@tromey.com>
12073
12074 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12075
f59fe7f8
TT
120762017-01-10 Tom Tromey <tom@tromey.com>
12077
12078 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12079
80bd970a
TT
120802017-01-10 Tom Tromey <tom@tromey.com>
12081
12082 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12083 gdbpy_ref.
12084
d1b3de2e
TT
120852017-01-10 Tom Tromey <tom@tromey.com>
12086
12087 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12088
3bb43384
TT
120892017-01-10 Tom Tromey <tom@tromey.com>
12090
12091 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12092 (typy_range): Use gdbpy_ref.
12093
abf5651e
TT
120942017-01-10 Tom Tromey <tom@tromey.com>
12095
12096 * python/py-threadevent.c (create_thread_event_object): Use
12097 gdbpy_ref.
12098 * python/py-stopevent.c (create_stop_event_object): Simplify.
12099 (emit_stop_event): Use gdbpy_ref.
12100 * python/py-signalevent.c (create_signal_event_object): Use
12101 gdbpy_ref.
12102 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12103 (emit_new_objfile_event, create_clear_objfiles_event_object)
12104 (emit_clear_objfiles_event): Use gdbpy_ref.
12105 * python/py-infevents.c (create_inferior_call_event_object)
12106 (create_register_changed_event_object)
12107 (create_memory_changed_event_object, emit_inferior_call_event)
12108 (emit_memory_changed_event, emit_register_changed_event): Use
12109 gdbpy_ref.
12110 * python/py-exitedevent.c (create_exited_event_object)
12111 (emit_exited_event): Use gdbpy_ref.
12112 * python/py-event.h (evpy_emit_event): Remove
12113 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12114 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12115 * python/py-continueevent.c (emit_continue_event): Use
12116 gdbpy_ref.
12117 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12118 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12119 gdbpy_ref.
12120 * python/py-bpevent.c (create_breakpoint_event_object): Use
12121 gdbpy_ref.
12122
a68ff33e
TT
121232017-01-10 Tom Tromey <tom@tromey.com>
12124
12125 * python/py-ref.h: New file.
12126
7becfd03
SM
121272017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12128
12129 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12130 void.
12131 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12132 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12133 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12134 * ui-out.c (ui_out::redirect): Likewise.
12135 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12136 * cli/cli-logging.c (set_logging_redirect): Update call site of
12137 ui_out::redirect.
12138 (handle_redirections): Likewise.
12139 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12140 * top.c (execute_command_to_string): Likewise.
12141 * utils.c (do_ui_out_redirect_pop): Likewise.
12142
df294654
SM
121432017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12144
12145 * stack.c (_initialize_stack): Update "frame" command help message.
12146
f5e6296e
IB
121472017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12148
12149 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12150
0e2d6fa6
YQ
121512017-01-06 Yao Qi <yao.qi@linaro.org>
12152
12153 * x86-linux-nat.h: Include gdb_proc_service.h.
12154
44d6d3f9
YQ
121552017-01-06 Yao Qi <yao.qi@linaro.org>
12156
12157 * ser-base.h: Include serial.h.
12158
656731fe
YQ
121592017-01-06 Yao Qi <yao.qi@linaro.org>
12160
12161 * ppc-linux-tdep.h: Include ppc-tdep.h.
12162
1ca8f924
YQ
121632017-01-06 Yao Qi <yao.qi@linaro.org>
12164
12165 * nat/amd64-linux-siginfo.h: Include signal.h.
12166
bc3008c4
YQ
121672017-01-06 Yao Qi <yao.qi@linaro.org>
12168
12169 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12170
66c80d03
YQ
121712017-01-06 Yao Qi <yao.qi@linaro.org>
12172
12173 * mi/mi-parse.h: Include mi-cmds.h.
12174
051d2dda
YQ
121752017-01-06 Yao Qi <yao.qi@linaro.org>
12176
12177 * inf-loop.c: Don't include "target.h".
12178 * inf-loop.h: Include it here.
12179
8018d34f
YQ
121802017-01-06 Yao Qi <yao.qi@linaro.org>
12181
12182 * dfp.h: Include "dboulest.h" and "expression.h".
12183
c0b8369c
YQ
121842017-01-06 Yao Qi <yao.qi@linaro.org>
12185
12186 * ax-gdb.h: Include "ax.h".
12187
ad5cba2a
YQ
121882017-01-06 Yao Qi <yao.qi@linaro.org>
12189
12190 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12191 with nat/gdb_ptrace.h.
12192
1c33cd7f
YQ
121932017-01-05 Yao Qi <yao.qi@linaro.org>
12194
12195 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12196 new line.
12197 (mips64_fbsd_sigframe_init): Likewise.
12198
c988ac1d
JB
121992017-01-04 John Baldwin <jhb@FreeBSD.org>
12200
12201 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12202 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12203
b268007c
JB
122042017-01-04 John Baldwin <jhb@FreeBSD.org>
12205
12206 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12207 * NEWS: Mention new FreeBSD/mips native configuration.
12208 * config/mips/fbsd.mh: New file.
12209 * configure.host: Add mips*-*-freebsd*.
12210 * mips-fbsd-nat.c: New file.
12211
387360da
JB
122122017-01-04 John Baldwin <jhb@FreeBSD.org>
12213
12214 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12215 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12216 * NEWS: Mention new FreeBSD/mips target.
12217 * configure.tgt: Add mips*-*-freebsd*.
12218 * mips-fbsd-tdep.c: New file.
12219 * mips-fbsd-tdep.h: New file.
12220
2aaaf250
YQ
122212017-01-04 Yao Qi <yao.qi@linaro.org>
12222
12223 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12224 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12225
61baf725
JB
122262017-01-01 Joel Brobecker <brobecker@adacore.com>
12227
6dbb839a 12228 Update copyright year range in all GDB files.
61baf725 12229
c113e7ff 122302017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 12231
c113e7ff 12232 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 12233
c113e7ff 12234For older changes see ChangeLog-2016.
c906108c
SS
12235\f
12236Local Variables:
12237mode: change-log
12238left-margin: 8
12239fill-column: 74
12240version-control: never
57da7796 12241coding: utf-8
c906108c 12242End: